PageSourceSearch

https://www.sorel.ie/on/demandware.static/Sites-Sorel_IE-Site/-/en_IE/v1791164476554/js/mainHead.js

js sorel.ie collected 2026-10-05 04:43:57 UTC 376,061 bytes, 10,761 lines download raw bytes

vendor: 3,632 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 = "./.tmp/app_sor_eu_core/js/mainHead.js");
85/******/ })
86/************************************************************************/
87/******/ ({
88
89/***/ "./.tmp/app_sor_eu_core/js/dataLayer/pageVisitReferrer.js":
90/*!****************************************************************!*\
91  !*** ./.tmp/app_sor_eu_core/js/dataLayer/pageVisitReferrer.js ***!
92  \****************************************************************/
93/*! no static exports found */
94/***/ (function(module, exports, __webpack_require__) {
95
96"use strict";
97
98
99/**
100 * Determines if a referrer is single use if it exists.
101 * @returns {boolean} returns true referrer exists and is single use.
102 */
103function isSingleUseReferrer() {
104  if (!document.referrer) {
105    return false;
106  }
107  if (!window.resources || !window.resources.dataLayer) {
108    // eslint-disable-next-line no-console
109    console.error('window.resources.dataLayer not loaded');
110    return false;
111  }
112  var referrerURL = new URL(document.referrer.toLowerCase());
113
114  /**
115   * Example: https://www.google.com/ yields a hostname of www.google.com
116   * hostname will be blank for referrers like android-app://com.google.android.gm/ (GSD-12748)
117   * in case they need to be supported in the future.
118   */
119  if (!referrerURL.hostname) {
120    return false;
121  }
122  var domainMatchResults = /[^.]*\.[^.]+$/.exec(referrerURL.hostname);
123  var domain = domainMatchResults ? domainMatchResults[0] : null;
124  return domain && window.resources.dataLayer.singleReferralDomains.includes(domain) || false;
125}
126
127/**
128 * If a referrer is single use, it captures the usage.
129 * @returns {Object} returns objects with details on the capture.
130 */
131function captureSingleUseReferrer() {
132  var result = {
133    isSingleUse: isSingleUseReferrer(),
134    previouslyCaptured: false
135  };
136  var sessionSpecificLocalStorageHelper = __webpack_require__(/*! ../helper/sessionSpecificLocalStorageHelper */ "./.tmp/app_sor_eu_core/js/helper/sessionSpecificLocalStorageHelper.js");
137
138  // Do not change the storage key unless code is added to delete entries made under old key
139  var storageKey = 'pageVisitReferrer.singleUseReferrerHistory';
140
141  // Always fetch the value before exiting so the code can clear invalid values
142  var singleUseReferrals = sessionSpecificLocalStorageHelper.getItem(storageKey);
143  if (!result.isSingleUse) {
144    return result;
145  }
146  singleUseReferrals = singleUseReferrals || {
147    /**
148     * localStorage is not intended to expire. As such, if the storage structure changes, the code will need to account for it.
149     * In such a scenario, increase this version number and clear the stored data for older versions.
150     */
151    storageVersion: 1
152  };
153
154  // Lower case the URLs to be safe/consistent
155  var currentUrl = window.location.href.toLowerCase();
156  var referrer = document.referrer.toLowerCase();
157  var currentUrlReferrers = singleUseReferrals[currentUrl];
158  if (currentUrlReferrers && currentUrlReferrers.includes(referrer)) {
159    result.previouslyCaptured = true;
160    return result;
161  }
162  if (!currentUrlReferrers) {
163    currentUrlReferrers = [];
164    singleUseReferrals[currentUrl] = currentUrlReferrers;
165  }
166  currentUrlReferrers.push(referrer);
167  sessionSpecificLocalStorageHelper.setItem(storageKey, singleUseReferrals);
168  return result;
169}
170module.exports = {
171  isSingleUseReferrer: isSingleUseReferrer,
172  captureSingleUseReferrer: captureSingleUseReferrer
173};
174
175/***/ }),
176
177/***/ "./.tmp/app_sor_eu_core/js/helper/sessionSpecificLocalStorageHelper.js":
178/*!*****************************************************************************!*\
179  !*** ./.tmp/app_sor_eu_core/js/helper/sessionSpecificLocalStorageHelper.js ***!
180  \*****************************************************************************/
181/*! no static exports found */
182/***/ (function(module, exports, __webpack_require__) {
183
184"use strict";
185
186
187/**
188 * Gets the current session ID.
189 * @returns {string} returns the session ID if it can be found.
190 */
191function getSessionID() {
192  /**
193   * Ideally we would use dwsid, which SFCC logs.
194   * However, its stored in a cookie that is inaccessible to client JS.
195   * 'sid' also identifies the current browsing session, matches session.sessionID, and is client JS accessible.
196   * Per SFCC:
197   * - session.sessionID: this can safely be used as an identifier against external systems.
198   * - sid cookie: identifies the current browsing session.
199   */
200  var sessionCookie = document.cookie.split('; ').find(function (row) {
201    return row.startsWith('sid=');
202  });
203  var sessionId = sessionCookie ? sessionCookie.split('=')[1] : null;
204  if (!sessionId) {
205    // eslint-disable-next-line no-console
206    console.error('getSessionID: could not determine session ID');
207  }
208  return sessionId;
209}
210
211/**
212 * Gets an item from local storage, that was previously JSON stringified.
213 * If the session ID that was stored with the item,
214 * doesn't match the current ID then local storage is cleared and null returned.
215 * Note: for non-primitive types, like for dates, JSON.parse will leave it as string.
216 * @param {string} keyName - name of the key where the item is stored
217 * @returns {*} the stored item or null (particularly if session ID has changed)
218 */
219function getItem(keyName) {
220  var sessionID = getSessionID();
221  if (!sessionID) {
222    return null;
223  }
224  var json = localStorage.getItem(keyName);
225  var itemWrapper;
226  if (json) {
227    try {
228      /**
229       * In the future, if additional customization is needed,
230       * add 'reviver' as an optional argument to getItem and pass it into JSON.parse.
231       */
232      itemWrapper = JSON.parse(json);
233    } catch (e) {
234      // eslint-disable-next-line no-console
235      console.error("Unable to parse ".concat(keyName, "': ").concat(e.message, "; ").concat(json));
236    }
237  }
238  if (!itemWrapper) {
239    return null;
240  }
241
242  // Session has change remove the item
243  if (itemWrapper.sessionID !== sessionID) {
244    localStorage.removeItem(keyName);
245    return null;
246  }
247  return itemWrapper.item;
248}
249
250/**
251 * Sets an item in local storage after passing it through JSON stringify along with its session ID.
252 * @param {string} keyName - name of the key where the item is stored
253 * @param {*} item - item to store
254 * @returns {boolean} true if item is successfully stored, otherwise false.
255 */
256function setItem(keyName, item) {
257  var itemWrapper = {
258    sessionID: getSessionID(),
259    item: item
260  };
261  if (!itemWrapper.sessionID) {
262    return false;
263  }
264  localStorage.setItem(keyName, JSON.stringify(itemWrapper));
265  return true;
266}
267module.exports = {
268  getItem: getItem,
269  setItem: setItem
270};
271
272/***/ }),
273
274/***/ "./.tmp/app_sor_eu_core/js/mainHead.js":
275/*!*********************************************!*\
276  !*** ./.tmp/app_sor_eu_core/js/mainHead.js ***!
277  \*********************************************/
278/*! no static exports found */
279/***/ (function(module, exports, __webpack_require__) {
280
281/**
282 * Main Head Script File
283 *
284 * This is loaded in the header of all pages. Great care should be used when adding
285 * scripts to this file. Only scripts that must be loaded before everything else should
286 * be added here. This file will pause loading until it executes.
287 */
288window.jQuery = window.$ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js");
289
290/**
291 * Execute the given function when the window load event fires, or imediately if it has already fired.
292 * @param {function} cb The function to execute after the window.load event
293 */
294window.afterLoad = function (cb) {
295  if (document.readyState === 'complete') {
296    // the load event already fired. just call the callback now.
297    cb();
298  } else {
299    window.addEventListener('load', cb);
300  }
301};
302
303/**
304 * Get closest parent, given the current selector
305 * @param {*} el - element to iterate over
306 * @param {string} selector - selector to search for
307 * @returns {*} - element of the provided selector or null
308 */
309function getClosest(el, selector) {
310  var iteratedElement = el;
311  while (iteratedElement) {
312    if (iteratedElement.classList) {
313      for (var i = 0; i < iteratedElement.classList.length; i++) {
314        if (iteratedElement.classList[i] === selector) {
315          return iteratedElement;
316        }
317      }
318    }
319    iteratedElement = iteratedElement.parentNode;
320  }
321  return null;
322}
323window.imageError = function (img, type) {
324  var defaultImgLink = typeof resources !== 'undefined' && resources.images && resources.images.placeholderImgLarge ? resources.images.placeholderImgLarge : ''; // eslint-disable-line no-undef
325  var defaultAltText = typeof resources !== 'undefined' && resources.images && resources.images.placeholderImgAlt ? resources.images.placeholderImgAlt : ''; // eslint-disable-line no-undef
326  var appendType = type || '';
327  if (defaultImgLink) {
328    var parentElement;
329    // If data-src or data-src-alt are on the img tag, this means that it is a quick view image, which means parentElement will be set
330    if (img.attributes['data-src'] && img.attributes['data-src'].value === img.src) {
331      img.setAttribute('data-src', defaultImgLink);
332      img.setAttribute('data-srcset', defaultImgLink);
333      img.setAttribute('srcset', defaultImgLink);
334      parentElement = getClosest(img, 'product-tile');
335      if (parentElement) {
336        parentElement.querySelector('a.js-color-swatch.selected').setAttribute('data-swatch-img', defaultImgLink);
337      }
338    } else if (img.attributes['data-src-alt'] && img.attributes['data-src-alt'].value === img.src) {
339      img.setAttribute('data-src-alt', defaultImgLink);
340      parentElement = getClosest(img, 'product-tile');
341      if (parentElement) {
342        parentElement.querySelector('a.js-color-swatch.selected').setAttribute('data-swatch-img-alt', defaultImgLink);
343      }
344    }
345    if (appendType === 'retina') {
346      appendType = typeof resources !== 'undefined' && resources.pdpProductImgAppend ? resources.pdpProductImgAppend : ''; // eslint-disable-line no-undef
347      img.previousElementSibling.setAttribute('srcset', defaultImgLink + appendType); // eslint-disable-line no-param-reassign
348    } else if (appendType === 'large') {
349      appendType = typeof resources !== 'undefined' && resources.pdpProductImgAppend ? resources.pdpProductImgAppend : ''; // eslint-disable-line no-undef
350    } else if (appendType === 'thumb') {
351      appendType = typeof resources !== 'undefined' && resources.pdpThumbImgAppend ? resources.pdpThumbImgAppend : ''; // eslint-disable-line no-undef
352    } else {
353      appendType = typeof resources !== 'undefined' && resources.gridImageAppend ? resources.gridImageAppend : ''; // eslint-disable-line no-undef
354    }
355
356    img.src = defaultImgLink + appendType; // eslint-disable-line no-param-reassign
357    img.srcset = defaultImgLink + appendType; // eslint-disable-line no-param-reassign
358    img.alt = defaultAltText; // eslint-disable-line no-param-reassign
359  }
360};
361
362__webpack_require__(/*! ./scene7/s7ImageSet */ "./.tmp/app_sor_eu_core/js/scene7/s7ImageSet.js");
363var pageVisitReferrer = __webpack_require__(/*! ./dataLayer/pageVisitReferrer */ "./.tmp/app_sor_eu_core/js/dataLayer/pageVisitReferrer.js");
364var sessionSpecificLocalStorageHelper = __webpack_require__(/*! ./helper/sessionSpecificLocalStorageHelper */ "./.tmp/app_sor_eu_core/js/helper/sessionSpecificLocalStorageHelper.js");
365(function () {
366  var currentState = window.history.state;
367  var dataLayer = window.digitalData;
368  if (dataLayer) {
369    var blankReferrer = false;
370
371    /**
372     * Handles client code that alters page URL or history.
373     * This happens, for example, when a user quick shops on the product grid page.
374     * In those cases, rather than capturing ever altered URL as a usage of a referrer,
375     * state data is amended to note the referrer should be cleared on page load when using browser back/forward buttons.
376     * Reads data captured by historyHooks.js
377     */
378    if (currentState && currentState.digitalData && currentState.digitalData.blankVisitReferrerOnLoad) {
379      blankReferrer = true;
380    } else {
381      var captureResult = pageVisitReferrer.captureSingleUseReferrer();
382      if (captureResult.previouslyCaptured) {
383        blankReferrer = true;
384      }
385    }
386    dataLayer.pageVisit = {
387      referrer: blankReferrer ? window.location.origin : document.referrer
388    };
389    var userSpecificDataPopulatedFromClientCache = false;
390
391    // If server provides user-specific data then use it, otherwise pull from cache
392    if (!dataLayer.user) {
393      var cacheEntry = sessionSpecificLocalStorageHelper.getItem('dataLayerPersistence.userSpecificData');
394      if (cacheEntry && cacheEntry.data) {
395        Object.assign(dataLayer, cacheEntry.data);
396        userSpecificDataPopulatedFromClientCache = true;
397      } else {
398        // eslint-disable-next-line no-console
399        console.error('Data layer provided by the server is missing user data and none previously cached on the client');
400      }
401    }
402    dataLayer.userSpecificDataPopulatedFromClientCache = userSpecificDataPopulatedFromClientCache;
403  }
404})();
405
406/**
407 * When the Page is loaded, notify Adobe Launch tags that the data layer is ready
408 */
409document.addEventListener('DOMContentLoaded', function () {
410  var dtmScript = document.getElementById('dtmScript');
411
412  // SFCC is a multi-page application, both events fire on every page load.
413  // On Composable, site:loaded:dtm fires only on initial load, page:loaded:dtm fires on every navigation.
414  function dispatchDataLayerEvents() {
415    window.dispatchEvent(new Event('site:loaded:dtm')); // Site initialization event
416    window.dispatchEvent(new Event('page:loaded:dtm')); // Page navigation event
417  }
418
419  // DTM script tag is missing OR present and loaded, trigger the event
420  if (!dtmScript || typeof _satellite !== 'undefined') {
421    dispatchDataLayerEvents();
422  } else {
423    // DTM script tag is not loaded yet, wait for it to load to fire the event
424    dtmScript.addEventListener('load', function () {
425      dispatchDataLayerEvents();
426    });
427  }
428});
429
430/***/ }),
431
432/***/ "./.tmp/app_sor_eu_core/js/scene7/s7ImageSet.js":
433/*!******************************************************!*\
434  !*** ./.tmp/app_sor_eu_core/js/scene7/s7ImageSet.js ***!
435  \******************************************************/
436/*! no static exports found */
437/***/ (function(module, exports, __webpack_require__) {
438
439function _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); }
440/** TEMPORARILY RESTORED to support legacy Scene7 assets that were imported to Amplience
441 * This file (and the import in mainHead.js) can be removed once all Scene7 assets have been replaced
442 * with Amplience assets.
443 */
444
445var debounce = __webpack_require__(/*! lodash/debounce */ "./node_modules/lodash/debounce.js");
446
447/* FIXME: temporarily defining these constants here... where should these live? */
448(function (appParam) {
449  var app = appParam;
450  app.constants = app.constants ? app.constants : {};
451  app.constants.breakpoints = {
452    XS: 0,
453    SM: 320,
454    MD: 576,
455    LG: 1024,
456    XL: 1440
457  };
458  window.app = app;
459})(window.app || {});
460
461/**
462 * Add basic controls for ADA compliance
463 * @param {HTMLElement} mediaContainer - HTMLElement for video container
464 * @param {HTMLElement} controlContainer - HTMLElement for video controls
465 */
466function S7VideoControls(mediaContainer, controlContainer) {
467  var video = mediaContainer.querySelector('video');
468  if (video && !video.controls || !controlContainer) return;
469
470  // disables native video controls, display custom controls
471  video.controls = false;
472  // eslint-disable-next-line no-param-reassign
473  controlContainer.style.display = 'block';
474  video.muted = true;
475  var isAudioControls = controlContainer.classList.contains('audioControls');
476  var isVideoControls = controlContainer.classList.contains('videoControls');
477  var muteButton;
478  if (isAudioControls) {
479    muteButton = controlContainer.querySelector('.s7MuteButton');
480    if (muteButton) {
481      muteButton.addEventListener('click', function () {
482        if (!video.muted) {
483          muteButton.classList.remove('video-audio-unmute-button');
484          muteButton.classList.add('video-audio-mute-button');
485          muteButton.ariaLabel = 'Unmute';
486          video.muted = true;
487        } else {
488          muteButton.classList.remove('video-audio-mute-button');
489          muteButton.classList.add('video-audio-unmute-button');
490          muteButton.ariaLabel = 'Mute';
491          video.muted = false;
492        }
493      });
494    }
495  }
496  var playPauseButton;
497  if (isVideoControls || isAudioControls) {
498    playPauseButton = controlContainer.querySelector('.s7PlayPauseButton');
499    if (playPauseButton) {
500      playPauseButton.addEventListener('click', function () {
501        if (video.paused || video.ended) {
502          playPauseButton.classList.remove('video-audio-play-button');
503          playPauseButton.classList.add('video-audio-pause-button');
504          video.play();
505          playPauseButton.ariaLabel = 'Pause';
506        } else {
507          playPauseButton.classList.remove('video-audio-pause-button');
508          playPauseButton.classList.add('video-audio-play-button');
509          video.pause();
510          playPauseButton.ariaLabel = 'Play';
511        }
512      });
513    }
514  }
515}
516
517/**
518 * Switch image src based on screen size.
519 * Usage:
520 *  The image must have a data-breakpoints attribute containing a JSON string of src URLs. See example for format:
521 *  <img src="image_M" alt="" id="myImage"
522 *      data-breakpoints='{"sm":{"src":"image_SM"},"md":{"src":"image_MD"},"lg":{"src":"image_LG"},"xl":{"src":"image_XL"}}' />
523 *  <script>
524 *      window.s7ImageSet(document.getElementById("myImage"));
525 *  </script>
526 *
527 * @param  {element} imgElement The img element to be updated.
528 */
529window.s7ImageSet = function (imgElement) {
530  // eslint-disable-line no-unused-vars
531  var imgHandle = imgElement;
532  var breakpointKeys = Object.keys(window.app.constants.breakpoints);
533  var breakpoint = {};
534  for (var k = 0; k < breakpointKeys.length; k++) {
535    breakpoint[breakpointKeys[k]] = breakpointKeys[k];
536  }
537  if (!imgHandle) return;
538  var bp = {}; // Must be defined at top.
539  var device = null;
540  try {
541    bp = JSON.parse(imgHandle.getAttribute('data-breakpoints'));
542  } catch (err) {
543    window.console.error('bad JSON data');
544    return;
545  }
546
547  // imgHandle.addEventListener('load', function() {
548  //  this.width = this.naturalWidth;
549  //  this.height = this.naturalHeight;
550  // });
551
552  /**
553   * Calculate ratio of width to height
554   *
555   * @param {number} a - Number
556   * @param {number} b - Number
557   * @returns {number} - Number
558   */
559  function getRatio(a, b) {
560    if (b !== 0) {
561      return a / b;
562    }
563    return 0;
564  }
565
566  /**
567   * qsToObj - Query String to Object. Converts a query string into a JSON object.
568   *     This string:
569   *     'param1=false&key2=2&key3&somethingElse=something%20else'
570   *     Becomes this object:
571   *     {
572   *         'param1': 'false',
573   *         'key2': '2',
574   *         'key3': null,
575   *         'somethingElse': 'something else'
576   *     }
577   * @param  {string} queryString - The string to be converted.
578   * @return {Object} - The result.
579   */
580  function qsToObj(queryString) {
581    var qs = queryString;
582    var qsObj = {};
583    if (qs && qs.length) {
584      if (qs[0] === '?') {
585        // remove the ? if it's there.
586        qs = qs.substring(1);
587      }
588      var pairs = qs.split('&'); // split the query string into name/value pairs
589      for (var i = 0; i < pairs.length; i++) {
590        var pairParts = pairs[i].split('=');
591        var key = pairParts[0];
592        var val = pairParts[1];
593        qsObj[key] = val !== undefined && val !== null ? decodeURIComponent(val) : null; // don't decode null values
594      }
595    }
596
597    return qsObj;
598  }
599
600  /**
601   * objToQs - Object to Query String. Converts a simple object into a name/value query string.
602   *     This object:
603   *     {
604   *         'false': false,
605   *         'key2': 2,
606   *         'null': null,
607   *         'empty': '',
608   *         'aSpace': 'something else'
609   *     }
610   *     Becomes this string:
611   *     'false=false&key2=2&null&empty=&aSpace=something%20else'
612   * @param  {Object} qsObj The object to be converted.
613   * @return {string}       The result.
614   */
615  function objToQs(qsObj) {
616    var qs = Object.keys(qsObj).map(function (key) {
617      var qval = qsObj[key];
618      var keyValuePair = key;
619      if (qval !== undefined && qval !== null) {
620        // if qval is undefined or null just return the key.
621        keyValuePair += '=' + encodeURIComponent(qval);
622      }
623      return keyValuePair;
624    }).join('&');
625    return qs;
626  }
627
628  /**
629   * setQueryString - Adds to or updates the query string in the give URL
630   *     Calling this:
631   *     setQueryString("//google.com/search?q=puppies", {"q": "kittens", "tbm": "isch"})
632   *     Returns this:
633   *     "//google.com/search?q=kittens&tbm=isch"
634   * @param {string} url    The URL having the query string to be modified.
635   * @param {Object} params An oject containing the query string keys and values to be added or updated.
636   * @returns {string} - URL
637   */
638  function setQueryString(url, params) {
639    // get parts of the url
640    var parts = url.split('?');
641    var base = parts[0];
642    var qs = parts.length > 1 ? parts[1] : '';
643
644    // convert query string to an object
645    var qsObject = qsToObj(qs);
646
647    // add or update the new params to the existing query string object
648    if (params && _typeof(params) === 'object') {
649      Object.keys(params).forEach(function (key) {
650        qsObject[key] = params[key];
651      });
652    }
653
654    // rebuild the query string
655    qs = objToQs(qsObject);
656
657    // reassemble the url
658    return base + '?' + qs;
659  }
660
661  /**
662   * Get the window width
663   *
664   * @returns {number} - Number
665   */
666  function getWindowWidth() {
667    // TODO: add scrollbar width if there is a scrollbar on body
668    return window.innerWidth;
669  }
670
671  /**
672   * Get device size
673   *
674   * @param {number} windowWidthNumber - Number
675   * @returns {number} - Number
676   */
677  function getDeviceSize(windowWidthNumber) {
678    var windowWidth = windowWidthNumber;
679    if (!windowWidth) {
680      windowWidth = getWindowWidth();
681    }
682    if (windowWidth >
682= window.app.constants.breakpoints.XL) {
683      return breakpoint.XL;
684    }
685    if (windowWidth >= window.app.constants.breakpoints.LG) {
686      return breakpoint.LG;
687    }
688    if (windowWidth >= window.app.constants.breakpoints.MD) {
689      return breakpoint.MD;
690    }
691    return breakpoint.SM;
692  }
693
694  /**
695   * Get breakpoint width
696   *
697   * @param {string} size - String
698   * @returns {number} - Number
699   */
700  function getNearestBPInData(size) {
701    var sizeExists = function sizeExists(testSize) {
702      var sizeResult = false;
703      if (bp[testSize] && bp[testSize].src.length) {
704        sizeResult = testSize;
705      }
706      return sizeResult;
707    };
708
709    /* eslint-disable */
710
711    // else, check for next biggest option. Please note, missing breaks are intentional.
712    switch (size) {
713      case 'XS':
714        if (sizeExists('xs')) {
715          return breakpoint.XS;
716        }
717      case 'SM':
718        if (sizeExists('sm')) {
719          return breakpoint.SM;
720        }
721      case 'MD':
722        if (sizeExists('md')) {
723          return breakpoint.MD;
724        }
725      case 'LG':
726        if (sizeExists('lg')) {
727          return breakpoint.LG;
728        }
729      case 'XL':
730        if (sizeExists('xl')) {
731          return breakpoint.XL;
732        }
733    }
734
735    // else, check for next smallest option
736    switch (size) {
737      case 'XL':
738        if (sizeExists('xl')) {
739          return breakpoint.XL;
740        }
741      case 'LG':
742        if (sizeExists('lg')) {
743          return breakpoint.LG;
744        }
745      case 'MD':
746        if (sizeExists('md')) {
747          return breakpoint.MD;
748        }
749      case 'SM':
750        if (sizeExists('sm')) {
751          return breakpoint.SM;
752        }
753      case 'XS':
754        if (sizeExists('xs')) {
755          return breakpoint.XS;
756        }
757    }
758    /* eslint-enable */
759
760    // if all else fails, return what we started with.
761    return size;
762  }
763
764  /**
765   * Window Resize Event
766   */
767  function winResized() {
768    // get window width
769    var currentDeviceSize = getDeviceSize(getWindowWidth());
770    if (currentDeviceSize === device) {
771      return;
772    }
773    device = currentDeviceSize;
774    device = getNearestBPInData(device);
775    // console.log('new device size',device);
776
777    var newSrc;
778    var newWidth;
779    var newHeight;
780
781    // update img src, width, height
782    switch (device) {
783      case breakpoint.XL:
784        newSrc = bp.xl.src;
785        newWidth = bp.xl.width;
786        newHeight = bp.xl.height;
787        break;
788      case breakpoint.LG:
789        newSrc = bp.lg.src;
790        newWidth = bp.lg.width;
791        newHeight = bp.lg.height;
792        break;
793      case breakpoint.MD:
794        newSrc = bp.md.src;
795        newWidth = bp.md.width;
796        newHeight = bp.md.height;
797        break;
798      case breakpoint.SM:
799      default:
800        var containerWidth = imgHandle.parentElement.offsetWidth;
801        if (containerWidth > 0 && containerWidth < bp.sm.width) {
802          var scale = getRatio(containerWidth, bp.sm.width);
803          newWidth = containerWidth;
804          newHeight = Math.round(scale * bp.sm.height); // s7 doesn't like decimals.
805          // s7 needs the inverse of the scale? Whatevs.
806          newSrc = setQueryString(bp.sm.src, {
807            scl: 1 / scale,
808            wid: newWidth,
809            hei: newHeight
810          });
811        } else {
812          newSrc = bp.sm.src;
813          newWidth = bp.sm.width;
814          newHeight = bp.sm.height;
815        }
816    }
817    if (newSrc) {
818      imgHandle.src = newSrc;
819    }
820    if (newWidth) {
821      imgHandle.width = newWidth;
822    }
823    if (newHeight) {
824      imgHandle.height = newHeight;
825    }
826    var bpChangeEvent = new CustomEvent('bpChange', {
827      detail: device
828    });
829    window.dispatchEvent(bpChangeEvent);
830  }
831
832  // call winResize to set the initial device size and image src
833  winResized();
834
835  // listen for a change in the window width
836  window.addEventListener('resize', winResized);
837};
838
839/**
840 * Sets the source and aspect ratio of video being served from S7
841 * there are two video sources, one for mobile and one for desktop.
842 * if there is no mobile video specified, it should run the desktop
843 * video in both situations
844 *
845 * @param {string} mobileVideoSourceIn - Name of selected mobile video file
846 * @param {string} desktopVideoSourceIn - Name of selected tablet and larger video file
847 * @param {string} uniqueid - unique id of the container
848 */
849window.s7VideoSourceSet = function (mobileVideoSourceIn, desktopVideoSourceIn, uniqueid) {
850  var lastWidth = window.innerWidth; // Initial device/window width
851  var videoElement = document.getElementById(uniqueid + '-video');
852  var posterElement = document.getElementById(uniqueid + '-poster');
853  videoElement.addEventListener('play', function () {
854    posterElement.style.display = 'none';
855  });
856
857  /**
858   * jsUpdateSize - Sets the video sources and checks for resize events
859   * so it can change the source for mobile video if it is present.
860   */
861  function jsUpdateSize() {
862    var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
863    var mobileVideoSource = mobileVideoSourceIn;
864    var desktopVideoSource = desktopVideoSourceIn;
865    var videoCDNBase = window.resources && window.resources.images && window.resources.images.videoCDNBaseURL;
866    if (width < window.app.constants.breakpoints.MD) {
867      if (mobileVideoSource) {
868        document.querySelector('#' + uniqueid + '-video source').src = videoCDNBase + mobileVideoSource;
869      } else {
870        document.querySelector('#' + uniqueid + '-video source').src = videoCDNBase + desktopVideoSource;
871      }
872    } else {
873      document.querySelector('#' + uniqueid + '-video source').src = videoCDNBase + desktopVideoSource;
874    }
875    if (videoElement) {
876      videoElement.load();
877      videoElement.play();
878    }
879  }
880  if (videoElement && videoElement.classList.contains('s7LazyVideo')) {
881    jsUpdateSize();
882  } else {
883    window.addEventListener('load', jsUpdateSize);
884  }
885
886  /**
887   * isWidthResized - prevents the jsUpdateSize() function from being fired
888   * too many times as the screen is resized
889   */
890  var isWidthResized = debounce(function () {
891    if (window.innerWidth !== lastWidth) {
892      lastWidth = window.innerWidth;
893      jsUpdateSize();
894    }
895  }, 400);
896  window.addEventListener('resize', isWidthResized);
897  var el = document.getElementById(uniqueid + '-videocontainer');
898  var controls;
899  var controlContainer = el && el.querySelector('.s7MediaControls');
900  if (controlContainer) {
901    // eslint-disable-next-line no-unused-vars
902    controls = new S7VideoControls(el, controlContainer);
903  }
904};
905
906/***/ }),
907
vendor: 320,832 bytes, lines 908-10072
908/***/ "./node_modules/jquery/dist/jquery.js":
909/*!********************************************!*\
910  !*** ./node_modules/jquery/dist/jquery.js ***!
911  \********************************************/
912/*! no static exports found */
913/***/ (function(module, exports, __webpack_require__) {
914
915/* 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); }
916/*!
917 * jQuery JavaScript Library v3.5.1
918 * https://jquery.com/
919 *
920 * Includes Sizzle.js
921 * https://sizzlejs.com/
922 *
923 * Copyright JS Foundation and other contributors
924 * Released under the MIT license
925 * https://jquery.org/license
926 *
927 * Date: 2020-05-04T22:49Z
928 */
929(function (global, factory) {
930  "use strict";
931
932  if (( false ? undefined : _typeof(module)) === "object" && _typeof(module.exports) === "object") {
933    // For CommonJS and CommonJS-like environments where a proper `window`
934    // is present, execute the factory and get jQuery.
935    // For environments that do not have a `window` with a `document`
936    // (such as Node.js), expose a factory as module.exports.
937    // This accentuates the need for the creation of a real `window`.
938    // e.g. var jQuery = require("jquery")(window);
939    // See ticket #14549 for more info.
940    module.exports = global.document ? factory(global, true) : function (w) {
941      if (!w.document) {
942        throw new Error("jQuery requires a window with a document");
943      }
944      return factory(w);
945    };
946  } else {
947    factory(global);
948  }
949
950  // Pass this if window is not defined yet
951})(typeof window !== "undefined" ? window : this, function (window, noGlobal) {
952  // Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
953  // throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
954  // arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
955  // enough that all such attempts are guarded in a try block.
956  "use strict";
957
958  var arr = [];
959  var getProto = Object.getPrototypeOf;
960  var _slice = arr.slice;
961  var flat = arr.flat ? function (array) {
962    return arr.flat.call(array);
963  } : function (array) {
964    return arr.concat.apply([], array);
965  };
966  var push = arr.push;
967  var indexOf = arr.indexOf;
968  var class2type = {};
969  var toString = class2type.toString;
970  var hasOwn = class2type.hasOwnProperty;
971  var fnToString = hasOwn.toString;
972  var ObjectFunctionString = fnToString.call(Object);
973  var support = {};
974  var isFunction = function isFunction(obj) {
975    // Support: Chrome <=57, Firefox <=52
976    // In some browsers, typeof returns "function" for HTML <object> elements
977    // (i.e., `typeof document.createElement( "object" ) === "function"`).
978    // We don't want to classify *any* DOM node as a function.
979    return typeof obj === "function" && typeof obj.nodeType !== "number";
980  };
981  var isWindow = function isWindow(obj) {
982    return obj != null && obj === obj.window;
983  };
984  var document = window.document;
985  var preservedScriptAttributes = {
986    type: true,
987    src: true,
988    nonce: true,
989    noModule: true
990  };
991  function DOMEval(code, node, doc) {
992    doc = doc || document;
993    var i,
994      val,
995      script = doc.createElement("script");
996    script.text = code;
997    if (node) {
998      for (i in preservedScriptAttributes) {
999        // Support: Firefox 64+, Edge 18+
1000        // Some browsers don't support the "nonce" property on scripts.
1001        // On the other hand, just using `getAttribute` is not enough as
1002        // the `nonce` attribute is reset to an empty string whenever it
1003        // becomes browsing-context connected.
1004        // See https://github.com/whatwg/html/issues/2369
1005        // See https://html.spec.whatwg.org/#nonce-attributes
1006        // The `node.getAttribute` check was added for the sake of
1007        // `jQuery.globalEval` so that it can fake a nonce-containing node
1008        // via an object.
1009        val = node[i] || node.getAttribute && node.getAttribute(i);
1010        if (val) {
1011          script.setAttribute(i, val);
1012        }
1013      }
1014    }
1015    doc.head.appendChild(script).parentNode.removeChild(script);
1016  }
1017  function toType(obj) {
1018    if (obj == null) {
1019      return obj + "";
1020    }
1021
1022    // Support: Android <=2.3 only (functionish RegExp)
1023    return _typeof(obj) === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : _typeof(obj);
1024  }
1025  /* global Symbol */
1026  // Defining this global in .eslintrc.json would create a danger of using the global
1027  // unguarded in another place, it seems safer to define global only for this module
1028
1029  var version = "3.5.1",
1030    // Define a local copy of jQuery
1031    jQuery = function jQuery(selector, context) {
1032      // The jQuery object is actually just the init constructor 'enhanced'
1033      // Need init if jQuery is called (just allow error to be thrown if not included)
1034      return new jQuery.fn.init(selector, context);
1035    };
1036  jQuery.fn = jQuery.prototype = {
1037    // The current version of jQuery being used
1038    jquery: version,
1039    constructor: jQuery,
1040    // The default length of a jQuery object is 0
1041    length: 0,
1042    toArray: function toArray() {
1043      return _slice.call(this);
1044    },
1045    // Get the Nth element in the matched element set OR
1046    // Get the whole matched element set as a clean array
1047    get: function get(num) {
1048      // Return all the elements in a clean array
1049      if (num == null) {
1050        return _slice.call(this);
1051      }
1052
1053      // Return just the one element from the set
1054      return num < 0 ? this[num + this.length] : this[num];
1055    },
1056    // Take an array of elements and push it onto the stack
1057    // (returning the new matched element set)
1058    pushStack: function pushStack(elems) {
1059      // Build a new jQuery matched element set
1060      var ret = jQuery.merge(this.constructor(), elems);
1061
1062      // Add the old object onto the stack (as a reference)
1063      ret.prevObject = this;
1064
1065      // Return the newly-formed element set
1066      return ret;
1067    },
1068    // Execute a callback for every element in the matched set.
1069    each: function each(callback) {
1070      return jQuery.each(this, callback);
1071    },
1072    map: function map(callback) {
1073      return this.pushStack(jQuery.map(this, function (elem, i) {
1074        return callback.call(elem, i, elem);
1075      }));
1076    },
1077    slice: function slice() {
1078      return this.pushStack(_slice.apply(this, arguments));
1079    },
1080    first: function first() {
1081      return this.eq(0);
1082    },
1083    last: function last() {
1084      return this.eq(-1);
1085    },
1086    even: function even() {
1087      return this.pushStack(jQuery.grep(this, function (_elem, i) {
1088        return (i + 1) % 2;
1089      }));
1090    },
1091    odd: function odd() {
1092      return this.pushStack(jQuery.grep(this, function (_elem, i) {
1093        return i % 2;
1094      }));
1095    },
1096    eq: function eq(i) {
1097      var len = this.length,
1098        j = +i + (i < 0 ? len : 0);
1099      return this.pushStack(j >= 0 && j < len ? [this[j]] : []);
1100    },
1101    end: function end() {
1102      return this.prevObject || this.constructor();
1103    },
1104    // For internal use only.
1105    // Behaves like an Array's method, not like a jQuery method.
1106    push: push,
1107    sort: arr.sort,
1108    splice: arr.splice
1109  };
1110  jQuery.extend = jQuery.fn.extend = function () {
1111    var options,
1112      name,
1113      src,
1114      copy,
1115      copyIsArray,
1116      clone,
1117      target = arguments[0] || {},
1118      i = 1,
1119      length = arguments.length,
1120      deep = false;
1121
1122    // Handle a deep copy situation
1123    if (typeof target === "boolean") {
1124      deep = target;
1125
1126      // Skip the boolean and the target
1127      target = arguments[i] || {};
1128      i++;
1129    }
1130
1131    // Handle case when target is a string or something (possible in deep copy)
1132    if (_typeof(target) !== "object" && !isFunction(target)) {
1133      target = {};
1134    }
1135
1136    // Extend jQuery itself if only one argument is passed
1137    if (i === length) {
1138      target = this;
1139      i--;
1140    }
1141    for (; i < length; i++) {
1142      // Only deal with non-null/undefined values
1143      if ((options = arguments[i]) != null) {
1144        // Extend the base object
1145        for (name in options) {
1146          copy = options[name];
1147
1148          // Prevent Object.prototype pollution
1149          // Prevent never-ending loop
1150          if (name === "__proto__" || target === copy) {
1151            continue;
1152          }
1153
1154          // Recurse if we're merging plain objects or arrays
1155          if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) {
1156            src = target[name];
1157
1158            // Ensure proper type for the source value
1159            if (copyIsArray && !Array.isArray(src)) {
1160              clone = [];
1161            } else if (!copyIsArray && !jQuery.isPlainObject(src)) {
1162              clone = {};
1163            } else {
1164              clone = src;
1165            }
1166            copyIsArray = false;
1167
1168            // Never move original objects, clone them
1169            target[name] = jQuery.extend(deep, clone, copy);
1170
1171            // Don't bring in undefined values
1172          } else if (copy !== undefined) {
1173            target[name] = copy;
1174          }
1175        }
1176      }
1177    }
1178
1179    // Return the modified object
1180    return target;
1181  };
1182  jQuery.extend({
1183    // Unique for each copy of jQuery on the page
1184    expando: "jQuery" + (version + Math.random()).replace(/\D/g, ""),
1185    // Assume jQuery is ready without the ready module
1186    isReady: true,
1187    error: function error(msg) {
1188      throw new Error(msg);
1189    },
1190    noop: function noop() {},
1191    isPlainObject: function isPlainObject(obj) {
1192      var proto, Ctor;
1193
1194      // Detect obvious negatives
1195      // Use toString instead of jQuery.type to catch host objects
1196      if (!obj || toString.call(obj) !== "[object Object]") {
1197        return false;
1198      }
1199      proto = getProto(obj);
1200
1201      // Objects with no prototype (e.g., `Object.create( null )`) are plain
1202      if (!proto) {
1203        return true;
1204      }
1205
1206      // Objects with prototype are plain iff they were constructed by a global Object function
1207      Ctor = hasOwn.call(proto, "constructor") && proto.constructor;
1208      return typeof Ctor === "function" && fnToString.call(Ctor) === ObjectFunctionString;
1209    },
1210    isEmptyObject: function isEmptyObject(obj) {
1211      var name;
1212      for (name in obj) {
1213        return false;
1214      }
1215      return true;
1216    },
1217    // Evaluates a script in a provided context; falls back to the global one
1218    // if not specified.
1219    globalEval: function globalEval(code, options, doc) {
1220      DOMEval(code, {
1221        nonce: options && options.nonce
1222      }, doc);
1223    },
1224    each: function each(obj, callback) {
1225      var length,
1226        i = 0;
1227      if (isArrayLike(obj)) {
1228        length = obj.length;
1229        for (; i < length; i++) {
1230          if (callback.call(obj[i], i, obj[i]) === false) {
1231            break;
1232          }
1233        }
1234      } else {
1235        for (i in obj) {
1236          if (callback.call(obj[i], i, obj[i]) === false) {
1237            break;
1238          }
1239        }
1240      }
1241      return obj;
1242    },
1243    // results is for internal usage only
1244    makeArray: function makeArray(arr, results) {
1245      var ret = results || [];
1246      if (arr != null) {
1247        if (isArrayLike(Object(arr))) {
1248          jQuery.merge(ret, typeof arr === "string" ? [arr] : arr);
1249        } else {
1250          push.call(ret, arr);
1251        }
1252      }
1253      return ret;
1254    },
1255    inArray: function inArray(elem, arr, i) {
1256      return arr == null ? -1 : indexOf.call(arr, elem, i);
1257    },
1258    // Support: Android <=4.0 only, PhantomJS 1 only
1259    // push.apply(_, arraylike) throws on ancient WebKit
1260    merge: function merge(first, second) {
1261      var len = +second.length,
1262        j = 0,
1263        i = first.length;
1264      for (; j < len; j++) {
1265        first[i++] = second[j];
1266      }
1267      first.length = i;
1268      return first;
1269    },
1270    grep: function grep(elems, callback, invert) {
1271      var callbackInverse,
1272        matches = [],
1273        i = 0,
1274        length = elems.length,
1275        callbackExpect = !invert;
1276
1277      // Go through the array, only saving the items
1278      // that pass the validator function
1279      for (; i < length; i++) {
1280        callbackInverse = !callback(elems[i], i);
1281        if (callbackInverse !== callbackExpect) {
1282          matches.push(elems[i]);
1283        }
1284      }
1285      return matches;
1286    },
1287    // arg is for internal usage only
1288    map: function map(elems, callback, arg) {
1289      var length,
1290        value,
1291        i = 0,
1292        ret = [];
1293
1294      // Go through the array, translating each of the items to their new values
1295      if (isArrayLike(elems)) {
1296        length = elems.length;
1297        for (; i < length; i++) {
1298          value = callback(elems[i], i, arg);
1299          if (value != null) {
1300            ret.push(value);
1301          }
1302        }
1303
1304        // Go through every key on the object,
1305      } else {
1306        for (i in elems) {
1307          value = callback(elems[i], i, arg);
1308          if (value != null) {
1309            ret.push(value);
1310          }
1311        }
1312      }
1313
1314      // Flatten any nested arrays
1315      return flat(ret);
1316    },
1317    // A global GUID counter for objects
1318    guid: 1,
1319    // jQuery.support is not used in Core but other projects attach their
1320    // properties to it so it needs to exist.
1321    support: support
1322  });
1323  if (typeof Symbol === "function") {
1324    jQuery.fn[Symbol.iterator] = arr[Symbol.iterator];
1325  }
1326
1327  // Populate the class2type map
1328  jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function (_i, name) {
1329    class2type["[object " + name + "]"] = name.toLowerCase();
1330  });
1331  function isArrayLike(obj) {
1332    // Support: real iOS 8.2 only (not reproducible in simulator)
1333    // `in` check used to prevent JIT error (gh-2145)
1334    // hasOwn isn't used here due to false negatives
1335    // regarding Nodelist length in IE
1336    var length = !!obj && "length" in obj && obj.length,
1337      type = toType(obj);
1338    if (isFunction(obj) || isWindow(obj)) {
1339      return false;
1340    }
1341    return type === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj;
1342  }
1343  var Sizzle =
1344  /*!
1345   * Sizzle CSS Selector Engine v2.3.5
1346   * https://sizzlejs.com/
1347   *
1348   * Copyright JS Foundation and other contributors
1349   * Released under the MIT license
1350   * https://js.foundation/
1351   *
1352   * Date: 2020-03-14
1353   */
1354  function (window) {
1355    var i,
1356      support,
1357      Expr,
1358      getText,
1359      isXML,
1360      tokenize,
1361      compile,
1362      select,
1363      outermostContext,
1364      sortInput,
1365      hasDuplicate,
1366      // Local document vars
1367      setDocument,
1368      document,
1369      docElem,
1370      documentIsHTML,
1371      rbuggyQSA,
1372      rbuggyMatches,
1373      matches,
1374      contains,
1375      // Instance-specific data
1376      expando = "sizzle" + 1 * new Date(),
1377      preferredDoc = window.document,
1378      dirruns = 0,
1379      done = 0,
1380      classCache = createCache(),
1381      tokenCache = createCache(),
1382      compilerCache = createCache(),
1383      nonnativeSelectorCache = createCache(),
1384      sortOrder = function sortOrder(a, b) {
1385        if (a === b) {
1386          hasDuplicate = true;
1387        }
1388        return 0;
1389      },
1390      // Instance methods
1391      hasOwn = {}.hasOwnProperty,
1392      arr = [],
1393      pop = arr.pop,
1394      pushNative = arr.push,
1395      push = arr.push,
1396      slice = arr.slice,
1397      // Use a stripped-down indexOf as it's faster than native
1398      // https://jsperf.com/thor-indexof-vs-for/5
1399      indexOf = function indexOf(list, elem) {
1400        var i = 0,
1401          len = list.length;
1402        for (; i < len; i++) {
1403          if (list[i] === elem) {
1404            return i;
1405          }
1406        }
1407        return -1;
1408      },
1409      booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + "ismap|loop|multiple|open|readonly|required|scoped",
1410      // Regular expressions
1411
1412      // http://www.w3.org/TR/css3-selectors/#whitespace
1413      whitespace = "[\\x20\\t\\r\\n\\f]",
1414      // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
1415      identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
1416      // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
1417      attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
1418      // Operator (capture 2)
1419      "*([*^$|!~]?=)" + whitespace +
1420      // "Attribute values must be CSS identifiers [capture 5]
1421      // or strings [capture 3 or capture 4]"
1422      "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]",
1423      pseudos = ":(" + identifier + ")(?:\\((" +
1424      // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
1425      // 1. quoted (capture 3; capture 4 or capture 5)
1426      "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
1427      // 2. simple (capture 6)
1428      "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
1429      // 3. anything else (capture 2)
1430      ".*" + ")\\)|)",
1431      // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
1432      rwhitespace = new RegExp(whitespace + "+", "g"),
1433      rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"),
1434      rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"),
1435      rcombinators = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"),
1436      rdescend = new RegExp(whitespace + "|>"),
1437      rpseudo = new RegExp(pseudos),
1438      ridentifier = new RegExp("^" + identifier + "$"),
1439      matchExpr = {
1440        "ID": new RegExp("^#(" + identifier + ")"),
1441        "CLASS": new RegExp("^\\.(" + identifier + ")"),
1442        "TAG": new RegExp("^(" + identifier + "|[*])"),
1443        "ATTR": new RegExp("^" + attributes),
1444        "PSEUDO": new RegExp("^" + pseudos),
1445        "CHILD": new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i"),
1446        "bool": new RegExp("^(?:" + booleans + ")$", "i"),
1447        // For use in libraries implementing .is()
1448        // We use this for POS matching in `select`
1449        "needsContext": new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i")
1450      },
1451      rhtml = /HTML$/i,
1452      rinputs = /^(?:input|select|textarea|button)$/i,
1453      rheader = /^h\d$/i,
1454      rnative = /^[^{]+\{\s*\[native \w/,
1455      // Easily-parseable/retrievable ID or TAG or CLASS selectors
1456      rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
1457      rsibling = /[+~]/,
1458      // CSS escapes
1459      // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
1460      runescape = new RegExp("\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g"),
1461      funescape = function funescape(escape, nonHex) {
1462        var high = "0x" + escape.slice(1) - 0x10000;
1463        return nonHex ?
1464        // Strip the backslash prefix from a non-hex escape sequence
1465        nonHex :
1466        // Replace a hexadecimal escape sequence with the encoded Unicode code point
1467        // Support: IE <=11+
1468        // For values outside the Basic Multilingual Plane (BMP), manually construct a
1469        // surrogate pair
1470        high < 0 ? String.fromCharCode(high + 0x10000) : String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00);
1471      },
1472      // CSS string/identifier serialization
1473      // https://drafts.csswg.org/cssom/#common-serializing-idioms
1474      rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
1475      fcssescape = function fcssescape(ch, asCodePoint) {
1476        if (asCodePoint) {
1477          // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
1478          if (ch === "\0") {
1479            return "\uFFFD";
1480          }
1481
1482          // Control characters and (dependent upon position) numbers get escaped as code points
1483          return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16) + " ";
1484        }
1485
1486        // Other potentially-special ASCII characters get backslash-escaped
1487        return "\\" + ch;
1488      },
1489      // Used for iframes
1490      // See setDocument()
1491      // Removing the function wrapper causes a "Permission Denied"
1492      // error in IE
1493      unloadHandler = function unloadHandler() {
1494        setDocument();
1495      },
1496      inDisabledFieldset = addCombinator(function (elem) {
1497        return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset";
1498      }, {
1499        dir: "parentNode",
1500        next: "legend"
1501      });
1502
1503    // Optimize for push.apply( _, NodeList )
1504    try {
1505      push.apply(arr = slice.call(preferredDoc.childNodes), preferredDoc.childNodes);
1506
1507      // Support: Android<4.0
1508      // Detect silently failing push.apply
1509      // eslint-disable-next-line no-unused-expressions
1510      arr[preferredDoc.childNodes.length].nodeType;
1511    } catch (e) {
1512      push = {
1513        apply: arr.length ?
1514        // Leverage slice if possible
1515        function (target, els) {
1516          pushNative.apply(target, slice.call(els));
1517        } :
1518        // Support: IE<9
1519        // Otherwise append directly
1520        function (target, els) {
1521          var j = target.length,
1522            i = 0;
1523
1524          // Can't trust NodeList.length
1525          while (target[j++] = els[i++]) {}
1526          target.length = j - 1;
1527        }
1528      };
1529    }
1530    function Sizzle(selector, context, results, seed) {
1531      var m,
1532        i,
1533        elem,
1534        nid,
1535        match,
1536        groups,
1537        newSelector,
1538        newContext = context && context.ownerDocument,
1539        // nodeType defaults to 9, since context defaults to document
1540        nodeType = context ? context.nodeType : 9;
1541      results = results || [];
1542
1543      // Return early from calls with invalid selector or context
1544      if (typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) {
1545        return results;
1546      }
1547
1548      // Try to shortcut find operations (as opposed to filters) in HTML documents
1549      if (!seed) {
1550        setDocument(context);
1551        context = context || document;
1552        if (documentIsHTML) {
1553          // If the selector is sufficiently simple, try using a "get*By*" DOM method
1554          // (excepting DocumentFragment context, where the methods don't exist)
1555          if (nodeType !== 11 && (match = rquickExpr.exec(selector))) {
1556            // ID selector
1557            if (m = match[1]) {
1558              // Document context
1559              if (nodeType === 9) {
1560                if (elem = context.getElementById(m)) {
1561                  // Support: IE, Opera, Webkit
1562                  // TODO: identify versions
1563                  // getElementById can match elements by name instead of ID
1564                  if (elem.id === m) {
1565                    results.push(elem);
1566                    return results;
1567                  }
1568                } else {
1569                  return results;
1570                }
1571
1572                // Element context
1573              } else {
1574                // Support: IE, Opera, Webkit
1575                // TODO: identify versions
1576                // getElementById can match elements by name instead of ID
1577                if (newContext && (elem = newContext.getElementById(m)) && contains(context, elem) && elem.id === m) {
1578                  results.push(elem);
1579                  return results;
1580                }
1581              }
1582
1583              // Type selector
1584            } else if (match[2]) {
1585              push.apply(results, context.getElementsByTagName(selector));
1586              return results;
1587
1588              // Class selector
1589            } else if ((m = match[3]) && support.getElementsByClassName && context.getElementsByClassName) {
1590              push.apply(results, context.getElementsByClassName(m));
1591              return results;
1592            }
1593          }
1594
1595          // Take advantage of querySelectorAll
1596          if (support.qsa && !nonnativeSelectorCache[selector + " "] && (!rbuggyQSA || !rbuggyQSA.test(selector)) && (
1597          // Support: IE 8 only
1598          // Exclude object elements
1599          nodeType !== 1 || context.nodeName.toLowerCase() !== "object")) {
1600            newSelector = selector;
1601            newContext = context;
1602
1603            // qSA considers elements outside a scoping root when evaluating child or
1604            // descendant combinators, which is not what we want.
1605            // In such cases, we work around the behavior by prefixing every selector in the
1606            // list with an ID selector referencing the scope context.
1607            // The technique has to be used as well when a leading combinator is used
1608            // as such selectors are not recognized by querySelectorAll.
1609            // Thanks to Andrew Dupont for this technique.
1610            if (nodeType === 1 && (rdescend.test(selector) || rcombinators.test(selector))) {
1611              // Expand context for sibling selectors
1612              newContext = rsibling.test(selector) && testContext(context.parentNode) || context;
1613
1614              // We can use :scope instead of the ID hack if the browser
1615              // supports it & if we're not changing the context.
1616              if (newContext !== context || !support.scope) {
1617                // Capture the context ID, setting it first if necessary
1618                if (nid = context.getAttribute("id")) {
1619                  nid = nid.replace(rcssescape, fcssescape);
1620                } else {
1621                  context.setAttribute("id", nid = expando);
1622                }
1623              }
1624
1625              // Prefix every selector in the list
1626              groups = tokenize(selector);
1627              i = groups.length;
1628              while (i--) {
1629                groups[i] = (nid ? "#" + nid : ":scope") + " " + toSelector(groups[i]);
1630              }
1631              newSelector = groups.join(",");
1632            }
1633            try {
1634              push.apply(results, newContext.querySelectorAll(newSelector));
1635              return results;
1636            } catch (qsaError) {
1637              nonnativeSelectorCache(selector, true);
1638            } finally {
1639              if (nid === expando) {
1640                context.removeAttribute("id");
1641              }
1642            }
1643          }
1644        }
1645      }
1646
1647      // All others
1648      return select(selector.replace(rtrim, "$1"), context, results, seed);
1649    }
1650
1651    /**
1652     * Create key-value caches of limited size
1653     * @returns {function(string, object)} Returns the Object data after storing it on itself with
1654     *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
1655     *	deleting the oldest entry
1656     */
1657    function createCache() {
1658      var keys = [];
1659      function cache(key, value) {
1660        // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
1661        if (keys.push(key + " ") > Expr.cacheLength) {
1662          // Only keep the most recent entries
1663          delete cache[keys.shift()];
1664        }
1665        return cache[key + " "] = value;
1666      }
1667      return cache;
1668    }
1669
1670    /**
1671     * Mark a function for special use by Sizzle
1672     * @param {Function} fn The function to mark
1673     */
1674    function markFunction(fn) {
1675      fn[expando] = true;
1676      return fn;
1677    }
1678
1679    /**
1680     * Support testing using an element
1681     * @param {Function} fn Passed the created element and returns a boolean result
1682     */
1683    function assert(fn) {
1684      var el = document.createElement("fieldset");
1685      try {
1686        return !!fn(el);
1687      } catch (e) {
1688        return false;
1689      } finally {
1690        // Remove from its parent by default
1691        if (el.parentNode) {
1692          el.parentNode.removeChild(el);
1693        }
1694
1695        // release memory in IE
1696        el = null;
1697      }
1698    }
1699
1700    /**
1701     * Adds the same handler for all of the specified attrs
1702     * @param {String} attrs Pipe-separated list of attributes
1703     * @param {Function} handler The method that will be applied
1704     */
1705    function addHandle(attrs, handler) {
1706      var arr = attrs.split("|"),
1707        i = arr.length;
1708      while (i--) {
1709        Expr.attrHandle[arr[i]] = handler;
1710      }
1711    }
1712
1713    /**
1714     * Checks document order of two siblings
1715     * @param {Element} a
1716     * @param {Element} b
1717     * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
1718     */
1719    function siblingCheck(a, b) {
1720      var cur = b && a,
1721        diff = cur && a.nodeType === 1 && b.nodeType === 1 && a.sourceIndex - b.sourceIndex;
1722
1723      // Use IE sourceIndex if available on both nodes
1724      if (diff) {
1725        return diff;
1726      }
1727
1728      // Check if b follows a
1729      if (cur) {
1730        while (cur = cur.nextSibling) {
1731          if (cur === b) {
1732            return -1;
1733          }
1734        }
1735      }
1736      return a ? 1 : -1;
1737    }
1738
1739    /**
1740     * Returns a function to use in pseudos for input types
1741     * @param {String} type
1742     */
1743    function createInputPseudo(type) {
1744      return function (elem) {
1745        var name = elem.nodeName.toLowerCase();
1746        return name === "input" && elem.type === type;
1747      };
1748    }
1749
1750    /**
1751     * Returns a function to use in pseudos for buttons
1752     * @param {String} type
1753     */
1754    function createButtonPseudo(type) {
1755      return function (elem) {
1756        var name = elem.nodeName.toLowerCase();
1757        return (name === "input" || name === "button") && elem.type === type;
1758      };
1759    }
1760
1761    /**
1762     * Returns a function to use in pseudos for :enabled/:disabled
1763     * @param {Boolean} disabled true for :disabled; false for :enabled
1764     */
1765    function createDisabledPseudo(disabled) {
1766      // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
1767      return function (elem) {
1768        // Only certain elements can match :enabled or :disabled
1769        // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
1770        // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
1771        if ("form" in elem) {
1772          // Check for inherited disabledness on relevant non-disabled elements:
1773          // * listed form-associated elements in a disabled fieldset
1774          //   https://html.spec.whatwg.org/multipage/forms.html#category-listed
1775          //   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
1776          // * option elements in a disabled optgroup
1777          //   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
1778          // All such elements have a "form" property.
1779          if (elem.parentNode && elem.disabled === false) {
1780            // Option elements defer to a parent optgroup if present
1781            if ("label" in elem) {
1782              if ("label" in elem.parentNode) {
1783                return elem.parentNode.disabled === disabled;
1784              } else {
1785                return elem.disabled === disabled;
1786              }
1787            }
1788
1789            // Support: IE 6 - 11
1790            // Use the isDisabled shortcut property to check for disabled fieldset ancestors
1791            return elem.isDisabled === disabled ||
1792            // Where there is no isDisabled, check manually
1793            /* jshint -W018 */
1794            elem.isDisabled !== !disabled && inDisabledFieldset(elem) === disabled;
1795          }
1796          return elem.disabled === disabled;
1797
1798          // Try to winnow out elements that can't be disabled before trusting the disabled property.
1799          // Some victims get caught in our net (label, legend, menu, track), but it shouldn't
1800          // even exist on them, let alone have a boolean value.
1801        } else if ("label" in elem) {
1802          return elem.disabled === disabled;
1803        }
1804
1805        // Remaining elements are neither :enabled nor :disabled
1806        return false;
1807      };
1808    }
1809
1810    /**
1811     * Returns a function to use in pseudos for positionals
1812     * @param {Function} fn
1813     */
1814    function createPositionalPseudo(fn) {
1815      return markFunction(function (argument) {
1816        argument = +argument;
1817        return markFunction(function (seed, matches) {
1818          var j,
1819            matchIndexes = fn([], seed.length, argument),
1820            i = matchIndexes.length;
1821
1822          // Match elements found at the specified indexes
1823          while (i--) {
1824            if (seed[j = matchIndexes[i]]) {
1825              seed[j] = !(matches[j] = seed[j]);
1826            }
1827          }
1828        });
1829      });
1830    }
1831
1832    /**
1833     * Checks a node for validity as a Sizzle context
1834     * @param {Element|Object=} context
1835     * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
1836     */
1837    function testContext(context) {
1838      return context && typeof context.getElementsByTagName !== "undefined" && context;
1839    }
1840
1841    // Expose support vars for convenience
1842    support = Sizzle.support = {};
1843
1844    /**
1845     * Detects XML nodes
1846     * @param {Element|Object} elem An element or a document
1847     * @returns {Boolean} True iff elem is a non-HTML XML node
1848     */
1849    isXML = Sizzle.isXML = function (elem) {
1850      var namespace = elem.namespaceURI,
1851        docElem = (elem.ownerDocument || elem).documentElement;
1852
1853      // Support: IE <=8
1854      // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
1855      // https://bugs.jquery.com/ticket/4833
1856      return !rhtml.test(namespace || docElem && docElem.nodeName || "HTML");
1857    };
1858
1859    /**
1860     * Sets document-related variables once based on the current document
1861     * @param {Element|Object} [doc] An element or document object to use to set the document
1862     * @returns {Object} Returns the current document
1863     */
1864    setDocument = Sizzle.setDocument = function (node) {
1865      var hasCompare,
1866        subWindow,
1867        doc = node ? node.ownerDocument || node : preferredDoc;
1868
1869      // Return early if doc is invalid or already selected
1870      // Support: IE 11+, Edge 17 - 18+
1871      // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1872      // two documents; shallow comparisons work.
1873      // eslint-disable-next-line eqeqeq
1874      if (doc == document || doc.nodeType !== 9 || !doc.documentElement) {
1875        return document;
1876      }
1877
1878      // Update global variables
1879      document = doc;
1880      docElem = document.documentElement;
1881      documentIsHTML = !isXML(document);
1882
1883      // Support: IE 9 - 11+, Edge 12 - 18+
1884      // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
1885      // Support: IE 11+, Edge 17 - 18+
1886      // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1887      // two documents; shallow comparisons work.
1888      // eslint-disable-next-line eqeqeq
1889      if (preferredDoc != document && (subWindow = document.defaultView) && subWindow.top !== subWindow) {
1890        // Support: IE 11, Edge
1891        if (subWindow.addEventListener) {
1892          subWindow.addEventListener("unload", unloadHandler, false);
1893
1894          // Support: IE 9 - 10 only
1895        } else if (subWindow.attachEvent) {
1896          subWindow.attachEvent("onunload", unloadHandler);
1897        }
1898      }
1899
1900      // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,
1901      // Safari 4 - 5 only, Opera <=11.6 - 12.x only
1902      // IE/Edge & older browsers don't support the :scope pseudo-class.
1903      // Support: Safari 6.0 only
1904      // Safari 6.0 supports :scope but it's an alias of :root there.
1905      support.scope = assert(function (el) {
1906        docElem.appendChild(el).appendChild(document.createElement("div"));
1907        return typeof el.querySelectorAll !== "undefined" && !el.querySelectorAll(":scope fieldset div").length;
1908      });
1909
1910      /* Attributes
1911      ---------------------------------------------------------------------- */
1912
1913      // Support: IE<8
1914      // Verify that getAttribute really returns attributes and not properties
1915      // (excepting IE8 booleans)
1916      support.attributes = assert(function (el) {
1917        el.className = "i";
1918        return !el.getAttribute("className");
1919      });
1920
1921      /* getElement(s)By*
1922      ---------------------------------------------------------------------- */
1923
1924      // Check if getElementsByTagName("*") returns only elements
1925      support.getElementsByTagName = assert(function (el) {
1926        el.appendChild(document.createComment(""));
1927        return !el.getElementsByTagName("*").length;
1928      });
1929
1930      // Support: IE<9
1931      support.getElementsByClassName = rnative.test(document.getElementsByClassName);
1932
1933      // Support: IE<10
1934      // Check if getElementById returns elements by name
1935      // The broken getElementById methods don't pick up programmatically-set names,
1936      // so use a roundabout getElementsByName test
1937      support.getById = assert(function (el) {
1938        docElem.appendChild(el).id = expando;
1939        return !document.getElementsByName || !document.getElementsByName(expando).length;
1940      });
1941
1942      // ID filter and find
1943      if (support.getById) {
1944        Expr.filter["ID"] = function (id) {
1945          var attrId = id.replace(runescape, funescape);
1946          return function (elem) {
1947            return elem.getAttribute("id") === attrId;
1948          };
1949        };
1950        Expr.find["ID"] = function (id, context) {
1951          if (typeof context.getElementById !== "undefined" && documentIsHTML) {
1952            var elem = context.getElementById(id);
1953            return elem ? [elem] : [];
1954          }
1955        };
1956      } else {
1957        Expr.filter["ID"] = function (id) {
1958          var attrId = id.replace(runescape, funescape);
1959          return function (elem) {
1960            var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
1961            return node && node.value === attrId;
1962          };
1963        };
1964
1965        // Support: IE 6 - 7 only
1966        // getElementById is not reliable as a find shortcut
1967        Expr.find["ID"] = function (id, context) {
1968          if (typeof context.getElementById !== "undefined" && documentIsHTML) {
1969            var node,
1970              i,
1971              elems,
1972              elem = context.getElementById(id);
1973            if (elem) {
1974              // Verify the id attribute
1975              node = elem.getAttributeNode("id");
1976              if (node && node.value === id) {
1977                return [elem];
1978              }
1979
1980              // Fall back on getElementsByName
1981              elems = context.getElementsByName(id);
1982              i = 0;
1983              while (elem = elems[i++]) {
1984                node = elem.getAttributeNode("id");
1985                if (node && node.value === id) {
1986                  return [elem];
1987                }
1988              }
1989            }
1990            return [];
1991          }
1992        };
1993      }
1994
1995      // Tag
1996      Expr.find["TAG"] = support.getElementsByTagName ? function (tag, context) {
1997        if (typeof context.getElementsByTagName !== "undefined") {
1998          return context.getElementsByTagName(tag);
1999
2000          // DocumentFragment nodes don't have gEBTN
2001        } else if (support.qsa) {
2002          return context.querySelectorAll(tag);
2003        }
2004      } : function (tag, context) {
2005        var elem,
2006          tmp = [],
2007          i = 0,
2008          // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
2009          results = context.getElementsByTagName(tag);
2010
2011        // Filter out possible comments
2012        if (tag === "*") {
2013          while (elem = results[i++]) {
2014            if (elem.nodeType === 1) {
2015              tmp.push(elem);
2016            }
2017          }
2018          return tmp;
2019        }
2020        return results;
2021      };
2022
2023      // Class
2024      Expr.find["CLASS"] = support.getElementsByClassName && function (className, context) {
2025        if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) {
2026          return context.getElementsByClassName(className);
2027        }
2028      };
2029
2030      /* QSA/matchesSelector
2031      ---------------------------------------------------------------------- */
2032
2033      // QSA and matchesSelector support
2034
2035      // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
2036      rbuggyMatches = [];
2037
2038      // qSa(:focus) reports false when true (Chrome 21)
2039      // We allow this because of a bug in IE8/9 that throws an error
2040      // whenever `document.activeElement` is accessed on an iframe
2041      // So, we allow :focus to pass through QSA all the time to avoid the IE error
2042      // See https://bugs.jquery.com/ticket/13378
2043      rbuggyQSA = [];
2044      if (support.qsa = rnative.test(document.querySelectorAll)) {
2045        // Build QSA regex
2046        // Regex strategy adopted from Diego Perini
2047        assert(function (el) {
2048          var input;
2049
2050          // Select is set to empty string on purpose
2051          // This is to test IE's treatment of not explicitly
2052          // setting a boolean content attribute,
2053          // since its presence should be enough
2054          // https://bugs.jquery.com/ticket/12359
2055          docElem.appendChild(el).innerHTML = "<a id='" + expando + "'></a>" + "<select id='" + expando + "-\r\\' msallowcapture=''>" + "<option selected=''></option></select>";
2056
2057          // Support: IE8, Opera 11-12.16
2058          // Nothing should be selected when empty strings follow ^= or $= or *=
2059          // The test attribute must be unknown in Opera but "safe" for WinRT
2060          // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
2061          if (el.querySelectorAll("[msallowcapture^='']").length) {
2062            rbuggyQSA.push("[*^$]=" + whitespace + "*(?:''|\"\")");
2063          }
2064
2065          // Support: IE8
2066          // Boolean attributes and "value" are not treated correctly
2067          if (!el.querySelectorAll("[selected]").length) {
2068            rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")");
2069          }
2070
2071          // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
2072          if (!el.querySelectorAll("[id~=" + expando + "-]").length) {
2073            rbuggyQSA.push("~=");
2074          }
2075
2076          // Support: IE 11+, Edge 15 - 18+
2077          // IE 11/Edge don't find elements on a `[name='']` query in some cases.
2078          // Adding a temporary attribute to the document before the selection works
2079          // around the issue.
2080          // Interestingly, IE 10 & older don't seem to have the issue.
2081          input = document.createElement("input");
2082          input.setAttribute("name", "");
2083          el.appendChild(input);
2084          if (!el.querySelectorAll("[name='']").length) {
2085            rbuggyQSA.push("\\[" + whitespace + "*name" + whitespace + "*=" + whitespace + "*(?:''|\"\")");
2086          }
2087
2088          // Webkit/Opera - :checked should return selected option elements
2089          // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
2090          // IE8 throws error here and will not see later tests
2091          if (!el.querySelectorAll(":checked").length) {
2092            rbuggyQSA.push(":checked");
2093          }
2094
2095          // Support: Safari 8+, iOS 8+
2096          // https://bugs.webkit.org/show_bug.cgi?id=136851
2097          // In-page `selector#id sibling-combinator selector` fails
2098          if (!el.querySelectorAll("a#" + expando + "+*").length) {
2099            rbuggyQSA.push(".#.+[+~]");
2100          }
2101
2102          // Support: Firefox <=3.6 - 5 only
2103          // Old Firefox doesn't throw on a badly-escaped identifier.
2104          el.querySelectorAll("\\\f");
2105          rbuggyQSA.push("[\\r\\n\\f]");
2106        });
2107        assert(function (el) {
2108          el.innerHTML = "<a href='' disabled='disabled'></a>" + "<select disabled='disabled'><option/></select>";
2109
2110          // Support: Windows 8 Native Apps
2111          // The type and name attributes are restricted during .innerHTML assignment
2112          var input = document.createElement("input");
2113          input.setAttribute("type", "hidden");
2114          el.appendChild(input).setAttribute("name", "D");
2115
2116          // Support: IE8
2117          // Enforce case-sensitivity of name attribute
2118          if (el.querySelectorAll("[name=d]").length) {
2119            rbuggyQSA.push("name" + whitespace + "*[*^$|!~]?=");
2120          }
2121
2122          // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
2123          // IE8 throws error here and will not see later tests
2124          if (el.querySelectorAll(":enabled").length !== 2) {
2125            rbuggyQSA.push(":enabled", ":disabled");
2126          }
2127
2128          // Support: IE9-11+
2129          // IE's :disabled selector does not pick up the children of disabled fieldsets
2130          docElem.appendChild(el).disabled = true;
2131          if (el.querySelectorAll(":disabled").length !== 2) {
2132            rbuggyQSA.push(":enabled", ":disabled");
2133          }
2134
2135          // Support: Opera 10 - 11 only
2136          // Opera 10-11 does not throw on post-comma invalid pseudos
2137          el.querySelectorAll("*,:x");
2138          rbuggyQSA.push(",.*:");
2139        });
2140      }
2141      if (support.matchesSelector = rnative.test(matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector)) {
2142        assert(function (el) {
2143          // Check to see if it's possible to do matchesSelector
2144          // on a disconnected node (IE 9)
2145          support.disconnectedMatch = matches.call(el, "*");
2146
2147          // This should fail with an exception
2148          // Gecko does not error, returns false instead
2149          matches.call(el, "[s!='']:x");
2150          rbuggyMatches.push("!=", pseudos);
2151        });
2152      }
2153      rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|"));
2154      rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|"));
2155
2156      /* Contains
2157      ---------------------------------------------------------------------- */
2158      hasCompare = rnative.test(docElem.compareDocumentPosition);
2159
2160      // Element contains another
2161      // Purposefully self-exclusive
2162      // As in, an element does not contain itself
2163      contains = hasCompare || rnative.test(docElem.contains) ? function (a, b) {
2164        var adown = a.nodeType === 9 ? a.documentElement : a,
2165          bup = b && b.parentNode;
2166        return a === bup || !!(bup && bup.nodeType === 1 && (adown.contains ? adown.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16));
2167      } : function (a, b) {
2168        if (b) {
2169          while (b = b.parentNode) {
2170            if (b === a) {
2171              return true;
2172            }
2173          }
2174        }
2175        return false;
2176      };
2177
2178      /* Sorting
2179      ---------------------------------------------------------------------- */
2180
2181      // Document order sorting
2182      sortOrder = hasCompare ? function (a, b) {
2183        // Flag for duplicate removal
2184        if (a === b) {
2185          hasDuplicate = true;
2186          return 0;
2187        }
2188
2189        // Sort on method existence if only one input has compareDocumentPosition
2190        var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
2191        if (compare) {
2192          return compare;
2193        }
2194
2195        // Calculate position if both inputs belong to the same document
2196        // Support: IE 11+, Edge 17 - 18+
2197        // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
2198        // two documents; shallow comparisons work.
2199        // eslint-disable-next-line eqeqeq
2200        compare = (a.ownerDocument || a) == (b.ownerDocument || b) ? a.compareDocumentPosition(b) :
2201        // Otherwise we know they are disconnected
2202        1;
2203
2204        // Disconnected nodes
2205        if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) {
2206          // Choose the first element that is related to our preferred document
2207          // Support: IE 11+, Edge 17 - 18+
2208          // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
2209          // two documents; shallow comparisons work.
2210          // eslint-disable-next-line eqeqeq
2211          if (a == document || a.ownerDocument == preferredDoc && contains(preferredDoc, a)) {
2212            return -1;
2213          }
2214
2215          // Support: IE 11+, Edge 17 - 18+
2216          // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
2217          // two documents; shallow comparisons work.
2218          // eslint-disable-next-line eqeqeq
2219          if (b == document || b.ownerDocument == preferredDoc && contains(preferredDoc, b)) {
2220            return 1;
2221          }
2222
2223          // Maintain original order
2224          return sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0;
2225        }
2226        return compare & 4 ? -1 : 1;
2227      } : function (a, b) {
2228        // Exit early if the nodes are identical
2229        if (a === b) {
2230          hasDuplicate = true;
2231          return 0;
2232        }
2233        var cur,
2234          i = 0,
2235          aup = a.parentNode,
2236          bup = b.parentNode,
2237          ap = [a],
2238          bp = [b];
2239
2240        // Parentless nodes are either documents or disconnected
2241        if (!aup || !bup) {
2242          // Support: IE 11+, Edge 17 - 18+
2243          // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
2244          // two documents; shallow comparisons work.
2245          /* eslint-disable eqeqeq */
2246          return a == document ? -1 : b == document ? 1 : /* eslint-enable eqeqeq */
2247          aup ? -1 : bup ? 1 : sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0;
2248
2249          // If the nodes are siblings, we can do a quick check
2250        } else if (aup === bup) {
2251          return siblingCheck(a, b);
2252        }
2253
2254        // Otherwise we need full lists of their ancestors for comparison
2255        cur = a;
2256        while (cur = cur.parentNode) {
2257          ap.unshift(cur);
2258        }
2259        cur = b;
2260        while (cur = cur.parentNode) {
2261          bp.unshift(cur);
2262        }
2263
2264        // Walk down the tree looking for a discrepancy
2265        while (ap[i] === bp[i]) {
2266          i++;
2267        }
2268        return i ?
2269        // Do a sibling check if the nodes have a common ancestor
2270        siblingCheck(ap[i], bp[i]) :
2271        // Otherwise nodes in our document sort first
2272        // Support: IE 11+, Edge 17 - 18+
2273        // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
2274        // two documents; shallow comparisons work.
2275        /* eslint-disable eqeqeq */
2276        ap[i] == preferredDoc ? -1 : bp[i] == preferredDoc ? 1 : /* eslint-enable eqeqeq */
2277        0;
2278      };
2279      return document;
2280    };
2281    Sizzle.matches = function (expr, elements) {
2282      return Sizzle(expr, null, null, elements);
2283    };
2284    Sizzle.matchesSelector = function (elem, expr) {
2285      setDocument(elem);
2286      if (support.matchesSelector && documentIsHTML && !nonnativeSelectorCache[expr + " "] && (!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr))) {
2287        try {
2288          var ret = matches.call(elem, expr);
2289
2290          // IE 9's matchesSelector returns false on disconnected nodes
2291          if (ret || support.disconnectedMatch ||
2292          // As well, disconnected nodes are said to be in a document
2293          // fragment in IE 9
2294          elem.document && elem.document.nodeType !== 11) {
2295            return ret;
2296          }
2297        } catch (e) {
2298          nonnativeSelectorCache(expr, true);
2299        }
2300      }
2301      return Sizzle(expr, document, null, [elem]).length > 0;
2302    };
2303    Sizzle.contains = function (context, elem) {
2304      // Set document vars if needed
2305      // Support: IE 11+, Edge 17 - 18+
2306      // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
2307      // two documents; shallow comparisons work.
2308      // eslint-disable-next-line eqeqeq
2309      if ((context.ownerDocument || context) != document) {
2310        setDocument(context);
2311      }
2312      return contains(context, elem);
2313    };
2314    Sizzle.attr = function (elem, name) {
2315      // Set document vars if needed
2316      // Support: IE 11+, Edge 17 - 18+
2317      // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
2318      // two documents; shallow comparisons work.
2319      // eslint-disable-next-line eqeqeq
2320      if ((elem.ownerDocument || elem) != document) {
2321        setDocument(elem);
2322      }
2323      var fn = Expr.attrHandle[name.toLowerCase()],
2324        // Don't get fooled by Object.prototype properties (jQuery #13807)
2325        val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : undefined;
2326      return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute(name) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
2327    };
2328    Sizzle.escape = function (sel) {
2329      return (sel + "").replace(rcssescape, fcssescape);
2330    };
2331    Sizzle.error = function (msg) {
2332      throw new Error("Syntax error, unrecognized expression: " + msg);
2333    };
2334
2335    /**
2336     * Document sorting and removing duplicates
2337     * @param {ArrayLike} results
2338     */
2339    Sizzle.uniqueSort = function (results) {
2340      var elem,
2341        duplicates = [],
2342        j = 0,
2343        i = 0;
2344
2345      // Unless we *know* we can detect duplicates, assume their presence
2346      hasDuplicate = !support.detectDuplicates;
2347      sortInput = !support.sortStable && results.slice(0);
2348      results.sort(sortOrder);
2349      if (hasDuplicate) {
2350        while (elem = results[i++]) {
2351          if (elem === results[i]) {
2352            j = duplicates.push(i);
2353          }
2354        }
2355        while (j--) {
2356          results.splice(duplicates[j], 1);
2357        }
2358      }
2359
2360      // Clear input after sorting to release objects
2361      // See https://github.com/jquery/sizzle/pull/225
2362      sortInput = null;
2363      return results;
2364    };
2365
2366    /**
2367     * Utility function for retrieving the text value of an array of DOM nodes
2368     * @param {Array|Element} elem
2369     */
2370    getText = Sizzle.getText = function (elem) {
2371      var node,
2372        ret = "",
2373        i = 0,
2374        nodeType = elem.nodeType;
2375      if (!nodeType) {
2376        // If no nodeType, this is expected to be an array
2377        while (node = elem[i++]) {
2378          // Do not traverse comment nodes
2379          ret += getText(node);
2380        }
2381      } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) {
2382        // Use textContent for elements
2383        // innerText usage removed for consistency of new lines (jQuery #11153)
2384        if (typeof elem.textContent === "string") {
2385          return elem.textContent;
2386        } else {
2387          // Traverse its children
2388          for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
2389            ret += getText(elem);
2390          }
2391        }
2392      } else if (nodeType === 3 || nodeType === 4) {
2393        return elem.nodeValue;
2394      }
2395
2396      // Do not include comment or processing instruction nodes
2397
2398      return ret;
2399    };
2400    Expr = Sizzle.selectors = {
2401      // Can be adjusted by the user
2402      cacheLength: 50,
2403      createPseudo: markFunction,
2404      match: matchExpr,
2405      attrHandle: {},
2406      find: {},
2407      relative: {
2408        ">": {
2409          dir: "parentNode",
2410          first: true
2411        },
2412        " ": {
2413          dir: "parentNode"
2414        },
2415        "+": {
2416          dir: "previousSibling",
2417          first: true
2418        },
2419        "~": {
2420          dir: "previousSibling"
2421        }
2422      },
2423      preFilter: {
2424        "ATTR": function ATTR(match) {
2425          match[1] = match[1].replace(runescape, funescape);
2426
2427          // Move the given value to match[3] whether quoted or unquoted
2428          match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape);
2429          if (match[2] === "~=") {
2430            match[3] = " " + match[3] + " ";
2431          }
2432          return match.slice(0, 4);
2433        },
2434        "CHILD": function CHILD(match) {
2435          /* matches from matchExpr["CHILD"]
2436          	1 type (only|nth|...)
2437          	2 what (child|of-type)
2438          	3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
2439          	4 xn-component of xn+y argument ([+-]?\d*n|)
2440          	5 sign of xn-component
2441          	6 x of xn-component
2442          	7 sign of y-component
2443          	8 y of y-component
2444          */
2445          match[1] = match[1].toLowerCase();
2446          if (match[1].slice(0, 3) === "nth") {
2447            // nth-* requires argument
2448            if (!match[3]) {
2449              Sizzle.error(match[0]);
2450            }
2451
2452            // numeric x and y parameters for Expr.filter.CHILD
2453            // remember that false/true cast respectively to 0/1
2454            match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd"));
2455            match[5] = +(match[7] + match[8] || match[3] === "odd");
2456
2457            // other types prohibit arguments
2458          } else if (match[3]) {
2459            Sizzle.error(match[0]);
2460          }
2461          return match;
2462        },
2463        "PSEUDO": function PSEUDO(match) {
2464          var excess,
2465            unquoted = !match[6] && match[2];
2466          if (matchExpr["CHILD"].test(match[0])) {
2467            return null;
2468          }
2469
2470          // Accept quoted arguments as-is
2471          if (match[3]) {
2472            match[2] = match[4] || match[5] || "";
2473
2474            // Strip excess characters from unquoted arguments
2475          } else if (unquoted && rpseudo.test(unquoted) && (
2476          // Get excess from tokenize (recursively)
2477          excess = tokenize(unquoted, true)) && (
2478          // advance to the next closing parenthesis
2479          excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) {
2480            // excess is a negative index
2481            match[0] = match[0].slice(0, excess);
2482            match[2] = unquoted.slice(0, excess);
2483          }
2484
2485          // Return only captures needed by the pseudo filter method (type and argument)
2486          return match.slice(0, 3);
2487        }
2488      },
2489      filter: {
2490        "TAG": function TAG(nodeNameSelector) {
2491          var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
2492          return nodeNameSelector === "*" ? function () {
2493            return true;
2494          } : function (elem) {
2495            return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
2496          };
2497        },
2498        "CLASS": function CLASS(className) {
2499          var pattern = classCache[className + " "];
2500          return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function (elem) {
2501            return pattern.test(typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "");
2502          });
2503        },
2504        "ATTR": function ATTR(name, operator, check) {
2505          return function (elem) {
2506            var result = Sizzle.attr(elem, name);
2507            if (result == null) {
2508              return operator === "!=";
2509            }
2510            if (!operator) {
2511              return true;
2512            }
2513            result += "";
2514
2515            /* eslint-disable max-len */
2516
2517            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;
2518            /* eslint-enable max-len */
2519          };
2520        },
2521
2522        "CHILD": function CHILD(type, what, _argument, first, last) {
2523          var simple = type.slice(0, 3) !== "nth",
2524            forward = type.slice(-4) !== "last",
2525            ofType = what === "of-type";
2526          return first === 1 && last === 0 ?
2527          // Shortcut for :nth-*(n)
2528          function (elem) {
2529            return !!elem.parentNode;
2530          } : function (elem, _context, xml) {
2531            var cache,
2532              uniqueCache,
2533              outerCache,
2534              node,
2535              nodeIndex,
2536              start,
2537              dir = simple !== forward ? "nextSibling" : "previousSibling",
2538              parent = elem.parentNode,
2539              name = ofType && elem.nodeName.toLowerCase(),
2540              useCache = !xml && !ofType,
2541              diff = false;
2542            if (parent) {
2543              // :(first|last|only)-(child|of-type)
2544              if (simple) {
2545                while (dir) {
2546                  node = elem;
2547                  while (node = node[dir]) {
2548                    if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) {
2549                      return false;
2550                    }
2551                  }
2552
2553                  // Reverse direction for :only-* (if we haven't yet done so)
2554                  start = dir = type === "only" && !start && "nextSibling";
2555                }
2556                return true;
2557              }
2558              start = [forward ? parent.firstChild : parent.lastChild];
2559
2560              // non-xml :nth-child(...) stores cache data on `parent`
2561              if (forward && useCache) {
2562                // Seek `elem` from a previously-cached index
2563
2564                // ...in a gzip-friendly way
2565                node = parent;
2566                outerCache = node[expando] || (node[expando] = {});
2567
2568                // Support: IE <9 only
2569                // Defend against cloned attroperties (jQuery gh-1709)
2570                uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {});
2571                cache = uniqueCache[type] || [];
2572                nodeIndex = cache[0] === dirruns && cache[1];
2573                diff = nodeIndex && cache[2];
2574                node = nodeIndex && parent.childNodes[nodeIndex];
2575                while (node = ++nodeIndex && node && node[dir] || (
2576                // Fallback to seeking `elem` from the start
2577                diff = nodeIndex = 0) || start.pop()) {
2578                  // When found, cache indexes on `parent` and break
2579                  if (node.nodeType === 1 && ++diff && node === elem) {
2580                    uniqueCache[type] = [dirruns, nodeIndex, diff];
2581                    break;
2582                  }
2583                }
2584              } else {
2585                // Use previously-cached element index if available
2586                if (useCache) {
2587                  // ...in a gzip-friendly way
2588                  node = elem;
2589                  outerCache = node[expando] || (node[expando] = {});
2590
2591                  // Support: IE <9 only
2592                  // Defend against cloned attroperties (jQuery gh-1709)
2593                  uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {});
2594                  cache = uniqueCache[type] || [];
2595                  nodeIndex = cache[0] === dirruns && cache[1];
2596                  diff = nodeIndex;
2597                }
2598
2599                // xml :nth-child(...)
2600                // or :nth-last-child(...) or :nth(-last)?-of-type(...)
2601                if (diff === false) {
2602                  // Use the same loop as above to seek `elem` from the start
2603                  while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) {
2604                    if ((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) {
2605                      // Cache the index of each encountered element
2606                      if (useCache) {
2607                        outerCache = node[expando] || (node[expando] = {});
2608
2609                        // Support: IE <9 only
2610                        // Defend against cloned attroperties (jQuery gh-1709)
2611                        uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {});
2612                        uniqueCache[type] = [dirruns, diff];
2613                      }
2614                      if (node === elem) {
2615                        break;
2616                      }
2617                    }
2618                  }
2619                }
2620              }
2621
2622              // Incorporate the offset, then check against cycle size
2623              diff -= last;
2624              return diff === first || diff % first === 0 && diff / first >= 0;
2625            }
2626          };
2627        },
2628        "PSEUDO": function PSEUDO(pseudo, argument) {
2629          // pseudo-class names are case-insensitive
2630          // http://www.w3.org/TR/selectors/#pseudo-classes
2631          // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
2632          // Remember that setFilters inherits from pseudos
2633          var args,
2634            fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error("unsupported pseudo: " + pseudo);
2635
2636          // The user may use createPseudo to indicate that
2637          // arguments are needed to create the filter function
2638          // just as Sizzle does
2639          if (fn[expando]) {
2640            return fn(argument);
2641          }
2642
2643          // But maintain support for old signatures
2644          if (fn.length > 1) {
2645            args = [pseudo, pseudo, "", argument];
2646            return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function (seed, matches) {
2647              var idx,
2648                matched = fn(seed, argument),
2649                i = matched.length;
2650              while (i--) {
2651                idx = indexOf(seed, matched[i]);
2652                seed[idx] = !(matches[idx] = matched[i]);
2653              }
2654            }) : function (elem) {
2655              return fn(elem, 0, args);
2656            };
2657          }
2658          return fn;
2659        }
2660      },
2661      pseudos: {
2662        // Potentially complex pseudos
2663        "not": markFunction(function (selector) {
2664          // Trim the selector passed to compile
2665          // to avoid treating leading and trailing
2666          // spaces as combinators
2667          var input = [],
2668            results = [],
2669            matcher = compile(selector.replace(rtrim, "$1"));
2670          return matcher[expando] ? markFunction(function (seed, matches, _context, xml) {
2671            var elem,
2672              unmatched = matcher(seed, null, xml, []),
2673              i = seed.length;
2674
2675            // Match elements unmatched by `matcher`
2676            while (i--) {
2677              if (elem = unmatched[i]) {
2678                seed[i] = !(matches[i] = elem);
2679              }
2680            }
2681          }) : function (elem, _context, xml) {
2682            input[0] = elem;
2683            matcher(input, null, xml, results);
2684
2685            // Don't keep the element (issue #299)
2686            input[0] = null;
2687            return !results.pop();
2688          };
2689        }),
2690        "has": markFunction(function (selector) {
2691          return function (elem) {
2692            return Sizzle(selector, elem).length > 0;
2693          };
2694        }),
2695        "contains": markFunction(function (text) {
2696          text = text.replace(runescape, funescape);
2697          return function (elem) {
2698            return (elem.textContent || getText(elem)).indexOf(text) > -1;
2699          };
2700        }),
2701        // "Whether an element is represented by a :lang() selector
2702        // is based solely on the element's language value
2703        // being equal to the identifier C,
2704        // or beginning with the identifier C immediately followed by "-".
2705        // The matching of C against the element's language value is performed case-insensitively.
2706        // The identifier C does not have to be a valid language name."
2707        // http://www.w3.org/TR/selectors/#lang-pseudo
2708        "lang": markFunction(function (lang) {
2709          // lang value must be a valid identifier
2710          if (!ridentifier.test(lang || "")) {
2711            Sizzle.error("unsupported lang: " + lang);
2712          }
2713          lang = lang.replace(runescape, funescape).toLowerCase();
2714          return function (elem) {
2715            var elemLang;
2716            do {
2717              if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) {
2718                elemLang = elemLang.toLowerCase();
2719                return elemLang === lang || elemLang.indexOf(lang + "-") === 0;
2720              }
2721            } while ((elem = elem.parentNode) && elem.nodeType === 1);
2722            return false;
2723          };
2724        }),
2725        // Miscellaneous
2726        "target": function target(elem) {
2727          var hash = window.location && window.location.hash;
2728          return hash && hash.slice(1) === elem.id;
2729        },
2730        "root": function root(elem) {
2731          return elem === docElem;
2732        },
2733        "focus": function focus(elem) {
2734          return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
2735        },
2736        // Boolean properties
2737        "enabled": createDisabledPseudo(false),
2738        "disabled": createDisabledPseudo(true),
2739        "checked": function checked(elem) {
2740          // In CSS3, :checked should return both checked and selected elements
2741          // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
2742          var nodeName = elem.nodeName.toLowerCase();
2743          return nodeName === "input" && !!elem.checked || nodeName === "option" && !!elem.selected;
2744        },
2745        "selected": function selected(elem) {
2746          // Accessing this property makes selected-by-default
2747          // options in Safari work properly
2748          if (elem.parentNode) {
2749            // eslint-disable-next-line no-unused-expressions
2750            elem.parentNode.selectedIndex;
2751          }
2752          return elem.selected === true;
2753        },
2754        // Contents
2755        "empty": function empty(elem) {
2756          // http://www.w3.org/TR/selectors/#empty-pseudo
2757          // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
2758          //   but not by others (comment: 8; processing instruction: 7; etc.)
2759          // nodeType < 6 works because attributes (2) do not appear as children
2760          for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
2761            if (elem.nodeType < 6) {
2762              return false;
2763            }
2764          }
2765          return true;
2766        },
2767        "parent": function parent(elem) {
2768          return !Expr.pseudos["empty"](elem);
2769        },
2770        // Element/input types
2771        "header": function header(elem) {
2772          return rheader.test(elem.nodeName);
2773        },
2774        "input": function input(elem) {
2775          return rinputs.test(elem.nodeName);
2776        },
2777        "button": function button(elem) {
2778          var name = elem.nodeName.toLowerCase();
2779          return name === "input" && elem.type === "button" || name === "button";
2780        },
2781        "text": function text(elem) {
2782          var attr;
2783          return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && (
2784          // Support: IE<8
2785          // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
2786          (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text");
2787        },
2788        // Position-in-collection
2789        "first": createPositionalPseudo(function () {
2790          return [0];
2791        }),
2792        "last": createPositionalPseudo(function (_matchIndexes, length) {
2793          return [length - 1];
2794        }),
2795        "eq": createPositionalPseudo(function (_matchIndexes, length, argument) {
2796          return [argument < 0 ? argument + length : argument];
2797        }),
2798        "even": createPositionalPseudo(function (matchIndexes, length) {
2799          var i = 0;
2800          for (; i < length; i += 2) {
2801            matchIndexes.push(i);
2802          }
2803          return matchIndexes;
2804        }),
2805        "odd": createPositionalPseudo(function (matchIndexes, length) {
2806          var i = 1;
2807          for (; i < length; i += 2) {
2808            matchIndexes.push(i);
2809          }
2810          return matchIndexes;
2811        }),
2812        "lt": createPositionalPseudo(function (matchIndexes, length, argument) {
2813          var i = argument < 0 ? argument + length : argument > length ? length : argument;
2814          for (; --i >= 0;) {
2815            matchIndexes.push(i);
2816          }
2817          return matchIndexes;
2818        }),
2819        "gt": createPositionalPseudo(function (matchIndexes, length, argument) {
2820          var i = argument < 0 ? argument + length : argument;
2821          for (; ++i < length;) {
2822            matchIndexes.push(i);
2823          }
2824          return matchIndexes;
2825        })
2826      }
2827    };
2828    Expr.pseudos["nth"] = Expr.pseudos["eq"];
2829
2830    // Add button/input type pseudos
2831    for (i in {
2832      radio: true,
2833      checkbox: true,
2834      file: true,
2835      password: true,
2836      image: true
2837    }) {
2838      Expr.pseudos[i] = createInputPseudo(i);
2839    }
2840    for (i in {
2841      submit: true,
2842      reset: true
2843    }) {
2844      Expr.pseudos[i] = createButtonPseudo(i);
2845    }
2846
2847    // Easy API for creating new setFilters
2848    function setFilters() {}
2849    setFilters.prototype = Expr.filters = Expr.pseudos;
2850    Expr.setFilters = new setFilters();
2851    tokenize = Sizzle.tokenize = function (selector, parseOnly) {
2852      var matched,
2853        match,
2854        tokens,
2855        type,
2856        soFar,
2857        groups,
2858        preFilters,
2859        cached = tokenCache[selector + " "];
2860      if (cached) {
2861        return parseOnly ? 0 : cached.slice(0);
2862      }
2863      soFar = selector;
2864      groups = [];
2865      preFilters = Expr.preFilter;
2866      while (soFar) {
2867        // Comma and first run
2868        if (!matched || (match = rcomma.exec(soFar))) {
2869          if (match) {
2870            // Don't consume trailing commas as valid
2871            soFar = soFar.slice(match[0].length) || soFar;
2872          }
2873          groups.push(tokens = []);
2874        }
2875        matched = false;
2876
2877        // Combinators
2878        if (match = rcombinators.exec(soFar)) {
2879          matched = match.shift();
2880          tokens.push({
2881            value: matched,
2882            // Cast descendant combinators to space
2883            type: match[0].replace(rtrim, " ")
2884          });
2885          soFar = soFar.slice(matched.length);
2886        }
2887
2888        // Filters
2889        for (type in Expr.filter) {
2890          if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) {
2891            matched = match.shift();
2892            tokens.push({
2893              value: matched,
2894              type: type,
2895              matches: match
2896            });
2897            soFar = soFar.slice(matched.length);
2898          }
2899        }
2900        if (!matched) {
2901          break;
2902        }
2903      }
2904
2905      // Return the length of the invalid excess
2906      // if we're just parsing
2907      // Otherwise, throw an error or return tokens
2908      return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) :
2909      // Cache the tokens
2910      tokenCache(selector, groups).slice(0);
2911    };
2912    function toSelector(tokens) {
2913      var i = 0,
2914        len = tokens.length,
2915        selector = "";
2916      for (; i < len; i++) {
2917        selector += tokens[i].value;
2918      }
2919      return selector;
2920    }
2921    function addCombinator(matcher, combinator, base) {
2922      var dir = combinator.dir,
2923        skip = combinator.next,
2924        key = skip || dir,
2925        checkNonElements = base && key === "parentNode",
2926        doneName = done++;
2927      return combinator.first ?
2928      // Check against closest ancestor/preceding element
2929      function (elem, context, xml) {
2930        while (elem = elem[dir]) {
2931          if (elem.nodeType === 1 || checkNonElements) {
2932            return matcher(elem, context, xml);
2933          }
2934        }
2935        return false;
2936      } :
2937      // Check against all ancestor/preceding elements
2938      function (elem, context, xml) {
2939        var oldCache,
2940          uniqueCache,
2941          outerCache,
2942          newCache = [dirruns, doneName];
2943
2944        // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
2945        if (xml) {
2946          while (elem = elem[dir]) {
2947            if (elem.nodeType === 1 || checkNonElements) {
2948              if (matcher(elem, context, xml)) {
2949                return true;
2950              }
2951            }
2952          }
2953        } else {
2954          while (elem = elem[dir]) {
2955            if (elem.nodeType === 1 || checkNonElements) {
2956              outerCache = elem[expando] || (elem[expando] = {});
2957
2958              // Support: IE <9 only
2959              // Defend against cloned attroperties (jQuery gh-1709)
2960              uniqueCache = outerCache[elem.uniqueID] || (outerCache[elem.uniqueID] = {});
2961              if (skip && skip === elem.nodeName.toLowerCase()) {
2962                elem = elem[dir] || elem;
2963              } else if ((oldCache = uniqueCache[key]) && oldCache[0] === dirruns && oldCache[1] === doneName) {
2964                // Assign to newCache so results back-propagate to previous elements
2965                return newCache[2] = oldCache[2];
2966              } else {
2967                // Reuse newcache so results back-propagate to previous elements
2968                uniqueCache[key] = newCache;
2969
2970                // A match means we're done; a fail means we have to keep checking
2971                if (newCache[2] = matcher(elem, context, xml)) {
2972                  return true;
2973                }
2974              }
2975            }
2976          }
2977        }
2978        return false;
2979      };
2980    }
2981    function elementMatcher(matchers) {
2982      return matchers.length > 1 ? function (elem, context, xml) {
2983        var i = matchers.length;
2984        while (i--) {
2985          if (!matchers[i](elem, context, xml)) {
2986            return false;
2987          }
2988        }
2989        return true;
2990      } : matchers[0];
2991    }
2992    function multipleContexts(selector, contexts, results) {
2993      var i = 0,
2994        len = contexts.length;
2995      for (; i < len; i++) {
2996        Sizzle(selector, contexts[i], results);
2997      }
2998      return results;
2999    }
3000    function condense(unmatched, map, filter, context, xml) {
3001      var elem,
3002        newUnmatched = [],
3003        i = 0,
3004        len = unmatched.length,
3005        mapped = map != null;
3006      for (; i < len; i++) {
3007        if (elem = unmatched[i]) {
3008          if (!filter || filter(elem, context, xml)) {
3009            newUnmatched.push(elem);
3010            if (mapped) {
3011              map.push(i);
3012            }
3013          }
3014        }
3015      }
3016      return newUnmatched;
3017    }
3018    function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
3019      if (postFilter && !postFilter[expando]) {
3020        postFilter = setMatcher(postFilter);
3021      }
3022      if (postFinder && !postFinder[expando]) {
3023        postFinder = setMatcher(postFinder, postSelector);
3024      }
3025      return markFunction(function (seed, results, context, xml) {
3026        var temp,
3027          i,
3028          elem,
3029          preMap = [],
3030          postMap = [],
3031          preexisting = results.length,
3032          // Get initial elements from seed or context
3033          elems = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []),
3034          // Prefilter to get matcher input, preserving a map for seed-results synchronization
3035          matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems,
3036          matcherOut = matcher ?
3037          // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
3038          postFinder || (seed ? preFilter : preexisting || postFilter) ?
3039          // ...intermediate processing is necessary
3040          [] :
3041          // ...otherwise use results directly
3042          results : matcherIn;
3043
3044        // Find primary matches
3045        if (matcher) {
3046          matcher(matcherIn, matcherOut, context, xml);
3047        }
3048
3049        // Apply postFilter
3050        if (postFilter) {
3051          temp = condense(matcherOut, postMap);
3052          postFilter(temp, [], context, xml);
3053
3054          // Un-match failing elements by moving them back to matcherIn
3055          i = temp.length;
3056          while (i--) {
3057            if (elem = temp[i]) {
3058              matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem);
3059            }
3060          }
3061        }
3062        if (seed) {
3063          if (postFinder || preFilter) {
3064            if (postFinder) {
3065              // Get the final matcherOut by condensing this intermediate into postFinder contexts
3066              temp = [];
3067              i = matcherOut.length;
3068              while (i--) {
3069                if (elem = matcherOut[i]) {
3070                  // Restore matcherIn since elem is not yet a final match
3071                  temp.push(matcherIn[i] = elem);
3072                }
3073              }
3074              postFinder(null, matcherOut = [], temp, xml);
3075            }
3076
3077            // Move matched elements from seed to results to keep them synchronized
3078            i = matcherOut.length;
3079            while (i--) {
3080              if ((elem = matcherOut[i]) && (temp = postFinder ? indexOf(seed, elem) : preMap[i]) > -1) {
3081                seed[temp] = !(results[temp] = elem);
3082              }
3083            }
3084          }
3085
3086          // Add elements to results, through postFinder if defined
3087        } else {
3088          matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut);
3089          if (postFinder) {
3090            postFinder(null, results, matcherOut, xml);
3091          } else {
3092            push.apply(results, matcherOut);
3093          }
3094        }
3095      });
3096    }
3097    function matcherFromTokens(tokens) {
3098      var checkContext,
3099        matcher,
3100        j,
3101        len = tokens.length,
3102        leadingRelative = Expr.relative[tokens[0].type],
3103        implicitRelative = leadingRelative || Expr.relative[" "],
3104        i = leadingRelative ? 1 : 0,
3105        // The foundational matcher ensures that elements are reachable from top-level context(s)
3106        matchContext = addCombinator(function (elem) {
3107          return elem === checkContext;
3108        }, implicitRelative, true),
3109        matchAnyContext = addCombinator(function (elem) {
3110          return indexOf(checkContext, elem) > -1;
3111        }, implicitRelative, true),
3112        matchers = [function (elem, context, xml) {
3113          var ret = !leadingRelative && (xml || context !== outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml));
3114
3115          // Avoid hanging onto element (issue #299)
3116          checkContext = null;
3117          return ret;
3118        }];
3119      for (; i < len; i++) {
3120        if (matcher = Expr.relative[tokens[i].type]) {
3121          matchers = [addCombinator(elementMatcher(matchers), matcher)];
3122        } else {
3123          matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches);
3124
3125          // Return special upon seeing a positional matcher
3126          if (matcher[expando]) {
3127            // Find the next relative operator (if any) for proper handling
3128            j = ++i;
3129            for (; j < len; j++) {
3130              if (Expr.relative[tokens[j].type]) {
3131                break;
3132              }
3133            }
3134            return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector(
3135            // If the preceding token was a descendant combinator, insert an implicit any-element `*`
3136            tokens.slice(0, i - 1).concat({
3137              value: tokens[i - 2].type === " " ? "*" : ""
3138            })).replace(rtrim, "$1"), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len && toSelector(tokens));
3139          }
3140          matchers.push(matcher);
3141        }
3142      }
3143      return elementMatcher(matchers);
3144    }
3145    function matcherFromGroupMatchers(elementMatchers, setMatchers) {
3146      var bySet = setMatchers.length > 0,
3147        byElement = elementMatchers.length > 0,
3148        superMatcher = function superMatcher(seed, context, xml, results, outermost) {
3149          var elem,
3150            j,
3151            matcher,
3152            matchedCount = 0,
3153            i = "0",
3154            unmatched = seed && [],
3155            setMatched = [],
3156            contextBackup = outermostContext,
3157            // We must always have either seed elements or outermost context
3158            elems = seed || byElement && Expr.find["TAG"]("*", outermost),
3159            // Use integer dirruns iff this is the outermost matcher
3160            dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1,
3161            len = elems.length;
3162          if (outermost) {
3163            // Support: IE 11+, Edge 17 - 18+
3164            // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
3165            // two documents; shallow comparisons work.
3166            // eslint-disable-next-line eqeqeq
3167            outermostContext = context == document || context || outermost;
3168          }
3169
3170          // Add elements passing elementMatchers directly to results
3171          // Support: IE<9, Safari
3172          // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
3173          for (; i !== len && (elem = elems[i]) != null; i++) {
3174            if (byElement && elem) {
3175              j = 0;
3176
3177              // Support: IE 11+, Edge 17 - 18+
3178              // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
3179              // two documents; shallow comparisons work.
3180              // eslint-disable-next-line eqeqeq
3181              if (!context && elem.ownerDocument != document) {
3182                setDocument(elem);
3183                xml = !documentIsHTML;
3184              }
3185              while (matcher = elementMatchers[j++]) {
3186                if (matcher(elem, context || document, xml)) {
3187                  results.push(elem);
3188                  break;
3189                }
3190              }
3191              if (outermost) {
3192                dirruns = dirrunsUnique;
3193              }
3194            }
3195
3196            // Track unmatched elements for set filters
3197            if (bySet) {
3198              // They will have gone through all possible matchers
3199              if (elem = !matcher && elem) {
3200                matchedCount--;
3201              }
3202
3203              // Lengthen the array for every element, matched or not
3204              if (seed) {
3205                unmatched.push(elem);
3206              }
3207            }
3208          }
3209
3210          // `i` is now the count of elements visited above, and adding it to `matchedCount`
3211          // makes the latter nonnegative.
3212          matchedCount += i;
3213
3214          // Apply set filters to unmatched elements
3215          // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
3216          // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
3217          // no element matchers and no seed.
3218          // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
3219          // case, which will result in a "00" `matchedCount` that differs from `i` but is also
3220          // numerically zero.
3221          if (bySet && i !== matchedCount) {
3222            j = 0;
3223            while (matcher = setMatchers[j++]) {
3224              matcher(unmatched, setMatched, context, xml);
3225            }
3226            if (seed) {
3227              // Reintegrate element matches to eliminate the need for sorting
3228              if (matchedCount > 0) {
3229                while (i--) {
3230                  if (!(unmatched[i] || setMatched[i])) {
3231                    setMatched[i] = pop.call(results);
3232                  }
3233                }
3234              }
3235
3236              // Discard index placeholder values to get only actual matches
3237              setMatched = condense(setMatched);
3238            }
3239
3240            // Add matches to results
3241            push.apply(results, setMatched);
3242
3243            // Seedless set matches succeeding multiple successful matchers stipulate sorting
3244            if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) {
3245              Sizzle.uniqueSort(results);
3246            }
3247          }
3248
3249          // Override manipulation of globals by nested matchers
3250          if (outermost) {
3251            dirruns = dirrunsUnique;
3252            outermostContext = contextBackup;
3253          }
3254          return unmatched;
3255        };
3256      return bySet ? markFunction(superMatcher) : superMatcher;
3257    }
3258    compile = Sizzle.compile = function (selector, match /* Internal Use Only */) {
3259      var i,
3260        setMatchers = [],
3261        elementMatchers = [],
3262        cached = compilerCache[selector + " "];
3263      if (!cached) {
3264        // Generate a function of recursive functions that can be used to check each element
3265        if (!match) {
3266          match = tokenize(selector);
3267        }
3268        i = match.length;
3269        while (i--) {
3270          cached = matcherFromTokens(match[i]);
3271          if (cached[expando]) {
3272            setMatchers.push(cached);
3273          } else {
3274            elementMatchers.push(cached);
3275          }
3276        }
3277
3278        // Cache the compiled function
3279        cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers));
3280
3281        // Save selector and tokenization
3282        cached.selector = selector;
3283      }
3284      return cached;
3285    };
3286
3287    /**
3288     * A low-level selection function that works with Sizzle's compiled
3289     *  selector functions
3290     * @param {String|Function} selector A selector or a pre-compiled
3291     *  selector function built with Sizzle.compile
3292     * @param {Element} context
3293     * @param {Array} [results]
3294     * @param {Array} [seed] A set of elements to match against
3295     */
3296    select = Sizzle.select = function (selector, context, results, seed) {
3297      var i,
3298        tokens,
3299        token,
3300        type,
3301        find,
3302        compiled = typeof selector === "function" && selector,
3303        match = !seed && tokenize(selector = compiled.selector || selector);
3304      results = results || [];
3305
3306      // Try to minimize operations if there is only one selector in the list and no seed
3307      // (the latter of which guarantees us context)
3308      if (match.length === 1) {
3309        // Reduce context if the leading compound selector is an ID
3310        tokens = match[0] = match[0].slice(0);
3311        if (tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) {
3312          context = (Expr.find["ID"](token.matches[0].replace(runescape, funescape), context) || [])[0];
3313          if (!context) {
3314            return results;
3315
3316            // Precompiled matchers will still verify ancestry, so step up a level
3317          } else if (compiled) {
3318            context = context.parentNode;
3319          }
3320          selector = selector.slice(tokens.shift().value.length);
3321        }
3322
3323        // Fetch a seed set for right-to-left matching
3324        i = matchExpr["needsContext"].test(selector) ? 0 : tokens.length;
3325        while (i--) {
3326          token = tokens[i];
3327
3328          // Abort if we hit a combinator
3329          if (Expr.relative[type = token.type]) {
3330            break;
3331          }
3332          if (find = Expr.find[type]) {
3333            // Search, expanding context for leading sibling combinators
3334            if (seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context)) {
3335              // If seed is empty or no tokens remain, we can return early
3336              tokens.splice(i, 1);
3337              selector = seed.length && toSelector(tokens);
3338              if (!selector) {
3339                push.apply(results, seed);
3340                return results;
3341              }
3342              break;
3343            }
3344          }
3345        }
3346      }
3347
3348      // Compile and execute a filtering function if one is not provided
3349      // Provide `match` to avoid retokenization if we modified the selector above
3350      (compiled || compile(selector, match))(seed, context, !documentIsHTML, results, !context || rsibling.test(selector) && testContext(context.parentNode) || context);
3351      return results;
3352    };
3353
3354    // One-time assignments
3355
3356    // Sort stability
3357    support.sortStable = expando.split("").sort(sortOrder).join("") === expando;
3358
3359    // Support: Chrome 14-35+
3360    // Always assume duplicates if they aren't passed to the comparison function
3361    support.detectDuplicates = !!hasDuplicate;
3362
3363    // Initialize against the default document
3364    setDocument();
3365
3366    // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
3367    // Detached nodes confoundingly follow *each other*
3368    support.sortDetached = assert(function (el) {
3369      // Should return 1, but returns 4 (following)
3370      return el.compareDocumentPosition(document.createElement("fieldset")) & 1;
3371    });
3372
3373    // Support: IE<8
3374    // Prevent attribute/property "interpolation"
3375    // https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
3376    if (!assert(function (el) {
3377      el.innerHTML = "<a href='#'></a>";
3378      return el.firstChild.getAttribute("href") === "#";
3379    })) {
3380      addHandle("type|href|height|width", function (elem, name, isXML) {
3381        if (!isXML) {
3382          return elem.getAttribute(name, name.toLowerCase() === "type" ? 1 : 2);
3383        }
3384      });
3385    }
3386
3387    // Support: IE<9
3388    // Use defaultValue in place of getAttribute("value")
3389    if (!support.attributes || !assert(function (el) {
3390      el.innerHTML = "<input/>";
3391      el.firstChild.setAttribute("value", "");
3392      return el.firstChild.getAttribute("value") === "";
3393    })) {
3394      addHandle("value", function (elem, _name, isXML) {
3395        if (!isXML && elem.nodeName.toLowerCase() === "input") {
3396          return elem.defaultValue;
3397        }
3398      });
3399    }
3400
3401    // Support: IE<9
3402    // Use getAttributeNode to fetch booleans when getAttribute lies
3403    if (!assert(function (el) {
3404      return el.getAttribute("disabled") == null;
3405    })) {
3406      addHandle(booleans, function (elem, name, isXML) {
3407        var val;
3408        if (!isXML) {
3409          return elem[name] === true ? name.toLowerCase() : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
3410        }
3411      });
3412    }
3413    return Sizzle;
3414  }(window);
3415  jQuery.find = Sizzle;
3416  jQuery.expr = Sizzle.selectors;
3417
3418  // Deprecated
3419  jQuery.expr[":"] = jQuery.expr.pseudos;
3420  jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
3421  jQuery.text = Sizzle.getText;
3422  jQuery.isXMLDoc = Sizzle.isXML;
3423  jQuery.contains = Sizzle.contains;
3424  jQuery.escapeSelector = Sizzle.escape;
3425  var dir = function dir(elem, _dir, until) {
3426    var matched = [],
3427      truncate = until !== undefined;
3428    while ((elem = elem[_dir]) && elem.nodeType !== 9) {
3429      if (elem.nodeType === 1) {
3430        if (truncate && jQuery(elem).is(until)) {
3431          break;
3432        }
3433        matched.push(elem);
3434      }
3435    }
3436    return matched;
3437  };
3438  var _siblings = function siblings(n, elem) {
3439    var matched = [];
3440    for (; n; n = n.nextSibling) {
3441      if (n.nodeType === 1 && n !== elem) {
3442        matched.push(n);
3443      }
3444    }
3445    return matched;
3446  };
3447  var rneedsContext = jQuery.expr.match.needsContext;
3448  function nodeName(elem, name) {
3449    return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
3450  }
3451  ;
3452  var rsingleTag = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;
3453
3454  // Implement the identical functionality for filter and not
3455  function winnow(elements, qualifier, not) {
3456    if (isFunction(qualifier)) {
3457      return jQuery.grep(elements, function (elem, i) {
3458        return !!qualifier.call(elem, i, elem) !== not;
3459      });
3460    }
3461
3462    // Single element
3463    if (qualifier.nodeType) {
3464      return jQuery.grep(elements, function (elem) {
3465        return elem === qualifier !== not;
3466      });
3467    }
3468
3469    // Arraylike of elements (jQuery, arguments, Array)
3470    if (typeof qualifier !== "string") {
3471      return jQuery.grep(elements, function (elem) {
3472        return indexOf.call(qualifier, elem) > -1 !== not;
3473      });
3474    }
3475
3476    // Filtered directly for both simple and complex selectors
3477    return jQuery.filter(qualifier, elements, not);
3478  }
3479  jQuery.filter = function (expr, elems, not) {
3480    var elem = elems[0];
3481    if (not) {
3482      expr = ":not(" + expr + ")";
3483    }
3484    if (elems.length === 1 && elem.nodeType === 1) {
3485      return jQuery.find.matchesSelector(elem, expr) ? [elem] : [];
3486    }
3487    return jQuery.find.matches(expr, jQuery.grep(elems, function (elem) {
3488      return elem.nodeType === 1;
3489    }));
3490  };
3491  jQuery.fn.extend({
3492    find: function find(selector) {
3493      var i,
3494        ret,
3495        len = this.length,
3496        self = this;
3497      if (typeof selector !== "string") {
3498        return this.pushStack(jQuery(selector).filter(function () {
3499          for (i = 0; i < len; i++) {
3500            if (jQuery.contains(self[i], this)) {
3501              return true;
3502            }
3503          }
3504        }));
3505      }
3506      ret = this.pushStack([]);
3507      for (i = 0; i < len; i++) {
3508        jQuery.find(selector, self[i], ret);
3509      }
3510      return len > 1 ? jQuery.uniqueSort(ret) : ret;
3511    },
3512    filter: function filter(selector) {
3513      return this.pushStack(winnow(this, selector || [], false));
3514    },
3515    not: function not(selector) {
3516      return this.pushStack(winnow(this, selector || [], true));
3517    },
3518    is: function is(selector) {
3519      return !!winnow(this,
3520      // If this is a positional/relative selector, check membership in the returned set
3521      // so $("p:first").is("p:last") won't return true for a doc with two "p".
3522      typeof selector === "string" && rneedsContext.test(selector) ? jQuery(selector) : selector || [], false).length;
3523    }
3524  });
3525
3526  // Initialize a jQuery object
3527
3528  // A central reference to the root jQuery(document)
3529  var rootjQuery,
3530    // A simple way to check for HTML strings
3531    // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
3532    // Strict HTML recognition (#11290: must start with <)
3533    // Shortcut simple #id case for speed
3534    rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
3535    init = jQuery.fn.init = function (selector, context, root) {
3536      var match, elem;
3537
3538      // HANDLE: $(""), $(null), $(undefined), $(false)
3539      if (!selector) {
3540        return this;
3541      }
3542
3543      // Method init() accepts an alternate rootjQuery
3544      // so migrate can support jQuery.sub (gh-2101)
3545      root = root || rootjQuery;
3546
3547      // Handle HTML strings
3548      if (typeof selector === "string") {
3549        if (selector[0] === "<" && selector[selector.length - 1] === ">" && selector.length >= 3) {
3550          // Assume that strings that start and end with <> are HTML and skip the regex check
3551          match = [null, selector, null];
3552        } else {
3553          match = rquickExpr.exec(selector);
3554        }
3555
3556        // Match html or make sure no context is specified for #id
3557        if (match && (match[1] || !context)) {
3558          // HANDLE: $(html) -> $(array)
3559          if (match[1]) {
3560            context = context instanceof jQuery ? context[0] : context;
3561
3562            // Option to run scripts is true for back-compat
3563            // Intentionally let the error be thrown if parseHTML is not present
3564            jQuery.merge(this, jQuery.parseHTML(match[1], context && context.nodeType ? context.ownerDocument || context : document, true));
3565
3566            // HANDLE: $(html, props)
3567            if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
3568              for (match in context) {
3569                // Properties of context are called as methods if possible
3570                if (isFunction(this[match])) {
3571                  this[match](context[match]);
3572
3573                  // ...and otherwise set as attributes
3574                } else {
3575                  this.attr(match, context[match]);
3576                }
3577              }
3578            }
3579            return this;
3580
3581            // HANDLE: $(#id)
3582          } else {
3583            elem = document.getElementById(match[2]);
3584            if (elem) {
3585              // Inject the element directly into the jQuery object
3586              this[0] = elem;
3587              this.length = 1;
3588            }
3589            return this;
3590          }
3591
3592          // HANDLE: $(expr, $(...))
3593        } else if (!context || context.jquery) {
3594          return (context || root).find(selector);
3595
3596          // HANDLE: $(expr, context)
3597          // (which is just equivalent to: $(context).find(expr)
3598        } else {
3599          return this.constructor(context).find(selector);
3600        }
3601
3602        // HANDLE: $(DOMElement)
3603      } else if (selector.nodeType) {
3604        this[0] = selector;
3605        this.length = 1;
3606        return this;
3607
3608        // HANDLE: $(function)
3609        // Shortcut for document ready
3610      } else if (isFunction(selector)) {
3611        return root.ready !== undefined ? root.ready(selector) :
3612        // Execute immediately if ready is not present
3613        selector(jQuery);
3614      }
3615      return jQuery.makeArray(selector, this);
3616    };
3617
3618  // Give the init function the jQuery prototype for later instantiation
3619  init.prototype = jQuery.fn;
3620
3621  // Initialize central reference
3622  rootjQuery = jQuery(document);
3623  var rparentsprev = /^(?:parents|prev(?:Until|All))/,
3624    // Methods guaranteed to produce a unique set when starting from a unique set
3625    guaranteedUnique = {
3626      children: true,
3627      contents: true,
3628      next: true,
3629      prev: true
3630    };
3631  jQuery.fn.extend({
3632    has: function has(target) {
3633      var targets = jQuery(target, this),
3634        l = targets.length;
3635      return this.filter(function () {
3636        var i = 0;
3637        for (; i < l; i++) {
3638          if (jQuery.contains(this, targets[i])) {
3639            return true;
3640          }
3641        }
3642      });
3643    },
3644    closest: function closest(selectors, context) {
3645      var cur,
3646        i = 0,
3647        l = this.length,
3648        matched = [],
3649        targets = typeof selectors !== "string" && jQuery(selectors);
3650
3651      // Positional selectors never match, since there's no _selection_ context
3652      if (!rneedsContext.test(selectors)) {
3653        for (; i < l; i++) {
3654          for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) {
3655            // Always skip document fragments
3656            if (cur.nodeType < 11 && (targets ? targets.index(cur) > -1 :
3657            // Don't pass non-elements to Sizzle
3658            cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors))) {
3659              matched.push(cur);
3660              break;
3661            }
3662          }
3663        }
3664      }
3665      return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched);
3666    },
3667    // Determine the position of an element within the set
3668    index: function index(elem) {
3669      // No argument, return index in parent
3670      if (!elem) {
3671        return this[0] && this[0].parentNode ? this.first().prevAll().length : -1;
3672      }
3673
3674      // Index in selector
3675      if (typeof elem === "string") {
3676        return indexOf.call(jQuery(elem), this[0]);
3677      }
3678
3679      // Locate the position of the desired element
3680      return indexOf.call(this,
3681      // If it receives a jQuery object, the first element is used
3682      elem.jquery ? elem[0] : elem);
3683    },
3684    add: function add(selector, context) {
3685      return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(), jQuery(selector, context))));
3686    },
3687    addBack: function addBack(selector) {
3688      return this.add(selector == null ? this.prevObject : this.prevObject.filter(selector));
3689    }
3690  });
3691  function sibling(cur, dir) {
3692    while ((cur = cur[dir]) && cur.nodeType !== 1) {}
3693    return cur;
3694  }
3695  jQuery.each({
3696    parent: function parent(elem) {
3697      var parent = elem.parentNode;
3698      return parent && parent.nodeType !== 11 ? parent : null;
3699    },
3700    parents: function parents(elem) {
3701      return dir(elem, "parentNode");
3702    },
3703    parentsUntil: function parentsUntil(elem, _i, until) {
3704      return dir(elem, "parentNode", until);
3705    },
3706    next: function next(elem) {
3707      return sibling(elem, "nextSibling");
3708    },
3709    prev: function prev(elem) {
3710      return sibling(elem, "previousSibling");
3711    },
3712    nextAll: function nextAll(elem) {
3713      return dir(elem, "nextSibling");
3714    },
3715    prevAll: function prevAll(elem) {
3716      return dir(elem, "previousSibling");
3717    },
3718    nextUntil: function nextUntil(elem, _i, until) {
3719      return dir(elem, "nextSibling", until);
3720    },
3721    prevUntil: function prevUntil(elem, _i, until) {
3722      return dir(elem, "previousSibling", until);
3723    },
3724    siblings: function siblings(elem) {
3725      return _siblings((elem.parentNode || {}).firstChild, elem);
3726    },
3727    children: function children(elem) {
3728      return _siblings(elem.firstChild);
3729    },
3730    contents: function contents(elem) {
3731      if (elem.contentDocument != null &&
3732      // Support: IE 11+
3733      // <object> elements with no `data` attribute has an object
3734      // `contentDocument` with a `null` prototype.
3735      getProto(elem.contentDocument)) {
3736        return elem.contentDocument;
3737      }
3738
3739      // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
3740      // Treat the template element as a regular one in browsers that
3741      // don't support it.
3742      if (nodeName(elem, "template")) {
3743        elem = elem.content || elem;
3744      }
3745      return jQuery.merge([], elem.childNodes);
3746    }
3747  }, function (name, fn) {
3748    jQuery.fn[name] = function (until, selector) {
3749      var matched = jQuery.map(this, fn, until);
3750      if (name.slice(-5) !== "Until") {
3751        selector = until;
3752      }
3753      if (selector && typeof selector === "string") {
3754        matched = jQuery.filter(selector, matched);
3755      }
3756      if (this.length > 1) {
3757        // Remove duplicates
3758        if (!guaranteedUnique[name]) {
3759          jQuery.uniqueSort(matched);
3760        }
3761
3762        // Reverse order for parents* and prev-derivatives
3763        if (rparentsprev.test(name)) {
3764          matched.reverse();
3765        }
3766      }
3767      return this.pushStack(matched);
3768    };
3769  });
3770  var rnothtmlwhite = /[^\x20\t\r\n\f]+/g;
3771
3772  // Convert String-formatted options into Object-formatted ones
3773  function createOptions(options) {
3774    var object = {};
3775    jQuery.each(options.match(rnothtmlwhite) || [], function (_, flag) {
3776      object[flag] = true;
3777    });
3778    return object;
3779  }
3780
3781  /*
3782   * Create a callback list using the following parameters:
3783   *
3784   *	options: an optional list of space-separated options that will change how
3785   *			the callback list behaves or a more traditional option object
3786   *
3787   * By default a callback list will act like an event callback list and can be
3788   * "fired" multiple times.
3789   *
3790   * Possible options:
3791   *
3792   *	once:			will ensure the callback list can only be fired once (like a Deferred)
3793   *
3794   *	memory:			will keep track of previous values and will call any callback added
3795   *					after the list has been fired right away with the latest "memorized"
3796   *					values (like a Deferred)
3797   *
3798   *	unique:			will ensure a callback can only be added once (no duplicate in the list)
3799   *
3800   *	stopOnFalse:	interrupt callings when a callback returns false
3801   *
3802   */
3803  jQuery.Callbacks = function (options) {
3804    // Convert options from String-formatted to Object-formatted if needed
3805    // (we check in cache first)
3806    options = typeof options === "string" ? createOptions(options) : jQuery.extend({}, options);
3807    var
3808      // Flag to know if list is currently firing
3809      firing,
3810      // Last fire value for non-forgettable lists
3811      memory,
3812      // Flag to know if list was already fired
3813      _fired,
3814      // Flag to prevent firing
3815      _locked,
3816      // Actual callback list
3817      list = [],
3818      // Queue of execution data for repeatable lists
3819      queue = [],
3820      // Index of currently firing callback (modified by add/remove as needed)
3821      firingIndex = -1,
3822      // Fire callbacks
3823      fire = function fire() {
3824        // Enforce single-firing
3825        _locked = _locked || options.once;
3826
3827        // Execute callbacks for all pending executions,
3828        // respecting firingIndex overrides and runtime changes
3829        _fired = firing = true;
3830        for (; queue.length; firingIndex = -1) {
3831          memory = queue.shift();
3832          while (++firingIndex < list.length) {
3833            // Run callback and check for early termination
3834            if (list[firingIndex].apply(memory[0], memory[1]) === false && options.stopOnFalse) {
3835              // Jump to end and forget the data so .add doesn't re-fire
3836              firingIndex = list.length;
3837              memory = false;
3838            }
3839          }
3840        }
3841
3842        // Forget the data if we're done with it
3843        if (!options.memory) {
3844          memory = false;
3845        }
3846        firing = false;
3847
3848        // Clean up if we're done firing for good
3849        if (_locked) {
3850          // Keep an empty list if we have data for future add calls
3851          if (memory) {
3852            list = [];
3853
3854            // Otherwise, this object is spent
3855          } else {
3856            list = "";
3857          }
3858        }
3859      },
3860      // Actual Callbacks object
3861      self = {
3862        // Add a callback or a collection of callbacks to the list
3863        add: function add() {
3864          if (list) {
3865            // If we have memory from a past run, we should fire after adding
3866            if (memory && !firing) {
3867              firingIndex = list.length - 1;
3868              queue.push(memory);
3869            }
3870            (function add(args) {
3871              jQuery.each(args, function (_, arg) {
3872                if (isFunction(arg)) {
3873                  if (!options.unique || !self.has(arg)) {
3874                    list.push(arg);
3875                  }
3876                } else if (arg && arg.length && toType(arg) !== "string") {
3877                  // Inspect recursively
3878                  add(arg);
3879                }
3880              });
3881            })(arguments);
3882            if (memory && !firing) {
3883              fire();
3884            }
3885          }
3886          return this;
3887        },
3888        // Remove a callback from the list
3889        remove: function remove() {
3890          jQuery.each(arguments, function (_, arg) {
3891            var index;
3892            while ((index = jQuery.inArray(arg, list, index)) > -1) {
3893              list.splice(index, 1);
3894
3895              // Handle firing indexes
3896              if (index <= firingIndex) {
3897                firingIndex--;
3898              }
3899            }
3900          });
3901          return this;
3902        },
3903        // Check if a given callback is in the list.
3904        // If no argument is given, return whether or not list has callbacks attached.
3905        has: function has(fn) {
3906          return fn ? jQuery.inArray(fn, list) > -1 : list.length > 0;
3907        },
3908        // Remove all callbacks from the list
3909        empty: function empty() {
3910          if (list) {
3911            list = [];
3912          }
3913          return this;
3914        },
3915        // Disable .fire and .add
3916        // Abort any current/pending executions
3917        // Clear all callbacks and values
3918        disable: function disable() {
3919          _locked = queue = [];
3920          list = memory = "";
3921          return this;
3922        },
3923        disabled: function disabled() {
3924          return !list;
3925        },
3926        // Disable .fire
3927        // Also disable .add unless we have memory (since it would have no effect)
3928        // Abort any pending executions
3929        lock: function lock() {
3930          _locked = queue = [];
3931          if (!memory && !firing) {
3932            list = memory = "";
3933          }
3934          return this;
3935        },
3936        locked: function locked() {
3937          return !!_locked;
3938        },
3939        // Call all callbacks with the given context and arguments
3940        fireWith: function fireWith(context, args) {
3941          if (!_locked) {
3942            args = args || [];
3943            args = [context, args.slice ? args.slice() : args];
3944            queue.push(args);
3945            if (!firing) {
3946              fire();
3947            }
3948          }
3949          return this;
3950        },
3951        // Call all the callbacks with the given arguments
3952        fire: function fire() {
3953          self.fireWith(this, arguments);
3954          return this;
3955        },
3956        // To know if the callbacks have already been called at least once
3957        fired: function fired() {
3958          return !!_fired;
3959        }
3960      };
3961    return self;
3962  };
3963  function Identity(v) {
3964    return v;
3965  }
3966  function Thrower(ex) {
3967    throw ex;
3968  }
3969  function adoptValue(value, resolve, reject, noValue) {
3970    var method;
3971    try {
3972      // Check for promise aspect first to privilege synchronous behavior
3973      if (value && isFunction(method = value.promise)) {
3974        method.call(value).done(resolve).fail(reject);
3975
3976        // Other thenables
3977      } else if (value && isFunction(method = value.then)) {
3978        method.call(value, resolve, reject);
3979
3980        // Other non-thenables
3981      } else {
3982        // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
3983        // * false: [ value ].slice( 0 ) => resolve( value )
3984        // * true: [ value ].slice( 1 ) => resolve()
3985        resolve.apply(undefined, [value].slice(noValue));
3986      }
3987
3988      // For Promises/A+, convert exceptions into rejections
3989      // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
3990      // Deferred#then to conditionally suppress rejection.
3991    } catch (value) {
3992      // Support: Android 4.0 only
3993      // Strict mode functions invoked without .call/.apply get global-object context
3994      reject.apply(undefined, [value]);
3995    }
3996  }
3997  jQuery.extend({
3998    Deferred: function Deferred(func) {
3999      var tuples = [
4000        // action, add listener, callbacks,
4001        // ... .then handlers, argument index, [final state]
4002        ["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"]],
4003        _state = "pending",
4004        _promise = {
4005          state: function state() {
4006            return _state;
4007          },
4008          always: function always() {
4009            deferred.done(arguments).fail(arguments);
4010            return this;
4011          },
4012          "catch": function _catch(fn) {
4013            return _promise.then(null, fn);
4014          },
4015          // Keep pipe for back-compat
4016          pipe: function pipe( /* fnDone, fnFail, fnProgress */
4017          ) {
4018            var fns = arguments;
4019            return jQuery.Deferred(function (newDefer) {
4020              jQuery.each(tuples, function (_i, tuple) {
4021                // Map tuples (progress, done, fail) to arguments (done, fail, progress)
4022                var fn = isFunction(fns[tuple[4]]) && fns[tuple[4]];
4023
4024                // deferred.progress(function() { bind to newDefer or newDefer.notify })
4025                // deferred.done(function() { bind to newDefer or newDefer.resolve })
4026                // deferred.fail(function() { bind to newDefer or newDefer.reject })
4027                deferred[tuple[1]](function () {
4028                  var returned = fn && fn.apply(this, arguments);
4029                  if (returned && isFunction(returned.promise)) {
4030                    returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject);
4031                  } else {
4032                    newDefer[tuple[0] + "With"](this, fn ? [returned] : arguments);
4033                  }
4034                });
4035              });
4036              fns = null;
4037            }).promise();
4038          },
4039          then: function then(onFulfilled, onRejected, onProgress) {
4040            var maxDepth = 0;
4041            function resolve(depth, deferred, handler, special) {
4042              return function () {
4043                var that = this,
4044                  args = arguments,
4045                  mightThrow = function mightThrow() {
4046                    var returned, then;
4047
4048                    // Support: Promises/A+ section 2.3.3.3.3
4049                    // https://promisesaplus.com/#point-59
4050                    // Ignore double-resolution attempts
4051                    if (depth < maxDepth) {
4052                      return;
4053                    }
4054                    returned = handler.apply(that, args);
4055
4056                    // Support: Promises/A+ section 2.3.1
4057                    // https://promisesaplus.com/#point-48
4058                    if (returned === deferred.promise()) {
4059                      throw new TypeError("Thenable self-resolution");
4060                    }
4061
4062                    // Support: Promises/A+ sections 2.3.3.1, 3.5
4063                    // https://promisesaplus.com/#point-54
4064                    // https://promisesaplus.com/#point-75
4065                    // Retrieve `then` only once
4066                    then = returned && (
4067                    // Support: Promises/A+ section 2.3.4
4068                    // https://promisesaplus.com/#point-64
4069                    // Only check objects and functions for thenability
4070                    _typeof(returned) === "object" || typeof returned === "function") && returned.then;
4071
4072                    // Handle a returned thenable
4073                    if (isFunction(then)) {
4074                      // Special processors (notify) just wait for resolution
4075                      if (special) {
4076                        then.call(returned, resolve(maxDepth, deferred, Identity, special), resolve(maxDepth, deferred, Thrower, special));
4077
4078                        // Normal processors (resolve) also hook into progress
4079                      } else {
4080                        // ...and disregard older resolution values
4081                        maxDepth++;
4082                        then.call(returned, resolve(maxDepth, deferred, Identity, special), resolve(maxDepth, deferred, Thrower, special), resolve(maxDepth, deferred, Identity, deferred.notifyWith));
4083                      }
4084
4085                      // Handle all other returned values
4086                    } else {
4087                      // Only substitute handlers pass on context
4088                      // and multiple values (non-spec behavior)
4089                      if (handler !== Identity) {
4090                        that = undefined;
4091                        args = [returned];
4092                      }
4093
4094                      // Process the value(s)
4095                      // Default process is resolve
4096                      (special || deferred.resolveWith)(that, args);
4097                    }
4098                  },
4099                  // Only normal processors (resolve) catch and reject exceptions
4100                  process = special ? mightThrow : function () {
4101                    try {
4102                      mightThrow();
4103                    } catch (e) {
4104                      if (jQuery.Deferred.exceptionHook) {
4105                        jQuery.Deferred.exceptionHook(e, process.stackTrace);
4106                      }
4107
4108                      // Support: Promises/A+ section 2.3.3.3.4.1
4109                      // https://promisesaplus.com/#point-61
4110                      // Ignore post-resolution exceptions
4111                      if (depth + 1 >= maxDepth) {
4112                        // Only substitute handlers pass on context
4113                        // and multiple values (non-spec behavior)
4114                        if (handler !== Thrower) {
4115                          that = undefined;
4116                          args = [e];
4117                        }
4118                        deferred.rejectWith(that, args);
4119                      }
4120                    }
4121                  };
4122
4123                // Support: Promises/A+ section 2.3.3.3.1
4124                // https://promisesaplus.com/#point-57
4125                // Re-resolve promises immediately to dodge false rejection from
4126                // subsequent errors
4127                if (depth) {
4128                  process();
4129                } else {
4130                  // Call an optional hook to record the stack, in case of exception
4131                  // since it's otherwise lost when execution goes async
4132                  if (jQuery.Deferred.getStackHook) {
4133                    process.stackTrace = jQuery.Deferred.getStackHook();
4134                  }
4135                  window.setTimeout(process);
4136                }
4137              };
4138            }
4139            return jQuery.Deferred(function (newDefer) {
4140              // progress_handlers.add( ... )
4141              tuples[0][3].add(resolve(0, newDefer, isFunction(onProgress) ? onProgress : Identity, newDefer.notifyWith));
4142
4143              // fulfilled_handlers.add( ... )
4144              tuples[1][3].add(resolve(0, newDefer, isFunction(onFulfilled) ? onFulfilled : Identity));
4145
4146              // rejected_handlers.add( ... )
4147              tuples[2][3].add(resolve(0, newDefer, isFunction(onRejected) ? onRejected : Thrower));
4148            }).promise();
4149          },
4150          // Get a promise for this deferred
4151          // If obj is provided, the promise aspect is added to the object
4152          promise: function promise(obj) {
4153            return obj != null ? jQuery.extend(obj, _promise) : _promise;
4154          }
4155        },
4156        deferred = {};
4157
4158      // Add list-specific methods
4159      jQuery.each(tuples, function (i, tuple) {
4160        var list = tuple[2],
4161          stateString = tuple[5];
4162
4163        // promise.progress = list.add
4164        // promise.done = list.add
4165        // promise.fail = list.add
4166        _promise[tuple[1]] = list.add;
4167
4168        // Handle state
4169        if (stateString) {
4170          list.add(function () {
4171            // state = "resolved" (i.e., fulfilled)
4172            // state = "rejected"
4173            _state = stateString;
4174          },
4175          // rejected_callbacks.disable
4176          // fulfilled_callbacks.disable
4177          tuples[3 - i][2].disable,
4178          // rejected_handlers.disable
4179          // fulfilled_handlers.disable
4180          tuples[3 - i][3].disable,
4181          // progress_callbacks.lock
4182          tuples[0][2].lock,
4183          // progress_handlers.lock
4184          tuples[0][3].lock);
4185        }
4186
4187        // progress_handlers.fire
4188        // fulfilled_handlers.fire
4189        // rejected_handlers.fire
4190        list.add(tuple[3].fire);
4191
4192        // deferred.notify = function() { deferred.notifyWith(...) }
4193        // deferred.resolve = function() { deferred.resolveWith(...) }
4194        // deferred.reject = function() { deferred.rejectWith(...) }
4195        deferred[tuple[0]] = function () {
4196          deferred[tuple[0] + "With"](this === deferred ? undefined : this, arguments);
4197          return this;
4198        };
4199
4200        // deferred.notifyWith = list.fireWith
4201        // deferred.resolveWith = list.fireWith
4202        // deferred.rejectWith = list.fireWith
4203        deferred[tuple[0] + "With"] = list.fireWith;
4204      });
4205
4206      // Make the deferred a promise
4207      _promise.promise(deferred);
4208
4209      // Call given func if any
4210      if (func) {
4211        func.call(deferred, deferred);
4212      }
4213
4214      // All done!
4215      return deferred;
4216    },
4217    // Deferred helper
4218    when: function when(singleValue) {
4219      var
4220        // count of uncompleted subordinates
4221        remaining = arguments.length,
4222        // count of unprocessed arguments
4223        i = remaining,
4224        // subordinate fulfillment data
4225        resolveContexts = Array(i),
4226        resolveValues = _slice.call(arguments),
4227        // the master Deferred
4228        master = jQuery.Deferred(),
4229        // subordinate callback factory
4230        updateFunc = function updateFunc(i) {
4231          return function (value) {
4232            resolveContexts[i] = this;
4233            resolveValues[i] = arguments.length > 1 ? _slice.call(arguments) : value;
4234            if (! --remaining) {
4235              master.resolveWith(resolveContexts, resolveValues);
4236            }
4237          };
4238        };
4239
4240      // Single- and empty arguments are adopted like Promise.resolve
4241      if (remaining <= 1) {
4242        adoptValue(singleValue, master.done(updateFunc(i)).resolve, master.reject, !remaining);
4243
4244        // Use .then() to unwrap secondary thenables (cf. gh-3000)
4245        if (master.state() === "pending" || isFunction(resolveValues[i] && resolveValues[i].then)) {
4246          return master.then();
4247        }
4248      }
4249
4250      // Multiple arguments are aggregated like Promise.all array elements
4251      while (i--) {
4252        adoptValue(resolveValues[i], updateFunc(i), master.reject);
4253      }
4254      return master.promise();
4255    }
4256  });
4257
4258  // These usually indicate a programmer mistake during development,
4259  // warn about them ASAP rather than swallowing them by default.
4260  var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
4261  jQuery.Deferred.exceptionHook = function (error, stack) {
4262    // Support: IE 8 - 9 only
4263    // Console exists when dev tools are open, which can happen at any time
4264    if (window.console && window.console.warn && error && rerrorNames.test(error.name)) {
4265      window.console.warn("jQuery.Deferred exception: " + error.message, error.stack, stack);
4266    }
4267  };
4268  jQuery.readyException = function (error) {
4269    window.setTimeout(function () {
4270      throw error;
4271    });
4272  };
4273
4274  // The deferred used on DOM ready
4275  var readyList = jQuery.Deferred();
4276  jQuery.fn.ready = function (fn) {
4277    readyList.then(fn)
4278
4279    // Wrap jQuery.readyException in a function so that the lookup
4280    // happens at the time of error handling instead of callback
4281    // registration.
4282    .catch(function (error) {
4283      jQuery.readyException(error);
4284    });
4285    return this;
4286  };
4287  jQuery.extend({
4288    // Is the DOM ready to be used? Set to true once it occurs.
4289    isReady: false,
4290    // A counter to track how many items to wait for before
4291    // the ready event fires. See #6781
4292    readyWait: 1,
4293    // Handle when the DOM is ready
4294    ready: function ready(wait) {
4295      // Abort if there are pending holds or we're already ready
4296      if (wait === true ? --jQuery.readyWait : jQuery.isReady) {
4297        return;
4298      }
4299
4300      // Remember that the DOM is ready
4301      jQuery.isReady = true;
4302
4303      // If a normal DOM Ready event fired, decrement, and wait if need be
4304      if (wait !== true && --jQuery.readyWait > 0) {
4305        return;
4306      }
4307
4308      // If there are functions bound, to execute
4309      readyList.resolveWith(document, [jQuery]);
4310    }
4311  });
4312  jQuery.ready.then = readyList.then;
4313
4314  // The ready event handler and self cleanup method
4315  function completed() {
4316    document.removeEventListener("DOMContentLoaded", completed);
4317    window.removeEventListener("load", completed);
4318    jQuery.ready();
4319  }
4320
4321  // Catch cases where $(document).ready() is called
4322  // after the browser event has already occurred.
4323  // Support: IE <=9 - 10 only
4324  // Older IE sometimes signals "interactive" too soon
4325  if (document.readyState === "complete" || document.readyState !== "loading" && !document.documentElement.doScroll) {
4326    // Handle it asynchronously to allow scripts the opportunity to delay ready
4327    window.setTimeout(jQuery.ready);
4328  } else {
4329    // Use the handy event callback
4330    document.addEventListener("DOMContentLoaded", completed);
4331
4332    // A fallback to window.onload, that will always work
4333    window.addEventListener("load", completed);
4334  }
4335
4336  // Multifunctional method to get and set values of a collection
4337  // The value/s can optionally be executed if it's a function
4338  var access = function access(elems, fn, key, value, chainable, emptyGet, raw) {
4339    var i = 0,
4340      len = elems.length,
4341      bulk = key == null;
4342
4343    // Sets many values
4344    if (toType(key) === "object") {
4345      chainable = true;
4346      for (i in key) {
4347        access(elems, fn, i, key[i], true, emptyGet, raw);
4348      }
4349
4350      // Sets one value
4351    } else if (value !== undefined) {
4352      chainable = true;
4353      if (!isFunction(value)) {
4354        raw = true;
4355      }
4356      if (bulk) {
4357        // Bulk operations run against the entire set
4358        if (raw) {
4359          fn.call(elems, value);
4360          fn = null;
4361
4362          // ...except when executing function values
4363        } else {
4364          bulk = fn;
4365          fn = function fn(elem, _key, value) {
4366            return bulk.call(jQuery(elem), value);
4367          };
4368        }
4369      }
4370      if (fn) {
4371        for (; i < len; i++) {
4372          fn(elems[i], key, raw ? value : value.call(elems[i], i, fn(elems[i], key)));
4373        }
4374      }
4375    }
4376    if (chainable) {
4377      return elems;
4378    }
4379
4380    // Gets
4381    if (bulk) {
4382      return fn.call(elems);
4383    }
4384    return len ? fn(elems[0], key) : emptyGet;
4385  };
4386
4387  // Matches dashed string for camelizing
4388  var rmsPrefix = /^-ms-/,
4389    rdashAlpha = /-([a-z])/g;
4390
4391  // Used by camelCase as callback to replace()
4392  function fcamelCase(_all, letter) {
4393    return letter.toUpperCase();
4394  }
4395
4396  // Convert dashed to camelCase; used by the css and data modules
4397  // Support: IE <=9 - 11, Edge 12 - 15
4398  // Microsoft forgot to hump their vendor prefix (#9572)
4399  function camelCase(string) {
4400    return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase);
4401  }
4402  var acceptData = function acceptData(owner) {
4403    // Accepts only:
4404    //  - Node
4405    //    - Node.ELEMENT_NODE
4406    //    - Node.DOCUMENT_NODE
4407    //  - Object
4408    //    - Any
4409    return owner.nodeType === 1 || owner.nodeType === 9 || !+owner.nodeType;
4410  };
4411  function Data() {
4412    this.expando = jQuery.expando + Data.uid++;
4413  }
4414  Data.uid = 1;
4415  Data.prototype = {
4416    cache: function cache(owner) {
4417      // Check if the owner object already has a cache
4418      var value = owner[this.expando];
4419
4420      // If not, create one
4421      if (!value) {
4422        value = {};
4423
4424        // We can accept data for non-element nodes in modern browsers,
4425        // but we should not, see #8335.
4426        // Always return an empty object.
4427        if (acceptData(owner)) {
4428          // If it is a node unlikely to be stringify-ed or looped over
4429          // use plain assignment
4430          if (owner.nodeType) {
4431            owner[this.expando] = value;
4432
4433            // Otherwise secure it in a non-enumerable property
4434            // configurable must be true to allow the property to be
4435            // deleted when data is removed
4436          } else {
4437            Object.defineProperty(owner, this.expando, {
4438              value: value,
4439              configurable: true
4440            });
4441          }
4442        }
4443      }
4444      return value;
4445    },
4446    set: function set(owner, data, value) {
4447      var prop,
4448        cache = this.cache(owner);
4449
4450      // Handle: [ owner, key, value ] args
4451      // Always use camelCase key (gh-2257)
4452      if (typeof data === "string") {
4453        cache[camelCase(data)] = value;
4454
4455        // Handle: [ owner, { properties } ] args
4456      } else {
4457        // Copy the properties one-by-one to the cache object
4458        for (prop in data) {
4459          cache[camelCase(prop)] = data[prop];
4460        }
4461      }
4462      return cache;
4463    },
4464    get: function get(owner, key) {
4465      return key === undefined ? this.cache(owner) :
4466      // Always use camelCase key (gh-2257)
4467      owner[this.expando] && owner[this.expando][camelCase(key)];
4468    },
4469    access: function access(owner, key, value) {
4470      // In cases where either:
4471      //
4472      //   1. No key was specified
4473      //   2. A string key was specified, but no value provided
4474      //
4475      // Take the "read" path and allow the get method to determine
4476      // which value to return, respectively either:
4477      //
4478      //   1. The entire cache object
4479      //   2. The data stored at the key
4480      //
4481      if (key === undefined || key && typeof key === "string" && value === undefined) {
4482        return this.get(owner, key);
4483      }
4484
4485      // When the key is not a string, or both a key and value
4486      // are specified, set or extend (existing objects) with either:
4487      //
4488      //   1. An object of properties
4489      //   2. A key and value
4490      //
4491      this.set(owner, key, value);
4492
4493      // Since the "set" path can have two possible entry points
4494      // return the expected data based on which path was taken[*]
4495      return value !== undefined ? value : key;
4496    },
4497    remove: function remove(owner, key) {
4498      var i,
4499        cache = owner[this.expando];
4500      if (cache === undefined) {
4501        return;
4502      }
4503      if (key !== undefined) {
4504        // Support array or space separated string of keys
4505        if (Array.isArray(key)) {
4506          // If key is an array of keys...
4507          // We always set camelCase keys, so remove that.
4508          key = key.map(camelCase);
4509        } else {
4510          key = camelCase(key);
4511
4512          // If a key with the spaces exists, use it.
4513          // Otherwise, create an array by matching non-whitespace
4514          key = key in cache ? [key] : key.match(rnothtmlwhite) || [];
4515        }
4516        i = key.length;
4517        while (i--) {
4518          delete cache[key[i]];
4519        }
4520      }
4521
4522      // Remove the expando if there's no more data
4523      if (key === undefined || jQuery.isEmptyObject(cache)) {
4524        // Support: Chrome <=35 - 45
4525        // Webkit & Blink performance suffers when deleting properties
4526        // from DOM nodes, so set to undefined instead
4527        // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
4528        if (owner.nodeType) {
4529          owner[this.expando] = undefined;
4530        } else {
4531          delete owner[this.expando];
4532        }
4533      }
4534    },
4535    hasData: function hasData(owner) {
4536      var cache = owner[this.expando];
4537      return cache !== undefined && !jQuery.isEmptyObject(cache);
4538    }
4539  };
4540  var dataPriv = new Data();
4541  var dataUser = new Data();
4542
4543  //	Implementation Summary
4544  //
4545  //	1. Enforce API surface and semantic compatibility with 1.9.x branch
4546  //	2. Improve the module's maintainability by reducing the storage
4547  //		paths to a single mechanism.
4548  //	3. Use the same single mechanism to support "private" and "user" data.
4549  //	4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
4550  //	5. Avoid exposing implementation details on user objects (eg. expando properties)
4551  //	6. Provide a clear path for implementation upgrade to WeakMap in 2014
4552
4553  var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
4554    rmultiDash = /[A-Z]/g;
4555  function getData(data) {
4556    if (data === "true") {
4557      return true;
4558    }
4559    if (data === "false") {
4560      return false;
4561    }
4562    if (data === "null") {
4563      return null;
4564    }
4565
4566    // Only convert to a number if it doesn't change the string
4567    if (data === +data + "") {
4568      return +data;
4569    }
4570    if (rbrace.test(data)) {
4571      return JSON.parse(data);
4572    }
4573    return data;
4574  }
4575  function dataAttr(elem, key, data) {
4576    var name;
4577
4578    // If nothing was found internally, try to fetch any
4579    // data from the HTML5 data-* attribute
4580    if (data === undefined && elem.nodeType === 1) {
4581      name = "data-" + key.replace(rmultiDash, "-$&").toLowerCase();
4582      data = elem.getAttribute(name);
4583      if (typeof data === "string") {
4584        try {
4585          data = getData(data);
4586        } catch (e) {}
4587
4588        // Make sure we set the data so it isn't changed later
4589        dataUser.set(elem, key, data);
4590      } else {
4591        data = undefined;
4592      }
4593    }
4594    return data;
4595  }
4596  jQuery.extend({
4597    hasData: function hasData(elem) {
4598      return dataUser.hasData(elem) || dataPriv.hasData(elem);
4599    },
4600    data: function data(elem, name, _data) {
4601      return dataUser.access(elem, name, _data);
4602    },
4603    removeData: function removeData(elem, name) {
4604      dataUser.remove(elem, name);
4605    },
4606    // TODO: Now that all calls to _data and _removeData have been replaced
4607    // with direct calls to dataPriv methods, these can be deprecated.
4608    _data: function _data(elem, name, data) {
4609      return dataPriv.access(elem, name, data);
4610    },
4611    _removeData: function _removeData(elem, name) {
4612      dataPriv.remove(elem, name);
4613    }
4614  });
4615  jQuery.fn.extend({
4616    data: function data(key, value) {
4617      var i,
4618        name,
4619        data,
4620        elem = this[0],
4621        attrs = elem && elem.attributes;
4622
4623      // Gets all values
4624      if (key === undefined) {
4625        if (this.length) {
4626          data = dataUser.get(elem);
4627          if (elem.nodeType === 1 && !dataPriv.get(elem, "hasDataAttrs")) {
4628            i = attrs.length;
4629            while (i--) {
4630              // Support: IE 11 only
4631              // The attrs elements can be null (#14894)
4632              if (attrs[i]) {
4633                name = attrs[i].name;
4634                if (name.indexOf("data-") === 0) {
4635                  name = camelCase(name.slice(5));
4636                  dataAttr(elem, name, data[name]);
4637                }
4638              }
4639            }
4640            dataPriv.set(elem, "hasDataAttrs", true);
4641          }
4642        }
4643        return data;
4644      }
4645
4646      // Sets multiple values
4647      if (_typeof(key) === "object") {
4648        return this.each(function () {
4649          dataUser.set(this, key);
4650        });
4651      }
4652      return access(this, function (value) {
4653        var data;
4654
4655        // The calling jQuery object (element matches) is not empty
4656        // (and therefore has an element appears at this[ 0 ]) and the
4657        // `value` parameter was not undefined. An empty jQuery object
4658        // will result in `undefined` for elem = this[ 0 ] which will
4659        // throw an exception if an attempt to read a data cache is made.
4660        if (elem && value === undefined) {
4661          // Attempt to get data from the cache
4662          // The key will always be camelCased in Data
4663          data = dataUser.get(elem, key);
4664          if (data !== undefined) {
4665            return data;
4666          }
4667
4668          // Attempt to "discover" the data in
4669          // HTML5 custom data-* attrs
4670          data = dataAttr(elem, key);
4671          if (data !== undefined) {
4672            return data;
4673          }
4674
4675          // We tried really hard, but the data doesn't exist.
4676          return;
4677        }
4678
4679        // Set the data...
4680        this.each(function () {
4681          // We always store the camelCased key
4682          dataUser.set(this, key, value);
4683        });
4684      }, null, value, arguments.length > 1, null, true);
4685    },
4686    removeData: function removeData(key) {
4687      return this.each(function () {
4688        dataUser.remove(this, key);
4689      });
4690    }
4691  });
4692  jQuery.extend({
4693    queue: function queue(elem, type, data) {
4694      var queue;
4695      if (elem) {
4696        type = (type || "fx") + "queue";
4697        queue = dataPriv.get(elem, type);
4698
4699        // Speed up dequeue by getting out quickly if this is just a lookup
4700        if (data) {
4701          if (!queue || Array.isArray(data)) {
4702            queue = dataPriv.access(elem, type, jQuery.makeArray(data));
4703          } else {
4704            queue.push(data);
4705          }
4706        }
4707        return queue || [];
4708      }
4709    },
4710    dequeue: function dequeue(elem, type) {
4711      type = type || "fx";
4712      var queue = jQuery.queue(elem, type),
4713        startLength = queue.length,
4714        fn = queue.shift(),
4715        hooks = jQuery._queueHooks(elem, type),
4716        next = function next() {
4717          jQuery.dequeue(elem, type);
4718        };
4719
4720      // If the fx queue is dequeued, always remove the progress sentinel
4721      if (fn === "inprogress") {
4722        fn = queue.shift();
4723        startLength--;
4724      }
4725      if (fn) {
4726        // Add a progress sentinel to prevent the fx queue from being
4727        // automatically dequeued
4728        if (type === "fx") {
4729          queue.unshift("inprogress");
4730        }
4731
4732        // Clear up the last queue stop function
4733        delete hooks.stop;
4734        fn.call(elem, next, hooks);
4735      }
4736      if (!startLength && hooks) {
4737        hooks.empty.fire();
4738      }
4739    },
4740    // Not public - generate a queueHooks object, or return the current one
4741    _queueHooks: function _queueHooks(elem, type) {
4742      var key = type + "queueHooks";
4743      return dataPriv.get(elem, key) || dataPriv.access(elem, key, {
4744        empty: jQuery.Callbacks("once memory").add(function () {
4745          dataPriv.remove(elem, [type + "queue", key]);
4746        })
4747      });
4748    }
4749  });
4750  jQuery.fn.extend({
4751    queue: function queue(type, data) {
4752      var setter = 2;
4753      if (typeof type !== "string") {
4754        data = type;
4755        type = "fx";
4756        setter--;
4757      }
4758      if (arguments.length < setter) {
4759        return jQuery.queue(this[0], type);
4760      }
4761      return data === undefined ? this : this.each(function () {
4762        var queue = jQuery.queue(this, type, data);
4763
4764        // Ensure a hooks for this queue
4765        jQuery._queueHooks(this, type);
4766        if (type === "fx" && queue[0] !== "inprogress") {
4767          jQuery.dequeue(this, type);
4768        }
4769      });
4770    },
4771    dequeue: function dequeue(type) {
4772      return this.each(function () {
4773        jQuery.dequeue(this, type);
4774      });
4775    },
4776    clearQueue: function clearQueue(type) {
4777      return this.queue(type || "fx", []);
4778    },
4779    // Get a promise resolved when queues of a certain type
4780    // are emptied (fx is the type by default)
4781    promise: function promise(type, obj) {
4782      var tmp,
4783        count = 1,
4784        defer = jQuery.Deferred(),
4785        elements = this,
4786        i = this.length,
4787        resolve = function resolve() {
4788          if (! --count) {
4789            defer.resolveWith(elements, [elements]);
4790          }
4791        };
4792      if (typeof type !== "string") {
4793        obj = type;
4794        type = undefined;
4795      }
4796      type = type || "fx";
4797      while (i--) {
4798        tmp = dataPriv.get(elements[i], type + "queueHooks");
4799        if (tmp && tmp.empty) {
4800          count++;
4801          tmp.empty.add(resolve);
4802        }
4803      }
4804      resolve();
4805      return defer.promise(obj);
4806    }
4807  });
4808  var pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;
4809  var rcssNum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i");
4810  var cssExpand = ["Top", "Right", "Bottom", "Left"];
4811  var documentElement = document.documentElement;
4812  var isAttached = function isAttached(elem) {
4813      return jQuery.contains(elem.ownerDocument, elem);
4814    },
4815    composed = {
4816      composed: true
4817    };
4818
4819  // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only
4820  // Check attachment across shadow DOM boundaries when possible (gh-3504)
4821  // Support: iOS 10.0-10.2 only
4822  // Early iOS 10 versions support `attachShadow` but not `getRootNode`,
4823  // leading to errors. We need to check for `getRootNode`.
4824  if (documentElement.getRootNode) {
4825    isAttached = function isAttached(elem) {
4826      return jQuery.contains(elem.ownerDocument, elem) || elem.getRootNode(composed) === elem.ownerDocument;
4827    };
4828  }
4829  var isHiddenWithinTree = function isHiddenWithinTree(elem, el) {
4830    // isHiddenWithinTree might be called from jQuery#filter function;
4831    // in that case, element will be second argument
4832    elem = el || elem;
4833
4834    // Inline style trumps all
4835    return elem.style.display === "none" || elem.style.display === "" &&
4836    // Otherwise, check computed style
4837    // Support: Firefox <=43 - 45
4838    // Disconnected elements can have computed display: none, so first confirm that elem is
4839    // in the document.
4840    isAttached(elem) && jQuery.css(elem, "display") === "none";
4841  };
4842  function adjustCSS(elem, prop, valueParts, tween) {
4843    var adjusted,
4844      scale,
4845      maxIterations = 20,
4846      currentValue = tween ? function () {
4847        return tween.cur();
4848      } : function () {
4849        return jQuery.css(elem, prop, "");
4850      },
4851      initial = currentValue(),
4852      unit = valueParts && valueParts[3] || (jQuery.cssNumber[prop] ? "" : "px"),
4853      // Starting value computation is required for potential unit mismatches
4854      initialInUnit = elem.nodeType && (jQuery.cssNumber[prop] || unit !== "px" && +initial) && rcssNum.exec(jQuery.css(elem, prop));
4855    if (initialInUnit && initialInUnit[3] !== unit) {
4856      // Support: Firefox <=54
4857      // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
4858      initial = initial / 2;
4859
4860      // Trust units reported by jQuery.css
4861      unit = unit || initialInUnit[3];
4862
4863      // Iteratively approximate from a nonzero starting point
4864      initialInUnit = +initial || 1;
4865      while (maxIterations--) {
4866        // Evaluate and update our best guess (doubling guesses that zero out).
4867        // Finish if the scale equals or crosses 1 (making the old*new product non-positive).
4868        jQuery.style(elem, prop, initialInUnit + unit);
4869        if ((1 - scale) * (1 - (scale = currentValue() / initial || 0.5)) <= 0) {
4870          maxIterations = 0;
4871        }
4872        initialInUnit = initialInUnit / scale;
4873      }
4874      initialInUnit = initialInUnit * 2;
4875      jQuery.style(elem, prop, initialInUnit + unit);
4876
4877      // Make sure we update the tween properties later on
4878      valueParts = valueParts || [];
4879    }
4880    if (valueParts) {
4881      initialInUnit = +initialInUnit || +initial || 0;
4882
4883      // Apply relative offset (+=/-=) if specified
4884      adjusted = valueParts[1] ? initialInUnit + (valueParts[1] + 1) * valueParts[2] : +valueParts[2];
4885      if (tween) {
4886        tween.unit = unit;
4887        tween.start = initialInUnit;
4888        tween.end = adjusted;
4889      }
4890    }
4891    return adjusted;
4892  }
4893  var defaultDisplayMap = {};
4894  function getDefaultDisplay(elem) {
4895    var temp,
4896      doc = elem.ownerDocument,
4897      nodeName = elem.nodeName,
4898      display = defaultDisplayMap[nodeName];
4899    if (display) {
4900      return display;
4901    }
4902    temp = doc.body.appendChild(doc.createElement(nodeName));
4903    display = jQuery.css(temp, "display");
4904    temp.parentNode.removeChild(temp);
4905    if (display === "none") {
4906      display = "block";
4907    }
4908    defaultDisplayMap[nodeName] = display;
4909    return display;
4910  }
4911  function showHide(elements, show) {
4912    var display,
4913      elem,
4914      values = [],
4915      index = 0,
4916      length = elements.length;
4917
4918    // Determine new display value for elements that need to change
4919    for (; index < length; index++) {
4920      elem = elements[index];
4921      if (!elem.style) {
4922        continue;
4923      }
4924      display = elem.style.display;
4925      if (show) {
4926        // Since we force visibility upon cascade-hidden elements, an immediate (and slow)
4927        // check is required in this first loop unless we have a nonempty display value (either
4928        // inline or about-to-be-restored)
4929        if (display === "none") {
4930          values[index] = dataPriv.get(elem, "display") || null;
4931          if (!values[index]) {
4932            elem.style.display = "";
4933          }
4934        }
4935        if (elem.style.display === "" && isHiddenWithinTree(elem)) {
4936          values[index] = getDefaultDisplay(elem);
4937        }
4938      } else {
4939        if (display !== "none") {
4940          values[index] = "none";
4941
4942          // Remember what we're overwriting
4943          dataPriv.set(elem, "display", display);
4944        }
4945      }
4946    }
4947
4948    // Set the display of the elements in a second loop to avoid constant reflow
4949    for (index = 0; index < length; index++) {
4950      if (values[index] != null) {
4951        elements[index].style.display = values[index];
4952      }
4953    }
4954    return elements;
4955  }
4956  jQuery.fn.extend({
4957    show: function show() {
4958      return showHide(this, true);
4959    },
4960    hide: function hide() {
4961      return showHide(this);
4962    },
4963    toggle: function toggle(state) {
4964      if (typeof state === "boolean") {
4965        return state ? this.show() : this.hide();
4966      }
4967      return this.each(function () {
4968        if (isHiddenWithinTree(this)) {
4969          jQuery(this).show();
4970        } else {
4971          jQuery(this).hide();
4972        }
4973      });
4974    }
4975  });
4976  var rcheckableType = /^(?:checkbox|radio)$/i;
4977  var rtagName = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i;
4978  var rscriptType = /^$|^module$|\/(?:java|ecma)script/i;
4979  (function () {
4980    var fragment = document.createDocumentFragment(),
4981      div = fragment.appendChild(document.createElement("div")),
4982      input = document.createElement("input");
4983
4984    // Support: Android 4.0 - 4.3 only
4985    // Check state lost if the name is set (#11217)
4986    // Support: Windows Web Apps (WWA)
4987    // `name` and `type` must use .setAttribute for WWA (#14901)
4988    input.setAttribute("type", "radio");
4989    input.setAttribute("checked", "checked");
4990    input.setAttribute("name", "t");
4991    div.appendChild(input);
4992
4993    // Support: Android <=4.1 only
4994    // Older WebKit doesn't clone checked state correctly in fragments
4995    support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked;
4996
4997    // Support: IE <=11 only
4998    // Make sure textarea (and checkbox) defaultValue is properly cloned
4999    div.innerHTML = "<textarea>x</textarea>";
5000    support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue;
5001
5002    // Support: IE <=9 only
5003    // IE <=9 replaces <option> tags with their contents when inserted outside of
5004    // the select element.
5005    div.innerHTML = "<option></option>";
5006    support.option = !!div.lastChild;
5007  })();
5008
5009  // We have to close these tags to support XHTML (#13200)
5010  var wrapMap = {
5011    // XHTML parsers do not magically insert elements in the
5012    // same way that tag soup parsers do. So we cannot shorten
5013    // this by omitting <tbody> or other required elements.
5014    thead: [1, "<table>", "</table>"],
5015    col: [2, "<table><colgroup>", "</colgroup></table>"],
5016    tr: [2, "<table><tbody>", "</tbody></table>"],
5017    td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
5018    _default: [0, "", ""]
5019  };
5020  wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
5021  wrapMap.th = wrapMap.td;
5022
5023  // Support: IE <=9 only
5024  if (!support.option) {
5025    wrapMap.optgroup = wrapMap.option = [1, "<select multiple='multiple'>", "</select>"];
5026  }
5027  function getAll(context, tag) {
5028    // Support: IE <=9 - 11 only
5029    // Use typeof to avoid zero-argument method invocation on host objects (#15151)
5030    var ret;
5031    if (typeof context.getElementsByTagName !== "undefined") {
5032      ret = context.getElementsByTagName(tag || "*");
5033    } else if (typeof context.querySelectorAll !== "undefined") {
5034      ret = context.querySelectorAll(tag || "*");
5035    } else {
5036      ret = [];
5037    }
5038    if (tag === undefined || tag && nodeName(context, tag)) {
5039      return jQuery.merge([context], ret);
5040    }
5041    return ret;
5042  }
5043
5044  // Mark scripts as having already been evaluated
5045  function setGlobalEval(elems, refElements) {
5046    var i = 0,
5047      l = elems.length;
5048    for (; i < l; i++) {
5049      dataPriv.set(elems[i], "globalEval", !refElements || dataPriv.get(refElements[i], "globalEval"));
5050    }
5051  }
5052  var rhtml = /<|&#?\w+;/;
5053  function buildFragment(elems, context, scripts, selection, ignored) {
5054    var elem,
5055      tmp,
5056      tag,
5057      wrap,
5058      attached,
5059      j,
5060      fragment = context.createDocumentFragment(),
5061      nodes = [],
5062      i = 0,
5063      l = elems.length;
5064    for (; i < l; i++) {
5065      elem = elems[i];
5066      if (elem || elem === 0) {
5067        // Add nodes directly
5068        if (toType(elem) === "object") {
5069          // Support: Android <=4.0 only, PhantomJS 1 only
5070          // push.apply(_, arraylike) throws on ancient WebKit
5071          jQuery.merge(nodes, elem.nodeType ? [elem] : elem);
5072
5073          // Convert non-html into a text node
5074        } else if (!rhtml.test(elem)) {
5075          nodes.push(context.createTextNode(elem));
5076
5077          // Convert html into DOM nodes
5078        } else {
5079          tmp = tmp || fragment.appendChild(context.createElement("div"));
5080
5081          // Deserialize a standard representation
5082          tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase();
5083          wrap = wrapMap[tag] || wrapMap._default;
5084          tmp.innerHTML = wrap[1] + jQuery.htmlPrefilter(elem) + wrap[2];
5085
5086          // Descend through wrappers to the right content
5087          j = wrap[0];
5088          while (j--) {
5089            tmp = tmp.lastChild;
5090          }
5091
5092          // Support: Android <=4.0 only, PhantomJS 1 only
5093          // push.apply(_, arraylike) throws on ancient WebKit
5094          jQuery.merge(nodes, tmp.childNodes);
5095
5096          // Remember the top-level container
5097          tmp = fragment.firstChild;
5098
5099          // Ensure the created nodes are orphaned (#12392)
5100          tmp.textContent = "";
5101        }
5102      }
5103    }
5104
5105    // Remove wrapper from fragment
5106    fragment.textContent = "";
5107    i = 0;
5108    while (elem = nodes[i++]) {
5109      // Skip elements already in the context collection (trac-4087)
5110      if (selection && jQuery.inArray(elem, selection) > -1) {
5111        if (ignored) {
5112          ignored.push(elem);
5113        }
5114        continue;
5115      }
5116      attached = isAttached(elem);
5117
5118      // Append to fragment
5119      tmp = getAll(fragment.appendChild(elem), "script");
5120
5121      // Preserve script evaluation history
5122      if (attached) {
5123        setGlobalEval(tmp);
5124      }
5125
5126      // Capture executables
5127      if (scripts) {
5128        j = 0;
5129        while (elem = tmp[j++]) {
5130          if (rscriptType.test(elem.type || "")) {
5131            scripts.push(elem);
5132          }
5133        }
5134      }
5135    }
5136    return fragment;
5137  }
5138  var rkeyEvent = /^key/,
5139    rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
5140    rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
5141  function returnTrue() {
5142    return true;
5143  }
5144  function returnFalse() {
5145    return false;
5146  }
5147
5148  // Support: IE <=9 - 11+
5149  // focus() and blur() are asynchronous, except when they are no-op.
5150  // So expect focus to be synchronous when the element is already active,
5151  // and blur to be synchronous when the element is not already active.
5152  // (focus and blur are always synchronous in other supported browsers,
5153  // this just defines when we can count on it).
5154  function expectSync(elem, type) {
5155    return elem === safeActiveElement() === (type === "focus");
5156  }
5157
5158  // Support: IE <=9 only
5159  // Accessing document.activeElement can throw unexpectedly
5160  // https://bugs.jquery.com/ticket/13393
5161  function safeActiveElement() {
5162    try {
5163      return document.activeElement;
5164    } catch (err) {}
5165  }
5166  function _on(elem, types, selector, data, fn, one) {
5167    var origFn, type;
5168
5169    // Types can be a map of types/handlers
5170    if (_typeof(types) === "object") {
5171      // ( types-Object, selector, data )
5172      if (typeof selector !== "string") {
5173        // ( types-Object, data )
5174        data = data || selector;
5175        selector = undefined;
5176      }
5177      for (type in types) {
5178        _on(elem, type, selector, data, types[type], one);
5179      }
5180      return elem;
5181    }
5182    if (data == null && fn == null) {
5183      // ( types, fn )
5184      fn = selector;
5185      data = selector = undefined;
5186    } else if (fn == null) {
5187      if (typeof selector === "string") {
5188        // ( types, selector, fn )
5189        fn = data;
5190        data = undefined;
5191      } else {
5192        // ( types, data, fn )
5193        fn = data;
5194        data = selector;
5195        selector = undefined;
5196      }
5197    }
5198    if (fn === false) {
5199      fn = returnFalse;
5200    } else if (!fn) {
5201      return elem;
5202    }
5203    if (one === 1) {
5204      origFn = fn;
5205      fn = function fn(event) {
5206        // Can use an empty set, since event contains the info
5207        jQuery().off(event);
5208        return origFn.apply(this, arguments);
5209      };
5210
5211      // Use same guid so caller can remove using origFn
5212      fn.guid = origFn.guid || (origFn.guid = jQuery.guid++);
5213    }
5214    return elem.each(function () {
5215      jQuery.event.add(this, types, fn, data, selector);
5216    });
5217  }
5218
5219  /*
5220   * Helper functions for managing events -- not part of the public interface.
5221   * Props to Dean Edwards' addEvent library for many of the ideas.
5222   */
5223  jQuery.event = {
5224    global: {},
5225    add: function add(elem, types, handler, data, selector) {
5226      var handleObjIn,
5227        eventHandle,
5228        tmp,
5229        events,
5230        t,
5231        handleObj,
5232        special,
5233        handlers,
5234        type,
5235        namespaces,
5236        origType,
5237        elemData = dataPriv.get(elem);
5238
5239      // Only attach events to objects that accept data
5240      if (!acceptData(elem)) {
5241        return;
5242      }
5243
5244      // Caller can pass in an object of custom data in lieu of the handler
5245      if (handler.handler) {
5246        handleObjIn = handler;
5247        handler = handleObjIn.handler;
5248        selector = handleObjIn.selector;
5249      }
5250
5251      // Ensure that invalid selectors throw exceptions at attach time
5252      // Evaluate against documentElement in case elem is a non-element node (e.g., document)
5253      if (selector) {
5254        jQuery.find.matchesSelector(documentElement, selector);
5255      }
5256
5257      // Make sure that the handler has a unique ID, used to find/remove it later
5258      if (!handler.guid) {
5259        handler.guid = jQuery.guid++;
5260      }
5261
5262      // Init the element's event structure and main handler, if this is the first
5263      if (!(events = elemData.events)) {
5264        events = elemData.events = Object.create(null);
5265      }
5266      if (!(eventHandle = elemData.handle)) {
5267        eventHandle = elemData.handle = function (e) {
5268          // Discard the second event of a jQuery.event.trigger() and
5269          // when an event is called after a page has unloaded
5270          return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply(elem, arguments) : undefined;
5271        };
5272      }
5273
5274      // Handle multiple events separated by a space
5275      types = (types || "").match(rnothtmlwhite) || [""];
5276      t = types.length;
5277      while (t--) {
5278        tmp = rtypenamespace.exec(types[t]) || [];
5279        type = origType = tmp[1];
5280        namespaces = (tmp[2] || "").split(".").sort();
5281
5282        // There *must* be a type, no attaching namespace-only handlers
5283        if (!type) {
5284          continue;
5285        }
5286
5287        // If event changes its type, use the special event handlers for the changed type
5288        special = jQuery.event.special[type] || {};
5289
5290        // If selector defined, determine special event api type, otherwise given type
5291        type = (selector ? special.delegateType : special.bindType) || type;
5292
5293        // Update special based on newly reset type
5294        special = jQuery.event.special[type] || {};
5295
5296        // handleObj is passed to all event handlers
5297        handleObj = jQuery.extend({
5298          type: type,
5299          origType: origType,
5300          data: data,
5301          handler: handler,
5302          guid: handler.guid,
5303          selector: selector,
5304          needsContext: selector && jQuery.expr.match.needsContext.test(selector),
5305          namespace: namespaces.join(".")
5306        }, handleObjIn);
5307
5308        // Init the event handler queue if we're the first
5309        if (!(handlers = events[type])) {
5310          handlers = events[type] = [];
5311          handlers.delegateCount = 0;
5312
5313          // Only use addEventListener if the special events handler returns false
5314          if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) {
5315            if (elem.addEventListener) {
5316              elem.addEventListener(type, eventHandle);
5317            }
5318          }
5319        }
5320        if (special.add) {
5321          special.add.call(elem, handleObj);
5322          if (!handleObj.handler.guid) {
5323            handleObj.handler.guid = handler.guid;
5324          }
5325        }
5326
5327        // Add to the element's handler list, delegates in front
5328        if (selector) {
5329          handlers.splice(handlers.delegateCount++, 0, handleObj);
5330        } else {
5331          handlers.push(handleObj);
5332        }
5333
5334        // Keep track of which events have ever been used, for event optimization
5335        jQuery.event.global[type] = true;
5336      }
5337    },
5338    // Detach an event or set of events from an element
5339    remove: function remove(elem, types, handler, selector, mappedTypes) {
5340      var j,
5341        origCount,
5342        tmp,
5343        events,
5344        t,
5345        handleObj,
5346        special,
5347        handlers,
5348        type,
5349        namespaces,
5350        origType,
5351        elemData = dataPriv.hasData(elem) && dataPriv.get(elem);
5352      if (!elemData || !(events = elemData.events)) {
5353        return;
5354      }
5355
5356      // Once for each type.namespace in types; type may be omitted
5357      types = (types || "").match(rnothtmlwhite) || [""];
5358      t = types.length;
5359      while (t--) {
5360        tmp = rtypenamespace.exec(types[t]) || [];
5361        type = origType = tmp[1];
5362        namespaces = (tmp[2] || "").split(".").sort();
5363
5364        // Unbind all events (on this namespace, if provided) for the element
5365        if (!type) {
5366          for (type in events) {
5367            jQuery.event.remove(elem, type + types[t], handler, selector, true);
5368          }
5369          continue;
5370        }
5371        special = jQuery.event.special[type] || {};
5372        type = (selector ? special.delegateType : special.bindType) || type;
5373        handlers = events[type] || [];
5374        tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)");
5375
5376        // Remove matching events
5377        origCount = j = handlers.length;
5378        while (j--) {
5379          handleObj = handlers[j];
5380          if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)) {
5381            handlers.splice(j, 1);
5382            if (handleObj.selector) {
5383              handlers.delegateCount--;
5384            }
5385            if (special.remove) {
5386              special.remove.call(elem, handleObj);
5387            }
5388          }
5389        }
5390
5391        // Remove generic event handler if we removed something and no more handlers exist
5392        // (avoids potential for endless recursion during removal of special event handlers)
5393        if (origCount && !handlers.length) {
5394          if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) {
5395            jQuery.removeEvent(elem, type, elemData.handle);
5396          }
5397          delete events[type];
5398        }
5399      }
5400
5401      // Remove data and the expando if it's no longer used
5402      if (jQuery.isEmptyObject(events)) {
5403        dataPriv.remove(elem, "handle events");
5404      }
5405    },
5406    dispatch: function dispatch(nativeEvent) {
5407      var i,
5408        j,
5409        ret,
5410        matched,
5411        handleObj,
5412        handlerQueue,
5413        args = new Array(arguments.length),
5414        // Make a writable jQuery.Event from the native event object
5415        event = jQuery.event.fix(nativeEvent),
5416        handlers = (dataPriv.get(this, "events") || Object.create(null))[event.type] || [],
5417        special = jQuery.event.special[event.type] || {};
5418
5419      // Use the fix-ed jQuery.Event rather than the (read-only) native event
5420      args[0] = event;
5421      for (i = 1; i < arguments.length; i++) {
5422        args[i] = arguments[i];
5423      }
5424      event.delegateTarget = this;
5425
5426      // Call the preDispatch hook for the mapped type, and let it bail if desired
5427      if (special.preDispatch && special.preDispatch.call(this, event) === false) {
5428        return;
5429      }
5430
5431      // Determine handlers
5432      handlerQueue = jQuery.event.handlers.call(this, event, handlers);
5433
5434      // Run delegates first; they may want to stop propagation beneath us
5435      i = 0;
5436      while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) {
5437        event.currentTarget = matched.elem;
5438        j = 0;
5439        while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) {
5440          // If the event is namespaced, then each handler is only invoked if it is
5441          // specially universal or its namespaces are a superset of the event's.
5442          if (!event.rnamespace || handleObj.namespace === false || event.rnamespace.test(handleObj.namespace)) {
5443            event.handleObj = handleObj;
5444            event.data = handleObj.data;
5445            ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args);
5446            if (ret !== undefined) {
5447              if ((event.result = ret) === false) {
5448                event.preventDefault();
5449                event.stopPropagation();
5450              }
5451            }
5452          }
5453        }
5454      }
5455
5456      // Call the postDispatch hook for the mapped type
5457      if (special.postDispatch) {
5458        special.postDispatch.call(this, event);
5459      }
5460      return event.result;
5461    },
5462    handlers: function handlers(event, _handlers) {
5463      var i,
5464        handleObj,
5465        sel,
5466        matchedHandlers,
5467        matchedSelectors,
5468        handlerQueue = [],
5469        delegateCount = _handlers.delegateCount,
5470        cur = event.target;
5471
5472      // Find delegate handlers
5473      if (delegateCount &&
5474      // Support: IE <=9
5475      // Black-hole SVG <use> instance trees (trac-13180)
5476      cur.nodeType &&
5477      // Support: Firefox <=42
5478      // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
5479      // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
5480      // Support: IE 11 only
5481      // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
5482      !(event.type === "click" && event.button >= 1)) {
5483        for (; cur !== this; cur = cur.parentNode || this) {
5484          // Don't check non-elements (#13208)
5485          // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
5486          if (cur.nodeType === 1 && !(event.type === "click" && cur.disabled === true)) {
5487            matchedHandlers = [];
5488            matchedSelectors = {};
5489            for (i = 0; i < delegateCount; i++) {
5490              handleObj = _handlers[i];
5491
5492              // Don't conflict with Object.prototype properties (#13203)
5493              sel = handleObj.selector + " ";
5494              if (matchedSelectors[sel] === undefined) {
5495                matchedSelectors[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) > -1 : jQuery.find(sel, this, null, [cur]).length;
5496              }
5497              if (matchedSelectors[sel]) {
5498                matchedHandlers.push(handleObj);
5499              }
5500            }
5501            if (matchedHandlers.length) {
5502              handlerQueue.push({
5503                elem: cur,
5504                handlers: matchedHandlers
5505              });
5506            }
5507          }
5508        }
5509      }
5510
5511      // Add the remaining (directly-bound) handlers
5512      cur = this;
5513      if (delegateCount < _handlers.length) {
5514        handlerQueue.push({
5515          elem: cur,
5516          handlers: _handlers.slice(delegateCount)
5517        });
5518      }
5519      return handlerQueue;
5520    },
5521    addProp: function addProp(name, hook) {
5522      Object.defineProperty(jQuery.Event.prototype, name, {
5523        enumerable: true,
5524        configurable: true,
5525        get: isFunction(hook) ? function () {
5526          if (this.originalEvent) {
5527            return hook(this.originalEvent);
5528          }
5529        } : function () {
5530          if (this.originalEvent) {
5531            return this.originalEvent[name];
5532          }
5533        },
5534        set: function set(value) {
5535          Object.defineProperty(this, name, {
5536            enumerable: true,
5537            configurable: true,
5538            writable: true,
5539            value: value
5540          });
5541        }
5542      });
5543    },
5544    fix: function fix(originalEvent) {
5545      return originalEvent[jQuery.expando] ? originalEvent : new jQuery.Event(originalEvent);
5546    },
5547    special: {
5548      load: {
5549        // Prevent triggered image.load events from bubbling to window.load
5550        noBubble: true
5551      },
5552      click: {
5553        // Utilize native event to ensure correct state for checkable inputs
5554        setup: function setup(data) {
5555          // For mutual compressibility with _default, replace `this` access with a local var.
5556          // `|| data` is dead code meant only to preserve the variable through minification.
5557          var el = this || data;
5558
5559          // Claim the first handler
5560          if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) {
5561            // dataPriv.set( el, "click", ... )
5562            leverageNative(el, "click", returnTrue);
5563          }
5564
5565          // Return false to allow normal processing in the caller
5566          return false;
5567        },
5568        trigger: function trigger(data) {
5569          // For mutual compressibility with _default, replace `this` access with a local var.
5570          // `|| data` is dead code meant only to preserve the variable through minification.
5571          var el = this || data;
5572
5573          // Force setup before triggering a click
5574          if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) {
5575            leverageNative(el, "click");
5576          }
5577
5578          // Return non-false to allow normal event-path propagation
5579          return true;
5580        },
5581        // For cross-browser consistency, suppress native .click() on links
5582        // Also prevent it if we're currently inside a leveraged native-event stack
5583        _default: function _default(event) {
5584          var target = event.target;
5585          return rcheckableType.test(target.type) && target.click && nodeName(target, "input") && dataPriv.get(target, "click") || nodeName(target, "a");
5586        }
5587      },
5588      beforeunload: {
5589        postDispatch: function postDispatch(event) {
5590          // Support: Firefox 20+
5591          // Firefox doesn't alert if the returnValue field is not set.
5592          if (event.result !== undefined && event.originalEvent) {
5593            event.originalEvent.returnValue = event.result;
5594          }
5595        }
5596      }
5597    }
5598  };
5599
5600  // Ensure the presence of an event listener that handles manually-triggered
5601  // synthetic events by interrupting progress until reinvoked in response to
5602  // *native* events that it fires directly, ensuring that state changes have
5603  // already occurred before other listeners are invoked.
5604  function leverageNative(el, type, expectSync) {
5605    // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add
5606    if (!expectSync) {
5607      if (dataPriv.get(el, type) === undefined) {
5608        jQuery.event.add(el, type, returnTrue);
5609      }
5610      return;
5611    }
5612
5613    // Register the controller as a special universal handler for all event namespaces
5614    dataPriv.set(el, type, false);
5615    jQuery.event.add(el, type, {
5616      namespace: false,
5617      handler: function handler(event) {
5618        var notAsync,
5619          result,
5620          saved = dataPriv.get(this, type);
5621        if (event.isTrigger & 1 && this[type]) {
5622          // Interrupt processing of the outer synthetic .trigger()ed event
5623          // Saved data should be false in such cases, but might be a leftover capture object
5624          // from an async native handler (gh-4350)
5625          if (!saved.length) {
5626            // Store arguments for use when handling the inner native event
5627            // There will always be at least one argument (an event object), so this array
5628            // will not be confused with a leftover capture object.
5629            saved = _slice.call(arguments);
5630            dataPriv.set(this, type, saved);
5631
5632            // Trigger the native event and capture its result
5633            // Support: IE <=9 - 11+
5634            // focus() and blur() are asynchronous
5635            notAsync = expectSync(this, type);
5636            this[type]();
5637            result = dataPriv.get(this, type);
5638            if (saved !== result || notAsync) {
5639              dataPriv.set(this, type, false);
5640            } else {
5641              result = {};
5642            }
5643            if (saved !== result) {
5644              // Cancel the outer synthetic event
5645              event.stopImmediatePropagation();
5646              event.preventDefault();
5647              return result.value;
5648            }
5649
5650            // If this is an inner synthetic event for an event with a bubbling surrogate
5651            // (focus or blur), assume that the surrogate already propagated from triggering the
5652            // native event and prevent that from happening again here.
5653            // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the
5654            // bubbling surrogate propagates *after* the non-bubbling base), but that seems
5655            // less bad than duplication.
5656          } else if ((jQuery.event.special[type] || {}).delegateType) {
5657            event.stopPropagation();
5658          }
5659
5660          // If this is a native event triggered above, everything is now in order
5661          // Fire an inner synthetic event with the original arguments
5662        } else if (saved.length) {
5663          // ...and capture the result
5664          dataPriv.set(this, type, {
5665            value: jQuery.event.trigger(
5666            // Support: IE <=9 - 11+
5667            // Extend with the prototype to reset the above stopImmediatePropagation()
5668            jQuery.extend(saved[0], jQuery.Event.prototype), saved.slice(1), this)
5669          });
5670
5671          // Abort handling of the native event
5672          event.stopImmediatePropagation();
5673        }
5674      }
5675    });
5676  }
5677  jQuery.removeEvent = function (elem, type, handle) {
5678    // This "if" is needed for plain objects
5679    if (elem.removeEventListener) {
5680      elem.removeEventListener(type, handle);
5681    }
5682  };
5683  jQuery.Event = function (src, props) {
5684    // Allow instantiation without the 'new' keyword
5685    if (!(this instanceof jQuery.Event)) {
5686      return new jQuery.Event(src, props);
5687    }
5688
5689    // Event object
5690    if (src && src.type) {
5691      this.originalEvent = src;
5692      this.type = src.type;
5693
5694      // Events bubbling up the document may have been marked as prevented
5695      // by a handler lower down the tree; reflect the correct value.
5696      this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined &&
5697      // Support: Android <=2.3 only
5698      src.returnValue === false ? returnTrue : returnFalse;
5699
5700      // Create target properties
5701      // Support: Safari <=6 - 7 only
5702      // Target should not be a text node (#504, #13143)
5703      this.target = src.target && src.target.nodeType === 3 ? src.target.parentNode : src.target;
5704      this.currentTarget = src.currentTarget;
5705      this.relatedTarget = src.relatedTarget;
5706
5707      // Event type
5708    } else {
5709      this.type = src;
5710    }
5711
5712    // Put explicitly provided properties onto the event object
5713    if (props) {
5714      jQuery.extend(this, props);
5715    }
5716
5717    // Create a timestamp if incoming event doesn't have one
5718    this.timeStamp = src && src.timeStamp || Date.now();
5719
5720    // Mark it as fixed
5721    this[jQuery.expando] = true;
5722  };
5723
5724  // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
5725  // https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
5726  jQuery.Event.prototype = {
5727    constructor: jQuery.Event,
5728    isDefaultPrevented: returnFalse,
5729    isPropagationStopped: returnFalse,
5730    isImmediatePropagationStopped: returnFalse,
5731    isSimulated: false,
5732    preventDefault: function preventDefault() {
5733      var e = this.originalEvent;
5734      this.isDefaultPrevented = returnTrue;
5735      if (e && !this.isSimulated) {
5736        e.preventDefault();
5737      }
5738    },
5739    stopPropagation: function stopPropagation() {
5740      var e = this.originalEvent;
5741      this.isPropagationStopped = returnTrue;
5742      if (e && !this.isSimulated) {
5743        e.stopPropagation();
5744      }
5745    },
5746    stopImmediatePropagation: function stopImmediatePropagation() {
5747      var e = this.originalEvent;
5748      this.isImmediatePropagationStopped = returnTrue;
5749      if (e && !this.isSimulated) {
5750        e.stopImmediatePropagation();
5751      }
5752      this.stopPropagation();
5753    }
5754  };
5755
5756  // Includes all common event props including KeyEvent and MouseEvent specific props
5757  jQuery.each({
5758    altKey: true,
5759    bubbles: true,
5760    cancelable: true,
5761    changedTouches: true,
5762    ctrlKey: true,
5763    detail: true,
5764    eventPhase: true,
5765    metaKey: true,
5766    pageX: true,
5767    pageY: true,
5768    shiftKey: true,
5769    view: true,
5770    "char": true,
5771    code: true,
5772    charCode: true,
5773    key: true,
5774    keyCode: true,
5775    button: true,
5776    buttons: true,
5777    clientX: true,
5778    clientY: true,
5779    offsetX: true,
5780    offsetY: true,
5781    pointerId: true,
5782    pointerType: true,
5783    screenX: true,
5784    screenY: true,
5785    targetTouches: true,
5786    toElement: true,
5787    touches: true,
5788    which: function which(event) {
5789      var button = event.button;
5790
5791      // Add which for key events
5792      if (event.which == null && rkeyEvent.test(event.type)) {
5793        return event.charCode != null ? event.charCode : event.keyCode;
5794      }
5795
5796      // Add which for click: 1 === left; 2 === middle; 3 === right
5797      if (!event.which && button !== undefined && rmouseEvent.test(event.type)) {
5798        if (button & 1) {
5799          return 1;
5800        }
5801        if (button & 2) {
5802          return 3;
5803        }
5804        if (button & 4) {
5805          return 2;
5806        }
5807        return 0;
5808      }
5809      return event.which;
5810    }
5811  }, jQuery.event.addProp);
5812  jQuery.each({
5813    focus: "focusin",
5814    blur: "focusout"
5815  }, function (type, delegateType) {
5816    jQuery.event.special[type] = {
5817      // Utilize native event if possible so blur/focus sequence is correct
5818      setup: function setup() {
5819        // Claim the first handler
5820        // dataPriv.set( this, "focus", ... )
5821        // dataPriv.set( this, "blur", ... )
5822        leverageNative(this, type, expectSync);
5823
5824        // Return false to allow normal processing in the caller
5825        return false;
5826      },
5827      trigger: function trigger() {
5828        // Force setup before trigger
5829        leverageNative(this, type);
5830
5831        // Return non-false to allow normal event-path propagation
5832        return true;
5833      },
5834      delegateType: delegateType
5835    };
5836  });
5837
5838  // Create mouseenter/leave events using mouseover/out and event-time checks
5839  // so that event delegation works in jQuery.
5840  // Do the same for pointerenter/pointerleave and pointerover/pointerout
5841  //
5842  // Support: Safari 7 only
5843  // Safari sends mouseenter too often; see:
5844  // https://bugs.chromium.org/p/chromium/issues/detail?id=470258
5845  // for the description of the bug (it existed in older Chrome versions as well).
5846  jQuery.each({
5847    mouseenter: "mouseover",
5848    mouseleave: "mouseout",
5849    pointerenter: "pointerover",
5850    pointerleave: "pointerout"
5851  }, function (orig, fix) {
5852    jQuery.event.special[orig] = {
5853      delegateType: fix,
5854      bindType: fix,
5855      handle: function handle(event) {
5856        var ret,
5857          target = this,
5858          related = event.relatedTarget,
5859          handleObj = event.handleObj;
5860
5861        // For mouseenter/leave call the handler if related is outside the target.
5862        // NB: No relatedTarget if the mouse left/entered the browser window
5863        if (!related || related !== target && !jQuery.contains(target, related)) {
5864          event.type = handleObj.origType;
5865          ret = handleObj.handler.apply(this, arguments);
5866          event.type = fix;
5867        }
5868        return ret;
5869      }
5870    };
5871  });
5872  jQuery.fn.extend({
5873    on: function on(types, selector, data, fn) {
5874      return _on(this, types, selector, data, fn);
5875    },
5876    one: function one(types, selector, data, fn) {
5877      return _on(this, types, selector, data, fn, 1);
5878    },
5879    off: function off(types, selector, fn) {
5880      var handleObj, type;
5881      if (types && types.preventDefault && types.handleObj) {
5882        // ( event )  dispatched jQuery.Event
5883        handleObj = types.handleObj;
5884        jQuery(types.delegateTarget).off(handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler);
5885        return this;
5886      }
5887      if (_typeof(types) === "object") {
5888        // ( types-object [, selector] )
5889        for (type in types) {
5890          this.off(type, selector, types[type]);
5891        }
5892        return this;
5893      }
5894      if (selector === false || typeof selector === "function") {
5895        // ( types [, fn] )
5896        fn = selector;
5897        selector = undefined;
5898      }
5899      if (fn === false) {
5900        fn = returnFalse;
5901      }
5902      return this.each(function () {
5903        jQuery.event.remove(this, types, fn, selector);
5904      });
5905    }
5906  });
5907  var
5908    // Support: IE <=10 - 11, Edge 12 - 13 only
5909    // In IE/Edge using regex groups here causes severe slowdowns.
5910    // See https://connect.microsoft.com/IE/feedback/details/1736512/
5911    rnoInnerhtml = /<script|<style|<link/i,
5912    // checked="checked" or checked
5913    rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
5914    rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
5915
5916  // Prefer a tbody over its parent table for containing new rows
5917  function manipulationTarget(elem, content) {
5918    if (nodeName(elem, "table") && nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr")) {
5919      return jQuery(elem).children("tbody")[0] || elem;
5920    }
5921    return elem;
5922  }
5923
5924  // Replace/restore the type attribute of script elements for safe DOM manipulation
5925  function disableScript(elem) {
5926    elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
5927    return elem;
5928  }
5929  function restoreScript(elem) {
5930    if ((elem.type || "").slice(0, 5) === "true/") {
5931      elem.type = elem.type.slice(5);
5932    } else {
5933      elem.removeAttribute("type");
5934    }
5935    return elem;
5936  }
5937  function cloneCopyEvent(src, dest) {
5938    var i, l, type, pdataOld, udataOld, udataCur, events;
5939    if (dest.nodeType !== 1) {
5940      return;
5941    }
5942
5943    // 1. Copy private data: events, handlers, etc.
5944    if (dataPriv.hasData(src)) {
5945      pdataOld = dataPriv.get(src);
5946      events = pdataOld.events;
5947      if (events) {
5948        dataPriv.remove(dest, "handle events");
5949        for (type in events) {
5950          for (i = 0, l = events[type].length; i < l; i++) {
5951            jQuery.event.add(dest, type, events[type][i]);
5952          }
5953        }
5954      }
5955    }
5956
5957    // 2. Copy user data
5958    if (dataUser.hasData(src)) {
5959      udataOld = dataUser.access(src);
5960      udataCur = jQuery.extend({}, udataOld);
5961      dataUser.set(dest, udataCur);
5962    }
5963  }
5964
5965  // Fix IE bugs, see support tests
5966  function fixInput(src, dest) {
5967    var nodeName = dest.nodeName.toLowerCase();
5968
5969    // Fails to persist the checked state of a cloned checkbox or radio button.
5970    if (nodeName === "input" && rcheckableType.test(src.type)) {
5971      dest.checked = src.checked;
5972
5973      // Fails to return the selected option to the default selected state when cloning options
5974    } else if (nodeName === "input" || nodeName === "textarea") {
5975      dest.defaultValue = src.defaultValue;
5976    }
5977  }
5978  function domManip(collection, args, callback, ignored) {
5979    // Flatten any nested arrays
5980    args = flat(args);
5981    var fragment,
5982      first,
5983      scripts,
5984      hasScripts,
5985      node,
5986      doc,
5987      i = 0,
5988      l = collection.length,
5989      iNoClone = l - 1,
5990      value = args[0],
5991      valueIsFunction = isFunction(value);
5992
5993    // We can't cloneNode fragments that contain checked, in WebKit
5994    if (valueIsFunction || l > 1 && typeof value === "string" && !support.checkClone && rchecked.test(value)) {
5995      return collection.each(function (index) {
5996        var self = collection.eq(index);
5997        if (valueIsFunction) {
5998          args[0] = value.call(this, index, self.html());
5999        }
6000        domManip(self, args, callback, ignored);
6001      });
6002    }
6003    if (l) {
6004      fragment = buildFragment(args, collection[0].ownerDocument, false, collection, ignored);
6005      first = fragment.firstChild;
6006      if (fragment.childNodes.length === 1) {
6007        fragment = first;
6008      }
6009
6010      // Require either new content or an interest in ignored elements to invoke the callback
6011      if (first || ignored) {
6012        scripts = jQuery.map(getAll(fragment, "script"), disableScript);
6013        hasScripts = scripts.length;
6014
6015        // Use the original fragment for the last item
6016        // instead of the first because it can end up
6017        // being emptied incorrectly in certain situations (#8070).
6018        for (; i < l; i++) {
6019          node = fragment;
6020          if (i !== iNoClone) {
6021            node = jQuery.clone(node, true, true);
6022
6023            // Keep references to cloned scripts for later restoration
6024            if (hasScripts) {
6025              // Support: Android <=4.0 only, PhantomJS 1 only
6026              // push.apply(_, arraylike) throws on ancient WebKit
6027              jQuery.merge(scripts, getAll(node, "script"));
6028            }
6029          }
6030          callback.call(collection[i], node, i);
6031        }
6032        if (hasScripts) {
6033          doc = scripts[scripts.length - 1].ownerDocument;
6034
6035          // Reenable scripts
6036          jQuery.map(scripts, restoreScript);
6037
6038          // Evaluate executable scripts on first document insertion
6039          for (i = 0; i < hasScripts; i++) {
6040            node = scripts[i];
6041            if (rscriptType.test(node.type || "") && !dataPriv.access(node, "globalEval") && jQuery.contains(doc, node)) {
6042              if (node.src && (node.type || "").toLowerCase() !== "module") {
6043                // Optional AJAX dependency, but won't run scripts if not present
6044                if (jQuery._evalUrl && !node.noModule) {
6045                  jQuery._evalUrl(node.src, {
6046                    nonce: node.nonce || node.getAttribute("nonce")
6047                  }, doc);
6048                }
6049              } else {
6050                DOMEval(node.textContent.replace(rcleanScript, ""), node, doc);
6051              }
6052            }
6053          }
6054        }
6055      }
6056    }
6057    return collection;
6058  }
6059  function _remove(elem, selector, keepData) {
6060    var node,
6061      nodes = selector ? jQuery.filter(selector, elem) : elem,
6062      i = 0;
6063    for (; (node = nodes[i]) != null; i++) {
6064      if (!keepData && node.nodeType === 1) {
6065        jQuery.cleanData(getAll(node));
6066      }
6067      if (node.parentNode) {
6068        if (keepData && isAttached(node)) {
6069          setGlobalEval(getAll(node, "script"));
6070        }
6071        node.parentNode.removeChild(node);
6072      }
6073    }
6074    return elem;
6075  }
6076  jQuery.extend({
6077    htmlPrefilter: function htmlPrefilter(html) {
6078      return html;
6079    },
6080    clone: function clone(elem, dataAndEvents, deepDataAndEvents) {
6081      var i,
6082        l,
6083        srcElements,
6084        destElements,
6085        clone = elem.cloneNode(true),
6086        inPage = isAttached(elem);
6087
6088      // Fix IE cloning issues
6089      if (!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) {
6090        // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2
6091        destElements = getAll(clone);
6092        srcElements = getAll(elem);
6093        for (i = 0, l = srcElements.length; i < l; i++) {
6094          fixInput(srcElements[i], destElements[i]);
6095        }
6096      }
6097
6098      // Copy the events from the original to the clone
6099      if (dataAndEvents) {
6100        if (deepDataAndEvents) {
6101          srcElements = srcElements || getAll(elem);
6102          destElements = destElements || getAll(clone);
6103          for (i = 0, l = srcElements.length; i < l; i++) {
6104            cloneCopyEvent(srcElements[i], destElements[i]);
6105          }
6106        } else {
6107          cloneCopyEvent(elem, clone);
6108        }
6109      }
6110
6111      // Preserve script evaluation history
6112      destElements = getAll(clone, "script");
6113      if (destElements.length > 0) {
6114        setGlobalEval(destElements, !inPage && getAll(elem, "script"));
6115      }
6116
6117      // Return the cloned set
6118      return clone;
6119    },
6120    cleanData: function cleanData(elems) {
6121      var data,
6122        elem,
6123        type,
6124        special = jQuery.event.special,
6125        i = 0;
6126      for (; (elem = elems[i]) !== undefined; i++) {
6127        if (acceptData(elem)) {
6128          if (data = elem[dataPriv.expando]) {
6129            if (data.events) {
6130              for (type in data.events) {
6131                if (special[type]) {
6132                  jQuery.event.remove(elem, type);
6133
6134                  // This is a shortcut to avoid jQuery.event.remove's overhead
6135                } else {
6136                  jQuery.removeEvent(elem, type, data.handle);
6137                }
6138              }
6139            }
6140
6141            // Support: Chrome <=35 - 45+
6142            // Assign undefined instead of using delete, see Data#remove
6143            elem[dataPriv.expando] = undefined;
6144          }
6145          if (elem[dataUser.expando]) {
6146            // Support: Chrome <=35 - 45+
6147            // Assign undefined instead of using delete, see Data#remove
6148            elem[dataUser.expando] = undefined;
6149          }
6150        }
6151      }
6152    }
6153  });
6154  jQuery.fn.extend({
6155    detach: function detach(selector) {
6156      return _remove(this, selector, true);
6157    },
6158    remove: function remove(selector) {
6159      return _remove(this, selector);
6160    },
6161    text: function text(value) {
6162      return access(this, function (value) {
6163        return value === undefined ? jQuery.text(this) : this.empty().each(function () {
6164          if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
6165            this.textContent = value;
6166          }
6167        });
6168      }, null, value, arguments.length);
6169    },
6170    append: function append() {
6171      return domManip(this, arguments, function (elem) {
6172        if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
6173          var target = manipulationTarget(this, elem);
6174          target.appendChild(elem);
6175        }
6176      });
6177    },
6178    prepend: function prepend() {
6179      return domManip(this, arguments, function (elem) {
6180        if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
6181          var target = manipulationTarget(this, elem);
6182          target.insertBefore(elem, target.firstChild);
6183        }
6184      });
6185    },
6186    before: function before() {
6187      return domManip(this, arguments, function (elem) {
6188        if (this.parentNode) {
6189          this.parentNode.insertBefore(elem, this);
6190        }
6191      });
6192    },
6193    after: function after() {
6194      return domManip(this, arguments, function (elem) {
6195        if (this.parentNode) {
6196          this.parentNode.insertBefore(elem, this.nextSibling);
6197        }
6198      });
6199    },
6200    empty: function empty() {
6201      var elem,
6202        i = 0;
6203      for (; (elem = this[i]) != null; i++) {
6204        if (elem.nodeType === 1) {
6205          // Prevent memory leaks
6206          jQuery.cleanData(getAll(elem, false));
6207
6208          // Remove any remaining nodes
6209          elem.textContent = "";
6210        }
6211      }
6212      return this;
6213    },
6214    clone: function clone(dataAndEvents, deepDataAndEvents) {
6215      dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
6216      deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
6217      return this.map(function () {
6218        return jQuery.clone(this, dataAndEvents, deepDataAndEvents);
6219      });
6220    },
6221    html: function html(value) {
6222      return access(this, function (value) {
6223        var elem = this[0] || {},
6224          i = 0,
6225          l = this.length;
6226        if (value === undefined && elem.nodeType === 1) {
6227          return elem.innerHTML;
6228        }
6229
6230        // See if we can take a shortcut and just use innerHTML
6231        if (typeof value === "string" && !rnoInnerhtml.test(value) && !wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) {
6232          value = jQuery.htmlPrefilter(value);
6233          try {
6234            for (; i < l; i++) {
6235              elem = this[i] || {};
6236
6237              // Remove element nodes and prevent memory leaks
6238              if (elem.nodeType === 1) {
6239                jQuery.cleanData(getAll(elem, false));
6240                elem.innerHTML = value;
6241              }
6242            }
6243            elem = 0;
6244
6245            // If using innerHTML throws an exception, use the fallback method
6246          } catch (e) {}
6247        }
6248        if (elem) {
6249          this.empty().append(value);
6250        }
6251      }, null, value, arguments.length);
6252    },
6253    replaceWith: function replaceWith() {
6254      var ignored = [];
6255
6256      // Make the changes, replacing each non-ignored context element with the new content
6257      return domManip(this, arguments, function (elem) {
6258        var parent = this.parentNode;
6259        if (jQuery.inArray(this, ignored) < 0) {
6260          jQuery.cleanData(getAll(this));
6261          if (parent) {
6262            parent.replaceChild(elem, this);
6263          }
6264        }
6265
6266        // Force callback invocation
6267      }, ignored);
6268    }
6269  });
6270  jQuery.each({
6271    appendTo: "append",
6272    prependTo: "prepend",
6273    insertBefore: "before",
6274    insertAfter: "after",
6275    replaceAll: "replaceWith"
6276  }, function (name, original) {
6277    jQuery.fn[name] = function (selector) {
6278      var elems,
6279        ret = [],
6280        insert = jQuery(selector),
6281        last = insert.length - 1,
6282        i = 0;
6283      for (; i <= last; i++) {
6284        elems = i === last ? this : this.clone(true);
6285        jQuery(insert[i])[original](elems);
6286
6287        // Support: Android <=4.0 only, PhantomJS 1 only
6288        // .get() because push.apply(_, arraylike) throws on ancient WebKit
6289        push.apply(ret, elems.get());
6290      }
6291      return this.pushStack(ret);
6292    };
6293  });
6294  var rnumnonpx = new RegExp("^(" + pnum + ")(?!px)[a-z%]+$", "i");
6295  var getStyles = function getStyles(elem) {
6296    // Support: IE <=11 only, Firefox <=30 (#15098, #14150)
6297    // IE throws on elements created in popups
6298    // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
6299    var view = elem.ownerDocument.defaultView;
6300    if (!view || !view.opener) {
6301      view = window;
6302    }
6303    return view.getComputedStyle(elem);
6304  };
6305  var swap = function swap(elem, options, callback) {
6306    var ret,
6307      name,
6308      old = {};
6309
6310    // Remember the old values, and insert the new ones
6311    for (name in options) {
6312      old[name] = elem.style[name];
6313      elem.style[name] = options[name];
6314    }
6315    ret = callback.call(elem);
6316
6317    // Revert the old values
6318    for (name in options) {
6319      elem.style[name] = old[name];
6320    }
6321    return ret;
6322  };
6323  var rboxStyle = new RegExp(cssExpand.join("|"), "i");
6324  (function () {
6325    // Executing both pixelPosition & boxSizingReliable tests require only one layout
6326    // so they're executed at the same time to save the second computation.
6327    function computeStyleTests() {
6328      // This is a singleton, we need to execute it only once
6329      if (!div) {
6330        return;
6331      }
6332      container.style.cssText = "position:absolute;left:-11111px;width:60px;" + "margin-top:1px;padding:0;border:0";
6333      div.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + "margin:auto;border:1px;padding:1px;" + "width:60%;top:1%";
6334      documentElement.appendChild(container).appendChild(div);
6335      var divStyle = window.getComputedStyle(div);
6336      pixelPositionVal = divStyle.top !== "1%";
6337
6338      // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
6339      reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12;
6340
6341      // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
6342      // Some styles come back with percentage values, even though they shouldn't
6343      div.style.right = "60%";
6344      pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36;
6345
6346      // Support: IE 9 - 11 only
6347      // Detect misreporting of content dimensions for box-sizing:border-box elements
6348      boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36;
6349
6350      // Support: IE 9 only
6351      // Detect overflow:scroll screwiness (gh-3699)
6352      // Support: Chrome <=64
6353      // Don't get tricked when zoom affects offsetWidth (gh-4029)
6354      div.style.position = "absolute";
6355      scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;
6356      documentElement.removeChild(container);
6357
6358      // Nullify the div so it wouldn't be stored in the memory and
6359      // it will also be a sign that checks already performed
6360      div = null;
6361    }
6362    function roundPixelMeasures(measure) {
6363      return Math.round(parseFloat(measure));
6364    }
6365    var pixelPositionVal,
6366      boxSizingReliableVal,
6367      scrollboxSizeVal,
6368      pixelBoxStylesVal,
6369      reliableTrDimensionsVal,
6370      reliableMarginLeftVal,
6371      container = document.createElement("div"),
6372      div = document.createElement("div");
6373
6374    // Finish early in limited (non-browser) environments
6375    if (!div.style) {
6376      return;
6377    }
6378
6379    // Support: IE <=9 - 11 only
6380    // Style of cloned element affects source element cloned (#8908)
6381    div.style.backgroundClip = "content-box";
6382    div.cloneNode(true).style.backgroundClip = "";
6383    support.clearCloneStyle = div.style.backgroundClip === "content-box";
6384    jQuery.extend(support, {
6385      boxSizingReliable: function boxSizingReliable() {
6386        computeStyleTests();
6387        return boxSizingReliableVal;
6388      },
6389      pixelBoxStyles: function pixelBoxStyles() {
6390        computeStyleTests();
6391        return pixelBoxStylesVal;
6392      },
6393      pixelPosition: function pixelPosition() {
6394        computeStyleTests();
6395        return pixelPositionVal;
6396      },
6397      reliableMarginLeft: function reliableMarginLeft() {
6398        computeStyleTests();
6399        return reliableMarginLeftVal;
6400      },
6401      scrollboxSize: function scrollboxSize() {
6402        computeStyleTests();
6403        return scrollboxSizeVal;
6404      },
6405      // Support: IE 9 - 11+, Edge 15 - 18+
6406      // IE/Edge misreport `getComputedStyle` of table rows with width/height
6407      // set in CSS while `offset*` properties report correct values.
6408      // Behavior in IE 9 is more subtle than in newer versions & it passes
6409      // some versions of this test; make sure not to make it pass there!
6410      reliableTrDimensions: function reliableTrDimensions() {
6411        var table, tr, trChild, trStyle;
6412        if (reliableTrDimensionsVal == null) {
6413          table = document.createElement("table");
6414          tr = document.createElement("tr");
6415          trChild = document.createElement("div");
6416          table.style.cssText = "position:absolute;left:-11111px";
6417          tr.style.height = "1px";
6418          trChild.style.height = "9px";
6419          documentElement.appendChild(table).appendChild(tr).appendChild(trChild);
6420          trStyle = window.getComputedStyle(tr);
6421          reliableTrDimensionsVal = parseInt(trStyle.height) > 3;
6422          documentElement.removeChild(table);
6423        }
6424        return reliableTrDimensionsVal;
6425      }
6426    });
6427  })();
6428  function curCSS(elem, name, computed) {
6429    var width,
6430      minWidth,
6431      maxWidth,
6432      ret,
6433      // Support: Firefox 51+
6434      // Retrieving style before computed somehow
6435      // fixes an issue with getting wrong values
6436      // on detached elements
6437      style = elem.style;
6438    computed = computed || getStyles(elem);
6439
6440    // getPropertyValue is needed for:
6441    //   .css('filter') (IE 9 only, #12537)
6442    //   .css('--customProperty) (#3144)
6443    if (computed) {
6444      ret = computed.getPropertyValue(name) || computed[name];
6445      if (ret === "" && !isAttached(elem)) {
6446        ret = jQuery.style(elem, name);
6447      }
6448
6449      // A tribute to the "awesome hack by Dean Edwards"
6450      // Android Browser returns percentage for some values,
6451      // but width seems to be reliably pixels.
6452      // This is against the CSSOM draft spec:
6453      // https://drafts.csswg.org/cssom/#resolved-values
6454      if (!support.pixelBoxStyles() && rnumnonpx.test(ret) && rboxStyle.test(name)) {
6455        // Remember the original values
6456        width = style.width;
6457        minWidth = style.minWidth;
6458        maxWidth = style.maxWidth;
6459
6460        // Put in the new values to get a computed value out
6461        style.minWidth = style.maxWidth = style.width = ret;
6462        ret = computed.width;
6463
6464        // Revert the changed values
6465        style.width = width;
6466        style.minWidth = minWidth;
6467        style.maxWidth = maxWidth;
6468      }
6469    }
6470    return ret !== undefined ?
6471    // Support: IE <=9 - 11 only
6472    // IE returns zIndex value as an integer.
6473    ret + "" : ret;
6474  }
6475  function addGetHookIf(conditionFn, hookFn) {
6476    // Define the hook, we'll check on the first run if it's really needed.
6477    return {
6478      get: function get() {
6479        if (conditionFn()) {
6480          // Hook not needed (or it's not possible to use it due
6481          // to missing dependency), remove it.
6482          delete this.get;
6483          return;
6484        }
6485
6486        // Hook needed; redefine it so that the support test is not executed again.
6487        return (this.get = hookFn).apply(this, arguments);
6488      }
6489    };
6490  }
6491  var cssPrefixes = ["Webkit", "Moz", "ms"],
6492    emptyStyle = document.createElement("div").style,
6493    vendorProps = {};
6494
6495  // Return a vendor-prefixed property or undefined
6496  function vendorPropName(name) {
6497    // Check for vendor prefixed names
6498    var capName = name[0].toUpperCase() + name.slice(1),
6499      i = cssPrefixes.length;
6500    while (i--) {
6501      name = cssPrefixes[i] + capName;
6502      if (name in emptyStyle) {
6503        return name;
6504      }
6505    }
6506  }
6507
6508  // Return a potentially-mapped jQuery.cssProps or vendor prefixed property
6509  function finalPropName(name) {
6510    var final = jQuery.cssProps[name] || vendorProps[name];
6511    if (final) {
6512      return final;
6513    }
6514    if (name in emptyStyle) {
6515      return name;
6516    }
6517    return vendorProps[name] = vendorPropName(name) || name;
6518  }
6519  var
6520    // Swappable if display is none or starts with table
6521    // except "table", "table-cell", or "table-caption"
6522    // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
6523    rdisplayswap = /^(none|table(?!-c[ea]).+)/,
6524    rcustomProp = /^--/,
6525    cssShow = {
6526      position: "absolute",
6527      visibility: "hidden",
6528      display: "block"
6529    },
6530    cssNormalTransform = {
6531      letterSpacing: "0",
6532      fontWeight: "400"
6533    };
6534  function setPositiveNumber(_elem, value, subtract) {
6535    // Any relative (+/-) values have already been
6536    // normalized at this point
6537    var matches = rcssNum.exec(value);
6538    return matches ?
6539    // Guard against undefined "subtract", e.g., when used as in cssHooks
6540    Math.max(0, matches[2] - (subtract || 0)) + (matches[3] || "px") : value;
6541  }
6542  function boxModelAdjustment(elem, dimension, box, isBorderBox, styles, computedVal) {
6543    var i = dimension === "width" ? 1 : 0,
6544      extra = 0,
6545      delta = 0;
6546
6547    // Adjustment may not be necessary
6548    if (box === (isBorderBox ? "border" : "content")) {
6549      return 0;
6550    }
6551    for (; i < 4; i += 2) {
6552      // Both box models exclude margin
6553      if (box === "margin") {
6554        delta += jQuery.css(elem, box + cssExpand[i], true, styles);
6555      }
6556
6557      // If we get here with a content-box, we're seeking "padding" or "border" or "margin"
6558      if (!isBorderBox) {
6559        // Add padding
6560        delta += jQuery.css(elem, "padding" + cssExpand[i], true, styles);
6561
6562        // For "border" or "margin", add border
6563        if (box !== "padding") {
6564          delta += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
6565
6566          // But still keep track of it otherwise
6567        } else {
6568          extra += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
6569        }
6570
6571        // If we get here with a border-box (content + padding + border), we're seeking "content" or
6572        // "padding" or "margin"
6573      } else {
6574        // For "content", subtract padding
6575        if (box === "content") {
6576          delta -= jQuery.css(elem, "padding" + cssExpand[i], true, styles);
6577        }
6578
6579        // For "content" or "padding", subtract border
6580        if (box !== "margin") {
6581          delta -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
6582        }
6583      }
6584    }
6585
6586    // Account for positive content-box scroll gutter when requested by providing computedVal
6587    if (!isBorderBox && computedVal >= 0) {
6588      // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
6589      // Assuming integer scroll gutter, subtract the rest and round down
6590      delta += Math.max(0, Math.ceil(elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - computedVal - delta - extra - 0.5
6591
6592      // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
6593      // Use an explicit zero to avoid NaN (gh-3964)
6594      )) || 0;
6595    }
6596    return delta;
6597  }
6598  function getWidthOrHeight(elem, dimension, extra) {
6599    // Start with computed style
6600    var styles = getStyles(elem),
6601      // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
6602      // Fake content-box until we know it's needed to know the true value.
6603      boxSizingNeeded = !support.boxSizingReliable() || extra,
6604      isBorderBox = boxSizingNeeded && jQuery.css(elem, "boxSizing", false, styles) === "border-box",
6605      valueIsBorderBox = isBorderBox,
6606      val = curCSS(elem, dimension, styles),
6607      offsetProp = "offset" + dimension[0].toUpperCase() + dimension.slice(1);
6608
6609    // Support: Firefox <=54
6610    // Return a confounding non-pixel value or feign ignorance, as appropriate.
6611    if (rnumnonpx.test(val)) {
6612      if (!extra) {
6613        return val;
6614      }
6615      val = "auto";
6616    }
6617
6618    // Support: IE 9 - 11 only
6619    // Use offsetWidth/offsetHeight for when box sizing is unreliable.
6620    // In those cases, the computed value can be trusted to be border-box.
6621    if ((!support.boxSizingReliable() && isBorderBox ||
6622    // Support: IE 10 - 11+, Edge 15 - 18+
6623    // IE/Edge misreport `getComputedStyle` of table rows with width/height
6624    // set in CSS while `offset*` properties report correct values.
6625    // Interestingly, in some cases IE 9 doesn't suffer from this issue.
6626    !support.reliableTrDimensions() && nodeName(elem, "tr") ||
6627    // Fall back to offsetWidth/offsetHeight when value is "auto"
6628    // This happens for inline elements with no explicit setting (gh-3571)
6629    val === "auto" ||
6630    // Support: Android <=4.1 - 4.3 only
6631    // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
6632    !parseFloat(val) && jQuery.css(elem, "display", false, styles) === "inline") &&
6633    // Make sure the element is visible & connected
6634    elem.getClientRects().length) {
6635      isBorderBox = jQuery.css(elem, "boxSizing", false, styles) === "border-box";
6636
6637      // Where available, offsetWidth/offsetHeight approximate border box dimensions.
6638      // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the
6639      // retrieved value as a content box dimension.
6640      valueIsBorderBox = offsetProp in elem;
6641      if (valueIsBorderBox) {
6642        val = elem[offsetProp];
6643      }
6644    }
6645
6646    // Normalize "" and auto
6647    val = parseFloat(val) || 0;
6648
6649    // Adjust for the element's box model
6650    return val + boxModelAdjustment(elem, dimension, extra || (isBorderBox ? "border" : "content"), valueIsBorderBox, styles,
6651    // Provide the current computed size to request scroll gutter calculation (gh-3589)
6652    val) + "px";
6653  }
6654  jQuery.extend({
6655    // Add in style property hooks for overriding the default
6656    // behavior of getting and setting a style property
6657    cssHooks: {
6658      opacity: {
6659        get: function get(elem, computed) {
6660          if (computed) {
6661            // We should always get a number back from opacity
6662            var ret = curCSS(elem, "opacity");
6663            return ret === "" ? "1" : ret;
6664          }
6665        }
6666      }
6667    },
6668    // Don't automatically add "px" to these possibly-unitless properties
6669    cssNumber: {
6670      "animationIterationCount": true,
6671      "columnCount": true,
6672      "fillOpacity": true,
6673      "flexGrow": true,
6674      "flexShrink": true,
6675      "fontWeight": true,
6676      "gridArea": true,
6677      "gridColumn": true,
6678      "gridColumnEnd": true,
6679      "gridColumnStart": true,
6680      "gridRow": true,
6681      "gridRowEnd": true,
6682      "gridRowStart": true,
6683      "lineHeight": true,
6684      "opacity": true,
6685      "order": true,
6686      "orphans": true,
6687      "widows": true,
6688      "zIndex": true,
6689      "zoom": true
6690    },
6691    // Add in properties whose names you wish to fix before
6692    // setting or getting the value
6693    cssProps: {},
6694    // Get and set the style property on a DOM Node
6695    style: function style(elem, name, value, extra) {
6696      // Don't set styles on text and comment nodes
6697      if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) {
6698        return;
6699      }
6700
6701      // Make sure that we're working with the right name
6702      var ret,
6703        type,
6704        hooks,
6705        origName = camelCase(name),
6706        isCustomProp = rcustomProp.test(name),
6707        style = elem.style;
6708
6709      // Make sure that we're working with the right name. We don't
6710      // want to query the value if it is a CSS custom property
6711      // since they are user-defined.
6712      if (!isCustomProp) {
6713        name = finalPropName(origName);
6714      }
6715
6716      // Gets hook for the prefixed version, then unprefixed version
6717      hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
6718
6719      // Check if we're setting a value
6720      if (value !== undefined) {
6721        type = _typeof(value);
6722
6723        // Convert "+=" or "-=" to relative numbers (#7345)
6724        if (type === "string" && (ret = rcssNum.exec(value)) && ret[1]) {
6725          value = adjustCSS(elem, name, ret);
6726
6727          // Fixes bug #9237
6728          type = "number";
6729        }
6730
6731        // Make sure that null and NaN values aren't set (#7116)
6732        if (value == null || value !== value) {
6733          return;
6734        }
6735
6736        // If a number was passed in, add the unit (except for certain CSS properties)
6737        // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append
6738        // "px" to a few hardcoded values.
6739        if (type === "number" && !isCustomProp) {
6740          value += ret && ret[3] || (jQuery.cssNumber[origName] ? "" : "px");
6741        }
6742
6743        // background-* props affect original clone's values
6744        if (!support.clearCloneStyle && value === "" && name.indexOf("background") === 0) {
6745          style[name] = "inherit";
6746        }
6747
6748        // If a hook was provided, use that value, otherwise just set the specified value
6749        if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !== undefined) {
6750          if (isCustomProp) {
6751            style.setProperty(name, value);
6752          } else {
6753            style[name] = value;
6754          }
6755        }
6756      } else {
6757        // If a hook was provided get the non-computed value from there
6758        if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== undefined) {
6759          return ret;
6760        }
6761
6762        // Otherwise just get the value from the style object
6763        return style[name];
6764      }
6765    },
6766    css: function css(elem, name, extra, styles) {
6767      var val,
6768        num,
6769        hooks,
6770        origName = camelCase(name),
6771        isCustomProp = rcustomProp.test(name);
6772
6773      // Make sure that we're working with the right name. We don't
6774      // want to modify the value if it is a CSS custom property
6775      // since they are user-defined.
6776      if (!isCustomProp) {
6777        name = finalPropName(origName);
6778      }
6779
6780      // Try prefixed name followed by the unprefixed name
6781      hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
6782
6783      // If a hook was provided get the computed value from there
6784      if (hooks && "get" in hooks) {
6785        val = hooks.get(elem, true, extra);
6786      }
6787
6788      // Otherwise, if a way to get the computed value exists, use that
6789      if (val === undefined) {
6790        val = curCSS(elem, name, styles);
6791      }
6792
6793      // Convert "normal" to computed value
6794      if (val === "normal" && name in cssNormalTransform) {
6795        val = cssNormalTransform[name];
6796      }
6797
6798      // Make numeric if forced or a qualifier was provided and val looks numeric
6799      if (extra === "" || extra) {
6800        num = parseFloat(val);
6801        return extra === true || isFinite(num) ? num || 0 : val;
6802      }
6803      return val;
6804    }
6805  });
6806  jQuery.each(["height", "width"], function (_i, dimension) {
6807    jQuery.cssHooks[dimension] = {
6808      get: function get(elem, computed, extra) {
6809        if (computed) {
6810          // Certain elements can have dimension info if we invisibly show them
6811          // but it must have a current display style that would benefit
6812          return rdisplayswap.test(jQuery.css(elem, "display")) && (
6813          // Support: Safari 8+
6814          // Table columns in Safari have non-zero offsetWidth & zero
6815          // getBoundingClientRect().width unless display is changed.
6816          // Support: IE <=11 only
6817          // Running getBoundingClientRect on a disconnected node
6818          // in IE throws an error.
6819          !elem.getClientRects().length || !elem.getBoundingClientRect().width) ? swap(elem, cssShow, function () {
6820            return getWidthOrHeight(elem, dimension, extra);
6821          }) : getWidthOrHeight(elem, dimension, extra);
6822        }
6823      },
6824      set: function set(elem, value, extra) {
6825        var matches,
6826          styles = getStyles(elem),
6827          // Only read styles.position if the test has a chance to fail
6828          // to avoid forcing a reflow.
6829          scrollboxSizeBuggy = !support.scrollboxSize() && styles.position === "absolute",
6830          // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)
6831          boxSizingNeeded = scrollboxSizeBuggy || extra,
6832          isBorderBox = boxSizingNeeded && jQuery.css(elem, "boxSizing", false, styles) === "border-box",
6833          subtract = extra ? boxModelAdjustment(elem, dimension, extra, isBorderBox, styles) : 0;
6834
6835        // Account for unreliable border-box dimensions by comparing offset* to computed and
6836        // faking a content-box to get border and padding (gh-3699)
6837        if (isBorderBox && scrollboxSizeBuggy) {
6838          subtract -= Math.ceil(elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - parseFloat(styles[dimension]) - boxModelAdjustment(elem, dimension, "border", false, styles) - 0.5);
6839        }
6840
6841        // Convert to pixels if value adjustment is needed
6842        if (subtract && (matches = rcssNum.exec(value)) && (matches[3] || "px") !== "px") {
6843          elem.style[dimension] = value;
6844          value = jQuery.css(elem, dimension);
6845        }
6846        return setPositiveNumber(elem, value, subtract);
6847      }
6848    };
6849  });
6850  jQuery.cssHooks.marginLeft = addGetHookIf(support.reliableMarginLeft, function (elem, computed) {
6851    if (computed) {
6852      return (parseFloat(curCSS(elem, "marginLeft")) || elem.getBoundingClientRect().left - swap(elem, {
6853        marginLeft: 0
6854      }, function () {
6855        return elem.getBoundingClientRect().left;
6856      })) + "px";
6857    }
6858  });
6859
6860  // These hooks are used by animate to expand properties
6861  jQuery.each({
6862    margin: "",
6863    padding: "",
6864    border: "Width"
6865  }, function (prefix, suffix) {
6866    jQuery.cssHooks[prefix + suffix] = {
6867      expand: function expand(value) {
6868        var i = 0,
6869          expanded = {},
6870          // Assumes a single number if not a string
6871          parts = typeof value === "string" ? value.split(" ") : [value];
6872        for (; i < 4; i++) {
6873          expanded[prefix + cssExpand[i] + suffix] = parts[i] || parts[i - 2] || parts[0];
6874        }
6875        return expanded;
6876      }
6877    };
6878    if (prefix !== "margin") {
6879      jQuery.cssHooks[prefix + suffix].set = setPositiveNumber;
6880    }
6881  });
6882  jQuery.fn.extend({
6883    css: function css(name, value) {
6884      return access(this, function (elem, name, value) {
6885        var styles,
6886          len,
6887          map = {},
6888          i = 0;
6889        if (Array.isArray(name)) {
6890          styles = getStyles(elem);
6891          len = name.length;
6892          for (; i < len; i++) {
6893            map[name[i]] = jQuery.css(elem, name[i], false, styles);
6894          }
6895          return map;
6896        }
6897        return value !== undefined ? jQuery.style(elem, name, value) : jQuery.css(elem, name);
6898      }, name, value, arguments.length > 1);
6899    }
6900  });
6901  function Tween(elem, options, prop, end, easing) {
6902    return new Tween.prototype.init(elem, options, prop, end, easing);
6903  }
6904  jQuery.Tween = Tween;
6905  Tween.prototype = {
6906    constructor: Tween,
6907    init: function init(elem, options, prop, end, easing, unit) {
6908      this.elem = elem;
6909      this.prop = prop;
6910      this.easing = easing || jQuery.easing._default;
6911      this.options = options;
6912      this.start = this.now = this.cur();
6913      this.end = end;
6914      this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px");
6915    },
6916    cur: function cur() {
6917      var hooks = Tween.propHooks[this.prop];
6918      return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this);
6919    },
6920    run: function run(percent) {
6921      var eased,
6922        hooks = Tween.propHooks[this.prop];
6923      if (this.options.duration) {
6924        this.pos = eased = jQuery.easing[this.easing](percent, this.options.duration * percent, 0, 1, this.options.duration);
6925      } else {
6926        this.pos = eased = percent;
6927      }
6928      this.now = (this.end - this.start) * eased + this.start;
6929      if (this.options.step) {
6930        this.options.step.call(this.elem, this.now, this);
6931      }
6932      if (hooks && hooks.set) {
6933        hooks.set(this);
6934      } else {
6935        Tween.propHooks._default.set(this);
6936      }
6937      return this;
6938    }
6939  };
6940  Tween.prototype.init.prototype = Tween.prototype;
6941  Tween.propHooks = {
6942    _default: {
6943      get: function get(tween) {
6944        var result;
6945
6946        // Use a property on the element directly when it is not a DOM element,
6947        // or when there is no matching style property that exists.
6948        if (tween.elem.nodeType !== 1 || tween.elem[tween.prop] != null && tween.elem.style[tween.prop] == null) {
6949          return tween.elem[tween.prop];
6950        }
6951
6952        // Passing an empty string as a 3rd parameter to .css will automatically
6953        // attempt a parseFloat and fallback to a string if the parse fails.
6954        // Simple values such as "10px" are parsed to Float;
6955        // complex values such as "rotate(1rad)" are returned as-is.
6956        result = jQuery.css(tween.elem, tween.prop, "");
6957
6958        // Empty strings, null, undefined and "auto" are converted to 0.
6959        return !result || result === "auto" ? 0 : result;
6960      },
6961      set: function set(tween) {
6962        // Use step hook for back compat.
6963        // Use cssHook if its there.
6964        // Use .style if available and use plain properties where available.
6965        if (jQuery.fx.step[tween.prop]) {
6966          jQuery.fx.step[tween.prop](tween);
6967        } else if (tween.elem.nodeType === 1 && (jQuery.cssHooks[tween.prop] || tween.elem.style[finalPropName(tween.prop)] != null)) {
6968          jQuery.style(tween.elem, tween.prop, tween.now + tween.unit);
6969        } else {
6970          tween.elem[tween.prop] = tween.now;
6971        }
6972      }
6973    }
6974  };
6975
6976  // Support: IE <=9 only
6977  // Panic based approach to setting things on disconnected nodes
6978  Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
6979    set: function set(tween) {
6980      if (tween.elem.nodeType && tween.elem.parentNode) {
6981        tween.elem[tween.prop] = tween.now;
6982      }
6983    }
6984  };
6985  jQuery.easing = {
6986    linear: function linear(p) {
6987      return p;
6988    },
6989    swing: function swing(p) {
6990      return 0.5 - Math.cos(p * Math.PI) / 2;
6991    },
6992    _default: "swing"
6993  };
6994  jQuery.fx = Tween.prototype.init;
6995
6996  // Back compat <1.8 extension point
6997  jQuery.fx.step = {};
6998  var fxNow,
6999    inProgress,
7000    rfxtypes = /^(?:toggle|show|hide)$/,
7001    rrun = /queueHooks$/;
7002  function schedule() {
7003    if (inProgress) {
7004      if (document.hidden === false && window.requestAnimationFrame) {
7005        window.requestAnimationFrame(schedule);
7006      } else {
7007        window.setTimeout(schedule, jQuery.fx.interval);
7008      }
7009      jQuery.fx.tick();
7010    }
7011  }
7012
7013  // Animations created synchronously will run synchronously
7014  function createFxNow() {
7015    window.setTimeout(function () {
7016      fxNow = undefined;
7017    });
7018    return fxNow = Date.now();
7019  }
7020
7021  // Generate parameters to create a standard animation
7022  function genFx(type, includeWidth) {
7023    var which,
7024      i = 0,
7025      attrs = {
7026        height: type
7027      };
7028
7029    // If we include width, step value is 1 to do all cssExpand values,
7030    // otherwise step value is 2 to skip over Left and Right
7031    includeWidth = includeWidth ? 1 : 0;
7032    for (; i < 4; i += 2 - includeWidth) {
7033      which = cssExpand[i];
7034      attrs["margin" + which] = attrs["padding" + which] = type;
7035    }
7036    if (includeWidth) {
7037      attrs.opacity = attrs.width = type;
7038    }
7039    return attrs;
7040  }
7041  function createTween(value, prop, animation) {
7042    var tween,
7043      collection = (Animation.tweeners[prop] || []).concat(Animation.tweeners["*"]),
7044      index = 0,
7045      length = collection.length;
7046    for (; index < length; index++) {
7047      if (tween = collection[index].call(animation, prop, value)) {
7048        // We're done with this property
7049        return tween;
7050      }
7051    }
7052  }
7053  function defaultPrefilter(elem, props, opts) {
7054    var prop,
7055      value,
7056      toggle,
7057      hooks,
7058      oldfire,
7059      propTween,
7060      restoreDisplay,
7061      display,
7062      isBox = "width" in props || "height" in props,
7063      anim = this,
7064      orig = {},
7065      style = elem.style,
7066      hidden = elem.nodeType && isHiddenWithinTree(elem),
7067      dataShow = dataPriv.get(elem, "fxshow");
7068
7069    // Queue-skipping animations hijack the fx hooks
7070    if (!opts.queue) {
7071      hooks = jQuery._queueHooks(elem, "fx");
7072      if (hooks.unqueued == null) {
7073        hooks.unqueued = 0;
7074        oldfire = hooks.empty.fire;
7075        hooks.empty.fire = function () {
7076          if (!hooks.unqueued) {
7077            oldfire();
7078          }
7079        };
7080      }
7081      hooks.unqueued++;
7082      anim.always(function () {
7083        // Ensure the complete handler is called before this completes
7084        anim.always(function () {
7085          hooks.unqueued--;
7086          if (!jQuery.queue(elem, "fx").length) {
7087            hooks.empty.fire();
7088          }
7089        });
7090      });
7091    }
7092
7093    // Detect show/hide animations
7094    for (prop in props) {
7095      value = props[prop];
7096      if (rfxtypes.test(value)) {
7097        delete props[prop];
7098        toggle = toggle || value === "toggle";
7099        if (value === (hidden ? "hide" : "show")) {
7100          // Pretend to be hidden if this is a "show" and
7101          // there is still data from a stopped show/hide
7102          if (value === "show" && dataShow && dataShow[prop] !== undefined) {
7103            hidden = true;
7104
7105            // Ignore all other no-op show/hide data
7106          } else {
7107            continue;
7108          }
7109        }
7110        orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop);
7111      }
7112    }
7113
7114    // Bail out if this is a no-op like .hide().hide()
7115    propTween = !jQuery.isEmptyObject(props);
7116    if (!propTween && jQuery.isEmptyObject(orig)) {
7117      return;
7118    }
7119
7120    // Restrict "overflow" and "display" styles during box animations
7121    if (isBox && elem.nodeType === 1) {
7122      // Support: IE <=9 - 11, Edge 12 - 15
7123      // Record all 3 overflow attributes because IE does not infer the shorthand
7124      // from identically-valued overflowX and overflowY and Edge just mirrors
7125      // the overflowX value there.
7126      opts.overflow = [style.overflow, style.overflowX, style.overflowY];
7127
7128      // Identify a display type, preferring old show/hide data over the CSS cascade
7129      restoreDisplay = dataShow && dataShow.display;
7130      if (restoreDisplay == null) {
7131        restoreDisplay = dataPriv.get(elem, "display");
7132      }
7133      display = jQuery.css(elem, "display");
7134      if (display === "none") {
7135        if (restoreDisplay) {
7136          display = restoreDisplay;
7137        } else {
7138          // Get nonempty value(s) by temporarily forcing visibility
7139          showHide([elem], true);
7140          restoreDisplay = elem.style.display || restoreDisplay;
7141          display = jQuery.css(elem, "display");
7142          showHide([elem]);
7143        }
7144      }
7145
7146      // Animate inline elements as inline-block
7147      if (display === "inline" || display === "inline-block" && restoreDisplay != null) {
7148        if (jQuery.css(elem, "float") === "none") {
7149          // Restore the original display value at the end of pure show/hide animations
7150          if (!propTween) {
7151            anim.done(function () {
7152              style.display = restoreDisplay;
7153            });
7154            if (restoreDisplay == null) {
7155              display = style.display;
7156              restoreDisplay = display === "none" ? "" : display;
7157            }
7158          }
7159          style.display = "inline-block";
7160        }
7161      }
7162    }
7163    if (opts.overflow) {
7164      style.overflow = "hidden";
7165      anim.always(function () {
7166        style.overflow = opts.overflow[0];
7167        style.overflowX = opts.overflow[1];
7168        style.overflowY = opts.overflow[2];
7169      });
7170    }
7171
7172    // Implement show/hide animations
7173    propTween = false;
7174    for (prop in orig) {
7175      // General show/hide setup for this element animation
7176      if (!propTween) {
7177        if (dataShow) {
7178          if ("hidden" in dataShow) {
7179            hidden = dataShow.hidden;
7180          }
7181        } else {
7182          dataShow = dataPriv.access(elem, "fxshow", {
7183            display: restoreDisplay
7184          });
7185        }
7186
7187        // Store hidden/visible for toggle so `.stop().toggle()` "reverses"
7188        if (toggle) {
7189          dataShow.hidden = !hidden;
7190        }
7191
7192        // Show elements before animating them
7193        if (hidden) {
7194          showHide([elem], true);
7195        }
7196
7197        /* eslint-disable no-loop-func */
7198
7199        anim.done(function () {
7200          /* eslint-enable no-loop-func */
7201
7202          // The final step of a "hide" animation is actually hiding the element
7203          if (!hidden) {
7204            showHide([elem]);
7205          }
7206          dataPriv.remove(elem, "fxshow");
7207          for (prop in orig) {
7208            jQuery.style(elem, prop, orig[prop]);
7209          }
7210        });
7211      }
7212
7213      // Per-property setup
7214      propTween = createTween(hidden ? dataShow[prop] : 0, prop, anim);
7215      if (!(prop in dataShow)) {
7216        dataShow[prop] = propTween.start;
7217        if (hidden) {
7218          propTween.end = propTween.start;
7219          propTween.start = 0;
7220        }
7221      }
7222    }
7223  }
7224  function propFilter(props, specialEasing) {
7225    var index, name, easing, value, hooks;
7226
7227    // camelCase, specialEasing and expand cssHook pass
7228    for (index in props) {
7229      name = camelCase(index);
7230      easing = specialEasing[name];
7231      value = props[index];
7232      if (Array.isArray(value)) {
7233        easing = value[1];
7234        value = props[index] = value[0];
7235      }
7236      if (index !== name) {
7237        props[name] = value;
7238        delete props[index];
7239      }
7240      hooks = jQuery.cssHooks[name];
7241      if (hooks && "expand" in hooks) {
7242        value = hooks.expand(value);
7243        delete props[name];
7244
7245        // Not quite $.extend, this won't overwrite existing keys.
7246        // Reusing 'index' because we have the correct "name"
7247        for (index in value) {
7248          if (!(index in props)) {
7249            props[index] = value[index];
7250            specialEasing[index] = easing;
7251          }
7252        }
7253      } else {
7254        specialEasing[name] = easing;
7255      }
7256    }
7257  }
7258  function Animation(elem, properties, options) {
7259    var result,
7260      stopped,
7261      index = 0,
7262      length = Animation.prefilters.length,
7263      deferred = jQuery.Deferred().always(function () {
7264        // Don't match elem in the :animated selector
7265        delete tick.elem;
7266      }),
7267      tick = function tick() {
7268        if (stopped) {
7269          return false;
7270        }
7271        var currentTime = fxNow || createFxNow(),
7272          remaining = Math.max(0, animation.startTime + animation.duration - currentTime),
7273          // Support: Android 2.3 only
7274          // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
7275          temp = remaining / animation.duration || 0,
7276          percent = 1 - temp,
7277          index = 0,
7278          length = animation.tweens.length;
7279        for (; index < length; index++) {
7280          animation.tweens[index].run(percent);
7281        }
7282        deferred.notifyWith(elem, [animation, percent, remaining]);
7283
7284        // If there's more to do, yield
7285        if (percent < 1 && length) {
7286          return remaining;
7287        }
7288
7289        // If this was an empty animation, synthesize a final progress notification
7290        if (!length) {
7291          deferred.notifyWith(elem, [animation, 1, 0]);
7292        }
7293
7294        // Resolve the animation and report its conclusion
7295        deferred.resolveWith(elem, [animation]);
7296        return false;
7297      },
7298      animation = deferred.promise({
7299        elem: elem,
7300        props: jQuery.extend({}, properties),
7301        opts: jQuery.extend(true, {
7302          specialEasing: {},
7303          easing: jQuery.easing._default
7304        }, options),
7305        originalProperties: properties,
7306        originalOptions: options,
7307        startTime: fxNow || createFxNow(),
7308        duration: options.duration,
7309        tweens: [],
7310        createTween: function createTween(prop, end) {
7311          var tween = jQuery.Tween(elem, animation.opts, prop, end, animation.opts.specialEasing[prop] || animation.opts.easing);
7312          animation.tweens.push(tween);
7313          return tween;
7314        },
7315        stop: function stop(gotoEnd) {
7316          var index = 0,
7317            // If we are going to the end, we want to run all the tweens
7318            // otherwise we skip this part
7319            length = gotoEnd ? animation.tweens.length : 0;
7320          if (stopped) {
7321            return this;
7322          }
7323          stopped = true;
7324          for (; index < length; index++) {
7325            animation.tweens[index].run(1);
7326          }
7327
7328          // Resolve when we played the last frame; otherwise, reject
7329          if (gotoEnd) {
7330            deferred.notifyWith(elem, [animation, 1, 0]);
7331            deferred.resolveWith(elem, [animation, gotoEnd]);
7332          } else {
7333            deferred.rejectWith(elem, [animation, gotoEnd]);
7334          }
7335          return this;
7336        }
7337      }),
7338      props = animation.props;
7339    propFilter(props, animation.opts.specialEasing);
7340    for (; index < length; index++) {
7341      result = Animation.prefilters[index].call(animation, elem, props, animation.opts);
7342      if (result) {
7343        if (isFunction(result.stop)) {
7344          jQuery._queueHooks(animation.elem, animation.opts.queue).stop = result.stop.bind(result);
7345        }
7346        return result;
7347      }
7348    }
7349    jQuery.map(props, createTween, animation);
7350    if (isFunction(animation.opts.start)) {
7351      animation.opts.start.call(elem, animation);
7352    }
7353
7354    // Attach callbacks from options
7355    animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);
7356    jQuery.fx.timer(jQuery.extend(tick, {
7357      elem: elem,
7358      anim: animation,
7359      queue: animation.opts.queue
7360    }));
7361    return animation;
7362  }
7363  jQuery.Animation = jQuery.extend(Animation, {
7364    tweeners: {
7365      "*": [function (prop, value) {
7366        var tween = this.createTween(prop, value);
7367        adjustCSS(tween.elem, prop, rcssNum.exec(value), tween);
7368        return tween;
7369      }]
7370    },
7371    tweener: function tweener(props, callback) {
7372      if (isFunction(props)) {
7373        callback = props;
7374        props = ["*"];
7375      } else {
7376        props = props.match(rnothtmlwhite);
7377      }
7378      var prop,
7379        index = 0,
7380        length = props.length;
7381      for (; index < length; index++) {
7382        prop = props[index];
7383        Animation.tweeners[prop] = Animation.tweeners[prop] || [];
7384        Animation.tweeners[prop].unshift(callback);
7385      }
7386    },
7387    prefilters: [defaultPrefilter],
7388    prefilter: function prefilter(callback, prepend) {
7389      if (prepend) {
7390        Animation.prefilters.unshift(callback);
7391      } else {
7392        Animation.prefilters.push(callback);
7393      }
7394    }
7395  });
7396  jQuery.speed = function (speed, easing, fn) {
7397    var opt = speed && _typeof(speed) === "object" ? jQuery.extend({}, speed) : {
7398      complete: fn || !fn && easing || isFunction(speed) && speed,
7399      duration: speed,
7400      easing: fn && easing || easing && !isFunction(easing) && easing
7401    };
7402
7403    // Go to the end state if fx are off
7404    if (jQuery.fx.off) {
7405      opt.duration = 0;
7406    } else {
7407      if (typeof opt.duration !== "number") {
7408        if (opt.duration in jQuery.fx.speeds) {
7409          opt.duration = jQuery.fx.speeds[opt.duration];
7410        } else {
7411          opt.duration = jQuery.fx.speeds._default;
7412        }
7413      }
7414    }
7415
7416    // Normalize opt.queue - true/undefined/null -> "fx"
7417    if (opt.queue == null || opt.queue === true) {
7418      opt.queue = "fx";
7419    }
7420
7421    // Queueing
7422    opt.old = opt.complete;
7423    opt.complete = function () {
7424      if (isFunction(opt.old)) {
7425        opt.old.call(this);
7426      }
7427      if (opt.queue) {
7428        jQuery.dequeue(this, opt.queue);
7429      }
7430    };
7431    return opt;
7432  };
7433  jQuery.fn.extend({
7434    fadeTo: function fadeTo(speed, to, easing, callback) {
7435      // Show any hidden elements after setting opacity to 0
7436      return this.filter(isHiddenWithinTree).css("opacity", 0).show()
7437
7438      // Animate to the value specified
7439      .end().animate({
7440        opacity: to
7441      }, speed, easing, callback);
7442    },
7443    animate: function animate(prop, speed, easing, callback) {
7444      var empty = jQuery.isEmptyObject(prop),
7445        optall = jQuery.speed(speed, easing, callback),
7446        doAnimation = function doAnimation() {
7447          // Operate on a copy of prop so per-property easing won't be lost
7448          var anim = Animation(this, jQuery.extend({}, prop), optall);
7449
7450          // Empty animations, or finishing resolves immediately
7451          if (empty || dataPriv.get(this, "finish")) {
7452            anim.stop(true);
7453          }
7454        };
7455      doAnimation.finish = doAnimation;
7456      return empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation);
7457    },
7458    stop: function stop(type, clearQueue, gotoEnd) {
7459      var stopQueue = function stopQueue(hooks) {
7460        var stop = hooks.stop;
7461        delete hooks.stop;
7462        stop(gotoEnd);
7463      };
7464      if (typeof type !== "string") {
7465        gotoEnd = clearQueue;
7466        clearQueue = type;
7467        type = undefined;
7468      }
7469      if (clearQueue) {
7470        this.queue(type || "fx", []);
7471      }
7472      return this.each(function () {
7473        var dequeue = true,
7474          index = type != null && type + "queueHooks",
7475          timers = jQuery.timers,
7476          data = dataPriv.get(this);
7477        if (index) {
7478          if (data[index] && data[index].stop) {
7479            stopQueue(data[index]);
7480          }
7481        } else {
7482          for (index in data) {
7483            if (data[index] && data[index].stop && rrun.test(index)) {
7484              stopQueue(data[index]);
7485            }
7486          }
7487        }
7488        for (index = timers.length; index--;) {
7489          if (timers[index].elem === this && (type == null || timers[index].queue === type)) {
7490            timers[index].anim.stop(gotoEnd);
7491            dequeue = false;
7492            timers.splice(index, 1);
7493          }
7494        }
7495
7496        // Start the next in the queue if the last step wasn't forced.
7497        // Timers currently will call their complete callbacks, which
7498        // will dequeue but only if they were gotoEnd.
7499        if (dequeue || !gotoEnd) {
7500          jQuery.dequeue(this, type);
7501        }
7502      });
7503    },
7504    finish: function finish(type) {
7505      if (type !== false) {
7506        type = type || "fx";
7507      }
7508      return this.each(function () {
7509        var index,
7510          data = dataPriv.get(this),
7511          queue = data[type + "queue"],
7512          hooks = data[type + "queueHooks"],
7513          timers = jQuery.timers,
7514          length = queue ? queue.length : 0;
7515
7516        // Enable finishing flag on private data
7517        data.finish = true;
7518
7519        // Empty the queue first
7520        jQuery.queue(this, type, []);
7521        if (hooks && hooks.stop) {
7522          hooks.stop.call(this, true);
7523        }
7524
7525        // Look for any active animations, and finish them
7526        for (index = timers.length; index--;) {
7527          if (timers[index].elem === this && timers[index].queue === type) {
7528            timers[index].anim.stop(true);
7529            timers.splice(index, 1);
7530          }
7531        }
7532
7533        // Look for any animations in the old queue and finish them
7534        for (index = 0; index < length; index++) {
7535          if (queue[index] && queue[index].finish) {
7536            queue[index].finish.call(this);
7537          }
7538        }
7539
7540        // Turn off finishing flag
7541        delete data.finish;
7542      });
7543    }
7544  });
7545  jQuery.each(["toggle", "show", "hide"], function (_i, name) {
7546    var cssFn = jQuery.fn[name];
7547    jQuery.fn[name] = function (speed, easing, callback) {
7548      return speed == null || typeof speed === "boolean" ? cssFn.apply(this, arguments) : this.animate(genFx(name, true), speed, easing, callback);
7549    };
7550  });
7551
7552  // Generate shortcuts for custom animations
7553  jQuery.each({
7554    slideDown: genFx("show"),
7555    slideUp: genFx("hide"),
7556    slideToggle: genFx("toggle"),
7557    fadeIn: {
7558      opacity: "show"
7559    },
7560    fadeOut: {
7561      opacity: "hide"
7562    },
7563    fadeToggle: {
7564      opacity: "toggle"
7565    }
7566  }, function (name, props) {
7567    jQuery.fn[name] = function (speed, easing, callback) {
7568      return this.animate(props, speed, easing, callback);
7569    };
7570  });
7571  jQuery.timers = [];
7572  jQuery.fx.tick = function () {
7573    var timer,
7574      i = 0,
7575      timers = jQuery.timers;
7576    fxNow = Date.now();
7577    for (; i < timers.length; i++) {
7578      timer = timers[i];
7579
7580      // Run the timer and safely remove it when done (allowing for external removal)
7581      if (!timer() && timers[i] === timer) {
7582        timers.splice(i--, 1);
7583      }
7584    }
7585    if (!timers.length) {
7586      jQuery.fx.stop();
7587    }
7588    fxNow = undefined;
7589  };
7590  jQuery.fx.timer = function (timer) {
7591    jQuery.timers.push(timer);
7592    jQuery.fx.start();
7593  };
7594  jQuery.fx.interval = 13;
7595  jQuery.fx.start = function () {
7596    if (inProgress) {
7597      return;
7598    }
7599    inProgress = true;
7600    schedule();
7601  };
7602  jQuery.fx.stop = function () {
7603    inProgress = null;
7604  };
7605  jQuery.fx.speeds = {
7606    slow: 600,
7607    fast: 200,
7608    // Default speed
7609    _default: 400
7610  };
7611
7612  // Based off of the plugin by Clint Helfers, with permission.
7613  // https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
7614  jQuery.fn.delay = function (time, type) {
7615    time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
7616    type = type || "fx";
7617    return this.queue(type, function (next, hooks) {
7618      var timeout = window.setTimeout(next, time);
7619      hooks.stop = function () {
7620        window.clearTimeout(timeout);
7621      };
7622    });
7623  };
7624  (function () {
7625    var input = document.createElement("input"),
7626      select = document.createElement("select"),
7627      opt = select.appendChild(document.createElement("option"));
7628    input.type = "checkbox";
7629
7630    // Support: Android <=4.3 only
7631    // Default value for a checkbox should be "on"
7632    support.checkOn = input.value !== "";
7633
7634    // Support: IE <=11 only
7635    // Must access selectedIndex to make default options select
7636    support.optSelected = opt.selected;
7637
7638    // Support: IE <=11 only
7639    // An input loses its value after becoming a radio
7640    input = document.createElement("input");
7641    input.value = "t";
7642    input.type = "radio";
7643    support.radioValue = input.value === "t";
7644  })();
7645  var boolHook,
7646    attrHandle = jQuery.expr.attrHandle;
7647  jQuery.fn.extend({
7648    attr: function attr(name, value) {
7649      return access(this, jQuery.attr, name, value, arguments.length > 1);
7650    },
7651    removeAttr: function removeAttr(name) {
7652      return this.each(function () {
7653        jQuery.removeAttr(this, name);
7654      });
7655    }
7656  });
7657  jQuery.extend({
7658    attr: function attr(elem, name, value) {
7659      var ret,
7660        hooks,
7661        nType = elem.nodeType;
7662
7663      // Don't get/set attributes on text, comment and attribute nodes
7664      if (nType === 3 || nType === 8 || nType === 2) {
7665        return;
7666      }
7667
7668      // Fallback to prop when attributes are not supported
7669      if (typeof elem.getAttribute === "undefined") {
7670        return jQuery.prop(elem, name, value);
7671      }
7672
7673      // Attribute hooks are determined by the lowercase version
7674      // Grab necessary hook if one is defined
7675      if (nType !== 1 || !jQuery.isXMLDoc(elem)) {
7676        hooks = jQuery.attrHooks[name.toLowerCase()] || (jQuery.expr.match.bool.test(name) ? boolHook : undefined);
7677      }
7678      if (value !== undefined) {
7679        if (value === null) {
7680          jQuery.removeAttr(elem, name);
7681          return;
7682        }
7683        if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined) {
7684          return ret;
7685        }
7686        elem.setAttribute(name, value + "");
7687        return value;
7688      }
7689      if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
7690        return ret;
7691      }
7692      ret = jQuery.find.attr(elem, name);
7693
7694      // Non-existent attributes return null, we normalize to undefined
7695      return ret == null ? undefined : ret;
7696    },
7697    attrHooks: {
7698      type: {
7699        set: function set(elem, value) {
7700          if (!support.radioValue && value === "radio" && nodeName(elem, "input")) {
7701            var val = elem.value;
7702            elem.setAttribute("type", value);
7703            if (val) {
7704              elem.value = val;
7705            }
7706            return value;
7707          }
7708        }
7709      }
7710    },
7711    removeAttr: function removeAttr(elem, value) {
7712      var name,
7713        i = 0,
7714        // Attribute names can contain non-HTML whitespace characters
7715        // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
7716        attrNames = value && value.match(rnothtmlwhite);
7717      if (attrNames && elem.nodeType === 1) {
7718        while (name = attrNames[i++]) {
7719          elem.removeAttribute(name);
7720        }
7721      }
7722    }
7723  });
7724
7725  // Hooks for boolean attributes
7726  boolHook = {
7727    set: function set(elem, value, name) {
7728      if (value === false) {
7729        // Remove boolean attributes when set to false
7730        jQuery.removeAttr(elem, name);
7731      } else {
7732        elem.setAttribute(name, name);
7733      }
7734      return name;
7735    }
7736  };
7737  jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function (_i, name) {
7738    var getter = attrHandle[name] || jQuery.find.attr;
7739    attrHandle[name] = function (elem, name, isXML) {
7740      var ret,
7741        handle,
7742        lowercaseName = name.toLowerCase();
7743      if (!isXML) {
7744        // Avoid an infinite loop by temporarily removing this function from the getter
7745        handle = attrHandle[lowercaseName];
7746        attrHandle[lowercaseName] = ret;
7747        ret = getter(elem, name, isXML) != null ? lowercaseName : null;
7748        attrHandle[lowercaseName] = handle;
7749      }
7750      return ret;
7751    };
7752  });
7753  var rfocusable = /^(?:input|select|textarea|button)$/i,
7754    rclickable = /^(?:a|area)$/i;
7755  jQuery.fn.extend({
7756    prop: function prop(name, value) {
7757      return access(this, jQuery.prop, name, value, arguments.length > 1);
7758    },
7759    removeProp: function removeProp(name) {
7760      return this.each(function () {
7761        delete this[jQuery.propFix[name] || name];
7762      });
7763    }
7764  });
7765  jQuery.extend({
7766    prop: function prop(elem, name, value) {
7767      var ret,
7768        hooks,
7769        nType = elem.nodeType;
7770
7771      // Don't get/set properties on text, comment and attribute nodes
7772      if (nType === 3 || nType === 8 || nType === 2) {
7773        return;
7774      }
7775      if (nType !== 1 || !jQuery.isXMLDoc(elem)) {
7776        // Fix name and attach hooks
7777        name = jQuery.propFix[name] || name;
7778        hooks = jQuery.propHooks[name];
7779      }
7780      if (value !== undefined) {
7781        if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined) {
7782          return ret;
7783        }
7784        return elem[name] = value;
7785      }
7786      if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
7787        return ret;
7788      }
7789      return elem[name];
7790    },
7791    propHooks: {
7792      tabIndex: {
7793        get: function get(elem) {
7794          // Support: IE <=9 - 11 only
7795          // elem.tabIndex doesn't always return the
7796          // correct value when it hasn't been explicitly set
7797          // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
7798          // Use proper attribute retrieval(#12072)
7799          var tabindex = jQuery.find.attr(elem, "tabindex");
7800          if (tabindex) {
7801            return parseInt(tabindex, 10);
7802          }
7803          if (rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href) {
7804            return 0;
7805          }
7806          return -1;
7807        }
7808      }
7809    },
7810    propFix: {
7811      "for": "htmlFor",
7812      "class": "className"
7813    }
7814  });
7815
7816  // Support: IE <=11 only
7817  // Accessing the selectedIndex property
7818  // forces the browser to respect setting selected
7819  // on the option
7820  // The getter ensures a default option is selected
7821  // when in an optgroup
7822  // eslint rule "no-unused-expressions" is disabled for this code
7823  // since it considers such accessions noop
7824  if (!support.optSelected) {
7825    jQuery.propHooks.selected = {
7826      get: function get(elem) {
7827        /* eslint no-unused-expressions: "off" */
7828
7829        var parent = elem.parentNode;
7830        if (parent && parent.parentNode) {
7831          parent.parentNode.selectedIndex;
7832        }
7833        return null;
7834      },
7835      set: function set(elem) {
7836        /* eslint no-unused-expressions: "off" */
7837
7838        var parent = elem.parentNode;
7839        if (parent) {
7840          parent.selectedIndex;
7841          if (parent.parentNode) {
7842            parent.parentNode.selectedIndex;
7843          }
7844        }
7845      }
7846    };
7847  }
7848  jQuery.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function () {
7849    jQuery.propFix[this.toLowerCase()] = this;
7850  });
7851
7852  // Strip and collapse whitespace according to HTML spec
7853  // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace
7854  function stripAndCollapse(value) {
7855    var tokens = value.match(rnothtmlwhite) || [];
7856    return tokens.join(" ");
7857  }
7858  function getClass(elem) {
7859    return elem.getAttribute && elem.getAttribute("class") || "";
7860  }
7861  function classesToArray(value) {
7862    if (Array.isArray(value)) {
7863      return value;
7864    }
7865    if (typeof value === "string") {
7866      return value.match(rnothtmlwhite) || [];
7867    }
7868    return [];
7869  }
7870  jQuery.fn.extend({
7871    addClass: function addClass(value) {
7872      var classes,
7873        elem,
7874        cur,
7875        curValue,
7876        clazz,
7877        j,
7878        finalValue,
7879        i = 0;
7880      if (isFunction(value)) {
7881        return this.each(function (j) {
7882          jQuery(this).addClass(value.call(this, j, getClass(this)));
7883        });
7884      }
7885      classes = classesToArray(value);
7886      if (classes.length) {
7887        while (elem = this[i++]) {
7888          curValue = getClass(elem);
7889          cur = elem.nodeType === 1 && " " + stripAndCollapse(curValue) + " ";
7890          if (cur) {
7891            j = 0;
7892            while (clazz = classes[j++]) {
7893              if (cur.indexOf(" " + clazz + " ") < 0) {
7894                cur += clazz + " ";
7895              }
7896            }
7897
7898            // Only assign if different to avoid unneeded rendering.
7899            finalValue = stripAndCollapse(cur);
7900            if (curValue !== finalValue) {
7901              elem.setAttribute("class", finalValue);
7902            }
7903          }
7904        }
7905      }
7906      return this;
7907    },
7908    removeClass: function removeClass(value) {
7909      var classes,
7910        elem,
7911        cur,
7912        curValue,
7913        clazz,
7914        j,
7915        finalValue,
7916        i = 0;
7917      if (isFunction(value)) {
7918        return this.each(function (j) {
7919          jQuery(this).removeClass(value.call(this, j, getClass(this)));
7920        });
7921      }
7922      if (!arguments.length) {
7923        return this.attr("class", "");
7924      }
7925      classes = classesToArray(value);
7926      if (classes.length) {
7927        while (elem = this[i++]) {
7928          curValue = getClass(elem);
7929
7930          // This expression is here for better compressibility (see addClass)
7931          cur = elem.nodeType === 1 && " " + stripAndCollapse(curValue) + " ";
7932          if (cur) {
7933            j = 0;
7934            while (clazz = classes[j++]) {
7935              // Remove *all* instances
7936              while (cur.indexOf(" " + clazz + " ") > -1) {
7937                cur = cur.replace(" " + clazz + " ", " ");
7938              }
7939            }
7940
7941            // Only assign if different to avoid unneeded rendering.
7942            finalValue = stripAndCollapse(cur);
7943            if (curValue !== finalValue) {
7944              elem.setAttribute("class", finalValue);
7945            }
7946          }
7947        }
7948      }
7949      return this;
7950    },
7951    toggleClass: function toggleClass(value, stateVal) {
7952      var type = _typeof(value),
7953        isValidValue = type === "string" || Array.isArray(value);
7954      if (typeof stateVal === "boolean" && isValidValue) {
7955        return stateVal ? this.addClass(value) : this.removeClass(value);
7956      }
7957      if (isFunction(value)) {
7958        return this.each(function (i) {
7959          jQuery(this).toggleClass(value.call(this, i, getClass(this), stateVal), stateVal);
7960        });
7961      }
7962      return this.each(function () {
7963        var className, i, self, classNames;
7964        if (isValidValue) {
7965          // Toggle individual class names
7966          i = 0;
7967          self = jQuery(this);
7968          classNames = classesToArray(value);
7969          while (className = classNames[i++]) {
7970            // Check each className given, space separated list
7971            if (self.hasClass(className)) {
7972              self.removeClass(className);
7973            } else {
7974              self.addClass(className);
7975            }
7976          }
7977
7978          // Toggle whole class name
7979        } else if (value === undefined || type === "boolean") {
7980          className = getClass(this);
7981          if (className) {
7982            // Store className if set
7983            dataPriv.set(this, "__className__", className);
7984          }
7985
7986          // If the element has a class name or if we're passed `false`,
7987          // then remove the whole classname (if there was one, the above saved it).
7988          // Otherwise bring back whatever was previously saved (if anything),
7989          // falling back to the empty string if nothing was stored.
7990          if (this.setAttribute) {
7991            this.setAttribute("class", className || value === false ? "" : dataPriv.get(this, "__className__") || "");
7992          }
7993        }
7994      });
7995    },
7996    hasClass: function hasClass(selector) {
7997      var className,
7998        elem,
7999        i = 0;
8000      className = " " + selector + " ";
8001      while (elem = this[i++]) {
8002        if (elem.nodeType === 1 && (" " + stripAndCollapse(getClass(elem)) + " ").indexOf(className) > -1) {
8003          return true;
8004        }
8005      }
8006      return false;
8007    }
8008  });
8009  var rreturn = /\r/g;
8010  jQuery.fn.extend({
8011    val: function val(value) {
8012      var hooks,
8013        ret,
8014        valueIsFunction,
8015        elem = this[0];
8016      if (!arguments.length) {
8017        if (elem) {
8018          hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()];
8019          if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== undefined) {
8020            return ret;
8021          }
8022          ret = elem.value;
8023
8024          // Handle most common string cases
8025          if (typeof ret === "string") {
8026            return ret.replace(rreturn, "");
8027          }
8028
8029          // Handle cases where value is null/undef or number
8030          return ret == null ? "" : ret;
8031        }
8032        return;
8033      }
8034      valueIsFunction = isFunction(value);
8035      return this.each(function (i) {
8036        var val;
8037        if (this.nodeType !== 1) {
8038          return;
8039        }
8040        if (valueIsFunction) {
8041          val = value.call(this, i, jQuery(this).val());
8042        } else {
8043          val = value;
8044        }
8045
8046        // Treat null/undefined as ""; convert numbers to string
8047        if (val == null) {
8048          val = "";
8049        } else if (typeof val === "number") {
8050          val += "";
8051        } else if (Array.isArray(val)) {
8052          val = jQuery.map(val, function (value) {
8053            return value == null ? "" : value + "";
8054          });
8055        }
8056        hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()];
8057
8058        // If set returns undefined, fall back to normal setting
8059        if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === undefined) {
8060          this.value = val;
8061        }
8062      });
8063    }
8064  });
8065  jQuery.extend({
8066    valHooks: {
8067      option: {
8068        get: function get(elem) {
8069          var val = jQuery.find.attr(elem, "value");
8070          return val != null ? val :
8071          // Support: IE <=10 - 11 only
8072          // option.text throws exceptions (#14686, #14858)
8073          // Strip and collapse whitespace
8074          // https://html.spec.whatwg.org/#strip-and-collapse-whitespace
8075          stripAndCollapse(jQuery.text(elem));
8076        }
8077      },
8078      select: {
8079        get: function get(elem) {
8080          var value,
8081            option,
8082            i,
8083            options = elem.options,
8084            index = elem.selectedIndex,
8085            one = elem.type === "select-one",
8086            values = one ? null : [],
8087            max = one ? index + 1 : options.length;
8088          if (index < 0) {
8089            i = max;
8090          } else {
8091            i = one ? index : 0;
8092          }
8093
8094          // Loop through all the selected options
8095          for (; i < max; i++) {
8096            option = options[i];
8097
8098            // Support: IE <=9 only
8099            // IE8-9 doesn't update selected after form reset (#2551)
8100            if ((option.selected || i === index) &&
8101            // Don't return options that are disabled or in a disabled optgroup
8102            !option.disabled && (!option.parentNode.disabled || !nodeName(option.parentNode, "optgroup"))) {
8103              // Get the specific value for the option
8104              value = jQuery(option).val();
8105
8106              // We don't need an array for one selects
8107              if (one) {
8108                return value;
8109              }
8110
8111              // Multi-Selects return an array
8112              values.push(value);
8113            }
8114          }
8115          return values;
8116        },
8117        set: function set(elem, value) {
8118          var optionSet,
8119            option,
8120            options = elem.options,
8121            values = jQuery.makeArray(value),
8122            i = options.length;
8123          while (i--) {
8124            option = options[i];
8125
8126            /* eslint-disable no-cond-assign */
8127
8128            if (option.selected = jQuery.inArray(jQuery.valHooks.option.get(option), values) > -1) {
8129              optionSet = true;
8130            }
8131
8132            /* eslint-enable no-cond-assign */
8133          }
8134
8135          // Force browsers to behave consistently when non-matching value is set
8136          if (!optionSet) {
8137            elem.selectedIndex = -1;
8138          }
8139          return values;
8140        }
8141      }
8142    }
8143  });
8144
8145  // Radios and checkboxes getter/setter
8146  jQuery.each(["radio", "checkbox"], function () {
8147    jQuery.valHooks[this] = {
8148      set: function set(elem, value) {
8149        if (Array.isArray(value)) {
8150          return elem.checked = jQuery.inArray(jQuery(elem).val(), value) > -1;
8151        }
8152      }
8153    };
8154    if (!support.checkOn) {
8155      jQuery.valHooks[this].get = function (elem) {
8156        return elem.getAttribute("value") === null ? "on" : elem.value;
8157      };
8158    }
8159  });
8160
8161  // Return jQuery for attributes-only inclusion
8162
8163  support.focusin = "onfocusin" in window;
8164  var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
8165    stopPropagationCallback = function stopPropagationCallback(e) {
8166      e.stopPropagation();
8167    };
8168  jQuery.extend(jQuery.event, {
8169    trigger: function trigger(event, data, elem, onlyHandlers) {
8170      var i,
8171        cur,
8172        tmp,
8173        bubbleType,
8174        ontype,
8175        handle,
8176        special,
8177        lastElement,
8178        eventPath = [elem || document],
8179        type = hasOwn.call(event, "type") ? event.type : event,
8180        namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : [];
8181      cur = lastElement = tmp = elem = elem || document;
8182
8183      // Don't do events on text and comment nodes
8184      if (elem.nodeType === 3 || elem.nodeType === 8) {
8185        return;
8186      }
8187
8188      // focus/blur morphs to focusin/out; ensure we're not firing them right now
8189      if (rfocusMorph.test(type + jQuery.event.triggered)) {
8190        return;
8191      }
8192      if (type.indexOf(".") > -1) {
8193        // Namespaced trigger; create a regexp to match event type in handle()
8194        namespaces = type.split(".");
8195        type = namespaces.shift();
8196        namespaces.sort();
8197      }
8198      ontype = type.indexOf(":") < 0 && "on" + type;
8199
8200      // Caller can pass in a jQuery.Event object, Object, or just an event type string
8201      event = event[jQuery.expando] ? event : new jQuery.Event(type, _typeof(event) === "object" && event);
8202
8203      // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
8204      event.isTrigger = onlyHandlers ? 2 : 3;
8205      event.namespace = namespaces.join(".");
8206      event.rnamespace = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
8207
8208      // Clean up the event in case it is being reused
8209      event.result = undefined;
8210      if (!event.target) {
8211        event.target = elem;
8212      }
8213
8214      // Clone any incoming data and prepend the event, creating the handler arg list
8215      data = data == null ? [event] : jQuery.makeArray(data, [event]);
8216
8217      // Allow special events to draw outside the lines
8218      special = jQuery.event.special[type] || {};
8219      if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) {
8220        return;
8221      }
8222
8223      // Determine event propagation path in advance, per W3C events spec (#9951)
8224      // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
8225      if (!onlyHandlers && !special.noBubble && !isWindow(elem)) {
8226        bubbleType = special.delegateType || type;
8227        if (!rfocusMorph.test(bubbleType + type)) {
8228          cur = cur.parentNode;
8229        }
8230        for (; cur; cur = cur.parentNode) {
8231          eventPath.push(cur);
8232          tmp = cur;
8233        }
8234
8235        // Only add window if we got to document (e.g., not plain obj or detached DOM)
8236        if (tmp === (elem.ownerDocument || document)) {
8237          eventPath.push(tmp.defaultView || tmp.parentWindow || window);
8238        }
8239      }
8240
8241      // Fire handlers on the event path
8242      i = 0;
8243      while ((cur = eventPath[i++]) && !event.isPropagationStopped()) {
8244        lastElement = cur;
8245        event.type = i > 1 ? bubbleType : special.bindType || type;
8246
8247        // jQuery handler
8248        handle = (dataPriv.get(cur, "events") || Object.create(null))[event.type] && dataPriv.get(cur, "handle");
8249        if (handle) {
8250          handle.apply(cur, data);
8251        }
8252
8253        // Native handler
8254        handle = ontype && cur[ontype];
8255        if (handle && handle.apply && acceptData(cur)) {
8256          event.result = handle.apply(cur, data);
8257          if (event.result === false) {
8258            event.preventDefault();
8259          }
8260        }
8261      }
8262      event.type = type;
8263
8264      // If nobody prevented the default action, do it now
8265      if (!onlyHandlers && !event.isDefaultPrevented()) {
8266        if ((!special._default || special._default.apply(eventPath.pop(), data) === false) && acceptData(elem)) {
8267          // Call a native DOM method on the target with the same name as the event.
8268          // Don't do default actions on window, that's where global variables be (#6170)
8269          if (ontype && isFunction(elem[type]) && !isWindow(elem)) {
8270            // Don't re-trigger an onFOO event when we call its FOO() method
8271            tmp = elem[ontype];
8272            if (tmp) {
8273              elem[ontype] = null;
8274            }
8275
8276            // Prevent re-triggering of the same event, since we already bubbled it above
8277            jQuery.event.triggered = type;
8278            if (event.isPropagationStopped()) {
8279              lastElement.addEventListener(type, stopPropagationCallback);
8280            }
8281            elem[type]();
8282            if (event.isPropagationStopped()) {
8283              lastElement.removeEventListener(type, stopPropagationCallback);
8284            }
8285            jQuery.event.triggered = undefined;
8286            if (tmp) {
8287              elem[ontype] = tmp;
8288            }
8289          }
8290        }
8291      }
8292      return event.result;
8293    },
8294    // Piggyback on a donor event to simulate a different one
8295    // Used only for `focus(in | out)` events
8296    simulate: function simulate(type, elem, event) {
8297      var e = jQuery.extend(new jQuery.Event(), event, {
8298        type: type,
8299        isSimulated: true
8300      });
8301      jQuery.event.trigger(e, null, elem);
8302    }
8303  });
8304  jQuery.fn.extend({
8305    trigger: function trigger(type, data) {
8306      return this.each(function () {
8307        jQuery.event.trigger(type, data, this);
8308      });
8309    },
8310    triggerHandler: function triggerHandler(type, data) {
8311      var elem = this[0];
8312      if (elem) {
8313        return jQuery.event.trigger(type, data, elem, true);
8314      }
8315    }
8316  });
8317
8318  // Support: Firefox <=44
8319  // Firefox doesn't have focus(in | out) events
8320  // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
8321  //
8322  // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
8323  // focus(in | out) events fire after focus & blur events,
8324  // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
8325  // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
8326  if (!support.focusin) {
8327    jQuery.each({
8328      focus: "focusin",
8329      blur: "focusout"
8330    }, function (orig, fix) {
8331      // Attach a single capturing handler on the document while someone wants focusin/focusout
8332      var handler = function handler(event) {
8333        jQuery.event.simulate(fix, event.target, jQuery.event.fix(event));
8334      };
8335      jQuery.event.special[fix] = {
8336        setup: function setup() {
8337          // Handle: regular nodes (via `this.ownerDocument`), window
8338          // (via `this.document`) & document (via `this`).
8339          var doc = this.ownerDocument || this.document || this,
8340            attaches = dataPriv.access(doc, fix);
8341          if (!attaches) {
8342            doc.addEventListener(orig, handler, true);
8343          }
8344          dataPriv.access(doc, fix, (attaches || 0) + 1);
8345        },
8346        teardown: function teardown() {
8347          var doc = this.ownerDocument || this.document || this,
8348            attaches = dataPriv.access(doc, fix) - 1;
8349          if (!attaches) {
8350            doc.removeEventListener(orig, handler, true);
8351            dataPriv.remove(doc, fix);
8352          } else {
8353            dataPriv.access(doc, fix, attaches);
8354          }
8355        }
8356      };
8357    });
8358  }
8359  var location = window.location;
8360  var nonce = {
8361    guid: Date.now()
8362  };
8363  var rquery = /\?/;
8364
8365  // Cross-browser xml parsing
8366  jQuery.parseXML = function (data) {
8367    var xml;
8368    if (!data || typeof data !== "string") {
8369      return null;
8370    }
8371
8372    // Support: IE 9 - 11 only
8373    // IE throws on parseFromString with invalid input.
8374    try {
8375      xml = new window.DOMParser().parseFromString(data, "text/xml");
8376    } catch (e) {
8377      xml = undefined;
8378    }
8379    if (!xml || xml.getElementsByTagName("parsererror").length) {
8380      jQuery.error("Invalid XML: " + data);
8381    }
8382    return xml;
8383  };
8384  var rbracket = /\[\]$/,
8385    rCRLF = /\r?\n/g,
8386    rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
8387    rsubmittable = /^(?:input|select|textarea|keygen)/i;
8388  function buildParams(prefix, obj, traditional, add) {
8389    var name;
8390    if (Array.isArray(obj)) {
8391      // Serialize array item.
8392      jQuery.each(obj, function (i, v) {
8393        if (traditional || rbracket.test(prefix)) {
8394          // Treat each array item as a scalar.
8395          add(prefix, v);
8396        } else {
8397          // Item is non-scalar (array or object), encode its numeric index.
8398          buildParams(prefix + "[" + (_typeof(v) === "object" && v != null ? i : "") + "]", v, traditional, add);
8399        }
8400      });
8401    } else if (!traditional && toType(obj) === "object") {
8402      // Serialize object item.
8403      for (name in obj) {
8404        buildParams(prefix + "[" + name + "]", obj[name], traditional, add);
8405      }
8406    } else {
8407      // Serialize scalar item.
8408      add(prefix, obj);
8409    }
8410  }
8411
8412  // Serialize an array of form elements or a set of
8413  // key/values into a query string
8414  jQuery.param = function (a, traditional) {
8415    var prefix,
8416      s = [],
8417      add = function add(key, valueOrFunction) {
8418        // If value is a function, invoke it and use its return value
8419        var value = isFunction(valueOrFunction) ? valueOrFunction() : valueOrFunction;
8420        s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value == null ? "" : value);
8421      };
8422    if (a == null) {
8423      return "";
8424    }
8425
8426    // If an array was passed in, assume that it is an array of form elements.
8427    if (Array.isArray(a) || a.jquery && !jQuery.isPlainObject(a)) {
8428      // Serialize the form elements
8429      jQuery.each(a, function () {
8430        add(this.name, this.value);
8431      });
8432    } else {
8433      // If traditional, encode the "old" way (the way 1.3.2 or older
8434      // did it), otherwise encode params recursively.
8435      for (prefix in a) {
8436        buildParams(prefix, a[prefix], traditional, add);
8437      }
8438    }
8439
8440    // Return the resulting serialization
8441    return s.join("&");
8442  };
8443  jQuery.fn.extend({
8444    serialize: function serialize() {
8445      return jQuery.param(this.serializeArray());
8446    },
8447    serializeArray: function serializeArray() {
8448      return this.map(function () {
8449        // Can add propHook for "elements" to filter or add form elements
8450        var elements = jQuery.prop(this, "elements");
8451        return elements ? jQuery.makeArray(elements) : this;
8452      }).filter(function () {
8453        var type = this.type;
8454
8455        // Use .is( ":disabled" ) so that fieldset[disabled] works
8456        return this.name && !jQuery(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !rcheckableType.test(type));
8457      }).map(function (_i, elem) {
8458        var val = jQuery(this).val();
8459        if (val == null) {
8460          return null;
8461        }
8462        if (Array.isArray(val)) {
8463          return jQuery.map(val, function (val) {
8464            return {
8465              name: elem.name,
8466              value: val.replace(rCRLF, "\r\n")
8467            };
8468          });
8469        }
8470        return {
8471          name: elem.name,
8472          value: val.replace(rCRLF, "\r\n")
8473        };
8474      }).get();
8475    }
8476  });
8477  var r20 = /%20/g,
8478    rhash = /#.*$/,
8479    rantiCache = /([?&])_=[^&]*/,
8480    rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
8481    // #7653, #8125, #8152: local protocol detection
8482    rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
8483    rnoContent = /^(?:GET|HEAD)$/,
8484    rprotocol = /^\/\//,
8485    /* Prefilters
8486     * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
8487     * 2) These are called:
8488     *    - BEFORE asking for a transport
8489     *    - AFTER param serialization (s.data is a string if s.processData is true)
8490     * 3) key is the dataType
8491     * 4) the catchall symbol "*" can be used
8492     * 5) execution will start with transport dataType and THEN continue down to "*" if needed
8493     */
8494    prefilters = {},
8495    /* Transports bindings
8496     * 1) key is the dataType
8497     * 2) the catchall symbol "*" can be used
8498     * 3) selection will start with transport dataType and THEN go to "*" if needed
8499     */
8500    transports = {},
8501    // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
8502    allTypes = "*/".concat("*"),
8503    // Anchor tag for parsing the document origin
8504    originAnchor = document.createElement("a");
8505  originAnchor.href = location.href;
8506
8507  // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
8508  function addToPrefiltersOrTransports(structure) {
8509    // dataTypeExpression is optional and defaults to "*"
8510    return function (dataTypeExpression, func) {
8511      if (typeof dataTypeExpression !== "string") {
8512        func = dataTypeExpression;
8513        dataTypeExpression = "*";
8514      }
8515      var dataType,
8516        i = 0,
8517        dataTypes = dataTypeExpression.toLowerCase().match(rnothtmlwhite) || [];
8518      if (isFunction(func)) {
8519        // For each dataType in the dataTypeExpression
8520        while (dataType = dataTypes[i++]) {
8521          // Prepend if requested
8522          if (dataType[0] === "+") {
8523            dataType = dataType.slice(1) || "*";
8524            (structure[dataType] = structure[dataType] || []).unshift(func);
8525
8526            // Otherwise append
8527          } else {
8528            (structure[dataType] = structure[dataType] || []).push(func);
8529          }
8530        }
8531      }
8532    };
8533  }
8534
8535  // Base inspection function for prefilters and transports
8536  function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {
8537    var inspected = {},
8538      seekingTransport = structure === transports;
8539    function inspect(dataType) {
8540      var selected;
8541      inspected[dataType] = true;
8542      jQuery.each(structure[dataType] || [], function (_, prefilterOrFactory) {
8543        var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR);
8544        if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) {
8545          options.dataTypes.unshift(dataTypeOrTransport);
8546          inspect(dataTypeOrTransport);
8547          return false;
8548        } else if (seekingTransport) {
8549          return !(selected = dataTypeOrTransport);
8550        }
8551      });
8552      return selected;
8553    }
8554    return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*");
8555  }
8556
8557  // A special extend for ajax options
8558  // that takes "flat" options (not to be deep extended)
8559  // Fixes #9887
8560  function ajaxExtend(target, src) {
8561    var key,
8562      deep,
8563      flatOptions = jQuery.ajaxSettings.flatOptions || {};
8564    for (key in src) {
8565      if (src[key] !== undefined) {
8566        (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];
8567      }
8568    }
8569    if (deep) {
8570      jQuery.extend(true, target, deep);
8571    }
8572    return target;
8573  }
8574
8575  /* Handles responses to an ajax request:
8576   * - finds the right dataType (mediates between content-type and expected dataType)
8577   * - returns the corresponding response
8578   */
8579  function ajaxHandleResponses(s, jqXHR, responses) {
8580    var ct,
8581      type,
8582      finalDataType,
8583      firstDataType,
8584      contents = s.contents,
8585      dataTypes = s.dataTypes;
8586
8587    // Remove auto dataType and get content-type in the process
8588    while (dataTypes[0] === "*") {
8589      dataTypes.shift();
8590      if (ct === undefined) {
8591        ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
8592      }
8593    }
8594
8595    // Check if we're dealing with a known content-type
8596    if (ct) {
8597      for (type in contents) {
8598        if (contents[type] && contents[type].test(ct)) {
8599          dataTypes.unshift(type);
8600          break;
8601        }
8602      }
8603    }
8604
8605    // Check to see if we have a response for the expected dataType
8606    if (dataTypes[0] in responses) {
8607      finalDataType = dataTypes[0];
8608    } else {
8609      // Try convertible dataTypes
8610      for (type in responses) {
8611        if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) {
8612          finalDataType = type;
8613          break;
8614        }
8615        if (!firstDataType) {
8616          firstDataType = type;
8617        }
8618      }
8619
8620      // Or just use first one
8621      finalDataType = finalDataType || firstDataType;
8622    }
8623
8624    // If we found a dataType
8625    // We add the dataType to the list if needed
8626    // and return the corresponding response
8627    if (finalDataType) {
8628      if (finalDataType !== dataTypes[0]) {
8629        dataTypes.unshift(finalDataType);
8630      }
8631      return responses[finalDataType];
8632    }
8633  }
8634
8635  /* Chain conversions given the request and the original response
8636   * Also sets the responseXXX fields on the jqXHR instance
8637   */
8638  function ajaxConvert(s, response, jqXHR, isSuccess) {
8639    var conv2,
8640      current,
8641      conv,
8642      tmp,
8643      prev,
8644      converters = {},
8645      // Work with a copy of dataTypes in case we need to modify it for conversion
8646      dataTypes = s.dataTypes.slice();
8647
8648    // Create converters map with lowercased keys
8649    if (dataTypes[1]) {
8650      for (conv in s.converters) {
8651        converters[conv.toLowerCase()] = s.converters[conv];
8652      }
8653    }
8654    current = dataTypes.shift();
8655
8656    // Convert to each sequential dataType
8657    while (current) {
8658      if (s.responseFields[current]) {
8659        jqXHR[s.responseFields[current]] = response;
8660      }
8661
8662      // Apply the dataFilter if provided
8663      if (!prev && isSuccess && s.dataFilter) {
8664        response = s.dataFilter(response, s.dataType);
8665      }
8666      prev = current;
8667      current = dataTypes.shift();
8668      if (current) {
8669        // There's only work to do if current dataType is non-auto
8670        if (current === "*") {
8671          current = prev;
8672
8673          // Convert response if prev dataType is non-auto and differs from current
8674        } else if (prev !== "*" && prev !== current) {
8675          // Seek a direct converter
8676          conv = converters[prev + " " + current] || converters["* " + current];
8677
8678          // If none found, seek a pair
8679          if (!conv) {
8680            for (conv2 in converters) {
8681              // If conv2 outputs current
8682              tmp = conv2.split(" ");
8683              if (tmp[1] === current) {
8684                // If prev can be converted to accepted input
8685                conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]];
8686                if (conv) {
8687                  // Condense equivalence converters
8688                  if (conv === true) {
8689                    conv = converters[conv2];
8690
8691                    // Otherwise, insert the intermediate dataType
8692                  } else if (converters[conv2] !== true) {
8693                    current = tmp[0];
8694                    dataTypes.unshift(tmp[1]);
8695                  }
8696                  break;
8697                }
8698              }
8699            }
8700          }
8701
8702          // Apply converter (if not an equivalence)
8703          if (conv !== true) {
8704            // Unless errors are allowed to bubble, catch and return them
8705            if (conv && s.throws) {
8706              response = conv(response);
8707            } else {
8708              try {
8709                response = conv(response);
8710              } catch (e) {
8711                return {
8712                  state: "parsererror",
8713                  error: conv ? e : "No conversion from " + prev + " to " + current
8714                };
8715              }
8716            }
8717          }
8718        }
8719      }
8720    }
8721    return {
8722      state: "success",
8723      data: response
8724    };
8725  }
8726  jQuery.extend({
8727    // Counter for holding the number of active queries
8728    active: 0,
8729    // Last-Modified header cache for next request
8730    lastModified: {},
8731    etag: {},
8732    ajaxSettings: {
8733      url: location.href,
8734      type: "GET",
8735      isLocal: rlocalProtocol.test(location.protocol),
8736      global: true,
8737      processData: true,
8738      async: true,
8739      contentType: "application/x-www-form-urlencoded; charset=UTF-8",
8740      /*
8741      timeout: 0,
8742      data: null,
8743      dataType: null,
8744      username: null,
8745      password: null,
8746      cache: null,
8747      throws: false,
8748      traditional: false,
8749      headers: {},
8750      */
8751
8752      accepts: {
8753        "*": allTypes,
8754        text: "text/plain",
8755        html: "text/html",
8756        xml: "application/xml, text/xml",
8757        json: "application/json, text/javascript"
8758      },
8759      contents: {
8760        xml: /\bxml\b/,
8761        html: /\bhtml/,
8762        json: /\bjson\b/
8763      },
8764      responseFields: {
8765        xml: "responseXML",
8766        text: "responseText",
8767        json: "responseJSON"
8768      },
8769      // Data converters
8770      // Keys separate source (or catchall "*") and destination types with a single space
8771      converters: {
8772        // Convert anything to text
8773        "* text": String,
8774        // Text to html (true = no transformation)
8775        "text html": true,
8776        // Evaluate text as a json expression
8777        "text json": JSON.parse,
8778        // Parse text as xml
8779        "text xml": jQuery.parseXML
8780      },
8781      // For options that shouldn't be deep extended:
8782      // you can add your own custom options here if
8783      // and when you create one that shouldn't be
8784      // deep extended (see ajaxExtend)
8785      flatOptions: {
8786        url: true,
8787        context: true
8788      }
8789    },
8790    // Creates a full fledged settings object into target
8791    // with both ajaxSettings and settings fields.
8792    // If target is omitted, writes into ajaxSettings.
8793    ajaxSetup: function ajaxSetup(target, settings) {
8794      return settings ?
8795      // Building a settings object
8796      ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) :
8797      // Extending ajaxSettings
8798      ajaxExtend(jQuery.ajaxSettings, target);
8799    },
8800    ajaxPrefilter: addToPrefiltersOrTransports(prefilters),
8801    ajaxTransport: addToPrefiltersOrTransports(transports),
8802    // Main method
8803    ajax: function ajax(url, options) {
8804      // If url is an object, simulate pre-1.5 signature
8805      if (_typeof(url) === "object") {
8806        options = url;
8807        url = undefined;
8808      }
8809
8810      // Force options to be an object
8811      options = options || {};
8812      var transport,
8813        // URL without anti-cache param
8814        cacheURL,
8815        // Response headers
8816        responseHeadersString,
8817        responseHeaders,
8818        // timeout handle
8819        timeoutTimer,
8820        // Url cleanup var
8821        urlAnchor,
8822        // Request state (becomes false upon send and true upon completion)
8823        completed,
8824        // To know if global events are to be dispatched
8825        fireGlobals,
8826        // Loop variable
8827        i,
8828        // uncached part of the url
8829        uncached,
8830        // Create the final options object
8831        s = jQuery.ajaxSetup({}, options),
8832        // Callbacks context
8833        callbackContext = s.context || s,
8834        // Context for global events is callbackContext if it is a DOM node or jQuery collection
8835        globalEventContext = s.context && (callbackContext.nodeType || callbackContext.jquery) ? jQuery(callbackContext) : jQuery.event,
8836        // Deferreds
8837        deferred = jQuery.Deferred(),
8838        completeDeferred = jQuery.Callbacks("once memory"),
8839        // Status-dependent callbacks
8840        _statusCode = s.statusCode || {},
8841        // Headers (they are sent all at once)
8842        requestHeaders = {},
8843        requestHeadersNames = {},
8844        // Default abort message
8845        strAbort = "canceled",
8846        // Fake xhr
8847        jqXHR = {
8848          readyState: 0,
8849          // Builds headers hashtable if needed
8850          getResponseHeader: function getResponseHeader(key) {
8851            var match;
8852            if (completed) {
8853              if (!responseHeaders) {
8854                responseHeaders = {};
8855                while (match = rheaders.exec(responseHeadersString)) {
8856                  responseHeaders[match[1].toLowerCase() + " "] = (responseHeaders[match[1].toLowerCase() + " "] || []).concat(match[2]);
8857                }
8858              }
8859              match = responseHeaders[key.toLowerCase() + " "];
8860            }
8861            return match == null ? null : match.join(", ");
8862          },
8863          // Raw string
8864          getAllResponseHeaders: function getAllResponseHeaders() {
8865            return completed ? responseHeadersString : null;
8866          },
8867          // Caches the header
8868          setRequestHeader: function setRequestHeader(name, value) {
8869            if (completed == null) {
8870              name = requestHeadersNames[name.toLowerCase()] = requestHeadersNames[name.toLowerCase()] || name;
8871              requestHeaders[name] = value;
8872            }
8873            return this;
8874          },
8875          // Overrides response content-type header
8876          overrideMimeType: function overrideMimeType(type) {
8877            if (completed == null) {
8878              s.mimeType = type;
8879            }
8880            return this;
8881          },
8882          // Status-dependent callbacks
8883          statusCode: function statusCode(map) {
8884            var code;
8885            if (map) {
8886              if (completed) {
8887                // Execute the appropriate callbacks
8888                jqXHR.always(map[jqXHR.status]);
8889              } else {
8890                // Lazy-add the new callbacks in a way that preserves old ones
8891                for (code in map) {
8892                  _statusCode[code] = [_statusCode[code], map[code]];
8893                }
8894              }
8895            }
8896            return this;
8897          },
8898          // Cancel the request
8899          abort: function abort(statusText) {
8900            var finalText = statusText || strAbort;
8901            if (transport) {
8902              transport.abort(finalText);
8903            }
8904            done(0, finalText);
8905            return this;
8906          }
8907        };
8908
8909      // Attach deferreds
8910      deferred.promise(jqXHR);
8911
8912      // Add protocol if not provided (prefilters might expect it)
8913      // Handle falsy url in the settings object (#10093: consistency with old signature)
8914      // We also use the url parameter if available
8915      s.url = ((url || s.url || location.href) + "").replace(rprotocol, location.protocol + "//");
8916
8917      // Alias method option to type as per ticket #12004
8918      s.type = options.method || options.type || s.method || s.type;
8919
8920      // Extract dataTypes list
8921      s.dataTypes = (s.dataType || "*").toLowerCase().match(rnothtmlwhite) || [""];
8922
8923      // A cross-domain request is in order when the origin doesn't match the current origin.
8924      if (s.crossDomain == null) {
8925        urlAnchor = document.createElement("a");
8926
8927        // Support: IE <=8 - 11, Edge 12 - 15
8928        // IE throws exception on accessing the href property if url is malformed,
8929        // e.g. http://example.com:80x/
8930        try {
8931          urlAnchor.href = s.url;
8932
8933          // Support: IE <=8 - 11 only
8934          // Anchor's host property isn't correctly set when s.url is relative
8935          urlAnchor.href = urlAnchor.href;
8936          s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== urlAnchor.protocol + "//" + urlAnchor.host;
8937        } catch (e) {
8938          // If there is an error parsing the URL, assume it is crossDomain,
8939          // it can be rejected by the transport if it is invalid
8940          s.crossDomain = true;
8941        }
8942      }
8943
8944      // Convert data if not already a string
8945      if (s.data && s.processData && typeof s.data !== "string") {
8946        s.data = jQuery.param(s.data, s.traditional);
8947      }
8948
8949      // Apply prefilters
8950      inspectPrefiltersOrTransports(prefilters, s, options, jqXHR);
8951
8952      // If request was aborted inside a prefilter, stop there
8953      if (completed) {
8954        return jqXHR;
8955      }
8956
8957      // We can fire global events as of now if asked to
8958      // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
8959      fireGlobals = jQuery.event && s.global;
8960
8961      // Watch for a new set of requests
8962      if (fireGlobals && jQuery.active++ === 0) {
8963        jQuery.event.trigger("ajaxStart");
8964      }
8965
8966      // Uppercase the type
8967      s.type = s.type.toUpperCase();
8968
8969      // Determine if request has content
8970      s.hasContent = !rnoContent.test(s.type);
8971
8972      // Save the URL in case we're toying with the If-Modified-Since
8973      // and/or If-None-Match header later on
8974      // Remove hash to simplify url manipulation
8975      cacheURL = s.url.replace(rhash, "");
8976
8977      // More options handling for requests with no content
8978      if (!s.hasContent) {
8979        // Remember the hash so we can put it back
8980        uncached = s.url.slice(cacheURL.length);
8981
8982        // If data is available and should be processed, append data to url
8983        if (s.data && (s.processData || typeof s.data === "string")) {
8984          cacheURL += (rquery.test(cacheURL) ? "&" : "?") + s.data;
8985
8986          // #9682: remove data so that it's not used in an eventual retry
8987          delete s.data;
8988        }
8989
8990        // Add or update anti-cache param if needed
8991        if (s.cache === false) {
8992          cacheURL = cacheURL.replace(rantiCache, "$1");
8993          uncached = (rquery.test(cacheURL) ? "&" : "?") + "_=" + nonce.guid++ + uncached;
8994        }
8995
8996        // Put hash and anti-cache on the URL that will be requested (gh-1732)
8997        s.url = cacheURL + uncached;
8998
8999        // Change '%20' to '+' if this is encoded form body content (gh-2658)
9000      } else if (s.data && s.processData && (s.contentType || "").indexOf("application/x-www-form-urlencoded") === 0) {
9001        s.data = s.data.replace(r20, "+");
9002      }
9003
9004      // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
9005      if (s.ifModified) {
9006        if (jQuery.lastModified[cacheURL]) {
9007          jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]);
9008        }
9009        if (jQuery.etag[cacheURL]) {
9010          jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL]);
9011        }
9012      }
9013
9014      // Set the correct header, if data is being sent
9015      if (s.data && s.hasContent && s.contentType !== false || options.contentType) {
9016        jqXHR.setRequestHeader("Content-Type", s.contentType);
9017      }
9018
9019      // Set the Accepts header for the server, depending on the dataType
9020      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["*"]);
9021
9022      // Check for headers option
9023      for (i in s.headers) {
9024        jqXHR.setRequestHeader(i, s.headers[i]);
9025      }
9026
9027      // Allow custom headers/mimetypes and early abort
9028      if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || completed)) {
9029        // Abort if not done already and return
9030        return jqXHR.abort();
9031      }
9032
9033      // Aborting is no longer a cancellation
9034      strAbort = "abort";
9035
9036      // Install callbacks on deferreds
9037      completeDeferred.add(s.complete);
9038      jqXHR.done(s.success);
9039      jqXHR.fail(s.error);
9040
9041      // Get transport
9042      transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR);
9043
9044      // If no transport, we auto-abort
9045      if (!transport) {
9046        done(-1, "No Transport");
9047      } else {
9048        jqXHR.readyState = 1;
9049
9050        // Send global event
9051        if (fireGlobals) {
9052          globalEventContext.trigger("ajaxSend", [jqXHR, s]);
9053        }
9054
9055        // If request was aborted inside ajaxSend, stop there
9056        if (completed) {
9057          return jqXHR;
9058        }
9059
9060        // Timeout
9061        if (s.async && s.timeout > 0) {
9062          timeoutTimer = window.setTimeout(function () {
9063            jqXHR.abort("timeout");
9064          }, s.timeout);
9065        }
9066        try {
9067          completed = false;
9068          transport.send(requestHeaders, done);
9069        } catch (e) {
9070          // Rethrow post-completion exceptions
9071          if (completed) {
9072            throw e;
9073          }
9074
9075          // Propagate others as results
9076          done(-1, e);
9077        }
9078      }
9079
9080      // Callback for when everything is done
9081      function done(status, nativeStatusText, responses, headers) {
9082        var isSuccess,
9083          success,
9084          error,
9085          response,
9086          modified,
9087          statusText = nativeStatusText;
9088
9089        // Ignore repeat invocations
9090        if (completed) {
9091          return;
9092        }
9093        completed = true;
9094
9095        // Clear timeout if it exists
9096        if (timeoutTimer) {
9097          window.clearTimeout(timeoutTimer);
9098        }
9099
9100        // Dereference transport for early garbage collection
9101        // (no matter how long the jqXHR object will be used)
9102        transport = undefined;
9103
9104        // Cache response headers
9105        responseHeadersString = headers || "";
9106
9107        // Set readyState
9108        jqXHR.readyState = status > 0 ? 4 : 0;
9109
9110        // Determine if successful
9111        isSuccess = status >= 200 && status < 300 || status === 304;
9112
9113        // Get response data
9114        if (responses) {
9115          response = ajaxHandleResponses(s, jqXHR, responses);
9116        }
9117
9118        // Use a noop converter for missing script
9119        if (!isSuccess && jQuery.inArray("script", s.dataTypes) > -1) {
9120          s.converters["text script"] = function () {};
9121        }
9122
9123        // Convert no matter what (that way responseXXX fields are always set)
9124        response = ajaxConvert(s, response, jqXHR, isSuccess);
9125
9126        // If successful, handle type chaining
9127        if (isSuccess) {
9128          // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
9129          if (s.ifModified) {
9130            modified = jqXHR.getResponseHeader("Last-Modified");
9131            if (modified) {
9132              jQuery.lastModified[cacheURL] = modified;
9133            }
9134            modified = jqXHR.getResponseHeader("etag");
9135            if (modified) {
9136              jQuery.etag[cacheURL] = modified;
9137            }
9138          }
9139
9140          // if no content
9141          if (status === 204 || s.type === "HEAD") {
9142            statusText = "nocontent";
9143
9144            // if not modified
9145          } else if (status === 304) {
9146            statusText = "notmodified";
9147
9148            // If we have data, let's convert it
9149          } else {
9150            statusText = response.state;
9151            success = response.data;
9152            error = response.error;
9153            isSuccess = !error;
9154          }
9155        } else {
9156          // Extract error from statusText and normalize for non-aborts
9157          error = statusText;
9158          if (status || !statusText) {
9159            statusText = "error";
9160            if (status < 0) {
9161              status = 0;
9162            }
9163          }
9164        }
9165
9166        // Set data for the fake xhr object
9167        jqXHR.status = status;
9168        jqXHR.statusText = (nativeStatusText || statusText) + "";
9169
9170        // Success/Error
9171        if (isSuccess) {
9172          deferred.resolveWith(callbackContext, [success, statusText, jqXHR]);
9173        } else {
9174          deferred.rejectWith(callbackContext, [jqXHR, statusText, error]);
9175        }
9176
9177        // Status-dependent callbacks
9178        jqXHR.statusCode(_statusCode);
9179        _statusCode = undefined;
9180        if (fireGlobals) {
9181          globalEventContext.trigger(isSuccess ? "ajaxSuccess" : "ajaxError", [jqXHR, s, isSuccess ? success : error]);
9182        }
9183
9184        // Complete
9185        completeDeferred.fireWith(callbackContext, [jqXHR, statusText]);
9186        if (fireGlobals) {
9187          globalEventContext.trigger("ajaxComplete", [jqXHR, s]);
9188
9189          // Handle the global AJAX counter
9190          if (! --jQuery.active) {
9191            jQuery.event.trigger("ajaxStop");
9192          }
9193        }
9194      }
9195      return jqXHR;
9196    },
9197    getJSON: function getJSON(url, data, callback) {
9198      return jQuery.get(url, data, callback, "json");
9199    },
9200    getScript: function getScript(url, callback) {
9201      return jQuery.get(url, undefined, callback, "script");
9202    }
9203  });
9204  jQuery.each(["get", "post"], function (_i, method) {
9205    jQuery[method] = function (url, data, callback, type) {
9206      // Shift arguments if data argument was omitted
9207      if (isFunction(data)) {
9208        type = type || callback;
9209        callback = data;
9210        data = undefined;
9211      }
9212
9213      // The url can be an options object (which then must have .url)
9214      return jQuery.ajax(jQuery.extend({
9215        url: url,
9216        type: method,
9217        dataType: type,
9218        data: data,
9219        success: callback
9220      }, jQuery.isPlainObject(url) && url));
9221    };
9222  });
9223  jQuery.ajaxPrefilter(function (s) {
9224    var i;
9225    for (i in s.headers) {
9226      if (i.toLowerCase() === "content-type") {
9227        s.contentType = s.headers[i] || "";
9228      }
9229    }
9230  });
9231  jQuery._evalUrl = function (url, options, doc) {
9232    return jQuery.ajax({
9233      url: url,
9234      // Make this explicit, since user can override this through ajaxSetup (#11264)
9235      type: "GET",
9236      dataType: "script",
9237      cache: true,
9238      async: false,
9239      global: false,
9240      // Only evaluate the response if it is successful (gh-4126)
9241      // dataFilter is not invoked for failure responses, so using it instead
9242      // of the default converter is kludgy but it works.
9243      converters: {
9244        "text script": function textScript() {}
9245      },
9246      dataFilter: function dataFilter(response) {
9247        jQuery.globalEval(response, options, doc);
9248      }
9249    });
9250  };
9251  jQuery.fn.extend({
9252    wrapAll: function wrapAll(html) {
9253      var wrap;
9254      if (this[0]) {
9255        if (isFunction(html)) {
9256          html = html.call(this[0]);
9257        }
9258
9259        // The elements to wrap the target around
9260        wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true);
9261        if (this[0].parentNode) {
9262          wrap.insertBefore(this[0]);
9263        }
9264        wrap.map(function () {
9265          var elem = this;
9266          while (elem.firstElementChild) {
9267            elem = elem.firstElementChild;
9268          }
9269          return elem;
9270        }).append(this);
9271      }
9272      return this;
9273    },
9274    wrapInner: function wrapInner(html) {
9275      if (isFunction(html)) {
9276        return this.each(function (i) {
9277          jQuery(this).wrapInner(html.call(this, i));
9278        });
9279      }
9280      return this.each(function () {
9281        var self = jQuery(this),
9282          contents = self.contents();
9283        if (contents.length) {
9284          contents.wrapAll(html);
9285        } else {
9286          self.append(html);
9287        }
9288      });
9289    },
9290    wrap: function wrap(html) {
9291      var htmlIsFunction = isFunction(html);
9292      return this.each(function (i) {
9293        jQuery(this).wrapAll(htmlIsFunction ? html.call(this, i) : html);
9294      });
9295    },
9296    unwrap: function unwrap(selector) {
9297      this.parent(selector).not("body").each(function () {
9298        jQuery(this).replaceWith(this.childNodes);
9299      });
9300      return this;
9301    }
9302  });
9303  jQuery.expr.pseudos.hidden = function (elem) {
9304    return !jQuery.expr.pseudos.visible(elem);
9305  };
9306  jQuery.expr.pseudos.visible = function (elem) {
9307    return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);
9308  };
9309  jQuery.ajaxSettings.xhr = function () {
9310    try {
9311      return new window.XMLHttpRequest();
9312    } catch (e) {}
9313  };
9314  var xhrSuccessStatus = {
9315      // File protocol always yields status code 0, assume 200
9316      0: 200,
9317      // Support: IE <=9 only
9318      // #1450: sometimes IE returns 1223 when it should be 204
9319      1223: 204
9320    },
9321    xhrSupported = jQuery.ajaxSettings.xhr();
9322  support.cors = !!xhrSupported && "withCredentials" in xhrSupported;
9323  support.ajax = xhrSupported = !!xhrSupported;
9324  jQuery.ajaxTransport(function (options) {
9325    var _callback, errorCallback;
9326
9327    // Cross domain only allowed if supported through XMLHttpRequest
9328    if (support.cors || xhrSupported && !options.crossDomain) {
9329      return {
9330        send: function send(headers, complete) {
9331          var i,
9332            xhr = options.xhr();
9333          xhr.open(options.type, options.url, options.async, options.username, options.password);
9334
9335          // Apply custom fields if provided
9336          if (options.xhrFields) {
9337            for (i in options.xhrFields) {
9338              xhr[i] = options.xhrFields[i];
9339            }
9340          }
9341
9342          // Override mime type if needed
9343          if (options.mimeType && xhr.overrideMimeType) {
9344            xhr.overrideMimeType(options.mimeType);
9345          }
9346
9347          // X-Requested-With header
9348          // For cross-domain requests, seeing as conditions for a preflight are
9349          // akin to a jigsaw puzzle, we simply never set it to be sure.
9350          // (it can always be set on a per-request basis or even using ajaxSetup)
9351          // For same-domain requests, won't change header if already provided.
9352          if (!options.crossDomain && !headers["X-Requested-With"]) {
9353            headers["X-Requested-With"] = "XMLHttpRequest";
9354          }
9355
9356          // Set headers
9357          for (i in headers) {
9358            xhr.setRequestHeader(i, headers[i]);
9359          }
9360
9361          // Callback
9362          _callback = function callback(type) {
9363            return function () {
9364              if (_callback) {
9365                _callback = errorCallback = xhr.onload = xhr.onerror = xhr.onabort = xhr.ontimeout = xhr.onreadystatechange = null;
9366                if (type === "abort") {
9367                  xhr.abort();
9368                } else if (type === "error") {
9369                  // Support: IE <=9 only
9370                  // On a manual native abort, IE9 throws
9371                  // errors on any property access that is not readyState
9372                  if (typeof xhr.status !== "number") {
9373                    complete(0, "error");
9374                  } else {
9375                    complete(
9376                    // File: protocol always yields status 0; see #8605, #14207
9377                    xhr.status, xhr.statusText);
9378                  }
9379                } else {
9380                  complete(xhrSuccessStatus[xhr.status] || xhr.status, xhr.statusText,
9381                  // Support: IE <=9 only
9382                  // IE9 has no XHR2 but throws on binary (trac-11426)
9383                  // For XHR2 non-text, let the caller handle it (gh-2498)
9384                  (xhr.responseType || "text") !== "text" || typeof xhr.responseText !== "string" ? {
9385                    binary: xhr.response
9386                  } : {
9387                    text: xhr.responseText
9388                  }, xhr.getAllResponseHeaders());
9389                }
9390              }
9391            };
9392          };
9393
9394          // Listen to events
9395          xhr.onload = _callback();
9396          errorCallback = xhr.onerror = xhr.ontimeout = _callback("error");
9397
9398          // Support: IE 9 only
9399          // Use onreadystatechange to replace onabort
9400          // to handle uncaught aborts
9401          if (xhr.onabort !== undefined) {
9402            xhr.onabort = errorCallback;
9403          } else {
9404            xhr.onreadystatechange = function () {
9405              // Check readyState before timeout as it changes
9406              if (xhr.readyState === 4) {
9407                // Allow onerror to be called first,
9408                // but that will not handle a native abort
9409                // Also, save errorCallback to a variable
9410                // as xhr.onerror cannot be accessed
9411                window.setTimeout(function () {
9412                  if (_callback) {
9413                    errorCallback();
9414                  }
9415                });
9416              }
9417            };
9418          }
9419
9420          // Create the abort callback
9421          _callback = _callback("abort");
9422          try {
9423            // Do send the request (this may raise an exception)
9424            xhr.send(options.hasContent && options.data || null);
9425          } catch (e) {
9426            // #14683: Only rethrow if this hasn't been notified as an error yet
9427            if (_callback) {
9428              throw e;
9429            }
9430          }
9431        },
9432        abort: function abort() {
9433          if (_callback) {
9434            _callback();
9435          }
9436        }
9437      };
9438    }
9439  });
9440
9441  // Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
9442  jQuery.ajaxPrefilter(function (s) {
9443    if (s.crossDomain) {
9444      s.contents.script = false;
9445    }
9446  });
9447
9448  // Install script dataType
9449  jQuery.ajaxSetup({
9450    accepts: {
9451      script: "text/javascript, application/javascript, " + "application/ecmascript, application/x-ecmascript"
9452    },
9453    contents: {
9454      script: /\b(?:java|ecma)script\b/
9455    },
9456    converters: {
9457      "text script": function textScript(text) {
9458        jQuery.globalEval(text);
9459        return text;
9460      }
9461    }
9462  });
9463
9464  // Handle cache's special case and crossDomain
9465  jQuery.ajaxPrefilter("script", function (s) {
9466    if (s.cache === undefined) {
9467      s.cache = false;
9468    }
9469    if (s.crossDomain) {
9470      s.type = "GET";
9471    }
9472  });
9473
9474  // Bind script tag hack transport
9475  jQuery.ajaxTransport("script", function (s) {
9476    // This transport only deals with cross domain or forced-by-attrs requests
9477    if (s.crossDomain || s.scriptAttrs) {
9478      var script, _callback2;
9479      return {
9480        send: function send(_, complete) {
9481          script = jQuery("<script>").attr(s.scriptAttrs || {}).prop({
9482            charset: s.scriptCharset,
9483            src: s.url
9484          }).on("load error", _callback2 = function callback(evt) {
9485            script.remove();
9486            _callback2 = null;
9487            if (evt) {
9488              complete(evt.type === "error" ? 404 : 200, evt.type);
9489            }
9490          });
9491
9492          // Use native DOM manipulation to avoid our domManip AJAX trickery
9493          document.head.appendChild(script[0]);
9494        },
9495        abort: function abort() {
9496          if (_callback2) {
9497            _callback2();
9498          }
9499        }
9500      };
9501    }
9502  });
9503  var oldCallbacks = [],
9504    rjsonp = /(=)\?(?=&|$)|\?\?/;
9505
9506  // Default jsonp settings
9507  jQuery.ajaxSetup({
9508    jsonp: "callback",
9509    jsonpCallback: function jsonpCallback() {
9510      var callback = oldCallbacks.pop() || jQuery.expando + "_" + nonce.guid++;
9511      this[callback] = true;
9512      return callback;
9513    }
9514  });
9515
9516  // Detect, normalize options and install callbacks for jsonp requests
9517  jQuery.ajaxPrefilter("json jsonp", function (s, originalSettings, jqXHR) {
9518    var callbackName,
9519      overwritten,
9520      responseContainer,
9521      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");
9522
9523    // Handle iff the expected data type is "jsonp" or we have a parameter to set
9524    if (jsonProp || s.dataTypes[0] === "jsonp") {
9525      // Get callback name, remembering preexisting value associated with it
9526      callbackName = s.jsonpCallback = isFunction(s.jsonpCallback) ? s.jsonpCallback() : s.jsonpCallback;
9527
9528      // Insert callback into url or form data
9529      if (jsonProp) {
9530        s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName);
9531      } else if (s.jsonp !== false) {
9532        s.url += (rquery.test(s.url) ? "&" : "?") + s.jsonp + "=" + callbackName;
9533      }
9534
9535      // Use data converter to retrieve json after script execution
9536      s.converters["script json"] = function () {
9537        if (!responseContainer) {
9538          jQuery.error(callbackName + " was not called");
9539        }
9540        return responseContainer[0];
9541      };
9542
9543      // Force json dataType
9544      s.dataTypes[0] = "json";
9545
9546      // Install callback
9547      overwritten = window[callbackName];
9548      window[callbackName] = function () {
9549        responseContainer = arguments;
9550      };
9551
9552      // Clean-up function (fires after converters)
9553      jqXHR.always(function () {
9554        // If previous value didn't exist - remove it
9555        if (overwritten === undefined) {
9556          jQuery(window).removeProp(callbackName);
9557
9558          // Otherwise restore preexisting value
9559        } else {
9560          window[callbackName] = overwritten;
9561        }
9562
9563        // Save back as free
9564        if (s[callbackName]) {
9565          // Make sure that re-using the options doesn't screw things around
9566          s.jsonpCallback = originalSettings.jsonpCallback;
9567
9568          // Save the callback name for future use
9569          oldCallbacks.push(callbackName);
9570        }
9571
9572        // Call if it was a function and we have a response
9573        if (responseContainer && isFunction(overwritten)) {
9574          overwritten(responseContainer[0]);
9575        }
9576        responseContainer = overwritten = undefined;
9577      });
9578
9579      // Delegate to script
9580      return "script";
9581    }
9582  });
9583
9584  // Support: Safari 8 only
9585  // In Safari 8 documents created via document.implementation.createHTMLDocument
9586  // collapse sibling forms: the second one becomes a child of the first one.
9587  // Because of that, this security measure has to be disabled in Safari 8.
9588  // https://bugs.webkit.org/show_bug.cgi?id=137337
9589  support.createHTMLDocument = function () {
9590    var body = document.implementation.createHTMLDocument("").body;
9591    body.innerHTML = "<form></form><form></form>";
9592    return body.childNodes.length === 2;
9593  }();
9594
9595  // Argument "data" should be string of html
9596  // context (optional): If specified, the fragment will be created in this context,
9597  // defaults to document
9598  // keepScripts (optional): If true, will include scripts passed in the html string
9599  jQuery.parseHTML = function (data, context, keepScripts) {
9600    if (typeof data !== "string") {
9601      return [];
9602    }
9603    if (typeof context === "boolean") {
9604      keepScripts = context;
9605      context = false;
9606    }
9607    var base, parsed, scripts;
9608    if (!context) {
9609      // Stop scripts or inline event handlers from being executed immediately
9610      // by using document.implementation
9611      if (support.createHTMLDocument) {
9612        context = document.implementation.createHTMLDocument("");
9613
9614        // Set the base href for the created document
9615        // so any parsed elements with URLs
9616        // are based on the document's URL (gh-2965)
9617        base = context.createElement("base");
9618        base.href = document.location.href;
9619        context.head.appendChild(base);
9620      } else {
9621        context = document;
9622      }
9623    }
9624    parsed = rsingleTag.exec(data);
9625    scripts = !keepScripts && [];
9626
9627    // Single tag
9628    if (parsed) {
9629      return [context.createElement(parsed[1])];
9630    }
9631    parsed = buildFragment([data], context, scripts);
9632    if (scripts && scripts.length) {
9633      jQuery(scripts).remove();
9634    }
9635    return jQuery.merge([], parsed.childNodes);
9636  };
9637
9638  /**
9639   * Load a url into a page
9640   */
9641  jQuery.fn.load = function (url, params, callback) {
9642    var selector,
9643      type,
9644      response,
9645      self = this,
9646      off = url.indexOf(" ");
9647    if (off > -1) {
9648      selector = stripAndCollapse(url.slice(off));
9649      url = url.slice(0, off);
9650    }
9651
9652    // If it's a function
9653    if (isFunction(params)) {
9654      // We assume that it's the callback
9655      callback = params;
9656      params = undefined;
9657
9658      // Otherwise, build a param string
9659    } else if (params && _typeof(params) === "object") {
9660      type = "POST";
9661    }
9662
9663    // If we have elements to modify, make the request
9664    if (self.length > 0) {
9665      jQuery.ajax({
9666        url: url,
9667        // If "type" variable is undefined, then "GET" method will be used.
9668        // Make value of this field explicit since
9669        // user can override it through ajaxSetup method
9670        type: type || "GET",
9671        dataType: "html",
9672        data: params
9673      }).done(function (responseText) {
9674        // Save response for use in complete callback
9675        response = arguments;
9676        self.html(selector ?
9677        // If a selector was specified, locate the right elements in a dummy div
9678        // Exclude scripts to avoid IE 'Permission Denied' errors
9679        jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector) :
9680        // Otherwise use the full result
9681        responseText);
9682
9683        // If the request succeeds, this function gets "data", "status", "jqXHR"
9684        // but they are ignored because response was set above.
9685        // If it fails, this function gets "jqXHR", "status", "error"
9686      }).always(callback && function (jqXHR, status) {
9687        self.each(function () {
9688          callback.apply(this, response || [jqXHR.responseText, status, jqXHR]);
9689        });
9690      });
9691    }
9692    return this;
9693  };
9694  jQuery.expr.pseudos.animated = function (elem) {
9695    return jQuery.grep(jQuery.timers, function (fn) {
9696      return elem === fn.elem;
9697    }).length;
9698  };
9699  jQuery.offset = {
9700    setOffset: function setOffset(elem, options, i) {
9701      var curPosition,
9702        curLeft,
9703        curCSSTop,
9704        curTop,
9705        curOffset,
9706        curCSSLeft,
9707        calculatePosition,
9708        position = jQuery.css(elem, "position"),
9709        curElem = jQuery(elem),
9710        props = {};
9711
9712      // Set position first, in-case top/left are set even on static elem
9713      if (position === "static") {
9714        elem.style.position = "relative";
9715      }
9716      curOffset = curElem.offset();
9717      curCSSTop = jQuery.css(elem, "top");
9718      curCSSLeft = jQuery.css(elem, "left");
9719      calculatePosition = (position === "absolute" || position === "fixed") && (curCSSTop + curCSSLeft).indexOf("auto") > -1;
9720
9721      // Need to be able to calculate position if either
9722      // top or left is auto and position is either absolute or fixed
9723      if (calculatePosition) {
9724        curPosition = curElem.position();
9725        curTop = curPosition.top;
9726        curLeft = curPosition.left;
9727      } else {
9728        curTop = parseFloat(curCSSTop) || 0;
9729        curLeft = parseFloat(curCSSLeft) || 0;
9730      }
9731      if (isFunction(options)) {
9732        // Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
9733        options = options.call(elem, i, jQuery.extend({}, curOffset));
9734      }
9735      if (options.top != null) {
9736        props.top = options.top - curOffset.top + curTop;
9737      }
9738      if (options.left != null) {
9739        props.left = options.left - curOffset.left + curLeft;
9740      }
9741      if ("using" in options) {
9742        options.using.call(elem, props);
9743      } else {
9744        if (typeof props.top === "number") {
9745          props.top += "px";
9746        }
9747        if (typeof props.left === "number") {
9748          props.left += "px";
9749        }
9750        curElem.css(props);
9751      }
9752    }
9753  };
9754  jQuery.fn.extend({
9755    // offset() relates an element's border box to the document origin
9756    offset: function offset(options) {
9757      // Preserve chaining for setter
9758      if (arguments.length) {
9759        return options === undefined ? this : this.each(function (i) {
9760          jQuery.offset.setOffset(this, options, i);
9761        });
9762      }
9763      var rect,
9764        win,
9765        elem = this[0];
9766      if (!elem) {
9767        return;
9768      }
9769
9770      // Return zeros for disconnected and hidden (display: none) elements (gh-2310)
9771      // Support: IE <=11 only
9772      // Running getBoundingClientRect on a
9773      // disconnected node in IE throws an error
9774      if (!elem.getClientRects().length) {
9775        return {
9776          top: 0,
9777          left: 0
9778        };
9779      }
9780
9781      // Get document-relative position by adding viewport scroll to viewport-relative gBCR
9782      rect = elem.getBoundingClientRect();
9783      win = elem.ownerDocument.defaultView;
9784      return {
9785        top: rect.top + win.pageYOffset,
9786        left: rect.left + win.pageXOffset
9787      };
9788    },
9789    // position() relates an element's margin box to its offset parent's padding box
9790    // This corresponds to the behavior of CSS absolute positioning
9791    position: function position() {
9792      if (!this[0]) {
9793        return;
9794      }
9795      var offsetParent,
9796        offset,
9797        doc,
9798        elem = this[0],
9799        parentOffset = {
9800          top: 0,
9801          left: 0
9802        };
9803
9804      // position:fixed elements are offset from the viewport, which itself always has zero offset
9805      if (jQuery.css(elem, "position") === "fixed") {
9806        // Assume position:fixed implies availability of getBoundingClientRect
9807        offset = elem.getBoundingClientRect();
9808      } else {
9809        offset = this.offset();
9810
9811        // Account for the *real* offset parent, which can be the document or its root element
9812        // when a statically positioned element is identified
9813        doc = elem.ownerDocument;
9814        offsetParent = elem.offsetParent || doc.documentElement;
9815        while (offsetParent && (offsetParent === doc.body || offsetParent === doc.documentElement) && jQuery.css(offsetParent, "position") === "static") {
9816          offsetParent = offsetParent.parentNode;
9817        }
9818        if (offsetParent && offsetParent !== elem && offsetParent.nodeType === 1) {
9819          // Incorporate borders into its offset, since they are outside its content origin
9820          parentOffset = jQuery(offsetParent).offset();
9821          parentOffset.top += jQuery.css(offsetParent, "borderTopWidth", true);
9822          parentOffset.left += jQuery.css(offsetParent, "borderLeftWidth", true);
9823        }
9824      }
9825
9826      // Subtract parent offsets and element margins
9827      return {
9828        top: offset.top - parentOffset.top - jQuery.css(elem, "marginTop", true),
9829        left: offset.left - parentOffset.left - jQuery.css(elem, "marginLeft", true)
9830      };
9831    },
9832    // This method will return documentElement in the following cases:
9833    // 1) For the element inside the iframe without offsetParent, this method will return
9834    //    documentElement of the parent window
9835    // 2) For the hidden or detached element
9836    // 3) For body or html element, i.e. in case of the html node - it will return itself
9837    //
9838    // but those exceptions were never presented as a real life use-cases
9839    // and might be considered as more preferable results.
9840    //
9841    // This logic, however, is not guaranteed and can change at any point in the future
9842    offsetParent: function offsetParent() {
9843      return this.map(function () {
9844        var offsetParent = this.offsetParent;
9845        while (offsetParent && jQuery.css(offsetParent, "position") === "static") {
9846          offsetParent = offsetParent.offsetParent;
9847        }
9848        return offsetParent || documentElement;
9849      });
9850    }
9851  });
9852
9853  // Create scrollLeft and scrollTop methods
9854  jQuery.each({
9855    scrollLeft: "pageXOffset",
9856    scrollTop: "pageYOffset"
9857  }, function (method, prop) {
9858    var top = "pageYOffset" === prop;
9859    jQuery.fn[method] = function (val) {
9860      return access(this, function (elem, method, val) {
9861        // Coalesce documents and windows
9862        var win;
9863        if (isWindow(elem)) {
9864          win = elem;
9865        } else if (elem.nodeType === 9) {
9866          win = elem.defaultView;
9867        }
9868        if (val === undefined) {
9869          return win ? win[prop] : elem[method];
9870        }
9871        if (win) {
9872          win.scrollTo(!top ? val : win.pageXOffset, top ? val : win.pageYOffset);
9873        } else {
9874          elem[method] = val;
9875        }
9876      }, method, val, arguments.length);
9877    };
9878  });
9879
9880  // Support: Safari <=7 - 9.1, Chrome <=37 - 49
9881  // Add the top/left cssHooks using jQuery.fn.position
9882  // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
9883  // Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
9884  // getComputedStyle returns percent when specified for top/left/bottom/right;
9885  // rather than make the css module depend on the offset module, just check for it here
9886  jQuery.each(["top", "left"], function (_i, prop) {
9887    jQuery.cssHooks[prop] = addGetHookIf(support.pixelPosition, function (elem, computed) {
9888      if (computed) {
9889        computed = curCSS(elem, prop);
9890
9891        // If curCSS returns percentage, fallback to offset
9892        return rnumnonpx.test(computed) ? jQuery(elem).position()[prop] + "px" : computed;
9893      }
9894    });
9895  });
9896
9897  // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
9898  jQuery.each({
9899    Height: "height",
9900    Width: "width"
9901  }, function (name, type) {
9902    jQuery.each({
9903      padding: "inner" + name,
9904      content: type,
9905      "": "outer" + name
9906    }, function (defaultExtra, funcName) {
9907      // Margin is only for outerHeight, outerWidth
9908      jQuery.fn[funcName] = function (margin, value) {
9909        var chainable = arguments.length && (defaultExtra || typeof margin !== "boolean"),
9910          extra = defaultExtra || (margin === true || value === true ? "margin" : "border");
9911        return access(this, function (elem, type, value) {
9912          var doc;
9913          if (isWindow(elem)) {
9914            // $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
9915            return funcName.indexOf("outer") === 0 ? elem["inner" + name] : elem.document.documentElement["client" + name];
9916          }
9917
9918          // Get document width or height
9919          if (elem.nodeType === 9) {
9920            doc = elem.documentElement;
9921
9922            // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
9923            // whichever is greatest
9924            return Math.max(elem.body["scroll" + name], doc["scroll" + name], elem.body["offset" + name], doc["offset" + name], doc["client" + name]);
9925          }
9926          return value === undefined ?
9927          // Get width or height on the element, requesting but not forcing parseFloat
9928          jQuery.css(elem, type, extra) :
9929          // Set width or height on the element
9930          jQuery.style(elem, type, value, extra);
9931        }, type, chainable ? margin : undefined, chainable);
9932      };
9933    });
9934  });
9935  jQuery.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (_i, type) {
9936    jQuery.fn[type] = function (fn) {
9937      return this.on(type, fn);
9938    };
9939  });
9940  jQuery.fn.extend({
9941    bind: function bind(types, data, fn) {
9942      return this.on(types, null, data, fn);
9943    },
9944    unbind: function unbind(types, fn) {
9945      return this.off(types, null, fn);
9946    },
9947    delegate: function delegate(selector, types, data, fn) {
9948      return this.on(types, selector, data, fn);
9949    },
9950    undelegate: function undelegate(selector, types, fn) {
9951      // ( namespace ) or ( selector, types [, fn] )
9952      return arguments.length === 1 ? this.off(selector, "**") : this.off(types, selector || "**", fn);
9953    },
9954    hover: function hover(fnOver, fnOut) {
9955      return this.mouseenter(fnOver).mouseleave(fnOut || fnOver);
9956    }
9957  });
9958  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) {
9959    // Handle event binding
9960    jQuery.fn[name] = function (data, fn) {
9961      return arguments.length > 0 ? this.on(name, null, data, fn) : this.trigger(name);
9962    };
9963  });
9964
9965  // Support: Android <=4.0 only
9966  // Make sure we trim BOM and NBSP
9967  var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
9968
9969  // Bind a function to a context, optionally partially applying any
9970  // arguments.
9971  // jQuery.proxy is deprecated to promote standards (specifically Function#bind)
9972  // However, it is not slated for removal any time soon
9973  jQuery.proxy = function (fn, context) {
9974    var tmp, args, proxy;
9975    if (typeof context === "string") {
9976      tmp = fn[context];
9977      context = fn;
9978      fn = tmp;
9979    }
9980
9981    // Quick check to determine if target is callable, in the spec
9982    // this throws a TypeError, but we will just return undefined.
9983    if (!isFunction(fn)) {
9984      return undefined;
9985    }
9986
9987    // Simulated bind
9988    args = _slice.call(arguments, 2);
9989    proxy = function proxy() {
9990      return fn.apply(context || this, args.concat(_slice.call(arguments)));
9991    };
9992
9993    // Set the guid of unique handler to the same of original handler, so it can be removed
9994    proxy.guid = fn.guid = fn.guid || jQuery.guid++;
9995    return proxy;
9996  };
9997  jQuery.holdReady = function (hold) {
9998    if (hold) {
9999      jQuery.readyWait++;
10000    } else {
10001      jQuery.ready(true);
10002    }
10003  };
10004  jQuery.isArray = Array.isArray;
10005  jQuery.parseJSON = JSON.parse;
10006  jQuery.nodeName = nodeName;
10007  jQuery.isFunction = isFunction;
10008  jQuery.isWindow = isWindow;
10009  jQuery.camelCase = camelCase;
10010  jQuery.type = toType;
10011  jQuery.now = Date.now;
10012  jQuery.isNumeric = function (obj) {
10013    // As of jQuery 3.0, isNumeric is limited to
10014    // strings and numbers (primitives or objects)
10015    // that can be coerced to finite numbers (gh-2662)
10016    var type = jQuery.type(obj);
10017    return (type === "number" || type === "string") &&
10018    // parseFloat NaNs numeric-cast false positives ("")
10019    // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
10020    // subtraction forces infinities to NaN
10021    !isNaN(obj - parseFloat(obj));
10022  };
10023  jQuery.trim = function (text) {
10024    return text == null ? "" : (text + "").replace(rtrim, "");
10025  };
10026
10027  // Register as a named AMD module, since jQuery can be concatenated with other
10028  // files that may use define, but not via a proper concatenation script that
10029  // understands anonymous AMD modules. A named AMD is safest and most robust
10030  // way to register. Lowercase jquery is used because AMD module names are
10031  // derived from file names, and jQuery is normally delivered in a lowercase
10032  // file name. Do this after creating the global so that if an AMD module wants
10033  // to call noConflict to hide this version of jQuery, it will work.
10034
10035  // Note that for maximum portability, libraries that are not jQuery should
10036  // declare themselves as anonymous modules, and avoid setting a global if an
10037  // AMD loader is present. jQuery is a special case. For more information, see
10038  // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
10039
10040  if (true) {
10041    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
10042      return jQuery;
10043    }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
10044				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
10045  }
10046  var
10047    // Map over jQuery in case of overwrite
10048    _jQuery = window.jQuery,
10049    // Map over the $ in case of overwrite
10050    _$ = window.$;
10051  jQuery.noConflict = function (deep) {
10052    if (window.$ === jQuery) {
10053      window.$ = _$;
10054    }
10055    if (deep && window.jQuery === jQuery) {
10056      window.jQuery = _jQuery;
10057    }
10058    return jQuery;
10059  };
10060
10061  // Expose jQuery and $ identifiers, even in AMD
10062  // (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
10063  // and CommonJS for browser emulators (#13566)
10064  if (typeof noGlobal === "undefined") {
10065    window.jQuery = window.$ = jQuery;
10066  }
10067  return jQuery;
10068});
10069/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
10070
10071/***/ }),
10072
vendor: 448 bytes, lines 10073-10087
10073/***/ "./node_modules/lodash/_Symbol.js":
10074/*!****************************************!*\
10075  !*** ./node_modules/lodash/_Symbol.js ***!
10076  \****************************************/
10077/*! no static exports found */
10078/***/ (function(module, exports, __webpack_require__) {
10079
10080var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
10081
10082/** Built-in value references. */
10083var _Symbol = root.Symbol;
10084module.exports = _Symbol;
10085
10086/***/ }),
10087
vendor: 1,240 bytes, lines 10088-10122
10088/***/ "./node_modules/lodash/_baseGetTag.js":
10089/*!********************************************!*\
10090  !*** ./node_modules/lodash/_baseGetTag.js ***!
10091  \********************************************/
10092/*! no static exports found */
10093/***/ (function(module, exports, __webpack_require__) {
10094
10095var _Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
10096  getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/lodash/_getRawTag.js"),
10097  objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/lodash/_objectToString.js");
10098
10099/** `Object#toString` result references. */
10100var nullTag = '[object Null]',
10101  undefinedTag = '[object Undefined]';
10102
10103/** Built-in value references. */
10104var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
10105
10106/**
10107 * The base implementation of `getTag` without fallbacks for buggy environments.
10108 *
10109 * @private
10110 * @param {*} value The value to query.
10111 * @returns {string} Returns the `toStringTag`.
10112 */
10113function baseGetTag(value) {
10114  if (value == null) {
10115    return value === undefined ? undefinedTag : nullTag;
10116  }
10117  return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
10118}
10119module.exports = baseGetTag;
10120
10121/***/ }),
10122
vendor: 783 bytes, lines 10123-10148
10123/***/ "./node_modules/lodash/_baseTrim.js":
10124/*!******************************************!*\
10125  !*** ./node_modules/lodash/_baseTrim.js ***!
10126  \******************************************/
10127/*! no static exports found */
10128/***/ (function(module, exports, __webpack_require__) {
10129
10130var trimmedEndIndex = __webpack_require__(/*! ./_trimmedEndIndex */ "./node_modules/lodash/_trimmedEndIndex.js");
10131
10132/** Used to match leading whitespace. */
10133var reTrimStart = /^\s+/;
10134
10135/**
10136 * The base implementation of `_.trim`.
10137 *
10138 * @private
10139 * @param {string} string The string to trim.
10140 * @returns {string} Returns the trimmed string.
10141 */
10142function baseTrim(string) {
10143  return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') : string;
10144}
10145module.exports = baseTrim;
10146
10147/***/ }),
10148
vendor: 1,044 bytes, lines 10149-10163
10149/***/ "./node_modules/lodash/_freeGlobal.js":
10150/*!********************************************!*\
10151  !*** ./node_modules/lodash/_freeGlobal.js ***!
10152  \********************************************/
10153/*! no static exports found */
10154/***/ (function(module, exports, __webpack_require__) {
10155
10156/* WEBPACK VAR INJECTION */(function(global) {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); }
10157/** Detect free variable `global` from Node.js. */
10158var freeGlobal = (typeof global === "undefined" ? "undefined" : _typeof(global)) == 'object' && global && global.Object === Object && global;
10159module.exports = freeGlobal;
10160/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
10161
10162/***/ }),
10163
vendor: 1,480 bytes, lines 10164-10216
10164/***/ "./node_modules/lodash/_getRawTag.js":
10165/*!*******************************************!*\
10166  !*** ./node_modules/lodash/_getRawTag.js ***!
10167  \*******************************************/
10168/*! no static exports found */
10169/***/ (function(module, exports, __webpack_require__) {
10170
10171var _Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js");
10172
10173/** Used for built-in method references. */
10174var objectProto = Object.prototype;
10175
10176/** Used to check objects for own properties. */
10177var hasOwnProperty = objectProto.hasOwnProperty;
10178
10179/**
10180 * Used to resolve the
10181 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
10182 * of values.
10183 */
10184var nativeObjectToString = objectProto.toString;
10185
10186/** Built-in value references. */
10187var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
10188
10189/**
10190 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
10191 *
10192 * @private
10193 * @param {*} value The value to query.
10194 * @returns {string} Returns the raw `toStringTag`.
10195 */
10196function getRawTag(value) {
10197  var isOwn = hasOwnProperty.call(value, symToStringTag),
10198    tag = value[symToStringTag];
10199  try {
10200    value[symToStringTag] = undefined;
10201    var unmasked = true;
10202  } catch (e) {}
10203  var result = nativeObjectToString.call(value);
10204  if (unmasked) {
10205    if (isOwn) {
10206      value[symToStringTag] = tag;
10207    } else {
10208      delete value[symToStringTag];
10209    }
10210  }
10211  return result;
10212}
10213module.exports = getRawTag;
10214
10215/***/ }),
10216
vendor: 854 bytes, lines 10217-10247
10217/***/ "./node_modules/lodash/_objectToString.js":
10218/*!************************************************!*\
10219  !*** ./node_modules/lodash/_objectToString.js ***!
10220  \************************************************/
10221/*! no static exports found */
10222/***/ (function(module, exports) {
10223
10224/** Used for built-in method references. */
10225var objectProto = Object.prototype;
10226
10227/**
10228 * Used to resolve the
10229 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
10230 * of values.
10231 */
10232var nativeObjectToString = objectProto.toString;
10233
10234/**
10235 * Converts `value` to a string using `Object.prototype.toString`.
10236 *
10237 * @private
10238 * @param {*} value The value to convert.
10239 * @returns {string} Returns the converted string.
10240 */
10241function objectToString(value) {
10242  return nativeObjectToString.call(value);
10243}
10244module.exports = objectToString;
10245
10246/***/ }),
10247
vendor: 1,011 bytes, lines 10248-10266
10248/***/ "./node_modules/lodash/_root.js":
10249/*!**************************************!*\
10250  !*** ./node_modules/lodash/_root.js ***!
10251  \**************************************/
10252/*! no static exports found */
10253/***/ (function(module, exports, __webpack_require__) {
10254
10255function _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); }
10256var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js");
10257
10258/** Detect free variable `self`. */
10259var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof(self)) == 'object' && self && self.Object === Object && self;
10260
10261/** Used as a reference to the global object. */
10262var root = freeGlobal || freeSelf || Function('return this')();
10263module.exports = root;
10264
10265/***/ }),
10266
vendor: 807 bytes, lines 10267-10293
10267/***/ "./node_modules/lodash/_trimmedEndIndex.js":
10268/*!*************************************************!*\
10269  !*** ./node_modules/lodash/_trimmedEndIndex.js ***!
10270  \*************************************************/
10271/*! no static exports found */
10272/***/ (function(module, exports) {
10273
10274/** Used to match a single whitespace character. */
10275var reWhitespace = /\s/;
10276
10277/**
10278 * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
10279 * character of `string`.
10280 *
10281 * @private
10282 * @param {string} string The string to inspect.
10283 * @returns {number} Returns the index of the last non-whitespace character.
10284 */
10285function trimmedEndIndex(string) {
10286  var index = string.length;
10287  while (index-- && reWhitespace.test(string.charAt(index))) {}
10288  return index;
10289}
10290module.exports = trimmedEndIndex;
10291
10292/***/ }),
10293
vendor: 6,462 bytes, lines 10294-10476
10294/***/ "./node_modules/lodash/debounce.js":
10295/*!*****************************************!*\
10296  !*** ./node_modules/lodash/debounce.js ***!
10297  \*****************************************/
10298/*! no static exports found */
10299/***/ (function(module, exports, __webpack_require__) {
10300
10301var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
10302  now = __webpack_require__(/*! ./now */ "./node_modules/lodash/now.js"),
10303  toNumber = __webpack_require__(/*! ./toNumber */ "./node_modules/lodash/toNumber.js");
10304
10305/** Error message constants. */
10306var FUNC_ERROR_TEXT = 'Expected a function';
10307
10308/* Built-in method references for those with the same name as other `lodash` methods. */
10309var nativeMax = Math.max,
10310  nativeMin = Math.min;
10311
10312/**
10313 * Creates a debounced function that delays invoking `func` until after `wait`
10314 * milliseconds have elapsed since the last time the debounced function was
10315 * invoked. The debounced function comes with a `cancel` method to cancel
10316 * delayed `func` invocations and a `flush` method to immediately invoke them.
10317 * Provide `options` to indicate whether `func` should be invoked on the
10318 * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
10319 * with the last arguments provided to the debounced function. Subsequent
10320 * calls to the debounced function return the result of the last `func`
10321 * invocation.
10322 *
10323 * **Note:** If `leading` and `trailing` options are `true`, `func` is
10324 * invoked on the trailing edge of the timeout only if the debounced function
10325 * is invoked more than once during the `wait` timeout.
10326 *
10327 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
10328 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
10329 *
10330 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
10331 * for details over the differences between `_.debounce` and `_.throttle`.
10332 *
10333 * @static
10334 * @memberOf _
10335 * @since 0.1.0
10336 * @category Function
10337 * @param {Function} func The function to debounce.
10338 * @param {number} [wait=0] The number of milliseconds to delay.
10339 * @param {Object} [options={}] The options object.
10340 * @param {boolean} [options.leading=false]
10341 *  Specify invoking on the leading edge of the timeout.
10342 * @param {number} [options.maxWait]
10343 *  The maximum time `func` is allowed to be delayed before it's invoked.
10344 * @param {boolean} [options.trailing=true]
10345 *  Specify invoking on the trailing edge of the timeout.
10346 * @returns {Function} Returns the new debounced function.
10347 * @example
10348 *
10349 * // Avoid costly calculations while the window size is in flux.
10350 * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
10351 *
10352 * // Invoke `sendMail` when clicked, debouncing subsequent calls.
10353 * jQuery(element).on('click', _.debounce(sendMail, 300, {
10354 *   'leading': true,
10355 *   'trailing': false
10356 * }));
10357 *
10358 * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
10359 * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
10360 * var source = new EventSource('/stream');
10361 * jQuery(source).on('message', debounced);
10362 *
10363 * // Cancel the trailing debounced invocation.
10364 * jQuery(window).on('popstate', debounced.cancel);
10365 */
10366function debounce(func, wait, options) {
10367  var lastArgs,
10368    lastThis,
10369    maxWait,
10370    result,
10371    timerId,
10372    lastCallTime,
10373    lastInvokeTime = 0,
10374    leading = false,
10375    maxing = false,
10376    trailing = true;
10377  if (typeof func != 'function') {
10378    throw new TypeError(FUNC_ERROR_TEXT);
10379  }
10380  wait = toNumber(wait) || 0;
10381  if (isObject(options)) {
10382    leading = !!options.leading;
10383    maxing = 'maxWait' in options;
10384    maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
10385    trailing = 'trailing' in options ? !!options.trailing : trailing;
10386  }
10387  function invokeFunc(time) {
10388    var args = lastArgs,
10389      thisArg = lastThis;
10390    lastArgs = lastThis = undefined;
10391    lastInvokeTime = time;
10392    result = func.apply(thisArg, args);
10393    return result;
10394  }
10395  function leadingEdge(time) {
10396    // Reset any `maxWait` timer.
10397    lastInvokeTime = time;
10398    // Start the timer for the trailing edge.
10399    timerId = setTimeout(timerExpired, wait);
10400    // Invoke the leading edge.
10401    return leading ? invokeFunc(time) : result;
10402  }
10403  function remainingWait(time) {
10404    var timeSinceLastCall = time - lastCallTime,
10405      timeSinceLastInvoke = time - lastInvokeTime,
10406      timeWaiting = wait - timeSinceLastCall;
10407    return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
10408  }
10409  function shouldInvoke(time) {
10410    var timeSinceLastCall = time - lastCallTime,
10411      timeSinceLastInvoke = time - lastInvokeTime;
10412
10413    // Either this is the first call, activity has stopped and we're at the
10414    // trailing edge, the system time has gone backwards and we're treating
10415    // it as the trailing edge, or we've hit the `maxWait` limit.
10416    return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
10417  }
10418  function timerExpired() {
10419    var time = now();
10420    if (shouldInvoke(time)) {
10421      return trailingEdge(time);
10422    }
10423    // Restart the timer.
10424    timerId = setTimeout(timerExpired, remainingWait(time));
10425  }
10426  function trailingEdge(time) {
10427    timerId = undefined;
10428
10429    // Only invoke if we have `lastArgs` which means `func` has been
10430    // debounced at least once.
10431    if (trailing && lastArgs) {
10432      return invokeFunc(time);
10433    }
10434    lastArgs = lastThis = undefined;
10435    return result;
10436  }
10437  function cancel() {
10438    if (timerId !== undefined) {
10439      clearTimeout(timerId);
10440    }
10441    lastInvokeTime = 0;
10442    lastArgs = lastCallTime = lastThis = timerId = undefined;
10443  }
10444  function flush() {
10445    return timerId === undefined ? result : trailingEdge(now());
10446  }
10447  function debounced() {
10448    var time = now(),
10449      isInvoking = shouldInvoke(time);
10450    lastArgs = arguments;
10451    lastThis = this;
10452    lastCallTime = time;
10453    if (isInvoking) {
10454      if (timerId === undefined) {
10455        return leadingEdge(lastCallTime);
10456      }
10457      if (maxing) {
10458        // Handle invocations in a tight loop.
10459        clearTimeout(timerId);
10460        timerId = setTimeout(timerExpired, wait);
10461        return invokeFunc(lastCallTime);
10462      }
10463    }
10464    if (timerId === undefined) {
10465      timerId = setTimeout(timerExpired, wait);
10466    }
10467    return result;
10468  }
10469  debounced.cancel = cancel;
10470  debounced.flush = flush;
10471  return debounced;
10472}
10473module.exports = debounce;
10474
10475/***/ }),
10476
vendor: 1,333 bytes, lines 10477-10517
10477/***/ "./node_modules/lodash/isObject.js":
10478/*!*****************************************!*\
10479  !*** ./node_modules/lodash/isObject.js ***!
10480  \*****************************************/
10481/*! no static exports found */
10482/***/ (function(module, exports) {
10483
10484function _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); }
10485/**
10486 * Checks if `value` is the
10487 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
10488 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
10489 *
10490 * @static
10491 * @memberOf _
10492 * @since 0.1.0
10493 * @category Lang
10494 * @param {*} value The value to check.
10495 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
10496 * @example
10497 *
10498 * _.isObject({});
10499 * // => true
10500 *
10501 * _.isObject([1, 2, 3]);
10502 * // => true
10503 *
10504 * _.isObject(_.noop);
10505 * // => true
10506 *
10507 * _.isObject(null);
10508 * // => false
10509 */
10510function isObject(value) {
10511  var type = _typeof(value);
10512  return value != null && (type == 'object' || type == 'function');
10513}
10514module.exports = isObject;
10515
10516/***/ }),
10517
vendor: 1,230 bytes, lines 10518-10556
10518/***/ "./node_modules/lodash/isObjectLike.js":
10519/*!*********************************************!*\
10520  !*** ./node_modules/lodash/isObjectLike.js ***!
10521  \*********************************************/
10522/*! no static exports found */
10523/***/ (function(module, exports) {
10524
10525function _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); }
10526/**
10527 * Checks if `value` is object-like. A value is object-like if it's not `null`
10528 * and has a `typeof` result of "object".
10529 *
10530 * @static
10531 * @memberOf _
10532 * @since 4.0.0
10533 * @category Lang
10534 * @param {*} value The value to check.
10535 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
10536 * @example
10537 *
10538 * _.isObjectLike({});
10539 * // => true
10540 *
10541 * _.isObjectLike([1, 2, 3]);
10542 * // => true
10543 *
10544 * _.isObjectLike(_.noop);
10545 * // => false
10546 *
10547 * _.isObjectLike(null);
10548 * // => false
10549 */
10550function isObjectLike(value) {
10551  return value != null && _typeof(value) == 'object';
10552}
10553module.exports = isObjectLike;
10554
10555/***/ }),
10556
vendor: 1,408 bytes, lines 10557-10594
10557/***/ "./node_modules/lodash/isSymbol.js":
10558/*!*****************************************!*\
10559  !*** ./node_modules/lodash/isSymbol.js ***!
10560  \*****************************************/
10561/*! no static exports found */
10562/***/ (function(module, exports, __webpack_require__) {
10563
10564function _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); }
10565var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
10566  isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
10567
10568/** `Object#toString` result references. */
10569var symbolTag = '[object Symbol]';
10570
10571/**
10572 * Checks if `value` is classified as a `Symbol` primitive or object.
10573 *
10574 * @static
10575 * @memberOf _
10576 * @since 4.0.0
10577 * @category Lang
10578 * @param {*} value The value to check.
10579 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
10580 * @example
10581 *
10582 * _.isSymbol(Symbol.iterator);
10583 * // => true
10584 *
10585 * _.isSymbol('abc');
10586 * // => false
10587 */
10588function isSymbol(value) {
10589  return _typeof(value) == 'symbol' || isObjectLike(value) && baseGetTag(value) == symbolTag;
10590}
10591module.exports = isSymbol;
10592
10593/***/ }),
10594
vendor: 836 bytes, lines 10595-10626
10595/***/ "./node_modules/lodash/now.js":
10596/*!************************************!*\
10597  !*** ./node_modules/lodash/now.js ***!
10598  \************************************/
10599/*! no static exports found */
10600/***/ (function(module, exports, __webpack_require__) {
10601
10602var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
10603
10604/**
10605 * Gets the timestamp of the number of milliseconds that have elapsed since
10606 * the Unix epoch (1 January 1970 00:00:00 UTC).
10607 *
10608 * @static
10609 * @memberOf _
10610 * @since 2.4.0
10611 * @category Date
10612 * @returns {number} Returns the timestamp.
10613 * @example
10614 *
10615 * _.defer(function(stamp) {
10616 *   console.log(_.now() - stamp);
10617 * }, _.now());
10618 * // => Logs the number of milliseconds it took for the deferred invocation.
10619 */
10620var now = function now() {
10621  return root.Date.now();
10622};
10623module.exports = now;
10624
10625/***/ }),
10626
vendor: 1,943 bytes, lines 10627-10697
10627/***/ "./node_modules/lodash/toNumber.js":
10628/*!*****************************************!*\
10629  !*** ./node_modules/lodash/toNumber.js ***!
10630  \*****************************************/
10631/*! no static exports found */
10632/***/ (function(module, exports, __webpack_require__) {
10633
10634var baseTrim = __webpack_require__(/*! ./_baseTrim */ "./node_modules/lodash/_baseTrim.js"),
10635  isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
10636  isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
10637
10638/** Used as references for various `Number` constants. */
10639var NAN = 0 / 0;
10640
10641/** Used to detect bad signed hexadecimal string values. */
10642var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
10643
10644/** Used to detect binary string values. */
10645var reIsBinary = /^0b[01]+$/i;
10646
10647/** Used to detect octal string values. */
10648var reIsOctal = /^0o[0-7]+$/i;
10649
10650/** Built-in method references without a dependency on `root`. */
10651var freeParseInt = parseInt;
10652
10653/**
10654 * Converts `value` to a number.
10655 *
10656 * @static
10657 * @memberOf _
10658 * @since 4.0.0
10659 * @category Lang
10660 * @param {*} value The value to process.
10661 * @returns {number} Returns the number.
10662 * @example
10663 *
10664 * _.toNumber(3.2);
10665 * // => 3.2
10666 *
10667 * _.toNumber(Number.MIN_VALUE);
10668 * // => 5e-324
10669 *
10670 * _.toNumber(Infinity);
10671 * // => Infinity
10672 *
10673 * _.toNumber('3.2');
10674 * // => 3.2
10675 */
10676function toNumber(value) {
10677  if (typeof value == 'number') {
10678    return value;
10679  }
10680  if (isSymbol(value)) {
10681    return NAN;
10682  }
10683  if (isObject(value)) {
10684    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
10685    value = isObject(other) ? other + '' : other;
10686  }
10687  if (typeof value != 'string') {
10688    return value === 0 ? value : +value;
10689  }
10690  value = baseTrim(value);
10691  var isBinary = reIsBinary.test(value);
10692  return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
10693}
10694module.exports = toNumber;
10695
10696/***/ }),
10697
vendor: 1,113 bytes, lines 10698-10727
10698/***/ "./node_modules/webpack/buildin/global.js":
10699/*!***********************************!*\
10700  !*** (webpack)/buildin/global.js ***!
10701  \***********************************/
10702/*! no static exports found */
10703/***/ (function(module, exports) {
10704
10705function _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); }
10706var g;
10707
10708// This works in non-strict mode
10709g = function () {
10710  return this;
10711}();
10712try {
10713  // This works if eval is allowed (see CSP)
10714  g = g || new Function("return this")();
10715} catch (e) {
10716  // This works if the window reference is available
10717  if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === "object") g = window;
10718}
10719
10720// g can still be undefined, but nothing to do about it...
10721// We return undefined, instead of nothing here, so it's
10722// easier to handle this case. if(!global) { ...}
10723
10724module.exports = g;
10725
10726/***/ }),
10727
vendor: 802 bytes, lines 10728-10758
10728/***/ "./node_modules/webpack/buildin/module.js":
10729/*!***********************************!*\
10730  !*** (webpack)/buildin/module.js ***!
10731  \***********************************/
10732/*! no static exports found */
10733/***/ (function(module, exports) {
10734
10735module.exports = function (module) {
10736  if (!module.webpackPolyfill) {
10737    module.deprecate = function () {};
10738    module.paths = [];
10739    // module.parent = undefined by default
10740    if (!module.children) module.children = [];
10741    Object.defineProperty(module, "loaded", {
10742      enumerable: true,
10743      get: function get() {
10744        return module.l;
10745      }
10746    });
10747    Object.defineProperty(module, "id", {
10748      enumerable: true,
10749      get: function get() {
10750        return module.i;
10751      }
10752    });
10753    module.webpackPolyfill = 1;
10754  }
10755  return module;
10756};
10757
10758/***/ })
10758
10759
10760/******/ });
10761//# sourceMappingURL=mainHead.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.