1/******/ (function(modules) { // webpackBootstrap 2/******/ // install a JSONP callback for chunk loading 3/******/ var parentJsonpFunction = window["sincosJsonp"]; 4/******/ window["sincosJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) { 5/******/ // add "moreModules" to the modules object, 6/******/ // then flag all "chunkIds" as loaded and fire callback 7/******/ var moduleId, chunkId, i = 0, callbacks = []; 8/******/ for(;i < chunkIds.length; i++) { 9/******/ chunkId = chunkIds[i]; 10/******/ if(installedChunks[chunkId]) 11/******/ callbacks.push.apply(callbacks, installedChunks[chunkId]); 12/******/ installedChunks[chunkId] = 0; 13/******/ } 14/******/ for(moduleId in moreModules) { 15/******/ modules[moduleId] = moreModules[moduleId]; 16/******/ } 17/******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules); 18/******/ while(callbacks.length) 19/******/ callbacks.shift().call(null, __webpack_require__); 20/******/ if(moreModules[0]) { 21/******/ installedModules[0] = 0; 22/******/ return __webpack_require__(0); 23/******/ } 24/******/ }; 25 26/******/ // The module cache 27/******/ var installedModules = {}; 28 29/******/ // object to store loaded and loading chunks 30/******/ // "0" means "already loaded" 31/******/ // Array means "loading", array contains callbacks 32/******/ var installedChunks = { 33/******/ 0:0 34/******/ }; 35 36/******/ // The require function 37/******/ function __webpack_require__(moduleId) { 38 39/******/ // Check if module is in cache 40/******/ if(installedModules[moduleId]) 41/******/ return installedModules[moduleId].exports; 42 43/******/ // Create a new module (and put it into the cache) 44/******/ var module = installedModules[moduleId] = { 45/******/ exports: {}, 46/******/ id: moduleId, 47/******/ loaded: false 48/******/ }; 49 50/******/ // Execute the module function 51/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 52 53/******/ // Flag the module as loaded 54/******/ module.loaded = true; 55 56/******/ // Return the exports of the module 57/******/ return module.exports; 58/******/ } 59 60/******/ // This file contains only the entry chunk. 61/******/ // The chunk loading function for additional chunks 62/******/ __webpack_require__.e = function requireEnsure(chunkId, callback) { 63/******/ // "0" is the signal for "already loaded" 64/******/ if(installedChunks[chunkId] === 0) 65/******/ return callback.call(null, __webpack_require__); 66 67/******/ // an array means "currently loading". 68/******/ if(installedChunks[chunkId] !== undefined) { 69/******/ installedChunks[chunkId].push(callback); 70/******/ } else { 71/******/ // start chunk loading 72/******/ installedChunks[chunkId] = [callback]; 73/******/ var head = document.getElementsByTagName('head')[0]; 74/******/ var script = document.createElement('script'); 75/******/ script.type = 'text/javascript'; 76/******/ script.charset = 'utf-8'; 77/******/ script.async = true; 78 79/******/ script.src = __webpack_require__.p + "" + ({"1":"recheckit","2":"fbremarketing","3":"attribute-thumb-connector","4":"theme.checkout","5":"theme","6":"apex.ui","7":"pinnacle.ui","8":"vintage.ui","9":"ranger.ui","10":"meridian.ui"}[chunkId]||chunkId) + ".js?" + {"1":"9c63625acfd369ecdf21","2":"4b8a936472fbca5bed11","3":"569a1e477be582cfd297","4":"b2d2a021dea70714b05c","5":"4f0a8e76d2083afe3884","6":"fb860a42376344165ddb","7":"005e7f78d7e6ec07bc12","8":"424bede9c082ec875237","9":"a3c5273cd96a429ae0bc","10":"efb44a5314dc04b7c63b"}[chunkId] + ""; 80/******/ head.appendChild(script); 81/******/ } 82/******/ }; 83 84/******/ // expose the modules object (__webpack_modules__) 85/******/ __webpack_require__.m = modules; 86 87/******/ // expose the module cache 88/******/ __webpack_require__.c = installedModules; 89 90/******/ // __webpack_public_path__ 91/******/ __webpack_require__.p = "/assets/js/"; 92 93/******/ // Load entry module and return exports 94/******/ return __webpack_require__(0); 95/******/ }) 96/************************************************************************/ 97/******/ ([ 98/* 0 */ 99/***/ function(module, exports, __webpack_require__) { 100 101 "use strict"; 102 103 __webpack_require__(323); 104 105 __webpack_require__(328); 106 107 __webpack_require__(222); 108 109 __webpack_require__(208); 110 111 __webpack_require__(203); 112 113/***/ }, 114/* 1 */, 115/* 2 */ 116/***/ function(module, exports, __webpack_require__) { 117 118 var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module) {"use strict"; 119 120 var _defineProperties = __webpack_require__(263); 121 122 var _defineProperties2 = _interopRequireDefault(_defineProperties); 123 124 var _typeof2 = __webpack_require__(20); 125 126 var _typeof3 = _interopRequireDefault(_typeof2); 127 128 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 129 130 /*! 131 * jQuery JavaScript Library v2.1.4 132 * http://jquery.com/ 133 * 134 * Includes Sizzle.js 135 * http://sizzlejs.com/ 136 * 137 * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors 138 * Released under the MIT license 139 * http://jquery.org/license 140 * 141 * Date: 2015-04-28T16:01Z 142 */ 143 144 (function (global, factory) { 145 146 if (( false ? "undefined" : (0, _typeof3.default)(module)) === "object" && (0, _typeof3.default)(module.exports) === "object") { 147 // For CommonJS and CommonJS-like environments where a proper `window` 148 // is present, execute the factory and get jQuery. 149 // For environments that do not have a `window` with a `document` 150 // (such as Node.js), expose a factory as module.exports. 151 // This accentuates the need for the creation of a real `window`. 152 // e.g. var jQuery = require("jquery")(window); 153 // See ticket #14549 for more info. 154 module.exports = global.document ? factory(global, true) : function (w) { 155 if (!w.document) { 156 throw new Error("jQuery requires a window with a document"); 157 } 158 return factory(w); 159 }; 160 } else { 161 factory(global); 162 } 163 164 // Pass this if window is not defined yet 165 })(typeof window !== "undefined" ? window : undefined, function (window, noGlobal) { 166
vendor: 4,693 bytes, lines 167-353
167 // Support: Firefox 18+ 168 // Can't be in strict mode, several libs including ASP.NET trace 169 // the stack via arguments.caller.callee and Firefox dies if 170 // you try to trace through "use strict" call chains. (#13335) 171 // 172 173 var arr = []; 174 175 var _slice = arr.slice; 176 177 var concat = arr.concat; 178 179 var push = arr.push; 180 181 var indexOf = arr.indexOf; 182 183 var class2type = {}; 184 185 var toString = class2type.toString; 186 187 var hasOwn = class2type.hasOwnProperty; 188 189 var support = {}; 190 191 var 192 // Use the correct document accordingly with window argument (sandbox) 193 document = window.document, 194 version = "2.1.4", 195 196 197 // Define a local copy of jQuery 198 jQuery = function jQuery(selector, context) { 199 // The jQuery object is actually just the init constructor 'enhanced' 200 // Need init if jQuery is called (just allow error to be thrown if not included) 201 return new jQuery.fn.init(selector, context); 202 }, 203 204 205 // Support: Android<4.1 206 // Make sure we trim BOM and NBSP 207 rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, 208 209 210 // Matches dashed string for camelizing 211 rmsPrefix = /^-ms-/, 212 rdashAlpha = /-([\da-z])/gi, 213 214 215 // Used by jQuery.camelCase as callback to replace() 216 fcamelCase = function fcamelCase(all, letter) { 217 return letter.toUpperCase(); 218 }; 219 220 jQuery.fn = jQuery.prototype = { 221 // The current version of jQuery being used 222 jquery: version, 223 224 constructor: jQuery, 225 226 // Start with an empty selector 227 selector: "", 228 229 // The default length of a jQuery object is 0 230 length: 0, 231 232 toArray: function toArray() { 233 return _slice.call(this); 234 }, 235 236 // Get the Nth element in the matched element set OR 237 // Get the whole matched element set as a clean array 238 get: function get(num) { 239 return num != null ? 240 241 // Return just the one element from the set 242 num < 0 ? this[num + this.length] : this[num] : 243 244 // Return all the elements in a clean array 245 _slice.call(this); 246 }, 247 248 // Take an array of elements and push it onto the stack 249 // (returning the new matched element set) 250 pushStack: function pushStack(elems) { 251 252 // Build a new jQuery matched element set 253 var ret = jQuery.merge(this.constructor(), elems); 254 255 // Add the old object onto the stack (as a reference) 256 ret.prevObject = this; 257 ret.context = this.context; 258 259 // Return the newly-formed element set 260 return ret; 261 }, 262 263 // Execute a callback for every element in the matched set. 264 // (You can seed the arguments with an array of args, but this is 265 // only used internally.) 266 each: function each(callback, args) { 267 return jQuery.each(this, callback, args); 268 }, 269 270 map: function map(callback) { 271 return this.pushStack(jQuery.map(this, function (elem, i) { 272 return callback.call(elem, i, elem); 273 })); 274 }, 275 276 slice: function slice() { 277 return this.pushStack(_slice.apply(this, arguments)); 278 }, 279 280 first: function first() { 281 return this.eq(0); 282 }, 283 284 last: function last() { 285 return this.eq(-1); 286 }, 287 288 eq: function eq(i) { 289 var len = this.length, 290 j = +i + (i < 0 ? len : 0); 291 return this.pushStack(j >= 0 && j < len ? [this[j]] : []); 292 }, 293 294 end: function end() { 295 return this.prevObject || this.constructor(null); 296 }, 297 298 // For internal use only. 299 // Behaves like an Array's method, not like a jQuery method. 300 push: push, 301 sort: arr.sort, 302 splice: arr.splice 303 }; 304 305 jQuery.extend = jQuery.fn.extend = function () { 306 var options, 307 name, 308 src, 309 copy, 310 copyIsArray, 311 clone, 312 target = arguments[0] || {}, 313 i = 1, 314 length = arguments.length, 315 deep = false; 316 317 // Handle a deep copy situation 318 if (typeof target === "boolean") { 319 deep = target; 320 321 // Skip the boolean and the target 322 target = arguments[i] || {}; 323 i++; 324 } 325 326 // Handle case when target is a string or something (possible in deep copy) 327 if ((typeof target === "undefined" ? "undefined" : (0, _typeof3.default)(target)) !== "object" && !jQuery.isFunction(target)) { 328 target = {}; 329 } 330 331 // Extend jQuery itself if only one argument is passed 332 if (i === length) { 333 target = this; 334 i--; 335 } 336 337 for (; i < length; i++) { 338 // Only deal with non-null/undefined values 339 if ((options = arguments[i]) != null) { 340 // Extend the base object 341 for (name in options) { 342 src = target[name]; 343 copy = options[name]; 344 345 // Prevent never-ending loop 346 if (target === copy) { 347 continue; 348 } 349 350 // Recurse if we're merging plain objects or arrays 351 if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)))) { 352 if (copyIsArray) { 353 copyIsArray = false;
354 clone = src && jQuery.isArray(src) ? src : []; 355 } else { 356 clone = src && jQuery.isPlainObject(src) ? src : {}; 357 } 358 359 // Never move original objects, clone them 360 target[name] = jQuery.extend(deep, clone, copy); 361 362 // Don't bring in undefined values 363 } else if (copy !== undefined) { 364 target[name] = copy; 365 } 366 } 367 } 368 } 369 370 // Return the modified object 371 return target; 372 }; 373 374 jQuery.extend({ 375 // Unique for each copy of jQuery on the page 376 expando: "jQuery" + (version + Math.random()).replace(/\D/g, ""), 377 378 // Assume jQuery is ready without the ready module 379 isReady: true, 380 381 error: function error(msg) { 382 throw new Error(msg); 383 }, 384 385 noop: function noop() {}, 386 387 isFunction: function isFunction(obj) { 388 return jQuery.type(obj) === "function"; 389 }, 390 391 isArray: Array.isArray, 392 393 isWindow: function isWindow(obj) { 394 return obj != null && obj === obj.window; 395 }, 396 397 isNumeric: function isNumeric(obj) { 398 // parseFloat NaNs numeric-cast false positives (null|true|false|"") 399 // ...but misinterprets leading-number strings, particularly hex literals ("0x...") 400 // subtraction forces infinities to NaN 401 // adding 1 corrects loss of precision from parseFloat (#15100) 402 return !jQuery.isArray(obj) && obj - parseFloat(obj) + 1 >= 0; 403 }, 404 405 isPlainObject: function isPlainObject(obj) { 406 // Not plain objects: 407 // - Any object or value whose internal [[Class]] property is not "[object Object]" 408 // - DOM nodes 409 // - window 410 if (jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow(obj)) { 411 return false; 412 } 413 414 if (obj.constructor && !hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) { 415 return false; 416 } 417 418 // If the function hasn't returned already, we're confident that 419 // |obj| is a plain object, created by {} or constructed with new Object 420 return true; 421 }, 422 423 isEmptyObject: function isEmptyObject(obj) { 424 var name; 425 for (name in obj) { 426 return false; 427 } 428 return true; 429 }, 430 431 type: function type(obj) { 432 if (obj == null) { 433 return obj + ""; 434 } 435 // Support: Android<4.0, iOS<6 (functionish RegExp) 436 return (typeof obj === "undefined" ? "undefined" : (0, _typeof3.default)(obj)) === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : typeof obj === "undefined" ? "undefined" : (0, _typeof3.default)(obj); 437 }, 438 439 // Evaluates a script in a global context 440 globalEval: function globalEval(code) { 441 var script, 442 indirect = eval; 443 444 code = jQuery.trim(code); 445 446 if (code) { 447 // If the code includes a valid, prologue position 448 // strict mode pragma, execute code by injecting a 449 // script tag into the document. 450 if (code.indexOf("use strict") === 1) { 451 script = document.createElement("script"); 452 script.text = code; 453 document.head.appendChild(script).parentNode.removeChild(script); 454 } else { 455 // Otherwise, avoid the DOM node creation, insertion 456 // and removal by using an indirect global eval 457 indirect(code); 458 } 459 } 460 }, 461 462 // Convert dashed to camelCase; used by the css and data modules 463 // Support: IE9-11+ 464 // Microsoft forgot to hump their vendor prefix (#9572) 465 camelCase: function camelCase(string) { 466 return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase); 467 }, 468 469 nodeName: function nodeName(elem, name) { 470 return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); 471 }, 472 473 // args is for internal usage only 474 each: function each(obj, callback, args) { 475 var value, 476 i = 0, 477 length = obj.length, 478 isArray = isArraylike(obj); 479 480 if (args) { 481 if (isArray) { 482 for (; i < length; i++) { 483 value = callback.apply(obj[i], args); 484 485 if (value === false) { 486 break; 487 } 488 } 489 } else { 490 for (i in obj) { 491 value = callback.apply(obj[i], args); 492 493 if (value === false) { 494 break; 495 } 496 } 497 } 498 499 // A special, fast, case for the most common use of each 500 } else { 501 if (isArray) { 502 for (; i < length; i++) { 503 value = callback.call(obj[i], i, obj[i]); 504 505 if (value === false) { 506 break; 507 } 508 } 509 } else { 510 for (i in obj) { 511 value = callback.call(obj[i], i, obj[i]); 512 513 if (value === false) { 514 break; 515 } 516 } 517 } 518 } 519 520 return obj; 521 }, 522
vendor: 32,162 bytes, lines 523-1549
523 // Support: Android<4.1 524 trim: function trim(text) { 525 return text == null ? "" : (text + "").replace(rtrim, ""); 526 }, 527 528 // results is for internal usage only 529 makeArray: function makeArray(arr, results) { 530 var ret = results || []; 531 532 if (arr != null) { 533 if (isArraylike(Object(arr))) { 534 jQuery.merge(ret, typeof arr === "string" ? [arr] : arr); 535 } else { 536 push.call(ret, arr); 537 } 538 } 539 540 return ret; 541 }, 542 543 inArray: function inArray(elem, arr, i) { 544 return arr == null ? -1 : indexOf.call(arr, elem, i); 545 }, 546 547 merge: function merge(first, second) { 548 var len = +second.length, 549 j = 0, 550 i = first.length; 551 552 for (; j < len; j++) { 553 first[i++] = second[j]; 554 } 555 556 first.length = i; 557 558 return first; 559 }, 560 561 grep: function grep(elems, callback, invert) { 562 var callbackInverse, 563 matches = [], 564 i = 0, 565 length = elems.length, 566 callbackExpect = !invert; 567 568 // Go through the array, only saving the items 569 // that pass the validator function 570 for (; i < length; i++) { 571 callbackInverse = !callback(elems[i], i); 572 if (callbackInverse !== callbackExpect) { 573 matches.push(elems[i]); 574 } 575 } 576 577 return matches; 578 }, 579 580 // arg is for internal usage only 581 map: function map(elems, callback, arg) { 582 var value, 583 i = 0, 584 length = elems.length, 585 isArray = isArraylike(elems), 586 ret = []; 587 588 // Go through the array, translating each of the items to their new values 589 if (isArray) { 590 for (; i < length; i++) { 591 value = callback(elems[i], i, arg); 592 593 if (value != null) { 594 ret.push(value); 595 } 596 } 597 598 // Go through every key on the object, 599 } else { 600 for (i in elems) { 601 value = callback(elems[i], i, arg); 602 603 if (value != null) { 604 ret.push(value); 605 } 606 } 607 } 608 609 // Flatten any nested arrays 610 return concat.apply([], ret); 611 }, 612 613 // A global GUID counter for objects 614 guid: 1, 615 616 // Bind a function to a context, optionally partially applying any 617 // arguments. 618 proxy: function proxy(fn, context) { 619 var tmp, args, proxy; 620 621 if (typeof context === "string") { 622 tmp = fn[context]; 623 context = fn; 624 fn = tmp; 625 } 626 627 // Quick check to determine if target is callable, in the spec 628 // this throws a TypeError, but we will just return undefined. 629 if (!jQuery.isFunction(fn)) { 630 return undefined; 631 } 632 633 // Simulated bind 634 args = _slice.call(arguments, 2); 635 proxy = function proxy() { 636 return fn.apply(context || this, args.concat(_slice.call(arguments))); 637 }; 638 639 // Set the guid of unique handler to the same of original handler, so it can be removed 640 proxy.guid = fn.guid = fn.guid || jQuery.guid++; 641 642 return proxy; 643 }, 644 645 now: Date.now, 646 647 // jQuery.support is not used in Core but other projects attach their 648 // properties to it so it needs to exist. 649 support: support 650 }); 651 652 // Populate the class2type map 653 jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function (i, name) { 654 class2type["[object " + name + "]"] = name.toLowerCase(); 655 }); 656 657 function isArraylike(obj) { 658 659 // Support: iOS 8.2 (not reproducible in simulator) 660 // `in` check used to prevent JIT error (gh-2145) 661 // hasOwn isn't used here due to false negatives 662 // regarding Nodelist length in IE 663 var length = "length" in obj && obj.length, 664 type = jQuery.type(obj); 665 666 if (type === "function" || jQuery.isWindow(obj)) { 667 return false; 668 } 669 670 if (obj.nodeType === 1 && length) { 671 return true; 672 } 673 674 return type === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj; 675 } 676 var Sizzle = 677 /*! 678 * Sizzle CSS Selector Engine v2.2.0-pre 679 * http://sizzlejs.com/ 680 * 681 * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors 682 * Released under the MIT license 683 * http://jquery.org/license 684 * 685 * Date: 2014-12-16 686 */ 687 function (window) { 688 689 var i, 690 support, 691 Expr, 692 getText, 693 isXML, 694 tokenize, 695 compile, 696 select, 697 outermostContext, 698 sortInput, 699 hasDuplicate, 700 701 702 // Local document vars 703 setDocument, 704 document, 705 docElem, 706 documentIsHTML, 707 rbuggyQSA, 708 rbuggyMatches, 709 matches, 710 contains, 711 712 713 // Instance-specific data 714 expando = "sizzle" + 1 * new Date(), 715 preferredDoc = window.document, 716 dirruns = 0, 717 done = 0, 718 classCache = createCache(), 719 tokenCache = createCache(), 720 compilerCache = createCache(), 721 sortOrder = function sortOrder(a, b) { 722 if (a === b) { 723 hasDuplicate = true; 724 } 725 return 0; 726 }, 727 728 729 // General-purpose constants 730 MAX_NEGATIVE = 1 << 31, 731 732 733 // Instance methods 734 hasOwn = {}.hasOwnProperty, 735 arr = [], 736 pop = arr.pop, 737 push_native = arr.push, 738 push = arr.push, 739 slice = arr.slice, 740 741 // Use a stripped-down indexOf as it's faster than native 742 // http://jsperf.com/thor-indexof-vs-for/5 743 indexOf = function indexOf(list, elem) { 744 var i = 0, 745 len = list.length; 746 for (; i < len; i++) { 747 if (list[i] === elem) { 748 return i; 749 } 750 } 751 return -1; 752 }, 753 booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", 754 755 756 // Regular expressions 757 758 // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace 759 whitespace = "[\\x20\\t\\r\\n\\f]", 760 761 // http://www.w3.org/TR/css3-syntax/#characters 762 characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", 763 764 765 // Loosely modeled on CSS identifier characters 766 // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors 767 // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier 768 identifier = characterEncoding.replace("w", "w#"), 769 770 771 // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors 772 attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + 773 // Operator (capture 2) 774 "*([*^$|!~]?=)" + whitespace + 775 // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" 776 "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]", 777 pseudos = ":(" + characterEncoding + ")(?:\\((" + 778 // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: 779 // 1. quoted (capture 3; capture 4 or capture 5) 780 "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + 781 // 2. simple (capture 6) 782 "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + 783 // 3. anything else (capture 2) 784 ".*" + ")\\)|)", 785 786 787 // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter 788 rwhitespace = new RegExp(whitespace + "+", "g"), 789 rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"), 790 rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"), 791 rcombinators = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"), 792 rattributeQuotes = new RegExp("=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g"), 793 rpseudo = new RegExp(pseudos), 794 ridentifier = new RegExp("^" + identifier + "$"), 795 matchExpr = { 796 "ID": new RegExp("^#(" + characterEncoding + ")"), 797 "CLASS": new RegExp("^\\.(" + characterEncoding + ")"), 798 "TAG": new RegExp("^(" + characterEncoding.replace("w", "w*") + ")"), 799 "ATTR": new RegExp("^" + attributes), 800 "PSEUDO": new RegExp("^" + pseudos), 801 "CHILD": new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i"), 802 "bool": new RegExp("^(?:" + booleans + ")$", "i"), 803 // For use in libraries implementing .is() 804 // We use this for POS matching in `select` 805 "needsContext": new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i") 806 }, 807 rinputs = /^(?:input|select|textarea|button)$/i, 808 rheader = /^h\d$/i, 809 rnative = /^[^{]+\{\s*\[native \w/, 810 811 812 // Easily-parseable/retrievable ID or TAG or CLASS selectors 813 rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, 814 rsibling = /[+~]/, 815 rescape = /'|\\/g, 816 817 818 // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters 819 runescape = new RegExp("\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig"), 820 funescape = function funescape(_, escaped, escapedWhitespace) { 821 var high = "0x" + escaped - 0x10000; 822 // NaN means non-codepoint 823 // Support: Firefox<24 824 // Workaround erroneous numeric interpretation of +"0x" 825 return high !== high || escapedWhitespace ? escaped : high < 0 ? 826 // BMP codepoint 827 String.fromCharCode(high + 0x10000) : 828 // Supplemental Plane codepoint (surrogate pair) 829 String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00); 830 }, 831 832 833 // Used for iframes 834 // See setDocument() 835 // Removing the function wrapper causes a "Permission Denied" 836 // error in IE 837 unloadHandler = function unloadHandler() { 838 setDocument(); 839 }; 840 841 // Optimize for push.apply( _, NodeList ) 842 try { 843 push.apply(arr = slice.call(preferredDoc.childNodes), preferredDoc.childNodes); 844 // Support: Android<4.0 845 // Detect silently failing push.apply 846 arr[preferredDoc.childNodes.length].nodeType; 847 } catch (e) { 848 push = { apply: arr.length ? 849 850 // Leverage slice if possible 851 function (target, els) { 852 push_native.apply(target, slice.call(els)); 853 } : 854 855 // Support: IE<9 856 // Otherwise append directly 857 function (target, els) { 858 var j = target.length, 859 i = 0; 860 // Can't trust NodeList.length 861 while (target[j++] = els[i++]) {} 862 target.length = j - 1; 863 } 864 }; 865 } 866 867 function Sizzle(selector, context, results, seed) { 868 var match, elem, m, nodeType, 869 // QSA vars 870 i, groups, old, nid, newContext, newSelector; 871 872 if ((context ? context.ownerDocument || context : preferredDoc) !== document) { 873 setDocument(context); 874 } 875 876 context = context || document; 877 results = results || []; 878 nodeType = context.nodeType; 879 880 if (typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) { 881 882 return results; 883 } 884 885 if (!seed && documentIsHTML) { 886 887 // Try to shortcut find operations when possible (e.g., not under DocumentFragment) 888 if (nodeType !== 11 && (match = rquickExpr.exec(selector))) { 889 // Speed-up: Sizzle("#ID") 890 if (m = match[1]) { 891 if (nodeType === 9) { 892 elem = context.getElementById(m); 893 // Check parentNode to catch when Blackberry 4.6 returns 894 // nodes that are no longer in the document (jQuery #6963) 895 if (elem && elem.parentNode) { 896 // Handle the case where IE, Opera, and Webkit return items 897 // by name instead of ID 898 if (elem.id === m) { 899 results.push(elem); 900 return results; 901 } 902 } else { 903 return results; 904 } 905 } else { 906 // Context is not a document 907 if (context.ownerDocument && (elem = context.ownerDocument.getElementById(m)) && contains(context, elem) && elem.id === m) { 908 results.push(elem); 909 return results; 910 } 911 } 912 913 // Speed-up: Sizzle("TAG") 914 } else if (match[2]) { 915 push.apply(results, context.getElementsByTagName(selector)); 916 return results; 917 918 // Speed-up: Sizzle(".CLASS") 919 } else if ((m = match[3]) && support.getElementsByClassName) { 920 push.apply(results, context.getElementsByClassName(m)); 921 return results; 922 } 923 } 924 925 // QSA path 926 if (support.qsa && (!rbuggyQSA || !rbuggyQSA.test(selector))) { 927 nid = old = expando; 928 newContext = context; 929 newSelector = nodeType !== 1 && selector; 930 931 // qSA works strangely on Element-rooted queries 932 // We can work around this by specifying an extra ID on the root 933 // and working up from there (Thanks to Andrew Dupont for the technique) 934 // IE 8 doesn't work on object elements 935 if (nodeType === 1 && context.nodeName.toLowerCase() !== "object") { 936 groups = tokenize(selector); 937 938 if (old = context.getAttribute("id")) { 939 nid = old.replace(rescape, "\\$&"); 940 } else { 941 context.setAttribute("id", nid); 942 } 943 nid = "[id='" + nid + "'] "; 944 945 i = groups.length; 946 while (i--) { 947 groups[i] = nid + toSelector(groups[i]); 948 } 949 newContext = rsibling.test(selector) && testContext(context.parentNode) || context; 950 newSelector = groups.join(","); 951 } 952 953 if (newSelector) { 954 try { 955 push.apply(results, newContext.querySelectorAll(newSelector)); 956 return results; 957 } catch (qsaError) {} finally { 958 if (!old) { 959 context.removeAttribute("id"); 960 } 961 } 962 } 963 } 964 } 965 966 // All others 967 return select(selector.replace(rtrim, "$1"), context, results, seed); 968 } 969 970 /** 971 * Create key-value caches of limited size 972 * @returns {Function(string, Object)} Returns the Object data after storing it on itself with 973 * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) 974 * deleting the oldest entry 975 */ 976 function createCache() { 977 var keys = []; 978 979 function cache(key, value) { 980 // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) 981 if (keys.push(key + " ") > Expr.cacheLength) { 982 // Only keep the most recent entries 983 delete cache[keys.shift()]; 984 } 985 return cache[key + " "] = value; 986 } 987 return cache; 988 } 989 990 /** 991 * Mark a function for special use by Sizzle 992 * @param {Function} fn The function to mark 993 */ 994 function markFunction(fn) { 995 fn[expando] = true; 996 return fn; 997 } 998 999 /** 1000 * Support testing using an element 1001 * @param {Function} fn Passed the created div and expects a boolean result 1002 */ 1003 function assert(fn) { 1004 var div = document.createElement("div"); 1005 1006 try { 1007 return !!fn(div); 1008 } catch (e) { 1009 return false; 1010 } finally { 1011 // Remove from its parent by default 1012 if (div.parentNode) { 1013 div.parentNode.removeChild(div); 1014 } 1015 // release memory in IE 1016 div = null; 1017 } 1018 } 1019 1020 /** 1021 * Adds the same handler for all of the specified attrs 1022 * @param {String} attrs Pipe-separated list of attributes 1023 * @param {Function} handler The method that will be applied 1024 */ 1025 function addHandle(attrs, handler) { 1026 var arr = attrs.split("|"), 1027 i = attrs.length; 1028 1029 while (i--) { 1030 Expr.attrHandle[arr[i]] = handler; 1031 } 1032 } 1033 1034 /** 1035 * Checks document order of two siblings 1036 * @param {Element} a 1037 * @param {Element} b 1038 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b 1039 */ 1040 function siblingCheck(a, b) { 1041 var cur = b && a, 1042 diff = cur && a.nodeType === 1 && b.nodeType === 1 && (~b.sourceIndex || MAX_NEGATIVE) - (~a.sourceIndex || MAX_NEGATIVE); 1043 1044 // Use IE sourceIndex if available on both nodes 1045 if (diff) { 1046 return diff; 1047 } 1048 1049 // Check if b follows a 1050 if (cur) { 1051 while (cur = cur.nextSibling) { 1052 if (cur === b) { 1053 return -1; 1054 } 1055 } 1056 } 1057 1058 return a ? 1 : -1; 1059 } 1060 1061 /** 1062 * Returns a function to use in pseudos for input types 1063 * @param {String} type 1064 */ 1065 function createInputPseudo(type) { 1066 return function (elem) { 1067 var name = elem.nodeName.toLowerCase(); 1068 return name === "input" && elem.type === type; 1069 }; 1070 } 1071 1072 /** 1073 * Returns a function to use in pseudos for buttons 1074 * @param {String} type 1075 */ 1076 function createButtonPseudo(type) { 1077 return function (elem) { 1078 var name = elem.nodeName.toLowerCase(); 1079 return (name === "input" || name === "button") && elem.type === type; 1080 }; 1081 } 1082 1083 /** 1084 * Returns a function to use in pseudos for positionals 1085 * @param {Function} fn 1086 */ 1087 function createPositionalPseudo(fn) { 1088 return markFunction(function (argument) { 1089 argument = +argument; 1090 return markFunction(function (seed, matches) { 1091 var j, 1092 matchIndexes = fn([], seed.length, argument), 1093 i = matchIndexes.length; 1094 1095 // Match elements found at the specified indexes 1096 while (i--) { 1097 if (seed[j = matchIndexes[i]]) { 1098 seed[j] = !(matches[j] = seed[j]); 1099 } 1100 } 1101 }); 1102 }); 1103 } 1104 1105 /** 1106 * Checks a node for validity as a Sizzle context 1107 * @param {Element|Object=} context 1108 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value 1109 */ 1110 function testContext(context) { 1111 return context && typeof context.getElementsByTagName !== "undefined" && context; 1112 } 1113 1114 // Expose support vars for convenience 1115 support = Sizzle.support = {}; 1116 1117 /** 1118 * Detects XML nodes 1119 * @param {Element|Object} elem An element or a document 1120 * @returns {Boolean} True iff elem is a non-HTML XML node 1121 */ 1122 isXML = Sizzle.isXML = function (elem) { 1123 // documentElement is verified for cases where it doesn't yet exist 1124 // (such as loading iframes in IE - #4833) 1125 var documentElement = elem && (elem.ownerDocument || elem).documentElement; 1126 return documentElement ? documentElement.nodeName !== "HTML" : false; 1127 }; 1128 1129 /** 1130 * Sets document-related variables once based on the current document 1131 * @param {Element|Object} [doc] An element or document object to use to set the document 1132 * @returns {Object} Returns the current document 1133 */ 1134 setDocument = Sizzle.setDocument = function (node) { 1135 var hasCompare, 1136 parent, 1137 doc = node ? node.ownerDocument || node : preferredDoc; 1138 1139 // If no document and documentElement is available, return 1140 if (doc === document || doc.nodeType !== 9 || !doc.documentElement) { 1141 return document; 1142 } 1143 1144 // Set our document 1145 document = doc; 1146 docElem = doc.documentElement; 1147 parent = doc.defaultView; 1148 1149 // Support: IE>8 1150 // If iframe document is assigned to "document" variable and if iframe has been reloaded, 1151 // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 1152 // IE6-8 do not support the defaultView property so parent will be undefined 1153 if (parent && parent !== parent.top) { 1154 // IE11 does not have attachEvent, so all must suffer 1155 if (parent.addEventListener) { 1156 parent.addEventListener("unload", unloadHandler, false); 1157 } else if (parent.attachEvent) { 1158 parent.attachEvent("onunload", unloadHandler); 1159 } 1160 } 1161 1162 /* Support tests 1163 ---------------------------------------------------------------------- */ 1164 documentIsHTML = !isXML(doc); 1165 1166 /* Attributes 1167 ---------------------------------------------------------------------- */ 1168 1169 // Support: IE<8 1170 // Verify that getAttribute really returns attributes and not properties 1171 // (excepting IE8 booleans) 1172 support.attributes = assert(function (div) { 1173 div.className = "i"; 1174 return !div.getAttribute("className"); 1175 }); 1176 1177 /* getElement(s)By* 1178 ---------------------------------------------------------------------- */ 1179 1180 // Check if getElementsByTagName("*") returns only elements 1181 support.getElementsByTagName = assert(function (div) { 1182 div.appendChild(doc.createComment("")); 1183 return !div.getElementsByTagName("*").length; 1184 }); 1185 1186 // Support: IE<9 1187 support.getElementsByClassName = rnative.test(doc.getElementsByClassName); 1188 1189 // Support: IE<10 1190 // Check if getElementById returns elements by name 1191 // The broken getElementById methods don't pick up programatically-set names, 1192 // so use a roundabout getElementsByName test 1193 support.getById = assert(function (div) { 1194 docElem.appendChild(div).id = expando; 1195 return !doc.getElementsByName || !doc.getElementsByName(expando).length; 1196 }); 1197 1198 // ID find and filter 1199 if (support.getById) { 1200 Expr.find["ID"] = function (id, context) { 1201 if (typeof context.getElementById !== "undefined" && documentIsHTML) { 1202 var m = context.getElementById(id); 1203 // Check parentNode to catch when Blackberry 4.6 returns 1204 // nodes that are no longer in the document #6963 1205 return m && m.parentNode ? [m] : []; 1206 } 1207 }; 1208 Expr.filter["ID"] = function (id) { 1209 var attrId = id.replace(runescape, funescape); 1210 return function (elem) { 1211 return elem.getAttribute("id") === attrId; 1212 }; 1213 }; 1214 } else { 1215 // Support: IE6/7 1216 // getElementById is not reliable as a find shortcut 1217 delete Expr.find["ID"]; 1218 1219 Expr.filter["ID"] = function (id) { 1220 var attrId = id.replace(runescape, funescape); 1221 return function (elem) { 1222 var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); 1223 return node && node.value === attrId; 1224 }; 1225 }; 1226 } 1227 1228 // Tag 1229 Expr.find["TAG"] = support.getElementsByTagName ? function (tag, context) { 1230 if (typeof context.getElementsByTagName !== "undefined") { 1231 return context.getElementsByTagName(tag); 1232 1233 // DocumentFragment nodes don't have gEBTN 1234 } else if (support.qsa) { 1235 return context.querySelectorAll(tag); 1236 } 1237 } : function (tag, context) { 1238 var elem, 1239 tmp = [], 1240 i = 0, 1241 1242 // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too 1243 results = context.getElementsByTagName(tag); 1244 1245 // Filter out possible comments 1246 if (tag === "*") { 1247 while (elem = results[i++]) { 1248 if (elem.nodeType === 1) { 1249 tmp.push(elem); 1250 } 1251 } 1252 1253 return tmp; 1254 } 1255 return results; 1256 }; 1257 1258 // Class 1259 Expr.find["CLASS"] = support.getElementsByClassName && function (className, context) { 1260 if (documentIsHTML) { 1261 return context.getElementsByClassName(className); 1262 } 1263 }; 1264 1265 /* QSA/matchesSelector 1266 ---------------------------------------------------------------------- */ 1267 1268 // QSA and matchesSelector support 1269 1270 // matchesSelector(:active) reports false when true (IE9/Opera 11.5) 1271 rbuggyMatches = []; 1272 1273 // qSa(:focus) reports false when true (Chrome 21) 1274 // We allow this because of a bug in IE8/9 that throws an error 1275 // whenever `document.activeElement` is accessed on an iframe 1276 // So, we allow :focus to pass through QSA all the time to avoid the IE error 1277 // See http://bugs.jquery.com/ticket/13378 1278 rbuggyQSA = []; 1279 1280 if (support.qsa = rnative.test(doc.querySelectorAll)) { 1281 // Build QSA regex 1282 // Regex strategy adopted from Diego Perini 1283 assert(function (div) { 1284 // Select is set to empty string on purpose 1285 // This is to test IE's treatment of not explicitly 1286 // setting a boolean content attribute, 1287 // since its presence should be enough 1288 // http://bugs.jquery.com/ticket/12359 1289 docElem.appendChild(div).innerHTML = "<a id='" + expando + "'></a>" + "<select id='" + expando + "-\f]' msallowcapture=''>" + "<option selected=''></option></select>"; 1290 1291 // Support: IE8, Opera 11-12.16 1292 // Nothing should be selected when empty strings follow ^= or $= or *= 1293 // The test attribute must be unknown in Opera but "safe" for WinRT 1294 // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section 1295 if (div.querySelectorAll("[msallowcapture^='']").length) { 1296 rbuggyQSA.push("[*^$]=" + whitespace + "*(?:''|\"\")"); 1297 } 1298 1299 // Support: IE8 1300 // Boolean attributes and "value" are not treated correctly 1301 if (!div.querySelectorAll("[selected]").length) { 1302 rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")"); 1303 } 1304 1305 // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+ 1306 if (!div.querySelectorAll("[id~=" + expando + "-]").length) { 1307 rbuggyQSA.push("~="); 1308 } 1309 1310 // Webkit/Opera - :checked should return selected option elements 1311 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 1312 // IE8 throws error here and will not see later tests 1313 if (!div.querySelectorAll(":checked").length) { 1314 rbuggyQSA.push(":checked"); 1315 } 1316 1317 // Support: Safari 8+, iOS 8+ 1318 // https://bugs.webkit.org/show_bug.cgi?id=136851 1319 // In-page `selector#id sibing-combinator selector` fails 1320 if (!div.querySelectorAll("a#" + expando + "+*").length) { 1321 rbuggyQSA.push(".#.+[+~]"); 1322 } 1323 }); 1324 1325 assert(function (div) { 1326 // Support: Windows 8 Native Apps 1327 // The type and name attributes are restricted during .innerHTML assignment 1328 var input = doc.createElement("input"); 1329 input.setAttribute("type", "hidden"); 1330 div.appendChild(input).setAttribute("name", "D"); 1331 1332 // Support: IE8 1333 // Enforce case-sensitivity of name attribute 1334 if (div.querySelectorAll("[name=d]").length) { 1335 rbuggyQSA.push("name" + whitespace + "*[*^$|!~]?="); 1336 } 1337 1338 // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) 1339 // IE8 throws error here and will not see later tests 1340 if (!div.querySelectorAll(":enabled").length) { 1341 rbuggyQSA.push(":enabled", ":disabled"); 1342 } 1343 1344 // Opera 10-11 does not throw on post-comma invalid pseudos 1345 div.querySelectorAll("*,:x"); 1346 rbuggyQSA.push(",.*:"); 1347 }); 1348 } 1349 1350 if (support.matchesSelector = rnative.test(matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector)) { 1351 1352 assert(function (div) { 1353 // Check to see if it's possible to do matchesSelector 1354 // on a disconnected node (IE 9) 1355 support.disconnectedMatch = matches.call(div, "div"); 1356 1357 // This should fail with an exception 1358 // Gecko does not error, returns false instead 1359 matches.call(div, "[s!='']:x"); 1360 rbuggyMatches.push("!=", pseudos); 1361 }); 1362 } 1363 1364 rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|")); 1365 rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|")); 1366 1367 /* Contains 1368 ---------------------------------------------------------------------- */ 1369 hasCompare = rnative.test(docElem.compareDocumentPosition); 1370 1371 // Element contains another 1372 // Purposefully does not implement inclusive descendent 1373 // As in, an element does not contain itself 1374 contains = hasCompare || rnative.test(docElem.contains) ? function (a, b) { 1375 var adown = a.nodeType === 9 ? a.documentElement : a, 1376 bup = b && b.parentNode; 1377 return a === bup || !!(bup && bup.nodeType === 1 && (adown.contains ? adown.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16)); 1378 } : function (a, b) { 1379 if (b) { 1380 while (b = b.parentNode) { 1381 if (b === a) { 1382 return true; 1383 } 1384 } 1385 } 1386 return false; 1387 }; 1388 1389 /* Sorting 1390 ---------------------------------------------------------------------- */ 1391 1392 // Document order sorting 1393 sortOrder = hasCompare ? function (a, b) { 1394 1395 // Flag for duplicate removal 1396 if (a === b) { 1397 hasDuplicate = true; 1398 return 0; 1399 } 1400 1401 // Sort on method existence if only one input has compareDocumentPosition 1402 var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; 1403 if (compare) { 1404 return compare; 1405 } 1406 1407 // Calculate position if both inputs belong to the same document 1408 compare = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1409 1410 // Otherwise we know they are disconnected 1411 1; 1412 1413 // Disconnected nodes 1414 if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) { 1415 1416 // Choose the first element that is related to our preferred document 1417 if (a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a)) { 1418 return -1; 1419 } 1420 if (b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b)) { 1421 return 1; 1422 } 1423 1424 // Maintain original order 1425 return sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0; 1426 } 1427 1428 return compare & 4 ? -1 : 1; 1429 } : function (a, b) { 1430 // Exit early if the nodes are identical 1431 if (a === b) { 1432 hasDuplicate = true; 1433 return 0; 1434 } 1435 1436 var cur, 1437 i = 0, 1438 aup = a.parentNode, 1439 bup = b.parentNode, 1440 ap = [a], 1441 bp = [b]; 1442 1443 // Parentless nodes are either documents or disconnected 1444 if (!aup || !bup) { 1445 return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0; 1446 1447 // If the nodes are siblings, we can do a quick check 1448 } else if (aup === bup) { 1449 return siblingCheck(a, b); 1450 } 1451 1452 // Otherwise we need full lists of their ancestors for comparison 1453 cur = a; 1454 while (cur = cur.parentNode) { 1455 ap.unshift(cur); 1456 } 1457 cur = b; 1458 while (cur = cur.parentNode) { 1459 bp.unshift(cur); 1460 } 1461 1462 // Walk down the tree looking for a discrepancy 1463 while (ap[i] === bp[i]) { 1464 i++; 1465 } 1466 1467 return i ? 1468 // Do a sibling check if the nodes have a common ancestor 1469 siblingCheck(ap[i], bp[i]) : 1470 1471 // Otherwise nodes in our document sort first 1472 ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0; 1473 }; 1474 1475 return doc; 1476 }; 1477 1478 Sizzle.matches = function (expr, elements) { 1479 return Sizzle(expr, null, null, elements); 1480 }; 1481 1482 Sizzle.matchesSelector = function (elem, expr) { 1483 // Set document vars if needed 1484 if ((elem.ownerDocument || elem) !== document) { 1485 setDocument(elem); 1486 } 1487 1488 // Make sure that attribute selectors are quoted 1489 expr = expr.replace(rattributeQuotes, "='$1']"); 1490 1491 if (support.matchesSelector && documentIsHTML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr))) { 1492 1493 try { 1494 var ret = matches.call(elem, expr); 1495 1496 // IE 9's matchesSelector returns false on disconnected nodes 1497 if (ret || support.disconnectedMatch || 1498 // As well, disconnected nodes are said to be in a document 1499 // fragment in IE 9 1500 elem.document && elem.document.nodeType !== 11) { 1501 return ret; 1502 } 1503 } catch (e) {} 1504 } 1505 1506 return Sizzle(expr, document, null, [elem]).length > 0; 1507 }; 1508 1509 Sizzle.contains = function (context, elem) { 1510 // Set document vars if needed 1511 if ((context.ownerDocument || context) !== document) { 1512 setDocument(context); 1513 } 1514 return contains(context, elem); 1515 }; 1516 1517 Sizzle.attr = function (elem, name) { 1518 // Set document vars if needed 1519 if ((elem.ownerDocument || elem) !== document) { 1520 setDocument(elem); 1521 } 1522 1523 var fn = Expr.attrHandle[name.toLowerCase()], 1524 1525 // Don't get fooled by Object.prototype properties (jQuery #13807) 1526 val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : undefined; 1527 1528 return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute(name) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null; 1529 }; 1530 1531 Sizzle.error = function (msg) { 1532 throw new Error("Syntax error, unrecognized expression: " + msg); 1533 }; 1534 1535 /** 1536 * Document sorting and removing duplicates 1537 * @param {ArrayLike} results 1538 */ 1539 Sizzle.uniqueSort = function (results) { 1540 var elem, 1541 duplicates = [], 1542 j = 0, 1543 i = 0; 1544 1545 // Unless we *know* we can detect duplicates, assume their presence 1546 hasDuplicate = !support.detectDuplicates; 1547 sortInput = !support.sortStable && results.slice(0); 1548 results.sort(sortOrder); 1549
vendor: 5,558 bytes, lines 1550-1730
1550 if (hasDuplicate) { 1551 while (elem = results[i++]) { 1552 if (elem === results[i]) { 1553 j = duplicates.push(i); 1554 } 1555 } 1556 while (j--) { 1557 results.splice(duplicates[j], 1); 1558 } 1559 } 1560 1561 // Clear input after sorting to release objects 1562 // See https://github.com/jquery/sizzle/pull/225 1563 sortInput = null; 1564 1565 return results; 1566 }; 1567 1568 /** 1569 * Utility function for retrieving the text value of an array of DOM nodes 1570 * @param {Array|Element} elem 1571 */ 1572 getText = Sizzle.getText = function (elem) { 1573 var node, 1574 ret = "", 1575 i = 0, 1576 nodeType = elem.nodeType; 1577 1578 if (!nodeType) { 1579 // If no nodeType, this is expected to be an array 1580 while (node = elem[i++]) { 1581 // Do not traverse comment nodes 1582 ret += getText(node); 1583 } 1584 } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) { 1585 // Use textContent for elements 1586 // innerText usage removed for consistency of new lines (jQuery #11153) 1587 if (typeof elem.textContent === "string") { 1588 return elem.textContent; 1589 } else { 1590 // Traverse its children 1591 for (elem = elem.firstChild; elem; elem = elem.nextSibling) { 1592 ret += getText(elem); 1593 } 1594 } 1595 } else if (nodeType === 3 || nodeType === 4) { 1596 return elem.nodeValue; 1597 } 1598 // Do not include comment or processing instruction nodes 1599 1600 return ret; 1601 }; 1602 1603 Expr = Sizzle.selectors = { 1604 1605 // Can be adjusted by the user 1606 cacheLength: 50, 1607 1608 createPseudo: markFunction, 1609 1610 match: matchExpr, 1611 1612 attrHandle: {}, 1613 1614 find: {}, 1615 1616 relative: { 1617 ">": { dir: "parentNode", first: true }, 1618 " ": { dir: "parentNode" }, 1619 "+": { dir: "previousSibling", first: true }, 1620 "~": { dir: "previousSibling" } 1621 }, 1622 1623 preFilter: { 1624 "ATTR": function ATTR(match) { 1625 match[1] = match[1].replace(runescape, funescape); 1626 1627 // Move the given value to match[3] whether quoted or unquoted 1628 match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape); 1629 1630 if (match[2] === "~=") { 1631 match[3] = " " + match[3] + " "; 1632 } 1633 1634 return match.slice(0, 4); 1635 }, 1636 1637 "CHILD": function CHILD(match) { 1638 /* matches from matchExpr["CHILD"] 1639 1 type (only|nth|...) 1640 2 what (child|of-type) 1641 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 1642 4 xn-component of xn+y argument ([+-]?\d*n|) 1643 5 sign of xn-component 1644 6 x of xn-component 1645 7 sign of y-component 1646 8 y of y-component 1647 */ 1648 match[1] = match[1].toLowerCase(); 1649 1650 if (match[1].slice(0, 3) === "nth") { 1651 // nth-* requires argument 1652 if (!match[3]) { 1653 Sizzle.error(match[0]); 1654 } 1655 1656 // numeric x and y parameters for Expr.filter.CHILD 1657 // remember that false/true cast respectively to 0/1 1658 match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd")); 1659 match[5] = +(match[7] + match[8] || match[3] === "odd"); 1660 1661 // other types prohibit arguments 1662 } else if (match[3]) { 1663 Sizzle.error(match[0]); 1664 } 1665 1666 return match; 1667 }, 1668 1669 "PSEUDO": function PSEUDO(match) { 1670 var excess, 1671 unquoted = !match[6] && match[2]; 1672 1673 if (matchExpr["CHILD"].test(match[0])) { 1674 return null; 1675 } 1676 1677 // Accept quoted arguments as-is 1678 if (match[3]) { 1679 match[2] = match[4] || match[5] || ""; 1680 1681 // Strip excess characters from unquoted arguments 1682 } else if (unquoted && rpseudo.test(unquoted) && ( 1683 // Get excess from tokenize (recursively) 1684 excess = tokenize(unquoted, true)) && ( 1685 // advance to the next closing parenthesis 1686 excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) { 1687 1688 // excess is a negative index 1689 match[0] = match[0].slice(0, excess); 1690 match[2] = unquoted.slice(0, excess); 1691 } 1692 1693 // Return only captures needed by the pseudo filter method (type and argument) 1694 return match.slice(0, 3); 1695 } 1696 }, 1697 1698 filter: { 1699 1700 "TAG": function TAG(nodeNameSelector) { 1701 var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase(); 1702 return nodeNameSelector === "*" ? function () { 1703 return true; 1704 } : function (elem) { 1705 return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; 1706 }; 1707 }, 1708 1709 "CLASS": function CLASS(className) { 1710 var pattern = classCache[className + " "]; 1711 1712 return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function (elem) { 1713 return pattern.test(typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || ""); 1714 }); 1715 }, 1716 1717 "ATTR": function ATTR(name, operator, check) { 1718 return function (elem) { 1719 var result = Sizzle.attr(elem, name); 1720 1721 if (result == null) { 1722 return operator === "!="; 1723 } 1724 if (!operator) { 1725 return true; 1726 } 1727 1728 result += ""; 1729 1730 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;
vendor: 6,760 bytes, lines 1731-1925
1731 }; 1732 }, 1733 1734 "CHILD": function CHILD(type, what, argument, first, last) { 1735 var simple = type.slice(0, 3) !== "nth", 1736 forward = type.slice(-4) !== "last", 1737 ofType = what === "of-type"; 1738 1739 return first === 1 && last === 0 ? 1740 1741 // Shortcut for :nth-*(n) 1742 function (elem) { 1743 return !!elem.parentNode; 1744 } : function (elem, context, xml) { 1745 var cache, 1746 outerCache, 1747 node, 1748 diff, 1749 nodeIndex, 1750 start, 1751 dir = simple !== forward ? "nextSibling" : "previousSibling", 1752 parent = elem.parentNode, 1753 name = ofType && elem.nodeName.toLowerCase(), 1754 useCache = !xml && !ofType; 1755 1756 if (parent) { 1757 1758 // :(first|last|only)-(child|of-type) 1759 if (simple) { 1760 while (dir) { 1761 node = elem; 1762 while (node = node[dir]) { 1763 if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) { 1764 return false; 1765 } 1766 } 1767 // Reverse direction for :only-* (if we haven't yet done so) 1768 start = dir = type === "only" && !start && "nextSibling"; 1769 } 1770 return true; 1771 } 1772 1773 start = [forward ? parent.firstChild : parent.lastChild]; 1774 1775 // non-xml :nth-child(...) stores cache data on `parent` 1776 if (forward && useCache) { 1777 // Seek `elem` from a previously-cached index 1778 outerCache = parent[expando] || (parent[expando] = {}); 1779 cache = outerCache[type] || []; 1780 nodeIndex = cache[0] === dirruns && cache[1]; 1781 diff = cache[0] === dirruns && cache[2]; 1782 node = nodeIndex && parent.childNodes[nodeIndex]; 1783 1784 while (node = ++nodeIndex && node && node[dir] || ( 1785 1786 // Fallback to seeking `elem` from the start 1787 diff = nodeIndex = 0) || start.pop()) { 1788 1789 // When found, cache indexes on `parent` and break 1790 if (node.nodeType === 1 && ++diff && node === elem) { 1791 outerCache[type] = [dirruns, nodeIndex, diff]; 1792 break; 1793 } 1794 } 1795 1796 // Use previously-cached element index if available 1797 } else if (useCache && (cache = (elem[expando] || (elem[expando] = {}))[type]) && cache[0] === dirruns) { 1798 diff = cache[1]; 1799 1800 // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) 1801 } else { 1802 // Use the same loop as above to seek `elem` from the start 1803 while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) { 1804 1805 if ((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) { 1806 // Cache the index of each encountered element 1807 if (useCache) { 1808 (node[expando] || (node[expando] = {}))[type] = [dirruns, diff]; 1809 } 1810 1811 if (node === elem) { 1812 break; 1813 } 1814 } 1815 } 1816 } 1817 1818 // Incorporate the offset, then check against cycle size 1819 diff -= last; 1820 return diff === first || diff % first === 0 && diff / first >= 0; 1821 } 1822 }; 1823 }, 1824 1825 "PSEUDO": function PSEUDO(pseudo, argument) { 1826 // pseudo-class names are case-insensitive 1827 // http://www.w3.org/TR/selectors/#pseudo-classes 1828 // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters 1829 // Remember that setFilters inherits from pseudos 1830 var args, 1831 fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error("unsupported pseudo: " + pseudo); 1832 1833 // The user may use createPseudo to indicate that 1834 // arguments are needed to create the filter function 1835 // just as Sizzle does 1836 if (fn[expando]) { 1837 return fn(argument); 1838 } 1839 1840 // But maintain support for old signatures 1841 if (fn.length > 1) { 1842 args = [pseudo, pseudo, "", argument]; 1843 return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function (seed, matches) { 1844 var idx, 1845 matched = fn(seed, argument), 1846 i = matched.length; 1847 while (i--) { 1848 idx = indexOf(seed, matched[i]); 1849 seed[idx] = !(matches[idx] = matched[i]); 1850 } 1851 }) : function (elem) { 1852 return fn(elem, 0, args); 1853 }; 1854 } 1855 1856 return fn; 1857 } 1858 }, 1859 1860 pseudos: { 1861 // Potentially complex pseudos 1862 "not": markFunction(function (selector) { 1863 // Trim the selector passed to compile 1864 // to avoid treating leading and trailing 1865 // spaces as combinators 1866 var input = [], 1867 results = [], 1868 matcher = compile(selector.replace(rtrim, "$1")); 1869 1870 return matcher[expando] ? markFunction(function (seed, matches, context, xml) { 1871 var elem, 1872 unmatched = matcher(seed, null, xml, []), 1873 i = seed.length; 1874 1875 // Match elements unmatched by `matcher` 1876 while (i--) { 1877 if (elem = unmatched[i]) { 1878 seed[i] = !(matches[i] = elem); 1879 } 1880 } 1881 }) : function (elem, context, xml) { 1882 input[0] = elem; 1883 matcher(input, null, xml, results); 1884 // Don't keep the element (issue #299) 1885 input[0] = null; 1886 return !results.pop(); 1887 }; 1888 }), 1889 1890 "has": markFunction(function (selector) { 1891 return function (elem) { 1892 return Sizzle(selector, elem).length > 0; 1893 }; 1894 }), 1895 1896 "contains": markFunction(function (text) { 1897 text = text.replace(runescape, funescape); 1898 return function (elem) { 1899 return (elem.textContent || elem.innerText || getText(elem)).indexOf(text) > -1; 1900 }; 1901 }), 1902 1903 // "Whether an element is represented by a :lang() selector 1904 // is based solely on the element's language value 1905 // being equal to the identifier C, 1906 // or beginning with the identifier C immediately followed by "-". 1907 // The matching of C against the element's language value is performed case-insensitively. 1908 // The identifier C does not have to be a valid language name." 1909 // http://www.w3.org/TR/selectors/#lang-pseudo 1910 "lang": markFunction(function (lang) { 1911 // lang value must be a valid identifier 1912 if (!ridentifier.test(lang || "")) { 1913 Sizzle.error("unsupported lang: " + lang); 1914 } 1915 lang = lang.replace(runescape, funescape).toLowerCase(); 1916 return function (elem) { 1917 var elemLang; 1918 do { 1919 if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) { 1920 1921 elemLang = elemLang.toLowerCase(); 1922 return elemLang === lang || elemLang.indexOf(lang + "-") === 0; 1923 } 1924 } while ((elem = elem.parentNode) && elem.nodeType === 1); 1925 return false;
vendor: 4,504 bytes, lines 1926-2079
1926 }; 1927 }), 1928 1929 // Miscellaneous 1930 "target": function target(elem) { 1931 var hash = window.location && window.location.hash; 1932 return hash && hash.slice(1) === elem.id; 1933 }, 1934 1935 "root": function root(elem) { 1936 return elem === docElem; 1937 }, 1938 1939 "focus": function focus(elem) { 1940 return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); 1941 }, 1942 1943 // Boolean properties 1944 "enabled": function enabled(elem) { 1945 return elem.disabled === false; 1946 }, 1947 1948 "disabled": function disabled(elem) { 1949 return elem.disabled === true; 1950 }, 1951 1952 "checked": function checked(elem) { 1953 // In CSS3, :checked should return both checked and selected elements 1954 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 1955 var nodeName = elem.nodeName.toLowerCase(); 1956 return nodeName === "input" && !!elem.checked || nodeName === "option" && !!elem.selected; 1957 }, 1958 1959 "selected": function selected(elem) { 1960 // Accessing this property makes selected-by-default 1961 // options in Safari work properly 1962 if (elem.parentNode) { 1963 elem.parentNode.selectedIndex; 1964 } 1965 1966 return elem.selected === true; 1967 }, 1968 1969 // Contents 1970 "empty": function empty(elem) { 1971 // http://www.w3.org/TR/selectors/#empty-pseudo 1972 // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), 1973 // but not by others (comment: 8; processing instruction: 7; etc.) 1974 // nodeType < 6 works because attributes (2) do not appear as children 1975 for (elem = elem.firstChild; elem; elem = elem.nextSibling) { 1976 if (elem.nodeType < 6) { 1977 return false; 1978 } 1979 } 1980 return true; 1981 }, 1982 1983 "parent": function parent(elem) { 1984 return !Expr.pseudos["empty"](elem); 1985 }, 1986 1987 // Element/input types 1988 "header": function header(elem) { 1989 return rheader.test(elem.nodeName); 1990 }, 1991 1992 "input": function input(elem) { 1993 return rinputs.test(elem.nodeName); 1994 }, 1995 1996 "button": function button(elem) { 1997 var name = elem.nodeName.toLowerCase(); 1998 return name === "input" && elem.type === "button" || name === "button"; 1999 }, 2000 2001 "text": function text(elem) { 2002 var attr; 2003 return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && ( 2004 2005 // Support: IE<8 2006 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" 2007 (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text"); 2008 }, 2009 2010 // Position-in-collection 2011 "first": createPositionalPseudo(function () { 2012 return [0]; 2013 }), 2014 2015 "last": createPositionalPseudo(function (matchIndexes, length) { 2016 return [length - 1]; 2017 }), 2018 2019 "eq": createPositionalPseudo(function (matchIndexes, length, argument) { 2020 return [argument < 0 ? argument + length : argument]; 2021 }), 2022 2023 "even": createPositionalPseudo(function (matchIndexes, length) { 2024 var i = 0; 2025 for (; i < length; i += 2) { 2026 matchIndexes.push(i); 2027 } 2028 return matchIndexes; 2029 }), 2030 2031 "odd": createPositionalPseudo(function (matchIndexes, length) { 2032 var i = 1; 2033 for (; i < length; i += 2) { 2034 matchIndexes.push(i); 2035 } 2036 return matchIndexes; 2037 }), 2038 2039 "lt": createPositionalPseudo(function (matchIndexes, length, argument) { 2040 var i = argument < 0 ? argument + length : argument; 2041 for (; --i >= 0;) { 2042 matchIndexes.push(i); 2043 } 2044 return matchIndexes; 2045 }), 2046 2047 "gt": createPositionalPseudo(function (matchIndexes, length, argument) { 2048 var i = argument < 0 ? argument + length : argument; 2049 for (; ++i < length;) { 2050 matchIndexes.push(i); 2051 } 2052 return matchIndexes; 2053 }) 2054 } 2055 }; 2056 2057 Expr.pseudos["nth"] = Expr.pseudos["eq"]; 2058 2059 // Add button/input type pseudos 2060 for (i in { radio: true, checkbox: true, file: true, password: true, image: true }) { 2061 Expr.pseudos[i] = createInputPseudo(i); 2062 } 2063 for (i in { submit: true, reset: true }) { 2064 Expr.pseudos[i] = createButtonPseudo(i); 2065 } 2066 2067 // Easy API for creating new setFilters 2068 function setFilters() {} 2069 setFilters.prototype = Expr.filters = Expr.pseudos; 2070 Expr.setFilters = new setFilters(); 2071 2072 tokenize = Sizzle.tokenize = function (selector, parseOnly) { 2073 var matched, 2074 match, 2075 tokens, 2076 type, 2077 soFar, 2078 groups, 2079 preFilters,
vendor: 54,025 bytes, lines 2080-3943
2080 cached = tokenCache[selector + " "]; 2081 2082 if (cached) { 2083 return parseOnly ? 0 : cached.slice(0); 2084 } 2085 2086 soFar = selector; 2087 groups = []; 2088 preFilters = Expr.preFilter; 2089 2090 while (soFar) { 2091 2092 // Comma and first run 2093 if (!matched || (match = rcomma.exec(soFar))) { 2094 if (match) { 2095 // Don't consume trailing commas as valid 2096 soFar = soFar.slice(match[0].length) || soFar; 2097 } 2098 groups.push(tokens = []); 2099 } 2100 2101 matched = false; 2102 2103 // Combinators 2104 if (match = rcombinators.exec(soFar)) { 2105 matched = match.shift(); 2106 tokens.push({ 2107 value: matched, 2108 // Cast descendant combinators to space 2109 type: match[0].replace(rtrim, " ") 2110 }); 2111 soFar = soFar.slice(matched.length); 2112 } 2113 2114 // Filters 2115 for (type in Expr.filter) { 2116 if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) { 2117 matched = match.shift(); 2118 tokens.push({ 2119 value: matched, 2120 type: type, 2121 matches: match 2122 }); 2123 soFar = soFar.slice(matched.length); 2124 } 2125 } 2126 2127 if (!matched) { 2128 break; 2129 } 2130 } 2131 2132 // Return the length of the invalid excess 2133 // if we're just parsing 2134 // Otherwise, throw an error or return tokens 2135 return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) : 2136 // Cache the tokens 2137 tokenCache(selector, groups).slice(0); 2138 }; 2139 2140 function toSelector(tokens) { 2141 var i = 0, 2142 len = tokens.length, 2143 selector = ""; 2144 for (; i < len; i++) { 2145 selector += tokens[i].value; 2146 } 2147 return selector; 2148 } 2149 2150 function addCombinator(matcher, combinator, base) { 2151 var dir = combinator.dir, 2152 checkNonElements = base && dir === "parentNode", 2153 doneName = done++; 2154 2155 return combinator.first ? 2156 // Check against closest ancestor/preceding element 2157 function (elem, context, xml) { 2158 while (elem = elem[dir]) { 2159 if (elem.nodeType === 1 || checkNonElements) { 2160 return matcher(elem, context, xml); 2161 } 2162 } 2163 } : 2164 2165 // Check against all ancestor/preceding elements 2166 function (elem, context, xml) { 2167 var oldCache, 2168 outerCache, 2169 newCache = [dirruns, doneName]; 2170 2171 // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching 2172 if (xml) { 2173 while (elem = elem[dir]) { 2174 if (elem.nodeType === 1 || checkNonElements) { 2175 if (matcher(elem, context, xml)) { 2176 return true; 2177 } 2178 } 2179 } 2180 } else { 2181 while (elem = elem[dir]) { 2182 if (elem.nodeType === 1 || checkNonElements) { 2183 outerCache = elem[expando] || (elem[expando] = {}); 2184 if ((oldCache = outerCache[dir]) && oldCache[0] === dirruns && oldCache[1] === doneName) { 2185 2186 // Assign to newCache so results back-propagate to previous elements 2187 return newCache[2] = oldCache[2]; 2188 } else { 2189 // Reuse newcache so results back-propagate to previous elements 2190 outerCache[dir] = newCache; 2191 2192 // A match means we're done; a fail means we have to keep checking 2193 if (newCache[2] = matcher(elem, context, xml)) { 2194 return true; 2195 } 2196 } 2197 } 2198 } 2199 } 2200 }; 2201 } 2202 2203 function elementMatcher(matchers) { 2204 return matchers.length > 1 ? function (elem, context, xml) { 2205 var i = matchers.length; 2206 while (i--) { 2207 if (!matchers[i](elem, context, xml)) { 2208 return false; 2209 } 2210 } 2211 return true; 2212 } : matchers[0]; 2213 } 2214 2215 function multipleContexts(selector, contexts, results) { 2216 var i = 0, 2217 len = contexts.length; 2218 for (; i < len; i++) { 2219 Sizzle(selector, contexts[i], results); 2220 } 2221 return results; 2222 } 2223 2224 function condense(unmatched, map, filter, context, xml) { 2225 var elem, 2226 newUnmatched = [], 2227 i = 0, 2228 len = unmatched.length, 2229 mapped = map != null; 2230 2231 for (; i < len; i++) { 2232 if (elem = unmatched[i]) { 2233 if (!filter || filter(elem, context, xml)) { 2234 newUnmatched.push(elem); 2235 if (mapped) { 2236 map.push(i); 2237 } 2238 } 2239 } 2240 } 2241 2242 return newUnmatched; 2243 } 2244 2245 function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) { 2246 if (postFilter && !postFilter[expando]) { 2247 postFilter = setMatcher(postFilter); 2248 } 2249 if (postFinder && !postFinder[expando]) { 2250 postFinder = setMatcher(postFinder, postSelector); 2251 } 2252 return markFunction(function (seed, results, context, xml) { 2253 var temp, 2254 i, 2255 elem, 2256 preMap = [], 2257 postMap = [], 2258 preexisting = results.length, 2259 2260 2261 // Get initial elements from seed or context 2262 elems = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []), 2263 2264 2265 // Prefilter to get matcher input, preserving a map for seed-results synchronization 2266 matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems, 2267 matcherOut = matcher ? 2268 // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, 2269 postFinder || (seed ? preFilter : preexisting || postFilter) ? 2270 2271 // ...intermediate processing is necessary 2272 [] : 2273 2274 // ...otherwise use results directly 2275 results : matcherIn; 2276 2277 // Find primary matches 2278 if (matcher) { 2279 matcher(matcherIn, matcherOut, context, xml); 2280 } 2281 2282 // Apply postFilter 2283 if (postFilter) { 2284 temp = condense(matcherOut, postMap); 2285 postFilter(temp, [], context, xml); 2286 2287 // Un-match failing elements by moving them back to matcherIn 2288 i = temp.length; 2289 while (i--) { 2290 if (elem = temp[i]) { 2291 matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem); 2292 } 2293 } 2294 } 2295 2296 if (seed) { 2297 if (postFinder || preFilter) { 2298 if (postFinder) { 2299 // Get the final matcherOut by condensing this intermediate into postFinder contexts 2300 temp = []; 2301 i = matcherOut.length; 2302 while (i--) { 2303 if (elem = matcherOut[i]) { 2304 // Restore matcherIn since elem is not yet a final match 2305 temp.push(matcherIn[i] = elem); 2306 } 2307 } 2308 postFinder(null, matcherOut = [], temp, xml); 2309 } 2310 2311 // Move matched elements from seed to results to keep them synchronized 2312 i = matcherOut.length; 2313 while (i--) { 2314 if ((elem = matcherOut[i]) && (temp = postFinder ? indexOf(seed, elem) : preMap[i]) > -1) { 2315 2316 seed[temp] = !(results[temp] = elem); 2317 } 2318 } 2319 } 2320 2321 // Add elements to results, through postFinder if defined 2322 } else { 2323 matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut); 2324 if (postFinder) { 2325 postFinder(null, results, matcherOut, xml); 2326 } else { 2327 push.apply(results, matcherOut); 2328 } 2329 } 2330 }); 2331 } 2332 2333 function matcherFromTokens(tokens) { 2334 var checkContext, 2335 matcher, 2336 j, 2337 len = tokens.length, 2338 leadingRelative = Expr.relative[tokens[0].type], 2339 implicitRelative = leadingRelative || Expr.relative[" "], 2340 i = leadingRelative ? 1 : 0, 2341 2342 2343 // The foundational matcher ensures that elements are reachable from top-level context(s) 2344 matchContext = addCombinator(function (elem) { 2345 return elem === checkContext; 2346 }, implicitRelative, true), 2347 matchAnyContext = addCombinator(function (elem) { 2348 return indexOf(checkContext, elem) > -1; 2349 }, implicitRelative, true), 2350 matchers = [function (elem, context, xml) { 2351 var ret = !leadingRelative && (xml || context !== outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml)); 2352 // Avoid hanging onto element (issue #299) 2353 checkContext = null; 2354 return ret; 2355 }]; 2356 2357 for (; i < len; i++) { 2358 if (matcher = Expr.relative[tokens[i].type]) { 2359 matchers = [addCombinator(elementMatcher(matchers), matcher)]; 2360 } else { 2361 matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches); 2362 2363 // Return special upon seeing a positional matcher 2364 if (matcher[expando]) { 2365 // Find the next relative operator (if any) for proper handling 2366 j = ++i; 2367 for (; j < len; j++) { 2368 if (Expr.relative[tokens[j].type]) { 2369 break; 2370 } 2371 } 2372 return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector( 2373 // If the preceding token was a descendant combinator, insert an implicit any-element `*` 2374 tokens.slice(0, i - 1).concat({ value: tokens[i - 2].type === " " ? "*" : "" })).replace(rtrim, "$1"), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len && toSelector(tokens)); 2375 } 2376 matchers.push(matcher); 2377 } 2378 } 2379 2380 return elementMatcher(matchers); 2381 } 2382 2383 function matcherFromGroupMatchers(elementMatchers, setMatchers) { 2384 var bySet = setMatchers.length > 0, 2385 byElement = elementMatchers.length > 0, 2386 superMatcher = function superMatcher(seed, context, xml, results, outermost) { 2387 var elem, 2388 j, 2389 matcher, 2390 matchedCount = 0, 2391 i = "0", 2392 unmatched = seed && [], 2393 setMatched = [], 2394 contextBackup = outermostContext, 2395 2396 // We must always have either seed elements or outermost context 2397 elems = seed || byElement && Expr.find["TAG"]("*", outermost), 2398 2399 // Use integer dirruns iff this is the outermost matcher 2400 dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1, 2401 len = elems.length; 2402 2403 if (outermost) { 2404 outermostContext = context !== document && context; 2405 } 2406 2407 // Add elements passing elementMatchers directly to results 2408 // Keep `i` a string if there are no elements so `matchedCount` will be "00" below 2409 // Support: IE<9, Safari 2410 // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id 2411 for (; i !== len && (elem = elems[i]) != null; i++) { 2412 if (byElement && elem) { 2413 j = 0; 2414 while (matcher = elementMatchers[j++]) { 2415 if (matcher(elem, context, xml)) { 2416 results.push(elem); 2417 break; 2418 } 2419 } 2420 if (outermost) { 2421 dirruns = dirrunsUnique; 2422 } 2423 } 2424 2425 // Track unmatched elements for set filters 2426 if (bySet) { 2427 // They will have gone through all possible matchers 2428 if (elem = !matcher && elem) { 2429 matchedCount--; 2430 } 2431 2432 // Lengthen the array for every element, matched or not 2433 if (seed) { 2434 unmatched.push(elem); 2435 } 2436 } 2437 } 2438 2439 // Apply set filters to unmatched elements 2440 matchedCount += i; 2441 if (bySet && i !== matchedCount) { 2442 j = 0; 2443 while (matcher = setMatchers[j++]) { 2444 matcher(unmatched, setMatched, context, xml); 2445 } 2446 2447 if (seed) { 2448 // Reintegrate element matches to eliminate the need for sorting 2449 if (matchedCount > 0) { 2450 while (i--) { 2451 if (!(unmatched[i] || setMatched[i])) { 2452 setMatched[i] = pop.call(results); 2453 } 2454 } 2455 } 2456 2457 // Discard index placeholder values to get only actual matches 2458 setMatched = condense(setMatched); 2459 } 2460 2461 // Add matches to results 2462 push.apply(results, setMatched); 2463 2464 // Seedless set matches succeeding multiple successful matchers stipulate sorting 2465 if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) { 2466 2467 Sizzle.uniqueSort(results); 2468 } 2469 } 2470 2471 // Override manipulation of globals by nested matchers 2472 if (outermost) { 2473 dirruns = dirrunsUnique; 2474 outermostContext = contextBackup; 2475 } 2476 2477 return unmatched; 2478 }; 2479 2480 return bySet ? markFunction(superMatcher) : superMatcher; 2481 } 2482 2483 compile = Sizzle.compile = function (selector, match /* Internal Use Only */) { 2484 var i, 2485 setMatchers = [], 2486 elementMatchers = [], 2487 cached = compilerCache[selector + " "]; 2488 2489 if (!cached) { 2490 // Generate a function of recursive functions that can be used to check each element 2491 if (!match) { 2492 match = tokenize(selector); 2493 } 2494 i = match.length; 2495 while (i--) { 2496 cached = matcherFromTokens(match[i]); 2497 if (cached[expando]) { 2498 setMatchers.push(cached); 2499 } else { 2500 elementMatchers.push(cached); 2501 } 2502 } 2503 2504 // Cache the compiled function 2505 cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers)); 2506 2507 // Save selector and tokenization 2508 cached.selector = selector; 2509 } 2510 return cached; 2511 }; 2512 2513 /** 2514 * A low-level selection function that works with Sizzle's compiled 2515 * selector functions 2516 * @param {String|Function} selector A selector or a pre-compiled 2517 * selector function built with Sizzle.compile 2518 * @param {Element} context 2519 * @param {Array} [results] 2520 * @param {Array} [seed] A set of elements to match against 2521 */ 2522 select = Sizzle.select = function (selector, context, results, seed) { 2523 var i, 2524 tokens, 2525 token, 2526 type, 2527 find, 2528 compiled = typeof selector === "function" && selector, 2529 match = !seed && tokenize(selector = compiled.selector || selector); 2530 2531 results = results || []; 2532 2533 // Try to minimize operations if there is no seed and only one group 2534 if (match.length === 1) { 2535 2536 // Take a shortcut and set the context if the root selector is an ID 2537 tokens = match[0] = match[0].slice(0); 2538 if (tokens.length > 2 && (token = tokens[0]).type === "ID" && support.getById && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) { 2539 2540 context = (Expr.find["ID"](token.matches[0].replace(runescape, funescape), context) || [])[0]; 2541 if (!context) { 2542 return results; 2543 2544 // Precompiled matchers will still verify ancestry, so step up a level 2545 } else if (compiled) { 2546 context = context.parentNode; 2547 } 2548 2549 selector = selector.slice(tokens.shift().value.length); 2550 } 2551 2552 // Fetch a seed set for right-to-left matching 2553 i = matchExpr["needsContext"].test(selector) ? 0 : tokens.length; 2554 while (i--) { 2555 token = tokens[i]; 2556 2557 // Abort if we hit a combinator 2558 if (Expr.relative[type = token.type]) { 2559 break; 2560 } 2561 if (find = Expr.find[type]) { 2562 // Search, expanding context for leading sibling combinators 2563 if (seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context)) { 2564 2565 // If seed is empty or no tokens remain, we can return early 2566 tokens.splice(i, 1); 2567 selector = seed.length && toSelector(tokens); 2568 if (!selector) { 2569 push.apply(results, seed); 2570 return results; 2571 } 2572 2573 break; 2574 } 2575 } 2576 } 2577 } 2578 2579 // Compile and execute a filtering function if one is not provided 2580 // Provide `match` to avoid retokenization if we modified the selector above 2581 (compiled || compile(selector, match))(seed, context, !documentIsHTML, results, rsibling.test(selector) && testContext(context.parentNode) || context); 2582 return results; 2583 }; 2584 2585 // One-time assignments 2586 2587 // Sort stability 2588 support.sortStable = expando.split("").sort(sortOrder).join("") === expando; 2589 2590 // Support: Chrome 14-35+ 2591 // Always assume duplicates if they aren't passed to the comparison function 2592 support.detectDuplicates = !!hasDuplicate; 2593 2594 // Initialize against the default document 2595 setDocument(); 2596 2597 // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) 2598 // Detached nodes confoundingly follow *each other* 2599 support.sortDetached = assert(function (div1) { 2600 // Should return 1, but returns 4 (following) 2601 return div1.compareDocumentPosition(document.createElement("div")) & 1; 2602 }); 2603 2604 // Support: IE<8 2605 // Prevent attribute/property "interpolation" 2606 // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx 2607 if (!assert(function (div) { 2608 div.innerHTML = "<a href='#'></a>"; 2609 return div.firstChild.getAttribute("href") === "#"; 2610 })) { 2611 addHandle("type|href|height|width", function (elem, name, isXML) { 2612 if (!isXML) { 2613 return elem.getAttribute(name, name.toLowerCase() === "type" ? 1 : 2); 2614 } 2615 }); 2616 } 2617 2618 // Support: IE<9 2619 // Use defaultValue in place of getAttribute("value") 2620 if (!support.attributes || !assert(function (div) { 2621 div.innerHTML = "<input/>"; 2622 div.firstChild.setAttribute("value", ""); 2623 return div.firstChild.getAttribute("value") === ""; 2624 })) { 2625 addHandle("value", function (elem, name, isXML) { 2626 if (!isXML && elem.nodeName.toLowerCase() === "input") { 2627 return elem.defaultValue; 2628 } 2629 }); 2630 } 2631 2632 // Support: IE<9 2633 // Use getAttributeNode to fetch booleans when getAttribute lies 2634 if (!assert(function (div) { 2635 return div.getAttribute("disabled") == null; 2636 })) { 2637 addHandle(booleans, function (elem, name, isXML) { 2638 var val; 2639 if (!isXML) { 2640 return elem[name] === true ? name.toLowerCase() : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null; 2641 } 2642 }); 2643 } 2644 2645 return Sizzle; 2646 }(window); 2647 2648 jQuery.find = Sizzle; 2649 jQuery.expr = Sizzle.selectors; 2650 jQuery.expr[":"] = jQuery.expr.pseudos; 2651 jQuery.unique = Sizzle.uniqueSort; 2652 jQuery.text = Sizzle.getText; 2653 jQuery.isXMLDoc = Sizzle.isXML; 2654 jQuery.contains = Sizzle.contains; 2655 2656 var rneedsContext = jQuery.expr.match.needsContext; 2657 2658 var rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/; 2659 2660 var risSimple = /^.[^:#\[\.,]*$/; 2661 2662 // Implement the identical functionality for filter and not 2663 function winnow(elements, qualifier, not) { 2664 if (jQuery.isFunction(qualifier)) { 2665 return jQuery.grep(elements, function (elem, i) { 2666 /* jshint -W018 */ 2667 return !!qualifier.call(elem, i, elem) !== not; 2668 }); 2669 } 2670 2671 if (qualifier.nodeType) { 2672 return jQuery.grep(elements, function (elem) { 2673 return elem === qualifier !== not; 2674 }); 2675 } 2676 2677 if (typeof qualifier === "string") { 2678 if (risSimple.test(qualifier)) { 2679 return jQuery.filter(qualifier, elements, not); 2680 } 2681 2682 qualifier = jQuery.filter(qualifier, elements); 2683 } 2684 2685 return jQuery.grep(elements, function (elem) { 2686 return indexOf.call(qualifier, elem) >= 0 !== not; 2687 }); 2688 } 2689 2690 jQuery.filter = function (expr, elems, not) { 2691 var elem = elems[0]; 2692 2693 if (not) { 2694 expr = ":not(" + expr + ")"; 2695 } 2696 2697 return elems.length === 1 && elem.nodeType === 1 ? jQuery.find.matchesSelector(elem, expr) ? [elem] : [] : jQuery.find.matches(expr, jQuery.grep(elems, function (elem) { 2698 return elem.nodeType === 1; 2699 })); 2700 }; 2701 2702 jQuery.fn.extend({ 2703 find: function find(selector) { 2704 var i, 2705 len = this.length, 2706 ret = [], 2707 self = this; 2708 2709 if (typeof selector !== "string") { 2710 return this.pushStack(jQuery(selector).filter(function () { 2711 for (i = 0; i < len; i++) { 2712 if (jQuery.contains(self[i], this)) { 2713 return true; 2714 } 2715 } 2716 })); 2717 } 2718 2719 for (i = 0; i < len; i++) { 2720 jQuery.find(selector, self[i], ret); 2721 } 2722 2723 // Needed because $( selector, context ) becomes $( context ).find( selector ) 2724 ret = this.pushStack(len > 1 ? jQuery.unique(ret) : ret); 2725 ret.selector = this.selector ? this.selector + " " + selector : selector; 2726 return ret; 2727 }, 2728 filter: function filter(selector) { 2729 return this.pushStack(winnow(this, selector || [], false)); 2730 }, 2731 not: function not(selector) { 2732 return this.pushStack(winnow(this, selector || [], true)); 2733 }, 2734 is: function is(selector) { 2735 return !!winnow(this, 2736 2737 // If this is a positional/relative selector, check membership in the returned set 2738 // so $("p:first").is("p:last") won't return true for a doc with two "p". 2739 typeof selector === "string" && rneedsContext.test(selector) ? jQuery(selector) : selector || [], false).length; 2740 } 2741 }); 2742 2743 // Initialize a jQuery object 2744 2745 // A central reference to the root jQuery(document) 2746 var rootjQuery, 2747 2748 2749 // A simple way to check for HTML strings 2750 // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) 2751 // Strict HTML recognition (#11290: must start with <) 2752 rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, 2753 init = jQuery.fn.init = function (selector, context) { 2754 var match, elem; 2755 2756 // HANDLE: $(""), $(null), $(undefined), $(false) 2757 if (!selector) { 2758 return this; 2759 } 2760 2761 // Handle HTML strings 2762 if (typeof selector === "string") { 2763 if (selector[0] === "<" && selector[selector.length - 1] === ">" && selector.length >= 3) { 2764 // Assume that strings that start and end with <> are HTML and skip the regex check 2765 match = [null, selector, null]; 2766 } else { 2767 match = rquickExpr.exec(selector); 2768 } 2769 2770 // Match html or make sure no context is specified for #id 2771 if (match && (match[1] || !context)) { 2772 2773 // HANDLE: $(html) -> $(array) 2774 if (match[1]) { 2775 context = context instanceof jQuery ? context[0] : context; 2776 2777 // Option to run scripts is true for back-compat 2778 // Intentionally let the error be thrown if parseHTML is not present 2779 jQuery.merge(this, jQuery.parseHTML(match[1], context && context.nodeType ? context.ownerDocument || context : document, true)); 2780 2781 // HANDLE: $(html, props) 2782 if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) { 2783 for (match in context) { 2784 // Properties of context are called as methods if possible 2785 if (jQuery.isFunction(this[match])) { 2786 this[match](context[match]); 2787 2788 // ...and otherwise set as attributes 2789 } else { 2790 this.attr(match, context[match]); 2791 } 2792 } 2793 } 2794 2795 return this; 2796 2797 // HANDLE: $(#id) 2798 } else { 2799 elem = document.getElementById(match[2]); 2800 2801 // Support: Blackberry 4.6 2802 // gEBID returns nodes no longer in the document (#6963) 2803 if (elem && elem.parentNode) { 2804 // Inject the element directly into the jQuery object 2805 this.length = 1; 2806 this[0] = elem; 2807 } 2808 2809 this.context = document; 2810 this.selector = selector; 2811 return this; 2812 } 2813 2814 // HANDLE: $(expr, $(...)) 2815 } else if (!context || context.jquery) { 2816 return (context || rootjQuery).find(selector); 2817 2818 // HANDLE: $(expr, context) 2819 // (which is just equivalent to: $(context).find(expr) 2820 } else { 2821 return this.constructor(context).find(selector); 2822 } 2823 2824 // HANDLE: $(DOMElement) 2825 } else if (selector.nodeType) { 2826 this.context = this[0] = selector; 2827 this.length = 1; 2828 return this; 2829 2830 // HANDLE: $(function) 2831 // Shortcut for document ready 2832 } else if (jQuery.isFunction(selector)) { 2833 return typeof rootjQuery.ready !== "undefined" ? rootjQuery.ready(selector) : 2834 // Execute immediately if ready is not present 2835 selector(jQuery); 2836 } 2837 2838 if (selector.selector !== undefined) { 2839 this.selector = selector.selector; 2840 this.context = selector.context; 2841 } 2842 2843 return jQuery.makeArray(selector, this); 2844 }; 2845 2846 // Give the init function the jQuery prototype for later instantiation 2847 init.prototype = jQuery.fn; 2848 2849 // Initialize central reference 2850 rootjQuery = jQuery(document); 2851 2852 var rparentsprev = /^(?:parents|prev(?:Until|All))/, 2853 2854 // Methods guaranteed to produce a unique set when starting from a unique set 2855 guaranteedUnique = { 2856 children: true, 2857 contents: true, 2858 next: true, 2859 prev: true 2860 }; 2861 2862 jQuery.extend({ 2863 dir: function dir(elem, _dir, until) { 2864 var matched = [], 2865 truncate = until !== undefined; 2866 2867 while ((elem = elem[_dir]) && elem.nodeType !== 9) { 2868 if (elem.nodeType === 1) { 2869 if (truncate && jQuery(elem).is(until)) { 2870 break; 2871 } 2872 matched.push(elem); 2873 } 2874 } 2875 return matched; 2876 }, 2877 2878 sibling: function sibling(n, elem) { 2879 var matched = []; 2880 2881 for (; n; n = n.nextSibling) { 2882 if (n.nodeType === 1 && n !== elem) { 2883 matched.push(n); 2884 } 2885 } 2886 2887 return matched; 2888 } 2889 }); 2890 2891 jQuery.fn.extend({ 2892 has: function has(target) { 2893 var targets = jQuery(target, this), 2894 l = targets.length; 2895 2896 return this.filter(function () { 2897 var i = 0; 2898 for (; i < l; i++) { 2899 if (jQuery.contains(this, targets[i])) { 2900 return true; 2901 } 2902 } 2903 }); 2904 }, 2905 2906 closest: function closest(selectors, context) { 2907 var cur, 2908 i = 0, 2909 l = this.length, 2910 matched = [], 2911 pos = rneedsContext.test(selectors) || typeof selectors !== "string" ? jQuery(selectors, context || this.context) : 0; 2912 2913 for (; i < l; i++) { 2914 for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) { 2915 // Always skip document fragments 2916 if (cur.nodeType < 11 && (pos ? pos.index(cur) > -1 : 2917 2918 // Don't pass non-elements to Sizzle 2919 cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors))) { 2920 2921 matched.push(cur); 2922 break; 2923 } 2924 } 2925 } 2926 2927 return this.pushStack(matched.length > 1 ? jQuery.unique(matched) : matched); 2928 }, 2929 2930 // Determine the position of an element within the set 2931 index: function index(elem) { 2932 2933 // No argument, return index in parent 2934 if (!elem) { 2935 return this[0] && this[0].parentNode ? this.first().prevAll().length : -1; 2936 } 2937 2938 // Index in selector 2939 if (typeof elem === "string") { 2940 return indexOf.call(jQuery(elem), this[0]); 2941 } 2942 2943 // Locate the position of the desired element 2944 return indexOf.call(this, 2945 2946 // If it receives a jQuery object, the first element is used 2947 elem.jquery ? elem[0] : elem); 2948 }, 2949 2950 add: function add(selector, context) { 2951 return this.pushStack(jQuery.unique(jQuery.merge(this.get(), jQuery(selector, context)))); 2952 }, 2953 2954 addBack: function addBack(selector) { 2955 return this.add(selector == null ? this.prevObject : this.prevObject.filter(selector)); 2956 } 2957 }); 2958 2959 function sibling(cur, dir) { 2960 while ((cur = cur[dir]) && cur.nodeType !== 1) {} 2961 return cur; 2962 } 2963 2964 jQuery.each({ 2965 parent: function parent(elem) { 2966 var parent = elem.parentNode; 2967 return parent && parent.nodeType !== 11 ? parent : null; 2968 }, 2969 parents: function parents(elem) { 2970 return jQuery.dir(elem, "parentNode"); 2971 }, 2972 parentsUntil: function parentsUntil(elem, i, until) { 2973 return jQuery.dir(elem, "parentNode", until); 2974 }, 2975 next: function next(elem) { 2976 return sibling(elem, "nextSibling"); 2977 }, 2978 prev: function prev(elem) { 2979 return sibling(elem, "previousSibling"); 2980 }, 2981 nextAll: function nextAll(elem) { 2982 return jQuery.dir(elem, "nextSibling"); 2983 }, 2984 prevAll: function prevAll(elem) { 2985 return jQuery.dir(elem, "previousSibling"); 2986 }, 2987 nextUntil: function nextUntil(elem, i, until) { 2988 return jQuery.dir(elem, "nextSibling", until); 2989 }, 2990 prevUntil: function prevUntil(elem, i, until) { 2991 return jQuery.dir(elem, "previousSibling", until); 2992 }, 2993 siblings: function siblings(elem) { 2994 return jQuery.sibling((elem.parentNode || {}).firstChild, elem); 2995 }, 2996 children: function children(elem) { 2997 return jQuery.sibling(elem.firstChild); 2998 }, 2999 contents: function contents(elem) { 3000 return elem.contentDocument || jQuery.merge([], elem.childNodes); 3001 } 3002 }, function (name, fn) { 3003 jQuery.fn[name] = function (until, selector) { 3004 var matched = jQuery.map(this, fn, until); 3005 3006 if (name.slice(-5) !== "Until") { 3007 selector = until; 3008 } 3009 3010 if (selector && typeof selector === "string") { 3011 matched = jQuery.filter(selector, matched); 3012 } 3013 3014 if (this.length > 1) { 3015 // Remove duplicates 3016 if (!guaranteedUnique[name]) { 3017 jQuery.unique(matched); 3018 } 3019 3020 // Reverse order for parents* and prev-derivatives 3021 if (rparentsprev.test(name)) { 3022 matched.reverse(); 3023 } 3024 } 3025 3026 return this.pushStack(matched); 3027 }; 3028 }); 3029 var rnotwhite = /\S+/g; 3030 3031 // String to Object options format cache 3032 var optionsCache = {}; 3033 3034 // Convert String-formatted options into Object-formatted ones and store in cache 3035 function createOptions(options) { 3036 var object = optionsCache[options] = {}; 3037 jQuery.each(options.match(rnotwhite) || [], function (_, flag) { 3038 object[flag] = true; 3039 }); 3040 return object; 3041 } 3042 3043 /* 3044 * Create a callback list using the following parameters: 3045 * 3046 * options: an optional list of space-separated options that will change how 3047 * the callback list behaves or a more traditional option object 3048 * 3049 * By default a callback list will act like an event callback list and can be 3050 * "fired" multiple times. 3051 * 3052 * Possible options: 3053 * 3054 * once: will ensure the callback list can only be fired once (like a Deferred) 3055 * 3056 * memory: will keep track of previous values and will call any callback added 3057 * after the list has been fired right away with the latest "memorized" 3058 * values (like a Deferred) 3059 * 3060 * unique: will ensure a callback can only be added once (no duplicate in the list) 3061 * 3062 * stopOnFalse: interrupt callings when a callback returns false 3063 * 3064 */ 3065 jQuery.Callbacks = function (options) { 3066 3067 // Convert options from String-formatted to Object-formatted if needed 3068 // (we check in cache first) 3069 options = typeof options === "string" ? optionsCache[options] || createOptions(options) : jQuery.extend({}, options); 3070 3071 var // Last fire value (for non-forgettable lists) 3072 memory, 3073 3074 // Flag to know if list was already fired 3075 _fired, 3076 3077 // Flag to know if list is currently firing 3078 firing, 3079 3080 // First callback to fire (used internally by add and fireWith) 3081 firingStart, 3082 3083 // End of the loop when firing 3084 firingLength, 3085 3086 // Index of currently firing callback (modified by remove if needed) 3087 firingIndex, 3088 3089 // Actual callback list 3090 list = [], 3091 3092 // Stack of fire calls for repeatable lists 3093 stack = !options.once && [], 3094 3095 // Fire callbacks 3096 fire = function fire(data) { 3097 memory = options.memory && data; 3098 _fired = true; 3099 firingIndex = firingStart || 0; 3100 firingStart = 0; 3101 firingLength = list.length; 3102 firing = true; 3103 for (; list && firingIndex < firingLength; firingIndex++) { 3104 if (list[firingIndex].apply(data[0], data[1]) === false && options.stopOnFalse) { 3105 memory = false; // To prevent further calls using add 3106 break; 3107 } 3108 } 3109 firing = false; 3110 if (list) { 3111 if (stack) { 3112 if (stack.length) { 3113 fire(stack.shift()); 3114 } 3115 } else if (memory) { 3116 list = []; 3117 } else { 3118 self.disable(); 3119 } 3120 } 3121 }, 3122 3123 // Actual Callbacks object 3124 self = { 3125 // Add a callback or a collection of callbacks to the list 3126 add: function add() { 3127 if (list) { 3128 // First, we save the current length 3129 var start = list.length; 3130 (function add(args) { 3131 jQuery.each(args, function (_, arg) { 3132 var type = jQuery.type(arg); 3133 if (type === "function") { 3134 if (!options.unique || !self.has(arg)) { 3135 list.push(arg); 3136 } 3137 } else if (arg && arg.length && type !== "string") { 3138 // Inspect recursively 3139 add(arg); 3140 } 3141 }); 3142 })(arguments); 3143 // Do we need to add the callbacks to the 3144 // current firing batch? 3145 if (firing) { 3146 firingLength = list.length; 3147 // With memory, if we're not firing then 3148 // we should call right away 3149 } else if (memory) { 3150 firingStart = start; 3151 fire(memory); 3152 } 3153 } 3154 return this; 3155 }, 3156 // Remove a callback from the list 3157 remove: function remove() { 3158 if (list) { 3159 jQuery.each(arguments, function (_, arg) { 3160 var index; 3161 while ((index = jQuery.inArray(arg, list, index)) > -1) { 3162 list.splice(index, 1); 3163 // Handle firing indexes 3164 if (firing) { 3165 if (index <= firingLength) { 3166 firingLength--; 3167 } 3168 if (index <= firingIndex) { 3169 firingIndex--; 3170 } 3171 } 3172 } 3173 }); 3174 } 3175 return this; 3176 }, 3177 // Check if a given callback is in the list. 3178 // If no argument is given, return whether or not list has callbacks attached. 3179 has: function has(fn) { 3180 return fn ? jQuery.inArray(fn, list) > -1 : !!(list && list.length); 3181 }, 3182 // Remove all callbacks from the list 3183 empty: function empty() { 3184 list = []; 3185 firingLength = 0; 3186 return this; 3187 }, 3188 // Have the list do nothing anymore 3189 disable: function disable() { 3190 list = stack = memory = undefined; 3191 return this; 3192 }, 3193 // Is it disabled? 3194 disabled: function disabled() { 3195 return !list; 3196 }, 3197 // Lock the list in its current state 3198 lock: function lock() { 3199 stack = undefined; 3200 if (!memory) { 3201 self.disable(); 3202 } 3203 return this; 3204 }, 3205 // Is it locked? 3206 locked: function locked() { 3207 return !stack; 3208 }, 3209 // Call all callbacks with the given context and arguments 3210 fireWith: function fireWith(context, args) { 3211 if (list && (!_fired || stack)) { 3212 args = args || []; 3213 args = [context, args.slice ? args.slice() : args]; 3214 if (firing) { 3215 stack.push(args); 3216 } else { 3217 fire(args); 3218 } 3219 } 3220 return this; 3221 }, 3222 // Call all the callbacks with the given arguments 3223 fire: function fire() { 3224 self.fireWith(this, arguments); 3225 return this; 3226 }, 3227 // To know if the callbacks have already been called at least once 3228 fired: function fired() { 3229 return !!_fired; 3230 } 3231 }; 3232 3233 return self; 3234 }; 3235 3236 jQuery.extend({ 3237 3238 Deferred: function Deferred(func) { 3239 var tuples = [ 3240 // action, add listener, listener list, final state 3241 ["resolve", "done", jQuery.Callbacks("once memory"), "resolved"], ["reject", "fail", jQuery.Callbacks("once memory"), "rejected"], ["notify", "progress", jQuery.Callbacks("memory")]], 3242 _state = "pending", 3243 _promise = { 3244 state: function state() { 3245 return _state; 3246 }, 3247 always: function always() { 3248 deferred.done(arguments).fail(arguments); 3249 return this; 3250 }, 3251 then: function then() /* fnDone, fnFail, fnProgress */{ 3252 var fns = arguments; 3253 return jQuery.Deferred(function (newDefer) { 3254 jQuery.each(tuples, function (i, tuple) { 3255 var fn = jQuery.isFunction(fns[i]) && fns[i]; 3256 // deferred[ done | fail | progress ] for forwarding actions to newDefer 3257 deferred[tuple[1]](function () { 3258 var returned = fn && fn.apply(this, arguments); 3259 if (returned && jQuery.isFunction(returned.promise)) { 3260 returned.promise().done(newDefer.resolve).fail(newDefer.reject).progress(newDefer.notify); 3261 } else { 3262 newDefer[tuple[0] + "With"](this === _promise ? newDefer.promise() : this, fn ? [returned] : arguments); 3263 } 3264 }); 3265 }); 3266 fns = null; 3267 }).promise(); 3268 }, 3269 // Get a promise for this deferred 3270 // If obj is provided, the promise aspect is added to the object 3271 promise: function promise(obj) { 3272 return obj != null ? jQuery.extend(obj, _promise) : _promise; 3273 } 3274 }, 3275 deferred = {}; 3276 3277 // Keep pipe for back-compat 3278 _promise.pipe = _promise.then; 3279 3280 // Add list-specific methods 3281 jQuery.each(tuples, function (i, tuple) { 3282 var list = tuple[2], 3283 stateString = tuple[3]; 3284 3285 // promise[ done | fail | progress ] = list.add 3286 _promise[tuple[1]] = list.add; 3287 3288 // Handle state 3289 if (stateString) { 3290 list.add(function () { 3291 // state = [ resolved | rejected ] 3292 _state = stateString; 3293 3294 // [ reject_list | resolve_list ].disable; progress_list.lock 3295 }, tuples[i ^ 1][2].disable, tuples[2][2].lock); 3296 } 3297 3298 // deferred[ resolve | reject | notify ] 3299 deferred[tuple[0]] = function () { 3300 deferred[tuple[0] + "With"](this === deferred ? _promise : this, arguments); 3301 return this; 3302 }; 3303 deferred[tuple[0] + "With"] = list.fireWith; 3304 }); 3305 3306 // Make the deferred a promise 3307 _promise.promise(deferred); 3308 3309 // Call given func if any 3310 if (func) { 3311 func.call(deferred, deferred); 3312 } 3313 3314 // All done! 3315 return deferred; 3316 }, 3317 3318 // Deferred helper 3319 when: function when(subordinate /* , ..., subordinateN */) { 3320 var i = 0, 3321 resolveValues = _slice.call(arguments), 3322 length = resolveValues.length, 3323 3324 3325 // the count of uncompleted subordinates 3326 remaining = length !== 1 || subordinate && jQuery.isFunction(subordinate.promise) ? length : 0, 3327 3328 3329 // the master Deferred. If resolveValues consist of only a single Deferred, just use that. 3330 deferred = remaining === 1 ? subordinate : jQuery.Deferred(), 3331 3332 3333 // Update function for both resolve and progress values 3334 updateFunc = function updateFunc(i, contexts, values) { 3335 return function (value) { 3336 contexts[i] = this; 3337 values[i] = arguments.length > 1 ? _slice.call(arguments) : value; 3338 if (values === progressValues) { 3339 deferred.notifyWith(contexts, values); 3340 } else if (! --remaining) { 3341 deferred.resolveWith(contexts, values); 3342 } 3343 }; 3344 }, 3345 progressValues, 3346 progressContexts, 3347 resolveContexts; 3348 3349 // Add listeners to Deferred subordinates; treat others as resolved 3350 if (length > 1) { 3351 progressValues = new Array(length); 3352 progressContexts = new Array(length); 3353 resolveContexts = new Array(length); 3354 for (; i < length; i++) { 3355 if (resolveValues[i] && jQuery.isFunction(resolveValues[i].promise)) { 3356 resolveValues[i].promise().done(updateFunc(i, resolveContexts, resolveValues)).fail(deferred.reject).progress(updateFunc(i, progressContexts, progressValues)); 3357 } else { 3358 --remaining; 3359 } 3360 } 3361 } 3362 3363 // If we're not waiting on anything, resolve the master 3364 if (!remaining) { 3365 deferred.resolveWith(resolveContexts, resolveValues); 3366 } 3367 3368 return deferred.promise(); 3369 } 3370 }); 3371 3372 // The deferred used on DOM ready 3373 var readyList; 3374 3375 jQuery.fn.ready = function (fn) { 3376 // Add the callback 3377 jQuery.ready.promise().done(fn); 3378 3379 return this; 3380 }; 3381 3382 jQuery.extend({ 3383 // Is the DOM ready to be used? Set to true once it occurs. 3384 isReady: false, 3385 3386 // A counter to track how many items to wait for before 3387 // the ready event fires. See #6781 3388 readyWait: 1, 3389 3390 // Hold (or release) the ready event 3391 holdReady: function holdReady(hold) { 3392 if (hold) { 3393 jQuery.readyWait++; 3394 } else { 3395 jQuery.ready(true); 3396 } 3397 }, 3398 3399 // Handle when the DOM is ready 3400 ready: function ready(wait) { 3401 3402 // Abort if there are pending holds or we're already ready 3403 if (wait === true ? --jQuery.readyWait : jQuery.isReady) { 3404 return; 3405 } 3406 3407 // Remember that the DOM is ready 3408 jQuery.isReady = true; 3409 3410 // If a normal DOM Ready event fired, decrement, and wait if need be 3411 if (wait !== true && --jQuery.readyWait > 0) { 3412 return; 3413 } 3414 3415 // If there are functions bound, to execute 3416 readyList.resolveWith(document, [jQuery]); 3417 3418 // Trigger any bound ready events 3419 if (jQuery.fn.triggerHandler) { 3420 jQuery(document).triggerHandler("ready"); 3421 jQuery(document).off("ready"); 3422 } 3423 } 3424 }); 3425 3426 /** 3427 * The ready event handler and self cleanup method 3428 */ 3429 function completed() { 3430 document.removeEventListener("DOMContentLoaded", completed, false); 3431 window.removeEventListener("load", completed, false); 3432 jQuery.ready(); 3433 } 3434 3435 jQuery.ready.promise = function (obj) { 3436 if (!readyList) { 3437 3438 readyList = jQuery.Deferred(); 3439 3440 // Catch cases where $(document).ready() is called after the browser event has already occurred. 3441 // We once tried to use readyState "interactive" here, but it caused issues like the one 3442 // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 3443 if (document.readyState === "complete") { 3444 // Handle it asynchronously to allow scripts the opportunity to delay ready 3445 setTimeout(jQuery.ready); 3446 } else { 3447 3448 // Use the handy event callback 3449 document.addEventListener("DOMContentLoaded", completed, false); 3450 3451 // A fallback to window.onload, that will always work 3452 window.addEventListener("load", completed, false); 3453 } 3454 } 3455 return readyList.promise(obj); 3456 }; 3457 3458 // Kick off the DOM ready check even if the user does not 3459 jQuery.ready.promise(); 3460 3461 // Multifunctional method to get and set values of a collection 3462 // The value/s can optionally be executed if it's a function 3463 var access = jQuery.access = function (elems, fn, key, value, chainable, emptyGet, raw) { 3464 var i = 0, 3465 len = elems.length, 3466 bulk = key == null; 3467 3468 // Sets many values 3469 if (jQuery.type(key) === "object") { 3470 chainable = true; 3471 for (i in key) { 3472 jQuery.access(elems, fn, i, key[i], true, emptyGet, raw); 3473 } 3474 3475 // Sets one value 3476 } else if (value !== undefined) { 3477 chainable = true; 3478 3479 if (!jQuery.isFunction(value)) { 3480 raw = true; 3481 } 3482 3483 if (bulk) { 3484 // Bulk operations run against the entire set 3485 if (raw) { 3486 fn.call(elems, value); 3487 fn = null; 3488 3489 // ...except when executing function values 3490 } else { 3491 bulk = fn; 3492 fn = function fn(elem, key, value) { 3493 return bulk.call(jQuery(elem), value); 3494 }; 3495 } 3496 } 3497 3498 if (fn) { 3499 for (; i < len; i++) { 3500 fn(elems[i], key, raw ? value : value.call(elems[i], i, fn(elems[i], key))); 3501 } 3502 } 3503 } 3504 3505 return chainable ? elems : 3506 3507 // Gets 3508 bulk ? fn.call(elems) : len ? fn(elems[0], key) : emptyGet; 3509 }; 3510 3511 /** 3512 * Determines whether an object can have data 3513 */ 3514 jQuery.acceptData = function (owner) { 3515 // Accepts only: 3516 // - Node 3517 // - Node.ELEMENT_NODE 3518 // - Node.DOCUMENT_NODE 3519 // - Object 3520 // - Any 3521 /* jshint -W018 */ 3522 return owner.nodeType === 1 || owner.nodeType === 9 || ! +owner.nodeType; 3523 }; 3524 3525 function Data() { 3526 // Support: Android<4, 3527 // Old WebKit does not have Object.preventExtensions/freeze method, 3528 // return new empty object instead with no [[set]] accessor 3529 Object.defineProperty(this.cache = {}, 0, { 3530 get: function get() { 3531 return {}; 3532 } 3533 }); 3534 3535 this.expando = jQuery.expando + Data.uid++; 3536 } 3537 3538 Data.uid = 1; 3539 Data.accepts = jQuery.acceptData; 3540 3541 Data.prototype = { 3542 key: function key(owner) { 3543 // We can accept data for non-element nodes in modern browsers, 3544 // but we should not, see #8335. 3545 // Always return the key for a frozen object. 3546 if (!Data.accepts(owner)) { 3547 return 0; 3548 } 3549 3550 var descriptor = {}, 3551 3552 // Check if the owner object already has a cache key 3553 unlock = owner[this.expando]; 3554 3555 // If not, create one 3556 if (!unlock) { 3557 unlock = Data.uid++; 3558 3559 // Secure it in a non-enumerable, non-writable property 3560 try { 3561 descriptor[this.expando] = { value: unlock }; 3562 (0, _defineProperties2.default)(owner, descriptor); 3563 3564 // Support: Android<4 3565 // Fallback to a less secure definition 3566 } catch (e) { 3567 descriptor[this.expando] = unlock; 3568 jQuery.extend(owner, descriptor); 3569 } 3570 } 3571 3572 // Ensure the cache object 3573 if (!this.cache[unlock]) { 3574 this.cache[unlock] = {}; 3575 } 3576 3577 return unlock; 3578 }, 3579 set: function set(owner, data, value) { 3580 var prop, 3581 3582 // There may be an unlock assigned to this node, 3583 // if there is no entry for this "owner", create one inline 3584 // and set the unlock as though an owner entry had always existed 3585 unlock = this.key(owner), 3586 cache = this.cache[unlock]; 3587 3588 // Handle: [ owner, key, value ] args 3589 if (typeof data === "string") { 3590 cache[data] = value; 3591 3592 // Handle: [ owner, { properties } ] args 3593 } else { 3594 // Fresh assignments by object are shallow copied 3595 if (jQuery.isEmptyObject(cache)) { 3596 jQuery.extend(this.cache[unlock], data); 3597 // Otherwise, copy the properties one-by-one to the cache object 3598 } else { 3599 for (prop in data) { 3600 cache[prop] = data[prop]; 3601 } 3602 } 3603 } 3604 return cache; 3605 }, 3606 get: function get(owner, key) { 3607 // Either a valid cache is found, or will be created. 3608 // New caches will be created and the unlock returned, 3609 // allowing direct access to the newly created 3610 // empty data object. A valid owner object must be provided. 3611 var cache = this.cache[this.key(owner)]; 3612 3613 return key === undefined ? cache : cache[key]; 3614 }, 3615 access: function access(owner, key, value) { 3616 var stored; 3617 // In cases where either: 3618 // 3619 // 1. No key was specified 3620 // 2. A string key was specified, but no value provided 3621 // 3622 // Take the "read" path and allow the get method to determine 3623 // which value to return, respectively either: 3624 // 3625 // 1. The entire cache object 3626 // 2. The data stored at the key 3627 // 3628 if (key === undefined || key && typeof key === "string" && value === undefined) { 3629 3630 stored = this.get(owner, key); 3631 3632 return stored !== undefined ? stored : this.get(owner, jQuery.camelCase(key)); 3633 } 3634 3635 // [*]When the key is not a string, or both a key and value 3636 // are specified, set or extend (existing objects) with either: 3637 // 3638 // 1. An object of properties 3639 // 2. A key and value 3640 // 3641 this.set(owner, key, value); 3642 3643 // Since the "set" path can have two possible entry points 3644 // return the expected data based on which path was taken[*] 3645 return value !== undefined ? value : key; 3646 }, 3647 remove: function remove(owner, key) { 3648 var i, 3649 name, 3650 camel, 3651 unlock = this.key(owner), 3652 cache = this.cache[unlock]; 3653 3654 if (key === undefined) { 3655 this.cache[unlock] = {}; 3656 } else { 3657 // Support array or space separated string of keys 3658 if (jQuery.isArray(key)) { 3659 // If "name" is an array of keys... 3660 // When data is initially created, via ("key", "val") signature, 3661 // keys will be converted to camelCase. 3662 // Since there is no way to tell _how_ a key was added, remove 3663 // both plain key and camelCase key. #12786 3664 // This will only penalize the array argument path. 3665 name = key.concat(key.map(jQuery.camelCase)); 3666 } else { 3667 camel = jQuery.camelCase(key); 3668 // Try the string as a key before any manipulation 3669 if (key in cache) { 3670 name = [key, camel]; 3671 } else { 3672 // If a key with the spaces exists, use it. 3673 // Otherwise, create an array by matching non-whitespace 3674 name = camel; 3675 name = name in cache ? [name] : name.match(rnotwhite) || []; 3676 } 3677 } 3678 3679 i = name.length; 3680 while (i--) { 3681 delete cache[name[i]]; 3682 } 3683 } 3684 }, 3685 hasData: function hasData(owner) { 3686 return !jQuery.isEmptyObject(this.cache[owner[this.expando]] || {}); 3687 }, 3688 discard: function discard(owner) { 3689 if (owner[this.expando]) { 3690 delete this.cache[owner[this.expando]]; 3691 } 3692 } 3693 }; 3694 var data_priv = new Data(); 3695 3696 var data_user = new Data(); 3697 3698 // Implementation Summary 3699 // 3700 // 1. Enforce API surface and semantic compatibility with 1.9.x branch 3701 // 2. Improve the module's maintainability by reducing the storage 3702 // paths to a single mechanism. 3703 // 3. Use the same single mechanism to support "private" and "user" data. 3704 // 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) 3705 // 5. Avoid exposing implementation details on user objects (eg. expando properties) 3706 // 6. Provide a clear path for implementation upgrade to WeakMap in 2014 3707 3708 var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, 3709 rmultiDash = /([A-Z])/g; 3710 3711 function dataAttr(elem, key, data) { 3712 var name; 3713 3714 // If nothing was found internally, try to fetch any 3715 // data from the HTML5 data-* attribute 3716 if (data === undefined && elem.nodeType === 1) { 3717 name = "data-" + key.replace(rmultiDash, "-$1").toLowerCase(); 3718 data = elem.getAttribute(name); 3719 3720 if (typeof data === "string") { 3721 try { 3722 data = data === "true" ? true : data === "false" ? false : data === "null" ? null : 3723 // Only convert to a number if it doesn't change the string 3724 +data + "" === data ? +data : rbrace.test(data) ? jQuery.parseJSON(data) : data; 3725 } catch (e) {} 3726 3727 // Make sure we set the data so it isn't changed later 3728 data_user.set(elem, key, data); 3729 } else { 3730 data = undefined; 3731 } 3732 } 3733 return data; 3734 } 3735 3736 jQuery.extend({ 3737 hasData: function hasData(elem) { 3738 return data_user.hasData(elem) || data_priv.hasData(elem); 3739 }, 3740 3741 data: function data(elem, name, _data) { 3742 return data_user.access(elem, name, _data); 3743 }, 3744 3745 removeData: function removeData(elem, name) { 3746 data_user.remove(elem, name); 3747 }, 3748 3749 // TODO: Now that all calls to _data and _removeData have been replaced 3750 // with direct calls to data_priv methods, these can be deprecated. 3751 _data: function _data(elem, name, data) { 3752 return data_priv.access(elem, name, data); 3753 }, 3754 3755 _removeData: function _removeData(elem, name) { 3756 data_priv.remove(elem, name); 3757 } 3758 }); 3759 3760 jQuery.fn.extend({ 3761 data: function data(key, value) { 3762 var i, 3763 name, 3764 data, 3765 elem = this[0], 3766 attrs = elem && elem.attributes; 3767 3768 // Gets all values 3769 if (key === undefined) { 3770 if (this.length) { 3771 data = data_user.get(elem); 3772 3773 if (elem.nodeType === 1 && !data_priv.get(elem, "hasDataAttrs")) { 3774 i = attrs.length; 3775 while (i--) { 3776 3777 // Support: IE11+ 3778 // The attrs elements can be null (#14894) 3779 if (attrs[i]) { 3780 name = attrs[i].name; 3781 if (name.indexOf("data-") === 0) { 3782 name = jQuery.camelCase(name.slice(5)); 3783 dataAttr(elem, name, data[name]); 3784 } 3785 } 3786 } 3787 data_priv.set(elem, "hasDataAttrs", true); 3788 } 3789 } 3790 3791 return data; 3792 } 3793 3794 // Sets multiple values 3795 if ((typeof key === "undefined" ? "undefined" : (0, _typeof3.default)(key)) === "object") { 3796 return this.each(function () { 3797 data_user.set(this, key); 3798 }); 3799 } 3800 3801 return access(this, function (value) { 3802 var data, 3803 camelKey = jQuery.camelCase(key); 3804 3805 // The calling jQuery object (element matches) is not empty 3806 // (and therefore has an element appears at this[ 0 ]) and the 3807 // `value` parameter was not undefined. An empty jQuery object 3808 // will result in `undefined` for elem = this[ 0 ] which will 3809 // throw an exception if an attempt to read a data cache is made. 3810 if (elem && value === undefined) { 3811 // Attempt to get data from the cache 3812 // with the key as-is 3813 data = data_user.get(elem, key); 3814 if (data !== undefined) { 3815 return data; 3816 } 3817 3818 // Attempt to get data from the cache 3819 // with the key camelized 3820 data = data_user.get(elem, camelKey); 3821 if (data !== undefined) { 3822 return data; 3823 } 3824 3825 // Attempt to "discover" the data in 3826 // HTML5 custom data-* attrs 3827 data = dataAttr(elem, camelKey, undefined); 3828 if (data !== undefined) { 3829 return data; 3830 } 3831 3832 // We tried really hard, but the data doesn't exist. 3833 return; 3834 } 3835 3836 // Set the data... 3837 this.each(function () { 3838 // First, attempt to store a copy or reference of any 3839 // data that might've been store with a camelCased key. 3840 var data = data_user.get(this, camelKey); 3841 3842 // For HTML5 data-* attribute interop, we have to 3843 // store property names with dashes in a camelCase form. 3844 // This might not apply to all properties...* 3845 data_user.set(this, camelKey, value); 3846 3847 // *... In the case of properties that might _actually_ 3848 // have dashes, we need to also store a copy of that 3849 // unchanged property. 3850 if (key.indexOf("-") !== -1 && data !== undefined) { 3851 data_user.set(this, key, value); 3852 } 3853 }); 3854 }, null, value, arguments.length > 1, null, true); 3855 }, 3856 3857 removeData: function removeData(key) { 3858 return this.each(function () { 3859 data_user.remove(this, key); 3860 }); 3861 } 3862 }); 3863 3864 jQuery.extend({ 3865 queue: function queue(elem, type, data) { 3866 var queue; 3867 3868 if (elem) { 3869 type = (type || "fx") + "queue"; 3870 queue = data_priv.get(elem, type); 3871 3872 // Speed up dequeue by getting out quickly if this is just a lookup 3873 if (data) { 3874 if (!queue || jQuery.isArray(data)) { 3875 queue = data_priv.access(elem, type, jQuery.makeArray(data)); 3876 } else { 3877 queue.push(data); 3878 } 3879 } 3880 return queue || []; 3881 } 3882 }, 3883 3884 dequeue: function dequeue(elem, type) { 3885 type = type || "fx"; 3886 3887 var queue = jQuery.queue(elem, type), 3888 startLength = queue.length, 3889 fn = queue.shift(), 3890 hooks = jQuery._queueHooks(elem, type), 3891 next = function next() { 3892 jQuery.dequeue(elem, type); 3893 }; 3894 3895 // If the fx queue is dequeued, always remove the progress sentinel 3896 if (fn === "inprogress") { 3897 fn = queue.shift(); 3898 startLength--; 3899 } 3900 3901 if (fn) { 3902 3903 // Add a progress sentinel to prevent the fx queue from being 3904 // automatically dequeued 3905 if (type === "fx") { 3906 queue.unshift("inprogress"); 3907 } 3908 3909 // Clear up the last queue stop function 3910 delete hooks.stop; 3911 fn.call(elem, next, hooks); 3912 } 3913 3914 if (!startLength && hooks) { 3915 hooks.empty.fire(); 3916 } 3917 }, 3918 3919 // Not public - generate a queueHooks object, or return the current one 3920 _queueHooks: function _queueHooks(elem, type) { 3921 var key = type + "queueHooks"; 3922 return data_priv.get(elem, key) || data_priv.access(elem, key, { 3923 empty: jQuery.Callbacks("once memory").add(function () { 3924 data_priv.remove(elem, [type + "queue", key]); 3925 }) 3926 }); 3927 } 3928 }); 3929 3930 jQuery.fn.extend({ 3931 queue: function queue(type, data) { 3932 var setter = 2; 3933 3934 if (typeof type !== "string") { 3935 data = type; 3936 type = "fx"; 3937 setter--; 3938 } 3939 3940 if (arguments.length < setter) { 3941 return jQuery.queue(this[0], type); 3942 } 3943
3944 return data === undefined ? this : this.each(function () { 3945 var queue = jQuery.queue(this, type, data); 3946 3947 // Ensure a hooks for this queue 3948 jQuery._queueHooks(this, type); 3949 3950 if (type === "fx" && queue[0] !== "inprogress") { 3951 jQuery.dequeue(this, type); 3952 } 3953 }); 3954 }, 3955 dequeue: function dequeue(type) { 3956 return this.each(function () { 3957 jQuery.dequeue(this, type); 3958 }); 3959 }, 3960 clearQueue: function clearQueue(type) { 3961 return this.queue(type || "fx", []); 3962 }, 3963 // Get a promise resolved when queues of a certain type 3964 // are emptied (fx is the type by default) 3965 promise: function promise(type, obj) { 3966 var tmp, 3967 count = 1, 3968 defer = jQuery.Deferred(), 3969 elements = this, 3970 i = this.length, 3971 resolve = function resolve() { 3972 if (! --count) { 3973 defer.resolveWith(elements, [elements]); 3974 } 3975 }; 3976 3977 if (typeof type !== "string") { 3978 obj = type; 3979 type = undefined; 3980 } 3981 type = type || "fx"; 3982 3983 while (i--) { 3984 tmp = data_priv.get(elements[i], type + "queueHooks"); 3985 if (tmp && tmp.empty) { 3986 count++; 3987 tmp.empty.add(resolve); 3988 } 3989 } 3990 resolve(); 3991 return defer.promise(obj); 3992 } 3993 }); 3994 var pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source; 3995 3996 var cssExpand = ["Top", "Right", "Bottom", "Left"]; 3997 3998 var isHidden = function isHidden(elem, el) { 3999 // isHidden might be called from jQuery#filter function; 4000 // in that case, element will be second argument 4001 elem = el || elem; 4002 return jQuery.css(elem, "display") === "none" || !jQuery.contains(elem.ownerDocument, elem); 4003 }; 4004 4005 var rcheckableType = /^(?:checkbox|radio)$/i; 4006 4007 (function () { 4008 var fragment = document.createDocumentFragment(), 4009 div = fragment.appendChild(document.createElement("div")), 4010 input = document.createElement("input"); 4011 4012 // Support: Safari<=5.1 4013 // Check state lost if the name is set (#11217) 4014 // Support: Windows Web Apps (WWA) 4015 // `name` and `type` must use .setAttribute for WWA (#14901) 4016 input.setAttribute("type", "radio"); 4017 input.setAttribute("checked", "checked"); 4018 input.setAttribute("name", "t"); 4019 4020 div.appendChild(input); 4021 4022 // Support: Safari<=5.1, Android<4.2
vendor: 21,493 bytes, lines 4023-4723
4023 // Older WebKit doesn't clone checked state correctly in fragments 4024 support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked; 4025 4026 // Support: IE<=11+ 4027 // Make sure textarea (and checkbox) defaultValue is properly cloned 4028 div.innerHTML = "<textarea>x</textarea>"; 4029 support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue; 4030 })(); 4031 var strundefined = true ? "undefined" : (0, _typeof3.default)(undefined); 4032 4033 support.focusinBubbles = "onfocusin" in window; 4034 4035 var rkeyEvent = /^key/, 4036 rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, 4037 rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, 4038 rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; 4039 4040 function returnTrue() { 4041 return true; 4042 } 4043 4044 function returnFalse() { 4045 return false; 4046 } 4047 4048 function safeActiveElement() { 4049 try { 4050 return document.activeElement; 4051 } catch (err) {} 4052 } 4053 4054 /* 4055 * Helper functions for managing events -- not part of the public interface. 4056 * Props to Dean Edwards' addEvent library for many of the ideas. 4057 */ 4058 jQuery.event = { 4059 4060 global: {}, 4061 4062 add: function add(elem, types, handler, data, selector) { 4063 4064 var handleObjIn, 4065 eventHandle, 4066 tmp, 4067 events, 4068 t, 4069 handleObj, 4070 special, 4071 handlers, 4072 type, 4073 namespaces, 4074 origType, 4075 elemData = data_priv.get(elem); 4076 4077 // Don't attach events to noData or text/comment nodes (but allow plain objects) 4078 if (!elemData) { 4079 return; 4080 } 4081 4082 // Caller can pass in an object of custom data in lieu of the handler 4083 if (handler.handler) { 4084 handleObjIn = handler; 4085 handler = handleObjIn.handler; 4086 selector = handleObjIn.selector; 4087 } 4088 4089 // Make sure that the handler has a unique ID, used to find/remove it later 4090 if (!handler.guid) { 4091 handler.guid = jQuery.guid++; 4092 } 4093 4094 // Init the element's event structure and main handler, if this is the first 4095 if (!(events = elemData.events)) { 4096 events = elemData.events = {}; 4097 } 4098 if (!(eventHandle = elemData.handle)) { 4099 eventHandle = elemData.handle = function (e) { 4100 // Discard the second event of a jQuery.event.trigger() and 4101 // when an event is called after a page has unloaded 4102 return (typeof jQuery === "undefined" ? "undefined" : (0, _typeof3.default)(jQuery)) !== strundefined && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply(elem, arguments) : undefined; 4103 }; 4104 } 4105 4106 // Handle multiple events separated by a space 4107 types = (types || "").match(rnotwhite) || [""]; 4108 t = types.length; 4109 while (t--) { 4110 tmp = rtypenamespace.exec(types[t]) || []; 4111 type = origType = tmp[1]; 4112 namespaces = (tmp[2] || "").split(".").sort(); 4113 4114 // There *must* be a type, no attaching namespace-only handlers 4115 if (!type) { 4116 continue; 4117 } 4118 4119 // If event changes its type, use the special event handlers for the changed type 4120 special = jQuery.event.special[type] || {}; 4121 4122 // If selector defined, determine special event api type, otherwise given type 4123 type = (selector ? special.delegateType : special.bindType) || type; 4124 4125 // Update special based on newly reset type 4126 special = jQuery.event.special[type] || {}; 4127 4128 // handleObj is passed to all event handlers 4129 handleObj = jQuery.extend({ 4130 type: type, 4131 origType: origType, 4132 data: data, 4133 handler: handler, 4134 guid: handler.guid, 4135 selector: selector, 4136 needsContext: selector && jQuery.expr.match.needsContext.test(selector), 4137 namespace: namespaces.join(".") 4138 }, handleObjIn); 4139 4140 // Init the event handler queue if we're the first 4141 if (!(handlers = events[type])) { 4142 handlers = events[type] = []; 4143 handlers.delegateCount = 0; 4144 4145 // Only use addEventListener if the special events handler returns false 4146 if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) { 4147 if (elem.addEventListener) { 4148 elem.addEventListener(type, eventHandle, false); 4149 } 4150 } 4151 } 4152 4153 if (special.add) { 4154 special.add.call(elem, handleObj); 4155 4156 if (!handleObj.handler.guid) { 4157 handleObj.handler.guid = handler.guid; 4158 } 4159 } 4160 4161 // Add to the element's handler list, delegates in front 4162 if (selector) { 4163 handlers.splice(handlers.delegateCount++, 0, handleObj); 4164 } else { 4165 handlers.push(handleObj); 4166 } 4167 4168 // Keep track of which events have ever been used, for event optimization 4169 jQuery.event.global[type] = true; 4170 } 4171 }, 4172 4173 // Detach an event or set of events from an element 4174 remove: function remove(elem, types, handler, selector, mappedTypes) { 4175 4176 var j, 4177 origCount, 4178 tmp, 4179 events, 4180 t, 4181 handleObj, 4182 special, 4183 handlers, 4184 type, 4185 namespaces, 4186 origType, 4187 elemData = data_priv.hasData(elem) && data_priv.get(elem); 4188 4189 if (!elemData || !(events = elemData.events)) { 4190 return; 4191 } 4192 4193 // Once for each type.namespace in types; type may be omitted 4194 types = (types || "").match(rnotwhite) || [""]; 4195 t = types.length; 4196 while (t--) { 4197 tmp = rtypenamespace.exec(types[t]) || []; 4198 type = origType = tmp[1]; 4199 namespaces = (tmp[2] || "").split(".").sort(); 4200 4201 // Unbind all events (on this namespace, if provided) for the element 4202 if (!type) { 4203 for (type in events) { 4204 jQuery.event.remove(elem, type + types[t], handler, selector, true); 4205 } 4206 continue; 4207 } 4208 4209 special = jQuery.event.special[type] || {}; 4210 type = (selector ? special.delegateType : special.bindType) || type; 4211 handlers = events[type] || []; 4212 tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)"); 4213 4214 // Remove matching events 4215 origCount = j = handlers.length; 4216 while (j--) { 4217 handleObj = handlers[j]; 4218 4219 if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)) { 4220 handlers.splice(j, 1); 4221 4222 if (handleObj.selector) { 4223 handlers.delegateCount--; 4224 } 4225 if (special.remove) { 4226 special.remove.call(elem, handleObj); 4227 } 4228 } 4229 } 4230 4231 // Remove generic event handler if we removed something and no more handlers exist 4232 // (avoids potential for endless recursion during removal of special event handlers) 4233 if (origCount && !handlers.length) { 4234 if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) { 4235 jQuery.removeEvent(elem, type, elemData.handle); 4236 } 4237 4238 delete events[type]; 4239 } 4240 } 4241 4242 // Remove the expando if it's no longer used 4243 if (jQuery.isEmptyObject(events)) { 4244 delete elemData.handle; 4245 data_priv.remove(elem, "events"); 4246 } 4247 }, 4248 4249 trigger: function trigger(event, data, elem, onlyHandlers) { 4250 4251 var i, 4252 cur, 4253 tmp, 4254 bubbleType, 4255 ontype, 4256 handle, 4257 special, 4258 eventPath = [elem || document], 4259 type = hasOwn.call(event, "type") ? event.type : event, 4260 namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : []; 4261 4262 cur = tmp = elem = elem || document; 4263 4264 // Don't do events on text and comment nodes 4265 if (elem.nodeType === 3 || elem.nodeType === 8) { 4266 return; 4267 } 4268 4269 // focus/blur morphs to focusin/out; ensure we're not firing them right now 4270 if (rfocusMorph.test(type + jQuery.event.triggered)) { 4271 return; 4272 } 4273 4274 if (type.indexOf(".") >= 0) { 4275 // Namespaced trigger; create a regexp to match event type in handle() 4276 namespaces = type.split("."); 4277 type = namespaces.shift(); 4278 namespaces.sort(); 4279 } 4280 ontype = type.indexOf(":") < 0 && "on" + type; 4281 4282 // Caller can pass in a jQuery.Event object, Object, or just an event type string 4283 event = event[jQuery.expando] ? event : new jQuery.Event(type, (typeof event === "undefined" ? "undefined" : (0, _typeof3.default)(event)) === "object" && event); 4284 4285 // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) 4286 event.isTrigger = onlyHandlers ? 2 : 3; 4287 event.namespace = namespaces.join("."); 4288 event.namespace_re = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; 4289 4290 // Clean up the event in case it is being reused 4291 event.result = undefined; 4292 if (!event.target) { 4293 event.target = elem; 4294 } 4295 4296 // Clone any incoming data and prepend the event, creating the handler arg list 4297 data = data == null ? [event] : jQuery.makeArray(data, [event]); 4298 4299 // Allow special events to draw outside the lines 4300 special = jQuery.event.special[type] || {}; 4301 if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) { 4302 return; 4303 } 4304 4305 // Determine event propagation path in advance, per W3C events spec (#9951) 4306 // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) 4307 if (!onlyHandlers && !special.noBubble && !jQuery.isWindow(elem)) { 4308 4309 bubbleType = special.delegateType || type; 4310 if (!rfocusMorph.test(bubbleType + type)) { 4311 cur = cur.parentNode; 4312 } 4313 for (; cur; cur = cur.parentNode) { 4314 eventPath.push(cur); 4315 tmp = cur; 4316 } 4317 4318 // Only add window if we got to document (e.g., not plain obj or detached DOM) 4319 if (tmp === (elem.ownerDocument || document)) { 4320 eventPath.push(tmp.defaultView || tmp.parentWindow || window); 4321 } 4322 } 4323 4324 // Fire handlers on the event path 4325 i = 0; 4326 while ((cur = eventPath[i++]) && !event.isPropagationStopped()) { 4327 4328 event.type = i > 1 ? bubbleType : special.bindType || type; 4329 4330 // jQuery handler 4331 handle = (data_priv.get(cur, "events") || {})[event.type] && data_priv.get(cur, "handle"); 4332 if (handle) { 4333 handle.apply(cur, data); 4334 } 4335 4336 // Native handler 4337 handle = ontype && cur[ontype]; 4338 if (handle && handle.apply && jQuery.acceptData(cur)) { 4339 event.result = handle.apply(cur, data); 4340 if (event.result === false) { 4341 event.preventDefault(); 4342 } 4343 } 4344 } 4345 event.type = type; 4346 4347 // If nobody prevented the default action, do it now 4348 if (!onlyHandlers && !event.isDefaultPrevented()) { 4349 4350 if ((!special._default || special._default.apply(eventPath.pop(), data) === false) && jQuery.acceptData(elem)) { 4351 4352 // Call a native DOM method on the target with the same name name as the event. 4353 // Don't do default actions on window, that's where global variables be (#6170) 4354 if (ontype && jQuery.isFunction(elem[type]) && !jQuery.isWindow(elem)) { 4355 4356 // Don't re-trigger an onFOO event when we call its FOO() method 4357 tmp = elem[ontype]; 4358 4359 if (tmp) { 4360 elem[ontype] = null; 4361 } 4362 4363 // Prevent re-triggering of the same event, since we already bubbled it above 4364 jQuery.event.triggered = type; 4365 elem[type](); 4366 jQuery.event.triggered = undefined; 4367 4368 if (tmp) { 4369 elem[ontype] = tmp; 4370 } 4371 } 4372 } 4373 } 4374 4375 return event.result; 4376 }, 4377 4378 dispatch: function dispatch(event) { 4379 4380 // Make a writable jQuery.Event from the native event object 4381 event = jQuery.event.fix(event); 4382 4383 var i, 4384 j, 4385 ret, 4386 matched, 4387 handleObj, 4388 handlerQueue = [], 4389 args = _slice.call(arguments), 4390 handlers = (data_priv.get(this, "events") || {})[event.type] || [], 4391 special = jQuery.event.special[event.type] || {}; 4392 4393 // Use the fix-ed jQuery.Event rather than the (read-only) native event 4394 args[0] = event; 4395 event.delegateTarget = this; 4396 4397 // Call the preDispatch hook for the mapped type, and let it bail if desired 4398 if (special.preDispatch && special.preDispatch.call(this, event) === false) { 4399 return; 4400 } 4401 4402 // Determine handlers 4403 handlerQueue = jQuery.event.handlers.call(this, event, handlers); 4404 4405 // Run delegates first; they may want to stop propagation beneath us 4406 i = 0; 4407 while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) { 4408 event.currentTarget = matched.elem; 4409 4410 j = 0; 4411 while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) { 4412 4413 // Triggered event must either 1) have no namespace, or 2) have namespace(s) 4414 // a subset or equal to those in the bound event (both can have no namespace). 4415 if (!event.namespace_re || event.namespace_re.test(handleObj.namespace)) { 4416 4417 event.handleObj = handleObj; 4418 event.data = handleObj.data; 4419 4420 ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args); 4421 4422 if (ret !== undefined) { 4423 if ((event.result = ret) === false) { 4424 event.preventDefault(); 4425 event.stopPropagation(); 4426 } 4427 } 4428 } 4429 } 4430 } 4431 4432 // Call the postDispatch hook for the mapped type 4433 if (special.postDispatch) { 4434 special.postDispatch.call(this, event); 4435 } 4436 4437 return event.result; 4438 }, 4439 4440 handlers: function handlers(event, _handlers) { 4441 var i, 4442 matches, 4443 sel, 4444 handleObj, 4445 handlerQueue = [], 4446 delegateCount = _handlers.delegateCount, 4447 cur = event.target; 4448 4449 // Find delegate handlers 4450 // Black-hole SVG <use> instance trees (#13180) 4451 // Avoid non-left-click bubbling in Firefox (#3861) 4452 if (delegateCount && cur.nodeType && (!event.button || event.type !== "click")) { 4453 4454 for (; cur !== this; cur = cur.parentNode || this) { 4455 4456 // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) 4457 if (cur.disabled !== true || event.type !== "click") { 4458 matches = []; 4459 for (i = 0; i < delegateCount; i++) { 4460 handleObj = _handlers[i]; 4461 4462 // Don't conflict with Object.prototype properties (#13203) 4463 sel = handleObj.selector + " "; 4464 4465 if (matches[sel] === undefined) { 4466 matches[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) >= 0 : jQuery.find(sel, this, null, [cur]).length; 4467 } 4468 if (matches[sel]) { 4469 matches.push(handleObj); 4470 } 4471 } 4472 if (matches.length) { 4473 handlerQueue.push({ elem: cur, handlers: matches }); 4474 } 4475 } 4476 } 4477 } 4478 4479 // Add the remaining (directly-bound) handlers 4480 if (delegateCount < _handlers.length) { 4481 handlerQueue.push({ elem: this, handlers: _handlers.slice(delegateCount) }); 4482 } 4483 4484 return handlerQueue; 4485 }, 4486 4487 // Includes some event props shared by KeyEvent and MouseEvent 4488 props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), 4489 4490 fixHooks: {}, 4491 4492 keyHooks: { 4493 props: "char charCode key keyCode".split(" "), 4494 filter: function filter(event, original) { 4495 4496 // Add which for key events 4497 if (event.which == null) { 4498 event.which = original.charCode != null ? original.charCode : original.keyCode; 4499 } 4500 4501 return event; 4502 } 4503 }, 4504 4505 mouseHooks: { 4506 props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), 4507 filter: function filter(event, original) { 4508 var eventDoc, 4509 doc, 4510 body, 4511 button = original.button; 4512 4513 // Calculate pageX/Y if missing and clientX/Y available 4514 if (event.pageX == null && original.clientX != null) { 4515 eventDoc = event.target.ownerDocument || document; 4516 doc = eventDoc.documentElement; 4517 body = eventDoc.body; 4518 4519 event.pageX = original.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); 4520 event.pageY = original.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); 4521 } 4522 4523 // Add which for click: 1 === left; 2 === middle; 3 === right 4524 // Note: button is not normalized, so don't use it 4525 if (!event.which && button !== undefined) { 4526 event.which = button & 1 ? 1 : button & 2 ? 3 : button & 4 ? 2 : 0; 4527 } 4528 4529 return event; 4530 } 4531 }, 4532 4533 fix: function fix(event) { 4534 if (event[jQuery.expando]) { 4535 return event; 4536 } 4537 4538 // Create a writable copy of the event object and normalize some properties 4539 var i, 4540 prop, 4541 copy, 4542 type = event.type, 4543 originalEvent = event, 4544 fixHook = this.fixHooks[type]; 4545 4546 if (!fixHook) { 4547 this.fixHooks[type] = fixHook = rmouseEvent.test(type) ? this.mouseHooks : rkeyEvent.test(type) ? this.keyHooks : {}; 4548 } 4549 copy = fixHook.props ? this.props.concat(fixHook.props) : this.props; 4550 4551 event = new jQuery.Event(originalEvent); 4552 4553 i = copy.length; 4554 while (i--) { 4555 prop = copy[i]; 4556 event[prop] = originalEvent[prop]; 4557 } 4558 4559 // Support: Cordova 2.5 (WebKit) (#13255) 4560 // All events should have a target; Cordova deviceready doesn't 4561 if (!event.target) { 4562 event.target = document; 4563 } 4564 4565 // Support: Safari 6.0+, Chrome<28 4566 // Target should not be a text node (#504, #13143) 4567 if (event.target.nodeType === 3) { 4568 event.target = event.target.parentNode; 4569 } 4570 4571 return fixHook.filter ? fixHook.filter(event, originalEvent) : event; 4572 }, 4573 4574 special: { 4575 load: { 4576 // Prevent triggered image.load events from bubbling to window.load 4577 noBubble: true 4578 }, 4579 focus: { 4580 // Fire native event if possible so blur/focus sequence is correct 4581 trigger: function trigger() { 4582 if (this !== safeActiveElement() && this.focus) { 4583 this.focus(); 4584 return false; 4585 } 4586 }, 4587 delegateType: "focusin" 4588 }, 4589 blur: { 4590 trigger: function trigger() { 4591 if (this === safeActiveElement() && this.blur) { 4592 this.blur(); 4593 return false; 4594 } 4595 }, 4596 delegateType: "focusout" 4597 }, 4598 click: { 4599 // For checkbox, fire native event so checked state will be right 4600 trigger: function trigger() { 4601 if (this.type === "checkbox" && this.click && jQuery.nodeName(this, "input")) { 4602 this.click(); 4603 return false; 4604 } 4605 }, 4606 4607 // For cross-browser consistency, don't fire native .click() on links 4608 _default: function _default(event) { 4609 return jQuery.nodeName(event.target, "a"); 4610 } 4611 }, 4612 4613 beforeunload: { 4614 postDispatch: function postDispatch(event) { 4615 4616 // Support: Firefox 20+ 4617 // Firefox doesn't alert if the returnValue field is not set. 4618 if (event.result !== undefined && event.originalEvent) { 4619 event.originalEvent.returnValue = event.result; 4620 } 4621 } 4622 } 4623 }, 4624 4625 simulate: function simulate(type, elem, event, bubble) { 4626 // Piggyback on a donor event to simulate a different one. 4627 // Fake originalEvent to avoid donor's stopPropagation, but if the 4628 // simulated event prevents default then we do the same on the donor. 4629 var e = jQuery.extend(new jQuery.Event(), event, { 4630 type: type, 4631 isSimulated: true, 4632 originalEvent: {} 4633 }); 4634 if (bubble) { 4635 jQuery.event.trigger(e, null, elem); 4636 } else { 4637 jQuery.event.dispatch.call(elem, e); 4638 } 4639 if (e.isDefaultPrevented()) { 4640 event.preventDefault(); 4641 } 4642 } 4643 }; 4644 4645 jQuery.removeEvent = function (elem, type, handle) { 4646 if (elem.removeEventListener) { 4647 elem.removeEventListener(type, handle, false); 4648 } 4649 }; 4650 4651 jQuery.Event = function (src, props) { 4652 // Allow instantiation without the 'new' keyword 4653 if (!(this instanceof jQuery.Event)) { 4654 return new jQuery.Event(src, props); 4655 } 4656 4657 // Event object 4658 if (src && src.type) { 4659 this.originalEvent = src; 4660 this.type = src.type; 4661 4662 // Events bubbling up the document may have been marked as prevented 4663 // by a handler lower down the tree; reflect the correct value. 4664 this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && 4665 // Support: Android<4.0 4666 src.returnValue === false ? returnTrue : returnFalse; 4667 4668 // Event type 4669 } else { 4670 this.type = src; 4671 } 4672 4673 // Put explicitly provided properties onto the event object 4674 if (props) { 4675 jQuery.extend(this, props); 4676 } 4677 4678 // Create a timestamp if incoming event doesn't have one 4679 this.timeStamp = src && src.timeStamp || jQuery.now(); 4680 4681 // Mark it as fixed 4682 this[jQuery.expando] = true; 4683 }; 4684 4685 // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding 4686 // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html 4687 jQuery.Event.prototype = { 4688 isDefaultPrevented: returnFalse, 4689 isPropagationStopped: returnFalse, 4690 isImmediatePropagationStopped: returnFalse, 4691 4692 preventDefault: function preventDefault() { 4693 var e = this.originalEvent; 4694 4695 this.isDefaultPrevented = returnTrue; 4696 4697 if (e && e.preventDefault) { 4698 e.preventDefault(); 4699 } 4700 }, 4701 stopPropagation: function stopPropagation() { 4702 var e = this.originalEvent; 4703 4704 this.isPropagationStopped = returnTrue; 4705 4706 if (e && e.stopPropagation) { 4707 e.stopPropagation(); 4708 } 4709 }, 4710 stopImmediatePropagation: function stopImmediatePropagation() { 4711 var e = this.originalEvent; 4712 4713 this.isImmediatePropagationStopped = returnTrue; 4714 4715 if (e && e.stopImmediatePropagation) { 4716 e.stopImmediatePropagation(); 4717 } 4718 4719 this.stopPropagation(); 4720 } 4721 }; 4722 4723 // Create mouseenter/leave events using mouseover/out and event-time checks
4724 // Support: Chrome 15+ 4725 jQuery.each({ 4726 mouseenter: "mouseover", 4727 mouseleave: "mouseout", 4728 pointerenter: "pointerover", 4729 pointerleave: "pointerout" 4730 }, function (orig, fix) { 4731 jQuery.event.special[orig] = { 4732 delegateType: fix, 4733 bindType: fix, 4734 4735 handle: function handle(event) { 4736 var ret, 4737 target = this, 4738 related = event.relatedTarget, 4739 handleObj = event.handleObj; 4740 4741 // For mousenter/leave call the handler if related is outside the target. 4742 // NB: No relatedTarget if the mouse left/entered the browser window 4743 if (!related || related !== target && !jQuery.contains(target, related)) { 4744 event.type = handleObj.origType; 4745 ret = handleObj.handler.apply(this, arguments); 4746 event.type = fix; 4747 } 4748 return ret; 4749 } 4750 }; 4751 }); 4752 4753 // Support: Firefox, Chrome, Safari 4754 // Create "bubbling" focus and blur events 4755 if (!support.focusinBubbles) { 4756 jQuery.each({ focus: "focusin", blur: "focusout" }, function (orig, fix) { 4757 4758 // Attach a single capturing handler on the document while someone wants focusin/focusout 4759 var handler = function handler(event) { 4760 jQuery.event.simulate(fix, event.target, jQuery.event.fix(event), true); 4761 }; 4762 4763 jQuery.event.special[fix] = { 4764 setup: function setup() { 4765 var doc = this.ownerDocument || this, 4766 attaches = data_priv.access(doc, fix); 4767 4768 if (!attaches) { 4769 doc.addEventListener(orig, handler, true); 4770 } 4771 data_priv.access(doc, fix, (attaches || 0) + 1); 4772 }, 4773 teardown: function teardown() { 4774 var doc = this.ownerDocument || this, 4775 attaches = data_priv.access(doc, fix) - 1; 4776 4777 if (!attaches) { 4778 doc.removeEventListener(orig, handler, true); 4779 data_priv.remove(doc, fix); 4780 } else {
vendor: 77,477 bytes, lines 4781-7506
4781 data_priv.access(doc, fix, attaches); 4782 } 4783 } 4784 }; 4785 }); 4786 } 4787 4788 jQuery.fn.extend({ 4789 4790 on: function on(types, selector, data, fn, /*INTERNAL*/one) { 4791 var origFn, type; 4792 4793 // Types can be a map of types/handlers 4794 if ((typeof types === "undefined" ? "undefined" : (0, _typeof3.default)(types)) === "object") { 4795 // ( types-Object, selector, data ) 4796 if (typeof selector !== "string") { 4797 // ( types-Object, data ) 4798 data = data || selector; 4799 selector = undefined; 4800 } 4801 for (type in types) { 4802 this.on(type, selector, data, types[type], one); 4803 } 4804 return this; 4805 } 4806 4807 if (data == null && fn == null) { 4808 // ( types, fn ) 4809 fn = selector; 4810 data = selector = undefined; 4811 } else if (fn == null) { 4812 if (typeof selector === "string") { 4813 // ( types, selector, fn ) 4814 fn = data; 4815 data = undefined; 4816 } else { 4817 // ( types, data, fn ) 4818 fn = data; 4819 data = selector; 4820 selector = undefined; 4821 } 4822 } 4823 if (fn === false) { 4824 fn = returnFalse; 4825 } else if (!fn) { 4826 return this; 4827 } 4828 4829 if (one === 1) { 4830 origFn = fn; 4831 fn = function fn(event) { 4832 // Can use an empty set, since event contains the info 4833 jQuery().off(event); 4834 return origFn.apply(this, arguments); 4835 }; 4836 // Use same guid so caller can remove using origFn 4837 fn.guid = origFn.guid || (origFn.guid = jQuery.guid++); 4838 } 4839 return this.each(function () { 4840 jQuery.event.add(this, types, fn, data, selector); 4841 }); 4842 }, 4843 one: function one(types, selector, data, fn) { 4844 return this.on(types, selector, data, fn, 1); 4845 }, 4846 off: function off(types, selector, fn) { 4847 var handleObj, type; 4848 if (types && types.preventDefault && types.handleObj) { 4849 // ( event ) dispatched jQuery.Event 4850 handleObj = types.handleObj; 4851 jQuery(types.delegateTarget).off(handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler); 4852 return this; 4853 } 4854 if ((typeof types === "undefined" ? "undefined" : (0, _typeof3.default)(types)) === "object") { 4855 // ( types-object [, selector] ) 4856 for (type in types) { 4857 this.off(type, selector, types[type]); 4858 } 4859 return this; 4860 } 4861 if (selector === false || typeof selector === "function") { 4862 // ( types [, fn] ) 4863 fn = selector; 4864 selector = undefined; 4865 } 4866 if (fn === false) { 4867 fn = returnFalse; 4868 } 4869 return this.each(function () { 4870 jQuery.event.remove(this, types, fn, selector); 4871 }); 4872 }, 4873 4874 trigger: function trigger(type, data) { 4875 return this.each(function () { 4876 jQuery.event.trigger(type, data, this); 4877 }); 4878 }, 4879 triggerHandler: function triggerHandler(type, data) { 4880 var elem = this[0]; 4881 if (elem) { 4882 return jQuery.event.trigger(type, data, elem, true); 4883 } 4884 } 4885 }); 4886 4887 var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, 4888 rtagName = /<([\w:]+)/, 4889 rhtml = /<|&#?\w+;/, 4890 rnoInnerhtml = /<(?:script|style|link)/i, 4891 4892 // checked="checked" or checked 4893 rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, 4894 rscriptType = /^$|\/(?:java|ecma)script/i, 4895 rscriptTypeMasked = /^true\/(.*)/, 4896 rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, 4897 4898 4899 // We have to close these tags to support XHTML (#13200) 4900 wrapMap = { 4901 4902 // Support: IE9 4903 option: [1, "<select multiple='multiple'>", "</select>"], 4904 4905 thead: [1, "<table>", "</table>"], 4906 col: [2, "<table><colgroup>", "</colgroup></table>"], 4907 tr: [2, "<table><tbody>", "</tbody></table>"], 4908 td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], 4909 4910 _default: [0, "", ""] 4911 }; 4912 4913 // Support: IE9 4914 wrapMap.optgroup = wrapMap.option; 4915 4916 wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; 4917 wrapMap.th = wrapMap.td; 4918 4919 // Support: 1.x compatibility 4920 // Manipulating tables requires a tbody 4921 function manipulationTarget(elem, content) { 4922 return jQuery.nodeName(elem, "table") && jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr") ? elem.getElementsByTagName("tbody")[0] || elem.appendChild(elem.ownerDocument.createElement("tbody")) : elem; 4923 } 4924 4925 // Replace/restore the type attribute of script elements for safe DOM manipulation 4926 function disableScript(elem) { 4927 elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; 4928 return elem; 4929 } 4930 function restoreScript(elem) { 4931 var match = rscriptTypeMasked.exec(elem.type); 4932 4933 if (match) { 4934 elem.type = match[1]; 4935 } else { 4936 elem.removeAttribute("type"); 4937 } 4938 4939 return elem; 4940 } 4941 4942 // Mark scripts as having already been evaluated 4943 function setGlobalEval(elems, refElements) { 4944 var i = 0, 4945 l = elems.length; 4946 4947 for (; i < l; i++) { 4948 data_priv.set(elems[i], "globalEval", !refElements || data_priv.get(refElements[i], "globalEval")); 4949 } 4950 } 4951 4952 function cloneCopyEvent(src, dest) { 4953 var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; 4954 4955 if (dest.nodeType !== 1) { 4956 return; 4957 } 4958 4959 // 1. Copy private data: events, handlers, etc. 4960 if (data_priv.hasData(src)) { 4961 pdataOld = data_priv.access(src); 4962 pdataCur = data_priv.set(dest, pdataOld); 4963 events = pdataOld.events; 4964 4965 if (events) { 4966 delete pdataCur.handle; 4967 pdataCur.events = {}; 4968 4969 for (type in events) { 4970 for (i = 0, l = events[type].length; i < l; i++) { 4971 jQuery.event.add(dest, type, events[type][i]); 4972 } 4973 } 4974 } 4975 } 4976 4977 // 2. Copy user data 4978 if (data_user.hasData(src)) { 4979 udataOld = data_user.access(src); 4980 udataCur = jQuery.extend({}, udataOld); 4981 4982 data_user.set(dest, udataCur); 4983 } 4984 } 4985 4986 function getAll(context, tag) { 4987 var ret = context.getElementsByTagName ? context.getElementsByTagName(tag || "*") : context.querySelectorAll ? context.querySelectorAll(tag || "*") : []; 4988 4989 return tag === undefined || tag && jQuery.nodeName(context, tag) ? jQuery.merge([context], ret) : ret; 4990 } 4991 4992 // Fix IE bugs, see support tests 4993 function fixInput(src, dest) { 4994 var nodeName = dest.nodeName.toLowerCase(); 4995 4996 // Fails to persist the checked state of a cloned checkbox or radio button. 4997 if (nodeName === "input" && rcheckableType.test(src.type)) { 4998 dest.checked = src.checked; 4999 5000 // Fails to return the selected option to the default selected state when cloning options 5001 } else if (nodeName === "input" || nodeName === "textarea") { 5002 dest.defaultValue = src.defaultValue; 5003 } 5004 } 5005 5006 jQuery.extend({ 5007 clone: function clone(elem, dataAndEvents, deepDataAndEvents) { 5008 var i, 5009 l, 5010 srcElements, 5011 destElements, 5012 clone = elem.cloneNode(true), 5013 inPage = jQuery.contains(elem.ownerDocument, elem); 5014 5015 // Fix IE cloning issues 5016 if (!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) { 5017 5018 // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 5019 destElements = getAll(clone); 5020 srcElements = getAll(elem); 5021 5022 for (i = 0, l = srcElements.length; i < l; i++) { 5023 fixInput(srcElements[i], destElements[i]); 5024 } 5025 } 5026 5027 // Copy the events from the original to the clone 5028 if (dataAndEvents) { 5029 if (deepDataAndEvents) { 5030 srcElements = srcElements || getAll(elem); 5031 destElements = destElements || getAll(clone); 5032 5033 for (i = 0, l = srcElements.length; i < l; i++) { 5034 cloneCopyEvent(srcElements[i], destElements[i]); 5035 } 5036 } else { 5037 cloneCopyEvent(elem, clone); 5038 } 5039 } 5040 5041 // Preserve script evaluation history 5042 destElements = getAll(clone, "script"); 5043 if (destElements.length > 0) { 5044 setGlobalEval(destElements, !inPage && getAll(elem, "script")); 5045 } 5046 5047 // Return the cloned set 5048 return clone; 5049 }, 5050 5051 buildFragment: function buildFragment(elems, context, scripts, selection) { 5052 var elem, 5053 tmp, 5054 tag, 5055 wrap, 5056 contains, 5057 j, 5058 fragment = context.createDocumentFragment(), 5059 nodes = [], 5060 i = 0, 5061 l = elems.length; 5062 5063 for (; i < l; i++) { 5064 elem = elems[i]; 5065 5066 if (elem || elem === 0) { 5067 5068 // Add nodes directly 5069 if (jQuery.type(elem) === "object") { 5070 // Support: QtWebKit, PhantomJS 5071 // push.apply(_, arraylike) throws on ancient WebKit 5072 jQuery.merge(nodes, elem.nodeType ? [elem] : elem); 5073 5074 // Convert non-html into a text node 5075 } else if (!rhtml.test(elem)) { 5076 nodes.push(context.createTextNode(elem)); 5077 5078 // Convert html into DOM nodes 5079 } else { 5080 tmp = tmp || fragment.appendChild(context.createElement("div")); 5081 5082 // Deserialize a standard representation 5083 tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase(); 5084 wrap = wrapMap[tag] || wrapMap._default; 5085 tmp.innerHTML = wrap[1] + elem.replace(rxhtmlTag, "<$1></$2>") + wrap[2]; 5086 5087 // Descend through wrappers to the right content 5088 j = wrap[0]; 5089 while (j--) { 5090 tmp = tmp.lastChild; 5091 } 5092 5093 // Support: QtWebKit, PhantomJS 5094 // push.apply(_, arraylike) throws on ancient WebKit 5095 jQuery.merge(nodes, tmp.childNodes); 5096 5097 // Remember the top-level container 5098 tmp = fragment.firstChild; 5099 5100 // Ensure the created nodes are orphaned (#12392) 5101 tmp.textContent = ""; 5102 } 5103 } 5104 } 5105 5106 // Remove wrapper from fragment 5107 fragment.textContent = ""; 5108 5109 i = 0; 5110 while (elem = nodes[i++]) { 5111 5112 // #4087 - If origin and destination elements are the same, and this is 5113 // that element, do not do anything 5114 if (selection && jQuery.inArray(elem, selection) !== -1) { 5115 continue; 5116 } 5117 5118 contains = jQuery.contains(elem.ownerDocument, elem); 5119 5120 // Append to fragment 5121 tmp = getAll(fragment.appendChild(elem), "script"); 5122 5123 // Preserve script evaluation history 5124 if (contains) { 5125 setGlobalEval(tmp); 5126 } 5127 5128 // Capture executables 5129 if (scripts) { 5130 j = 0; 5131 while (elem = tmp[j++]) { 5132 if (rscriptType.test(elem.type || "")) { 5133 scripts.push(elem); 5134 } 5135 } 5136 } 5137 } 5138 5139 return fragment; 5140 }, 5141 5142 cleanData: function cleanData(elems) { 5143 var data, 5144 elem, 5145 type, 5146 key, 5147 special = jQuery.event.special, 5148 i = 0; 5149 5150 for (; (elem = elems[i]) !== undefined; i++) { 5151 if (jQuery.acceptData(elem)) { 5152 key = elem[data_priv.expando]; 5153 5154 if (key && (data = data_priv.cache[key])) { 5155 if (data.events) { 5156 for (type in data.events) { 5157 if (special[type]) { 5158 jQuery.event.remove(elem, type); 5159 5160 // This is a shortcut to avoid jQuery.event.remove's overhead 5161 } else { 5162 jQuery.removeEvent(elem, type, data.handle); 5163 } 5164 } 5165 } 5166 if (data_priv.cache[key]) { 5167 // Discard any remaining `private` data 5168 delete data_priv.cache[key]; 5169 } 5170 } 5171 } 5172 // Discard any remaining `user` data 5173 delete data_user.cache[elem[data_user.expando]]; 5174 } 5175 } 5176 }); 5177 5178 jQuery.fn.extend({ 5179 text: function text(value) { 5180 return access(this, function (value) { 5181 return value === undefined ? jQuery.text(this) : this.empty().each(function () { 5182 if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { 5183 this.textContent = value; 5184 } 5185 }); 5186 }, null, value, arguments.length); 5187 }, 5188 5189 append: function append() { 5190 return this.domManip(arguments, function (elem) { 5191 if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { 5192 var target = manipulationTarget(this, elem); 5193 target.appendChild(elem); 5194 } 5195 }); 5196 }, 5197 5198 prepend: function prepend() { 5199 return this.domManip(arguments, function (elem) { 5200 if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { 5201 var target = manipulationTarget(this, elem); 5202 target.insertBefore(elem, target.firstChild); 5203 } 5204 }); 5205 }, 5206 5207 before: function before() { 5208 return this.domManip(arguments, function (elem) { 5209 if (this.parentNode) { 5210 this.parentNode.insertBefore(elem, this); 5211 } 5212 }); 5213 }, 5214 5215 after: function after() { 5216 return this.domManip(arguments, function (elem) { 5217 if (this.parentNode) { 5218 this.parentNode.insertBefore(elem, this.nextSibling); 5219 } 5220 }); 5221 }, 5222 5223 remove: function remove(selector, keepData /* Internal Use Only */) { 5224 var elem, 5225 elems = selector ? jQuery.filter(selector, this) : this, 5226 i = 0; 5227 5228 for (; (elem = elems[i]) != null; i++) { 5229 if (!keepData && elem.nodeType === 1) { 5230 jQuery.cleanData(getAll(elem)); 5231 } 5232 5233 if (elem.parentNode) { 5234 if (keepData && jQuery.contains(elem.ownerDocument, elem)) { 5235 setGlobalEval(getAll(elem, "script")); 5236 } 5237 elem.parentNode.removeChild(elem); 5238 } 5239 } 5240 5241 return this; 5242 }, 5243 5244 empty: function empty() { 5245 var elem, 5246 i = 0; 5247 5248 for (; (elem = this[i]) != null; i++) { 5249 if (elem.nodeType === 1) { 5250 5251 // Prevent memory leaks 5252 jQuery.cleanData(getAll(elem, false)); 5253 5254 // Remove any remaining nodes 5255 elem.textContent = ""; 5256 } 5257 } 5258 5259 return this; 5260 }, 5261 5262 clone: function clone(dataAndEvents, deepDataAndEvents) { 5263 dataAndEvents = dataAndEvents == null ? false : dataAndEvents; 5264 deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; 5265 5266 return this.map(function () { 5267 return jQuery.clone(this, dataAndEvents, deepDataAndEvents); 5268 }); 5269 }, 5270 5271 html: function html(value) { 5272 return access(this, function (value) { 5273 var elem = this[0] || {}, 5274 i = 0, 5275 l = this.length; 5276 5277 if (value === undefined && elem.nodeType === 1) { 5278 return elem.innerHTML; 5279 } 5280 5281 // See if we can take a shortcut and just use innerHTML 5282 if (typeof value === "string" && !rnoInnerhtml.test(value) && !wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) { 5283 5284 value = value.replace(rxhtmlTag, "<$1></$2>"); 5285 5286 try { 5287 for (; i < l; i++) { 5288 elem = this[i] || {}; 5289 5290 // Remove element nodes and prevent memory leaks 5291 if (elem.nodeType === 1) { 5292 jQuery.cleanData(getAll(elem, false)); 5293 elem.innerHTML = value; 5294 } 5295 } 5296 5297 elem = 0; 5298 5299 // If using innerHTML throws an exception, use the fallback method 5300 } catch (e) {} 5301 } 5302 5303 if (elem) { 5304 this.empty().append(value); 5305 } 5306 }, null, value, arguments.length); 5307 }, 5308 5309 replaceWith: function replaceWith() { 5310 var arg = arguments[0]; 5311 5312 // Make the changes, replacing each context element with the new content 5313 this.domManip(arguments, function (elem) { 5314 arg = this.parentNode; 5315 5316 jQuery.cleanData(getAll(this)); 5317 5318 if (arg) { 5319 arg.replaceChild(elem, this); 5320 } 5321 }); 5322 5323 // Force removal if there was no new content (e.g., from empty arguments) 5324 return arg && (arg.length || arg.nodeType) ? this : this.remove(); 5325 }, 5326 5327 detach: function detach(selector) { 5328 return this.remove(selector, true); 5329 }, 5330 5331 domManip: function domManip(args, callback) { 5332 5333 // Flatten any nested arrays 5334 args = concat.apply([], args); 5335 5336 var fragment, 5337 first, 5338 scripts, 5339 hasScripts, 5340 node, 5341 doc, 5342 i = 0, 5343 l = this.length, 5344 set = this, 5345 iNoClone = l - 1, 5346 value = args[0], 5347 isFunction = jQuery.isFunction(value); 5348 5349 // We can't cloneNode fragments that contain checked, in WebKit 5350 if (isFunction || l > 1 && typeof value === "string" && !support.checkClone && rchecked.test(value)) { 5351 return this.each(function (index) { 5352 var self = set.eq(index); 5353 if (isFunction) { 5354 args[0] = value.call(this, index, self.html()); 5355 } 5356 self.domManip(args, callback); 5357 }); 5358 } 5359 5360 if (l) { 5361 fragment = jQuery.buildFragment(args, this[0].ownerDocument, false, this); 5362 first = fragment.firstChild; 5363 5364 if (fragment.childNodes.length === 1) { 5365 fragment = first; 5366 } 5367 5368 if (first) { 5369 scripts = jQuery.map(getAll(fragment, "script"), disableScript); 5370 hasScripts = scripts.length; 5371 5372 // Use the original fragment for the last item instead of the first because it can end up 5373 // being emptied incorrectly in certain situations (#8070). 5374 for (; i < l; i++) { 5375 node = fragment; 5376 5377 if (i !== iNoClone) { 5378 node = jQuery.clone(node, true, true); 5379 5380 // Keep references to cloned scripts for later restoration 5381 if (hasScripts) { 5382 // Support: QtWebKit 5383 // jQuery.merge because push.apply(_, arraylike) throws 5384 jQuery.merge(scripts, getAll(node, "script")); 5385 } 5386 } 5387 5388 callback.call(this[i], node, i); 5389 } 5390 5391 if (hasScripts) { 5392 doc = scripts[scripts.length - 1].ownerDocument; 5393 5394 // Reenable scripts 5395 jQuery.map(scripts, restoreScript); 5396 5397 // Evaluate executable scripts on first document insertion 5398 for (i = 0; i < hasScripts; i++) { 5399 node = scripts[i]; 5400 if (rscriptType.test(node.type || "") && !data_priv.access(node, "globalEval") && jQuery.contains(doc, node)) { 5401 5402 if (node.src) { 5403 // Optional AJAX dependency, but won't run scripts if not present 5404 if (jQuery._evalUrl) { 5405 jQuery._evalUrl(node.src); 5406 } 5407 } else { 5408 jQuery.globalEval(node.textContent.replace(rcleanScript, "")); 5409 } 5410 } 5411 } 5412 } 5413 } 5414 } 5415 5416 return this; 5417 } 5418 }); 5419 5420 jQuery.each({ 5421 appendTo: "append", 5422 prependTo: "prepend", 5423 insertBefore: "before", 5424 insertAfter: "after", 5425 replaceAll: "replaceWith" 5426 }, function (name, original) { 5427 jQuery.fn[name] = function (selector) { 5428 var elems, 5429 ret = [], 5430 insert = jQuery(selector), 5431 last = insert.length - 1, 5432 i = 0; 5433 5434 for (; i <= last; i++) { 5435 elems = i === last ? this : this.clone(true); 5436 jQuery(insert[i])[original](elems); 5437 5438 // Support: QtWebKit 5439 // .get() because push.apply(_, arraylike) throws 5440 push.apply(ret, elems.get()); 5441 } 5442 5443 return this.pushStack(ret); 5444 }; 5445 }); 5446 5447 var iframe, 5448 elemdisplay = {}; 5449 5450 /** 5451 * Retrieve the actual display of a element 5452 * @param {String} name nodeName of the element 5453 * @param {Object} doc Document object 5454 */ 5455 // Called only from within defaultDisplay 5456 function actualDisplay(name, doc) { 5457 var style, 5458 elem = jQuery(doc.createElement(name)).appendTo(doc.body), 5459 5460 5461 // getDefaultComputedStyle might be reliably used only on attached element 5462 display = window.getDefaultComputedStyle && (style = window.getDefaultComputedStyle(elem[0])) ? 5463 5464 // Use of this method is a temporary fix (more like optimization) until something better comes along, 5465 // since it was removed from specification and supported only in FF 5466 style.display : jQuery.css(elem[0], "display"); 5467 5468 // We don't have any data stored on the element, 5469 // so use "detach" method as fast way to get rid of the element 5470 elem.detach(); 5471 5472 return display; 5473 } 5474 5475 /** 5476 * Try to determine the default display value of an element 5477 * @param {String} nodeName 5478 */ 5479 function defaultDisplay(nodeName) { 5480 var doc = document, 5481 display = elemdisplay[nodeName]; 5482 5483 if (!display) { 5484 display = actualDisplay(nodeName, doc); 5485 5486 // If the simple way fails, read from inside an iframe 5487 if (display === "none" || !display) { 5488 5489 // Use the already-created iframe if possible 5490 iframe = (iframe || jQuery("<iframe frameborder='0' width='0' height='0'/>")).appendTo(doc.documentElement); 5491 5492 // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse 5493 doc = iframe[0].contentDocument; 5494 5495 // Support: IE 5496 doc.write(); 5497 doc.close(); 5498 5499 display = actualDisplay(nodeName, doc); 5500 iframe.detach(); 5501 } 5502 5503 // Store the correct default display 5504 elemdisplay[nodeName] = display; 5505 } 5506 5507 return display; 5508 } 5509 var rmargin = /^margin/; 5510 5511 var rnumnonpx = new RegExp("^(" + pnum + ")(?!px)[a-z%]+$", "i"); 5512 5513 var getStyles = function getStyles(elem) { 5514 // Support: IE<=11+, Firefox<=30+ (#15098, #14150) 5515 // IE throws on elements created in popups 5516 // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" 5517 if (elem.ownerDocument.defaultView.opener) { 5518 return elem.ownerDocument.defaultView.getComputedStyle(elem, null); 5519 } 5520 5521 return window.getComputedStyle(elem, null); 5522 }; 5523 5524 function curCSS(elem, name, computed) { 5525 var width, 5526 minWidth, 5527 maxWidth, 5528 ret, 5529 style = elem.style; 5530 5531 computed = computed || getStyles(elem); 5532 5533 // Support: IE9 5534 // getPropertyValue is only needed for .css('filter') (#12537) 5535 if (computed) { 5536 ret = computed.getPropertyValue(name) || computed[name]; 5537 } 5538 5539 if (computed) { 5540 5541 if (ret === "" && !jQuery.contains(elem.ownerDocument, elem)) { 5542 ret = jQuery.style(elem, name); 5543 } 5544 5545 // Support: iOS < 6 5546 // A tribute to the "awesome hack by Dean Edwards" 5547 // iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels 5548 // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values 5549 if (rnumnonpx.test(ret) && rmargin.test(name)) { 5550 5551 // Remember the original values 5552 width = style.width; 5553 minWidth = style.minWidth; 5554 maxWidth = style.maxWidth; 5555 5556 // Put in the new values to get a computed value out 5557 style.minWidth = style.maxWidth = style.width = ret; 5558 ret = computed.width; 5559 5560 // Revert the changed values 5561 style.width = width; 5562 style.minWidth = minWidth; 5563 style.maxWidth = maxWidth; 5564 } 5565 } 5566 5567 return ret !== undefined ? 5568 // Support: IE 5569 // IE returns zIndex value as an integer. 5570 ret + "" : ret; 5571 } 5572 5573 function addGetHookIf(conditionFn, hookFn) { 5574 // Define the hook, we'll check on the first run if it's really needed. 5575 return { 5576 get: function get() { 5577 if (conditionFn()) { 5578 // Hook not needed (or it's not possible to use it due 5579 // to missing dependency), remove it. 5580 delete this.get; 5581 return; 5582 } 5583 5584 // Hook needed; redefine it so that the support test is not executed again. 5585 return (this.get = hookFn).apply(this, arguments); 5586 } 5587 }; 5588 } 5589 5590 (function () { 5591 var pixelPositionVal, 5592 boxSizingReliableVal, 5593 docElem = document.documentElement, 5594 container = document.createElement("div"), 5595 div = document.createElement("div"); 5596 5597 if (!div.style) { 5598 return; 5599 } 5600 5601 // Support: IE9-11+ 5602 // Style of cloned element affects source element cloned (#8908) 5603 div.style.backgroundClip = "content-box"; 5604 div.cloneNode(true).style.backgroundClip = ""; 5605 support.clearCloneStyle = div.style.backgroundClip === "content-box"; 5606 5607 container.style.cssText = "border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;" + "position:absolute"; 5608 container.appendChild(div); 5609 5610 // Executing both pixelPosition & boxSizingReliable tests require only one layout 5611 // so they're executed at the same time to save the second computation. 5612 function computePixelPositionAndBoxSizingReliable() { 5613 div.style.cssText = 5614 // Support: Firefox<29, Android 2.3 5615 // Vendor-prefix box-sizing 5616 "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" + "box-sizing:border-box;display:block;margin-top:1%;top:1%;" + "border:1px;padding:1px;width:4px;position:absolute"; 5617 div.innerHTML = ""; 5618 docElem.appendChild(container); 5619 5620 var divStyle = window.getComputedStyle(div, null); 5621 pixelPositionVal = divStyle.top !== "1%"; 5622 boxSizingReliableVal = divStyle.width === "4px"; 5623 5624 docElem.removeChild(container); 5625 } 5626 5627 // Support: node.js jsdom 5628 // Don't assume that getComputedStyle is a property of the global object 5629 if (window.getComputedStyle) { 5630 jQuery.extend(support, { 5631 pixelPosition: function pixelPosition() { 5632 5633 // This test is executed only once but we still do memoizing 5634 // since we can use the boxSizingReliable pre-computing. 5635 // No need to check if the test was already performed, though. 5636 computePixelPositionAndBoxSizingReliable(); 5637 return pixelPositionVal; 5638 }, 5639 boxSizingReliable: function boxSizingReliable() { 5640 if (boxSizingReliableVal == null) { 5641 computePixelPositionAndBoxSizingReliable(); 5642 } 5643 return boxSizingReliableVal; 5644 }, 5645 reliableMarginRight: function reliableMarginRight() { 5646 5647 // Support: Android 2.3 5648 // Check if div with explicit width and no margin-right incorrectly 5649 // gets computed margin-right based on width of container. (#3333) 5650 // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right 5651 // This support function is only executed once so no memoizing is needed. 5652 var ret, 5653 marginDiv = div.appendChild(document.createElement("div")); 5654 5655 // Reset CSS: box-sizing; display; margin; border; padding 5656 marginDiv.style.cssText = div.style.cssText = 5657 // Support: Firefox<29, Android 2.3 5658 // Vendor-prefix box-sizing 5659 "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + "box-sizing:content-box;display:block;margin:0;border:0;padding:0"; 5660 marginDiv.style.marginRight = marginDiv.style.width = "0"; 5661 div.style.width = "1px"; 5662 docElem.appendChild(container); 5663 5664 ret = !parseFloat(window.getComputedStyle(marginDiv, null).marginRight); 5665 5666 docElem.removeChild(container); 5667 div.removeChild(marginDiv); 5668 5669 return ret; 5670 } 5671 }); 5672 } 5673 })(); 5674 5675 // A method for quickly swapping in/out CSS properties to get correct calculations. 5676 jQuery.swap = function (elem, options, callback, args) { 5677 var ret, 5678 name, 5679 old = {}; 5680 5681 // Remember the old values, and insert the new ones 5682 for (name in options) { 5683 old[name] = elem.style[name]; 5684 elem.style[name] = options[name]; 5685 } 5686 5687 ret = callback.apply(elem, args || []); 5688 5689 // Revert the old values 5690 for (name in options) { 5691 elem.style[name] = old[name]; 5692 } 5693 5694 return ret; 5695 }; 5696 5697 var 5698 // Swappable if display is none or starts with table except "table", "table-cell", or "table-caption" 5699 // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display 5700 rdisplayswap = /^(none|table(?!-c[ea]).+)/, 5701 rnumsplit = new RegExp("^(" + pnum + ")(.*)$", "i"), 5702 rrelNum = new RegExp("^([+-])=(" + pnum + ")", "i"), 5703 cssShow = { position: "absolute", visibility: "hidden", display: "block" }, 5704 cssNormalTransform = { 5705 letterSpacing: "0", 5706 fontWeight: "400" 5707 }, 5708 cssPrefixes = ["Webkit", "O", "Moz", "ms"]; 5709 5710 // Return a css property mapped to a potentially vendor prefixed property 5711 function vendorPropName(style, name) { 5712 5713 // Shortcut for names that are not vendor prefixed 5714 if (name in style) { 5715 return name; 5716 } 5717 5718 // Check for vendor prefixed names 5719 var capName = name[0].toUpperCase() + name.slice(1), 5720 origName = name, 5721 i = cssPrefixes.length; 5722 5723 while (i--) { 5724 name = cssPrefixes[i] + capName; 5725 if (name in style) { 5726 return name; 5727 } 5728 } 5729 5730 return origName; 5731 } 5732 5733 function setPositiveNumber(elem, value, subtract) { 5734 var matches = rnumsplit.exec(value); 5735 return matches ? 5736 // Guard against undefined "subtract", e.g., when used as in cssHooks 5737 Math.max(0, matches[1] - (subtract || 0)) + (matches[2] || "px") : value; 5738 } 5739 5740 function augmentWidthOrHeight(elem, name, extra, isBorderBox, styles) { 5741 var i = extra === (isBorderBox ? "border" : "content") ? 5742 // If we already have the right measurement, avoid augmentation 5743 4 : 5744 // Otherwise initialize for horizontal or vertical properties 5745 name === "width" ? 1 : 0, 5746 val = 0; 5747 5748 for (; i < 4; i += 2) { 5749 // Both box models exclude margin, so add it if we want it 5750 if (extra === "margin") { 5751 val += jQuery.css(elem, extra + cssExpand[i], true, styles); 5752 } 5753 5754 if (isBorderBox) { 5755 // border-box includes padding, so remove it if we want content 5756 if (extra === "content") { 5757 val -= jQuery.css(elem, "padding" + cssExpand[i], true, styles); 5758 } 5759 5760 // At this point, extra isn't border nor margin, so remove border 5761 if (extra !== "margin") { 5762 val -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles); 5763 } 5764 } else { 5765 // At this point, extra isn't content, so add padding 5766 val += jQuery.css(elem, "padding" + cssExpand[i], true, styles); 5767 5768 // At this point, extra isn't content nor padding, so add border 5769 if (extra !== "padding") { 5770 val += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles); 5771 } 5772 } 5773 } 5774 5775 return val; 5776 } 5777 5778 function getWidthOrHeight(elem, name, extra) { 5779 5780 // Start with offset property, which is equivalent to the border-box value 5781 var valueIsBorderBox = true, 5782 val = name === "width" ? elem.offsetWidth : elem.offsetHeight, 5783 styles = getStyles(elem), 5784 isBorderBox = jQuery.css(elem, "boxSizing", false, styles) === "border-box"; 5785 5786 // Some non-html elements return undefined for offsetWidth, so check for null/undefined 5787 // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 5788 // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 5789 if (val <= 0 || val == null) { 5790 // Fall back to computed then uncomputed css if necessary 5791 val = curCSS(elem, name, styles); 5792 if (val < 0 || val == null) { 5793 val = elem.style[name]; 5794 } 5795 5796 // Computed unit is not pixels. Stop here and return. 5797 if (rnumnonpx.test(val)) { 5798 return val; 5799 } 5800 5801 // Check for style in case a browser which returns unreliable values 5802 // for getComputedStyle silently falls back to the reliable elem.style 5803 valueIsBorderBox = isBorderBox && (support.boxSizingReliable() || val === elem.style[name]); 5804 5805 // Normalize "", auto, and prepare for extra 5806 val = parseFloat(val) || 0; 5807 } 5808 5809 // Use the active box-sizing model to add/subtract irrelevant styles 5810 return val + augmentWidthOrHeight(elem, name, extra || (isBorderBox ? "border" : "content"), valueIsBorderBox, styles) + "px"; 5811 } 5812 5813 function showHide(elements, show) { 5814 var display, 5815 elem, 5816 hidden, 5817 values = [], 5818 index = 0, 5819 length = elements.length; 5820 5821 for (; index < length; index++) { 5822 elem = elements[index]; 5823 if (!elem.style) { 5824 continue; 5825 } 5826 5827 values[index] = data_priv.get(elem, "olddisplay"); 5828 display = elem.style.display; 5829 if (show) { 5830 // Reset the inline display of this element to learn if it is 5831 // being hidden by cascaded rules or not 5832 if (!values[index] && display === "none") { 5833 elem.style.display = ""; 5834 } 5835 5836 // Set elements which have been overridden with display: none 5837 // in a stylesheet to whatever the default browser style is 5838 // for such an element 5839 if (elem.style.display === "" && isHidden(elem)) { 5840 values[index] = data_priv.access(elem, "olddisplay", defaultDisplay(elem.nodeName)); 5841 } 5842 } else { 5843 hidden = isHidden(elem); 5844 5845 if (display !== "none" || !hidden) { 5846 data_priv.set(elem, "olddisplay", hidden ? display : jQuery.css(elem, "display")); 5847 } 5848 } 5849 } 5850 5851 // Set the display of most of the elements in a second loop 5852 // to avoid the constant reflow 5853 for (index = 0; index < length; index++) { 5854 elem = elements[index]; 5855 if (!elem.style) { 5856 continue; 5857 } 5858 if (!show || elem.style.display === "none" || elem.style.display === "") { 5859 elem.style.display = show ? values[index] || "" : "none"; 5860 } 5861 } 5862 5863 return elements; 5864 } 5865 5866 jQuery.extend({ 5867 5868 // Add in style property hooks for overriding the default 5869 // behavior of getting and setting a style property 5870 cssHooks: { 5871 opacity: { 5872 get: function get(elem, computed) { 5873 if (computed) { 5874 5875 // We should always get a number back from opacity 5876 var ret = curCSS(elem, "opacity"); 5877 return ret === "" ? "1" : ret; 5878 } 5879 } 5880 } 5881 }, 5882 5883 // Don't automatically add "px" to these possibly-unitless properties 5884 cssNumber: { 5885 "columnCount": true, 5886 "fillOpacity": true, 5887 "flexGrow": true, 5888 "flexShrink": true, 5889 "fontWeight": true, 5890 "lineHeight": true, 5891 "opacity": true, 5892 "order": true, 5893 "orphans": true, 5894 "widows": true, 5895 "zIndex": true, 5896 "zoom": true 5897 }, 5898 5899 // Add in properties whose names you wish to fix before 5900 // setting or getting the value 5901 cssProps: { 5902 "float": "cssFloat" 5903 }, 5904 5905 // Get and set the style property on a DOM Node 5906 style: function style(elem, name, value, extra) { 5907 5908 // Don't set styles on text and comment nodes 5909 if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) { 5910 return; 5911 } 5912 5913 // Make sure that we're working with the right name 5914 var ret, 5915 type, 5916 hooks, 5917 origName = jQuery.camelCase(name), 5918 style = elem.style; 5919 5920 name = jQuery.cssProps[origName] || (jQuery.cssProps[origName] = vendorPropName(style, origName)); 5921 5922 // Gets hook for the prefixed version, then unprefixed version 5923 hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName]; 5924 5925 // Check if we're setting a value 5926 if (value !== undefined) { 5927 type = typeof value === "undefined" ? "undefined" : (0, _typeof3.default)(value); 5928 5929 // Convert "+=" or "-=" to relative numbers (#7345) 5930 if (type === "string" && (ret = rrelNum.exec(value))) { 5931 value = (ret[1] + 1) * ret[2] + parseFloat(jQuery.css(elem, name)); 5932 // Fixes bug #9237 5933 type = "number"; 5934 } 5935 5936 // Make sure that null and NaN values aren't set (#7116) 5937 if (value == null || value !== value) { 5938 return; 5939 } 5940 5941 // If a number, add 'px' to the (except for certain CSS properties) 5942 if (type === "number" && !jQuery.cssNumber[origName]) { 5943 value += "px"; 5944 } 5945 5946 // Support: IE9-11+ 5947 // background-* props affect original clone's values 5948 if (!support.clearCloneStyle && value === "" && name.indexOf("background") === 0) { 5949 style[name] = "inherit"; 5950 } 5951 5952 // If a hook was provided, use that value, otherwise just set the specified value 5953 if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !== undefined) { 5954 style[name] = value; 5955 } 5956 } else { 5957 // If a hook was provided get the non-computed value from there 5958 if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== undefined) { 5959 return ret; 5960 } 5961 5962 // Otherwise just get the value from the style object 5963 return style[name]; 5964 } 5965 }, 5966 5967 css: function css(elem, name, extra, styles) { 5968 var val, 5969 num, 5970 hooks, 5971 origName = jQuery.camelCase(name); 5972 5973 // Make sure that we're working with the right name 5974 name = jQuery.cssProps[origName] || (jQuery.cssProps[origName] = vendorPropName(elem.style, origName)); 5975 5976 // Try prefixed name followed by the unprefixed name 5977 hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName]; 5978 5979 // If a hook was provided get the computed value from there 5980 if (hooks && "get" in hooks) { 5981 val = hooks.get(elem, true, extra); 5982 } 5983 5984 // Otherwise, if a way to get the computed value exists, use that 5985 if (val === undefined) { 5986 val = curCSS(elem, name, styles); 5987 } 5988 5989 // Convert "normal" to computed value 5990 if (val === "normal" && name in cssNormalTransform) { 5991 val = cssNormalTransform[name]; 5992 } 5993 5994 // Make numeric if forced or a qualifier was provided and val looks numeric 5995 if (extra === "" || extra) { 5996 num = parseFloat(val); 5997 return extra === true || jQuery.isNumeric(num) ? num || 0 : val; 5998 } 5999 return val; 6000 } 6001 }); 6002 6003 jQuery.each(["height", "width"], function (i, name) { 6004 jQuery.cssHooks[name] = { 6005 get: function get(elem, computed, extra) { 6006 if (computed) { 6007 6008 // Certain elements can have dimension info if we invisibly show them 6009 // but it must have a current display style that would benefit 6010 return rdisplayswap.test(jQuery.css(elem, "display")) && elem.offsetWidth === 0 ? jQuery.swap(elem, cssShow, function () { 6011 return getWidthOrHeight(elem, name, extra); 6012 }) : getWidthOrHeight(elem, name, extra); 6013 } 6014 }, 6015 6016 set: function set(elem, value, extra) { 6017 var styles = extra && getStyles(elem); 6018 return setPositiveNumber(elem, value, extra ? augmentWidthOrHeight(elem, name, extra, jQuery.css(elem, "boxSizing", false, styles) === "border-box", styles) : 0); 6019 } 6020 }; 6021 }); 6022 6023 // Support: Android 2.3 6024 jQuery.cssHooks.marginRight = addGetHookIf(support.reliableMarginRight, function (elem, computed) { 6025 if (computed) { 6026 return jQuery.swap(elem, { "display": "inline-block" }, curCSS, [elem, "marginRight"]); 6027 } 6028 }); 6029 6030 // These hooks are used by animate to expand properties 6031 jQuery.each({ 6032 margin: "", 6033 padding: "", 6034 border: "Width" 6035 }, function (prefix, suffix) { 6036 jQuery.cssHooks[prefix + suffix] = { 6037 expand: function expand(value) { 6038 var i = 0, 6039 expanded = {}, 6040 6041 6042 // Assumes a single number if not a string 6043 parts = typeof value === "string" ? value.split(" ") : [value]; 6044 6045 for (; i < 4; i++) { 6046 expanded[prefix + cssExpand[i] + suffix] = parts[i] || parts[i - 2] || parts[0]; 6047 } 6048 6049 return expanded; 6050 } 6051 }; 6052 6053 if (!rmargin.test(prefix)) { 6054 jQuery.cssHooks[prefix + suffix].set = setPositiveNumber; 6055 } 6056 }); 6057 6058 jQuery.fn.extend({ 6059 css: function css(name, value) { 6060 return access(this, function (elem, name, value) { 6061 var styles, 6062 len, 6063 map = {}, 6064 i = 0; 6065 6066 if (jQuery.isArray(name)) { 6067 styles = getStyles(elem); 6068 len = name.length; 6069 6070 for (; i < len; i++) { 6071 map[name[i]] = jQuery.css(elem, name[i], false, styles); 6072 } 6073 6074 return map; 6075 } 6076 6077 return value !== undefined ? jQuery.style(elem, name, value) : jQuery.css(elem, name); 6078 }, name, value, arguments.length > 1); 6079 }, 6080 show: function show() { 6081 return showHide(this, true); 6082 }, 6083 hide: function hide() { 6084 return showHide(this); 6085 }, 6086 toggle: function toggle(state) { 6087 if (typeof state === "boolean") { 6088 return state ? this.show() : this.hide(); 6089 } 6090 6091 return this.each(function () { 6092 if (isHidden(this)) { 6093 jQuery(this).show(); 6094 } else { 6095 jQuery(this).hide(); 6096 } 6097 }); 6098 } 6099 }); 6100 6101 function Tween(elem, options, prop, end, easing) { 6102 return new Tween.prototype.init(elem, options, prop, end, easing); 6103 } 6104 jQuery.Tween = Tween; 6105 6106 Tween.prototype = { 6107 constructor: Tween, 6108 init: function init(elem, options, prop, end, easing, unit) { 6109 this.elem = elem; 6110 this.prop = prop; 6111 this.easing = easing || "swing"; 6112 this.options = options; 6113 this.start = this.now = this.cur(); 6114 this.end = end; 6115 this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px"); 6116 }, 6117 cur: function cur() { 6118 var hooks = Tween.propHooks[this.prop]; 6119 6120 return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this); 6121 }, 6122 run: function run(percent) { 6123 var eased, 6124 hooks = Tween.propHooks[this.prop]; 6125 6126 if (this.options.duration) { 6127 this.pos = eased = jQuery.easing[this.easing](percent, this.options.duration * percent, 0, 1, this.options.duration); 6128 } else { 6129 this.pos = eased = percent; 6130 } 6131 this.now = (this.end - this.start) * eased + this.start; 6132 6133 if (this.options.step) { 6134 this.options.step.call(this.elem, this.now, this); 6135 } 6136 6137 if (hooks && hooks.set) { 6138 hooks.set(this); 6139 } else { 6140 Tween.propHooks._default.set(this); 6141 } 6142 return this; 6143 } 6144 }; 6145 6146 Tween.prototype.init.prototype = Tween.prototype; 6147 6148 Tween.propHooks = { 6149 _default: { 6150 get: function get(tween) { 6151 var result; 6152 6153 if (tween.elem[tween.prop] != null && (!tween.elem.style || tween.elem.style[tween.prop] == null)) { 6154 return tween.elem[tween.prop]; 6155 } 6156 6157 // Passing an empty string as a 3rd parameter to .css will automatically 6158 // attempt a parseFloat and fallback to a string if the parse fails. 6159 // Simple values such as "10px" are parsed to Float; 6160 // complex values such as "rotate(1rad)" are returned as-is. 6161 result = jQuery.css(tween.elem, tween.prop, ""); 6162 // Empty strings, null, undefined and "auto" are converted to 0. 6163 return !result || result === "auto" ? 0 : result; 6164 }, 6165 set: function set(tween) { 6166 // Use step hook for back compat. 6167 // Use cssHook if its there. 6168 // Use .style if available and use plain properties where available. 6169 if (jQuery.fx.step[tween.prop]) { 6170 jQuery.fx.step[tween.prop](tween); 6171 } else if (tween.elem.style && (tween.elem.style[jQuery.cssProps[tween.prop]] != null || jQuery.cssHooks[tween.prop])) { 6172 jQuery.style(tween.elem, tween.prop, tween.now + tween.unit); 6173 } else { 6174 tween.elem[tween.prop] = tween.now; 6175 } 6176 } 6177 } 6178 }; 6179 6180 // Support: IE9 6181 // Panic based approach to setting things on disconnected nodes 6182 Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { 6183 set: function set(tween) { 6184 if (tween.elem.nodeType && tween.elem.parentNode) { 6185 tween.elem[tween.prop] = tween.now; 6186 } 6187 } 6188 }; 6189 6190 jQuery.easing = { 6191 linear: function linear(p) { 6192 return p; 6193 }, 6194 swing: function swing(p) { 6195 return 0.5 - Math.cos(p * Math.PI) / 2; 6196 } 6197 }; 6198 6199 jQuery.fx = Tween.prototype.init; 6200 6201 // Back Compat <1.8 extension point 6202 jQuery.fx.step = {}; 6203 6204 var fxNow, 6205 timerId, 6206 rfxtypes = /^(?:toggle|show|hide)$/, 6207 rfxnum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i"), 6208 rrun = /queueHooks$/, 6209 animationPrefilters = [defaultPrefilter], 6210 tweeners = { 6211 "*": [function (prop, value) { 6212 var tween = this.createTween(prop, value), 6213 target = tween.cur(), 6214 parts = rfxnum.exec(value), 6215 unit = parts && parts[3] || (jQuery.cssNumber[prop] ? "" : "px"), 6216 6217 6218 // Starting value computation is required for potential unit mismatches 6219 start = (jQuery.cssNumber[prop] || unit !== "px" && +target) && rfxnum.exec(jQuery.css(tween.elem, prop)), 6220 scale = 1, 6221 maxIterations = 20; 6222 6223 if (start && start[3] !== unit) { 6224 // Trust units reported by jQuery.css 6225 unit = unit || start[3]; 6226 6227 // Make sure we update the tween properties later on 6228 parts = parts || []; 6229 6230 // Iteratively approximate from a nonzero starting point 6231 start = +target || 1; 6232 6233 do { 6234 // If previous iteration zeroed out, double until we get *something*. 6235 // Use string for doubling so we don't accidentally see scale as unchanged below 6236 scale = scale || ".5"; 6237 6238 // Adjust and apply 6239 start = start / scale; 6240 jQuery.style(tween.elem, prop, start + unit); 6241 6242 // Update scale, tolerating zero or NaN from tween.cur(), 6243 // break the loop if scale is unchanged or perfect, or if we've just had enough 6244 } while (scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations); 6245 } 6246 6247 // Update tween properties 6248 if (parts) { 6249 start = tween.start = +start || +target || 0; 6250 tween.unit = unit; 6251 // If a +=/-= token was provided, we're doing a relative animation 6252 tween.end = parts[1] ? start + (parts[1] + 1) * parts[2] : +parts[2]; 6253 } 6254 6255 return tween; 6256 }] 6257 }; 6258 6259 // Animations created synchronously will run synchronously 6260 function createFxNow() { 6261 setTimeout(function () { 6262 fxNow = undefined; 6263 }); 6264 return fxNow = jQuery.now(); 6265 } 6266 6267 // Generate parameters to create a standard animation 6268 function genFx(type, includeWidth) { 6269 var which, 6270 i = 0, 6271 attrs = { height: type }; 6272 6273 // If we include width, step value is 1 to do all cssExpand values, 6274 // otherwise step value is 2 to skip over Left and Right 6275 includeWidth = includeWidth ? 1 : 0; 6276 for (; i < 4; i += 2 - includeWidth) { 6277 which = cssExpand[i]; 6278 attrs["margin" + which] = attrs["padding" + which] = type; 6279 } 6280 6281 if (includeWidth) { 6282 attrs.opacity = attrs.width = type; 6283 } 6284 6285 return attrs; 6286 } 6287 6288 function createTween(value, prop, animation) { 6289 var tween, 6290 collection = (tweeners[prop] || []).concat(tweeners["*"]), 6291 index = 0, 6292 length = collection.length; 6293 for (; index < length; index++) { 6294 if (tween = collection[index].call(animation, prop, value)) { 6295 6296 // We're done with this property 6297 return tween; 6298 } 6299 } 6300 } 6301 6302 function defaultPrefilter(elem, props, opts) { 6303 /* jshint validthis: true */ 6304 var prop, 6305 value, 6306 toggle, 6307 tween, 6308 hooks, 6309 oldfire, 6310 display, 6311 checkDisplay, 6312 anim = this, 6313 orig = {}, 6314 style = elem.style, 6315 hidden = elem.nodeType && isHidden(elem), 6316 dataShow = data_priv.get(elem, "fxshow"); 6317 6318 // Handle queue: false promises 6319 if (!opts.queue) { 6320 hooks = jQuery._queueHooks(elem, "fx"); 6321 if (hooks.unqueued == null) { 6322 hooks.unqueued = 0; 6323 oldfire = hooks.empty.fire; 6324 hooks.empty.fire = function () { 6325 if (!hooks.unqueued) { 6326 oldfire(); 6327 } 6328 }; 6329 } 6330 hooks.unqueued++; 6331 6332 anim.always(function () { 6333 // Ensure the complete handler is called before this completes 6334 anim.always(function () { 6335 hooks.unqueued--; 6336 if (!jQuery.queue(elem, "fx").length) { 6337 hooks.empty.fire(); 6338 } 6339 }); 6340 }); 6341 } 6342 6343 // Height/width overflow pass 6344 if (elem.nodeType === 1 && ("height" in props || "width" in props)) { 6345 // Make sure that nothing sneaks out 6346 // Record all 3 overflow attributes because IE9-10 do not 6347 // change the overflow attribute when overflowX and 6348 // overflowY are set to the same value 6349 opts.overflow = [style.overflow, style.overflowX, style.overflowY]; 6350 6351 // Set display property to inline-block for height/width 6352 // animations on inline elements that are having width/height animated 6353 display = jQuery.css(elem, "display"); 6354 6355 // Test default display if display is currently "none" 6356 checkDisplay = display === "none" ? data_priv.get(elem, "olddisplay") || defaultDisplay(elem.nodeName) : display; 6357 6358 if (checkDisplay === "inline" && jQuery.css(elem, "float") === "none") { 6359 style.display = "inline-block"; 6360 } 6361 } 6362 6363 if (opts.overflow) { 6364 style.overflow = "hidden"; 6365 anim.always(function () { 6366 style.overflow = opts.overflow[0]; 6367 style.overflowX = opts.overflow[1]; 6368 style.overflowY = opts.overflow[2]; 6369 }); 6370 } 6371 6372 // show/hide pass 6373 for (prop in props) { 6374 value = props[prop]; 6375 if (rfxtypes.exec(value)) { 6376 delete props[prop]; 6377 toggle = toggle || value === "toggle"; 6378 if (value === (hidden ? "hide" : "show")) { 6379 6380 // If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden 6381 if (value === "show" && dataShow && dataShow[prop] !== undefined) { 6382 hidden = true; 6383 } else { 6384 continue; 6385 } 6386 } 6387 orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop); 6388 6389 // Any non-fx value stops us from restoring the original display value 6390 } else { 6391 display = undefined; 6392 } 6393 } 6394 6395 if (!jQuery.isEmptyObject(orig)) { 6396 if (dataShow) { 6397 if ("hidden" in dataShow) { 6398 hidden = dataShow.hidden; 6399 } 6400 } else { 6401 dataShow = data_priv.access(elem, "fxshow", {}); 6402 } 6403 6404 // Store state if its toggle - enables .stop().toggle() to "reverse" 6405 if (toggle) { 6406 dataShow.hidden = !hidden; 6407 } 6408 if (hidden) { 6409 jQuery(elem).show(); 6410 } else { 6411 anim.done(function () { 6412 jQuery(elem).hide(); 6413 }); 6414 } 6415 anim.done(function () { 6416 var prop; 6417 6418 data_priv.remove(elem, "fxshow"); 6419 for (prop in orig) { 6420 jQuery.style(elem, prop, orig[prop]); 6421 } 6422 }); 6423 for (prop in orig) { 6424 tween = createTween(hidden ? dataShow[prop] : 0, prop, anim); 6425 6426 if (!(prop in dataShow)) { 6427 dataShow[prop] = tween.start; 6428 if (hidden) { 6429 tween.end = tween.start; 6430 tween.start = prop === "width" || prop === "height" ? 1 : 0; 6431 } 6432 } 6433 } 6434 6435 // If this is a noop like .hide().hide(), restore an overwritten display value 6436 } else if ((display === "none" ? defaultDisplay(elem.nodeName) : display) === "inline") { 6437 style.display = display; 6438 } 6439 } 6440 6441 function propFilter(props, specialEasing) { 6442 var index, name, easing, value, hooks; 6443 6444 // camelCase, specialEasing and expand cssHook pass 6445 for (index in props) { 6446 name = jQuery.camelCase(index); 6447 easing = specialEasing[name]; 6448 value = props[index]; 6449 if (jQuery.isArray(value)) { 6450 easing = value[1]; 6451 value = props[index] = value[0]; 6452 } 6453 6454 if (index !== name) { 6455 props[name] = value; 6456 delete props[index]; 6457 } 6458 6459 hooks = jQuery.cssHooks[name]; 6460 if (hooks && "expand" in hooks) { 6461 value = hooks.expand(value); 6462 delete props[name]; 6463 6464 // Not quite $.extend, this won't overwrite existing keys. 6465 // Reusing 'index' because we have the correct "name" 6466 for (index in value) { 6467 if (!(index in props)) { 6468 props[index] = value[index]; 6469 specialEasing[index] = easing; 6470 } 6471 } 6472 } else { 6473 specialEasing[name] = easing; 6474 } 6475 } 6476 } 6477 6478 function Animation(elem, properties, options) { 6479 var result, 6480 stopped, 6481 index = 0, 6482 length = animationPrefilters.length, 6483 deferred = jQuery.Deferred().always(function () { 6484 // Don't match elem in the :animated selector 6485 delete tick.elem; 6486 }), 6487 tick = function tick() { 6488 if (stopped) { 6489 return false; 6490 } 6491 var currentTime = fxNow || createFxNow(), 6492 remaining = Math.max(0, animation.startTime + animation.duration - currentTime), 6493 6494 // Support: Android 2.3 6495 // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) 6496 temp = remaining / animation.duration || 0, 6497 percent = 1 - temp, 6498 index = 0, 6499 length = animation.tweens.length; 6500 6501 for (; index < length; index++) { 6502 animation.tweens[index].run(percent); 6503 } 6504 6505 deferred.notifyWith(elem, [animation, percent, remaining]); 6506 6507 if (percent < 1 && length) { 6508 return remaining; 6509 } else { 6510 deferred.resolveWith(elem, [animation]); 6511 return false; 6512 } 6513 }, 6514 animation = deferred.promise({ 6515 elem: elem, 6516 props: jQuery.extend({}, properties), 6517 opts: jQuery.extend(true, { specialEasing: {} }, options), 6518 originalProperties: properties, 6519 originalOptions: options, 6520 startTime: fxNow || createFxNow(), 6521 duration: options.duration, 6522 tweens: [], 6523 createTween: function createTween(prop, end) { 6524 var tween = jQuery.Tween(elem, animation.opts, prop, end, animation.opts.specialEasing[prop] || animation.opts.easing); 6525 animation.tweens.push(tween); 6526 return tween; 6527 }, 6528 stop: function stop(gotoEnd) { 6529 var index = 0, 6530 6531 // If we are going to the end, we want to run all the tweens 6532 // otherwise we skip this part 6533 length = gotoEnd ? animation.tweens.length : 0; 6534 if (stopped) { 6535 return this; 6536 } 6537 stopped = true; 6538 for (; index < length; index++) { 6539 animation.tweens[index].run(1); 6540 } 6541 6542 // Resolve when we played the last frame; otherwise, reject 6543 if (gotoEnd) { 6544 deferred.resolveWith(elem, [animation, gotoEnd]); 6545 } else { 6546 deferred.rejectWith(elem, [animation, gotoEnd]); 6547 } 6548 return this; 6549 } 6550 }), 6551 props = animation.props; 6552 6553 propFilter(props, animation.opts.specialEasing); 6554 6555 for (; index < length; index++) { 6556 result = animationPrefilters[index].call(animation, elem, props, animation.opts); 6557 if (result) { 6558 return result; 6559 } 6560 } 6561 6562 jQuery.map(props, createTween, animation); 6563 6564 if (jQuery.isFunction(animation.opts.start)) { 6565 animation.opts.start.call(elem, animation); 6566 } 6567 6568 jQuery.fx.timer(jQuery.extend(tick, { 6569 elem: elem, 6570 anim: animation, 6571 queue: animation.opts.queue 6572 })); 6573 6574 // attach callbacks from options 6575 return animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always); 6576 } 6577 6578 jQuery.Animation = jQuery.extend(Animation, { 6579 6580 tweener: function tweener(props, callback) { 6581 if (jQuery.isFunction(props)) { 6582 callback = props; 6583 props = ["*"]; 6584 } else { 6585 props = props.split(" "); 6586 } 6587 6588 var prop, 6589 index = 0, 6590 length = props.length; 6591 6592 for (; index < length; index++) { 6593 prop = props[index]; 6594 tweeners[prop] = tweeners[prop] || []; 6595 tweeners[prop].unshift(callback); 6596 } 6597 }, 6598 6599 prefilter: function prefilter(callback, prepend) { 6600 if (prepend) { 6601 animationPrefilters.unshift(callback); 6602 } else { 6603 animationPrefilters.push(callback); 6604 } 6605 } 6606 }); 6607 6608 jQuery.speed = function (speed, easing, fn) { 6609 var opt = speed && (typeof speed === "undefined" ? "undefined" : (0, _typeof3.default)(speed)) === "object" ? jQuery.extend({}, speed) : { 6610 complete: fn || !fn && easing || jQuery.isFunction(speed) && speed, 6611 duration: speed, 6612 easing: fn && easing || easing && !jQuery.isFunction(easing) && easing 6613 }; 6614 6615 opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default; 6616 6617 // Normalize opt.queue - true/undefined/null -> "fx" 6618 if (opt.queue == null || opt.queue === true) { 6619 opt.queue = "fx"; 6620 } 6621 6622 // Queueing 6623 opt.old = opt.complete; 6624 6625 opt.complete = function () { 6626 if (jQuery.isFunction(opt.old)) { 6627 opt.old.call(this); 6628 } 6629 6630 if (opt.queue) { 6631 jQuery.dequeue(this, opt.queue); 6632 } 6633 }; 6634 6635 return opt; 6636 }; 6637 6638 jQuery.fn.extend({ 6639 fadeTo: function fadeTo(speed, to, easing, callback) { 6640 6641 // Show any hidden elements after setting opacity to 0 6642 return this.filter(isHidden).css("opacity", 0).show() 6643 6644 // Animate to the value specified 6645 .end().animate({ opacity: to }, speed, easing, callback); 6646 }, 6647 animate: function animate(prop, speed, easing, callback) { 6648 var empty = jQuery.isEmptyObject(prop), 6649 optall = jQuery.speed(speed, easing, callback), 6650 doAnimation = function doAnimation() { 6651 // Operate on a copy of prop so per-property easing won't be lost 6652 var anim = Animation(this, jQuery.extend({}, prop), optall); 6653 6654 // Empty animations, or finishing resolves immediately 6655 if (empty || data_priv.get(this, "finish")) { 6656 anim.stop(true); 6657 } 6658 }; 6659 doAnimation.finish = doAnimation; 6660 6661 return empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation); 6662 }, 6663 stop: function stop(type, clearQueue, gotoEnd) { 6664 var stopQueue = function stopQueue(hooks) { 6665 var stop = hooks.stop; 6666 delete hooks.stop; 6667 stop(gotoEnd); 6668 }; 6669 6670 if (typeof type !== "string") { 6671 gotoEnd = clearQueue; 6672 clearQueue = type; 6673 type = undefined; 6674 } 6675 if (clearQueue && type !== false) { 6676 this.queue(type || "fx", []); 6677 } 6678 6679 return this.each(function () { 6680 var dequeue = true, 6681 index = type != null && type + "queueHooks", 6682 timers = jQuery.timers, 6683 data = data_priv.get(this); 6684 6685 if (index) { 6686 if (data[index] && data[index].stop) { 6687 stopQueue(data[index]); 6688 } 6689 } else { 6690 for (index in data) { 6691 if (data[index] && data[index].stop && rrun.test(index)) { 6692 stopQueue(data[index]); 6693 } 6694 } 6695 } 6696 6697 for (index = timers.length; index--;) { 6698 if (timers[index].elem === this && (type == null || timers[index].queue === type)) { 6699 timers[index].anim.stop(gotoEnd); 6700 dequeue = false; 6701 timers.splice(index, 1); 6702 } 6703 } 6704 6705 // Start the next in the queue if the last step wasn't forced. 6706 // Timers currently will call their complete callbacks, which 6707 // will dequeue but only if they were gotoEnd. 6708 if (dequeue || !gotoEnd) { 6709 jQuery.dequeue(this, type); 6710 } 6711 }); 6712 }, 6713 finish: function finish(type) { 6714 if (type !== false) { 6715 type = type || "fx"; 6716 } 6717 return this.each(function () { 6718 var index, 6719 data = data_priv.get(this), 6720 queue = data[type + "queue"], 6721 hooks = data[type + "queueHooks"], 6722 timers = jQuery.timers, 6723 length = queue ? queue.length : 0; 6724 6725 // Enable finishing flag on private data 6726 data.finish = true; 6727 6728 // Empty the queue first 6729 jQuery.queue(this, type, []); 6730 6731 if (hooks && hooks.stop) { 6732 hooks.stop.call(this, true); 6733 } 6734 6735 // Look for any active animations, and finish them 6736 for (index = timers.length; index--;) { 6737 if (timers[index].elem === this && timers[index].queue === type) { 6738 timers[index].anim.stop(true); 6739 timers.splice(index, 1); 6740 } 6741 } 6742 6743 // Look for any animations in the old queue and finish them 6744 for (index = 0; index < length; index++) { 6745 if (queue[index] && queue[index].finish) { 6746 queue[index].finish.call(this); 6747 } 6748 } 6749 6750 // Turn off finishing flag 6751 delete data.finish; 6752 }); 6753 } 6754 }); 6755 6756 jQuery.each(["toggle", "show", "hide"], function (i, name) { 6757 var cssFn = jQuery.fn[name]; 6758 jQuery.fn[name] = function (speed, easing, callback) { 6759 return speed == null || typeof speed === "boolean" ? cssFn.apply(this, arguments) : this.animate(genFx(name, true), speed, easing, callback); 6760 }; 6761 }); 6762 6763 // Generate shortcuts for custom animations 6764 jQuery.each({ 6765 slideDown: genFx("show"), 6766 slideUp: genFx("hide"), 6767 slideToggle: genFx("toggle"), 6768 fadeIn: { opacity: "show" }, 6769 fadeOut: { opacity: "hide" }, 6770 fadeToggle: { opacity: "toggle" } 6771 }, function (name, props) { 6772 jQuery.fn[name] = function (speed, easing, callback) { 6773 return this.animate(props, speed, easing, callback); 6774 }; 6775 }); 6776 6777 jQuery.timers = []; 6778 jQuery.fx.tick = function () { 6779 var timer, 6780 i = 0, 6781 timers = jQuery.timers; 6782 6783 fxNow = jQuery.now(); 6784 6785 for (; i < timers.length; i++) { 6786 timer = timers[i]; 6787 // Checks the timer has not already been removed 6788 if (!timer() && timers[i] === timer) { 6789 timers.splice(i--, 1); 6790 } 6791 } 6792 6793 if (!timers.length) { 6794 jQuery.fx.stop(); 6795 } 6796 fxNow = undefined; 6797 }; 6798 6799 jQuery.fx.timer = function (timer) { 6800 jQuery.timers.push(timer); 6801 if (timer()) { 6802 jQuery.fx.start(); 6803 } else { 6804 jQuery.timers.pop(); 6805 } 6806 }; 6807 6808 jQuery.fx.interval = 13; 6809 6810 jQuery.fx.start = function () { 6811 if (!timerId) { 6812 timerId = setInterval(jQuery.fx.tick, jQuery.fx.interval); 6813 } 6814 }; 6815 6816 jQuery.fx.stop = function () { 6817 clearInterval(timerId); 6818 timerId = null; 6819 }; 6820 6821 jQuery.fx.speeds = { 6822 slow: 600, 6823 fast: 200, 6824 // Default speed 6825 _default: 400 6826 }; 6827 6828 // Based off of the plugin by Clint Helfers, with permission. 6829 // http://blindsignals.com/index.php/2009/07/jquery-delay/ 6830 jQuery.fn.delay = function (time, type) { 6831 time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; 6832 type = type || "fx"; 6833 6834 return this.queue(type, function (next, hooks) { 6835 var timeout = setTimeout(next, time); 6836 hooks.stop = function () { 6837 clearTimeout(timeout); 6838 }; 6839 }); 6840 }; 6841 6842 (function () { 6843 var input = document.createElement("input"), 6844 select = document.createElement("select"), 6845 opt = select.appendChild(document.createElement("option")); 6846 6847 input.type = "checkbox"; 6848 6849 // Support: iOS<=5.1, Android<=4.2+ 6850 // Default value for a checkbox should be "on" 6851 support.checkOn = input.value !== ""; 6852 6853 // Support: IE<=11+ 6854 // Must access selectedIndex to make default options select 6855 support.optSelected = opt.selected; 6856 6857 // Support: Android<=2.3 6858 // Options inside disabled selects are incorrectly marked as disabled 6859 select.disabled = true; 6860 support.optDisabled = !opt.disabled; 6861 6862 // Support: IE<=11+ 6863 // An input loses its value after becoming a radio 6864 input = document.createElement("input"); 6865 input.value = "t"; 6866 input.type = "radio"; 6867 support.radioValue = input.value === "t"; 6868 })(); 6869 6870 var nodeHook, 6871 boolHook, 6872 attrHandle = jQuery.expr.attrHandle; 6873 6874 jQuery.fn.extend({ 6875 attr: function attr(name, value) { 6876 return access(this, jQuery.attr, name, value, arguments.length > 1); 6877 }, 6878 6879 removeAttr: function removeAttr(name) { 6880 return this.each(function () { 6881 jQuery.removeAttr(this, name); 6882 }); 6883 } 6884 }); 6885 6886 jQuery.extend({ 6887 attr: function attr(elem, name, value) { 6888 var hooks, 6889 ret, 6890 nType = elem.nodeType; 6891 6892 // don't get/set attributes on text, comment and attribute nodes 6893 if (!elem || nType === 3 || nType === 8 || nType === 2) { 6894 return; 6895 } 6896 6897 // Fallback to prop when attributes are not supported 6898 if ((0, _typeof3.default)(elem.getAttribute) === strundefined) { 6899 return jQuery.prop(elem, name, value); 6900 } 6901 6902 // All attributes are lowercase 6903 // Grab necessary hook if one is defined 6904 if (nType !== 1 || !jQuery.isXMLDoc(elem)) { 6905 name = name.toLowerCase(); 6906 hooks = jQuery.attrHooks[name] || (jQuery.expr.match.bool.test(name) ? boolHook : nodeHook); 6907 } 6908 6909 if (value !== undefined) { 6910 6911 if (value === null) { 6912 jQuery.removeAttr(elem, name); 6913 } else if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined) { 6914 return ret; 6915 } else { 6916 elem.setAttribute(name, value + ""); 6917 return value; 6918 } 6919 } else if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) { 6920 return ret; 6921 } else { 6922 ret = jQuery.find.attr(elem, name); 6923 6924 // Non-existent attributes return null, we normalize to undefined 6925 return ret == null ? undefined : ret; 6926 } 6927 }, 6928 6929 removeAttr: function removeAttr(elem, value) { 6930 var name, 6931 propName, 6932 i = 0, 6933 attrNames = value && value.match(rnotwhite); 6934 6935 if (attrNames && elem.nodeType === 1) { 6936 while (name = attrNames[i++]) { 6937 propName = jQuery.propFix[name] || name; 6938 6939 // Boolean attributes get special treatment (#10870) 6940 if (jQuery.expr.match.bool.test(name)) { 6941 // Set corresponding property to false 6942 elem[propName] = false; 6943 } 6944 6945 elem.removeAttribute(name); 6946 } 6947 } 6948 }, 6949 6950 attrHooks: { 6951 type: { 6952 set: function set(elem, value) { 6953 if (!support.radioValue && value === "radio" && jQuery.nodeName(elem, "input")) { 6954 var val = elem.value; 6955 elem.setAttribute("type", value); 6956 if (val) { 6957 elem.value = val; 6958 } 6959 return value; 6960 } 6961 } 6962 } 6963 } 6964 }); 6965 6966 // Hooks for boolean attributes 6967 boolHook = { 6968 set: function set(elem, value, name) { 6969 if (value === false) { 6970 // Remove boolean attributes when set to false 6971 jQuery.removeAttr(elem, name); 6972 } else { 6973 elem.setAttribute(name, name); 6974 } 6975 return name; 6976 } 6977 }; 6978 jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function (i, name) { 6979 var getter = attrHandle[name] || jQuery.find.attr; 6980 6981 attrHandle[name] = function (elem, name, isXML) { 6982 var ret, handle; 6983 if (!isXML) { 6984 // Avoid an infinite loop by temporarily removing this function from the getter 6985 handle = attrHandle[name]; 6986 attrHandle[name] = ret; 6987 ret = getter(elem, name, isXML) != null ? name.toLowerCase() : null; 6988 attrHandle[name] = handle; 6989 } 6990 return ret; 6991 }; 6992 }); 6993 6994 var rfocusable = /^(?:input|select|textarea|button)$/i; 6995 6996 jQuery.fn.extend({ 6997 prop: function prop(name, value) { 6998 return access(this, jQuery.prop, name, value, arguments.length > 1); 6999 }, 7000 7001 removeProp: function removeProp(name) { 7002 return this.each(function () { 7003 delete this[jQuery.propFix[name] || name]; 7004 }); 7005 } 7006 }); 7007 7008 jQuery.extend({ 7009 propFix: { 7010 "for": "htmlFor", 7011 "class": "className" 7012 }, 7013 7014 prop: function prop(elem, name, value) { 7015 var ret, 7016 hooks, 7017 notxml, 7018 nType = elem.nodeType; 7019 7020 // Don't get/set properties on text, comment and attribute nodes 7021 if (!elem || nType === 3 || nType === 8 || nType === 2) { 7022 return; 7023 } 7024 7025 notxml = nType !== 1 || !jQuery.isXMLDoc(elem); 7026 7027 if (notxml) { 7028 // Fix name and attach hooks 7029 name = jQuery.propFix[name] || name; 7030 hooks = jQuery.propHooks[name]; 7031 } 7032 7033 if (value !== undefined) { 7034 return hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined ? ret : elem[name] = value; 7035 } else { 7036 return hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null ? ret : elem[name]; 7037 } 7038 }, 7039 7040 propHooks: { 7041 tabIndex: { 7042 get: function get(elem) { 7043 return elem.hasAttribute("tabindex") || rfocusable.test(elem.nodeName) || elem.href ? elem.tabIndex : -1; 7044 } 7045 } 7046 } 7047 }); 7048 7049 if (!support.optSelected) { 7050 jQuery.propHooks.selected = { 7051 get: function get(elem) { 7052 var parent = elem.parentNode; 7053 if (parent && parent.parentNode) { 7054 parent.parentNode.selectedIndex; 7055 } 7056 return null; 7057 } 7058 }; 7059 } 7060 7061 jQuery.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function () { 7062 jQuery.propFix[this.toLowerCase()] = this; 7063 }); 7064 7065 var rclass = /[\t\r\n\f]/g; 7066 7067 jQuery.fn.extend({ 7068 addClass: function addClass(value) { 7069 var classes, 7070 elem, 7071 cur, 7072 clazz, 7073 j, 7074 finalValue, 7075 proceed = typeof value === "string" && value, 7076 i = 0, 7077 len = this.length; 7078 7079 if (jQuery.isFunction(value)) { 7080 return this.each(function (j) { 7081 jQuery(this).addClass(value.call(this, j, this.className)); 7082 }); 7083 } 7084 7085 if (proceed) { 7086 // The disjunction here is for better compressibility (see removeClass) 7087 classes = (value || "").match(rnotwhite) || []; 7088 7089 for (; i < len; i++) { 7090 elem = this[i]; 7091 cur = elem.nodeType === 1 && (elem.className ? (" " + elem.className + " ").replace(rclass, " ") : " "); 7092 7093 if (cur) { 7094 j = 0; 7095 while (clazz = classes[j++]) { 7096 if (cur.indexOf(" " + clazz + " ") < 0) { 7097 cur += clazz + " "; 7098 } 7099 } 7100 7101 // only assign if different to avoid unneeded rendering. 7102 finalValue = jQuery.trim(cur); 7103 if (elem.className !== finalValue) { 7104 elem.className = finalValue; 7105 } 7106 } 7107 } 7108 } 7109 7110 return this; 7111 }, 7112 7113 removeClass: function removeClass(value) { 7114 var classes, 7115 elem, 7116 cur, 7117 clazz, 7118 j, 7119 finalValue, 7120 proceed = arguments.length === 0 || typeof value === "string" && value, 7121 i = 0, 7122 len = this.length; 7123 7124 if (jQuery.isFunction(value)) { 7125 return this.each(function (j) { 7126 jQuery(this).removeClass(value.call(this, j, this.className)); 7127 }); 7128 } 7129 if (proceed) { 7130 classes = (value || "").match(rnotwhite) || []; 7131 7132 for (; i < len; i++) { 7133 elem = this[i]; 7134 // This expression is here for better compressibility (see addClass) 7135 cur = elem.nodeType === 1 && (elem.className ? (" " + elem.className + " ").replace(rclass, " ") : ""); 7136 7137 if (cur) { 7138 j = 0; 7139 while (clazz = classes[j++]) { 7140 // Remove *all* instances 7141 while (cur.indexOf(" " + clazz + " ") >= 0) { 7142 cur = cur.replace(" " + clazz + " ", " "); 7143 } 7144 } 7145 7146 // Only assign if different to avoid unneeded rendering. 7147 finalValue = value ? jQuery.trim(cur) : ""; 7148 if (elem.className !== finalValue) { 7149 elem.className = finalValue; 7150 } 7151 } 7152 } 7153 } 7154 7155 return this; 7156 }, 7157 7158 toggleClass: function toggleClass(value, stateVal) { 7159 var type = typeof value === "undefined" ? "undefined" : (0, _typeof3.default)(value); 7160 7161 if (typeof stateVal === "boolean" && type === "string") { 7162 return stateVal ? this.addClass(value) : this.removeClass(value); 7163 } 7164 7165 if (jQuery.isFunction(value)) { 7166 return this.each(function (i) { 7167 jQuery(this).toggleClass(value.call(this, i, this.className, stateVal), stateVal); 7168 }); 7169 } 7170 7171 return this.each(function () { 7172 if (type === "string") { 7173 // Toggle individual class names 7174 var className, 7175 i = 0, 7176 self = jQuery(this), 7177 classNames = value.match(rnotwhite) || []; 7178 7179 while (className = classNames[i++]) { 7180 // Check each className given, space separated list 7181 if (self.hasClass(className)) { 7182 self.removeClass(className); 7183 } else { 7184 self.addClass(className); 7185 } 7186 } 7187 7188 // Toggle whole class name 7189 } else if (type === strundefined || type === "boolean") { 7190 if (this.className) { 7191 // store className if set 7192 data_priv.set(this, "__className__", this.className); 7193 } 7194 7195 // If the element has a class name or if we're passed `false`, 7196 // then remove the whole classname (if there was one, the above saved it). 7197 // Otherwise bring back whatever was previously saved (if anything), 7198 // falling back to the empty string if nothing was stored. 7199 this.className = this.className || value === false ? "" : data_priv.get(this, "__className__") || ""; 7200 } 7201 }); 7202 }, 7203 7204 hasClass: function hasClass(selector) { 7205 var className = " " + selector + " ", 7206 i = 0, 7207 l = this.length; 7208 for (; i < l; i++) { 7209 if (this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf(className) >= 0) { 7210 return true; 7211 } 7212 } 7213 7214 return false; 7215 } 7216 }); 7217 7218 var rreturn = /\r/g; 7219 7220 jQuery.fn.extend({ 7221 val: function val(value) { 7222 var hooks, 7223 ret, 7224 isFunction, 7225 elem = this[0]; 7226 7227 if (!arguments.length) { 7228 if (elem) { 7229 hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()]; 7230 7231 if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== undefined) { 7232 return ret; 7233 } 7234 7235 ret = elem.value; 7236 7237 return typeof ret === "string" ? 7238 // Handle most common string cases 7239 ret.replace(rreturn, "") : 7240 // Handle cases where value is null/undef or number 7241 ret == null ? "" : ret; 7242 } 7243 7244 return; 7245 } 7246 7247 isFunction = jQuery.isFunction(value); 7248 7249 return this.each(function (i) { 7250 var val; 7251 7252 if (this.nodeType !== 1) { 7253 return; 7254 } 7255 7256 if (isFunction) { 7257 val = value.call(this, i, jQuery(this).val()); 7258 } else { 7259 val = value; 7260 } 7261 7262 // Treat null/undefined as ""; convert numbers to string 7263 if (val == null) { 7264 val = ""; 7265 } else if (typeof val === "number") { 7266 val += ""; 7267 } else if (jQuery.isArray(val)) { 7268 val = jQuery.map(val, function (value) { 7269 return value == null ? "" : value + ""; 7270 }); 7271 } 7272 7273 hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()]; 7274 7275 // If set returns undefined, fall back to normal setting 7276 if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === undefined) { 7277 this.value = val; 7278 } 7279 }); 7280 } 7281 }); 7282 7283 jQuery.extend({ 7284 valHooks: { 7285 option: { 7286 get: function get(elem) { 7287 var val = jQuery.find.attr(elem, "value"); 7288 return val != null ? val : 7289 // Support: IE10-11+ 7290 // option.text throws exceptions (#14686, #14858) 7291 jQuery.trim(jQuery.text(elem)); 7292 } 7293 }, 7294 select: { 7295 get: function get(elem) { 7296 var value, 7297 option, 7298 options = elem.options, 7299 index = elem.selectedIndex, 7300 one = elem.type === "select-one" || index < 0, 7301 values = one ? null : [], 7302 max = one ? index + 1 : options.length, 7303 i = index < 0 ? max : one ? index : 0; 7304 7305 // Loop through all the selected options 7306 for (; i < max; i++) { 7307 option = options[i]; 7308 7309 // IE6-9 doesn't update selected after form reset (#2551) 7310 if ((option.selected || i === index) && ( 7311 // Don't return options that are disabled or in a disabled optgroup 7312 support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && (!option.parentNode.disabled || !jQuery.nodeName(option.parentNode, "optgroup"))) { 7313 7314 // Get the specific value for the option 7315 value = jQuery(option).val(); 7316 7317 // We don't need an array for one selects 7318 if (one) { 7319 return value; 7320 } 7321 7322 // Multi-Selects return an array 7323 values.push(value); 7324 } 7325 } 7326 7327 return values; 7328 }, 7329 7330 set: function set(elem, value) { 7331 var optionSet, 7332 option, 7333 options = elem.options, 7334 values = jQuery.makeArray(value), 7335 i = options.length; 7336 7337 while (i--) { 7338 option = options[i]; 7339 if (option.selected = jQuery.inArray(option.value, values) >= 0) { 7340 optionSet = true; 7341 } 7342 } 7343 7344 // Force browsers to behave consistently when non-matching value is set 7345 if (!optionSet) { 7346 elem.selectedIndex = -1; 7347 } 7348 return values; 7349 } 7350 } 7351 } 7352 }); 7353 7354 // Radios and checkboxes getter/setter 7355 jQuery.each(["radio", "checkbox"], function () { 7356 jQuery.valHooks[this] = { 7357 set: function set(elem, value) { 7358 if (jQuery.isArray(value)) { 7359 return elem.checked = jQuery.inArray(jQuery(elem).val(), value) >= 0; 7360 } 7361 } 7362 }; 7363 if (!support.checkOn) { 7364 jQuery.valHooks[this].get = function (elem) { 7365 return elem.getAttribute("value") === null ? "on" : elem.value; 7366 }; 7367 } 7368 }); 7369 7370 // Return jQuery for attributes-only inclusion 7371 7372 jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup error contextmenu").split(" "), function (i, name) { 7373 7374 // Handle event binding 7375 jQuery.fn[name] = function (data, fn) { 7376 return arguments.length > 0 ? this.on(name, null, data, fn) : this.trigger(name); 7377 }; 7378 }); 7379 7380 jQuery.fn.extend({ 7381 hover: function hover(fnOver, fnOut) { 7382 return this.mouseenter(fnOver).mouseleave(fnOut || fnOver); 7383 }, 7384 7385 bind: function bind(types, data, fn) { 7386 return this.on(types, null, data, fn); 7387 }, 7388 unbind: function unbind(types, fn) { 7389 return this.off(types, null, fn); 7390 }, 7391 7392 delegate: function delegate(selector, types, data, fn) { 7393 return this.on(types, selector, data, fn); 7394 }, 7395 undelegate: function undelegate(selector, types, fn) { 7396 // ( namespace ) or ( selector, types [, fn] ) 7397 return arguments.length === 1 ? this.off(selector, "**") : this.off(types, selector || "**", fn); 7398 } 7399 }); 7400 7401 var nonce = jQuery.now(); 7402 7403 var rquery = /\?/; 7404 7405 // Support: Android 2.3 7406 // Workaround failure to string-cast null input 7407 jQuery.parseJSON = function (data) { 7408 return JSON.parse(data + ""); 7409 }; 7410 7411 // Cross-browser xml parsing 7412 jQuery.parseXML = function (data) { 7413 var xml, tmp; 7414 if (!data || typeof data !== "string") { 7415 return null; 7416 } 7417 7418 // Support: IE9 7419 try { 7420 tmp = new DOMParser(); 7421 xml = tmp.parseFromString(data, "text/xml"); 7422 } catch (e) { 7423 xml = undefined; 7424 } 7425 7426 if (!xml || xml.getElementsByTagName("parsererror").length) { 7427 jQuery.error("Invalid XML: " + data); 7428 } 7429 return xml; 7430 }; 7431 7432 var rhash = /#.*$/, 7433 rts = /([?&])_=[^&]*/, 7434 rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, 7435 7436 // #7653, #8125, #8152: local protocol detection 7437 rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, 7438 rnoContent = /^(?:GET|HEAD)$/, 7439 rprotocol = /^\/\//, 7440 rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/, 7441 7442 7443 /* Prefilters 7444 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) 7445 * 2) These are called: 7446 * - BEFORE asking for a transport 7447 * - AFTER param serialization (s.data is a string if s.processData is true) 7448 * 3) key is the dataType 7449 * 4) the catchall symbol "*" can be used 7450 * 5) execution will start with transport dataType and THEN continue down to "*" if needed 7451 */ 7452 prefilters = {}, 7453 7454 7455 /* Transports bindings 7456 * 1) key is the dataType 7457 * 2) the catchall symbol "*" can be used 7458 * 3) selection will start with transport dataType and THEN go to "*" if needed 7459 */ 7460 transports = {}, 7461 7462 7463 // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression 7464 allTypes = "*/".concat("*"), 7465 7466 7467 // Document location 7468 ajaxLocation = window.location.href, 7469 7470 7471 // Segment location into parts 7472 ajaxLocParts = rurl.exec(ajaxLocation.toLowerCase()) || []; 7473 7474 // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport 7475 function addToPrefiltersOrTransports(structure) { 7476 7477 // dataTypeExpression is optional and defaults to "*" 7478 return function (dataTypeExpression, func) { 7479 7480 if (typeof dataTypeExpression !== "string") { 7481 func = dataTypeExpression; 7482 dataTypeExpression = "*"; 7483 } 7484 7485 var dataType, 7486 i = 0, 7487 dataTypes = dataTypeExpression.toLowerCase().match(rnotwhite) || []; 7488 7489 if (jQuery.isFunction(func)) { 7490 // For each dataType in the dataTypeExpression 7491 while (dataType = dataTypes[i++]) { 7492 // Prepend if requested 7493 if (dataType[0] === "+") { 7494 dataType = dataType.slice(1) || "*"; 7495 (structure[dataType] = structure[dataType] || []).unshift(func); 7496 7497 // Otherwise append 7498 } else { 7499 (structure[dataType] = structure[dataType] || []).push(func); 7500 } 7501 } 7502 } 7503 }; 7504 } 7505 7506 // Base inspection function for prefilters and transports
vendor: 5,985 bytes, lines 7507-7732
7507 function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) { 7508 7509 var inspected = {}, 7510 seekingTransport = structure === transports; 7511 7512 function inspect(dataType) { 7513 var selected; 7514 inspected[dataType] = true; 7515 jQuery.each(structure[dataType] || [], function (_, prefilterOrFactory) { 7516 var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR); 7517 if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) { 7518 options.dataTypes.unshift(dataTypeOrTransport); 7519 inspect(dataTypeOrTransport); 7520 return false; 7521 } else if (seekingTransport) { 7522 return !(selected = dataTypeOrTransport); 7523 } 7524 }); 7525 return selected; 7526 } 7527 7528 return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*"); 7529 } 7530 7531 // A special extend for ajax options 7532 // that takes "flat" options (not to be deep extended) 7533 // Fixes #9887 7534 function ajaxExtend(target, src) { 7535 var key, 7536 deep, 7537 flatOptions = jQuery.ajaxSettings.flatOptions || {}; 7538 7539 for (key in src) { 7540 if (src[key] !== undefined) { 7541 (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key]; 7542 } 7543 } 7544 if (deep) { 7545 jQuery.extend(true, target, deep); 7546 } 7547 7548 return target; 7549 } 7550 7551 /* Handles responses to an ajax request: 7552 * - finds the right dataType (mediates between content-type and expected dataType) 7553 * - returns the corresponding response 7554 */ 7555 function ajaxHandleResponses(s, jqXHR, responses) { 7556 7557 var ct, 7558 type, 7559 finalDataType, 7560 firstDataType, 7561 contents = s.contents, 7562 dataTypes = s.dataTypes; 7563 7564 // Remove auto dataType and get content-type in the process 7565 while (dataTypes[0] === "*") { 7566 dataTypes.shift(); 7567 if (ct === undefined) { 7568 ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); 7569 } 7570 } 7571 7572 // Check if we're dealing with a known content-type 7573 if (ct) { 7574 for (type in contents) { 7575 if (contents[type] && contents[type].test(ct)) { 7576 dataTypes.unshift(type); 7577 break; 7578 } 7579 } 7580 } 7581 7582 // Check to see if we have a response for the expected dataType 7583 if (dataTypes[0] in responses) { 7584 finalDataType = dataTypes[0]; 7585 } else { 7586 // Try convertible dataTypes 7587 for (type in responses) { 7588 if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) { 7589 finalDataType = type; 7590 break; 7591 } 7592 if (!firstDataType) { 7593 firstDataType = type; 7594 } 7595 } 7596 // Or just use first one 7597 finalDataType = finalDataType || firstDataType; 7598 } 7599 7600 // If we found a dataType 7601 // We add the dataType to the list if needed 7602 // and return the corresponding response 7603 if (finalDataType) { 7604 if (finalDataType !== dataTypes[0]) { 7605 dataTypes.unshift(finalDataType); 7606 } 7607 return responses[finalDataType]; 7608 } 7609 } 7610 7611 /* Chain conversions given the request and the original response 7612 * Also sets the responseXXX fields on the jqXHR instance 7613 */ 7614 function ajaxConvert(s, response, jqXHR, isSuccess) { 7615 var conv2, 7616 current, 7617 conv, 7618 tmp, 7619 prev, 7620 converters = {}, 7621 7622 // Work with a copy of dataTypes in case we need to modify it for conversion 7623 dataTypes = s.dataTypes.slice(); 7624 7625 // Create converters map with lowercased keys 7626 if (dataTypes[1]) { 7627 for (conv in s.converters) { 7628 converters[conv.toLowerCase()] = s.converters[conv]; 7629 } 7630 } 7631 7632 current = dataTypes.shift(); 7633 7634 // Convert to each sequential dataType 7635 while (current) { 7636 7637 if (s.responseFields[current]) { 7638 jqXHR[s.responseFields[current]] = response; 7639 } 7640 7641 // Apply the dataFilter if provided 7642 if (!prev && isSuccess && s.dataFilter) { 7643 response = s.dataFilter(response, s.dataType); 7644 } 7645 7646 prev = current; 7647 current = dataTypes.shift(); 7648 7649 if (current) { 7650 7651 // There's only work to do if current dataType is non-auto 7652 if (current === "*") { 7653 7654 current = prev; 7655 7656 // Convert response if prev dataType is non-auto and differs from current 7657 } else if (prev !== "*" && prev !== current) { 7658 7659 // Seek a direct converter 7660 conv = converters[prev + " " + current] || converters["* " + current]; 7661 7662 // If none found, seek a pair 7663 if (!conv) { 7664 for (conv2 in converters) { 7665 7666 // If conv2 outputs current 7667 tmp = conv2.split(" "); 7668 if (tmp[1] === current) { 7669 7670 // If prev can be converted to accepted input 7671 conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]]; 7672 if (conv) { 7673 // Condense equivalence converters 7674 if (conv === true) { 7675 conv = converters[conv2]; 7676 7677 // Otherwise, insert the intermediate dataType 7678 } else if (converters[conv2] !== true) { 7679 current = tmp[0]; 7680 dataTypes.unshift(tmp[1]); 7681 } 7682 break; 7683 } 7684 } 7685 } 7686 } 7687 7688 // Apply converter (if not an equivalence) 7689 if (conv !== true) { 7690 7691 // Unless errors are allowed to bubble, catch and return them 7692 if (conv && s["throws"]) { 7693 response = conv(response); 7694 } else { 7695 try { 7696 response = conv(response); 7697 } catch (e) { 7698 return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; 7699 } 7700 } 7701 } 7702 } 7703 } 7704 } 7705 7706 return { state: "success", data: response }; 7707 } 7708 7709 jQuery.extend({ 7710 7711 // Counter for holding the number of active queries 7712 active: 0, 7713 7714 // Last-Modified header cache for next request 7715 lastModified: {}, 7716 etag: {}, 7717 7718 ajaxSettings: { 7719 url: ajaxLocation, 7720 type: "GET", 7721 isLocal: rlocalProtocol.test(ajaxLocParts[1]), 7722 global: true, 7723 processData: true, 7724 async: true, 7725 contentType: "application/x-www-form-urlencoded; charset=UTF-8", 7726 /* 7727 timeout: 0, 7728 data: null, 7729 dataType: null, 7730 username: null, 7731 password: null, 7732 cache: null,
vendor: 36,330 bytes, lines 7733-8995
7733 throws: false, 7734 traditional: false, 7735 headers: {}, 7736 */ 7737 7738 accepts: { 7739 "*": allTypes, 7740 text: "text/plain", 7741 html: "text/html", 7742 xml: "application/xml, text/xml", 7743 json: "application/json, text/javascript" 7744 }, 7745 7746 contents: { 7747 xml: /xml/, 7748 html: /html/, 7749 json: /json/ 7750 }, 7751 7752 responseFields: { 7753 xml: "responseXML", 7754 text: "responseText", 7755 json: "responseJSON" 7756 }, 7757 7758 // Data converters 7759 // Keys separate source (or catchall "*") and destination types with a single space 7760 converters: { 7761 7762 // Convert anything to text 7763 "* text": String, 7764 7765 // Text to html (true = no transformation) 7766 "text html": true, 7767 7768 // Evaluate text as a json expression 7769 "text json": jQuery.parseJSON, 7770 7771 // Parse text as xml 7772 "text xml": jQuery.parseXML 7773 }, 7774 7775 // For options that shouldn't be deep extended: 7776 // you can add your own custom options here if 7777 // and when you create one that shouldn't be 7778 // deep extended (see ajaxExtend) 7779 flatOptions: { 7780 url: true, 7781 context: true 7782 } 7783 }, 7784 7785 // Creates a full fledged settings object into target 7786 // with both ajaxSettings and settings fields. 7787 // If target is omitted, writes into ajaxSettings. 7788 ajaxSetup: function ajaxSetup(target, settings) { 7789 return settings ? 7790 7791 // Building a settings object 7792 ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) : 7793 7794 // Extending ajaxSettings 7795 ajaxExtend(jQuery.ajaxSettings, target); 7796 }, 7797 7798 ajaxPrefilter: addToPrefiltersOrTransports(prefilters), 7799 ajaxTransport: addToPrefiltersOrTransports(transports), 7800 7801 // Main method 7802 ajax: function ajax(url, options) { 7803 7804 // If url is an object, simulate pre-1.5 signature 7805 if ((typeof url === "undefined" ? "undefined" : (0, _typeof3.default)(url)) === "object") { 7806 options = url; 7807 url = undefined; 7808 } 7809 7810 // Force options to be an object 7811 options = options || {}; 7812 7813 var transport, 7814 7815 // URL without anti-cache param 7816 cacheURL, 7817 7818 // Response headers 7819 responseHeadersString, 7820 responseHeaders, 7821 7822 // timeout handle 7823 timeoutTimer, 7824 7825 // Cross-domain detection vars 7826 parts, 7827 7828 // To know if global events are to be dispatched 7829 fireGlobals, 7830 7831 // Loop variable 7832 i, 7833 7834 // Create the final options object 7835 s = jQuery.ajaxSetup({}, options), 7836 7837 // Callbacks context 7838 callbackContext = s.context || s, 7839 7840 // Context for global events is callbackContext if it is a DOM node or jQuery collection 7841 globalEventContext = s.context && (callbackContext.nodeType || callbackContext.jquery) ? jQuery(callbackContext) : jQuery.event, 7842 7843 // Deferreds 7844 deferred = jQuery.Deferred(), 7845 completeDeferred = jQuery.Callbacks("once memory"), 7846 7847 // Status-dependent callbacks 7848 _statusCode = s.statusCode || {}, 7849 7850 // Headers (they are sent all at once) 7851 requestHeaders = {}, 7852 requestHeadersNames = {}, 7853 7854 // The jqXHR state 7855 state = 0, 7856 7857 // Default abort message 7858 strAbort = "canceled", 7859 7860 // Fake xhr 7861 jqXHR = { 7862 readyState: 0, 7863 7864 // Builds headers hashtable if needed 7865 getResponseHeader: function getResponseHeader(key) { 7866 var match; 7867 if (state === 2) { 7868 if (!responseHeaders) { 7869 responseHeaders = {}; 7870 while (match = rheaders.exec(responseHeadersString)) { 7871 responseHeaders[match[1].toLowerCase()] = match[2]; 7872 } 7873 } 7874 match = responseHeaders[key.toLowerCase()]; 7875 } 7876 return match == null ? null : match; 7877 }, 7878 7879 // Raw string 7880 getAllResponseHeaders: function getAllResponseHeaders() { 7881 return state === 2 ? responseHeadersString : null; 7882 }, 7883 7884 // Caches the header 7885 setRequestHeader: function setRequestHeader(name, value) { 7886 var lname = name.toLowerCase(); 7887 if (!state) { 7888 name = requestHeadersNames[lname] = requestHeadersNames[lname] || name; 7889 requestHeaders[name] = value; 7890 } 7891 return this; 7892 }, 7893 7894 // Overrides response content-type header 7895 overrideMimeType: function overrideMimeType(type) { 7896 if (!state) { 7897 s.mimeType = type; 7898 } 7899 return this; 7900 }, 7901 7902 // Status-dependent callbacks 7903 statusCode: function statusCode(map) { 7904 var code; 7905 if (map) { 7906 if (state < 2) { 7907 for (code in map) { 7908 // Lazy-add the new callback in a way that preserves old ones 7909 _statusCode[code] = [_statusCode[code], map[code]]; 7910 } 7911 } else { 7912 // Execute the appropriate callbacks 7913 jqXHR.always(map[jqXHR.status]); 7914 } 7915 } 7916 return this; 7917 }, 7918 7919 // Cancel the request 7920 abort: function abort(statusText) { 7921 var finalText = statusText || strAbort; 7922 if (transport) { 7923 transport.abort(finalText); 7924 } 7925 done(0, finalText); 7926 return this; 7927 } 7928 }; 7929 7930 // Attach deferreds 7931 deferred.promise(jqXHR).complete = completeDeferred.add; 7932 jqXHR.success = jqXHR.done; 7933 jqXHR.error = jqXHR.fail; 7934 7935 // Remove hash character (#7531: and string promotion) 7936 // Add protocol if not provided (prefilters might expect it) 7937 // Handle falsy url in the settings object (#10093: consistency with old signature) 7938 // We also use the url parameter if available 7939 s.url = ((url || s.url || ajaxLocation) + "").replace(rhash, "").replace(rprotocol, ajaxLocParts[1] + "//"); 7940 7941 // Alias method option to type as per ticket #12004 7942 s.type = options.method || options.type || s.method || s.type; 7943 7944 // Extract dataTypes list 7945 s.dataTypes = jQuery.trim(s.dataType || "*").toLowerCase().match(rnotwhite) || [""]; 7946 7947 // A cross-domain request is in order when we have a protocol:host:port mismatch 7948 if (s.crossDomain == null) { 7949 parts = rurl.exec(s.url.toLowerCase()); 7950 s.crossDomain = !!(parts && (parts[1] !== ajaxLocParts[1] || parts[2] !== ajaxLocParts[2] || (parts[3] || (parts[1] === "http:" ? "80" : "443")) !== (ajaxLocParts[3] || (ajaxLocParts[1] === "http:" ? "80" : "443")))); 7951 } 7952 7953 // Convert data if not already a string 7954 if (s.data && s.processData && typeof s.data !== "string") { 7955 s.data = jQuery.param(s.data, s.traditional); 7956 } 7957 7958 // Apply prefilters 7959 inspectPrefiltersOrTransports(prefilters, s, options, jqXHR); 7960 7961 // If request was aborted inside a prefilter, stop there 7962 if (state === 2) { 7963 return jqXHR; 7964 } 7965 7966 // We can fire global events as of now if asked to 7967 // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) 7968 fireGlobals = jQuery.event && s.global; 7969 7970 // Watch for a new set of requests 7971 if (fireGlobals && jQuery.active++ === 0) { 7972 jQuery.event.trigger("ajaxStart"); 7973 } 7974 7975 // Uppercase the type 7976 s.type = s.type.toUpperCase(); 7977 7978 // Determine if request has content 7979 s.hasContent = !rnoContent.test(s.type); 7980 7981 // Save the URL in case we're toying with the If-Modified-Since 7982 // and/or If-None-Match header later on 7983 cacheURL = s.url; 7984 7985 // More options handling for requests with no content 7986 if (!s.hasContent) { 7987 7988 // If data is available, append data to url 7989 if (s.data) { 7990 cacheURL = s.url += (rquery.test(cacheURL) ? "&" : "?") + s.data; 7991 // #9682: remove data so that it's not used in an eventual retry 7992 delete s.data; 7993 } 7994 7995 // Add anti-cache in url if needed 7996 if (s.cache === false) { 7997 s.url = rts.test(cacheURL) ? 7998 7999 // If there is already a '_' parameter, set its value 8000 cacheURL.replace(rts, "$1_=" + nonce++) : 8001 8002 // Otherwise add one to the end 8003 cacheURL + (rquery.test(cacheURL) ? "&" : "?") + "_=" + nonce++; 8004 } 8005 } 8006 8007 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 8008 if (s.ifModified) { 8009 if (jQuery.lastModified[cacheURL]) { 8010 jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]); 8011 } 8012 if (jQuery.etag[cacheURL]) { 8013 jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL]); 8014 } 8015 } 8016 8017 // Set the correct header, if data is being sent 8018 if (s.data && s.hasContent && s.contentType !== false || options.contentType) { 8019 jqXHR.setRequestHeader("Content-Type", s.contentType); 8020 } 8021 8022 // Set the Accepts header for the server, depending on the dataType 8023 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["*"]); 8024 8025 // Check for headers option 8026 for (i in s.headers) { 8027 jqXHR.setRequestHeader(i, s.headers[i]); 8028 } 8029 8030 // Allow custom headers/mimetypes and early abort 8031 if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || state === 2)) { 8032 // Abort if not done already and return 8033 return jqXHR.abort(); 8034 } 8035 8036 // Aborting is no longer a cancellation 8037 strAbort = "abort"; 8038 8039 // Install callbacks on deferreds 8040 for (i in { success: 1, error: 1, complete: 1 }) { 8041 jqXHR[i](s[i]); 8042 } 8043 8044 // Get transport 8045 transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR); 8046 8047 // If no transport, we auto-abort 8048 if (!transport) { 8049 done(-1, "No Transport"); 8050 } else { 8051 jqXHR.readyState = 1; 8052 8053 // Send global event 8054 if (fireGlobals) { 8055 globalEventContext.trigger("ajaxSend", [jqXHR, s]); 8056 } 8057 // Timeout 8058 if (s.async && s.timeout > 0) { 8059 timeoutTimer = setTimeout(function () { 8060 jqXHR.abort("timeout"); 8061 }, s.timeout); 8062 } 8063 8064 try { 8065 state = 1; 8066 transport.send(requestHeaders, done); 8067 } catch (e) { 8068 // Propagate exception as error if not done 8069 if (state < 2) { 8070 done(-1, e); 8071 // Simply rethrow otherwise 8072 } else { 8073 throw e; 8074 } 8075 } 8076 } 8077 8078 // Callback for when everything is done 8079 function done(status, nativeStatusText, responses, headers) { 8080 var isSuccess, 8081 success, 8082 error, 8083 response, 8084 modified, 8085 statusText = nativeStatusText; 8086 8087 // Called once 8088 if (state === 2) { 8089 return; 8090 } 8091 8092 // State is "done" now 8093 state = 2; 8094 8095 // Clear timeout if it exists 8096 if (timeoutTimer) { 8097 clearTimeout(timeoutTimer); 8098 } 8099 8100 // Dereference transport for early garbage collection 8101 // (no matter how long the jqXHR object will be used) 8102 transport = undefined; 8103 8104 // Cache response headers 8105 responseHeadersString = headers || ""; 8106 8107 // Set readyState 8108 jqXHR.readyState = status > 0 ? 4 : 0; 8109 8110 // Determine if successful 8111 isSuccess = status >= 200 && status < 300 || status === 304; 8112 8113 // Get response data 8114 if (responses) { 8115 response = ajaxHandleResponses(s, jqXHR, responses); 8116 } 8117 8118 // Convert no matter what (that way responseXXX fields are always set) 8119 response = ajaxConvert(s, response, jqXHR, isSuccess); 8120 8121 // If successful, handle type chaining 8122 if (isSuccess) { 8123 8124 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 8125 if (s.ifModified) { 8126 modified = jqXHR.getResponseHeader("Last-Modified"); 8127 if (modified) { 8128 jQuery.lastModified[cacheURL] = modified; 8129 } 8130 modified = jqXHR.getResponseHeader("etag"); 8131 if (modified) { 8132 jQuery.etag[cacheURL] = modified; 8133 } 8134 } 8135 8136 // if no content 8137 if (status === 204 || s.type === "HEAD") { 8138 statusText = "nocontent"; 8139 8140 // if not modified 8141 } else if (status === 304) { 8142 statusText = "notmodified"; 8143 8144 // If we have data, let's convert it 8145 } else { 8146 statusText = response.state; 8147 success = response.data; 8148 error = response.error; 8149 isSuccess = !error; 8150 } 8151 } else { 8152 // Extract error from statusText and normalize for non-aborts 8153 error = statusText; 8154 if (status || !statusText) { 8155 statusText = "error"; 8156 if (status < 0) { 8157 status = 0; 8158 } 8159 } 8160 } 8161 8162 // Set data for the fake xhr object 8163 jqXHR.status = status; 8164 jqXHR.statusText = (nativeStatusText || statusText) + ""; 8165 8166 // Success/Error 8167 if (isSuccess) { 8168 deferred.resolveWith(callbackContext, [success, statusText, jqXHR]); 8169 } else { 8170 deferred.rejectWith(callbackContext, [jqXHR, statusText, error]); 8171 } 8172 8173 // Status-dependent callbacks 8174 jqXHR.statusCode(_statusCode); 8175 _statusCode = undefined; 8176 8177 if (fireGlobals) { 8178 globalEventContext.trigger(isSuccess ? "ajaxSuccess" : "ajaxError", [jqXHR, s, isSuccess ? success : error]); 8179 } 8180 8181 // Complete 8182 completeDeferred.fireWith(callbackContext, [jqXHR, statusText]); 8183 8184 if (fireGlobals) { 8185 globalEventContext.trigger("ajaxComplete", [jqXHR, s]); 8186 // Handle the global AJAX counter 8187 if (! --jQuery.active) { 8188 jQuery.event.trigger("ajaxStop"); 8189 } 8190 } 8191 } 8192 8193 return jqXHR; 8194 }, 8195 8196 getJSON: function getJSON(url, data, callback) { 8197 return jQuery.get(url, data, callback, "json"); 8198 }, 8199 8200 getScript: function getScript(url, callback) { 8201 return jQuery.get(url, undefined, callback, "script"); 8202 } 8203 }); 8204 8205 jQuery.each(["get", "post"], function (i, method) { 8206 jQuery[method] = function (url, data, callback, type) { 8207 // Shift arguments if data argument was omitted 8208 if (jQuery.isFunction(data)) { 8209 type = type || callback; 8210 callback = data; 8211 data = undefined; 8212 } 8213 8214 return jQuery.ajax({ 8215 url: url, 8216 type: method, 8217 dataType: type, 8218 data: data, 8219 success: callback 8220 }); 8221 }; 8222 }); 8223 8224 jQuery._evalUrl = function (url) { 8225 return jQuery.ajax({ 8226 url: url, 8227 type: "GET", 8228 dataType: "script", 8229 async: false, 8230 global: false, 8231 "throws": true 8232 }); 8233 }; 8234 8235 jQuery.fn.extend({ 8236 wrapAll: function wrapAll(html) { 8237 var wrap; 8238 8239 if (jQuery.isFunction(html)) { 8240 return this.each(function (i) { 8241 jQuery(this).wrapAll(html.call(this, i)); 8242 }); 8243 } 8244 8245 if (this[0]) { 8246 8247 // The elements to wrap the target around 8248 wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true); 8249 8250 if (this[0].parentNode) { 8251 wrap.insertBefore(this[0]); 8252 } 8253 8254 wrap.map(function () { 8255 var elem = this; 8256 8257 while (elem.firstElementChild) { 8258 elem = elem.firstElementChild; 8259 } 8260 8261 return elem; 8262 }).append(this); 8263 } 8264 8265 return this; 8266 }, 8267 8268 wrapInner: function wrapInner(html) { 8269 if (jQuery.isFunction(html)) { 8270 return this.each(function (i) { 8271 jQuery(this).wrapInner(html.call(this, i)); 8272 }); 8273 } 8274 8275 return this.each(function () { 8276 var self = jQuery(this), 8277 contents = self.contents(); 8278 8279 if (contents.length) { 8280 contents.wrapAll(html); 8281 } else { 8282 self.append(html); 8283 } 8284 }); 8285 }, 8286 8287 wrap: function wrap(html) { 8288 var isFunction = jQuery.isFunction(html); 8289 8290 return this.each(function (i) { 8291 jQuery(this).wrapAll(isFunction ? html.call(this, i) : html); 8292 }); 8293 }, 8294 8295 unwrap: function unwrap() { 8296 return this.parent().each(function () { 8297 if (!jQuery.nodeName(this, "body")) { 8298 jQuery(this).replaceWith(this.childNodes); 8299 } 8300 }).end(); 8301 } 8302 }); 8303 8304 jQuery.expr.filters.hidden = function (elem) { 8305 // Support: Opera <= 12.12 8306 // Opera reports offsetWidths and offsetHeights less than zero on some elements 8307 return elem.offsetWidth <= 0 && elem.offsetHeight <= 0; 8308 }; 8309 jQuery.expr.filters.visible = function (elem) { 8310 return !jQuery.expr.filters.hidden(elem); 8311 }; 8312 8313 var r20 = /%20/g, 8314 rbracket = /\[\]$/, 8315 rCRLF = /\r?\n/g, 8316 rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, 8317 rsubmittable = /^(?:input|select|textarea|keygen)/i; 8318 8319 function buildParams(prefix, obj, traditional, add) { 8320 var name; 8321 8322 if (jQuery.isArray(obj)) { 8323 // Serialize array item. 8324 jQuery.each(obj, function (i, v) { 8325 if (traditional || rbracket.test(prefix)) { 8326 // Treat each array item as a scalar. 8327 add(prefix, v); 8328 } else { 8329 // Item is non-scalar (array or object), encode its numeric index. 8330 buildParams(prefix + "[" + ((typeof v === "undefined" ? "undefined" : (0, _typeof3.default)(v)) === "object" ? i : "") + "]", v, traditional, add); 8331 } 8332 }); 8333 } else if (!traditional && jQuery.type(obj) === "object") { 8334 // Serialize object item. 8335 for (name in obj) { 8336 buildParams(prefix + "[" + name + "]", obj[name], traditional, add); 8337 } 8338 } else { 8339 // Serialize scalar item. 8340 add(prefix, obj); 8341 } 8342 } 8343 8344 // Serialize an array of form elements or a set of 8345 // key/values into a query string 8346 jQuery.param = function (a, traditional) { 8347 var prefix, 8348 s = [], 8349 add = function add(key, value) { 8350 // If value is a function, invoke it and return its value 8351 value = jQuery.isFunction(value) ? value() : value == null ? "" : value; 8352 s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value); 8353 }; 8354 8355 // Set traditional to true for jQuery <= 1.3.2 behavior. 8356 if (traditional === undefined) { 8357 traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; 8358 } 8359 8360 // If an array was passed in, assume that it is an array of form elements. 8361 if (jQuery.isArray(a) || a.jquery && !jQuery.isPlainObject(a)) { 8362 // Serialize the form elements 8363 jQuery.each(a, function () { 8364 add(this.name, this.value); 8365 }); 8366 } else { 8367 // If traditional, encode the "old" way (the way 1.3.2 or older 8368 // did it), otherwise encode params recursively. 8369 for (prefix in a) { 8370 buildParams(prefix, a[prefix], traditional, add); 8371 } 8372 } 8373 8374 // Return the resulting serialization 8375 return s.join("&").replace(r20, "+"); 8376 }; 8377 8378 jQuery.fn.extend({ 8379 serialize: function serialize() { 8380 return jQuery.param(this.serializeArray()); 8381 }, 8382 serializeArray: function serializeArray() { 8383 return this.map(function () { 8384 // Can add propHook for "elements" to filter or add form elements 8385 var elements = jQuery.prop(this, "elements"); 8386 return elements ? jQuery.makeArray(elements) : this; 8387 }).filter(function () { 8388 var type = this.type; 8389 8390 // Use .is( ":disabled" ) so that fieldset[disabled] works 8391 return this.name && !jQuery(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !rcheckableType.test(type)); 8392 }).map(function (i, elem) { 8393 var val = jQuery(this).val(); 8394 8395 return val == null ? null : jQuery.isArray(val) ? jQuery.map(val, function (val) { 8396 return { name: elem.name, value: val.replace(rCRLF, "\r\n") }; 8397 }) : { name: elem.name, value: val.replace(rCRLF, "\r\n") }; 8398 }).get(); 8399 } 8400 }); 8401 8402 jQuery.ajaxSettings.xhr = function () { 8403 try { 8404 return new XMLHttpRequest(); 8405 } catch (e) {} 8406 }; 8407 8408 var xhrId = 0, 8409 xhrCallbacks = {}, 8410 xhrSuccessStatus = { 8411 // file protocol always yields status code 0, assume 200 8412 0: 200, 8413 // Support: IE9 8414 // #1450: sometimes IE returns 1223 when it should be 204 8415 1223: 204 8416 }, 8417 xhrSupported = jQuery.ajaxSettings.xhr(); 8418 8419 // Support: IE9 8420 // Open requests must be manually aborted on unload (#5280) 8421 // See https://support.microsoft.com/kb/2856746 for more info 8422 if (window.attachEvent) { 8423 window.attachEvent("onunload", function () { 8424 for (var key in xhrCallbacks) { 8425 xhrCallbacks[key](); 8426 } 8427 }); 8428 } 8429 8430 support.cors = !!xhrSupported && "withCredentials" in xhrSupported; 8431 support.ajax = xhrSupported = !!xhrSupported; 8432 8433 jQuery.ajaxTransport(function (options) { 8434 var _callback; 8435 8436 // Cross domain only allowed if supported through XMLHttpRequest 8437 if (support.cors || xhrSupported && !options.crossDomain) { 8438 return { 8439 send: function send(headers, complete) { 8440 var i, 8441 xhr = options.xhr(), 8442 id = ++xhrId; 8443 8444 xhr.open(options.type, options.url, options.async, options.username, options.password); 8445 8446 // Apply custom fields if provided 8447 if (options.xhrFields) { 8448 for (i in options.xhrFields) { 8449 xhr[i] = options.xhrFields[i]; 8450 } 8451 } 8452 8453 // Override mime type if needed 8454 if (options.mimeType && xhr.overrideMimeType) { 8455 xhr.overrideMimeType(options.mimeType); 8456 } 8457 8458 // X-Requested-With header 8459 // For cross-domain requests, seeing as conditions for a preflight are 8460 // akin to a jigsaw puzzle, we simply never set it to be sure. 8461 // (it can always be set on a per-request basis or even using ajaxSetup) 8462 // For same-domain requests, won't change header if already provided. 8463 if (!options.crossDomain && !headers["X-Requested-With"]) { 8464 headers["X-Requested-With"] = "XMLHttpRequest"; 8465 } 8466 8467 // Set headers 8468 for (i in headers) { 8469 xhr.setRequestHeader(i, headers[i]); 8470 } 8471 8472 // Callback 8473 _callback = function callback(type) { 8474 return function () { 8475 if (_callback) { 8476 delete xhrCallbacks[id]; 8477 _callback = xhr.onload = xhr.onerror = null; 8478 8479 if (type === "abort") { 8480 xhr.abort(); 8481 } else if (type === "error") { 8482 complete( 8483 // file: protocol always yields status 0; see #8605, #14207 8484 xhr.status, xhr.statusText); 8485 } else { 8486 complete(xhrSuccessStatus[xhr.status] || xhr.status, xhr.statusText, 8487 // Support: IE9 8488 // Accessing binary-data responseText throws an exception 8489 // (#11426) 8490 typeof xhr.responseText === "string" ? { 8491 text: xhr.responseText 8492 } : undefined, xhr.getAllResponseHeaders()); 8493 } 8494 } 8495 }; 8496 }; 8497 8498 // Listen to events 8499 xhr.onload = _callback(); 8500 xhr.onerror = _callback("error"); 8501 8502 // Create the abort callback 8503 _callback = xhrCallbacks[id] = _callback("abort"); 8504 8505 try { 8506 // Do send the request (this may raise an exception) 8507 xhr.send(options.hasContent && options.data || null); 8508 } catch (e) { 8509 // #14683: Only rethrow if this hasn't been notified as an error yet 8510 if (_callback) { 8511 throw e; 8512 } 8513 } 8514 }, 8515 8516 abort: function abort() { 8517 if (_callback) { 8518 _callback(); 8519 } 8520 } 8521 }; 8522 } 8523 }); 8524 8525 // Install script dataType 8526 jQuery.ajaxSetup({ 8527 accepts: { 8528 script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" 8529 }, 8530 contents: { 8531 script: /(?:java|ecma)script/ 8532 }, 8533 converters: { 8534 "text script": function textScript(text) { 8535 jQuery.globalEval(text); 8536 return text; 8537 } 8538 } 8539 }); 8540 8541 // Handle cache's special case and crossDomain 8542 jQuery.ajaxPrefilter("script", function (s) { 8543 if (s.cache === undefined) { 8544 s.cache = false; 8545 } 8546 if (s.crossDomain) { 8547 s.type = "GET"; 8548 } 8549 }); 8550 8551 // Bind script tag hack transport 8552 jQuery.ajaxTransport("script", function (s) { 8553 // This transport only deals with cross domain requests 8554 if (s.crossDomain) { 8555 var script, _callback2; 8556 return { 8557 send: function send(_, complete) { 8558 script = jQuery("<script>").prop({ 8559 async: true, 8560 charset: s.scriptCharset, 8561 src: s.url 8562 }).on("load error", _callback2 = function callback(evt) { 8563 script.remove(); 8564 _callback2 = null; 8565 if (evt) { 8566 complete(evt.type === "error" ? 404 : 200, evt.type); 8567 } 8568 }); 8569 document.head.appendChild(script[0]); 8570 }, 8571 abort: function abort() { 8572 if (_callback2) { 8573 _callback2(); 8574 } 8575 } 8576 }; 8577 } 8578 }); 8579 8580 var oldCallbacks = [], 8581 rjsonp = /(=)\?(?=&|$)|\?\?/; 8582 8583 // Default jsonp settings 8584 jQuery.ajaxSetup({ 8585 jsonp: "callback", 8586 jsonpCallback: function jsonpCallback() { 8587 var callback = oldCallbacks.pop() || jQuery.expando + "_" + nonce++; 8588 this[callback] = true; 8589 return callback; 8590 } 8591 }); 8592 8593 // Detect, normalize options and install callbacks for jsonp requests 8594 jQuery.ajaxPrefilter("json jsonp", function (s, originalSettings, jqXHR) { 8595 8596 var callbackName, 8597 overwritten, 8598 responseContainer, 8599 jsonProp = s.jsonp !== false && (rjsonp.test(s.url) ? "url" : typeof s.data === "string" && !(s.contentType || "").indexOf("application/x-www-form-urlencoded") && rjsonp.test(s.data) && "data"); 8600 8601 // Handle iff the expected data type is "jsonp" or we have a parameter to set 8602 if (jsonProp || s.dataTypes[0] === "jsonp") { 8603 8604 // Get callback name, remembering preexisting value associated with it 8605 callbackName = s.jsonpCallback = jQuery.isFunction(s.jsonpCallback) ? s.jsonpCallback() : s.jsonpCallback; 8606 8607 // Insert callback into url or form data 8608 if (jsonProp) { 8609 s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName); 8610 } else if (s.jsonp !== false) { 8611 s.url += (rquery.test(s.url) ? "&" : "?") + s.jsonp + "=" + callbackName; 8612 } 8613 8614 // Use data converter to retrieve json after script execution 8615 s.converters["script json"] = function () { 8616 if (!responseContainer) { 8617 jQuery.error(callbackName + " was not called"); 8618 } 8619 return responseContainer[0]; 8620 }; 8621 8622 // force json dataType 8623 s.dataTypes[0] = "json"; 8624 8625 // Install callback 8626 overwritten = window[callbackName]; 8627 window[callbackName] = function () { 8628 responseContainer = arguments; 8629 }; 8630 8631 // Clean-up function (fires after converters) 8632 jqXHR.always(function () { 8633 // Restore preexisting value 8634 window[callbackName] = overwritten; 8635 8636 // Save back as free 8637 if (s[callbackName]) { 8638 // make sure that re-using the options doesn't screw things around 8639 s.jsonpCallback = originalSettings.jsonpCallback; 8640 8641 // save the callback name for future use 8642 oldCallbacks.push(callbackName); 8643 } 8644 8645 // Call if it was a function and we have a response 8646 if (responseContainer && jQuery.isFunction(overwritten)) { 8647 overwritten(responseContainer[0]); 8648 } 8649 8650 responseContainer = overwritten = undefined; 8651 }); 8652 8653 // Delegate to script 8654 return "script"; 8655 } 8656 }); 8657 8658 // data: string of html 8659 // context (optional): If specified, the fragment will be created in this context, defaults to document 8660 // keepScripts (optional): If true, will include scripts passed in the html string 8661 jQuery.parseHTML = function (data, context, keepScripts) { 8662 if (!data || typeof data !== "string") { 8663 return null; 8664 } 8665 if (typeof context === "boolean") { 8666 keepScripts = context; 8667 context = false; 8668 } 8669 context = context || document; 8670 8671 var parsed = rsingleTag.exec(data), 8672 scripts = !keepScripts && []; 8673 8674 // Single tag 8675 if (parsed) { 8676 return [context.createElement(parsed[1])]; 8677 } 8678 8679 parsed = jQuery.buildFragment([data], context, scripts); 8680 8681 if (scripts && scripts.length) { 8682 jQuery(scripts).remove(); 8683 } 8684 8685 return jQuery.merge([], parsed.childNodes); 8686 }; 8687 8688 // Keep a copy of the old load method 8689 var _load = jQuery.fn.load; 8690 8691 /** 8692 * Load a url into a page 8693 */ 8694 jQuery.fn.load = function (url, params, callback) { 8695 if (typeof url !== "string" && _load) { 8696 return _load.apply(this, arguments); 8697 } 8698 8699 var selector, 8700 type, 8701 response, 8702 self = this, 8703 off = url.indexOf(" "); 8704 8705 if (off >= 0) { 8706 selector = jQuery.trim(url.slice(off)); 8707 url = url.slice(0, off); 8708 } 8709 8710 // If it's a function 8711 if (jQuery.isFunction(params)) { 8712 8713 // We assume that it's the callback 8714 callback = params; 8715 params = undefined; 8716 8717 // Otherwise, build a param string 8718 } else if (params && (typeof params === "undefined" ? "undefined" : (0, _typeof3.default)(params)) === "object") { 8719 type = "POST"; 8720 } 8721 8722 // If we have elements to modify, make the request 8723 if (self.length > 0) { 8724 jQuery.ajax({ 8725 url: url, 8726 8727 // if "type" variable is undefined, then "GET" method will be used 8728 type: type, 8729 dataType: "html", 8730 data: params 8731 }).done(function (responseText) { 8732 8733 // Save response for use in complete callback 8734 response = arguments; 8735 8736 self.html(selector ? 8737 8738 // If a selector was specified, locate the right elements in a dummy div 8739 // Exclude scripts to avoid IE 'Permission Denied' errors 8740 jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector) : 8741 8742 // Otherwise use the full result 8743 responseText); 8744 }).complete(callback && function (jqXHR, status) { 8745 self.each(callback, response || [jqXHR.responseText, status, jqXHR]); 8746 }); 8747 } 8748 8749 return this; 8750 }; 8751 8752 // Attach a bunch of functions for handling common AJAX events 8753 jQuery.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (i, type) { 8754 jQuery.fn[type] = function (fn) { 8755 return this.on(type, fn); 8756 }; 8757 }); 8758 8759 jQuery.expr.filters.animated = function (elem) { 8760 return jQuery.grep(jQuery.timers, function (fn) { 8761 return elem === fn.elem; 8762 }).length; 8763 }; 8764 8765 var docElem = window.document.documentElement; 8766 8767 /** 8768 * Gets a window from an element 8769 */ 8770 function getWindow(elem) { 8771 return jQuery.isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView; 8772 } 8773 8774 jQuery.offset = { 8775 setOffset: function setOffset(elem, options, i) { 8776 var curPosition, 8777 curLeft, 8778 curCSSTop, 8779 curTop, 8780 curOffset, 8781 curCSSLeft, 8782 calculatePosition, 8783 position = jQuery.css(elem, "position"), 8784 curElem = jQuery(elem), 8785 props = {}; 8786 8787 // Set position first, in-case top/left are set even on static elem 8788 if (position === "static") { 8789 elem.style.position = "relative"; 8790 } 8791 8792 curOffset = curElem.offset(); 8793 curCSSTop = jQuery.css(elem, "top"); 8794 curCSSLeft = jQuery.css(elem, "left"); 8795 calculatePosition = (position === "absolute" || position === "fixed") && (curCSSTop + curCSSLeft).indexOf("auto") > -1; 8796 8797 // Need to be able to calculate position if either 8798 // top or left is auto and position is either absolute or fixed 8799 if (calculatePosition) { 8800 curPosition = curElem.position(); 8801 curTop = curPosition.top; 8802 curLeft = curPosition.left; 8803 } else { 8804 curTop = parseFloat(curCSSTop) || 0; 8805 curLeft = parseFloat(curCSSLeft) || 0; 8806 } 8807 8808 if (jQuery.isFunction(options)) { 8809 options = options.call(elem, i, curOffset); 8810 } 8811 8812 if (options.top != null) { 8813 props.top = options.top - curOffset.top + curTop; 8814 } 8815 if (options.left != null) { 8816 props.left = options.left - curOffset.left + curLeft; 8817 } 8818 8819 if ("using" in options) { 8820 options.using.call(elem, props); 8821 } else { 8822 curElem.css(props); 8823 } 8824 } 8825 }; 8826 8827 jQuery.fn.extend({ 8828 offset: function offset(options) { 8829 if (arguments.length) { 8830 return options === undefined ? this : this.each(function (i) { 8831 jQuery.offset.setOffset(this, options, i); 8832 }); 8833 } 8834 8835 var docElem, 8836 win, 8837 elem = this[0], 8838 box = { top: 0, left: 0 }, 8839 doc = elem && elem.ownerDocument; 8840 8841 if (!doc) { 8842 return; 8843 } 8844 8845 docElem = doc.documentElement; 8846 8847 // Make sure it's not a disconnected DOM node 8848 if (!jQuery.contains(docElem, elem)) { 8849 return box; 8850 } 8851 8852 // Support: BlackBerry 5, iOS 3 (original iPhone) 8853 // If we don't have gBCR, just use 0,0 rather than error 8854 if ((0, _typeof3.default)(elem.getBoundingClientRect) !== strundefined) { 8855 box = elem.getBoundingClientRect(); 8856 } 8857 win = getWindow(doc); 8858 return { 8859 top: box.top + win.pageYOffset - docElem.clientTop, 8860 left: box.left + win.pageXOffset - docElem.clientLeft 8861 }; 8862 }, 8863 8864 position: function position() { 8865 if (!this[0]) { 8866 return; 8867 } 8868 8869 var offsetParent, 8870 offset, 8871 elem = this[0], 8872 parentOffset = { top: 0, left: 0 }; 8873 8874 // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent 8875 if (jQuery.css(elem, "position") === "fixed") { 8876 // Assume getBoundingClientRect is there when computed position is fixed 8877 offset = elem.getBoundingClientRect(); 8878 } else { 8879 // Get *real* offsetParent 8880 offsetParent = this.offsetParent(); 8881 8882 // Get correct offsets 8883 offset = this.offset(); 8884 if (!jQuery.nodeName(offsetParent[0], "html")) { 8885 parentOffset = offsetParent.offset(); 8886 } 8887 8888 // Add offsetParent borders 8889 parentOffset.top += jQuery.css(offsetParent[0], "borderTopWidth", true); 8890 parentOffset.left += jQuery.css(offsetParent[0], "borderLeftWidth", true); 8891 } 8892 8893 // Subtract parent offsets and element margins 8894 return { 8895 top: offset.top - parentOffset.top - jQuery.css(elem, "marginTop", true), 8896 left: offset.left - parentOffset.left - jQuery.css(elem, "marginLeft", true) 8897 }; 8898 }, 8899 8900 offsetParent: function offsetParent() { 8901 return this.map(function () { 8902 var offsetParent = this.offsetParent || docElem; 8903 8904 while (offsetParent && !jQuery.nodeName(offsetParent, "html") && jQuery.css(offsetParent, "position") === "static") { 8905 offsetParent = offsetParent.offsetParent; 8906 } 8907 8908 return offsetParent || docElem; 8909 }); 8910 } 8911 }); 8912 8913 // Create scrollLeft and scrollTop methods 8914 jQuery.each({ scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function (method, prop) { 8915 var top = "pageYOffset" === prop; 8916 8917 jQuery.fn[method] = function (val) { 8918 return access(this, function (elem, method, val) { 8919 var win = getWindow(elem); 8920 8921 if (val === undefined) { 8922 return win ? win[prop] : elem[method]; 8923 } 8924 8925 if (win) { 8926 win.scrollTo(!top ? val : window.pageXOffset, top ? val : window.pageYOffset); 8927 } else { 8928 elem[method] = val; 8929 } 8930 }, method, val, arguments.length, null); 8931 }; 8932 }); 8933 8934 // Support: Safari<7+, Chrome<37+ 8935 // Add the top/left cssHooks using jQuery.fn.position 8936 // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 8937 // Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280 8938 // getComputedStyle returns percent when specified for top/left/bottom/right; 8939 // rather than make the css module depend on the offset module, just check for it here 8940 jQuery.each(["top", "left"], function (i, prop) { 8941 jQuery.cssHooks[prop] = addGetHookIf(support.pixelPosition, function (elem, computed) { 8942 if (computed) { 8943 computed = curCSS(elem, prop); 8944 // If curCSS returns percentage, fallback to offset 8945 return rnumnonpx.test(computed) ? jQuery(elem).position()[prop] + "px" : computed; 8946 } 8947 }); 8948 }); 8949 8950 // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods 8951 jQuery.each({ Height: "height", Width: "width" }, function (name, type) { 8952 jQuery.each({ padding: "inner" + name, content: type, "": "outer" + name }, function (defaultExtra, funcName) { 8953 // Margin is only for outerHeight, outerWidth 8954 jQuery.fn[funcName] = function (margin, value) { 8955 var chainable = arguments.length && (defaultExtra || typeof margin !== "boolean"), 8956 extra = defaultExtra || (margin === true || value === true ? "margin" : "border"); 8957 8958 return access(this, function (elem, type, value) { 8959 var doc; 8960 8961 if (jQuery.isWindow(elem)) { 8962 // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there 8963 // isn't a whole lot we can do. See pull request at this URL for discussion: 8964 // https://github.com/jquery/jquery/pull/764 8965 return elem.document.documentElement["client" + name]; 8966 } 8967 8968 // Get document width or height 8969 if (elem.nodeType === 9) { 8970 doc = elem.documentElement; 8971 8972 // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], 8973 // whichever is greatest 8974 return Math.max(elem.body["scroll" + name], doc["scroll" + name], elem.body["offset" + name], doc["offset" + name], doc["client" + name]); 8975 } 8976 8977 return value === undefined ? 8978 // Get width or height on the element, requesting but not forcing parseFloat 8979 jQuery.css(elem, type, extra) : 8980 8981 // Set width or height on the element 8982 jQuery.style(elem, type, value, extra); 8983 }, type, chainable ? margin : undefined, chainable, null); 8984 }; 8985 }); 8986 }); 8987 8988 // The number of elements contained in the matched element set 8989 jQuery.fn.size = function () { 8990 return this.length; 8991 }; 8992 8993 jQuery.fn.andSelf = jQuery.fn.addBack; 8994 8995 // Register as a named AMD module, since jQuery can be concatenated with other
8996 // files that may use define, but not via a proper concatenation script that 8997 // understands anonymous AMD modules. A named AMD is safest and most robust 8998 // way to register. Lowercase jquery is used because AMD module names are 8999 // derived from file names, and jQuery is normally delivered in a lowercase 9000 // file name. Do this after creating the global so that if an AMD module wants 9001 // to call noConflict to hide this version of jQuery, it will work. 9002 9003 // Note that for maximum portability, libraries that are not jQuery should 9004 // declare themselves as anonymous modules, and avoid setting a global if an 9005 // AMD loader is present. jQuery is a special case. For more information, see 9006 // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon 9007 9008 if (true) { 9009 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () { 9010 return jQuery; 9011 }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 9012 } 9013 9014 var 9015 // Map over jQuery in case of overwrite 9016 _jQuery = window.jQuery, 9017 9018 9019 // Map over the $ in case of overwrite 9020 _$ = window.$; 9021 9022 jQuery.noConflict = function (deep) { 9023 if (window.$ === jQuery) { 9024 window.$ = _$; 9025 } 9026 9027 if (deep && window.jQuery === jQuery) { 9028 window.jQuery = _jQuery; 9029 } 9030 9031 return jQuery; 9032 }; 9033 9034 // Expose jQuery and $ identifiers, even in AMD 9035 // (#7102#comment:10, https://github.com/jquery/jquery/pull/557) 9036 // and CommonJS for browser emulators (#13566) 9037 if ((typeof noGlobal === "undefined" ? "undefined" : (0, _typeof3.default)(noGlobal)) === strundefined) { 9038 window.jQuery = window.$ = jQuery; 9039 } 9040 9041 return jQuery; 9042 }); 9043 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(198)(module))) 9044 9045/***/ }, 9046/* 3 */, 9047/* 4 */, 9048/* 5 */, 9049/* 6 */, 9050/* 7 */, 9051/* 8 */, 9052/* 9 */, 9053/* 10 */, 9054/* 11 */, 9055/* 12 */, 9056/* 13 */, 9057/* 14 */, 9058/* 15 */, 9059/* 16 */, 9060/* 17 */ 9061/***/ function(module, exports) { 9062 9063 var core = module.exports = {version: '2.4.0'}; 9064 if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef 9065 9066/***/ }, 9067/* 18 */, 9068/* 19 */, 9069/* 20 */ 9070/***/ function(module, exports, __webpack_require__) { 9071 9072 "use strict"; 9073 9074 exports.__esModule = true; 9075 9076 var _iterator = __webpack_require__(267); 9077 9078 var _iterator2 = _interopRequireDefault(_iterator); 9079 9080 var _symbol = __webpack_require__(266); 9081 9082 var _symbol2 = _interopRequireDefault(_symbol); 9083 9084 var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default ? "symbol" : typeof obj; }; 9085 9086 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 9087 9088 exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { 9089 return typeof obj === "undefined" ? "undefined" : _typeof(obj); 9090 } : function (obj) { 9091 return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); 9092 }; 9093 9094/***/ }, 9095/* 21 */, 9096/* 22 */, 9097/* 23 */, 9098/* 24 */, 9099/* 25 */, 9100/* 26 */, 9101/* 27 */, 9102/* 28 */, 9103/* 29 */, 9104/* 30 */ 9105/***/ function(module, exports, __webpack_require__) { 9106 9107 // Thank's IE8 for his funny defineProperty 9108 module.exports = !__webpack_require__(46)(function(){ 9109 return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; 9110 }); 9111 9112/***/ }, 9113/* 31 */ 9114/***/ function(module, exports, __webpack_require__) { 9115 9116 var global = __webpack_require__(32) 9117 , core = __webpack_require__(17) 9118 , ctx = __webpack_require__(135) 9119 , hide = __webpack_require__(47) 9120 , PROTOTYPE = 'prototype'; 9121 9122 var $export = function(type, name, source){ 9123 var IS_FORCED = type & $export.F 9124 , IS_GLOBAL = type & $export.G 9125 , IS_STATIC = type & $export.S 9126 , IS_PROTO = type & $export.P 9127 , IS_BIND = type & $export.B 9128 , IS_WRAP = type & $export.W
vendor: 5,173 bytes, lines 9129-9307
9129 , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) 9130 , expProto = exports[PROTOTYPE] 9131 , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] 9132 , key, own, out; 9133 if(IS_GLOBAL)source = name; 9134 for(key in source){ 9135 // contains in native 9136 own = !IS_FORCED && target && target[key] !== undefined; 9137 if(own && key in exports)continue; 9138 // export native or passed 9139 out = own ? target[key] : source[key]; 9140 // prevent global pollution for namespaces 9141 exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] 9142 // bind timers to global for call from export context 9143 : IS_BIND && own ? ctx(out, global) 9144 // wrap global constructors for prevent change them in library 9145 : IS_WRAP && target[key] == out ? (function(C){ 9146 var F = function(a, b, c){ 9147 if(this instanceof C){ 9148 switch(arguments.length){ 9149 case 0: return new C; 9150 case 1: return new C(a); 9151 case 2: return new C(a, b); 9152 } return new C(a, b, c); 9153 } return C.apply(this, arguments); 9154 }; 9155 F[PROTOTYPE] = C[PROTOTYPE]; 9156 return F; 9157 // make static versions for prototype methods 9158 })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; 9159 // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% 9160 if(IS_PROTO){ 9161 (exports.virtual || (exports.virtual = {}))[key] = out; 9162 // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% 9163 if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); 9164 } 9165 } 9166 }; 9167 // type bitmap 9168 $export.F = 1; // forced 9169 $export.G = 2; // global 9170 $export.S = 4; // static 9171 $export.P = 8; // proto 9172 $export.B = 16; // bind 9173 $export.W = 32; // wrap 9174 $export.U = 64; // safe 9175 $export.R = 128; // real proto method for `library` 9176 module.exports = $export; 9177 9178/***/ }, 9179/* 32 */ 9180/***/ function(module, exports) { 9181 9182 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 9183 var global = module.exports = typeof window != 'undefined' && window.Math == Math 9184 ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); 9185 if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef 9186 9187/***/ }, 9188/* 33 */, 9189/* 34 */, 9190/* 35 */, 9191/* 36 */, 9192/* 37 */, 9193/* 38 */, 9194/* 39 */ 9195/***/ function(module, exports) { 9196 9197 var hasOwnProperty = {}.hasOwnProperty; 9198 module.exports = function(it, key){ 9199 return hasOwnProperty.call(it, key); 9200 }; 9201 9202/***/ }, 9203/* 40 */ 9204/***/ function(module, exports, __webpack_require__) { 9205 9206 var anObject = __webpack_require__(55) 9207 , IE8_DOM_DEFINE = __webpack_require__(137) 9208 , toPrimitive = __webpack_require__(92) 9209 , dP = Object.defineProperty; 9210 9211 exports.f = __webpack_require__(30) ? Object.defineProperty : function defineProperty(O, P, Attributes){ 9212 anObject(O); 9213 P = toPrimitive(P, true); 9214 anObject(Attributes); 9215 if(IE8_DOM_DEFINE)try { 9216 return dP(O, P, Attributes); 9217 } catch(e){ /* empty */ } 9218 if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); 9219 if('value' in Attributes)O[P] = Attributes.value; 9220 return O; 9221 }; 9222 9223/***/ }, 9224/* 41 */ 9225/***/ function(module, exports, __webpack_require__) { 9226 9227 // to indexed object, toObject with fallback for non-array-like ES3 strings 9228 var IObject = __webpack_require__(138) 9229 , defined = __webpack_require__(82); 9230 module.exports = function(it){ 9231 return IObject(defined(it)); 9232 }; 9233 9234/***/ }, 9235/* 42 */, 9236/* 43 */, 9237/* 44 */, 9238/* 45 */, 9239/* 46 */ 9240/***/ function(module, exports) { 9241 9242 module.exports = function(exec){ 9243 try { 9244 return !!exec(); 9245 } catch(e){ 9246 return true; 9247 } 9248 }; 9249 9250/***/ }, 9251/* 47 */ 9252/***/ function(module, exports, __webpack_require__) { 9253 9254 var dP = __webpack_require__(40) 9255 , createDesc = __webpack_require__(64); 9256 module.exports = __webpack_require__(30) ? function(object, key, value){ 9257 return dP.f(object, key, createDesc(1, value)); 9258 } : function(object, key, value){ 9259 object[key] = value; 9260 return object; 9261 }; 9262 9263/***/ }, 9264/* 48 */ 9265/***/ function(module, exports, __webpack_require__) { 9266 9267 // 19.1.2.14 / 15.2.3.14 Object.keys(O) 9268 var $keys = __webpack_require__(144) 9269 , enumBugKeys = __webpack_require__(83); 9270 9271 module.exports = Object.keys || function keys(O){ 9272 return $keys(O, enumBugKeys); 9273 }; 9274 9275/***/ }, 9276/* 49 */ 9277/***/ function(module, exports, __webpack_require__) { 9278 9279 var store = __webpack_require__(90)('wks') 9280 , uid = __webpack_require__(66) 9281 , Symbol = __webpack_require__(32).Symbol 9282 , USE_SYMBOL = typeof Symbol == 'function'; 9283 9284 var $exports = module.exports = function(name){ 9285 return store[name] || (store[name] = 9286 USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); 9287 }; 9288 9289 $exports.store = store; 9290 9291/***/ }, 9292/* 50 */, 9293/* 51 */, 9294/* 52 */, 9295/* 53 */, 9296/* 54 */, 9297/* 55 */ 9298/***/ function(module, exports, __webpack_require__) { 9299 9300 var isObject = __webpack_require__(56); 9301 module.exports = function(it){ 9302 if(!isObject(it))throw TypeError(it + ' is not an object!'); 9303 return it; 9304 }; 9305 9306/***/ }, 9307/* 56 */
9308/***/ function(module, exports) { 9309 9310 module.exports = function(it){ 9311 return typeof it === 'object' ? it !== null : typeof it === 'function'; 9312 }; 9313 9314/***/ }, 9315/* 57 */, 9316/* 58 */, 9317/* 59 */, 9318/* 60 */, 9319/* 61 */, 9320/* 62 */, 9321/* 63 */ 9322/***/ function(module, exports) { 9323 9324 exports.f = {}.propertyIsEnumerable; 9325 9326/***/ }, 9327/* 64 */ 9328/***/ function(module, exports) { 9329 9330 module.exports = function(bitmap, value){ 9331 return { 9332 enumerable : !(bitmap & 1), 9333 configurable: !(bitmap & 2), 9334 writable : !(bitmap & 4), 9335 value : value 9336 }; 9337 }; 9338 9339/***/ }, 9340/* 65 */ 9341/***/ function(module, exports, __webpack_require__) { 9342 9343 // 7.1.13 ToObject(argument) 9344 var defined = __webpack_require__(82); 9345 module.exports = function(it){ 9346 return Object(defined(it)); 9347 }; 9348 9349/***/ }, 9350/* 66 */ 9351/***/ function(module, exports) { 9352 9353 var id = 0 9354 , px = Math.random(); 9355 module.exports = function(key){ 9356 return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); 9357 }; 9358 9359/***/ }, 9360/* 67 */, 9361/* 68 */, 9362/* 69 */, 9363/* 70 */, 9364/* 71 */, 9365/* 72 */, 9366/* 73 */, 9367/* 74 */, 9368/* 75 */, 9369/* 76 */, 9370/* 77 */, 9371/* 78 */, 9372/* 79 */, 9373/* 80 */, 9374/* 81 */, 9375/* 82 */ 9376/***/ function(module, exports) { 9377 9378 // 7.2.1 RequireObjectCoercible(argument) 9379 module.exports = function(it){ 9380 if(it == undefined)throw TypeError("Can't call method on " + it); 9381 return it; 9382 }; 9383 9384/***/ }, 9385/* 83 */ 9386/***/ function(module, exports) { 9387 9388 // IE 8- don't enum bug keys 9389 module.exports = ( 9390 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' 9391 ).split(','); 9392 9393/***/ }, 9394/* 84 */ 9395/***/ function(module, exports) { 9396 9397 module.exports = {}; 9398 9399/***/ }, 9400/* 85 */ 9401/***/ function(module, exports) { 9402 9403 module.exports = true; 9404 9405/***/ }, 9406/* 86 */ 9407/***/ function(module, exports, __webpack_require__) { 9408 9409 // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) 9410 var anObject = __webpack_require__(55) 9411 , dPs = __webpack_require__(140) 9412 , enumBugKeys = __webpack_require__(83) 9413 , IE_PROTO = __webpack_require__(89)('IE_PROTO') 9414 , Empty = function(){ /* empty */ } 9415 , PROTOTYPE = 'prototype'; 9416 9417 // Create object with fake `null` prototype: use iframe Object with cleared prototype 9418 var createDict = function(){ 9419 // Thrash, waste and sodomy: IE GC bug 9420 var iframe = __webpack_require__(136)('iframe') 9421 , i = enumBugKeys.length 9422 , gt = '>' 9423 , iframeDocument; 9424 iframe.style.display = 'none'; 9425 __webpack_require__(283).appendChild(iframe); 9426 iframe.src = 'javascript:'; // eslint-disable-line no-script-url 9427 // createDict = iframe.contentWindow.Object; 9428 // html.removeChild(iframe); 9429 iframeDocument = iframe.contentWindow.document; 9430 iframeDocument.open();
vendor: 8,112 bytes, lines 9431-9706
9431 iframeDocument.write('<script>document.F=Object</script' + gt); 9432 iframeDocument.close(); 9433 createDict = iframeDocument.F; 9434 while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; 9435 return createDict(); 9436 }; 9437 9438 module.exports = Object.create || function create(O, Properties){ 9439 var result; 9440 if(O !== null){ 9441 Empty[PROTOTYPE] = anObject(O); 9442 result = new Empty; 9443 Empty[PROTOTYPE] = null; 9444 // add "__proto__" for Object.getPrototypeOf polyfill 9445 result[IE_PROTO] = O; 9446 } else result = createDict(); 9447 return Properties === undefined ? result : dPs(result, Properties); 9448 }; 9449 9450/***/ }, 9451/* 87 */ 9452/***/ function(module, exports) { 9453 9454 exports.f = Object.getOwnPropertySymbols; 9455 9456/***/ }, 9457/* 88 */ 9458/***/ function(module, exports, __webpack_require__) { 9459 9460 var def = __webpack_require__(40).f 9461 , has = __webpack_require__(39) 9462 , TAG = __webpack_require__(49)('toStringTag'); 9463 9464 module.exports = function(it, tag, stat){ 9465 if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); 9466 }; 9467 9468/***/ }, 9469/* 89 */ 9470/***/ function(module, exports, __webpack_require__) { 9471 9472 var shared = __webpack_require__(90)('keys') 9473 , uid = __webpack_require__(66); 9474 module.exports = function(key){ 9475 return shared[key] || (shared[key] = uid(key)); 9476 }; 9477 9478/***/ }, 9479/* 90 */ 9480/***/ function(module, exports, __webpack_require__) { 9481 9482 var global = __webpack_require__(32) 9483 , SHARED = '__core-js_shared__' 9484 , store = global[SHARED] || (global[SHARED] = {}); 9485 module.exports = function(key){ 9486 return store[key] || (store[key] = {}); 9487 }; 9488 9489/***/ }, 9490/* 91 */ 9491/***/ function(module, exports) { 9492 9493 // 7.1.4 ToInteger 9494 var ceil = Math.ceil 9495 , floor = Math.floor; 9496 module.exports = function(it){ 9497 return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); 9498 }; 9499 9500/***/ }, 9501/* 92 */ 9502/***/ function(module, exports, __webpack_require__) { 9503 9504 // 7.1.1 ToPrimitive(input [, PreferredType]) 9505 var isObject = __webpack_require__(56); 9506 // instead of the ES6 spec version, we didn't implement @@toPrimitive case 9507 // and the second argument - flag - preferred type is a string 9508 module.exports = function(it, S){ 9509 if(!isObject(it))return it; 9510 var fn, val; 9511 if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; 9512 if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; 9513 if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; 9514 throw TypeError("Can't convert object to primitive value"); 9515 }; 9516 9517/***/ }, 9518/* 93 */ 9519/***/ function(module, exports, __webpack_require__) { 9520 9521 var global = __webpack_require__(32) 9522 , core = __webpack_require__(17) 9523 , LIBRARY = __webpack_require__(85) 9524 , wksExt = __webpack_require__(94) 9525 , defineProperty = __webpack_require__(40).f; 9526 module.exports = function(name){ 9527 var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); 9528 if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); 9529 }; 9530 9531/***/ }, 9532/* 94 */ 9533/***/ function(module, exports, __webpack_require__) { 9534 9535 exports.f = __webpack_require__(49); 9536 9537/***/ }, 9538/* 95 */, 9539/* 96 */, 9540/* 97 */, 9541/* 98 */, 9542/* 99 */, 9543/* 100 */, 9544/* 101 */, 9545/* 102 */, 9546/* 103 */, 9547/* 104 */, 9548/* 105 */, 9549/* 106 */, 9550/* 107 */, 9551/* 108 */, 9552/* 109 */, 9553/* 110 */, 9554/* 111 */, 9555/* 112 */, 9556/* 113 */, 9557/* 114 */, 9558/* 115 */, 9559/* 116 */, 9560/* 117 */, 9561/* 118 */, 9562/* 119 */, 9563/* 120 */, 9564/* 121 */, 9565/* 122 */, 9566/* 123 */, 9567/* 124 */, 9568/* 125 */, 9569/* 126 */, 9570/* 127 */, 9571/* 128 */, 9572/* 129 */, 9573/* 130 */, 9574/* 131 */, 9575/* 132 */, 9576/* 133 */, 9577/* 134 */ 9578/***/ function(module, exports) { 9579 9580 var toString = {}.toString; 9581 9582 module.exports = function(it){ 9583 return toString.call(it).slice(8, -1); 9584 }; 9585 9586/***/ }, 9587/* 135 */ 9588/***/ function(module, exports, __webpack_require__) { 9589 9590 // optional / simple context binding 9591 var aFunction = __webpack_require__(279); 9592 module.exports = function(fn, that, length){ 9593 aFunction(fn); 9594 if(that === undefined)return fn; 9595 switch(length){ 9596 case 1: return function(a){ 9597 return fn.call(that, a); 9598 }; 9599 case 2: return function(a, b){ 9600 return fn.call(that, a, b); 9601 }; 9602 case 3: return function(a, b, c){ 9603 return fn.call(that, a, b, c); 9604 }; 9605 } 9606 return function(/* ...args */){ 9607 return fn.apply(that, arguments); 9608 }; 9609 }; 9610 9611/***/ }, 9612/* 136 */ 9613/***/ function(module, exports, __webpack_require__) { 9614 9615 var isObject = __webpack_require__(56) 9616 , document = __webpack_require__(32).document 9617 // in old IE typeof document.createElement is 'object' 9618 , is = isObject(document) && isObject(document.createElement); 9619 module.exports = function(it){ 9620 return is ? document.createElement(it) : {}; 9621 }; 9622 9623/***/ }, 9624/* 137 */ 9625/***/ function(module, exports, __webpack_require__) { 9626 9627 module.exports = !__webpack_require__(30) && !__webpack_require__(46)(function(){ 9628 return Object.defineProperty(__webpack_require__(136)('div'), 'a', {get: function(){ return 7; }}).a != 7; 9629 }); 9630 9631/***/ }, 9632/* 138 */ 9633/***/ function(module, exports, __webpack_require__) { 9634 9635 // fallback for non-array-like ES3 and non-enumerable old V8 strings 9636 var cof = __webpack_require__(134); 9637 module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ 9638 return cof(it) == 'String' ? it.split('') : Object(it); 9639 }; 9640 9641/***/ }, 9642/* 139 */ 9643/***/ function(module, exports, __webpack_require__) { 9644 9645 'use strict'; 9646 var LIBRARY = __webpack_require__(85) 9647 , $export = __webpack_require__(31) 9648 , redefine = __webpack_require__(146) 9649 , hide = __webpack_require__(47) 9650 , has = __webpack_require__(39) 9651 , Iterators = __webpack_require__(84) 9652 , $iterCreate = __webpack_require__(285) 9653 , setToStringTag = __webpack_require__(88) 9654 , getPrototypeOf = __webpack_require__(143) 9655 , ITERATOR = __webpack_require__(49)('iterator') 9656 , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` 9657 , FF_ITERATOR = '@@iterator' 9658 , KEYS = 'keys' 9659 , VALUES = 'values'; 9660 9661 var returnThis = function(){ return this; }; 9662 9663 module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ 9664 $iterCreate(Constructor, NAME, next); 9665 var getMethod = function(kind){ 9666 if(!BUGGY && kind in proto)return proto[kind]; 9667 switch(kind){ 9668 case KEYS: return function keys(){ return new Constructor(this, kind); }; 9669 case VALUES: return function values(){ return new Constructor(this, kind); }; 9670 } return function entries(){ return new Constructor(this, kind); }; 9671 }; 9672 var TAG = NAME + ' Iterator' 9673 , DEF_VALUES = DEFAULT == VALUES 9674 , VALUES_BUG = false 9675 , proto = Base.prototype 9676 , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] 9677 , $default = $native || getMethod(DEFAULT) 9678 , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined 9679 , $anyNative = NAME == 'Array' ? proto.entries || $native : $native 9680 , methods, key, IteratorPrototype; 9681 // Fix native 9682 if($anyNative){ 9683 IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); 9684 if(IteratorPrototype !== Object.prototype){ 9685 // Set @@toStringTag to native iterators 9686 setToStringTag(IteratorPrototype, TAG, true); 9687 // fix for some old engines 9688 if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); 9689 } 9690 } 9691 // fix Array#{values, @@iterator}.name in V8 / FF 9692 if(DEF_VALUES && $native && $native.name !== VALUES){ 9693 VALUES_BUG = true; 9694 $default = function values(){ return $native.call(this); }; 9695 } 9696 // Define iterator 9697 if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ 9698 hide(proto, ITERATOR, $default); 9699 } 9700 // Plug for library 9701 Iterators[NAME] = $default; 9702 Iterators[TAG] = returnThis; 9703 if(DEFAULT){ 9704 methods = { 9705 values: DEF_VALUES ? $default : getMethod(VALUES), 9706 keys: IS_SET ? $default : getMethod(KEYS),
9707 entries: $entries 9708 }; 9709 if(FORCED)for(key in methods){ 9710 if(!(key in proto))redefine(proto, key, methods[key]); 9711 } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); 9712 } 9713 return methods; 9714 }; 9715 9716/***/ }, 9717/* 140 */ 9718/***/ function(module, exports, __webpack_require__) { 9719 9720 var dP = __webpack_require__(40) 9721 , anObject = __webpack_require__(55) 9722 , getKeys = __webpack_require__(48); 9723 9724 module.exports = __webpack_require__(30) ? Object.defineProperties : function defineProperties(O, Properties){ 9725 anObject(O); 9726 var keys = getKeys(Properties) 9727 , length = keys.length 9728 , i = 0 9729 , P; 9730 while(length > i)dP.f(O, P = keys[i++], Properties[P]); 9731 return O; 9732 }; 9733 9734/***/ }, 9735/* 141 */ 9736/***/ function(module, exports, __webpack_require__) { 9737 9738 var pIE = __webpack_require__(63) 9739 , createDesc = __webpack_require__(64) 9740 , toIObject = __webpack_require__(41) 9741 , toPrimitive = __webpack_require__(92) 9742 , has = __webpack_require__(39) 9743 , IE8_DOM_DEFINE = __webpack_require__(137) 9744 , gOPD = Object.getOwnPropertyDescriptor; 9745 9746 exports.f = __webpack_require__(30) ? gOPD : function getOwnPropertyDescriptor(O, P){ 9747 O = toIObject(O); 9748 P = toPrimitive(P, true); 9749 if(IE8_DOM_DEFINE)try { 9750 return gOPD(O, P); 9751 } catch(e){ /* empty */ } 9752 if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); 9753 }; 9754 9755/***/ }, 9756/* 142 */ 9757/***/ function(module, exports, __webpack_require__) { 9758 9759 // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) 9760 var $keys = __webpack_require__(144) 9761 , hiddenKeys = __webpack_require__(83).concat('length', 'prototype'); 9762 9763 exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ 9764 return $keys(O, hiddenKeys); 9765 }; 9766 9767/***/ }, 9768/* 143 */ 9769/***/ function(module, exports, __webpack_require__) { 9770 9771 // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) 9772 var has = __webpack_require__(39) 9773 , toObject = __webpack_require__(65) 9774 , IE_PROTO = __webpack_require__(89)('IE_PROTO') 9775 , ObjectProto = Object.prototype; 9776 9777 module.exports = Object.getPrototypeOf || function(O){ 9778 O = toObject(O); 9779 if(has(O, IE_PROTO))return O[IE_PROTO]; 9780 if(typeof O.constructor == 'function' && O instanceof O.constructor){ 9781 return O.constructor.prototype; 9782 } return O instanceof Object ? ObjectProto : null; 9783 }; 9784 9785/***/ }, 9786/* 144 */ 9787/***/ function(module, exports, __webpack_require__) { 9788 9789 var has = __webpack_require__(39) 9790 , toIObject = __webpack_require__(41) 9791 , arrayIndexOf = __webpack_require__(281)(false) 9792 , IE_PROTO = __webpack_require__(89)('IE_PROTO'); 9793 9794 module.exports = function(object, names){ 9795 var O = toIObject(object) 9796 , i = 0 9797 , result = [] 9798 , key; 9799 for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); 9800 // Don't enum bug & hidden keys 9801 while(names.length > i)if(has(O, key = names[i++])){ 9802 ~arrayIndexOf(result, key) || result.push(key); 9803 } 9804 return result; 9805 }; 9806 9807/***/ }, 9808/* 145 */, 9809/* 146 */ 9810/***/ function(module, exports, __webpack_require__) { 9811 9812 module.exports = __webpack_require__(47); 9813 9814/***/ }, 9815/* 147 */, 9816/* 148 */, 9817/* 149 */, 9818/* 150 */, 9819/* 151 */, 9820/* 152 */, 9821/* 153 */, 9822/* 154 */, 9823/* 155 */, 9824/* 156 */, 9825/* 157 */, 9826/* 158 */, 9827/* 159 */, 9828/* 160 */, 9829/* 161 */, 9830/* 162 */, 9831/* 163 */, 9832/* 164 */, 9833/* 165 */, 9834/* 166 */, 9835/* 167 */, 9836/* 168 */, 9837/* 169 */, 9838/* 170 */, 9839/* 171 */, 9840/* 172 */, 9841/* 173 */, 9842/* 174 */, 9843/* 175 */, 9844/* 176 */, 9845/* 177 */, 9846/* 178 */, 9847/* 179 */, 9848/* 180 */, 9849/* 181 */, 9850/* 182 */, 9851/* 183 */, 9852/* 184 */, 9853/* 185 */, 9854/* 186 */, 9855/* 187 */, 9856/* 188 */, 9857/* 189 */, 9858/* 190 */, 9859/* 191 */, 9860/* 192 */, 9861/* 193 */, 9862/* 194 */, 9863/* 195 */, 9864/* 196 */, 9865/* 197 */, 9866/* 198 */ 9867/***/ function(module, exports) { 9868 9869 module.exports = function(module) { 9870 if(!module.webpackPolyfill) { 9871 module.deprecate = function() {}; 9872 module.paths = []; 9873 // module.parent = undefined by default 9874 module.children = []; 9875 module.webpackPolyfill = 1; 9876 } 9877 return module; 9878 } 9879 9880 9881/***/ }, 9882/* 199 */, 9883/* 200 */, 9884/* 201 */, 9885/* 202 */, 9886/* 203 */ 9887/***/ function(module, exports, __webpack_require__) { 9888 9889 /* WEBPACK VAR INJECTION */(function(jQuery) {'use strict'; 9890 9891 var _typeof2 = __webpack_require__(20); 9892 9893 var _typeof3 = _interopRequireDefault(_typeof2); 9894 9895 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 9896 9897 /* jshint esversion: 6 */ 9898 /* globals jQuery */ 9899 /* 9900 * Foundation Responsive Library 9901 * http://foundation.zurb.com 9902 * Copyright 2014, ZURB 9903 * Free to use under the MIT license. 9904 * http://www.opensource.org/licenses/mit-license.php 9905 * Version: Jan 24, 2015 9906 */ 9907 9908 (function ($, window, document, undefined) { 9909 'use strict'; 9910 9911 var header_helpers = function header_helpers(class_array) { 9912 var i = class_array.length; 9913 var head = $('head'); 9914 9915 while (i--) { 9916 if (head.has('.' + class_array[i]).length === 0) { 9917 head.append('<meta class="' + class_array[i] + '" />'); 9918 } 9919 } 9920 }; 9921 9922 header_helpers(['foundation-mq-small', 'foundation-mq-small-only', 'foundation-mq-medium', 'foundation-mq-medium-only', 'foundation-mq-large', 'foundation-mq-large-only', 'foundation-mq-xlarge', 'foundation-mq-xlarge-only', 'foundation-mq-xxlarge', 'foundation-data-attribute-namespace']); 9923 9924 // Enable FastClick if present 9925 9926 $(function () { 9927 if (typeof FastClick !== 'undefined') { 9928 // Don't attach to body if undefined 9929 if (typeof document.body !== 'undefined') { 9930 FastClick.attach(document.body); 9931 } 9932 } 9933 }); 9934 9935 // private Fast Selector wrapper, 9936 // returns jQuery object. Only use where 9937 // getElementById is not available. 9938 var S = function S(selector, context) { 9939 if (typeof selector === 'string') { 9940 if (context) { 9941 var cont; 9942 if (context.jquery) { 9943 cont = context[0]; 9944 if (!cont) { 9945 return context; 9946 } 9947 } else { 9948 cont = context; 9949 } 9950 return $(cont.querySelectorAll(selector)); 9951 } 9952 9953 return $(document.querySelectorAll(selector)); 9954 } 9955 9956 return $(selector, context); 9957 }; 9958 9959 // Namespace functions. 9960 9961 var attr_name = function attr_name(init) { 9962 var arr = []; 9963 if (!init) { 9964 arr.push('data'); 9965 } 9966 if (this.namespace.length > 0) { 9967 arr.push(this.namespace); 9968 } 9969 arr.push(this.name); 9970 9971 return arr.join('-'); 9972 }; 9973
9974 var add_namespace = function add_namespace(str) { 9975 var parts = str.split('-'), 9976 i = parts.length, 9977 arr = []; 9978 9979 while (i--) { 9980 if (i !== 0) { 9981 arr.push(parts[i]); 9982 } else { 9983 if (this.namespace.length > 0) { 9984 arr.push(this.namespace, parts[i]); 9985 } else { 9986 arr.push(parts[i]); 9987 } 9988 } 9989 } 9990 9991 return arr.reverse().join('-'); 9992 }; 9993 9994 // Event binding and data-options updating. 9995 9996 var bindings = function bindings(method, options) { 9997 var self = this, 9998 bind = function bind() { 9999 var $this = S(this), 10000 should_bind_events = !$this.data(self.attr_name(true) + '-init'); 10001 $this.data(self.attr_name(true) + '-init', $.extend({}, self.settings, options || method, self.data_options($this))); 10002 10003 if (should_bind_events) { 10004 self.events(this); 10005 } 10006 }; 10007 10008 if (S(this.scope).is('[' + this.attr_name() + ']')) { 10009 bind.call(this.scope); 10010 } else { 10011 S('[' + this.attr_name() + ']', this.scope).each(bind); 10012 } 10013 // # Patch to fix #5043 to move this *after* the if/else clause in order for Backbone and similar frameworks to have improved control over event binding and data-options updating. 10014 if (typeof method === 'string') { 10015 return this[method].call(this, options); 10016 } 10017 }; 10018 10019 var single_image_loaded = function single_image_loaded(image, callback) { 10020 function loaded() { 10021 callback(image[0]); 10022 } 10023 10024 function bindLoad() { 10025 this.one('load', loaded); 10026 10027 if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { 10028 var src = this.attr('src'), 10029 param = src.match(/\?/) ? '&' : '?'; 10030 10031 param += 'random=' + new Date().getTime(); 10032 this.attr('src', src + param); 10033 } 10034 } 10035 10036 if (!image.attr('src')) { 10037 loaded(); 10038 return; 10039 } 10040 10041 if (image[0].complete || image[0].readyState === 4) { 10042 loaded(); 10043 } else { 10044 bindLoad.call(image); 10045 } 10046 }; 10047 10048 /* 10049 https://github.com/paulirish/matchMedia.js 10050 */ 10051 10052 window.matchMedia = window.matchMedia || function (doc) { 10053 10054 var bool, 10055 docElem = doc.documentElement, 10056 refNode = docElem.firstElementChild || docElem.firstChild, 10057 10058 // fakeBody required for <FF4 when executed in <head> 10059 fakeBody = doc.createElement('body'), 10060 div = doc.createElement('div'); 10061 10062 div.id = 'mq-test-1'; 10063 div.style.cssText = 'position:absolute;top:-100em'; 10064 fakeBody.style.background = 'none'; 10065 fakeBody.appendChild(div); 10066 10067 return function (q) { 10068 10069 div.innerHTML = '­<style media="' + q + '"> #mq-test-1 { width: 42px; }</style>'; 10070 10071 docElem.insertBefore(fakeBody, refNode); 10072 bool = div.offsetWidth === 42; 10073 docElem.removeChild(fakeBody); 10074 10075 return { 10076 matches: bool, 10077 media: q 10078 }; 10079 }; 10080 }(document); 10081 10082 /* 10083 * jquery.requestAnimationFrame 10084 * https://github.com/gnarf37/jquery-requestAnimationFrame 10085 * Requires jQuery 1.8+ 10086 * 10087 * Copyright (c) 2012 Corey Frang 10088 * Licensed under the MIT license. 10089 */ 10090 10091 (function (jQuery) { 10092 10093 // requestAnimationFrame polyfill adapted from Erik Möller 10094 // fixes from Paul Irish and Tino Zijdel 10095 // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ 10096 // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating 10097 10098 var animating, 10099 lastTime = 0, 10100 vendors = ['webkit', 'moz'], 10101 requestAnimationFrame = window.requestAnimationFrame, 10102 cancelAnimationFrame = window.cancelAnimationFrame, 10103 jqueryFxAvailable = 'undefined' !== typeof jQuery.fx; 10104 10105 for (; lastTime < vendors.length && !requestAnimationFrame; lastTime++) { 10106 requestAnimationFrame = window[vendors[lastTime] + 'RequestAnimationFrame']; 10107 cancelAnimationFrame = cancelAnimationFrame || window[vendors[lastTime] + 'CancelAnimationFrame'] || window[vendors[lastTime] + 'CancelRequestAnimationFrame']; 10108 } 10109 10110 function raf() { 10111 if (animating) { 10112 requestAnimationFrame(raf); 10113 10114 if (jqueryFxAvailable) { 10115 jQuery.fx.tick(); 10116 } 10117 } 10118 } 10119 10120 if (requestAnimationFrame) { 10121 // use rAF 10122 window.requestAnimationFrame = requestAnimationFrame; 10123 window.cancelAnimationFrame = cancelAnimationFrame; 10124 10125 if (jqueryFxAvailable) { 10126 jQuery.fx.timer = function (timer) { 10127 if (timer() && jQuery.timers.push(timer) && !animating) { 10128 animating = true; 10129 raf(); 10130 } 10131 }; 10132 10133 jQuery.fx.stop = function () { 10134 animating = false;
10135 }; 10136 } 10137 } else { 10138 // polyfill 10139 window.requestAnimationFrame = function (callback) { 10140 var currTime = new Date().getTime(), 10141 timeToCall = Math.max(0, 16 - (currTime - lastTime)), 10142 id = window.setTimeout(function () { 10143 callback(currTime + timeToCall); 10144 }, timeToCall); 10145 lastTime = currTime + timeToCall; 10146 return id; 10147 }; 10148 10149 window.cancelAnimationFrame = function (id) { 10150 clearTimeout(id); 10151 }; 10152 } 10153 })($); 10154 10155 function removeQuotes(string) { 10156 if (typeof string === 'string' || string instanceof String) { 10157 string = string.replace(/^['\\/"]+|(;\s?})+|['\\/"]+$/g, ''); 10158 } 10159 10160 return string; 10161 } 10162 10163 window.Foundation = { 10164 name: 'Foundation', 10165 10166 version: '{{VERSION}}', 10167 10168 media_queries: { 10169 'small': S('.foundation-mq-small').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''), 10170 'small-only': S('.foundation-mq-small-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''), 10171 'medium': S('.foundation-mq-medium').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''), 10172 'medium-only': S('.foundation-mq-medium-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
10173 'large': S('.foundation-mq-large').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''), 10174 'large-only': S('.foundation-mq-large-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''), 10175 'xlarge': S('.foundation-mq-xlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''), 10176 'xlarge-only': S('.foundation-mq-xlarge-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''), 10177 'xxlarge': S('.foundation-mq-xxlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, '') 10178 }, 10179 10180 stylesheet: $('<style></style>').appendTo('head')[0].sheet, 10181 10182 global: { 10183 namespace: undefined 10184 }, 10185 10186 init: function init(scope, libraries, method, options, response) { 10187 var args = [scope, method, options, response], 10188 responses = []; 10189 10190 // check RTL 10191 this.rtl = /rtl/i.test(S('html').attr('dir')); 10192 10193 // set foundation global scope 10194 this.scope = scope || this.scope; 10195 10196 this.set_namespace(); 10197 10198 if (libraries && typeof libraries === 'string' && !/reflow/i.test(libraries)) { 10199 if (this.libs.hasOwnProperty(libraries)) { 10200 responses.push(this.init_lib(libraries, args)); 10201 } 10202 } else { 10203 for (var lib in this.libs) { 10204 responses.push(this.init_lib(lib, libraries)); 10205 } 10206 } 10207 10208 S(window).load(function () { 10209 S(window).trigger('resize.fndtn.clearing').trigger('resize.fndtn.dropdown').trigger('resize.fndtn.equalizer').trigger('resize.fndtn.interchange').trigger('resize.fndtn.joyride').trigger('resize.fndtn.magellan').trigger('resize.fndtn.topbar').trigger('resize.fndtn.slider'); 10210 }); 10211 10212 return scope; 10213 }, 10214 10215 init_lib: function init_lib(lib, args) { 10216 if (this.libs.hasOwnProperty(lib)) { 10217 this.patch(this.libs[lib]); 10218 10219 if (args && args.hasOwnProperty(lib)) { 10220 if (typeof this.libs[lib].settings !== 'undefined') { 10221 $.extend(true, this.libs[lib].settings, args[lib]); 10222 } else if (typeof this.libs[lib].defaults !== 'undefined') { 10223 $.extend(true, this.libs[lib].defaults, args[lib]); 10224 } 10225 return this.libs[lib].init.apply(this.libs[lib], [this.scope, args[lib]]); 10226 } 10227 10228 args = args instanceof Array ? args : new Array(args); 10229 return this.libs[lib].init.apply(this.libs[lib], args); 10230 } 10231 10232 return function () {}; 10233 }, 10234 10235 patch: function patch(lib) { 10236 lib.scope = this.scope; 10237 lib.namespace = this.global.namespace; 10238 lib.rtl = this.rtl; 10239 lib['data_options'] = this.utils.data_options; 10240 lib['attr_name'] = attr_name; 10241 lib['add_namespace'] = add_namespace; 10242 lib['bindings'] = bindings; 10243 lib['S'] = this.utils.S; 10244 }, 10245 10246 inherit: function inherit(scope, methods) { 10247 var methods_arr = methods.split(' '), 10248 i = methods_arr.length; 10249 10250 while (i--) { 10251 if (this.utils.hasOwnProperty(methods_arr[i])) { 10252 scope[methods_arr[i]] = this.utils[methods_arr[i]]; 10253 } 10254 } 10255 }, 10256 10257 set_namespace: function set_namespace() { 10258 10259 // Description: 10260 // Don't bother reading the namespace out of the meta tag 10261 // if the namespace has been set globally in javascript 10262 // 10263 // Example: 10264 // Foundation.global.namespace = 'my-namespace'; 10265 // or make it an empty string: 10266 // Foundation.global.namespace = ''; 10267 // 10268 // 10269 10270 // If the namespace has not been set (is undefined), try to read it out of the meta element. 10271 // Otherwise use the globally defined namespace, even if it's empty ('') 10272 var namespace = this.global.namespace === undefined ? $('.foundation-data-attribute-namespace').css('font-family') : this.global.namespace; 10273 10274 // Finally, if the namsepace is either undefined or false, set it to an empty string. 10275 // Otherwise use the namespace value. 10276 this.global.namespace = namespace === undefined || /false/i.test(namespace) ? '' : namespace; 10277 }, 10278 10279 libs: {}, 10280 10281 // methods that can be inherited in libraries 10282 utils: { 10283 10284 // Description: 10285 // Fast Selector wrapper returns jQuery object. Only use where getElementById 10286 // is not available. 10287 // 10288 // Arguments:
10289 // Selector (String): CSS selector describing the element(s) to be 10290 // returned as a jQuery object. 10291 // 10292 // Scope (String): CSS selector describing the area to be searched. Default 10293 // is document. 10294 // 10295 // Returns: 10296 // Element (jQuery Object): jQuery object containing elements matching the 10297 // selector within the scope. 10298 S: S, 10299 10300 // Description: 10301 // Executes a function a max of once every n milliseconds 10302 // 10303 // Arguments: 10304 // Func (Function): Function to be throttled. 10305 // 10306 // Delay (Integer): Function execution threshold in milliseconds. 10307 // 10308 // Returns: 10309 // Lazy_function (Function): Function with throttling applied. 10310 throttle: function throttle(func, delay) { 10311 var timer = null; 10312 10313 return function () { 10314 var context = this, 10315 args = arguments; 10316 10317 if (timer === null) { 10318 timer = setTimeout(function () { 10319 func.apply(context, args); 10320 timer = null; 10321 }, delay); 10322 } 10323 }; 10324 }, 10325 10326 // Description: 10327 // Executes a function when it stops being invoked for n seconds 10328 // Modified version of _.debounce() http://underscorejs.org 10329 // 10330 // Arguments: 10331 // Func (Function): Function to be debounced. 10332 // 10333 // Delay (Integer): Function execution threshold in milliseconds. 10334 // 10335 // Immediate (Bool): Whether the function should be called at the beginning 10336 // of the delay instead of the end. Default is false. 10337 // 10338 // Returns: 10339 // Lazy_function (Function): Function with debouncing applied. 10340 debounce: function debounce(func, delay, immediate) { 10341 var timeout, result; 10342 return function () { 10343 var context = this, 10344 args = arguments; 10345 var later = function later() { 10346 timeout = null; 10347 if (!immediate) { 10348 result = func.apply(context, args); 10349 } 10350 }; 10351 var callNow = immediate && !timeout; 10352 clearTimeout(timeout); 10353 timeout = setTimeout(later, delay); 10354 if (callNow) { 10355 result = func.apply(context, args); 10356 } 10357 return result; 10358 }; 10359 }, 10360 10361 // Description: 10362 // Parses data-options attribute 10363 // 10364 // Arguments: 10365 // El (jQuery Object): Element to be parsed. 10366 // 10367 // Returns: 10368 // Options (Javascript Object): Contents of the element's data-options 10369 // attribute. 10370 data_options: function data_options(el, data_attr_name) { 10371 data_attr_name = data_attr_name || 'options'; 10372 var opts = {}, 10373 ii, 10374 p, 10375 opts_arr, 10376 data_options = function data_options(el) { 10377 var namespace = Foundation.global.namespace; 10378 10379 if (namespace.length > 0) { 10380 return el.data(namespace + '-' + data_attr_name); 10381 } 10382 10383 return el.data(data_attr_name); 10384 }; 10385 10386 var cached_options = data_options(el); 10387 10388 if ((typeof cached_options === 'undefined' ? 'undefined' : (0, _typeof3.default)(cached_options)) === 'object') { 10389 return cached_options; 10390 } 10391 10392 opts_arr = (cached_options || ':').split(';'); 10393 ii = opts_arr.length; 10394 10395 function isNumber(o) { 10396 return !isNaN(o - 0) && o !== null && o !== '' && o !== false && o !== true; 10397 } 10398 10399 function trim(str) { 10400 if (typeof str === 'string') { 10401 return $.trim(str); 10402 } 10403 return str; 10404 } 10405 10406 while (ii--) { 10407 p = opts_arr[ii].split(':'); 10408 p = [p[0], p.slice(1).join(':')]; 10409 10410 if (/true/i.test(p[1])) { 10411 p[1] = true; 10412 } 10413 if (/false/i.test(p[1])) { 10414 p[1] = false; 10415 } 10416 if (isNumber(p[1])) { 10417 if (p[1].indexOf('.') === -1) { 10418 p[1] = parseInt(p[1], 10); 10419 } else { 10420 p[1] = parseFloat(p[1]); 10421 } 10422 } 10423 10424 if (p.length === 2 && p[0].length > 0) { 10425 opts[trim(p[0])] = trim(p[1]); 10426 } 10427 } 10428 10429 return opts; 10430 }, 10431 10432 // Description: 10433 // Adds JS-recognizable media queries 10434 // 10435 // Arguments: 10436 // Media (String): Key string for the media query to be stored as in 10437 // Foundation.media_queries 10438 //
10439 // Class (String): Class name for the generated <meta> tag 10440 register_media: function register_media(media, media_class) { 10441 if (Foundation.media_queries[media] === undefined) { 10442 $('head').append('<meta class="' + media_class + '"/>'); 10443 Foundation.media_queries[media] = removeQuotes($('.' + media_class).css('font-family')); 10444 } 10445 }, 10446 10447 // Description: 10448 // Add custom CSS within a JS-defined media query 10449 // 10450 // Arguments: 10451 // Rule (String): CSS rule to be appended to the document. 10452 // 10453 // Media (String): Optional media query string for the CSS rule to be 10454 // nested under. 10455 add_custom_rule: function add_custom_rule(rule, media) { 10456 if (media === undefined && Foundation.stylesheet) { 10457 Foundation.stylesheet.insertRule(rule, Foundation.stylesheet.cssRules.length); 10458 } else { 10459 var query = Foundation.media_queries[media]; 10460 10461 if (query !== undefined) { 10462 Foundation.stylesheet.insertRule('@media ' + Foundation.media_queries[media] + '{ ' + rule + ' }'); 10463 } 10464 } 10465 }, 10466 10467 // Description: 10468 // Performs a callback function when an image is fully loaded 10469 // 10470 // Arguments: 10471 // Image (jQuery Object): Image(s) to check if loaded. 10472 // 10473 // Callback (Function): Function to execute when image is fully loaded. 10474 image_loaded: function image_loaded(images, callback) { 10475 var self = this, 10476 unloaded = images.length; 10477 10478 if (unloaded === 0) { 10479 callback(images); 10480 } 10481 10482 images.each(function () { 10483 single_image_loaded(self.S(this), function () { 10484 unloaded -= 1; 10485 if (unloaded === 0) { 10486 callback(images); 10487 } 10488 }); 10489 }); 10490 }, 10491 10492 // Description: 10493 // Returns a random, alphanumeric string 10494 // 10495 // Arguments: 10496 // Length (Integer): Length of string to be generated. Defaults to random 10497 // integer. 10498 // 10499 // Returns: 10500 // Rand (String): Pseudo-random, alphanumeric string. 10501 random_str: function random_str() { 10502 if (!this.fidx) { 10503 this.fidx = 0; 10504 } 10505 this.prefix = this.prefix || [this.name || 'F', (+new Date()).toString(36)].join('-'); 10506 10507 return this.prefix + (this.fidx++).toString(36); 10508 }, 10509 10510 // Description: 10511 // Helper for window.matchMedia 10512 // 10513 // Arguments: 10514 // mq (String): Media query 10515 // 10516 // Returns: 10517 // (Boolean): Whether the media query passes or not 10518 match: function match(mq) { 10519 return window.matchMedia(mq).matches; 10520 }, 10521 10522 // Description: 10523 // Helpers for checking Foundation default media queries with JS 10524 // 10525 // Returns: 10526 // (Boolean): Whether the media query passes or not 10527 10528 is_small_up: function is_small_up() { 10529 return this.match(Foundation.media_queries.small); 10530 }, 10531 10532 is_medium_up: function is_medium_up() { 10533 return this.match(Foundation.media_queries.medium); 10534 }, 10535 10536 is_large_up: function is_large_up() { 10537 return this.match(Foundation.media_queries.large); 10538 }, 10539 10540 is_xlarge_up: function is_xlarge_up() { 10541 return this.match(Foundation.media_queries.xlarge); 10542 }, 10543 10544 is_xxlarge_up: function is_xxlarge_up() { 10545 return this.match(Foundation.media_queries.xxlarge); 10546 }, 10547 10548 is_small_only: function is_small_only() { 10549 return !this.is_medium_up() && !this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up(); 10550 }, 10551 10552 is_medium_only: function is_medium_only() { 10553 return this.is_medium_up() && !this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up(); 10554 }, 10555 10556 is_large_only: function is_large_only() { 10557 return this.is_medium_up() && this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up(); 10558 }, 10559 10560 is_xlarge_only: function is_xlarge_only() { 10561 return this.is_medium_up() && this.is_large_up() && this.is_xlarge_up() && !this.is_xxlarge_up(); 10562 }, 10563 10564 is_xxlarge_only: function is_xxlarge_only() { 10565 return this.is_medium_up() && this.is_large_up() && this.is_xlarge_up() && this.is_xxlarge_up(); 10566 } 10567 } 10568 }; 10569 10570 $.fn.foundation = function () { 10571 var args = Array.prototype.slice.call(arguments, 0); 10572 10573 return this.each(function () {
10574 Foundation.init.apply(Foundation, [this].concat(args)); 10575 return this; 10576 }); 10577 }; 10578 })(jQuery, window, window.document); 10579 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) 10580 10581/***/ }, 10582/* 204 */, 10583/* 205 */, 10584/* 206 */, 10585/* 207 */, 10586/* 208 */ 10587/***/ function(module, exports, __webpack_require__) { 10588 10589 /* WEBPACK VAR INJECTION */(function(jQuery) {'use strict'; 10590 10591 __webpack_require__(345); 10592 10593 /* This is an extension of jquery.notify, changing some default settings */ 10594 10595 (function ($) { 10596 10597 $.growl = function (content, options) { 10598 10599 options = options || {}; 10600 10601 // Allow type to be passed in with content 10602 if (content.type) { 10603 options.type = content.type; 10604 } 10605 10606 // Set default type to success 10607 if (options.type === undefined) { 10608 options.type = 'success'; 10609 } 10610 10611 // Set default icon 10612 switch (options.type) { 10613 case 'info': 10614 content.icon = 'icon-info'; 10615 break; 10616 case 'warning': 10617 content.icon = 'icon-error'; 10618 break; 10619 case 'danger': 10620 content.icon = 'icon-warning'; 10621 break; 10622 default: 10623 content.icon = 'icon-check'; 10624 } 10625 10626 // Allow a template to be loaded from the DOM 10627 var tmpl = ''; 10628 10629 if (content.template_selector) { 10630 tmpl = $(content.template_selector).prop('outerHTML'); 10631 } else { 10632 tmpl = '<div data-notify="container" class="alert-box alert-box--withclose alert-{0}" role="alert" aria-live="assertive" tabindex="-1">' + '<span data-notify="icon" class="alert-box__icon"></span>' + '<span data-notify="title" class="alert-box__title">{1}</span>' + '<span data-notify="message" class="alert-box__message">{2}</span>' + '<div class="progress alert-box__progressbar" data-notify="progressbar"><div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div>' + '<a href="{3}" target="{4}" data-notify="url"></a>' + '<a href="#" class="close alert-close" data-notify="dismiss" aria-hidden="true">×</a>' + '</div>'; 10633 } 10634 10635 options = $.extend({ 10636 template: tmpl, 10637 delay: 5000, 10638 mouse_over: 'pause', 10639 onShow: function onShow() { 10640 document.activeElement.setAttribute('data-notify-trigger', true); // save focused element for refocus onClose 10641 this.focus(); 10642 }, 10643 onClose: function onClose() { 10644 $('[data-notify-trigger]').focus().removeAttr('data-notify-trigger'); // restore focus to previous element and reset the trigger flag 10645 } 10646 }, options); 10647 10648 return $.notify(content, options); 10649 }; 10650 10651 // Show any notifications set in the HTML structure 10652 // Example: <meta class="notification" data-type="success" content="This is a success message"> 10653 $('.notification').each(function (index, notification) { 10654 var $notification = $(notification); 10655 10656 $.growl({ 10657 message: $notification.attr('content'), 10658 type: $notification.data('type') 10659 }); 10660 }); 10661 })(jQuery); /* jshint esversion: 6 */ 10662 /* globals jQuery */ 10663 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) 10664 10665/***/ }, 10666/* 209 */, 10667/* 210 */, 10668/* 211 */, 10669/* 212 */, 10670/* 213 */, 10671/* 214 */, 10672/* 215 */, 10673/* 216 */, 10674/* 217 */, 10675/* 218 */, 10676/* 219 */, 10677/* 220 */, 10678/* 221 */, 10679/* 222 */ 10680/***/ function(module, exports, __webpack_require__) { 10681 10682 /* WEBPACK VAR INJECTION */(function(global, jQuery) {"use strict"; 10683 10684 if (global.Bugsnag) { 10685 (function () { 10686 var Bugsnag = global.Bugsnag; 10687 10688 Bugsnag.metaData = { 10689 env: { 10690 NODE_ENV: ("development") 10691 } 10692 }; 10693 // get more data in ajax errors 10694 Bugsnag.maxDepth = 10; 10695 10696 jQuery(document).ajaxError(function (event, jqxhr, settings, thrownError) { 10697 Bugsnag.notify("AjaxError", thrownError); 10698 }); 10699 10700 // group errors cross domains and files 10701 Bugsnag.beforeNotify = function (details, metaData) { 10702 metaData.groupingHash = details.message; 10703 }; 10704 })(); 10705 } 10706 /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(2))) 10707 10708/***/ }, 10709/* 223 */, 10710/* 224 */, 10711/* 225 */, 10712/* 226 */, 10713/* 227 */, 10714/* 228 */, 10715/* 229 */, 10716/* 230 */, 10717/* 231 */, 10718/* 232 */, 10719/* 233 */, 10720/* 234 */, 10721/* 235 */, 10722/* 236 */, 10723/* 237 */, 10724/* 238 */, 10725/* 239 */, 10726/* 240 */, 10727/* 241 */, 10728/* 242 */, 10729/* 243 */, 10730/* 244 */, 10731/* 245 */, 10732/* 246 */, 10733/* 247 */, 10734/* 248 */, 10735/* 249 */, 10736/* 250 */, 10737/* 251 */, 10738/* 252 */, 10739/* 253 */, 10740/* 254 */, 10741/* 255 */, 10742/* 256 */, 10743/* 257 */, 10744/* 258 */, 10745/* 259 */, 10746/* 260 */, 10747/* 261 */, 10748/* 262 */, 10749/* 263 */ 10750/***/ function(module, exports, __webpack_require__) { 10751 10752 module.exports = { "default": __webpack_require__(272), __esModule: true }; 10753 10754/***/ }, 10755/* 264 */, 10756/* 265 */, 10757/* 266 */ 10758/***/ function(module, exports, __webpack_require__) { 10759 10760 module.exports = { "default": __webpack_require__(277), __esModule: true }; 10761 10762/***/ }, 10763/* 267 */ 10764/***/ function(module, exports, __webpack_require__) { 10765 10766 module.exports = { "default": __webpack_require__(278), __esModule: true }; 10767 10768/***/ }, 10769/* 268 */, 10770/* 269 */, 10771/* 270 */, 10772/* 271 */, 10773/* 272 */ 10774/***/ function(module, exports, __webpack_require__) { 10775 10776 __webpack_require__(298); 10777 var $Object = __webpack_require__(17).Object; 10778 module.exports = function defineProperties(T, D){ 10779 return $Object.defineProperties(T, D); 10780 }; 10781 10782/***/ }, 10783/* 273 */, 10784/* 274 */, 10785/* 275 */, 10786/* 276 */, 10787/* 277 */ 10788/***/ function(module, exports, __webpack_require__) { 10789 10790 __webpack_require__(305); 10791 __webpack_require__(303); 10792 __webpack_require__(306); 10793 __webpack_require__(307); 10794 module.exports = __webpack_require__(17).Symbol; 10795 10796/***/ }, 10797/* 278 */ 10798/***/ function(module, exports, __webpack_require__) { 10799 10800 __webpack_require__(304); 10801 __webpack_require__(308); 10802 module.exports = __webpack_require__(94).f('iterator'); 10803 10804/***/ }, 10805/* 279 */
vendor: 4,506 bytes, lines 10806-10961
10806/***/ function(module, exports) { 10807 10808 module.exports = function(it){ 10809 if(typeof it != 'function')throw TypeError(it + ' is not a function!'); 10810 return it; 10811 }; 10812 10813/***/ }, 10814/* 280 */ 10815/***/ function(module, exports) { 10816 10817 module.exports = function(){ /* empty */ }; 10818 10819/***/ }, 10820/* 281 */ 10821/***/ function(module, exports, __webpack_require__) { 10822 10823 // false -> Array#indexOf 10824 // true -> Array#includes 10825 var toIObject = __webpack_require__(41) 10826 , toLength = __webpack_require__(294) 10827 , toIndex = __webpack_require__(293); 10828 module.exports = function(IS_INCLUDES){ 10829 return function($this, el, fromIndex){ 10830 var O = toIObject($this) 10831 , length = toLength(O.length) 10832 , index = toIndex(fromIndex, length) 10833 , value; 10834 // Array#includes uses SameValueZero equality algorithm 10835 if(IS_INCLUDES && el != el)while(length > index){ 10836 value = O[index++]; 10837 if(value != value)return true; 10838 // Array#toIndex ignores holes, Array#includes - not 10839 } else for(;length > index; index++)if(IS_INCLUDES || index in O){ 10840 if(O[index] === el)return IS_INCLUDES || index || 0; 10841 } return !IS_INCLUDES && -1; 10842 }; 10843 }; 10844 10845/***/ }, 10846/* 282 */ 10847/***/ function(module, exports, __webpack_require__) { 10848 10849 // all enumerable object keys, includes symbols 10850 var getKeys = __webpack_require__(48) 10851 , gOPS = __webpack_require__(87) 10852 , pIE = __webpack_require__(63); 10853 module.exports = function(it){ 10854 var result = getKeys(it) 10855 , getSymbols = gOPS.f; 10856 if(getSymbols){ 10857 var symbols = getSymbols(it) 10858 , isEnum = pIE.f 10859 , i = 0 10860 , key; 10861 while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); 10862 } return result; 10863 }; 10864 10865/***/ }, 10866/* 283 */ 10867/***/ function(module, exports, __webpack_require__) { 10868 10869 module.exports = __webpack_require__(32).document && document.documentElement; 10870 10871/***/ }, 10872/* 284 */ 10873/***/ function(module, exports, __webpack_require__) { 10874 10875 // 7.2.2 IsArray(argument) 10876 var cof = __webpack_require__(134); 10877 module.exports = Array.isArray || function isArray(arg){ 10878 return cof(arg) == 'Array'; 10879 }; 10880 10881/***/ }, 10882/* 285 */ 10883/***/ function(module, exports, __webpack_require__) { 10884 10885 'use strict'; 10886 var create = __webpack_require__(86) 10887 , descriptor = __webpack_require__(64) 10888 , setToStringTag = __webpack_require__(88) 10889 , IteratorPrototype = {}; 10890 10891 // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() 10892 __webpack_require__(47)(IteratorPrototype, __webpack_require__(49)('iterator'), function(){ return this; }); 10893 10894 module.exports = function(Constructor, NAME, next){ 10895 Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); 10896 setToStringTag(Constructor, NAME + ' Iterator'); 10897 }; 10898 10899/***/ }, 10900/* 286 */ 10901/***/ function(module, exports) { 10902 10903 module.exports = function(done, value){ 10904 return {value: value, done: !!done}; 10905 }; 10906 10907/***/ }, 10908/* 287 */ 10909/***/ function(module, exports, __webpack_require__) { 10910 10911 var getKeys = __webpack_require__(48) 10912 , toIObject = __webpack_require__(41); 10913 module.exports = function(object, el){ 10914 var O = toIObject(object) 10915 , keys = getKeys(O) 10916 , length = keys.length 10917 , index = 0 10918 , key; 10919 while(length > index)if(O[key = keys[index++]] === el)return key; 10920 }; 10921 10922/***/ }, 10923/* 288 */ 10924/***/ function(module, exports, __webpack_require__) { 10925 10926 var META = __webpack_require__(66)('meta') 10927 , isObject = __webpack_require__(56) 10928 , has = __webpack_require__(39) 10929 , setDesc = __webpack_require__(40).f 10930 , id = 0; 10931 var isExtensible = Object.isExtensible || function(){ 10932 return true; 10933 }; 10934 var FREEZE = !__webpack_require__(46)(function(){ 10935 return isExtensible(Object.preventExtensions({})); 10936 }); 10937 var setMeta = function(it){ 10938 setDesc(it, META, {value: { 10939 i: 'O' + ++id, // object ID 10940 w: {} // weak collections IDs 10941 }}); 10942 }; 10943 var fastKey = function(it, create){ 10944 // return primitive with prefix 10945 if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; 10946 if(!has(it, META)){ 10947 // can't set metadata to uncaught frozen object 10948 if(!isExtensible(it))return 'F'; 10949 // not necessary to add metadata 10950 if(!create)return 'E'; 10951 // add missing metadata 10952 setMeta(it); 10953 // return object ID 10954 } return it[META].i; 10955 }; 10956 var getWeak = function(it, create){ 10957 if(!has(it, META)){ 10958 // can't set metadata to uncaught frozen object 10959 if(!isExtensible(it))return true; 10960 // not necessary to add metadata 10961 if(!create)return false;
vendor: 4,078 bytes, lines 10962-11106
10962 // add missing metadata 10963 setMeta(it); 10964 // return hash weak collections IDs 10965 } return it[META].w; 10966 }; 10967 // add metadata on freeze-family methods calling 10968 var onFreeze = function(it){ 10969 if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); 10970 return it; 10971 }; 10972 var meta = module.exports = { 10973 KEY: META, 10974 NEED: false, 10975 fastKey: fastKey, 10976 getWeak: getWeak, 10977 onFreeze: onFreeze 10978 }; 10979 10980/***/ }, 10981/* 289 */, 10982/* 290 */ 10983/***/ function(module, exports, __webpack_require__) { 10984 10985 // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window 10986 var toIObject = __webpack_require__(41) 10987 , gOPN = __webpack_require__(142).f 10988 , toString = {}.toString; 10989 10990 var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames 10991 ? Object.getOwnPropertyNames(window) : []; 10992 10993 var getWindowNames = function(it){ 10994 try { 10995 return gOPN(it); 10996 } catch(e){ 10997 return windowNames.slice(); 10998 } 10999 }; 11000 11001 module.exports.f = function getOwnPropertyNames(it){ 11002 return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); 11003 }; 11004 11005 11006/***/ }, 11007/* 291 */, 11008/* 292 */ 11009/***/ function(module, exports, __webpack_require__) { 11010 11011 var toInteger = __webpack_require__(91) 11012 , defined = __webpack_require__(82); 11013 // true -> String#at 11014 // false -> String#codePointAt 11015 module.exports = function(TO_STRING){ 11016 return function(that, pos){ 11017 var s = String(defined(that)) 11018 , i = toInteger(pos) 11019 , l = s.length 11020 , a, b; 11021 if(i < 0 || i >= l)return TO_STRING ? '' : undefined; 11022 a = s.charCodeAt(i); 11023 return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff 11024 ? TO_STRING ? s.charAt(i) : a 11025 : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; 11026 }; 11027 }; 11028 11029/***/ }, 11030/* 293 */ 11031/***/ function(module, exports, __webpack_require__) { 11032 11033 var toInteger = __webpack_require__(91) 11034 , max = Math.max 11035 , min = Math.min; 11036 module.exports = function(index, length){ 11037 index = toInteger(index); 11038 return index < 0 ? max(index + length, 0) : min(index, length); 11039 }; 11040 11041/***/ }, 11042/* 294 */ 11043/***/ function(module, exports, __webpack_require__) { 11044 11045 // 7.1.15 ToLength 11046 var toInteger = __webpack_require__(91) 11047 , min = Math.min; 11048 module.exports = function(it){ 11049 return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 11050 }; 11051 11052/***/ }, 11053/* 295 */ 11054/***/ function(module, exports, __webpack_require__) { 11055 11056 'use strict'; 11057 var addToUnscopables = __webpack_require__(280) 11058 , step = __webpack_require__(286) 11059 , Iterators = __webpack_require__(84) 11060 , toIObject = __webpack_require__(41); 11061 11062 // 22.1.3.4 Array.prototype.entries() 11063 // 22.1.3.13 Array.prototype.keys() 11064 // 22.1.3.29 Array.prototype.values() 11065 // 22.1.3.30 Array.prototype[@@iterator]() 11066 module.exports = __webpack_require__(139)(Array, 'Array', function(iterated, kind){ 11067 this._t = toIObject(iterated); // target 11068 this._i = 0; // next index 11069 this._k = kind; // kind 11070 // 22.1.5.2.1 %ArrayIteratorPrototype%.next() 11071 }, function(){ 11072 var O = this._t 11073 , kind = this._k 11074 , index = this._i++; 11075 if(!O || index >= O.length){ 11076 this._t = undefined; 11077 return step(1); 11078 } 11079 if(kind == 'keys' )return step(0, index); 11080 if(kind == 'values')return step(0, O[index]); 11081 return step(0, [index, O[index]]); 11082 }, 'values'); 11083 11084 // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) 11085 Iterators.Arguments = Iterators.Array; 11086 11087 addToUnscopables('keys'); 11088 addToUnscopables('values'); 11089 addToUnscopables('entries'); 11090 11091/***/ }, 11092/* 296 */, 11093/* 297 */, 11094/* 298 */ 11095/***/ function(module, exports, __webpack_require__) { 11096 11097 var $export = __webpack_require__(31); 11098 // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) 11099 $export($export.S + $export.F * !__webpack_require__(30), 'Object', {defineProperties: __webpack_require__(140)}); 11100 11101/***/ }, 11102/* 299 */, 11103/* 300 */, 11104/* 301 */, 11105/* 302 */, 11106/* 303 */
vendor: 8,779 bytes, lines 11107-11344
11107/***/ function(module, exports) { 11108 11109 11110 11111/***/ }, 11112/* 304 */ 11113/***/ function(module, exports, __webpack_require__) { 11114 11115 'use strict'; 11116 var $at = __webpack_require__(292)(true); 11117 11118 // 21.1.3.27 String.prototype[@@iterator]() 11119 __webpack_require__(139)(String, 'String', function(iterated){ 11120 this._t = String(iterated); // target 11121 this._i = 0; // next index 11122 // 21.1.5.2.1 %StringIteratorPrototype%.next() 11123 }, function(){ 11124 var O = this._t 11125 , index = this._i 11126 , point; 11127 if(index >= O.length)return {value: undefined, done: true}; 11128 point = $at(O, index); 11129 this._i += point.length; 11130 return {value: point, done: false}; 11131 }); 11132 11133/***/ }, 11134/* 305 */ 11135/***/ function(module, exports, __webpack_require__) { 11136 11137 'use strict'; 11138 // ECMAScript 6 symbols shim 11139 var global = __webpack_require__(32) 11140 , has = __webpack_require__(39) 11141 , DESCRIPTORS = __webpack_require__(30) 11142 , $export = __webpack_require__(31) 11143 , redefine = __webpack_require__(146) 11144 , META = __webpack_require__(288).KEY 11145 , $fails = __webpack_require__(46) 11146 , shared = __webpack_require__(90) 11147 , setToStringTag = __webpack_require__(88) 11148 , uid = __webpack_require__(66) 11149 , wks = __webpack_require__(49) 11150 , wksExt = __webpack_require__(94) 11151 , wksDefine = __webpack_require__(93) 11152 , keyOf = __webpack_require__(287) 11153 , enumKeys = __webpack_require__(282) 11154 , isArray = __webpack_require__(284) 11155 , anObject = __webpack_require__(55) 11156 , toIObject = __webpack_require__(41) 11157 , toPrimitive = __webpack_require__(92) 11158 , createDesc = __webpack_require__(64) 11159 , _create = __webpack_require__(86) 11160 , gOPNExt = __webpack_require__(290) 11161 , $GOPD = __webpack_require__(141) 11162 , $DP = __webpack_require__(40) 11163 , $keys = __webpack_require__(48) 11164 , gOPD = $GOPD.f 11165 , dP = $DP.f 11166 , gOPN = gOPNExt.f 11167 , $Symbol = global.Symbol 11168 , $JSON = global.JSON 11169 , _stringify = $JSON && $JSON.stringify 11170 , PROTOTYPE = 'prototype' 11171 , HIDDEN = wks('_hidden') 11172 , TO_PRIMITIVE = wks('toPrimitive') 11173 , isEnum = {}.propertyIsEnumerable 11174 , SymbolRegistry = shared('symbol-registry') 11175 , AllSymbols = shared('symbols') 11176 , OPSymbols = shared('op-symbols') 11177 , ObjectProto = Object[PROTOTYPE] 11178 , USE_NATIVE = typeof $Symbol == 'function' 11179 , QObject = global.QObject; 11180 // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 11181 var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; 11182 11183 // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 11184 var setSymbolDesc = DESCRIPTORS && $fails(function(){ 11185 return _create(dP({}, 'a', { 11186 get: function(){ return dP(this, 'a', {value: 7}).a; } 11187 })).a != 7; 11188 }) ? function(it, key, D){ 11189 var protoDesc = gOPD(ObjectProto, key); 11190 if(protoDesc)delete ObjectProto[key]; 11191 dP(it, key, D); 11192 if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); 11193 } : dP; 11194 11195 var wrap = function(tag){ 11196 var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); 11197 sym._k = tag; 11198 return sym; 11199 }; 11200 11201 var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ 11202 return typeof it == 'symbol'; 11203 } : function(it){ 11204 return it instanceof $Symbol; 11205 }; 11206 11207 var $defineProperty = function defineProperty(it, key, D){ 11208 if(it === ObjectProto)$defineProperty(OPSymbols, key, D); 11209 anObject(it); 11210 key = toPrimitive(key, true); 11211 anObject(D); 11212 if(has(AllSymbols, key)){ 11213 if(!D.enumerable){ 11214 if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); 11215 it[HIDDEN][key] = true; 11216 } else { 11217 if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; 11218 D = _create(D, {enumerable: createDesc(0, false)}); 11219 } return setSymbolDesc(it, key, D); 11220 } return dP(it, key, D); 11221 }; 11222 var $defineProperties = function defineProperties(it, P){ 11223 anObject(it); 11224 var keys = enumKeys(P = toIObject(P)) 11225 , i = 0 11226 , l = keys.length 11227 , key; 11228 while(l > i)$defineProperty(it, key = keys[i++], P[key]); 11229 return it; 11230 }; 11231 var $create = function create(it, P){ 11232 return P === undefined ? _create(it) : $defineProperties(_create(it), P); 11233 }; 11234 var $propertyIsEnumerable = function propertyIsEnumerable(key){ 11235 var E = isEnum.call(this, key = toPrimitive(key, true)); 11236 if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; 11237 return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; 11238 }; 11239 var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ 11240 it = toIObject(it); 11241 key = toPrimitive(key, true); 11242 if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; 11243 var D = gOPD(it, key); 11244 if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; 11245 return D; 11246 }; 11247 var $getOwnPropertyNames = function getOwnPropertyNames(it){ 11248 var names = gOPN(toIObject(it)) 11249 , result = [] 11250 , i = 0 11251 , key; 11252 while(names.length > i){ 11253 if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); 11254 } return result; 11255 }; 11256 var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ 11257 var IS_OP = it === ObjectProto 11258 , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) 11259 , result = [] 11260 , i = 0 11261 , key; 11262 while(names.length > i){ 11263 if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); 11264 } return result; 11265 }; 11266 11267 // 19.4.1.1 Symbol([description]) 11268 if(!USE_NATIVE){ 11269 $Symbol = function Symbol(){ 11270 if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); 11271 var tag = uid(arguments.length > 0 ? arguments[0] : undefined); 11272 var $set = function(value){ 11273 if(this === ObjectProto)$set.call(OPSymbols, value); 11274 if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; 11275 setSymbolDesc(this, tag, createDesc(1, value)); 11276 }; 11277 if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); 11278 return wrap(tag); 11279 }; 11280 redefine($Symbol[PROTOTYPE], 'toString', function toString(){ 11281 return this._k; 11282 }); 11283 11284 $GOPD.f = $getOwnPropertyDescriptor; 11285 $DP.f = $defineProperty; 11286 __webpack_require__(142).f = gOPNExt.f = $getOwnPropertyNames; 11287 __webpack_require__(63).f = $propertyIsEnumerable; 11288 __webpack_require__(87).f = $getOwnPropertySymbols; 11289 11290 if(DESCRIPTORS && !__webpack_require__(85)){ 11291 redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); 11292 } 11293 11294 wksExt.f = function(name){ 11295 return wrap(wks(name)); 11296 } 11297 } 11298 11299 $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); 11300 11301 for(var symbols = ( 11302 // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 11303 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' 11304 ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); 11305 11306 for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); 11307 11308 $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { 11309 // 19.4.2.1 Symbol.for(key) 11310 'for': function(key){ 11311 return has(SymbolRegistry, key += '') 11312 ? SymbolRegistry[key] 11313 : SymbolRegistry[key] = $Symbol(key); 11314 }, 11315 // 19.4.2.5 Symbol.keyFor(sym) 11316 keyFor: function keyFor(key){ 11317 if(isSymbol(key))return keyOf(SymbolRegistry, key); 11318 throw TypeError(key + ' is not a symbol!'); 11319 }, 11320 useSetter: function(){ setter = true; }, 11321 useSimple: function(){ setter = false; } 11322 }); 11323 11324 $export($export.S + $export.F * !USE_NATIVE, 'Object', { 11325 // 19.1.2.2 Object.create(O [, Properties]) 11326 create: $create, 11327 // 19.1.2.4 Object.defineProperty(O, P, Attributes) 11328 defineProperty: $defineProperty, 11329 // 19.1.2.3 Object.defineProperties(O, Properties) 11330 defineProperties: $defineProperties, 11331 // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) 11332 getOwnPropertyDescriptor: $getOwnPropertyDescriptor, 11333 // 19.1.2.7 Object.getOwnPropertyNames(O) 11334 getOwnPropertyNames: $getOwnPropertyNames, 11335 // 19.1.2.8 Object.getOwnPropertySymbols(O) 11336 getOwnPropertySymbols: $getOwnPropertySymbols 11337 }); 11338 11339 // 24.3.2 JSON.stringify(value [, replacer [, space]]) 11340 $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ 11341 var S = $Symbol(); 11342 // MS Edge converts symbol values to JSON as {} 11343 // WebKit converts symbol values to JSON as null 11344 // V8 throws on boxed symbols
vendor: 14,494 bytes, lines 11345-11880
11345 return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; 11346 })), 'JSON', { 11347 stringify: function stringify(it){ 11348 if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined 11349 var args = [it] 11350 , i = 1 11351 , replacer, $replacer; 11352 while(arguments.length > i)args.push(arguments[i++]); 11353 replacer = args[1]; 11354 if(typeof replacer == 'function')$replacer = replacer; 11355 if($replacer || !isArray(replacer))replacer = function(key, value){ 11356 if($replacer)value = $replacer.call(this, key, value); 11357 if(!isSymbol(value))return value; 11358 }; 11359 args[1] = replacer; 11360 return _stringify.apply($JSON, args); 11361 } 11362 }); 11363 11364 // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) 11365 $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(47)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); 11366 // 19.4.3.5 Symbol.prototype[@@toStringTag] 11367 setToStringTag($Symbol, 'Symbol'); 11368 // 20.2.1.9 Math[@@toStringTag] 11369 setToStringTag(Math, 'Math', true); 11370 // 24.3.3 JSON[@@toStringTag] 11371 setToStringTag(global.JSON, 'JSON', true); 11372 11373/***/ }, 11374/* 306 */ 11375/***/ function(module, exports, __webpack_require__) { 11376 11377 __webpack_require__(93)('asyncIterator'); 11378 11379/***/ }, 11380/* 307 */ 11381/***/ function(module, exports, __webpack_require__) { 11382 11383 __webpack_require__(93)('observable'); 11384 11385/***/ }, 11386/* 308 */ 11387/***/ function(module, exports, __webpack_require__) { 11388 11389 __webpack_require__(295); 11390 var global = __webpack_require__(32) 11391 , hide = __webpack_require__(47) 11392 , Iterators = __webpack_require__(84) 11393 , TO_STRING_TAG = __webpack_require__(49)('toStringTag'); 11394 11395 for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ 11396 var NAME = collections[i] 11397 , Collection = global[NAME] 11398 , proto = Collection && Collection.prototype; 11399 if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); 11400 Iterators[NAME] = Iterators.Array; 11401 } 11402 11403/***/ }, 11404/* 309 */ 11405/***/ function(module, exports, __webpack_require__) { 11406 11407 'use strict'; 11408 11409 var assign = __webpack_require__(311) 11410 , normalizeOpts = __webpack_require__(318) 11411 , isCallable = __webpack_require__(314) 11412 , contains = __webpack_require__(320) 11413 11414 , d; 11415 11416 d = module.exports = function (dscr, value/*, options*/) { 11417 var c, e, w, options, desc; 11418 if ((arguments.length < 2) || (typeof dscr !== 'string')) { 11419 options = value; 11420 value = dscr; 11421 dscr = null; 11422 } else { 11423 options = arguments[2]; 11424 } 11425 if (dscr == null) { 11426 c = w = true; 11427 e = false; 11428 } else { 11429 c = contains.call(dscr, 'c'); 11430 e = contains.call(dscr, 'e'); 11431 w = contains.call(dscr, 'w'); 11432 } 11433 11434 desc = { value: value, configurable: c, enumerable: e, writable: w }; 11435 return !options ? desc : assign(normalizeOpts(options), desc); 11436 }; 11437 11438 d.gs = function (dscr, get, set/*, options*/) { 11439 var c, e, options, desc; 11440 if (typeof dscr !== 'string') { 11441 options = set; 11442 set = get; 11443 get = dscr; 11444 dscr = null; 11445 } else { 11446 options = arguments[3]; 11447 } 11448 if (get == null) { 11449 get = undefined; 11450 } else if (!isCallable(get)) { 11451 options = get; 11452 get = set = undefined; 11453 } else if (set == null) { 11454 set = undefined; 11455 } else if (!isCallable(set)) { 11456 options = set; 11457 set = undefined; 11458 } 11459 if (dscr == null) { 11460 c = true; 11461 e = false; 11462 } else { 11463 c = contains.call(dscr, 'c'); 11464 e = contains.call(dscr, 'e'); 11465 } 11466 11467 desc = { get: get, set: set, configurable: c, enumerable: e }; 11468 return !options ? desc : assign(normalizeOpts(options), desc); 11469 }; 11470 11471 11472/***/ }, 11473/* 310 */ 11474/***/ function(module, exports) { 11475 11476 'use strict'; 11477 11478 module.exports = new Function("return this")(); 11479 11480 11481/***/ }, 11482/* 311 */ 11483/***/ function(module, exports, __webpack_require__) { 11484 11485 'use strict'; 11486 11487 module.exports = __webpack_require__(312)() 11488 ? Object.assign 11489 : __webpack_require__(313); 11490 11491 11492/***/ }, 11493/* 312 */ 11494/***/ function(module, exports) { 11495 11496 'use strict'; 11497 11498 module.exports = function () { 11499 var assign = Object.assign, obj; 11500 if (typeof assign !== 'function') return false; 11501 obj = { foo: 'raz' }; 11502 assign(obj, { bar: 'dwa' }, { trzy: 'trzy' }); 11503 return (obj.foo + obj.bar + obj.trzy) === 'razdwatrzy'; 11504 }; 11505 11506 11507/***/ }, 11508/* 313 */ 11509/***/ function(module, exports, __webpack_require__) { 11510 11511 'use strict'; 11512 11513 var keys = __webpack_require__(315) 11514 , value = __webpack_require__(319) 11515 11516 , max = Math.max; 11517 11518 module.exports = function (dest, src/*, …srcn*/) { 11519 var error, i, l = max(arguments.length, 2), assign; 11520 dest = Object(value(dest)); 11521 assign = function (key) { 11522 try { dest[key] = src[key]; } catch (e) { 11523 if (!error) error = e; 11524 } 11525 }; 11526 for (i = 1; i < l; ++i) { 11527 src = arguments[i]; 11528 keys(src).forEach(assign); 11529 } 11530 if (error !== undefined) throw error; 11531 return dest; 11532 }; 11533 11534 11535/***/ }, 11536/* 314 */ 11537/***/ function(module, exports) { 11538 11539 // Deprecated 11540 11541 'use strict'; 11542 11543 module.exports = function (obj) { return typeof obj === 'function'; }; 11544 11545 11546/***/ }, 11547/* 315 */ 11548/***/ function(module, exports, __webpack_require__) { 11549 11550 'use strict'; 11551 11552 module.exports = __webpack_require__(316)() 11553 ? Object.keys 11554 : __webpack_require__(317); 11555 11556 11557/***/ }, 11558/* 316 */ 11559/***/ function(module, exports) { 11560 11561 'use strict'; 11562 11563 module.exports = function () { 11564 try { 11565 Object.keys('primitive'); 11566 return true; 11567 } catch (e) { return false; } 11568 }; 11569 11570 11571/***/ }, 11572/* 317 */ 11573/***/ function(module, exports) { 11574 11575 'use strict'; 11576 11577 var keys = Object.keys; 11578 11579 module.exports = function (object) { 11580 return keys(object == null ? object : Object(object)); 11581 }; 11582 11583 11584/***/ }, 11585/* 318 */ 11586/***/ function(module, exports) { 11587 11588 'use strict'; 11589 11590 var forEach = Array.prototype.forEach, create = Object.create; 11591 11592 var process = function (src, obj) { 11593 var key; 11594 for (key in src) obj[key] = src[key]; 11595 }; 11596 11597 module.exports = function (options/*, …options*/) { 11598 var result = create(null); 11599 forEach.call(arguments, function (options) { 11600 if (options == null) return; 11601 process(Object(options), result); 11602 }); 11603 return result; 11604 }; 11605 11606 11607/***/ }, 11608/* 319 */ 11609/***/ function(module, exports) { 11610 11611 'use strict'; 11612 11613 module.exports = function (value) { 11614 if (value == null) throw new TypeError("Cannot use null or undefined"); 11615 return value; 11616 }; 11617 11618 11619/***/ }, 11620/* 320 */ 11621/***/ function(module, exports, __webpack_require__) { 11622 11623 'use strict'; 11624 11625 module.exports = __webpack_require__(321)() 11626 ? String.prototype.contains 11627 : __webpack_require__(322); 11628 11629 11630/***/ }, 11631/* 321 */ 11632/***/ function(module, exports) { 11633 11634 'use strict'; 11635 11636 var str = 'razdwatrzy'; 11637 11638 module.exports = function () { 11639 if (typeof str.contains !== 'function') return false; 11640 return ((str.contains('dwa') === true) && (str.contains('foo') === false)); 11641 }; 11642 11643 11644/***/ }, 11645/* 322 */ 11646/***/ function(module, exports) { 11647 11648 'use strict'; 11649 11650 var indexOf = String.prototype.indexOf; 11651 11652 module.exports = function (searchString/*, position*/) { 11653 return indexOf.call(this, searchString, arguments[1]) > -1; 11654 }; 11655 11656 11657/***/ }, 11658/* 323 */ 11659/***/ function(module, exports, __webpack_require__) { 11660 11661 'use strict'; 11662 11663 if (!__webpack_require__(324)()) { 11664 Object.defineProperty(__webpack_require__(310), 'Symbol', 11665 { value: __webpack_require__(326), configurable: true, enumerable: false, 11666 writable: true }); 11667 } 11668 11669 11670/***/ }, 11671/* 324 */ 11672/***/ function(module, exports) { 11673 11674 'use strict'; 11675 11676 var validTypes = { object: true, symbol: true }; 11677 11678 module.exports = function () { 11679 var symbol; 11680 if (typeof Symbol !== 'function') return false; 11681 symbol = Symbol('test symbol'); 11682 try { String(symbol); } catch (e) { return false; } 11683 11684 // Return 'true' also for polyfills 11685 if (!validTypes[typeof Symbol.iterator]) return false; 11686 if (!validTypes[typeof Symbol.toPrimitive]) return false; 11687 if (!validTypes[typeof Symbol.toStringTag]) return false; 11688 11689 return true; 11690 }; 11691 11692 11693/***/ }, 11694/* 325 */ 11695/***/ function(module, exports) { 11696 11697 'use strict'; 11698 11699 module.exports = function (x) { 11700 if (!x) return false; 11701 if (typeof x === 'symbol') return true; 11702 if (!x.constructor) return false; 11703 if (x.constructor.name !== 'Symbol') return false; 11704 return (x[x.constructor.toStringTag] === 'Symbol'); 11705 }; 11706 11707 11708/***/ }, 11709/* 326 */ 11710/***/ function(module, exports, __webpack_require__) { 11711 11712 // ES2015 Symbol polyfill for environments that do not support it (or partially support it) 11713 11714 'use strict'; 11715 11716 var d = __webpack_require__(309) 11717 , validateSymbol = __webpack_require__(327) 11718 11719 , create = Object.create, defineProperties = Object.defineProperties 11720 , defineProperty = Object.defineProperty, objPrototype = Object.prototype 11721 , NativeSymbol, SymbolPolyfill, HiddenSymbol, globalSymbols = create(null) 11722 , isNativeSafe; 11723 11724 if (typeof Symbol === 'function') { 11725 NativeSymbol = Symbol; 11726 try { 11727 String(NativeSymbol()); 11728 isNativeSafe = true; 11729 } catch (ignore) {} 11730 } 11731 11732 var generateName = (function () { 11733 var created = create(null); 11734 return function (desc) { 11735 var postfix = 0, name, ie11BugWorkaround; 11736 while (created[desc + (postfix || '')]) ++postfix; 11737 desc += (postfix || ''); 11738 created[desc] = true; 11739 name = '@@' + desc; 11740 defineProperty(objPrototype, name, d.gs(null, function (value) { 11741 // For IE11 issue see: 11742 // https://connect.microsoft.com/IE/feedbackdetail/view/1928508/ 11743 // ie11-broken-getters-on-dom-objects 11744 // https://github.com/medikoo/es6-symbol/issues/12 11745 if (ie11BugWorkaround) return; 11746 ie11BugWorkaround = true; 11747 defineProperty(this, name, d(value)); 11748 ie11BugWorkaround = false; 11749 })); 11750 return name; 11751 }; 11752 }()); 11753 11754 // Internal constructor (not one exposed) for creating Symbol instances. 11755 // This one is used to ensure that `someSymbol instanceof Symbol` always return false 11756 HiddenSymbol = function Symbol(description) { 11757 if (this instanceof HiddenSymbol) throw new TypeError('TypeError: Symbol is not a constructor'); 11758 return SymbolPolyfill(description); 11759 }; 11760 11761 // Exposed `Symbol` constructor 11762 // (returns instances of HiddenSymbol) 11763 module.exports = SymbolPolyfill = function Symbol(description) { 11764 var symbol; 11765 if (this instanceof Symbol) throw new TypeError('TypeError: Symbol is not a constructor'); 11766 if (isNativeSafe) return NativeSymbol(description); 11767 symbol = create(HiddenSymbol.prototype); 11768 description = (description === undefined ? '' : String(description)); 11769 return defineProperties(symbol, { 11770 __description__: d('', description), 11771 __name__: d('', generateName(description)) 11772 }); 11773 }; 11774 defineProperties(SymbolPolyfill, { 11775 for: d(function (key) { 11776 if (globalSymbols[key]) return globalSymbols[key]; 11777 return (globalSymbols[key] = SymbolPolyfill(String(key))); 11778 }), 11779 keyFor: d(function (s) { 11780 var key; 11781 validateSymbol(s); 11782 for (key in globalSymbols) if (globalSymbols[key] === s) return key; 11783 }), 11784 11785 // If there's native implementation of given symbol, let's fallback to it 11786 // to ensure proper interoperability with other native functions e.g. Array.from 11787 hasInstance: d('', (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill('hasInstance')), 11788 isConcatSpreadable: d('', (NativeSymbol && NativeSymbol.isConcatSpreadable) || 11789 SymbolPolyfill('isConcatSpreadable')), 11790 iterator: d('', (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill('iterator')), 11791 match: d('', (NativeSymbol && NativeSymbol.match) || SymbolPolyfill('match')), 11792 replace: d('', (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill('replace')), 11793 search: d('', (NativeSymbol && NativeSymbol.search) || SymbolPolyfill('search')), 11794 species: d('', (NativeSymbol && NativeSymbol.species) || SymbolPolyfill('species')), 11795 split: d('', (NativeSymbol && NativeSymbol.split) || SymbolPolyfill('split')), 11796 toPrimitive: d('', (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill('toPrimitive')), 11797 toStringTag: d('', (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill('toStringTag')), 11798 unscopables: d('', (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill('unscopables')) 11799 }); 11800 11801 // Internal tweaks for real symbol producer 11802 defineProperties(HiddenSymbol.prototype, { 11803 constructor: d(SymbolPolyfill), 11804 toString: d('', function () { return this.__name__; }) 11805 }); 11806 11807 // Proper implementation of methods exposed on Symbol.prototype 11808 // They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype 11809 defineProperties(SymbolPolyfill.prototype, { 11810 toString: d(function () { return 'Symbol (' + validateSymbol(this).__description__ + ')'; }), 11811 valueOf: d(function () { return validateSymbol(this); }) 11812 }); 11813 defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d('', function () { 11814 var symbol = validateSymbol(this); 11815 if (typeof symbol === 'symbol') return symbol; 11816 return symbol.toString(); 11817 })); 11818 defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d('c', 'Symbol')); 11819 11820 // Proper implementaton of toPrimitive and toStringTag for returned symbol instances 11821 defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag, 11822 d('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag])); 11823 11824 // Note: It's important to define `toPrimitive` as last one, as some implementations 11825 // implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols) 11826 // And that may invoke error in definition flow: 11827 // See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149 11828 defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, 11829 d('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive])); 11830 11831 11832/***/ }, 11833/* 327 */ 11834/***/ function(module, exports, __webpack_require__) { 11835 11836 'use strict'; 11837 11838 var isSymbol = __webpack_require__(325); 11839 11840 module.exports = function (value) { 11841 if (!isSymbol(value)) throw new TypeError(value + " is not a symbol"); 11842 return value; 11843 }; 11844 11845 11846/***/ }, 11847/* 328 */ 11848/***/ function(module, exports, __webpack_require__) { 11849 11850 /* WEBPACK VAR INJECTION */(function(global) {module.exports = global["$"] = __webpack_require__(329); 11851 /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) 11852 11853/***/ }, 11854/* 329 */ 11855/***/ function(module, exports, __webpack_require__) { 11856 11857 /* WEBPACK VAR INJECTION */(function(global) {module.exports = global["jQuery"] = __webpack_require__(2); 11858 /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) 11859 11860/***/ }, 11861/* 330 */, 11862/* 331 */, 11863/* 332 */, 11864/* 333 */, 11865/* 334 */, 11866/* 335 */, 11867/* 336 */, 11868/* 337 */, 11869/* 338 */, 11870/* 339 */, 11871/* 340 */, 11872/* 341 */, 11873/* 342 */, 11874/* 343 */, 11875/* 344 */, 11876/* 345 */ 11877/***/ function(module, exports, __webpack_require__) { 11878 11879 /* WEBPACK VAR INJECTION */(function(jQuery) {/*** IMPORTS FROM imports-loader ***/ 11880 var define = false;
vendor: 14,757 bytes, lines 11881-12229
11881 var exports = false; 11882 11883 'use strict'; 11884 11885 var _typeof2 = __webpack_require__(20); 11886 11887 var _typeof3 = _interopRequireDefault(_typeof2); 11888 11889 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11890 11891 /* 11892 * Project: Bootstrap Notify = v3.0.0 11893 * Description: Turns standard Bootstrap alerts into "Growl-like" notifications. 11894 * Author: Mouse0270 aka Robert McIntosh 11895 * License: MIT License 11896 * Website: https://github.com/mouse0270/bootstrap-growl 11897 */ 11898 (function (factory) { 11899 if (typeof define === 'function' && define.amd) { 11900 // AMD. Register as an anonymous module. 11901 define(['jquery'], factory); 11902 } else if ((typeof exports === 'undefined' ? 'undefined' : (0, _typeof3.default)(exports)) === 'object') { 11903 // Node/CommonJS 11904 factory(__webpack_require__(2)); 11905 } else { 11906 // Browser globals 11907 factory(jQuery); 11908 } 11909 })(function ($) { 11910 // Create the defaults once 11911 var defaults = { 11912 element: 'body', 11913 position: null, 11914 type: "info", 11915 allow_dismiss: true, 11916 newest_on_top: false, 11917 placement: { 11918 from: "top", 11919 align: "right" 11920 }, 11921 offset: 20, 11922 spacing: 10, 11923 z_index: 1031, 11924 delay: 5000, 11925 timer: 1000, 11926 url_target: '_blank', 11927 mouse_over: null, 11928 animate: { 11929 enter: 'animated fadeInDown', 11930 exit: 'animated fadeOutUp' 11931 }, 11932 onShow: null, 11933 onShown: null, 11934 onClose: null, 11935 onClosed: null, 11936 icon_type: 'class', 11937 template: '<div data-notify="container" class="col-xs-11 col-sm-4 alert alert-{0}" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss">×</button><span data-notify="icon"></span> <span data-notify="title">{1}</span> <span data-notify="message">{2}</span><div class="progress" data-notify="progressbar"><div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div><a href="{3}" target="{4}" data-notify="url"></a></div>' 11938 }; 11939 11940 String.format = function () { 11941 var str = arguments[0]; 11942 for (var i = 1; i < arguments.length; i++) { 11943 str = str.replace(RegExp("\\{" + (i - 1) + "\\}", "gm"), arguments[i]); 11944 } 11945 return str; 11946 }; 11947 11948 function Notify(element, content, options) { 11949 // Setup Content of Notify 11950 var content = { 11951 content: { 11952 message: (typeof content === 'undefined' ? 'undefined' : (0, _typeof3.default)(content)) == 'object' ? content.message : content, 11953 title: content.title ? content.title : '', 11954 icon: content.icon ? content.icon : '', 11955 url: content.url ? content.url : '#', 11956 target: content.target ? content.target : '-' 11957 } 11958 }; 11959 11960 options = $.extend(true, {}, content, options); 11961 this.settings = $.extend(true, {}, defaults, options); 11962 this._defaults = defaults; 11963 if (this.settings.content.target == "-") { 11964 this.settings.content.target = this.settings.url_target; 11965 } 11966 this.animations = { 11967 start: 'webkitAnimationStart oanimationstart MSAnimationStart animationstart', 11968 end: 'webkitAnimationEnd oanimationend MSAnimationEnd animationend' 11969 }; 11970 11971 if (typeof this.settings.offset == 'number') { 11972 this.settings.offset = { 11973 x: this.settings.offset, 11974 y: this.settings.offset 11975 }; 11976 } 11977 11978 this.init(); 11979 } 11980 11981 $.extend(Notify.prototype, { 11982 init: function init() { 11983 var self = this; 11984 11985 this.buildNotify(); 11986 if (this.settings.content.icon) { 11987 this.setIcon(); 11988 } 11989 if (this.settings.content.url != "#") { 11990 this.styleURL(); 11991 } 11992 this.placement(); 11993 this.bind(); 11994 11995 this.notify = { 11996 $ele: this.$ele, 11997 update: function update(command, _update) { 11998 switch (command) { 11999 case "type": 12000 this.$ele.removeClass('alert-' + self.settings.type); 12001 this.$ele.find('[data-notify="progressbar"] > .progress-bar').removeClass('progress-bar-' + self.settings.type); 12002 self.settings.type = _update; 12003 this.$ele.addClass('alert-' + _update).find('[data-notify="progressbar"] > .progress-bar').addClass('progress-bar-' + _update); 12004 break; 12005 case "icon": 12006 var $icon = this.$ele.find('[data-notify="icon"]'); 12007 if (self.settings.icon_type.toLowerCase() == 'class') { 12008 $icon.removeClass(self.settings.content.icon).addClass(_update); 12009 } else { 12010 if (!$icon.is('img')) { 12011 $icon.find('img'); 12012 } 12013 $icon.attr('src', _update); 12014 } 12015 break; 12016 case "url": 12017 this.$ele.find('[data-notify="url"]').attr('href', _update); 12018 break; 12019 case "target": 12020 this.$ele.find('[data-notify="url"]').attr('target', _update); 12021 break; 12022 default: 12023 this.$ele.find('[data-notify="' + command + '"]').html(_update); 12024 } 12025 var posX = this.$ele.outerHeight() + parseInt(self.settings.spacing) + parseInt(self.settings.offset.y); 12026 self.reposition(posX); 12027 }, 12028 close: function close() { 12029 self.close(); 12030 } 12031 }; 12032 }, 12033 buildNotify: function buildNotify() { 12034 var content = this.settings.content; 12035 this.$ele = $(String.format(this.settings.template, this.settings.type, content.title, content.message, content.url, content.target)); 12036 this.$ele.attr('data-notify-position', this.settings.placement.from + '-' + this.settings.placement.align); 12037 if (!this.settings.allow_dismiss) { 12038 this.$ele.find('[data-notify="dismiss"]').css('display', 'none'); 12039 } 12040 if (this.settings.delay <= 0) { 12041 this.$ele.find('[data-notify="progressbar"]').remove(); 12042 } 12043 }, 12044 setIcon: function setIcon() { 12045 if (this.settings.icon_type.toLowerCase() == 'class') { 12046 this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon); 12047 } else { 12048 if (this.$ele.find('[data-notify="icon"]').is('img')) { 12049 this.$ele.find('[data-notify="icon"]').attr('src', this.settings.content.icon); 12050 } else { 12051 this.$ele.find('[data-notify="icon"]').append('<img src="' + this.settings.content.icon + '" alt="Notify Icon" />'); 12052 } 12053 } 12054 }, 12055 styleURL: function styleURL() { 12056 this.$ele.find('[data-notify="url"]').css({ 12057 backgroundImage: 'url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)', 12058 height: '100%', 12059 left: '0px', 12060 position: 'absolute', 12061 top: '0px', 12062 width: '100%', 12063 zIndex: this.settings.z_index + 1 12064 }); 12065 this.$ele.find('[data-notify="dismiss"]').css({ 12066 position: 'absolute', 12067 right: '10px', 12068 top: '5px', 12069 zIndex: this.settings.z_index + 2 12070 }); 12071 }, 12072 placement: function placement() { 12073 var self = this, 12074 offsetAmt = this.settings.offset.y, 12075 css = { 12076 display: 'inline-block', 12077 margin: '0px auto', 12078 position: this.settings.position ? this.settings.position : this.settings.element === 'body' ? 'fixed' : 'absolute', 12079 transition: 'all .5s ease-in-out', 12080 zIndex: this.settings.z_index 12081 }, 12082 hasAnimation = false, 12083 settings = this.settings; 12084 12085 $('[data-notify-position="' + this.settings.placement.from + '-' + this.settings.placement.align + '"]:not([data-closing="true"])').each(function () { 12086 return offsetAmt = Math.max(offsetAmt, parseInt($(this).css(settings.placement.from)) + parseInt($(this).outerHeight()) + parseInt(settings.spacing)); 12087 }); 12088 if (this.settings.newest_on_top === true) { 12089 offsetAmt = this.settings.offset.y; 12090 } 12091 css[this.settings.placement.from] = offsetAmt + 'px'; 12092 12093 switch (this.settings.placement.align) { 12094 case "left": 12095 case "right": 12096 css[this.settings.placement.align] = this.settings.offset.x + 'px'; 12097 break; 12098 case "center": 12099 css.left = 0; 12100 css.right = 0; 12101 break; 12102 } 12103 this.$ele.css(css).addClass(this.settings.animate.enter); 12104 12105 $(this.settings.element).append(this.$ele); 12106 12107 if (this.settings.newest_on_top === true) { 12108 offsetAmt = parseInt(offsetAmt) + parseInt(this.settings.spacing) + this.$ele.outerHeight(); 12109 this.reposition(offsetAmt); 12110 } 12111 12112 if ($.isFunction(self.settings.onShow)) { 12113 self.settings.onShow.call(this.$ele); 12114 } 12115 12116 this.$ele.one(this.animations.start, function (event) { 12117 hasAnimation = true; 12118 }).one(this.animations.end, function (event) { 12119 if ($.isFunction(self.settings.onShown)) { 12120 self.settings.onShown.call(this); 12121 } 12122 }); 12123 12124 setTimeout(function () { 12125 if (!hasAnimation) { 12126 if ($.isFunction(self.settings.onShown)) { 12127 self.settings.onShown.call(this); 12128 } 12129 } 12130 }, 600); 12131 }, 12132 bind: function bind() { 12133 var self = this; 12134 12135 this.$ele.find('[data-notify="dismiss"]').on('click', function (event) { 12136 event.preventDefault(); // stop the annoying jump! 12137 self.close(); 12138 }); 12139 12140 this.$ele.mouseover(function (e) { 12141 $(this).data('data-hover', "true"); 12142 }).mouseout(function (e) { 12143 $(this).data('data-hover', "false"); 12144 }); 12145 this.$ele.data('data-hover', "false"); 12146 12147 if (this.settings.delay > 0) { 12148 self.$ele.data('notify-delay', self.settings.delay); 12149 var timer = setInterval(function () { 12150 var delay = parseInt(self.$ele.data('notify-delay')) - self.settings.timer; 12151 if (self.$ele.data('data-hover') === 'false' && self.settings.mouse_over == "pause" || self.settings.mouse_over != "pause") { 12152 var percent = (self.settings.delay - delay) / self.settings.delay * 100; 12153 self.$ele.data('notify-delay', delay); 12154 self.$ele.find('[data-notify="progressbar"] > div').attr('aria-valuenow', percent).css('width', percent + '%'); 12155 } 12156 if (delay <= -self.settings.timer) { 12157 clearInterval(timer); 12158 self.close(); 12159 } 12160 }, self.settings.timer); 12161 } 12162 }, 12163 close: function close() { 12164 var self = this, 12165 $successors = null, 12166 posX = parseInt(this.$ele.css(this.settings.placement.from)), 12167 hasAnimation = false; 12168 12169 this.$ele.data('closing', 'true').addClass(this.settings.animate.exit); 12170 self.reposition(posX); 12171 12172 if ($.isFunction(self.settings.onClose)) { 12173 self.settings.onClose.call(this.$ele); 12174 } 12175 12176 this.$ele.one(this.animations.start, function (event) { 12177 hasAnimation = true; 12178 }).one(this.animations.end, function (event) { 12179 $(this).remove(); 12180 if ($.isFunction(self.settings.onClosed)) { 12181 self.settings.onClosed.call(this); 12182 } 12183 }); 12184 12185 setTimeout(function () { 12186 if (!hasAnimation) { 12187 self.$ele.remove(); 12188 if (self.settings.onClosed) { 12189 self.settings.onClosed(self.$ele); 12190 } 12191 } 12192 }, 600); 12193 }, 12194 reposition: function reposition(posX) { 12195 var self = this, 12196 notifies = '[data-notify-position="' + this.settings.placement.from + '-' + this.settings.placement.align + '"]:not([data-closing="true"])', 12197 $elements = this.$ele.nextAll(notifies); 12198 if (this.settings.newest_on_top === true) { 12199 $elements = this.$ele.prevAll(notifies); 12200 } 12201 $elements.each(function () { 12202 $(this).css(self.settings.placement.from, posX); 12203 posX = parseInt(posX) + parseInt(self.settings.spacing) + $(this).outerHeight(); 12204 }); 12205 } 12206 }); 12207 12208 $.notify = function (content, options) { 12209 var plugin = new Notify(this, content, options); 12210 return plugin.notify; 12211 }; 12212 $.notifyDefaults = function (options) { 12213 defaults = $.extend(true, {}, defaults, options); 12214 return defaults; 12215 }; 12216 $.notifyClose = function (command) { 12217 if (typeof command === "undefined" || command == "all") { 12218 $('[data-notify]').find('[data-notify="dismiss"]').trigger('click'); 12219 } else { 12220 $('[data-notify-position="' + command + '"]').find('[data-notify="dismiss"]').trigger('click'); 12221 } 12222 }; 12223 }); 12224 12225 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) 12226 12227/***/ } 12228/******/ ]); 12229//# sourceMappingURL=vendor.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.