1/*! 2 * jQuery JavaScript Library v3.6.1 3 * https://jquery.com/ 4 * 5 * Includes Sizzle.js 6 * https://sizzlejs.com/ 7 * 8 * Copyright OpenJS Foundation and other contributors 9 * Released under the MIT license 10 * https://jquery.org/license 11 * 12 * Date: 2022-08-26T17:52Z 13 */ 14( function( global, factory ) { 15 16 "use strict"; 17 18 if ( typeof module === "object"
vendor: 6,472 bytes, lines 18-262
18 && typeof module.exports === "object" ) { 19 20 // For CommonJS and CommonJS-like environments where a proper `window` 21 // is present, execute the factory and get jQuery. 22 // For environments that do not have a `window` with a `document` 23 // (such as Node.js), expose a factory as module.exports. 24 // This accentuates the need for the creation of a real `window`. 25 // e.g. var jQuery = require("jquery")(window); 26 // See ticket trac-14549 for more info. 27 module.exports = global.document ? 28 factory( global, true ) : 29 function( w ) { 30 if ( !w.document ) { 31 throw new Error( "jQuery requires a window with a document" ); 32 } 33 return factory( w ); 34 }; 35 } else { 36 factory( global ); 37 } 38 39// Pass this if window is not defined yet 40} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { 41 42// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 43// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode 44// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common 45// enough that all such attempts are guarded in a try block. 46"use strict"; 47 48var arr = []; 49 50var getProto = Object.getPrototypeOf; 51 52var slice = arr.slice; 53 54var flat = arr.flat ? function( array ) { 55 return arr.flat.call( array ); 56} : function( array ) { 57 return arr.concat.apply( [], array ); 58}; 59 60 61var push = arr.push; 62 63var indexOf = arr.indexOf; 64 65var class2type = {}; 66 67var toString = class2type.toString; 68 69var hasOwn = class2type.hasOwnProperty; 70 71var fnToString = hasOwn.toString; 72 73var ObjectFunctionString = fnToString.call( Object ); 74 75var support = {}; 76 77var isFunction = function isFunction( obj ) { 78 79 // Support: Chrome <=57, Firefox <=52 80 // In some browsers, typeof returns "function" for HTML <object> elements 81 // (i.e., `typeof document.createElement( "object" ) === "function"`). 82 // We don't want to classify *any* DOM node as a function. 83 // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5 84 // Plus for old WebKit, typeof returns "function" for HTML collections 85 // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756) 86 return typeof obj === "function" && typeof obj.nodeType !== "number" && 87 typeof obj.item !== "function"; 88 }; 89 90 91var isWindow = function isWindow( obj ) { 92 return obj != null && obj === obj.window; 93 }; 94 95 96var document = window.document; 97 98 99 100 var preservedScriptAttributes = { 101 type: true, 102 src: true, 103 nonce: true, 104 noModule: true 105 }; 106 107 function DOMEval( code, node, doc ) { 108 doc = doc || document; 109 110 var i, val, 111 script = doc.createElement( "script" ); 112 113 script.text = code; 114 if ( node ) { 115 for ( i in preservedScriptAttributes ) { 116 117 // Support: Firefox 64+, Edge 18+ 118 // Some browsers don't support the "nonce" property on scripts. 119 // On the other hand, just using `getAttribute` is not enough as 120 // the `nonce` attribute is reset to an empty string whenever it 121 // becomes browsing-context connected. 122 // See https://github.com/whatwg/html/issues/2369 123 // See https://html.spec.whatwg.org/#nonce-attributes 124 // The `node.getAttribute` check was added for the sake of 125 // `jQuery.globalEval` so that it can fake a nonce-containing node 126 // via an object. 127 val = node[ i ] || node.getAttribute && node.getAttribute( i ); 128 if ( val ) { 129 script.setAttribute( i, val ); 130 } 131 } 132 } 133 doc.head.appendChild( script ).parentNode.removeChild( script ); 134 } 135 136 137function toType( obj ) { 138 if ( obj == null ) { 139 return obj + ""; 140 } 141 142 // Support: Android <=2.3 only (functionish RegExp) 143 return typeof obj === "object" || typeof obj === "function" ? 144 class2type[ toString.call( obj ) ] || "object" : 145 typeof obj; 146} 147/* global Symbol */ 148// Defining this global in .eslintrc.json would create a danger of using the global 149// unguarded in another place, it seems safer to define global only for this module 150 151 152 153var 154 version = "3.6.1", 155 156 // Define a local copy of jQuery 157 jQuery = function( selector, context ) { 158 159 // The jQuery object is actually just the init constructor 'enhanced' 160 // Need init if jQuery is called (just allow error to be thrown if not included) 161 return new jQuery.fn.init( selector, context ); 162 }; 163 164jQuery.fn = jQuery.prototype = { 165 166 // The current version of jQuery being used 167 jquery: version, 168 169 constructor: jQuery, 170 171 // The default length of a jQuery object is 0 172 length: 0, 173 174 toArray: function() { 175 return slice.call( this ); 176 }, 177 178 // Get the Nth element in the matched element set OR 179 // Get the whole matched element set as a clean array 180 get: function( num ) { 181 182 // Return all the elements in a clean array 183 if ( num == null ) { 184 return slice.call( this ); 185 } 186 187 // Return just the one element from the set 188 return num < 0 ? this[ num + this.length ] : this[ num ]; 189 }, 190 191 // Take an array of elements and push it onto the stack 192 // (returning the new matched element set) 193 pushStack: function( elems ) { 194 195 // Build a new jQuery matched element set 196 var ret = jQuery.merge( this.constructor(), elems ); 197 198 // Add the old object onto the stack (as a reference) 199 ret.prevObject = this; 200 201 // Return the newly-formed element set 202 return ret; 203 }, 204 205 // Execute a callback for every element in the matched set. 206 each: function( callback ) { 207 return jQuery.each( this, callback ); 208 }, 209 210 map: function( callback ) { 211 return this.pushStack( jQuery.map( this, function( elem, i ) { 212 return callback.call( elem, i, elem ); 213 } ) ); 214 }, 215 216 slice: function() { 217 return this.pushStack( slice.apply( this, arguments ) ); 218 }, 219 220 first: function() { 221 return this.eq( 0 ); 222 }, 223 224 last: function() { 225 return this.eq( -1 ); 226 }, 227 228 even: function() { 229 return this.pushStack( jQuery.grep( this, function( _elem, i ) { 230 return ( i + 1 ) % 2; 231 } ) ); 232 }, 233 234 odd: function() { 235 return this.pushStack( jQuery.grep( this, function( _elem, i ) { 236 return i % 2; 237 } ) ); 238 }, 239 240 eq: function( i ) { 241 var len = this.length, 242 j = +i + ( i < 0 ? len : 0 ); 243 return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); 244 }, 245 246 end: function() { 247 return this.prevObject || this.constructor(); 248 }, 249 250 // For internal use only. 251 // Behaves like an Array's method, not like a jQuery method. 252 push: push, 253 sort: arr.sort, 254 splice: arr.splice 255}; 256 257jQuery.extend = jQuery.fn.extend = function() { 258 var options, name, src, copy, copyIsArray, clone, 259 target = arguments[ 0 ] || {}, 260 i = 1, 261 length = arguments.length, 262 deep = false;
vendor: 78,348 bytes, lines 263-3086
263 264 // Handle a deep copy situation 265 if ( typeof target === "boolean" ) { 266 deep = target; 267 268 // Skip the boolean and the target 269 target = arguments[ i ] || {}; 270 i++; 271 } 272 273 // Handle case when target is a string or something (possible in deep copy) 274 if ( typeof target !== "object" && !isFunction( target ) ) { 275 target = {}; 276 } 277 278 // Extend jQuery itself if only one argument is passed 279 if ( i === length ) { 280 target = this; 281 i--; 282 } 283 284 for ( ; i < length; i++ ) { 285 286 // Only deal with non-null/undefined values 287 if ( ( options = arguments[ i ] ) != null ) { 288 289 // Extend the base object 290 for ( name in options ) { 291 copy = options[ name ]; 292 293 // Prevent Object.prototype pollution 294 // Prevent never-ending loop 295 if ( name === "__proto__" || target === copy ) { 296 continue; 297 } 298 299 // Recurse if we're merging plain objects or arrays 300 if ( deep && copy && ( jQuery.isPlainObject( copy ) || 301 ( copyIsArray = Array.isArray( copy ) ) ) ) { 302 src = target[ name ]; 303 304 // Ensure proper type for the source value 305 if ( copyIsArray && !Array.isArray( src ) ) { 306 clone = []; 307 } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { 308 clone = {}; 309 } else { 310 clone = src; 311 } 312 copyIsArray = false; 313 314 // Never move original objects, clone them 315 target[ name ] = jQuery.extend( deep, clone, copy ); 316 317 // Don't bring in undefined values 318 } else if ( copy !== undefined ) { 319 target[ name ] = copy; 320 } 321 } 322 } 323 } 324 325 // Return the modified object 326 return target; 327}; 328 329jQuery.extend( { 330 331 // Unique for each copy of jQuery on the page 332 expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), 333 334 // Assume jQuery is ready without the ready module 335 isReady: true, 336 337 error: function( msg ) { 338 throw new Error( msg ); 339 }, 340 341 noop: function() {}, 342 343 isPlainObject: function( obj ) { 344 var proto, Ctor; 345 346 // Detect obvious negatives 347 // Use toString instead of jQuery.type to catch host objects 348 if ( !obj || toString.call( obj ) !== "[object Object]" ) { 349 return false; 350 } 351 352 proto = getProto( obj ); 353 354 // Objects with no prototype (e.g., `Object.create( null )`) are plain 355 if ( !proto ) { 356 return true; 357 } 358 359 // Objects with prototype are plain iff they were constructed by a global Object function 360 Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; 361 return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; 362 }, 363 364 isEmptyObject: function( obj ) { 365 var name; 366 367 for ( name in obj ) { 368 return false; 369 } 370 return true; 371 }, 372 373 // Evaluates a script in a provided context; falls back to the global one 374 // if not specified. 375 globalEval: function( code, options, doc ) { 376 DOMEval( code, { nonce: options && options.nonce }, doc ); 377 }, 378 379 each: function( obj, callback ) { 380 var length, i = 0; 381 382 if ( isArrayLike( obj ) ) { 383 length = obj.length; 384 for ( ; i < length; i++ ) { 385 if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { 386 break; 387 } 388 } 389 } else { 390 for ( i in obj ) { 391 if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { 392 break; 393 } 394 } 395 } 396 397 return obj; 398 }, 399 400 // results is for internal usage only 401 makeArray: function( arr, results ) { 402 var ret = results || []; 403 404 if ( arr != null ) { 405 if ( isArrayLike( Object( arr ) ) ) { 406 jQuery.merge( ret, 407 typeof arr === "string" ? 408 [ arr ] : arr 409 ); 410 } else { 411 push.call( ret, arr ); 412 } 413 } 414 415 return ret; 416 }, 417 418 inArray: function( elem, arr, i ) { 419 return arr == null ? -1 : indexOf.call( arr, elem, i ); 420 }, 421 422 // Support: Android <=4.0 only, PhantomJS 1 only 423 // push.apply(_, arraylike) throws on ancient WebKit 424 merge: function( first, second ) { 425 var len = +second.length, 426 j = 0, 427 i = first.length; 428 429 for ( ; j < len; j++ ) { 430 first[ i++ ] = second[ j ]; 431 } 432 433 first.length = i; 434 435 return first; 436 }, 437 438 grep: function( elems, callback, invert ) { 439 var callbackInverse, 440 matches = [], 441 i = 0, 442 length = elems.length, 443 callbackExpect = !invert; 444 445 // Go through the array, only saving the items 446 // that pass the validator function 447 for ( ; i < length; i++ ) { 448 callbackInverse = !callback( elems[ i ], i ); 449 if ( callbackInverse !== callbackExpect ) { 450 matches.push( elems[ i ] ); 451 } 452 } 453 454 return matches; 455 }, 456 457 // arg is for internal usage only 458 map: function( elems, callback, arg ) { 459 var length, value, 460 i = 0, 461 ret = []; 462 463 // Go through the array, translating each of the items to their new values 464 if ( isArrayLike( elems ) ) { 465 length = elems.length; 466 for ( ; i < length; i++ ) { 467 value = callback( elems[ i ], i, arg ); 468 469 if ( value != null ) { 470 ret.push( value ); 471 } 472 } 473 474 // Go through every key on the object, 475 } else { 476 for ( i in elems ) { 477 value = callback( elems[ i ], i, arg ); 478 479 if ( value != null ) { 480 ret.push( value ); 481 } 482 } 483 } 484 485 // Flatten any nested arrays 486 return flat( ret ); 487 }, 488 489 // A global GUID counter for objects 490 guid: 1, 491 492 // jQuery.support is not used in Core but other projects attach their 493 // properties to it so it needs to exist. 494 support: support 495} ); 496 497if ( typeof Symbol === "function" ) { 498 jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; 499} 500 501// Populate the class2type map 502jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), 503 function( _i, name ) { 504 class2type[ "[object " + name + "]" ] = name.toLowerCase(); 505 } ); 506 507function isArrayLike( obj ) { 508 509 // Support: real iOS 8.2 only (not reproducible in simulator) 510 // `in` check used to prevent JIT error (gh-2145) 511 // hasOwn isn't used here due to false negatives 512 // regarding Nodelist length in IE 513 var length = !!obj && "length" in obj && obj.length, 514 type = toType( obj ); 515 516 if ( isFunction( obj ) || isWindow( obj ) ) { 517 return false; 518 } 519 520 return type === "array" || length === 0 || 521 typeof length === "number" && length > 0 && ( length - 1 ) in obj; 522} 523var Sizzle = 524/*! 525 * Sizzle CSS Selector Engine v2.3.6 526 * https://sizzlejs.com/ 527 * 528 * Copyright JS Foundation and other contributors 529 * Released under the MIT license 530 * https://js.foundation/ 531 * 532 * Date: 2021-02-16 533 */ 534( function( window ) { 535var i, 536 support, 537 Expr, 538 getText, 539 isXML, 540 tokenize, 541 compile, 542 select, 543 outermostContext, 544 sortInput, 545 hasDuplicate, 546 547 // Local document vars 548 setDocument, 549 document, 550 docElem, 551 documentIsHTML, 552 rbuggyQSA, 553 rbuggyMatches, 554 matches, 555 contains, 556 557 // Instance-specific data 558 expando = "sizzle" + 1 * new Date(), 559 preferredDoc = window.document, 560 dirruns = 0, 561 done = 0, 562 classCache = createCache(), 563 tokenCache = createCache(), 564 compilerCache = createCache(), 565 nonnativeSelectorCache = createCache(), 566 sortOrder = function( a, b ) { 567 if ( a === b ) { 568 hasDuplicate = true; 569 } 570 return 0; 571 }, 572 573 // Instance methods 574 hasOwn = ( {} ).hasOwnProperty, 575 arr = [], 576 pop = arr.pop, 577 pushNative = arr.push, 578 push = arr.push, 579 slice = arr.slice, 580 581 // Use a stripped-down indexOf as it's faster than native 582 // https://jsperf.com/thor-indexof-vs-for/5 583 indexOf = function( list, elem ) { 584 var i = 0, 585 len = list.length; 586 for ( ; i < len; i++ ) { 587 if ( list[ i ] === elem ) { 588 return i; 589 } 590 } 591 return -1; 592 }, 593 594 booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + 595 "ismap|loop|multiple|open|readonly|required|scoped", 596 597 // Regular expressions 598 599 // http://www.w3.org/TR/css3-selectors/#whitespace 600 whitespace = "[\\x20\\t\\r\\n\\f]", 601 602 // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram 603 identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + 604 "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", 605 606 // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors 607 attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + 608 609 // Operator (capture 2) 610 "*([*^$|!~]?=)" + whitespace + 611 612 // "Attribute values must be CSS identifiers [capture 5] 613 // or strings [capture 3 or capture 4]" 614 "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + 615 whitespace + "*\\]", 616 617 pseudos = ":(" + identifier + ")(?:\\((" + 618 619 // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: 620 // 1. quoted (capture 3; capture 4 or capture 5) 621 "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + 622 623 // 2. simple (capture 6) 624 "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + 625 626 // 3. anything else (capture 2) 627 ".*" + 628 ")\\)|)", 629 630 // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter 631 rwhitespace = new RegExp( whitespace + "+", "g" ), 632 rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + 633 whitespace + "+$", "g" ), 634 635 rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), 636 rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + 637 "*" ), 638 rdescend = new RegExp( whitespace + "|>" ), 639 640 rpseudo = new RegExp( pseudos ), 641 ridentifier = new RegExp( "^" + identifier + "$" ), 642 643 matchExpr = { 644 "ID": new RegExp( "^#(" + identifier + ")" ), 645 "CLASS": new RegExp( "^\\.(" + identifier + ")" ), 646 "TAG": new RegExp( "^(" + identifier + "|[*])" ), 647 "ATTR": new RegExp( "^" + attributes ), 648 "PSEUDO": new RegExp( "^" + pseudos ), 649 "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + 650 whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + 651 whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), 652 "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), 653 654 // For use in libraries implementing .is() 655 // We use this for POS matching in `select` 656 "needsContext": new RegExp( "^" + whitespace + 657 "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + 658 "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) 659 }, 660 661 rhtml = /HTML$/i, 662 rinputs = /^(?:input|select|textarea|button)$/i, 663 rheader = /^h\d$/i, 664 665 rnative = /^[^{]+\{\s*\[native \w/, 666 667 // Easily-parseable/retrievable ID or TAG or CLASS selectors 668 rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, 669 670 rsibling = /[+~]/, 671 672 // CSS escapes 673 // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters 674 runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), 675 funescape = function( escape, nonHex ) { 676 var high = "0x" + escape.slice( 1 ) - 0x10000; 677 678 return nonHex ? 679 680 // Strip the backslash prefix from a non-hex escape sequence 681 nonHex : 682 683 // Replace a hexadecimal escape sequence with the encoded Unicode code point 684 // Support: IE <=11+ 685 // For values outside the Basic Multilingual Plane (BMP), manually construct a 686 // surrogate pair 687 high < 0 ? 688 String.fromCharCode( high + 0x10000 ) : 689 String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); 690 }, 691 692 // CSS string/identifier serialization 693 // https://drafts.csswg.org/cssom/#common-serializing-idioms 694 rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, 695 fcssescape = function( ch, asCodePoint ) { 696 if ( asCodePoint ) { 697 698 // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER 699 if ( ch === "\0" ) { 700 return "\uFFFD"; 701 } 702 703 // Control characters and (dependent upon position) numbers get escaped as code points 704 return ch.slice( 0, -1 ) + "\\" + 705 ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; 706 } 707 708 // Other potentially-special ASCII characters get backslash-escaped 709 return "\\" + ch; 710 }, 711 712 // Used for iframes 713 // See setDocument() 714 // Removing the function wrapper causes a "Permission Denied" 715 // error in IE 716 unloadHandler = function() { 717 setDocument(); 718 }, 719 720 inDisabledFieldset = addCombinator( 721 function( elem ) { 722 return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; 723 }, 724 { dir: "parentNode", next: "legend" } 725 ); 726 727// Optimize for push.apply( _, NodeList ) 728try { 729 push.apply( 730 ( arr = slice.call( preferredDoc.childNodes ) ), 731 preferredDoc.childNodes 732 ); 733 734 // Support: Android<4.0 735 // Detect silently failing push.apply 736 // eslint-disable-next-line no-unused-expressions 737 arr[ preferredDoc.childNodes.length ].nodeType; 738} catch ( e ) { 739 push = { apply: arr.length ? 740 741 // Leverage slice if possible 742 function( target, els ) { 743 pushNative.apply( target, slice.call( els ) ); 744 } : 745 746 // Support: IE<9 747 // Otherwise append directly 748 function( target, els ) { 749 var j = target.length, 750 i = 0; 751 752 // Can't trust NodeList.length 753 while ( ( target[ j++ ] = els[ i++ ] ) ) {} 754 target.length = j - 1; 755 } 756 }; 757} 758 759function Sizzle( selector, context, results, seed ) { 760 var m, i, elem, nid, match, groups, newSelector, 761 newContext = context && context.ownerDocument, 762 763 // nodeType defaults to 9, since context defaults to document 764 nodeType = context ? context.nodeType : 9; 765 766 results = results || []; 767 768 // Return early from calls with invalid selector or context 769 if ( typeof selector !== "string" || !selector || 770 nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { 771 772 return results; 773 } 774 775 // Try to shortcut find operations (as opposed to filters) in HTML documents 776 if ( !seed ) { 777 setDocument( context ); 778 context = context || document; 779 780 if ( documentIsHTML ) { 781 782 // If the selector is sufficiently simple, try using a "get*By*" DOM method 783 // (excepting DocumentFragment context, where the methods don't exist) 784 if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { 785 786 // ID selector 787 if ( ( m = match[ 1 ] ) ) { 788 789 // Document context 790 if ( nodeType === 9 ) { 791 if ( ( elem = context.getElementById( m ) ) ) { 792 793 // Support: IE, Opera, Webkit 794 // TODO: identify versions 795 // getElementById can match elements by name instead of ID 796 if ( elem.id === m ) { 797 results.push( elem ); 798 return results; 799 } 800 } else { 801 return results; 802 } 803 804 // Element context 805 } else { 806 807 // Support: IE, Opera, Webkit 808 // TODO: identify versions 809 // getElementById can match elements by name instead of ID 810 if ( newContext && ( elem = newContext.getElementById( m ) ) && 811 contains( context, elem ) && 812 elem.id === m ) { 813 814 results.push( elem ); 815 return results; 816 } 817 } 818 819 // Type selector 820 } else if ( match[ 2 ] ) { 821 push.apply( results, context.getElementsByTagName( selector ) ); 822 return results; 823 824 // Class selector 825 } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && 826 context.getElementsByClassName ) { 827 828 push.apply( results, context.getElementsByClassName( m ) ); 829 return results; 830 } 831 } 832 833 // Take advantage of querySelectorAll 834 if ( support.qsa && 835 !nonnativeSelectorCache[ selector + " " ] && 836 ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && 837 838 // Support: IE 8 only 839 // Exclude object elements 840 ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { 841 842 newSelector = selector; 843 newContext = context; 844 845 // qSA considers elements outside a scoping root when evaluating child or 846 // descendant combinators, which is not what we want. 847 // In such cases, we work around the behavior by prefixing every selector in the 848 // list with an ID selector referencing the scope context. 849 // The technique has to be used as well when a leading combinator is used 850 // as such selectors are not recognized by querySelectorAll. 851 // Thanks to Andrew Dupont for this technique. 852 if ( nodeType === 1 && 853 ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { 854 855 // Expand context for sibling selectors 856 newContext = rsibling.test( selector ) && testContext( context.parentNode ) || 857 context; 858 859 // We can use :scope instead of the ID hack if the browser 860 // supports it & if we're not changing the context. 861 if ( newContext !== context || !support.scope ) { 862 863 // Capture the context ID, setting it first if necessary 864 if ( ( nid = context.getAttribute( "id" ) ) ) { 865 nid = nid.replace( rcssescape, fcssescape ); 866 } else { 867 context.setAttribute( "id", ( nid = expando ) ); 868 } 869 } 870 871 // Prefix every selector in the list 872 groups = tokenize( selector ); 873 i = groups.length; 874 while ( i-- ) { 875 groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + 876 toSelector( groups[ i ] ); 877 } 878 newSelector = groups.join( "," ); 879 } 880 881 try { 882 push.apply( results, 883 newContext.querySelectorAll( newSelector ) 884 ); 885 return results; 886 } catch ( qsaError ) { 887 nonnativeSelectorCache( selector, true ); 888 } finally { 889 if ( nid === expando ) { 890 context.removeAttribute( "id" ); 891 } 892 } 893 } 894 } 895 } 896 897 // All others 898 return select( selector.replace( rtrim, "$1" ), context, results, seed ); 899} 900 901/** 902 * Create key-value caches of limited size 903 * @returns {function(string, object)} Returns the Object data after storing it on itself with 904 * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) 905 * deleting the oldest entry 906 */ 907function createCache() { 908 var keys = []; 909 910 function cache( key, value ) { 911 912 // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) 913 if ( keys.push( key + " " ) > Expr.cacheLength ) { 914 915 // Only keep the most recent entries 916 delete cache[ keys.shift() ]; 917 } 918 return ( cache[ key + " " ] = value ); 919 } 920 return cache; 921} 922 923/** 924 * Mark a function for special use by Sizzle 925 * @param {Function} fn The function to mark 926 */ 927function markFunction( fn ) { 928 fn[ expando ] = true; 929 return fn; 930} 931 932/** 933 * Support testing using an element 934 * @param {Function} fn Passed the created element and returns a boolean result 935 */ 936function assert( fn ) { 937 var el = document.createElement( "fieldset" ); 938 939 try { 940 return !!fn( el ); 941 } catch ( e ) { 942 return false; 943 } finally { 944 945 // Remove from its parent by default 946 if ( el.parentNode ) { 947 el.parentNode.removeChild( el ); 948 } 949 950 // release memory in IE 951 el = null; 952 } 953} 954 955/** 956 * Adds the same handler for all of the specified attrs 957 * @param {String} attrs Pipe-separated list of attributes 958 * @param {Function} handler The method that will be applied 959 */ 960function addHandle( attrs, handler ) { 961 var arr = attrs.split( "|" ), 962 i = arr.length; 963 964 while ( i-- ) { 965 Expr.attrHandle[ arr[ i ] ] = handler; 966 } 967} 968 969/** 970 * Checks document order of two siblings 971 * @param {Element} a 972 * @param {Element} b 973 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b 974 */ 975function siblingCheck( a, b ) { 976 var cur = b && a, 977 diff = cur && a.nodeType === 1 && b.nodeType === 1 && 978 a.sourceIndex - b.sourceIndex; 979 980 // Use IE sourceIndex if available on both nodes 981 if ( diff ) { 982 return diff; 983 } 984 985 // Check if b follows a 986 if ( cur ) { 987 while ( ( cur = cur.nextSibling ) ) { 988 if ( cur === b ) { 989 return -1; 990 } 991 } 992 } 993 994 return a ? 1 : -1; 995} 996 997/** 998 * Returns a function to use in pseudos for input types 999 * @param {String} type 1000 */ 1001function createInputPseudo( type ) { 1002 return function( elem ) { 1003 var name = elem.nodeName.toLowerCase(); 1004 return name === "input" && elem.type === type; 1005 }; 1006} 1007 1008/** 1009 * Returns a function to use in pseudos for buttons 1010 * @param {String} type 1011 */ 1012function createButtonPseudo( type ) { 1013 return function( elem ) { 1014 var name = elem.nodeName.toLowerCase(); 1015 return ( name === "input" || name === "button" ) && elem.type === type; 1016 }; 1017} 1018 1019/** 1020 * Returns a function to use in pseudos for :enabled/:disabled 1021 * @param {Boolean} disabled true for :disabled; false for :enabled 1022 */ 1023function createDisabledPseudo( disabled ) { 1024 1025 // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable 1026 return function( elem ) { 1027 1028 // Only certain elements can match :enabled or :disabled 1029 // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled 1030 // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled 1031 if ( "form" in elem ) { 1032 1033 // Check for inherited disabledness on relevant non-disabled elements: 1034 // * listed form-associated elements in a disabled fieldset 1035 // https://html.spec.whatwg.org/multipage/forms.html#category-listed 1036 // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled 1037 // * option elements in a disabled optgroup 1038 // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled 1039 // All such elements have a "form" property. 1040 if ( elem.parentNode && elem.disabled === false ) { 1041 1042 // Option elements defer to a parent optgroup if present 1043 if ( "label" in elem ) { 1044 if ( "label" in elem.parentNode ) { 1045 return elem.parentNode.disabled === disabled; 1046 } else { 1047 return elem.disabled === disabled; 1048 } 1049 } 1050 1051 // Support: IE 6 - 11 1052 // Use the isDisabled shortcut property to check for disabled fieldset ancestors 1053 return elem.isDisabled === disabled || 1054 1055 // Where there is no isDisabled, check manually 1056 /* jshint -W018 */ 1057 elem.isDisabled !== !disabled && 1058 inDisabledFieldset( elem ) === disabled; 1059 } 1060 1061 return elem.disabled === disabled; 1062 1063 // Try to winnow out elements that can't be disabled before trusting the disabled property. 1064 // Some victims get caught in our net (label, legend, menu, track), but it shouldn't 1065 // even exist on them, let alone have a boolean value. 1066 } else if ( "label" in elem ) { 1067 return elem.disabled === disabled; 1068 } 1069 1070 // Remaining elements are neither :enabled nor :disabled 1071 return false; 1072 }; 1073} 1074 1075/** 1076 * Returns a function to use in pseudos for positionals 1077 * @param {Function} fn 1078 */ 1079function createPositionalPseudo( fn ) { 1080 return markFunction( function( argument ) { 1081 argument = +argument; 1082 return markFunction( function( seed, matches ) { 1083 var j, 1084 matchIndexes = fn( [], seed.length, argument ), 1085 i = matchIndexes.length; 1086 1087 // Match elements found at the specified indexes 1088 while ( i-- ) { 1089 if ( seed[ ( j = matchIndexes[ i ] ) ] ) { 1090 seed[ j ] = !( matches[ j ] = seed[ j ] ); 1091 } 1092 } 1093 } ); 1094 } ); 1095} 1096 1097/** 1098 * Checks a node for validity as a Sizzle context 1099 * @param {Element|Object=} context 1100 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value 1101 */ 1102function testContext( context ) { 1103 return context && typeof context.getElementsByTagName !== "undefined" && context; 1104} 1105 1106// Expose support vars for convenience 1107support = Sizzle.support = {}; 1108 1109/** 1110 * Detects XML nodes 1111 * @param {Element|Object} elem An element or a document 1112 * @returns {Boolean} True iff elem is a non-HTML XML node 1113 */ 1114isXML = Sizzle.isXML = function( elem ) { 1115 var namespace = elem && elem.namespaceURI, 1116 docElem = elem && ( elem.ownerDocument || elem ).documentElement; 1117 1118 // Support: IE <=8 1119 // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes 1120 // https://bugs.jquery.com/ticket/4833 1121 return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); 1122}; 1123 1124/** 1125 * Sets document-related variables once based on the current document 1126 * @param {Element|Object} [doc] An element or document object to use to set the document 1127 * @returns {Object} Returns the current document 1128 */ 1129setDocument = Sizzle.setDocument = function( node ) { 1130 var hasCompare, subWindow, 1131 doc = node ? node.ownerDocument || node : preferredDoc; 1132 1133 // Return early if doc is invalid or already selected 1134 // Support: IE 11+, Edge 17 - 18+ 1135 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1136 // two documents; shallow comparisons work. 1137 // eslint-disable-next-line eqeqeq 1138 if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { 1139 return document; 1140 } 1141 1142 // Update global variables 1143 document = doc; 1144 docElem = document.documentElement; 1145 documentIsHTML = !isXML( document ); 1146 1147 // Support: IE 9 - 11+, Edge 12 - 18+ 1148 // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) 1149 // Support: IE 11+, Edge 17 - 18+ 1150 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1151 // two documents; shallow comparisons work. 1152 // eslint-disable-next-line eqeqeq 1153 if ( preferredDoc != document && 1154 ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { 1155 1156 // Support: IE 11, Edge 1157 if ( subWindow.addEventListener ) { 1158 subWindow.addEventListener( "unload", unloadHandler, false ); 1159 1160 // Support: IE 9 - 10 only 1161 } else if ( subWindow.attachEvent ) { 1162 subWindow.attachEvent( "onunload", unloadHandler ); 1163 } 1164 } 1165 1166 // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, 1167 // Safari 4 - 5 only, Opera <=11.6 - 12.x only 1168 // IE/Edge & older browsers don't support the :scope pseudo-class. 1169 // Support: Safari 6.0 only 1170 // Safari 6.0 supports :scope but it's an alias of :root there. 1171 support.scope = assert( function( el ) { 1172 docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); 1173 return typeof el.querySelectorAll !== "undefined" && 1174 !el.querySelectorAll( ":scope fieldset div" ).length; 1175 } ); 1176 1177 /* Attributes 1178 ---------------------------------------------------------------------- */ 1179 1180 // Support: IE<8 1181 // Verify that getAttribute really returns attributes and not properties 1182 // (excepting IE8 booleans) 1183 support.attributes = assert( function( el ) { 1184 el.className = "i"; 1185 return !el.getAttribute( "className" ); 1186 } ); 1187 1188 /* getElement(s)By* 1189 ---------------------------------------------------------------------- */ 1190 1191 // Check if getElementsByTagName("*") returns only elements 1192 support.getElementsByTagName = assert( function( el ) { 1193 el.appendChild( document.createComment( "" ) ); 1194 return !el.getElementsByTagName( "*" ).length; 1195 } ); 1196 1197 // Support: IE<9 1198 support.getElementsByClassName = rnative.test( document.getElementsByClassName ); 1199 1200 // Support: IE<10 1201 // Check if getElementById returns elements by name 1202 // The broken getElementById methods don't pick up programmatically-set names, 1203 // so use a roundabout getElementsByName test 1204 support.getById = assert( function( el ) { 1205 docElem.appendChild( el ).id = expando; 1206 return !document.getElementsByName || !document.getElementsByName( expando ).length; 1207 } ); 1208 1209 // ID filter and find 1210 if ( support.getById ) { 1211 Expr.filter[ "ID" ] = function( id ) { 1212 var attrId = id.replace( runescape, funescape ); 1213 return function( elem ) { 1214 return elem.getAttribute( "id" ) === attrId; 1215 }; 1216 }; 1217 Expr.find[ "ID" ] = function( id, context ) { 1218 if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { 1219 var elem = context.getElementById( id ); 1220 return elem ? [ elem ] : []; 1221 } 1222 }; 1223 } else { 1224 Expr.filter[ "ID" ] = function( id ) { 1225 var attrId = id.replace( runescape, funescape ); 1226 return function( elem ) { 1227 var node = typeof elem.getAttributeNode !== "undefined" && 1228 elem.getAttributeNode( "id" ); 1229 return node && node.value === attrId; 1230 }; 1231 }; 1232 1233 // Support: IE 6 - 7 only 1234 // getElementById is not reliable as a find shortcut 1235 Expr.find[ "ID" ] = function( id, context ) { 1236 if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { 1237 var node, i, elems, 1238 elem = context.getElementById( id ); 1239 1240 if ( elem ) { 1241 1242 // Verify the id attribute 1243 node = elem.getAttributeNode( "id" ); 1244 if ( node && node.value === id ) { 1245 return [ elem ]; 1246 } 1247 1248 // Fall back on getElementsByName 1249 elems = context.getElementsByName( id ); 1250 i = 0; 1251 while ( ( elem = elems[ i++ ] ) ) { 1252 node = elem.getAttributeNode( "id" ); 1253 if ( node && node.value === id ) { 1254 return [ elem ]; 1255 } 1256 } 1257 } 1258 1259 return []; 1260 } 1261 }; 1262 } 1263 1264 // Tag 1265 Expr.find[ "TAG" ] = support.getElementsByTagName ? 1266 function( tag, context ) { 1267 if ( typeof context.getElementsByTagName !== "undefined" ) { 1268 return context.getElementsByTagName( tag ); 1269 1270 // DocumentFragment nodes don't have gEBTN 1271 } else if ( support.qsa ) { 1272 return context.querySelectorAll( tag ); 1273 } 1274 } : 1275 1276 function( tag, context ) { 1277 var elem, 1278 tmp = [], 1279 i = 0, 1280 1281 // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too 1282 results = context.getElementsByTagName( tag ); 1283 1284 // Filter out possible comments 1285 if ( tag === "*" ) { 1286 while ( ( elem = results[ i++ ] ) ) { 1287 if ( elem.nodeType === 1 ) { 1288 tmp.push( elem ); 1289 } 1290 } 1291 1292 return tmp; 1293 } 1294 return results; 1295 }; 1296 1297 // Class 1298 Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { 1299 if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { 1300 return context.getElementsByClassName( className ); 1301 } 1302 }; 1303 1304 /* QSA/matchesSelector 1305 ---------------------------------------------------------------------- */ 1306 1307 // QSA and matchesSelector support 1308 1309 // matchesSelector(:active) reports false when true (IE9/Opera 11.5) 1310 rbuggyMatches = []; 1311 1312 // qSa(:focus) reports false when true (Chrome 21) 1313 // We allow this because of a bug in IE8/9 that throws an error 1314 // whenever `document.activeElement` is accessed on an iframe 1315 // So, we allow :focus to pass through QSA all the time to avoid the IE error 1316 // See https://bugs.jquery.com/ticket/13378 1317 rbuggyQSA = []; 1318 1319 if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { 1320 1321 // Build QSA regex 1322 // Regex strategy adopted from Diego Perini 1323 assert( function( el ) { 1324 1325 var input; 1326 1327 // Select is set to empty string on purpose 1328 // This is to test IE's treatment of not explicitly 1329 // setting a boolean content attribute, 1330 // since its presence should be enough 1331 // https://bugs.jquery.com/ticket/12359 1332 docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" + 1333 "<select id='" + expando + "-\r\\' msallowcapture=''>" + 1334 "<option selected=''></option></select>"; 1335 1336 // Support: IE8, Opera 11-12.16 1337 // Nothing should be selected when empty strings follow ^= or $= or *= 1338 // The test attribute must be unknown in Opera but "safe" for WinRT 1339 // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section 1340 if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { 1341 rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); 1342 } 1343 1344 // Support: IE8 1345 // Boolean attributes and "value" are not treated correctly 1346 if ( !el.querySelectorAll( "[selected]" ).length ) { 1347 rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); 1348 } 1349 1350 // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ 1351 if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { 1352 rbuggyQSA.push( "~=" ); 1353 } 1354 1355 // Support: IE 11+, Edge 15 - 18+ 1356 // IE 11/Edge don't find elements on a `[name='']` query in some cases. 1357 // Adding a temporary attribute to the document before the selection works 1358 // around the issue. 1359 // Interestingly, IE 10 & older don't seem to have the issue. 1360 input = document.createElement( "input" ); 1361 input.setAttribute( "name", "" ); 1362 el.appendChild( input ); 1363 if ( !el.querySelectorAll( "[name='']" ).length ) { 1364 rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + 1365 whitespace + "*(?:''|\"\")" ); 1366 } 1367 1368 // Webkit/Opera - :checked should return selected option elements 1369 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 1370 // IE8 throws error here and will not see later tests 1371 if ( !el.querySelectorAll( ":checked" ).length ) { 1372 rbuggyQSA.push( ":checked" ); 1373 } 1374 1375 // Support: Safari 8+, iOS 8+ 1376 // https://bugs.webkit.org/show_bug.cgi?id=136851 1377 // In-page `selector#id sibling-combinator selector` fails 1378 if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { 1379 rbuggyQSA.push( ".#.+[+~]" ); 1380 } 1381 1382 // Support: Firefox <=3.6 - 5 only 1383 // Old Firefox doesn't throw on a badly-escaped identifier. 1384 el.querySelectorAll( "\\\f" ); 1385 rbuggyQSA.push( "[\\r\\n\\f]" ); 1386 } ); 1387 1388 assert( function( el ) { 1389 el.innerHTML = "<a href='' disabled='disabled'></a>" + 1390 "<select disabled='disabled'><option/></select>"; 1391 1392 // Support: Windows 8 Native Apps 1393 // The type and name attributes are restricted during .innerHTML assignment 1394 var input = document.createElement( "input" ); 1395 input.setAttribute( "type", "hidden" ); 1396 el.appendChild( input ).setAttribute( "name", "D" ); 1397 1398 // Support: IE8 1399 // Enforce case-sensitivity of name attribute 1400 if ( el.querySelectorAll( "[name=d]" ).length ) { 1401 rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); 1402 } 1403 1404 // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) 1405 // IE8 throws error here and will not see later tests 1406 if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { 1407 rbuggyQSA.push( ":enabled", ":disabled" ); 1408 } 1409 1410 // Support: IE9-11+ 1411 // IE's :disabled selector does not pick up the children of disabled fieldsets 1412 docElem.appendChild( el ).disabled = true; 1413 if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { 1414 rbuggyQSA.push( ":enabled", ":disabled" ); 1415 } 1416 1417 // Support: Opera 10 - 11 only 1418 // Opera 10-11 does not throw on post-comma invalid pseudos 1419 el.querySelectorAll( "*,:x" ); 1420 rbuggyQSA.push( ",.*:" ); 1421 } ); 1422 } 1423 1424 if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || 1425 docElem.webkitMatchesSelector || 1426 docElem.mozMatchesSelector || 1427 docElem.oMatchesSelector || 1428 docElem.msMatchesSelector ) ) ) ) { 1429 1430 assert( function( el ) { 1431 1432 // Check to see if it's possible to do matchesSelector 1433 // on a disconnected node (IE 9) 1434 support.disconnectedMatch = matches.call( el, "*" ); 1435 1436 // This should fail with an exception 1437 // Gecko does not error, returns false instead 1438 matches.call( el, "[s!='']:x" ); 1439 rbuggyMatches.push( "!=", pseudos ); 1440 } ); 1441 } 1442 1443 rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); 1444 rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); 1445 1446 /* Contains 1447 ---------------------------------------------------------------------- */ 1448 hasCompare = rnative.test( docElem.compareDocumentPosition ); 1449 1450 // Element contains another 1451 // Purposefully self-exclusive 1452 // As in, an element does not contain itself 1453 contains = hasCompare || rnative.test( docElem.contains ) ? 1454 function( a, b ) { 1455 var adown = a.nodeType === 9 ? a.documentElement : a, 1456 bup = b && b.parentNode; 1457 return a === bup || !!( bup && bup.nodeType === 1 && ( 1458 adown.contains ? 1459 adown.contains( bup ) : 1460 a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 1461 ) ); 1462 } : 1463 function( a, b ) { 1464 if ( b ) { 1465 while ( ( b = b.parentNode ) ) { 1466 if ( b === a ) { 1467 return true; 1468 } 1469 } 1470 } 1471 return false; 1472 }; 1473 1474 /* Sorting 1475 ---------------------------------------------------------------------- */ 1476 1477 // Document order sorting 1478 sortOrder = hasCompare ? 1479 function( a, b ) { 1480 1481 // Flag for duplicate removal 1482 if ( a === b ) { 1483 hasDuplicate = true; 1484 return 0; 1485 } 1486 1487 // Sort on method existence if only one input has compareDocumentPosition 1488 var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; 1489 if ( compare ) { 1490 return compare; 1491 } 1492 1493 // Calculate position if both inputs belong to the same document 1494 // Support: IE 11+, Edge 17 - 18+ 1495 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1496 // two documents; shallow comparisons work. 1497 // eslint-disable-next-line eqeqeq 1498 compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? 1499 a.compareDocumentPosition( b ) : 1500 1501 // Otherwise we know they are disconnected 1502 1; 1503 1504 // Disconnected nodes 1505 if ( compare & 1 || 1506 ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { 1507 1508 // Choose the first element that is related to our preferred document 1509 // Support: IE 11+, Edge 17 - 18+ 1510 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1511 // two documents; shallow comparisons work. 1512 // eslint-disable-next-line eqeqeq 1513 if ( a == document || a.ownerDocument == preferredDoc && 1514 contains( preferredDoc, a ) ) { 1515 return -1; 1516 } 1517 1518 // Support: IE 11+, Edge 17 - 18+ 1519 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1520 // two documents; shallow comparisons work. 1521 // eslint-disable-next-line eqeqeq 1522 if ( b == document || b.ownerDocument == preferredDoc && 1523 contains( preferredDoc, b ) ) { 1524 return 1; 1525 } 1526 1527 // Maintain original order 1528 return sortInput ? 1529 ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 1530 0; 1531 } 1532 1533 return compare & 4 ? -1 : 1; 1534 } : 1535 function( a, b ) { 1536 1537 // Exit early if the nodes are identical 1538 if ( a === b ) { 1539 hasDuplicate = true; 1540 return 0; 1541 } 1542 1543 var cur, 1544 i = 0, 1545 aup = a.parentNode, 1546 bup = b.parentNode, 1547 ap = [ a ], 1548 bp = [ b ]; 1549 1550 // Parentless nodes are either documents or disconnected 1551 if ( !aup || !bup ) { 1552 1553 // Support: IE 11+, Edge 17 - 18+ 1554 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1555 // two documents; shallow comparisons work. 1556 /* eslint-disable eqeqeq */ 1557 return a == document ? -1 : 1558 b == document ? 1 : 1559 /* eslint-enable eqeqeq */ 1560 aup ? -1 : 1561 bup ? 1 : 1562 sortInput ? 1563 ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 1564 0; 1565 1566 // If the nodes are siblings, we can do a quick check 1567 } else if ( aup === bup ) { 1568 return siblingCheck( a, b ); 1569 } 1570 1571 // Otherwise we need full lists of their ancestors for comparison 1572 cur = a; 1573 while ( ( cur = cur.parentNode ) ) { 1574 ap.unshift( cur ); 1575 } 1576 cur = b; 1577 while ( ( cur = cur.parentNode ) ) { 1578 bp.unshift( cur ); 1579 } 1580 1581 // Walk down the tree looking for a discrepancy 1582 while ( ap[ i ] === bp[ i ] ) { 1583 i++; 1584 } 1585 1586 return i ? 1587 1588 // Do a sibling check if the nodes have a common ancestor 1589 siblingCheck( ap[ i ], bp[ i ] ) : 1590 1591 // Otherwise nodes in our document sort first 1592 // Support: IE 11+, Edge 17 - 18+ 1593 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1594 // two documents; shallow comparisons work. 1595 /* eslint-disable eqeqeq */ 1596 ap[ i ] == preferredDoc ? -1 : 1597 bp[ i ] == preferredDoc ? 1 : 1598 /* eslint-enable eqeqeq */ 1599 0; 1600 }; 1601 1602 return document; 1603}; 1604 1605Sizzle.matches = function( expr, elements ) { 1606 return Sizzle( expr, null, null, elements ); 1607}; 1608 1609Sizzle.matchesSelector = function( elem, expr ) { 1610 setDocument( elem ); 1611 1612 if ( support.matchesSelector && documentIsHTML && 1613 !nonnativeSelectorCache[ expr + " " ] && 1614 ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && 1615 ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { 1616 1617 try { 1618 var ret = matches.call( elem, expr ); 1619 1620 // IE 9's matchesSelector returns false on disconnected nodes 1621 if ( ret || support.disconnectedMatch || 1622 1623 // As well, disconnected nodes are said to be in a document 1624 // fragment in IE 9 1625 elem.document && elem.document.nodeType !== 11 ) { 1626 return ret; 1627 } 1628 } catch ( e ) { 1629 nonnativeSelectorCache( expr, true ); 1630 } 1631 } 1632 1633 return Sizzle( expr, document, null, [ elem ] ).length > 0; 1634}; 1635 1636Sizzle.contains = function( context, elem ) { 1637 1638 // Set document vars if needed 1639 // Support: IE 11+, Edge 17 - 18+ 1640 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1641 // two documents; shallow comparisons work. 1642 // eslint-disable-next-line eqeqeq 1643 if ( ( context.ownerDocument || context ) != document ) { 1644 setDocument( context ); 1645 } 1646 return contains( context, elem ); 1647}; 1648 1649Sizzle.attr = function( elem, name ) { 1650 1651 // Set document vars if needed 1652 // Support: IE 11+, Edge 17 - 18+ 1653 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 1654 // two documents; shallow comparisons work. 1655 // eslint-disable-next-line eqeqeq 1656 if ( ( elem.ownerDocument || elem ) != document ) { 1657 setDocument( elem ); 1658 } 1659 1660 var fn = Expr.attrHandle[ name.toLowerCase() ], 1661 1662 // Don't get fooled by Object.prototype properties (jQuery #13807) 1663 val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? 1664 fn( elem, name, !documentIsHTML ) : 1665 undefined; 1666 1667 return val !== undefined ? 1668 val : 1669 support.attributes || !documentIsHTML ? 1670 elem.getAttribute( name ) : 1671 ( val = elem.getAttributeNode( name ) ) && val.specified ? 1672 val.value : 1673 null; 1674}; 1675 1676Sizzle.escape = function( sel ) { 1677 return ( sel + "" ).replace( rcssescape, fcssescape ); 1678}; 1679 1680Sizzle.error = function( msg ) { 1681 throw new Error( "Syntax error, unrecognized expression: " + msg ); 1682}; 1683 1684/** 1685 * Document sorting and removing duplicates 1686 * @param {ArrayLike} results 1687 */ 1688Sizzle.uniqueSort = function( results ) { 1689 var elem, 1690 duplicates = [], 1691 j = 0, 1692 i = 0; 1693 1694 // Unless we *know* we can detect duplicates, assume their presence 1695 hasDuplicate = !support.detectDuplicates; 1696 sortInput = !support.sortStable && results.slice( 0 ); 1697 results.sort( sortOrder ); 1698 1699 if ( hasDuplicate ) { 1700 while ( ( elem = results[ i++ ] ) ) { 1701 if ( elem === results[ i ] ) { 1702 j = duplicates.push( i ); 1703 } 1704 } 1705 while ( j-- ) { 1706 results.splice( duplicates[ j ], 1 ); 1707 } 1708 } 1709 1710 // Clear input after sorting to release objects 1711 // See https://github.com/jquery/sizzle/pull/225 1712 sortInput = null; 1713 1714 return results; 1715}; 1716 1717/** 1718 * Utility function for retrieving the text value of an array of DOM nodes 1719 * @param {Array|Element} elem 1720 */ 1721getText = Sizzle.getText = function( elem ) { 1722 var node, 1723 ret = "", 1724 i = 0, 1725 nodeType = elem.nodeType; 1726 1727 if ( !nodeType ) { 1728 1729 // If no nodeType, this is expected to be an array 1730 while ( ( node = elem[ i++ ] ) ) { 1731 1732 // Do not traverse comment nodes 1733 ret += getText( node ); 1734 } 1735 } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { 1736 1737 // Use textContent for elements 1738 // innerText usage removed for consistency of new lines (jQuery #11153) 1739 if ( typeof elem.textContent === "string" ) { 1740 return elem.textContent; 1741 } else { 1742 1743 // Traverse its children 1744 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { 1745 ret += getText( elem ); 1746 } 1747 } 1748 } else if ( nodeType === 3 || nodeType === 4 ) { 1749 return elem.nodeValue; 1750 } 1751 1752 // Do not include comment or processing instruction nodes 1753 1754 return ret; 1755}; 1756 1757Expr = Sizzle.selectors = { 1758 1759 // Can be adjusted by the user 1760 cacheLength: 50, 1761 1762 createPseudo: markFunction, 1763 1764 match: matchExpr, 1765 1766 attrHandle: {}, 1767 1768 find: {}, 1769 1770 relative: { 1771 ">": { dir: "parentNode", first: true }, 1772 " ": { dir: "parentNode" }, 1773 "+": { dir: "previousSibling", first: true }, 1774 "~": { dir: "previousSibling" } 1775 }, 1776 1777 preFilter: { 1778 "ATTR": function( match ) { 1779 match[ 1 ] = match[ 1 ].replace( runescape, funescape ); 1780 1781 // Move the given value to match[3] whether quoted or unquoted 1782 match[ 3 ] = ( match[ 3 ] || match[ 4 ] || 1783 match[ 5 ] || "" ).replace( runescape, funescape ); 1784 1785 if ( match[ 2 ] === "~=" ) { 1786 match[ 3 ] = " " + match[ 3 ] + " "; 1787 } 1788 1789 return match.slice( 0, 4 ); 1790 }, 1791 1792 "CHILD": function( match ) { 1793 1794 /* matches from matchExpr["CHILD"] 1795 1 type (only|nth|...) 1796 2 what (child|of-type) 1797 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 1798 4 xn-component of xn+y argument ([+-]?\d*n|) 1799 5 sign of xn-component 1800 6 x of xn-component 1801 7 sign of y-component 1802 8 y of y-component 1803 */ 1804 match[ 1 ] = match[ 1 ].toLowerCase(); 1805 1806 if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { 1807 1808 // nth-* requires argument 1809 if ( !match[ 3 ] ) { 1810 Sizzle.error( match[ 0 ] ); 1811 } 1812 1813 // numeric x and y parameters for Expr.filter.CHILD 1814 // remember that false/true cast respectively to 0/1 1815 match[ 4 ] = +( match[ 4 ] ? 1816 match[ 5 ] + ( match[ 6 ] || 1 ) : 1817 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); 1818 match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); 1819 1820 // other types prohibit arguments 1821 } else if ( match[ 3 ] ) { 1822 Sizzle.error( match[ 0 ] ); 1823 } 1824 1825 return match; 1826 }, 1827 1828 "PSEUDO": function( match ) { 1829 var excess, 1830 unquoted = !match[ 6 ] && match[ 2 ]; 1831 1832 if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { 1833 return null; 1834 } 1835 1836 // Accept quoted arguments as-is 1837 if ( match[ 3 ] ) { 1838 match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; 1839 1840 // Strip excess characters from unquoted arguments 1841 } else if ( unquoted && rpseudo.test( unquoted ) && 1842 1843 // Get excess from tokenize (recursively) 1844 ( excess = tokenize( unquoted, true ) ) && 1845 1846 // advance to the next closing parenthesis 1847 ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { 1848 1849 // excess is a negative index 1850 match[ 0 ] = match[ 0 ].slice( 0, excess ); 1851 match[ 2 ] = unquoted.slice( 0, excess ); 1852 } 1853 1854 // Return only captures needed by the pseudo filter method (type and argument) 1855 return match.slice( 0, 3 ); 1856 } 1857 }, 1858 1859 filter: { 1860 1861 "TAG": function( nodeNameSelector ) { 1862 var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); 1863 return nodeNameSelector === "*" ? 1864 function() { 1865 return true; 1866 } : 1867 function( elem ) { 1868 return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; 1869 }; 1870 }, 1871 1872 "CLASS": function( className ) { 1873 var pattern = classCache[ className + " " ]; 1874 1875 return pattern || 1876 ( pattern = new RegExp( "(^|" + whitespace + 1877 ")" + className + "(" + whitespace + "|$)" ) ) && classCache( 1878 className, function( elem ) { 1879 return pattern.test( 1880 typeof elem.className === "string" && elem.className || 1881 typeof elem.getAttribute !== "undefined" && 1882 elem.getAttribute( "class" ) || 1883 "" 1884 ); 1885 } ); 1886 }, 1887 1888 "ATTR": function( name, operator, check ) { 1889 return function( elem ) { 1890 var result = Sizzle.attr( elem, name ); 1891 1892 if ( result == null ) { 1893 return operator === "!="; 1894 } 1895 if ( !operator ) { 1896 return true; 1897 } 1898 1899 result += ""; 1900 1901 /* eslint-disable max-len */ 1902 1903 return operator === "=" ? result === check : 1904 operator === "!=" ? result !== check : 1905 operator === "^=" ? check && result.indexOf( check ) === 0 : 1906 operator === "*=" ? check && result.indexOf( check ) > -1 : 1907 operator === "$=" ? check && result.slice( -check.length ) === check : 1908 operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : 1909 operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : 1910 false; 1911 /* eslint-enable max-len */ 1912 1913 }; 1914 }, 1915 1916 "CHILD": function( type, what, _argument, first, last ) { 1917 var simple = type.slice( 0, 3 ) !== "nth", 1918 forward = type.slice( -4 ) !== "last", 1919 ofType = what === "of-type"; 1920 1921 return first === 1 && last === 0 ? 1922 1923 // Shortcut for :nth-*(n) 1924 function( elem ) { 1925 return !!elem.parentNode; 1926 } : 1927 1928 function( elem, _context, xml ) { 1929 var cache, uniqueCache, outerCache, node, nodeIndex, start, 1930 dir = simple !== forward ? "nextSibling" : "previousSibling", 1931 parent = elem.parentNode, 1932 name = ofType && elem.nodeName.toLowerCase(), 1933 useCache = !xml && !ofType, 1934 diff = false; 1935 1936 if ( parent ) { 1937 1938 // :(first|last|only)-(child|of-type) 1939 if ( simple ) { 1940 while ( dir ) { 1941 node = elem; 1942 while ( ( node = node[ dir ] ) ) { 1943 if ( ofType ? 1944 node.nodeName.toLowerCase() === name : 1945 node.nodeType === 1 ) { 1946 1947 return false; 1948 } 1949 } 1950 1951 // Reverse direction for :only-* (if we haven't yet done so) 1952 start = dir = type === "only" && !start && "nextSibling"; 1953 } 1954 return true; 1955 } 1956 1957 start = [ forward ? parent.firstChild : parent.lastChild ]; 1958 1959 // non-xml :nth-child(...) stores cache data on `parent` 1960 if ( forward && useCache ) { 1961 1962 // Seek `elem` from a previously-cached index 1963 1964 // ...in a gzip-friendly way 1965 node = parent; 1966 outerCache = node[ expando ] || ( node[ expando ] = {} ); 1967 1968 // Support: IE <9 only 1969 // Defend against cloned attroperties (jQuery gh-1709) 1970 uniqueCache = outerCache[ node.uniqueID ] || 1971 ( outerCache[ node.uniqueID ] = {} ); 1972 1973 cache = uniqueCache[ type ] || []; 1974 nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; 1975 diff = nodeIndex && cache[ 2 ]; 1976 node = nodeIndex && parent.childNodes[ nodeIndex ]; 1977 1978 while ( ( node = ++nodeIndex && node && node[ dir ] || 1979 1980 // Fallback to seeking `elem` from the start 1981 ( diff = nodeIndex = 0 ) || start.pop() ) ) { 1982 1983 // When found, cache indexes on `parent` and break 1984 if ( node.nodeType === 1 && ++diff && node === elem ) { 1985 uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; 1986 break; 1987 } 1988 } 1989 1990 } else { 1991 1992 // Use previously-cached element index if available 1993 if ( useCache ) { 1994 1995 // ...in a gzip-friendly way 1996 node = elem; 1997 outerCache = node[ expando ] || ( node[ expando ] = {} ); 1998 1999 // Support: IE <9 only 2000 // Defend against cloned attroperties (jQuery gh-1709) 2001 uniqueCache = outerCache[ node.uniqueID ] || 2002 ( outerCache[ node.uniqueID ] = {} ); 2003 2004 cache = uniqueCache[ type ] || []; 2005 nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; 2006 diff = nodeIndex; 2007 } 2008 2009 // xml :nth-child(...) 2010 // or :nth-last-child(...) or :nth(-last)?-of-type(...) 2011 if ( diff === false ) { 2012 2013 // Use the same loop as above to seek `elem` from the start 2014 while ( ( node = ++nodeIndex && node && node[ dir ] || 2015 ( diff = nodeIndex = 0 ) || start.pop() ) ) { 2016 2017 if ( ( ofType ? 2018 node.nodeName.toLowerCase() === name : 2019 node.nodeType === 1 ) && 2020 ++diff ) { 2021 2022 // Cache the index of each encountered element 2023 if ( useCache ) { 2024 outerCache = node[ expando ] || 2025 ( node[ expando ] = {} ); 2026 2027 // Support: IE <9 only 2028 // Defend against cloned attroperties (jQuery gh-1709) 2029 uniqueCache = outerCache[ node.uniqueID ] || 2030 ( outerCache[ node.uniqueID ] = {} ); 2031 2032 uniqueCache[ type ] = [ dirruns, diff ]; 2033 } 2034 2035 if ( node === elem ) { 2036 break; 2037 } 2038 } 2039 } 2040 } 2041 } 2042 2043 // Incorporate the offset, then check against cycle size 2044 diff -= last; 2045 return diff === first || ( diff % first === 0 && diff / first >= 0 ); 2046 } 2047 }; 2048 }, 2049 2050 "PSEUDO": function( pseudo, argument ) { 2051 2052 // pseudo-class names are case-insensitive 2053 // http://www.w3.org/TR/selectors/#pseudo-classes 2054 // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters 2055 // Remember that setFilters inherits from pseudos 2056 var args, 2057 fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || 2058 Sizzle.error( "unsupported pseudo: " + pseudo ); 2059 2060 // The user may use createPseudo to indicate that 2061 // arguments are needed to create the filter function 2062 // just as Sizzle does 2063 if ( fn[ expando ] ) { 2064 return fn( argument ); 2065 } 2066 2067 // But maintain support for old signatures 2068 if ( fn.length > 1 ) { 2069 args = [ pseudo, pseudo, "", argument ]; 2070 return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? 2071 markFunction( function( seed, matches ) { 2072 var idx, 2073 matched = fn( seed, argument ), 2074 i = matched.length; 2075 while ( i-- ) { 2076 idx = indexOf( seed, matched[ i ] ); 2077 seed[ idx ] = !( matches[ idx ] = matched[ i ] ); 2078 } 2079 } ) : 2080 function( elem ) { 2081 return fn( elem, 0, args ); 2082 }; 2083 } 2084 2085 return fn; 2086 } 2087 }, 2088 2089 pseudos: { 2090 2091 // Potentially complex pseudos 2092 "not": markFunction( function( selector ) { 2093 2094 // Trim the selector passed to compile 2095 // to avoid treating leading and trailing 2096 // spaces as combinators 2097 var input = [], 2098 results = [], 2099 matcher = compile( selector.replace( rtrim, "$1" ) ); 2100 2101 return matcher[ expando ] ? 2102 markFunction( function( seed, matches, _context, xml ) { 2103 var elem, 2104 unmatched = matcher( seed, null, xml, [] ), 2105 i = seed.length; 2106 2107 // Match elements unmatched by `matcher` 2108 while ( i-- ) { 2109 if ( ( elem = unmatched[ i ] ) ) { 2110 seed[ i ] = !( matches[ i ] = elem ); 2111 } 2112 } 2113 } ) : 2114 function( elem, _context, xml ) { 2115 input[ 0 ] = elem; 2116 matcher( input, null, xml, results ); 2117 2118 // Don't keep the element (issue #299) 2119 input[ 0 ] = null; 2120 return !results.pop(); 2121 }; 2122 } ), 2123 2124 "has": markFunction( function( selector ) { 2125 return function( elem ) { 2126 return Sizzle( selector, elem ).length > 0; 2127 }; 2128 } ), 2129 2130 "contains": markFunction( function( text ) { 2131 text = text.replace( runescape, funescape ); 2132 return function( elem ) { 2133 return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; 2134 }; 2135 } ), 2136 2137 // "Whether an element is represented by a :lang() selector 2138 // is based solely on the element's language value 2139 // being equal to the identifier C, 2140 // or beginning with the identifier C immediately followed by "-". 2141 // The matching of C against the element's language value is performed case-insensitively. 2142 // The identifier C does not have to be a valid language name." 2143 // http://www.w3.org/TR/selectors/#lang-pseudo 2144 "lang": markFunction( function( lang ) { 2145 2146 // lang value must be a valid identifier 2147 if ( !ridentifier.test( lang || "" ) ) { 2148 Sizzle.error( "unsupported lang: " + lang ); 2149 } 2150 lang = lang.replace( runescape, funescape ).toLowerCase(); 2151 return function( elem ) { 2152 var elemLang; 2153 do { 2154 if ( ( elemLang = documentIsHTML ? 2155 elem.lang : 2156 elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { 2157 2158 elemLang = elemLang.toLowerCase(); 2159 return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; 2160 } 2161 } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); 2162 return false; 2163 }; 2164 } ), 2165 2166 // Miscellaneous 2167 "target": function( elem ) { 2168 var hash = window.location && window.location.hash; 2169 return hash && hash.slice( 1 ) === elem.id; 2170 }, 2171 2172 "root": function( elem ) { 2173 return elem === docElem; 2174 }, 2175 2176 "focus": function( elem ) { 2177 return elem === document.activeElement && 2178 ( !document.hasFocus || document.hasFocus() ) && 2179 !!( elem.type || elem.href || ~elem.tabIndex ); 2180 }, 2181 2182 // Boolean properties 2183 "enabled": createDisabledPseudo( false ), 2184 "disabled": createDisabledPseudo( true ), 2185 2186 "checked": function( elem ) { 2187 2188 // In CSS3, :checked should return both checked and selected elements 2189 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 2190 var nodeName = elem.nodeName.toLowerCase(); 2191 return ( nodeName === "input" && !!elem.checked ) || 2192 ( nodeName === "option" && !!elem.selected ); 2193 }, 2194 2195 "selected": function( elem ) { 2196 2197 // Accessing this property makes selected-by-default 2198 // options in Safari work properly 2199 if ( elem.parentNode ) { 2200 // eslint-disable-next-line no-unused-expressions 2201 elem.parentNode.selectedIndex; 2202 } 2203 2204 return elem.selected === true; 2205 }, 2206 2207 // Contents 2208 "empty": function( elem ) { 2209 2210 // http://www.w3.org/TR/selectors/#empty-pseudo 2211 // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), 2212 // but not by others (comment: 8; processing instruction: 7; etc.) 2213 // nodeType < 6 works because attributes (2) do not appear as children 2214 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { 2215 if ( elem.nodeType < 6 ) { 2216 return false; 2217 } 2218 } 2219 return true; 2220 }, 2221 2222 "parent": function( elem ) { 2223 return !Expr.pseudos[ "empty" ]( elem ); 2224 }, 2225 2226 // Element/input types 2227 "header": function( elem ) { 2228 return rheader.test( elem.nodeName ); 2229 }, 2230 2231 "input": function( elem ) { 2232 return rinputs.test( elem.nodeName ); 2233 }, 2234 2235 "button": function( elem ) { 2236 var name = elem.nodeName.toLowerCase(); 2237 return name === "input" && elem.type === "button" || name === "button"; 2238 }, 2239 2240 "text": function( elem ) { 2241 var attr; 2242 return elem.nodeName.toLowerCase() === "input" && 2243 elem.type === "text" && 2244 2245 // Support: IE<8 2246 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" 2247 ( ( attr = elem.getAttribute( "type" ) ) == null || 2248 attr.toLowerCase() === "text" ); 2249 }, 2250 2251 // Position-in-collection 2252 "first": createPositionalPseudo( function() { 2253 return [ 0 ]; 2254 } ), 2255 2256 "last": createPositionalPseudo( function( _matchIndexes, length ) { 2257 return [ length - 1 ]; 2258 } ), 2259 2260 "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { 2261 return [ argument < 0 ? argument + length : argument ]; 2262 } ), 2263 2264 "even": createPositionalPseudo( function( matchIndexes, length ) { 2265 var i = 0; 2266 for ( ; i < length; i += 2 ) { 2267 matchIndexes.push( i ); 2268 } 2269 return matchIndexes; 2270 } ), 2271 2272 "odd": createPositionalPseudo( function( matchIndexes, length ) { 2273 var i = 1; 2274 for ( ; i < length; i += 2 ) { 2275 matchIndexes.push( i ); 2276 } 2277 return matchIndexes; 2278 } ), 2279 2280 "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { 2281 var i = argument < 0 ? 2282 argument + length : 2283 argument > length ? 2284 length : 2285 argument; 2286 for ( ; --i >= 0; ) { 2287 matchIndexes.push( i ); 2288 } 2289 return matchIndexes; 2290 } ), 2291 2292 "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { 2293 var i = argument < 0 ? argument + length : argument; 2294 for ( ; ++i < length; ) { 2295 matchIndexes.push( i ); 2296 } 2297 return matchIndexes; 2298 } ) 2299 } 2300}; 2301 2302Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; 2303 2304// Add button/input type pseudos 2305for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { 2306 Expr.pseudos[ i ] = createInputPseudo( i ); 2307} 2308for ( i in { submit: true, reset: true } ) { 2309 Expr.pseudos[ i ] = createButtonPseudo( i ); 2310} 2311 2312// Easy API for creating new setFilters 2313function setFilters() {} 2314setFilters.prototype = Expr.filters = Expr.pseudos; 2315Expr.setFilters = new setFilters(); 2316 2317tokenize = Sizzle.tokenize = function( selector, parseOnly ) { 2318 var matched, match, tokens, type, 2319 soFar, groups, preFilters, 2320 cached = tokenCache[ selector + " " ]; 2321 2322 if ( cached ) { 2323 return parseOnly ? 0 : cached.slice( 0 ); 2324 } 2325 2326 soFar = selector; 2327 groups = []; 2328 preFilters = Expr.preFilter; 2329 2330 while ( soFar ) { 2331 2332 // Comma and first run 2333 if ( !matched || ( match = rcomma.exec( soFar ) ) ) { 2334 if ( match ) { 2335 2336 // Don't consume trailing commas as valid 2337 soFar = soFar.slice( match[ 0 ].length ) || soFar; 2338 } 2339 groups.push( ( tokens = [] ) ); 2340 } 2341 2342 matched = false; 2343 2344 // Combinators 2345 if ( ( match = rcombinators.exec( soFar ) ) ) { 2346 matched = match.shift(); 2347 tokens.push( { 2348 value: matched, 2349 2350 // Cast descendant combinators to space 2351 type: match[ 0 ].replace( rtrim, " " ) 2352 } ); 2353 soFar = soFar.slice( matched.length ); 2354 } 2355 2356 // Filters 2357 for ( type in Expr.filter ) { 2358 if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || 2359 ( match = preFilters[ type ]( match ) ) ) ) { 2360 matched = match.shift(); 2361 tokens.push( { 2362 value: matched, 2363 type: type, 2364 matches: match 2365 } ); 2366 soFar = soFar.slice( matched.length ); 2367 } 2368 } 2369 2370 if ( !matched ) { 2371 break; 2372 } 2373 } 2374 2375 // Return the length of the invalid excess 2376 // if we're just parsing 2377 // Otherwise, throw an error or return tokens 2378 return parseOnly ? 2379 soFar.length : 2380 soFar ? 2381 Sizzle.error( selector ) : 2382 2383 // Cache the tokens 2384 tokenCache( selector, groups ).slice( 0 ); 2385}; 2386 2387function toSelector( tokens ) { 2388 var i = 0, 2389 len = tokens.length, 2390 selector = ""; 2391 for ( ; i < len; i++ ) { 2392 selector += tokens[ i ].value; 2393 } 2394 return selector; 2395} 2396 2397function addCombinator( matcher, combinator, base ) { 2398 var dir = combinator.dir, 2399 skip = combinator.next, 2400 key = skip || dir, 2401 checkNonElements = base && key === "parentNode", 2402 doneName = done++; 2403 2404 return combinator.first ? 2405 2406 // Check against closest ancestor/preceding element 2407 function( elem, context, xml ) { 2408 while ( ( elem = elem[ dir ] ) ) { 2409 if ( elem.nodeType === 1 || checkNonElements ) { 2410 return matcher( elem, context, xml ); 2411 } 2412 } 2413 return false; 2414 } : 2415 2416 // Check against all ancestor/preceding elements 2417 function( elem, context, xml ) { 2418 var oldCache, uniqueCache, outerCache, 2419 newCache = [ dirruns, doneName ]; 2420 2421 // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching 2422 if ( xml ) { 2423 while ( ( elem = elem[ dir ] ) ) { 2424 if ( elem.nodeType === 1 || checkNonElements ) { 2425 if ( matcher( elem, context, xml ) ) { 2426 return true; 2427 } 2428 } 2429 } 2430 } else { 2431 while ( ( elem = elem[ dir ] ) ) { 2432 if ( elem.nodeType === 1 || checkNonElements ) { 2433 outerCache = elem[ expando ] || ( elem[ expando ] = {} ); 2434 2435 // Support: IE <9 only 2436 // Defend against cloned attroperties (jQuery gh-1709) 2437 uniqueCache = outerCache[ elem.uniqueID ] || 2438 ( outerCache[ elem.uniqueID ] = {} ); 2439 2440 if ( skip && skip === elem.nodeName.toLowerCase() ) { 2441 elem = elem[ dir ] || elem; 2442 } else if ( ( oldCache = uniqueCache[ key ] ) && 2443 oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { 2444 2445 // Assign to newCache so results back-propagate to previous elements 2446 return ( newCache[ 2 ] = oldCache[ 2 ] ); 2447 } else { 2448 2449 // Reuse newcache so results back-propagate to previous elements 2450 uniqueCache[ key ] = newCache; 2451 2452 // A match means we're done; a fail means we have to keep checking 2453 if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { 2454 return true; 2455 } 2456 } 2457 } 2458 } 2459 } 2460 return false; 2461 }; 2462} 2463 2464function elementMatcher( matchers ) { 2465 return matchers.length > 1 ? 2466 function( elem, context, xml ) { 2467 var i = matchers.length; 2468 while ( i-- ) { 2469 if ( !matchers[ i ]( elem, context, xml ) ) { 2470 return false; 2471 } 2472 } 2473 return true; 2474 } : 2475 matchers[ 0 ]; 2476} 2477 2478function multipleContexts( selector, contexts, results ) { 2479 var i = 0, 2480 len = contexts.length; 2481 for ( ; i < len; i++ ) { 2482 Sizzle( selector, contexts[ i ], results ); 2483 } 2484 return results; 2485} 2486 2487function condense( unmatched, map, filter, context, xml ) { 2488 var elem, 2489 newUnmatched = [], 2490 i = 0, 2491 len = unmatched.length, 2492 mapped = map != null; 2493 2494 for ( ; i < len; i++ ) { 2495 if ( ( elem = unmatched[ i ] ) ) { 2496 if ( !filter || filter( elem, context, xml ) ) { 2497 newUnmatched.push( elem ); 2498 if ( mapped ) { 2499 map.push( i ); 2500 } 2501 } 2502 } 2503 } 2504 2505 return newUnmatched; 2506} 2507 2508function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { 2509 if ( postFilter && !postFilter[ expando ] ) { 2510 postFilter = setMatcher( postFilter ); 2511 } 2512 if ( postFinder && !postFinder[ expando ] ) { 2513 postFinder = setMatcher( postFinder, postSelector ); 2514 } 2515 return markFunction( function( seed, results, context, xml ) { 2516 var temp, i, elem, 2517 preMap = [], 2518 postMap = [], 2519 preexisting = results.length, 2520 2521 // Get initial elements from seed or context 2522 elems = seed || multipleContexts( 2523 selector || "*", 2524 context.nodeType ? [ context ] : context, 2525 [] 2526 ), 2527 2528 // Prefilter to get matcher input, preserving a map for seed-results synchronization 2529 matcherIn = preFilter && ( seed || !selector ) ? 2530 condense( elems, preMap, preFilter, context, xml ) : 2531 elems, 2532 2533 matcherOut = matcher ? 2534 2535 // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, 2536 postFinder || ( seed ? preFilter : preexisting || postFilter ) ? 2537 2538 // ...intermediate processing is necessary 2539 [] : 2540 2541 // ...otherwise use results directly 2542 results : 2543 matcherIn; 2544 2545 // Find primary matches 2546 if ( matcher ) { 2547 matcher( matcherIn, matcherOut, context, xml ); 2548 } 2549 2550 // Apply postFilter 2551 if ( postFilter ) { 2552 temp = condense( matcherOut, postMap ); 2553 postFilter( temp, [], context, xml ); 2554 2555 // Un-match failing elements by moving them back to matcherIn 2556 i = temp.length; 2557 while ( i-- ) { 2558 if ( ( elem = temp[ i ] ) ) { 2559 matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); 2560 } 2561 } 2562 } 2563 2564 if ( seed ) { 2565 if ( postFinder || preFilter ) { 2566 if ( postFinder ) { 2567 2568 // Get the final matcherOut by condensing this intermediate into postFinder contexts 2569 temp = []; 2570 i = matcherOut.length; 2571 while ( i-- ) { 2572 if ( ( elem = matcherOut[ i ] ) ) { 2573 2574 // Restore matcherIn since elem is not yet a final match 2575 temp.push( ( matcherIn[ i ] = elem ) ); 2576 } 2577 } 2578 postFinder( null, ( matcherOut = [] ), temp, xml ); 2579 } 2580 2581 // Move matched elements from seed to results to keep them synchronized 2582 i = matcherOut.length; 2583 while ( i-- ) { 2584 if ( ( elem = matcherOut[ i ] ) && 2585 ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { 2586 2587 seed[ temp ] = !( results[ temp ] = elem ); 2588 } 2589 } 2590 } 2591 2592 // Add elements to results, through postFinder if defined 2593 } else { 2594 matcherOut = condense( 2595 matcherOut === results ? 2596 matcherOut.splice( preexisting, matcherOut.length ) : 2597 matcherOut 2598 ); 2599 if ( postFinder ) { 2600 postFinder( null, results, matcherOut, xml ); 2601 } else { 2602 push.apply( results, matcherOut ); 2603 } 2604 } 2605 } ); 2606} 2607 2608function matcherFromTokens( tokens ) { 2609 var checkContext, matcher, j, 2610 len = tokens.length, 2611 leadingRelative = Expr.relative[ tokens[ 0 ].type ], 2612 implicitRelative = leadingRelative || Expr.relative[ " " ], 2613 i = leadingRelative ? 1 : 0, 2614 2615 // The foundational matcher ensures that elements are reachable from top-level context(s) 2616 matchContext = addCombinator( function( elem ) { 2617 return elem === checkContext; 2618 }, implicitRelative, true ), 2619 matchAnyContext = addCombinator( function( elem ) { 2620 return indexOf( checkContext, elem ) > -1; 2621 }, implicitRelative, true ), 2622 matchers = [ function( elem, context, xml ) { 2623 var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( 2624 ( checkContext = context ).nodeType ? 2625 matchContext( elem, context, xml ) : 2626 matchAnyContext( elem, context, xml ) ); 2627 2628 // Avoid hanging onto element (issue #299) 2629 checkContext = null; 2630 return ret; 2631 } ]; 2632 2633 for ( ; i < len; i++ ) { 2634 if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { 2635 matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; 2636 } else { 2637 matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); 2638 2639 // Return special upon seeing a positional matcher 2640 if ( matcher[ expando ] ) { 2641 2642 // Find the next relative operator (if any) for proper handling 2643 j = ++i; 2644 for ( ; j < len; j++ ) { 2645 if ( Expr.relative[ tokens[ j ].type ] ) { 2646 break; 2647 } 2648 } 2649 return setMatcher( 2650 i > 1 && elementMatcher( matchers ), 2651 i > 1 && toSelector( 2652 2653 // If the preceding token was a descendant combinator, insert an implicit any-element `*` 2654 tokens 2655 .slice( 0, i - 1 ) 2656 .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) 2657 ).replace( rtrim, "$1" ), 2658 matcher, 2659 i < j && matcherFromTokens( tokens.slice( i, j ) ), 2660 j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), 2661 j < len && toSelector( tokens ) 2662 ); 2663 } 2664 matchers.push( matcher ); 2665 } 2666 } 2667 2668 return elementMatcher( matchers ); 2669} 2670 2671function matcherFromGroupMatchers( elementMatchers, setMatchers ) { 2672 var bySet = setMatchers.length > 0, 2673 byElement = elementMatchers.length > 0, 2674 superMatcher = function( seed, context, xml, results, outermost ) { 2675 var elem, j, matcher, 2676 matchedCount = 0, 2677 i = "0", 2678 unmatched = seed && [], 2679 setMatched = [], 2680 contextBackup = outermostContext, 2681 2682 // We must always have either seed elements or outermost context 2683 elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), 2684 2685 // Use integer dirruns iff this is the outermost matcher 2686 dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), 2687 len = elems.length; 2688 2689 if ( outermost ) { 2690 2691 // Support: IE 11+, Edge 17 - 18+ 2692 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 2693 // two documents; shallow comparisons work. 2694 // eslint-disable-next-line eqeqeq 2695 outermostContext = context == document || context || outermost; 2696 } 2697 2698 // Add elements passing elementMatchers directly to results 2699 // Support: IE<9, Safari 2700 // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id 2701 for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { 2702 if ( byElement && elem ) { 2703 j = 0; 2704 2705 // Support: IE 11+, Edge 17 - 18+ 2706 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 2707 // two documents; shallow comparisons work. 2708 // eslint-disable-next-line eqeqeq 2709 if ( !context && elem.ownerDocument != document ) { 2710 setDocument( elem ); 2711 xml = !documentIsHTML; 2712 } 2713 while ( ( matcher = elementMatchers[ j++ ] ) ) { 2714 if ( matcher( elem, context || document, xml ) ) { 2715 results.push( elem ); 2716 break; 2717 } 2718 } 2719 if ( outermost ) { 2720 dirruns = dirrunsUnique; 2721 } 2722 } 2723 2724 // Track unmatched elements for set filters 2725 if ( bySet ) { 2726 2727 // They will have gone through all possible matchers 2728 if ( ( elem = !matcher && elem ) ) { 2729 matchedCount--; 2730 } 2731 2732 // Lengthen the array for every element, matched or not 2733 if ( seed ) { 2734 unmatched.push( elem ); 2735 } 2736 } 2737 } 2738 2739 // `i` is now the count of elements visited above, and adding it to `matchedCount` 2740 // makes the latter nonnegative. 2741 matchedCount += i; 2742 2743 // Apply set filters to unmatched elements 2744 // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` 2745 // equals `i`), unless we didn't visit _any_ elements in the above loop because we have 2746 // no element matchers and no seed. 2747 // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that 2748 // case, which will result in a "00" `matchedCount` that differs from `i` but is also 2749 // numerically zero. 2750 if ( bySet && i !== matchedCount ) { 2751 j = 0; 2752 while ( ( matcher = setMatchers[ j++ ] ) ) { 2753 matcher( unmatched, setMatched, context, xml ); 2754 } 2755 2756 if ( seed ) { 2757 2758 // Reintegrate element matches to eliminate the need for sorting 2759 if ( matchedCount > 0 ) { 2760 while ( i-- ) { 2761 if ( !( unmatched[ i ] || setMatched[ i ] ) ) { 2762 setMatched[ i ] = pop.call( results ); 2763 } 2764 } 2765 } 2766 2767 // Discard index placeholder values to get only actual matches 2768 setMatched = condense( setMatched ); 2769 } 2770 2771 // Add matches to results 2772 push.apply( results, setMatched ); 2773 2774 // Seedless set matches succeeding multiple successful matchers stipulate sorting 2775 if ( outermost && !seed && setMatched.length > 0 && 2776 ( matchedCount + setMatchers.length ) > 1 ) { 2777 2778 Sizzle.uniqueSort( results ); 2779 } 2780 } 2781 2782 // Override manipulation of globals by nested matchers 2783 if ( outermost ) { 2784 dirruns = dirrunsUnique; 2785 outermostContext = contextBackup; 2786 } 2787 2788 return unmatched; 2789 }; 2790 2791 return bySet ? 2792 markFunction( superMatcher ) : 2793 superMatcher; 2794} 2795 2796compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { 2797 var i, 2798 setMatchers = [], 2799 elementMatchers = [], 2800 cached = compilerCache[ selector + " " ]; 2801 2802 if ( !cached ) { 2803 2804 // Generate a function of recursive functions that can be used to check each element 2805 if ( !match ) { 2806 match = tokenize( selector ); 2807 } 2808 i = match.length; 2809 while ( i-- ) { 2810 cached = matcherFromTokens( match[ i ] ); 2811 if ( cached[ expando ] ) { 2812 setMatchers.push( cached ); 2813 } else { 2814 elementMatchers.push( cached ); 2815 } 2816 } 2817 2818 // Cache the compiled function 2819 cached = compilerCache( 2820 selector, 2821 matcherFromGroupMatchers( elementMatchers, setMatchers ) 2822 ); 2823 2824 // Save selector and tokenization 2825 cached.selector = selector; 2826 } 2827 return cached; 2828}; 2829 2830/** 2831 * A low-level selection function that works with Sizzle's compiled 2832 * selector functions 2833 * @param {String|Function} selector A selector or a pre-compiled 2834 * selector function built with Sizzle.compile 2835 * @param {Element} context 2836 * @param {Array} [results] 2837 * @param {Array} [seed] A set of elements to match against 2838 */ 2839select = Sizzle.select = function( selector, context, results, seed ) { 2840 var i, tokens, token, type, find, 2841 compiled = typeof selector === "function" && selector, 2842 match = !seed && tokenize( ( selector = compiled.selector || selector ) ); 2843 2844 results = results || []; 2845 2846 // Try to minimize operations if there is only one selector in the list and no seed 2847 // (the latter of which guarantees us context) 2848 if ( match.length === 1 ) { 2849 2850 // Reduce context if the leading compound selector is an ID 2851 tokens = match[ 0 ] = match[ 0 ].slice( 0 ); 2852 if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && 2853 context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { 2854 2855 context = ( Expr.find[ "ID" ]( token.matches[ 0 ] 2856 .replace( runescape, funescape ), context ) || [] )[ 0 ]; 2857 if ( !context ) { 2858 return results; 2859 2860 // Precompiled matchers will still verify ancestry, so step up a level 2861 } else if ( compiled ) { 2862 context = context.parentNode; 2863 } 2864 2865 selector = selector.slice( tokens.shift().value.length ); 2866 } 2867 2868 // Fetch a seed set for right-to-left matching 2869 i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; 2870 while ( i-- ) { 2871 token = tokens[ i ]; 2872 2873 // Abort if we hit a combinator 2874 if ( Expr.relative[ ( type = token.type ) ] ) { 2875 break; 2876 } 2877 if ( ( find = Expr.find[ type ] ) ) { 2878 2879 // Search, expanding context for leading sibling combinators 2880 if ( ( seed = find( 2881 token.matches[ 0 ].replace( runescape, funescape ), 2882 rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || 2883 context 2884 ) ) ) { 2885 2886 // If seed is empty or no tokens remain, we can return early 2887 tokens.splice( i, 1 ); 2888 selector = seed.length && toSelector( tokens ); 2889 if ( !selector ) { 2890 push.apply( results, seed ); 2891 return results; 2892 } 2893 2894 break; 2895 } 2896 } 2897 } 2898 } 2899 2900 // Compile and execute a filtering function if one is not provided 2901 // Provide `match` to avoid retokenization if we modified the selector above 2902 ( compiled || compile( selector, match ) )( 2903 seed, 2904 context, 2905 !documentIsHTML, 2906 results, 2907 !context || rsibling.test( selector ) && testContext( context.parentNode ) || context 2908 ); 2909 return results; 2910}; 2911 2912// One-time assignments 2913 2914// Sort stability 2915support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; 2916 2917// Support: Chrome 14-35+ 2918// Always assume duplicates if they aren't passed to the comparison function 2919support.detectDuplicates = !!hasDuplicate; 2920 2921// Initialize against the default document 2922setDocument(); 2923 2924// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) 2925// Detached nodes confoundingly follow *each other* 2926support.sortDetached = assert( function( el ) { 2927 2928 // Should return 1, but returns 4 (following) 2929 return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; 2930} ); 2931 2932// Support: IE<8 2933// Prevent attribute/property "interpolation" 2934// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx 2935if ( !assert( function( el ) { 2936 el.innerHTML = "<a href='#'></a>"; 2937 return el.firstChild.getAttribute( "href" ) === "#"; 2938} ) ) { 2939 addHandle( "type|href|height|width", function( elem, name, isXML ) { 2940 if ( !isXML ) { 2941 return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); 2942 } 2943 } ); 2944} 2945 2946// Support: IE<9 2947// Use defaultValue in place of getAttribute("value") 2948if ( !support.attributes || !assert( function( el ) { 2949 el.innerHTML = "<input/>"; 2950 el.firstChild.setAttribute( "value", "" ); 2951 return el.firstChild.getAttribute( "value" ) === ""; 2952} ) ) { 2953 addHandle( "value", function( elem, _name, isXML ) { 2954 if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { 2955 return elem.defaultValue; 2956 } 2957 } ); 2958} 2959 2960// Support: IE<9 2961// Use getAttributeNode to fetch booleans when getAttribute lies 2962if ( !assert( function( el ) { 2963 return el.getAttribute( "disabled" ) == null; 2964} ) ) { 2965 addHandle( booleans, function( elem, name, isXML ) { 2966 var val; 2967 if ( !isXML ) { 2968 return elem[ name ] === true ? name.toLowerCase() : 2969 ( val = elem.getAttributeNode( name ) ) && val.specified ? 2970 val.value : 2971 null; 2972 } 2973 } ); 2974} 2975 2976return Sizzle; 2977 2978} )( window ); 2979 2980 2981 2982jQuery.find = Sizzle; 2983jQuery.expr = Sizzle.selectors; 2984 2985// Deprecated 2986jQuery.expr[ ":" ] = jQuery.expr.pseudos; 2987jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; 2988jQuery.text = Sizzle.getText; 2989jQuery.isXMLDoc = Sizzle.isXML; 2990jQuery.contains = Sizzle.contains; 2991jQuery.escapeSelector = Sizzle.escape; 2992 2993 2994 2995 2996var dir = function( elem, dir, until ) { 2997 var matched = [], 2998 truncate = until !== undefined; 2999 3000 while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { 3001 if ( elem.nodeType === 1 ) { 3002 if ( truncate && jQuery( elem ).is( until ) ) { 3003 break; 3004 } 3005 matched.push( elem ); 3006 } 3007 } 3008 return matched; 3009}; 3010 3011 3012var siblings = function( n, elem ) { 3013 var matched = []; 3014 3015 for ( ; n; n = n.nextSibling ) { 3016 if ( n.nodeType === 1 && n !== elem ) { 3017 matched.push( n ); 3018 } 3019 } 3020 3021 return matched; 3022}; 3023 3024 3025var rneedsContext = jQuery.expr.match.needsContext; 3026 3027 3028 3029function nodeName( elem, name ) { 3030 3031 return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); 3032 3033} 3034var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); 3035 3036 3037 3038// Implement the identical functionality for filter and not 3039function winnow( elements, qualifier, not ) { 3040 if ( isFunction( qualifier ) ) { 3041 return jQuery.grep( elements, function( elem, i ) { 3042 return !!qualifier.call( elem, i, elem ) !== not; 3043 } ); 3044 } 3045 3046 // Single element 3047 if ( qualifier.nodeType ) { 3048 return jQuery.grep( elements, function( elem ) { 3049 return ( elem === qualifier ) !== not; 3050 } ); 3051 } 3052 3053 // Arraylike of elements (jQuery, arguments, Array) 3054 if ( typeof qualifier !== "string" ) { 3055 return jQuery.grep( elements, function( elem ) { 3056 return ( indexOf.call( qualifier, elem ) > -1 ) !== not; 3057 } ); 3058 } 3059 3060 // Filtered directly for both simple and complex selectors 3061 return jQuery.filter( qualifier, elements, not ); 3062} 3063 3064jQuery.filter = function( expr, elems, not ) { 3065 var elem = elems[ 0 ]; 3066 3067 if ( not ) { 3068 expr = ":not(" + expr + ")"; 3069 } 3070 3071 if ( elems.length === 1 && elem.nodeType === 1 ) { 3072 return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; 3073 } 3074 3075 return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { 3076 return elem.nodeType === 1; 3077 } ) ); 3078}; 3079 3080jQuery.fn.extend( { 3081 find: function( selector ) { 3082 var i, ret, 3083 len = this.length, 3084 self = this; 3085 3086 if ( typeof selector !== "string" ) {
vendor: 4,670 bytes, lines 3087-3272
3087 return this.pushStack( jQuery( selector ).filter( function() { 3088 for ( i = 0; i < len; i++ ) { 3089 if ( jQuery.contains( self[ i ], this ) ) { 3090 return true; 3091 } 3092 } 3093 } ) ); 3094 } 3095 3096 ret = this.pushStack( [] ); 3097 3098 for ( i = 0; i < len; i++ ) { 3099 jQuery.find( selector, self[ i ], ret ); 3100 } 3101 3102 return len > 1 ? jQuery.uniqueSort( ret ) : ret; 3103 }, 3104 filter: function( selector ) { 3105 return this.pushStack( winnow( this, selector || [], false ) ); 3106 }, 3107 not: function( selector ) { 3108 return this.pushStack( winnow( this, selector || [], true ) ); 3109 }, 3110 is: function( selector ) { 3111 return !!winnow( 3112 this, 3113 3114 // If this is a positional/relative selector, check membership in the returned set 3115 // so $("p:first").is("p:last") won't return true for a doc with two "p". 3116 typeof selector === "string" && rneedsContext.test( selector ) ? 3117 jQuery( selector ) : 3118 selector || [], 3119 false 3120 ).length; 3121 } 3122} ); 3123 3124 3125// Initialize a jQuery object 3126 3127 3128// A central reference to the root jQuery(document) 3129var rootjQuery, 3130 3131 // A simple way to check for HTML strings 3132 // Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521) 3133 // Strict HTML recognition (trac-11290: must start with <) 3134 // Shortcut simple #id case for speed 3135 rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, 3136 3137 init = jQuery.fn.init = function( selector, context, root ) { 3138 var match, elem; 3139 3140 // HANDLE: $(""), $(null), $(undefined), $(false) 3141 if ( !selector ) { 3142 return this; 3143 } 3144 3145 // Method init() accepts an alternate rootjQuery 3146 // so migrate can support jQuery.sub (gh-2101) 3147 root = root || rootjQuery; 3148 3149 // Handle HTML strings 3150 if ( typeof selector === "string" ) { 3151 if ( selector[ 0 ] === "<" && 3152 selector[ selector.length - 1 ] === ">" && 3153 selector.length >= 3 ) { 3154 3155 // Assume that strings that start and end with <> are HTML and skip the regex check 3156 match = [ null, selector, null ]; 3157 3158 } else { 3159 match = rquickExpr.exec( selector ); 3160 } 3161 3162 // Match html or make sure no context is specified for #id 3163 if ( match && ( match[ 1 ] || !context ) ) { 3164 3165 // HANDLE: $(html) -> $(array) 3166 if ( match[ 1 ] ) { 3167 context = context instanceof jQuery ? context[ 0 ] : context; 3168 3169 // Option to run scripts is true for back-compat 3170 // Intentionally let the error be thrown if parseHTML is not present 3171 jQuery.merge( this, jQuery.parseHTML( 3172 match[ 1 ], 3173 context && context.nodeType ? context.ownerDocument || context : document, 3174 true 3175 ) ); 3176 3177 // HANDLE: $(html, props) 3178 if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { 3179 for ( match in context ) { 3180 3181 // Properties of context are called as methods if possible 3182 if ( isFunction( this[ match ] ) ) { 3183 this[ match ]( context[ match ] ); 3184 3185 // ...and otherwise set as attributes 3186 } else { 3187 this.attr( match, context[ match ] ); 3188 } 3189 } 3190 } 3191 3192 return this; 3193 3194 // HANDLE: $(#id) 3195 } else { 3196 elem = document.getElementById( match[ 2 ] ); 3197 3198 if ( elem ) { 3199 3200 // Inject the element directly into the jQuery object 3201 this[ 0 ] = elem; 3202 this.length = 1; 3203 } 3204 return this; 3205 } 3206 3207 // HANDLE: $(expr, $(...)) 3208 } else if ( !context || context.jquery ) { 3209 return ( context || root ).find( selector ); 3210 3211 // HANDLE: $(expr, context) 3212 // (which is just equivalent to: $(context).find(expr) 3213 } else { 3214 return this.constructor( context ).find( selector ); 3215 } 3216 3217 // HANDLE: $(DOMElement) 3218 } else if ( selector.nodeType ) { 3219 this[ 0 ] = selector; 3220 this.length = 1; 3221 return this; 3222 3223 // HANDLE: $(function) 3224 // Shortcut for document ready 3225 } else if ( isFunction( selector ) ) { 3226 return root.ready !== undefined ? 3227 root.ready( selector ) : 3228 3229 // Execute immediately if ready is not present 3230 selector( jQuery ); 3231 } 3232 3233 return jQuery.makeArray( selector, this ); 3234 }; 3235 3236// Give the init function the jQuery prototype for later instantiation 3237init.prototype = jQuery.fn; 3238 3239// Initialize central reference 3240rootjQuery = jQuery( document ); 3241 3242 3243var rparentsprev = /^(?:parents|prev(?:Until|All))/, 3244 3245 // Methods guaranteed to produce a unique set when starting from a unique set 3246 guaranteedUnique = { 3247 children: true, 3248 contents: true, 3249 next: true, 3250 prev: true 3251 }; 3252 3253jQuery.fn.extend( { 3254 has: function( target ) { 3255 var targets = jQuery( target, this ), 3256 l = targets.length; 3257 3258 return this.filter( function() { 3259 var i = 0; 3260 for ( ; i < l; i++ ) { 3261 if ( jQuery.contains( this, targets[ i ] ) ) { 3262 return true; 3263 } 3264 } 3265 } ); 3266 }, 3267 3268 closest: function( selectors, context ) { 3269 var cur, 3270 i = 0, 3271 l = this.length, 3272 matched = [],
vendor: 15,549 bytes, lines 3273-3858
3273 targets = typeof selectors !== "string" && jQuery( selectors ); 3274 3275 // Positional selectors never match, since there's no _selection_ context 3276 if ( !rneedsContext.test( selectors ) ) { 3277 for ( ; i < l; i++ ) { 3278 for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { 3279 3280 // Always skip document fragments 3281 if ( cur.nodeType < 11 && ( targets ? 3282 targets.index( cur ) > -1 : 3283 3284 // Don't pass non-elements to Sizzle 3285 cur.nodeType === 1 && 3286 jQuery.find.matchesSelector( cur, selectors ) ) ) { 3287 3288 matched.push( cur ); 3289 break; 3290 } 3291 } 3292 } 3293 } 3294 3295 return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); 3296 }, 3297 3298 // Determine the position of an element within the set 3299 index: function( elem ) { 3300 3301 // No argument, return index in parent 3302 if ( !elem ) { 3303 return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; 3304 } 3305 3306 // Index in selector 3307 if ( typeof elem === "string" ) { 3308 return indexOf.call( jQuery( elem ), this[ 0 ] ); 3309 } 3310 3311 // Locate the position of the desired element 3312 return indexOf.call( this, 3313 3314 // If it receives a jQuery object, the first element is used 3315 elem.jquery ? elem[ 0 ] : elem 3316 ); 3317 }, 3318 3319 add: function( selector, context ) { 3320 return this.pushStack( 3321 jQuery.uniqueSort( 3322 jQuery.merge( this.get(), jQuery( selector, context ) ) 3323 ) 3324 ); 3325 }, 3326 3327 addBack: function( selector ) { 3328 return this.add( selector == null ? 3329 this.prevObject : this.prevObject.filter( selector ) 3330 ); 3331 } 3332} ); 3333 3334function sibling( cur, dir ) { 3335 while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} 3336 return cur; 3337} 3338 3339jQuery.each( { 3340 parent: function( elem ) { 3341 var parent = elem.parentNode; 3342 return parent && parent.nodeType !== 11 ? parent : null; 3343 }, 3344 parents: function( elem ) { 3345 return dir( elem, "parentNode" ); 3346 }, 3347 parentsUntil: function( elem, _i, until ) { 3348 return dir( elem, "parentNode", until ); 3349 }, 3350 next: function( elem ) { 3351 return sibling( elem, "nextSibling" ); 3352 }, 3353 prev: function( elem ) { 3354 return sibling( elem, "previousSibling" ); 3355 }, 3356 nextAll: function( elem ) { 3357 return dir( elem, "nextSibling" ); 3358 }, 3359 prevAll: function( elem ) { 3360 return dir( elem, "previousSibling" ); 3361 }, 3362 nextUntil: function( elem, _i, until ) { 3363 return dir( elem, "nextSibling", until ); 3364 }, 3365 prevUntil: function( elem, _i, until ) { 3366 return dir( elem, "previousSibling", until ); 3367 }, 3368 siblings: function( elem ) { 3369 return siblings( ( elem.parentNode || {} ).firstChild, elem ); 3370 }, 3371 children: function( elem ) { 3372 return siblings( elem.firstChild ); 3373 }, 3374 contents: function( elem ) { 3375 if ( elem.contentDocument != null && 3376 3377 // Support: IE 11+ 3378 // <object> elements with no `data` attribute has an object 3379 // `contentDocument` with a `null` prototype. 3380 getProto( elem.contentDocument ) ) { 3381 3382 return elem.contentDocument; 3383 } 3384 3385 // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only 3386 // Treat the template element as a regular one in browsers that 3387 // don't support it. 3388 if ( nodeName( elem, "template" ) ) { 3389 elem = elem.content || elem; 3390 } 3391 3392 return jQuery.merge( [], elem.childNodes ); 3393 } 3394}, function( name, fn ) { 3395 jQuery.fn[ name ] = function( until, selector ) { 3396 var matched = jQuery.map( this, fn, until ); 3397 3398 if ( name.slice( -5 ) !== "Until" ) { 3399 selector = until; 3400 } 3401 3402 if ( selector && typeof selector === "string" ) { 3403 matched = jQuery.filter( selector, matched ); 3404 } 3405 3406 if ( this.length > 1 ) { 3407 3408 // Remove duplicates 3409 if ( !guaranteedUnique[ name ] ) { 3410 jQuery.uniqueSort( matched ); 3411 } 3412 3413 // Reverse order for parents* and prev-derivatives 3414 if ( rparentsprev.test( name ) ) { 3415 matched.reverse(); 3416 } 3417 } 3418 3419 return this.pushStack( matched ); 3420 }; 3421} ); 3422var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); 3423 3424 3425 3426// Convert String-formatted options into Object-formatted ones 3427function createOptions( options ) { 3428 var object = {}; 3429 jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { 3430 object[ flag ] = true; 3431 } ); 3432 return object; 3433} 3434 3435/* 3436 * Create a callback list using the following parameters: 3437 * 3438 * options: an optional list of space-separated options that will change how 3439 * the callback list behaves or a more traditional option object 3440 * 3441 * By default a callback list will act like an event callback list and can be 3442 * "fired" multiple times. 3443 * 3444 * Possible options: 3445 * 3446 * once: will ensure the callback list can only be fired once (like a Deferred) 3447 * 3448 * memory: will keep track of previous values and will call any callback added 3449 * after the list has been fired right away with the latest "memorized" 3450 * values (like a Deferred) 3451 * 3452 * unique: will ensure a callback can only be added once (no duplicate in the list) 3453 * 3454 * stopOnFalse: interrupt callings when a callback returns false 3455 * 3456 */ 3457jQuery.Callbacks = function( options ) { 3458 3459 // Convert options from String-formatted to Object-formatted if needed 3460 // (we check in cache first) 3461 options = typeof options === "string" ? 3462 createOptions( options ) : 3463 jQuery.extend( {}, options ); 3464 3465 var // Flag to know if list is currently firing 3466 firing, 3467 3468 // Last fire value for non-forgettable lists 3469 memory, 3470 3471 // Flag to know if list was already fired 3472 fired, 3473 3474 // Flag to prevent firing 3475 locked, 3476 3477 // Actual callback list 3478 list = [], 3479 3480 // Queue of execution data for repeatable lists 3481 queue = [], 3482 3483 // Index of currently firing callback (modified by add/remove as needed) 3484 firingIndex = -1, 3485 3486 // Fire callbacks 3487 fire = function() { 3488 3489 // Enforce single-firing 3490 locked = locked || options.once; 3491 3492 // Execute callbacks for all pending executions, 3493 // respecting firingIndex overrides and runtime changes 3494 fired = firing = true; 3495 for ( ; queue.length; firingIndex = -1 ) { 3496 memory = queue.shift(); 3497 while ( ++firingIndex < list.length ) { 3498 3499 // Run callback and check for early termination 3500 if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && 3501 options.stopOnFalse ) { 3502 3503 // Jump to end and forget the data so .add doesn't re-fire 3504 firingIndex = list.length; 3505 memory = false; 3506 } 3507 } 3508 } 3509 3510 // Forget the data if we're done with it 3511 if ( !options.memory ) { 3512 memory = false; 3513 } 3514 3515 firing = false; 3516 3517 // Clean up if we're done firing for good 3518 if ( locked ) { 3519 3520 // Keep an empty list if we have data for future add calls 3521 if ( memory ) { 3522 list = []; 3523 3524 // Otherwise, this object is spent 3525 } else { 3526 list = ""; 3527 } 3528 } 3529 }, 3530 3531 // Actual Callbacks object 3532 self = { 3533 3534 // Add a callback or a collection of callbacks to the list 3535 add: function() { 3536 if ( list ) { 3537 3538 // If we have memory from a past run, we should fire after adding 3539 if ( memory && !firing ) { 3540 firingIndex = list.length - 1; 3541 queue.push( memory ); 3542 } 3543 3544 ( function add( args ) { 3545 jQuery.each( args, function( _, arg ) { 3546 if ( isFunction( arg ) ) { 3547 if ( !options.unique || !self.has( arg ) ) { 3548 list.push( arg ); 3549 } 3550 } else if ( arg && arg.length && toType( arg ) !== "string" ) { 3551 3552 // Inspect recursively 3553 add( arg ); 3554 } 3555 } ); 3556 } )( arguments ); 3557 3558 if ( memory && !firing ) { 3559 fire(); 3560 } 3561 } 3562 return this; 3563 }, 3564 3565 // Remove a callback from the list 3566 remove: function() { 3567 jQuery.each( arguments, function( _, arg ) { 3568 var index; 3569 while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { 3570 list.splice( index, 1 ); 3571 3572 // Handle firing indexes 3573 if ( index <= firingIndex ) { 3574 firingIndex--; 3575 } 3576 } 3577 } ); 3578 return this; 3579 }, 3580 3581 // Check if a given callback is in the list. 3582 // If no argument is given, return whether or not list has callbacks attached. 3583 has: function( fn ) { 3584 return fn ? 3585 jQuery.inArray( fn, list ) > -1 : 3586 list.length > 0; 3587 }, 3588 3589 // Remove all callbacks from the list 3590 empty: function() { 3591 if ( list ) { 3592 list = []; 3593 } 3594 return this; 3595 }, 3596 3597 // Disable .fire and .add 3598 // Abort any current/pending executions 3599 // Clear all callbacks and values 3600 disable: function() { 3601 locked = queue = []; 3602 list = memory = ""; 3603 return this; 3604 }, 3605 disabled: function() { 3606 return !list; 3607 }, 3608 3609 // Disable .fire 3610 // Also disable .add unless we have memory (since it would have no effect) 3611 // Abort any pending executions 3612 lock: function() { 3613 locked = queue = []; 3614 if ( !memory && !firing ) { 3615 list = memory = ""; 3616 } 3617 return this; 3618 }, 3619 locked: function() { 3620 return !!locked; 3621 }, 3622 3623 // Call all callbacks with the given context and arguments 3624 fireWith: function( context, args ) { 3625 if ( !locked ) { 3626 args = args || []; 3627 args = [ context, args.slice ? args.slice() : args ]; 3628 queue.push( args ); 3629 if ( !firing ) { 3630 fire(); 3631 } 3632 } 3633 return this; 3634 }, 3635 3636 // Call all the callbacks with the given arguments 3637 fire: function() { 3638 self.fireWith( this, arguments ); 3639 return this; 3640 }, 3641 3642 // To know if the callbacks have already been called at least once 3643 fired: function() { 3644 return !!fired; 3645 } 3646 }; 3647 3648 return self; 3649}; 3650 3651 3652function Identity( v ) { 3653 return v; 3654} 3655function Thrower( ex ) { 3656 throw ex; 3657} 3658 3659function adoptValue( value, resolve, reject, noValue ) { 3660 var method; 3661 3662 try { 3663 3664 // Check for promise aspect first to privilege synchronous behavior 3665 if ( value && isFunction( ( method = value.promise ) ) ) { 3666 method.call( value ).done( resolve ).fail( reject ); 3667 3668 // Other thenables 3669 } else if ( value && isFunction( ( method = value.then ) ) ) { 3670 method.call( value, resolve, reject ); 3671 3672 // Other non-thenables 3673 } else { 3674 3675 // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: 3676 // * false: [ value ].slice( 0 ) => resolve( value ) 3677 // * true: [ value ].slice( 1 ) => resolve() 3678 resolve.apply( undefined, [ value ].slice( noValue ) ); 3679 } 3680 3681 // For Promises/A+, convert exceptions into rejections 3682 // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in 3683 // Deferred#then to conditionally suppress rejection. 3684 } catch ( value ) { 3685 3686 // Support: Android 4.0 only 3687 // Strict mode functions invoked without .call/.apply get global-object context 3688 reject.apply( undefined, [ value ] ); 3689 } 3690} 3691 3692jQuery.extend( { 3693 3694 Deferred: function( func ) { 3695 var tuples = [ 3696 3697 // action, add listener, callbacks, 3698 // ... .then handlers, argument index, [final state] 3699 [ "notify", "progress", jQuery.Callbacks( "memory" ), 3700 jQuery.Callbacks( "memory" ), 2 ], 3701 [ "resolve", "done", jQuery.Callbacks( "once memory" ), 3702 jQuery.Callbacks( "once memory" ), 0, "resolved" ], 3703 [ "reject", "fail", jQuery.Callbacks( "once memory" ), 3704 jQuery.Callbacks( "once memory" ), 1, "rejected" ] 3705 ], 3706 state = "pending", 3707 promise = { 3708 state: function() { 3709 return state; 3710 }, 3711 always: function() { 3712 deferred.done( arguments ).fail( arguments ); 3713 return this; 3714 }, 3715 "catch": function( fn ) { 3716 return promise.then( null, fn ); 3717 }, 3718 3719 // Keep pipe for back-compat 3720 pipe: function( /* fnDone, fnFail, fnProgress */ ) { 3721 var fns = arguments; 3722 3723 return jQuery.Deferred( function( newDefer ) { 3724 jQuery.each( tuples, function( _i, tuple ) { 3725 3726 // Map tuples (progress, done, fail) to arguments (done, fail, progress) 3727 var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; 3728 3729 // deferred.progress(function() { bind to newDefer or newDefer.notify }) 3730 // deferred.done(function() { bind to newDefer or newDefer.resolve }) 3731 // deferred.fail(function() { bind to newDefer or newDefer.reject }) 3732 deferred[ tuple[ 1 ] ]( function() { 3733 var returned = fn && fn.apply( this, arguments ); 3734 if ( returned && isFunction( returned.promise ) ) { 3735 returned.promise() 3736 .progress( newDefer.notify ) 3737 .done( newDefer.resolve ) 3738 .fail( newDefer.reject ); 3739 } else { 3740 newDefer[ tuple[ 0 ] + "With" ]( 3741 this, 3742 fn ? [ returned ] : arguments 3743 ); 3744 } 3745 } ); 3746 } ); 3747 fns = null; 3748 } ).promise(); 3749 }, 3750 then: function( onFulfilled, onRejected, onProgress ) { 3751 var maxDepth = 0; 3752 function resolve( depth, deferred, handler, special ) { 3753 return function() { 3754 var that = this, 3755 args = arguments, 3756 mightThrow = function() { 3757 var returned, then; 3758 3759 // Support: Promises/A+ section 2.3.3.3.3 3760 // https://promisesaplus.com/#point-59 3761 // Ignore double-resolution attempts 3762 if ( depth < maxDepth ) { 3763 return; 3764 } 3765 3766 returned = handler.apply( that, args ); 3767 3768 // Support: Promises/A+ section 2.3.1 3769 // https://promisesaplus.com/#point-48 3770 if ( returned === deferred.promise() ) { 3771 throw new TypeError( "Thenable self-resolution" ); 3772 } 3773 3774 // Support: Promises/A+ sections 2.3.3.1, 3.5 3775 // https://promisesaplus.com/#point-54 3776 // https://promisesaplus.com/#point-75 3777 // Retrieve `then` only once 3778 then = returned && 3779 3780 // Support: Promises/A+ section 2.3.4 3781 // https://promisesaplus.com/#point-64 3782 // Only check objects and functions for thenability 3783 ( typeof returned === "object" || 3784 typeof returned === "function" ) && 3785 returned.then; 3786 3787 // Handle a returned thenable 3788 if ( isFunction( then ) ) { 3789 3790 // Special processors (notify) just wait for resolution 3791 if ( special ) { 3792 then.call( 3793 returned, 3794 resolve( maxDepth, deferred, Identity, special ), 3795 resolve( maxDepth, deferred, Thrower, special ) 3796 ); 3797 3798 // Normal processors (resolve) also hook into progress 3799 } else { 3800 3801 // ...and disregard older resolution values 3802 maxDepth++; 3803 3804 then.call( 3805 returned, 3806 resolve( maxDepth, deferred, Identity, special ), 3807 resolve( maxDepth, deferred, Thrower, special ), 3808 resolve( maxDepth, deferred, Identity, 3809 deferred.notifyWith ) 3810 ); 3811 } 3812 3813 // Handle all other returned values 3814 } else { 3815 3816 // Only substitute handlers pass on context 3817 // and multiple values (non-spec behavior) 3818 if ( handler !== Identity ) { 3819 that = undefined; 3820 args = [ returned ]; 3821 } 3822 3823 // Process the value(s) 3824 // Default process is resolve 3825 ( special || deferred.resolveWith )( that, args ); 3826 } 3827 }, 3828 3829 // Only normal processors (resolve) catch and reject exceptions 3830 process = special ? 3831 mightThrow : 3832 function() { 3833 try { 3834 mightThrow(); 3835 } catch ( e ) { 3836 3837 if ( jQuery.Deferred.exceptionHook ) { 3838 jQuery.Deferred.exceptionHook( e, 3839 process.stackTrace ); 3840 } 3841 3842 // Support: Promises/A+ section 2.3.3.3.4.1 3843 // https://promisesaplus.com/#point-61 3844 // Ignore post-resolution exceptions 3845 if ( depth + 1 >= maxDepth ) { 3846 3847 // Only substitute handlers pass on context 3848 // and multiple values (non-spec behavior) 3849 if ( handler !== Thrower ) { 3850 that = undefined; 3851 args = [ e ]; 3852 } 3853 3854 deferred.rejectWith( that, args ); 3855 } 3856 } 3857 }; 3858
vendor: 10,679 bytes, lines 3859-4307
3859 // Support: Promises/A+ section 2.3.3.3.1 3860 // https://promisesaplus.com/#point-57 3861 // Re-resolve promises immediately to dodge false rejection from 3862 // subsequent errors 3863 if ( depth ) { 3864 process(); 3865 } else { 3866 3867 // Call an optional hook to record the stack, in case of exception 3868 // since it's otherwise lost when execution goes async 3869 if ( jQuery.Deferred.getStackHook ) { 3870 process.stackTrace = jQuery.Deferred.getStackHook(); 3871 } 3872 window.setTimeout( process ); 3873 } 3874 }; 3875 } 3876 3877 return jQuery.Deferred( function( newDefer ) { 3878 3879 // progress_handlers.add( ... ) 3880 tuples[ 0 ][ 3 ].add( 3881 resolve( 3882 0, 3883 newDefer, 3884 isFunction( onProgress ) ? 3885 onProgress : 3886 Identity, 3887 newDefer.notifyWith 3888 ) 3889 ); 3890 3891 // fulfilled_handlers.add( ... ) 3892 tuples[ 1 ][ 3 ].add( 3893 resolve( 3894 0, 3895 newDefer, 3896 isFunction( onFulfilled ) ? 3897 onFulfilled : 3898 Identity 3899 ) 3900 ); 3901 3902 // rejected_handlers.add( ... ) 3903 tuples[ 2 ][ 3 ].add( 3904 resolve( 3905 0, 3906 newDefer, 3907 isFunction( onRejected ) ? 3908 onRejected : 3909 Thrower 3910 ) 3911 ); 3912 } ).promise(); 3913 }, 3914 3915 // Get a promise for this deferred 3916 // If obj is provided, the promise aspect is added to the object 3917 promise: function( obj ) { 3918 return obj != null ? jQuery.extend( obj, promise ) : promise; 3919 } 3920 }, 3921 deferred = {}; 3922 3923 // Add list-specific methods 3924 jQuery.each( tuples, function( i, tuple ) { 3925 var list = tuple[ 2 ], 3926 stateString = tuple[ 5 ]; 3927 3928 // promise.progress = list.add 3929 // promise.done = list.add 3930 // promise.fail = list.add 3931 promise[ tuple[ 1 ] ] = list.add; 3932 3933 // Handle state 3934 if ( stateString ) { 3935 list.add( 3936 function() { 3937 3938 // state = "resolved" (i.e., fulfilled) 3939 // state = "rejected" 3940 state = stateString; 3941 }, 3942 3943 // rejected_callbacks.disable 3944 // fulfilled_callbacks.disable 3945 tuples[ 3 - i ][ 2 ].disable, 3946 3947 // rejected_handlers.disable 3948 // fulfilled_handlers.disable 3949 tuples[ 3 - i ][ 3 ].disable, 3950 3951 // progress_callbacks.lock 3952 tuples[ 0 ][ 2 ].lock, 3953 3954 // progress_handlers.lock 3955 tuples[ 0 ][ 3 ].lock 3956 ); 3957 } 3958 3959 // progress_handlers.fire 3960 // fulfilled_handlers.fire 3961 // rejected_handlers.fire 3962 list.add( tuple[ 3 ].fire ); 3963 3964 // deferred.notify = function() { deferred.notifyWith(...) } 3965 // deferred.resolve = function() { deferred.resolveWith(...) } 3966 // deferred.reject = function() { deferred.rejectWith(...) } 3967 deferred[ tuple[ 0 ] ] = function() { 3968 deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); 3969 return this; 3970 }; 3971 3972 // deferred.notifyWith = list.fireWith 3973 // deferred.resolveWith = list.fireWith 3974 // deferred.rejectWith = list.fireWith 3975 deferred[ tuple[ 0 ] + "With" ] = list.fireWith; 3976 } ); 3977 3978 // Make the deferred a promise 3979 promise.promise( deferred ); 3980 3981 // Call given func if any 3982 if ( func ) { 3983 func.call( deferred, deferred ); 3984 } 3985 3986 // All done! 3987 return deferred; 3988 }, 3989 3990 // Deferred helper 3991 when: function( singleValue ) { 3992 var 3993 3994 // count of uncompleted subordinates 3995 remaining = arguments.length, 3996 3997 // count of unprocessed arguments 3998 i = remaining, 3999 4000 // subordinate fulfillment data 4001 resolveContexts = Array( i ), 4002 resolveValues = slice.call( arguments ), 4003 4004 // the primary Deferred 4005 primary = jQuery.Deferred(), 4006 4007 // subordinate callback factory 4008 updateFunc = function( i ) { 4009 return function( value ) { 4010 resolveContexts[ i ] = this; 4011 resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; 4012 if ( !( --remaining ) ) { 4013 primary.resolveWith( resolveContexts, resolveValues ); 4014 } 4015 }; 4016 }; 4017 4018 // Single- and empty arguments are adopted like Promise.resolve 4019 if ( remaining <= 1 ) { 4020 adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject, 4021 !remaining ); 4022 4023 // Use .then() to unwrap secondary thenables (cf. gh-3000) 4024 if ( primary.state() === "pending" || 4025 isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { 4026 4027 return primary.then(); 4028 } 4029 } 4030 4031 // Multiple arguments are aggregated like Promise.all array elements 4032 while ( i-- ) { 4033 adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject ); 4034 } 4035 4036 return primary.promise(); 4037 } 4038} ); 4039 4040 4041// These usually indicate a programmer mistake during development, 4042// warn about them ASAP rather than swallowing them by default. 4043var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; 4044 4045jQuery.Deferred.exceptionHook = function( error, stack ) { 4046 4047 // Support: IE 8 - 9 only 4048 // Console exists when dev tools are open, which can happen at any time 4049 if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { 4050 window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); 4051 } 4052}; 4053 4054 4055 4056 4057jQuery.readyException = function( error ) { 4058 window.setTimeout( function() { 4059 throw error; 4060 } ); 4061}; 4062 4063 4064 4065 4066// The deferred used on DOM ready 4067var readyList = jQuery.Deferred(); 4068 4069jQuery.fn.ready = function( fn ) { 4070 4071 readyList 4072 .then( fn ) 4073 4074 // Wrap jQuery.readyException in a function so that the lookup 4075 // happens at the time of error handling instead of callback 4076 // registration. 4077 .catch( function( error ) { 4078 jQuery.readyException( error ); 4079 } ); 4080 4081 return this; 4082}; 4083 4084jQuery.extend( { 4085 4086 // Is the DOM ready to be used? Set to true once it occurs. 4087 isReady: false, 4088 4089 // A counter to track how many items to wait for before 4090 // the ready event fires. See trac-6781 4091 readyWait: 1, 4092 4093 // Handle when the DOM is ready 4094 ready: function( wait ) { 4095 4096 // Abort if there are pending holds or we're already ready 4097 if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { 4098 return; 4099 } 4100 4101 // Remember that the DOM is ready 4102 jQuery.isReady = true; 4103 4104 // If a normal DOM Ready event fired, decrement, and wait if need be 4105 if ( wait !== true && --jQuery.readyWait > 0 ) { 4106 return; 4107 } 4108 4109 // If there are functions bound, to execute 4110 readyList.resolveWith( document, [ jQuery ] ); 4111 } 4112} ); 4113 4114jQuery.ready.then = readyList.then; 4115 4116// The ready event handler and self cleanup method 4117function completed() { 4118 document.removeEventListener( "DOMContentLoaded", completed ); 4119 window.removeEventListener( "load", completed ); 4120 jQuery.ready(); 4121} 4122 4123// Catch cases where $(document).ready() is called 4124// after the browser event has already occurred. 4125// Support: IE <=9 - 10 only 4126// Older IE sometimes signals "interactive" too soon 4127if ( document.readyState === "complete" || 4128 ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { 4129 4130 // Handle it asynchronously to allow scripts the opportunity to delay ready 4131 window.setTimeout( jQuery.ready ); 4132 4133} else { 4134 4135 // Use the handy event callback 4136 document.addEventListener( "DOMContentLoaded", completed ); 4137 4138 // A fallback to window.onload, that will always work 4139 window.addEventListener( "load", completed ); 4140} 4141 4142 4143 4144 4145// Multifunctional method to get and set values of a collection 4146// The value/s can optionally be executed if it's a function 4147var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { 4148 var i = 0, 4149 len = elems.length, 4150 bulk = key == null; 4151 4152 // Sets many values 4153 if ( toType( key ) === "object" ) { 4154 chainable = true; 4155 for ( i in key ) { 4156 access( elems, fn, i, key[ i ], true, emptyGet, raw ); 4157 } 4158 4159 // Sets one value 4160 } else if ( value !== undefined ) { 4161 chainable = true; 4162 4163 if ( !isFunction( value ) ) { 4164 raw = true; 4165 } 4166 4167 if ( bulk ) { 4168 4169 // Bulk operations run against the entire set 4170 if ( raw ) { 4171 fn.call( elems, value ); 4172 fn = null; 4173 4174 // ...except when executing function values 4175 } else { 4176 bulk = fn; 4177 fn = function( elem, _key, value ) { 4178 return bulk.call( jQuery( elem ), value ); 4179 }; 4180 } 4181 } 4182 4183 if ( fn ) { 4184 for ( ; i < len; i++ ) { 4185 fn( 4186 elems[ i ], key, raw ? 4187 value : 4188 value.call( elems[ i ], i, fn( elems[ i ], key ) ) 4189 ); 4190 } 4191 } 4192 } 4193 4194 if ( chainable ) { 4195 return elems; 4196 } 4197 4198 // Gets 4199 if ( bulk ) { 4200 return fn.call( elems ); 4201 } 4202 4203 return len ? fn( elems[ 0 ], key ) : emptyGet; 4204}; 4205 4206 4207// Matches dashed string for camelizing 4208var rmsPrefix = /^-ms-/, 4209 rdashAlpha = /-([a-z])/g; 4210 4211// Used by camelCase as callback to replace() 4212function fcamelCase( _all, letter ) { 4213 return letter.toUpperCase(); 4214} 4215 4216// Convert dashed to camelCase; used by the css and data modules 4217// Support: IE <=9 - 11, Edge 12 - 15 4218// Microsoft forgot to hump their vendor prefix (trac-9572) 4219function camelCase( string ) { 4220 return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); 4221} 4222var acceptData = function( owner ) { 4223 4224 // Accepts only: 4225 // - Node 4226 // - Node.ELEMENT_NODE 4227 // - Node.DOCUMENT_NODE 4228 // - Object 4229 // - Any 4230 return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); 4231}; 4232 4233 4234 4235 4236function Data() { 4237 this.expando = jQuery.expando + Data.uid++; 4238} 4239 4240Data.uid = 1; 4241 4242Data.prototype = { 4243 4244 cache: function( owner ) { 4245 4246 // Check if the owner object already has a cache 4247 var value = owner[ this.expando ]; 4248 4249 // If not, create one 4250 if ( !value ) { 4251 value = {}; 4252 4253 // We can accept data for non-element nodes in modern browsers, 4254 // but we should not, see trac-8335. 4255 // Always return an empty object. 4256 if ( acceptData( owner ) ) { 4257 4258 // If it is a node unlikely to be stringify-ed or looped over 4259 // use plain assignment 4260 if ( owner.nodeType ) { 4261 owner[ this.expando ] = value; 4262 4263 // Otherwise secure it in a non-enumerable property 4264 // configurable must be true to allow the property to be 4265 // deleted when data is removed 4266 } else { 4267 Object.defineProperty( owner, this.expando, { 4268 value: value, 4269 configurable: true 4270 } ); 4271 } 4272 } 4273 } 4274 4275 return value; 4276 }, 4277 set: function( owner, data, value ) { 4278 var prop, 4279 cache = this.cache( owner ); 4280 4281 // Handle: [ owner, key, value ] args 4282 // Always use camelCase key (gh-2257) 4283 if ( typeof data === "string" ) { 4284 cache[ camelCase( data ) ] = value; 4285 4286 // Handle: [ owner, { properties } ] args 4287 } else { 4288 4289 // Copy the properties one-by-one to the cache object 4290 for ( prop in data ) { 4291 cache[ camelCase( prop ) ] = data[ prop ]; 4292 } 4293 } 4294 return cache; 4295 }, 4296 get: function( owner, key ) { 4297 return key === undefined ? 4298 this.cache( owner ) : 4299 4300 // Always use camelCase key (gh-2257) 4301 owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; 4302 }, 4303 access: function( owner, key, value ) { 4304 4305 // In cases where either: 4306 // 4307 // 1. No key was specified
vendor: 4,579 bytes, lines 4308-4491
4308 // 2. A string key was specified, but no value provided 4309 // 4310 // Take the "read" path and allow the get method to determine 4311 // which value to return, respectively either: 4312 // 4313 // 1. The entire cache object 4314 // 2. The data stored at the key 4315 // 4316 if ( key === undefined || 4317 ( ( key && typeof key === "string" ) && value === undefined ) ) { 4318 4319 return this.get( owner, key ); 4320 } 4321 4322 // When the key is not a string, or both a key and value 4323 // are specified, set or extend (existing objects) with either: 4324 // 4325 // 1. An object of properties 4326 // 2. A key and value 4327 // 4328 this.set( owner, key, value ); 4329 4330 // Since the "set" path can have two possible entry points 4331 // return the expected data based on which path was taken[*] 4332 return value !== undefined ? value : key; 4333 }, 4334 remove: function( owner, key ) { 4335 var i, 4336 cache = owner[ this.expando ]; 4337 4338 if ( cache === undefined ) { 4339 return; 4340 } 4341 4342 if ( key !== undefined ) { 4343 4344 // Support array or space separated string of keys 4345 if ( Array.isArray( key ) ) { 4346 4347 // If key is an array of keys... 4348 // We always set camelCase keys, so remove that. 4349 key = key.map( camelCase ); 4350 } else { 4351 key = camelCase( key ); 4352 4353 // If a key with the spaces exists, use it. 4354 // Otherwise, create an array by matching non-whitespace 4355 key = key in cache ? 4356 [ key ] : 4357 ( key.match( rnothtmlwhite ) || [] ); 4358 } 4359 4360 i = key.length; 4361 4362 while ( i-- ) { 4363 delete cache[ key[ i ] ]; 4364 } 4365 } 4366 4367 // Remove the expando if there's no more data 4368 if ( key === undefined || jQuery.isEmptyObject( cache ) ) { 4369 4370 // Support: Chrome <=35 - 45 4371 // Webkit & Blink performance suffers when deleting properties 4372 // from DOM nodes, so set to undefined instead 4373 // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) 4374 if ( owner.nodeType ) { 4375 owner[ this.expando ] = undefined; 4376 } else { 4377 delete owner[ this.expando ]; 4378 } 4379 } 4380 }, 4381 hasData: function( owner ) { 4382 var cache = owner[ this.expando ]; 4383 return cache !== undefined && !jQuery.isEmptyObject( cache ); 4384 } 4385}; 4386var dataPriv = new Data(); 4387 4388var dataUser = new Data(); 4389 4390 4391 4392// Implementation Summary 4393// 4394// 1. Enforce API surface and semantic compatibility with 1.9.x branch 4395// 2. Improve the module's maintainability by reducing the storage 4396// paths to a single mechanism. 4397// 3. Use the same single mechanism to support "private" and "user" data. 4398// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) 4399// 5. Avoid exposing implementation details on user objects (eg. expando properties) 4400// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 4401 4402var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, 4403 rmultiDash = /[A-Z]/g; 4404 4405function getData( data ) { 4406 if ( data === "true" ) { 4407 return true; 4408 } 4409 4410 if ( data === "false" ) { 4411 return false; 4412 } 4413 4414 if ( data === "null" ) { 4415 return null; 4416 } 4417 4418 // Only convert to a number if it doesn't change the string 4419 if ( data === +data + "" ) { 4420 return +data; 4421 } 4422 4423 if ( rbrace.test( data ) ) { 4424 return JSON.parse( data ); 4425 } 4426 4427 return data; 4428} 4429 4430function dataAttr( elem, key, data ) { 4431 var name; 4432 4433 // If nothing was found internally, try to fetch any 4434 // data from the HTML5 data-* attribute 4435 if ( data === undefined && elem.nodeType === 1 ) { 4436 name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); 4437 data = elem.getAttribute( name ); 4438 4439 if ( typeof data === "string" ) { 4440 try { 4441 data = getData( data ); 4442 } catch ( e ) {} 4443 4444 // Make sure we set the data so it isn't changed later 4445 dataUser.set( elem, key, data ); 4446 } else { 4447 data = undefined; 4448 } 4449 } 4450 return data; 4451} 4452 4453jQuery.extend( { 4454 hasData: function( elem ) { 4455 return dataUser.hasData( elem ) || dataPriv.hasData( elem ); 4456 }, 4457 4458 data: function( elem, name, data ) { 4459 return dataUser.access( elem, name, data ); 4460 }, 4461 4462 removeData: function( elem, name ) { 4463 dataUser.remove( elem, name ); 4464 }, 4465 4466 // TODO: Now that all calls to _data and _removeData have been replaced 4467 // with direct calls to dataPriv methods, these can be deprecated. 4468 _data: function( elem, name, data ) { 4469 return dataPriv.access( elem, name, data ); 4470 }, 4471 4472 _removeData: function( elem, name ) { 4473 dataPriv.remove( elem, name ); 4474 } 4475} ); 4476 4477jQuery.fn.extend( { 4478 data: function( key, value ) { 4479 var i, name, data, 4480 elem = this[ 0 ], 4481 attrs = elem && elem.attributes; 4482 4483 // Gets all values 4484 if ( key === undefined ) { 4485 if ( this.length ) { 4486 data = dataUser.get( elem ); 4487 4488 if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { 4489 i = attrs.length; 4490 while ( i-- ) { 4491
vendor: 4,119 bytes, lines 4492-4666
4492 // Support: IE 11 only 4493 // The attrs elements can be null (trac-14894) 4494 if ( attrs[ i ] ) { 4495 name = attrs[ i ].name; 4496 if ( name.indexOf( "data-" ) === 0 ) { 4497 name = camelCase( name.slice( 5 ) ); 4498 dataAttr( elem, name, data[ name ] ); 4499 } 4500 } 4501 } 4502 dataPriv.set( elem, "hasDataAttrs", true ); 4503 } 4504 } 4505 4506 return data; 4507 } 4508 4509 // Sets multiple values 4510 if ( typeof key === "object" ) { 4511 return this.each( function() { 4512 dataUser.set( this, key ); 4513 } ); 4514 } 4515 4516 return access( this, function( value ) { 4517 var data; 4518 4519 // The calling jQuery object (element matches) is not empty 4520 // (and therefore has an element appears at this[ 0 ]) and the 4521 // `value` parameter was not undefined. An empty jQuery object 4522 // will result in `undefined` for elem = this[ 0 ] which will 4523 // throw an exception if an attempt to read a data cache is made. 4524 if ( elem && value === undefined ) { 4525 4526 // Attempt to get data from the cache 4527 // The key will always be camelCased in Data 4528 data = dataUser.get( elem, key ); 4529 if ( data !== undefined ) { 4530 return data; 4531 } 4532 4533 // Attempt to "discover" the data in 4534 // HTML5 custom data-* attrs 4535 data = dataAttr( elem, key ); 4536 if ( data !== undefined ) { 4537 return data; 4538 } 4539 4540 // We tried really hard, but the data doesn't exist. 4541 return; 4542 } 4543 4544 // Set the data... 4545 this.each( function() { 4546 4547 // We always store the camelCased key 4548 dataUser.set( this, key, value ); 4549 } ); 4550 }, null, value, arguments.length > 1, null, true ); 4551 }, 4552 4553 removeData: function( key ) { 4554 return this.each( function() { 4555 dataUser.remove( this, key ); 4556 } ); 4557 } 4558} ); 4559 4560 4561jQuery.extend( { 4562 queue: function( elem, type, data ) { 4563 var queue; 4564 4565 if ( elem ) { 4566 type = ( type || "fx" ) + "queue"; 4567 queue = dataPriv.get( elem, type ); 4568 4569 // Speed up dequeue by getting out quickly if this is just a lookup 4570 if ( data ) { 4571 if ( !queue || Array.isArray( data ) ) { 4572 queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); 4573 } else { 4574 queue.push( data ); 4575 } 4576 } 4577 return queue || []; 4578 } 4579 }, 4580 4581 dequeue: function( elem, type ) { 4582 type = type || "fx"; 4583 4584 var queue = jQuery.queue( elem, type ), 4585 startLength = queue.length, 4586 fn = queue.shift(), 4587 hooks = jQuery._queueHooks( elem, type ), 4588 next = function() { 4589 jQuery.dequeue( elem, type ); 4590 }; 4591 4592 // If the fx queue is dequeued, always remove the progress sentinel 4593 if ( fn === "inprogress" ) { 4594 fn = queue.shift(); 4595 startLength--; 4596 } 4597 4598 if ( fn ) { 4599 4600 // Add a progress sentinel to prevent the fx queue from being 4601 // automatically dequeued 4602 if ( type === "fx" ) { 4603 queue.unshift( "inprogress" ); 4604 } 4605 4606 // Clear up the last queue stop function 4607 delete hooks.stop; 4608 fn.call( elem, next, hooks ); 4609 } 4610 4611 if ( !startLength && hooks ) { 4612 hooks.empty.fire(); 4613 } 4614 }, 4615 4616 // Not public - generate a queueHooks object, or return the current one 4617 _queueHooks: function( elem, type ) { 4618 var key = type + "queueHooks"; 4619 return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { 4620 empty: jQuery.Callbacks( "once memory" ).add( function() { 4621 dataPriv.remove( elem, [ type + "queue", key ] ); 4622 } ) 4623 } ); 4624 } 4625} ); 4626 4627jQuery.fn.extend( { 4628 queue: function( type, data ) { 4629 var setter = 2; 4630 4631 if ( typeof type !== "string" ) { 4632 data = type; 4633 type = "fx"; 4634 setter--; 4635 } 4636 4637 if ( arguments.length < setter ) { 4638 return jQuery.queue( this[ 0 ], type ); 4639 } 4640 4641 return data === undefined ? 4642 this : 4643 this.each( function() { 4644 var queue = jQuery.queue( this, type, data ); 4645 4646 // Ensure a hooks for this queue 4647 jQuery._queueHooks( this, type ); 4648 4649 if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { 4650 jQuery.dequeue( this, type ); 4651 } 4652 } ); 4653 }, 4654 dequeue: function( type ) { 4655 return this.each( function() { 4656 jQuery.dequeue( this, type ); 4657 } ); 4658 }, 4659 clearQueue: function( type ) { 4660 return this.queue( type || "fx", [] ); 4661 }, 4662 4663 // Get a promise resolved when queues of a certain type 4664 // are emptied (fx is the type by default) 4665 promise: function( type, obj ) { 4666 var tmp,
vendor: 6,339 bytes, lines 4667-4915
4667 count = 1, 4668 defer = jQuery.Deferred(), 4669 elements = this, 4670 i = this.length, 4671 resolve = function() { 4672 if ( !( --count ) ) { 4673 defer.resolveWith( elements, [ elements ] ); 4674 } 4675 }; 4676 4677 if ( typeof type !== "string" ) { 4678 obj = type; 4679 type = undefined; 4680 } 4681 type = type || "fx"; 4682 4683 while ( i-- ) { 4684 tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); 4685 if ( tmp && tmp.empty ) { 4686 count++; 4687 tmp.empty.add( resolve ); 4688 } 4689 } 4690 resolve(); 4691 return defer.promise( obj ); 4692 } 4693} ); 4694var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; 4695 4696var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); 4697 4698 4699var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; 4700 4701var documentElement = document.documentElement; 4702 4703 4704 4705 var isAttached = function( elem ) { 4706 return jQuery.contains( elem.ownerDocument, elem ); 4707 }, 4708 composed = { composed: true }; 4709 4710 // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only 4711 // Check attachment across shadow DOM boundaries when possible (gh-3504) 4712 // Support: iOS 10.0-10.2 only 4713 // Early iOS 10 versions support `attachShadow` but not `getRootNode`, 4714 // leading to errors. We need to check for `getRootNode`. 4715 if ( documentElement.getRootNode ) { 4716 isAttached = function( elem ) { 4717 return jQuery.contains( elem.ownerDocument, elem ) || 4718 elem.getRootNode( composed ) === elem.ownerDocument; 4719 }; 4720 } 4721var isHiddenWithinTree = function( elem, el ) { 4722 4723 // isHiddenWithinTree might be called from jQuery#filter function; 4724 // in that case, element will be second argument 4725 elem = el || elem; 4726 4727 // Inline style trumps all 4728 return elem.style.display === "none" || 4729 elem.style.display === "" && 4730 4731 // Otherwise, check computed style 4732 // Support: Firefox <=43 - 45 4733 // Disconnected elements can have computed display: none, so first confirm that elem is 4734 // in the document. 4735 isAttached( elem ) && 4736 4737 jQuery.css( elem, "display" ) === "none"; 4738 }; 4739 4740 4741 4742function adjustCSS( elem, prop, valueParts, tween ) { 4743 var adjusted, scale, 4744 maxIterations = 20, 4745 currentValue = tween ? 4746 function() { 4747 return tween.cur(); 4748 } : 4749 function() { 4750 return jQuery.css( elem, prop, "" ); 4751 }, 4752 initial = currentValue(), 4753 unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), 4754 4755 // Starting value computation is required for potential unit mismatches 4756 initialInUnit = elem.nodeType && 4757 ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && 4758 rcssNum.exec( jQuery.css( elem, prop ) ); 4759 4760 if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { 4761 4762 // Support: Firefox <=54 4763 // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) 4764 initial = initial / 2; 4765 4766 // Trust units reported by jQuery.css 4767 unit = unit || initialInUnit[ 3 ]; 4768 4769 // Iteratively approximate from a nonzero starting point 4770 initialInUnit = +initial || 1; 4771 4772 while ( maxIterations-- ) { 4773 4774 // Evaluate and update our best guess (doubling guesses that zero out). 4775 // Finish if the scale equals or crosses 1 (making the old*new product non-positive). 4776 jQuery.style( elem, prop, initialInUnit + unit ); 4777 if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { 4778 maxIterations = 0; 4779 } 4780 initialInUnit = initialInUnit / scale; 4781 4782 } 4783 4784 initialInUnit = initialInUnit * 2; 4785 jQuery.style( elem, prop, initialInUnit + unit ); 4786 4787 // Make sure we update the tween properties later on 4788 valueParts = valueParts || []; 4789 } 4790 4791 if ( valueParts ) { 4792 initialInUnit = +initialInUnit || +initial || 0; 4793 4794 // Apply relative offset (+=/-=) if specified 4795 adjusted = valueParts[ 1 ] ? 4796 initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : 4797 +valueParts[ 2 ]; 4798 if ( tween ) { 4799 tween.unit = unit; 4800 tween.start = initialInUnit; 4801 tween.end = adjusted; 4802 } 4803 } 4804 return adjusted; 4805} 4806 4807 4808var defaultDisplayMap = {}; 4809 4810function getDefaultDisplay( elem ) { 4811 var temp, 4812 doc = elem.ownerDocument, 4813 nodeName = elem.nodeName, 4814 display = defaultDisplayMap[ nodeName ]; 4815 4816 if ( display ) { 4817 return display; 4818 } 4819 4820 temp = doc.body.appendChild( doc.createElement( nodeName ) ); 4821 display = jQuery.css( temp, "display" ); 4822 4823 temp.parentNode.removeChild( temp ); 4824 4825 if ( display === "none" ) { 4826 display = "block"; 4827 } 4828 defaultDisplayMap[ nodeName ] = display; 4829 4830 return display; 4831} 4832 4833function showHide( elements, show ) { 4834 var display, elem, 4835 values = [], 4836 index = 0, 4837 length = elements.length; 4838 4839 // Determine new display value for elements that need to change 4840 for ( ; index < length; index++ ) { 4841 elem = elements[ index ]; 4842 if ( !elem.style ) { 4843 continue; 4844 } 4845 4846 display = elem.style.display; 4847 if ( show ) { 4848 4849 // Since we force visibility upon cascade-hidden elements, an immediate (and slow) 4850 // check is required in this first loop unless we have a nonempty display value (either 4851 // inline or about-to-be-restored) 4852 if ( display === "none" ) { 4853 values[ index ] = dataPriv.get( elem, "display" ) || null; 4854 if ( !values[ index ] ) { 4855 elem.style.display = ""; 4856 } 4857 } 4858 if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { 4859 values[ index ] = getDefaultDisplay( elem ); 4860 } 4861 } else { 4862 if ( display !== "none" ) { 4863 values[ index ] = "none"; 4864 4865 // Remember what we're overwriting 4866 dataPriv.set( elem, "display", display ); 4867 } 4868 } 4869 } 4870 4871 // Set the display of the elements in a second loop to avoid constant reflow 4872 for ( index = 0; index < length; index++ ) { 4873 if ( values[ index ] != null ) { 4874 elements[ index ].style.display = values[ index ]; 4875 } 4876 } 4877 4878 return elements; 4879} 4880 4881jQuery.fn.extend( { 4882 show: function() { 4883 return showHide( this, true ); 4884 }, 4885 hide: function() { 4886 return showHide( this ); 4887 }, 4888 toggle: function( state ) { 4889 if ( typeof state === "boolean" ) { 4890 return state ? this.show() : this.hide(); 4891 } 4892 4893 return this.each( function() { 4894 if ( isHiddenWithinTree( this ) ) { 4895 jQuery( this ).show(); 4896 } else { 4897 jQuery( this ).hide(); 4898 } 4899 } ); 4900 } 4901} ); 4902var rcheckableType = ( /^(?:checkbox|radio)$/i ); 4903 4904var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); 4905 4906var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); 4907 4908 4909 4910( function() { 4911 var fragment = document.createDocumentFragment(), 4912 div = fragment.appendChild( document.createElement( "div" ) ), 4913 input = document.createElement( "input" ); 4914 4915 // Support: Android 4.0 - 4.3 only
vendor: 4,796 bytes, lines 4916-5103
4916 // Check state lost if the name is set (trac-11217) 4917 // Support: Windows Web Apps (WWA) 4918 // `name` and `type` must use .setAttribute for WWA (trac-14901) 4919 input.setAttribute( "type", "radio" ); 4920 input.setAttribute( "checked", "checked" ); 4921 input.setAttribute( "name", "t" ); 4922 4923 div.appendChild( input ); 4924 4925 // Support: Android <=4.1 only 4926 // Older WebKit doesn't clone checked state correctly in fragments 4927 support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; 4928 4929 // Support: IE <=11 only 4930 // Make sure textarea (and checkbox) defaultValue is properly cloned 4931 div.innerHTML = "<textarea>x</textarea>"; 4932 support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; 4933 4934 // Support: IE <=9 only 4935 // IE <=9 replaces <option> tags with their contents when inserted outside of 4936 // the select element. 4937 div.innerHTML = "<option></option>"; 4938 support.option = !!div.lastChild; 4939} )(); 4940 4941 4942// We have to close these tags to support XHTML (trac-13200) 4943var wrapMap = { 4944 4945 // XHTML parsers do not magically insert elements in the 4946 // same way that tag soup parsers do. So we cannot shorten 4947 // this by omitting <tbody> or other required elements. 4948 thead: [ 1, "<table>", "</table>" ], 4949 col: [ 2, "<table><colgroup>", "</colgroup></table>" ], 4950 tr: [ 2, "<table><tbody>", "</tbody></table>" ], 4951 td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], 4952 4953 _default: [ 0, "", "" ] 4954}; 4955 4956wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; 4957wrapMap.th = wrapMap.td; 4958 4959// Support: IE <=9 only 4960if ( !support.option ) { 4961 wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ]; 4962} 4963 4964 4965function getAll( context, tag ) { 4966 4967 // Support: IE <=9 - 11 only 4968 // Use typeof to avoid zero-argument method invocation on host objects (trac-15151) 4969 var ret; 4970 4971 if ( typeof context.getElementsByTagName !== "undefined" ) { 4972 ret = context.getElementsByTagName( tag || "*" ); 4973 4974 } else if ( typeof context.querySelectorAll !== "undefined" ) { 4975 ret = context.querySelectorAll( tag || "*" ); 4976 4977 } else { 4978 ret = []; 4979 } 4980 4981 if ( tag === undefined || tag && nodeName( context, tag ) ) { 4982 return jQuery.merge( [ context ], ret ); 4983 } 4984 4985 return ret; 4986} 4987 4988 4989// Mark scripts as having already been evaluated 4990function setGlobalEval( elems, refElements ) { 4991 var i = 0, 4992 l = elems.length; 4993 4994 for ( ; i < l; i++ ) { 4995 dataPriv.set( 4996 elems[ i ], 4997 "globalEval", 4998 !refElements || dataPriv.get( refElements[ i ], "globalEval" ) 4999 ); 5000 } 5001} 5002 5003 5004var rhtml = /<|&#?\w+;/; 5005 5006function buildFragment( elems, context, scripts, selection, ignored ) { 5007 var elem, tmp, tag, wrap, attached, j, 5008 fragment = context.createDocumentFragment(), 5009 nodes = [], 5010 i = 0, 5011 l = elems.length; 5012 5013 for ( ; i < l; i++ ) { 5014 elem = elems[ i ]; 5015 5016 if ( elem || elem === 0 ) { 5017 5018 // Add nodes directly 5019 if ( toType( elem ) === "object" ) { 5020 5021 // Support: Android <=4.0 only, PhantomJS 1 only 5022 // push.apply(_, arraylike) throws on ancient WebKit 5023 jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); 5024 5025 // Convert non-html into a text node 5026 } else if ( !rhtml.test( elem ) ) { 5027 nodes.push( context.createTextNode( elem ) ); 5028 5029 // Convert html into DOM nodes 5030 } else { 5031 tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); 5032 5033 // Deserialize a standard representation 5034 tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); 5035 wrap = wrapMap[ tag ] || wrapMap._default; 5036 tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; 5037 5038 // Descend through wrappers to the right content 5039 j = wrap[ 0 ]; 5040 while ( j-- ) { 5041 tmp = tmp.lastChild; 5042 } 5043 5044 // Support: Android <=4.0 only, PhantomJS 1 only 5045 // push.apply(_, arraylike) throws on ancient WebKit 5046 jQuery.merge( nodes, tmp.childNodes ); 5047 5048 // Remember the top-level container 5049 tmp = fragment.firstChild; 5050 5051 // Ensure the created nodes are orphaned (trac-12392) 5052 tmp.textContent = ""; 5053 } 5054 } 5055 } 5056 5057 // Remove wrapper from fragment 5058 fragment.textContent = ""; 5059 5060 i = 0; 5061 while ( ( elem = nodes[ i++ ] ) ) { 5062 5063 // Skip elements already in the context collection (trac-4087) 5064 if ( selection && jQuery.inArray( elem, selection ) > -1 ) { 5065 if ( ignored ) { 5066 ignored.push( elem ); 5067 } 5068 continue; 5069 } 5070 5071 attached = isAttached( elem ); 5072 5073 // Append to fragment 5074 tmp = getAll( fragment.appendChild( elem ), "script" ); 5075 5076 // Preserve script evaluation history 5077 if ( attached ) { 5078 setGlobalEval( tmp ); 5079 } 5080 5081 // Capture executables 5082 if ( scripts ) { 5083 j = 0; 5084 while ( ( elem = tmp[ j++ ] ) ) { 5085 if ( rscriptType.test( elem.type || "" ) ) { 5086 scripts.push( elem ); 5087 } 5088 } 5089 } 5090 } 5091 5092 return fragment; 5093} 5094 5095 5096var rtypenamespace = /^([^.]*)(?:\.(.+)|)/; 5097 5098function returnTrue() { 5099 return true; 5100} 5101 5102function returnFalse() { 5103 return false;
vendor: 10,171 bytes, lines 5104-5458
5104} 5105 5106// Support: IE <=9 - 11+ 5107// focus() and blur() are asynchronous, except when they are no-op. 5108// So expect focus to be synchronous when the element is already active, 5109// and blur to be synchronous when the element is not already active. 5110// (focus and blur are always synchronous in other supported browsers, 5111// this just defines when we can count on it). 5112function expectSync( elem, type ) { 5113 return ( elem === safeActiveElement() ) === ( type === "focus" ); 5114} 5115 5116// Support: IE <=9 only 5117// Accessing document.activeElement can throw unexpectedly 5118// https://bugs.jquery.com/ticket/13393 5119function safeActiveElement() { 5120 try { 5121 return document.activeElement; 5122 } catch ( err ) { } 5123} 5124 5125function on( elem, types, selector, data, fn, one ) { 5126 var origFn, type; 5127 5128 // Types can be a map of types/handlers 5129 if ( typeof types === "object" ) { 5130 5131 // ( types-Object, selector, data ) 5132 if ( typeof selector !== "string" ) { 5133 5134 // ( types-Object, data ) 5135 data = data || selector; 5136 selector = undefined; 5137 } 5138 for ( type in types ) { 5139 on( elem, type, selector, data, types[ type ], one ); 5140 } 5141 return elem; 5142 } 5143 5144 if ( data == null && fn == null ) { 5145 5146 // ( types, fn ) 5147 fn = selector; 5148 data = selector = undefined; 5149 } else if ( fn == null ) { 5150 if ( typeof selector === "string" ) { 5151 5152 // ( types, selector, fn ) 5153 fn = data; 5154 data = undefined; 5155 } else { 5156 5157 // ( types, data, fn ) 5158 fn = data; 5159 data = selector; 5160 selector = undefined; 5161 } 5162 } 5163 if ( fn === false ) { 5164 fn = returnFalse; 5165 } else if ( !fn ) { 5166 return elem; 5167 } 5168 5169 if ( one === 1 ) { 5170 origFn = fn; 5171 fn = function( event ) { 5172 5173 // Can use an empty set, since event contains the info 5174 jQuery().off( event ); 5175 return origFn.apply( this, arguments ); 5176 }; 5177 5178 // Use same guid so caller can remove using origFn 5179 fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); 5180 } 5181 return elem.each( function() { 5182 jQuery.event.add( this, types, fn, data, selector ); 5183 } ); 5184} 5185 5186/* 5187 * Helper functions for managing events -- not part of the public interface. 5188 * Props to Dean Edwards' addEvent library for many of the ideas. 5189 */ 5190jQuery.event = { 5191 5192 global: {}, 5193 5194 add: function( elem, types, handler, data, selector ) { 5195 5196 var handleObjIn, eventHandle, tmp, 5197 events, t, handleObj, 5198 special, handlers, type, namespaces, origType, 5199 elemData = dataPriv.get( elem ); 5200 5201 // Only attach events to objects that accept data 5202 if ( !acceptData( elem ) ) { 5203 return; 5204 } 5205 5206 // Caller can pass in an object of custom data in lieu of the handler 5207 if ( handler.handler ) { 5208 handleObjIn = handler; 5209 handler = handleObjIn.handler; 5210 selector = handleObjIn.selector; 5211 } 5212 5213 // Ensure that invalid selectors throw exceptions at attach time 5214 // Evaluate against documentElement in case elem is a non-element node (e.g., document) 5215 if ( selector ) { 5216 jQuery.find.matchesSelector( documentElement, selector ); 5217 } 5218 5219 // Make sure that the handler has a unique ID, used to find/remove it later 5220 if ( !handler.guid ) { 5221 handler.guid = jQuery.guid++; 5222 } 5223 5224 // Init the element's event structure and main handler, if this is the first 5225 if ( !( events = elemData.events ) ) { 5226 events = elemData.events = Object.create( null ); 5227 } 5228 if ( !( eventHandle = elemData.handle ) ) { 5229 eventHandle = elemData.handle = function( e ) { 5230 5231 // Discard the second event of a jQuery.event.trigger() and 5232 // when an event is called after a page has unloaded 5233 return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? 5234 jQuery.event.dispatch.apply( elem, arguments ) : undefined; 5235 }; 5236 } 5237 5238 // Handle multiple events separated by a space 5239 types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; 5240 t = types.length; 5241 while ( t-- ) { 5242 tmp = rtypenamespace.exec( types[ t ] ) || []; 5243 type = origType = tmp[ 1 ]; 5244 namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); 5245 5246 // There *must* be a type, no attaching namespace-only handlers 5247 if ( !type ) { 5248 continue; 5249 } 5250 5251 // If event changes its type, use the special event handlers for the changed type 5252 special = jQuery.event.special[ type ] || {}; 5253 5254 // If selector defined, determine special event api type, otherwise given type 5255 type = ( selector ? special.delegateType : special.bindType ) || type; 5256 5257 // Update special based on newly reset type 5258 special = jQuery.event.special[ type ] || {}; 5259 5260 // handleObj is passed to all event handlers 5261 handleObj = jQuery.extend( { 5262 type: type, 5263 origType: origType, 5264 data: data, 5265 handler: handler, 5266 guid: handler.guid, 5267 selector: selector, 5268 needsContext: selector && jQuery.expr.match.needsContext.test( selector ), 5269 namespace: namespaces.join( "." ) 5270 }, handleObjIn ); 5271 5272 // Init the event handler queue if we're the first 5273 if ( !( handlers = events[ type ] ) ) { 5274 handlers = events[ type ] = []; 5275 handlers.delegateCount = 0; 5276 5277 // Only use addEventListener if the special events handler returns false 5278 if ( !special.setup || 5279 special.setup.call( elem, data, namespaces, eventHandle ) === false ) { 5280 5281 if ( elem.addEventListener ) { 5282 elem.addEventListener( type, eventHandle ); 5283 } 5284 } 5285 } 5286 5287 if ( special.add ) { 5288 special.add.call( elem, handleObj ); 5289 5290 if ( !handleObj.handler.guid ) { 5291 handleObj.handler.guid = handler.guid; 5292 } 5293 } 5294 5295 // Add to the element's handler list, delegates in front 5296 if ( selector ) { 5297 handlers.splice( handlers.delegateCount++, 0, handleObj ); 5298 } else { 5299 handlers.push( handleObj ); 5300 } 5301 5302 // Keep track of which events have ever been used, for event optimization 5303 jQuery.event.global[ type ] = true; 5304 } 5305 5306 }, 5307 5308 // Detach an event or set of events from an element 5309 remove: function( elem, types, handler, selector, mappedTypes ) { 5310 5311 var j, origCount, tmp, 5312 events, t, handleObj, 5313 special, handlers, type, namespaces, origType, 5314 elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); 5315 5316 if ( !elemData || !( events = elemData.events ) ) { 5317 return; 5318 } 5319 5320 // Once for each type.namespace in types; type may be omitted 5321 types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; 5322 t = types.length; 5323 while ( t-- ) { 5324 tmp = rtypenamespace.exec( types[ t ] ) || []; 5325 type = origType = tmp[ 1 ]; 5326 namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); 5327 5328 // Unbind all events (on this namespace, if provided) for the element 5329 if ( !type ) { 5330 for ( type in events ) { 5331 jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); 5332 } 5333 continue; 5334 } 5335 5336 special = jQuery.event.special[ type ] || {}; 5337 type = ( selector ? special.delegateType : special.bindType ) || type; 5338 handlers = events[ type ] || []; 5339 tmp = tmp[ 2 ] && 5340 new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); 5341 5342 // Remove matching events 5343 origCount = j = handlers.length; 5344 while ( j-- ) { 5345 handleObj = handlers[ j ]; 5346 5347 if ( ( mappedTypes || origType === handleObj.origType ) && 5348 ( !handler || handler.guid === handleObj.guid ) && 5349 ( !tmp || tmp.test( handleObj.namespace ) ) && 5350 ( !selector || selector === handleObj.selector || 5351 selector === "**" && handleObj.selector ) ) { 5352 handlers.splice( j, 1 ); 5353 5354 if ( handleObj.selector ) { 5355 handlers.delegateCount--; 5356 } 5357 if ( special.remove ) { 5358 special.remove.call( elem, handleObj ); 5359 } 5360 } 5361 } 5362 5363 // Remove generic event handler if we removed something and no more handlers exist 5364 // (avoids potential for endless recursion during removal of special event handlers) 5365 if ( origCount && !handlers.length ) { 5366 if ( !special.teardown || 5367 special.teardown.call( elem, namespaces, elemData.handle ) === false ) { 5368 5369 jQuery.removeEvent( elem, type, elemData.handle ); 5370 } 5371 5372 delete events[ type ]; 5373 } 5374 } 5375 5376 // Remove data and the expando if it's no longer used 5377 if ( jQuery.isEmptyObject( events ) ) { 5378 dataPriv.remove( elem, "handle events" ); 5379 } 5380 }, 5381 5382 dispatch: function( nativeEvent ) { 5383 5384 var i, j, ret, matched, handleObj, handlerQueue, 5385 args = new Array( arguments.length ), 5386 5387 // Make a writable jQuery.Event from the native event object 5388 event = jQuery.event.fix( nativeEvent ), 5389 5390 handlers = ( 5391 dataPriv.get( this, "events" ) || Object.create( null ) 5392 )[ event.type ] || [], 5393 special = jQuery.event.special[ event.type ] || {}; 5394 5395 // Use the fix-ed jQuery.Event rather than the (read-only) native event 5396 args[ 0 ] = event; 5397 5398 for ( i = 1; i < arguments.length; i++ ) { 5399 args[ i ] = arguments[ i ]; 5400 } 5401 5402 event.delegateTarget = this; 5403 5404 // Call the preDispatch hook for the mapped type, and let it bail if desired 5405 if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { 5406 return; 5407 } 5408 5409 // Determine handlers 5410 handlerQueue = jQuery.event.handlers.call( this, event, handlers ); 5411 5412 // Run delegates first; they may want to stop propagation beneath us 5413 i = 0; 5414 while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { 5415 event.currentTarget = matched.elem; 5416 5417 j = 0; 5418 while ( ( handleObj = matched.handlers[ j++ ] ) && 5419 !event.isImmediatePropagationStopped() ) { 5420 5421 // If the event is namespaced, then each handler is only invoked if it is 5422 // specially universal or its namespaces are a superset of the event's. 5423 if ( !event.rnamespace || handleObj.namespace === false || 5424 event.rnamespace.test( handleObj.namespace ) ) { 5425 5426 event.handleObj = handleObj; 5427 event.data = handleObj.data; 5428 5429 ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || 5430 handleObj.handler ).apply( matched.elem, args ); 5431 5432 if ( ret !== undefined ) { 5433 if ( ( event.result = ret ) === false ) { 5434 event.preventDefault(); 5435 event.stopPropagation(); 5436 } 5437 } 5438 } 5439 } 5440 } 5441 5442 // Call the postDispatch hook for the mapped type 5443 if ( special.postDispatch ) { 5444 special.postDispatch.call( this, event ); 5445 } 5446 5447 return event.result; 5448 }, 5449 5450 handlers: function( event, handlers ) { 5451 var i, handleObj, sel, matchedHandlers, matchedSelectors, 5452 handlerQueue = [], 5453 delegateCount = handlers.delegateCount, 5454 cur = event.target; 5455 5456 // Find delegate handlers 5457 if ( delegateCount && 5458
vendor: 21,304 bytes, lines 5459-6219
5459 // Support: IE <=9 5460 // Black-hole SVG <use> instance trees (trac-13180) 5461 cur.nodeType && 5462 5463 // Support: Firefox <=42 5464 // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) 5465 // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click 5466 // Support: IE 11 only 5467 // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) 5468 !( event.type === "click" && event.button >= 1 ) ) { 5469 5470 for ( ; cur !== this; cur = cur.parentNode || this ) { 5471 5472 // Don't check non-elements (trac-13208) 5473 // Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764) 5474 if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { 5475 matchedHandlers = []; 5476 matchedSelectors = {}; 5477 for ( i = 0; i < delegateCount; i++ ) { 5478 handleObj = handlers[ i ]; 5479 5480 // Don't conflict with Object.prototype properties (trac-13203) 5481 sel = handleObj.selector + " "; 5482 5483 if ( matchedSelectors[ sel ] === undefined ) { 5484 matchedSelectors[ sel ] = handleObj.needsContext ? 5485 jQuery( sel, this ).index( cur ) > -1 : 5486 jQuery.find( sel, this, null, [ cur ] ).length; 5487 } 5488 if ( matchedSelectors[ sel ] ) { 5489 matchedHandlers.push( handleObj ); 5490 } 5491 } 5492 if ( matchedHandlers.length ) { 5493 handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); 5494 } 5495 } 5496 } 5497 } 5498 5499 // Add the remaining (directly-bound) handlers 5500 cur = this; 5501 if ( delegateCount < handlers.length ) { 5502 handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); 5503 } 5504 5505 return handlerQueue; 5506 }, 5507 5508 addProp: function( name, hook ) { 5509 Object.defineProperty( jQuery.Event.prototype, name, { 5510 enumerable: true, 5511 configurable: true, 5512 5513 get: isFunction( hook ) ? 5514 function() { 5515 if ( this.originalEvent ) { 5516 return hook( this.originalEvent ); 5517 } 5518 } : 5519 function() { 5520 if ( this.originalEvent ) { 5521 return this.originalEvent[ name ]; 5522 } 5523 }, 5524 5525 set: function( value ) { 5526 Object.defineProperty( this, name, { 5527 enumerable: true, 5528 configurable: true, 5529 writable: true, 5530 value: value 5531 } ); 5532 } 5533 } ); 5534 }, 5535 5536 fix: function( originalEvent ) { 5537 return originalEvent[ jQuery.expando ] ? 5538 originalEvent : 5539 new jQuery.Event( originalEvent ); 5540 }, 5541 5542 special: { 5543 load: { 5544 5545 // Prevent triggered image.load events from bubbling to window.load 5546 noBubble: true 5547 }, 5548 click: { 5549 5550 // Utilize native event to ensure correct state for checkable inputs 5551 setup: function( data ) { 5552 5553 // For mutual compressibility with _default, replace `this` access with a local var. 5554 // `|| data` is dead code meant only to preserve the variable through minification. 5555 var el = this || data; 5556 5557 // Claim the first handler 5558 if ( rcheckableType.test( el.type ) && 5559 el.click && nodeName( el, "input" ) ) { 5560 5561 // dataPriv.set( el, "click", ... ) 5562 leverageNative( el, "click", returnTrue ); 5563 } 5564 5565 // Return false to allow normal processing in the caller 5566 return false; 5567 }, 5568 trigger: function( data ) { 5569 5570 // For mutual compressibility with _default, replace `this` access with a local var. 5571 // `|| data` is dead code meant only to preserve the variable through minification. 5572 var el = this || data; 5573 5574 // Force setup before triggering a click 5575 if ( rcheckableType.test( el.type ) && 5576 el.click && nodeName( el, "input" ) ) { 5577 5578 leverageNative( el, "click" ); 5579 } 5580 5581 // Return non-false to allow normal event-path propagation 5582 return true; 5583 }, 5584 5585 // For cross-browser consistency, suppress native .click() on links 5586 // Also prevent it if we're currently inside a leveraged native-event stack 5587 _default: function( event ) { 5588 var target = event.target; 5589 return rcheckableType.test( target.type ) && 5590 target.click && nodeName( target, "input" ) && 5591 dataPriv.get( target, "click" ) || 5592 nodeName( target, "a" ); 5593 } 5594 }, 5595 5596 beforeunload: { 5597 postDispatch: function( event ) { 5598 5599 // Support: Firefox 20+ 5600 // Firefox doesn't alert if the returnValue field is not set. 5601 if ( event.result !== undefined && event.originalEvent ) { 5602 event.originalEvent.returnValue = event.result; 5603 } 5604 } 5605 } 5606 } 5607}; 5608 5609// Ensure the presence of an event listener that handles manually-triggered 5610// synthetic events by interrupting progress until reinvoked in response to 5611// *native* events that it fires directly, ensuring that state changes have 5612// already occurred before other listeners are invoked. 5613function leverageNative( el, type, expectSync ) { 5614 5615 // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add 5616 if ( !expectSync ) { 5617 if ( dataPriv.get( el, type ) === undefined ) { 5618 jQuery.event.add( el, type, returnTrue ); 5619 } 5620 return; 5621 } 5622 5623 // Register the controller as a special universal handler for all event namespaces 5624 dataPriv.set( el, type, false ); 5625 jQuery.event.add( el, type, { 5626 namespace: false, 5627 handler: function( event ) { 5628 var notAsync, result, 5629 saved = dataPriv.get( this, type ); 5630 5631 if ( ( event.isTrigger & 1 ) && this[ type ] ) { 5632 5633 // Interrupt processing of the outer synthetic .trigger()ed event 5634 // Saved data should be false in such cases, but might be a leftover capture object 5635 // from an async native handler (gh-4350) 5636 if ( !saved.length ) { 5637 5638 // Store arguments for use when handling the inner native event 5639 // There will always be at least one argument (an event object), so this array 5640 // will not be confused with a leftover capture object. 5641 saved = slice.call( arguments ); 5642 dataPriv.set( this, type, saved ); 5643 5644 // Trigger the native event and capture its result 5645 // Support: IE <=9 - 11+ 5646 // focus() and blur() are asynchronous 5647 notAsync = expectSync( this, type ); 5648 this[ type ](); 5649 result = dataPriv.get( this, type ); 5650 if ( saved !== result || notAsync ) { 5651 dataPriv.set( this, type, false ); 5652 } else { 5653 result = {}; 5654 } 5655 if ( saved !== result ) { 5656 5657 // Cancel the outer synthetic event 5658 event.stopImmediatePropagation(); 5659 event.preventDefault(); 5660 5661 // Support: Chrome 86+ 5662 // In Chrome, if an element having a focusout handler is blurred by 5663 // clicking outside of it, it invokes the handler synchronously. If 5664 // that handler calls `.remove()` on the element, the data is cleared, 5665 // leaving `result` undefined. We need to guard against this. 5666 return result && result.value; 5667 } 5668 5669 // If this is an inner synthetic event for an event with a bubbling surrogate 5670 // (focus or blur), assume that the surrogate already propagated from triggering the 5671 // native event and prevent that from happening again here. 5672 // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the 5673 // bubbling surrogate propagates *after* the non-bubbling base), but that seems 5674 // less bad than duplication. 5675 } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { 5676 event.stopPropagation(); 5677 } 5678 5679 // If this is a native event triggered above, everything is now in order 5680 // Fire an inner synthetic event with the original arguments 5681 } else if ( saved.length ) { 5682 5683 // ...and capture the result 5684 dataPriv.set( this, type, { 5685 value: jQuery.event.trigger( 5686 5687 // Support: IE <=9 - 11+ 5688 // Extend with the prototype to reset the above stopImmediatePropagation() 5689 jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), 5690 saved.slice( 1 ), 5691 this 5692 ) 5693 } ); 5694 5695 // Abort handling of the native event 5696 event.stopImmediatePropagation(); 5697 } 5698 } 5699 } ); 5700} 5701 5702jQuery.removeEvent = function( elem, type, handle ) { 5703 5704 // This "if" is needed for plain objects 5705 if ( elem.removeEventListener ) { 5706 elem.removeEventListener( type, handle ); 5707 } 5708}; 5709 5710jQuery.Event = function( src, props ) { 5711 5712 // Allow instantiation without the 'new' keyword 5713 if ( !( this instanceof jQuery.Event ) ) { 5714 return new jQuery.Event( src, props ); 5715 } 5716 5717 // Event object 5718 if ( src && src.type ) { 5719 this.originalEvent = src; 5720 this.type = src.type; 5721 5722 // Events bubbling up the document may have been marked as prevented 5723 // by a handler lower down the tree; reflect the correct value. 5724 this.isDefaultPrevented = src.defaultPrevented || 5725 src.defaultPrevented === undefined && 5726 5727 // Support: Android <=2.3 only 5728 src.returnValue === false ? 5729 returnTrue : 5730 returnFalse; 5731 5732 // Create target properties 5733 // Support: Safari <=6 - 7 only 5734 // Target should not be a text node (trac-504, trac-13143) 5735 this.target = ( src.target && src.target.nodeType === 3 ) ? 5736 src.target.parentNode : 5737 src.target; 5738 5739 this.currentTarget = src.currentTarget; 5740 this.relatedTarget = src.relatedTarget; 5741 5742 // Event type 5743 } else { 5744 this.type = src; 5745 } 5746 5747 // Put explicitly provided properties onto the event object 5748 if ( props ) { 5749 jQuery.extend( this, props ); 5750 } 5751 5752 // Create a timestamp if incoming event doesn't have one 5753 this.timeStamp = src && src.timeStamp || Date.now(); 5754 5755 // Mark it as fixed 5756 this[ jQuery.expando ] = true; 5757}; 5758 5759// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding 5760// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html 5761jQuery.Event.prototype = { 5762 constructor: jQuery.Event, 5763 isDefaultPrevented: returnFalse, 5764 isPropagationStopped: returnFalse, 5765 isImmediatePropagationStopped: returnFalse, 5766 isSimulated: false, 5767 5768 preventDefault: function() { 5769 var e = this.originalEvent; 5770 5771 this.isDefaultPrevented = returnTrue; 5772 5773 if ( e && !this.isSimulated ) { 5774 e.preventDefault(); 5775 } 5776 }, 5777 stopPropagation: function() { 5778 var e = this.originalEvent; 5779 5780 this.isPropagationStopped = returnTrue; 5781 5782 if ( e && !this.isSimulated ) { 5783 e.stopPropagation(); 5784 } 5785 }, 5786 stopImmediatePropagation: function() { 5787 var e = this.originalEvent; 5788 5789 this.isImmediatePropagationStopped = returnTrue; 5790 5791 if ( e && !this.isSimulated ) { 5792 e.stopImmediatePropagation(); 5793 } 5794 5795 this.stopPropagation(); 5796 } 5797}; 5798 5799// Includes all common event props including KeyEvent and MouseEvent specific props 5800jQuery.each( { 5801 altKey: true, 5802 bubbles: true, 5803 cancelable: true, 5804 changedTouches: true, 5805 ctrlKey: true, 5806 detail: true, 5807 eventPhase: true, 5808 metaKey: true, 5809 pageX: true, 5810 pageY: true, 5811 shiftKey: true, 5812 view: true, 5813 "char": true, 5814 code: true, 5815 charCode: true, 5816 key: true, 5817 keyCode: true, 5818 button: true, 5819 buttons: true, 5820 clientX: true, 5821 clientY: true, 5822 offsetX: true, 5823 offsetY: true, 5824 pointerId: true, 5825 pointerType: true, 5826 screenX: true, 5827 screenY: true, 5828 targetTouches: true, 5829 toElement: true, 5830 touches: true, 5831 which: true 5832}, jQuery.event.addProp ); 5833 5834jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { 5835 jQuery.event.special[ type ] = { 5836 5837 // Utilize native event if possible so blur/focus sequence is correct 5838 setup: function() { 5839 5840 // Claim the first handler 5841 // dataPriv.set( this, "focus", ... ) 5842 // dataPriv.set( this, "blur", ... ) 5843 leverageNative( this, type, expectSync ); 5844 5845 // Return false to allow normal processing in the caller 5846 return false; 5847 }, 5848 trigger: function() { 5849 5850 // Force setup before trigger 5851 leverageNative( this, type ); 5852 5853 // Return non-false to allow normal event-path propagation 5854 return true; 5855 }, 5856 5857 // Suppress native focus or blur if we're currently inside 5858 // a leveraged native-event stack 5859 _default: function( event ) { 5860 return dataPriv.get( event.target, type ); 5861 }, 5862 5863 delegateType: delegateType 5864 }; 5865} ); 5866 5867// Create mouseenter/leave events using mouseover/out and event-time checks 5868// so that event delegation works in jQuery. 5869// Do the same for pointerenter/pointerleave and pointerover/pointerout 5870// 5871// Support: Safari 7 only 5872// Safari sends mouseenter too often; see: 5873// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 5874// for the description of the bug (it existed in older Chrome versions as well). 5875jQuery.each( { 5876 mouseenter: "mouseover", 5877 mouseleave: "mouseout", 5878 pointerenter: "pointerover", 5879 pointerleave: "pointerout" 5880}, function( orig, fix ) { 5881 jQuery.event.special[ orig ] = { 5882 delegateType: fix, 5883 bindType: fix, 5884 5885 handle: function( event ) { 5886 var ret, 5887 target = this, 5888 related = event.relatedTarget, 5889 handleObj = event.handleObj; 5890 5891 // For mouseenter/leave call the handler if related is outside the target. 5892 // NB: No relatedTarget if the mouse left/entered the browser window 5893 if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { 5894 event.type = handleObj.origType; 5895 ret = handleObj.handler.apply( this, arguments ); 5896 event.type = fix; 5897 } 5898 return ret; 5899 } 5900 }; 5901} ); 5902 5903jQuery.fn.extend( { 5904 5905 on: function( types, selector, data, fn ) { 5906 return on( this, types, selector, data, fn ); 5907 }, 5908 one: function( types, selector, data, fn ) { 5909 return on( this, types, selector, data, fn, 1 ); 5910 }, 5911 off: function( types, selector, fn ) { 5912 var handleObj, type; 5913 if ( types && types.preventDefault && types.handleObj ) { 5914 5915 // ( event ) dispatched jQuery.Event 5916 handleObj = types.handleObj; 5917 jQuery( types.delegateTarget ).off( 5918 handleObj.namespace ? 5919 handleObj.origType + "." + handleObj.namespace : 5920 handleObj.origType, 5921 handleObj.selector, 5922 handleObj.handler 5923 ); 5924 return this; 5925 } 5926 if ( typeof types === "object" ) { 5927 5928 // ( types-object [, selector] ) 5929 for ( type in types ) { 5930 this.off( type, selector, types[ type ] ); 5931 } 5932 return this; 5933 } 5934 if ( selector === false || typeof selector === "function" ) { 5935 5936 // ( types [, fn] ) 5937 fn = selector; 5938 selector = undefined; 5939 } 5940 if ( fn === false ) { 5941 fn = returnFalse; 5942 } 5943 return this.each( function() { 5944 jQuery.event.remove( this, types, fn, selector ); 5945 } ); 5946 } 5947} ); 5948 5949 5950var 5951 5952 // Support: IE <=10 - 11, Edge 12 - 13 only 5953 // In IE/Edge using regex groups here causes severe slowdowns. 5954 // See https://connect.microsoft.com/IE/feedback/details/1736512/ 5955 rnoInnerhtml = /<script|<style|<link/i, 5956 5957 // checked="checked" or checked 5958 rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, 5959 5960 rcleanScript = /^\s*<!\[CDATA\[|\]\]>\s*$/g; 5961 5962// Prefer a tbody over its parent table for containing new rows 5963function manipulationTarget( elem, content ) { 5964 if ( nodeName( elem, "table" ) && 5965 nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { 5966 5967 return jQuery( elem ).children( "tbody" )[ 0 ] || elem; 5968 } 5969 5970 return elem; 5971} 5972 5973// Replace/restore the type attribute of script elements for safe DOM manipulation 5974function disableScript( elem ) { 5975 elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; 5976 return elem; 5977} 5978function restoreScript( elem ) { 5979 if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { 5980 elem.type = elem.type.slice( 5 ); 5981 } else { 5982 elem.removeAttribute( "type" ); 5983 } 5984 5985 return elem; 5986} 5987 5988function cloneCopyEvent( src, dest ) { 5989 var i, l, type, pdataOld, udataOld, udataCur, events; 5990 5991 if ( dest.nodeType !== 1 ) { 5992 return; 5993 } 5994 5995 // 1. Copy private data: events, handlers, etc. 5996 if ( dataPriv.hasData( src ) ) { 5997 pdataOld = dataPriv.get( src ); 5998 events = pdataOld.events; 5999 6000 if ( events ) { 6001 dataPriv.remove( dest, "handle events" ); 6002 6003 for ( type in events ) { 6004 for ( i = 0, l = events[ type ].length; i < l; i++ ) { 6005 jQuery.event.add( dest, type, events[ type ][ i ] ); 6006 } 6007 } 6008 } 6009 } 6010 6011 // 2. Copy user data 6012 if ( dataUser.hasData( src ) ) { 6013 udataOld = dataUser.access( src ); 6014 udataCur = jQuery.extend( {}, udataOld ); 6015 6016 dataUser.set( dest, udataCur ); 6017 } 6018} 6019 6020// Fix IE bugs, see support tests 6021function fixInput( src, dest ) { 6022 var nodeName = dest.nodeName.toLowerCase(); 6023 6024 // Fails to persist the checked state of a cloned checkbox or radio button. 6025 if ( nodeName === "input" && rcheckableType.test( src.type ) ) { 6026 dest.checked = src.checked; 6027 6028 // Fails to return the selected option to the default selected state when cloning options 6029 } else if ( nodeName === "input" || nodeName === "textarea" ) { 6030 dest.defaultValue = src.defaultValue; 6031 } 6032} 6033 6034function domManip( collection, args, callback, ignored ) { 6035 6036 // Flatten any nested arrays 6037 args = flat( args ); 6038 6039 var fragment, first, scripts, hasScripts, node, doc, 6040 i = 0, 6041 l = collection.length, 6042 iNoClone = l - 1, 6043 value = args[ 0 ], 6044 valueIsFunction = isFunction( value ); 6045 6046 // We can't cloneNode fragments that contain checked, in WebKit 6047 if ( valueIsFunction || 6048 ( l > 1 && typeof value === "string" && 6049 !support.checkClone && rchecked.test( value ) ) ) { 6050 return collection.each( function( index ) { 6051 var self = collection.eq( index ); 6052 if ( valueIsFunction ) { 6053 args[ 0 ] = value.call( this, index, self.html() ); 6054 } 6055 domManip( self, args, callback, ignored ); 6056 } ); 6057 } 6058 6059 if ( l ) { 6060 fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); 6061 first = fragment.firstChild; 6062 6063 if ( fragment.childNodes.length === 1 ) { 6064 fragment = first; 6065 } 6066 6067 // Require either new content or an interest in ignored elements to invoke the callback 6068 if ( first || ignored ) { 6069 scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); 6070 hasScripts = scripts.length; 6071 6072 // Use the original fragment for the last item 6073 // instead of the first because it can end up 6074 // being emptied incorrectly in certain situations (trac-8070). 6075 for ( ; i < l; i++ ) { 6076 node = fragment; 6077 6078 if ( i !== iNoClone ) { 6079 node = jQuery.clone( node, true, true ); 6080 6081 // Keep references to cloned scripts for later restoration 6082 if ( hasScripts ) { 6083 6084 // Support: Android <=4.0 only, PhantomJS 1 only 6085 // push.apply(_, arraylike) throws on ancient WebKit 6086 jQuery.merge( scripts, getAll( node, "script" ) ); 6087 } 6088 } 6089 6090 callback.call( collection[ i ], node, i ); 6091 } 6092 6093 if ( hasScripts ) { 6094 doc = scripts[ scripts.length - 1 ].ownerDocument; 6095 6096 // Reenable scripts 6097 jQuery.map( scripts, restoreScript ); 6098 6099 // Evaluate executable scripts on first document insertion 6100 for ( i = 0; i < hasScripts; i++ ) { 6101 node = scripts[ i ]; 6102 if ( rscriptType.test( node.type || "" ) && 6103 !dataPriv.access( node, "globalEval" ) && 6104 jQuery.contains( doc, node ) ) { 6105 6106 if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { 6107 6108 // Optional AJAX dependency, but won't run scripts if not present 6109 if ( jQuery._evalUrl && !node.noModule ) { 6110 jQuery._evalUrl( node.src, { 6111 nonce: node.nonce || node.getAttribute( "nonce" ) 6112 }, doc ); 6113 } 6114 } else { 6115 6116 // Unwrap a CDATA section containing script contents. This shouldn't be 6117 // needed as in XML documents they're already not visible when 6118 // inspecting element contents and in HTML documents they have no 6119 // meaning but we're preserving that logic for backwards compatibility. 6120 // This will be removed completely in 4.0. See gh-4904. 6121 DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); 6122 } 6123 } 6124 } 6125 } 6126 } 6127 } 6128 6129 return collection; 6130} 6131 6132function remove( elem, selector, keepData ) { 6133 var node, 6134 nodes = selector ? jQuery.filter( selector, elem ) : elem, 6135 i = 0; 6136 6137 for ( ; ( node = nodes[ i ] ) != null; i++ ) { 6138 if ( !keepData && node.nodeType === 1 ) { 6139 jQuery.cleanData( getAll( node ) ); 6140 } 6141 6142 if ( node.parentNode ) { 6143 if ( keepData && isAttached( node ) ) { 6144 setGlobalEval( getAll( node, "script" ) ); 6145 } 6146 node.parentNode.removeChild( node ); 6147 } 6148 } 6149 6150 return elem; 6151} 6152 6153jQuery.extend( { 6154 htmlPrefilter: function( html ) { 6155 return html; 6156 }, 6157 6158 clone: function( elem, dataAndEvents, deepDataAndEvents ) { 6159 var i, l, srcElements, destElements, 6160 clone = elem.cloneNode( true ), 6161 inPage = isAttached( elem ); 6162 6163 // Fix IE cloning issues 6164 if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && 6165 !jQuery.isXMLDoc( elem ) ) { 6166 6167 // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 6168 destElements = getAll( clone ); 6169 srcElements = getAll( elem ); 6170 6171 for ( i = 0, l = srcElements.length; i < l; i++ ) { 6172 fixInput( srcElements[ i ], destElements[ i ] ); 6173 } 6174 } 6175 6176 // Copy the events from the original to the clone 6177 if ( dataAndEvents ) { 6178 if ( deepDataAndEvents ) { 6179 srcElements = srcElements || getAll( elem ); 6180 destElements = destElements || getAll( clone ); 6181 6182 for ( i = 0, l = srcElements.length; i < l; i++ ) { 6183 cloneCopyEvent( srcElements[ i ], destElements[ i ] ); 6184 } 6185 } else { 6186 cloneCopyEvent( elem, clone ); 6187 } 6188 } 6189 6190 // Preserve script evaluation history 6191 destElements = getAll( clone, "script" ); 6192 if ( destElements.length > 0 ) { 6193 setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); 6194 } 6195 6196 // Return the cloned set 6197 return clone; 6198 }, 6199 6200 cleanData: function( elems ) { 6201 var data, elem, type, 6202 special = jQuery.event.special, 6203 i = 0; 6204 6205 for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { 6206 if ( acceptData( elem ) ) { 6207 if ( ( data = elem[ dataPriv.expando ] ) ) { 6208 if ( data.events ) { 6209 for ( type in data.events ) { 6210 if ( special[ type ] ) { 6211 jQuery.event.remove( elem, type ); 6212 6213 // This is a shortcut to avoid jQuery.event.remove's overhead 6214 } else { 6215 jQuery.removeEvent( elem, type, data.handle ); 6216 } 6217 } 6218 } 6219
vendor: 1,119 bytes, lines 6220-6264
6220 // Support: Chrome <=35 - 45+ 6221 // Assign undefined instead of using delete, see Data#remove 6222 elem[ dataPriv.expando ] = undefined; 6223 } 6224 if ( elem[ dataUser.expando ] ) { 6225 6226 // Support: Chrome <=35 - 45+ 6227 // Assign undefined instead of using delete, see Data#remove 6228 elem[ dataUser.expando ] = undefined; 6229 } 6230 } 6231 } 6232 } 6233} ); 6234 6235jQuery.fn.extend( { 6236 detach: function( selector ) { 6237 return remove( this, selector, true ); 6238 }, 6239 6240 remove: function( selector ) { 6241 return remove( this, selector ); 6242 }, 6243 6244 text: function( value ) { 6245 return access( this, function( value ) { 6246 return value === undefined ? 6247 jQuery.text( this ) : 6248 this.empty().each( function() { 6249 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 6250 this.textContent = value; 6251 } 6252 } ); 6253 }, null, value, arguments.length ); 6254 }, 6255 6256 append: function() { 6257 return domManip( this, arguments, function( elem ) { 6258 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 6259 var target = manipulationTarget( this, elem ); 6260 target.appendChild( elem ); 6261 } 6262 } ); 6263 }, 6264
vendor: 4,664 bytes, lines 6265-6465
6265 prepend: function() { 6266 return domManip( this, arguments, function( elem ) { 6267 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 6268 var target = manipulationTarget( this, elem ); 6269 target.insertBefore( elem, target.firstChild ); 6270 } 6271 } ); 6272 }, 6273 6274 before: function() { 6275 return domManip( this, arguments, function( elem ) { 6276 if ( this.parentNode ) { 6277 this.parentNode.insertBefore( elem, this ); 6278 } 6279 } ); 6280 }, 6281 6282 after: function() { 6283 return domManip( this, arguments, function( elem ) { 6284 if ( this.parentNode ) { 6285 this.parentNode.insertBefore( elem, this.nextSibling ); 6286 } 6287 } ); 6288 }, 6289 6290 empty: function() { 6291 var elem, 6292 i = 0; 6293 6294 for ( ; ( elem = this[ i ] ) != null; i++ ) { 6295 if ( elem.nodeType === 1 ) { 6296 6297 // Prevent memory leaks 6298 jQuery.cleanData( getAll( elem, false ) ); 6299 6300 // Remove any remaining nodes 6301 elem.textContent = ""; 6302 } 6303 } 6304 6305 return this; 6306 }, 6307 6308 clone: function( dataAndEvents, deepDataAndEvents ) { 6309 dataAndEvents = dataAndEvents == null ? false : dataAndEvents; 6310 deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; 6311 6312 return this.map( function() { 6313 return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); 6314 } ); 6315 }, 6316 6317 html: function( value ) { 6318 return access( this, function( value ) { 6319 var elem = this[ 0 ] || {}, 6320 i = 0, 6321 l = this.length; 6322 6323 if ( value === undefined && elem.nodeType === 1 ) { 6324 return elem.innerHTML; 6325 } 6326 6327 // See if we can take a shortcut and just use innerHTML 6328 if ( typeof value === "string" && !rnoInnerhtml.test( value ) && 6329 !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { 6330 6331 value = jQuery.htmlPrefilter( value ); 6332 6333 try { 6334 for ( ; i < l; i++ ) { 6335 elem = this[ i ] || {}; 6336 6337 // Remove element nodes and prevent memory leaks 6338 if ( elem.nodeType === 1 ) { 6339 jQuery.cleanData( getAll( elem, false ) ); 6340 elem.innerHTML = value; 6341 } 6342 } 6343 6344 elem = 0; 6345 6346 // If using innerHTML throws an exception, use the fallback method 6347 } catch ( e ) {} 6348 } 6349 6350 if ( elem ) { 6351 this.empty().append( value ); 6352 } 6353 }, null, value, arguments.length ); 6354 }, 6355 6356 replaceWith: function() { 6357 var ignored = []; 6358 6359 // Make the changes, replacing each non-ignored context element with the new content 6360 return domManip( this, arguments, function( elem ) { 6361 var parent = this.parentNode; 6362 6363 if ( jQuery.inArray( this, ignored ) < 0 ) { 6364 jQuery.cleanData( getAll( this ) ); 6365 if ( parent ) { 6366 parent.replaceChild( elem, this ); 6367 } 6368 } 6369 6370 // Force callback invocation 6371 }, ignored ); 6372 } 6373} ); 6374 6375jQuery.each( { 6376 appendTo: "append", 6377 prependTo: "prepend", 6378 insertBefore: "before", 6379 insertAfter: "after", 6380 replaceAll: "replaceWith" 6381}, function( name, original ) { 6382 jQuery.fn[ name ] = function( selector ) { 6383 var elems, 6384 ret = [], 6385 insert = jQuery( selector ), 6386 last = insert.length - 1, 6387 i = 0; 6388 6389 for ( ; i <= last; i++ ) { 6390 elems = i === last ? this : this.clone( true ); 6391 jQuery( insert[ i ] )[ original ]( elems ); 6392 6393 // Support: Android <=4.0 only, PhantomJS 1 only 6394 // .get() because push.apply(_, arraylike) throws on ancient WebKit 6395 push.apply( ret, elems.get() ); 6396 } 6397 6398 return this.pushStack( ret ); 6399 }; 6400} ); 6401var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); 6402 6403var rcustomProp = /^--/; 6404 6405 6406var getStyles = function( elem ) { 6407 6408 // Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150) 6409 // IE throws on elements created in popups 6410 // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" 6411 var view = elem.ownerDocument.defaultView; 6412 6413 if ( !view || !view.opener ) { 6414 view = window; 6415 } 6416 6417 return view.getComputedStyle( elem ); 6418 }; 6419 6420var swap = function( elem, options, callback ) { 6421 var ret, name, 6422 old = {}; 6423 6424 // Remember the old values, and insert the new ones 6425 for ( name in options ) { 6426 old[ name ] = elem.style[ name ]; 6427 elem.style[ name ] = options[ name ]; 6428 } 6429 6430 ret = callback.call( elem ); 6431 6432 // Revert the old values 6433 for ( name in options ) { 6434 elem.style[ name ] = old[ name ]; 6435 } 6436 6437 return ret; 6438}; 6439 6440 6441var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); 6442 6443var whitespace = "[\\x20\\t\\r\\n\\f]"; 6444 6445 6446var rtrimCSS = new RegExp( 6447 "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", 6448 "g" 6449); 6450 6451 6452 6453 6454( function() { 6455 6456 // Executing both pixelPosition & boxSizingReliable tests require only one layout 6457 // so they're executed at the same time to save the second computation. 6458 function computeStyleTests() { 6459 6460 // This is a singleton, we need to execute it only once 6461 if ( !div ) { 6462 return; 6463 } 6464 6465 container.style.cssText = "position:absolute;
vendor: 4,131 bytes, lines 6465-6584
6465left:-11111px;width:60px;" + 6466 "margin-top:1px;padding:0;border:0"; 6467 div.style.cssText = 6468 "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + 6469 "margin:auto;border:1px;padding:1px;" + 6470 "width:60%;top:1%"; 6471 documentElement.appendChild( container ).appendChild( div ); 6472 6473 var divStyle = window.getComputedStyle( div ); 6474 pixelPositionVal = divStyle.top !== "1%"; 6475 6476 // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 6477 reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; 6478 6479 // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 6480 // Some styles come back with percentage values, even though they shouldn't 6481 div.style.right = "60%"; 6482 pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; 6483 6484 // Support: IE 9 - 11 only 6485 // Detect misreporting of content dimensions for box-sizing:border-box elements 6486 boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; 6487 6488 // Support: IE 9 only 6489 // Detect overflow:scroll screwiness (gh-3699) 6490 // Support: Chrome <=64 6491 // Don't get tricked when zoom affects offsetWidth (gh-4029) 6492 div.style.position = "absolute"; 6493 scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; 6494 6495 documentElement.removeChild( container ); 6496 6497 // Nullify the div so it wouldn't be stored in the memory and 6498 // it will also be a sign that checks already performed 6499 div = null; 6500 } 6501 6502 function roundPixelMeasures( measure ) { 6503 return Math.round( parseFloat( measure ) ); 6504 } 6505 6506 var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, 6507 reliableTrDimensionsVal, reliableMarginLeftVal, 6508 container = document.createElement( "div" ), 6509 div = document.createElement( "div" ); 6510 6511 // Finish early in limited (non-browser) environments 6512 if ( !div.style ) { 6513 return; 6514 } 6515 6516 // Support: IE <=9 - 11 only 6517 // Style of cloned element affects source element cloned (trac-8908) 6518 div.style.backgroundClip = "content-box"; 6519 div.cloneNode( true ).style.backgroundClip = ""; 6520 support.clearCloneStyle = div.style.backgroundClip === "content-box"; 6521 6522 jQuery.extend( support, { 6523 boxSizingReliable: function() { 6524 computeStyleTests(); 6525 return boxSizingReliableVal; 6526 }, 6527 pixelBoxStyles: function() { 6528 computeStyleTests(); 6529 return pixelBoxStylesVal; 6530 }, 6531 pixelPosition: function() { 6532 computeStyleTests(); 6533 return pixelPositionVal; 6534 }, 6535 reliableMarginLeft: function() { 6536 computeStyleTests(); 6537 return reliableMarginLeftVal; 6538 }, 6539 scrollboxSize: function() { 6540 computeStyleTests(); 6541 return scrollboxSizeVal; 6542 }, 6543 6544 // Support: IE 9 - 11+, Edge 15 - 18+ 6545 // IE/Edge misreport `getComputedStyle` of table rows with width/height 6546 // set in CSS while `offset*` properties report correct values. 6547 // Behavior in IE 9 is more subtle than in newer versions & it passes 6548 // some versions of this test; make sure not to make it pass there! 6549 // 6550 // Support: Firefox 70+ 6551 // Only Firefox includes border widths 6552 // in computed dimensions. (gh-4529) 6553 reliableTrDimensions: function() { 6554 var table, tr, trChild, trStyle; 6555 if ( reliableTrDimensionsVal == null ) { 6556 table = document.createElement( "table" ); 6557 tr = document.createElement( "tr" ); 6558 trChild = document.createElement( "div" ); 6559 6560 table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; 6561 tr.style.cssText = "border:1px solid"; 6562 6563 // Support: Chrome 86+ 6564 // Height set through cssText does not get applied. 6565 // Computed height then comes back as 0. 6566 tr.style.height = "1px"; 6567 trChild.style.height = "9px"; 6568 6569 // Support: Android 8 Chrome 86+ 6570 // In our bodyBackground.html iframe, 6571 // display for all div elements is set to "inline", 6572 // which causes a problem only in Android 8 Chrome 86. 6573 // Ensuring the div is display: block 6574 // gets around this issue. 6575 trChild.style.display = "block"; 6576 6577 documentElement 6578 .appendChild( table ) 6579 .appendChild( tr ) 6580 .appendChild( trChild ); 6581 6582 trStyle = window.getComputedStyle( tr ); 6583 reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) + 6584 parseInt( trStyle.borderTopWidth, 10 ) +
vendor: 11,424 bytes, lines 6585-6979
6585 parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight; 6586 6587 documentElement.removeChild( table ); 6588 } 6589 return reliableTrDimensionsVal; 6590 } 6591 } ); 6592} )(); 6593 6594 6595function curCSS( elem, name, computed ) { 6596 var width, minWidth, maxWidth, ret, 6597 isCustomProp = rcustomProp.test( name ), 6598 6599 // Support: Firefox 51+ 6600 // Retrieving style before computed somehow 6601 // fixes an issue with getting wrong values 6602 // on detached elements 6603 style = elem.style; 6604 6605 computed = computed || getStyles( elem ); 6606 6607 // getPropertyValue is needed for: 6608 // .css('filter') (IE 9 only, trac-12537) 6609 // .css('--customProperty) (gh-3144) 6610 if ( computed ) { 6611 ret = computed.getPropertyValue( name ) || computed[ name ]; 6612 6613 // trim whitespace for custom property (issue gh-4926) 6614 if ( isCustomProp ) { 6615 6616 // rtrim treats U+000D CARRIAGE RETURN and U+000C FORM FEED 6617 // as whitespace while CSS does not, but this is not a problem 6618 // because CSS preprocessing replaces them with U+000A LINE FEED 6619 // (which *is* CSS whitespace) 6620 // https://www.w3.org/TR/css-syntax-3/#input-preprocessing 6621 ret = ret.replace( rtrimCSS, "$1" ); 6622 } 6623 6624 if ( ret === "" && !isAttached( elem ) ) { 6625 ret = jQuery.style( elem, name ); 6626 } 6627 6628 // A tribute to the "awesome hack by Dean Edwards" 6629 // Android Browser returns percentage for some values, 6630 // but width seems to be reliably pixels. 6631 // This is against the CSSOM draft spec: 6632 // https://drafts.csswg.org/cssom/#resolved-values 6633 if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { 6634 6635 // Remember the original values 6636 width = style.width; 6637 minWidth = style.minWidth; 6638 maxWidth = style.maxWidth; 6639 6640 // Put in the new values to get a computed value out 6641 style.minWidth = style.maxWidth = style.width = ret; 6642 ret = computed.width; 6643 6644 // Revert the changed values 6645 style.width = width; 6646 style.minWidth = minWidth; 6647 style.maxWidth = maxWidth; 6648 } 6649 } 6650 6651 return ret !== undefined ? 6652 6653 // Support: IE <=9 - 11 only 6654 // IE returns zIndex value as an integer. 6655 ret + "" : 6656 ret; 6657} 6658 6659 6660function addGetHookIf( conditionFn, hookFn ) { 6661 6662 // Define the hook, we'll check on the first run if it's really needed. 6663 return { 6664 get: function() { 6665 if ( conditionFn() ) { 6666 6667 // Hook not needed (or it's not possible to use it due 6668 // to missing dependency), remove it. 6669 delete this.get; 6670 return; 6671 } 6672 6673 // Hook needed; redefine it so that the support test is not executed again. 6674 return ( this.get = hookFn ).apply( this, arguments ); 6675 } 6676 }; 6677} 6678 6679 6680var cssPrefixes = [ "Webkit", "Moz", "ms" ], 6681 emptyStyle = document.createElement( "div" ).style, 6682 vendorProps = {}; 6683 6684// Return a vendor-prefixed property or undefined 6685function vendorPropName( name ) { 6686 6687 // Check for vendor prefixed names 6688 var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), 6689 i = cssPrefixes.length; 6690 6691 while ( i-- ) { 6692 name = cssPrefixes[ i ] + capName; 6693 if ( name in emptyStyle ) { 6694 return name; 6695 } 6696 } 6697} 6698 6699// Return a potentially-mapped jQuery.cssProps or vendor prefixed property 6700function finalPropName( name ) { 6701 var final = jQuery.cssProps[ name ] || vendorProps[ name ]; 6702 6703 if ( final ) { 6704 return final; 6705 } 6706 if ( name in emptyStyle ) { 6707 return name; 6708 } 6709 return vendorProps[ name ] = vendorPropName( name ) || name; 6710} 6711 6712 6713var 6714 6715 // Swappable if display is none or starts with table 6716 // except "table", "table-cell", or "table-caption" 6717 // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display 6718 rdisplayswap = /^(none|table(?!-c[ea]).+)/, 6719 cssShow = { position: "absolute", visibility: "hidden", display: "block" }, 6720 cssNormalTransform = { 6721 letterSpacing: "0", 6722 fontWeight: "400" 6723 }; 6724 6725function setPositiveNumber( _elem, value, subtract ) { 6726 6727 // Any relative (+/-) values have already been 6728 // normalized at this point 6729 var matches = rcssNum.exec( value ); 6730 return matches ? 6731 6732 // Guard against undefined "subtract", e.g., when used as in cssHooks 6733 Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : 6734 value; 6735} 6736 6737function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { 6738 var i = dimension === "width" ? 1 : 0, 6739 extra = 0, 6740 delta = 0; 6741 6742 // Adjustment may not be necessary 6743 if ( box === ( isBorderBox ? "border" : "content" ) ) { 6744 return 0; 6745 } 6746 6747 for ( ; i < 4; i += 2 ) { 6748 6749 // Both box models exclude margin 6750 if ( box === "margin" ) { 6751 delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); 6752 } 6753 6754 // If we get here with a content-box, we're seeking "padding" or "border" or "margin" 6755 if ( !isBorderBox ) { 6756 6757 // Add padding 6758 delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); 6759 6760 // For "border" or "margin", add border 6761 if ( box !== "padding" ) { 6762 delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 6763 6764 // But still keep track of it otherwise 6765 } else { 6766 extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 6767 } 6768 6769 // If we get here with a border-box (content + padding + border), we're seeking "content" or 6770 // "padding" or "margin" 6771 } else { 6772 6773 // For "content", subtract padding 6774 if ( box === "content" ) { 6775 delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); 6776 } 6777 6778 // For "content" or "padding", subtract border 6779 if ( box !== "margin" ) { 6780 delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 6781 } 6782 } 6783 } 6784 6785 // Account for positive content-box scroll gutter when requested by providing computedVal 6786 if ( !isBorderBox && computedVal >= 0 ) { 6787 6788 // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border 6789 // Assuming integer scroll gutter, subtract the rest and round down 6790 delta += Math.max( 0, Math.ceil( 6791 elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - 6792 computedVal - 6793 delta - 6794 extra - 6795 0.5 6796 6797 // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter 6798 // Use an explicit zero to avoid NaN (gh-3964) 6799 ) ) || 0; 6800 } 6801 6802 return delta; 6803} 6804 6805function getWidthOrHeight( elem, dimension, extra ) { 6806 6807 // Start with computed style 6808 var styles = getStyles( elem ), 6809 6810 // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). 6811 // Fake content-box until we know it's needed to know the true value. 6812 boxSizingNeeded = !support.boxSizingReliable() || extra, 6813 isBorderBox = boxSizingNeeded && 6814 jQuery.css( elem, "boxSizing", false, styles ) === "border-box", 6815 valueIsBorderBox = isBorderBox, 6816 6817 val = curCSS( elem, dimension, styles ), 6818 offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); 6819 6820 // Support: Firefox <=54 6821 // Return a confounding non-pixel value or feign ignorance, as appropriate. 6822 if ( rnumnonpx.test( val ) ) { 6823 if ( !extra ) { 6824 return val; 6825 } 6826 val = "auto"; 6827 } 6828 6829 6830 // Support: IE 9 - 11 only 6831 // Use offsetWidth/offsetHeight for when box sizing is unreliable. 6832 // In those cases, the computed value can be trusted to be border-box. 6833 if ( ( !support.boxSizingReliable() && isBorderBox || 6834 6835 // Support: IE 10 - 11+, Edge 15 - 18+ 6836 // IE/Edge misreport `getComputedStyle` of table rows with width/height 6837 // set in CSS while `offset*` properties report correct values. 6838 // Interestingly, in some cases IE 9 doesn't suffer from this issue. 6839 !support.reliableTrDimensions() && nodeName( elem, "tr" ) || 6840 6841 // Fall back to offsetWidth/offsetHeight when value is "auto" 6842 // This happens for inline elements with no explicit setting (gh-3571) 6843 val === "auto" || 6844 6845 // Support: Android <=4.1 - 4.3 only 6846 // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) 6847 !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && 6848 6849 // Make sure the element is visible & connected 6850 elem.getClientRects().length ) { 6851 6852 isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; 6853 6854 // Where available, offsetWidth/offsetHeight approximate border box dimensions. 6855 // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the 6856 // retrieved value as a content box dimension. 6857 valueIsBorderBox = offsetProp in elem; 6858 if ( valueIsBorderBox ) { 6859 val = elem[ offsetProp ]; 6860 } 6861 } 6862 6863 // Normalize "" and auto 6864 val = parseFloat( val ) || 0; 6865 6866 // Adjust for the element's box model 6867 return ( val + 6868 boxModelAdjustment( 6869 elem, 6870 dimension, 6871 extra || ( isBorderBox ? "border" : "content" ), 6872 valueIsBorderBox, 6873 styles, 6874 6875 // Provide the current computed size to request scroll gutter calculation (gh-3589) 6876 val 6877 ) 6878 ) + "px"; 6879} 6880 6881jQuery.extend( { 6882 6883 // Add in style property hooks for overriding the default 6884 // behavior of getting and setting a style property 6885 cssHooks: { 6886 opacity: { 6887 get: function( elem, computed ) { 6888 if ( computed ) { 6889 6890 // We should always get a number back from opacity 6891 var ret = curCSS( elem, "opacity" ); 6892 return ret === "" ? "1" : ret; 6893 } 6894 } 6895 } 6896 }, 6897 6898 // Don't automatically add "px" to these possibly-unitless properties 6899 cssNumber: { 6900 "animationIterationCount": true, 6901 "columnCount": true, 6902 "fillOpacity": true, 6903 "flexGrow": true, 6904 "flexShrink": true, 6905 "fontWeight": true, 6906 "gridArea": true, 6907 "gridColumn": true, 6908 "gridColumnEnd": true, 6909 "gridColumnStart": true, 6910 "gridRow": true, 6911 "gridRowEnd": true, 6912 "gridRowStart": true, 6913 "lineHeight": true, 6914 "opacity": true, 6915 "order": true, 6916 "orphans": true, 6917 "widows": true, 6918 "zIndex": true, 6919 "zoom": true 6920 }, 6921 6922 // Add in properties whose names you wish to fix before 6923 // setting or getting the value 6924 cssProps: {}, 6925 6926 // Get and set the style property on a DOM Node 6927 style: function( elem, name, value, extra ) { 6928 6929 // Don't set styles on text and comment nodes 6930 if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { 6931 return; 6932 } 6933 6934 // Make sure that we're working with the right name 6935 var ret, type, hooks, 6936 origName = camelCase( name ), 6937 isCustomProp = rcustomProp.test( name ), 6938 style = elem.style; 6939 6940 // Make sure that we're working with the right name. We don't 6941 // want to query the value if it is a CSS custom property 6942 // since they are user-defined. 6943 if ( !isCustomProp ) { 6944 name = finalPropName( origName ); 6945 } 6946 6947 // Gets hook for the prefixed version, then unprefixed version 6948 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; 6949 6950 // Check if we're setting a value 6951 if ( value !== undefined ) { 6952 type = typeof value; 6953 6954 // Convert "+=" or "-=" to relative numbers (trac-7345) 6955 if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { 6956 value = adjustCSS( elem, name, ret ); 6957 6958 // Fixes bug trac-9237 6959 type = "number"; 6960 } 6961 6962 // Make sure that null and NaN values aren't set (trac-7116) 6963 if ( value == null || value !== value ) { 6964 return; 6965 } 6966 6967 // If a number was passed in, add the unit (except for certain CSS properties) 6968 // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append 6969 // "px" to a few hardcoded values. 6970 if ( type === "number" && !isCustomProp ) { 6971 value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); 6972 } 6973 6974 // background-* props affect original clone's values 6975 if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { 6976 style[ name ] = "inherit"; 6977 } 6978 6979 // If a hook was provided, use that value, otherwise just set the specified value
vendor: 16,052 bytes, lines 6980-7584
6980 if ( !hooks || !( "set" in hooks ) || 6981 ( value = hooks.set( elem, value, extra ) ) !== undefined ) { 6982 6983 if ( isCustomProp ) { 6984 style.setProperty( name, value ); 6985 } else { 6986 style[ name ] = value; 6987 } 6988 } 6989 6990 } else { 6991 6992 // If a hook was provided get the non-computed value from there 6993 if ( hooks && "get" in hooks && 6994 ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { 6995 6996 return ret; 6997 } 6998 6999 // Otherwise just get the value from the style object 7000 return style[ name ]; 7001 } 7002 }, 7003 7004 css: function( elem, name, extra, styles ) { 7005 var val, num, hooks, 7006 origName = camelCase( name ), 7007 isCustomProp = rcustomProp.test( name ); 7008 7009 // Make sure that we're working with the right name. We don't 7010 // want to modify the value if it is a CSS custom property 7011 // since they are user-defined. 7012 if ( !isCustomProp ) { 7013 name = finalPropName( origName ); 7014 } 7015 7016 // Try prefixed name followed by the unprefixed name 7017 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; 7018 7019 // If a hook was provided get the computed value from there 7020 if ( hooks && "get" in hooks ) { 7021 val = hooks.get( elem, true, extra ); 7022 } 7023 7024 // Otherwise, if a way to get the computed value exists, use that 7025 if ( val === undefined ) { 7026 val = curCSS( elem, name, styles ); 7027 } 7028 7029 // Convert "normal" to computed value 7030 if ( val === "normal" && name in cssNormalTransform ) { 7031 val = cssNormalTransform[ name ]; 7032 } 7033 7034 // Make numeric if forced or a qualifier was provided and val looks numeric 7035 if ( extra === "" || extra ) { 7036 num = parseFloat( val ); 7037 return extra === true || isFinite( num ) ? num || 0 : val; 7038 } 7039 7040 return val; 7041 } 7042} ); 7043 7044jQuery.each( [ "height", "width" ], function( _i, dimension ) { 7045 jQuery.cssHooks[ dimension ] = { 7046 get: function( elem, computed, extra ) { 7047 if ( computed ) { 7048 7049 // Certain elements can have dimension info if we invisibly show them 7050 // but it must have a current display style that would benefit 7051 return rdisplayswap.test( jQuery.css( elem, "display" ) ) && 7052 7053 // Support: Safari 8+ 7054 // Table columns in Safari have non-zero offsetWidth & zero 7055 // getBoundingClientRect().width unless display is changed. 7056 // Support: IE <=11 only 7057 // Running getBoundingClientRect on a disconnected node 7058 // in IE throws an error. 7059 ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? 7060 swap( elem, cssShow, function() { 7061 return getWidthOrHeight( elem, dimension, extra ); 7062 } ) : 7063 getWidthOrHeight( elem, dimension, extra ); 7064 } 7065 }, 7066 7067 set: function( elem, value, extra ) { 7068 var matches, 7069 styles = getStyles( elem ), 7070 7071 // Only read styles.position if the test has a chance to fail 7072 // to avoid forcing a reflow. 7073 scrollboxSizeBuggy = !support.scrollboxSize() && 7074 styles.position === "absolute", 7075 7076 // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) 7077 boxSizingNeeded = scrollboxSizeBuggy || extra, 7078 isBorderBox = boxSizingNeeded && 7079 jQuery.css( elem, "boxSizing", false, styles ) === "border-box", 7080 subtract = extra ? 7081 boxModelAdjustment( 7082 elem, 7083 dimension, 7084 extra, 7085 isBorderBox, 7086 styles 7087 ) : 7088 0; 7089 7090 // Account for unreliable border-box dimensions by comparing offset* to computed and 7091 // faking a content-box to get border and padding (gh-3699) 7092 if ( isBorderBox && scrollboxSizeBuggy ) { 7093 subtract -= Math.ceil( 7094 elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - 7095 parseFloat( styles[ dimension ] ) - 7096 boxModelAdjustment( elem, dimension, "border", false, styles ) - 7097 0.5 7098 ); 7099 } 7100 7101 // Convert to pixels if value adjustment is needed 7102 if ( subtract && ( matches = rcssNum.exec( value ) ) && 7103 ( matches[ 3 ] || "px" ) !== "px" ) { 7104 7105 elem.style[ dimension ] = value; 7106 value = jQuery.css( elem, dimension ); 7107 } 7108 7109 return setPositiveNumber( elem, value, subtract ); 7110 } 7111 }; 7112} ); 7113 7114jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, 7115 function( elem, computed ) { 7116 if ( computed ) { 7117 return ( parseFloat( curCSS( elem, "marginLeft" ) ) || 7118 elem.getBoundingClientRect().left - 7119 swap( elem, { marginLeft: 0 }, function() { 7120 return elem.getBoundingClientRect().left; 7121 } ) 7122 ) + "px"; 7123 } 7124 } 7125); 7126 7127// These hooks are used by animate to expand properties 7128jQuery.each( { 7129 margin: "", 7130 padding: "", 7131 border: "Width" 7132}, function( prefix, suffix ) { 7133 jQuery.cssHooks[ prefix + suffix ] = { 7134 expand: function( value ) { 7135 var i = 0, 7136 expanded = {}, 7137 7138 // Assumes a single number if not a string 7139 parts = typeof value === "string" ? value.split( " " ) : [ value ]; 7140 7141 for ( ; i < 4; i++ ) { 7142 expanded[ prefix + cssExpand[ i ] + suffix ] = 7143 parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; 7144 } 7145 7146 return expanded; 7147 } 7148 }; 7149 7150 if ( prefix !== "margin" ) { 7151 jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; 7152 } 7153} ); 7154 7155jQuery.fn.extend( { 7156 css: function( name, value ) { 7157 return access( this, function( elem, name, value ) { 7158 var styles, len, 7159 map = {}, 7160 i = 0; 7161 7162 if ( Array.isArray( name ) ) { 7163 styles = getStyles( elem ); 7164 len = name.length; 7165 7166 for ( ; i < len; i++ ) { 7167 map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); 7168 } 7169 7170 return map; 7171 } 7172 7173 return value !== undefined ? 7174 jQuery.style( elem, name, value ) : 7175 jQuery.css( elem, name ); 7176 }, name, value, arguments.length > 1 ); 7177 } 7178} ); 7179 7180 7181function Tween( elem, options, prop, end, easing ) { 7182 return new Tween.prototype.init( elem, options, prop, end, easing ); 7183} 7184jQuery.Tween = Tween; 7185 7186Tween.prototype = { 7187 constructor: Tween, 7188 init: function( elem, options, prop, end, easing, unit ) { 7189 this.elem = elem; 7190 this.prop = prop; 7191 this.easing = easing || jQuery.easing._default; 7192 this.options = options; 7193 this.start = this.now = this.cur(); 7194 this.end = end; 7195 this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); 7196 }, 7197 cur: function() { 7198 var hooks = Tween.propHooks[ this.prop ]; 7199 7200 return hooks && hooks.get ? 7201 hooks.get( this ) : 7202 Tween.propHooks._default.get( this ); 7203 }, 7204 run: function( percent ) { 7205 var eased, 7206 hooks = Tween.propHooks[ this.prop ]; 7207 7208 if ( this.options.duration ) { 7209 this.pos = eased = jQuery.easing[ this.easing ]( 7210 percent, this.options.duration * percent, 0, 1, this.options.duration 7211 ); 7212 } else { 7213 this.pos = eased = percent; 7214 } 7215 this.now = ( this.end - this.start ) * eased + this.start; 7216 7217 if ( this.options.step ) { 7218 this.options.step.call( this.elem, this.now, this ); 7219 } 7220 7221 if ( hooks && hooks.set ) { 7222 hooks.set( this ); 7223 } else { 7224 Tween.propHooks._default.set( this ); 7225 } 7226 return this; 7227 } 7228}; 7229 7230Tween.prototype.init.prototype = Tween.prototype; 7231 7232Tween.propHooks = { 7233 _default: { 7234 get: function( tween ) { 7235 var result; 7236 7237 // Use a property on the element directly when it is not a DOM element, 7238 // or when there is no matching style property that exists. 7239 if ( tween.elem.nodeType !== 1 || 7240 tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { 7241 return tween.elem[ tween.prop ]; 7242 } 7243 7244 // Passing an empty string as a 3rd parameter to .css will automatically 7245 // attempt a parseFloat and fallback to a string if the parse fails. 7246 // Simple values such as "10px" are parsed to Float; 7247 // complex values such as "rotate(1rad)" are returned as-is. 7248 result = jQuery.css( tween.elem, tween.prop, "" ); 7249 7250 // Empty strings, null, undefined and "auto" are converted to 0. 7251 return !result || result === "auto" ? 0 : result; 7252 }, 7253 set: function( tween ) { 7254 7255 // Use step hook for back compat. 7256 // Use cssHook if its there. 7257 // Use .style if available and use plain properties where available. 7258 if ( jQuery.fx.step[ tween.prop ] ) { 7259 jQuery.fx.step[ tween.prop ]( tween ); 7260 } else if ( tween.elem.nodeType === 1 && ( 7261 jQuery.cssHooks[ tween.prop ] || 7262 tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { 7263 jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); 7264 } else { 7265 tween.elem[ tween.prop ] = tween.now; 7266 } 7267 } 7268 } 7269}; 7270 7271// Support: IE <=9 only 7272// Panic based approach to setting things on disconnected nodes 7273Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { 7274 set: function( tween ) { 7275 if ( tween.elem.nodeType && tween.elem.parentNode ) { 7276 tween.elem[ tween.prop ] = tween.now; 7277 } 7278 } 7279}; 7280 7281jQuery.easing = { 7282 linear: function( p ) { 7283 return p; 7284 }, 7285 swing: function( p ) { 7286 return 0.5 - Math.cos( p * Math.PI ) / 2; 7287 }, 7288 _default: "swing" 7289}; 7290 7291jQuery.fx = Tween.prototype.init; 7292 7293// Back compat <1.8 extension point 7294jQuery.fx.step = {}; 7295 7296 7297 7298 7299var 7300 fxNow, inProgress, 7301 rfxtypes = /^(?:toggle|show|hide)$/, 7302 rrun = /queueHooks$/; 7303 7304function schedule() { 7305 if ( inProgress ) { 7306 if ( document.hidden === false && window.requestAnimationFrame ) { 7307 window.requestAnimationFrame( schedule ); 7308 } else { 7309 window.setTimeout( schedule, jQuery.fx.interval ); 7310 } 7311 7312 jQuery.fx.tick(); 7313 } 7314} 7315 7316// Animations created synchronously will run synchronously 7317function createFxNow() { 7318 window.setTimeout( function() { 7319 fxNow = undefined; 7320 } ); 7321 return ( fxNow = Date.now() ); 7322} 7323 7324// Generate parameters to create a standard animation 7325function genFx( type, includeWidth ) { 7326 var which, 7327 i = 0, 7328 attrs = { height: type }; 7329 7330 // If we include width, step value is 1 to do all cssExpand values, 7331 // otherwise step value is 2 to skip over Left and Right 7332 includeWidth = includeWidth ? 1 : 0; 7333 for ( ; i < 4; i += 2 - includeWidth ) { 7334 which = cssExpand[ i ]; 7335 attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; 7336 } 7337 7338 if ( includeWidth ) { 7339 attrs.opacity = attrs.width = type; 7340 } 7341 7342 return attrs; 7343} 7344 7345function createTween( value, prop, animation ) { 7346 var tween, 7347 collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), 7348 index = 0, 7349 length = collection.length; 7350 for ( ; index < length; index++ ) { 7351 if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { 7352 7353 // We're done with this property 7354 return tween; 7355 } 7356 } 7357} 7358 7359function defaultPrefilter( elem, props, opts ) { 7360 var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, 7361 isBox = "width" in props || "height" in props, 7362 anim = this, 7363 orig = {}, 7364 style = elem.style, 7365 hidden = elem.nodeType && isHiddenWithinTree( elem ), 7366 dataShow = dataPriv.get( elem, "fxshow" ); 7367 7368 // Queue-skipping animations hijack the fx hooks 7369 if ( !opts.queue ) { 7370 hooks = jQuery._queueHooks( elem, "fx" ); 7371 if ( hooks.unqueued == null ) { 7372 hooks.unqueued = 0; 7373 oldfire = hooks.empty.fire; 7374 hooks.empty.fire = function() { 7375 if ( !hooks.unqueued ) { 7376 oldfire(); 7377 } 7378 }; 7379 } 7380 hooks.unqueued++; 7381 7382 anim.always( function() { 7383 7384 // Ensure the complete handler is called before this completes 7385 anim.always( function() { 7386 hooks.unqueued--; 7387 if ( !jQuery.queue( elem, "fx" ).length ) { 7388 hooks.empty.fire(); 7389 } 7390 } ); 7391 } ); 7392 } 7393 7394 // Detect show/hide animations 7395 for ( prop in props ) { 7396 value = props[ prop ]; 7397 if ( rfxtypes.test( value ) ) { 7398 delete props[ prop ]; 7399 toggle = toggle || value === "toggle"; 7400 if ( value === ( hidden ? "hide" : "show" ) ) { 7401 7402 // Pretend to be hidden if this is a "show" and 7403 // there is still data from a stopped show/hide 7404 if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { 7405 hidden = true; 7406 7407 // Ignore all other no-op show/hide data 7408 } else { 7409 continue; 7410 } 7411 } 7412 orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); 7413 } 7414 } 7415 7416 // Bail out if this is a no-op like .hide().hide() 7417 propTween = !jQuery.isEmptyObject( props ); 7418 if ( !propTween && jQuery.isEmptyObject( orig ) ) { 7419 return; 7420 } 7421 7422 // Restrict "overflow" and "display" styles during box animations 7423 if ( isBox && elem.nodeType === 1 ) { 7424 7425 // Support: IE <=9 - 11, Edge 12 - 15 7426 // Record all 3 overflow attributes because IE does not infer the shorthand 7427 // from identically-valued overflowX and overflowY and Edge just mirrors 7428 // the overflowX value there. 7429 opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; 7430 7431 // Identify a display type, preferring old show/hide data over the CSS cascade 7432 restoreDisplay = dataShow && dataShow.display; 7433 if ( restoreDisplay == null ) { 7434 restoreDisplay = dataPriv.get( elem, "display" ); 7435 } 7436 display = jQuery.css( elem, "display" ); 7437 if ( display === "none" ) { 7438 if ( restoreDisplay ) { 7439 display = restoreDisplay; 7440 } else { 7441 7442 // Get nonempty value(s) by temporarily forcing visibility 7443 showHide( [ elem ], true ); 7444 restoreDisplay = elem.style.display || restoreDisplay; 7445 display = jQuery.css( elem, "display" ); 7446 showHide( [ elem ] ); 7447 } 7448 } 7449 7450 // Animate inline elements as inline-block 7451 if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { 7452 if ( jQuery.css( elem, "float" ) === "none" ) { 7453 7454 // Restore the original display value at the end of pure show/hide animations 7455 if ( !propTween ) { 7456 anim.done( function() { 7457 style.display = restoreDisplay; 7458 } ); 7459 if ( restoreDisplay == null ) { 7460 display = style.display; 7461 restoreDisplay = display === "none" ? "" : display; 7462 } 7463 } 7464 style.display = "inline-block"; 7465 } 7466 } 7467 } 7468 7469 if ( opts.overflow ) { 7470 style.overflow = "hidden"; 7471 anim.always( function() { 7472 style.overflow = opts.overflow[ 0 ]; 7473 style.overflowX = opts.overflow[ 1 ]; 7474 style.overflowY = opts.overflow[ 2 ]; 7475 } ); 7476 } 7477 7478 // Implement show/hide animations 7479 propTween = false; 7480 for ( prop in orig ) { 7481 7482 // General show/hide setup for this element animation 7483 if ( !propTween ) { 7484 if ( dataShow ) { 7485 if ( "hidden" in dataShow ) { 7486 hidden = dataShow.hidden; 7487 } 7488 } else { 7489 dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); 7490 } 7491 7492 // Store hidden/visible for toggle so `.stop().toggle()` "reverses" 7493 if ( toggle ) { 7494 dataShow.hidden = !hidden; 7495 } 7496 7497 // Show elements before animating them 7498 if ( hidden ) { 7499 showHide( [ elem ], true ); 7500 } 7501 7502 /* eslint-disable no-loop-func */ 7503 7504 anim.done( function() { 7505 7506 /* eslint-enable no-loop-func */ 7507 7508 // The final step of a "hide" animation is actually hiding the element 7509 if ( !hidden ) { 7510 showHide( [ elem ] ); 7511 } 7512 dataPriv.remove( elem, "fxshow" ); 7513 for ( prop in orig ) { 7514 jQuery.style( elem, prop, orig[ prop ] ); 7515 } 7516 } ); 7517 } 7518 7519 // Per-property setup 7520 propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); 7521 if ( !( prop in dataShow ) ) { 7522 dataShow[ prop ] = propTween.start; 7523 if ( hidden ) { 7524 propTween.end = propTween.start; 7525 propTween.start = 0; 7526 } 7527 } 7528 } 7529} 7530 7531function propFilter( props, specialEasing ) { 7532 var index, name, easing, value, hooks; 7533 7534 // camelCase, specialEasing and expand cssHook pass 7535 for ( index in props ) { 7536 name = camelCase( index ); 7537 easing = specialEasing[ name ]; 7538 value = props[ index ]; 7539 if ( Array.isArray( value ) ) { 7540 easing = value[ 1 ]; 7541 value = props[ index ] = value[ 0 ]; 7542 } 7543 7544 if ( index !== name ) { 7545 props[ name ] = value; 7546 delete props[ index ]; 7547 } 7548 7549 hooks = jQuery.cssHooks[ name ]; 7550 if ( hooks && "expand" in hooks ) { 7551 value = hooks.expand( value ); 7552 delete props[ name ]; 7553 7554 // Not quite $.extend, this won't overwrite existing keys. 7555 // Reusing 'index' because we have the correct "name" 7556 for ( index in value ) { 7557 if ( !( index in props ) ) { 7558 props[ index ] = value[ index ]; 7559 specialEasing[ index ] = easing; 7560 } 7561 } 7562 } else { 7563 specialEasing[ name ] = easing; 7564 } 7565 } 7566} 7567 7568function Animation( elem, properties, options ) { 7569 var result, 7570 stopped, 7571 index = 0, 7572 length = Animation.prefilters.length, 7573 deferred = jQuery.Deferred().always( function() { 7574 7575 // Don't match elem in the :animated selector 7576 delete tick.elem; 7577 } ), 7578 tick = function() { 7579 if ( stopped ) { 7580 return false; 7581 } 7582 var currentTime = fxNow || createFxNow(), 7583 remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), 7584
vendor: 9,542 bytes, lines 7585-7975
7585 // Support: Android 2.3 only 7586 // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497) 7587 temp = remaining / animation.duration || 0, 7588 percent = 1 - temp, 7589 index = 0, 7590 length = animation.tweens.length; 7591 7592 for ( ; index < length; index++ ) { 7593 animation.tweens[ index ].run( percent ); 7594 } 7595 7596 deferred.notifyWith( elem, [ animation, percent, remaining ] ); 7597 7598 // If there's more to do, yield 7599 if ( percent < 1 && length ) { 7600 return remaining; 7601 } 7602 7603 // If this was an empty animation, synthesize a final progress notification 7604 if ( !length ) { 7605 deferred.notifyWith( elem, [ animation, 1, 0 ] ); 7606 } 7607 7608 // Resolve the animation and report its conclusion 7609 deferred.resolveWith( elem, [ animation ] ); 7610 return false; 7611 }, 7612 animation = deferred.promise( { 7613 elem: elem, 7614 props: jQuery.extend( {}, properties ), 7615 opts: jQuery.extend( true, { 7616 specialEasing: {}, 7617 easing: jQuery.easing._default 7618 }, options ), 7619 originalProperties: properties, 7620 originalOptions: options, 7621 startTime: fxNow || createFxNow(), 7622 duration: options.duration, 7623 tweens: [], 7624 createTween: function( prop, end ) { 7625 var tween = jQuery.Tween( elem, animation.opts, prop, end, 7626 animation.opts.specialEasing[ prop ] || animation.opts.easing ); 7627 animation.tweens.push( tween ); 7628 return tween; 7629 }, 7630 stop: function( gotoEnd ) { 7631 var index = 0, 7632 7633 // If we are going to the end, we want to run all the tweens 7634 // otherwise we skip this part 7635 length = gotoEnd ? animation.tweens.length : 0; 7636 if ( stopped ) { 7637 return this; 7638 } 7639 stopped = true; 7640 for ( ; index < length; index++ ) { 7641 animation.tweens[ index ].run( 1 ); 7642 } 7643 7644 // Resolve when we played the last frame; otherwise, reject 7645 if ( gotoEnd ) { 7646 deferred.notifyWith( elem, [ animation, 1, 0 ] ); 7647 deferred.resolveWith( elem, [ animation, gotoEnd ] ); 7648 } else { 7649 deferred.rejectWith( elem, [ animation, gotoEnd ] ); 7650 } 7651 return this; 7652 } 7653 } ), 7654 props = animation.props; 7655 7656 propFilter( props, animation.opts.specialEasing ); 7657 7658 for ( ; index < length; index++ ) { 7659 result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); 7660 if ( result ) { 7661 if ( isFunction( result.stop ) ) { 7662 jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = 7663 result.stop.bind( result ); 7664 } 7665 return result; 7666 } 7667 } 7668 7669 jQuery.map( props, createTween, animation ); 7670 7671 if ( isFunction( animation.opts.start ) ) { 7672 animation.opts.start.call( elem, animation ); 7673 } 7674 7675 // Attach callbacks from options 7676 animation 7677 .progress( animation.opts.progress ) 7678 .done( animation.opts.done, animation.opts.complete ) 7679 .fail( animation.opts.fail ) 7680 .always( animation.opts.always ); 7681 7682 jQuery.fx.timer( 7683 jQuery.extend( tick, { 7684 elem: elem, 7685 anim: animation, 7686 queue: animation.opts.queue 7687 } ) 7688 ); 7689 7690 return animation; 7691} 7692 7693jQuery.Animation = jQuery.extend( Animation, { 7694 7695 tweeners: { 7696 "*": [ function( prop, value ) { 7697 var tween = this.createTween( prop, value ); 7698 adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); 7699 return tween; 7700 } ] 7701 }, 7702 7703 tweener: function( props, callback ) { 7704 if ( isFunction( props ) ) { 7705 callback = props; 7706 props = [ "*" ]; 7707 } else { 7708 props = props.match( rnothtmlwhite ); 7709 } 7710 7711 var prop, 7712 index = 0, 7713 length = props.length; 7714 7715 for ( ; index < length; index++ ) { 7716 prop = props[ index ]; 7717 Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; 7718 Animation.tweeners[ prop ].unshift( callback ); 7719 } 7720 }, 7721 7722 prefilters: [ defaultPrefilter ], 7723 7724 prefilter: function( callback, prepend ) { 7725 if ( prepend ) { 7726 Animation.prefilters.unshift( callback ); 7727 } else { 7728 Animation.prefilters.push( callback ); 7729 } 7730 } 7731} ); 7732 7733jQuery.speed = function( speed, easing, fn ) { 7734 var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { 7735 complete: fn || !fn && easing || 7736 isFunction( speed ) && speed, 7737 duration: speed, 7738 easing: fn && easing || easing && !isFunction( easing ) && easing 7739 }; 7740 7741 // Go to the end state if fx are off 7742 if ( jQuery.fx.off ) { 7743 opt.duration = 0; 7744 7745 } else { 7746 if ( typeof opt.duration !== "number" ) { 7747 if ( opt.duration in jQuery.fx.speeds ) { 7748 opt.duration = jQuery.fx.speeds[ opt.duration ]; 7749 7750 } else { 7751 opt.duration = jQuery.fx.speeds._default; 7752 } 7753 } 7754 } 7755 7756 // Normalize opt.queue - true/undefined/null -> "fx" 7757 if ( opt.queue == null || opt.queue === true ) { 7758 opt.queue = "fx"; 7759 } 7760 7761 // Queueing 7762 opt.old = opt.complete; 7763 7764 opt.complete = function() { 7765 if ( isFunction( opt.old ) ) { 7766 opt.old.call( this ); 7767 } 7768 7769 if ( opt.queue ) { 7770 jQuery.dequeue( this, opt.queue ); 7771 } 7772 }; 7773 7774 return opt; 7775}; 7776 7777jQuery.fn.extend( { 7778 fadeTo: function( speed, to, easing, callback ) { 7779 7780 // Show any hidden elements after setting opacity to 0 7781 return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() 7782 7783 // Animate to the value specified 7784 .end().animate( { opacity: to }, speed, easing, callback ); 7785 }, 7786 animate: function( prop, speed, easing, callback ) { 7787 var empty = jQuery.isEmptyObject( prop ), 7788 optall = jQuery.speed( speed, easing, callback ), 7789 doAnimation = function() { 7790 7791 // Operate on a copy of prop so per-property easing won't be lost 7792 var anim = Animation( this, jQuery.extend( {}, prop ), optall ); 7793 7794 // Empty animations, or finishing resolves immediately 7795 if ( empty || dataPriv.get( this, "finish" ) ) { 7796 anim.stop( true ); 7797 } 7798 }; 7799 7800 doAnimation.finish = doAnimation; 7801 7802 return empty || optall.queue === false ? 7803 this.each( doAnimation ) : 7804 this.queue( optall.queue, doAnimation ); 7805 }, 7806 stop: function( type, clearQueue, gotoEnd ) { 7807 var stopQueue = function( hooks ) { 7808 var stop = hooks.stop; 7809 delete hooks.stop; 7810 stop( gotoEnd ); 7811 }; 7812 7813 if ( typeof type !== "string" ) { 7814 gotoEnd = clearQueue; 7815 clearQueue = type; 7816 type = undefined; 7817 } 7818 if ( clearQueue ) { 7819 this.queue( type || "fx", [] ); 7820 } 7821 7822 return this.each( function() { 7823 var dequeue = true, 7824 index = type != null && type + "queueHooks", 7825 timers = jQuery.timers, 7826 data = dataPriv.get( this ); 7827 7828 if ( index ) { 7829 if ( data[ index ] && data[ index ].stop ) { 7830 stopQueue( data[ index ] ); 7831 } 7832 } else { 7833 for ( index in data ) { 7834 if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { 7835 stopQueue( data[ index ] ); 7836 } 7837 } 7838 } 7839 7840 for ( index = timers.length; index--; ) { 7841 if ( timers[ index ].elem === this && 7842 ( type == null || timers[ index ].queue === type ) ) { 7843 7844 timers[ index ].anim.stop( gotoEnd ); 7845 dequeue = false; 7846 timers.splice( index, 1 ); 7847 } 7848 } 7849 7850 // Start the next in the queue if the last step wasn't forced. 7851 // Timers currently will call their complete callbacks, which 7852 // will dequeue but only if they were gotoEnd. 7853 if ( dequeue || !gotoEnd ) { 7854 jQuery.dequeue( this, type ); 7855 } 7856 } ); 7857 }, 7858 finish: function( type ) { 7859 if ( type !== false ) { 7860 type = type || "fx"; 7861 } 7862 return this.each( function() { 7863 var index, 7864 data = dataPriv.get( this ), 7865 queue = data[ type + "queue" ], 7866 hooks = data[ type + "queueHooks" ], 7867 timers = jQuery.timers, 7868 length = queue ? queue.length : 0; 7869 7870 // Enable finishing flag on private data 7871 data.finish = true; 7872 7873 // Empty the queue first 7874 jQuery.queue( this, type, [] ); 7875 7876 if ( hooks && hooks.stop ) { 7877 hooks.stop.call( this, true ); 7878 } 7879 7880 // Look for any active animations, and finish them 7881 for ( index = timers.length; index--; ) { 7882 if ( timers[ index ].elem === this && timers[ index ].queue === type ) { 7883 timers[ index ].anim.stop( true ); 7884 timers.splice( index, 1 ); 7885 } 7886 } 7887 7888 // Look for any animations in the old queue and finish them 7889 for ( index = 0; index < length; index++ ) { 7890 if ( queue[ index ] && queue[ index ].finish ) { 7891 queue[ index ].finish.call( this ); 7892 } 7893 } 7894 7895 // Turn off finishing flag 7896 delete data.finish; 7897 } ); 7898 } 7899} ); 7900 7901jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { 7902 var cssFn = jQuery.fn[ name ]; 7903 jQuery.fn[ name ] = function( speed, easing, callback ) { 7904 return speed == null || typeof speed === "boolean" ? 7905 cssFn.apply( this, arguments ) : 7906 this.animate( genFx( name, true ), speed, easing, callback ); 7907 }; 7908} ); 7909 7910// Generate shortcuts for custom animations 7911jQuery.each( { 7912 slideDown: genFx( "show" ), 7913 slideUp: genFx( "hide" ), 7914 slideToggle: genFx( "toggle" ), 7915 fadeIn: { opacity: "show" }, 7916 fadeOut: { opacity: "hide" }, 7917 fadeToggle: { opacity: "toggle" } 7918}, function( name, props ) { 7919 jQuery.fn[ name ] = function( speed, easing, callback ) { 7920 return this.animate( props, speed, easing, callback ); 7921 }; 7922} ); 7923 7924jQuery.timers = []; 7925jQuery.fx.tick = function() { 7926 var timer, 7927 i = 0, 7928 timers = jQuery.timers; 7929 7930 fxNow = Date.now(); 7931 7932 for ( ; i < timers.length; i++ ) { 7933 timer = timers[ i ]; 7934 7935 // Run the timer and safely remove it when done (allowing for external removal) 7936 if ( !timer() && timers[ i ] === timer ) { 7937 timers.splice( i--, 1 ); 7938 } 7939 } 7940 7941 if ( !timers.length ) { 7942 jQuery.fx.stop(); 7943 } 7944 fxNow = undefined; 7945}; 7946 7947jQuery.fx.timer = function( timer ) { 7948 jQuery.timers.push( timer ); 7949 jQuery.fx.start(); 7950}; 7951 7952jQuery.fx.interval = 13; 7953jQuery.fx.start = function() { 7954 if ( inProgress ) { 7955 return; 7956 } 7957 7958 inProgress = true; 7959 schedule(); 7960}; 7961 7962jQuery.fx.stop = function() { 7963 inProgress = null; 7964}; 7965 7966jQuery.fx.speeds = { 7967 slow: 600, 7968 fast: 200, 7969 7970 // Default speed 7971 _default: 400 7972}; 7973 7974 7975// Based off of the plugin by Clint Helfers, with permission.
vendor: 5,177 bytes, lines 7976-8196
7976jQuery.fn.delay = function( time, type ) { 7977 time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; 7978 type = type || "fx"; 7979 7980 return this.queue( type, function( next, hooks ) { 7981 var timeout = window.setTimeout( next, time ); 7982 hooks.stop = function() { 7983 window.clearTimeout( timeout ); 7984 }; 7985 } ); 7986}; 7987 7988 7989( function() { 7990 var input = document.createElement( "input" ), 7991 select = document.createElement( "select" ), 7992 opt = select.appendChild( document.createElement( "option" ) ); 7993 7994 input.type = "checkbox"; 7995 7996 // Support: Android <=4.3 only 7997 // Default value for a checkbox should be "on" 7998 support.checkOn = input.value !== ""; 7999 8000 // Support: IE <=11 only 8001 // Must access selectedIndex to make default options select 8002 support.optSelected = opt.selected; 8003 8004 // Support: IE <=11 only 8005 // An input loses its value after becoming a radio 8006 input = document.createElement( "input" ); 8007 input.value = "t"; 8008 input.type = "radio"; 8009 support.radioValue = input.value === "t"; 8010} )(); 8011 8012 8013var boolHook, 8014 attrHandle = jQuery.expr.attrHandle; 8015 8016jQuery.fn.extend( { 8017 attr: function( name, value ) { 8018 return access( this, jQuery.attr, name, value, arguments.length > 1 ); 8019 }, 8020 8021 removeAttr: function( name ) { 8022 return this.each( function() { 8023 jQuery.removeAttr( this, name ); 8024 } ); 8025 } 8026} ); 8027 8028jQuery.extend( { 8029 attr: function( elem, name, value ) { 8030 var ret, hooks, 8031 nType = elem.nodeType; 8032 8033 // Don't get/set attributes on text, comment and attribute nodes 8034 if ( nType === 3 || nType === 8 || nType === 2 ) { 8035 return; 8036 } 8037 8038 // Fallback to prop when attributes are not supported 8039 if ( typeof elem.getAttribute === "undefined" ) { 8040 return jQuery.prop( elem, name, value ); 8041 } 8042 8043 // Attribute hooks are determined by the lowercase version 8044 // Grab necessary hook if one is defined 8045 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { 8046 hooks = jQuery.attrHooks[ name.toLowerCase() ] || 8047 ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); 8048 } 8049 8050 if ( value !== undefined ) { 8051 if ( value === null ) { 8052 jQuery.removeAttr( elem, name ); 8053 return; 8054 } 8055 8056 if ( hooks && "set" in hooks && 8057 ( ret = hooks.set( elem, value, name ) ) !== undefined ) { 8058 return ret; 8059 } 8060 8061 elem.setAttribute( name, value + "" ); 8062 return value; 8063 } 8064 8065 if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { 8066 return ret; 8067 } 8068 8069 ret = jQuery.find.attr( elem, name ); 8070 8071 // Non-existent attributes return null, we normalize to undefined 8072 return ret == null ? undefined : ret; 8073 }, 8074 8075 attrHooks: { 8076 type: { 8077 set: function( elem, value ) { 8078 if ( !support.radioValue && value === "radio" && 8079 nodeName( elem, "input" ) ) { 8080 var val = elem.value; 8081 elem.setAttribute( "type", value ); 8082 if ( val ) { 8083 elem.value = val; 8084 } 8085 return value; 8086 } 8087 } 8088 } 8089 }, 8090 8091 removeAttr: function( elem, value ) { 8092 var name, 8093 i = 0, 8094 8095 // Attribute names can contain non-HTML whitespace characters 8096 // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 8097 attrNames = value && value.match( rnothtmlwhite ); 8098 8099 if ( attrNames && elem.nodeType === 1 ) { 8100 while ( ( name = attrNames[ i++ ] ) ) { 8101 elem.removeAttribute( name ); 8102 } 8103 } 8104 } 8105} ); 8106 8107// Hooks for boolean attributes 8108boolHook = { 8109 set: function( elem, value, name ) { 8110 if ( value === false ) { 8111 8112 // Remove boolean attributes when set to false 8113 jQuery.removeAttr( elem, name ); 8114 } else { 8115 elem.setAttribute( name, name ); 8116 } 8117 return name; 8118 } 8119}; 8120 8121jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { 8122 var getter = attrHandle[ name ] || jQuery.find.attr; 8123 8124 attrHandle[ name ] = function( elem, name, isXML ) { 8125 var ret, handle, 8126 lowercaseName = name.toLowerCase(); 8127 8128 if ( !isXML ) { 8129 8130 // Avoid an infinite loop by temporarily removing this function from the getter 8131 handle = attrHandle[ lowercaseName ]; 8132 attrHandle[ lowercaseName ] = ret; 8133 ret = getter( elem, name, isXML ) != null ? 8134 lowercaseName : 8135 null; 8136 attrHandle[ lowercaseName ] = handle; 8137 } 8138 return ret; 8139 }; 8140} ); 8141 8142 8143 8144 8145var rfocusable = /^(?:input|select|textarea|button)$/i, 8146 rclickable = /^(?:a|area)$/i; 8147 8148jQuery.fn.extend( { 8149 prop: function( name, value ) { 8150 return access( this, jQuery.prop, name, value, arguments.length > 1 ); 8151 }, 8152 8153 removeProp: function( name ) { 8154 return this.each( function() { 8155 delete this[ jQuery.propFix[ name ] || name ]; 8156 } ); 8157 } 8158} ); 8159 8160jQuery.extend( { 8161 prop: function( elem, name, value ) { 8162 var ret, hooks, 8163 nType = elem.nodeType; 8164 8165 // Don't get/set properties on text, comment and attribute nodes 8166 if ( nType === 3 || nType === 8 || nType === 2 ) { 8167 return; 8168 } 8169 8170 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { 8171 8172 // Fix name and attach hooks 8173 name = jQuery.propFix[ name ] || name; 8174 hooks = jQuery.propHooks[ name ]; 8175 } 8176 8177 if ( value !== undefined ) { 8178 if ( hooks && "set" in hooks && 8179 ( ret = hooks.set( elem, value, name ) ) !== undefined ) { 8180 return ret; 8181 } 8182 8183 return ( elem[ name ] = value ); 8184 } 8185 8186 if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { 8187 return ret; 8188 } 8189 8190 return elem[ name ]; 8191 }, 8192 8193 propHooks: { 8194 tabIndex: { 8195 get: function( elem ) { 8196
vendor: 6,126 bytes, lines 8197-8456
8197 // Support: IE <=9 - 11 only 8198 // elem.tabIndex doesn't always return the 8199 // correct value when it hasn't been explicitly set 8200 // Use proper attribute retrieval (trac-12072) 8201 var tabindex = jQuery.find.attr( elem, "tabindex" ); 8202 8203 if ( tabindex ) { 8204 return parseInt( tabindex, 10 ); 8205 } 8206 8207 if ( 8208 rfocusable.test( elem.nodeName ) || 8209 rclickable.test( elem.nodeName ) && 8210 elem.href 8211 ) { 8212 return 0; 8213 } 8214 8215 return -1; 8216 } 8217 } 8218 }, 8219 8220 propFix: { 8221 "for": "htmlFor", 8222 "class": "className" 8223 } 8224} ); 8225 8226// Support: IE <=11 only 8227// Accessing the selectedIndex property 8228// forces the browser to respect setting selected 8229// on the option 8230// The getter ensures a default option is selected 8231// when in an optgroup 8232// eslint rule "no-unused-expressions" is disabled for this code 8233// since it considers such accessions noop 8234if ( !support.optSelected ) { 8235 jQuery.propHooks.selected = { 8236 get: function( elem ) { 8237 8238 /* eslint no-unused-expressions: "off" */ 8239 8240 var parent = elem.parentNode; 8241 if ( parent && parent.parentNode ) { 8242 parent.parentNode.selectedIndex; 8243 } 8244 return null; 8245 }, 8246 set: function( elem ) { 8247 8248 /* eslint no-unused-expressions: "off" */ 8249 8250 var parent = elem.parentNode; 8251 if ( parent ) { 8252 parent.selectedIndex; 8253 8254 if ( parent.parentNode ) { 8255 parent.parentNode.selectedIndex; 8256 } 8257 } 8258 } 8259 }; 8260} 8261 8262jQuery.each( [ 8263 "tabIndex", 8264 "readOnly", 8265 "maxLength", 8266 "cellSpacing", 8267 "cellPadding", 8268 "rowSpan", 8269 "colSpan", 8270 "useMap", 8271 "frameBorder", 8272 "contentEditable" 8273], function() { 8274 jQuery.propFix[ this.toLowerCase() ] = this; 8275} ); 8276 8277 8278 8279 8280 // Strip and collapse whitespace according to HTML spec 8281 // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace 8282 function stripAndCollapse( value ) { 8283 var tokens = value.match( rnothtmlwhite ) || []; 8284 return tokens.join( " " ); 8285 } 8286 8287 8288function getClass( elem ) { 8289 return elem.getAttribute && elem.getAttribute( "class" ) || ""; 8290} 8291 8292function classesToArray( value ) { 8293 if ( Array.isArray( value ) ) { 8294 return value; 8295 } 8296 if ( typeof value === "string" ) { 8297 return value.match( rnothtmlwhite ) || []; 8298 } 8299 return []; 8300} 8301 8302jQuery.fn.extend( { 8303 addClass: function( value ) { 8304 var classNames, cur, curValue, className, i, finalValue; 8305 8306 if ( isFunction( value ) ) { 8307 return this.each( function( j ) { 8308 jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); 8309 } ); 8310 } 8311 8312 classNames = classesToArray( value ); 8313 8314 if ( classNames.length ) { 8315 return this.each( function() { 8316 curValue = getClass( this ); 8317 cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); 8318 8319 if ( cur ) { 8320 for ( i = 0; i < classNames.length; i++ ) { 8321 className = classNames[ i ]; 8322 if ( cur.indexOf( " " + className + " " ) < 0 ) { 8323 cur += className + " "; 8324 } 8325 } 8326 8327 // Only assign if different to avoid unneeded rendering. 8328 finalValue = stripAndCollapse( cur ); 8329 if ( curValue !== finalValue ) { 8330 this.setAttribute( "class", finalValue ); 8331 } 8332 } 8333 } ); 8334 } 8335 8336 return this; 8337 }, 8338 8339 removeClass: function( value ) { 8340 var classNames, cur, curValue, className, i, finalValue; 8341 8342 if ( isFunction( value ) ) { 8343 return this.each( function( j ) { 8344 jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); 8345 } ); 8346 } 8347 8348 if ( !arguments.length ) { 8349 return this.attr( "class", "" ); 8350 } 8351 8352 classNames = classesToArray( value ); 8353 8354 if ( classNames.length ) { 8355 return this.each( function() { 8356 curValue = getClass( this ); 8357 8358 // This expression is here for better compressibility (see addClass) 8359 cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); 8360 8361 if ( cur ) { 8362 for ( i = 0; i < classNames.length; i++ ) { 8363 className = classNames[ i ]; 8364 8365 // Remove *all* instances 8366 while ( cur.indexOf( " " + className + " " ) > -1 ) { 8367 cur = cur.replace( " " + className + " ", " " ); 8368 } 8369 } 8370 8371 // Only assign if different to avoid unneeded rendering. 8372 finalValue = stripAndCollapse( cur ); 8373 if ( curValue !== finalValue ) { 8374 this.setAttribute( "class", finalValue ); 8375 } 8376 } 8377 } ); 8378 } 8379 8380 return this; 8381 }, 8382 8383 toggleClass: function( value, stateVal ) { 8384 var classNames, className, i, self, 8385 type = typeof value, 8386 isValidValue = type === "string" || Array.isArray( value ); 8387 8388 if ( isFunction( value ) ) { 8389 return this.each( function( i ) { 8390 jQuery( this ).toggleClass( 8391 value.call( this, i, getClass( this ), stateVal ), 8392 stateVal 8393 ); 8394 } ); 8395 } 8396 8397 if ( typeof stateVal === "boolean" && isValidValue ) { 8398 return stateVal ? this.addClass( value ) : this.removeClass( value ); 8399 } 8400 8401 classNames = classesToArray( value ); 8402 8403 return this.each( function() { 8404 if ( isValidValue ) { 8405 8406 // Toggle individual class names 8407 self = jQuery( this ); 8408 8409 for ( i = 0; i < classNames.length; i++ ) { 8410 className = classNames[ i ]; 8411 8412 // Check each className given, space separated list 8413 if ( self.hasClass( className ) ) { 8414 self.removeClass( className ); 8415 } else { 8416 self.addClass( className ); 8417 } 8418 } 8419 8420 // Toggle whole class name 8421 } else if ( value === undefined || type === "boolean" ) { 8422 className = getClass( this ); 8423 if ( className ) { 8424 8425 // Store className if set 8426 dataPriv.set( this, "__className__", className ); 8427 } 8428 8429 // If the element has a class name or if we're passed `false`, 8430 // then remove the whole classname (if there was one, the above saved it). 8431 // Otherwise bring back whatever was previously saved (if anything), 8432 // falling back to the empty string if nothing was stored. 8433 if ( this.setAttribute ) { 8434 this.setAttribute( "class", 8435 className || value === false ? 8436 "" : 8437 dataPriv.get( this, "__className__" ) || "" 8438 ); 8439 } 8440 } 8441 } ); 8442 }, 8443 8444 hasClass: function( selector ) { 8445 var className, elem, 8446 i = 0; 8447 8448 className = " " + selector + " "; 8449 while ( ( elem = this[ i++ ] ) ) { 8450 if ( elem.nodeType === 1 && 8451 ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { 8452 return true; 8453 } 8454 } 8455 8456 return false;
vendor: 1,385 bytes, lines 8457-8526
8457 } 8458} ); 8459 8460 8461 8462 8463var rreturn = /\r/g; 8464 8465jQuery.fn.extend( { 8466 val: function( value ) { 8467 var hooks, ret, valueIsFunction, 8468 elem = this[ 0 ]; 8469 8470 if ( !arguments.length ) { 8471 if ( elem ) { 8472 hooks = jQuery.valHooks[ elem.type ] || 8473 jQuery.valHooks[ elem.nodeName.toLowerCase() ]; 8474 8475 if ( hooks && 8476 "get" in hooks && 8477 ( ret = hooks.get( elem, "value" ) ) !== undefined 8478 ) { 8479 return ret; 8480 } 8481 8482 ret = elem.value; 8483 8484 // Handle most common string cases 8485 if ( typeof ret === "string" ) { 8486 return ret.replace( rreturn, "" ); 8487 } 8488 8489 // Handle cases where value is null/undef or number 8490 return ret == null ? "" : ret; 8491 } 8492 8493 return; 8494 } 8495 8496 valueIsFunction = isFunction( value ); 8497 8498 return this.each( function( i ) { 8499 var val; 8500 8501 if ( this.nodeType !== 1 ) { 8502 return; 8503 } 8504 8505 if ( valueIsFunction ) { 8506 val = value.call( this, i, jQuery( this ).val() ); 8507 } else { 8508 val = value; 8509 } 8510 8511 // Treat null/undefined as ""; convert numbers to string 8512 if ( val == null ) { 8513 val = ""; 8514 8515 } else if ( typeof val === "number" ) { 8516 val += ""; 8517 8518 } else if ( Array.isArray( val ) ) { 8519 val = jQuery.map( val, function( value ) { 8520 return value == null ? "" : value + ""; 8521 } ); 8522 } 8523 8524 hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; 8525 8526 // If set returns undefined, fall back to normal setting
vendor: 8,269 bytes, lines 8527-8841
8527 if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { 8528 this.value = val; 8529 } 8530 } ); 8531 } 8532} ); 8533 8534jQuery.extend( { 8535 valHooks: { 8536 option: { 8537 get: function( elem ) { 8538 8539 var val = jQuery.find.attr( elem, "value" ); 8540 return val != null ? 8541 val : 8542 8543 // Support: IE <=10 - 11 only 8544 // option.text throws exceptions (trac-14686, trac-14858) 8545 // Strip and collapse whitespace 8546 // https://html.spec.whatwg.org/#strip-and-collapse-whitespace 8547 stripAndCollapse( jQuery.text( elem ) ); 8548 } 8549 }, 8550 select: { 8551 get: function( elem ) { 8552 var value, option, i, 8553 options = elem.options, 8554 index = elem.selectedIndex, 8555 one = elem.type === "select-one", 8556 values = one ? null : [], 8557 max = one ? index + 1 : options.length; 8558 8559 if ( index < 0 ) { 8560 i = max; 8561 8562 } else { 8563 i = one ? index : 0; 8564 } 8565 8566 // Loop through all the selected options 8567 for ( ; i < max; i++ ) { 8568 option = options[ i ]; 8569 8570 // Support: IE <=9 only 8571 // IE8-9 doesn't update selected after form reset (trac-2551) 8572 if ( ( option.selected || i === index ) && 8573 8574 // Don't return options that are disabled or in a disabled optgroup 8575 !option.disabled && 8576 ( !option.parentNode.disabled || 8577 !nodeName( option.parentNode, "optgroup" ) ) ) { 8578 8579 // Get the specific value for the option 8580 value = jQuery( option ).val(); 8581 8582 // We don't need an array for one selects 8583 if ( one ) { 8584 return value; 8585 } 8586 8587 // Multi-Selects return an array 8588 values.push( value ); 8589 } 8590 } 8591 8592 return values; 8593 }, 8594 8595 set: function( elem, value ) { 8596 var optionSet, option, 8597 options = elem.options, 8598 values = jQuery.makeArray( value ), 8599 i = options.length; 8600 8601 while ( i-- ) { 8602 option = options[ i ]; 8603 8604 /* eslint-disable no-cond-assign */ 8605 8606 if ( option.selected = 8607 jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 8608 ) { 8609 optionSet = true; 8610 } 8611 8612 /* eslint-enable no-cond-assign */ 8613 } 8614 8615 // Force browsers to behave consistently when non-matching value is set 8616 if ( !optionSet ) { 8617 elem.selectedIndex = -1; 8618 } 8619 return values; 8620 } 8621 } 8622 } 8623} ); 8624 8625// Radios and checkboxes getter/setter 8626jQuery.each( [ "radio", "checkbox" ], function() { 8627 jQuery.valHooks[ this ] = { 8628 set: function( elem, value ) { 8629 if ( Array.isArray( value ) ) { 8630 return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); 8631 } 8632 } 8633 }; 8634 if ( !support.checkOn ) { 8635 jQuery.valHooks[ this ].get = function( elem ) { 8636 return elem.getAttribute( "value" ) === null ? "on" : elem.value; 8637 }; 8638 } 8639} ); 8640 8641 8642 8643 8644// Return jQuery for attributes-only inclusion 8645 8646 8647support.focusin = "onfocusin" in window; 8648 8649 8650var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, 8651 stopPropagationCallback = function( e ) { 8652 e.stopPropagation(); 8653 }; 8654 8655jQuery.extend( jQuery.event, { 8656 8657 trigger: function( event, data, elem, onlyHandlers ) { 8658 8659 var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, 8660 eventPath = [ elem || document ], 8661 type = hasOwn.call( event, "type" ) ? event.type : event, 8662 namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; 8663 8664 cur = lastElement = tmp = elem = elem || document; 8665 8666 // Don't do events on text and comment nodes 8667 if ( elem.nodeType === 3 || elem.nodeType === 8 ) { 8668 return; 8669 } 8670 8671 // focus/blur morphs to focusin/out; ensure we're not firing them right now 8672 if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { 8673 return; 8674 } 8675 8676 if ( type.indexOf( "." ) > -1 ) { 8677 8678 // Namespaced trigger; create a regexp to match event type in handle() 8679 namespaces = type.split( "." ); 8680 type = namespaces.shift(); 8681 namespaces.sort(); 8682 } 8683 ontype = type.indexOf( ":" ) < 0 && "on" + type; 8684 8685 // Caller can pass in a jQuery.Event object, Object, or just an event type string 8686 event = event[ jQuery.expando ] ? 8687 event : 8688 new jQuery.Event( type, typeof event === "object" && event ); 8689 8690 // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) 8691 event.isTrigger = onlyHandlers ? 2 : 3; 8692 event.namespace = namespaces.join( "." ); 8693 event.rnamespace = event.namespace ? 8694 new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : 8695 null; 8696 8697 // Clean up the event in case it is being reused 8698 event.result = undefined; 8699 if ( !event.target ) { 8700 event.target = elem; 8701 } 8702 8703 // Clone any incoming data and prepend the event, creating the handler arg list 8704 data = data == null ? 8705 [ event ] : 8706 jQuery.makeArray( data, [ event ] ); 8707 8708 // Allow special events to draw outside the lines 8709 special = jQuery.event.special[ type ] || {}; 8710 if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { 8711 return; 8712 } 8713 8714 // Determine event propagation path in advance, per W3C events spec (trac-9951) 8715 // Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724) 8716 if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { 8717 8718 bubbleType = special.delegateType || type; 8719 if ( !rfocusMorph.test( bubbleType + type ) ) { 8720 cur = cur.parentNode; 8721 } 8722 for ( ; cur; cur = cur.parentNode ) { 8723 eventPath.push( cur ); 8724 tmp = cur; 8725 } 8726 8727 // Only add window if we got to document (e.g., not plain obj or detached DOM) 8728 if ( tmp === ( elem.ownerDocument || document ) ) { 8729 eventPath.push( tmp.defaultView || tmp.parentWindow || window ); 8730 } 8731 } 8732 8733 // Fire handlers on the event path 8734 i = 0; 8735 while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { 8736 lastElement = cur; 8737 event.type = i > 1 ? 8738 bubbleType : 8739 special.bindType || type; 8740 8741 // jQuery handler 8742 handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] && 8743 dataPriv.get( cur, "handle" ); 8744 if ( handle ) { 8745 handle.apply( cur, data ); 8746 } 8747 8748 // Native handler 8749 handle = ontype && cur[ ontype ]; 8750 if ( handle && handle.apply && acceptData( cur ) ) { 8751 event.result = handle.apply( cur, data ); 8752 if ( event.result === false ) { 8753 event.preventDefault(); 8754 } 8755 } 8756 } 8757 event.type = type; 8758 8759 // If nobody prevented the default action, do it now 8760 if ( !onlyHandlers && !event.isDefaultPrevented() ) { 8761 8762 if ( ( !special._default || 8763 special._default.apply( eventPath.pop(), data ) === false ) && 8764 acceptData( elem ) ) { 8765 8766 // Call a native DOM method on the target with the same name as the event. 8767 // Don't do default actions on window, that's where global variables be (trac-6170) 8768 if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { 8769 8770 // Don't re-trigger an onFOO event when we call its FOO() method 8771 tmp = elem[ ontype ]; 8772 8773 if ( tmp ) { 8774 elem[ ontype ] = null; 8775 } 8776 8777 // Prevent re-triggering of the same event, since we already bubbled it above 8778 jQuery.event.triggered = type; 8779 8780 if ( event.isPropagationStopped() ) { 8781 lastElement.addEventListener( type, stopPropagationCallback ); 8782 } 8783 8784 elem[ type ](); 8785 8786 if ( event.isPropagationStopped() ) { 8787 lastElement.removeEventListener( type, stopPropagationCallback ); 8788 } 8789 8790 jQuery.event.triggered = undefined; 8791 8792 if ( tmp ) { 8793 elem[ ontype ] = tmp; 8794 } 8795 } 8796 } 8797 } 8798 8799 return event.result; 8800 }, 8801 8802 // Piggyback on a donor event to simulate a different one 8803 // Used only for `focus(in | out)` events 8804 simulate: function( type, elem, event ) { 8805 var e = jQuery.extend( 8806 new jQuery.Event(), 8807 event, 8808 { 8809 type: type, 8810 isSimulated: true 8811 } 8812 ); 8813 8814 jQuery.event.trigger( e, null, elem ); 8815 } 8816 8817} ); 8818 8819jQuery.fn.extend( { 8820 8821 trigger: function( type, data ) { 8822 return this.each( function() { 8823 jQuery.event.trigger( type, data, this ); 8824 } ); 8825 }, 8826 triggerHandler: function( type, data ) { 8827 var elem = this[ 0 ]; 8828 if ( elem ) { 8829 return jQuery.event.trigger( type, data, elem, true ); 8830 } 8831 } 8832} ); 8833 8834 8835// Support: Firefox <=44 8836// Firefox doesn't have focus(in | out) events 8837// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 8838// 8839// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 8840// focus(in | out) events fire after focus & blur events, 8841// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
vendor: 4,255 bytes, lines 8842-9011
8842// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 8843if ( !support.focusin ) { 8844 jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { 8845 8846 // Attach a single capturing handler on the document while someone wants focusin/focusout 8847 var handler = function( event ) { 8848 jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); 8849 }; 8850 8851 jQuery.event.special[ fix ] = { 8852 setup: function() { 8853 8854 // Handle: regular nodes (via `this.ownerDocument`), window 8855 // (via `this.document`) & document (via `this`). 8856 var doc = this.ownerDocument || this.document || this, 8857 attaches = dataPriv.access( doc, fix ); 8858 8859 if ( !attaches ) { 8860 doc.addEventListener( orig, handler, true ); 8861 } 8862 dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); 8863 }, 8864 teardown: function() { 8865 var doc = this.ownerDocument || this.document || this, 8866 attaches = dataPriv.access( doc, fix ) - 1; 8867 8868 if ( !attaches ) { 8869 doc.removeEventListener( orig, handler, true ); 8870 dataPriv.remove( doc, fix ); 8871 8872 } else { 8873 dataPriv.access( doc, fix, attaches ); 8874 } 8875 } 8876 }; 8877 } ); 8878} 8879var location = window.location; 8880 8881var nonce = { guid: Date.now() }; 8882 8883var rquery = ( /\?/ ); 8884 8885 8886 8887// Cross-browser xml parsing 8888jQuery.parseXML = function( data ) { 8889 var xml, parserErrorElem; 8890 if ( !data || typeof data !== "string" ) { 8891 return null; 8892 } 8893 8894 // Support: IE 9 - 11 only 8895 // IE throws on parseFromString with invalid input. 8896 try { 8897 xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); 8898 } catch ( e ) {} 8899 8900 parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ]; 8901 if ( !xml || parserErrorElem ) { 8902 jQuery.error( "Invalid XML: " + ( 8903 parserErrorElem ? 8904 jQuery.map( parserErrorElem.childNodes, function( el ) { 8905 return el.textContent; 8906 } ).join( "\n" ) : 8907 data 8908 ) ); 8909 } 8910 return xml; 8911}; 8912 8913 8914var 8915 rbracket = /\[\]$/, 8916 rCRLF = /\r?\n/g, 8917 rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, 8918 rsubmittable = /^(?:input|select|textarea|keygen)/i; 8919 8920function buildParams( prefix, obj, traditional, add ) { 8921 var name; 8922 8923 if ( Array.isArray( obj ) ) { 8924 8925 // Serialize array item. 8926 jQuery.each( obj, function( i, v ) { 8927 if ( traditional || rbracket.test( prefix ) ) { 8928 8929 // Treat each array item as a scalar. 8930 add( prefix, v ); 8931 8932 } else { 8933 8934 // Item is non-scalar (array or object), encode its numeric index. 8935 buildParams( 8936 prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", 8937 v, 8938 traditional, 8939 add 8940 ); 8941 } 8942 } ); 8943 8944 } else if ( !traditional && toType( obj ) === "object" ) { 8945 8946 // Serialize object item. 8947 for ( name in obj ) { 8948 buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); 8949 } 8950 8951 } else { 8952 8953 // Serialize scalar item. 8954 add( prefix, obj ); 8955 } 8956} 8957 8958// Serialize an array of form elements or a set of 8959// key/values into a query string 8960jQuery.param = function( a, traditional ) { 8961 var prefix, 8962 s = [], 8963 add = function( key, valueOrFunction ) { 8964 8965 // If value is a function, invoke it and use its return value 8966 var value = isFunction( valueOrFunction ) ? 8967 valueOrFunction() : 8968 valueOrFunction; 8969 8970 s[ s.length ] = encodeURIComponent( key ) + "=" + 8971 encodeURIComponent( value == null ? "" : value ); 8972 }; 8973 8974 if ( a == null ) { 8975 return ""; 8976 } 8977 8978 // If an array was passed in, assume that it is an array of form elements. 8979 if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { 8980 8981 // Serialize the form elements 8982 jQuery.each( a, function() { 8983 add( this.name, this.value ); 8984 } ); 8985 8986 } else { 8987 8988 // If traditional, encode the "old" way (the way 1.3.2 or older 8989 // did it), otherwise encode params recursively. 8990 for ( prefix in a ) { 8991 buildParams( prefix, a[ prefix ], traditional, add ); 8992 } 8993 } 8994 8995 // Return the resulting serialization 8996 return s.join( "&" ); 8997}; 8998 8999jQuery.fn.extend( { 9000 serialize: function() { 9001 return jQuery.param( this.serializeArray() ); 9002 }, 9003 serializeArray: function() { 9004 return this.map( function() { 9005 9006 // Can add propHook for "elements" to filter or add form elements 9007 var elements = jQuery.prop( this, "elements" ); 9008 return elements ? jQuery.makeArray( elements ) : this; 9009 } ).filter( function() { 9010 var type = this.type; 9011
vendor: 32,437 bytes, lines 9012-10265
9012 // Use .is( ":disabled" ) so that fieldset[disabled] works 9013 return this.name && !jQuery( this ).is( ":disabled" ) && 9014 rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && 9015 ( this.checked || !rcheckableType.test( type ) ); 9016 } ).map( function( _i, elem ) { 9017 var val = jQuery( this ).val(); 9018 9019 if ( val == null ) { 9020 return null; 9021 } 9022 9023 if ( Array.isArray( val ) ) { 9024 return jQuery.map( val, function( val ) { 9025 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 9026 } ); 9027 } 9028 9029 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 9030 } ).get(); 9031 } 9032} ); 9033 9034 9035var 9036 r20 = /%20/g, 9037 rhash = /#.*$/, 9038 rantiCache = /([?&])_=[^&]*/, 9039 rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, 9040 9041 // trac-7653, trac-8125, trac-8152: local protocol detection 9042 rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, 9043 rnoContent = /^(?:GET|HEAD)$/, 9044 rprotocol = /^\/\//, 9045 9046 /* Prefilters 9047 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) 9048 * 2) These are called: 9049 * - BEFORE asking for a transport 9050 * - AFTER param serialization (s.data is a string if s.processData is true) 9051 * 3) key is the dataType 9052 * 4) the catchall symbol "*" can be used 9053 * 5) execution will start with transport dataType and THEN continue down to "*" if needed 9054 */ 9055 prefilters = {}, 9056 9057 /* Transports bindings 9058 * 1) key is the dataType 9059 * 2) the catchall symbol "*" can be used 9060 * 3) selection will start with transport dataType and THEN go to "*" if needed 9061 */ 9062 transports = {}, 9063 9064 // Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression 9065 allTypes = "*/".concat( "*" ), 9066 9067 // Anchor tag for parsing the document origin 9068 originAnchor = document.createElement( "a" ); 9069 9070originAnchor.href = location.href; 9071 9072// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport 9073function addToPrefiltersOrTransports( structure ) { 9074 9075 // dataTypeExpression is optional and defaults to "*" 9076 return function( dataTypeExpression, func ) { 9077 9078 if ( typeof dataTypeExpression !== "string" ) { 9079 func = dataTypeExpression; 9080 dataTypeExpression = "*"; 9081 } 9082 9083 var dataType, 9084 i = 0, 9085 dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; 9086 9087 if ( isFunction( func ) ) { 9088 9089 // For each dataType in the dataTypeExpression 9090 while ( ( dataType = dataTypes[ i++ ] ) ) { 9091 9092 // Prepend if requested 9093 if ( dataType[ 0 ] === "+" ) { 9094 dataType = dataType.slice( 1 ) || "*"; 9095 ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); 9096 9097 // Otherwise append 9098 } else { 9099 ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); 9100 } 9101 } 9102 } 9103 }; 9104} 9105 9106// Base inspection function for prefilters and transports 9107function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { 9108 9109 var inspected = {}, 9110 seekingTransport = ( structure === transports ); 9111 9112 function inspect( dataType ) { 9113 var selected; 9114 inspected[ dataType ] = true; 9115 jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { 9116 var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); 9117 if ( typeof dataTypeOrTransport === "string" && 9118 !seekingTransport && !inspected[ dataTypeOrTransport ] ) { 9119 9120 options.dataTypes.unshift( dataTypeOrTransport ); 9121 inspect( dataTypeOrTransport ); 9122 return false; 9123 } else if ( seekingTransport ) { 9124 return !( selected = dataTypeOrTransport ); 9125 } 9126 } ); 9127 return selected; 9128 } 9129 9130 return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); 9131} 9132 9133// A special extend for ajax options 9134// that takes "flat" options (not to be deep extended) 9135// Fixes trac-9887 9136function ajaxExtend( target, src ) { 9137 var key, deep, 9138 flatOptions = jQuery.ajaxSettings.flatOptions || {}; 9139 9140 for ( key in src ) { 9141 if ( src[ key ] !== undefined ) { 9142 ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; 9143 } 9144 } 9145 if ( deep ) { 9146 jQuery.extend( true, target, deep ); 9147 } 9148 9149 return target; 9150} 9151 9152/* Handles responses to an ajax request: 9153 * - finds the right dataType (mediates between content-type and expected dataType) 9154 * - returns the corresponding response 9155 */ 9156function ajaxHandleResponses( s, jqXHR, responses ) { 9157 9158 var ct, type, finalDataType, firstDataType, 9159 contents = s.contents, 9160 dataTypes = s.dataTypes; 9161 9162 // Remove auto dataType and get content-type in the process 9163 while ( dataTypes[ 0 ] === "*" ) { 9164 dataTypes.shift(); 9165 if ( ct === undefined ) { 9166 ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); 9167 } 9168 } 9169 9170 // Check if we're dealing with a known content-type 9171 if ( ct ) { 9172 for ( type in contents ) { 9173 if ( contents[ type ] && contents[ type ].test( ct ) ) { 9174 dataTypes.unshift( type ); 9175 break; 9176 } 9177 } 9178 } 9179 9180 // Check to see if we have a response for the expected dataType 9181 if ( dataTypes[ 0 ] in responses ) { 9182 finalDataType = dataTypes[ 0 ]; 9183 } else { 9184 9185 // Try convertible dataTypes 9186 for ( type in responses ) { 9187 if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { 9188 finalDataType = type; 9189 break; 9190 } 9191 if ( !firstDataType ) { 9192 firstDataType = type; 9193 } 9194 } 9195 9196 // Or just use first one 9197 finalDataType = finalDataType || firstDataType; 9198 } 9199 9200 // If we found a dataType 9201 // We add the dataType to the list if needed 9202 // and return the corresponding response 9203 if ( finalDataType ) { 9204 if ( finalDataType !== dataTypes[ 0 ] ) { 9205 dataTypes.unshift( finalDataType ); 9206 } 9207 return responses[ finalDataType ]; 9208 } 9209} 9210 9211/* Chain conversions given the request and the original response 9212 * Also sets the responseXXX fields on the jqXHR instance 9213 */ 9214function ajaxConvert( s, response, jqXHR, isSuccess ) { 9215 var conv2, current, conv, tmp, prev, 9216 converters = {}, 9217 9218 // Work with a copy of dataTypes in case we need to modify it for conversion 9219 dataTypes = s.dataTypes.slice(); 9220 9221 // Create converters map with lowercased keys 9222 if ( dataTypes[ 1 ] ) { 9223 for ( conv in s.converters ) { 9224 converters[ conv.toLowerCase() ] = s.converters[ conv ]; 9225 } 9226 } 9227 9228 current = dataTypes.shift(); 9229 9230 // Convert to each sequential dataType 9231 while ( current ) { 9232 9233 if ( s.responseFields[ current ] ) { 9234 jqXHR[ s.responseFields[ current ] ] = response; 9235 } 9236 9237 // Apply the dataFilter if provided 9238 if ( !prev && isSuccess && s.dataFilter ) { 9239 response = s.dataFilter( response, s.dataType ); 9240 } 9241 9242 prev = current; 9243 current = dataTypes.shift(); 9244 9245 if ( current ) { 9246 9247 // There's only work to do if current dataType is non-auto 9248 if ( current === "*" ) { 9249 9250 current = prev; 9251 9252 // Convert response if prev dataType is non-auto and differs from current 9253 } else if ( prev !== "*" && prev !== current ) { 9254 9255 // Seek a direct converter 9256 conv = converters[ prev + " " + current ] || converters[ "* " + current ]; 9257 9258 // If none found, seek a pair 9259 if ( !conv ) { 9260 for ( conv2 in converters ) { 9261 9262 // If conv2 outputs current 9263 tmp = conv2.split( " " ); 9264 if ( tmp[ 1 ] === current ) { 9265 9266 // If prev can be converted to accepted input 9267 conv = converters[ prev + " " + tmp[ 0 ] ] || 9268 converters[ "* " + tmp[ 0 ] ]; 9269 if ( conv ) { 9270 9271 // Condense equivalence converters 9272 if ( conv === true ) { 9273 conv = converters[ conv2 ]; 9274 9275 // Otherwise, insert the intermediate dataType 9276 } else if ( converters[ conv2 ] !== true ) { 9277 current = tmp[ 0 ]; 9278 dataTypes.unshift( tmp[ 1 ] ); 9279 } 9280 break; 9281 } 9282 } 9283 } 9284 } 9285 9286 // Apply converter (if not an equivalence) 9287 if ( conv !== true ) { 9288 9289 // Unless errors are allowed to bubble, catch and return them 9290 if ( conv && s.throws ) { 9291 response = conv( response ); 9292 } else { 9293 try { 9294 response = conv( response ); 9295 } catch ( e ) { 9296 return { 9297 state: "parsererror", 9298 error: conv ? e : "No conversion from " + prev + " to " + current 9299 }; 9300 } 9301 } 9302 } 9303 } 9304 } 9305 } 9306 9307 return { state: "success", data: response }; 9308} 9309 9310jQuery.extend( { 9311 9312 // Counter for holding the number of active queries 9313 active: 0, 9314 9315 // Last-Modified header cache for next request 9316 lastModified: {}, 9317 etag: {}, 9318 9319 ajaxSettings: { 9320 url: location.href, 9321 type: "GET", 9322 isLocal: rlocalProtocol.test( location.protocol ), 9323 global: true, 9324 processData: true, 9325 async: true, 9326 contentType: "application/x-www-form-urlencoded; charset=UTF-8", 9327 9328 /* 9329 timeout: 0, 9330 data: null, 9331 dataType: null, 9332 username: null, 9333 password: null, 9334 cache: null, 9335 throws: false, 9336 traditional: false, 9337 headers: {}, 9338 */ 9339 9340 accepts: { 9341 "*": allTypes, 9342 text: "text/plain", 9343 html: "text/html", 9344 xml: "application/xml, text/xml", 9345 json: "application/json, text/javascript" 9346 }, 9347 9348 contents: { 9349 xml: /\bxml\b/, 9350 html: /\bhtml/, 9351 json: /\bjson\b/ 9352 }, 9353 9354 responseFields: { 9355 xml: "responseXML", 9356 text: "responseText", 9357 json: "responseJSON" 9358 }, 9359 9360 // Data converters 9361 // Keys separate source (or catchall "*") and destination types with a single space 9362 converters: { 9363 9364 // Convert anything to text 9365 "* text": String, 9366 9367 // Text to html (true = no transformation) 9368 "text html": true, 9369 9370 // Evaluate text as a json expression 9371 "text json": JSON.parse, 9372 9373 // Parse text as xml 9374 "text xml": jQuery.parseXML 9375 }, 9376 9377 // For options that shouldn't be deep extended: 9378 // you can add your own custom options here if 9379 // and when you create one that shouldn't be 9380 // deep extended (see ajaxExtend) 9381 flatOptions: { 9382 url: true, 9383 context: true 9384 } 9385 }, 9386 9387 // Creates a full fledged settings object into target 9388 // with both ajaxSettings and settings fields. 9389 // If target is omitted, writes into ajaxSettings. 9390 ajaxSetup: function( target, settings ) { 9391 return settings ? 9392 9393 // Building a settings object 9394 ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : 9395 9396 // Extending ajaxSettings 9397 ajaxExtend( jQuery.ajaxSettings, target ); 9398 }, 9399 9400 ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), 9401 ajaxTransport: addToPrefiltersOrTransports( transports ), 9402 9403 // Main method 9404 ajax: function( url, options ) { 9405 9406 // If url is an object, simulate pre-1.5 signature 9407 if ( typeof url === "object" ) { 9408 options = url; 9409 url = undefined; 9410 } 9411 9412 // Force options to be an object 9413 options = options || {}; 9414 9415 var transport, 9416 9417 // URL without anti-cache param 9418 cacheURL, 9419 9420 // Response headers 9421 responseHeadersString, 9422 responseHeaders, 9423 9424 // timeout handle 9425 timeoutTimer, 9426 9427 // Url cleanup var 9428 urlAnchor, 9429 9430 // Request state (becomes false upon send and true upon completion) 9431 completed, 9432 9433 // To know if global events are to be dispatched 9434 fireGlobals, 9435 9436 // Loop variable 9437 i, 9438 9439 // uncached part of the url 9440 uncached, 9441 9442 // Create the final options object 9443 s = jQuery.ajaxSetup( {}, options ), 9444 9445 // Callbacks context 9446 callbackContext = s.context || s, 9447 9448 // Context for global events is callbackContext if it is a DOM node or jQuery collection 9449 globalEventContext = s.context && 9450 ( callbackContext.nodeType || callbackContext.jquery ) ? 9451 jQuery( callbackContext ) : 9452 jQuery.event, 9453 9454 // Deferreds 9455 deferred = jQuery.Deferred(), 9456 completeDeferred = jQuery.Callbacks( "once memory" ), 9457 9458 // Status-dependent callbacks 9459 statusCode = s.statusCode || {}, 9460 9461 // Headers (they are sent all at once) 9462 requestHeaders = {}, 9463 requestHeadersNames = {}, 9464 9465 // Default abort message 9466 strAbort = "canceled", 9467 9468 // Fake xhr 9469 jqXHR = { 9470 readyState: 0, 9471 9472 // Builds headers hashtable if needed 9473 getResponseHeader: function( key ) { 9474 var match; 9475 if ( completed ) { 9476 if ( !responseHeaders ) { 9477 responseHeaders = {}; 9478 while ( ( match = rheaders.exec( responseHeadersString ) ) ) { 9479 responseHeaders[ match[ 1 ].toLowerCase() + " " ] = 9480 ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) 9481 .concat( match[ 2 ] ); 9482 } 9483 } 9484 match = responseHeaders[ key.toLowerCase() + " " ]; 9485 } 9486 return match == null ? null : match.join( ", " ); 9487 }, 9488 9489 // Raw string 9490 getAllResponseHeaders: function() { 9491 return completed ? responseHeadersString : null; 9492 }, 9493 9494 // Caches the header 9495 setRequestHeader: function( name, value ) { 9496 if ( completed == null ) { 9497 name = requestHeadersNames[ name.toLowerCase() ] = 9498 requestHeadersNames[ name.toLowerCase() ] || name; 9499 requestHeaders[ name ] = value; 9500 } 9501 return this; 9502 }, 9503 9504 // Overrides response content-type header 9505 overrideMimeType: function( type ) { 9506 if ( completed == null ) { 9507 s.mimeType = type; 9508 } 9509 return this; 9510 }, 9511 9512 // Status-dependent callbacks 9513 statusCode: function( map ) { 9514 var code; 9515 if ( map ) { 9516 if ( completed ) { 9517 9518 // Execute the appropriate callbacks 9519 jqXHR.always( map[ jqXHR.status ] ); 9520 } else { 9521 9522 // Lazy-add the new callbacks in a way that preserves old ones 9523 for ( code in map ) { 9524 statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; 9525 } 9526 } 9527 } 9528 return this; 9529 }, 9530 9531 // Cancel the request 9532 abort: function( statusText ) { 9533 var finalText = statusText || strAbort; 9534 if ( transport ) { 9535 transport.abort( finalText ); 9536 } 9537 done( 0, finalText ); 9538 return this; 9539 } 9540 }; 9541 9542 // Attach deferreds 9543 deferred.promise( jqXHR ); 9544 9545 // Add protocol if not provided (prefilters might expect it) 9546 // Handle falsy url in the settings object (trac-10093: consistency with old signature) 9547 // We also use the url parameter if available 9548 s.url = ( ( url || s.url || location.href ) + "" ) 9549 .replace( rprotocol, location.protocol + "//" ); 9550 9551 // Alias method option to type as per ticket trac-12004 9552 s.type = options.method || options.type || s.method || s.type; 9553 9554 // Extract dataTypes list 9555 s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; 9556 9557 // A cross-domain request is in order when the origin doesn't match the current origin. 9558 if ( s.crossDomain == null ) { 9559 urlAnchor = document.createElement( "a" ); 9560 9561 // Support: IE <=8 - 11, Edge 12 - 15 9562 // IE throws exception on accessing the href property if url is malformed, 9563 // e.g. http://example.com:80x/ 9564 try { 9565 urlAnchor.href = s.url; 9566 9567 // Support: IE <=8 - 11 only 9568 // Anchor's host property isn't correctly set when s.url is relative 9569 urlAnchor.href = urlAnchor.href; 9570 s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== 9571 urlAnchor.protocol + "//" + urlAnchor.host; 9572 } catch ( e ) { 9573 9574 // If there is an error parsing the URL, assume it is crossDomain, 9575 // it can be rejected by the transport if it is invalid 9576 s.crossDomain = true; 9577 } 9578 } 9579 9580 // Convert data if not already a string 9581 if ( s.data && s.processData && typeof s.data !== "string" ) { 9582 s.data = jQuery.param( s.data, s.traditional ); 9583 } 9584 9585 // Apply prefilters 9586 inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); 9587 9588 // If request was aborted inside a prefilter, stop there 9589 if ( completed ) { 9590 return jqXHR; 9591 } 9592 9593 // We can fire global events as of now if asked to 9594 // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118) 9595 fireGlobals = jQuery.event && s.global; 9596 9597 // Watch for a new set of requests 9598 if ( fireGlobals && jQuery.active++ === 0 ) { 9599 jQuery.event.trigger( "ajaxStart" ); 9600 } 9601 9602 // Uppercase the type 9603 s.type = s.type.toUpperCase(); 9604 9605 // Determine if request has content 9606 s.hasContent = !rnoContent.test( s.type ); 9607 9608 // Save the URL in case we're toying with the If-Modified-Since 9609 // and/or If-None-Match header later on 9610 // Remove hash to simplify url manipulation 9611 cacheURL = s.url.replace( rhash, "" ); 9612 9613 // More options handling for requests with no content 9614 if ( !s.hasContent ) { 9615 9616 // Remember the hash so we can put it back 9617 uncached = s.url.slice( cacheURL.length ); 9618 9619 // If data is available and should be processed, append data to url 9620 if ( s.data && ( s.processData || typeof s.data === "string" ) ) { 9621 cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; 9622 9623 // trac-9682: remove data so that it's not used in an eventual retry 9624 delete s.data; 9625 } 9626 9627 // Add or update anti-cache param if needed 9628 if ( s.cache === false ) { 9629 cacheURL = cacheURL.replace( rantiCache, "$1" ); 9630 uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + 9631 uncached; 9632 } 9633 9634 // Put hash and anti-cache on the URL that will be requested (gh-1732) 9635 s.url = cacheURL + uncached; 9636 9637 // Change '%20' to '+' if this is encoded form body content (gh-2658) 9638 } else if ( s.data && s.processData && 9639 ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { 9640 s.data = s.data.replace( r20, "+" ); 9641 } 9642 9643 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 9644 if ( s.ifModified ) { 9645 if ( jQuery.lastModified[ cacheURL ] ) { 9646 jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); 9647 } 9648 if ( jQuery.etag[ cacheURL ] ) { 9649 jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); 9650 } 9651 } 9652 9653 // Set the correct header, if data is being sent 9654 if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { 9655 jqXHR.setRequestHeader( "Content-Type", s.contentType ); 9656 } 9657 9658 // Set the Accepts header for the server, depending on the dataType 9659 jqXHR.setRequestHeader( 9660 "Accept", 9661 s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? 9662 s.accepts[ s.dataTypes[ 0 ] ] + 9663 ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : 9664 s.accepts[ "*" ] 9665 ); 9666 9667 // Check for headers option 9668 for ( i in s.headers ) { 9669 jqXHR.setRequestHeader( i, s.headers[ i ] ); 9670 } 9671 9672 // Allow custom headers/mimetypes and early abort 9673 if ( s.beforeSend && 9674 ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { 9675 9676 // Abort if not done already and return 9677 return jqXHR.abort(); 9678 } 9679 9680 // Aborting is no longer a cancellation 9681 strAbort = "abort"; 9682 9683 // Install callbacks on deferreds 9684 completeDeferred.add( s.complete ); 9685 jqXHR.done( s.success ); 9686 jqXHR.fail( s.error ); 9687 9688 // Get transport 9689 transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); 9690 9691 // If no transport, we auto-abort 9692 if ( !transport ) { 9693 done( -1, "No Transport" ); 9694 } else { 9695 jqXHR.readyState = 1; 9696 9697 // Send global event 9698 if ( fireGlobals ) { 9699 globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); 9700 } 9701 9702 // If request was aborted inside ajaxSend, stop there 9703 if ( completed ) { 9704 return jqXHR; 9705 } 9706 9707 // Timeout 9708 if ( s.async && s.timeout > 0 ) { 9709 timeoutTimer = window.setTimeout( function() { 9710 jqXHR.abort( "timeout" ); 9711 }, s.timeout ); 9712 } 9713 9714 try { 9715 completed = false; 9716 transport.send( requestHeaders, done ); 9717 } catch ( e ) { 9718 9719 // Rethrow post-completion exceptions 9720 if ( completed ) { 9721 throw e; 9722 } 9723 9724 // Propagate others as results 9725 done( -1, e ); 9726 } 9727 } 9728 9729 // Callback for when everything is done 9730 function done( status, nativeStatusText, responses, headers ) { 9731 var isSuccess, success, error, response, modified, 9732 statusText = nativeStatusText; 9733 9734 // Ignore repeat invocations 9735 if ( completed ) { 9736 return; 9737 } 9738 9739 completed = true; 9740 9741 // Clear timeout if it exists 9742 if ( timeoutTimer ) { 9743 window.clearTimeout( timeoutTimer ); 9744 } 9745 9746 // Dereference transport for early garbage collection 9747 // (no matter how long the jqXHR object will be used) 9748 transport = undefined; 9749 9750 // Cache response headers 9751 responseHeadersString = headers || ""; 9752 9753 // Set readyState 9754 jqXHR.readyState = status > 0 ? 4 : 0; 9755 9756 // Determine if successful 9757 isSuccess = status >= 200 && status < 300 || status === 304; 9758 9759 // Get response data 9760 if ( responses ) { 9761 response = ajaxHandleResponses( s, jqXHR, responses ); 9762 } 9763 9764 // Use a noop converter for missing script but not if jsonp 9765 if ( !isSuccess && 9766 jQuery.inArray( "script", s.dataTypes ) > -1 && 9767 jQuery.inArray( "json", s.dataTypes ) < 0 ) { 9768 s.converters[ "text script" ] = function() {}; 9769 } 9770 9771 // Convert no matter what (that way responseXXX fields are always set) 9772 response = ajaxConvert( s, response, jqXHR, isSuccess ); 9773 9774 // If successful, handle type chaining 9775 if ( isSuccess ) { 9776 9777 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 9778 if ( s.ifModified ) { 9779 modified = jqXHR.getResponseHeader( "Last-Modified" ); 9780 if ( modified ) { 9781 jQuery.lastModified[ cacheURL ] = modified; 9782 } 9783 modified = jqXHR.getResponseHeader( "etag" ); 9784 if ( modified ) { 9785 jQuery.etag[ cacheURL ] = modified; 9786 } 9787 } 9788 9789 // if no content 9790 if ( status === 204 || s.type === "HEAD" ) { 9791 statusText = "nocontent"; 9792 9793 // if not modified 9794 } else if ( status === 304 ) { 9795 statusText = "notmodified"; 9796 9797 // If we have data, let's convert it 9798 } else { 9799 statusText = response.state; 9800 success = response.data; 9801 error = response.error; 9802 isSuccess = !error; 9803 } 9804 } else { 9805 9806 // Extract error from statusText and normalize for non-aborts 9807 error = statusText; 9808 if ( status || !statusText ) { 9809 statusText = "error"; 9810 if ( status < 0 ) { 9811 status = 0; 9812 } 9813 } 9814 } 9815 9816 // Set data for the fake xhr object 9817 jqXHR.status = status; 9818 jqXHR.statusText = ( nativeStatusText || statusText ) + ""; 9819 9820 // Success/Error 9821 if ( isSuccess ) { 9822 deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); 9823 } else { 9824 deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); 9825 } 9826 9827 // Status-dependent callbacks 9828 jqXHR.statusCode( statusCode ); 9829 statusCode = undefined; 9830 9831 if ( fireGlobals ) { 9832 globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", 9833 [ jqXHR, s, isSuccess ? success : error ] ); 9834 } 9835 9836 // Complete 9837 completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); 9838 9839 if ( fireGlobals ) { 9840 globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); 9841 9842 // Handle the global AJAX counter 9843 if ( !( --jQuery.active ) ) { 9844 jQuery.event.trigger( "ajaxStop" ); 9845 } 9846 } 9847 } 9848 9849 return jqXHR; 9850 }, 9851 9852 getJSON: function( url, data, callback ) { 9853 return jQuery.get( url, data, callback, "json" ); 9854 }, 9855 9856 getScript: function( url, callback ) { 9857 return jQuery.get( url, undefined, callback, "script" ); 9858 } 9859} ); 9860 9861jQuery.each( [ "get", "post" ], function( _i, method ) { 9862 jQuery[ method ] = function( url, data, callback, type ) { 9863 9864 // Shift arguments if data argument was omitted 9865 if ( isFunction( data ) ) { 9866 type = type || callback; 9867 callback = data; 9868 data = undefined; 9869 } 9870 9871 // The url can be an options object (which then must have .url) 9872 return jQuery.ajax( jQuery.extend( { 9873 url: url, 9874 type: method, 9875 dataType: type, 9876 data: data, 9877 success: callback 9878 }, jQuery.isPlainObject( url ) && url ) ); 9879 }; 9880} ); 9881 9882jQuery.ajaxPrefilter( function( s ) { 9883 var i; 9884 for ( i in s.headers ) { 9885 if ( i.toLowerCase() === "content-type" ) { 9886 s.contentType = s.headers[ i ] || ""; 9887 } 9888 } 9889} ); 9890 9891 9892jQuery._evalUrl = function( url, options, doc ) { 9893 return jQuery.ajax( { 9894 url: url, 9895 9896 // Make this explicit, since user can override this through ajaxSetup (trac-11264) 9897 type: "GET", 9898 dataType: "script", 9899 cache: true, 9900 async: false, 9901 global: false, 9902 9903 // Only evaluate the response if it is successful (gh-4126) 9904 // dataFilter is not invoked for failure responses, so using it instead 9905 // of the default converter is kludgy but it works. 9906 converters: { 9907 "text script": function() {} 9908 }, 9909 dataFilter: function( response ) { 9910 jQuery.globalEval( response, options, doc ); 9911 } 9912 } ); 9913}; 9914 9915 9916jQuery.fn.extend( { 9917 wrapAll: function( html ) { 9918 var wrap; 9919 9920 if ( this[ 0 ] ) { 9921 if ( isFunction( html ) ) { 9922 html = html.call( this[ 0 ] ); 9923 } 9924 9925 // The elements to wrap the target around 9926 wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); 9927 9928 if ( this[ 0 ].parentNode ) { 9929 wrap.insertBefore( this[ 0 ] ); 9930 } 9931 9932 wrap.map( function() { 9933 var elem = this; 9934 9935 while ( elem.firstElementChild ) { 9936 elem = elem.firstElementChild; 9937 } 9938 9939 return elem; 9940 } ).append( this ); 9941 } 9942 9943 return this; 9944 }, 9945 9946 wrapInner: function( html ) { 9947 if ( isFunction( html ) ) { 9948 return this.each( function( i ) { 9949 jQuery( this ).wrapInner( html.call( this, i ) ); 9950 } ); 9951 } 9952 9953 return this.each( function() { 9954 var self = jQuery( this ), 9955 contents = self.contents(); 9956 9957 if ( contents.length ) { 9958 contents.wrapAll( html ); 9959 9960 } else { 9961 self.append( html ); 9962 } 9963 } ); 9964 }, 9965 9966 wrap: function( html ) { 9967 var htmlIsFunction = isFunction( html ); 9968 9969 return this.each( function( i ) { 9970 jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); 9971 } ); 9972 }, 9973 9974 unwrap: function( selector ) { 9975 this.parent( selector ).not( "body" ).each( function() { 9976 jQuery( this ).replaceWith( this.childNodes ); 9977 } ); 9978 return this; 9979 } 9980} ); 9981 9982 9983jQuery.expr.pseudos.hidden = function( elem ) { 9984 return !jQuery.expr.pseudos.visible( elem ); 9985}; 9986jQuery.expr.pseudos.visible = function( elem ) { 9987 return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); 9988}; 9989 9990 9991 9992 9993jQuery.ajaxSettings.xhr = function() { 9994 try { 9995 return new window.XMLHttpRequest(); 9996 } catch ( e ) {} 9997}; 9998 9999var xhrSuccessStatus = { 10000 10001 // File protocol always yields status code 0, assume 200 10002 0: 200, 10003 10004 // Support: IE <=9 only 10005 // trac-1450: sometimes IE returns 1223 when it should be 204 10006 1223: 204 10007 }, 10008 xhrSupported = jQuery.ajaxSettings.xhr(); 10009 10010support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); 10011support.ajax = xhrSupported = !!xhrSupported; 10012 10013jQuery.ajaxTransport( function( options ) { 10014 var callback, errorCallback; 10015 10016 // Cross domain only allowed if supported through XMLHttpRequest 10017 if ( support.cors || xhrSupported && !options.crossDomain ) { 10018 return { 10019 send: function( headers, complete ) { 10020 var i, 10021 xhr = options.xhr(); 10022 10023 xhr.open( 10024 options.type, 10025 options.url, 10026 options.async, 10027 options.username, 10028 options.password 10029 ); 10030 10031 // Apply custom fields if provided 10032 if ( options.xhrFields ) { 10033 for ( i in options.xhrFields ) { 10034 xhr[ i ] = options.xhrFields[ i ]; 10035 } 10036 } 10037 10038 // Override mime type if needed 10039 if ( options.mimeType && xhr.overrideMimeType ) { 10040 xhr.overrideMimeType( options.mimeType ); 10041 } 10042 10043 // X-Requested-With header 10044 // For cross-domain requests, seeing as conditions for a preflight are 10045 // akin to a jigsaw puzzle, we simply never set it to be sure. 10046 // (it can always be set on a per-request basis or even using ajaxSetup) 10047 // For same-domain requests, won't change header if already provided. 10048 if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { 10049 headers[ "X-Requested-With" ] = "XMLHttpRequest"; 10050 } 10051 10052 // Set headers 10053 for ( i in headers ) { 10054 xhr.setRequestHeader( i, headers[ i ] ); 10055 } 10056 10057 // Callback 10058 callback = function( type ) { 10059 return function() { 10060 if ( callback ) { 10061 callback = errorCallback = xhr.onload = 10062 xhr.onerror = xhr.onabort = xhr.ontimeout = 10063 xhr.onreadystatechange = null; 10064 10065 if ( type === "abort" ) { 10066 xhr.abort(); 10067 } else if ( type === "error" ) { 10068 10069 // Support: IE <=9 only 10070 // On a manual native abort, IE9 throws 10071 // errors on any property access that is not readyState 10072 if ( typeof xhr.status !== "number" ) { 10073 complete( 0, "error" ); 10074 } else { 10075 complete( 10076 10077 // File: protocol always yields status 0; see trac-8605, trac-14207 10078 xhr.status, 10079 xhr.statusText 10080 ); 10081 } 10082 } else { 10083 complete( 10084 xhrSuccessStatus[ xhr.status ] || xhr.status, 10085 xhr.statusText, 10086 10087 // Support: IE <=9 only 10088 // IE9 has no XHR2 but throws on binary (trac-11426) 10089 // For XHR2 non-text, let the caller handle it (gh-2498) 10090 ( xhr.responseType || "text" ) !== "text" || 10091 typeof xhr.responseText !== "string" ? 10092 { binary: xhr.response } : 10093 { text: xhr.responseText }, 10094 xhr.getAllResponseHeaders() 10095 ); 10096 } 10097 } 10098 }; 10099 }; 10100 10101 // Listen to events 10102 xhr.onload = callback(); 10103 errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); 10104 10105 // Support: IE 9 only 10106 // Use onreadystatechange to replace onabort 10107 // to handle uncaught aborts 10108 if ( xhr.onabort !== undefined ) { 10109 xhr.onabort = errorCallback; 10110 } else { 10111 xhr.onreadystatechange = function() { 10112 10113 // Check readyState before timeout as it changes 10114 if ( xhr.readyState === 4 ) { 10115 10116 // Allow onerror to be called first, 10117 // but that will not handle a native abort 10118 // Also, save errorCallback to a variable 10119 // as xhr.onerror cannot be accessed 10120 window.setTimeout( function() { 10121 if ( callback ) { 10122 errorCallback(); 10123 } 10124 } ); 10125 } 10126 }; 10127 } 10128 10129 // Create the abort callback 10130 callback = callback( "abort" ); 10131 10132 try { 10133 10134 // Do send the request (this may raise an exception) 10135 xhr.send( options.hasContent && options.data || null ); 10136 } catch ( e ) { 10137 10138 // trac-14683: Only rethrow if this hasn't been notified as an error yet 10139 if ( callback ) { 10140 throw e; 10141 } 10142 } 10143 }, 10144 10145 abort: function() { 10146 if ( callback ) { 10147 callback(); 10148 } 10149 } 10150 }; 10151 } 10152} ); 10153 10154 10155 10156 10157// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) 10158jQuery.ajaxPrefilter( function( s ) { 10159 if ( s.crossDomain ) { 10160 s.contents.script = false; 10161 } 10162} ); 10163 10164// Install script dataType 10165jQuery.ajaxSetup( { 10166 accepts: { 10167 script: "text/javascript, application/javascript, " + 10168 "application/ecmascript, application/x-ecmascript" 10169 }, 10170 contents: { 10171 script: /\b(?:java|ecma)script\b/ 10172 }, 10173 converters: { 10174 "text script": function( text ) { 10175 jQuery.globalEval( text ); 10176 return text; 10177 } 10178 } 10179} ); 10180 10181// Handle cache's special case and crossDomain 10182jQuery.ajaxPrefilter( "script", function( s ) { 10183 if ( s.cache === undefined ) { 10184 s.cache = false; 10185 } 10186 if ( s.crossDomain ) { 10187 s.type = "GET"; 10188 } 10189} ); 10190 10191// Bind script tag hack transport 10192jQuery.ajaxTransport( "script", function( s ) { 10193 10194 // This transport only deals with cross domain or forced-by-attrs requests 10195 if ( s.crossDomain || s.scriptAttrs ) { 10196 var script, callback; 10197 return { 10198 send: function( _, complete ) { 10199 script = jQuery( "<script>" ) 10200 .attr( s.scriptAttrs || {} ) 10201 .prop( { charset: s.scriptCharset, src: s.url } ) 10202 .on( "load error", callback = function( evt ) { 10203 script.remove(); 10204 callback = null; 10205 if ( evt ) { 10206 complete( evt.type === "error" ? 404 : 200, evt.type ); 10207 } 10208 } ); 10209 10210 // Use native DOM manipulation to avoid our domManip AJAX trickery 10211 document.head.appendChild( script[ 0 ] ); 10212 }, 10213 abort: function() { 10214 if ( callback ) { 10215 callback(); 10216 } 10217 } 10218 }; 10219 } 10220} ); 10221 10222 10223 10224 10225var oldCallbacks = [], 10226 rjsonp = /(=)\?(?=&|$)|\?\?/; 10227 10228// Default jsonp settings 10229jQuery.ajaxSetup( { 10230 jsonp: "callback", 10231 jsonpCallback: function() { 10232 var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) ); 10233 this[ callback ] = true; 10234 return callback; 10235 } 10236} ); 10237 10238// Detect, normalize options and install callbacks for jsonp requests 10239jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { 10240 10241 var callbackName, overwritten, responseContainer, 10242 jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? 10243 "url" : 10244 typeof s.data === "string" && 10245 ( s.contentType || "" ) 10246 .indexOf( "application/x-www-form-urlencoded" ) === 0 && 10247 rjsonp.test( s.data ) && "data" 10248 ); 10249 10250 // Handle iff the expected data type is "jsonp" or we have a parameter to set 10251 if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { 10252 10253 // Get callback name, remembering preexisting value associated with it 10254 callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ? 10255 s.jsonpCallback() : 10256 s.jsonpCallback; 10257 10258 // Insert callback into url or form data 10259 if ( jsonProp ) { 10260 s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); 10261 } else if ( s.jsonp !== false ) { 10262 s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; 10263 } 10264 10265 // Use data converter to retrieve json after script execution
vendor: 8,362 bytes, lines 10266-10577
10266 s.converters[ "script json" ] = function() { 10267 if ( !responseContainer ) { 10268 jQuery.error( callbackName + " was not called" ); 10269 } 10270 return responseContainer[ 0 ]; 10271 }; 10272 10273 // Force json dataType 10274 s.dataTypes[ 0 ] = "json"; 10275 10276 // Install callback 10277 overwritten = window[ callbackName ]; 10278 window[ callbackName ] = function() { 10279 responseContainer = arguments; 10280 }; 10281 10282 // Clean-up function (fires after converters) 10283 jqXHR.always( function() { 10284 10285 // If previous value didn't exist - remove it 10286 if ( overwritten === undefined ) { 10287 jQuery( window ).removeProp( callbackName ); 10288 10289 // Otherwise restore preexisting value 10290 } else { 10291 window[ callbackName ] = overwritten; 10292 } 10293 10294 // Save back as free 10295 if ( s[ callbackName ] ) { 10296 10297 // Make sure that re-using the options doesn't screw things around 10298 s.jsonpCallback = originalSettings.jsonpCallback; 10299 10300 // Save the callback name for future use 10301 oldCallbacks.push( callbackName ); 10302 } 10303 10304 // Call if it was a function and we have a response 10305 if ( responseContainer && isFunction( overwritten ) ) { 10306 overwritten( responseContainer[ 0 ] ); 10307 } 10308 10309 responseContainer = overwritten = undefined; 10310 } ); 10311 10312 // Delegate to script 10313 return "script"; 10314 } 10315} ); 10316 10317 10318 10319 10320// Support: Safari 8 only 10321// In Safari 8 documents created via document.implementation.createHTMLDocument 10322// collapse sibling forms: the second one becomes a child of the first one. 10323// Because of that, this security measure has to be disabled in Safari 8. 10324// https://bugs.webkit.org/show_bug.cgi?id=137337 10325support.createHTMLDocument = ( function() { 10326 var body = document.implementation.createHTMLDocument( "" ).body; 10327 body.innerHTML = "<form></form><form></form>"; 10328 return body.childNodes.length === 2; 10329} )(); 10330 10331 10332// Argument "data" should be string of html 10333// context (optional): If specified, the fragment will be created in this context, 10334// defaults to document 10335// keepScripts (optional): If true, will include scripts passed in the html string 10336jQuery.parseHTML = function( data, context, keepScripts ) { 10337 if ( typeof data !== "string" ) { 10338 return []; 10339 } 10340 if ( typeof context === "boolean" ) { 10341 keepScripts = context; 10342 context = false; 10343 } 10344 10345 var base, parsed, scripts; 10346 10347 if ( !context ) { 10348 10349 // Stop scripts or inline event handlers from being executed immediately 10350 // by using document.implementation 10351 if ( support.createHTMLDocument ) { 10352 context = document.implementation.createHTMLDocument( "" ); 10353 10354 // Set the base href for the created document 10355 // so any parsed elements with URLs 10356 // are based on the document's URL (gh-2965) 10357 base = context.createElement( "base" ); 10358 base.href = document.location.href; 10359 context.head.appendChild( base ); 10360 } else { 10361 context = document; 10362 } 10363 } 10364 10365 parsed = rsingleTag.exec( data ); 10366 scripts = !keepScripts && []; 10367 10368 // Single tag 10369 if ( parsed ) { 10370 return [ context.createElement( parsed[ 1 ] ) ]; 10371 } 10372 10373 parsed = buildFragment( [ data ], context, scripts ); 10374 10375 if ( scripts && scripts.length ) { 10376 jQuery( scripts ).remove(); 10377 } 10378 10379 return jQuery.merge( [], parsed.childNodes ); 10380}; 10381 10382 10383/** 10384 * Load a url into a page 10385 */ 10386jQuery.fn.load = function( url, params, callback ) { 10387 var selector, type, response, 10388 self = this, 10389 off = url.indexOf( " " ); 10390 10391 if ( off > -1 ) { 10392 selector = stripAndCollapse( url.slice( off ) ); 10393 url = url.slice( 0, off ); 10394 } 10395 10396 // If it's a function 10397 if ( isFunction( params ) ) { 10398 10399 // We assume that it's the callback 10400 callback = params; 10401 params = undefined; 10402 10403 // Otherwise, build a param string 10404 } else if ( params && typeof params === "object" ) { 10405 type = "POST"; 10406 } 10407 10408 // If we have elements to modify, make the request 10409 if ( self.length > 0 ) { 10410 jQuery.ajax( { 10411 url: url, 10412 10413 // If "type" variable is undefined, then "GET" method will be used. 10414 // Make value of this field explicit since 10415 // user can override it through ajaxSetup method 10416 type: type || "GET", 10417 dataType: "html", 10418 data: params 10419 } ).done( function( responseText ) { 10420 10421 // Save response for use in complete callback 10422 response = arguments; 10423 10424 self.html( selector ? 10425 10426 // If a selector was specified, locate the right elements in a dummy div 10427 // Exclude scripts to avoid IE 'Permission Denied' errors 10428 jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) : 10429 10430 // Otherwise use the full result 10431 responseText ); 10432 10433 // If the request succeeds, this function gets "data", "status", "jqXHR" 10434 // but they are ignored because response was set above. 10435 // If it fails, this function gets "jqXHR", "status", "error" 10436 } ).always( callback && function( jqXHR, status ) { 10437 self.each( function() { 10438 callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] ); 10439 } ); 10440 } ); 10441 } 10442 10443 return this; 10444}; 10445 10446 10447 10448 10449jQuery.expr.pseudos.animated = function( elem ) { 10450 return jQuery.grep( jQuery.timers, function( fn ) { 10451 return elem === fn.elem; 10452 } ).length; 10453}; 10454 10455 10456 10457 10458jQuery.offset = { 10459 setOffset: function( elem, options, i ) { 10460 var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, 10461 position = jQuery.css( elem, "position" ), 10462 curElem = jQuery( elem ), 10463 props = {}; 10464 10465 // Set position first, in-case top/left are set even on static elem 10466 if ( position === "static" ) { 10467 elem.style.position = "relative"; 10468 } 10469 10470 curOffset = curElem.offset(); 10471 curCSSTop = jQuery.css( elem, "top" ); 10472 curCSSLeft = jQuery.css( elem, "left" ); 10473 calculatePosition = ( position === "absolute" || position === "fixed" ) && 10474 ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1; 10475 10476 // Need to be able to calculate position if either 10477 // top or left is auto and position is either absolute or fixed 10478 if ( calculatePosition ) { 10479 curPosition = curElem.position(); 10480 curTop = curPosition.top; 10481 curLeft = curPosition.left; 10482 10483 } else { 10484 curTop = parseFloat( curCSSTop ) || 0; 10485 curLeft = parseFloat( curCSSLeft ) || 0; 10486 } 10487 10488 if ( isFunction( options ) ) { 10489 10490 // Use jQuery.extend here to allow modification of coordinates argument (gh-1848) 10491 options = options.call( elem, i, jQuery.extend( {}, curOffset ) ); 10492 } 10493 10494 if ( options.top != null ) { 10495 props.top = ( options.top - curOffset.top ) + curTop; 10496 } 10497 if ( options.left != null ) { 10498 props.left = ( options.left - curOffset.left ) + curLeft; 10499 } 10500 10501 if ( "using" in options ) { 10502 options.using.call( elem, props ); 10503 10504 } else { 10505 curElem.css( props ); 10506 } 10507 } 10508}; 10509 10510jQuery.fn.extend( { 10511 10512 // offset() relates an element's border box to the document origin 10513 offset: function( options ) { 10514 10515 // Preserve chaining for setter 10516 if ( arguments.length ) { 10517 return options === undefined ? 10518 this : 10519 this.each( function( i ) { 10520 jQuery.offset.setOffset( this, options, i ); 10521 } ); 10522 } 10523 10524 var rect, win, 10525 elem = this[ 0 ]; 10526 10527 if ( !elem ) { 10528 return; 10529 } 10530 10531 // Return zeros for disconnected and hidden (display: none) elements (gh-2310) 10532 // Support: IE <=11 only 10533 // Running getBoundingClientRect on a 10534 // disconnected node in IE throws an error 10535 if ( !elem.getClientRects().length ) { 10536 return { top: 0, left: 0 }; 10537 } 10538 10539 // Get document-relative position by adding viewport scroll to viewport-relative gBCR 10540 rect = elem.getBoundingClientRect(); 10541 win = elem.ownerDocument.defaultView; 10542 return { 10543 top: rect.top + win.pageYOffset, 10544 left: rect.left + win.pageXOffset 10545 }; 10546 }, 10547 10548 // position() relates an element's margin box to its offset parent's padding box 10549 // This corresponds to the behavior of CSS absolute positioning 10550 position: function() { 10551 if ( !this[ 0 ] ) { 10552 return; 10553 } 10554 10555 var offsetParent, offset, doc, 10556 elem = this[ 0 ], 10557 parentOffset = { top: 0, left: 0 }; 10558 10559 // position:fixed elements are offset from the viewport, which itself always has zero offset 10560 if ( jQuery.css( elem, "position" ) === "fixed" ) { 10561 10562 // Assume position:fixed implies availability of getBoundingClientRect 10563 offset = elem.getBoundingClientRect(); 10564 10565 } else { 10566 offset = this.offset(); 10567 10568 // Account for the *real* offset parent, which can be the document or its root element 10569 // when a statically positioned element is identified 10570 doc = elem.ownerDocument; 10571 offsetParent = elem.offsetParent || doc.documentElement; 10572 while ( offsetParent && 10573 ( offsetParent === doc.body || offsetParent === doc.documentElement ) && 10574 jQuery.css( offsetParent, "position" ) === "static" ) { 10575 10576 offsetParent = offsetParent.parentNode; 10577 }
vendor: 9,494 bytes, lines 10578-10909
10578 if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) { 10579 10580 // Incorporate borders into its offset, since they are outside its content origin 10581 parentOffset = jQuery( offsetParent ).offset(); 10582 parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true ); 10583 parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true ); 10584 } 10585 } 10586 10587 // Subtract parent offsets and element margins 10588 return { 10589 top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), 10590 left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true ) 10591 }; 10592 }, 10593 10594 // This method will return documentElement in the following cases: 10595 // 1) For the element inside the iframe without offsetParent, this method will return 10596 // documentElement of the parent window 10597 // 2) For the hidden or detached element 10598 // 3) For body or html element, i.e. in case of the html node - it will return itself 10599 // 10600 // but those exceptions were never presented as a real life use-cases 10601 // and might be considered as more preferable results. 10602 // 10603 // This logic, however, is not guaranteed and can change at any point in the future 10604 offsetParent: function() { 10605 return this.map( function() { 10606 var offsetParent = this.offsetParent; 10607 10608 while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) { 10609 offsetParent = offsetParent.offsetParent; 10610 } 10611 10612 return offsetParent || documentElement; 10613 } ); 10614 } 10615} ); 10616 10617// Create scrollLeft and scrollTop methods 10618jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) { 10619 var top = "pageYOffset" === prop; 10620 10621 jQuery.fn[ method ] = function( val ) { 10622 return access( this, function( elem, method, val ) { 10623 10624 // Coalesce documents and windows 10625 var win; 10626 if ( isWindow( elem ) ) { 10627 win = elem; 10628 } else if ( elem.nodeType === 9 ) { 10629 win = elem.defaultView; 10630 } 10631 10632 if ( val === undefined ) { 10633 return win ? win[ prop ] : elem[ method ]; 10634 } 10635 10636 if ( win ) { 10637 win.scrollTo( 10638 !top ? val : win.pageXOffset, 10639 top ? val : win.pageYOffset 10640 ); 10641 10642 } else { 10643 elem[ method ] = val; 10644 } 10645 }, method, val, arguments.length ); 10646 }; 10647} ); 10648 10649// Support: Safari <=7 - 9.1, Chrome <=37 - 49 10650// Add the top/left cssHooks using jQuery.fn.position 10651// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 10652// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347 10653// getComputedStyle returns percent when specified for top/left/bottom/right; 10654// rather than make the css module depend on the offset module, just check for it here 10655jQuery.each( [ "top", "left" ], function( _i, prop ) { 10656 jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition, 10657 function( elem, computed ) { 10658 if ( computed ) { 10659 computed = curCSS( elem, prop ); 10660 10661 // If curCSS returns percentage, fallback to offset 10662 return rnumnonpx.test( computed ) ? 10663 jQuery( elem ).position()[ prop ] + "px" : 10664 computed; 10665 } 10666 } 10667 ); 10668} ); 10669 10670 10671// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods 10672jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { 10673 jQuery.each( { 10674 padding: "inner" + name, 10675 content: type, 10676 "": "outer" + name 10677 }, function( defaultExtra, funcName ) { 10678 10679 // Margin is only for outerHeight, outerWidth 10680 jQuery.fn[ funcName ] = function( margin, value ) { 10681 var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), 10682 extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); 10683 10684 return access( this, function( elem, type, value ) { 10685 var doc; 10686 10687 if ( isWindow( elem ) ) { 10688 10689 // $( window ).outerWidth/Height return w/h including scrollbars (gh-1729) 10690 return funcName.indexOf( "outer" ) === 0 ? 10691 elem[ "inner" + name ] : 10692 elem.document.documentElement[ "client" + name ]; 10693 } 10694 10695 // Get document width or height 10696 if ( elem.nodeType === 9 ) { 10697 doc = elem.documentElement; 10698 10699 // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], 10700 // whichever is greatest 10701 return Math.max( 10702 elem.body[ "scroll" + name ], doc[ "scroll" + name ], 10703 elem.body[ "offset" + name ], doc[ "offset" + name ], 10704 doc[ "client" + name ] 10705 ); 10706 } 10707 10708 return value === undefined ? 10709 10710 // Get width or height on the element, requesting but not forcing parseFloat 10711 jQuery.css( elem, type, extra ) : 10712 10713 // Set width or height on the element 10714 jQuery.style( elem, type, value, extra ); 10715 }, type, chainable ? margin : undefined, chainable ); 10716 }; 10717 } ); 10718} ); 10719 10720 10721jQuery.each( [ 10722 "ajaxStart", 10723 "ajaxStop", 10724 "ajaxComplete", 10725 "ajaxError", 10726 "ajaxSuccess", 10727 "ajaxSend" 10728], function( _i, type ) { 10729 jQuery.fn[ type ] = function( fn ) { 10730 return this.on( type, fn ); 10731 }; 10732} ); 10733 10734 10735 10736 10737jQuery.fn.extend( { 10738 10739 bind: function( types, data, fn ) { 10740 return this.on( types, null, data, fn ); 10741 }, 10742 unbind: function( types, fn ) { 10743 return this.off( types, null, fn ); 10744 }, 10745 10746 delegate: function( selector, types, data, fn ) { 10747 return this.on( types, selector, data, fn ); 10748 }, 10749 undelegate: function( selector, types, fn ) { 10750 10751 // ( namespace ) or ( selector, types [, fn] ) 10752 return arguments.length === 1 ? 10753 this.off( selector, "**" ) : 10754 this.off( types, selector || "**", fn ); 10755 }, 10756 10757 hover: function( fnOver, fnOut ) { 10758 return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); 10759 } 10760} ); 10761 10762jQuery.each( 10763 ( "blur focus focusin focusout resize scroll click dblclick " + 10764 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 10765 "change select submit keydown keypress keyup contextmenu" ).split( " " ), 10766 function( _i, name ) { 10767 10768 // Handle event binding 10769 jQuery.fn[ name ] = function( data, fn ) { 10770 return arguments.length > 0 ? 10771 this.on( name, null, data, fn ) : 10772 this.trigger( name ); 10773 }; 10774 } 10775); 10776 10777 10778 10779 10780// Support: Android <=4.0 only 10781// Make sure we trim BOM and NBSP 10782// Require that the "whitespace run" starts from a non-whitespace 10783// to avoid O(N^2) behavior when the engine would try matching "\s+$" at each space position. 10784var rtrim = /^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g; 10785 10786// Bind a function to a context, optionally partially applying any 10787// arguments. 10788// jQuery.proxy is deprecated to promote standards (specifically Function#bind) 10789// However, it is not slated for removal any time soon 10790jQuery.proxy = function( fn, context ) { 10791 var tmp, args, proxy; 10792 10793 if ( typeof context === "string" ) { 10794 tmp = fn[ context ]; 10795 context = fn; 10796 fn = tmp; 10797 } 10798 10799 // Quick check to determine if target is callable, in the spec 10800 // this throws a TypeError, but we will just return undefined. 10801 if ( !isFunction( fn ) ) { 10802 return undefined; 10803 } 10804 10805 // Simulated bind 10806 args = slice.call( arguments, 2 ); 10807 proxy = function() { 10808 return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); 10809 }; 10810 10811 // Set the guid of unique handler to the same of original handler, so it can be removed 10812 proxy.guid = fn.guid = fn.guid || jQuery.guid++; 10813 10814 return proxy; 10815}; 10816 10817jQuery.holdReady = function( hold ) { 10818 if ( hold ) { 10819 jQuery.readyWait++; 10820 } else { 10821 jQuery.ready( true ); 10822 } 10823}; 10824jQuery.isArray = Array.isArray; 10825jQuery.parseJSON = JSON.parse; 10826jQuery.nodeName = nodeName; 10827jQuery.isFunction = isFunction; 10828jQuery.isWindow = isWindow; 10829jQuery.camelCase = camelCase; 10830jQuery.type = toType; 10831 10832jQuery.now = Date.now; 10833 10834jQuery.isNumeric = function( obj ) { 10835 10836 // As of jQuery 3.0, isNumeric is limited to 10837 // strings and numbers (primitives or objects) 10838 // that can be coerced to finite numbers (gh-2662) 10839 var type = jQuery.type( obj ); 10840 return ( type === "number" || type === "string" ) && 10841 10842 // parseFloat NaNs numeric-cast false positives ("") 10843 // ...but misinterprets leading-number strings, particularly hex literals ("0x...") 10844 // subtraction forces infinities to NaN 10845 !isNaN( obj - parseFloat( obj ) ); 10846}; 10847 10848jQuery.trim = function( text ) { 10849 return text == null ? 10850 "" : 10851 ( text + "" ).replace( rtrim, "$1" ); 10852}; 10853 10854 10855 10856// Register as a named AMD module, since jQuery can be concatenated with other 10857// files that may use define, but not via a proper concatenation script that 10858// understands anonymous AMD modules. A named AMD is safest and most robust 10859// way to register. Lowercase jquery is used because AMD module names are 10860// derived from file names, and jQuery is normally delivered in a lowercase 10861// file name. Do this after creating the global so that if an AMD module wants 10862// to call noConflict to hide this version of jQuery, it will work. 10863 10864// Note that for maximum portability, libraries that are not jQuery should 10865// declare themselves as anonymous modules, and avoid setting a global if an 10866// AMD loader is present. jQuery is a special case. For more information, see 10867// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon 10868 10869if ( typeof define === "function" && define.amd ) { 10870 define( "jquery", [], function() { 10871 return jQuery; 10872 } ); 10873} 10874 10875 10876 10877 10878var 10879 10880 // Map over jQuery in case of overwrite 10881 _jQuery = window.jQuery, 10882 10883 // Map over the $ in case of overwrite 10884 _$ = window.$; 10885 10886jQuery.noConflict = function( deep ) { 10887 if ( window.$ === jQuery ) { 10888 window.$ = _$; 10889 } 10890 10891 if ( deep && window.jQuery === jQuery ) { 10892 window.jQuery = _jQuery; 10893 } 10894 10895 return jQuery; 10896}; 10897 10898// Expose jQuery and $ identifiers, even in AMD 10899// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557) 10900// and CommonJS for browser emulators (trac-13566) 10901if ( typeof noGlobal === "undefined" ) { 10902 window.jQuery = window.$ = jQuery; 10903} 10904 10905 10906 10907 10908return jQuery; 10909} );
vendor: 2,677 bytes, lines 10910-10979
10910 10911/*! jQuery UI - v1.13.2 - 2023-01-31 10912* http://jqueryui.com 10913* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/draggable.js, widgets/droppable.js, widgets/resizable.js, widgets/selectable.js, widgets/sortable.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/selectmenu.js, widgets/slider.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js 10914* Copyright jQuery Foundation and other contributors; Licensed MIT */ 10915 10916( function( factory ) { 10917 "use strict"; 10918 10919 if ( typeof define === "function" && define.amd ) { 10920 10921 // AMD. Register as an anonymous module. 10922 define( [ "jquery" ], factory ); 10923 } else { 10924 10925 // Browser globals 10926 factory( jQuery ); 10927 } 10928} )( function( $ ) { 10929"use strict"; 10930 10931$.ui = $.ui || {}; 10932 10933var version = $.ui.version = "1.13.2"; 10934 10935 10936/*! 10937 * jQuery UI Widget 1.13.2 10938 * http://jqueryui.com 10939 * 10940 * Copyright jQuery Foundation and other contributors 10941 * Released under the MIT license. 10942 * http://jquery.org/license 10943 */ 10944 10945//>>label: Widget 10946//>>group: Core 10947//>>description: Provides a factory for creating stateful widgets with a common API. 10948//>>docs: http://api.jqueryui.com/jQuery.widget/ 10949//>>demos: http://jqueryui.com/widget/ 10950 10951 10952var widgetUuid = 0; 10953var widgetHasOwnProperty = Array.prototype.hasOwnProperty; 10954var widgetSlice = Array.prototype.slice; 10955 10956$.cleanData = ( function( orig ) { 10957 return function( elems ) { 10958 var events, elem, i; 10959 for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) { 10960 10961 // Only trigger remove when necessary to save time 10962 events = $._data( elem, "events" ); 10963 if ( events && events.remove ) { 10964 $( elem ).triggerHandler( "remove" ); 10965 } 10966 } 10967 orig( elems ); 10968 }; 10969} )( $.cleanData ); 10970 10971$.widget = function( name, base, prototype ) { 10972 var existingConstructor, constructor, basePrototype; 10973 10974 // ProxiedPrototype allows the provided prototype to remain unmodified 10975 // so that it can be used as a mixin for multiple widgets (#8876) 10976 var proxiedPrototype = {}; 10977 10978 var namespace = name.split( "." )[ 0 ]; 10979 name = name.split( "." )[ 1 ];
vendor: 18,823 bytes, lines 10979-11679
10979 10980 var fullName = namespace + "-" + name; 10981 10982 if ( !prototype ) { 10983 prototype = base; 10984 base = $.Widget; 10985 } 10986 10987 if ( Array.isArray( prototype ) ) { 10988 prototype = $.extend.apply( null, [ {} ].concat( prototype ) ); 10989 } 10990 10991 // Create selector for plugin 10992 $.expr.pseudos[ fullName.toLowerCase() ] = function( elem ) { 10993 return !!$.data( elem, fullName ); 10994 }; 10995 10996 $[ namespace ] = $[ namespace ] || {}; 10997 existingConstructor = $[ namespace ][ name ]; 10998 constructor = $[ namespace ][ name ] = function( options, element ) { 10999 11000 // Allow instantiation without "new" keyword 11001 if ( !this || !this._createWidget ) { 11002 return new constructor( options, element ); 11003 } 11004 11005 // Allow instantiation without initializing for simple inheritance 11006 // must use "new" keyword (the code above always passes args) 11007 if ( arguments.length ) { 11008 this._createWidget( options, element ); 11009 } 11010 }; 11011 11012 // Extend with the existing constructor to carry over any static properties 11013 $.extend( constructor, existingConstructor, { 11014 version: prototype.version, 11015 11016 // Copy the object used to create the prototype in case we need to 11017 // redefine the widget later 11018 _proto: $.extend( {}, prototype ), 11019 11020 // Track widgets that inherit from this widget in case this widget is 11021 // redefined after a widget inherits from it 11022 _childConstructors: [] 11023 } ); 11024 11025 basePrototype = new base(); 11026 11027 // We need to make the options hash a property directly on the new instance 11028 // otherwise we'll modify the options hash on the prototype that we're 11029 // inheriting from 11030 basePrototype.options = $.widget.extend( {}, basePrototype.options ); 11031 $.each( prototype, function( prop, value ) { 11032 if ( typeof value !== "function" ) { 11033 proxiedPrototype[ prop ] = value; 11034 return; 11035 } 11036 proxiedPrototype[ prop ] = ( function() { 11037 function _super() { 11038 return base.prototype[ prop ].apply( this, arguments ); 11039 } 11040 11041 function _superApply( args ) { 11042 return base.prototype[ prop ].apply( this, args ); 11043 } 11044 11045 return function() { 11046 var __super = this._super; 11047 var __superApply = this._superApply; 11048 var returnValue; 11049 11050 this._super = _super; 11051 this._superApply = _superApply; 11052 11053 returnValue = value.apply( this, arguments ); 11054 11055 this._super = __super; 11056 this._superApply = __superApply; 11057 11058 return returnValue; 11059 }; 11060 } )(); 11061 } ); 11062 constructor.prototype = $.widget.extend( basePrototype, { 11063 11064 // TODO: remove support for widgetEventPrefix 11065 // always use the name + a colon as the prefix, e.g., draggable:start 11066 // don't prefix for widgets that aren't DOM-based 11067 widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name 11068 }, proxiedPrototype, { 11069 constructor: constructor, 11070 namespace: namespace, 11071 widgetName: name, 11072 widgetFullName: fullName 11073 } ); 11074 11075 // If this widget is being redefined then we need to find all widgets that 11076 // are inheriting from it and redefine all of them so that they inherit from 11077 // the new version of this widget. We're essentially trying to replace one 11078 // level in the prototype chain. 11079 if ( existingConstructor ) { 11080 $.each( existingConstructor._childConstructors, function( i, child ) { 11081 var childPrototype = child.prototype; 11082 11083 // Redefine the child widget using the same prototype that was 11084 // originally used, but inherit from the new version of the base 11085 $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, 11086 child._proto ); 11087 } ); 11088 11089 // Remove the list of existing child constructors from the old constructor 11090 // so the old child constructors can be garbage collected 11091 delete existingConstructor._childConstructors; 11092 } else { 11093 base._childConstructors.push( constructor ); 11094 } 11095 11096 $.widget.bridge( name, constructor ); 11097 11098 return constructor; 11099}; 11100 11101$.widget.extend = function( target ) { 11102 var input = widgetSlice.call( arguments, 1 ); 11103 var inputIndex = 0; 11104 var inputLength = input.length; 11105 var key; 11106 var value; 11107 11108 for ( ; inputIndex < inputLength; inputIndex++ ) { 11109 for ( key in input[ inputIndex ] ) { 11110 value = input[ inputIndex ][ key ]; 11111 if ( widgetHasOwnProperty.call( input[ inputIndex ], key ) && value !== undefined ) { 11112 11113 // Clone objects 11114 if ( $.isPlainObject( value ) ) { 11115 target[ key ] = $.isPlainObject( target[ key ] ) ? 11116 $.widget.extend( {}, target[ key ], value ) : 11117 11118 // Don't extend strings, arrays, etc. with objects 11119 $.widget.extend( {}, value ); 11120 11121 // Copy everything else by reference 11122 } else { 11123 target[ key ] = value; 11124 } 11125 } 11126 } 11127 } 11128 return target; 11129}; 11130 11131$.widget.bridge = function( name, object ) { 11132 var fullName = object.prototype.widgetFullName || name; 11133 $.fn[ name ] = function( options ) { 11134 var isMethodCall = typeof options === "string"; 11135 var args = widgetSlice.call( arguments, 1 ); 11136 var returnValue = this; 11137 11138 if ( isMethodCall ) { 11139 11140 // If this is an empty collection, we need to have the instance method 11141 // return undefined instead of the jQuery instance 11142 if ( !this.length && options === "instance" ) { 11143 returnValue = undefined; 11144 } else { 11145 this.each( function() { 11146 var methodValue; 11147 var instance = $.data( this, fullName ); 11148 11149 if ( options === "instance" ) { 11150 returnValue = instance; 11151 return false; 11152 } 11153 11154 if ( !instance ) { 11155 return $.error( "cannot call methods on " + name + 11156 " prior to initialization; " + 11157 "attempted to call method '" + options + "'" ); 11158 } 11159 11160 if ( typeof instance[ options ] !== "function" || 11161 options.charAt( 0 ) === "_" ) { 11162 return $.error( "no such method '" + options + "' for " + name + 11163 " widget instance" ); 11164 } 11165 11166 methodValue = instance[ options ].apply( instance, args ); 11167 11168 if ( methodValue !== instance && methodValue !== undefined ) { 11169 returnValue = methodValue && methodValue.jquery ? 11170 returnValue.pushStack( methodValue.get() ) : 11171 methodValue; 11172 return false; 11173 } 11174 } ); 11175 } 11176 } else { 11177 11178 // Allow multiple hashes to be passed on init 11179 if ( args.length ) { 11180 options = $.widget.extend.apply( null, [ options ].concat( args ) ); 11181 } 11182 11183 this.each( function() { 11184 var instance = $.data( this, fullName ); 11185 if ( instance ) { 11186 instance.option( options || {} ); 11187 if ( instance._init ) { 11188 instance._init(); 11189 } 11190 } else { 11191 $.data( this, fullName, new object( options, this ) ); 11192 } 11193 } ); 11194 } 11195 11196 return returnValue; 11197 }; 11198}; 11199 11200$.Widget = function( /* options, element */ ) {}; 11201$.Widget._childConstructors = []; 11202 11203$.Widget.prototype = { 11204 widgetName: "widget", 11205 widgetEventPrefix: "", 11206 defaultElement: "<div>", 11207 11208 options: { 11209 classes: {}, 11210 disabled: false, 11211 11212 // Callbacks 11213 create: null 11214 }, 11215 11216 _createWidget: function( options, element ) { 11217 element = $( element || this.defaultElement || this )[ 0 ]; 11218 this.element = $( element ); 11219 this.uuid = widgetUuid++; 11220 this.eventNamespace = "." + this.widgetName + this.uuid; 11221 11222 this.bindings = $(); 11223 this.hoverable = $(); 11224 this.focusable = $(); 11225 this.classesElementLookup = {}; 11226 11227 if ( element !== this ) { 11228 $.data( element, this.widgetFullName, this ); 11229 this._on( true, this.element, { 11230 remove: function( event ) { 11231 if ( event.target === element ) { 11232 this.destroy(); 11233 } 11234 } 11235 } ); 11236 this.document = $( element.style ? 11237 11238 // Element within the document 11239 element.ownerDocument : 11240 11241 // Element is window or document 11242 element.document || element ); 11243 this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow ); 11244 } 11245 11246 this.options = $.widget.extend( {}, 11247 this.options, 11248 this._getCreateOptions(), 11249 options ); 11250 11251 this._create(); 11252 11253 if ( this.options.disabled ) { 11254 this._setOptionDisabled( this.options.disabled ); 11255 } 11256 11257 this._trigger( "create", null, this._getCreateEventData() ); 11258 this._init(); 11259 }, 11260 11261 _getCreateOptions: function() { 11262 return {}; 11263 }, 11264 11265 _getCreateEventData: $.noop, 11266 11267 _create: $.noop, 11268 11269 _init: $.noop, 11270 11271 destroy: function() { 11272 var that = this; 11273 11274 this._destroy(); 11275 $.each( this.classesElementLookup, function( key, value ) { 11276 that._removeClass( value, key ); 11277 } ); 11278 11279 // We can probably remove the unbind calls in 2.0 11280 // all event bindings should go through this._on() 11281 this.element 11282 .off( this.eventNamespace ) 11283 .removeData( this.widgetFullName ); 11284 this.widget() 11285 .off( this.eventNamespace ) 11286 .removeAttr( "aria-disabled" ); 11287 11288 // Clean up events and states 11289 this.bindings.off( this.eventNamespace ); 11290 }, 11291 11292 _destroy: $.noop, 11293 11294 widget: function() { 11295 return this.element; 11296 }, 11297 11298 option: function( key, value ) { 11299 var options = key; 11300 var parts; 11301 var curOption; 11302 var i; 11303 11304 if ( arguments.length === 0 ) { 11305 11306 // Don't return a reference to the internal hash 11307 return $.widget.extend( {}, this.options ); 11308 } 11309 11310 if ( typeof key === "string" ) { 11311 11312 // Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } 11313 options = {}; 11314 parts = key.split( "." ); 11315 key = parts.shift(); 11316 if ( parts.length ) { 11317 curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); 11318 for ( i = 0; i < parts.length - 1; i++ ) { 11319 curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; 11320 curOption = curOption[ parts[ i ] ]; 11321 } 11322 key = parts.pop(); 11323 if ( arguments.length === 1 ) { 11324 return curOption[ key ] === undefined ? null : curOption[ key ]; 11325 } 11326 curOption[ key ] = value; 11327 } else { 11328 if ( arguments.length === 1 ) { 11329 return this.options[ key ] === undefined ? null : this.options[ key ]; 11330 } 11331 options[ key ] = value; 11332 } 11333 } 11334 11335 this._setOptions( options ); 11336 11337 return this; 11338 }, 11339 11340 _setOptions: function( options ) { 11341 var key; 11342 11343 for ( key in options ) { 11344 this._setOption( key, options[ key ] ); 11345 } 11346 11347 return this; 11348 }, 11349 11350 _setOption: function( key, value ) { 11351 if ( key === "classes" ) { 11352 this._setOptionClasses( value ); 11353 } 11354 11355 this.options[ key ] = value; 11356 11357 if ( key === "disabled" ) { 11358 this._setOptionDisabled( value ); 11359 } 11360 11361 return this; 11362 }, 11363 11364 _setOptionClasses: function( value ) { 11365 var classKey, elements, currentElements; 11366 11367 for ( classKey in value ) { 11368 currentElements = this.classesElementLookup[ classKey ]; 11369 if ( value[ classKey ] === this.options.classes[ classKey ] || 11370 !currentElements || 11371 !currentElements.length ) { 11372 continue; 11373 } 11374 11375 // We are doing this to create a new jQuery object because the _removeClass() call 11376 // on the next line is going to destroy the reference to the current elements being 11377 // tracked. We need to save a copy of this collection so that we can add the new classes 11378 // below. 11379 elements = $( currentElements.get() ); 11380 this._removeClass( currentElements, classKey ); 11381 11382 // We don't use _addClass() here, because that uses this.options.classes 11383 // for generating the string of classes. We want to use the value passed in from 11384 // _setOption(), this is the new value of the classes option which was passed to 11385 // _setOption(). We pass this value directly to _classes(). 11386 elements.addClass( this._classes( { 11387 element: elements, 11388 keys: classKey, 11389 classes: value, 11390 add: true 11391 } ) ); 11392 } 11393 }, 11394 11395 _setOptionDisabled: function( value ) { 11396 this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value ); 11397 11398 // If the widget is becoming disabled, then nothing is interactive 11399 if ( value ) { 11400 this._removeClass( this.hoverable, null, "ui-state-hover" ); 11401 this._removeClass( this.focusable, null, "ui-state-focus" ); 11402 } 11403 }, 11404 11405 enable: function() { 11406 return this._setOptions( { disabled: false } ); 11407 }, 11408 11409 disable: function() { 11410 return this._setOptions( { disabled: true } ); 11411 }, 11412 11413 _classes: function( options ) { 11414 var full = []; 11415 var that = this; 11416 11417 options = $.extend( { 11418 element: this.element, 11419 classes: this.options.classes || {} 11420 }, options ); 11421 11422 function bindRemoveEvent() { 11423 var nodesToBind = []; 11424 11425 options.element.each( function( _, element ) { 11426 var isTracked = $.map( that.classesElementLookup, function( elements ) { 11427 return elements; 11428 } ) 11429 .some( function( elements ) { 11430 return elements.is( element ); 11431 } ); 11432 11433 if ( !isTracked ) { 11434 nodesToBind.push( element ); 11435 } 11436 } ); 11437 11438 that._on( $( nodesToBind ), { 11439 remove: "_untrackClassesElement" 11440 } ); 11441 } 11442 11443 function processClassString( classes, checkOption ) { 11444 var current, i; 11445 for ( i = 0; i < classes.length; i++ ) { 11446 current = that.classesElementLookup[ classes[ i ] ] || $(); 11447 if ( options.add ) { 11448 bindRemoveEvent(); 11449 current = $( $.uniqueSort( current.get().concat( options.element.get() ) ) ); 11450 } else { 11451 current = $( current.not( options.element ).get() ); 11452 } 11453 that.classesElementLookup[ classes[ i ] ] = current; 11454 full.push( classes[ i ] ); 11455 if ( checkOption && options.classes[ classes[ i ] ] ) { 11456 full.push( options.classes[ classes[ i ] ] ); 11457 } 11458 } 11459 } 11460 11461 if ( options.keys ) { 11462 processClassString( options.keys.match( /\S+/g ) || [], true ); 11463 } 11464 if ( options.extra ) { 11465 processClassString( options.extra.match( /\S+/g ) || [] ); 11466 } 11467 11468 return full.join( " " ); 11469 }, 11470 11471 _untrackClassesElement: function( event ) { 11472 var that = this; 11473 $.each( that.classesElementLookup, function( key, value ) { 11474 if ( $.inArray( event.target, value ) !== -1 ) { 11475 that.classesElementLookup[ key ] = $( value.not( event.target ).get() ); 11476 } 11477 } ); 11478 11479 this._off( $( event.target ) ); 11480 }, 11481 11482 _removeClass: function( element, keys, extra ) { 11483 return this._toggleClass( element, keys, extra, false ); 11484 }, 11485 11486 _addClass: function( element, keys, extra ) { 11487 return this._toggleClass( element, keys, extra, true ); 11488 }, 11489 11490 _toggleClass: function( element, keys, extra, add ) { 11491 add = ( typeof add === "boolean" ) ? add : extra; 11492 var shift = ( typeof element === "string" || element === null ), 11493 options = { 11494 extra: shift ? keys : extra, 11495 keys: shift ? element : keys, 11496 element: shift ? this.element : element, 11497 add: add 11498 }; 11499 options.element.toggleClass( this._classes( options ), add ); 11500 return this; 11501 }, 11502 11503 _on: function( suppressDisabledCheck, element, handlers ) { 11504 var delegateElement; 11505 var instance = this; 11506 11507 // No suppressDisabledCheck flag, shuffle arguments 11508 if ( typeof suppressDisabledCheck !== "boolean" ) { 11509 handlers = element; 11510 element = suppressDisabledCheck; 11511 suppressDisabledCheck = false; 11512 } 11513 11514 // No element argument, shuffle and use this.element 11515 if ( !handlers ) { 11516 handlers = element; 11517 element = this.element; 11518 delegateElement = this.widget(); 11519 } else { 11520 element = delegateElement = $( element ); 11521 this.bindings = this.bindings.add( element ); 11522 } 11523 11524 $.each( handlers, function( event, handler ) { 11525 function handlerProxy() { 11526 11527 // Allow widgets to customize the disabled handling 11528 // - disabled as an array instead of boolean 11529 // - disabled class as method for disabling individual parts 11530 if ( !suppressDisabledCheck && 11531 ( instance.options.disabled === true || 11532 $( this ).hasClass( "ui-state-disabled" ) ) ) { 11533 return; 11534 } 11535 return ( typeof handler === "string" ? instance[ handler ] : handler ) 11536 .apply( instance, arguments ); 11537 } 11538 11539 // Copy the guid so direct unbinding works 11540 if ( typeof handler !== "string" ) { 11541 handlerProxy.guid = handler.guid = 11542 handler.guid || handlerProxy.guid || $.guid++; 11543 } 11544 11545 var match = event.match( /^([\w:-]*)\s*(.*)$/ ); 11546 var eventName = match[ 1 ] + instance.eventNamespace; 11547 var selector = match[ 2 ]; 11548 11549 if ( selector ) { 11550 delegateElement.on( eventName, selector, handlerProxy ); 11551 } else { 11552 element.on( eventName, handlerProxy ); 11553 } 11554 } ); 11555 }, 11556 11557 _off: function( element, eventName ) { 11558 eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) + 11559 this.eventNamespace; 11560 element.off( eventName ); 11561 11562 // Clear the stack to avoid memory leaks (#10056) 11563 this.bindings = $( this.bindings.not( element ).get() ); 11564 this.focusable = $( this.focusable.not( element ).get() ); 11565 this.hoverable = $( this.hoverable.not( element ).get() ); 11566 }, 11567 11568 _delay: function( handler, delay ) { 11569 function handlerProxy() { 11570 return ( typeof handler === "string" ? instance[ handler ] : handler ) 11571 .apply( instance, arguments ); 11572 } 11573 var instance = this; 11574 return setTimeout( handlerProxy, delay || 0 ); 11575 }, 11576 11577 _hoverable: function( element ) { 11578 this.hoverable = this.hoverable.add( element ); 11579 this._on( element, { 11580 mouseenter: function( event ) { 11581 this._addClass( $( event.currentTarget ), null, "ui-state-hover" ); 11582 }, 11583 mouseleave: function( event ) { 11584 this._removeClass( $( event.currentTarget ), null, "ui-state-hover" ); 11585 } 11586 } ); 11587 }, 11588 11589 _focusable: function( element ) { 11590 this.focusable = this.focusable.add( element ); 11591 this._on( element, { 11592 focusin: function( event ) { 11593 this._addClass( $( event.currentTarget ), null, "ui-state-focus" ); 11594 }, 11595 focusout: function( event ) { 11596 this._removeClass( $( event.currentTarget ), null, "ui-state-focus" ); 11597 } 11598 } ); 11599 }, 11600 11601 _trigger: function( type, event, data ) { 11602 var prop, orig; 11603 var callback = this.options[ type ]; 11604 11605 data = data || {}; 11606 event = $.Event( event ); 11607 event.type = ( type === this.widgetEventPrefix ? 11608 type : 11609 this.widgetEventPrefix + type ).toLowerCase(); 11610 11611 // The original event may come from any element 11612 // so we need to reset the target on the new event 11613 event.target = this.element[ 0 ]; 11614 11615 // Copy original event properties over to the new event 11616 orig = event.originalEvent; 11617 if ( orig ) { 11618 for ( prop in orig ) { 11619 if ( !( prop in event ) ) { 11620 event[ prop ] = orig[ prop ]; 11621 } 11622 } 11623 } 11624 11625 this.element.trigger( event, data ); 11626 return !( typeof callback === "function" && 11627 callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false || 11628 event.isDefaultPrevented() ); 11629 } 11630}; 11631 11632$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { 11633 $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { 11634 if ( typeof options === "string" ) { 11635 options = { effect: options }; 11636 } 11637 11638 var hasOptions; 11639 var effectName = !options ? 11640 method : 11641 options === true || typeof options === "number" ? 11642 defaultEffect : 11643 options.effect || defaultEffect; 11644 11645 options = options || {}; 11646 if ( typeof options === "number" ) { 11647 options = { duration: options }; 11648 } else if ( options === true ) { 11649 options = {}; 11650 } 11651 11652 hasOptions = !$.isEmptyObject( options ); 11653 options.complete = callback; 11654 11655 if ( options.delay ) { 11656 element.delay( options.delay ); 11657 } 11658 11659 if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { 11660 element[ method ]( options ); 11661 } else if ( effectName !== method && element[ effectName ] ) { 11662 element[ effectName ]( options.duration, options.easing, callback ); 11663 } else { 11664 element.queue( function( next ) { 11665 $( this )[ method ](); 11666 if ( callback ) { 11667 callback.call( element[ 0 ] ); 11668 } 11669 next(); 11670 } ); 11671 } 11672 }; 11673} ); 11674 11675var widget = $.widget; 11676 11677 11678/*! 11679 * jQuery UI Position 1.1
vendor: 3,858 bytes, lines 11679-11822
116793.2 11680 * http://jqueryui.com 11681 * 11682 * Copyright jQuery Foundation and other contributors 11683 * Released under the MIT license. 11684 * http://jquery.org/license 11685 * 11686 * http://api.jqueryui.com/position/ 11687 */ 11688 11689//>>label: Position 11690//>>group: Core 11691//>>description: Positions elements relative to other elements. 11692//>>docs: http://api.jqueryui.com/position/ 11693//>>demos: http://jqueryui.com/position/ 11694 11695 11696( function() { 11697var cachedScrollbarWidth, 11698 max = Math.max, 11699 abs = Math.abs, 11700 rhorizontal = /left|center|right/, 11701 rvertical = /top|center|bottom/, 11702 roffset = /[\+\-]\d+(\.[\d]+)?%?/, 11703 rposition = /^\w+/, 11704 rpercent = /%$/, 11705 _position = $.fn.position; 11706 11707function getOffsets( offsets, width, height ) { 11708 return [ 11709 parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), 11710 parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) 11711 ]; 11712} 11713 11714function parseCss( element, property ) { 11715 return parseInt( $.css( element, property ), 10 ) || 0; 11716} 11717 11718function isWindow( obj ) { 11719 return obj != null && obj === obj.window; 11720} 11721 11722function getDimensions( elem ) { 11723 var raw = elem[ 0 ]; 11724 if ( raw.nodeType === 9 ) { 11725 return { 11726 width: elem.width(), 11727 height: elem.height(), 11728 offset: { top: 0, left: 0 } 11729 }; 11730 } 11731 if ( isWindow( raw ) ) { 11732 return { 11733 width: elem.width(), 11734 height: elem.height(), 11735 offset: { top: elem.scrollTop(), left: elem.scrollLeft() } 11736 }; 11737 } 11738 if ( raw.preventDefault ) { 11739 return { 11740 width: 0, 11741 height: 0, 11742 offset: { top: raw.pageY, left: raw.pageX } 11743 }; 11744 } 11745 return { 11746 width: elem.outerWidth(), 11747 height: elem.outerHeight(), 11748 offset: elem.offset() 11749 }; 11750} 11751 11752$.position = { 11753 scrollbarWidth: function() { 11754 if ( cachedScrollbarWidth !== undefined ) { 11755 return cachedScrollbarWidth; 11756 } 11757 var w1, w2, 11758 div = $( "<div style=" + 11759 "'display:block;position:absolute;width:200px;height:200px;overflow:hidden;'>" + 11760 "<div style='height:300px;width:auto;'></div></div>" ), 11761 innerDiv = div.children()[ 0 ]; 11762 11763 $( "body" ).append( div ); 11764 w1 = innerDiv.offsetWidth; 11765 div.css( "overflow", "scroll" ); 11766 11767 w2 = innerDiv.offsetWidth; 11768 11769 if ( w1 === w2 ) { 11770 w2 = div[ 0 ].clientWidth; 11771 } 11772 11773 div.remove(); 11774 11775 return ( cachedScrollbarWidth = w1 - w2 ); 11776 }, 11777 getScrollInfo: function( within ) { 11778 var overflowX = within.isWindow || within.isDocument ? "" : 11779 within.element.css( "overflow-x" ), 11780 overflowY = within.isWindow || within.isDocument ? "" : 11781 within.element.css( "overflow-y" ), 11782 hasOverflowX = overflowX === "scroll" || 11783 ( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ), 11784 hasOverflowY = overflowY === "scroll" || 11785 ( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight ); 11786 return { 11787 width: hasOverflowY ? $.position.scrollbarWidth() : 0, 11788 height: hasOverflowX ? $.position.scrollbarWidth() : 0 11789 }; 11790 }, 11791 getWithinInfo: function( element ) { 11792 var withinElement = $( element || window ), 11793 isElemWindow = isWindow( withinElement[ 0 ] ), 11794 isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9, 11795 hasOffset = !isElemWindow && !isDocument; 11796 return { 11797 element: withinElement, 11798 isWindow: isElemWindow, 11799 isDocument: isDocument, 11800 offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 }, 11801 scrollLeft: withinElement.scrollLeft(), 11802 scrollTop: withinElement.scrollTop(), 11803 width: withinElement.outerWidth(), 11804 height: withinElement.outerHeight() 11805 }; 11806 } 11807}; 11808 11809$.fn.position = function( options ) { 11810 if ( !options || !options.of ) { 11811 return _position.apply( this, arguments ); 11812 } 11813 11814 // Make a copy, we don't want to modify arguments 11815 options = $.extend( {}, options ); 11816 11817 var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, 11818 11819 // Make sure string options are treated as CSS selectors 11820 target = typeof options.of === "string" ? 11821 $( document ).find( options.of ) : 11822 $( options.of ),
vendor: 10,992 bytes, lines 11823-12176
11823 11824 within = $.position.getWithinInfo( options.within ), 11825 scrollInfo = $.position.getScrollInfo( within ), 11826 collision = ( options.collision || "flip" ).split( " " ), 11827 offsets = {}; 11828 11829 dimensions = getDimensions( target ); 11830 if ( target[ 0 ].preventDefault ) { 11831 11832 // Force left top to allow flipping 11833 options.at = "left top"; 11834 } 11835 targetWidth = dimensions.width; 11836 targetHeight = dimensions.height; 11837 targetOffset = dimensions.offset; 11838 11839 // Clone to reuse original targetOffset later 11840 basePosition = $.extend( {}, targetOffset ); 11841 11842 // Force my and at to have valid horizontal and vertical positions 11843 // if a value is missing or invalid, it will be converted to center 11844 $.each( [ "my", "at" ], function() { 11845 var pos = ( options[ this ] || "" ).split( " " ), 11846 horizontalOffset, 11847 verticalOffset; 11848 11849 if ( pos.length === 1 ) { 11850 pos = rhorizontal.test( pos[ 0 ] ) ? 11851 pos.concat( [ "center" ] ) : 11852 rvertical.test( pos[ 0 ] ) ? 11853 [ "center" ].concat( pos ) : 11854 [ "center", "center" ]; 11855 } 11856 pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; 11857 pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; 11858 11859 // Calculate offsets 11860 horizontalOffset = roffset.exec( pos[ 0 ] ); 11861 verticalOffset = roffset.exec( pos[ 1 ] ); 11862 offsets[ this ] = [ 11863 horizontalOffset ? horizontalOffset[ 0 ] : 0, 11864 verticalOffset ? verticalOffset[ 0 ] : 0 11865 ]; 11866 11867 // Reduce to just the positions without the offsets 11868 options[ this ] = [ 11869 rposition.exec( pos[ 0 ] )[ 0 ], 11870 rposition.exec( pos[ 1 ] )[ 0 ] 11871 ]; 11872 } ); 11873 11874 // Normalize collision option 11875 if ( collision.length === 1 ) { 11876 collision[ 1 ] = collision[ 0 ]; 11877 } 11878 11879 if ( options.at[ 0 ] === "right" ) { 11880 basePosition.left += targetWidth; 11881 } else if ( options.at[ 0 ] === "center" ) { 11882 basePosition.left += targetWidth / 2; 11883 } 11884 11885 if ( options.at[ 1 ] === "bottom" ) { 11886 basePosition.top += targetHeight; 11887 } else if ( options.at[ 1 ] === "center" ) { 11888 basePosition.top += targetHeight / 2; 11889 } 11890 11891 atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); 11892 basePosition.left += atOffset[ 0 ]; 11893 basePosition.top += atOffset[ 1 ]; 11894 11895 return this.each( function() { 11896 var collisionPosition, using, 11897 elem = $( this ), 11898 elemWidth = elem.outerWidth(), 11899 elemHeight = elem.outerHeight(), 11900 marginLeft = parseCss( this, "marginLeft" ), 11901 marginTop = parseCss( this, "marginTop" ), 11902 collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + 11903 scrollInfo.width, 11904 collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + 11905 scrollInfo.height, 11906 position = $.extend( {}, basePosition ), 11907 myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); 11908 11909 if ( options.my[ 0 ] === "right" ) { 11910 position.left -= elemWidth; 11911 } else if ( options.my[ 0 ] === "center" ) { 11912 position.left -= elemWidth / 2; 11913 } 11914 11915 if ( options.my[ 1 ] === "bottom" ) { 11916 position.top -= elemHeight; 11917 } else if ( options.my[ 1 ] === "center" ) { 11918 position.top -= elemHeight / 2; 11919 } 11920 11921 position.left += myOffset[ 0 ]; 11922 position.top += myOffset[ 1 ]; 11923 11924 collisionPosition = { 11925 marginLeft: marginLeft, 11926 marginTop: marginTop 11927 }; 11928 11929 $.each( [ "left", "top" ], function( i, dir ) { 11930 if ( $.ui.position[ collision[ i ] ] ) { 11931 $.ui.position[ collision[ i ] ][ dir ]( position, { 11932 targetWidth: targetWidth, 11933 targetHeight: targetHeight, 11934 elemWidth: elemWidth, 11935 elemHeight: elemHeight, 11936 collisionPosition: collisionPosition, 11937 collisionWidth: collisionWidth, 11938 collisionHeight: collisionHeight, 11939 offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], 11940 my: options.my, 11941 at: options.at, 11942 within: within, 11943 elem: elem 11944 } ); 11945 } 11946 } ); 11947 11948 if ( options.using ) { 11949 11950 // Adds feedback as second argument to using callback, if present 11951 using = function( props ) { 11952 var left = targetOffset.left - position.left, 11953 right = left + targetWidth - elemWidth, 11954 top = targetOffset.top - position.top, 11955 bottom = top + targetHeight - elemHeight, 11956 feedback = { 11957 target: { 11958 element: target, 11959 left: targetOffset.left, 11960 top: targetOffset.top, 11961 width: targetWidth, 11962 height: targetHeight 11963 }, 11964 element: { 11965 element: elem, 11966 left: position.left, 11967 top: position.top, 11968 width: elemWidth, 11969 height: elemHeight 11970 }, 11971 horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", 11972 vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" 11973 }; 11974 if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { 11975 feedback.horizontal = "center"; 11976 } 11977 if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { 11978 feedback.vertical = "middle"; 11979 } 11980 if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { 11981 feedback.important = "horizontal"; 11982 } else { 11983 feedback.important = "vertical"; 11984 } 11985 options.using.call( this, props, feedback ); 11986 }; 11987 } 11988 11989 elem.offset( $.extend( position, { using: using } ) ); 11990 } ); 11991}; 11992 11993$.ui.position = { 11994 fit: { 11995 left: function( position, data ) { 11996 var within = data.within, 11997 withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, 11998 outerWidth = within.width, 11999 collisionPosLeft = position.left - data.collisionPosition.marginLeft, 12000 overLeft = withinOffset - collisionPosLeft, 12001 overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, 12002 newOverRight; 12003 12004 // Element is wider than within 12005 if ( data.collisionWidth > outerWidth ) { 12006 12007 // Element is initially over the left side of within 12008 if ( overLeft > 0 && overRight <= 0 ) { 12009 newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - 12010 withinOffset; 12011 position.left += overLeft - newOverRight; 12012 12013 // Element is initially over right side of within 12014 } else if ( overRight > 0 && overLeft <= 0 ) { 12015 position.left = withinOffset; 12016 12017 // Element is initially over both left and right sides of within 12018 } else { 12019 if ( overLeft > overRight ) { 12020 position.left = withinOffset + outerWidth - data.collisionWidth; 12021 } else { 12022 position.left = withinOffset; 12023 } 12024 } 12025 12026 // Too far left -> align with left edge 12027 } else if ( overLeft > 0 ) { 12028 position.left += overLeft; 12029 12030 // Too far right -> align with right edge 12031 } else if ( overRight > 0 ) { 12032 position.left -= overRight; 12033 12034 // Adjust based on position and margin 12035 } else { 12036 position.left = max( position.left - collisionPosLeft, position.left ); 12037 } 12038 }, 12039 top: function( position, data ) { 12040 var within = data.within, 12041 withinOffset = within.isWindow ? within.scrollTop : within.offset.top, 12042 outerHeight = data.within.height, 12043 collisionPosTop = position.top - data.collisionPosition.marginTop, 12044 overTop = withinOffset - collisionPosTop, 12045 overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, 12046 newOverBottom; 12047 12048 // Element is taller than within 12049 if ( data.collisionHeight > outerHeight ) { 12050 12051 // Element is initially over the top of within 12052 if ( overTop > 0 && overBottom <= 0 ) { 12053 newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - 12054 withinOffset; 12055 position.top += overTop - newOverBottom; 12056 12057 // Element is initially over bottom of within 12058 } else if ( overBottom > 0 && overTop <= 0 ) { 12059 position.top = withinOffset; 12060 12061 // Element is initially over both top and bottom of within 12062 } else { 12063 if ( overTop > overBottom ) { 12064 position.top = withinOffset + outerHeight - data.collisionHeight; 12065 } else { 12066 position.top = withinOffset; 12067 } 12068 } 12069 12070 // Too far up -> align with top 12071 } else if ( overTop > 0 ) { 12072 position.top += overTop; 12073 12074 // Too far down -> align with bottom edge 12075 } else if ( overBottom > 0 ) { 12076 position.top -= overBottom; 12077 12078 // Adjust based on position and margin 12079 } else { 12080 position.top = max( position.top - collisionPosTop, position.top ); 12081 } 12082 } 12083 }, 12084 flip: { 12085 left: function( position, data ) { 12086 var within = data.within, 12087 withinOffset = within.offset.left + within.scrollLeft, 12088 outerWidth = within.width, 12089 offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, 12090 collisionPosLeft = position.left - data.collisionPosition.marginLeft, 12091 overLeft = collisionPosLeft - offsetLeft, 12092 overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, 12093 myOffset = data.my[ 0 ] === "left" ? 12094 -data.elemWidth : 12095 data.my[ 0 ] === "right" ? 12096 data.elemWidth : 12097 0, 12098 atOffset = data.at[ 0 ] === "left" ? 12099 data.targetWidth : 12100 data.at[ 0 ] === "right" ? 12101 -data.targetWidth : 12102 0, 12103 offset = -2 * data.offset[ 0 ], 12104 newOverRight, 12105 newOverLeft; 12106 12107 if ( overLeft < 0 ) { 12108 newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - 12109 outerWidth - withinOffset; 12110 if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { 12111 position.left += myOffset + atOffset + offset; 12112 } 12113 } else if ( overRight > 0 ) { 12114 newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + 12115 atOffset + offset - offsetLeft; 12116 if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { 12117 position.left += myOffset + atOffset + offset; 12118 } 12119 } 12120 }, 12121 top: function( position, data ) { 12122 var within = data.within, 12123 withinOffset = within.offset.top + within.scrollTop, 12124 outerHeight = within.height, 12125 offsetTop = within.isWindow ? within.scrollTop : within.offset.top, 12126 collisionPosTop = position.top - data.collisionPosition.marginTop, 12127 overTop = collisionPosTop - offsetTop, 12128 overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, 12129 top = data.my[ 1 ] === "top", 12130 myOffset = top ? 12131 -data.elemHeight : 12132 data.my[ 1 ] === "bottom" ? 12133 data.elemHeight : 12134 0, 12135 atOffset = data.at[ 1 ] === "top" ? 12136 data.targetHeight : 12137 data.at[ 1 ] === "bottom" ? 12138 -data.targetHeight : 12139 0, 12140 offset = -2 * data.offset[ 1 ], 12141 newOverTop, 12142 newOverBottom; 12143 if ( overTop < 0 ) { 12144 newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - 12145 outerHeight - withinOffset; 12146 if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) { 12147 position.top += myOffset + atOffset + offset; 12148 } 12149 } else if ( overBottom > 0 ) { 12150 newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + 12151 offset - offsetTop; 12152 if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) { 12153 position.top += myOffset + atOffset + offset; 12154 } 12155 } 12156 } 12157 }, 12158 flipfit: { 12159 left: function() { 12160 $.ui.position.flip.left.apply( this, arguments ); 12161 $.ui.position.fit.left.apply( this, arguments ); 12162 }, 12163 top: function() { 12164 $.ui.position.flip.top.apply( this, arguments ); 12165 $.ui.position.fit.top.apply( this, arguments ); 12166 } 12167 } 12168}; 12169 12170} )(); 12171 12172var position = $.ui.position; 12173 12174 12175/*! 12176 * jQuery UI :data 1.1
121763.2 12177 * http://jqueryui.com 12178 * 12179 * Copyright jQuery Foundation and other contributors 12180 * Released under the MIT license. 12181 * http://jquery.org/license 12182 */ 12183 12184//>>label: :data Selector
vendor: 25,394 bytes, lines 12185-13187
12185//>>group: Core 12186//>>description: Selects elements which have data stored under the specified key. 12187//>>docs: http://api.jqueryui.com/data-selector/ 12188 12189 12190var data = $.extend( $.expr.pseudos, { 12191 data: $.expr.createPseudo ? 12192 $.expr.createPseudo( function( dataName ) { 12193 return function( elem ) { 12194 return !!$.data( elem, dataName ); 12195 }; 12196 } ) : 12197 12198 // Support: jQuery <1.8 12199 function( elem, i, match ) { 12200 return !!$.data( elem, match[ 3 ] ); 12201 } 12202} ); 12203 12204/*! 12205 * jQuery UI Disable Selection 1.13.2 12206 * http://jqueryui.com 12207 * 12208 * Copyright jQuery Foundation and other contributors 12209 * Released under the MIT license. 12210 * http://jquery.org/license 12211 */ 12212 12213//>>label: disableSelection 12214//>>group: Core 12215//>>description: Disable selection of text content within the set of matched elements. 12216//>>docs: http://api.jqueryui.com/disableSelection/ 12217 12218// This file is deprecated 12219 12220var disableSelection = $.fn.extend( { 12221 disableSelection: ( function() { 12222 var eventType = "onselectstart" in document.createElement( "div" ) ? 12223 "selectstart" : 12224 "mousedown"; 12225 12226 return function() { 12227 return this.on( eventType + ".ui-disableSelection", function( event ) { 12228 event.preventDefault(); 12229 } ); 12230 }; 12231 } )(), 12232 12233 enableSelection: function() { 12234 return this.off( ".ui-disableSelection" ); 12235 } 12236} ); 12237 12238 12239/*! 12240 * jQuery UI Focusable 1.13.2 12241 * http://jqueryui.com 12242 * 12243 * Copyright jQuery Foundation and other contributors 12244 * Released under the MIT license. 12245 * http://jquery.org/license 12246 */ 12247 12248//>>label: :focusable Selector 12249//>>group: Core 12250//>>description: Selects elements which can be focused. 12251//>>docs: http://api.jqueryui.com/focusable-selector/ 12252 12253 12254// Selectors 12255$.ui.focusable = function( element, hasTabindex ) { 12256 var map, mapName, img, focusableIfVisible, fieldset, 12257 nodeName = element.nodeName.toLowerCase(); 12258 12259 if ( "area" === nodeName ) { 12260 map = element.parentNode; 12261 mapName = map.name; 12262 if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { 12263 return false; 12264 } 12265 img = $( "img[usemap='#" + mapName + "']" ); 12266 return img.length > 0 && img.is( ":visible" ); 12267 } 12268 12269 if ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) { 12270 focusableIfVisible = !element.disabled; 12271 12272 if ( focusableIfVisible ) { 12273 12274 // Form controls within a disabled fieldset are disabled. 12275 // However, controls within the fieldset's legend do not get disabled. 12276 // Since controls generally aren't placed inside legends, we skip 12277 // this portion of the check. 12278 fieldset = $( element ).closest( "fieldset" )[ 0 ]; 12279 if ( fieldset ) { 12280 focusableIfVisible = !fieldset.disabled; 12281 } 12282 } 12283 } else if ( "a" === nodeName ) { 12284 focusableIfVisible = element.href || hasTabindex; 12285 } else { 12286 focusableIfVisible = hasTabindex; 12287 } 12288 12289 return focusableIfVisible && $( element ).is( ":visible" ) && visible( $( element ) ); 12290}; 12291 12292// Support: IE 8 only 12293// IE 8 doesn't resolve inherit to visible/hidden for computed values 12294function visible( element ) { 12295 var visibility = element.css( "visibility" ); 12296 while ( visibility === "inherit" ) { 12297 element = element.parent(); 12298 visibility = element.css( "visibility" ); 12299 } 12300 return visibility === "visible"; 12301} 12302 12303$.extend( $.expr.pseudos, { 12304 focusable: function( element ) { 12305 return $.ui.focusable( element, $.attr( element, "tabindex" ) != null ); 12306 } 12307} ); 12308 12309var focusable = $.ui.focusable; 12310 12311 12312 12313// Support: IE8 Only 12314// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop 12315// with a string, so we need to find the proper form. 12316var form = $.fn._form = function() { 12317 return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form ); 12318}; 12319 12320 12321/*! 12322 * jQuery UI Form Reset Mixin 1.13.2 12323 * http://jqueryui.com 12324 * 12325 * Copyright jQuery Foundation and other contributors 12326 * Released under the MIT license. 12327 * http://jquery.org/license 12328 */ 12329 12330//>>label: Form Reset Mixin 12331//>>group: Core 12332//>>description: Refresh input widgets when their form is reset 12333//>>docs: http://api.jqueryui.com/form-reset-mixin/ 12334 12335 12336var formResetMixin = $.ui.formResetMixin = { 12337 _formResetHandler: function() { 12338 var form = $( this ); 12339 12340 // Wait for the form reset to actually happen before refreshing 12341 setTimeout( function() { 12342 var instances = form.data( "ui-form-reset-instances" ); 12343 $.each( instances, function() { 12344 this.refresh(); 12345 } ); 12346 } ); 12347 }, 12348 12349 _bindFormResetHandler: function() { 12350 this.form = this.element._form(); 12351 if ( !this.form.length ) { 12352 return; 12353 } 12354 12355 var instances = this.form.data( "ui-form-reset-instances" ) || []; 12356 if ( !instances.length ) { 12357 12358 // We don't use _on() here because we use a single event handler per form 12359 this.form.on( "reset.ui-form-reset", this._formResetHandler ); 12360 } 12361 instances.push( this ); 12362 this.form.data( "ui-form-reset-instances", instances ); 12363 }, 12364 12365 _unbindFormResetHandler: function() { 12366 if ( !this.form.length ) { 12367 return; 12368 } 12369 12370 var instances = this.form.data( "ui-form-reset-instances" ); 12371 instances.splice( $.inArray( this, instances ), 1 ); 12372 if ( instances.length ) { 12373 this.form.data( "ui-form-reset-instances", instances ); 12374 } else { 12375 this.form 12376 .removeData( "ui-form-reset-instances" ) 12377 .off( "reset.ui-form-reset" ); 12378 } 12379 } 12380}; 12381 12382 12383/*! 12384 * jQuery UI Support for jQuery core 1.8.x and newer 1.13.2 12385 * http://jqueryui.com 12386 * 12387 * Copyright jQuery Foundation and other contributors 12388 * Released under the MIT license. 12389 * http://jquery.org/license 12390 * 12391 */ 12392 12393//>>label: jQuery 1.8+ Support 12394//>>group: Core 12395//>>description: Support version 1.8.x and newer of jQuery core 12396 12397 12398// Support: jQuery 1.9.x or older 12399// $.expr[ ":" ] is deprecated. 12400if ( !$.expr.pseudos ) { 12401 $.expr.pseudos = $.expr[ ":" ]; 12402} 12403 12404// Support: jQuery 1.11.x or older 12405// $.unique has been renamed to $.uniqueSort 12406if ( !$.uniqueSort ) { 12407 $.uniqueSort = $.unique; 12408} 12409 12410// Support: jQuery 2.2.x or older. 12411// This method has been defined in jQuery 3.0.0. 12412// Code from https://github.com/jquery/jquery/blob/e539bac79e666bba95bba86d690b4e609dca2286/src/selector/escapeSelector.js 12413if ( !$.escapeSelector ) { 12414 12415 // CSS string/identifier serialization 12416 // https://drafts.csswg.org/cssom/#common-serializing-idioms 12417 var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g; 12418 12419 var fcssescape = function( ch, asCodePoint ) { 12420 if ( asCodePoint ) { 12421 12422 // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER 12423 if ( ch === "\0" ) { 12424 return "\uFFFD"; 12425 } 12426 12427 // Control characters and (dependent upon position) numbers get escaped as code points 12428 return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; 12429 } 12430 12431 // Other potentially-special ASCII characters get backslash-escaped 12432 return "\\" + ch; 12433 }; 12434 12435 $.escapeSelector = function( sel ) { 12436 return ( sel + "" ).replace( rcssescape, fcssescape ); 12437 }; 12438} 12439 12440// Support: jQuery 3.4.x or older 12441// These methods have been defined in jQuery 3.5.0. 12442if ( !$.fn.even || !$.fn.odd ) { 12443 $.fn.extend( { 12444 even: function() { 12445 return this.filter( function( i ) { 12446 return i % 2 === 0; 12447 } ); 12448 }, 12449 odd: function() { 12450 return this.filter( function( i ) { 12451 return i % 2 === 1; 12452 } ); 12453 } 12454 } ); 12455} 12456 12457; 12458/*! 12459 * jQuery UI Keycode 1.13.2 12460 * http://jqueryui.com 12461 * 12462 * Copyright jQuery Foundation and other contributors 12463 * Released under the MIT license. 12464 * http://jquery.org/license 12465 */ 12466 12467//>>label: Keycode 12468//>>group: Core 12469//>>description: Provide keycodes as keynames 12470//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/ 12471 12472 12473var keycode = $.ui.keyCode = { 12474 BACKSPACE: 8, 12475 COMMA: 188, 12476 DELETE: 46, 12477 DOWN: 40, 12478 END: 35, 12479 ENTER: 13, 12480 ESCAPE: 27, 12481 HOME: 36, 12482 LEFT: 37, 12483 PAGE_DOWN: 34, 12484 PAGE_UP: 33, 12485 PERIOD: 190, 12486 RIGHT: 39, 12487 SPACE: 32, 12488 TAB: 9, 12489 UP: 38 12490}; 12491 12492 12493/*! 12494 * jQuery UI Labels 1.13.2 12495 * http://jqueryui.com 12496 * 12497 * Copyright jQuery Foundation and other contributors 12498 * Released under the MIT license. 12499 * http://jquery.org/license 12500 */ 12501 12502//>>label: labels 12503//>>group: Core 12504//>>description: Find all the labels associated with a given input 12505//>>docs: http://api.jqueryui.com/labels/ 12506 12507 12508var labels = $.fn.labels = function() { 12509 var ancestor, selector, id, labels, ancestors; 12510 12511 if ( !this.length ) { 12512 return this.pushStack( [] ); 12513 } 12514 12515 // Check control.labels first 12516 if ( this[ 0 ].labels && this[ 0 ].labels.length ) { 12517 return this.pushStack( this[ 0 ].labels ); 12518 } 12519 12520 // Support: IE <= 11, FF <= 37, Android <= 2.3 only 12521 // Above browsers do not support control.labels. Everything below is to support them 12522 // as well as document fragments. control.labels does not work on document fragments 12523 labels = this.eq( 0 ).parents( "label" ); 12524 12525 // Look for the label based on the id 12526 id = this.attr( "id" ); 12527 if ( id ) { 12528 12529 // We don't search against the document in case the element 12530 // is disconnected from the DOM 12531 ancestor = this.eq( 0 ).parents().last(); 12532 12533 // Get a full set of top level ancestors 12534 ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() ); 12535 12536 // Create a selector for the label based on the id 12537 selector = "label[for='" + $.escapeSelector( id ) + "']"; 12538 12539 labels = labels.add( ancestors.find( selector ).addBack( selector ) ); 12540 12541 } 12542 12543 // Return whatever we have found for labels 12544 return this.pushStack( labels ); 12545}; 12546 12547 12548/*! 12549 * jQuery UI Scroll Parent 1.13.2 12550 * http://jqueryui.com 12551 * 12552 * Copyright jQuery Foundation and other contributors 12553 * Released under the MIT license. 12554 * http://jquery.org/license 12555 */ 12556 12557//>>label: scrollParent 12558//>>group: Core 12559//>>description: Get the closest ancestor element that is scrollable. 12560//>>docs: http://api.jqueryui.com/scrollParent/ 12561 12562 12563var scrollParent = $.fn.scrollParent = function( includeHidden ) { 12564 var position = this.css( "position" ), 12565 excludeStaticParent = position === "absolute", 12566 overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, 12567 scrollParent = this.parents().filter( function() { 12568 var parent = $( this ); 12569 if ( excludeStaticParent && parent.css( "position" ) === "static" ) { 12570 return false; 12571 } 12572 return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + 12573 parent.css( "overflow-x" ) ); 12574 } ).eq( 0 ); 12575 12576 return position === "fixed" || !scrollParent.length ? 12577 $( this[ 0 ].ownerDocument || document ) : 12578 scrollParent; 12579}; 12580 12581 12582/*! 12583 * jQuery UI Tabbable 1.13.2 12584 * http://jqueryui.com 12585 * 12586 * Copyright jQuery Foundation and other contributors 12587 * Released under the MIT license. 12588 * http://jquery.org/license 12589 */ 12590 12591//>>label: :tabbable Selector 12592//>>group: Core 12593//>>description: Selects elements which can be tabbed to. 12594//>>docs: http://api.jqueryui.com/tabbable-selector/ 12595 12596 12597var tabbable = $.extend( $.expr.pseudos, { 12598 tabbable: function( element ) { 12599 var tabIndex = $.attr( element, "tabindex" ), 12600 hasTabindex = tabIndex != null; 12601 return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex ); 12602 } 12603} ); 12604 12605 12606/*! 12607 * jQuery UI Unique ID 1.13.2 12608 * http://jqueryui.com 12609 * 12610 * Copyright jQuery Foundation and other contributors 12611 * Released under the MIT license. 12612 * http://jquery.org/license 12613 */ 12614 12615//>>label: uniqueId 12616//>>group: Core 12617//>>description: Functions to generate and remove uniqueId's 12618//>>docs: http://api.jqueryui.com/uniqueId/ 12619 12620 12621var uniqueId = $.fn.extend( { 12622 uniqueId: ( function() { 12623 var uuid = 0; 12624 12625 return function() { 12626 return this.each( function() { 12627 if ( !this.id ) { 12628 this.id = "ui-id-" + ( ++uuid ); 12629 } 12630 } ); 12631 }; 12632 } )(), 12633 12634 removeUniqueId: function() { 12635 return this.each( function() { 12636 if ( /^ui-id-\d+$/.test( this.id ) ) { 12637 $( this ).removeAttr( "id" ); 12638 } 12639 } ); 12640 } 12641} ); 12642 12643 12644 12645// This file is deprecated 12646var ie = $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); 12647 12648/*! 12649 * jQuery UI Mouse 1.13.2 12650 * http://jqueryui.com 12651 * 12652 * Copyright jQuery Foundation and other contributors 12653 * Released under the MIT license. 12654 * http://jquery.org/license 12655 */ 12656 12657//>>label: Mouse 12658//>>group: Widgets 12659//>>description: Abstracts mouse-based interactions to assist in creating certain widgets. 12660//>>docs: http://api.jqueryui.com/mouse/ 12661 12662 12663var mouseHandled = false; 12664$( document ).on( "mouseup", function() { 12665 mouseHandled = false; 12666} ); 12667 12668var widgetsMouse = $.widget( "ui.mouse", { 12669 version: "1.13.2", 12670 options: { 12671 cancel: "input, textarea, button, select, option", 12672 distance: 1, 12673 delay: 0 12674 }, 12675 _mouseInit: function() { 12676 var that = this; 12677 12678 this.element 12679 .on( "mousedown." + this.widgetName, function( event ) { 12680 return that._mouseDown( event ); 12681 } ) 12682 .on( "click." + this.widgetName, function( event ) { 12683 if ( true === $.data( event.target, that.widgetName + ".preventClickEvent" ) ) { 12684 $.removeData( event.target, that.widgetName + ".preventClickEvent" ); 12685 event.stopImmediatePropagation(); 12686 return false; 12687 } 12688 } ); 12689 12690 this.started = false; 12691 }, 12692 12693 // TODO: make sure destroying one instance of mouse doesn't mess with 12694 // other instances of mouse 12695 _mouseDestroy: function() { 12696 this.element.off( "." + this.widgetName ); 12697 if ( this._mouseMoveDelegate ) { 12698 this.document 12699 .off( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 12700 .off( "mouseup." + this.widgetName, this._mouseUpDelegate ); 12701 } 12702 }, 12703 12704 _mouseDown: function( event ) { 12705 12706 // don't let more than one widget handle mouseStart 12707 if ( mouseHandled ) { 12708 return; 12709 } 12710 12711 this._mouseMoved = false; 12712 12713 // We may have missed mouseup (out of window) 12714 if ( this._mouseStarted ) { 12715 this._mouseUp( event ); 12716 } 12717 12718 this._mouseDownEvent = event; 12719 12720 var that = this, 12721 btnIsLeft = ( event.which === 1 ), 12722 12723 // event.target.nodeName works around a bug in IE 8 with 12724 // disabled inputs (#7620) 12725 elIsCancel = ( typeof this.options.cancel === "string" && event.target.nodeName ? 12726 $( event.target ).closest( this.options.cancel ).length : false ); 12727 if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) { 12728 return true; 12729 } 12730 12731 this.mouseDelayMet = !this.options.delay; 12732 if ( !this.mouseDelayMet ) { 12733 this._mouseDelayTimer = setTimeout( function() { 12734 that.mouseDelayMet = true; 12735 }, this.options.delay ); 12736 } 12737 12738 if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) { 12739 this._mouseStarted = ( this._mouseStart( event ) !== false ); 12740 if ( !this._mouseStarted ) { 12741 event.preventDefault(); 12742 return true; 12743 } 12744 } 12745 12746 // Click event may never have fired (Gecko & Opera) 12747 if ( true === $.data( event.target, this.widgetName + ".preventClickEvent" ) ) { 12748 $.removeData( event.target, this.widgetName + ".preventClickEvent" ); 12749 } 12750 12751 // These delegates are required to keep context 12752 this._mouseMoveDelegate = function( event ) { 12753 return that._mouseMove( event ); 12754 }; 12755 this._mouseUpDelegate = function( event ) { 12756 return that._mouseUp( event ); 12757 }; 12758 12759 this.document 12760 .on( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 12761 .on( "mouseup." + this.widgetName, this._mouseUpDelegate ); 12762 12763 event.preventDefault(); 12764 12765 mouseHandled = true; 12766 return true; 12767 }, 12768 12769 _mouseMove: function( event ) { 12770 12771 // Only check for mouseups outside the document if you've moved inside the document 12772 // at least once. This prevents the firing of mouseup in the case of IE<9, which will 12773 // fire a mousemove event if content is placed under the cursor. See #7778 12774 // Support: IE <9 12775 if ( this._mouseMoved ) { 12776 12777 // IE mouseup check - mouseup happened when mouse was out of window 12778 if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && 12779 !event.button ) { 12780 return this._mouseUp( event ); 12781 12782 // Iframe mouseup check - mouseup occurred in another document 12783 } else if ( !event.which ) { 12784 12785 // Support: Safari <=8 - 9 12786 // Safari sets which to 0 if you press any of the following keys 12787 // during a drag (#14461) 12788 if ( event.originalEvent.altKey || event.originalEvent.ctrlKey || 12789 event.originalEvent.metaKey || event.originalEvent.shiftKey ) { 12790 this.ignoreMissingWhich = true; 12791 } else if ( !this.ignoreMissingWhich ) { 12792 return this._mouseUp( event ); 12793 } 12794 } 12795 } 12796 12797 if ( event.which || event.button ) { 12798 this._mouseMoved = true; 12799 } 12800 12801 if ( this._mouseStarted ) { 12802 this._mouseDrag( event ); 12803 return event.preventDefault(); 12804 } 12805 12806 if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) { 12807 this._mouseStarted = 12808 ( this._mouseStart( this._mouseDownEvent, event ) !== false ); 12809 if ( this._mouseStarted ) { 12810 this._mouseDrag( event ); 12811 } else { 12812 this._mouseUp( event ); 12813 } 12814 } 12815 12816 return !this._mouseStarted; 12817 }, 12818 12819 _mouseUp: function( event ) { 12820 this.document 12821 .off( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 12822 .off( "mouseup." + this.widgetName, this._mouseUpDelegate ); 12823 12824 if ( this._mouseStarted ) { 12825 this._mouseStarted = false; 12826 12827 if ( event.target === this._mouseDownEvent.target ) { 12828 $.data( event.target, this.widgetName + ".preventClickEvent", true ); 12829 } 12830 12831 this._mouseStop( event ); 12832 } 12833 12834 if ( this._mouseDelayTimer ) { 12835 clearTimeout( this._mouseDelayTimer ); 12836 delete this._mouseDelayTimer; 12837 } 12838 12839 this.ignoreMissingWhich = false; 12840 mouseHandled = false; 12841 event.preventDefault(); 12842 }, 12843 12844 _mouseDistanceMet: function( event ) { 12845 return ( Math.max( 12846 Math.abs( this._mouseDownEvent.pageX - event.pageX ), 12847 Math.abs( this._mouseDownEvent.pageY - event.pageY ) 12848 ) >= this.options.distance 12849 ); 12850 }, 12851 12852 _mouseDelayMet: function( /* event */ ) { 12853 return this.mouseDelayMet; 12854 }, 12855 12856 // These are placeholder methods, to be overriden by extending plugin 12857 _mouseStart: function( /* event */ ) {}, 12858 _mouseDrag: function( /* event */ ) {}, 12859 _mouseStop: function( /* event */ ) {}, 12860 _mouseCapture: function( /* event */ ) { 12861 return true; 12862 } 12863} ); 12864 12865 12866 12867// $.ui.plugin is deprecated. Use $.widget() extensions instead. 12868var plugin = $.ui.plugin = { 12869 add: function( module, option, set ) { 12870 var i, 12871 proto = $.ui[ module ].prototype; 12872 for ( i in set ) { 12873 proto.plugins[ i ] = proto.plugins[ i ] || []; 12874 proto.plugins[ i ].push( [ option, set[ i ] ] ); 12875 } 12876 }, 12877 call: function( instance, name, args, allowDisconnected ) { 12878 var i, 12879 set = instance.plugins[ name ]; 12880 12881 if ( !set ) { 12882 return; 12883 } 12884 12885 if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || 12886 instance.element[ 0 ].parentNode.nodeType === 11 ) ) { 12887 return; 12888 } 12889 12890 for ( i = 0; i < set.length; i++ ) { 12891 if ( instance.options[ set[ i ][ 0 ] ] ) { 12892 set[ i ][ 1 ].apply( instance.element, args ); 12893 } 12894 } 12895 } 12896}; 12897 12898 12899 12900var safeActiveElement = $.ui.safeActiveElement = function( document ) { 12901 var activeElement; 12902 12903 // Support: IE 9 only 12904 // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe> 12905 try { 12906 activeElement = document.activeElement; 12907 } catch ( error ) { 12908 activeElement = document.body; 12909 } 12910 12911 // Support: IE 9 - 11 only 12912 // IE may return null instead of an element 12913 // Interestingly, this only seems to occur when NOT in an iframe 12914 if ( !activeElement ) { 12915 activeElement = document.body; 12916 } 12917 12918 // Support: IE 11 only 12919 // IE11 returns a seemingly empty object in some cases when accessing 12920 // document.activeElement from an <iframe> 12921 if ( !activeElement.nodeName ) { 12922 activeElement = document.body; 12923 } 12924 12925 return activeElement; 12926}; 12927 12928 12929 12930var safeBlur = $.ui.safeBlur = function( element ) { 12931 12932 // Support: IE9 - 10 only 12933 // If the <body> is blurred, IE will switch windows, see #9420 12934 if ( element && element.nodeName.toLowerCase() !== "body" ) { 12935 $( element ).trigger( "blur" ); 12936 } 12937}; 12938 12939 12940/*! 12941 * jQuery UI Draggable 1.13.2 12942 * http://jqueryui.com 12943 * 12944 * Copyright jQuery Foundation and other contributors 12945 * Released under the MIT license. 12946 * http://jquery.org/license 12947 */ 12948 12949//>>label: Draggable 12950//>>group: Interactions 12951//>>description: Enables dragging functionality for any element. 12952//>>docs: http://api.jqueryui.com/draggable/ 12953//>>demos: http://jqueryui.com/draggable/ 12954//>>css.structure: ../../themes/base/draggable.css 12955 12956 12957$.widget( "ui.draggable", $.ui.mouse, { 12958 version: "1.13.2", 12959 widgetEventPrefix: "drag", 12960 options: { 12961 addClasses: true, 12962 appendTo: "parent", 12963 axis: false, 12964 connectToSortable: false, 12965 containment: false, 12966 cursor: "auto", 12967 cursorAt: false, 12968 grid: false, 12969 handle: false, 12970 helper: "original", 12971 iframeFix: false, 12972 opacity: false, 12973 refreshPositions: false, 12974 revert: false, 12975 revertDuration: 500, 12976 scope: "default", 12977 scroll: true, 12978 scrollSensitivity: 20, 12979 scrollSpeed: 20, 12980 snap: false, 12981 snapMode: "both", 12982 snapTolerance: 20, 12983 stack: false, 12984 zIndex: false, 12985 12986 // Callbacks 12987 drag: null, 12988 start: null, 12989 stop: null 12990 }, 12991 _create: function() { 12992 12993 if ( this.options.helper === "original" ) { 12994 this._setPositionRelative(); 12995 } 12996 if ( this.options.addClasses ) { 12997 this._addClass( "ui-draggable" ); 12998 } 12999 this._setHandleClassName(); 13000 13001 this._mouseInit(); 13002 }, 13003 13004 _setOption: function( key, value ) { 13005 this._super( key, value ); 13006 if ( key === "handle" ) { 13007 this._removeHandleClassName(); 13008 this._setHandleClassName(); 13009 } 13010 }, 13011 13012 _destroy: function() { 13013 if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) { 13014 this.destroyOnClear = true; 13015 return; 13016 } 13017 this._removeHandleClassName(); 13018 this._mouseDestroy(); 13019 }, 13020 13021 _mouseCapture: function( event ) { 13022 var o = this.options; 13023 13024 // Among others, prevent a drag on a resizable-handle 13025 if ( this.helper || o.disabled || 13026 $( event.target ).closest( ".ui-resizable-handle" ).length > 0 ) { 13027 return false; 13028 } 13029 13030 //Quit if we're not on a valid handle 13031 this.handle = this._getHandle( event ); 13032 if ( !this.handle ) { 13033 return false; 13034 } 13035 13036 this._blurActiveElement( event ); 13037 13038 this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix ); 13039 13040 return true; 13041 13042 }, 13043 13044 _blockFrames: function( selector ) { 13045 this.iframeBlocks = this.document.find( selector ).map( function() { 13046 var iframe = $( this ); 13047 13048 return $( "<div>" ) 13049 .css( "position", "absolute" ) 13050 .appendTo( iframe.parent() ) 13051 .outerWidth( iframe.outerWidth() ) 13052 .outerHeight( iframe.outerHeight() ) 13053 .offset( iframe.offset() )[ 0 ]; 13054 } ); 13055 }, 13056 13057 _unblockFrames: function() { 13058 if ( this.iframeBlocks ) { 13059 this.iframeBlocks.remove(); 13060 delete this.iframeBlocks; 13061 } 13062 }, 13063 13064 _blurActiveElement: function( event ) { 13065 var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ), 13066 target = $( event.target ); 13067 13068 // Don't blur if the event occurred on an element that is within 13069 // the currently focused element 13070 // See #10527, #12472 13071 if ( target.closest( activeElement ).length ) { 13072 return; 13073 } 13074 13075 // Blur any element that currently has focus, see #4261 13076 $.ui.safeBlur( activeElement ); 13077 }, 13078 13079 _mouseStart: function( event ) { 13080 13081 var o = this.options; 13082 13083 //Create and append the visible helper 13084 this.helper = this._createHelper( event ); 13085 13086 this._addClass( this.helper, "ui-draggable-dragging" ); 13087 13088 //Cache the helper size 13089 this._cacheHelperProportions(); 13090 13091 //If ddmanager is used for droppables, set the global draggable 13092 if ( $.ui.ddmanager ) { 13093 $.ui.ddmanager.current = this; 13094 } 13095 13096 /* 13097 * - Position generation - 13098 * This block generates everything position related - it's the core of draggables. 13099 */ 13100 13101 //Cache the margins of the original element 13102 this._cacheMargins(); 13103 13104 //Store the helper's css position 13105 this.cssPosition = this.helper.css( "position" ); 13106 this.scrollParent = this.helper.scrollParent( true ); 13107 this.offsetParent = this.helper.offsetParent(); 13108 this.hasFixedAncestor = this.helper.parents().filter( function() { 13109 return $( this ).css( "position" ) === "fixed"; 13110 } ).length > 0; 13111 13112 //The element's absolute position on the page minus margins 13113 this.positionAbs = this.element.offset(); 13114 this._refreshOffsets( event ); 13115 13116 //Generate the original position 13117 this.originalPosition = this.position = this._generatePosition( event, false ); 13118 this.originalPageX = event.pageX; 13119 this.originalPageY = event.pageY; 13120 13121 //Adjust the mouse offset relative to the helper if "cursorAt" is supplied 13122 if ( o.cursorAt ) { 13123 this._adjustOffsetFromHelper( o.cursorAt ); 13124 } 13125 13126 //Set a containment if given in the options 13127 this._setContainment(); 13128 13129 //Trigger event + callbacks 13130 if ( this._trigger( "start", event ) === false ) { 13131 this._clear(); 13132 return false; 13133 } 13134 13135 //Recache the helper size 13136 this._cacheHelperProportions(); 13137 13138 //Prepare the droppable offsets 13139 if ( $.ui.ddmanager && !o.dropBehaviour ) { 13140 $.ui.ddmanager.prepareOffsets( this, event ); 13141 } 13142 13143 // Execute the drag once - this causes the helper not to be visible before getting its 13144 // correct position 13145 this._mouseDrag( event, true ); 13146 13147 // If the ddmanager is used for droppables, inform the manager that dragging has started 13148 // (see #5003) 13149 if ( $.ui.ddmanager ) { 13150 $.ui.ddmanager.dragStart( this, event ); 13151 } 13152 13153 return true; 13154 }, 13155 13156 _refreshOffsets: function( event ) { 13157 this.offset = { 13158 top: this.positionAbs.top - this.margins.top, 13159 left: this.positionAbs.left - this.margins.left, 13160 scroll: false, 13161 parent: this._getParentOffset(), 13162 relative: this._getRelativeOffset() 13163 }; 13164 13165 this.offset.click = { 13166 left: event.pageX - this.offset.left, 13167 top: event.pageY - this.offset.top 13168 }; 13169 }, 13170 13171 _mouseDrag: function( event, noPropagation ) { 13172 13173 // reset any necessary cached properties (see #5009) 13174 if ( this.hasFixedAncestor ) { 13175 this.offset.parent = this._getParentOffset(); 13176 } 13177 13178 //Compute the helpers position 13179 this.position = this._generatePosition( event, true ); 13180 this.positionAbs = this._convertPositionTo( "absolute" ); 13181 13182 //Call plugins and callbacks and use the resulting position if something is returned 13183 if ( !noPropagation ) { 13184 var ui = this._uiHash(); 13185 if ( this._trigger( "drag", event, ui ) === false ) { 13186 this._mouseUp( new $.Event( "mouseup", event ) ); 13187 return false;
vendor: 3,655 bytes, lines 13188-13330
13188 } 13189 this.position = ui.position; 13190 } 13191 13192 this.helper[ 0 ].style.left = this.position.left + "px"; 13193 this.helper[ 0 ].style.top = this.position.top + "px"; 13194 13195 if ( $.ui.ddmanager ) { 13196 $.ui.ddmanager.drag( this, event ); 13197 } 13198 13199 return false; 13200 }, 13201 13202 _mouseStop: function( event ) { 13203 13204 //If we are using droppables, inform the manager about the drop 13205 var that = this, 13206 dropped = false; 13207 if ( $.ui.ddmanager && !this.options.dropBehaviour ) { 13208 dropped = $.ui.ddmanager.drop( this, event ); 13209 } 13210 13211 //if a drop comes from outside (a sortable) 13212 if ( this.dropped ) { 13213 dropped = this.dropped; 13214 this.dropped = false; 13215 } 13216 13217 if ( ( this.options.revert === "invalid" && !dropped ) || 13218 ( this.options.revert === "valid" && dropped ) || 13219 this.options.revert === true || ( typeof this.options.revert === "function" && 13220 this.options.revert.call( this.element, dropped ) ) 13221 ) { 13222 $( this.helper ).animate( 13223 this.originalPosition, 13224 parseInt( this.options.revertDuration, 10 ), 13225 function() { 13226 if ( that._trigger( "stop", event ) !== false ) { 13227 that._clear(); 13228 } 13229 } 13230 ); 13231 } else { 13232 if ( this._trigger( "stop", event ) !== false ) { 13233 this._clear(); 13234 } 13235 } 13236 13237 return false; 13238 }, 13239 13240 _mouseUp: function( event ) { 13241 this._unblockFrames(); 13242 13243 // If the ddmanager is used for droppables, inform the manager that dragging has stopped 13244 // (see #5003) 13245 if ( $.ui.ddmanager ) { 13246 $.ui.ddmanager.dragStop( this, event ); 13247 } 13248 13249 // Only need to focus if the event occurred on the draggable itself, see #10527 13250 if ( this.handleElement.is( event.target ) ) { 13251 13252 // The interaction is over; whether or not the click resulted in a drag, 13253 // focus the element 13254 this.element.trigger( "focus" ); 13255 } 13256 13257 return $.ui.mouse.prototype._mouseUp.call( this, event ); 13258 }, 13259 13260 cancel: function() { 13261 13262 if ( this.helper.is( ".ui-draggable-dragging" ) ) { 13263 this._mouseUp( new $.Event( "mouseup", { target: this.element[ 0 ] } ) ); 13264 } else { 13265 this._clear(); 13266 } 13267 13268 return this; 13269 13270 }, 13271 13272 _getHandle: function( event ) { 13273 return this.options.handle ? 13274 !!$( event.target ).closest( this.element.find( this.options.handle ) ).length : 13275 true; 13276 }, 13277 13278 _setHandleClassName: function() { 13279 this.handleElement = this.options.handle ? 13280 this.element.find( this.options.handle ) : this.element; 13281 this._addClass( this.handleElement, "ui-draggable-handle" ); 13282 }, 13283 13284 _removeHandleClassName: function() { 13285 this._removeClass( this.handleElement, "ui-draggable-handle" ); 13286 }, 13287 13288 _createHelper: function( event ) { 13289 13290 var o = this.options, 13291 helperIsFunction = typeof o.helper === "function", 13292 helper = helperIsFunction ? 13293 $( o.helper.apply( this.element[ 0 ], [ event ] ) ) : 13294 ( o.helper === "clone" ? 13295 this.element.clone().removeAttr( "id" ) : 13296 this.element ); 13297 13298 if ( !helper.parents( "body" ).length ) { 13299 helper.appendTo( ( o.appendTo === "parent" ? 13300 this.element[ 0 ].parentNode : 13301 o.appendTo ) ); 13302 } 13303 13304 // Http://bugs.jqueryui.com/ticket/9446 13305 // a helper function can return the original element 13306 // which wouldn't have been set to relative in _create 13307 if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) { 13308 this._setPositionRelative(); 13309 } 13310 13311 if ( helper[ 0 ] !== this.element[ 0 ] && 13312 !( /(fixed|absolute)/ ).test( helper.css( "position" ) ) ) { 13313 helper.css( "position", "absolute" ); 13314 } 13315 13316 return helper; 13317 13318 }, 13319 13320 _setPositionRelative: function() { 13321 if ( !( /^(?:r|a|f)/ ).test( this.element.css( "position" ) ) ) { 13322 this.element[ 0 ].style.position = "relative"; 13323 } 13324 }, 13325 13326 _adjustOffsetFromHelper: function( obj ) { 13327 if ( typeof obj === "string" ) { 13328 obj = obj.split( " " ); 13329 } 13330 if ( Array
vendor: 14,647 bytes, lines 13330-13810
13330.isArray( obj ) ) { 13331 obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 }; 13332 } 13333 if ( "left" in obj ) { 13334 this.offset.click.left = obj.left + this.margins.left; 13335 } 13336 if ( "right" in obj ) { 13337 this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; 13338 } 13339 if ( "top" in obj ) { 13340 this.offset.click.top = obj.top + this.margins.top; 13341 } 13342 if ( "bottom" in obj ) { 13343 this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; 13344 } 13345 }, 13346 13347 _isRootNode: function( element ) { 13348 return ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ]; 13349 }, 13350 13351 _getParentOffset: function() { 13352 13353 //Get the offsetParent and cache its position 13354 var po = this.offsetParent.offset(), 13355 document = this.document[ 0 ]; 13356 13357 // This is a special case where we need to modify a offset calculated on start, since the 13358 // following happened: 13359 // 1. The position of the helper is absolute, so it's position is calculated based on the 13360 // next positioned parent 13361 // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't 13362 // the document, which means that the scroll is included in the initial calculation of the 13363 // offset of the parent, and never recalculated upon drag 13364 if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== document && 13365 $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) { 13366 po.left += this.scrollParent.scrollLeft(); 13367 po.top += this.scrollParent.scrollTop(); 13368 } 13369 13370 if ( this._isRootNode( this.offsetParent[ 0 ] ) ) { 13371 po = { top: 0, left: 0 }; 13372 } 13373 13374 return { 13375 top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ), 13376 left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 ) 13377 }; 13378 13379 }, 13380 13381 _getRelativeOffset: function() { 13382 if ( this.cssPosition !== "relative" ) { 13383 return { top: 0, left: 0 }; 13384 } 13385 13386 var p = this.element.position(), 13387 scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ); 13388 13389 return { 13390 top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) + 13391 ( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ), 13392 left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) + 13393 ( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 ) 13394 }; 13395 13396 }, 13397 13398 _cacheMargins: function() { 13399 this.margins = { 13400 left: ( parseInt( this.element.css( "marginLeft" ), 10 ) || 0 ), 13401 top: ( parseInt( this.element.css( "marginTop" ), 10 ) || 0 ), 13402 right: ( parseInt( this.element.css( "marginRight" ), 10 ) || 0 ), 13403 bottom: ( parseInt( this.element.css( "marginBottom" ), 10 ) || 0 ) 13404 }; 13405 }, 13406 13407 _cacheHelperProportions: function() { 13408 this.helperProportions = { 13409 width: this.helper.outerWidth(), 13410 height: this.helper.outerHeight() 13411 }; 13412 }, 13413 13414 _setContainment: function() { 13415 13416 var isUserScrollable, c, ce, 13417 o = this.options, 13418 document = this.document[ 0 ]; 13419 13420 this.relativeContainer = null; 13421 13422 if ( !o.containment ) { 13423 this.containment = null; 13424 return; 13425 } 13426 13427 if ( o.containment === "window" ) { 13428 this.containment = [ 13429 $( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left, 13430 $( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top, 13431 $( window ).scrollLeft() + $( window ).width() - 13432 this.helperProportions.width - this.margins.left, 13433 $( window ).scrollTop() + 13434 ( $( window ).height() || document.body.parentNode.scrollHeight ) - 13435 this.helperProportions.height - this.margins.top 13436 ]; 13437 return; 13438 } 13439 13440 if ( o.containment === "document" ) { 13441 this.containment = [ 13442 0, 13443 0, 13444 $( document ).width() - this.helperProportions.width - this.margins.left, 13445 ( $( document ).height() || document.body.parentNode.scrollHeight ) - 13446 this.helperProportions.height - this.margins.top 13447 ]; 13448 return; 13449 } 13450 13451 if ( o.containment.constructor === Array ) { 13452 this.containment = o.containment; 13453 return; 13454 } 13455 13456 if ( o.containment === "parent" ) { 13457 o.containment = this.helper[ 0 ].parentNode; 13458 } 13459 13460 c = $( o.containment ); 13461 ce = c[ 0 ]; 13462 13463 if ( !ce ) { 13464 return; 13465 } 13466 13467 isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) ); 13468 13469 this.containment = [ 13470 ( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + 13471 ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ), 13472 ( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + 13473 ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ), 13474 ( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - 13475 ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - 13476 ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) - 13477 this.helperProportions.width - 13478 this.margins.left - 13479 this.margins.right, 13480 ( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - 13481 ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) - 13482 ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) - 13483 this.helperProportions.height - 13484 this.margins.top - 13485 this.margins.bottom 13486 ]; 13487 this.relativeContainer = c; 13488 }, 13489 13490 _convertPositionTo: function( d, pos ) { 13491 13492 if ( !pos ) { 13493 pos = this.position; 13494 } 13495 13496 var mod = d === "absolute" ? 1 : -1, 13497 scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ); 13498 13499 return { 13500 top: ( 13501 13502 // The absolute mouse position 13503 pos.top + 13504 13505 // Only for relative positioned nodes: Relative offset from element to offset parent 13506 this.offset.relative.top * mod + 13507 13508 // The offsetParent's offset without borders (offset + border) 13509 this.offset.parent.top * mod - 13510 ( ( this.cssPosition === "fixed" ? 13511 -this.offset.scroll.top : 13512 ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod ) 13513 ), 13514 left: ( 13515 13516 // The absolute mouse position 13517 pos.left + 13518 13519 // Only for relative positioned nodes: Relative offset from element to offset parent 13520 this.offset.relative.left * mod + 13521 13522 // The offsetParent's offset without borders (offset + border) 13523 this.offset.parent.left * mod - 13524 ( ( this.cssPosition === "fixed" ? 13525 -this.offset.scroll.left : 13526 ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod ) 13527 ) 13528 }; 13529 13530 }, 13531 13532 _generatePosition: function( event, constrainPosition ) { 13533 13534 var containment, co, top, left, 13535 o = this.options, 13536 scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ), 13537 pageX = event.pageX, 13538 pageY = event.pageY; 13539 13540 // Cache the scroll 13541 if ( !scrollIsRootNode || !this.offset.scroll ) { 13542 this.offset.scroll = { 13543 top: this.scrollParent.scrollTop(), 13544 left: this.scrollParent.scrollLeft() 13545 }; 13546 } 13547 13548 /* 13549 * - Position constraining - 13550 * Constrain the position to a mix of grid, containment. 13551 */ 13552 13553 // If we are not dragging yet, we won't check for options 13554 if ( constrainPosition ) { 13555 if ( this.containment ) { 13556 if ( this.relativeContainer ) { 13557 co = this.relativeContainer.offset(); 13558 containment = [ 13559 this.containment[ 0 ] + co.left, 13560 this.containment[ 1 ] + co.top, 13561 this.containment[ 2 ] + co.left, 13562 this.containment[ 3 ] + co.top 13563 ]; 13564 } else { 13565 containment = this.containment; 13566 } 13567 13568 if ( event.pageX - this.offset.click.left < containment[ 0 ] ) { 13569 pageX = containment[ 0 ] + this.offset.click.left; 13570 } 13571 if ( event.pageY - this.offset.click.top < containment[ 1 ] ) { 13572 pageY = containment[ 1 ] + this.offset.click.top; 13573 } 13574 if ( event.pageX - this.offset.click.left > containment[ 2 ] ) { 13575 pageX = containment[ 2 ] + this.offset.click.left; 13576 } 13577 if ( event.pageY - this.offset.click.top > containment[ 3 ] ) { 13578 pageY = containment[ 3 ] + this.offset.click.top; 13579 } 13580 } 13581 13582 if ( o.grid ) { 13583 13584 //Check for grid elements set to 0 to prevent divide by 0 error causing invalid 13585 // argument errors in IE (see ticket #6950) 13586 top = o.grid[ 1 ] ? this.originalPageY + Math.round( ( pageY - 13587 this.originalPageY ) / o.grid[ 1 ] ) * o.grid[ 1 ] : this.originalPageY; 13588 pageY = containment ? ( ( top - this.offset.click.top >= containment[ 1 ] || 13589 top - this.offset.click.top > containment[ 3 ] ) ? 13590 top : 13591 ( ( top - this.offset.click.top >= containment[ 1 ] ) ? 13592 top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) : top; 13593 13594 left = o.grid[ 0 ] ? this.originalPageX + 13595 Math.round( ( pageX - this.originalPageX ) / o.grid[ 0 ] ) * o.grid[ 0 ] : 13596 this.originalPageX; 13597 pageX = containment ? ( ( left - this.offset.click.left >= containment[ 0 ] || 13598 left - this.offset.click.left > containment[ 2 ] ) ? 13599 left : 13600 ( ( left - this.offset.click.left >= containment[ 0 ] ) ? 13601 left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) : left; 13602 } 13603 13604 if ( o.axis === "y" ) { 13605 pageX = this.originalPageX; 13606 } 13607 13608 if ( o.axis === "x" ) { 13609 pageY = this.originalPageY; 13610 } 13611 } 13612 13613 return { 13614 top: ( 13615 13616 // The absolute mouse position 13617 pageY - 13618 13619 // Click offset (relative to the element) 13620 this.offset.click.top - 13621 13622 // Only for relative positioned nodes: Relative offset from element to offset parent 13623 this.offset.relative.top - 13624 13625 // The offsetParent's offset without borders (offset + border) 13626 this.offset.parent.top + 13627 ( this.cssPosition === "fixed" ? 13628 -this.offset.scroll.top : 13629 ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) 13630 ), 13631 left: ( 13632 13633 // The absolute mouse position 13634 pageX - 13635 13636 // Click offset (relative to the element) 13637 this.offset.click.left - 13638 13639 // Only for relative positioned nodes: Relative offset from element to offset parent 13640 this.offset.relative.left - 13641 13642 // The offsetParent's offset without borders (offset + border) 13643 this.offset.parent.left + 13644 ( this.cssPosition === "fixed" ? 13645 -this.offset.scroll.left : 13646 ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) 13647 ) 13648 }; 13649 13650 }, 13651 13652 _clear: function() { 13653 this._removeClass( this.helper, "ui-draggable-dragging" ); 13654 if ( this.helper[ 0 ] !== this.element[ 0 ] && !this.cancelHelperRemoval ) { 13655 this.helper.remove(); 13656 } 13657 this.helper = null; 13658 this.cancelHelperRemoval = false; 13659 if ( this.destroyOnClear ) { 13660 this.destroy(); 13661 } 13662 }, 13663 13664 // From now on bulk stuff - mainly helpers 13665 13666 _trigger: function( type, event, ui ) { 13667 ui = ui || this._uiHash(); 13668 $.ui.plugin.call( this, type, [ event, ui, this ], true ); 13669 13670 // Absolute position and offset (see #6884 ) have to be recalculated after plugins 13671 if ( /^(drag|start|stop)/.test( type ) ) { 13672 this.positionAbs = this._convertPositionTo( "absolute" ); 13673 ui.offset = this.positionAbs; 13674 } 13675 return $.Widget.prototype._trigger.call( this, type, event, ui ); 13676 }, 13677 13678 plugins: {}, 13679 13680 _uiHash: function() { 13681 return { 13682 helper: this.helper, 13683 position: this.position, 13684 originalPosition: this.originalPosition, 13685 offset: this.positionAbs 13686 }; 13687 } 13688 13689} ); 13690 13691$.ui.plugin.add( "draggable", "connectToSortable", { 13692 start: function( event, ui, draggable ) { 13693 var uiSortable = $.extend( {}, ui, { 13694 item: draggable.element 13695 } ); 13696 13697 draggable.sortables = []; 13698 $( draggable.options.connectToSortable ).each( function() { 13699 var sortable = $( this ).sortable( "instance" ); 13700 13701 if ( sortable && !sortable.options.disabled ) { 13702 draggable.sortables.push( sortable ); 13703 13704 // RefreshPositions is called at drag start to refresh the containerCache 13705 // which is used in drag. This ensures it's initialized and synchronized 13706 // with any changes that might have happened on the page since initialization. 13707 sortable.refreshPositions(); 13708 sortable._trigger( "activate", event, uiSortable ); 13709 } 13710 } ); 13711 }, 13712 stop: function( event, ui, draggable ) { 13713 var uiSortable = $.extend( {}, ui, { 13714 item: draggable.element 13715 } ); 13716 13717 draggable.cancelHelperRemoval = false; 13718 13719 $.each( draggable.sortables, function() { 13720 var sortable = this; 13721 13722 if ( sortable.isOver ) { 13723 sortable.isOver = 0; 13724 13725 // Allow this sortable to handle removing the helper 13726 draggable.cancelHelperRemoval = true; 13727 sortable.cancelHelperRemoval = false; 13728 13729 // Use _storedCSS To restore properties in the sortable, 13730 // as this also handles revert (#9675) since the draggable 13731 // may have modified them in unexpected ways (#8809) 13732 sortable._storedCSS = { 13733 position: sortable.placeholder.css( "position" ), 13734 top: sortable.placeholder.css( "top" ), 13735 left: sortable.placeholder.css( "left" ) 13736 }; 13737 13738 sortable._mouseStop( event ); 13739 13740 // Once drag has ended, the sortable should return to using 13741 // its original helper, not the shared helper from draggable 13742 sortable.options.helper = sortable.options._helper; 13743 } else { 13744 13745 // Prevent this Sortable from removing the helper. 13746 // However, don't set the draggable to remove the helper 13747 // either as another connected Sortable may yet handle the removal. 13748 sortable.cancelHelperRemoval = true; 13749 13750 sortable._trigger( "deactivate", event, uiSortable ); 13751 } 13752 } ); 13753 }, 13754 drag: function( event, ui, draggable ) { 13755 $.each( draggable.sortables, function() { 13756 var innermostIntersecting = false, 13757 sortable = this; 13758 13759 // Copy over variables that sortable's _intersectsWith uses 13760 sortable.positionAbs = draggable.positionAbs; 13761 sortable.helperProportions = draggable.helperProportions; 13762 sortable.offset.click = draggable.offset.click; 13763 13764 if ( sortable._intersectsWith( sortable.containerCache ) ) { 13765 innermostIntersecting = true; 13766 13767 $.each( draggable.sortables, function() { 13768 13769 // Copy over variables that sortable's _intersectsWith uses 13770 this.positionAbs = draggable.positionAbs; 13771 this.helperProportions = draggable.helperProportions; 13772 this.offset.click = draggable.offset.click; 13773 13774 if ( this !== sortable && 13775 this._intersectsWith( this.containerCache ) && 13776 $.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) { 13777 innermostIntersecting = false; 13778 } 13779 13780 return innermostIntersecting; 13781 } ); 13782 } 13783 13784 if ( innermostIntersecting ) { 13785 13786 // If it intersects, we use a little isOver variable and set it once, 13787 // so that the move-in stuff gets fired only once. 13788 if ( !sortable.isOver ) { 13789 sortable.isOver = 1; 13790 13791 // Store draggable's parent in case we need to reappend to it later. 13792 draggable._parent = ui.helper.parent(); 13793 13794 sortable.currentItem = ui.helper 13795 .appendTo( sortable.element ) 13796 .data( "ui-sortable-item", true ); 13797 13798 // Store helper option to later restore it 13799 sortable.options._helper = sortable.options.helper; 13800 13801 sortable.options.helper = function() { 13802 return ui.helper[ 0 ]; 13803 }; 13804 13805 // Fire the start events of the sortable with our passed browser event, 13806 // and our own helper (so it doesn't create a new one) 13807 event.target = sortable.currentItem[ 0 ]; 13808 sortable._mouseCapture( event, true ); 13809 sortable._mouseStart( event, true, true ); 13810
vendor: 10,619 bytes, lines 13811-14176
13811 // Because the browser event is way off the new appended portlet, 13812 // modify necessary variables to reflect the changes 13813 sortable.offset.click.top = draggable.offset.click.top; 13814 sortable.offset.click.left = draggable.offset.click.left; 13815 sortable.offset.parent.left -= draggable.offset.parent.left - 13816 sortable.offset.parent.left; 13817 sortable.offset.parent.top -= draggable.offset.parent.top - 13818 sortable.offset.parent.top; 13819 13820 draggable._trigger( "toSortable", event ); 13821 13822 // Inform draggable that the helper is in a valid drop zone, 13823 // used solely in the revert option to handle "valid/invalid". 13824 draggable.dropped = sortable.element; 13825 13826 // Need to refreshPositions of all sortables in the case that 13827 // adding to one sortable changes the location of the other sortables (#9675) 13828 $.each( draggable.sortables, function() { 13829 this.refreshPositions(); 13830 } ); 13831 13832 // Hack so receive/update callbacks work (mostly) 13833 draggable.currentItem = draggable.element; 13834 sortable.fromOutside = draggable; 13835 } 13836 13837 if ( sortable.currentItem ) { 13838 sortable._mouseDrag( event ); 13839 13840 // Copy the sortable's position because the draggable's can potentially reflect 13841 // a relative position, while sortable is always absolute, which the dragged 13842 // element has now become. (#8809) 13843 ui.position = sortable.position; 13844 } 13845 } else { 13846 13847 // If it doesn't intersect with the sortable, and it intersected before, 13848 // we fake the drag stop of the sortable, but make sure it doesn't remove 13849 // the helper by using cancelHelperRemoval. 13850 if ( sortable.isOver ) { 13851 13852 sortable.isOver = 0; 13853 sortable.cancelHelperRemoval = true; 13854 13855 // Calling sortable's mouseStop would trigger a revert, 13856 // so revert must be temporarily false until after mouseStop is called. 13857 sortable.options._revert = sortable.options.revert; 13858 sortable.options.revert = false; 13859 13860 sortable._trigger( "out", event, sortable._uiHash( sortable ) ); 13861 sortable._mouseStop( event, true ); 13862 13863 // Restore sortable behaviors that were modfied 13864 // when the draggable entered the sortable area (#9481) 13865 sortable.options.revert = sortable.options._revert; 13866 sortable.options.helper = sortable.options._helper; 13867 13868 if ( sortable.placeholder ) { 13869 sortable.placeholder.remove(); 13870 } 13871 13872 // Restore and recalculate the draggable's offset considering the sortable 13873 // may have modified them in unexpected ways. (#8809, #10669) 13874 ui.helper.appendTo( draggable._parent ); 13875 draggable._refreshOffsets( event ); 13876 ui.position = draggable._generatePosition( event, true ); 13877 13878 draggable._trigger( "fromSortable", event ); 13879 13880 // Inform draggable that the helper is no longer in a valid drop zone 13881 draggable.dropped = false; 13882 13883 // Need to refreshPositions of all sortables just in case removing 13884 // from one sortable changes the location of other sortables (#9675) 13885 $.each( draggable.sortables, function() { 13886 this.refreshPositions(); 13887 } ); 13888 } 13889 } 13890 } ); 13891 } 13892} ); 13893 13894$.ui.plugin.add( "draggable", "cursor", { 13895 start: function( event, ui, instance ) { 13896 var t = $( "body" ), 13897 o = instance.options; 13898 13899 if ( t.css( "cursor" ) ) { 13900 o._cursor = t.css( "cursor" ); 13901 } 13902 t.css( "cursor", o.cursor ); 13903 }, 13904 stop: function( event, ui, instance ) { 13905 var o = instance.options; 13906 if ( o._cursor ) { 13907 $( "body" ).css( "cursor", o._cursor ); 13908 } 13909 } 13910} ); 13911 13912$.ui.plugin.add( "draggable", "opacity", { 13913 start: function( event, ui, instance ) { 13914 var t = $( ui.helper ), 13915 o = instance.options; 13916 if ( t.css( "opacity" ) ) { 13917 o._opacity = t.css( "opacity" ); 13918 } 13919 t.css( "opacity", o.opacity ); 13920 }, 13921 stop: function( event, ui, instance ) { 13922 var o = instance.options; 13923 if ( o._opacity ) { 13924 $( ui.helper ).css( "opacity", o._opacity ); 13925 } 13926 } 13927} ); 13928 13929$.ui.plugin.add( "draggable", "scroll", { 13930 start: function( event, ui, i ) { 13931 if ( !i.scrollParentNotHidden ) { 13932 i.scrollParentNotHidden = i.helper.scrollParent( false ); 13933 } 13934 13935 if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] && 13936 i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) { 13937 i.overflowOffset = i.scrollParentNotHidden.offset(); 13938 } 13939 }, 13940 drag: function( event, ui, i ) { 13941 13942 var o = i.options, 13943 scrolled = false, 13944 scrollParent = i.scrollParentNotHidden[ 0 ], 13945 document = i.document[ 0 ]; 13946 13947 if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) { 13948 if ( !o.axis || o.axis !== "x" ) { 13949 if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY < 13950 o.scrollSensitivity ) { 13951 scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed; 13952 } else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) { 13953 scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed; 13954 } 13955 } 13956 13957 if ( !o.axis || o.axis !== "y" ) { 13958 if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX < 13959 o.scrollSensitivity ) { 13960 scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed; 13961 } else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) { 13962 scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed; 13963 } 13964 } 13965 13966 } else { 13967 13968 if ( !o.axis || o.axis !== "x" ) { 13969 if ( event.pageY - $( document ).scrollTop() < o.scrollSensitivity ) { 13970 scrolled = $( document ).scrollTop( $( document ).scrollTop() - o.scrollSpeed ); 13971 } else if ( $( window ).height() - ( event.pageY - $( document ).scrollTop() ) < 13972 o.scrollSensitivity ) { 13973 scrolled = $( document ).scrollTop( $( document ).scrollTop() + o.scrollSpeed ); 13974 } 13975 } 13976 13977 if ( !o.axis || o.axis !== "y" ) { 13978 if ( event.pageX - $( document ).scrollLeft() < o.scrollSensitivity ) { 13979 scrolled = $( document ).scrollLeft( 13980 $( document ).scrollLeft() - o.scrollSpeed 13981 ); 13982 } else if ( $( window ).width() - ( event.pageX - $( document ).scrollLeft() ) < 13983 o.scrollSensitivity ) { 13984 scrolled = $( document ).scrollLeft( 13985 $( document ).scrollLeft() + o.scrollSpeed 13986 ); 13987 } 13988 } 13989 13990 } 13991 13992 if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) { 13993 $.ui.ddmanager.prepareOffsets( i, event ); 13994 } 13995 13996 } 13997} ); 13998 13999$.ui.plugin.add( "draggable", "snap", { 14000 start: function( event, ui, i ) { 14001 14002 var o = i.options; 14003 14004 i.snapElements = []; 14005 14006 $( o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap ) 14007 .each( function() { 14008 var $t = $( this ), 14009 $o = $t.offset(); 14010 if ( this !== i.element[ 0 ] ) { 14011 i.snapElements.push( { 14012 item: this, 14013 width: $t.outerWidth(), height: $t.outerHeight(), 14014 top: $o.top, left: $o.left 14015 } ); 14016 } 14017 } ); 14018 14019 }, 14020 drag: function( event, ui, inst ) { 14021 14022 var ts, bs, ls, rs, l, r, t, b, i, first, 14023 o = inst.options, 14024 d = o.snapTolerance, 14025 x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width, 14026 y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height; 14027 14028 for ( i = inst.snapElements.length - 1; i >= 0; i-- ) { 14029 14030 l = inst.snapElements[ i ].left - inst.margins.left; 14031 r = l + inst.snapElements[ i ].width; 14032 t = inst.snapElements[ i ].top - inst.margins.top; 14033 b = t + inst.snapElements[ i ].height; 14034 14035 if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || 14036 !$.contains( inst.snapElements[ i ].item.ownerDocument, 14037 inst.snapElements[ i ].item ) ) { 14038 if ( inst.snapElements[ i ].snapping ) { 14039 if ( inst.options.snap.release ) { 14040 inst.options.snap.release.call( 14041 inst.element, 14042 event, 14043 $.extend( inst._uiHash(), { snapItem: inst.snapElements[ i ].item } ) 14044 ); 14045 } 14046 } 14047 inst.snapElements[ i ].snapping = false; 14048 continue; 14049 } 14050 14051 if ( o.snapMode !== "inner" ) { 14052 ts = Math.abs( t - y2 ) <= d; 14053 bs = Math.abs( b - y1 ) <= d; 14054 ls = Math.abs( l - x2 ) <= d; 14055 rs = Math.abs( r - x1 ) <= d; 14056 if ( ts ) { 14057 ui.position.top = inst._convertPositionTo( "relative", { 14058 top: t - inst.helperProportions.height, 14059 left: 0 14060 } ).top; 14061 } 14062 if ( bs ) { 14063 ui.position.top = inst._convertPositionTo( "relative", { 14064 top: b, 14065 left: 0 14066 } ).top; 14067 } 14068 if ( ls ) { 14069 ui.position.left = inst._convertPositionTo( "relative", { 14070 top: 0, 14071 left: l - inst.helperProportions.width 14072 } ).left; 14073 } 14074 if ( rs ) { 14075 ui.position.left = inst._convertPositionTo( "relative", { 14076 top: 0, 14077 left: r 14078 } ).left; 14079 } 14080 } 14081 14082 first = ( ts || bs || ls || rs ); 14083 14084 if ( o.snapMode !== "outer" ) { 14085 ts = Math.abs( t - y1 ) <= d; 14086 bs = Math.abs( b - y2 ) <= d; 14087 ls = Math.abs( l - x1 ) <= d; 14088 rs = Math.abs( r - x2 ) <= d; 14089 if ( ts ) { 14090 ui.position.top = inst._convertPositionTo( "relative", { 14091 top: t, 14092 left: 0 14093 } ).top; 14094 } 14095 if ( bs ) { 14096 ui.position.top = inst._convertPositionTo( "relative", { 14097 top: b - inst.helperProportions.height, 14098 left: 0 14099 } ).top; 14100 } 14101 if ( ls ) { 14102 ui.position.left = inst._convertPositionTo( "relative", { 14103 top: 0, 14104 left: l 14105 } ).left; 14106 } 14107 if ( rs ) { 14108 ui.position.left = inst._convertPositionTo( "relative", { 14109 top: 0, 14110 left: r - inst.helperProportions.width 14111 } ).left; 14112 } 14113 } 14114 14115 if ( !inst.snapElements[ i ].snapping && ( ts || bs || ls || rs || first ) ) { 14116 if ( inst.options.snap.snap ) { 14117 inst.options.snap.snap.call( 14118 inst.element, 14119 event, 14120 $.extend( inst._uiHash(), { 14121 snapItem: inst.snapElements[ i ].item 14122 } ) ); 14123 } 14124 } 14125 inst.snapElements[ i ].snapping = ( ts || bs || ls || rs || first ); 14126 14127 } 14128 14129 } 14130} ); 14131 14132$.ui.plugin.add( "draggable", "stack", { 14133 start: function( event, ui, instance ) { 14134 var min, 14135 o = instance.options, 14136 group = $.makeArray( $( o.stack ) ).sort( function( a, b ) { 14137 return ( parseInt( $( a ).css( "zIndex" ), 10 ) || 0 ) - 14138 ( parseInt( $( b ).css( "zIndex" ), 10 ) || 0 ); 14139 } ); 14140 14141 if ( !group.length ) { 14142 return; 14143 } 14144 14145 min = parseInt( $( group[ 0 ] ).css( "zIndex" ), 10 ) || 0; 14146 $( group ).each( function( i ) { 14147 $( this ).css( "zIndex", min + i ); 14148 } ); 14149 this.css( "zIndex", ( min + group.length ) ); 14150 } 14151} ); 14152 14153$.ui.plugin.add( "draggable", "zIndex", { 14154 start: function( event, ui, instance ) { 14155 var t = $( ui.helper ), 14156 o = instance.options; 14157 14158 if ( t.css( "zIndex" ) ) { 14159 o._zIndex = t.css( "zIndex" ); 14160 } 14161 t.css( "zIndex", o.zIndex ); 14162 }, 14163 stop: function( event, ui, instance ) { 14164 var o = instance.options; 14165 14166 if ( o._zIndex ) { 14167 $( ui.helper ).css( "zIndex", o._zIndex ); 14168 } 14169 } 14170} ); 14171 14172var widgetsDraggable = $.ui.draggable; 14173 14174 14175/*! 14176 * jQuery UI
14176Droppable 1.13.2 14177 * http://jqueryui.com 14178 * 14179 * Copyright jQuery Foundation and other contributors 14180 * Released under the MIT license. 14181 * http://jquery.org/license 14182 */ 14183 14184//>>label: Droppable 14185//>>group: Interactions 14186//>>description: Enables drop targets for draggable elements. 14187//>>docs: http://api.jqueryui.com/droppable/ 14188//>>demos: http://jqueryui.com/droppable/ 14189 14190 14191$.widget( "ui.droppable", { 14192 version: "1.13
vendor: 11,313 bytes, lines 14192-14620
14192.2", 14193 widgetEventPrefix: "drop", 14194 options: { 14195 accept: "*", 14196 addClasses: true, 14197 greedy: false, 14198 scope: "default", 14199 tolerance: "intersect", 14200 14201 // Callbacks 14202 activate: null, 14203 deactivate: null, 14204 drop: null, 14205 out: null, 14206 over: null 14207 }, 14208 _create: function() { 14209 14210 var proportions, 14211 o = this.options, 14212 accept = o.accept; 14213 14214 this.isover = false; 14215 this.isout = true; 14216 14217 this.accept = typeof accept === "function" ? accept : function( d ) { 14218 return d.is( accept ); 14219 }; 14220 14221 this.proportions = function( /* valueToWrite */ ) { 14222 if ( arguments.length ) { 14223 14224 // Store the droppable's proportions 14225 proportions = arguments[ 0 ]; 14226 } else { 14227 14228 // Retrieve or derive the droppable's proportions 14229 return proportions ? 14230 proportions : 14231 proportions = { 14232 width: this.element[ 0 ].offsetWidth, 14233 height: this.element[ 0 ].offsetHeight 14234 }; 14235 } 14236 }; 14237 14238 this._addToManager( o.scope ); 14239 14240 if ( o.addClasses ) { 14241 this._addClass( "ui-droppable" ); 14242 } 14243 14244 }, 14245 14246 _addToManager: function( scope ) { 14247 14248 // Add the reference and positions to the manager 14249 $.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || []; 14250 $.ui.ddmanager.droppables[ scope ].push( this ); 14251 }, 14252 14253 _splice: function( drop ) { 14254 var i = 0; 14255 for ( ; i < drop.length; i++ ) { 14256 if ( drop[ i ] === this ) { 14257 drop.splice( i, 1 ); 14258 } 14259 } 14260 }, 14261 14262 _destroy: function() { 14263 var drop = $.ui.ddmanager.droppables[ this.options.scope ]; 14264 14265 this._splice( drop ); 14266 }, 14267 14268 _setOption: function( key, value ) { 14269 14270 if ( key === "accept" ) { 14271 this.accept = typeof value === "function" ? value : function( d ) { 14272 return d.is( value ); 14273 }; 14274 } else if ( key === "scope" ) { 14275 var drop = $.ui.ddmanager.droppables[ this.options.scope ]; 14276 14277 this._splice( drop ); 14278 this._addToManager( value ); 14279 } 14280 14281 this._super( key, value ); 14282 }, 14283 14284 _activate: function( event ) { 14285 var draggable = $.ui.ddmanager.current; 14286 14287 this._addActiveClass(); 14288 if ( draggable ) { 14289 this._trigger( "activate", event, this.ui( draggable ) ); 14290 } 14291 }, 14292 14293 _deactivate: function( event ) { 14294 var draggable = $.ui.ddmanager.current; 14295 14296 this._removeActiveClass(); 14297 if ( draggable ) { 14298 this._trigger( "deactivate", event, this.ui( draggable ) ); 14299 } 14300 }, 14301 14302 _over: function( event ) { 14303 14304 var draggable = $.ui.ddmanager.current; 14305 14306 // Bail if draggable and droppable are same element 14307 if ( !draggable || ( draggable.currentItem || 14308 draggable.element )[ 0 ] === this.element[ 0 ] ) { 14309 return; 14310 } 14311 14312 if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || 14313 draggable.element ) ) ) { 14314 this._addHoverClass(); 14315 this._trigger( "over", event, this.ui( draggable ) ); 14316 } 14317 14318 }, 14319 14320 _out: function( event ) { 14321 14322 var draggable = $.ui.ddmanager.current; 14323 14324 // Bail if draggable and droppable are same element 14325 if ( !draggable || ( draggable.currentItem || 14326 draggable.element )[ 0 ] === this.element[ 0 ] ) { 14327 return; 14328 } 14329 14330 if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || 14331 draggable.element ) ) ) { 14332 this._removeHoverClass(); 14333 this._trigger( "out", event, this.ui( draggable ) ); 14334 } 14335 14336 }, 14337 14338 _drop: function( event, custom ) { 14339 14340 var draggable = custom || $.ui.ddmanager.current, 14341 childrenIntersection = false; 14342 14343 // Bail if draggable and droppable are same element 14344 if ( !draggable || ( draggable.currentItem || 14345 draggable.element )[ 0 ] === this.element[ 0 ] ) { 14346 return false; 14347 } 14348 14349 this.element 14350 .find( ":data(ui-droppable)" ) 14351 .not( ".ui-draggable-dragging" ) 14352 .each( function() { 14353 var inst = $( this ).droppable( "instance" ); 14354 if ( 14355 inst.options.greedy && 14356 !inst.options.disabled && 14357 inst.options.scope === draggable.options.scope && 14358 inst.accept.call( 14359 inst.element[ 0 ], ( draggable.currentItem || draggable.element ) 14360 ) && 14361 $.ui.intersect( 14362 draggable, 14363 $.extend( inst, { offset: inst.element.offset() } ), 14364 inst.options.tolerance, event 14365 ) 14366 ) { 14367 childrenIntersection = true; 14368 return false; 14369 } 14370 } ); 14371 if ( childrenIntersection ) { 14372 return false; 14373 } 14374 14375 if ( this.accept.call( this.element[ 0 ], 14376 ( draggable.currentItem || draggable.element ) ) ) { 14377 this._removeActiveClass(); 14378 this._removeHoverClass(); 14379 14380 this._trigger( "drop", event, this.ui( draggable ) ); 14381 return this.element; 14382 } 14383 14384 return false; 14385 14386 }, 14387 14388 ui: function( c ) { 14389 return { 14390 draggable: ( c.currentItem || c.element ), 14391 helper: c.helper, 14392 position: c.position, 14393 offset: c.positionAbs 14394 }; 14395 }, 14396 14397 // Extension points just to make backcompat sane and avoid duplicating logic 14398 // TODO: Remove in 1.14 along with call to it below 14399 _addHoverClass: function() { 14400 this._addClass( "ui-droppable-hover" ); 14401 }, 14402 14403 _removeHoverClass: function() { 14404 this._removeClass( "ui-droppable-hover" ); 14405 }, 14406 14407 _addActiveClass: function() { 14408 this._addClass( "ui-droppable-active" ); 14409 }, 14410 14411 _removeActiveClass: function() { 14412 this._removeClass( "ui-droppable-active" ); 14413 } 14414} ); 14415 14416$.ui.intersect = ( function() { 14417 function isOverAxis( x, reference, size ) { 14418 return ( x >= reference ) && ( x < ( reference + size ) ); 14419 } 14420 14421 return function( draggable, droppable, toleranceMode, event ) { 14422 14423 if ( !droppable.offset ) { 14424 return false; 14425 } 14426 14427 var x1 = ( draggable.positionAbs || 14428 draggable.position.absolute ).left + draggable.margins.left, 14429 y1 = ( draggable.positionAbs || 14430 draggable.position.absolute ).top + draggable.margins.top, 14431 x2 = x1 + draggable.helperProportions.width, 14432 y2 = y1 + draggable.helperProportions.height, 14433 l = droppable.offset.left, 14434 t = droppable.offset.top, 14435 r = l + droppable.proportions().width, 14436 b = t + droppable.proportions().height; 14437 14438 switch ( toleranceMode ) { 14439 case "fit": 14440 return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b ); 14441 case "intersect": 14442 return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half 14443 x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half 14444 t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half 14445 y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half 14446 case "pointer": 14447 return isOverAxis( event.pageY, t, droppable.proportions().height ) && 14448 isOverAxis( event.pageX, l, droppable.proportions().width ); 14449 case "touch": 14450 return ( 14451 ( y1 >= t && y1 <= b ) || // Top edge touching 14452 ( y2 >= t && y2 <= b ) || // Bottom edge touching 14453 ( y1 < t && y2 > b ) // Surrounded vertically 14454 ) && ( 14455 ( x1 >= l && x1 <= r ) || // Left edge touching 14456 ( x2 >= l && x2 <= r ) || // Right edge touching 14457 ( x1 < l && x2 > r ) // Surrounded horizontally 14458 ); 14459 default: 14460 return false; 14461 } 14462 }; 14463} )(); 14464 14465/* 14466 This manager tracks offsets of draggables and droppables 14467*/ 14468$.ui.ddmanager = { 14469 current: null, 14470 droppables: { "default": [] }, 14471 prepareOffsets: function( t, event ) { 14472 14473 var i, j, 14474 m = $.ui.ddmanager.droppables[ t.options.scope ] || [], 14475 type = event ? event.type : null, // workaround for #2317 14476 list = ( t.currentItem || t.element ).find( ":data(ui-droppable)" ).addBack(); 14477 14478 droppablesLoop: for ( i = 0; i < m.length; i++ ) { 14479 14480 // No disabled and non-accepted 14481 if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ], 14482 ( t.currentItem || t.element ) ) ) ) { 14483 continue; 14484 } 14485 14486 // Filter out elements in the current dragged item 14487 for ( j = 0; j < list.length; j++ ) { 14488 if ( list[ j ] === m[ i ].element[ 0 ] ) { 14489 m[ i ].proportions().height = 0; 14490 continue droppablesLoop; 14491 } 14492 } 14493 14494 m[ i ].visible = m[ i ].element.css( "display" ) !== "none"; 14495 if ( !m[ i ].visible ) { 14496 continue; 14497 } 14498 14499 // Activate the droppable if used directly from draggables 14500 if ( type === "mousedown" ) { 14501 m[ i ]._activate.call( m[ i ], event ); 14502 } 14503 14504 m[ i ].offset = m[ i ].element.offset(); 14505 m[ i ].proportions( { 14506 width: m[ i ].element[ 0 ].offsetWidth, 14507 height: m[ i ].element[ 0 ].offsetHeight 14508 } ); 14509 14510 } 14511 14512 }, 14513 drop: function( draggable, event ) { 14514 14515 var dropped = false; 14516 14517 // Create a copy of the droppables in case the list changes during the drop (#9116) 14518 $.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() { 14519 14520 if ( !this.options ) { 14521 return; 14522 } 14523 if ( !this.options.disabled && this.visible && 14524 $.ui.intersect( draggable, this, this.options.tolerance, event ) ) { 14525 dropped = this._drop.call( this, event ) || dropped; 14526 } 14527 14528 if ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ], 14529 ( draggable.currentItem || draggable.element ) ) ) { 14530 this.isout = true; 14531 this.isover = false; 14532 this._deactivate.call( this, event ); 14533 } 14534 14535 } ); 14536 return dropped; 14537 14538 }, 14539 dragStart: function( draggable, event ) { 14540 14541 // Listen for scrolling so that if the dragging causes scrolling the position of the 14542 // droppables can be recalculated (see #5003) 14543 draggable.element.parentsUntil( "body" ).on( "scroll.droppable", function() { 14544 if ( !draggable.options.refreshPositions ) { 14545 $.ui.ddmanager.prepareOffsets( draggable, event ); 14546 } 14547 } ); 14548 }, 14549 drag: function( draggable, event ) { 14550 14551 // If you have a highly dynamic page, you might try this option. It renders positions 14552 // every time you move the mouse. 14553 if ( draggable.options.refreshPositions ) { 14554 $.ui.ddmanager.prepareOffsets( draggable, event ); 14555 } 14556 14557 // Run through all droppables and check their positions based on specific tolerance options 14558 $.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() { 14559 14560 if ( this.options.disabled || this.greedyChild || !this.visible ) { 14561 return; 14562 } 14563 14564 var parentInstance, scope, parent, 14565 intersects = $.ui.intersect( draggable, this, this.options.tolerance, event ), 14566 c = !intersects && this.isover ? 14567 "isout" : 14568 ( intersects && !this.isover ? "isover" : null ); 14569 if ( !c ) { 14570 return; 14571 } 14572 14573 if ( this.options.greedy ) { 14574 14575 // find droppable parents with same scope 14576 scope = this.options.scope; 14577 parent = this.element.parents( ":data(ui-droppable)" ).filter( function() { 14578 return $( this ).droppable( "instance" ).options.scope === scope; 14579 } ); 14580 14581 if ( parent.length ) { 14582 parentInstance = $( parent[ 0 ] ).droppable( "instance" ); 14583 parentInstance.greedyChild = ( c === "isover" ); 14584 } 14585 } 14586 14587 // We just moved into a greedy child 14588 if ( parentInstance && c === "isover" ) { 14589 parentInstance.isover = false; 14590 parentInstance.isout = true; 14591 parentInstance._out.call( parentInstance, event ); 14592 } 14593 14594 this[ c ] = true; 14595 this[ c === "isout" ? "isover" : "isout" ] = false; 14596 this[ c === "isover" ? "_over" : "_out" ].call( this, event ); 14597 14598 // We just moved out of a greedy child 14599 if ( parentInstance && c === "isout" ) { 14600 parentInstance.isout = false; 14601 parentInstance.isover = true; 14602 parentInstance._over.call( parentInstance, event ); 14603 } 14604 } ); 14605 14606 }, 14607 dragStop: function( draggable, event ) { 14608 draggable.element.parentsUntil( "body" ).off( "scroll.droppable" ); 14609 14610 // Call prepareOffsets one final time since IE does not fire return scroll events when 14611 // overflow was caused by drag (see #5003) 14612 if ( !draggable.options.refreshPositions ) { 14613 $.ui.ddmanager.prepareOffsets( draggable, event ); 14614 } 14615 } 14616}; 14617 14618// DEPRECATED 14619// TODO: switch return back to widget declaration at top of file when this is removed 14620if ( $.uiBackCompat
14620!== false ) { 14621 14622 // Backcompat for activeClass and hoverClass options 14623 $.widget( "ui.droppable", $.ui.droppable, { 14624 options: { 14625 hoverClass: false, 14626 activeClass: false 14627 }, 14628 _addActiveClass: function() { 14629 this._super(); 14630 if ( this.options.activeClass ) { 14631 this.element.addClass( this.options.activeClass ); 14632 } 14633 }, 14634 _removeActiveClass: function() { 14635 this._super(); 14636 if ( this.options.activeClass ) { 14637 this.element.removeClass( this.options.activeClass ); 14638 } 14639 }, 14640 _addHoverClass: function() { 14641 this._super(); 14642 if ( this.options.hoverClass ) { 14643 this.element.addClass( this.options.hoverClass ); 14644 } 14645 }, 14646 _removeHoverClass: function() { 14647 this._super(); 14648 if ( this.options.hoverClass ) { 14649 this.element.removeClass( this.options.hoverClass ); 14650 } 14651 } 14652 } ); 14653} 14654 14655var widgetsDroppable = $.ui.droppable; 14656 14657 14658/*! 14659 * jQuery UI Resizable 1.13.2 14660 * http://jqueryui.com 14661 * 14662 * Copyright jQuery Foundation and other contributors 14663 * Released under the MIT license. 14664 * http://jquery.org/license 14665 */ 14666 14667//>>label: Resizable 14668//>>group: Interactions 14669//>>description: Enables resize functionality for any element. 14670//>>docs: http://api.jqueryui.com/resizable/ 14671//>>demos: http://jqueryui.com/resizable/ 14672//>>css.structure: ../../themes/base/core.css 14673//>>css.structure: ../../themes/base/resizable.css 14674//>>css.theme: ../../themes/base/theme.css 14675 14676 14677$.widget( "ui.resizable", $.ui.mouse, { 14678 version: "1.13.2
vendor: 11,739 bytes, lines 14678-15171
14678", 14679 widgetEventPrefix: "resize", 14680 options: { 14681 alsoResize: false, 14682 animate: false, 14683 animateDuration: "slow", 14684 animateEasing: "swing", 14685 aspectRatio: false, 14686 autoHide: false, 14687 classes: { 14688 "ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se" 14689 }, 14690 containment: false, 14691 ghost: false, 14692 grid: false, 14693 handles: "e,s,se", 14694 helper: false, 14695 maxHeight: null, 14696 maxWidth: null, 14697 minHeight: 10, 14698 minWidth: 10, 14699 14700 // See #7960 14701 zIndex: 90, 14702 14703 // Callbacks 14704 resize: null, 14705 start: null, 14706 stop: null 14707 }, 14708 14709 _num: function( value ) { 14710 return parseFloat( value ) || 0; 14711 }, 14712 14713 _isNumber: function( value ) { 14714 return !isNaN( parseFloat( value ) ); 14715 }, 14716 14717 _hasScroll: function( el, a ) { 14718 14719 if ( $( el ).css( "overflow" ) === "hidden" ) { 14720 return false; 14721 } 14722 14723 var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", 14724 has = false; 14725 14726 if ( el[ scroll ] > 0 ) { 14727 return true; 14728 } 14729 14730 // TODO: determine which cases actually cause this to happen 14731 // if the element doesn't have the scroll set, see if it's possible to 14732 // set the scroll 14733 try { 14734 el[ scroll ] = 1; 14735 has = ( el[ scroll ] > 0 ); 14736 el[ scroll ] = 0; 14737 } catch ( e ) { 14738 14739 // `el` might be a string, then setting `scroll` will throw 14740 // an error in strict mode; ignore it. 14741 } 14742 return has; 14743 }, 14744 14745 _create: function() { 14746 14747 var margins, 14748 o = this.options, 14749 that = this; 14750 this._addClass( "ui-resizable" ); 14751 14752 $.extend( this, { 14753 _aspectRatio: !!( o.aspectRatio ), 14754 aspectRatio: o.aspectRatio, 14755 originalElement: this.element, 14756 _proportionallyResizeElements: [], 14757 _helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null 14758 } ); 14759 14760 // Wrap the element if it cannot hold child nodes 14761 if ( this.element[ 0 ].nodeName.match( /^(canvas|textarea|input|select|button|img)$/i ) ) { 14762 14763 this.element.wrap( 14764 $( "<div class='ui-wrapper'></div>" ).css( { 14765 overflow: "hidden", 14766 position: this.element.css( "position" ), 14767 width: this.element.outerWidth(), 14768 height: this.element.outerHeight(), 14769 top: this.element.css( "top" ), 14770 left: this.element.css( "left" ) 14771 } ) 14772 ); 14773 14774 this.element = this.element.parent().data( 14775 "ui-resizable", this.element.resizable( "instance" ) 14776 ); 14777 14778 this.elementIsWrapper = true; 14779 14780 margins = { 14781 marginTop: this.originalElement.css( "marginTop" ), 14782 marginRight: this.originalElement.css( "marginRight" ), 14783 marginBottom: this.originalElement.css( "marginBottom" ), 14784 marginLeft: this.originalElement.css( "marginLeft" ) 14785 }; 14786 14787 this.element.css( margins ); 14788 this.originalElement.css( "margin", 0 ); 14789 14790 // support: Safari 14791 // Prevent Safari textarea resize 14792 this.originalResizeStyle = this.originalElement.css( "resize" ); 14793 this.originalElement.css( "resize", "none" ); 14794 14795 this._proportionallyResizeElements.push( this.originalElement.css( { 14796 position: "static", 14797 zoom: 1, 14798 display: "block" 14799 } ) ); 14800 14801 // Support: IE9 14802 // avoid IE jump (hard set the margin) 14803 this.originalElement.css( margins ); 14804 14805 this._proportionallyResize(); 14806 } 14807 14808 this._setupHandles(); 14809 14810 if ( o.autoHide ) { 14811 $( this.element ) 14812 .on( "mouseenter", function() { 14813 if ( o.disabled ) { 14814 return; 14815 } 14816 that._removeClass( "ui-resizable-autohide" ); 14817 that._handles.show(); 14818 } ) 14819 .on( "mouseleave", function() { 14820 if ( o.disabled ) { 14821 return; 14822 } 14823 if ( !that.resizing ) { 14824 that._addClass( "ui-resizable-autohide" ); 14825 that._handles.hide(); 14826 } 14827 } ); 14828 } 14829 14830 this._mouseInit(); 14831 }, 14832 14833 _destroy: function() { 14834 14835 this._mouseDestroy(); 14836 this._addedHandles.remove(); 14837 14838 var wrapper, 14839 _destroy = function( exp ) { 14840 $( exp ) 14841 .removeData( "resizable" ) 14842 .removeData( "ui-resizable" ) 14843 .off( ".resizable" ); 14844 }; 14845 14846 // TODO: Unwrap at same DOM position 14847 if ( this.elementIsWrapper ) { 14848 _destroy( this.element ); 14849 wrapper = this.element; 14850 this.originalElement.css( { 14851 position: wrapper.css( "position" ), 14852 width: wrapper.outerWidth(), 14853 height: wrapper.outerHeight(), 14854 top: wrapper.css( "top" ), 14855 left: wrapper.css( "left" ) 14856 } ).insertAfter( wrapper ); 14857 wrapper.remove(); 14858 } 14859 14860 this.originalElement.css( "resize", this.originalResizeStyle ); 14861 _destroy( this.originalElement ); 14862 14863 return this; 14864 }, 14865 14866 _setOption: function( key, value ) { 14867 this._super( key, value ); 14868 14869 switch ( key ) { 14870 case "handles": 14871 this._removeHandles(); 14872 this._setupHandles(); 14873 break; 14874 case "aspectRatio": 14875 this._aspectRatio = !!value; 14876 break; 14877 default: 14878 break; 14879 } 14880 }, 14881 14882 _setupHandles: function() { 14883 var o = this.options, handle, i, n, hname, axis, that = this; 14884 this.handles = o.handles || 14885 ( !$( ".ui-resizable-handle", this.element ).length ? 14886 "e,s,se" : { 14887 n: ".ui-resizable-n", 14888 e: ".ui-resizable-e", 14889 s: ".ui-resizable-s", 14890 w: ".ui-resizable-w", 14891 se: ".ui-resizable-se", 14892 sw: ".ui-resizable-sw", 14893 ne: ".ui-resizable-ne", 14894 nw: ".ui-resizable-nw" 14895 } ); 14896 14897 this._handles = $(); 14898 this._addedHandles = $(); 14899 if ( this.handles.constructor === String ) { 14900 14901 if ( this.handles === "all" ) { 14902 this.handles = "n,e,s,w,se,sw,ne,nw"; 14903 } 14904 14905 n = this.handles.split( "," ); 14906 this.handles = {}; 14907 14908 for ( i = 0; i < n.length; i++ ) { 14909 14910 handle = String.prototype.trim.call( n[ i ] ); 14911 hname = "ui-resizable-" + handle; 14912 axis = $( "<div>" ); 14913 this._addClass( axis, "ui-resizable-handle " + hname ); 14914 14915 axis.css( { zIndex: o.zIndex } ); 14916 14917 this.handles[ handle ] = ".ui-resizable-" + handle; 14918 if ( !this.element.children( this.handles[ handle ] ).length ) { 14919 this.element.append( axis ); 14920 this._addedHandles = this._addedHandles.add( axis ); 14921 } 14922 } 14923 14924 } 14925 14926 this._renderAxis = function( target ) { 14927 14928 var i, axis, padPos, padWrapper; 14929 14930 target = target || this.element; 14931 14932 for ( i in this.handles ) { 14933 14934 if ( this.handles[ i ].constructor === String ) { 14935 this.handles[ i ] = this.element.children( this.handles[ i ] ).first().show(); 14936 } else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) { 14937 this.handles[ i ] = $( this.handles[ i ] ); 14938 this._on( this.handles[ i ], { "mousedown": that._mouseDown } ); 14939 } 14940 14941 if ( this.elementIsWrapper && 14942 this.originalElement[ 0 ] 14943 .nodeName 14944 .match( /^(textarea|input|select|button)$/i ) ) { 14945 axis = $( this.handles[ i ], this.element ); 14946 14947 padWrapper = /sw|ne|nw|se|n|s/.test( i ) ? 14948 axis.outerHeight() : 14949 axis.outerWidth(); 14950 14951 padPos = [ "padding", 14952 /ne|nw|n/.test( i ) ? "Top" : 14953 /se|sw|s/.test( i ) ? "Bottom" : 14954 /^e$/.test( i ) ? "Right" : "Left" ].join( "" ); 14955 14956 target.css( padPos, padWrapper ); 14957 14958 this._proportionallyResize(); 14959 } 14960 14961 this._handles = this._handles.add( this.handles[ i ] ); 14962 } 14963 }; 14964 14965 // TODO: make renderAxis a prototype function 14966 this._renderAxis( this.element ); 14967 14968 this._handles = this._handles.add( this.element.find( ".ui-resizable-handle" ) ); 14969 this._handles.disableSelection(); 14970 14971 this._handles.on( "mouseover", function() { 14972 if ( !that.resizing ) { 14973 if ( this.className ) { 14974 axis = this.className.match( /ui-resizable-(se|sw|ne|nw|n|e|s|w)/i ); 14975 } 14976 that.axis = axis && axis[ 1 ] ? axis[ 1 ] : "se"; 14977 } 14978 } ); 14979 14980 if ( o.autoHide ) { 14981 this._handles.hide(); 14982 this._addClass( "ui-resizable-autohide" ); 14983 } 14984 }, 14985 14986 _removeHandles: function() { 14987 this._addedHandles.remove(); 14988 }, 14989 14990 _mouseCapture: function( event ) { 14991 var i, handle, 14992 capture = false; 14993 14994 for ( i in this.handles ) { 14995 handle = $( this.handles[ i ] )[ 0 ]; 14996 if ( handle === event.target || $.contains( handle, event.target ) ) { 14997 capture = true; 14998 } 14999 } 15000 15001 return !this.options.disabled && capture; 15002 }, 15003 15004 _mouseStart: function( event ) { 15005 15006 var curleft, curtop, cursor, 15007 o = this.options, 15008 el = this.element; 15009 15010 this.resizing = true; 15011 15012 this._renderProxy(); 15013 15014 curleft = this._num( this.helper.css( "left" ) ); 15015 curtop = this._num( this.helper.css( "top" ) ); 15016 15017 if ( o.containment ) { 15018 curleft += $( o.containment ).scrollLeft() || 0; 15019 curtop += $( o.containment ).scrollTop() || 0; 15020 } 15021 15022 this.offset = this.helper.offset(); 15023 this.position = { left: curleft, top: curtop }; 15024 15025 this.size = this._helper ? { 15026 width: this.helper.width(), 15027 height: this.helper.height() 15028 } : { 15029 width: el.width(), 15030 height: el.height() 15031 }; 15032 15033 this.originalSize = this._helper ? { 15034 width: el.outerWidth(), 15035 height: el.outerHeight() 15036 } : { 15037 width: el.width(), 15038 height: el.height() 15039 }; 15040 15041 this.sizeDiff = { 15042 width: el.outerWidth() - el.width(), 15043 height: el.outerHeight() - el.height() 15044 }; 15045 15046 this.originalPosition = { left: curleft, top: curtop }; 15047 this.originalMousePosition = { left: event.pageX, top: event.pageY }; 15048 15049 this.aspectRatio = ( typeof o.aspectRatio === "number" ) ? 15050 o.aspectRatio : 15051 ( ( this.originalSize.width / this.originalSize.height ) || 1 ); 15052 15053 cursor = $( ".ui-resizable-" + this.axis ).css( "cursor" ); 15054 $( "body" ).css( "cursor", cursor === "auto" ? this.axis + "-resize" : cursor ); 15055 15056 this._addClass( "ui-resizable-resizing" ); 15057 this._propagate( "start", event ); 15058 return true; 15059 }, 15060 15061 _mouseDrag: function( event ) { 15062 15063 var data, props, 15064 smp = this.originalMousePosition, 15065 a = this.axis, 15066 dx = ( event.pageX - smp.left ) || 0, 15067 dy = ( event.pageY - smp.top ) || 0, 15068 trigger = this._change[ a ]; 15069 15070 this._updatePrevProperties(); 15071 15072 if ( !trigger ) { 15073 return false; 15074 } 15075 15076 data = trigger.apply( this, [ event, dx, dy ] ); 15077 15078 this._updateVirtualBoundaries( event.shiftKey ); 15079 if ( this._aspectRatio || event.shiftKey ) { 15080 data = this._updateRatio( data, event ); 15081 } 15082 15083 data = this._respectSize( data, event ); 15084 15085 this._updateCache( data ); 15086 15087 this._propagate( "resize", event ); 15088 15089 props = this._applyChanges(); 15090 15091 if ( !this._helper && this._proportionallyResizeElements.length ) { 15092 this._proportionallyResize(); 15093 } 15094 15095 if ( !$.isEmptyObject( props ) ) { 15096 this._updatePrevProperties(); 15097 this._trigger( "resize", event, this.ui() ); 15098 this._applyChanges(); 15099 } 15100 15101 return false; 15102 }, 15103 15104 _mouseStop: function( event ) { 15105 15106 this.resizing = false; 15107 var pr, ista, soffseth, soffsetw, s, left, top, 15108 o = this.options, that = this; 15109 15110 if ( this._helper ) { 15111 15112 pr = this._proportionallyResizeElements; 15113 ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName ); 15114 soffseth = ista && this._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height; 15115 soffsetw = ista ? 0 : that.sizeDiff.width; 15116 15117 s = { 15118 width: ( that.helper.width() - soffsetw ), 15119 height: ( that.helper.height() - soffseth ) 15120 }; 15121 left = ( parseFloat( that.element.css( "left" ) ) + 15122 ( that.position.left - that.originalPosition.left ) ) || null; 15123 top = ( parseFloat( that.element.css( "top" ) ) + 15124 ( that.position.top - that.originalPosition.top ) ) || null; 15125 15126 if ( !o.animate ) { 15127 this.element.css( $.extend( s, { top: top, left: left } ) ); 15128 } 15129 15130 that.helper.height( that.size.height ); 15131 that.helper.width( that.size.width ); 15132 15133 if ( this._helper && !o.animate ) { 15134 this._proportionallyResize(); 15135 } 15136 } 15137 15138 $( "body" ).css( "cursor", "auto" ); 15139 15140 this._removeClass( "ui-resizable-resizing" ); 15141 15142 this._propagate( "stop", event ); 15143 15144 if ( this._helper ) { 15145 this.helper.remove(); 15146 } 15147 15148 return false; 15149 15150 }, 15151 15152 _updatePrevProperties: function() { 15153 this.prevPosition = { 15154 top: this.position.top, 15155 left: this.position.left 15156 }; 15157 this.prevSize = { 15158 width: this.size.width, 15159 height: this.size.height 15160 }; 15161 }, 15162 15163 _applyChanges: function() { 15164 var props = {}; 15165 15166 if ( this.position.top !== this.prevPosition.top ) { 15167 props.top = this.position.top + "px"; 15168 } 15169 if ( this.position.left !== this.prevPosition.left ) { 15170 props.left = this.position.left + "px"; 15171 }
vendor: 9,533 bytes, lines 15172-15539
15172 if ( this.size.width !== this.prevSize.width ) { 15173 props.width = this.size.width + "px"; 15174 } 15175 if ( this.size.height !== this.prevSize.height ) { 15176 props.height = this.size.height + "px"; 15177 } 15178 15179 this.helper.css( props ); 15180 15181 return props; 15182 }, 15183 15184 _updateVirtualBoundaries: function( forceAspectRatio ) { 15185 var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b, 15186 o = this.options; 15187 15188 b = { 15189 minWidth: this._isNumber( o.minWidth ) ? o.minWidth : 0, 15190 maxWidth: this._isNumber( o.maxWidth ) ? o.maxWidth : Infinity, 15191 minHeight: this._isNumber( o.minHeight ) ? o.minHeight : 0, 15192 maxHeight: this._isNumber( o.maxHeight ) ? o.maxHeight : Infinity 15193 }; 15194 15195 if ( this._aspectRatio || forceAspectRatio ) { 15196 pMinWidth = b.minHeight * this.aspectRatio; 15197 pMinHeight = b.minWidth / this.aspectRatio; 15198 pMaxWidth = b.maxHeight * this.aspectRatio; 15199 pMaxHeight = b.maxWidth / this.aspectRatio; 15200 15201 if ( pMinWidth > b.minWidth ) { 15202 b.minWidth = pMinWidth; 15203 } 15204 if ( pMinHeight > b.minHeight ) { 15205 b.minHeight = pMinHeight; 15206 } 15207 if ( pMaxWidth < b.maxWidth ) { 15208 b.maxWidth = pMaxWidth; 15209 } 15210 if ( pMaxHeight < b.maxHeight ) { 15211 b.maxHeight = pMaxHeight; 15212 } 15213 } 15214 this._vBoundaries = b; 15215 }, 15216 15217 _updateCache: function( data ) { 15218 this.offset = this.helper.offset(); 15219 if ( this._isNumber( data.left ) ) { 15220 this.position.left = data.left; 15221 } 15222 if ( this._isNumber( data.top ) ) { 15223 this.position.top = data.top; 15224 } 15225 if ( this._isNumber( data.height ) ) { 15226 this.size.height = data.height; 15227 } 15228 if ( this._isNumber( data.width ) ) { 15229 this.size.width = data.width; 15230 } 15231 }, 15232 15233 _updateRatio: function( data ) { 15234 15235 var cpos = this.position, 15236 csize = this.size, 15237 a = this.axis; 15238 15239 if ( this._isNumber( data.height ) ) { 15240 data.width = ( data.height * this.aspectRatio ); 15241 } else if ( this._isNumber( data.width ) ) { 15242 data.height = ( data.width / this.aspectRatio ); 15243 } 15244 15245 if ( a === "sw" ) { 15246 data.left = cpos.left + ( csize.width - data.width ); 15247 data.top = null; 15248 } 15249 if ( a === "nw" ) { 15250 data.top = cpos.top + ( csize.height - data.height ); 15251 data.left = cpos.left + ( csize.width - data.width ); 15252 } 15253 15254 return data; 15255 }, 15256 15257 _respectSize: function( data ) { 15258 15259 var o = this._vBoundaries, 15260 a = this.axis, 15261 ismaxw = this._isNumber( data.width ) && o.maxWidth && ( o.maxWidth < data.width ), 15262 ismaxh = this._isNumber( data.height ) && o.maxHeight && ( o.maxHeight < data.height ), 15263 isminw = this._isNumber( data.width ) && o.minWidth && ( o.minWidth > data.width ), 15264 isminh = this._isNumber( data.height ) && o.minHeight && ( o.minHeight > data.height ), 15265 dw = this.originalPosition.left + this.originalSize.width, 15266 dh = this.originalPosition.top + this.originalSize.height, 15267 cw = /sw|nw|w/.test( a ), ch = /nw|ne|n/.test( a ); 15268 if ( isminw ) { 15269 data.width = o.minWidth; 15270 } 15271 if ( isminh ) { 15272 data.height = o.minHeight; 15273 } 15274 if ( ismaxw ) { 15275 data.width = o.maxWidth; 15276 } 15277 if ( ismaxh ) { 15278 data.height = o.maxHeight; 15279 } 15280 15281 if ( isminw && cw ) { 15282 data.left = dw - o.minWidth; 15283 } 15284 if ( ismaxw && cw ) { 15285 data.left = dw - o.maxWidth; 15286 } 15287 if ( isminh && ch ) { 15288 data.top = dh - o.minHeight; 15289 } 15290 if ( ismaxh && ch ) { 15291 data.top = dh - o.maxHeight; 15292 } 15293 15294 // Fixing jump error on top/left - bug #2330 15295 if ( !data.width && !data.height && !data.left && data.top ) { 15296 data.top = null; 15297 } else if ( !data.width && !data.height && !data.top && data.left ) { 15298 data.left = null; 15299 } 15300 15301 return data; 15302 }, 15303 15304 _getPaddingPlusBorderDimensions: function( element ) { 15305 var i = 0, 15306 widths = [], 15307 borders = [ 15308 element.css( "borderTopWidth" ), 15309 element.css( "borderRightWidth" ), 15310 element.css( "borderBottomWidth" ), 15311 element.css( "borderLeftWidth" ) 15312 ], 15313 paddings = [ 15314 element.css( "paddingTop" ), 15315 element.css( "paddingRight" ), 15316 element.css( "paddingBottom" ), 15317 element.css( "paddingLeft" ) 15318 ]; 15319 15320 for ( ; i < 4; i++ ) { 15321 widths[ i ] = ( parseFloat( borders[ i ] ) || 0 ); 15322 widths[ i ] += ( parseFloat( paddings[ i ] ) || 0 ); 15323 } 15324 15325 return { 15326 height: widths[ 0 ] + widths[ 2 ], 15327 width: widths[ 1 ] + widths[ 3 ] 15328 }; 15329 }, 15330 15331 _proportionallyResize: function() { 15332 15333 if ( !this._proportionallyResizeElements.length ) { 15334 return; 15335 } 15336 15337 var prel, 15338 i = 0, 15339 element = this.helper || this.element; 15340 15341 for ( ; i < this._proportionallyResizeElements.length; i++ ) { 15342 15343 prel = this._proportionallyResizeElements[ i ]; 15344 15345 // TODO: Seems like a bug to cache this.outerDimensions 15346 // considering that we are in a loop. 15347 if ( !this.outerDimensions ) { 15348 this.outerDimensions = this._getPaddingPlusBorderDimensions( prel ); 15349 } 15350 15351 prel.css( { 15352 height: ( element.height() - this.outerDimensions.height ) || 0, 15353 width: ( element.width() - this.outerDimensions.width ) || 0 15354 } ); 15355 15356 } 15357 15358 }, 15359 15360 _renderProxy: function() { 15361 15362 var el = this.element, o = this.options; 15363 this.elementOffset = el.offset(); 15364 15365 if ( this._helper ) { 15366 15367 this.helper = this.helper || $( "<div></div>" ).css( { overflow: "hidden" } ); 15368 15369 this._addClass( this.helper, this._helper ); 15370 this.helper.css( { 15371 width: this.element.outerWidth(), 15372 height: this.element.outerHeight(), 15373 position: "absolute", 15374 left: this.elementOffset.left + "px", 15375 top: this.elementOffset.top + "px", 15376 zIndex: ++o.zIndex //TODO: Don't modify option 15377 } ); 15378 15379 this.helper 15380 .appendTo( "body" ) 15381 .disableSelection(); 15382 15383 } else { 15384 this.helper = this.element; 15385 } 15386 15387 }, 15388 15389 _change: { 15390 e: function( event, dx ) { 15391 return { width: this.originalSize.width + dx }; 15392 }, 15393 w: function( event, dx ) { 15394 var cs = this.originalSize, sp = this.originalPosition; 15395 return { left: sp.left + dx, width: cs.width - dx }; 15396 }, 15397 n: function( event, dx, dy ) { 15398 var cs = this.originalSize, sp = this.originalPosition; 15399 return { top: sp.top + dy, height: cs.height - dy }; 15400 }, 15401 s: function( event, dx, dy ) { 15402 return { height: this.originalSize.height + dy }; 15403 }, 15404 se: function( event, dx, dy ) { 15405 return $.extend( this._change.s.apply( this, arguments ), 15406 this._change.e.apply( this, [ event, dx, dy ] ) ); 15407 }, 15408 sw: function( event, dx, dy ) { 15409 return $.extend( this._change.s.apply( this, arguments ), 15410 this._change.w.apply( this, [ event, dx, dy ] ) ); 15411 }, 15412 ne: function( event, dx, dy ) { 15413 return $.extend( this._change.n.apply( this, arguments ), 15414 this._change.e.apply( this, [ event, dx, dy ] ) ); 15415 }, 15416 nw: function( event, dx, dy ) { 15417 return $.extend( this._change.n.apply( this, arguments ), 15418 this._change.w.apply( this, [ event, dx, dy ] ) ); 15419 } 15420 }, 15421 15422 _propagate: function( n, event ) { 15423 $.ui.plugin.call( this, n, [ event, this.ui() ] ); 15424 if ( n !== "resize" ) { 15425 this._trigger( n, event, this.ui() ); 15426 } 15427 }, 15428 15429 plugins: {}, 15430 15431 ui: function() { 15432 return { 15433 originalElement: this.originalElement, 15434 element: this.element, 15435 helper: this.helper, 15436 position: this.position, 15437 size: this.size, 15438 originalSize: this.originalSize, 15439 originalPosition: this.originalPosition 15440 }; 15441 } 15442 15443} ); 15444 15445/* 15446 * Resizable Extensions 15447 */ 15448 15449$.ui.plugin.add( "resizable", "animate", { 15450 15451 stop: function( event ) { 15452 var that = $( this ).resizable( "instance" ), 15453 o = that.options, 15454 pr = that._proportionallyResizeElements, 15455 ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName ), 15456 soffseth = ista && that._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height, 15457 soffsetw = ista ? 0 : that.sizeDiff.width, 15458 style = { 15459 width: ( that.size.width - soffsetw ), 15460 height: ( that.size.height - soffseth ) 15461 }, 15462 left = ( parseFloat( that.element.css( "left" ) ) + 15463 ( that.position.left - that.originalPosition.left ) ) || null, 15464 top = ( parseFloat( that.element.css( "top" ) ) + 15465 ( that.position.top - that.originalPosition.top ) ) || null; 15466 15467 that.element.animate( 15468 $.extend( style, top && left ? { top: top, left: left } : {} ), { 15469 duration: o.animateDuration, 15470 easing: o.animateEasing, 15471 step: function() { 15472 15473 var data = { 15474 width: parseFloat( that.element.css( "width" ) ), 15475 height: parseFloat( that.element.css( "height" ) ), 15476 top: parseFloat( that.element.css( "top" ) ), 15477 left: parseFloat( that.element.css( "left" ) ) 15478 }; 15479 15480 if ( pr && pr.length ) { 15481 $( pr[ 0 ] ).css( { width: data.width, height: data.height } ); 15482 } 15483 15484 // Propagating resize, and updating values for each animation step 15485 that._updateCache( data ); 15486 that._propagate( "resize", event ); 15487 15488 } 15489 } 15490 ); 15491 } 15492 15493} ); 15494 15495$.ui.plugin.add( "resizable", "containment", { 15496 15497 start: function() { 15498 var element, p, co, ch, cw, width, height, 15499 that = $( this ).resizable( "instance" ), 15500 o = that.options, 15501 el = that.element, 15502 oc = o.containment, 15503 ce = ( oc instanceof $ ) ? 15504 oc.get( 0 ) : 15505 ( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc; 15506 15507 if ( !ce ) { 15508 return; 15509 } 15510 15511 that.containerElement = $( ce ); 15512 15513 if ( /document/.test( oc ) || oc === document ) { 15514 that.containerOffset = { 15515 left: 0, 15516 top: 0 15517 }; 15518 that.containerPosition = { 15519 left: 0, 15520 top: 0 15521 }; 15522 15523 that.parentData = { 15524 element: $( document ), 15525 left: 0, 15526 top: 0, 15527 width: $( document ).width(), 15528 height: $( document ).height() || document.body.parentNode.scrollHeight 15529 }; 15530 } else { 15531 element = $( ce ); 15532 p = []; 15533 $( [ "Top", "Right", "Left", "Bottom" ] ).each( function( i, name ) { 15534 p[ i ] = that._num( element.css( "padding" + name ) ); 15535 } ); 15536 15537 that.containerOffset = element.offset(); 15538 that.containerPosition = element.position(); 15539 that.containerSize = {
vendor: 5,871 bytes, lines 15540-15764
15540 height: ( element.innerHeight() - p[ 3 ] ), 15541 width: ( element.innerWidth() - p[ 1 ] ) 15542 }; 15543 15544 co = that.containerOffset; 15545 ch = that.containerSize.height; 15546 cw = that.containerSize.width; 15547 width = ( that._hasScroll( ce, "left" ) ? ce.scrollWidth : cw ); 15548 height = ( that._hasScroll( ce ) ? ce.scrollHeight : ch ); 15549 15550 that.parentData = { 15551 element: ce, 15552 left: co.left, 15553 top: co.top, 15554 width: width, 15555 height: height 15556 }; 15557 } 15558 }, 15559 15560 resize: function( event ) { 15561 var woset, hoset, isParent, isOffsetRelative, 15562 that = $( this ).resizable( "instance" ), 15563 o = that.options, 15564 co = that.containerOffset, 15565 cp = that.position, 15566 pRatio = that._aspectRatio || event.shiftKey, 15567 cop = { 15568 top: 0, 15569 left: 0 15570 }, 15571 ce = that.containerElement, 15572 continueResize = true; 15573 15574 if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) { 15575 cop = co; 15576 } 15577 15578 if ( cp.left < ( that._helper ? co.left : 0 ) ) { 15579 that.size.width = that.size.width + 15580 ( that._helper ? 15581 ( that.position.left - co.left ) : 15582 ( that.position.left - cop.left ) ); 15583 15584 if ( pRatio ) { 15585 that.size.height = that.size.width / that.aspectRatio; 15586 continueResize = false; 15587 } 15588 that.position.left = o.helper ? co.left : 0; 15589 } 15590 15591 if ( cp.top < ( that._helper ? co.top : 0 ) ) { 15592 that.size.height = that.size.height + 15593 ( that._helper ? 15594 ( that.position.top - co.top ) : 15595 that.position.top ); 15596 15597 if ( pRatio ) { 15598 that.size.width = that.size.height * that.aspectRatio; 15599 continueResize = false; 15600 } 15601 that.position.top = that._helper ? co.top : 0; 15602 } 15603 15604 isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 ); 15605 isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) ); 15606 15607 if ( isParent && isOffsetRelative ) { 15608 that.offset.left = that.parentData.left + that.position.left; 15609 that.offset.top = that.parentData.top + that.position.top; 15610 } else { 15611 that.offset.left = that.element.offset().left; 15612 that.offset.top = that.element.offset().top; 15613 } 15614 15615 woset = Math.abs( that.sizeDiff.width + 15616 ( that._helper ? 15617 that.offset.left - cop.left : 15618 ( that.offset.left - co.left ) ) ); 15619 15620 hoset = Math.abs( that.sizeDiff.height + 15621 ( that._helper ? 15622 that.offset.top - cop.top : 15623 ( that.offset.top - co.top ) ) ); 15624 15625 if ( woset + that.size.width >= that.parentData.width ) { 15626 that.size.width = that.parentData.width - woset; 15627 if ( pRatio ) { 15628 that.size.height = that.size.width / that.aspectRatio; 15629 continueResize = false; 15630 } 15631 } 15632 15633 if ( hoset + that.size.height >= that.parentData.height ) { 15634 that.size.height = that.parentData.height - hoset; 15635 if ( pRatio ) { 15636 that.size.width = that.size.height * that.aspectRatio; 15637 continueResize = false; 15638 } 15639 } 15640 15641 if ( !continueResize ) { 15642 that.position.left = that.prevPosition.left; 15643 that.position.top = that.prevPosition.top; 15644 that.size.width = that.prevSize.width; 15645 that.size.height = that.prevSize.height; 15646 } 15647 }, 15648 15649 stop: function() { 15650 var that = $( this ).resizable( "instance" ), 15651 o = that.options, 15652 co = that.containerOffset, 15653 cop = that.containerPosition, 15654 ce = that.containerElement, 15655 helper = $( that.helper ), 15656 ho = helper.offset(), 15657 w = helper.outerWidth() - that.sizeDiff.width, 15658 h = helper.outerHeight() - that.sizeDiff.height; 15659 15660 if ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) { 15661 $( this ).css( { 15662 left: ho.left - cop.left - co.left, 15663 width: w, 15664 height: h 15665 } ); 15666 } 15667 15668 if ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) { 15669 $( this ).css( { 15670 left: ho.left - cop.left - co.left, 15671 width: w, 15672 height: h 15673 } ); 15674 } 15675 } 15676} ); 15677 15678$.ui.plugin.add( "resizable", "alsoResize", { 15679 15680 start: function() { 15681 var that = $( this ).resizable( "instance" ), 15682 o = that.options; 15683 15684 $( o.alsoResize ).each( function() { 15685 var el = $( this ); 15686 el.data( "ui-resizable-alsoresize", { 15687 width: parseFloat( el.width() ), height: parseFloat( el.height() ), 15688 left: parseFloat( el.css( "left" ) ), top: parseFloat( el.css( "top" ) ) 15689 } ); 15690 } ); 15691 }, 15692 15693 resize: function( event, ui ) { 15694 var that = $( this ).resizable( "instance" ), 15695 o = that.options, 15696 os = that.originalSize, 15697 op = that.originalPosition, 15698 delta = { 15699 height: ( that.size.height - os.height ) || 0, 15700 width: ( that.size.width - os.width ) || 0, 15701 top: ( that.position.top - op.top ) || 0, 15702 left: ( that.position.left - op.left ) || 0 15703 }; 15704 15705 $( o.alsoResize ).each( function() { 15706 var el = $( this ), start = $( this ).data( "ui-resizable-alsoresize" ), style = {}, 15707 css = el.parents( ui.originalElement[ 0 ] ).length ? 15708 [ "width", "height" ] : 15709 [ "width", "height", "top", "left" ]; 15710 15711 $.each( css, function( i, prop ) { 15712 var sum = ( start[ prop ] || 0 ) + ( delta[ prop ] || 0 ); 15713 if ( sum && sum >= 0 ) { 15714 style[ prop ] = sum || null; 15715 } 15716 } ); 15717 15718 el.css( style ); 15719 } ); 15720 }, 15721 15722 stop: function() { 15723 $( this ).removeData( "ui-resizable-alsoresize" ); 15724 } 15725} ); 15726 15727$.ui.plugin.add( "resizable", "ghost", { 15728 15729 start: function() { 15730 15731 var that = $( this ).resizable( "instance" ), cs = that.size; 15732 15733 that.ghost = that.originalElement.clone(); 15734 that.ghost.css( { 15735 opacity: 0.25, 15736 display: "block", 15737 position: "relative", 15738 height: cs.height, 15739 width: cs.width, 15740 margin: 0, 15741 left: 0, 15742 top: 0 15743 } ); 15744 15745 that._addClass( that.ghost, "ui-resizable-ghost" ); 15746 15747 // DEPRECATED 15748 // TODO: remove after 1.12 15749 if ( $.uiBackCompat !== false && typeof that.options.ghost === "string" ) { 15750 15751 // Ghost option 15752 that.ghost.addClass( this.options.ghost ); 15753 } 15754 15755 that.ghost.appendTo( that.helper ); 15756 15757 }, 15758 15759 resize: function() { 15760 var that = $( this ).resizable( "instance" ); 15761 if ( that.ghost ) { 15762 that.ghost.css( { 15763 position: "relative", 15764 height: that.size.height,
vendor: 10,664 bytes, lines 15765-16172
15765 width: that.size.width 15766 } ); 15767 } 15768 }, 15769 15770 stop: function() { 15771 var that = $( this ).resizable( "instance" ); 15772 if ( that.ghost && that.helper ) { 15773 that.helper.get( 0 ).removeChild( that.ghost.get( 0 ) ); 15774 } 15775 } 15776 15777} ); 15778 15779$.ui.plugin.add( "resizable", "grid", { 15780 15781 resize: function() { 15782 var outerDimensions, 15783 that = $( this ).resizable( "instance" ), 15784 o = that.options, 15785 cs = that.size, 15786 os = that.originalSize, 15787 op = that.originalPosition, 15788 a = that.axis, 15789 grid = typeof o.grid === "number" ? [ o.grid, o.grid ] : o.grid, 15790 gridX = ( grid[ 0 ] || 1 ), 15791 gridY = ( grid[ 1 ] || 1 ), 15792 ox = Math.round( ( cs.width - os.width ) / gridX ) * gridX, 15793 oy = Math.round( ( cs.height - os.height ) / gridY ) * gridY, 15794 newWidth = os.width + ox, 15795 newHeight = os.height + oy, 15796 isMaxWidth = o.maxWidth && ( o.maxWidth < newWidth ), 15797 isMaxHeight = o.maxHeight && ( o.maxHeight < newHeight ), 15798 isMinWidth = o.minWidth && ( o.minWidth > newWidth ), 15799 isMinHeight = o.minHeight && ( o.minHeight > newHeight ); 15800 15801 o.grid = grid; 15802 15803 if ( isMinWidth ) { 15804 newWidth += gridX; 15805 } 15806 if ( isMinHeight ) { 15807 newHeight += gridY; 15808 } 15809 if ( isMaxWidth ) { 15810 newWidth -= gridX; 15811 } 15812 if ( isMaxHeight ) { 15813 newHeight -= gridY; 15814 } 15815 15816 if ( /^(se|s|e)$/.test( a ) ) { 15817 that.size.width = newWidth; 15818 that.size.height = newHeight; 15819 } else if ( /^(ne)$/.test( a ) ) { 15820 that.size.width = newWidth; 15821 that.size.height = newHeight; 15822 that.position.top = op.top - oy; 15823 } else if ( /^(sw)$/.test( a ) ) { 15824 that.size.width = newWidth; 15825 that.size.height = newHeight; 15826 that.position.left = op.left - ox; 15827 } else { 15828 if ( newHeight - gridY <= 0 || newWidth - gridX <= 0 ) { 15829 outerDimensions = that._getPaddingPlusBorderDimensions( this ); 15830 } 15831 15832 if ( newHeight - gridY > 0 ) { 15833 that.size.height = newHeight; 15834 that.position.top = op.top - oy; 15835 } else { 15836 newHeight = gridY - outerDimensions.height; 15837 that.size.height = newHeight; 15838 that.position.top = op.top + os.height - newHeight; 15839 } 15840 if ( newWidth - gridX > 0 ) { 15841 that.size.width = newWidth; 15842 that.position.left = op.left - ox; 15843 } else { 15844 newWidth = gridX - outerDimensions.width; 15845 that.size.width = newWidth; 15846 that.position.left = op.left + os.width - newWidth; 15847 } 15848 } 15849 } 15850 15851} ); 15852 15853var widgetsResizable = $.ui.resizable; 15854 15855 15856/*! 15857 * jQuery UI Selectable 1.13.2 15858 * http://jqueryui.com 15859 * 15860 * Copyright jQuery Foundation and other contributors 15861 * Released under the MIT license. 15862 * http://jquery.org/license 15863 */ 15864 15865//>>label: Selectable 15866//>>group: Interactions 15867//>>description: Allows groups of elements to be selected with the mouse. 15868//>>docs: http://api.jqueryui.com/selectable/ 15869//>>demos: http://jqueryui.com/selectable/ 15870//>>css.structure: ../../themes/base/selectable.css 15871 15872 15873var widgetsSelectable = $.widget( "ui.selectable", $.ui.mouse, { 15874 version: "1.13.2", 15875 options: { 15876 appendTo: "body", 15877 autoRefresh: true, 15878 distance: 0, 15879 filter: "*", 15880 tolerance: "touch", 15881 15882 // Callbacks 15883 selected: null, 15884 selecting: null, 15885 start: null, 15886 stop: null, 15887 unselected: null, 15888 unselecting: null 15889 }, 15890 _create: function() { 15891 var that = this; 15892 15893 this._addClass( "ui-selectable" ); 15894 15895 this.dragged = false; 15896 15897 // Cache selectee children based on filter 15898 this.refresh = function() { 15899 that.elementPos = $( that.element[ 0 ] ).offset(); 15900 that.selectees = $( that.options.filter, that.element[ 0 ] ); 15901 that._addClass( that.selectees, "ui-selectee" ); 15902 that.selectees.each( function() { 15903 var $this = $( this ), 15904 selecteeOffset = $this.offset(), 15905 pos = { 15906 left: selecteeOffset.left - that.elementPos.left, 15907 top: selecteeOffset.top - that.elementPos.top 15908 }; 15909 $.data( this, "selectable-item", { 15910 element: this, 15911 $element: $this, 15912 left: pos.left, 15913 top: pos.top, 15914 right: pos.left + $this.outerWidth(), 15915 bottom: pos.top + $this.outerHeight(), 15916 startselected: false, 15917 selected: $this.hasClass( "ui-selected" ), 15918 selecting: $this.hasClass( "ui-selecting" ), 15919 unselecting: $this.hasClass( "ui-unselecting" ) 15920 } ); 15921 } ); 15922 }; 15923 this.refresh(); 15924 15925 this._mouseInit(); 15926 15927 this.helper = $( "<div>" ); 15928 this._addClass( this.helper, "ui-selectable-helper" ); 15929 }, 15930 15931 _destroy: function() { 15932 this.selectees.removeData( "selectable-item" ); 15933 this._mouseDestroy(); 15934 }, 15935 15936 _mouseStart: function( event ) { 15937 var that = this, 15938 options = this.options; 15939 15940 this.opos = [ event.pageX, event.pageY ]; 15941 this.elementPos = $( this.element[ 0 ] ).offset(); 15942 15943 if ( this.options.disabled ) { 15944 return; 15945 } 15946 15947 this.selectees = $( options.filter, this.element[ 0 ] ); 15948 15949 this._trigger( "start", event ); 15950 15951 $( options.appendTo ).append( this.helper ); 15952 15953 // position helper (lasso) 15954 this.helper.css( { 15955 "left": event.pageX, 15956 "top": event.pageY, 15957 "width": 0, 15958 "height": 0 15959 } ); 15960 15961 if ( options.autoRefresh ) { 15962 this.refresh(); 15963 } 15964 15965 this.selectees.filter( ".ui-selected" ).each( function() { 15966 var selectee = $.data( this, "selectable-item" ); 15967 selectee.startselected = true; 15968 if ( !event.metaKey && !event.ctrlKey ) { 15969 that._removeClass( selectee.$element, "ui-selected" ); 15970 selectee.selected = false; 15971 that._addClass( selectee.$element, "ui-unselecting" ); 15972 selectee.unselecting = true; 15973 15974 // selectable UNSELECTING callback 15975 that._trigger( "unselecting", event, { 15976 unselecting: selectee.element 15977 } ); 15978 } 15979 } ); 15980 15981 $( event.target ).parents().addBack().each( function() { 15982 var doSelect, 15983 selectee = $.data( this, "selectable-item" ); 15984 if ( selectee ) { 15985 doSelect = ( !event.metaKey && !event.ctrlKey ) || 15986 !selectee.$element.hasClass( "ui-selected" ); 15987 that._removeClass( selectee.$element, doSelect ? "ui-unselecting" : "ui-selected" ) 15988 ._addClass( selectee.$element, doSelect ? "ui-selecting" : "ui-unselecting" ); 15989 selectee.unselecting = !doSelect; 15990 selectee.selecting = doSelect; 15991 selectee.selected = doSelect; 15992 15993 // selectable (UN)SELECTING callback 15994 if ( doSelect ) { 15995 that._trigger( "selecting", event, { 15996 selecting: selectee.element 15997 } ); 15998 } else { 15999 that._trigger( "unselecting", event, { 16000 unselecting: selectee.element 16001 } ); 16002 } 16003 return false; 16004 } 16005 } ); 16006 16007 }, 16008 16009 _mouseDrag: function( event ) { 16010 16011 this.dragged = true; 16012 16013 if ( this.options.disabled ) { 16014 return; 16015 } 16016 16017 var tmp, 16018 that = this, 16019 options = this.options, 16020 x1 = this.opos[ 0 ], 16021 y1 = this.opos[ 1 ], 16022 x2 = event.pageX, 16023 y2 = event.pageY; 16024 16025 if ( x1 > x2 ) { 16026 tmp = x2; x2 = x1; x1 = tmp; 16027 } 16028 if ( y1 > y2 ) { 16029 tmp = y2; y2 = y1; y1 = tmp; 16030 } 16031 this.helper.css( { left: x1, top: y1, width: x2 - x1, height: y2 - y1 } ); 16032 16033 this.selectees.each( function() { 16034 var selectee = $.data( this, "selectable-item" ), 16035 hit = false, 16036 offset = {}; 16037 16038 //prevent helper from being selected if appendTo: selectable 16039 if ( !selectee || selectee.element === that.element[ 0 ] ) { 16040 return; 16041 } 16042 16043 offset.left = selectee.left + that.elementPos.left; 16044 offset.right = selectee.right + that.elementPos.left; 16045 offset.top = selectee.top + that.elementPos.top; 16046 offset.bottom = selectee.bottom + that.elementPos.top; 16047 16048 if ( options.tolerance === "touch" ) { 16049 hit = ( !( offset.left > x2 || offset.right < x1 || offset.top > y2 || 16050 offset.bottom < y1 ) ); 16051 } else if ( options.tolerance === "fit" ) { 16052 hit = ( offset.left > x1 && offset.right < x2 && offset.top > y1 && 16053 offset.bottom < y2 ); 16054 } 16055 16056 if ( hit ) { 16057 16058 // SELECT 16059 if ( selectee.selected ) { 16060 that._removeClass( selectee.$element, "ui-selected" ); 16061 selectee.selected = false; 16062 } 16063 if ( selectee.unselecting ) { 16064 that._removeClass( selectee.$element, "ui-unselecting" ); 16065 selectee.unselecting = false; 16066 } 16067 if ( !selectee.selecting ) { 16068 that._addClass( selectee.$element, "ui-selecting" ); 16069 selectee.selecting = true; 16070 16071 // selectable SELECTING callback 16072 that._trigger( "selecting", event, { 16073 selecting: selectee.element 16074 } ); 16075 } 16076 } else { 16077 16078 // UNSELECT 16079 if ( selectee.selecting ) { 16080 if ( ( event.metaKey || event.ctrlKey ) && selectee.startselected ) { 16081 that._removeClass( selectee.$element, "ui-selecting" ); 16082 selectee.selecting = false; 16083 that._addClass( selectee.$element, "ui-selected" ); 16084 selectee.selected = true; 16085 } else { 16086 that._removeClass( selectee.$element, "ui-selecting" ); 16087 selectee.selecting = false; 16088 if ( selectee.startselected ) { 16089 that._addClass( selectee.$element, "ui-unselecting" ); 16090 selectee.unselecting = true; 16091 } 16092 16093 // selectable UNSELECTING callback 16094 that._trigger( "unselecting", event, { 16095 unselecting: selectee.element 16096 } ); 16097 } 16098 } 16099 if ( selectee.selected ) { 16100 if ( !event.metaKey && !event.ctrlKey && !selectee.startselected ) { 16101 that._removeClass( selectee.$element, "ui-selected" ); 16102 selectee.selected = false; 16103 16104 that._addClass( selectee.$element, "ui-unselecting" ); 16105 selectee.unselecting = true; 16106 16107 // selectable UNSELECTING callback 16108 that._trigger( "unselecting", event, { 16109 unselecting: selectee.element 16110 } ); 16111 } 16112 } 16113 } 16114 } ); 16115 16116 return false; 16117 }, 16118 16119 _mouseStop: function( event ) { 16120 var that = this; 16121 16122 this.dragged = false; 16123 16124 $( ".ui-unselecting", this.element[ 0 ] ).each( function() { 16125 var selectee = $.data( this, "selectable-item" ); 16126 that._removeClass( selectee.$element, "ui-unselecting" ); 16127 selectee.unselecting = false; 16128 selectee.startselected = false; 16129 that._trigger( "unselected", event, { 16130 unselected: selectee.element 16131 } ); 16132 } ); 16133 $( ".ui-selecting", this.element[ 0 ] ).each( function() { 16134 var selectee = $.data( this, "selectable-item" ); 16135 that._removeClass( selectee.$element, "ui-selecting" ) 16136 ._addClass( selectee.$element, "ui-selected" ); 16137 selectee.selecting = false; 16138 selectee.selected = true; 16139 selectee.startselected = true; 16140 that._trigger( "selected", event, { 16141 selected: selectee.element 16142 } ); 16143 } ); 16144 this._trigger( "stop", event ); 16145 16146 this.helper.remove(); 16147 16148 return false; 16149 } 16150 16151} ); 16152 16153 16154/*! 16155 * jQuery UI Sortable 1.13.2 16156 * http://jqueryui.com 16157 * 16158 * Copyright jQuery Foundation and other contributors 16159 * Released under the MIT license. 16160 * http://jquery.org/license 16161 */ 16162 16163//>>label: Sortable 16164//>>group: Interactions 16165//>>description: Enables items in a list to be sorted using the mouse. 16166//>>docs: http://api.jqueryui.com/sortable/ 16167//>>demos: http://jqueryui.com/sortable/ 16168//>>css.structure: ../../themes/base/sortable.css 16169 16170 16171var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { 16172 version: "1.13.2
vendor: 7,925 bytes, lines 16172-16491
16172", 16173 widgetEventPrefix: "sort", 16174 ready: false, 16175 options: { 16176 appendTo: "parent", 16177 axis: false, 16178 connectWith: false, 16179 containment: false, 16180 cursor: "auto", 16181 cursorAt: false, 16182 dropOnEmpty: true, 16183 forcePlaceholderSize: false, 16184 forceHelperSize: false, 16185 grid: false, 16186 handle: false, 16187 helper: "original", 16188 items: "> *", 16189 opacity: false, 16190 placeholder: false, 16191 revert: false, 16192 scroll: true, 16193 scrollSensitivity: 20, 16194 scrollSpeed: 20, 16195 scope: "default", 16196 tolerance: "intersect", 16197 zIndex: 1000, 16198 16199 // Callbacks 16200 activate: null, 16201 beforeStop: null, 16202 change: null, 16203 deactivate: null, 16204 out: null, 16205 over: null, 16206 receive: null, 16207 remove: null, 16208 sort: null, 16209 start: null, 16210 stop: null, 16211 update: null 16212 }, 16213 16214 _isOverAxis: function( x, reference, size ) { 16215 return ( x >= reference ) && ( x < ( reference + size ) ); 16216 }, 16217 16218 _isFloating: function( item ) { 16219 return ( /left|right/ ).test( item.css( "float" ) ) || 16220 ( /inline|table-cell/ ).test( item.css( "display" ) ); 16221 }, 16222 16223 _create: function() { 16224 this.containerCache = {}; 16225 this._addClass( "ui-sortable" ); 16226 16227 //Get the items 16228 this.refresh(); 16229 16230 //Let's determine the parent's offset 16231 this.offset = this.element.offset(); 16232 16233 //Initialize mouse events for interaction 16234 this._mouseInit(); 16235 16236 this._setHandleClassName(); 16237 16238 //We're ready to go 16239 this.ready = true; 16240 16241 }, 16242 16243 _setOption: function( key, value ) { 16244 this._super( key, value ); 16245 16246 if ( key === "handle" ) { 16247 this._setHandleClassName(); 16248 } 16249 }, 16250 16251 _setHandleClassName: function() { 16252 var that = this; 16253 this._removeClass( this.element.find( ".ui-sortable-handle" ), "ui-sortable-handle" ); 16254 $.each( this.items, function() { 16255 that._addClass( 16256 this.instance.options.handle ? 16257 this.item.find( this.instance.options.handle ) : 16258 this.item, 16259 "ui-sortable-handle" 16260 ); 16261 } ); 16262 }, 16263 16264 _destroy: function() { 16265 this._mouseDestroy(); 16266 16267 for ( var i = this.items.length - 1; i >= 0; i-- ) { 16268 this.items[ i ].item.removeData( this.widgetName + "-item" ); 16269 } 16270 16271 return this; 16272 }, 16273 16274 _mouseCapture: function( event, overrideHandle ) { 16275 var currentItem = null, 16276 validHandle = false, 16277 that = this; 16278 16279 if ( this.reverting ) { 16280 return false; 16281 } 16282 16283 if ( this.options.disabled || this.options.type === "static" ) { 16284 return false; 16285 } 16286 16287 //We have to refresh the items data once first 16288 this._refreshItems( event ); 16289 16290 //Find out if the clicked node (or one of its parents) is a actual item in this.items 16291 $( event.target ).parents().each( function() { 16292 if ( $.data( this, that.widgetName + "-item" ) === that ) { 16293 currentItem = $( this ); 16294 return false; 16295 } 16296 } ); 16297 if ( $.data( event.target, that.widgetName + "-item" ) === that ) { 16298 currentItem = $( event.target ); 16299 } 16300 16301 if ( !currentItem ) { 16302 return false; 16303 } 16304 if ( this.options.handle && !overrideHandle ) { 16305 $( this.options.handle, currentItem ).find( "*" ).addBack().each( function() { 16306 if ( this === event.target ) { 16307 validHandle = true; 16308 } 16309 } ); 16310 if ( !validHandle ) { 16311 return false; 16312 } 16313 } 16314 16315 this.currentItem = currentItem; 16316 this._removeCurrentsFromItems(); 16317 return true; 16318 16319 }, 16320 16321 _mouseStart: function( event, overrideHandle, noActivation ) { 16322 16323 var i, body, 16324 o = this.options; 16325 16326 this.currentContainer = this; 16327 16328 //We only need to call refreshPositions, because the refreshItems call has been moved to 16329 // mouseCapture 16330 this.refreshPositions(); 16331 16332 //Prepare the dragged items parent 16333 this.appendTo = $( o.appendTo !== "parent" ? 16334 o.appendTo : 16335 this.currentItem.parent() ); 16336 16337 //Create and append the visible helper 16338 this.helper = this._createHelper( event ); 16339 16340 //Cache the helper size 16341 this._cacheHelperProportions(); 16342 16343 /* 16344 * - Position generation - 16345 * This block generates everything position related - it's the core of draggables. 16346 */ 16347 16348 //Cache the margins of the original element 16349 this._cacheMargins(); 16350 16351 //The element's absolute position on the page minus margins 16352 this.offset = this.currentItem.offset(); 16353 this.offset = { 16354 top: this.offset.top - this.margins.top, 16355 left: this.offset.left - this.margins.left 16356 }; 16357 16358 $.extend( this.offset, { 16359 click: { //Where the click happened, relative to the element 16360 left: event.pageX - this.offset.left, 16361 top: event.pageY - this.offset.top 16362 }, 16363 16364 // This is a relative to absolute position minus the actual position calculation - 16365 // only used for relative positioned helper 16366 relative: this._getRelativeOffset() 16367 } ); 16368 16369 // After we get the helper offset, but before we get the parent offset we can 16370 // change the helper's position to absolute 16371 // TODO: Still need to figure out a way to make relative sorting possible 16372 this.helper.css( "position", "absolute" ); 16373 this.cssPosition = this.helper.css( "position" ); 16374 16375 //Adjust the mouse offset relative to the helper if "cursorAt" is supplied 16376 if ( o.cursorAt ) { 16377 this._adjustOffsetFromHelper( o.cursorAt ); 16378 } 16379 16380 //Cache the former DOM position 16381 this.domPosition = { 16382 prev: this.currentItem.prev()[ 0 ], 16383 parent: this.currentItem.parent()[ 0 ] 16384 }; 16385 16386 // If the helper is not the original, hide the original so it's not playing any role during 16387 // the drag, won't cause anything bad this way 16388 if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) { 16389 this.currentItem.hide(); 16390 } 16391 16392 //Create the placeholder 16393 this._createPlaceholder(); 16394 16395 //Get the next scrolling parent 16396 this.scrollParent = this.placeholder.scrollParent(); 16397 16398 $.extend( this.offset, { 16399 parent: this._getParentOffset() 16400 } ); 16401 16402 //Set a containment if given in the options 16403 if ( o.containment ) { 16404 this._setContainment(); 16405 } 16406 16407 if ( o.cursor && o.cursor !== "auto" ) { // cursor option 16408 body = this.document.find( "body" ); 16409 16410 // Support: IE 16411 this.storedCursor = body.css( "cursor" ); 16412 body.css( "cursor", o.cursor ); 16413 16414 this.storedStylesheet = 16415 $( "<style>*{ cursor: " + o.cursor + " !important; }</style>" ).appendTo( body ); 16416 } 16417 16418 // We need to make sure to grab the zIndex before setting the 16419 // opacity, because setting the opacity to anything lower than 1 16420 // causes the zIndex to change from "auto" to 0. 16421 if ( o.zIndex ) { // zIndex option 16422 if ( this.helper.css( "zIndex" ) ) { 16423 this._storedZIndex = this.helper.css( "zIndex" ); 16424 } 16425 this.helper.css( "zIndex", o.zIndex ); 16426 } 16427 16428 if ( o.opacity ) { // opacity option 16429 if ( this.helper.css( "opacity" ) ) { 16430 this._storedOpacity = this.helper.css( "opacity" ); 16431 } 16432 this.helper.css( "opacity", o.opacity ); 16433 } 16434 16435 //Prepare scrolling 16436 if ( this.scrollParent[ 0 ] !== this.document[ 0 ] && 16437 this.scrollParent[ 0 ].tagName !== "HTML" ) { 16438 this.overflowOffset = this.scrollParent.offset(); 16439 } 16440 16441 //Call callbacks 16442 this._trigger( "start", event, this._uiHash() ); 16443 16444 //Recache the helper size 16445 if ( !this._preserveHelperProportions ) { 16446 this._cacheHelperProportions(); 16447 } 16448 16449 //Post "activate" events to possible containers 16450 if ( !noActivation ) { 16451 for ( i = this.containers.length - 1; i >= 0; i-- ) { 16452 this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) ); 16453 } 16454 } 16455 16456 //Prepare possible droppables 16457 if ( $.ui.ddmanager ) { 16458 $.ui.ddmanager.current = this; 16459 } 16460 16461 if ( $.ui.ddmanager && !o.dropBehaviour ) { 16462 $.ui.ddmanager.prepareOffsets( this, event ); 16463 } 16464 16465 this.dragging = true; 16466 16467 this._addClass( this.helper, "ui-sortable-helper" ); 16468 16469 //Move the helper, if needed 16470 if ( !this.helper.parent().is( this.appendTo ) ) { 16471 this.helper.detach().appendTo( this.appendTo ); 16472 16473 //Update position 16474 this.offset.parent = this._getParentOffset(); 16475 } 16476 16477 //Generate the original position 16478 this.position = this.originalPosition = this._generatePosition( event ); 16479 this.originalPageX = event.pageX; 16480 this.originalPageY = event.pageY; 16481 this.lastPositionAbs = this.positionAbs = this._convertPositionTo( "absolute" ); 16482 16483 this._mouseDrag( event ); 16484 16485 return true; 16486 16487 }, 16488 16489 _scroll: function( event ) { 16490 var o = this.options, 16491 scrolled = false;
vendor: 4,489 bytes, lines 16492-16634
16492 16493 if ( this.scrollParent[ 0 ] !== this.document[ 0 ] && 16494 this.scrollParent[ 0 ].tagName !== "HTML" ) { 16495 16496 if ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) - 16497 event.pageY < o.scrollSensitivity ) { 16498 this.scrollParent[ 0 ].scrollTop = 16499 scrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed; 16500 } else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) { 16501 this.scrollParent[ 0 ].scrollTop = 16502 scrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed; 16503 } 16504 16505 if ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) - 16506 event.pageX < o.scrollSensitivity ) { 16507 this.scrollParent[ 0 ].scrollLeft = scrolled = 16508 this.scrollParent[ 0 ].scrollLeft + o.scrollSpeed; 16509 } else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) { 16510 this.scrollParent[ 0 ].scrollLeft = scrolled = 16511 this.scrollParent[ 0 ].scrollLeft - o.scrollSpeed; 16512 } 16513 16514 } else { 16515 16516 if ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) { 16517 scrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed ); 16518 } else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) < 16519 o.scrollSensitivity ) { 16520 scrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed ); 16521 } 16522 16523 if ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) { 16524 scrolled = this.document.scrollLeft( 16525 this.document.scrollLeft() - o.scrollSpeed 16526 ); 16527 } else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) < 16528 o.scrollSensitivity ) { 16529 scrolled = this.document.scrollLeft( 16530 this.document.scrollLeft() + o.scrollSpeed 16531 ); 16532 } 16533 16534 } 16535 16536 return scrolled; 16537 }, 16538 16539 _mouseDrag: function( event ) { 16540 var i, item, itemElement, intersection, 16541 o = this.options; 16542 16543 //Compute the helpers position 16544 this.position = this._generatePosition( event ); 16545 this.positionAbs = this._convertPositionTo( "absolute" ); 16546 16547 //Set the helper position 16548 if ( !this.options.axis || this.options.axis !== "y" ) { 16549 this.helper[ 0 ].style.left = this.position.left + "px"; 16550 } 16551 if ( !this.options.axis || this.options.axis !== "x" ) { 16552 this.helper[ 0 ].style.top = this.position.top + "px"; 16553 } 16554 16555 //Do scrolling 16556 if ( o.scroll ) { 16557 if ( this._scroll( event ) !== false ) { 16558 16559 //Update item positions used in position checks 16560 this._refreshItemPositions( true ); 16561 16562 if ( $.ui.ddmanager && !o.dropBehaviour ) { 16563 $.ui.ddmanager.prepareOffsets( this, event ); 16564 } 16565 } 16566 } 16567 16568 this.dragDirection = { 16569 vertical: this._getDragVerticalDirection(), 16570 horizontal: this._getDragHorizontalDirection() 16571 }; 16572 16573 //Rearrange 16574 for ( i = this.items.length - 1; i >= 0; i-- ) { 16575 16576 //Cache variables and intersection, continue if no intersection 16577 item = this.items[ i ]; 16578 itemElement = item.item[ 0 ]; 16579 intersection = this._intersectsWithPointer( item ); 16580 if ( !intersection ) { 16581 continue; 16582 } 16583 16584 // Only put the placeholder inside the current Container, skip all 16585 // items from other containers. This works because when moving 16586 // an item from one container to another the 16587 // currentContainer is switched before the placeholder is moved. 16588 // 16589 // Without this, moving items in "sub-sortables" can cause 16590 // the placeholder to jitter between the outer and inner container. 16591 if ( item.instance !== this.currentContainer ) { 16592 continue; 16593 } 16594 16595 // Cannot intersect with itself 16596 // no useless actions that have been done before 16597 // no action if the item moved is the parent of the item checked 16598 if ( itemElement !== this.currentItem[ 0 ] && 16599 this.placeholder[ intersection === 1 ? 16600 "next" : "prev" ]()[ 0 ] !== itemElement && 16601 !$.contains( this.placeholder[ 0 ], itemElement ) && 16602 ( this.options.type === "semi-dynamic" ? 16603 !$.contains( this.element[ 0 ], itemElement ) : 16604 true 16605 ) 16606 ) { 16607 16608 this.direction = intersection === 1 ? "down" : "up"; 16609 16610 if ( this.options.tolerance === "pointer" || 16611 this._intersectsWithSides( item ) ) { 16612 this._rearrange( event, item ); 16613 } else { 16614 break; 16615 } 16616 16617 this._trigger( "change", event, this._uiHash() ); 16618 break; 16619 } 16620 } 16621 16622 //Post events to containers 16623 this._contactContainers( event ); 16624 16625 //Interconnect with droppables 16626 if ( $.ui.ddmanager ) { 16627 $.ui.ddmanager.drag( this, event ); 16628 } 16629 16630 //Call callbacks 16631 this._trigger( "sort", event, this._uiHash() ); 16632 16633 this.lastPositionAbs = this.positionAbs; 16634 return false;
vendor: 5,063 bytes, lines 16635-16824
16635 16636 }, 16637 16638 _mouseStop: function( event, noPropagation ) { 16639 16640 if ( !event ) { 16641 return; 16642 } 16643 16644 //If we are using droppables, inform the manager about the drop 16645 if ( $.ui.ddmanager && !this.options.dropBehaviour ) { 16646 $.ui.ddmanager.drop( this, event ); 16647 } 16648 16649 if ( this.options.revert ) { 16650 var that = this, 16651 cur = this.placeholder.offset(), 16652 axis = this.options.axis, 16653 animation = {}; 16654 16655 if ( !axis || axis === "x" ) { 16656 animation.left = cur.left - this.offset.parent.left - this.margins.left + 16657 ( this.offsetParent[ 0 ] === this.document[ 0 ].body ? 16658 0 : 16659 this.offsetParent[ 0 ].scrollLeft 16660 ); 16661 } 16662 if ( !axis || axis === "y" ) { 16663 animation.top = cur.top - this.offset.parent.top - this.margins.top + 16664 ( this.offsetParent[ 0 ] === this.document[ 0 ].body ? 16665 0 : 16666 this.offsetParent[ 0 ].scrollTop 16667 ); 16668 } 16669 this.reverting = true; 16670 $( this.helper ).animate( 16671 animation, 16672 parseInt( this.options.revert, 10 ) || 500, 16673 function() { 16674 that._clear( event ); 16675 } 16676 ); 16677 } else { 16678 this._clear( event, noPropagation ); 16679 } 16680 16681 return false; 16682 16683 }, 16684 16685 cancel: function() { 16686 16687 if ( this.dragging ) { 16688 16689 this._mouseUp( new $.Event( "mouseup", { target: null } ) ); 16690 16691 if ( this.options.helper === "original" ) { 16692 this.currentItem.css( this._storedCSS ); 16693 this._removeClass( this.currentItem, "ui-sortable-helper" ); 16694 } else { 16695 this.currentItem.show(); 16696 } 16697 16698 //Post deactivating events to containers 16699 for ( var i = this.containers.length - 1; i >= 0; i-- ) { 16700 this.containers[ i ]._trigger( "deactivate", null, this._uiHash( this ) ); 16701 if ( this.containers[ i ].containerCache.over ) { 16702 this.containers[ i ]._trigger( "out", null, this._uiHash( this ) ); 16703 this.containers[ i ].containerCache.over = 0; 16704 } 16705 } 16706 16707 } 16708 16709 if ( this.placeholder ) { 16710 16711 //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, 16712 // it unbinds ALL events from the original node! 16713 if ( this.placeholder[ 0 ].parentNode ) { 16714 this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] ); 16715 } 16716 if ( this.options.helper !== "original" && this.helper && 16717 this.helper[ 0 ].parentNode ) { 16718 this.helper.remove(); 16719 } 16720 16721 $.extend( this, { 16722 helper: null, 16723 dragging: false, 16724 reverting: false, 16725 _noFinalSort: null 16726 } ); 16727 16728 if ( this.domPosition.prev ) { 16729 $( this.domPosition.prev ).after( this.currentItem ); 16730 } else { 16731 $( this.domPosition.parent ).prepend( this.currentItem ); 16732 } 16733 } 16734 16735 return this; 16736 16737 }, 16738 16739 serialize: function( o ) { 16740 16741 var items = this._getItemsAsjQuery( o && o.connected ), 16742 str = []; 16743 o = o || {}; 16744 16745 $( items ).each( function() { 16746 var res = ( $( o.item || this ).attr( o.attribute || "id" ) || "" ) 16747 .match( o.expression || ( /(.+)[\-=_](.+)/ ) ); 16748 if ( res ) { 16749 str.push( 16750 ( o.key || res[ 1 ] + "[]" ) + 16751 "=" + ( o.key && o.expression ? res[ 1 ] : res[ 2 ] ) ); 16752 } 16753 } ); 16754 16755 if ( !str.length && o.key ) { 16756 str.push( o.key + "=" ); 16757 } 16758 16759 return str.join( "&" ); 16760 16761 }, 16762 16763 toArray: function( o ) { 16764 16765 var items = this._getItemsAsjQuery( o && o.connected ), 16766 ret = []; 16767 16768 o = o || {}; 16769 16770 items.each( function() { 16771 ret.push( $( o.item || this ).attr( o.attribute || "id" ) || "" ); 16772 } ); 16773 return ret; 16774 16775 }, 16776 16777 /* Be careful with the following core functions */ 16778 _intersectsWith: function( item ) { 16779 16780 var x1 = this.positionAbs.left, 16781 x2 = x1 + this.helperProportions.width, 16782 y1 = this.positionAbs.top, 16783 y2 = y1 + this.helperProportions.height, 16784 l = item.left, 16785 r = l + item.width, 16786 t = item.top, 16787 b = t + item.height, 16788 dyClick = this.offset.click.top, 16789 dxClick = this.offset.click.left, 16790 isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && 16791 ( y1 + dyClick ) < b ), 16792 isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && 16793 ( x1 + dxClick ) < r ), 16794 isOverElement = isOverElementHeight && isOverElementWidth; 16795 16796 if ( this.options.tolerance === "pointer" || 16797 this.options.forcePointerForContainers || 16798 ( this.options.tolerance !== "pointer" && 16799 this.helperProportions[ this.floating ? "width" : "height" ] > 16800 item[ this.floating ? "width" : "height" ] ) 16801 ) { 16802 return isOverElement; 16803 } else { 16804 16805 return ( l < x1 + ( this.helperProportions.width / 2 ) && // Right Half 16806 x2 - ( this.helperProportions.width / 2 ) < r && // Left Half 16807 t < y1 + ( this.helperProportions.height / 2 ) && // Bottom Half 16808 y2 - ( this.helperProportions.height / 2 ) < b ); // Top Half 16809 16810 } 16811 }, 16812 16813 _intersectsWithPointer: function( item ) { 16814 var verticalDirection, horizontalDirection, 16815 isOverElementHeight = ( this.options.axis === "x" ) || 16816 this._isOverAxis( 16817 this.positionAbs.top + this.offset.click.top, item.top, item.height ), 16818 isOverElementWidth = ( this.options.axis === "y" ) || 16819 this._isOverAxis( 16820 this.positionAbs.left + this.offset.click.left, item.left, item.width ), 16821 isOverElement = isOverElementHeight && isOverElementWidth; 16822 16823 if ( !isOverElement ) { 16824 return false;
vendor: 8,518 bytes, lines 16825-17099
16825 } 16826 16827 verticalDirection = this.dragDirection.vertical; 16828 horizontalDirection = this.dragDirection.horizontal; 16829 16830 return this.floating ? 16831 ( ( horizontalDirection === "right" || verticalDirection === "down" ) ? 2 : 1 ) : 16832 ( verticalDirection && ( verticalDirection === "down" ? 2 : 1 ) ); 16833 16834 }, 16835 16836 _intersectsWithSides: function( item ) { 16837 16838 var isOverBottomHalf = this._isOverAxis( this.positionAbs.top + 16839 this.offset.click.top, item.top + ( item.height / 2 ), item.height ), 16840 isOverRightHalf = this._isOverAxis( this.positionAbs.left + 16841 this.offset.click.left, item.left + ( item.width / 2 ), item.width ), 16842 verticalDirection = this.dragDirection.vertical, 16843 horizontalDirection = this.dragDirection.horizontal; 16844 16845 if ( this.floating && horizontalDirection ) { 16846 return ( ( horizontalDirection === "right" && isOverRightHalf ) || 16847 ( horizontalDirection === "left" && !isOverRightHalf ) ); 16848 } else { 16849 return verticalDirection && ( ( verticalDirection === "down" && isOverBottomHalf ) || 16850 ( verticalDirection === "up" && !isOverBottomHalf ) ); 16851 } 16852 16853 }, 16854 16855 _getDragVerticalDirection: function() { 16856 var delta = this.positionAbs.top - this.lastPositionAbs.top; 16857 return delta !== 0 && ( delta > 0 ? "down" : "up" ); 16858 }, 16859 16860 _getDragHorizontalDirection: function() { 16861 var delta = this.positionAbs.left - this.lastPositionAbs.left; 16862 return delta !== 0 && ( delta > 0 ? "right" : "left" ); 16863 }, 16864 16865 refresh: function( event ) { 16866 this._refreshItems( event ); 16867 this._setHandleClassName(); 16868 this.refreshPositions(); 16869 return this; 16870 }, 16871 16872 _connectWith: function() { 16873 var options = this.options; 16874 return options.connectWith.constructor === String ? 16875 [ options.connectWith ] : 16876 options.connectWith; 16877 }, 16878 16879 _getItemsAsjQuery: function( connected ) { 16880 16881 var i, j, cur, inst, 16882 items = [], 16883 queries = [], 16884 connectWith = this._connectWith(); 16885 16886 if ( connectWith && connected ) { 16887 for ( i = connectWith.length - 1; i >= 0; i-- ) { 16888 cur = $( connectWith[ i ], this.document[ 0 ] ); 16889 for ( j = cur.length - 1; j >= 0; j-- ) { 16890 inst = $.data( cur[ j ], this.widgetFullName ); 16891 if ( inst && inst !== this && !inst.options.disabled ) { 16892 queries.push( [ typeof inst.options.items === "function" ? 16893 inst.options.items.call( inst.element ) : 16894 $( inst.options.items, inst.element ) 16895 .not( ".ui-sortable-helper" ) 16896 .not( ".ui-sortable-placeholder" ), inst ] ); 16897 } 16898 } 16899 } 16900 } 16901 16902 queries.push( [ typeof this.options.items === "function" ? 16903 this.options.items 16904 .call( this.element, null, { options: this.options, item: this.currentItem } ) : 16905 $( this.options.items, this.element ) 16906 .not( ".ui-sortable-helper" ) 16907 .not( ".ui-sortable-placeholder" ), this ] ); 16908 16909 function addItems() { 16910 items.push( this ); 16911 } 16912 for ( i = queries.length - 1; i >= 0; i-- ) { 16913 queries[ i ][ 0 ].each( addItems ); 16914 } 16915 16916 return $( items ); 16917 16918 }, 16919 16920 _removeCurrentsFromItems: function() { 16921 16922 var list = this.currentItem.find( ":data(" + this.widgetName + "-item)" ); 16923 16924 this.items = $.grep( this.items, function( item ) { 16925 for ( var j = 0; j < list.length; j++ ) { 16926 if ( list[ j ] === item.item[ 0 ] ) { 16927 return false; 16928 } 16929 } 16930 return true; 16931 } ); 16932 16933 }, 16934 16935 _refreshItems: function( event ) { 16936 16937 this.items = []; 16938 this.containers = [ this ]; 16939 16940 var i, j, cur, inst, targetData, _queries, item, queriesLength, 16941 items = this.items, 16942 queries = [ [ typeof this.options.items === "function" ? 16943 this.options.items.call( this.element[ 0 ], event, { item: this.currentItem } ) : 16944 $( this.options.items, this.element ), this ] ], 16945 connectWith = this._connectWith(); 16946 16947 //Shouldn't be run the first time through due to massive slow-down 16948 if ( connectWith && this.ready ) { 16949 for ( i = connectWith.length - 1; i >= 0; i-- ) { 16950 cur = $( connectWith[ i ], this.document[ 0 ] ); 16951 for ( j = cur.length - 1; j >= 0; j-- ) { 16952 inst = $.data( cur[ j ], this.widgetFullName ); 16953 if ( inst && inst !== this && !inst.options.disabled ) { 16954 queries.push( [ typeof inst.options.items === "function" ? 16955 inst.options.items 16956 .call( inst.element[ 0 ], event, { item: this.currentItem } ) : 16957 $( inst.options.items, inst.element ), inst ] ); 16958 this.containers.push( inst ); 16959 } 16960 } 16961 } 16962 } 16963 16964 for ( i = queries.length - 1; i >= 0; i-- ) { 16965 targetData = queries[ i ][ 1 ]; 16966 _queries = queries[ i ][ 0 ]; 16967 16968 for ( j = 0, queriesLength = _queries.length; j < queriesLength; j++ ) { 16969 item = $( _queries[ j ] ); 16970 16971 // Data for target checking (mouse manager) 16972 item.data( this.widgetName + "-item", targetData ); 16973 16974 items.push( { 16975 item: item, 16976 instance: targetData, 16977 width: 0, height: 0, 16978 left: 0, top: 0 16979 } ); 16980 } 16981 } 16982 16983 }, 16984 16985 _refreshItemPositions: function( fast ) { 16986 var i, item, t, p; 16987 16988 for ( i = this.items.length - 1; i >= 0; i-- ) { 16989 item = this.items[ i ]; 16990 16991 //We ignore calculating positions of all connected containers when we're not over them 16992 if ( this.currentContainer && item.instance !== this.currentContainer && 16993 item.item[ 0 ] !== this.currentItem[ 0 ] ) { 16994 continue; 16995 } 16996 16997 t = this.options.toleranceElement ? 16998 $( this.options.toleranceElement, item.item ) : 16999 item.item; 17000 17001 if ( !fast ) { 17002 item.width = t.outerWidth(); 17003 item.height = t.outerHeight(); 17004 } 17005 17006 p = t.offset(); 17007 item.left = p.left; 17008 item.top = p.top; 17009 } 17010 }, 17011 17012 refreshPositions: function( fast ) { 17013 17014 // Determine whether items are being displayed horizontally 17015 this.floating = this.items.length ? 17016 this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) : 17017 false; 17018 17019 // This has to be redone because due to the item being moved out/into the offsetParent, 17020 // the offsetParent's position will change 17021 if ( this.offsetParent && this.helper ) { 17022 this.offset.parent = this._getParentOffset(); 17023 } 17024 17025 this._refreshItemPositions( fast ); 17026 17027 var i, p; 17028 17029 if ( this.options.custom && this.options.custom.refreshContainers ) { 17030 this.options.custom.refreshContainers.call( this ); 17031 } else { 17032 for ( i = this.containers.length - 1; i >= 0; i-- ) { 17033 p = this.containers[ i ].element.offset(); 17034 this.containers[ i ].containerCache.left = p.left; 17035 this.containers[ i ].containerCache.top = p.top; 17036 this.containers[ i ].containerCache.width = 17037 this.containers[ i ].element.outerWidth(); 17038 this.containers[ i ].containerCache.height = 17039 this.containers[ i ].element.outerHeight(); 17040 } 17041 } 17042 17043 return this; 17044 }, 17045 17046 _createPlaceholder: function( that ) { 17047 that = that || this; 17048 var className, nodeName, 17049 o = that.options; 17050 17051 if ( !o.placeholder || o.placeholder.constructor === String ) { 17052 className = o.placeholder; 17053 nodeName = that.currentItem[ 0 ].nodeName.toLowerCase(); 17054 o.placeholder = { 17055 element: function() { 17056 17057 var element = $( "<" + nodeName + ">", that.document[ 0 ] ); 17058 17059 that._addClass( element, "ui-sortable-placeholder", 17060 className || that.currentItem[ 0 ].className ) 17061 ._removeClass( element, "ui-sortable-helper" ); 17062 17063 if ( nodeName === "tbody" ) { 17064 that._createTrPlaceholder( 17065 that.currentItem.find( "tr" ).eq( 0 ), 17066 $( "<tr>", that.document[ 0 ] ).appendTo( element ) 17067 ); 17068 } else if ( nodeName === "tr" ) { 17069 that._createTrPlaceholder( that.currentItem, element ); 17070 } else if ( nodeName === "img" ) { 17071 element.attr( "src", that.currentItem.attr( "src" ) ); 17072 } 17073 17074 if ( !className ) { 17075 element.css( "visibility", "hidden" ); 17076 } 17077 17078 return element; 17079 }, 17080 update: function( container, p ) { 17081 17082 // 1. If a className is set as 'placeholder option, we don't force sizes - 17083 // the class is responsible for that 17084 // 2. The option 'forcePlaceholderSize can be enabled to force it even if a 17085 // class name is specified 17086 if ( className && !o.forcePlaceholderSize ) { 17087 return; 17088 } 17089 17090 // If the element doesn't have a actual height or width by itself (without 17091 // styles coming from a stylesheet), it receives the inline height and width 17092 // from the dragged item. Or, if it's a tbody or tr, it's going to have a height 17093 // anyway since we're populating them with <td>s above, but they're unlikely to 17094 // be the correct height on their own if the row heights are dynamic, so we'll 17095 // always assign the height of the dragged item given forcePlaceholderSize 17096 // is true. 17097 if ( !p.height() || ( o.forcePlaceholderSize && 17098 ( nodeName === "tbody" || nodeName === "tr" ) ) ) { 17099 p.height(
vendor: 10,145 bytes, lines 17100-17407
17100 that.currentItem.innerHeight() - 17101 parseInt( that.currentItem.css( "paddingTop" ) || 0, 10 ) - 17102 parseInt( that.currentItem.css( "paddingBottom" ) || 0, 10 ) ); 17103 } 17104 if ( !p.width() ) { 17105 p.width( 17106 that.currentItem.innerWidth() - 17107 parseInt( that.currentItem.css( "paddingLeft" ) || 0, 10 ) - 17108 parseInt( that.currentItem.css( "paddingRight" ) || 0, 10 ) ); 17109 } 17110 } 17111 }; 17112 } 17113 17114 //Create the placeholder 17115 that.placeholder = $( o.placeholder.element.call( that.element, that.currentItem ) ); 17116 17117 //Append it after the actual current item 17118 that.currentItem.after( that.placeholder ); 17119 17120 //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) 17121 o.placeholder.update( that, that.placeholder ); 17122 17123 }, 17124 17125 _createTrPlaceholder: function( sourceTr, targetTr ) { 17126 var that = this; 17127 17128 sourceTr.children().each( function() { 17129 $( "<td> </td>", that.document[ 0 ] ) 17130 .attr( "colspan", $( this ).attr( "colspan" ) || 1 ) 17131 .appendTo( targetTr ); 17132 } ); 17133 }, 17134 17135 _contactContainers: function( event ) { 17136 var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom, 17137 floating, axis, 17138 innermostContainer = null, 17139 innermostIndex = null; 17140 17141 // Get innermost container that intersects with item 17142 for ( i = this.containers.length - 1; i >= 0; i-- ) { 17143 17144 // Never consider a container that's located within the item itself 17145 if ( $.contains( this.currentItem[ 0 ], this.containers[ i ].element[ 0 ] ) ) { 17146 continue; 17147 } 17148 17149 if ( this._intersectsWith( this.containers[ i ].containerCache ) ) { 17150 17151 // If we've already found a container and it's more "inner" than this, then continue 17152 if ( innermostContainer && 17153 $.contains( 17154 this.containers[ i ].element[ 0 ], 17155 innermostContainer.element[ 0 ] ) ) { 17156 continue; 17157 } 17158 17159 innermostContainer = this.containers[ i ]; 17160 innermostIndex = i; 17161 17162 } else { 17163 17164 // container doesn't intersect. trigger "out" event if necessary 17165 if ( this.containers[ i ].containerCache.over ) { 17166 this.containers[ i ]._trigger( "out", event, this._uiHash( this ) ); 17167 this.containers[ i ].containerCache.over = 0; 17168 } 17169 } 17170 17171 } 17172 17173 // If no intersecting containers found, return 17174 if ( !innermostContainer ) { 17175 return; 17176 } 17177 17178 // Move the item into the container if it's not there already 17179 if ( this.containers.length === 1 ) { 17180 if ( !this.containers[ innermostIndex ].containerCache.over ) { 17181 this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) ); 17182 this.containers[ innermostIndex ].containerCache.over = 1; 17183 } 17184 } else { 17185 17186 // When entering a new container, we will find the item with the least distance and 17187 // append our item near it 17188 dist = 10000; 17189 itemWithLeastDistance = null; 17190 floating = innermostContainer.floating || this._isFloating( this.currentItem ); 17191 posProperty = floating ? "left" : "top"; 17192 sizeProperty = floating ? "width" : "height"; 17193 axis = floating ? "pageX" : "pageY"; 17194 17195 for ( j = this.items.length - 1; j >= 0; j-- ) { 17196 if ( !$.contains( 17197 this.containers[ innermostIndex ].element[ 0 ], this.items[ j ].item[ 0 ] ) 17198 ) { 17199 continue; 17200 } 17201 if ( this.items[ j ].item[ 0 ] === this.currentItem[ 0 ] ) { 17202 continue; 17203 } 17204 17205 cur = this.items[ j ].item.offset()[ posProperty ]; 17206 nearBottom = false; 17207 if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) { 17208 nearBottom = true; 17209 } 17210 17211 if ( Math.abs( event[ axis ] - cur ) < dist ) { 17212 dist = Math.abs( event[ axis ] - cur ); 17213 itemWithLeastDistance = this.items[ j ]; 17214 this.direction = nearBottom ? "up" : "down"; 17215 } 17216 } 17217 17218 //Check if dropOnEmpty is enabled 17219 if ( !itemWithLeastDistance && !this.options.dropOnEmpty ) { 17220 return; 17221 } 17222 17223 if ( this.currentContainer === this.containers[ innermostIndex ] ) { 17224 if ( !this.currentContainer.containerCache.over ) { 17225 this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() ); 17226 this.currentContainer.containerCache.over = 1; 17227 } 17228 return; 17229 } 17230 17231 if ( itemWithLeastDistance ) { 17232 this._rearrange( event, itemWithLeastDistance, null, true ); 17233 } else { 17234 this._rearrange( event, null, this.containers[ innermostIndex ].element, true ); 17235 } 17236 this._trigger( "change", event, this._uiHash() ); 17237 this.containers[ innermostIndex ]._trigger( "change", event, this._uiHash( this ) ); 17238 this.currentContainer = this.containers[ innermostIndex ]; 17239 17240 //Update the placeholder 17241 this.options.placeholder.update( this.currentContainer, this.placeholder ); 17242 17243 //Update scrollParent 17244 this.scrollParent = this.placeholder.scrollParent(); 17245 17246 //Update overflowOffset 17247 if ( this.scrollParent[ 0 ] !== this.document[ 0 ] && 17248 this.scrollParent[ 0 ].tagName !== "HTML" ) { 17249 this.overflowOffset = this.scrollParent.offset(); 17250 } 17251 17252 this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) ); 17253 this.containers[ innermostIndex ].containerCache.over = 1; 17254 } 17255 17256 }, 17257 17258 _createHelper: function( event ) { 17259 17260 var o = this.options, 17261 helper = typeof o.helper === "function" ? 17262 $( o.helper.apply( this.element[ 0 ], [ event, this.currentItem ] ) ) : 17263 ( o.helper === "clone" ? this.currentItem.clone() : this.currentItem ); 17264 17265 //Add the helper to the DOM if that didn't happen already 17266 if ( !helper.parents( "body" ).length ) { 17267 this.appendTo[ 0 ].appendChild( helper[ 0 ] ); 17268 } 17269 17270 if ( helper[ 0 ] === this.currentItem[ 0 ] ) { 17271 this._storedCSS = { 17272 width: this.currentItem[ 0 ].style.width, 17273 height: this.currentItem[ 0 ].style.height, 17274 position: this.currentItem.css( "position" ), 17275 top: this.currentItem.css( "top" ), 17276 left: this.currentItem.css( "left" ) 17277 }; 17278 } 17279 17280 if ( !helper[ 0 ].style.width || o.forceHelperSize ) { 17281 helper.width( this.currentItem.width() ); 17282 } 17283 if ( !helper[ 0 ].style.height || o.forceHelperSize ) { 17284 helper.height( this.currentItem.height() ); 17285 } 17286 17287 return helper; 17288 17289 }, 17290 17291 _adjustOffsetFromHelper: function( obj ) { 17292 if ( typeof obj === "string" ) { 17293 obj = obj.split( " " ); 17294 } 17295 if ( Array.isArray( obj ) ) { 17296 obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 }; 17297 } 17298 if ( "left" in obj ) { 17299 this.offset.click.left = obj.left + this.margins.left; 17300 } 17301 if ( "right" in obj ) { 17302 this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; 17303 } 17304 if ( "top" in obj ) { 17305 this.offset.click.top = obj.top + this.margins.top; 17306 } 17307 if ( "bottom" in obj ) { 17308 this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; 17309 } 17310 }, 17311 17312 _getParentOffset: function() { 17313 17314 //Get the offsetParent and cache its position 17315 this.offsetParent = this.helper.offsetParent(); 17316 var po = this.offsetParent.offset(); 17317 17318 // This is a special case where we need to modify a offset calculated on start, since the 17319 // following happened: 17320 // 1. The position of the helper is absolute, so it's position is calculated based on the 17321 // next positioned parent 17322 // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't 17323 // the document, which means that the scroll is included in the initial calculation of the 17324 // offset of the parent, and never recalculated upon drag 17325 if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== this.document[ 0 ] && 17326 $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) { 17327 po.left += this.scrollParent.scrollLeft(); 17328 po.top += this.scrollParent.scrollTop(); 17329 } 17330 17331 // This needs to be actually done for all browsers, since pageX/pageY includes this 17332 // information with an ugly IE fix 17333 if ( this.offsetParent[ 0 ] === this.document[ 0 ].body || 17334 ( this.offsetParent[ 0 ].tagName && 17335 this.offsetParent[ 0 ].tagName.toLowerCase() === "html" && $.ui.ie ) ) { 17336 po = { top: 0, left: 0 }; 17337 } 17338 17339 return { 17340 top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ), 17341 left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 ) 17342 }; 17343 17344 }, 17345 17346 _getRelativeOffset: function() { 17347 17348 if ( this.cssPosition === "relative" ) { 17349 var p = this.currentItem.position(); 17350 return { 17351 top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) + 17352 this.scrollParent.scrollTop(), 17353 left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) + 17354 this.scrollParent.scrollLeft() 17355 }; 17356 } else { 17357 return { top: 0, left: 0 }; 17358 } 17359 17360 }, 17361 17362 _cacheMargins: function() { 17363 this.margins = { 17364 left: ( parseInt( this.currentItem.css( "marginLeft" ), 10 ) || 0 ), 17365 top: ( parseInt( this.currentItem.css( "marginTop" ), 10 ) || 0 ) 17366 }; 17367 }, 17368 17369 _cacheHelperProportions: function() { 17370 this.helperProportions = { 17371 width: this.helper.outerWidth(), 17372 height: this.helper.outerHeight() 17373 }; 17374 }, 17375 17376 _setContainment: function() { 17377 17378 var ce, co, over, 17379 o = this.options; 17380 if ( o.containment === "parent" ) { 17381 o.containment = this.helper[ 0 ].parentNode; 17382 } 17383 if ( o.containment === "document" || o.containment === "window" ) { 17384 this.containment = [ 17385 0 - this.offset.relative.left - this.offset.parent.left, 17386 0 - this.offset.relative.top - this.offset.parent.top, 17387 o.containment === "document" ? 17388 this.document.width() : 17389 this.window.width() - this.helperProportions.width - this.margins.left, 17390 ( o.containment === "document" ? 17391 ( this.document.height() || document.body.parentNode.scrollHeight ) : 17392 this.window.height() || this.document[ 0 ].body.parentNode.scrollHeight 17393 ) - this.helperProportions.height - this.margins.top 17394 ]; 17395 } 17396 17397 if ( !( /^(document|window|parent)$/ ).test( o.containment ) ) { 17398 ce = $( o.containment )[ 0 ]; 17399 co = $( o.containment ).offset(); 17400 over = ( $( ce ).css( "overflow" ) !== "hidden" ); 17401 17402 this.containment = [ 17403 co.left + ( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) + 17404 ( parseInt( $( ce ).css( "paddingLeft" ), 10 ) || 0 ) - this.margins.left, 17405 co.top + ( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) + 17406 ( parseInt( $( ce ).css( "paddingTop" ), 10 ) || 0 ) - this.margins.top, 17407 co.left + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth )
vendor: 1,747 bytes, lines 17407-17459
17407: ce.offsetWidth ) - 17408 ( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) - 17409 ( parseInt( $( ce ).css( "paddingRight" ), 10 ) || 0 ) - 17410 this.helperProportions.width - this.margins.left, 17411 co.top + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - 17412 ( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) - 17413 ( parseInt( $( ce ).css( "paddingBottom" ), 10 ) || 0 ) - 17414 this.helperProportions.height - this.margins.top 17415 ]; 17416 } 17417 17418 }, 17419 17420 _convertPositionTo: function( d, pos ) { 17421 17422 if ( !pos ) { 17423 pos = this.position; 17424 } 17425 var mod = d === "absolute" ? 1 : -1, 17426 scroll = this.cssPosition === "absolute" && 17427 !( this.scrollParent[ 0 ] !== this.document[ 0 ] && 17428 $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? 17429 this.offsetParent : 17430 this.scrollParent, 17431 scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName ); 17432 17433 return { 17434 top: ( 17435 17436 // The absolute mouse position 17437 pos.top + 17438 17439 // Only for relative positioned nodes: Relative offset from element to offset parent 17440 this.offset.relative.top * mod + 17441 17442 // The offsetParent's offset without borders (offset + border) 17443 this.offset.parent.top * mod - 17444 ( ( this.cssPosition === "fixed" ? 17445 -this.scrollParent.scrollTop() : 17446 ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod ) 17447 ), 17448 left: ( 17449 17450 // The absolute mouse position 17451 pos.left + 17452 17453 // Only for relative positioned nodes: Relative offset from element to offset parent 17454 this.offset.relative.left * mod + 17455 17456 // The offsetParent's offset without borders (offset + border) 17457 this.offset.parent.left * mod - 17458 ( ( this.cssPosition === "fixed" ? 17459 -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 :
vendor: 4,632 bytes, lines 17460-17603
17460 scroll.scrollLeft() ) * mod ) 17461 ) 17462 }; 17463 17464 }, 17465 17466 _generatePosition: function( event ) { 17467 17468 var top, left, 17469 o = this.options, 17470 pageX = event.pageX, 17471 pageY = event.pageY, 17472 scroll = this.cssPosition === "absolute" && 17473 !( this.scrollParent[ 0 ] !== this.document[ 0 ] && 17474 $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? 17475 this.offsetParent : 17476 this.scrollParent, 17477 scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName ); 17478 17479 // This is another very weird special case that only happens for relative elements: 17480 // 1. If the css position is relative 17481 // 2. and the scroll parent is the document or similar to the offset parent 17482 // we have to refresh the relative offset during the scroll so there are no jumps 17483 if ( this.cssPosition === "relative" && !( this.scrollParent[ 0 ] !== this.document[ 0 ] && 17484 this.scrollParent[ 0 ] !== this.offsetParent[ 0 ] ) ) { 17485 this.offset.relative = this._getRelativeOffset(); 17486 } 17487 17488 /* 17489 * - Position constraining - 17490 * Constrain the position to a mix of grid, containment. 17491 */ 17492 17493 if ( this.originalPosition ) { //If we are not dragging yet, we won't check for options 17494 17495 if ( this.containment ) { 17496 if ( event.pageX - this.offset.click.left < this.containment[ 0 ] ) { 17497 pageX = this.containment[ 0 ] + this.offset.click.left; 17498 } 17499 if ( event.pageY - this.offset.click.top < this.containment[ 1 ] ) { 17500 pageY = this.containment[ 1 ] + this.offset.click.top; 17501 } 17502 if ( event.pageX - this.offset.click.left > this.containment[ 2 ] ) { 17503 pageX = this.containment[ 2 ] + this.offset.click.left; 17504 } 17505 if ( event.pageY - this.offset.click.top > this.containment[ 3 ] ) { 17506 pageY = this.containment[ 3 ] + this.offset.click.top; 17507 } 17508 } 17509 17510 if ( o.grid ) { 17511 top = this.originalPageY + Math.round( ( pageY - this.originalPageY ) / 17512 o.grid[ 1 ] ) * o.grid[ 1 ]; 17513 pageY = this.containment ? 17514 ( ( top - this.offset.click.top >= this.containment[ 1 ] && 17515 top - this.offset.click.top <= this.containment[ 3 ] ) ? 17516 top : 17517 ( ( top - this.offset.click.top >= this.containment[ 1 ] ) ? 17518 top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) : 17519 top; 17520 17521 left = this.originalPageX + Math.round( ( pageX - this.originalPageX ) / 17522 o.grid[ 0 ] ) * o.grid[ 0 ]; 17523 pageX = this.containment ? 17524 ( ( left - this.offset.click.left >= this.containment[ 0 ] && 17525 left - this.offset.click.left <= this.containment[ 2 ] ) ? 17526 left : 17527 ( ( left - this.offset.click.left >= this.containment[ 0 ] ) ? 17528 left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) : 17529 left; 17530 } 17531 17532 } 17533 17534 return { 17535 top: ( 17536 17537 // The absolute mouse position 17538 pageY - 17539 17540 // Click offset (relative to the element) 17541 this.offset.click.top - 17542 17543 // Only for relative positioned nodes: Relative offset from element to offset parent 17544 this.offset.relative.top - 17545 17546 // The offsetParent's offset without borders (offset + border) 17547 this.offset.parent.top + 17548 ( ( this.cssPosition === "fixed" ? 17549 -this.scrollParent.scrollTop() : 17550 ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) ) 17551 ), 17552 left: ( 17553 17554 // The absolute mouse position 17555 pageX - 17556 17557 // Click offset (relative to the element) 17558 this.offset.click.left - 17559 17560 // Only for relative positioned nodes: Relative offset from element to offset parent 17561 this.offset.relative.left - 17562 17563 // The offsetParent's offset without borders (offset + border) 17564 this.offset.parent.left + 17565 ( ( this.cssPosition === "fixed" ? 17566 -this.scrollParent.scrollLeft() : 17567 scrollIsRootNode ? 0 : scroll.scrollLeft() ) ) 17568 ) 17569 }; 17570 17571 }, 17572 17573 _rearrange: function( event, i, a, hardRefresh ) { 17574 17575 if ( a ) { 17576 a[ 0 ].appendChild( this.placeholder[ 0 ] ); 17577 } else { 17578 i.item[ 0 ].parentNode.insertBefore( this.placeholder[ 0 ], 17579 ( this.direction === "down" ? i.item[ 0 ] : i.item[ 0 ].nextSibling ) ); 17580 } 17581 17582 //Various things done here to improve the performance: 17583 // 1. we create a setTimeout, that calls refreshPositions 17584 // 2. on the instance, we have a counter variable, that get's higher after every append 17585 // 3. on the local scope, we copy the counter variable, and check in the timeout, 17586 // if it's still the same 17587 // 4. this lets only the last addition to the timeout stack through 17588 this.counter = this.counter ? ++this.counter : 1; 17589 var counter = this.counter; 17590 17591 this._delay( function() { 17592 if ( counter === this.counter ) { 17593 17594 //Precompute after each DOM insertion, NOT on mousemove 17595 this.refreshPositions( !hardRefresh ); 17596 } 17597 } ); 17598 17599 }, 17600 17601 _clear: function( event, noPropagation ) { 17602 17603 this.reverting = false;
vendor: 4,270 bytes, lines 17604-17748
17604 17605 // We delay all events that have to be triggered to after the point where the placeholder 17606 // has been removed and everything else normalized again 17607 var i, 17608 delayedTriggers = []; 17609 17610 // We first have to update the dom position of the actual currentItem 17611 // Note: don't do it if the current item is already removed (by a user), or it gets 17612 // reappended (see #4088) 17613 if ( !this._noFinalSort && this.currentItem.parent().length ) { 17614 this.placeholder.before( this.currentItem ); 17615 } 17616 this._noFinalSort = null; 17617 17618 if ( this.helper[ 0 ] === this.currentItem[ 0 ] ) { 17619 for ( i in this._storedCSS ) { 17620 if ( this._storedCSS[ i ] === "auto" || this._storedCSS[ i ] === "static" ) { 17621 this._storedCSS[ i ] = ""; 17622 } 17623 } 17624 this.currentItem.css( this._storedCSS ); 17625 this._removeClass( this.currentItem, "ui-sortable-helper" ); 17626 } else { 17627 this.currentItem.show(); 17628 } 17629 17630 if ( this.fromOutside && !noPropagation ) { 17631 delayedTriggers.push( function( event ) { 17632 this._trigger( "receive", event, this._uiHash( this.fromOutside ) ); 17633 } ); 17634 } 17635 if ( ( this.fromOutside || 17636 this.domPosition.prev !== 17637 this.currentItem.prev().not( ".ui-sortable-helper" )[ 0 ] || 17638 this.domPosition.parent !== this.currentItem.parent()[ 0 ] ) && !noPropagation ) { 17639 17640 // Trigger update callback if the DOM position has changed 17641 delayedTriggers.push( function( event ) { 17642 this._trigger( "update", event, this._uiHash() ); 17643 } ); 17644 } 17645 17646 // Check if the items Container has Changed and trigger appropriate 17647 // events. 17648 if ( this !== this.currentContainer ) { 17649 if ( !noPropagation ) { 17650 delayedTriggers.push( function( event ) { 17651 this._trigger( "remove", event, this._uiHash() ); 17652 } ); 17653 delayedTriggers.push( ( function( c ) { 17654 return function( event ) { 17655 c._trigger( "receive", event, this._uiHash( this ) ); 17656 }; 17657 } ).call( this, this.currentContainer ) ); 17658 delayedTriggers.push( ( function( c ) { 17659 return function( event ) { 17660 c._trigger( "update", event, this._uiHash( this ) ); 17661 }; 17662 } ).call( this, this.currentContainer ) ); 17663 } 17664 } 17665 17666 //Post events to containers 17667 function delayEvent( type, instance, container ) { 17668 return function( event ) { 17669 container._trigger( type, event, instance._uiHash( instance ) ); 17670 }; 17671 } 17672 for ( i = this.containers.length - 1; i >= 0; i-- ) { 17673 if ( !noPropagation ) { 17674 delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) ); 17675 } 17676 if ( this.containers[ i ].containerCache.over ) { 17677 delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) ); 17678 this.containers[ i ].containerCache.over = 0; 17679 } 17680 } 17681 17682 //Do what was originally in plugins 17683 if ( this.storedCursor ) { 17684 this.document.find( "body" ).css( "cursor", this.storedCursor ); 17685 this.storedStylesheet.remove(); 17686 } 17687 if ( this._storedOpacity ) { 17688 this.helper.css( "opacity", this._storedOpacity ); 17689 } 17690 if ( this._storedZIndex ) { 17691 this.helper.css( "zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex ); 17692 } 17693 17694 this.dragging = false; 17695 17696 if ( !noPropagation ) { 17697 this._trigger( "beforeStop", event, this._uiHash() ); 17698 } 17699 17700 //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, 17701 // it unbinds ALL events from the original node! 17702 this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] ); 17703 17704 if ( !this.cancelHelperRemoval ) { 17705 if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) { 17706 this.helper.remove(); 17707 } 17708 this.helper = null; 17709 } 17710 17711 if ( !noPropagation ) { 17712 for ( i = 0; i < delayedTriggers.length; i++ ) { 17713 17714 // Trigger all delayed events 17715 delayedTriggers[ i ].call( this, event ); 17716 } 17717 this._trigger( "stop", event, this._uiHash() ); 17718 } 17719 17720 this.fromOutside = false; 17721 return !this.cancelHelperRemoval; 17722 17723 }, 17724 17725 _trigger: function() { 17726 if ( $.Widget.prototype._trigger.apply( this, arguments ) === false ) { 17727 this.cancel(); 17728 } 17729 }, 17730 17731 _uiHash: function( _inst ) { 17732 var inst = _inst || this; 17733 return { 17734 helper: inst.helper, 17735 placeholder: inst.placeholder || $( [] ), 17736 position: inst.position, 17737 originalPosition: inst.originalPosition, 17738 offset: inst.positionAbs, 17739 item: inst.currentItem, 17740 sender: _inst ? _inst.element : null 17741 }; 17742 } 17743 17744} ); 17745 17746 17747/*! 17748 * jQuery UI
17748Accordion 1.13.2 17749 * http://jqueryui.com 17750 * 17751 * Copyright jQuery Foundation and other contributors 17752 * Released under the MIT license. 17753 * http://jquery.org/license 17754 */ 17755 17756//>>label: Accordion 17757//>>group: Widgets 17758/* eslint-disable max-len */ 17759//>>description: Displays collapsible content panels for presenting information in a limited amount of space. 17760/* eslint-enable max-len */ 17761//>>docs: http://api.jqueryui.com/accordion/ 17762//>>demos: http://jqueryui.com/accordion/ 17763//>>css.structure: ../../themes/base/core.css 17764//>>css.structure: ../../themes/base/accordion.css 17765//>>css.theme: ../../themes/base/theme.css 17766 17767 17768var widgetsAccordion = $.widget( "ui.accordion", { 17769 version: "1.13.2
vendor: 15,122 bytes, lines 17769-18348
17769", 17770 options: { 17771 active: 0, 17772 animate: {}, 17773 classes: { 17774 "ui-accordion-header": "ui-corner-top", 17775 "ui-accordion-header-collapsed": "ui-corner-all", 17776 "ui-accordion-content": "ui-corner-bottom" 17777 }, 17778 collapsible: false, 17779 event: "click", 17780 header: function( elem ) { 17781 return elem.find( "> li > :first-child" ).add( elem.find( "> :not(li)" ).even() ); 17782 }, 17783 heightStyle: "auto", 17784 icons: { 17785 activeHeader: "ui-icon-triangle-1-s", 17786 header: "ui-icon-triangle-1-e" 17787 }, 17788 17789 // Callbacks 17790 activate: null, 17791 beforeActivate: null 17792 }, 17793 17794 hideProps: { 17795 borderTopWidth: "hide", 17796 borderBottomWidth: "hide", 17797 paddingTop: "hide", 17798 paddingBottom: "hide", 17799 height: "hide" 17800 }, 17801 17802 showProps: { 17803 borderTopWidth: "show", 17804 borderBottomWidth: "show", 17805 paddingTop: "show", 17806 paddingBottom: "show", 17807 height: "show" 17808 }, 17809 17810 _create: function() { 17811 var options = this.options; 17812 17813 this.prevShow = this.prevHide = $(); 17814 this._addClass( "ui-accordion", "ui-widget ui-helper-reset" ); 17815 this.element.attr( "role", "tablist" ); 17816 17817 // Don't allow collapsible: false and active: false / null 17818 if ( !options.collapsible && ( options.active === false || options.active == null ) ) { 17819 options.active = 0; 17820 } 17821 17822 this._processPanels(); 17823 17824 // handle negative values 17825 if ( options.active < 0 ) { 17826 options.active += this.headers.length; 17827 } 17828 this._refresh(); 17829 }, 17830 17831 _getCreateEventData: function() { 17832 return { 17833 header: this.active, 17834 panel: !this.active.length ? $() : this.active.next() 17835 }; 17836 }, 17837 17838 _createIcons: function() { 17839 var icon, children, 17840 icons = this.options.icons; 17841 17842 if ( icons ) { 17843 icon = $( "<span>" ); 17844 this._addClass( icon, "ui-accordion-header-icon", "ui-icon " + icons.header ); 17845 icon.prependTo( this.headers ); 17846 children = this.active.children( ".ui-accordion-header-icon" ); 17847 this._removeClass( children, icons.header ) 17848 ._addClass( children, null, icons.activeHeader ) 17849 ._addClass( this.headers, "ui-accordion-icons" ); 17850 } 17851 }, 17852 17853 _destroyIcons: function() { 17854 this._removeClass( this.headers, "ui-accordion-icons" ); 17855 this.headers.children( ".ui-accordion-header-icon" ).remove(); 17856 }, 17857 17858 _destroy: function() { 17859 var contents; 17860 17861 // Clean up main element 17862 this.element.removeAttr( "role" ); 17863 17864 // Clean up headers 17865 this.headers 17866 .removeAttr( "role aria-expanded aria-selected aria-controls tabIndex" ) 17867 .removeUniqueId(); 17868 17869 this._destroyIcons(); 17870 17871 // Clean up content panels 17872 contents = this.headers.next() 17873 .css( "display", "" ) 17874 .removeAttr( "role aria-hidden aria-labelledby" ) 17875 .removeUniqueId(); 17876 17877 if ( this.options.heightStyle !== "content" ) { 17878 contents.css( "height", "" ); 17879 } 17880 }, 17881 17882 _setOption: function( key, value ) { 17883 if ( key === "active" ) { 17884 17885 // _activate() will handle invalid values and update this.options 17886 this._activate( value ); 17887 return; 17888 } 17889 17890 if ( key === "event" ) { 17891 if ( this.options.event ) { 17892 this._off( this.headers, this.options.event ); 17893 } 17894 this._setupEvents( value ); 17895 } 17896 17897 this._super( key, value ); 17898 17899 // Setting collapsible: false while collapsed; open first panel 17900 if ( key === "collapsible" && !value && this.options.active === false ) { 17901 this._activate( 0 ); 17902 } 17903 17904 if ( key === "icons" ) { 17905 this._destroyIcons(); 17906 if ( value ) { 17907 this._createIcons(); 17908 } 17909 } 17910 }, 17911 17912 _setOptionDisabled: function( value ) { 17913 this._super( value ); 17914 17915 this.element.attr( "aria-disabled", value ); 17916 17917 // Support: IE8 Only 17918 // #5332 / #6059 - opacity doesn't cascade to positioned elements in IE 17919 // so we need to add the disabled class to the headers and panels 17920 this._toggleClass( null, "ui-state-disabled", !!value ); 17921 this._toggleClass( this.headers.add( this.headers.next() ), null, "ui-state-disabled", 17922 !!value ); 17923 }, 17924 17925 _keydown: function( event ) { 17926 if ( event.altKey || event.ctrlKey ) { 17927 return; 17928 } 17929 17930 var keyCode = $.ui.keyCode, 17931 length = this.headers.length, 17932 currentIndex = this.headers.index( event.target ), 17933 toFocus = false; 17934 17935 switch ( event.keyCode ) { 17936 case keyCode.RIGHT: 17937 case keyCode.DOWN: 17938 toFocus = this.headers[ ( currentIndex + 1 ) % length ]; 17939 break; 17940 case keyCode.LEFT: 17941 case keyCode.UP: 17942 toFocus = this.headers[ ( currentIndex - 1 + length ) % length ]; 17943 break; 17944 case keyCode.SPACE: 17945 case keyCode.ENTER: 17946 this._eventHandler( event ); 17947 break; 17948 case keyCode.HOME: 17949 toFocus = this.headers[ 0 ]; 17950 break; 17951 case keyCode.END: 17952 toFocus = this.headers[ length - 1 ]; 17953 break; 17954 } 17955 17956 if ( toFocus ) { 17957 $( event.target ).attr( "tabIndex", -1 ); 17958 $( toFocus ).attr( "tabIndex", 0 ); 17959 $( toFocus ).trigger( "focus" ); 17960 event.preventDefault(); 17961 } 17962 }, 17963 17964 _panelKeyDown: function( event ) { 17965 if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) { 17966 $( event.currentTarget ).prev().trigger( "focus" ); 17967 } 17968 }, 17969 17970 refresh: function() { 17971 var options = this.options; 17972 this._processPanels(); 17973 17974 // Was collapsed or no panel 17975 if ( ( options.active === false && options.collapsible === true ) || 17976 !this.headers.length ) { 17977 options.active = false; 17978 this.active = $(); 17979 17980 // active false only when collapsible is true 17981 } else if ( options.active === false ) { 17982 this._activate( 0 ); 17983 17984 // was active, but active panel is gone 17985 } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { 17986 17987 // all remaining panel are disabled 17988 if ( this.headers.length === this.headers.find( ".ui-state-disabled" ).length ) { 17989 options.active = false; 17990 this.active = $(); 17991 17992 // activate previous panel 17993 } else { 17994 this._activate( Math.max( 0, options.active - 1 ) ); 17995 } 17996 17997 // was active, active panel still exists 17998 } else { 17999 18000 // make sure active index is correct 18001 options.active = this.headers.index( this.active ); 18002 } 18003 18004 this._destroyIcons(); 18005 18006 this._refresh(); 18007 }, 18008 18009 _processPanels: function() { 18010 var prevHeaders = this.headers, 18011 prevPanels = this.panels; 18012 18013 if ( typeof this.options.header === "function" ) { 18014 this.headers = this.options.header( this.element ); 18015 } else { 18016 this.headers = this.element.find( this.options.header ); 18017 } 18018 this._addClass( this.headers, "ui-accordion-header ui-accordion-header-collapsed", 18019 "ui-state-default" ); 18020 18021 this.panels = this.headers.next().filter( ":not(.ui-accordion-content-active)" ).hide(); 18022 this._addClass( this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content" ); 18023 18024 // Avoid memory leaks (#10056) 18025 if ( prevPanels ) { 18026 this._off( prevHeaders.not( this.headers ) ); 18027 this._off( prevPanels.not( this.panels ) ); 18028 } 18029 }, 18030 18031 _refresh: function() { 18032 var maxHeight, 18033 options = this.options, 18034 heightStyle = options.heightStyle, 18035 parent = this.element.parent(); 18036 18037 this.active = this._findActive( options.active ); 18038 this._addClass( this.active, "ui-accordion-header-active", "ui-state-active" ) 18039 ._removeClass( this.active, "ui-accordion-header-collapsed" ); 18040 this._addClass( this.active.next(), "ui-accordion-content-active" ); 18041 this.active.next().show(); 18042 18043 this.headers 18044 .attr( "role", "tab" ) 18045 .each( function() { 18046 var header = $( this ), 18047 headerId = header.uniqueId().attr( "id" ), 18048 panel = header.next(), 18049 panelId = panel.uniqueId().attr( "id" ); 18050 header.attr( "aria-controls", panelId ); 18051 panel.attr( "aria-labelledby", headerId ); 18052 } ) 18053 .next() 18054 .attr( "role", "tabpanel" ); 18055 18056 this.headers 18057 .not( this.active ) 18058 .attr( { 18059 "aria-selected": "false", 18060 "aria-expanded": "false", 18061 tabIndex: -1 18062 } ) 18063 .next() 18064 .attr( { 18065 "aria-hidden": "true" 18066 } ) 18067 .hide(); 18068 18069 // Make sure at least one header is in the tab order 18070 if ( !this.active.length ) { 18071 this.headers.eq( 0 ).attr( "tabIndex", 0 ); 18072 } else { 18073 this.active.attr( { 18074 "aria-selected": "true", 18075 "aria-expanded": "true", 18076 tabIndex: 0 18077 } ) 18078 .next() 18079 .attr( { 18080 "aria-hidden": "false" 18081 } ); 18082 } 18083 18084 this._createIcons(); 18085 18086 this._setupEvents( options.event ); 18087 18088 if ( heightStyle === "fill" ) { 18089 maxHeight = parent.height(); 18090 this.element.siblings( ":visible" ).each( function() { 18091 var elem = $( this ), 18092 position = elem.css( "position" ); 18093 18094 if ( position === "absolute" || position === "fixed" ) { 18095 return; 18096 } 18097 maxHeight -= elem.outerHeight( true ); 18098 } ); 18099 18100 this.headers.each( function() { 18101 maxHeight -= $( this ).outerHeight( true ); 18102 } ); 18103 18104 this.headers.next() 18105 .each( function() { 18106 $( this ).height( Math.max( 0, maxHeight - 18107 $( this ).innerHeight() + $( this ).height() ) ); 18108 } ) 18109 .css( "overflow", "auto" ); 18110 } else if ( heightStyle === "auto" ) { 18111 maxHeight = 0; 18112 this.headers.next() 18113 .each( function() { 18114 var isVisible = $( this ).is( ":visible" ); 18115 if ( !isVisible ) { 18116 $( this ).show(); 18117 } 18118 maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() ); 18119 if ( !isVisible ) { 18120 $( this ).hide(); 18121 } 18122 } ) 18123 .height( maxHeight ); 18124 } 18125 }, 18126 18127 _activate: function( index ) { 18128 var active = this._findActive( index )[ 0 ]; 18129 18130 // Trying to activate the already active panel 18131 if ( active === this.active[ 0 ] ) { 18132 return; 18133 } 18134 18135 // Trying to collapse, simulate a click on the currently active header 18136 active = active || this.active[ 0 ]; 18137 18138 this._eventHandler( { 18139 target: active, 18140 currentTarget: active, 18141 preventDefault: $.noop 18142 } ); 18143 }, 18144 18145 _findActive: function( selector ) { 18146 return typeof selector === "number" ? this.headers.eq( selector ) : $(); 18147 }, 18148 18149 _setupEvents: function( event ) { 18150 var events = { 18151 keydown: "_keydown" 18152 }; 18153 if ( event ) { 18154 $.each( event.split( " " ), function( index, eventName ) { 18155 events[ eventName ] = "_eventHandler"; 18156 } ); 18157 } 18158 18159 this._off( this.headers.add( this.headers.next() ) ); 18160 this._on( this.headers, events ); 18161 this._on( this.headers.next(), { keydown: "_panelKeyDown" } ); 18162 this._hoverable( this.headers ); 18163 this._focusable( this.headers ); 18164 }, 18165 18166 _eventHandler: function( event ) { 18167 var activeChildren, clickedChildren, 18168 options = this.options, 18169 active = this.active, 18170 clicked = $( event.currentTarget ), 18171 clickedIsActive = clicked[ 0 ] === active[ 0 ], 18172 collapsing = clickedIsActive && options.collapsible, 18173 toShow = collapsing ? $() : clicked.next(), 18174 toHide = active.next(), 18175 eventData = { 18176 oldHeader: active, 18177 oldPanel: toHide, 18178 newHeader: collapsing ? $() : clicked, 18179 newPanel: toShow 18180 }; 18181 18182 event.preventDefault(); 18183 18184 if ( 18185 18186 // click on active header, but not collapsible 18187 ( clickedIsActive && !options.collapsible ) || 18188 18189 // allow canceling activation 18190 ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { 18191 return; 18192 } 18193 18194 options.active = collapsing ? false : this.headers.index( clicked ); 18195 18196 // When the call to ._toggle() comes after the class changes 18197 // it causes a very odd bug in IE 8 (see #6720) 18198 this.active = clickedIsActive ? $() : clicked; 18199 this._toggle( eventData ); 18200 18201 // Switch classes 18202 // corner classes on the previously active header stay after the animation 18203 this._removeClass( active, "ui-accordion-header-active", "ui-state-active" ); 18204 if ( options.icons ) { 18205 activeChildren = active.children( ".ui-accordion-header-icon" ); 18206 this._removeClass( activeChildren, null, options.icons.activeHeader ) 18207 ._addClass( activeChildren, null, options.icons.header ); 18208 } 18209 18210 if ( !clickedIsActive ) { 18211 this._removeClass( clicked, "ui-accordion-header-collapsed" ) 18212 ._addClass( clicked, "ui-accordion-header-active", "ui-state-active" ); 18213 if ( options.icons ) { 18214 clickedChildren = clicked.children( ".ui-accordion-header-icon" ); 18215 this._removeClass( clickedChildren, null, options.icons.header ) 18216 ._addClass( clickedChildren, null, options.icons.activeHeader ); 18217 } 18218 18219 this._addClass( clicked.next(), "ui-accordion-content-active" ); 18220 } 18221 }, 18222 18223 _toggle: function( data ) { 18224 var toShow = data.newPanel, 18225 toHide = this.prevShow.length ? this.prevShow : data.oldPanel; 18226 18227 // Handle activating a panel during the animation for another activation 18228 this.prevShow.add( this.prevHide ).stop( true, true ); 18229 this.prevShow = toShow; 18230 this.prevHide = toHide; 18231 18232 if ( this.options.animate ) { 18233 this._animate( toShow, toHide, data ); 18234 } else { 18235 toHide.hide(); 18236 toShow.show(); 18237 this._toggleComplete( data ); 18238 } 18239 18240 toHide.attr( { 18241 "aria-hidden": "true" 18242 } ); 18243 toHide.prev().attr( { 18244 "aria-selected": "false", 18245 "aria-expanded": "false" 18246 } ); 18247 18248 // if we're switching panels, remove the old header from the tab order 18249 // if we're opening from collapsed state, remove the previous header from the tab order 18250 // if we're collapsing, then keep the collapsing header in the tab order 18251 if ( toShow.length && toHide.length ) { 18252 toHide.prev().attr( { 18253 "tabIndex": -1, 18254 "aria-expanded": "false" 18255 } ); 18256 } else if ( toShow.length ) { 18257 this.headers.filter( function() { 18258 return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0; 18259 } ) 18260 .attr( "tabIndex", -1 ); 18261 } 18262 18263 toShow 18264 .attr( "aria-hidden", "false" ) 18265 .prev() 18266 .attr( { 18267 "aria-selected": "true", 18268 "aria-expanded": "true", 18269 tabIndex: 0 18270 } ); 18271 }, 18272 18273 _animate: function( toShow, toHide, data ) { 18274 var total, easing, duration, 18275 that = this, 18276 adjust = 0, 18277 boxSizing = toShow.css( "box-sizing" ), 18278 down = toShow.length && 18279 ( !toHide.length || ( toShow.index() < toHide.index() ) ), 18280 animate = this.options.animate || {}, 18281 options = down && animate.down || animate, 18282 complete = function() { 18283 that._toggleComplete( data ); 18284 }; 18285 18286 if ( typeof options === "number" ) { 18287 duration = options; 18288 } 18289 if ( typeof options === "string" ) { 18290 easing = options; 18291 } 18292 18293 // fall back from options to animation in case of partial down settings 18294 easing = easing || options.easing || animate.easing; 18295 duration = duration || options.duration || animate.duration; 18296 18297 if ( !toHide.length ) { 18298 return toShow.animate( this.showProps, duration, easing, complete ); 18299 } 18300 if ( !toShow.length ) { 18301 return toHide.animate( this.hideProps, duration, easing, complete ); 18302 } 18303 18304 total = toShow.show().outerHeight(); 18305 toHide.animate( this.hideProps, { 18306 duration: duration, 18307 easing: easing, 18308 step: function( now, fx ) { 18309 fx.now = Math.round( now ); 18310 } 18311 } ); 18312 toShow 18313 .hide() 18314 .animate( this.showProps, { 18315 duration: duration, 18316 easing: easing, 18317 complete: complete, 18318 step: function( now, fx ) { 18319 fx.now = Math.round( now ); 18320 if ( fx.prop !== "height" ) { 18321 if ( boxSizing === "content-box" ) { 18322 adjust += fx.now; 18323 } 18324 } else if ( that.options.heightStyle !== "content" ) { 18325 fx.now = Math.round( total - toHide.outerHeight() - adjust ); 18326 adjust = 0; 18327 } 18328 } 18329 } ); 18330 }, 18331 18332 _toggleComplete: function( data ) { 18333 var toHide = data.oldPanel, 18334 prev = toHide.prev(); 18335 18336 this._removeClass( toHide, "ui-accordion-content-active" ); 18337 this._removeClass( prev, "ui-accordion-header-active" ) 18338 ._addClass( prev, "ui-accordion-header-collapsed" ); 18339 18340 // Work around for rendering bug in IE (#5421) 18341 if ( toHide.length ) { 18342 toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className; 18343 } 18344 this._trigger( "activate", null, data ); 18345 } 18346} ); 18347 18348
18349/*! 18350 * jQuery UI Menu 1.13.2 18351 * http://jqueryui.com 18352 * 18353 * Copyright jQuery Foundation and other contributors 18354 * Released under the MIT license. 18355 * http://jquery.org/license 18356 */ 18357 18358//>>label: Menu 18359//>>group: Widgets 18360//>>description: Creates nestable menus. 18361//>>docs: http://api.jqueryui.com/menu/ 18362//>>demos: http://jqueryui.com/menu/ 18363//>>css.structure: ../../themes/base/core.css 18364//>>css.structure: ../../themes/base/menu.css 18365//>>css.theme: ../../themes/base/theme.css 18366 18367 18368var widgetsMenu = $.widget( "ui.menu", { 18369 version: "1.13.2
vendor: 2,668 bytes, lines 18369-18471
18369", 18370 defaultElement: "<ul>", 18371 delay: 300, 18372 options: { 18373 icons: { 18374 submenu: "ui-icon-caret-1-e" 18375 }, 18376 items: "> *", 18377 menus: "ul", 18378 position: { 18379 my: "left top", 18380 at: "right top" 18381 }, 18382 role: "menu", 18383 18384 // Callbacks 18385 blur: null, 18386 focus: null, 18387 select: null 18388 }, 18389 18390 _create: function() { 18391 this.activeMenu = this.element; 18392 18393 // Flag used to prevent firing of the click handler 18394 // as the event bubbles up through nested menus 18395 this.mouseHandled = false; 18396 this.lastMousePosition = { x: null, y: null }; 18397 this.element 18398 .uniqueId() 18399 .attr( { 18400 role: this.options.role, 18401 tabIndex: 0 18402 } ); 18403 18404 this._addClass( "ui-menu", "ui-widget ui-widget-content" ); 18405 this._on( { 18406 18407 // Prevent focus from sticking to links inside menu after clicking 18408 // them (focus should always stay on UL during navigation). 18409 "mousedown .ui-menu-item": function( event ) { 18410 event.preventDefault(); 18411 18412 this._activateItem( event ); 18413 }, 18414 "click .ui-menu-item": function( event ) { 18415 var target = $( event.target ); 18416 var active = $( $.ui.safeActiveElement( this.document[ 0 ] ) ); 18417 if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) { 18418 this.select( event ); 18419 18420 // Only set the mouseHandled flag if the event will bubble, see #9469. 18421 if ( !event.isPropagationStopped() ) { 18422 this.mouseHandled = true; 18423 } 18424 18425 // Open submenu on click 18426 if ( target.has( ".ui-menu" ).length ) { 18427 this.expand( event ); 18428 } else if ( !this.element.is( ":focus" ) && 18429 active.closest( ".ui-menu" ).length ) { 18430 18431 // Redirect focus to the menu 18432 this.element.trigger( "focus", [ true ] ); 18433 18434 // If the active item is on the top level, let it stay active. 18435 // Otherwise, blur the active item since it is no longer visible. 18436 if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) { 18437 clearTimeout( this.timer ); 18438 } 18439 } 18440 } 18441 }, 18442 "mouseenter .ui-menu-item": "_activateItem", 18443 "mousemove .ui-menu-item": "_activateItem", 18444 mouseleave: "collapseAll", 18445 "mouseleave .ui-menu": "collapseAll", 18446 focus: function( event, keepActiveItem ) { 18447 18448 // If there's already an active item, keep it active 18449 // If not, activate the first item 18450 var item = this.active || this._menuItems().first(); 18451 18452 if ( !keepActiveItem ) { 18453 this.focus( event, item ); 18454 } 18455 }, 18456 blur: function( event ) { 18457 this._delay( function() { 18458 var notContained = !$.contains( 18459 this.element[ 0 ], 18460 $.ui.safeActiveElement( this.document[ 0 ] ) 18461 ); 18462 if ( notContained ) { 18463 this.collapseAll( event ); 18464 } 18465 } ); 18466 }, 18467 keydown: "_keydown" 18468 } ); 18469 18470 this.refresh(); 18471
vendor: 3,056 bytes, lines 18472-18588
18472 // Clicks outside of a menu collapse any open menus 18473 this._on( this.document, { 18474 click: function( event ) { 18475 if ( this._closeOnDocumentClick( event ) ) { 18476 this.collapseAll( event, true ); 18477 } 18478 18479 // Reset the mouseHandled flag 18480 this.mouseHandled = false; 18481 } 18482 } ); 18483 }, 18484 18485 _activateItem: function( event ) { 18486 18487 // Ignore mouse events while typeahead is active, see #10458. 18488 // Prevents focusing the wrong item when typeahead causes a scroll while the mouse 18489 // is over an item in the menu 18490 if ( this.previousFilter ) { 18491 return; 18492 } 18493 18494 // If the mouse didn't actually move, but the page was scrolled, ignore the event (#9356) 18495 if ( event.clientX === this.lastMousePosition.x && 18496 event.clientY === this.lastMousePosition.y ) { 18497 return; 18498 } 18499 18500 this.lastMousePosition = { 18501 x: event.clientX, 18502 y: event.clientY 18503 }; 18504 18505 var actualTarget = $( event.target ).closest( ".ui-menu-item" ), 18506 target = $( event.currentTarget ); 18507 18508 // Ignore bubbled events on parent items, see #11641 18509 if ( actualTarget[ 0 ] !== target[ 0 ] ) { 18510 return; 18511 } 18512 18513 // If the item is already active, there's nothing to do 18514 if ( target.is( ".ui-state-active" ) ) { 18515 return; 18516 } 18517 18518 // Remove ui-state-active class from siblings of the newly focused menu item 18519 // to avoid a jump caused by adjacent elements both having a class with a border 18520 this._removeClass( target.siblings().children( ".ui-state-active" ), 18521 null, "ui-state-active" ); 18522 this.focus( event, target ); 18523 }, 18524 18525 _destroy: function() { 18526 var items = this.element.find( ".ui-menu-item" ) 18527 .removeAttr( "role aria-disabled" ), 18528 submenus = items.children( ".ui-menu-item-wrapper" ) 18529 .removeUniqueId() 18530 .removeAttr( "tabIndex role aria-haspopup" ); 18531 18532 // Destroy (sub)menus 18533 this.element 18534 .removeAttr( "aria-activedescendant" ) 18535 .find( ".ui-menu" ).addBack() 18536 .removeAttr( "role aria-labelledby aria-expanded aria-hidden aria-disabled " + 18537 "tabIndex" ) 18538 .removeUniqueId() 18539 .show(); 18540 18541 submenus.children().each( function() { 18542 var elem = $( this ); 18543 if ( elem.data( "ui-menu-submenu-caret" ) ) { 18544 elem.remove(); 18545 } 18546 } ); 18547 }, 18548 18549 _keydown: function( event ) { 18550 var match, prev, character, skip, 18551 preventDefault = true; 18552 18553 switch ( event.keyCode ) { 18554 case $.ui.keyCode.PAGE_UP: 18555 this.previousPage( event ); 18556 break; 18557 case $.ui.keyCode.PAGE_DOWN: 18558 this.nextPage( event ); 18559 break; 18560 case $.ui.keyCode.HOME: 18561 this._move( "first", "first", event ); 18562 break; 18563 case $.ui.keyCode.END: 18564 this._move( "last", "last", event ); 18565 break; 18566 case $.ui.keyCode.UP: 18567 this.previous( event ); 18568 break; 18569 case $.ui.keyCode.DOWN: 18570 this.next( event ); 18571 break; 18572 case $.ui.keyCode.LEFT: 18573 this.collapse( event ); 18574 break; 18575 case $.ui.keyCode.RIGHT: 18576 if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { 18577 this.expand( event ); 18578 } 18579 break; 18580 case $.ui.keyCode.ENTER: 18581 case $.ui.keyCode.SPACE: 18582 this._activate( event ); 18583 break; 18584 case $.ui.keyCode.ESCAPE: 18585 this.collapse( event ); 18586 break; 18587 default: 18588 preventDefault = false;
vendor: 6,930 bytes, lines 18589-18837
18589 prev = this.previousFilter || ""; 18590 skip = false; 18591 18592 // Support number pad values 18593 character = event.keyCode >= 96 && event.keyCode <= 105 ? 18594 ( event.keyCode - 96 ).toString() : String.fromCharCode( event.keyCode ); 18595 18596 clearTimeout( this.filterTimer ); 18597 18598 if ( character === prev ) { 18599 skip = true; 18600 } else { 18601 character = prev + character; 18602 } 18603 18604 match = this._filterMenuItems( character ); 18605 match = skip && match.index( this.active.next() ) !== -1 ? 18606 this.active.nextAll( ".ui-menu-item" ) : 18607 match; 18608 18609 // If no matches on the current filter, reset to the last character pressed 18610 // to move down the menu to the first item that starts with that character 18611 if ( !match.length ) { 18612 character = String.fromCharCode( event.keyCode ); 18613 match = this._filterMenuItems( character ); 18614 } 18615 18616 if ( match.length ) { 18617 this.focus( event, match ); 18618 this.previousFilter = character; 18619 this.filterTimer = this._delay( function() { 18620 delete this.previousFilter; 18621 }, 1000 ); 18622 } else { 18623 delete this.previousFilter; 18624 } 18625 } 18626 18627 if ( preventDefault ) { 18628 event.preventDefault(); 18629 } 18630 }, 18631 18632 _activate: function( event ) { 18633 if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { 18634 if ( this.active.children( "[aria-haspopup='true']" ).length ) { 18635 this.expand( event ); 18636 } else { 18637 this.select( event ); 18638 } 18639 } 18640 }, 18641 18642 refresh: function() { 18643 var menus, items, newSubmenus, newItems, newWrappers, 18644 that = this, 18645 icon = this.options.icons.submenu, 18646 submenus = this.element.find( this.options.menus ); 18647 18648 this._toggleClass( "ui-menu-icons", null, !!this.element.find( ".ui-icon" ).length ); 18649 18650 // Initialize nested menus 18651 newSubmenus = submenus.filter( ":not(.ui-menu)" ) 18652 .hide() 18653 .attr( { 18654 role: this.options.role, 18655 "aria-hidden": "true", 18656 "aria-expanded": "false" 18657 } ) 18658 .each( function() { 18659 var menu = $( this ), 18660 item = menu.prev(), 18661 submenuCaret = $( "<span>" ).data( "ui-menu-submenu-caret", true ); 18662 18663 that._addClass( submenuCaret, "ui-menu-icon", "ui-icon " + icon ); 18664 item 18665 .attr( "aria-haspopup", "true" ) 18666 .prepend( submenuCaret ); 18667 menu.attr( "aria-labelledby", item.attr( "id" ) ); 18668 } ); 18669 18670 this._addClass( newSubmenus, "ui-menu", "ui-widget ui-widget-content ui-front" ); 18671 18672 menus = submenus.add( this.element ); 18673 items = menus.find( this.options.items ); 18674 18675 // Initialize menu-items containing spaces and/or dashes only as dividers 18676 items.not( ".ui-menu-item" ).each( function() { 18677 var item = $( this ); 18678 if ( that._isDivider( item ) ) { 18679 that._addClass( item, "ui-menu-divider", "ui-widget-content" ); 18680 } 18681 } ); 18682 18683 // Don't refresh list items that are already adapted 18684 newItems = items.not( ".ui-menu-item, .ui-menu-divider" ); 18685 newWrappers = newItems.children() 18686 .not( ".ui-menu" ) 18687 .uniqueId() 18688 .attr( { 18689 tabIndex: -1, 18690 role: this._itemRole() 18691 } ); 18692 this._addClass( newItems, "ui-menu-item" ) 18693 ._addClass( newWrappers, "ui-menu-item-wrapper" ); 18694 18695 // Add aria-disabled attribute to any disabled menu item 18696 items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" ); 18697 18698 // If the active item has been removed, blur the menu 18699 if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { 18700 this.blur(); 18701 } 18702 }, 18703 18704 _itemRole: function() { 18705 return { 18706 menu: "menuitem", 18707 listbox: "option" 18708 }[ this.options.role ]; 18709 }, 18710 18711 _setOption: function( key, value ) { 18712 if ( key === "icons" ) { 18713 var icons = this.element.find( ".ui-menu-icon" ); 18714 this._removeClass( icons, null, this.options.icons.submenu ) 18715 ._addClass( icons, null, value.submenu ); 18716 } 18717 this._super( key, value ); 18718 }, 18719 18720 _setOptionDisabled: function( value ) { 18721 this._super( value ); 18722 18723 this.element.attr( "aria-disabled", String( value ) ); 18724 this._toggleClass( null, "ui-state-disabled", !!value ); 18725 }, 18726 18727 focus: function( event, item ) { 18728 var nested, focused, activeParent; 18729 this.blur( event, event && event.type === "focus" ); 18730 18731 this._scrollIntoView( item ); 18732 18733 this.active = item.first(); 18734 18735 focused = this.active.children( ".ui-menu-item-wrapper" ); 18736 this._addClass( focused, null, "ui-state-active" ); 18737 18738 // Only update aria-activedescendant if there's a role 18739 // otherwise we assume focus is managed elsewhere 18740 if ( this.options.role ) { 18741 this.element.attr( "aria-activedescendant", focused.attr( "id" ) ); 18742 } 18743 18744 // Highlight active parent menu item, if any 18745 activeParent = this.active 18746 .parent() 18747 .closest( ".ui-menu-item" ) 18748 .children( ".ui-menu-item-wrapper" ); 18749 this._addClass( activeParent, null, "ui-state-active" ); 18750 18751 if ( event && event.type === "keydown" ) { 18752 this._close(); 18753 } else { 18754 this.timer = this._delay( function() { 18755 this._close(); 18756 }, this.delay ); 18757 } 18758 18759 nested = item.children( ".ui-menu" ); 18760 if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) { 18761 this._startOpening( nested ); 18762 } 18763 this.activeMenu = item.parent(); 18764 18765 this._trigger( "focus", event, { item: item } ); 18766 }, 18767 18768 _scrollIntoView: function( item ) { 18769 var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight; 18770 if ( this._hasScroll() ) { 18771 borderTop = parseFloat( $.css( this.activeMenu[ 0 ], "borderTopWidth" ) ) || 0; 18772 paddingTop = parseFloat( $.css( this.activeMenu[ 0 ], "paddingTop" ) ) || 0; 18773 offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop; 18774 scroll = this.activeMenu.scrollTop(); 18775 elementHeight = this.activeMenu.height(); 18776 itemHeight = item.outerHeight(); 18777 18778 if ( offset < 0 ) { 18779 this.activeMenu.scrollTop( scroll + offset ); 18780 } else if ( offset + itemHeight > elementHeight ) { 18781 this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight ); 18782 } 18783 } 18784 }, 18785 18786 blur: function( event, fromFocus ) { 18787 if ( !fromFocus ) { 18788 clearTimeout( this.timer ); 18789 } 18790 18791 if ( !this.active ) { 18792 return; 18793 } 18794 18795 this._removeClass( this.active.children( ".ui-menu-item-wrapper" ), 18796 null, "ui-state-active" ); 18797 18798 this._trigger( "blur", event, { item: this.active } ); 18799 this.active = null; 18800 }, 18801 18802 _startOpening: function( submenu ) { 18803 clearTimeout( this.timer ); 18804 18805 // Don't open if already open fixes a Firefox bug that caused a .5 pixel 18806 // shift in the submenu position when mousing over the caret icon 18807 if ( submenu.attr( "aria-hidden" ) !== "true" ) { 18808 return; 18809 } 18810 18811 this.timer = this._delay( function() { 18812 this._close(); 18813 this._open( submenu ); 18814 }, this.delay ); 18815 }, 18816 18817 _open: function( submenu ) { 18818 var position = $.extend( { 18819 of: this.active 18820 }, this.options.position ); 18821 18822 clearTimeout( this.timer ); 18823 this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) ) 18824 .hide() 18825 .attr( "aria-hidden", "true" ); 18826 18827 submenu 18828 .show() 18829 .removeAttr( "aria-hidden" ) 18830 .attr( "aria-expanded", "true" ) 18831 .position( position ); 18832 }, 18833 18834 collapseAll: function( event, all ) { 18835 clearTimeout( this.timer ); 18836 this.timer = this._delay( function() { 18837
vendor: 5,432 bytes, lines 18838-19041
18838 // If we were passed an event, look for the submenu that contains the event 18839 var currentMenu = all ? this.element : 18840 $( event && event.target ).closest( this.element.find( ".ui-menu" ) ); 18841 18842 // If we found no valid submenu ancestor, use the main menu to close all 18843 // sub menus anyway 18844 if ( !currentMenu.length ) { 18845 currentMenu = this.element; 18846 } 18847 18848 this._close( currentMenu ); 18849 18850 this.blur( event ); 18851 18852 // Work around active item staying active after menu is blurred 18853 this._removeClass( currentMenu.find( ".ui-state-active" ), null, "ui-state-active" ); 18854 18855 this.activeMenu = currentMenu; 18856 }, all ? 0 : this.delay ); 18857 }, 18858 18859 // With no arguments, closes the currently active menu - if nothing is active 18860 // it closes all menus. If passed an argument, it will search for menus BELOW 18861 _close: function( startMenu ) { 18862 if ( !startMenu ) { 18863 startMenu = this.active ? this.active.parent() : this.element; 18864 } 18865 18866 startMenu.find( ".ui-menu" ) 18867 .hide() 18868 .attr( "aria-hidden", "true" ) 18869 .attr( "aria-expanded", "false" ); 18870 }, 18871 18872 _closeOnDocumentClick: function( event ) { 18873 return !$( event.target ).closest( ".ui-menu" ).length; 18874 }, 18875 18876 _isDivider: function( item ) { 18877 18878 // Match hyphen, em dash, en dash 18879 return !/[^\-\u2014\u2013\s]/.test( item.text() ); 18880 }, 18881 18882 collapse: function( event ) { 18883 var newItem = this.active && 18884 this.active.parent().closest( ".ui-menu-item", this.element ); 18885 if ( newItem && newItem.length ) { 18886 this._close(); 18887 this.focus( event, newItem ); 18888 } 18889 }, 18890 18891 expand: function( event ) { 18892 var newItem = this.active && this._menuItems( this.active.children( ".ui-menu" ) ).first(); 18893 18894 if ( newItem && newItem.length ) { 18895 this._open( newItem.parent() ); 18896 18897 // Delay so Firefox will not hide activedescendant change in expanding submenu from AT 18898 this._delay( function() { 18899 this.focus( event, newItem ); 18900 } ); 18901 } 18902 }, 18903 18904 next: function( event ) { 18905 this._move( "next", "first", event ); 18906 }, 18907 18908 previous: function( event ) { 18909 this._move( "prev", "last", event ); 18910 }, 18911 18912 isFirstItem: function() { 18913 return this.active && !this.active.prevAll( ".ui-menu-item" ).length; 18914 }, 18915 18916 isLastItem: function() { 18917 return this.active && !this.active.nextAll( ".ui-menu-item" ).length; 18918 }, 18919 18920 _menuItems: function( menu ) { 18921 return ( menu || this.element ) 18922 .find( this.options.items ) 18923 .filter( ".ui-menu-item" ); 18924 }, 18925 18926 _move: function( direction, filter, event ) { 18927 var next; 18928 if ( this.active ) { 18929 if ( direction === "first" || direction === "last" ) { 18930 next = this.active 18931 [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" ) 18932 .last(); 18933 } else { 18934 next = this.active 18935 [ direction + "All" ]( ".ui-menu-item" ) 18936 .first(); 18937 } 18938 } 18939 if ( !next || !next.length || !this.active ) { 18940 next = this._menuItems( this.activeMenu )[ filter ](); 18941 } 18942 18943 this.focus( event, next ); 18944 }, 18945 18946 nextPage: function( event ) { 18947 var item, base, height; 18948 18949 if ( !this.active ) { 18950 this.next( event ); 18951 return; 18952 } 18953 if ( this.isLastItem() ) { 18954 return; 18955 } 18956 if ( this._hasScroll() ) { 18957 base = this.active.offset().top; 18958 height = this.element.innerHeight(); 18959 18960 // jQuery 3.2 doesn't include scrollbars in innerHeight, add it back. 18961 if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) { 18962 height += this.element[ 0 ].offsetHeight - this.element.outerHeight(); 18963 } 18964 18965 this.active.nextAll( ".ui-menu-item" ).each( function() { 18966 item = $( this ); 18967 return item.offset().top - base - height < 0; 18968 } ); 18969 18970 this.focus( event, item ); 18971 } else { 18972 this.focus( event, this._menuItems( this.activeMenu ) 18973 [ !this.active ? "first" : "last" ]() ); 18974 } 18975 }, 18976 18977 previousPage: function( event ) { 18978 var item, base, height; 18979 if ( !this.active ) { 18980 this.next( event ); 18981 return; 18982 } 18983 if ( this.isFirstItem() ) { 18984 return; 18985 } 18986 if ( this._hasScroll() ) { 18987 base = this.active.offset().top; 18988 height = this.element.innerHeight(); 18989 18990 // jQuery 3.2 doesn't include scrollbars in innerHeight, add it back. 18991 if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) { 18992 height += this.element[ 0 ].offsetHeight - this.element.outerHeight(); 18993 } 18994 18995 this.active.prevAll( ".ui-menu-item" ).each( function() { 18996 item = $( this ); 18997 return item.offset().top - base + height > 0; 18998 } ); 18999 19000 this.focus( event, item ); 19001 } else { 19002 this.focus( event, this._menuItems( this.activeMenu ).first() ); 19003 } 19004 }, 19005 19006 _hasScroll: function() { 19007 return this.element.outerHeight() < this.element.prop( "scrollHeight" ); 19008 }, 19009 19010 select: function( event ) { 19011 19012 // TODO: It should never be possible to not have an active item at this 19013 // point, but the tests don't trigger mouseenter before click. 19014 this.active = this.active || $( event.target ).closest( ".ui-menu-item" ); 19015 var ui = { item: this.active }; 19016 if ( !this.active.has( ".ui-menu" ).length ) { 19017 this.collapseAll( event, true ); 19018 } 19019 this._trigger( "select", event, ui ); 19020 }, 19021 19022 _filterMenuItems: function( character ) { 19023 var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ), 19024 regex = new RegExp( "^" + escapedCharacter, "i" ); 19025 19026 return this.activeMenu 19027 .find( this.options.items ) 19028 19029 // Only match on items, not dividers or other content (#10571) 19030 .filter( ".ui-menu-item" ) 19031 .filter( function() { 19032 return regex.test( 19033 String.prototype.trim.call( 19034 $( this ).children( ".ui-menu-item-wrapper" ).text() ) ); 19035 } ); 19036 } 19037} ); 19038 19039 19040/*! 19041 * jQuery UI Autocomplete 1.1
190413.2 19042 * http://jqueryui.com 19043 * 19044 * Copyright jQuery Foundation and other contributors 19045 * Released under the MIT license. 19046 * http://jquery.org/license 19047 */ 19048 19049//>>label: Autocomplete 19050//>>group: Widgets 19051//>>description: Lists suggested words as the user is typing. 19052//>>docs: http://api.jqueryui.com/autocomplete/ 19053//>>demos: http://jqueryui.com/autocomplete/ 19054//>>css.structure: ../../themes/base/core.css 19055//>>css.structure: ../../themes/base/autocomplete.css 19056//>>css.theme: ../../themes/base/theme.css 19057 19058 19059$.widget( "ui.autocomplete", { 19060 version: "1.13.2
vendor: 16,621 bytes, lines 19060-19697
19060", 19061 defaultElement: "<input>", 19062 options: { 19063 appendTo: null, 19064 autoFocus: false, 19065 delay: 300, 19066 minLength: 1, 19067 position: { 19068 my: "left top", 19069 at: "left bottom", 19070 collision: "none" 19071 }, 19072 source: null, 19073 19074 // Callbacks 19075 change: null, 19076 close: null, 19077 focus: null, 19078 open: null, 19079 response: null, 19080 search: null, 19081 select: null 19082 }, 19083 19084 requestIndex: 0, 19085 pending: 0, 19086 liveRegionTimer: null, 19087 19088 _create: function() { 19089 19090 // Some browsers only repeat keydown events, not keypress events, 19091 // so we use the suppressKeyPress flag to determine if we've already 19092 // handled the keydown event. #7269 19093 // Unfortunately the code for & in keypress is the same as the up arrow, 19094 // so we use the suppressKeyPressRepeat flag to avoid handling keypress 19095 // events when we know the keydown event was used to modify the 19096 // search term. #7799 19097 var suppressKeyPress, suppressKeyPressRepeat, suppressInput, 19098 nodeName = this.element[ 0 ].nodeName.toLowerCase(), 19099 isTextarea = nodeName === "textarea", 19100 isInput = nodeName === "input"; 19101 19102 // Textareas are always multi-line 19103 // Inputs are always single-line, even if inside a contentEditable element 19104 // IE also treats inputs as contentEditable 19105 // All other element types are determined by whether or not they're contentEditable 19106 this.isMultiLine = isTextarea || !isInput && this._isContentEditable( this.element ); 19107 19108 this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ]; 19109 this.isNewMenu = true; 19110 19111 this._addClass( "ui-autocomplete-input" ); 19112 this.element.attr( "autocomplete", "off" ); 19113 19114 this._on( this.element, { 19115 keydown: function( event ) { 19116 if ( this.element.prop( "readOnly" ) ) { 19117 suppressKeyPress = true; 19118 suppressInput = true; 19119 suppressKeyPressRepeat = true; 19120 return; 19121 } 19122 19123 suppressKeyPress = false; 19124 suppressInput = false; 19125 suppressKeyPressRepeat = false; 19126 var keyCode = $.ui.keyCode; 19127 switch ( event.keyCode ) { 19128 case keyCode.PAGE_UP: 19129 suppressKeyPress = true; 19130 this._move( "previousPage", event ); 19131 break; 19132 case keyCode.PAGE_DOWN: 19133 suppressKeyPress = true; 19134 this._move( "nextPage", event ); 19135 break; 19136 case keyCode.UP: 19137 suppressKeyPress = true; 19138 this._keyEvent( "previous", event ); 19139 break; 19140 case keyCode.DOWN: 19141 suppressKeyPress = true; 19142 this._keyEvent( "next", event ); 19143 break; 19144 case keyCode.ENTER: 19145 19146 // when menu is open and has focus 19147 if ( this.menu.active ) { 19148 19149 // #6055 - Opera still allows the keypress to occur 19150 // which causes forms to submit 19151 suppressKeyPress = true; 19152 event.preventDefault(); 19153 this.menu.select( event ); 19154 } 19155 break; 19156 case keyCode.TAB: 19157 if ( this.menu.active ) { 19158 this.menu.select( event ); 19159 } 19160 break; 19161 case keyCode.ESCAPE: 19162 if ( this.menu.element.is( ":visible" ) ) { 19163 if ( !this.isMultiLine ) { 19164 this._value( this.term ); 19165 } 19166 this.close( event ); 19167 19168 // Different browsers have different default behavior for escape 19169 // Single press can mean undo or clear 19170 // Double press in IE means clear the whole form 19171 event.preventDefault(); 19172 } 19173 break; 19174 default: 19175 suppressKeyPressRepeat = true; 19176 19177 // search timeout should be triggered before the input value is changed 19178 this._searchTimeout( event ); 19179 break; 19180 } 19181 }, 19182 keypress: function( event ) { 19183 if ( suppressKeyPress ) { 19184 suppressKeyPress = false; 19185 if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { 19186 event.preventDefault(); 19187 } 19188 return; 19189 } 19190 if ( suppressKeyPressRepeat ) { 19191 return; 19192 } 19193 19194 // Replicate some key handlers to allow them to repeat in Firefox and Opera 19195 var keyCode = $.ui.keyCode; 19196 switch ( event.keyCode ) { 19197 case keyCode.PAGE_UP: 19198 this._move( "previousPage", event ); 19199 break; 19200 case keyCode.PAGE_DOWN: 19201 this._move( "nextPage", event ); 19202 break; 19203 case keyCode.UP: 19204 this._keyEvent( "previous", event ); 19205 break; 19206 case keyCode.DOWN: 19207 this._keyEvent( "next", event ); 19208 break; 19209 } 19210 }, 19211 input: function( event ) { 19212 if ( suppressInput ) { 19213 suppressInput = false; 19214 event.preventDefault(); 19215 return; 19216 } 19217 this._searchTimeout( event ); 19218 }, 19219 focus: function() { 19220 this.selectedItem = null; 19221 this.previous = this._value(); 19222 }, 19223 blur: function( event ) { 19224 clearTimeout( this.searching ); 19225 this.close( event ); 19226 this._change( event ); 19227 } 19228 } ); 19229 19230 this._initSource(); 19231 this.menu = $( "<ul>" ) 19232 .appendTo( this._appendTo() ) 19233 .menu( { 19234 19235 // disable ARIA support, the live region takes care of that 19236 role: null 19237 } ) 19238 .hide() 19239 19240 // Support: IE 11 only, Edge <= 14 19241 // For other browsers, we preventDefault() on the mousedown event 19242 // to keep the dropdown from taking focus from the input. This doesn't 19243 // work for IE/Edge, causing problems with selection and scrolling (#9638) 19244 // Happily, IE and Edge support an "unselectable" attribute that 19245 // prevents an element from receiving focus, exactly what we want here. 19246 .attr( { 19247 "unselectable": "on" 19248 } ) 19249 .menu( "instance" ); 19250 19251 this._addClass( this.menu.element, "ui-autocomplete", "ui-front" ); 19252 this._on( this.menu.element, { 19253 mousedown: function( event ) { 19254 19255 // Prevent moving focus out of the text field 19256 event.preventDefault(); 19257 }, 19258 menufocus: function( event, ui ) { 19259 var label, item; 19260 19261 // support: Firefox 19262 // Prevent accidental activation of menu items in Firefox (#7024 #9118) 19263 if ( this.isNewMenu ) { 19264 this.isNewMenu = false; 19265 if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) { 19266 this.menu.blur(); 19267 19268 this.document.one( "mousemove", function() { 19269 $( event.target ).trigger( event.originalEvent ); 19270 } ); 19271 19272 return; 19273 } 19274 } 19275 19276 item = ui.item.data( "ui-autocomplete-item" ); 19277 if ( false !== this._trigger( "focus", event, { item: item } ) ) { 19278 19279 // use value to match what will end up in the input, if it was a key event 19280 if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) { 19281 this._value( item.value ); 19282 } 19283 } 19284 19285 // Announce the value in the liveRegion 19286 label = ui.item.attr( "aria-label" ) || item.value; 19287 if ( label && String.prototype.trim.call( label ).length ) { 19288 clearTimeout( this.liveRegionTimer ); 19289 this.liveRegionTimer = this._delay( function() { 19290 this.liveRegion.html( $( "<div>" ).text( label ) ); 19291 }, 100 ); 19292 } 19293 }, 19294 menuselect: function( event, ui ) { 19295 var item = ui.item.data( "ui-autocomplete-item" ), 19296 previous = this.previous; 19297 19298 // Only trigger when focus was lost (click on menu) 19299 if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) { 19300 this.element.trigger( "focus" ); 19301 this.previous = previous; 19302 19303 // #6109 - IE triggers two focus events and the second 19304 // is asynchronous, so we need to reset the previous 19305 // term synchronously and asynchronously :-( 19306 this._delay( function() { 19307 this.previous = previous; 19308 this.selectedItem = item; 19309 } ); 19310 } 19311 19312 if ( false !== this._trigger( "select", event, { item: item } ) ) { 19313 this._value( item.value ); 19314 } 19315 19316 // reset the term after the select event 19317 // this allows custom select handling to work properly 19318 this.term = this._value(); 19319 19320 this.close( event ); 19321 this.selectedItem = item; 19322 } 19323 } ); 19324 19325 this.liveRegion = $( "<div>", { 19326 role: "status", 19327 "aria-live": "assertive", 19328 "aria-relevant": "additions" 19329 } ) 19330 .appendTo( this.document[ 0 ].body ); 19331 19332 this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" ); 19333 19334 // Turning off autocomplete prevents the browser from remembering the 19335 // value when navigating through history, so we re-enable autocomplete 19336 // if the page is unloaded before the widget is destroyed. #7790 19337 this._on( this.window, { 19338 beforeunload: function() { 19339 this.element.removeAttr( "autocomplete" ); 19340 } 19341 } ); 19342 }, 19343 19344 _destroy: function() { 19345 clearTimeout( this.searching ); 19346 this.element.removeAttr( "autocomplete" ); 19347 this.menu.element.remove(); 19348 this.liveRegion.remove(); 19349 }, 19350 19351 _setOption: function( key, value ) { 19352 this._super( key, value ); 19353 if ( key === "source" ) { 19354 this._initSource(); 19355 } 19356 if ( key === "appendTo" ) { 19357 this.menu.element.appendTo( this._appendTo() ); 19358 } 19359 if ( key === "disabled" && value && this.xhr ) { 19360 this.xhr.abort(); 19361 } 19362 }, 19363 19364 _isEventTargetInWidget: function( event ) { 19365 var menuElement = this.menu.element[ 0 ]; 19366 19367 return event.target === this.element[ 0 ] || 19368 event.target === menuElement || 19369 $.contains( menuElement, event.target ); 19370 }, 19371 19372 _closeOnClickOutside: function( event ) { 19373 if ( !this._isEventTargetInWidget( event ) ) { 19374 this.close(); 19375 } 19376 }, 19377 19378 _appendTo: function() { 19379 var element = this.options.appendTo; 19380 19381 if ( element ) { 19382 element = element.jquery || element.nodeType ? 19383 $( element ) : 19384 this.document.find( element ).eq( 0 ); 19385 } 19386 19387 if ( !element || !element[ 0 ] ) { 19388 element = this.element.closest( ".ui-front, dialog" ); 19389 } 19390 19391 if ( !element.length ) { 19392 element = this.document[ 0 ].body; 19393 } 19394 19395 return element; 19396 }, 19397 19398 _initSource: function() { 19399 var array, url, 19400 that = this; 19401 if ( Array.isArray( this.options.source ) ) { 19402 array = this.options.source; 19403 this.source = function( request, response ) { 19404 response( $.ui.autocomplete.filter( array, request.term ) ); 19405 }; 19406 } else if ( typeof this.options.source === "string" ) { 19407 url = this.options.source; 19408 this.source = function( request, response ) { 19409 if ( that.xhr ) { 19410 that.xhr.abort(); 19411 } 19412 that.xhr = $.ajax( { 19413 url: url, 19414 data: request, 19415 dataType: "json", 19416 success: function( data ) { 19417 response( data ); 19418 }, 19419 error: function() { 19420 response( [] ); 19421 } 19422 } ); 19423 }; 19424 } else { 19425 this.source = this.options.source; 19426 } 19427 }, 19428 19429 _searchTimeout: function( event ) { 19430 clearTimeout( this.searching ); 19431 this.searching = this._delay( function() { 19432 19433 // Search if the value has changed, or if the user retypes the same value (see #7434) 19434 var equalValues = this.term === this._value(), 19435 menuVisible = this.menu.element.is( ":visible" ), 19436 modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey; 19437 19438 if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) { 19439 this.selectedItem = null; 19440 this.search( null, event ); 19441 } 19442 }, this.options.delay ); 19443 }, 19444 19445 search: function( value, event ) { 19446 value = value != null ? value : this._value(); 19447 19448 // Always save the actual value, not the one passed as an argument 19449 this.term = this._value(); 19450 19451 if ( value.length < this.options.minLength ) { 19452 return this.close( event ); 19453 } 19454 19455 if ( this._trigger( "search", event ) === false ) { 19456 return; 19457 } 19458 19459 return this._search( value ); 19460 }, 19461 19462 _search: function( value ) { 19463 this.pending++; 19464 this._addClass( "ui-autocomplete-loading" ); 19465 this.cancelSearch = false; 19466 19467 this.source( { term: value }, this._response() ); 19468 }, 19469 19470 _response: function() { 19471 var index = ++this.requestIndex; 19472 19473 return function( content ) { 19474 if ( index === this.requestIndex ) { 19475 this.__response( content ); 19476 } 19477 19478 this.pending--; 19479 if ( !this.pending ) { 19480 this._removeClass( "ui-autocomplete-loading" ); 19481 } 19482 }.bind( this ); 19483 }, 19484 19485 __response: function( content ) { 19486 if ( content ) { 19487 content = this._normalize( content ); 19488 } 19489 this._trigger( "response", null, { content: content } ); 19490 if ( !this.options.disabled && content && content.length && !this.cancelSearch ) { 19491 this._suggest( content ); 19492 this._trigger( "open" ); 19493 } else { 19494 19495 // use ._close() instead of .close() so we don't cancel future searches 19496 this._close(); 19497 } 19498 }, 19499 19500 close: function( event ) { 19501 this.cancelSearch = true; 19502 this._close( event ); 19503 }, 19504 19505 _close: function( event ) { 19506 19507 // Remove the handler that closes the menu on outside clicks 19508 this._off( this.document, "mousedown" ); 19509 19510 if ( this.menu.element.is( ":visible" ) ) { 19511 this.menu.element.hide(); 19512 this.menu.blur(); 19513 this.isNewMenu = true; 19514 this._trigger( "close", event ); 19515 } 19516 }, 19517 19518 _change: function( event ) { 19519 if ( this.previous !== this._value() ) { 19520 this._trigger( "change", event, { item: this.selectedItem } ); 19521 } 19522 }, 19523 19524 _normalize: function( items ) { 19525 19526 // assume all items have the right format when the first item is complete 19527 if ( items.length && items[ 0 ].label && items[ 0 ].value ) { 19528 return items; 19529 } 19530 return $.map( items, function( item ) { 19531 if ( typeof item === "string" ) { 19532 return { 19533 label: item, 19534 value: item 19535 }; 19536 } 19537 return $.extend( {}, item, { 19538 label: item.label || item.value, 19539 value: item.value || item.label 19540 } ); 19541 } ); 19542 }, 19543 19544 _suggest: function( items ) { 19545 var ul = this.menu.element.empty(); 19546 this._renderMenu( ul, items ); 19547 this.isNewMenu = true; 19548 this.menu.refresh(); 19549 19550 // Size and position menu 19551 ul.show(); 19552 this._resizeMenu(); 19553 ul.position( $.extend( { 19554 of: this.element 19555 }, this.options.position ) ); 19556 19557 if ( this.options.autoFocus ) { 19558 this.menu.next(); 19559 } 19560 19561 // Listen for interactions outside of the widget (#6642) 19562 this._on( this.document, { 19563 mousedown: "_closeOnClickOutside" 19564 } ); 19565 }, 19566 19567 _resizeMenu: function() { 19568 var ul = this.menu.element; 19569 ul.outerWidth( Math.max( 19570 19571 // Firefox wraps long text (possibly a rounding bug) 19572 // so we add 1px to avoid the wrapping (#7513) 19573 ul.width( "" ).outerWidth() + 1, 19574 this.element.outerWidth() 19575 ) ); 19576 }, 19577 19578 _renderMenu: function( ul, items ) { 19579 var that = this; 19580 $.each( items, function( index, item ) { 19581 that._renderItemData( ul, item ); 19582 } ); 19583 }, 19584 19585 _renderItemData: function( ul, item ) { 19586 return this._renderItem( ul, item ).data( "ui-autocomplete-item", item ); 19587 }, 19588 19589 _renderItem: function( ul, item ) { 19590 return $( "<li>" ) 19591 .append( $( "<div>" ).text( item.label ) ) 19592 .appendTo( ul ); 19593 }, 19594 19595 _move: function( direction, event ) { 19596 if ( !this.menu.element.is( ":visible" ) ) { 19597 this.search( null, event ); 19598 return; 19599 } 19600 if ( this.menu.isFirstItem() && /^previous/.test( direction ) || 19601 this.menu.isLastItem() && /^next/.test( direction ) ) { 19602 19603 if ( !this.isMultiLine ) { 19604 this._value( this.term ); 19605 } 19606 19607 this.menu.blur(); 19608 return; 19609 } 19610 this.menu[ direction ]( event ); 19611 }, 19612 19613 widget: function() { 19614 return this.menu.element; 19615 }, 19616 19617 _value: function() { 19618 return this.valueMethod.apply( this.element, arguments ); 19619 }, 19620 19621 _keyEvent: function( keyEvent, event ) { 19622 if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { 19623 this._move( keyEvent, event ); 19624 19625 // Prevents moving cursor to beginning/end of the text field in some browsers 19626 event.preventDefault(); 19627 } 19628 }, 19629 19630 // Support: Chrome <=50 19631 // We should be able to just use this.element.prop( "isContentEditable" ) 19632 // but hidden elements always report false in Chrome. 19633 // https://code.google.com/p/chromium/issues/detail?id=313082 19634 _isContentEditable: function( element ) { 19635 if ( !element.length ) { 19636 return false; 19637 } 19638 19639 var editable = element.prop( "contentEditable" ); 19640 19641 if ( editable === "inherit" ) { 19642 return this._isContentEditable( element.parent() ); 19643 } 19644 19645 return editable === "true"; 19646 } 19647} ); 19648 19649$.extend( $.ui.autocomplete, { 19650 escapeRegex: function( value ) { 19651 return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ); 19652 }, 19653 filter: function( array, term ) { 19654 var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" ); 19655 return $.grep( array, function( value ) { 19656 return matcher.test( value.label || value.value || value ); 19657 } ); 19658 } 19659} ); 19660 19661// Live region extension, adding a `messages` option 19662// NOTE: This is an experimental API. We are still investigating 19663// a full solution for string manipulation and internationalization. 19664$.widget( "ui.autocomplete", $.ui.autocomplete, { 19665 options: { 19666 messages: { 19667 noResults: "No search results.", 19668 results: function( amount ) { 19669 return amount + ( amount > 1 ? " results are" : " result is" ) + 19670 " available, use up and down arrow keys to navigate."; 19671 } 19672 } 19673 }, 19674 19675 __response: function( content ) { 19676 var message; 19677 this._superApply( arguments ); 19678 if ( this.options.disabled || this.cancelSearch ) { 19679 return; 19680 } 19681 if ( content && content.length ) { 19682 message = this.options.messages.results( content.length ); 19683 } else { 19684 message = this.options.messages.noResults; 19685 } 19686 clearTimeout( this.liveRegionTimer ); 19687 this.liveRegionTimer = this._delay( function() { 19688 this.liveRegion.html( $( "<div>" ).text( message ) ); 19689 }, 100 ); 19690 } 19691} ); 19692 19693var widgetsAutocomplete = $.ui.autocomplete; 19694 19695 19696/*! 19697 * jQuery UI Controlgroup 1.13.
196972 19698 * http://jqueryui.com 19699 * 19700 * Copyright jQuery Foundation and other contributors 19701 * Released under the MIT license. 19702 * http://jquery.org/license 19703 */ 19704 19705//>>label: Controlgroup 19706//>>group: Widgets 19707//>>description: Visually groups form control widgets 19708//>>docs: http://api.jqueryui.com/controlgroup/ 19709//>>demos: http://jqueryui.com/controlgroup/ 19710//>>css.structure: ../../themes/base/core.css 19711//>>css.structure: ../../themes/base/controlgroup.css 19712//>>css.theme: ../../themes/base/theme.css 19713 19714 19715var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g; 19716 19717var widgetsControlgroup = $.widget( "ui.controlgroup", { 19718 version: "1.13
vendor: 7,736 bytes, lines 19718-19982
19718.2", 19719 defaultElement: "<div>", 19720 options: { 19721 direction: "horizontal", 19722 disabled: null, 19723 onlyVisible: true, 19724 items: { 19725 "button": "input[type=button], input[type=submit], input[type=reset], button, a", 19726 "controlgroupLabel": ".ui-controlgroup-label", 19727 "checkboxradio": "input[type='checkbox'], input[type='radio']", 19728 "selectmenu": "select", 19729 "spinner": ".ui-spinner-input" 19730 } 19731 }, 19732 19733 _create: function() { 19734 this._enhance(); 19735 }, 19736 19737 // To support the enhanced option in jQuery Mobile, we isolate DOM manipulation 19738 _enhance: function() { 19739 this.element.attr( "role", "toolbar" ); 19740 this.refresh(); 19741 }, 19742 19743 _destroy: function() { 19744 this._callChildMethod( "destroy" ); 19745 this.childWidgets.removeData( "ui-controlgroup-data" ); 19746 this.element.removeAttr( "role" ); 19747 if ( this.options.items.controlgroupLabel ) { 19748 this.element 19749 .find( this.options.items.controlgroupLabel ) 19750 .find( ".ui-controlgroup-label-contents" ) 19751 .contents().unwrap(); 19752 } 19753 }, 19754 19755 _initWidgets: function() { 19756 var that = this, 19757 childWidgets = []; 19758 19759 // First we iterate over each of the items options 19760 $.each( this.options.items, function( widget, selector ) { 19761 var labels; 19762 var options = {}; 19763 19764 // Make sure the widget has a selector set 19765 if ( !selector ) { 19766 return; 19767 } 19768 19769 if ( widget === "controlgroupLabel" ) { 19770 labels = that.element.find( selector ); 19771 labels.each( function() { 19772 var element = $( this ); 19773 19774 if ( element.children( ".ui-controlgroup-label-contents" ).length ) { 19775 return; 19776 } 19777 element.contents() 19778 .wrapAll( "<span class='ui-controlgroup-label-contents'></span>" ); 19779 } ); 19780 that._addClass( labels, null, "ui-widget ui-widget-content ui-state-default" ); 19781 childWidgets = childWidgets.concat( labels.get() ); 19782 return; 19783 } 19784 19785 // Make sure the widget actually exists 19786 if ( !$.fn[ widget ] ) { 19787 return; 19788 } 19789 19790 // We assume everything is in the middle to start because we can't determine 19791 // first / last elements until all enhancments are done. 19792 if ( that[ "_" + widget + "Options" ] ) { 19793 options = that[ "_" + widget + "Options" ]( "middle" ); 19794 } else { 19795 options = { classes: {} }; 19796 } 19797 19798 // Find instances of this widget inside controlgroup and init them 19799 that.element 19800 .find( selector ) 19801 .each( function() { 19802 var element = $( this ); 19803 var instance = element[ widget ]( "instance" ); 19804 19805 // We need to clone the default options for this type of widget to avoid 19806 // polluting the variable options which has a wider scope than a single widget. 19807 var instanceOptions = $.widget.extend( {}, options ); 19808 19809 // If the button is the child of a spinner ignore it 19810 // TODO: Find a more generic solution 19811 if ( widget === "button" && element.parent( ".ui-spinner" ).length ) { 19812 return; 19813 } 19814 19815 // Create the widget if it doesn't exist 19816 if ( !instance ) { 19817 instance = element[ widget ]()[ widget ]( "instance" ); 19818 } 19819 if ( instance ) { 19820 instanceOptions.classes = 19821 that._resolveClassesValues( instanceOptions.classes, instance ); 19822 } 19823 element[ widget ]( instanceOptions ); 19824 19825 // Store an instance of the controlgroup to be able to reference 19826 // from the outermost element for changing options and refresh 19827 var widgetElement = element[ widget ]( "widget" ); 19828 $.data( widgetElement[ 0 ], "ui-controlgroup-data", 19829 instance ? instance : element[ widget ]( "instance" ) ); 19830 19831 childWidgets.push( widgetElement[ 0 ] ); 19832 } ); 19833 } ); 19834 19835 this.childWidgets = $( $.uniqueSort( childWidgets ) ); 19836 this._addClass( this.childWidgets, "ui-controlgroup-item" ); 19837 }, 19838 19839 _callChildMethod: function( method ) { 19840 this.childWidgets.each( function() { 19841 var element = $( this ), 19842 data = element.data( "ui-controlgroup-data" ); 19843 if ( data && data[ method ] ) { 19844 data[ method ](); 19845 } 19846 } ); 19847 }, 19848 19849 _updateCornerClass: function( element, position ) { 19850 var remove = "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"; 19851 var add = this._buildSimpleOptions( position, "label" ).classes.label; 19852 19853 this._removeClass( element, null, remove ); 19854 this._addClass( element, null, add ); 19855 }, 19856 19857 _buildSimpleOptions: function( position, key ) { 19858 var direction = this.options.direction === "vertical"; 19859 var result = { 19860 classes: {} 19861 }; 19862 result.classes[ key ] = { 19863 "middle": "", 19864 "first": "ui-corner-" + ( direction ? "top" : "left" ), 19865 "last": "ui-corner-" + ( direction ? "bottom" : "right" ), 19866 "only": "ui-corner-all" 19867 }[ position ]; 19868 19869 return result; 19870 }, 19871 19872 _spinnerOptions: function( position ) { 19873 var options = this._buildSimpleOptions( position, "ui-spinner" ); 19874 19875 options.classes[ "ui-spinner-up" ] = ""; 19876 options.classes[ "ui-spinner-down" ] = ""; 19877 19878 return options; 19879 }, 19880 19881 _buttonOptions: function( position ) { 19882 return this._buildSimpleOptions( position, "ui-button" ); 19883 }, 19884 19885 _checkboxradioOptions: function( position ) { 19886 return this._buildSimpleOptions( position, "ui-checkboxradio-label" ); 19887 }, 19888 19889 _selectmenuOptions: function( position ) { 19890 var direction = this.options.direction === "vertical"; 19891 return { 19892 width: direction ? "auto" : false, 19893 classes: { 19894 middle: { 19895 "ui-selectmenu-button-open": "", 19896 "ui-selectmenu-button-closed": "" 19897 }, 19898 first: { 19899 "ui-selectmenu-button-open": "ui-corner-" + ( direction ? "top" : "tl" ), 19900 "ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "top" : "left" ) 19901 }, 19902 last: { 19903 "ui-selectmenu-button-open": direction ? "" : "ui-corner-tr", 19904 "ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "bottom" : "right" ) 19905 }, 19906 only: { 19907 "ui-selectmenu-button-open": "ui-corner-top", 19908 "ui-selectmenu-button-closed": "ui-corner-all" 19909 } 19910 19911 }[ position ] 19912 }; 19913 }, 19914 19915 _resolveClassesValues: function( classes, instance ) { 19916 var result = {}; 19917 $.each( classes, function( key ) { 19918 var current = instance.options.classes[ key ] || ""; 19919 current = String.prototype.trim.call( current.replace( controlgroupCornerRegex, "" ) ); 19920 result[ key ] = ( current + " " + classes[ key ] ).replace( /\s+/g, " " ); 19921 } ); 19922 return result; 19923 }, 19924 19925 _setOption: function( key, value ) { 19926 if ( key === "direction" ) { 19927 this._removeClass( "ui-controlgroup-" + this.options.direction ); 19928 } 19929 19930 this._super( key, value ); 19931 if ( key === "disabled" ) { 19932 this._callChildMethod( value ? "disable" : "enable" ); 19933 return; 19934 } 19935 19936 this.refresh(); 19937 }, 19938 19939 refresh: function() { 19940 var children, 19941 that = this; 19942 19943 this._addClass( "ui-controlgroup ui-controlgroup-" + this.options.direction ); 19944 19945 if ( this.options.direction === "horizontal" ) { 19946 this._addClass( null, "ui-helper-clearfix" ); 19947 } 19948 this._initWidgets(); 19949 19950 children = this.childWidgets; 19951 19952 // We filter here because we need to track all childWidgets not just the visible ones 19953 if ( this.options.onlyVisible ) { 19954 children = children.filter( ":visible" ); 19955 } 19956 19957 if ( children.length ) { 19958 19959 // We do this last because we need to make sure all enhancment is done 19960 // before determining first and last 19961 $.each( [ "first", "last" ], function( index, value ) { 19962 var instance = children[ value ]().data( "ui-controlgroup-data" ); 19963 19964 if ( instance && that[ "_" + instance.widgetName + "Options" ] ) { 19965 var options = that[ "_" + instance.widgetName + "Options" ]( 19966 children.length === 1 ? "only" : value 19967 ); 19968 options.classes = that._resolveClassesValues( options.classes, instance ); 19969 instance.element[ instance.widgetName ]( options ); 19970 } else { 19971 that._updateCornerClass( children[ value ](), value ); 19972 } 19973 } ); 19974 19975 // Finally call the refresh method on each of the child widgets. 19976 this._callChildMethod( "refresh" ); 19977 } 19978 } 19979} ); 19980 19981/*! 19982 * jQuery UI Checkboxradio 1.1
vendor: 5,069 bytes, lines 19982-20165
199823.2 19983 * http://jqueryui.com 19984 * 19985 * Copyright jQuery Foundation and other contributors 19986 * Released under the MIT license. 19987 * http://jquery.org/license 19988 */ 19989 19990//>>label: Checkboxradio 19991//>>group: Widgets 19992//>>description: Enhances a form with multiple themeable checkboxes or radio buttons. 19993//>>docs: http://api.jqueryui.com/checkboxradio/ 19994//>>demos: http://jqueryui.com/checkboxradio/ 19995//>>css.structure: ../../themes/base/core.css 19996//>>css.structure: ../../themes/base/button.css 19997//>>css.structure: ../../themes/base/checkboxradio.css 19998//>>css.theme: ../../themes/base/theme.css 19999 20000 20001$.widget( "ui.checkboxradio", [ $.ui.formResetMixin, { 20002 version: "1.13.2", 20003 options: { 20004 disabled: null, 20005 label: null, 20006 icon: true, 20007 classes: { 20008 "ui-checkboxradio-label": "ui-corner-all", 20009 "ui-checkboxradio-icon": "ui-corner-all" 20010 } 20011 }, 20012 20013 _getCreateOptions: function() { 20014 var disabled, labels, labelContents; 20015 var options = this._super() || {}; 20016 20017 // We read the type here, because it makes more sense to throw a element type error first, 20018 // rather then the error for lack of a label. Often if its the wrong type, it 20019 // won't have a label (e.g. calling on a div, btn, etc) 20020 this._readType(); 20021 20022 labels = this.element.labels(); 20023 20024 // If there are multiple labels, use the last one 20025 this.label = $( labels[ labels.length - 1 ] ); 20026 if ( !this.label.length ) { 20027 $.error( "No label found for checkboxradio widget" ); 20028 } 20029 20030 this.originalLabel = ""; 20031 20032 // We need to get the label text but this may also need to make sure it does not contain the 20033 // input itself. 20034 // The label contents could be text, html, or a mix. We wrap all elements 20035 // and read the wrapper's `innerHTML` to get a string representation of 20036 // the label, without the input as part of it. 20037 labelContents = this.label.contents().not( this.element[ 0 ] ); 20038 20039 if ( labelContents.length ) { 20040 this.originalLabel += labelContents 20041 .clone() 20042 .wrapAll( "<div></div>" ) 20043 .parent() 20044 .html(); 20045 } 20046 20047 // Set the label option if we found label text 20048 if ( this.originalLabel ) { 20049 options.label = this.originalLabel; 20050 } 20051 20052 disabled = this.element[ 0 ].disabled; 20053 if ( disabled != null ) { 20054 options.disabled = disabled; 20055 } 20056 return options; 20057 }, 20058 20059 _create: function() { 20060 var checked = this.element[ 0 ].checked; 20061 20062 this._bindFormResetHandler(); 20063 20064 if ( this.options.disabled == null ) { 20065 this.options.disabled = this.element[ 0 ].disabled; 20066 } 20067 20068 this._setOption( "disabled", this.options.disabled ); 20069 this._addClass( "ui-checkboxradio", "ui-helper-hidden-accessible" ); 20070 this._addClass( this.label, "ui-checkboxradio-label", "ui-button ui-widget" ); 20071 20072 if ( this.type === "radio" ) { 20073 this._addClass( this.label, "ui-checkboxradio-radio-label" ); 20074 } 20075 20076 if ( this.options.label && this.options.label !== this.originalLabel ) { 20077 this._updateLabel(); 20078 } else if ( this.originalLabel ) { 20079 this.options.label = this.originalLabel; 20080 } 20081 20082 this._enhance(); 20083 20084 if ( checked ) { 20085 this._addClass( this.label, "ui-checkboxradio-checked", "ui-state-active" ); 20086 } 20087 20088 this._on( { 20089 change: "_toggleClasses", 20090 focus: function() { 20091 this._addClass( this.label, null, "ui-state-focus ui-visual-focus" ); 20092 }, 20093 blur: function() { 20094 this._removeClass( this.label, null, "ui-state-focus ui-visual-focus" ); 20095 } 20096 } ); 20097 }, 20098 20099 _readType: function() { 20100 var nodeName = this.element[ 0 ].nodeName.toLowerCase(); 20101 this.type = this.element[ 0 ].type; 20102 if ( nodeName !== "input" || !/radio|checkbox/.test( this.type ) ) { 20103 $.error( "Can't create checkboxradio on element.nodeName=" + nodeName + 20104 " and element.type=" + this.type ); 20105 } 20106 }, 20107 20108 // Support jQuery Mobile enhanced option 20109 _enhance: function() { 20110 this._updateIcon( this.element[ 0 ].checked ); 20111 }, 20112 20113 widget: function() { 20114 return this.label; 20115 }, 20116 20117 _getRadioGroup: function() { 20118 var group; 20119 var name = this.element[ 0 ].name; 20120 var nameSelector = "input[name='" + $.escapeSelector( name ) + "']"; 20121 20122 if ( !name ) { 20123 return $( [] ); 20124 } 20125 20126 if ( this.form.length ) { 20127 group = $( this.form[ 0 ].elements ).filter( nameSelector ); 20128 } else { 20129 20130 // Not inside a form, check all inputs that also are not inside a form 20131 group = $( nameSelector ).filter( function() { 20132 return $( this )._form().length === 0; 20133 } ); 20134 } 20135 20136 return group.not( this.element ); 20137 }, 20138 20139 _toggleClasses: function() { 20140 var checked = this.element[ 0 ].checked; 20141 this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked ); 20142 20143 if ( this.options.icon && this.type === "checkbox" ) { 20144 this._toggleClass( this.icon, null, "ui-icon-check ui-state-checked", checked ) 20145 ._toggleClass( this.icon, null, "ui-icon-blank", !checked ); 20146 } 20147 20148 if ( this.type === "radio" ) { 20149 this._getRadioGroup() 20150 .each( function() { 20151 var instance = $( this ).checkboxradio( "instance" ); 20152 20153 if ( instance ) { 20154 instance._removeClass( instance.label, 20155 "ui-checkboxradio-checked", "ui-state-active" ); 20156 } 20157 } ); 20158 } 20159 }, 20160 20161 _destroy: function() { 20162 this._unbindFormResetHandler(); 20163 20164 if ( this.icon ) { 20165 this.icon.remove();
vendor: 2,708 bytes, lines 20166-20272
20166 this.iconSpace.remove(); 20167 } 20168 }, 20169 20170 _setOption: function( key, value ) { 20171 20172 // We don't allow the value to be set to nothing 20173 if ( key === "label" && !value ) { 20174 return; 20175 } 20176 20177 this._super( key, value ); 20178 20179 if ( key === "disabled" ) { 20180 this._toggleClass( this.label, null, "ui-state-disabled", value ); 20181 this.element[ 0 ].disabled = value; 20182 20183 // Don't refresh when setting disabled 20184 return; 20185 } 20186 this.refresh(); 20187 }, 20188 20189 _updateIcon: function( checked ) { 20190 var toAdd = "ui-icon ui-icon-background "; 20191 20192 if ( this.options.icon ) { 20193 if ( !this.icon ) { 20194 this.icon = $( "<span>" ); 20195 this.iconSpace = $( "<span> </span>" ); 20196 this._addClass( this.iconSpace, "ui-checkboxradio-icon-space" ); 20197 } 20198 20199 if ( this.type === "checkbox" ) { 20200 toAdd += checked ? "ui-icon-check ui-state-checked" : "ui-icon-blank"; 20201 this._removeClass( this.icon, null, checked ? "ui-icon-blank" : "ui-icon-check" ); 20202 } else { 20203 toAdd += "ui-icon-blank"; 20204 } 20205 this._addClass( this.icon, "ui-checkboxradio-icon", toAdd ); 20206 if ( !checked ) { 20207 this._removeClass( this.icon, null, "ui-icon-check ui-state-checked" ); 20208 } 20209 this.icon.prependTo( this.label ).after( this.iconSpace ); 20210 } else if ( this.icon !== undefined ) { 20211 this.icon.remove(); 20212 this.iconSpace.remove(); 20213 delete this.icon; 20214 } 20215 }, 20216 20217 _updateLabel: function() { 20218 20219 // Remove the contents of the label ( minus the icon, icon space, and input ) 20220 var contents = this.label.contents().not( this.element[ 0 ] ); 20221 if ( this.icon ) { 20222 contents = contents.not( this.icon[ 0 ] ); 20223 } 20224 if ( this.iconSpace ) { 20225 contents = contents.not( this.iconSpace[ 0 ] ); 20226 } 20227 contents.remove(); 20228 20229 this.label.append( this.options.label ); 20230 }, 20231 20232 refresh: function() { 20233 var checked = this.element[ 0 ].checked, 20234 isDisabled = this.element[ 0 ].disabled; 20235 20236 this._updateIcon( checked ); 20237 this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked ); 20238 if ( this.options.label !== null ) { 20239 this._updateLabel(); 20240 } 20241 20242 if ( isDisabled !== this.options.disabled ) { 20243 this._setOptions( { "disabled": isDisabled } ); 20244 } 20245 } 20246 20247} ] ); 20248 20249var widgetsCheckboxradio = $.ui.checkboxradio; 20250 20251 20252/*! 20253 * jQuery UI Button 1.13.2 20254 * http://jqueryui.com 20255 * 20256 * Copyright jQuery Foundation and other contributors 20257 * Released under the MIT license. 20258 * http://jquery.org/license 20259 */ 20260 20261//>>label: Button 20262//>>group: Widgets 20263//>>description: Enhances a form with themeable buttons. 20264//>>docs: http://api.jqueryui.com/button/ 20265//>>demos: http://jqueryui.com/button/ 20266//>>css.structure: ../../themes/base/core.css 20267//>>css.structure: ../../themes/base/button.css 20268//>>css.theme: ../../themes/base/theme.css 20269 20270 20271$.widget( "ui.button", { 20272 version: "1.13.2
vendor: 10,836 bytes, lines 20272-20679
20272", 20273 defaultElement: "<button>", 20274 options: { 20275 classes: { 20276 "ui-button": "ui-corner-all" 20277 }, 20278 disabled: null, 20279 icon: null, 20280 iconPosition: "beginning", 20281 label: null, 20282 showLabel: true 20283 }, 20284 20285 _getCreateOptions: function() { 20286 var disabled, 20287 20288 // This is to support cases like in jQuery Mobile where the base widget does have 20289 // an implementation of _getCreateOptions 20290 options = this._super() || {}; 20291 20292 this.isInput = this.element.is( "input" ); 20293 20294 disabled = this.element[ 0 ].disabled; 20295 if ( disabled != null ) { 20296 options.disabled = disabled; 20297 } 20298 20299 this.originalLabel = this.isInput ? this.element.val() : this.element.html(); 20300 if ( this.originalLabel ) { 20301 options.label = this.originalLabel; 20302 } 20303 20304 return options; 20305 }, 20306 20307 _create: function() { 20308 if ( !this.option.showLabel & !this.options.icon ) { 20309 this.options.showLabel = true; 20310 } 20311 20312 // We have to check the option again here even though we did in _getCreateOptions, 20313 // because null may have been passed on init which would override what was set in 20314 // _getCreateOptions 20315 if ( this.options.disabled == null ) { 20316 this.options.disabled = this.element[ 0 ].disabled || false; 20317 } 20318 20319 this.hasTitle = !!this.element.attr( "title" ); 20320 20321 // Check to see if the label needs to be set or if its already correct 20322 if ( this.options.label && this.options.label !== this.originalLabel ) { 20323 if ( this.isInput ) { 20324 this.element.val( this.options.label ); 20325 } else { 20326 this.element.html( this.options.label ); 20327 } 20328 } 20329 this._addClass( "ui-button", "ui-widget" ); 20330 this._setOption( "disabled", this.options.disabled ); 20331 this._enhance(); 20332 20333 if ( this.element.is( "a" ) ) { 20334 this._on( { 20335 "keyup": function( event ) { 20336 if ( event.keyCode === $.ui.keyCode.SPACE ) { 20337 event.preventDefault(); 20338 20339 // Support: PhantomJS <= 1.9, IE 8 Only 20340 // If a native click is available use it so we actually cause navigation 20341 // otherwise just trigger a click event 20342 if ( this.element[ 0 ].click ) { 20343 this.element[ 0 ].click(); 20344 } else { 20345 this.element.trigger( "click" ); 20346 } 20347 } 20348 } 20349 } ); 20350 } 20351 }, 20352 20353 _enhance: function() { 20354 if ( !this.element.is( "button" ) ) { 20355 this.element.attr( "role", "button" ); 20356 } 20357 20358 if ( this.options.icon ) { 20359 this._updateIcon( "icon", this.options.icon ); 20360 this._updateTooltip(); 20361 } 20362 }, 20363 20364 _updateTooltip: function() { 20365 this.title = this.element.attr( "title" ); 20366 20367 if ( !this.options.showLabel && !this.title ) { 20368 this.element.attr( "title", this.options.label ); 20369 } 20370 }, 20371 20372 _updateIcon: function( option, value ) { 20373 var icon = option !== "iconPosition", 20374 position = icon ? this.options.iconPosition : value, 20375 displayBlock = position === "top" || position === "bottom"; 20376 20377 // Create icon 20378 if ( !this.icon ) { 20379 this.icon = $( "<span>" ); 20380 20381 this._addClass( this.icon, "ui-button-icon", "ui-icon" ); 20382 20383 if ( !this.options.showLabel ) { 20384 this._addClass( "ui-button-icon-only" ); 20385 } 20386 } else if ( icon ) { 20387 20388 // If we are updating the icon remove the old icon class 20389 this._removeClass( this.icon, null, this.options.icon ); 20390 } 20391 20392 // If we are updating the icon add the new icon class 20393 if ( icon ) { 20394 this._addClass( this.icon, null, value ); 20395 } 20396 20397 this._attachIcon( position ); 20398 20399 // If the icon is on top or bottom we need to add the ui-widget-icon-block class and remove 20400 // the iconSpace if there is one. 20401 if ( displayBlock ) { 20402 this._addClass( this.icon, null, "ui-widget-icon-block" ); 20403 if ( this.iconSpace ) { 20404 this.iconSpace.remove(); 20405 } 20406 } else { 20407 20408 // Position is beginning or end so remove the ui-widget-icon-block class and add the 20409 // space if it does not exist 20410 if ( !this.iconSpace ) { 20411 this.iconSpace = $( "<span> </span>" ); 20412 this._addClass( this.iconSpace, "ui-button-icon-space" ); 20413 } 20414 this._removeClass( this.icon, null, "ui-wiget-icon-block" ); 20415 this._attachIconSpace( position ); 20416 } 20417 }, 20418 20419 _destroy: function() { 20420 this.element.removeAttr( "role" ); 20421 20422 if ( this.icon ) { 20423 this.icon.remove(); 20424 } 20425 if ( this.iconSpace ) { 20426 this.iconSpace.remove(); 20427 } 20428 if ( !this.hasTitle ) { 20429 this.element.removeAttr( "title" ); 20430 } 20431 }, 20432 20433 _attachIconSpace: function( iconPosition ) { 20434 this.icon[ /^(?:end|bottom)/.test( iconPosition ) ? "before" : "after" ]( this.iconSpace ); 20435 }, 20436 20437 _attachIcon: function( iconPosition ) { 20438 this.element[ /^(?:end|bottom)/.test( iconPosition ) ? "append" : "prepend" ]( this.icon ); 20439 }, 20440 20441 _setOptions: function( options ) { 20442 var newShowLabel = options.showLabel === undefined ? 20443 this.options.showLabel : 20444 options.showLabel, 20445 newIcon = options.icon === undefined ? this.options.icon : options.icon; 20446 20447 if ( !newShowLabel && !newIcon ) { 20448 options.showLabel = true; 20449 } 20450 this._super( options ); 20451 }, 20452 20453 _setOption: function( key, value ) { 20454 if ( key === "icon" ) { 20455 if ( value ) { 20456 this._updateIcon( key, value ); 20457 } else if ( this.icon ) { 20458 this.icon.remove(); 20459 if ( this.iconSpace ) { 20460 this.iconSpace.remove(); 20461 } 20462 } 20463 } 20464 20465 if ( key === "iconPosition" ) { 20466 this._updateIcon( key, value ); 20467 } 20468 20469 // Make sure we can't end up with a button that has neither text nor icon 20470 if ( key === "showLabel" ) { 20471 this._toggleClass( "ui-button-icon-only", null, !value ); 20472 this._updateTooltip(); 20473 } 20474 20475 if ( key === "label" ) { 20476 if ( this.isInput ) { 20477 this.element.val( value ); 20478 } else { 20479 20480 // If there is an icon, append it, else nothing then append the value 20481 // this avoids removal of the icon when setting label text 20482 this.element.html( value ); 20483 if ( this.icon ) { 20484 this._attachIcon( this.options.iconPosition ); 20485 this._attachIconSpace( this.options.iconPosition ); 20486 } 20487 } 20488 } 20489 20490 this._super( key, value ); 20491 20492 if ( key === "disabled" ) { 20493 this._toggleClass( null, "ui-state-disabled", value ); 20494 this.element[ 0 ].disabled = value; 20495 if ( value ) { 20496 this.element.trigger( "blur" ); 20497 } 20498 } 20499 }, 20500 20501 refresh: function() { 20502 20503 // Make sure to only check disabled if its an element that supports this otherwise 20504 // check for the disabled class to determine state 20505 var isDisabled = this.element.is( "input, button" ) ? 20506 this.element[ 0 ].disabled : this.element.hasClass( "ui-button-disabled" ); 20507 20508 if ( isDisabled !== this.options.disabled ) { 20509 this._setOptions( { disabled: isDisabled } ); 20510 } 20511 20512 this._updateTooltip(); 20513 } 20514} ); 20515 20516// DEPRECATED 20517if ( $.uiBackCompat !== false ) { 20518 20519 // Text and Icons options 20520 $.widget( "ui.button", $.ui.button, { 20521 options: { 20522 text: true, 20523 icons: { 20524 primary: null, 20525 secondary: null 20526 } 20527 }, 20528 20529 _create: function() { 20530 if ( this.options.showLabel && !this.options.text ) { 20531 this.options.showLabel = this.options.text; 20532 } 20533 if ( !this.options.showLabel && this.options.text ) { 20534 this.options.text = this.options.showLabel; 20535 } 20536 if ( !this.options.icon && ( this.options.icons.primary || 20537 this.options.icons.secondary ) ) { 20538 if ( this.options.icons.primary ) { 20539 this.options.icon = this.options.icons.primary; 20540 } else { 20541 this.options.icon = this.options.icons.secondary; 20542 this.options.iconPosition = "end"; 20543 } 20544 } else if ( this.options.icon ) { 20545 this.options.icons.primary = this.options.icon; 20546 } 20547 this._super(); 20548 }, 20549 20550 _setOption: function( key, value ) { 20551 if ( key === "text" ) { 20552 this._super( "showLabel", value ); 20553 return; 20554 } 20555 if ( key === "showLabel" ) { 20556 this.options.text = value; 20557 } 20558 if ( key === "icon" ) { 20559 this.options.icons.primary = value; 20560 } 20561 if ( key === "icons" ) { 20562 if ( value.primary ) { 20563 this._super( "icon", value.primary ); 20564 this._super( "iconPosition", "beginning" ); 20565 } else if ( value.secondary ) { 20566 this._super( "icon", value.secondary ); 20567 this._super( "iconPosition", "end" ); 20568 } 20569 } 20570 this._superApply( arguments ); 20571 } 20572 } ); 20573 20574 $.fn.button = ( function( orig ) { 20575 return function( options ) { 20576 var isMethodCall = typeof options === "string"; 20577 var args = Array.prototype.slice.call( arguments, 1 ); 20578 var returnValue = this; 20579 20580 if ( isMethodCall ) { 20581 20582 // If this is an empty collection, we need to have the instance method 20583 // return undefined instead of the jQuery instance 20584 if ( !this.length && options === "instance" ) { 20585 returnValue = undefined; 20586 } else { 20587 this.each( function() { 20588 var methodValue; 20589 var type = $( this ).attr( "type" ); 20590 var name = type !== "checkbox" && type !== "radio" ? 20591 "button" : 20592 "checkboxradio"; 20593 var instance = $.data( this, "ui-" + name ); 20594 20595 if ( options === "instance" ) { 20596 returnValue = instance; 20597 return false; 20598 } 20599 20600 if ( !instance ) { 20601 return $.error( "cannot call methods on button" + 20602 " prior to initialization; " + 20603 "attempted to call method '" + options + "'" ); 20604 } 20605 20606 if ( typeof instance[ options ] !== "function" || 20607 options.charAt( 0 ) === "_" ) { 20608 return $.error( "no such method '" + options + "' for button" + 20609 " widget instance" ); 20610 } 20611 20612 methodValue = instance[ options ].apply( instance, args ); 20613 20614 if ( methodValue !== instance && methodValue !== undefined ) { 20615 returnValue = methodValue && methodValue.jquery ? 20616 returnValue.pushStack( methodValue.get() ) : 20617 methodValue; 20618 return false; 20619 } 20620 } ); 20621 } 20622 } else { 20623 20624 // Allow multiple hashes to be passed on init 20625 if ( args.length ) { 20626 options = $.widget.extend.apply( null, [ options ].concat( args ) ); 20627 } 20628 20629 this.each( function() { 20630 var type = $( this ).attr( "type" ); 20631 var name = type !== "checkbox" && type !== "radio" ? "button" : "checkboxradio"; 20632 var instance = $.data( this, "ui-" + name ); 20633 20634 if ( instance ) { 20635 instance.option( options || {} ); 20636 if ( instance._init ) { 20637 instance._init(); 20638 } 20639 } else { 20640 if ( name === "button" ) { 20641 orig.call( $( this ), options ); 20642 return; 20643 } 20644 20645 $( this ).checkboxradio( $.extend( { icon: false }, options ) ); 20646 } 20647 } ); 20648 } 20649 20650 return returnValue; 20651 }; 20652 } )( $.fn.button ); 20653 20654 $.fn.buttonset = function() { 20655 if ( !$.ui.controlgroup ) { 20656 $.error( "Controlgroup widget missing" ); 20657 } 20658 if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" && arguments[ 2 ] ) { 20659 return this.controlgroup.apply( this, 20660 [ arguments[ 0 ], "items.button", arguments[ 2 ] ] ); 20661 } 20662 if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" ) { 20663 return this.controlgroup.apply( this, [ arguments[ 0 ], "items.button" ] ); 20664 } 20665 if ( typeof arguments[ 0 ] === "object" && arguments[ 0 ].items ) { 20666 arguments[ 0 ].items = { 20667 button: arguments[ 0 ].items 20668 }; 20669 } 20670 return this.controlgroup.apply( this, arguments ); 20671 }; 20672} 20673 20674var widgetsButton = $.ui.button; 20675 20676 20677/* eslint-disable max-len, camelcase */ 20678/*! 20679 * jQuery UI Datepicker 1.13.
206792 20680 * http://jqueryui.com 20681 * 20682 * Copyright jQuery Foundation and other contributors 20683 * Released under the MIT license. 20684 * http://jquery.org/license 20685 */ 20686 20687//>>label: Datepicker 20688//>>group: Widgets 20689//>>description: Displays a calendar from an input or inline for selecting dates. 20690//>>docs: http://api.jqueryui.com/datepicker/ 20691//>>demos: http://jqueryui.com/datepicker/ 20692//>>css.structure: ../../themes/base/core.css 20693//>>css.structure: ../../themes/base/datepicker.css 20694//>>css.theme: ../../themes/base/theme.css 20695 20696 20697$.extend( $.ui, { datepicker: { version: "1.13
vendor: 14,164 bytes, lines 20697-21014
20697.2" } } ); 20698 20699var datepicker_instActive; 20700 20701function datepicker_getZindex( elem ) { 20702 var position, value; 20703 while ( elem.length && elem[ 0 ] !== document ) { 20704 20705 // Ignore z-index if position is set to a value where z-index is ignored by the browser 20706 // This makes behavior of this function consistent across browsers 20707 // WebKit always returns auto if the element is positioned 20708 position = elem.css( "position" ); 20709 if ( position === "absolute" || position === "relative" || position === "fixed" ) { 20710 20711 // IE returns 0 when zIndex is not specified 20712 // other browsers return a string 20713 // we ignore the case of nested elements with an explicit value of 0 20714 // <div style="z-index: -10;"><div style="z-index: 0;"></div></div> 20715 value = parseInt( elem.css( "zIndex" ), 10 ); 20716 if ( !isNaN( value ) && value !== 0 ) { 20717 return value; 20718 } 20719 } 20720 elem = elem.parent(); 20721 } 20722 20723 return 0; 20724} 20725 20726/* Date picker manager. 20727 Use the singleton instance of this class, $.datepicker, to interact with the date picker. 20728 Settings for (groups of) date pickers are maintained in an instance object, 20729 allowing multiple different settings on the same page. */ 20730 20731function Datepicker() { 20732 this._curInst = null; // The current instance in use 20733 this._keyEvent = false; // If the last event was a key event 20734 this._disabledInputs = []; // List of date picker inputs that have been disabled 20735 this._datepickerShowing = false; // True if the popup picker is showing , false if not 20736 this._inDialog = false; // True if showing within a "dialog", false if not 20737 this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division 20738 this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class 20739 this._appendClass = "ui-datepicker-append"; // The name of the append marker class 20740 this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class 20741 this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class 20742 this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class 20743 this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class 20744 this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class 20745 this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class 20746 this.regional = []; // Available regional settings, indexed by language code 20747 this.regional[ "" ] = { // Default regional settings 20748 closeText: "Done", // Display text for close link 20749 prevText: "Prev", // Display text for previous month link 20750 nextText: "Next", // Display text for next month link 20751 currentText: "Today", // Display text for current month link 20752 monthNames: [ "January", "February", "March", "April", "May", "June", 20753 "July", "August", "September", "October", "November", "December" ], // Names of months for drop-down and formatting 20754 monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], // For formatting 20755 dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], // For formatting 20756 dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], // For formatting 20757 dayNamesMin: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ], // Column headings for days starting at Sunday 20758 weekHeader: "Wk", // Column header for week of the year 20759 dateFormat: "mm/dd/yy", // See format options on parseDate 20760 firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ... 20761 isRTL: false, // True if right-to-left language, false if left-to-right 20762 showMonthAfterYear: false, // True if the year select precedes month, false for month then year 20763 yearSuffix: "", // Additional text to append to the year in the month headers, 20764 selectMonthLabel: "Select month", // Invisible label for month selector 20765 selectYearLabel: "Select year" // Invisible label for year selector 20766 }; 20767 this._defaults = { // Global defaults for all the date picker instances 20768 showOn: "focus", // "focus" for popup on focus, 20769 // "button" for trigger button, or "both" for either 20770 showAnim: "fadeIn", // Name of jQuery animation for popup 20771 showOptions: {}, // Options for enhanced animations 20772 defaultDate: null, // Used when field is blank: actual date, 20773 // +/-number for offset from today, null for today 20774 appendText: "", // Display text following the input box, e.g. showing the format 20775 buttonText: "...", // Text for trigger button 20776 buttonImage: "", // URL for trigger button image 20777 buttonImageOnly: false, // True if the image appears alone, false if it appears on a button 20778 hideIfNoPrevNext: false, // True to hide next/previous month links 20779 // if not applicable, false to just disable them 20780 navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links 20781 gotoCurrent: false, // True if today link goes back to current selection instead 20782 changeMonth: false, // True if month can be selected directly, false if only prev/next 20783 changeYear: false, // True if year can be selected directly, false if only prev/next 20784 yearRange: "c-10:c+10", // Range of years to display in drop-down, 20785 // either relative to today's year (-nn:+nn), relative to currently displayed year 20786 // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n) 20787 showOtherMonths: false, // True to show dates in other months, false to leave blank 20788 selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable 20789 showWeek: false, // True to show week of the year, false to not show it 20790 calculateWeek: this.iso8601Week, // How to calculate the week of the year, 20791 // takes a Date and returns the number of the week for it 20792 shortYearCutoff: "+10", // Short year values < this are in the current century, 20793 // > this are in the previous century, 20794 // string value starting with "+" for current year + value 20795 minDate: null, // The earliest selectable date, or null for no limit 20796 maxDate: null, // The latest selectable date, or null for no limit 20797 duration: "fast", // Duration of display/closure 20798 beforeShowDay: null, // Function that takes a date and returns an array with 20799 // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "", 20800 // [2] = cell title (optional), e.g. $.datepicker.noWeekends 20801 beforeShow: null, // Function that takes an input field and 20802 // returns a set of custom settings for the date picker 20803 onSelect: null, // Define a callback function when a date is selected 20804 onChangeMonthYear: null, // Define a callback function when the month or year is changed 20805 onClose: null, // Define a callback function when the datepicker is closed 20806 onUpdateDatepicker: null, // Define a callback function when the datepicker is updated 20807 numberOfMonths: 1, // Number of months to show at a time 20808 showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0) 20809 stepMonths: 1, // Number of months to step back/forward 20810 stepBigMonths: 12, // Number of months to step back/forward for the big links 20811 altField: "", // Selector for an alternate field to store selected dates into 20812 altFormat: "", // The date format to use for the alternate field 20813 constrainInput: true, // The input is constrained by the current date format 20814 showButtonPanel: false, // True to show button panel, false to not show it 20815 autoSize: false, // True to size the input for the date format, false to leave as is 20816 disabled: false // The initial disabled state 20817 }; 20818 $.extend( this._defaults, this.regional[ "" ] ); 20819 this.regional.en = $.extend( true, {}, this.regional[ "" ] ); 20820 this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en ); 20821 this.dpDiv = datepicker_bindHover( $( "<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) ); 20822} 20823 20824$.extend( Datepicker.prototype, { 20825 20826 /* Class name added to elements to indicate already configured with a date picker. */ 20827 markerClassName: "hasDatepicker", 20828 20829 //Keep track of the maximum number of rows displayed (see #7043) 20830 maxRows: 4, 20831 20832 // TODO rename to "widget" when switching to widget factory 20833 _widgetDatepicker: function() { 20834 return this.dpDiv; 20835 }, 20836 20837 /* Override the default settings for all instances of the date picker. 20838 * @param settings object - the new settings to use as defaults (anonymous object) 20839 * @return the manager object 20840 */ 20841 setDefaults: function( settings ) { 20842 datepicker_extendRemove( this._defaults, settings || {} ); 20843 return this; 20844 }, 20845 20846 /* Attach the date picker to a jQuery selection. 20847 * @param target element - the target input field or division or span 20848 * @param settings object - the new settings to use for this date picker instance (anonymous) 20849 */ 20850 _attachDatepicker: function( target, settings ) { 20851 var nodeName, inline, inst; 20852 nodeName = target.nodeName.toLowerCase(); 20853 inline = ( nodeName === "div" || nodeName === "span" ); 20854 if ( !target.id ) { 20855 this.uuid += 1; 20856 target.id = "dp" + this.uuid; 20857 } 20858 inst = this._newInst( $( target ), inline ); 20859 inst.settings = $.extend( {}, settings || {} ); 20860 if ( nodeName === "input" ) { 20861 this._connectDatepicker( target, inst ); 20862 } else if ( inline ) { 20863 this._inlineDatepicker( target, inst ); 20864 } 20865 }, 20866 20867 /* Create a new instance object. */ 20868 _newInst: function( target, inline ) { 20869 var id = target[ 0 ].id.replace( /([^A-Za-z0-9_\-])/g, "\\\\$1" ); // escape jQuery meta chars 20870 return { id: id, input: target, // associated target 20871 selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection 20872 drawMonth: 0, drawYear: 0, // month being drawn 20873 inline: inline, // is datepicker inline or not 20874 dpDiv: ( !inline ? this.dpDiv : // presentation div 20875 datepicker_bindHover( $( "<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) ) ) }; 20876 }, 20877 20878 /* Attach the date picker to an input field. */ 20879 _connectDatepicker: function( target, inst ) { 20880 var input = $( target ); 20881 inst.append = $( [] ); 20882 inst.trigger = $( [] ); 20883 if ( input.hasClass( this.markerClassName ) ) { 20884 return; 20885 } 20886 this._attachments( input, inst ); 20887 input.addClass( this.markerClassName ).on( "keydown", this._doKeyDown ). 20888 on( "keypress", this._doKeyPress ).on( "keyup", this._doKeyUp ); 20889 this._autoSize( inst ); 20890 $.data( target, "datepicker", inst ); 20891 20892 //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665) 20893 if ( inst.settings.disabled ) { 20894 this._disableDatepicker( target ); 20895 } 20896 }, 20897 20898 /* Make attachments based on settings. */ 20899 _attachments: function( input, inst ) { 20900 var showOn, buttonText, buttonImage, 20901 appendText = this._get( inst, "appendText" ), 20902 isRTL = this._get( inst, "isRTL" ); 20903 20904 if ( inst.append ) { 20905 inst.append.remove(); 20906 } 20907 if ( appendText ) { 20908 inst.append = $( "<span>" ) 20909 .addClass( this._appendClass ) 20910 .text( appendText ); 20911 input[ isRTL ? "before" : "after" ]( inst.append ); 20912 } 20913 20914 input.off( "focus", this._showDatepicker ); 20915 20916 if ( inst.trigger ) { 20917 inst.trigger.remove(); 20918 } 20919 20920 showOn = this._get( inst, "showOn" ); 20921 if ( showOn === "focus" || showOn === "both" ) { // pop-up date picker when in the marked field 20922 input.on( "focus", this._showDatepicker ); 20923 } 20924 if ( showOn === "button" || showOn === "both" ) { // pop-up date picker when button clicked 20925 buttonText = this._get( inst, "buttonText" ); 20926 buttonImage = this._get( inst, "buttonImage" ); 20927 20928 if ( this._get( inst, "buttonImageOnly" ) ) { 20929 inst.trigger = $( "<img>" ) 20930 .addClass( this._triggerClass ) 20931 .attr( { 20932 src: buttonImage, 20933 alt: buttonText, 20934 title: buttonText 20935 } ); 20936 } else { 20937 inst.trigger = $( "<button type='button'>" ) 20938 .addClass( this._triggerClass ); 20939 if ( buttonImage ) { 20940 inst.trigger.html( 20941 $( "<img>" ) 20942 .attr( { 20943 src: buttonImage, 20944 alt: buttonText, 20945 title: buttonText 20946 } ) 20947 ); 20948 } else { 20949 inst.trigger.text( buttonText ); 20950 } 20951 } 20952 20953 input[ isRTL ? "before" : "after" ]( inst.trigger ); 20954 inst.trigger.on( "click", function() { 20955 if ( $.datepicker._datepickerShowing && $.datepicker._lastInput === input[ 0 ] ) { 20956 $.datepicker._hideDatepicker(); 20957 } else if ( $.datepicker._datepickerShowing && $.datepicker._lastInput !== input[ 0 ] ) { 20958 $.datepicker._hideDatepicker(); 20959 $.datepicker._showDatepicker( input[ 0 ] ); 20960 } else { 20961 $.datepicker._showDatepicker( input[ 0 ] ); 20962 } 20963 return false; 20964 } ); 20965 } 20966 }, 20967 20968 /* Apply the maximum length for the date format. */ 20969 _autoSize: function( inst ) { 20970 if ( this._get( inst, "autoSize" ) && !inst.inline ) { 20971 var findMax, max, maxI, i, 20972 date = new Date( 2009, 12 - 1, 20 ), // Ensure double digits 20973 dateFormat = this._get( inst, "dateFormat" ); 20974 20975 if ( dateFormat.match( /[DM]/ ) ) { 20976 findMax = function( names ) { 20977 max = 0; 20978 maxI = 0; 20979 for ( i = 0; i < names.length; i++ ) { 20980 if ( names[ i ].length > max ) { 20981 max = names[ i ].length; 20982 maxI = i; 20983 } 20984 } 20985 return maxI; 20986 }; 20987 date.setMonth( findMax( this._get( inst, ( dateFormat.match( /MM/ ) ? 20988 "monthNames" : "monthNamesShort" ) ) ) ); 20989 date.setDate( findMax( this._get( inst, ( dateFormat.match( /DD/ ) ? 20990 "dayNames" : "dayNamesShort" ) ) ) + 20 - date.getDay() ); 20991 } 20992 inst.input.attr( "size", this._formatDate( inst, date ).length ); 20993 } 20994 }, 20995 20996 /* Attach an inline date picker to a div. */ 20997 _inlineDatepicker: function( target, inst ) { 20998 var divSpan = $( target ); 20999 if ( divSpan.hasClass( this.markerClassName ) ) { 21000 return; 21001 } 21002 divSpan.addClass( this.markerClassName ).append( inst.dpDiv ); 21003 $.data( target, "datepicker", inst ); 21004 this._setDate( inst, this._getDefaultDate( inst ), true ); 21005 this._updateDatepicker( inst ); 21006 this._updateAlternate( inst ); 21007 21008 //If disabled option is true, disable the datepicker before showing it (see ticket #5665) 21009 if ( inst.settings.disabled ) { 21010 this._disableDatepicker( target ); 21011 } 21012 21013 // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements 21014 // http
vendor: 14,693 bytes, lines 21014-21436
21014://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height 21015 inst.dpDiv.css( "display", "block" ); 21016 }, 21017 21018 /* Pop-up the date picker in a "dialog" box. 21019 * @param input element - ignored 21020 * @param date string or Date - the initial date to display 21021 * @param onSelect function - the function to call when a date is selected 21022 * @param settings object - update the dialog date picker instance's settings (anonymous object) 21023 * @param pos int[2] - coordinates for the dialog's position within the screen or 21024 * event - with x/y coordinates or 21025 * leave empty for default (screen centre) 21026 * @return the manager object 21027 */ 21028 _dialogDatepicker: function( input, date, onSelect, settings, pos ) { 21029 var id, browserWidth, browserHeight, scrollX, scrollY, 21030 inst = this._dialogInst; // internal instance 21031 21032 if ( !inst ) { 21033 this.uuid += 1; 21034 id = "dp" + this.uuid; 21035 this._dialogInput = $( "<input type='text' id='" + id + 21036 "' style='position: absolute; top: -100px; width: 0px;'/>" ); 21037 this._dialogInput.on( "keydown", this._doKeyDown ); 21038 $( "body" ).append( this._dialogInput ); 21039 inst = this._dialogInst = this._newInst( this._dialogInput, false ); 21040 inst.settings = {}; 21041 $.data( this._dialogInput[ 0 ], "datepicker", inst ); 21042 } 21043 datepicker_extendRemove( inst.settings, settings || {} ); 21044 date = ( date && date.constructor === Date ? this._formatDate( inst, date ) : date ); 21045 this._dialogInput.val( date ); 21046 21047 this._pos = ( pos ? ( pos.length ? pos : [ pos.pageX, pos.pageY ] ) : null ); 21048 if ( !this._pos ) { 21049 browserWidth = document.documentElement.clientWidth; 21050 browserHeight = document.documentElement.clientHeight; 21051 scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; 21052 scrollY = document.documentElement.scrollTop || document.body.scrollTop; 21053 this._pos = // should use actual width/height below 21054 [ ( browserWidth / 2 ) - 100 + scrollX, ( browserHeight / 2 ) - 150 + scrollY ]; 21055 } 21056 21057 // Move input on screen for focus, but hidden behind dialog 21058 this._dialogInput.css( "left", ( this._pos[ 0 ] + 20 ) + "px" ).css( "top", this._pos[ 1 ] + "px" ); 21059 inst.settings.onSelect = onSelect; 21060 this._inDialog = true; 21061 this.dpDiv.addClass( this._dialogClass ); 21062 this._showDatepicker( this._dialogInput[ 0 ] ); 21063 if ( $.blockUI ) { 21064 $.blockUI( this.dpDiv ); 21065 } 21066 $.data( this._dialogInput[ 0 ], "datepicker", inst ); 21067 return this; 21068 }, 21069 21070 /* Detach a datepicker from its control. 21071 * @param target element - the target input field or division or span 21072 */ 21073 _destroyDatepicker: function( target ) { 21074 var nodeName, 21075 $target = $( target ), 21076 inst = $.data( target, "datepicker" ); 21077 21078 if ( !$target.hasClass( this.markerClassName ) ) { 21079 return; 21080 } 21081 21082 nodeName = target.nodeName.toLowerCase(); 21083 $.removeData( target, "datepicker" ); 21084 if ( nodeName === "input" ) { 21085 inst.append.remove(); 21086 inst.trigger.remove(); 21087 $target.removeClass( this.markerClassName ). 21088 off( "focus", this._showDatepicker ). 21089 off( "keydown", this._doKeyDown ). 21090 off( "keypress", this._doKeyPress ). 21091 off( "keyup", this._doKeyUp ); 21092 } else if ( nodeName === "div" || nodeName === "span" ) { 21093 $target.removeClass( this.markerClassName ).empty(); 21094 } 21095 21096 if ( datepicker_instActive === inst ) { 21097 datepicker_instActive = null; 21098 this._curInst = null; 21099 } 21100 }, 21101 21102 /* Enable the date picker to a jQuery selection. 21103 * @param target element - the target input field or division or span 21104 */ 21105 _enableDatepicker: function( target ) { 21106 var nodeName, inline, 21107 $target = $( target ), 21108 inst = $.data( target, "datepicker" ); 21109 21110 if ( !$target.hasClass( this.markerClassName ) ) { 21111 return; 21112 } 21113 21114 nodeName = target.nodeName.toLowerCase(); 21115 if ( nodeName === "input" ) { 21116 target.disabled = false; 21117 inst.trigger.filter( "button" ). 21118 each( function() { 21119 this.disabled = false; 21120 } ).end(). 21121 filter( "img" ).css( { opacity: "1.0", cursor: "" } ); 21122 } else if ( nodeName === "div" || nodeName === "span" ) { 21123 inline = $target.children( "." + this._inlineClass ); 21124 inline.children().removeClass( "ui-state-disabled" ); 21125 inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ). 21126 prop( "disabled", false ); 21127 } 21128 this._disabledInputs = $.map( this._disabledInputs, 21129 21130 // Delete entry 21131 function( value ) { 21132 return ( value === target ? null : value ); 21133 } ); 21134 }, 21135 21136 /* Disable the date picker to a jQuery selection. 21137 * @param target element - the target input field or division or span 21138 */ 21139 _disableDatepicker: function( target ) { 21140 var nodeName, inline, 21141 $target = $( target ), 21142 inst = $.data( target, "datepicker" ); 21143 21144 if ( !$target.hasClass( this.markerClassName ) ) { 21145 return; 21146 } 21147 21148 nodeName = target.nodeName.toLowerCase(); 21149 if ( nodeName === "input" ) { 21150 target.disabled = true; 21151 inst.trigger.filter( "button" ). 21152 each( function() { 21153 this.disabled = true; 21154 } ).end(). 21155 filter( "img" ).css( { opacity: "0.5", cursor: "default" } ); 21156 } else if ( nodeName === "div" || nodeName === "span" ) { 21157 inline = $target.children( "." + this._inlineClass ); 21158 inline.children().addClass( "ui-state-disabled" ); 21159 inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ). 21160 prop( "disabled", true ); 21161 } 21162 this._disabledInputs = $.map( this._disabledInputs, 21163 21164 // Delete entry 21165 function( value ) { 21166 return ( value === target ? null : value ); 21167 } ); 21168 this._disabledInputs[ this._disabledInputs.length ] = target; 21169 }, 21170 21171 /* Is the first field in a jQuery collection disabled as a datepicker? 21172 * @param target element - the target input field or division or span 21173 * @return boolean - true if disabled, false if enabled 21174 */ 21175 _isDisabledDatepicker: function( target ) { 21176 if ( !target ) { 21177 return false; 21178 } 21179 for ( var i = 0; i < this._disabledInputs.length; i++ ) { 21180 if ( this._disabledInputs[ i ] === target ) { 21181 return true; 21182 } 21183 } 21184 return false; 21185 }, 21186 21187 /* Retrieve the instance data for the target control. 21188 * @param target element - the target input field or division or span 21189 * @return object - the associated instance data 21190 * @throws error if a jQuery problem getting data 21191 */ 21192 _getInst: function( target ) { 21193 try { 21194 return $.data( target, "datepicker" ); 21195 } catch ( err ) { 21196 throw "Missing instance data for this datepicker"; 21197 } 21198 }, 21199 21200 /* Update or retrieve the settings for a date picker attached to an input field or division. 21201 * @param target element - the target input field or division or span 21202 * @param name object - the new settings to update or 21203 * string - the name of the setting to change or retrieve, 21204 * when retrieving also "all" for all instance settings or 21205 * "defaults" for all global defaults 21206 * @param value any - the new value for the setting 21207 * (omit if above is an object or to retrieve a value) 21208 */ 21209 _optionDatepicker: function( target, name, value ) { 21210 var settings, date, minDate, maxDate, 21211 inst = this._getInst( target ); 21212 21213 if ( arguments.length === 2 && typeof name === "string" ) { 21214 return ( name === "defaults" ? $.extend( {}, $.datepicker._defaults ) : 21215 ( inst ? ( name === "all" ? $.extend( {}, inst.settings ) : 21216 this._get( inst, name ) ) : null ) ); 21217 } 21218 21219 settings = name || {}; 21220 if ( typeof name === "string" ) { 21221 settings = {}; 21222 settings[ name ] = value; 21223 } 21224 21225 if ( inst ) { 21226 if ( this._curInst === inst ) { 21227 this._hideDatepicker(); 21228 } 21229 21230 date = this._getDateDatepicker( target, true ); 21231 minDate = this._getMinMaxDate( inst, "min" ); 21232 maxDate = this._getMinMaxDate( inst, "max" ); 21233 datepicker_extendRemove( inst.settings, settings ); 21234 21235 // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided 21236 if ( minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined ) { 21237 inst.settings.minDate = this._formatDate( inst, minDate ); 21238 } 21239 if ( maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined ) { 21240 inst.settings.maxDate = this._formatDate( inst, maxDate ); 21241 } 21242 if ( "disabled" in settings ) { 21243 if ( settings.disabled ) { 21244 this._disableDatepicker( target ); 21245 } else { 21246 this._enableDatepicker( target ); 21247 } 21248 } 21249 this._attachments( $( target ), inst ); 21250 this._autoSize( inst ); 21251 this._setDate( inst, date ); 21252 this._updateAlternate( inst ); 21253 this._updateDatepicker( inst ); 21254 } 21255 }, 21256 21257 // Change method deprecated 21258 _changeDatepicker: function( target, name, value ) { 21259 this._optionDatepicker( target, name, value ); 21260 }, 21261 21262 /* Redraw the date picker attached to an input field or division. 21263 * @param target element - the target input field or division or span 21264 */ 21265 _refreshDatepicker: function( target ) { 21266 var inst = this._getInst( target ); 21267 if ( inst ) { 21268 this._updateDatepicker( inst ); 21269 } 21270 }, 21271 21272 /* Set the dates for a jQuery selection. 21273 * @param target element - the target input field or division or span 21274 * @param date Date - the new date 21275 */ 21276 _setDateDatepicker: function( target, date ) { 21277 var inst = this._getInst( target ); 21278 if ( inst ) { 21279 this._setDate( inst, date ); 21280 this._updateDatepicker( inst ); 21281 this._updateAlternate( inst ); 21282 } 21283 }, 21284 21285 /* Get the date(s) for the first entry in a jQuery selection. 21286 * @param target element - the target input field or division or span 21287 * @param noDefault boolean - true if no default date is to be used 21288 * @return Date - the current date 21289 */ 21290 _getDateDatepicker: function( target, noDefault ) { 21291 var inst = this._getInst( target ); 21292 if ( inst && !inst.inline ) { 21293 this._setDateFromField( inst, noDefault ); 21294 } 21295 return ( inst ? this._getDate( inst ) : null ); 21296 }, 21297 21298 /* Handle keystrokes. */ 21299 _doKeyDown: function( event ) { 21300 var onSelect, dateStr, sel, 21301 inst = $.datepicker._getInst( event.target ), 21302 handled = true, 21303 isRTL = inst.dpDiv.is( ".ui-datepicker-rtl" ); 21304 21305 inst._keyEvent = true; 21306 if ( $.datepicker._datepickerShowing ) { 21307 switch ( event.keyCode ) { 21308 case 9: $.datepicker._hideDatepicker(); 21309 handled = false; 21310 break; // hide on tab out 21311 case 13: sel = $( "td." + $.datepicker._dayOverClass + ":not(." + 21312 $.datepicker._currentClass + ")", inst.dpDiv ); 21313 if ( sel[ 0 ] ) { 21314 $.datepicker._selectDay( event.target, inst.selectedMonth, inst.selectedYear, sel[ 0 ] ); 21315 } 21316 21317 onSelect = $.datepicker._get( inst, "onSelect" ); 21318 if ( onSelect ) { 21319 dateStr = $.datepicker._formatDate( inst ); 21320 21321 // Trigger custom callback 21322 onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] ); 21323 } else { 21324 $.datepicker._hideDatepicker(); 21325 } 21326 21327 return false; // don't submit the form 21328 case 27: $.datepicker._hideDatepicker(); 21329 break; // hide on escape 21330 case 33: $.datepicker._adjustDate( event.target, ( event.ctrlKey ? 21331 -$.datepicker._get( inst, "stepBigMonths" ) : 21332 -$.datepicker._get( inst, "stepMonths" ) ), "M" ); 21333 break; // previous month/year on page up/+ ctrl 21334 case 34: $.datepicker._adjustDate( event.target, ( event.ctrlKey ? 21335 +$.datepicker._get( inst, "stepBigMonths" ) : 21336 +$.datepicker._get( inst, "stepMonths" ) ), "M" ); 21337 break; // next month/year on page down/+ ctrl 21338 case 35: if ( event.ctrlKey || event.metaKey ) { 21339 $.datepicker._clearDate( event.target ); 21340 } 21341 handled = event.ctrlKey || event.metaKey; 21342 break; // clear on ctrl or command +end 21343 case 36: if ( event.ctrlKey || event.metaKey ) { 21344 $.datepicker._gotoToday( event.target ); 21345 } 21346 handled = event.ctrlKey || event.metaKey; 21347 break; // current on ctrl or command +home 21348 case 37: if ( event.ctrlKey || event.metaKey ) { 21349 $.datepicker._adjustDate( event.target, ( isRTL ? +1 : -1 ), "D" ); 21350 } 21351 handled = event.ctrlKey || event.metaKey; 21352 21353 // -1 day on ctrl or command +left 21354 if ( event.originalEvent.altKey ) { 21355 $.datepicker._adjustDate( event.target, ( event.ctrlKey ? 21356 -$.datepicker._get( inst, "stepBigMonths" ) : 21357 -$.datepicker._get( inst, "stepMonths" ) ), "M" ); 21358 } 21359 21360 // next month/year on alt +left on Mac 21361 break; 21362 case 38: if ( event.ctrlKey || event.metaKey ) { 21363 $.datepicker._adjustDate( event.target, -7, "D" ); 21364 } 21365 handled = event.ctrlKey || event.metaKey; 21366 break; // -1 week on ctrl or command +up 21367 case 39: if ( event.ctrlKey || event.metaKey ) { 21368 $.datepicker._adjustDate( event.target, ( isRTL ? -1 : +1 ), "D" ); 21369 } 21370 handled = event.ctrlKey || event.metaKey; 21371 21372 // +1 day on ctrl or command +right 21373 if ( event.originalEvent.altKey ) { 21374 $.datepicker._adjustDate( event.target, ( event.ctrlKey ? 21375 +$.datepicker._get( inst, "stepBigMonths" ) : 21376 +$.datepicker._get( inst, "stepMonths" ) ), "M" ); 21377 } 21378 21379 // next month/year on alt +right 21380 break; 21381 case 40: if ( event.ctrlKey || event.metaKey ) { 21382 $.datepicker._adjustDate( event.target, +7, "D" ); 21383 } 21384 handled = event.ctrlKey || event.metaKey; 21385 break; // +1 week on ctrl or command +down 21386 default: handled = false; 21387 } 21388 } else if ( event.keyCode === 36 && event.ctrlKey ) { // display the date picker on ctrl+home 21389 $.datepicker._showDatepicker( this ); 21390 } else { 21391 handled = false; 21392 } 21393 21394 if ( handled ) { 21395 event.preventDefault(); 21396 event.stopPropagation(); 21397 } 21398 }, 21399 21400 /* Filter entered characters - based on date format. */ 21401 _doKeyPress: function( event ) { 21402 var chars, chr, 21403 inst = $.datepicker._getInst( event.target ); 21404 21405 if ( $.datepicker._get( inst, "constrainInput" ) ) { 21406 chars = $.datepicker._possibleChars( $.datepicker._get( inst, "dateFormat" ) ); 21407 chr = String.fromCharCode( event.charCode == null ? event.keyCode : event.charCode ); 21408 return event.ctrlKey || event.metaKey || ( chr < " " || !chars || chars.indexOf( chr ) > -1 ); 21409 } 21410 }, 21411 21412 /* Synchronise manual entry and field/alternate field. */ 21413 _doKeyUp: function( event ) { 21414 var date, 21415 inst = $.datepicker._getInst( event.target ); 21416 21417 if ( inst.input.val() !== inst.lastVal ) { 21418 try { 21419 date = $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ), 21420 ( inst.input ? inst.input.val() : null ), 21421 $.datepicker._getFormatConfig( inst ) ); 21422 21423 if ( date ) { // only if valid 21424 $.datepicker._setDateFromField( inst ); 21425 $.datepicker._updateAlternate( inst ); 21426 $.datepicker._updateDatepicker( inst ); 21427 } 21428 } catch ( err ) { 21429 } 21430 } 21431 return true; 21432 }, 21433 21434 /* Pop-up the date picker for a given input field. 21435 * If false returned from beforeShow event handler do not show. 21436 * @param input element - the input field attached to the date picker or
vendor: 4,332 bytes, lines 21437-21559
21437 * event - if triggered by focus 21438 */ 21439 _showDatepicker: function( input ) { 21440 input = input.target || input; 21441 if ( input.nodeName.toLowerCase() !== "input" ) { // find from button/image trigger 21442 input = $( "input", input.parentNode )[ 0 ]; 21443 } 21444 21445 if ( $.datepicker._isDisabledDatepicker( input ) || $.datepicker._lastInput === input ) { // already here 21446 return; 21447 } 21448 21449 var inst, beforeShow, beforeShowSettings, isFixed, 21450 offset, showAnim, duration; 21451 21452 inst = $.datepicker._getInst( input ); 21453 if ( $.datepicker._curInst && $.datepicker._curInst !== inst ) { 21454 $.datepicker._curInst.dpDiv.stop( true, true ); 21455 if ( inst && $.datepicker._datepickerShowing ) { 21456 $.datepicker._hideDatepicker( $.datepicker._curInst.input[ 0 ] ); 21457 } 21458 } 21459 21460 beforeShow = $.datepicker._get( inst, "beforeShow" ); 21461 beforeShowSettings = beforeShow ? beforeShow.apply( input, [ input, inst ] ) : {}; 21462 if ( beforeShowSettings === false ) { 21463 return; 21464 } 21465 datepicker_extendRemove( inst.settings, beforeShowSettings ); 21466 21467 inst.lastVal = null; 21468 $.datepicker._lastInput = input; 21469 $.datepicker._setDateFromField( inst ); 21470 21471 if ( $.datepicker._inDialog ) { // hide cursor 21472 input.value = ""; 21473 } 21474 if ( !$.datepicker._pos ) { // position below input 21475 $.datepicker._pos = $.datepicker._findPos( input ); 21476 $.datepicker._pos[ 1 ] += input.offsetHeight; // add the height 21477 } 21478 21479 isFixed = false; 21480 $( input ).parents().each( function() { 21481 isFixed |= $( this ).css( "position" ) === "fixed"; 21482 return !isFixed; 21483 } ); 21484 21485 offset = { left: $.datepicker._pos[ 0 ], top: $.datepicker._pos[ 1 ] }; 21486 $.datepicker._pos = null; 21487 21488 //to avoid flashes on Firefox 21489 inst.dpDiv.empty(); 21490 21491 // determine sizing offscreen 21492 inst.dpDiv.css( { position: "absolute", display: "block", top: "-1000px" } ); 21493 $.datepicker._updateDatepicker( inst ); 21494 21495 // fix width for dynamic number of date pickers 21496 // and adjust position before showing 21497 offset = $.datepicker._checkOffset( inst, offset, isFixed ); 21498 inst.dpDiv.css( { position: ( $.datepicker._inDialog && $.blockUI ? 21499 "static" : ( isFixed ? "fixed" : "absolute" ) ), display: "none", 21500 left: offset.left + "px", top: offset.top + "px" } ); 21501 21502 if ( !inst.inline ) { 21503 showAnim = $.datepicker._get( inst, "showAnim" ); 21504 duration = $.datepicker._get( inst, "duration" ); 21505 inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 ); 21506 $.datepicker._datepickerShowing = true; 21507 21508 if ( $.effects && $.effects.effect[ showAnim ] ) { 21509 inst.dpDiv.show( showAnim, $.datepicker._get( inst, "showOptions" ), duration ); 21510 } else { 21511 inst.dpDiv[ showAnim || "show" ]( showAnim ? duration : null ); 21512 } 21513 21514 if ( $.datepicker._shouldFocusInput( inst ) ) { 21515 inst.input.trigger( "focus" ); 21516 } 21517 21518 $.datepicker._curInst = inst; 21519 } 21520 }, 21521 21522 /* Generate the date picker content. */ 21523 _updateDatepicker: function( inst ) { 21524 this.maxRows = 4; //Reset the max number of rows being displayed (see #7043) 21525 datepicker_instActive = inst; // for delegate hover events 21526 inst.dpDiv.empty().append( this._generateHTML( inst ) ); 21527 this._attachHandlers( inst ); 21528 21529 var origyearshtml, 21530 numMonths = this._getNumberOfMonths( inst ), 21531 cols = numMonths[ 1 ], 21532 width = 17, 21533 activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" ), 21534 onUpdateDatepicker = $.datepicker._get( inst, "onUpdateDatepicker" ); 21535 21536 if ( activeCell.length > 0 ) { 21537 datepicker_handleMouseover.apply( activeCell.get( 0 ) ); 21538 } 21539 21540 inst.dpDiv.removeClass( "ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4" ).width( "" ); 21541 if ( cols > 1 ) { 21542 inst.dpDiv.addClass( "ui-datepicker-multi-" + cols ).css( "width", ( width * cols ) + "em" ); 21543 } 21544 inst.dpDiv[ ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ? "add" : "remove" ) + 21545 "Class" ]( "ui-datepicker-multi" ); 21546 inst.dpDiv[ ( this._get( inst, "isRTL" ) ? "add" : "remove" ) + 21547 "Class" ]( "ui-datepicker-rtl" ); 21548 21549 if ( inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) { 21550 inst.input.trigger( "focus" ); 21551 } 21552 21553 // Deffered render of the years select (to avoid flashes on Firefox) 21554 if ( inst.yearshtml ) { 21555 origyearshtml = inst.yearshtml; 21556 setTimeout( function() { 21557 21558 //assure that inst.yearshtml didn't change. 21559 if ( origyearshtml === inst.yearshtml && inst.yearshtml ) {
vendor: 5,508 bytes, lines 21560-21718
21560 inst.dpDiv.find( "select.ui-datepicker-year" ).first().replaceWith( inst.yearshtml ); 21561 } 21562 origyearshtml = inst.yearshtml = null; 21563 }, 0 ); 21564 } 21565 21566 if ( onUpdateDatepicker ) { 21567 onUpdateDatepicker.apply( ( inst.input ? inst.input[ 0 ] : null ), [ inst ] ); 21568 } 21569 }, 21570 21571 // #6694 - don't focus the input if it's already focused 21572 // this breaks the change event in IE 21573 // Support: IE and jQuery <1.9 21574 _shouldFocusInput: function( inst ) { 21575 return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" ); 21576 }, 21577 21578 /* Check positioning to remain on screen. */ 21579 _checkOffset: function( inst, offset, isFixed ) { 21580 var dpWidth = inst.dpDiv.outerWidth(), 21581 dpHeight = inst.dpDiv.outerHeight(), 21582 inputWidth = inst.input ? inst.input.outerWidth() : 0, 21583 inputHeight = inst.input ? inst.input.outerHeight() : 0, 21584 viewWidth = document.documentElement.clientWidth + ( isFixed ? 0 : $( document ).scrollLeft() ), 21585 viewHeight = document.documentElement.clientHeight + ( isFixed ? 0 : $( document ).scrollTop() ); 21586 21587 offset.left -= ( this._get( inst, "isRTL" ) ? ( dpWidth - inputWidth ) : 0 ); 21588 offset.left -= ( isFixed && offset.left === inst.input.offset().left ) ? $( document ).scrollLeft() : 0; 21589 offset.top -= ( isFixed && offset.top === ( inst.input.offset().top + inputHeight ) ) ? $( document ).scrollTop() : 0; 21590 21591 // Now check if datepicker is showing outside window viewport - move to a better place if so. 21592 offset.left -= Math.min( offset.left, ( offset.left + dpWidth > viewWidth && viewWidth > dpWidth ) ? 21593 Math.abs( offset.left + dpWidth - viewWidth ) : 0 ); 21594 offset.top -= Math.min( offset.top, ( offset.top + dpHeight > viewHeight && viewHeight > dpHeight ) ? 21595 Math.abs( dpHeight + inputHeight ) : 0 ); 21596 21597 return offset; 21598 }, 21599 21600 /* Find an object's position on the screen. */ 21601 _findPos: function( obj ) { 21602 var position, 21603 inst = this._getInst( obj ), 21604 isRTL = this._get( inst, "isRTL" ); 21605 21606 while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.pseudos.hidden( obj ) ) ) { 21607 obj = obj[ isRTL ? "previousSibling" : "nextSibling" ]; 21608 } 21609 21610 position = $( obj ).offset(); 21611 return [ position.left, position.top ]; 21612 }, 21613 21614 /* Hide the date picker from view. 21615 * @param input element - the input field attached to the date picker 21616 */ 21617 _hideDatepicker: function( input ) { 21618 var showAnim, duration, postProcess, onClose, 21619 inst = this._curInst; 21620 21621 if ( !inst || ( input && inst !== $.data( input, "datepicker" ) ) ) { 21622 return; 21623 } 21624 21625 if ( this._datepickerShowing ) { 21626 showAnim = this._get( inst, "showAnim" ); 21627 duration = this._get( inst, "duration" ); 21628 postProcess = function() { 21629 $.datepicker._tidyDialog( inst ); 21630 }; 21631 21632 // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed 21633 if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) { 21634 inst.dpDiv.hide( showAnim, $.datepicker._get( inst, "showOptions" ), duration, postProcess ); 21635 } else { 21636 inst.dpDiv[ ( showAnim === "slideDown" ? "slideUp" : 21637 ( showAnim === "fadeIn" ? "fadeOut" : "hide" ) ) ]( ( showAnim ? duration : null ), postProcess ); 21638 } 21639 21640 if ( !showAnim ) { 21641 postProcess(); 21642 } 21643 this._datepickerShowing = false; 21644 21645 onClose = this._get( inst, "onClose" ); 21646 if ( onClose ) { 21647 onClose.apply( ( inst.input ? inst.input[ 0 ] : null ), [ ( inst.input ? inst.input.val() : "" ), inst ] ); 21648 } 21649 21650 this._lastInput = null; 21651 if ( this._inDialog ) { 21652 this._dialogInput.css( { position: "absolute", left: "0", top: "-100px" } ); 21653 if ( $.blockUI ) { 21654 $.unblockUI(); 21655 $( "body" ).append( this.dpDiv ); 21656 } 21657 } 21658 this._inDialog = false; 21659 } 21660 }, 21661 21662 /* Tidy up after a dialog display. */ 21663 _tidyDialog: function( inst ) { 21664 inst.dpDiv.removeClass( this._dialogClass ).off( ".ui-datepicker-calendar" ); 21665 }, 21666 21667 /* Close date picker if clicked elsewhere. */ 21668 _checkExternalClick: function( event ) { 21669 if ( !$.datepicker._curInst ) { 21670 return; 21671 } 21672 21673 var $target = $( event.target ), 21674 inst = $.datepicker._getInst( $target[ 0 ] ); 21675 21676 if ( ( ( $target[ 0 ].id !== $.datepicker._mainDivId && 21677 $target.parents( "#" + $.datepicker._mainDivId ).length === 0 && 21678 !$target.hasClass( $.datepicker.markerClassName ) && 21679 !$target.closest( "." + $.datepicker._triggerClass ).length && 21680 $.datepicker._datepickerShowing && !( $.datepicker._inDialog && $.blockUI ) ) ) || 21681 ( $target.hasClass( $.datepicker.markerClassName ) && $.datepicker._curInst !== inst ) ) { 21682 $.datepicker._hideDatepicker(); 21683 } 21684 }, 21685 21686 /* Adjust one of the date sub-fields. */ 21687 _adjustDate: function( id, offset, period ) { 21688 var target = $( id ), 21689 inst = this._getInst( target[ 0 ] ); 21690 21691 if ( this._isDisabledDatepicker( target[ 0 ] ) ) { 21692 return; 21693 } 21694 this._adjustInstDate( inst, offset, period ); 21695 this._updateDatepicker( inst ); 21696 }, 21697 21698 /* Action for current link. */ 21699 _gotoToday: function( id ) { 21700 var date, 21701 target = $( id ), 21702 inst = this._getInst( target[ 0 ] ); 21703 21704 if ( this._get( inst, "gotoCurrent" ) && inst.currentDay ) { 21705 inst.selectedDay = inst.currentDay; 21706 inst.drawMonth = inst.selectedMonth = inst.currentMonth; 21707 inst.drawYear = inst.selectedYear = inst.currentYear; 21708 } else { 21709 date = new Date(); 21710 inst.selectedDay = date.getDate(); 21711 inst.drawMonth = inst.selectedMonth = date.getMonth(); 21712 inst.drawYear = inst.selectedYear = date.getFullYear(); 21713 } 21714 this._notifyChange( inst ); 21715 this._adjustDate( target ); 21716 }, 21717 21718 /* Action for selecting a new month/year. */
vendor: 4,615 bytes, lines 21719-21850
21719 _selectMonthYear: function( id, select, period ) { 21720 var target = $( id ), 21721 inst = this._getInst( target[ 0 ] ); 21722 21723 inst[ "selected" + ( period === "M" ? "Month" : "Year" ) ] = 21724 inst[ "draw" + ( period === "M" ? "Month" : "Year" ) ] = 21725 parseInt( select.options[ select.selectedIndex ].value, 10 ); 21726 21727 this._notifyChange( inst ); 21728 this._adjustDate( target ); 21729 }, 21730 21731 /* Action for selecting a day. */ 21732 _selectDay: function( id, month, year, td ) { 21733 var inst, 21734 target = $( id ); 21735 21736 if ( $( td ).hasClass( this._unselectableClass ) || this._isDisabledDatepicker( target[ 0 ] ) ) { 21737 return; 21738 } 21739 21740 inst = this._getInst( target[ 0 ] ); 21741 inst.selectedDay = inst.currentDay = parseInt( $( "a", td ).attr( "data-date" ) ); 21742 inst.selectedMonth = inst.currentMonth = month; 21743 inst.selectedYear = inst.currentYear = year; 21744 this._selectDate( id, this._formatDate( inst, 21745 inst.currentDay, inst.currentMonth, inst.currentYear ) ); 21746 }, 21747 21748 /* Erase the input field and hide the date picker. */ 21749 _clearDate: function( id ) { 21750 var target = $( id ); 21751 this._selectDate( target, "" ); 21752 }, 21753 21754 /* Update the input field with the selected date. */ 21755 _selectDate: function( id, dateStr ) { 21756 var onSelect, 21757 target = $( id ), 21758 inst = this._getInst( target[ 0 ] ); 21759 21760 dateStr = ( dateStr != null ? dateStr : this._formatDate( inst ) ); 21761 if ( inst.input ) { 21762 inst.input.val( dateStr ); 21763 } 21764 this._updateAlternate( inst ); 21765 21766 onSelect = this._get( inst, "onSelect" ); 21767 if ( onSelect ) { 21768 onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] ); // trigger custom callback 21769 } else if ( inst.input ) { 21770 inst.input.trigger( "change" ); // fire the change event 21771 } 21772 21773 if ( inst.inline ) { 21774 this._updateDatepicker( inst ); 21775 } else { 21776 this._hideDatepicker(); 21777 this._lastInput = inst.input[ 0 ]; 21778 if ( typeof( inst.input[ 0 ] ) !== "object" ) { 21779 inst.input.trigger( "focus" ); // restore focus 21780 } 21781 this._lastInput = null; 21782 } 21783 }, 21784 21785 /* Update any alternate field to synchronise with the main field. */ 21786 _updateAlternate: function( inst ) { 21787 var altFormat, date, dateStr, 21788 altField = this._get( inst, "altField" ); 21789 21790 if ( altField ) { // update alternate field too 21791 altFormat = this._get( inst, "altFormat" ) || this._get( inst, "dateFormat" ); 21792 date = this._getDate( inst ); 21793 dateStr = this.formatDate( altFormat, date, this._getFormatConfig( inst ) ); 21794 $( document ).find( altField ).val( dateStr ); 21795 } 21796 }, 21797 21798 /* Set as beforeShowDay function to prevent selection of weekends. 21799 * @param date Date - the date to customise 21800 * @return [boolean, string] - is this date selectable?, what is its CSS class? 21801 */ 21802 noWeekends: function( date ) { 21803 var day = date.getDay(); 21804 return [ ( day > 0 && day < 6 ), "" ]; 21805 }, 21806 21807 /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition. 21808 * @param date Date - the date to get the week for 21809 * @return number - the number of the week within the year that contains this date 21810 */ 21811 iso8601Week: function( date ) { 21812 var time, 21813 checkDate = new Date( date.getTime() ); 21814 21815 // Find Thursday of this week starting on Monday 21816 checkDate.setDate( checkDate.getDate() + 4 - ( checkDate.getDay() || 7 ) ); 21817 21818 time = checkDate.getTime(); 21819 checkDate.setMonth( 0 ); // Compare with Jan 1 21820 checkDate.setDate( 1 ); 21821 return Math.floor( Math.round( ( time - checkDate ) / 86400000 ) / 7 ) + 1; 21822 }, 21823 21824 /* Parse a string value into a date object. 21825 * See formatDate below for the possible formats. 21826 * 21827 * @param format string - the expected format of the date 21828 * @param value string - the date in the above format 21829 * @param settings Object - attributes include: 21830 * shortYearCutoff number - the cutoff year for determining the century (optional) 21831 * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) 21832 * dayNames string[7] - names of the days from Sunday (optional) 21833 * monthNamesShort string[12] - abbreviated names of the months (optional) 21834 * monthNames string[12] - names of the months (optional) 21835 * @return Date - the extracted date value or null if value is blank 21836 */ 21837 parseDate: function( format, value, settings ) { 21838 if ( format == null || value == null ) { 21839 throw "Invalid arguments"; 21840 } 21841 21842 value = ( typeof value === "object" ? value.toString() : value + "" ); 21843 if ( value === "" ) { 21844 return null; 21845 } 21846 21847 var iFormat, dim, extra, 21848 iValue = 0, 21849 shortYearCutoffTemp = ( settings ? settings.shortYearCutoff : null ) || this._defaults.shortYearCutoff, 21850 shortYearCutoff = ( typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp
vendor: 5,431 bytes, lines 21850-22040
21850: 21851 new Date().getFullYear() % 100 + parseInt( shortYearCutoffTemp, 10 ) ), 21852 dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort, 21853 dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames, 21854 monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort, 21855 monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames, 21856 year = -1, 21857 month = -1, 21858 day = -1, 21859 doy = -1, 21860 literal = false, 21861 date, 21862 21863 // Check whether a format character is doubled 21864 lookAhead = function( match ) { 21865 var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match ); 21866 if ( matches ) { 21867 iFormat++; 21868 } 21869 return matches; 21870 }, 21871 21872 // Extract a number from the string value 21873 getNumber = function( match ) { 21874 var isDoubled = lookAhead( match ), 21875 size = ( match === "@" ? 14 : ( match === "!" ? 20 : 21876 ( match === "y" && isDoubled ? 4 : ( match === "o" ? 3 : 2 ) ) ) ), 21877 minSize = ( match === "y" ? size : 1 ), 21878 digits = new RegExp( "^\\d{" + minSize + "," + size + "}" ), 21879 num = value.substring( iValue ).match( digits ); 21880 if ( !num ) { 21881 throw "Missing number at position " + iValue; 21882 } 21883 iValue += num[ 0 ].length; 21884 return parseInt( num[ 0 ], 10 ); 21885 }, 21886 21887 // Extract a name from the string value and convert to an index 21888 getName = function( match, shortNames, longNames ) { 21889 var index = -1, 21890 names = $.map( lookAhead( match ) ? longNames : shortNames, function( v, k ) { 21891 return [ [ k, v ] ]; 21892 } ).sort( function( a, b ) { 21893 return -( a[ 1 ].length - b[ 1 ].length ); 21894 } ); 21895 21896 $.each( names, function( i, pair ) { 21897 var name = pair[ 1 ]; 21898 if ( value.substr( iValue, name.length ).toLowerCase() === name.toLowerCase() ) { 21899 index = pair[ 0 ]; 21900 iValue += name.length; 21901 return false; 21902 } 21903 } ); 21904 if ( index !== -1 ) { 21905 return index + 1; 21906 } else { 21907 throw "Unknown name at position " + iValue; 21908 } 21909 }, 21910 21911 // Confirm that a literal character matches the string value 21912 checkLiteral = function() { 21913 if ( value.charAt( iValue ) !== format.charAt( iFormat ) ) { 21914 throw "Unexpected literal at position " + iValue; 21915 } 21916 iValue++; 21917 }; 21918 21919 for ( iFormat = 0; iFormat < format.length; iFormat++ ) { 21920 if ( literal ) { 21921 if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) { 21922 literal = false; 21923 } else { 21924 checkLiteral(); 21925 } 21926 } else { 21927 switch ( format.charAt( iFormat ) ) { 21928 case "d": 21929 day = getNumber( "d" ); 21930 break; 21931 case "D": 21932 getName( "D", dayNamesShort, dayNames ); 21933 break; 21934 case "o": 21935 doy = getNumber( "o" ); 21936 break; 21937 case "m": 21938 month = getNumber( "m" ); 21939 break; 21940 case "M": 21941 month = getName( "M", monthNamesShort, monthNames ); 21942 break; 21943 case "y": 21944 year = getNumber( "y" ); 21945 break; 21946 case "@": 21947 date = new Date( getNumber( "@" ) ); 21948 year = date.getFullYear(); 21949 month = date.getMonth() + 1; 21950 day = date.getDate(); 21951 break; 21952 case "!": 21953 date = new Date( ( getNumber( "!" ) - this._ticksTo1970 ) / 10000 ); 21954 year = date.getFullYear(); 21955 month = date.getMonth() + 1; 21956 day = date.getDate(); 21957 break; 21958 case "'": 21959 if ( lookAhead( "'" ) ) { 21960 checkLiteral(); 21961 } else { 21962 literal = true; 21963 } 21964 break; 21965 default: 21966 checkLiteral(); 21967 } 21968 } 21969 } 21970 21971 if ( iValue < value.length ) { 21972 extra = value.substr( iValue ); 21973 if ( !/^\s+/.test( extra ) ) { 21974 throw "Extra/unparsed characters found in date: " + extra; 21975 } 21976 } 21977 21978 if ( year === -1 ) { 21979 year = new Date().getFullYear(); 21980 } else if ( year < 100 ) { 21981 year += new Date().getFullYear() - new Date().getFullYear() % 100 + 21982 ( year <= shortYearCutoff ? 0 : -100 ); 21983 } 21984 21985 if ( doy > -1 ) { 21986 month = 1; 21987 day = doy; 21988 do { 21989 dim = this._getDaysInMonth( year, month - 1 ); 21990 if ( day <= dim ) { 21991 break; 21992 } 21993 month++; 21994 day -= dim; 21995 } while ( true ); 21996 } 21997 21998 date = this._daylightSavingAdjust( new Date( year, month - 1, day ) ); 21999 if ( date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day ) { 22000 throw "Invalid date"; // E.g. 31/02/00 22001 } 22002 return date; 22003 }, 22004 22005 /* Standard date formats. */ 22006 ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601) 22007 COOKIE: "D, dd M yy", 22008 ISO_8601: "yy-mm-dd", 22009 RFC_822: "D, d M y", 22010 RFC_850: "DD, dd-M-y", 22011 RFC_1036: "D, d M y", 22012 RFC_1123: "D, d M yy", 22013 RFC_2822: "D, d M yy", 22014 RSS: "D, d M y", // RFC 822 22015 TICKS: "!", 22016 TIMESTAMP: "@", 22017 W3C: "yy-mm-dd", // ISO 8601 22018 22019 _ticksTo1970: ( ( ( 1970 - 1 ) * 365 + Math.floor( 1970 / 4 ) - Math.floor( 1970 / 100 ) + 22020 Math.floor( 1970 / 400 ) ) * 24 * 60 * 60 * 10000000 ), 22021 22022 /* Format a date object into a string value. 22023 * The format can be combinations of the following: 22024 * d - day of month (no leading zero) 22025 * dd - day of month (two digit) 22026 * o - day of year (no leading zeros) 22027 * oo - day of year (three digit) 22028 * D - day name short 22029 * DD - day name long 22030 * m - month of year (no leading zero) 22031 * mm - month of year (two digit) 22032 * M - month name short 22033 * MM - month name long 22034 * y - year (two digit) 22035 * yy - year (four digit) 22036 * @ - Unix timestamp (ms since 01/01/1970) 22037 * ! - Windows ticks (100ns since 01/01/0001) 22038 * "..." - literal text 22039 * '' - single quote 22040 *
vendor: 6,198 bytes, lines 22041-22240
22041 * @param format string - the desired format of the date 22042 * @param date Date - the date value to format 22043 * @param settings Object - attributes include: 22044 * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) 22045 * dayNames string[7] - names of the days from Sunday (optional) 22046 * monthNamesShort string[12] - abbreviated names of the months (optional) 22047 * monthNames string[12] - names of the months (optional) 22048 * @return string - the date in the above format 22049 */ 22050 formatDate: function( format, date, settings ) { 22051 if ( !date ) { 22052 return ""; 22053 } 22054 22055 var iFormat, 22056 dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort, 22057 dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames, 22058 monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort, 22059 monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames, 22060 22061 // Check whether a format character is doubled 22062 lookAhead = function( match ) { 22063 var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match ); 22064 if ( matches ) { 22065 iFormat++; 22066 } 22067 return matches; 22068 }, 22069 22070 // Format a number, with leading zero if necessary 22071 formatNumber = function( match, value, len ) { 22072 var num = "" + value; 22073 if ( lookAhead( match ) ) { 22074 while ( num.length < len ) { 22075 num = "0" + num; 22076 } 22077 } 22078 return num; 22079 }, 22080 22081 // Format a name, short or long as requested 22082 formatName = function( match, value, shortNames, longNames ) { 22083 return ( lookAhead( match ) ? longNames[ value ] : shortNames[ value ] ); 22084 }, 22085 output = "", 22086 literal = false; 22087 22088 if ( date ) { 22089 for ( iFormat = 0; iFormat < format.length; iFormat++ ) { 22090 if ( literal ) { 22091 if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) { 22092 literal = false; 22093 } else { 22094 output += format.charAt( iFormat ); 22095 } 22096 } else { 22097 switch ( format.charAt( iFormat ) ) { 22098 case "d": 22099 output += formatNumber( "d", date.getDate(), 2 ); 22100 break; 22101 case "D": 22102 output += formatName( "D", date.getDay(), dayNamesShort, dayNames ); 22103 break; 22104 case "o": 22105 output += formatNumber( "o", 22106 Math.round( ( new Date( date.getFullYear(), date.getMonth(), date.getDate() ).getTime() - new Date( date.getFullYear(), 0, 0 ).getTime() ) / 86400000 ), 3 ); 22107 break; 22108 case "m": 22109 output += formatNumber( "m", date.getMonth() + 1, 2 ); 22110 break; 22111 case "M": 22112 output += formatName( "M", date.getMonth(), monthNamesShort, monthNames ); 22113 break; 22114 case "y": 22115 output += ( lookAhead( "y" ) ? date.getFullYear() : 22116 ( date.getFullYear() % 100 < 10 ? "0" : "" ) + date.getFullYear() % 100 ); 22117 break; 22118 case "@": 22119 output += date.getTime(); 22120 break; 22121 case "!": 22122 output += date.getTime() * 10000 + this._ticksTo1970; 22123 break; 22124 case "'": 22125 if ( lookAhead( "'" ) ) { 22126 output += "'"; 22127 } else { 22128 literal = true; 22129 } 22130 break; 22131 default: 22132 output += format.charAt( iFormat ); 22133 } 22134 } 22135 } 22136 } 22137 return output; 22138 }, 22139 22140 /* Extract all possible characters from the date format. */ 22141 _possibleChars: function( format ) { 22142 var iFormat, 22143 chars = "", 22144 literal = false, 22145 22146 // Check whether a format character is doubled 22147 lookAhead = function( match ) { 22148 var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match ); 22149 if ( matches ) { 22150 iFormat++; 22151 } 22152 return matches; 22153 }; 22154 22155 for ( iFormat = 0; iFormat < format.length; iFormat++ ) { 22156 if ( literal ) { 22157 if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) { 22158 literal = false; 22159 } else { 22160 chars += format.charAt( iFormat ); 22161 } 22162 } else { 22163 switch ( format.charAt( iFormat ) ) { 22164 case "d": case "m": case "y": case "@": 22165 chars += "0123456789"; 22166 break; 22167 case "D": case "M": 22168 return null; // Accept anything 22169 case "'": 22170 if ( lookAhead( "'" ) ) { 22171 chars += "'"; 22172 } else { 22173 literal = true; 22174 } 22175 break; 22176 default: 22177 chars += format.charAt( iFormat ); 22178 } 22179 } 22180 } 22181 return chars; 22182 }, 22183 22184 /* Get a setting value, defaulting if necessary. */ 22185 _get: function( inst, name ) { 22186 return inst.settings[ name ] !== undefined ? 22187 inst.settings[ name ] : this._defaults[ name ]; 22188 }, 22189 22190 /* Parse existing date and initialise date picker. */ 22191 _setDateFromField: function( inst, noDefault ) { 22192 if ( inst.input.val() === inst.lastVal ) { 22193 return; 22194 } 22195 22196 var dateFormat = this._get( inst, "dateFormat" ), 22197 dates = inst.lastVal = inst.input ? inst.input.val() : null, 22198 defaultDate = this._getDefaultDate( inst ), 22199 date = defaultDate, 22200 settings = this._getFormatConfig( inst ); 22201 22202 try { 22203 date = this.parseDate( dateFormat, dates, settings ) || defaultDate; 22204 } catch ( event ) { 22205 dates = ( noDefault ? "" : dates ); 22206 } 22207 inst.selectedDay = date.getDate(); 22208 inst.drawMonth = inst.selectedMonth = date.getMonth(); 22209 inst.drawYear = inst.selectedYear = date.getFullYear(); 22210 inst.currentDay = ( dates ? date.getDate() : 0 ); 22211 inst.currentMonth = ( dates ? date.getMonth() : 0 ); 22212 inst.currentYear = ( dates ? date.getFullYear() : 0 ); 22213 this._adjustInstDate( inst ); 22214 }, 22215 22216 /* Retrieve the default date shown on opening. */ 22217 _getDefaultDate: function( inst ) { 22218 return this._restrictMinMax( inst, 22219 this._determineDate( inst, this._get( inst, "defaultDate" ), new Date() ) ); 22220 }, 22221 22222 /* A date may be specified as an exact value or a relative one. */ 22223 _determineDate: function( inst, date, defaultDate ) { 22224 var offsetNumeric = function( offset ) { 22225 var date = new Date(); 22226 date.setDate( date.getDate() + offset ); 22227 return date; 22228 }, 22229 offsetString = function( offset ) { 22230 try { 22231 return $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ), 22232 offset, $.datepicker._getFormatConfig( inst ) ); 22233 } catch ( e ) { 22234 22235 // Ignore 22236 } 22237 22238 var date = ( offset.toLowerCase().match( /^c/ ) ? 22239 $.datepicker._getDate( inst ) : null ) || new Date(), 22240 year = date.getFullYear(),
vendor: 5,359 bytes, lines 22241-22379
22241 month = date.getMonth(), 22242 day = date.getDate(), 22243 pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, 22244 matches = pattern.exec( offset ); 22245 22246 while ( matches ) { 22247 switch ( matches[ 2 ] || "d" ) { 22248 case "d" : case "D" : 22249 day += parseInt( matches[ 1 ], 10 ); break; 22250 case "w" : case "W" : 22251 day += parseInt( matches[ 1 ], 10 ) * 7; break; 22252 case "m" : case "M" : 22253 month += parseInt( matches[ 1 ], 10 ); 22254 day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) ); 22255 break; 22256 case "y": case "Y" : 22257 year += parseInt( matches[ 1 ], 10 ); 22258 day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) ); 22259 break; 22260 } 22261 matches = pattern.exec( offset ); 22262 } 22263 return new Date( year, month, day ); 22264 }, 22265 newDate = ( date == null || date === "" ? defaultDate : ( typeof date === "string" ? offsetString( date ) : 22266 ( typeof date === "number" ? ( isNaN( date ) ? defaultDate : offsetNumeric( date ) ) : new Date( date.getTime() ) ) ) ); 22267 22268 newDate = ( newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate ); 22269 if ( newDate ) { 22270 newDate.setHours( 0 ); 22271 newDate.setMinutes( 0 ); 22272 newDate.setSeconds( 0 ); 22273 newDate.setMilliseconds( 0 ); 22274 } 22275 return this._daylightSavingAdjust( newDate ); 22276 }, 22277 22278 /* Handle switch to/from daylight saving. 22279 * Hours may be non-zero on daylight saving cut-over: 22280 * > 12 when midnight changeover, but then cannot generate 22281 * midnight datetime, so jump to 1AM, otherwise reset. 22282 * @param date (Date) the date to check 22283 * @return (Date) the corrected date 22284 */ 22285 _daylightSavingAdjust: function( date ) { 22286 if ( !date ) { 22287 return null; 22288 } 22289 date.setHours( date.getHours() > 12 ? date.getHours() + 2 : 0 ); 22290 return date; 22291 }, 22292 22293 /* Set the date(s) directly. */ 22294 _setDate: function( inst, date, noChange ) { 22295 var clear = !date, 22296 origMonth = inst.selectedMonth, 22297 origYear = inst.selectedYear, 22298 newDate = this._restrictMinMax( inst, this._determineDate( inst, date, new Date() ) ); 22299 22300 inst.selectedDay = inst.currentDay = newDate.getDate(); 22301 inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth(); 22302 inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear(); 22303 if ( ( origMonth !== inst.selectedMonth || origYear !== inst.selectedYear ) && !noChange ) { 22304 this._notifyChange( inst ); 22305 } 22306 this._adjustInstDate( inst ); 22307 if ( inst.input ) { 22308 inst.input.val( clear ? "" : this._formatDate( inst ) ); 22309 } 22310 }, 22311 22312 /* Retrieve the date(s) directly. */ 22313 _getDate: function( inst ) { 22314 var startDate = ( !inst.currentYear || ( inst.input && inst.input.val() === "" ) ? null : 22315 this._daylightSavingAdjust( new Date( 22316 inst.currentYear, inst.currentMonth, inst.currentDay ) ) ); 22317 return startDate; 22318 }, 22319 22320 /* Attach the onxxx handlers. These are declared statically so 22321 * they work with static code transformers like Caja. 22322 */ 22323 _attachHandlers: function( inst ) { 22324 var stepMonths = this._get( inst, "stepMonths" ), 22325 id = "#" + inst.id.replace( /\\\\/g, "\\" ); 22326 inst.dpDiv.find( "[data-handler]" ).map( function() { 22327 var handler = { 22328 prev: function() { 22329 $.datepicker._adjustDate( id, -stepMonths, "M" ); 22330 }, 22331 next: function() { 22332 $.datepicker._adjustDate( id, +stepMonths, "M" ); 22333 }, 22334 hide: function() { 22335 $.datepicker._hideDatepicker(); 22336 }, 22337 today: function() { 22338 $.datepicker._gotoToday( id ); 22339 }, 22340 selectDay: function() { 22341 $.datepicker._selectDay( id, +this.getAttribute( "data-month" ), +this.getAttribute( "data-year" ), this ); 22342 return false; 22343 }, 22344 selectMonth: function() { 22345 $.datepicker._selectMonthYear( id, this, "M" ); 22346 return false; 22347 }, 22348 selectYear: function() { 22349 $.datepicker._selectMonthYear( id, this, "Y" ); 22350 return false; 22351 } 22352 }; 22353 $( this ).on( this.getAttribute( "data-event" ), handler[ this.getAttribute( "data-handler" ) ] ); 22354 } ); 22355 }, 22356 22357 /* Generate the HTML for the current state of the date picker. */ 22358 _generateHTML: function( inst ) { 22359 var maxDraw, prevText, prev, nextText, next, currentText, gotoDate, 22360 controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin, 22361 monthNames, monthNamesShort, beforeShowDay, showOtherMonths, 22362 selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate, 22363 cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows, 22364 printDate, dRow, tbody, daySettings, otherMonth, unselectable, 22365 tempDate = new Date(), 22366 today = this._daylightSavingAdjust( 22367 new Date( tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate() ) ), // clear time 22368 isRTL = this._get( inst, "isRTL" ), 22369 showButtonPanel = this._get( inst, "showButtonPanel" ), 22370 hideIfNoPrevNext = this._get( inst, "hideIfNoPrevNext" ), 22371 navigationAsDateFormat = this._get( inst, "navigationAsDateFormat" ), 22372 numMonths = this._getNumberOfMonths( inst ), 22373 showCurrentAtPos = this._get( inst, "showCurrentAtPos" ), 22374 stepMonths = this._get( inst, "stepMonths" ), 22375 isMultiMonth = ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ), 22376 currentDate = this._daylightSavingAdjust( ( !inst.currentDay ? new Date( 9999, 9, 9 ) : 22377 new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) ), 22378 minDate = this._getMinMaxDate( inst, "min" ), 22379 maxDate = this._getMinMaxDate( inst, "max" ),
vendor: 21,257 bytes, lines 22380-22894
22380 drawMonth = inst.drawMonth - showCurrentAtPos, 22381 drawYear = inst.drawYear; 22382 22383 if ( drawMonth < 0 ) { 22384 drawMonth += 12; 22385 drawYear--; 22386 } 22387 if ( maxDate ) { 22388 maxDraw = this._daylightSavingAdjust( new Date( maxDate.getFullYear(), 22389 maxDate.getMonth() - ( numMonths[ 0 ] * numMonths[ 1 ] ) + 1, maxDate.getDate() ) ); 22390 maxDraw = ( minDate && maxDraw < minDate ? minDate : maxDraw ); 22391 while ( this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 ) ) > maxDraw ) { 22392 drawMonth--; 22393 if ( drawMonth < 0 ) { 22394 drawMonth = 11; 22395 drawYear--; 22396 } 22397 } 22398 } 22399 inst.drawMonth = drawMonth; 22400 inst.drawYear = drawYear; 22401 22402 prevText = this._get( inst, "prevText" ); 22403 prevText = ( !navigationAsDateFormat ? prevText : this.formatDate( prevText, 22404 this._daylightSavingAdjust( new Date( drawYear, drawMonth - stepMonths, 1 ) ), 22405 this._getFormatConfig( inst ) ) ); 22406 22407 if ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ) { 22408 prev = $( "<a>" ) 22409 .attr( { 22410 "class": "ui-datepicker-prev ui-corner-all", 22411 "data-handler": "prev", 22412 "data-event": "click", 22413 title: prevText 22414 } ) 22415 .append( 22416 $( "<span>" ) 22417 .addClass( "ui-icon ui-icon-circle-triangle-" + 22418 ( isRTL ? "e" : "w" ) ) 22419 .text( prevText ) 22420 )[ 0 ].outerHTML; 22421 } else if ( hideIfNoPrevNext ) { 22422 prev = ""; 22423 } else { 22424 prev = $( "<a>" ) 22425 .attr( { 22426 "class": "ui-datepicker-prev ui-corner-all ui-state-disabled", 22427 title: prevText 22428 } ) 22429 .append( 22430 $( "<span>" ) 22431 .addClass( "ui-icon ui-icon-circle-triangle-" + 22432 ( isRTL ? "e" : "w" ) ) 22433 .text( prevText ) 22434 )[ 0 ].outerHTML; 22435 } 22436 22437 nextText = this._get( inst, "nextText" ); 22438 nextText = ( !navigationAsDateFormat ? nextText : this.formatDate( nextText, 22439 this._daylightSavingAdjust( new Date( drawYear, drawMonth + stepMonths, 1 ) ), 22440 this._getFormatConfig( inst ) ) ); 22441 22442 if ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ) { 22443 next = $( "<a>" ) 22444 .attr( { 22445 "class": "ui-datepicker-next ui-corner-all", 22446 "data-handler": "next", 22447 "data-event": "click", 22448 title: nextText 22449 } ) 22450 .append( 22451 $( "<span>" ) 22452 .addClass( "ui-icon ui-icon-circle-triangle-" + 22453 ( isRTL ? "w" : "e" ) ) 22454 .text( nextText ) 22455 )[ 0 ].outerHTML; 22456 } else if ( hideIfNoPrevNext ) { 22457 next = ""; 22458 } else { 22459 next = $( "<a>" ) 22460 .attr( { 22461 "class": "ui-datepicker-next ui-corner-all ui-state-disabled", 22462 title: nextText 22463 } ) 22464 .append( 22465 $( "<span>" ) 22466 .attr( "class", "ui-icon ui-icon-circle-triangle-" + 22467 ( isRTL ? "w" : "e" ) ) 22468 .text( nextText ) 22469 )[ 0 ].outerHTML; 22470 } 22471 22472 currentText = this._get( inst, "currentText" ); 22473 gotoDate = ( this._get( inst, "gotoCurrent" ) && inst.currentDay ? currentDate : today ); 22474 currentText = ( !navigationAsDateFormat ? currentText : 22475 this.formatDate( currentText, gotoDate, this._getFormatConfig( inst ) ) ); 22476 22477 controls = ""; 22478 if ( !inst.inline ) { 22479 controls = $( "<button>" ) 22480 .attr( { 22481 type: "button", 22482 "class": "ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all", 22483 "data-handler": "hide", 22484 "data-event": "click" 22485 } ) 22486 .text( this._get( inst, "closeText" ) )[ 0 ].outerHTML; 22487 } 22488 22489 buttonPanel = ""; 22490 if ( showButtonPanel ) { 22491 buttonPanel = $( "<div class='ui-datepicker-buttonpane ui-widget-content'>" ) 22492 .append( isRTL ? controls : "" ) 22493 .append( this._isInRange( inst, gotoDate ) ? 22494 $( "<button>" ) 22495 .attr( { 22496 type: "button", 22497 "class": "ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all", 22498 "data-handler": "today", 22499 "data-event": "click" 22500 } ) 22501 .text( currentText ) : 22502 "" ) 22503 .append( isRTL ? "" : controls )[ 0 ].outerHTML; 22504 } 22505 22506 firstDay = parseInt( this._get( inst, "firstDay" ), 10 ); 22507 firstDay = ( isNaN( firstDay ) ? 0 : firstDay ); 22508 22509 showWeek = this._get( inst, "showWeek" ); 22510 dayNames = this._get( inst, "dayNames" ); 22511 dayNamesMin = this._get( inst, "dayNamesMin" ); 22512 monthNames = this._get( inst, "monthNames" ); 22513 monthNamesShort = this._get( inst, "monthNamesShort" ); 22514 beforeShowDay = this._get( inst, "beforeShowDay" ); 22515 showOtherMonths = this._get( inst, "showOtherMonths" ); 22516 selectOtherMonths = this._get( inst, "selectOtherMonths" ); 22517 defaultDate = this._getDefaultDate( inst ); 22518 html = ""; 22519 22520 for ( row = 0; row < numMonths[ 0 ]; row++ ) { 22521 group = ""; 22522 this.maxRows = 4; 22523 for ( col = 0; col < numMonths[ 1 ]; col++ ) { 22524 selectedDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, inst.selectedDay ) ); 22525 cornerClass = " ui-corner-all"; 22526 calender = ""; 22527 if ( isMultiMonth ) { 22528 calender += "<div class='ui-datepicker-group"; 22529 if ( numMonths[ 1 ] > 1 ) { 22530 switch ( col ) { 22531 case 0: calender += " ui-datepicker-group-first"; 22532 cornerClass = " ui-corner-" + ( isRTL ? "right" : "left" ); break; 22533 case numMonths[ 1 ] - 1: calender += " ui-datepicker-group-last"; 22534 cornerClass = " ui-corner-" + ( isRTL ? "left" : "right" ); break; 22535 default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break; 22536 } 22537 } 22538 calender += "'>"; 22539 } 22540 calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" + 22541 ( /all|left/.test( cornerClass ) && row === 0 ? ( isRTL ? next : prev ) : "" ) + 22542 ( /all|right/.test( cornerClass ) && row === 0 ? ( isRTL ? prev : next ) : "" ) + 22543 this._generateMonthYearHeader( inst, drawMonth, drawYear, minDate, maxDate, 22544 row > 0 || col > 0, monthNames, monthNamesShort ) + // draw month headers 22545 "</div><table class='ui-datepicker-calendar'><thead>" + 22546 "<tr>"; 22547 thead = ( showWeek ? "<th class='ui-datepicker-week-col'>" + this._get( inst, "weekHeader" ) + "</th>" : "" ); 22548 for ( dow = 0; dow < 7; dow++ ) { // days of the week 22549 day = ( dow + firstDay ) % 7; 22550 thead += "<th scope='col'" + ( ( dow + firstDay + 6 ) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "" ) + ">" + 22551 "<span title='" + dayNames[ day ] + "'>" + dayNamesMin[ day ] + "</span></th>"; 22552 } 22553 calender += thead + "</tr></thead><tbody>"; 22554 daysInMonth = this._getDaysInMonth( drawYear, drawMonth ); 22555 if ( drawYear === inst.selectedYear && drawMonth === inst.selectedMonth ) { 22556 inst.selectedDay = Math.min( inst.selectedDay, daysInMonth ); 22557 } 22558 leadDays = ( this._getFirstDayOfMonth( drawYear, drawMonth ) - firstDay + 7 ) % 7; 22559 curRows = Math.ceil( ( leadDays + daysInMonth ) / 7 ); // calculate the number of rows to generate 22560 numRows = ( isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows ); //If multiple months, use the higher number of rows (see #7043) 22561 this.maxRows = numRows; 22562 printDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 - leadDays ) ); 22563 for ( dRow = 0; dRow < numRows; dRow++ ) { // create date picker rows 22564 calender += "<tr>"; 22565 tbody = ( !showWeek ? "" : "<td class='ui-datepicker-week-col'>" + 22566 this._get( inst, "calculateWeek" )( printDate ) + "</td>" ); 22567 for ( dow = 0; dow < 7; dow++ ) { // create date picker days 22568 daySettings = ( beforeShowDay ? 22569 beforeShowDay.apply( ( inst.input ? inst.input[ 0 ] : null ), [ printDate ] ) : [ true, "" ] ); 22570 otherMonth = ( printDate.getMonth() !== drawMonth ); 22571 unselectable = ( otherMonth && !selectOtherMonths ) || !daySettings[ 0 ] || 22572 ( minDate && printDate < minDate ) || ( maxDate && printDate > maxDate ); 22573 tbody += "<td class='" + 22574 ( ( dow + firstDay + 6 ) % 7 >= 5 ? " ui-datepicker-week-end" : "" ) + // highlight weekends 22575 ( otherMonth ? " ui-datepicker-other-month" : "" ) + // highlight days from other months 22576 ( ( printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent ) || // user pressed key 22577 ( defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime() ) ? 22578 22579 // or defaultDate is current printedDate and defaultDate is selectedDate 22580 " " + this._dayOverClass : "" ) + // highlight selected day 22581 ( unselectable ? " " + this._unselectableClass + " ui-state-disabled" : "" ) + // highlight unselectable days 22582 ( otherMonth && !showOtherMonths ? "" : " " + daySettings[ 1 ] + // highlight custom dates 22583 ( printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "" ) + // highlight selected day 22584 ( printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "" ) ) + "'" + // highlight today (if different) 22585 ( ( !otherMonth || showOtherMonths ) && daySettings[ 2 ] ? " title='" + daySettings[ 2 ].replace( /'/g, "'" ) + "'" : "" ) + // cell title 22586 ( unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'" ) + ">" + // actions 22587 ( otherMonth && !showOtherMonths ? " " : // display for other months 22588 ( unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" + 22589 ( printDate.getTime() === today.getTime() ? " ui-state-highlight" : "" ) + 22590 ( printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "" ) + // highlight selected day 22591 ( otherMonth ? " ui-priority-secondary" : "" ) + // distinguish dates from other months 22592 "' href='#' aria-current='" + ( printDate.getTime() === currentDate.getTime() ? "true" : "false" ) + // mark date as selected for screen reader 22593 "' data-date='" + printDate.getDate() + // store date as data 22594 "'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date 22595 printDate.setDate( printDate.getDate() + 1 ); 22596 printDate = this._daylightSavingAdjust( printDate ); 22597 } 22598 calender += tbody + "</tr>"; 22599 } 22600 drawMonth++; 22601 if ( drawMonth > 11 ) { 22602 drawMonth = 0; 22603 drawYear++; 22604 } 22605 calender += "</tbody></table>" + ( isMultiMonth ? "</div>" + 22606 ( ( numMonths[ 0 ] > 0 && col === numMonths[ 1 ] - 1 ) ? "<div class='ui-datepicker-row-break'></div>" : "" ) : "" ); 22607 group += calender; 22608 } 22609 html += group; 22610 } 22611 html += buttonPanel; 22612 inst._keyEvent = false; 22613 return html; 22614 }, 22615 22616 /* Generate the month and year header. */ 22617 _generateMonthYearHeader: function( inst, drawMonth, drawYear, minDate, maxDate, 22618 secondary, monthNames, monthNamesShort ) { 22619 22620 var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear, 22621 changeMonth = this._get( inst, "changeMonth" ), 22622 changeYear = this._get( inst, "changeYear" ), 22623 showMonthAfterYear = this._get( inst, "showMonthAfterYear" ), 22624 selectMonthLabel = this._get( inst, "selectMonthLabel" ), 22625 selectYearLabel = this._get( inst, "selectYearLabel" ), 22626 html = "<div class='ui-datepicker-title'>", 22627 monthHtml = ""; 22628 22629 // Month selection 22630 if ( secondary || !changeMonth ) { 22631 monthHtml += "<span class='ui-datepicker-month'>" + monthNames[ drawMonth ] + "</span>"; 22632 } else { 22633 inMinYear = ( minDate && minDate.getFullYear() === drawYear ); 22634 inMaxYear = ( maxDate && maxDate.getFullYear() === drawYear ); 22635 monthHtml += "<select class='ui-datepicker-month' aria-label='" + selectMonthLabel + "' data-handler='selectMonth' data-event='change'>"; 22636 for ( month = 0; month < 12; month++ ) { 22637 if ( ( !inMinYear || month >= minDate.getMonth() ) && ( !inMaxYear || month <= maxDate.getMonth() ) ) { 22638 monthHtml += "<option value='" + month + "'" + 22639 ( month === drawMonth ? " selected='selected'" : "" ) + 22640 ">" + monthNamesShort[ month ] + "</option>"; 22641 } 22642 } 22643 monthHtml += "</select>"; 22644 } 22645 22646 if ( !showMonthAfterYear ) { 22647 html += monthHtml + ( secondary || !( changeMonth && changeYear ) ? " " : "" ); 22648 } 22649 22650 // Year selection 22651 if ( !inst.yearshtml ) { 22652 inst.yearshtml = ""; 22653 if ( secondary || !changeYear ) { 22654 html += "<span class='ui-datepicker-year'>" + drawYear + "</span>"; 22655 } else { 22656 22657 // determine range of years to display 22658 years = this._get( inst, "yearRange" ).split( ":" ); 22659 thisYear = new Date().getFullYear(); 22660 determineYear = function( value ) { 22661 var year = ( value.match( /c[+\-].*/ ) ? drawYear + parseInt( value.substring( 1 ), 10 ) : 22662 ( value.match( /[+\-].*/ ) ? thisYear + parseInt( value, 10 ) : 22663 parseInt( value, 10 ) ) ); 22664 return ( isNaN( year ) ? thisYear : year ); 22665 }; 22666 year = determineYear( years[ 0 ] ); 22667 endYear = Math.max( year, determineYear( years[ 1 ] || "" ) ); 22668 year = ( minDate ? Math.max( year, minDate.getFullYear() ) : year ); 22669 endYear = ( maxDate ? Math.min( endYear, maxDate.getFullYear() ) : endYear ); 22670 inst.yearshtml += "<select class='ui-datepicker-year' aria-label='" + selectYearLabel + "' data-handler='selectYear' data-event='change'>"; 22671 for ( ; year <= endYear; year++ ) { 22672 inst.yearshtml += "<option value='" + year + "'" + 22673 ( year === drawYear ? " selected='selected'" : "" ) + 22674 ">" + year + "</option>"; 22675 } 22676 inst.yearshtml += "</select>"; 22677 22678 html += inst.yearshtml; 22679 inst.yearshtml = null; 22680 } 22681 } 22682 22683 html += this._get( inst, "yearSuffix" ); 22684 if ( showMonthAfterYear ) { 22685 html += ( secondary || !( changeMonth && changeYear ) ? " " : "" ) + monthHtml; 22686 } 22687 html += "</div>"; // Close datepicker_header 22688 return html; 22689 }, 22690 22691 /* Adjust one of the date sub-fields. */ 22692 _adjustInstDate: function( inst, offset, period ) { 22693 var year = inst.selectedYear + ( period === "Y" ? offset : 0 ), 22694 month = inst.selectedMonth + ( period === "M" ? offset : 0 ), 22695 day = Math.min( inst.selectedDay, this._getDaysInMonth( year, month ) ) + ( period === "D" ? offset : 0 ), 22696 date = this._restrictMinMax( inst, this._daylightSavingAdjust( new Date( year, month, day ) ) ); 22697 22698 inst.selectedDay = date.getDate(); 22699 inst.drawMonth = inst.selectedMonth = date.getMonth(); 22700 inst.drawYear = inst.selectedYear = date.getFullYear(); 22701 if ( period === "M" || period === "Y" ) { 22702 this._notifyChange( inst ); 22703 } 22704 }, 22705 22706 /* Ensure a date is within any min/max bounds. */ 22707 _restrictMinMax: function( inst, date ) { 22708 var minDate = this._getMinMaxDate( inst, "min" ), 22709 maxDate = this._getMinMaxDate( inst, "max" ), 22710 newDate = ( minDate && date < minDate ? minDate : date ); 22711 return ( maxDate && newDate > maxDate ? maxDate : newDate ); 22712 }, 22713 22714 /* Notify change of month/year. */ 22715 _notifyChange: function( inst ) { 22716 var onChange = this._get( inst, "onChangeMonthYear" ); 22717 if ( onChange ) { 22718 onChange.apply( ( inst.input ? inst.input[ 0 ] : null ), 22719 [ inst.selectedYear, inst.selectedMonth + 1, inst ] ); 22720 } 22721 }, 22722 22723 /* Determine the number of months to show. */ 22724 _getNumberOfMonths: function( inst ) { 22725 var numMonths = this._get( inst, "numberOfMonths" ); 22726 return ( numMonths == null ? [ 1, 1 ] : ( typeof numMonths === "number" ? [ 1, numMonths ] : numMonths ) ); 22727 }, 22728 22729 /* Determine the current maximum date - ensure no time components are set. */ 22730 _getMinMaxDate: function( inst, minMax ) { 22731 return this._determineDate( inst, this._get( inst, minMax + "Date" ), null ); 22732 }, 22733 22734 /* Find the number of days in a given month. */ 22735 _getDaysInMonth: function( year, month ) { 22736 return 32 - this._daylightSavingAdjust( new Date( year, month, 32 ) ).getDate(); 22737 }, 22738 22739 /* Find the day of the week of the first of a month. */ 22740 _getFirstDayOfMonth: function( year, month ) { 22741 return new Date( year, month, 1 ).getDay(); 22742 }, 22743 22744 /* Determines if we should allow a "next/prev" month display change. */ 22745 _canAdjustMonth: function( inst, offset, curYear, curMonth ) { 22746 var numMonths = this._getNumberOfMonths( inst ), 22747 date = this._daylightSavingAdjust( new Date( curYear, 22748 curMonth + ( offset < 0 ? offset : numMonths[ 0 ] * numMonths[ 1 ] ), 1 ) ); 22749 22750 if ( offset < 0 ) { 22751 date.setDate( this._getDaysInMonth( date.getFullYear(), date.getMonth() ) ); 22752 } 22753 return this._isInRange( inst, date ); 22754 }, 22755 22756 /* Is the given date in the accepted range? */ 22757 _isInRange: function( inst, date ) { 22758 var yearSplit, currentYear, 22759 minDate = this._getMinMaxDate( inst, "min" ), 22760 maxDate = this._getMinMaxDate( inst, "max" ), 22761 minYear = null, 22762 maxYear = null, 22763 years = this._get( inst, "yearRange" ); 22764 if ( years ) { 22765 yearSplit = years.split( ":" ); 22766 currentYear = new Date().getFullYear(); 22767 minYear = parseInt( yearSplit[ 0 ], 10 ); 22768 maxYear = parseInt( yearSplit[ 1 ], 10 ); 22769 if ( yearSplit[ 0 ].match( /[+\-].*/ ) ) { 22770 minYear += currentYear; 22771 } 22772 if ( yearSplit[ 1 ].match( /[+\-].*/ ) ) { 22773 maxYear += currentYear; 22774 } 22775 } 22776 22777 return ( ( !minDate || date.getTime() >= minDate.getTime() ) && 22778 ( !maxDate || date.getTime() <= maxDate.getTime() ) && 22779 ( !minYear || date.getFullYear() >= minYear ) && 22780 ( !maxYear || date.getFullYear() <= maxYear ) ); 22781 }, 22782 22783 /* Provide the configuration settings for formatting/parsing. */ 22784 _getFormatConfig: function( inst ) { 22785 var shortYearCutoff = this._get( inst, "shortYearCutoff" ); 22786 shortYearCutoff = ( typeof shortYearCutoff !== "string" ? shortYearCutoff : 22787 new Date().getFullYear() % 100 + parseInt( shortYearCutoff, 10 ) ); 22788 return { shortYearCutoff: shortYearCutoff, 22789 dayNamesShort: this._get( inst, "dayNamesShort" ), dayNames: this._get( inst, "dayNames" ), 22790 monthNamesShort: this._get( inst, "monthNamesShort" ), monthNames: this._get( inst, "monthNames" ) }; 22791 }, 22792 22793 /* Format the given date for display. */ 22794 _formatDate: function( inst, day, month, year ) { 22795 if ( !day ) { 22796 inst.currentDay = inst.selectedDay; 22797 inst.currentMonth = inst.selectedMonth; 22798 inst.currentYear = inst.selectedYear; 22799 } 22800 var date = ( day ? ( typeof day === "object" ? day : 22801 this._daylightSavingAdjust( new Date( year, month, day ) ) ) : 22802 this._daylightSavingAdjust( new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) ); 22803 return this.formatDate( this._get( inst, "dateFormat" ), date, this._getFormatConfig( inst ) ); 22804 } 22805} ); 22806 22807/* 22808 * Bind hover events for datepicker elements. 22809 * Done via delegate so the binding only occurs once in the lifetime of the parent div. 22810 * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker. 22811 */ 22812function datepicker_bindHover( dpDiv ) { 22813 var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; 22814 return dpDiv.on( "mouseout", selector, function() { 22815 $( this ).removeClass( "ui-state-hover" ); 22816 if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) { 22817 $( this ).removeClass( "ui-datepicker-prev-hover" ); 22818 } 22819 if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) { 22820 $( this ).removeClass( "ui-datepicker-next-hover" ); 22821 } 22822 } ) 22823 .on( "mouseover", selector, datepicker_handleMouseover ); 22824} 22825 22826function datepicker_handleMouseover() { 22827 if ( !$.datepicker._isDisabledDatepicker( datepicker_instActive.inline ? datepicker_instActive.dpDiv.parent()[ 0 ] : datepicker_instActive.input[ 0 ] ) ) { 22828 $( this ).parents( ".ui-datepicker-calendar" ).find( "a" ).removeClass( "ui-state-hover" ); 22829 $( this ).addClass( "ui-state-hover" ); 22830 if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) { 22831 $( this ).addClass( "ui-datepicker-prev-hover" ); 22832 } 22833 if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) { 22834 $( this ).addClass( "ui-datepicker-next-hover" ); 22835 } 22836 } 22837} 22838 22839/* jQuery extend now ignores nulls! */ 22840function datepicker_extendRemove( target, props ) { 22841 $.extend( target, props ); 22842 for ( var name in props ) { 22843 if ( props[ name ] == null ) { 22844 target[ name ] = props[ name ]; 22845 } 22846 } 22847 return target; 22848} 22849 22850/* Invoke the datepicker functionality. 22851 @param options string - a command, optionally followed by additional parameters or 22852 Object - settings for attaching new datepicker functionality 22853 @return jQuery object */ 22854$.fn.datepicker = function( options ) { 22855 22856 /* Verify an empty collection wasn't passed - Fixes #6976 */ 22857 if ( !this.length ) { 22858 return this; 22859 } 22860 22861 /* Initialise the date picker. */ 22862 if ( !$.datepicker.initialized ) { 22863 $( document ).on( "mousedown", $.datepicker._checkExternalClick ); 22864 $.datepicker.initialized = true; 22865 } 22866 22867 /* Append datepicker main container to body if not exist. */ 22868 if ( $( "#" + $.datepicker._mainDivId ).length === 0 ) { 22869 $( "body" ).append( $.datepicker.dpDiv ); 22870 } 22871 22872 var otherArgs = Array.prototype.slice.call( arguments, 1 ); 22873 if ( typeof options === "string" && ( options === "isDisabled" || options === "getDate" || options === "widget" ) ) { 22874 return $.datepicker[ "_" + options + "Datepicker" ]. 22875 apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) ); 22876 } 22877 if ( options === "option" && arguments.length === 2 && typeof arguments[ 1 ] === "string" ) { 22878 return $.datepicker[ "_" + options + "Datepicker" ]. 22879 apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) ); 22880 } 22881 return this.each( function() { 22882 if ( typeof options === "string" ) { 22883 $.datepicker[ "_" + options + "Datepicker" ] 22884 .apply( $.datepicker, [ this ].concat( otherArgs ) ); 22885 } else { 22886 $.datepicker._attachDatepicker( this, options ); 22887 } 22888 } ); 22889}; 22890 22891$.datepicker = new Datepicker(); // singleton instance 22892$.datepicker.initialized = false; 22893$.datepicker.uuid = new Date().getTime(); 22894$.datepicker.version = "1.1
228943.2"; 22895 22896var widgetsDatepicker = $.datepicker; 22897 22898 22899/*! 22900 * jQuery UI Dialog 1.13.2 22901 * http://jqueryui.com 22902 * 22903 * Copyright jQuery Foundation and other contributors 22904 * Released under the MIT license. 22905 * http://jquery.org/license 22906 */ 22907 22908//>>label: Dialog 22909//>>group: Widgets 22910//>>description: Displays customizable dialog windows. 22911//>>docs: http://api.jqueryui.com/dialog/ 22912//>>demos: http://jqueryui.com/dialog/ 22913//>>css.structure: ../../themes/base/core.css 22914//>>css.structure: ../../themes/base/dialog.css 22915//>>css.theme: ../../themes/base/theme.css 22916 22917 22918$.widget( "ui.dialog", { 22919 version: "1.13.2
vendor: 20,928 bytes, lines 22919-23753
22919", 22920 options: { 22921 appendTo: "body", 22922 autoOpen: true, 22923 buttons: [], 22924 classes: { 22925 "ui-dialog": "ui-corner-all", 22926 "ui-dialog-titlebar": "ui-corner-all" 22927 }, 22928 closeOnEscape: true, 22929 closeText: "Close", 22930 draggable: true, 22931 hide: null, 22932 height: "auto", 22933 maxHeight: null, 22934 maxWidth: null, 22935 minHeight: 150, 22936 minWidth: 150, 22937 modal: false, 22938 position: { 22939 my: "center", 22940 at: "center", 22941 of: window, 22942 collision: "fit", 22943 22944 // Ensure the titlebar is always visible 22945 using: function( pos ) { 22946 var topOffset = $( this ).css( pos ).offset().top; 22947 if ( topOffset < 0 ) { 22948 $( this ).css( "top", pos.top - topOffset ); 22949 } 22950 } 22951 }, 22952 resizable: true, 22953 show: null, 22954 title: null, 22955 width: 300, 22956 22957 // Callbacks 22958 beforeClose: null, 22959 close: null, 22960 drag: null, 22961 dragStart: null, 22962 dragStop: null, 22963 focus: null, 22964 open: null, 22965 resize: null, 22966 resizeStart: null, 22967 resizeStop: null 22968 }, 22969 22970 sizeRelatedOptions: { 22971 buttons: true, 22972 height: true, 22973 maxHeight: true, 22974 maxWidth: true, 22975 minHeight: true, 22976 minWidth: true, 22977 width: true 22978 }, 22979 22980 resizableRelatedOptions: { 22981 maxHeight: true, 22982 maxWidth: true, 22983 minHeight: true, 22984 minWidth: true 22985 }, 22986 22987 _create: function() { 22988 this.originalCss = { 22989 display: this.element[ 0 ].style.display, 22990 width: this.element[ 0 ].style.width, 22991 minHeight: this.element[ 0 ].style.minHeight, 22992 maxHeight: this.element[ 0 ].style.maxHeight, 22993 height: this.element[ 0 ].style.height 22994 }; 22995 this.originalPosition = { 22996 parent: this.element.parent(), 22997 index: this.element.parent().children().index( this.element ) 22998 }; 22999 this.originalTitle = this.element.attr( "title" ); 23000 if ( this.options.title == null && this.originalTitle != null ) { 23001 this.options.title = this.originalTitle; 23002 } 23003 23004 // Dialogs can't be disabled 23005 if ( this.options.disabled ) { 23006 this.options.disabled = false; 23007 } 23008 23009 this._createWrapper(); 23010 23011 this.element 23012 .show() 23013 .removeAttr( "title" ) 23014 .appendTo( this.uiDialog ); 23015 23016 this._addClass( "ui-dialog-content", "ui-widget-content" ); 23017 23018 this._createTitlebar(); 23019 this._createButtonPane(); 23020 23021 if ( this.options.draggable && $.fn.draggable ) { 23022 this._makeDraggable(); 23023 } 23024 if ( this.options.resizable && $.fn.resizable ) { 23025 this._makeResizable(); 23026 } 23027 23028 this._isOpen = false; 23029 23030 this._trackFocus(); 23031 }, 23032 23033 _init: function() { 23034 if ( this.options.autoOpen ) { 23035 this.open(); 23036 } 23037 }, 23038 23039 _appendTo: function() { 23040 var element = this.options.appendTo; 23041 if ( element && ( element.jquery || element.nodeType ) ) { 23042 return $( element ); 23043 } 23044 return this.document.find( element || "body" ).eq( 0 ); 23045 }, 23046 23047 _destroy: function() { 23048 var next, 23049 originalPosition = this.originalPosition; 23050 23051 this._untrackInstance(); 23052 this._destroyOverlay(); 23053 23054 this.element 23055 .removeUniqueId() 23056 .css( this.originalCss ) 23057 23058 // Without detaching first, the following becomes really slow 23059 .detach(); 23060 23061 this.uiDialog.remove(); 23062 23063 if ( this.originalTitle ) { 23064 this.element.attr( "title", this.originalTitle ); 23065 } 23066 23067 next = originalPosition.parent.children().eq( originalPosition.index ); 23068 23069 // Don't try to place the dialog next to itself (#8613) 23070 if ( next.length && next[ 0 ] !== this.element[ 0 ] ) { 23071 next.before( this.element ); 23072 } else { 23073 originalPosition.parent.append( this.element ); 23074 } 23075 }, 23076 23077 widget: function() { 23078 return this.uiDialog; 23079 }, 23080 23081 disable: $.noop, 23082 enable: $.noop, 23083 23084 close: function( event ) { 23085 var that = this; 23086 23087 if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) { 23088 return; 23089 } 23090 23091 this._isOpen = false; 23092 this._focusedElement = null; 23093 this._destroyOverlay(); 23094 this._untrackInstance(); 23095 23096 if ( !this.opener.filter( ":focusable" ).trigger( "focus" ).length ) { 23097 23098 // Hiding a focused element doesn't trigger blur in WebKit 23099 // so in case we have nothing to focus on, explicitly blur the active element 23100 // https://bugs.webkit.org/show_bug.cgi?id=47182 23101 $.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) ); 23102 } 23103 23104 this._hide( this.uiDialog, this.options.hide, function() { 23105 that._trigger( "close", event ); 23106 } ); 23107 }, 23108 23109 isOpen: function() { 23110 return this._isOpen; 23111 }, 23112 23113 moveToTop: function() { 23114 this._moveToTop(); 23115 }, 23116 23117 _moveToTop: function( event, silent ) { 23118 var moved = false, 23119 zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map( function() { 23120 return +$( this ).css( "z-index" ); 23121 } ).get(), 23122 zIndexMax = Math.max.apply( null, zIndices ); 23123 23124 if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) { 23125 this.uiDialog.css( "z-index", zIndexMax + 1 ); 23126 moved = true; 23127 } 23128 23129 if ( moved && !silent ) { 23130 this._trigger( "focus", event ); 23131 } 23132 return moved; 23133 }, 23134 23135 open: function() { 23136 var that = this; 23137 if ( this._isOpen ) { 23138 if ( this._moveToTop() ) { 23139 this._focusTabbable(); 23140 } 23141 return; 23142 } 23143 23144 this._isOpen = true; 23145 this.opener = $( $.ui.safeActiveElement( this.document[ 0 ] ) ); 23146 23147 this._size(); 23148 this._position(); 23149 this._createOverlay(); 23150 this._moveToTop( null, true ); 23151 23152 // Ensure the overlay is moved to the top with the dialog, but only when 23153 // opening. The overlay shouldn't move after the dialog is open so that 23154 // modeless dialogs opened after the modal dialog stack properly. 23155 if ( this.overlay ) { 23156 this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 ); 23157 } 23158 23159 this._show( this.uiDialog, this.options.show, function() { 23160 that._focusTabbable(); 23161 that._trigger( "focus" ); 23162 } ); 23163 23164 // Track the dialog immediately upon opening in case a focus event 23165 // somehow occurs outside of the dialog before an element inside the 23166 // dialog is focused (#10152) 23167 this._makeFocusTarget(); 23168 23169 this._trigger( "open" ); 23170 }, 23171 23172 _focusTabbable: function() { 23173 23174 // Set focus to the first match: 23175 // 1. An element that was focused previously 23176 // 2. First element inside the dialog matching [autofocus] 23177 // 3. Tabbable element inside the content element 23178 // 4. Tabbable element inside the buttonpane 23179 // 5. The close button 23180 // 6. The dialog itself 23181 var hasFocus = this._focusedElement; 23182 if ( !hasFocus ) { 23183 hasFocus = this.element.find( "[autofocus]" ); 23184 } 23185 if ( !hasFocus.length ) { 23186 hasFocus = this.element.find( ":tabbable" ); 23187 } 23188 if ( !hasFocus.length ) { 23189 hasFocus = this.uiDialogButtonPane.find( ":tabbable" ); 23190 } 23191 if ( !hasFocus.length ) { 23192 hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" ); 23193 } 23194 if ( !hasFocus.length ) { 23195 hasFocus = this.uiDialog; 23196 } 23197 hasFocus.eq( 0 ).trigger( "focus" ); 23198 }, 23199 23200 _restoreTabbableFocus: function() { 23201 var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ), 23202 isActive = this.uiDialog[ 0 ] === activeElement || 23203 $.contains( this.uiDialog[ 0 ], activeElement ); 23204 if ( !isActive ) { 23205 this._focusTabbable(); 23206 } 23207 }, 23208 23209 _keepFocus: function( event ) { 23210 event.preventDefault(); 23211 this._restoreTabbableFocus(); 23212 23213 // support: IE 23214 // IE <= 8 doesn't prevent moving focus even with event.preventDefault() 23215 // so we check again later 23216 this._delay( this._restoreTabbableFocus ); 23217 }, 23218 23219 _createWrapper: function() { 23220 this.uiDialog = $( "<div>" ) 23221 .hide() 23222 .attr( { 23223 23224 // Setting tabIndex makes the div focusable 23225 tabIndex: -1, 23226 role: "dialog" 23227 } ) 23228 .appendTo( this._appendTo() ); 23229 23230 this._addClass( this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front" ); 23231 this._on( this.uiDialog, { 23232 keydown: function( event ) { 23233 if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && 23234 event.keyCode === $.ui.keyCode.ESCAPE ) { 23235 event.preventDefault(); 23236 this.close( event ); 23237 return; 23238 } 23239 23240 // Prevent tabbing out of dialogs 23241 if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) { 23242 return; 23243 } 23244 var tabbables = this.uiDialog.find( ":tabbable" ), 23245 first = tabbables.first(), 23246 last = tabbables.last(); 23247 23248 if ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) && 23249 !event.shiftKey ) { 23250 this._delay( function() { 23251 first.trigger( "focus" ); 23252 } ); 23253 event.preventDefault(); 23254 } else if ( ( event.target === first[ 0 ] || 23255 event.target === this.uiDialog[ 0 ] ) && event.shiftKey ) { 23256 this._delay( function() { 23257 last.trigger( "focus" ); 23258 } ); 23259 event.preventDefault(); 23260 } 23261 }, 23262 mousedown: function( event ) { 23263 if ( this._moveToTop( event ) ) { 23264 this._focusTabbable(); 23265 } 23266 } 23267 } ); 23268 23269 // We assume that any existing aria-describedby attribute means 23270 // that the dialog content is marked up properly 23271 // otherwise we brute force the content as the description 23272 if ( !this.element.find( "[aria-describedby]" ).length ) { 23273 this.uiDialog.attr( { 23274 "aria-describedby": this.element.uniqueId().attr( "id" ) 23275 } ); 23276 } 23277 }, 23278 23279 _createTitlebar: function() { 23280 var uiDialogTitle; 23281 23282 this.uiDialogTitlebar = $( "<div>" ); 23283 this._addClass( this.uiDialogTitlebar, 23284 "ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix" ); 23285 this._on( this.uiDialogTitlebar, { 23286 mousedown: function( event ) { 23287 23288 // Don't prevent click on close button (#8838) 23289 // Focusing a dialog that is partially scrolled out of view 23290 // causes the browser to scroll it into view, preventing the click event 23291 if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) { 23292 23293 // Dialog isn't getting focus when dragging (#8063) 23294 this.uiDialog.trigger( "focus" ); 23295 } 23296 } 23297 } ); 23298 23299 // Support: IE 23300 // Use type="button" to prevent enter keypresses in textboxes from closing the 23301 // dialog in IE (#9312) 23302 this.uiDialogTitlebarClose = $( "<button type='button'></button>" ) 23303 .button( { 23304 label: $( "<a>" ).text( this.options.closeText ).html(), 23305 icon: "ui-icon-closethick", 23306 showLabel: false 23307 } ) 23308 .appendTo( this.uiDialogTitlebar ); 23309 23310 this._addClass( this.uiDialogTitlebarClose, "ui-dialog-titlebar-close" ); 23311 this._on( this.uiDialogTitlebarClose, { 23312 click: function( event ) { 23313 event.preventDefault(); 23314 this.close( event ); 23315 } 23316 } ); 23317 23318 uiDialogTitle = $( "<span>" ).uniqueId().prependTo( this.uiDialogTitlebar ); 23319 this._addClass( uiDialogTitle, "ui-dialog-title" ); 23320 this._title( uiDialogTitle ); 23321 23322 this.uiDialogTitlebar.prependTo( this.uiDialog ); 23323 23324 this.uiDialog.attr( { 23325 "aria-labelledby": uiDialogTitle.attr( "id" ) 23326 } ); 23327 }, 23328 23329 _title: function( title ) { 23330 if ( this.options.title ) { 23331 title.text( this.options.title ); 23332 } else { 23333 title.html( " " ); 23334 } 23335 }, 23336 23337 _createButtonPane: function() { 23338 this.uiDialogButtonPane = $( "<div>" ); 23339 this._addClass( this.uiDialogButtonPane, "ui-dialog-buttonpane", 23340 "ui-widget-content ui-helper-clearfix" ); 23341 23342 this.uiButtonSet = $( "<div>" ) 23343 .appendTo( this.uiDialogButtonPane ); 23344 this._addClass( this.uiButtonSet, "ui-dialog-buttonset" ); 23345 23346 this._createButtons(); 23347 }, 23348 23349 _createButtons: function() { 23350 var that = this, 23351 buttons = this.options.buttons; 23352 23353 // If we already have a button pane, remove it 23354 this.uiDialogButtonPane.remove(); 23355 this.uiButtonSet.empty(); 23356 23357 if ( $.isEmptyObject( buttons ) || ( Array.isArray( buttons ) && !buttons.length ) ) { 23358 this._removeClass( this.uiDialog, "ui-dialog-buttons" ); 23359 return; 23360 } 23361 23362 $.each( buttons, function( name, props ) { 23363 var click, buttonOptions; 23364 props = typeof props === "function" ? 23365 { click: props, text: name } : 23366 props; 23367 23368 // Default to a non-submitting button 23369 props = $.extend( { type: "button" }, props ); 23370 23371 // Change the context for the click callback to be the main element 23372 click = props.click; 23373 buttonOptions = { 23374 icon: props.icon, 23375 iconPosition: props.iconPosition, 23376 showLabel: props.showLabel, 23377 23378 // Deprecated options 23379 icons: props.icons, 23380 text: props.text 23381 }; 23382 23383 delete props.click; 23384 delete props.icon; 23385 delete props.iconPosition; 23386 delete props.showLabel; 23387 23388 // Deprecated options 23389 delete props.icons; 23390 if ( typeof props.text === "boolean" ) { 23391 delete props.text; 23392 } 23393 23394 $( "<button></button>", props ) 23395 .button( buttonOptions ) 23396 .appendTo( that.uiButtonSet ) 23397 .on( "click", function() { 23398 click.apply( that.element[ 0 ], arguments ); 23399 } ); 23400 } ); 23401 this._addClass( this.uiDialog, "ui-dialog-buttons" ); 23402 this.uiDialogButtonPane.appendTo( this.uiDialog ); 23403 }, 23404 23405 _makeDraggable: function() { 23406 var that = this, 23407 options = this.options; 23408 23409 function filteredUi( ui ) { 23410 return { 23411 position: ui.position, 23412 offset: ui.offset 23413 }; 23414 } 23415 23416 this.uiDialog.draggable( { 23417 cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", 23418 handle: ".ui-dialog-titlebar", 23419 containment: "document", 23420 start: function( event, ui ) { 23421 that._addClass( $( this ), "ui-dialog-dragging" ); 23422 that._blockFrames(); 23423 that._trigger( "dragStart", event, filteredUi( ui ) ); 23424 }, 23425 drag: function( event, ui ) { 23426 that._trigger( "drag", event, filteredUi( ui ) ); 23427 }, 23428 stop: function( event, ui ) { 23429 var left = ui.offset.left - that.document.scrollLeft(), 23430 top = ui.offset.top - that.document.scrollTop(); 23431 23432 options.position = { 23433 my: "left top", 23434 at: "left" + ( left >= 0 ? "+" : "" ) + left + " " + 23435 "top" + ( top >= 0 ? "+" : "" ) + top, 23436 of: that.window 23437 }; 23438 that._removeClass( $( this ), "ui-dialog-dragging" ); 23439 that._unblockFrames(); 23440 that._trigger( "dragStop", event, filteredUi( ui ) ); 23441 } 23442 } ); 23443 }, 23444 23445 _makeResizable: function() { 23446 var that = this, 23447 options = this.options, 23448 handles = options.resizable, 23449 23450 // .ui-resizable has position: relative defined in the stylesheet 23451 // but dialogs have to use absolute or fixed positioning 23452 position = this.uiDialog.css( "position" ), 23453 resizeHandles = typeof handles === "string" ? 23454 handles : 23455 "n,e,s,w,se,sw,ne,nw"; 23456 23457 function filteredUi( ui ) { 23458 return { 23459 originalPosition: ui.originalPosition, 23460 originalSize: ui.originalSize, 23461 position: ui.position, 23462 size: ui.size 23463 }; 23464 } 23465 23466 this.uiDialog.resizable( { 23467 cancel: ".ui-dialog-content", 23468 containment: "document", 23469 alsoResize: this.element, 23470 maxWidth: options.maxWidth, 23471 maxHeight: options.maxHeight, 23472 minWidth: options.minWidth, 23473 minHeight: this._minHeight(), 23474 handles: resizeHandles, 23475 start: function( event, ui ) { 23476 that._addClass( $( this ), "ui-dialog-resizing" ); 23477 that._blockFrames(); 23478 that._trigger( "resizeStart", event, filteredUi( ui ) ); 23479 }, 23480 resize: function( event, ui ) { 23481 that._trigger( "resize", event, filteredUi( ui ) ); 23482 }, 23483 stop: function( event, ui ) { 23484 var offset = that.uiDialog.offset(), 23485 left = offset.left - that.document.scrollLeft(), 23486 top = offset.top - that.document.scrollTop(); 23487 23488 options.height = that.uiDialog.height(); 23489 options.width = that.uiDialog.width(); 23490 options.position = { 23491 my: "left top", 23492 at: "left" + ( left >= 0 ? "+" : "" ) + left + " " + 23493 "top" + ( top >= 0 ? "+" : "" ) + top, 23494 of: that.window 23495 }; 23496 that._removeClass( $( this ), "ui-dialog-resizing" ); 23497 that._unblockFrames(); 23498 that._trigger( "resizeStop", event, filteredUi( ui ) ); 23499 } 23500 } ) 23501 .css( "position", position ); 23502 }, 23503 23504 _trackFocus: function() { 23505 this._on( this.widget(), { 23506 focusin: function( event ) { 23507 this._makeFocusTarget(); 23508 this._focusedElement = $( event.target ); 23509 } 23510 } ); 23511 }, 23512 23513 _makeFocusTarget: function() { 23514 this._untrackInstance(); 23515 this._trackingInstances().unshift( this ); 23516 }, 23517 23518 _untrackInstance: function() { 23519 var instances = this._trackingInstances(), 23520 exists = $.inArray( this, instances ); 23521 if ( exists !== -1 ) { 23522 instances.splice( exists, 1 ); 23523 } 23524 }, 23525 23526 _trackingInstances: function() { 23527 var instances = this.document.data( "ui-dialog-instances" ); 23528 if ( !instances ) { 23529 instances = []; 23530 this.document.data( "ui-dialog-instances", instances ); 23531 } 23532 return instances; 23533 }, 23534 23535 _minHeight: function() { 23536 var options = this.options; 23537 23538 return options.height === "auto" ? 23539 options.minHeight : 23540 Math.min( options.minHeight, options.height ); 23541 }, 23542 23543 _position: function() { 23544 23545 // Need to show the dialog to get the actual offset in the position plugin 23546 var isVisible = this.uiDialog.is( ":visible" ); 23547 if ( !isVisible ) { 23548 this.uiDialog.show(); 23549 } 23550 this.uiDialog.position( this.options.position ); 23551 if ( !isVisible ) { 23552 this.uiDialog.hide(); 23553 } 23554 }, 23555 23556 _setOptions: function( options ) { 23557 var that = this, 23558 resize = false, 23559 resizableOptions = {}; 23560 23561 $.each( options, function( key, value ) { 23562 that._setOption( key, value ); 23563 23564 if ( key in that.sizeRelatedOptions ) { 23565 resize = true; 23566 } 23567 if ( key in that.resizableRelatedOptions ) { 23568 resizableOptions[ key ] = value; 23569 } 23570 } ); 23571 23572 if ( resize ) { 23573 this._size(); 23574 this._position(); 23575 } 23576 if ( this.uiDialog.is( ":data(ui-resizable)" ) ) { 23577 this.uiDialog.resizable( "option", resizableOptions ); 23578 } 23579 }, 23580 23581 _setOption: function( key, value ) { 23582 var isDraggable, isResizable, 23583 uiDialog = this.uiDialog; 23584 23585 if ( key === "disabled" ) { 23586 return; 23587 } 23588 23589 this._super( key, value ); 23590 23591 if ( key === "appendTo" ) { 23592 this.uiDialog.appendTo( this._appendTo() ); 23593 } 23594 23595 if ( key === "buttons" ) { 23596 this._createButtons(); 23597 } 23598 23599 if ( key === "closeText" ) { 23600 this.uiDialogTitlebarClose.button( { 23601 23602 // Ensure that we always pass a string 23603 label: $( "<a>" ).text( "" + this.options.closeText ).html() 23604 } ); 23605 } 23606 23607 if ( key === "draggable" ) { 23608 isDraggable = uiDialog.is( ":data(ui-draggable)" ); 23609 if ( isDraggable && !value ) { 23610 uiDialog.draggable( "destroy" ); 23611 } 23612 23613 if ( !isDraggable && value ) { 23614 this._makeDraggable(); 23615 } 23616 } 23617 23618 if ( key === "position" ) { 23619 this._position(); 23620 } 23621 23622 if ( key === "resizable" ) { 23623 23624 // currently resizable, becoming non-resizable 23625 isResizable = uiDialog.is( ":data(ui-resizable)" ); 23626 if ( isResizable && !value ) { 23627 uiDialog.resizable( "destroy" ); 23628 } 23629 23630 // Currently resizable, changing handles 23631 if ( isResizable && typeof value === "string" ) { 23632 uiDialog.resizable( "option", "handles", value ); 23633 } 23634 23635 // Currently non-resizable, becoming resizable 23636 if ( !isResizable && value !== false ) { 23637 this._makeResizable(); 23638 } 23639 } 23640 23641 if ( key === "title" ) { 23642 this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) ); 23643 } 23644 }, 23645 23646 _size: function() { 23647 23648 // If the user has resized the dialog, the .ui-dialog and .ui-dialog-content 23649 // divs will both have width and height set, so we need to reset them 23650 var nonContentHeight, minContentHeight, maxContentHeight, 23651 options = this.options; 23652 23653 // Reset content sizing 23654 this.element.show().css( { 23655 width: "auto", 23656 minHeight: 0, 23657 maxHeight: "none", 23658 height: 0 23659 } ); 23660 23661 if ( options.minWidth > options.width ) { 23662 options.width = options.minWidth; 23663 } 23664 23665 // Reset wrapper sizing 23666 // determine the height of all the non-content elements 23667 nonContentHeight = this.uiDialog.css( { 23668 height: "auto", 23669 width: options.width 23670 } ) 23671 .outerHeight(); 23672 minContentHeight = Math.max( 0, options.minHeight - nonContentHeight ); 23673 maxContentHeight = typeof options.maxHeight === "number" ? 23674 Math.max( 0, options.maxHeight - nonContentHeight ) : 23675 "none"; 23676 23677 if ( options.height === "auto" ) { 23678 this.element.css( { 23679 minHeight: minContentHeight, 23680 maxHeight: maxContentHeight, 23681 height: "auto" 23682 } ); 23683 } else { 23684 this.element.height( Math.max( 0, options.height - nonContentHeight ) ); 23685 } 23686 23687 if ( this.uiDialog.is( ":data(ui-resizable)" ) ) { 23688 this.uiDialog.resizable( "option", "minHeight", this._minHeight() ); 23689 } 23690 }, 23691 23692 _blockFrames: function() { 23693 this.iframeBlocks = this.document.find( "iframe" ).map( function() { 23694 var iframe = $( this ); 23695 23696 return $( "<div>" ) 23697 .css( { 23698 position: "absolute", 23699 width: iframe.outerWidth(), 23700 height: iframe.outerHeight() 23701 } ) 23702 .appendTo( iframe.parent() ) 23703 .offset( iframe.offset() )[ 0 ]; 23704 } ); 23705 }, 23706 23707 _unblockFrames: function() { 23708 if ( this.iframeBlocks ) { 23709 this.iframeBlocks.remove(); 23710 delete this.iframeBlocks; 23711 } 23712 }, 23713 23714 _allowInteraction: function( event ) { 23715 if ( $( event.target ).closest( ".ui-dialog" ).length ) { 23716 return true; 23717 } 23718 23719 // TODO: Remove hack when datepicker implements 23720 // the .ui-front logic (#8989) 23721 return !!$( event.target ).closest( ".ui-datepicker" ).length; 23722 }, 23723 23724 _createOverlay: function() { 23725 if ( !this.options.modal ) { 23726 return; 23727 } 23728 23729 var jqMinor = $.fn.jquery.substring( 0, 4 ); 23730 23731 // We use a delay in case the overlay is created from an 23732 // event that we're going to be cancelling (#2804) 23733 var isOpening = true; 23734 this._delay( function() { 23735 isOpening = false; 23736 } ); 23737 23738 if ( !this.document.data( "ui-dialog-overlays" ) ) { 23739 23740 // Prevent use of anchors and inputs 23741 // This doesn't use `_on()` because it is a shared event handler 23742 // across all open modal dialogs. 23743 this.document.on( "focusin.ui-dialog", function( event ) { 23744 if ( isOpening ) { 23745 return; 23746 } 23747 23748 var instance = this._trackingInstances()[ 0 ]; 23749 if ( !instance._allowInteraction( event ) ) { 23750 event.preventDefault(); 23751 instance._focusTabbable(); 23752 23753 // Support: jQuery >=3.4 <3.
vendor: 3,764 bytes, lines 23753-23903
237536 only 23754 // Focus re-triggering in jQuery 3.4/3.5 makes the original element 23755 // have its focus event propagated last, breaking the re-targeting. 23756 // Trigger focus in a delay in addition if needed to avoid the issue 23757 // See https://github.com/jquery/jquery/issues/4382 23758 if ( jqMinor === "3.4." || jqMinor === "3.5." ) { 23759 instance._delay( instance._restoreTabbableFocus ); 23760 } 23761 } 23762 }.bind( this ) ); 23763 } 23764 23765 this.overlay = $( "<div>" ) 23766 .appendTo( this._appendTo() ); 23767 23768 this._addClass( this.overlay, null, "ui-widget-overlay ui-front" ); 23769 this._on( this.overlay, { 23770 mousedown: "_keepFocus" 23771 } ); 23772 this.document.data( "ui-dialog-overlays", 23773 ( this.document.data( "ui-dialog-overlays" ) || 0 ) + 1 ); 23774 }, 23775 23776 _destroyOverlay: function() { 23777 if ( !this.options.modal ) { 23778 return; 23779 } 23780 23781 if ( this.overlay ) { 23782 var overlays = this.document.data( "ui-dialog-overlays" ) - 1; 23783 23784 if ( !overlays ) { 23785 this.document.off( "focusin.ui-dialog" ); 23786 this.document.removeData( "ui-dialog-overlays" ); 23787 } else { 23788 this.document.data( "ui-dialog-overlays", overlays ); 23789 } 23790 23791 this.overlay.remove(); 23792 this.overlay = null; 23793 } 23794 } 23795} ); 23796 23797// DEPRECATED 23798// TODO: switch return back to widget declaration at top of file when this is removed 23799if ( $.uiBackCompat !== false ) { 23800 23801 // Backcompat for dialogClass option 23802 $.widget( "ui.dialog", $.ui.dialog, { 23803 options: { 23804 dialogClass: "" 23805 }, 23806 _createWrapper: function() { 23807 this._super(); 23808 this.uiDialog.addClass( this.options.dialogClass ); 23809 }, 23810 _setOption: function( key, value ) { 23811 if ( key === "dialogClass" ) { 23812 this.uiDialog 23813 .removeClass( this.options.dialogClass ) 23814 .addClass( value ); 23815 } 23816 this._superApply( arguments ); 23817 } 23818 } ); 23819} 23820 23821var widgetsDialog = $.ui.dialog; 23822 23823 23824/*! 23825 * jQuery UI Progressbar 1.13.2 23826 * http://jqueryui.com 23827 * 23828 * Copyright jQuery Foundation and other contributors 23829 * Released under the MIT license. 23830 * http://jquery.org/license 23831 */ 23832 23833//>>label: Progressbar 23834//>>group: Widgets 23835/* eslint-disable max-len */ 23836//>>description: Displays a status indicator for loading state, standard percentage, and other progress indicators. 23837/* eslint-enable max-len */ 23838//>>docs: http://api.jqueryui.com/progressbar/ 23839//>>demos: http://jqueryui.com/progressbar/ 23840//>>css.structure: ../../themes/base/core.css 23841//>>css.structure: ../../themes/base/progressbar.css 23842//>>css.theme: ../../themes/base/theme.css 23843 23844 23845var widgetsProgressbar = $.widget( "ui.progressbar", { 23846 version: "1.13.2", 23847 options: { 23848 classes: { 23849 "ui-progressbar": "ui-corner-all", 23850 "ui-progressbar-value": "ui-corner-left", 23851 "ui-progressbar-complete": "ui-corner-right" 23852 }, 23853 max: 100, 23854 value: 0, 23855 23856 change: null, 23857 complete: null 23858 }, 23859 23860 min: 0, 23861 23862 _create: function() { 23863 23864 // Constrain initial value 23865 this.oldValue = this.options.value = this._constrainedValue(); 23866 23867 this.element.attr( { 23868 23869 // Only set static values; aria-valuenow and aria-valuemax are 23870 // set inside _refreshValue() 23871 role: "progressbar", 23872 "aria-valuemin": this.min 23873 } ); 23874 this._addClass( "ui-progressbar", "ui-widget ui-widget-content" ); 23875 23876 this.valueDiv = $( "<div>" ).appendTo( this.element ); 23877 this._addClass( this.valueDiv, "ui-progressbar-value", "ui-widget-header" ); 23878 this._refreshValue(); 23879 }, 23880 23881 _destroy: function() { 23882 this.element.removeAttr( "role aria-valuemin aria-valuemax aria-valuenow" ); 23883 23884 this.valueDiv.remove(); 23885 }, 23886 23887 value: function( newValue ) { 23888 if ( newValue === undefined ) { 23889 return this.options.value; 23890 } 23891 23892 this.options.value = this._constrainedValue( newValue ); 23893 this._refreshValue(); 23894 }, 23895 23896 _constrainedValue: function( newValue ) { 23897 if ( newValue === undefined ) { 23898 newValue = this.options.value; 23899 } 23900 23901 this.indeterminate = newValue === false; 23902 23903 // Sanitize value
vendor: 3,946 bytes, lines 23904-24064
23904 if ( typeof newValue !== "number" ) { 23905 newValue = 0; 23906 } 23907 23908 return this.indeterminate ? false : 23909 Math.min( this.options.max, Math.max( this.min, newValue ) ); 23910 }, 23911 23912 _setOptions: function( options ) { 23913 23914 // Ensure "value" option is set after other values (like max) 23915 var value = options.value; 23916 delete options.value; 23917 23918 this._super( options ); 23919 23920 this.options.value = this._constrainedValue( value ); 23921 this._refreshValue(); 23922 }, 23923 23924 _setOption: function( key, value ) { 23925 if ( key === "max" ) { 23926 23927 // Don't allow a max less than min 23928 value = Math.max( this.min, value ); 23929 } 23930 this._super( key, value ); 23931 }, 23932 23933 _setOptionDisabled: function( value ) { 23934 this._super( value ); 23935 23936 this.element.attr( "aria-disabled", value ); 23937 this._toggleClass( null, "ui-state-disabled", !!value ); 23938 }, 23939 23940 _percentage: function() { 23941 return this.indeterminate ? 23942 100 : 23943 100 * ( this.options.value - this.min ) / ( this.options.max - this.min ); 23944 }, 23945 23946 _refreshValue: function() { 23947 var value = this.options.value, 23948 percentage = this._percentage(); 23949 23950 this.valueDiv 23951 .toggle( this.indeterminate || value > this.min ) 23952 .width( percentage.toFixed( 0 ) + "%" ); 23953 23954 this 23955 ._toggleClass( this.valueDiv, "ui-progressbar-complete", null, 23956 value === this.options.max ) 23957 ._toggleClass( "ui-progressbar-indeterminate", null, this.indeterminate ); 23958 23959 if ( this.indeterminate ) { 23960 this.element.removeAttr( "aria-valuenow" ); 23961 if ( !this.overlayDiv ) { 23962 this.overlayDiv = $( "<div>" ).appendTo( this.valueDiv ); 23963 this._addClass( this.overlayDiv, "ui-progressbar-overlay" ); 23964 } 23965 } else { 23966 this.element.attr( { 23967 "aria-valuemax": this.options.max, 23968 "aria-valuenow": value 23969 } ); 23970 if ( this.overlayDiv ) { 23971 this.overlayDiv.remove(); 23972 this.overlayDiv = null; 23973 } 23974 } 23975 23976 if ( this.oldValue !== value ) { 23977 this.oldValue = value; 23978 this._trigger( "change" ); 23979 } 23980 if ( value === this.options.max ) { 23981 this._trigger( "complete" ); 23982 } 23983 } 23984} ); 23985 23986 23987/*! 23988 * jQuery UI Selectmenu 1.13.2 23989 * http://jqueryui.com 23990 * 23991 * Copyright jQuery Foundation and other contributors 23992 * Released under the MIT license. 23993 * http://jquery.org/license 23994 */ 23995 23996//>>label: Selectmenu 23997//>>group: Widgets 23998/* eslint-disable max-len */ 23999//>>description: Duplicates and extends the functionality of a native HTML select element, allowing it to be customizable in behavior and appearance far beyond the limitations of a native select. 24000/* eslint-enable max-len */ 24001//>>docs: http://api.jqueryui.com/selectmenu/ 24002//>>demos: http://jqueryui.com/selectmenu/ 24003//>>css.structure: ../../themes/base/core.css 24004//>>css.structure: ../../themes/base/selectmenu.css, ../../themes/base/button.css 24005//>>css.theme: ../../themes/base/theme.css 24006 24007 24008var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, { 24009 version: "1.13.2", 24010 defaultElement: "<select>", 24011 options: { 24012 appendTo: null, 24013 classes: { 24014 "ui-selectmenu-button-open": "ui-corner-top", 24015 "ui-selectmenu-button-closed": "ui-corner-all" 24016 }, 24017 disabled: null, 24018 icons: { 24019 button: "ui-icon-triangle-1-s" 24020 }, 24021 position: { 24022 my: "left top", 24023 at: "left bottom", 24024 collision: "none" 24025 }, 24026 width: false, 24027 24028 // Callbacks 24029 change: null, 24030 close: null, 24031 focus: null, 24032 open: null, 24033 select: null 24034 }, 24035 24036 _create: function() { 24037 var selectmenuId = this.element.uniqueId().attr( "id" ); 24038 this.ids = { 24039 element: selectmenuId, 24040 button: selectmenuId + "-button", 24041 menu: selectmenuId + "-menu" 24042 }; 24043 24044 this._drawButton(); 24045 this._drawMenu(); 24046 this._bindFormResetHandler(); 24047 24048 this._rendered = false; 24049 this.menuItems = $(); 24050 }, 24051 24052 _drawButton: function() { 24053 var icon, 24054 that = this, 24055 item = this._parseOption( 24056 this.element.find( "option:selected" ), 24057 this.element[ 0 ].selectedIndex 24058 ); 24059 24060 // Associate existing label with the new button 24061 this.labels = this.element.labels().attr( "for", this.ids.button ); 24062 this._on( this.labels, { 24063 click: function( event ) { 24064 this.button.trigger( "focus"
vendor: 7,319 bytes, lines 24064-24373
24064); 24065 event.preventDefault(); 24066 } 24067 } ); 24068 24069 // Hide original select element 24070 this.element.hide(); 24071 24072 // Create button 24073 this.button = $( "<span>", { 24074 tabindex: this.options.disabled ? -1 : 0, 24075 id: this.ids.button, 24076 role: "combobox", 24077 "aria-expanded": "false", 24078 "aria-autocomplete": "list", 24079 "aria-owns": this.ids.menu, 24080 "aria-haspopup": "true", 24081 title: this.element.attr( "title" ) 24082 } ) 24083 .insertAfter( this.element ); 24084 24085 this._addClass( this.button, "ui-selectmenu-button ui-selectmenu-button-closed", 24086 "ui-button ui-widget" ); 24087 24088 icon = $( "<span>" ).appendTo( this.button ); 24089 this._addClass( icon, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button ); 24090 this.buttonItem = this._renderButtonItem( item ) 24091 .appendTo( this.button ); 24092 24093 if ( this.options.width !== false ) { 24094 this._resizeButton(); 24095 } 24096 24097 this._on( this.button, this._buttonEvents ); 24098 this.button.one( "focusin", function() { 24099 24100 // Delay rendering the menu items until the button receives focus. 24101 // The menu may have already been rendered via a programmatic open. 24102 if ( !that._rendered ) { 24103 that._refreshMenu(); 24104 } 24105 } ); 24106 }, 24107 24108 _drawMenu: function() { 24109 var that = this; 24110 24111 // Create menu 24112 this.menu = $( "<ul>", { 24113 "aria-hidden": "true", 24114 "aria-labelledby": this.ids.button, 24115 id: this.ids.menu 24116 } ); 24117 24118 // Wrap menu 24119 this.menuWrap = $( "<div>" ).append( this.menu ); 24120 this._addClass( this.menuWrap, "ui-selectmenu-menu", "ui-front" ); 24121 this.menuWrap.appendTo( this._appendTo() ); 24122 24123 // Initialize menu widget 24124 this.menuInstance = this.menu 24125 .menu( { 24126 classes: { 24127 "ui-menu": "ui-corner-bottom" 24128 }, 24129 role: "listbox", 24130 select: function( event, ui ) { 24131 event.preventDefault(); 24132 24133 // Support: IE8 24134 // If the item was selected via a click, the text selection 24135 // will be destroyed in IE 24136 that._setSelection(); 24137 24138 that._select( ui.item.data( "ui-selectmenu-item" ), event ); 24139 }, 24140 focus: function( event, ui ) { 24141 var item = ui.item.data( "ui-selectmenu-item" ); 24142 24143 // Prevent inital focus from firing and check if its a newly focused item 24144 if ( that.focusIndex != null && item.index !== that.focusIndex ) { 24145 that._trigger( "focus", event, { item: item } ); 24146 if ( !that.isOpen ) { 24147 that._select( item, event ); 24148 } 24149 } 24150 that.focusIndex = item.index; 24151 24152 that.button.attr( "aria-activedescendant", 24153 that.menuItems.eq( item.index ).attr( "id" ) ); 24154 } 24155 } ) 24156 .menu( "instance" ); 24157 24158 // Don't close the menu on mouseleave 24159 this.menuInstance._off( this.menu, "mouseleave" ); 24160 24161 // Cancel the menu's collapseAll on document click 24162 this.menuInstance._closeOnDocumentClick = function() { 24163 return false; 24164 }; 24165 24166 // Selects often contain empty items, but never contain dividers 24167 this.menuInstance._isDivider = function() { 24168 return false; 24169 }; 24170 }, 24171 24172 refresh: function() { 24173 this._refreshMenu(); 24174 this.buttonItem.replaceWith( 24175 this.buttonItem = this._renderButtonItem( 24176 24177 // Fall back to an empty object in case there are no options 24178 this._getSelectedItem().data( "ui-selectmenu-item" ) || {} 24179 ) 24180 ); 24181 if ( this.options.width === null ) { 24182 this._resizeButton(); 24183 } 24184 }, 24185 24186 _refreshMenu: function() { 24187 var item, 24188 options = this.element.find( "option" ); 24189 24190 this.menu.empty(); 24191 24192 this._parseOptions( options ); 24193 this._renderMenu( this.menu, this.items ); 24194 24195 this.menuInstance.refresh(); 24196 this.menuItems = this.menu.find( "li" ) 24197 .not( ".ui-selectmenu-optgroup" ) 24198 .find( ".ui-menu-item-wrapper" ); 24199 24200 this._rendered = true; 24201 24202 if ( !options.length ) { 24203 return; 24204 } 24205 24206 item = this._getSelectedItem(); 24207 24208 // Update the menu to have the correct item focused 24209 this.menuInstance.focus( null, item ); 24210 this._setAria( item.data( "ui-selectmenu-item" ) ); 24211 24212 // Set disabled state 24213 this._setOption( "disabled", this.element.prop( "disabled" ) ); 24214 }, 24215 24216 open: function( event ) { 24217 if ( this.options.disabled ) { 24218 return; 24219 } 24220 24221 // If this is the first time the menu is being opened, render the items 24222 if ( !this._rendered ) { 24223 this._refreshMenu(); 24224 } else { 24225 24226 // Menu clears focus on close, reset focus to selected item 24227 this._removeClass( this.menu.find( ".ui-state-active" ), null, "ui-state-active" ); 24228 this.menuInstance.focus( null, this._getSelectedItem() ); 24229 } 24230 24231 // If there are no options, don't open the menu 24232 if ( !this.menuItems.length ) { 24233 return; 24234 } 24235 24236 this.isOpen = true; 24237 this._toggleAttr(); 24238 this._resizeMenu(); 24239 this._position(); 24240 24241 this._on( this.document, this._documentClick ); 24242 24243 this._trigger( "open", event ); 24244 }, 24245 24246 _position: function() { 24247 this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) ); 24248 }, 24249 24250 close: function( event ) { 24251 if ( !this.isOpen ) { 24252 return; 24253 } 24254 24255 this.isOpen = false; 24256 this._toggleAttr(); 24257 24258 this.range = null; 24259 this._off( this.document ); 24260 24261 this._trigger( "close", event ); 24262 }, 24263 24264 widget: function() { 24265 return this.button; 24266 }, 24267 24268 menuWidget: function() { 24269 return this.menu; 24270 }, 24271 24272 _renderButtonItem: function( item ) { 24273 var buttonItem = $( "<span>" ); 24274 24275 this._setText( buttonItem, item.label ); 24276 this._addClass( buttonItem, "ui-selectmenu-text" ); 24277 24278 return buttonItem; 24279 }, 24280 24281 _renderMenu: function( ul, items ) { 24282 var that = this, 24283 currentOptgroup = ""; 24284 24285 $.each( items, function( index, item ) { 24286 var li; 24287 24288 if ( item.optgroup !== currentOptgroup ) { 24289 li = $( "<li>", { 24290 text: item.optgroup 24291 } ); 24292 that._addClass( li, "ui-selectmenu-optgroup", "ui-menu-divider" + 24293 ( item.element.parent( "optgroup" ).prop( "disabled" ) ? 24294 " ui-state-disabled" : 24295 "" ) ); 24296 24297 li.appendTo( ul ); 24298 24299 currentOptgroup = item.optgroup; 24300 } 24301 24302 that._renderItemData( ul, item ); 24303 } ); 24304 }, 24305 24306 _renderItemData: function( ul, item ) { 24307 return this._renderItem( ul, item ).data( "ui-selectmenu-item", item ); 24308 }, 24309 24310 _renderItem: function( ul, item ) { 24311 var li = $( "<li>" ), 24312 wrapper = $( "<div>", { 24313 title: item.element.attr( "title" ) 24314 } ); 24315 24316 if ( item.disabled ) { 24317 this._addClass( li, null, "ui-state-disabled" ); 24318 } 24319 this._setText( wrapper, item.label ); 24320 24321 return li.append( wrapper ).appendTo( ul ); 24322 }, 24323 24324 _setText: function( element, value ) { 24325 if ( value ) { 24326 element.text( value ); 24327 } else { 24328 element.html( " " ); 24329 } 24330 }, 24331 24332 _move: function( direction, event ) { 24333 var item, next, 24334 filter = ".ui-menu-item"; 24335 24336 if ( this.isOpen ) { 24337 item = this.menuItems.eq( this.focusIndex ).parent( "li" ); 24338 } else { 24339 item = this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" ); 24340 filter += ":not(.ui-state-disabled)"; 24341 } 24342 24343 if ( direction === "first" || direction === "last" ) { 24344 next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 ); 24345 } else { 24346 next = item[ direction + "All" ]( filter ).eq( 0 ); 24347 } 24348 24349 if ( next.length ) { 24350 this.menuInstance.focus( event, next ); 24351 } 24352 }, 24353 24354 _getSelectedItem: function() { 24355 return this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" ); 24356 }, 24357 24358 _toggle: function( event ) { 24359 this[ this.isOpen ? "close" : "open" ]( event ); 24360 }, 24361 24362 _setSelection: function() { 24363 var selection; 24364 24365 if ( !this.range ) { 24366 return; 24367 } 24368 24369 if ( window.getSelection ) { 24370 selection = window.getSelection(); 24371 selection.removeAllRanges(); 24372 selection.addRange( this.range ); 24373
vendor: 1,173 bytes, lines 24374-24427
24374 // Support: IE8 24375 } else { 24376 this.range.select(); 24377 } 24378 24379 // Support: IE 24380 // Setting the text selection kills the button focus in IE, but 24381 // restoring the focus doesn't kill the selection. 24382 this.button.trigger( "focus" ); 24383 }, 24384 24385 _documentClick: { 24386 mousedown: function( event ) { 24387 if ( !this.isOpen ) { 24388 return; 24389 } 24390 24391 if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" + 24392 $.escapeSelector( this.ids.button ) ).length ) { 24393 this.close( event ); 24394 } 24395 } 24396 }, 24397 24398 _buttonEvents: { 24399 24400 // Prevent text selection from being reset when interacting with the selectmenu (#10144) 24401 mousedown: function() { 24402 var selection; 24403 24404 if ( window.getSelection ) { 24405 selection = window.getSelection(); 24406 if ( selection.rangeCount ) { 24407 this.range = selection.getRangeAt( 0 ); 24408 } 24409 24410 // Support: IE8 24411 } else { 24412 this.range = document.selection.createRange(); 24413 } 24414 }, 24415 24416 click: function( event ) { 24417 this._setSelection(); 24418 this._toggle( event ); 24419 }, 24420 24421 keydown: function( event ) { 24422 var preventDefault = true; 24423 switch ( event.keyCode ) { 24424 case $.ui.keyCode.TAB: 24425 case $.ui.keyCode.ESCAPE: 24426 this.close( event ); 24427 preventDefault = false;
vendor: 4,716 bytes, lines 24428-24623
24428 break; 24429 case $.ui.keyCode.ENTER: 24430 if ( this.isOpen ) { 24431 this._selectFocusedItem( event ); 24432 } 24433 break; 24434 case $.ui.keyCode.UP: 24435 if ( event.altKey ) { 24436 this._toggle( event ); 24437 } else { 24438 this._move( "prev", event ); 24439 } 24440 break; 24441 case $.ui.keyCode.DOWN: 24442 if ( event.altKey ) { 24443 this._toggle( event ); 24444 } else { 24445 this._move( "next", event ); 24446 } 24447 break; 24448 case $.ui.keyCode.SPACE: 24449 if ( this.isOpen ) { 24450 this._selectFocusedItem( event ); 24451 } else { 24452 this._toggle( event ); 24453 } 24454 break; 24455 case $.ui.keyCode.LEFT: 24456 this._move( "prev", event ); 24457 break; 24458 case $.ui.keyCode.RIGHT: 24459 this._move( "next", event ); 24460 break; 24461 case $.ui.keyCode.HOME: 24462 case $.ui.keyCode.PAGE_UP: 24463 this._move( "first", event ); 24464 break; 24465 case $.ui.keyCode.END: 24466 case $.ui.keyCode.PAGE_DOWN: 24467 this._move( "last", event ); 24468 break; 24469 default: 24470 this.menu.trigger( event ); 24471 preventDefault = false; 24472 } 24473 24474 if ( preventDefault ) { 24475 event.preventDefault(); 24476 } 24477 } 24478 }, 24479 24480 _selectFocusedItem: function( event ) { 24481 var item = this.menuItems.eq( this.focusIndex ).parent( "li" ); 24482 if ( !item.hasClass( "ui-state-disabled" ) ) { 24483 this._select( item.data( "ui-selectmenu-item" ), event ); 24484 } 24485 }, 24486 24487 _select: function( item, event ) { 24488 var oldIndex = this.element[ 0 ].selectedIndex; 24489 24490 // Change native select element 24491 this.element[ 0 ].selectedIndex = item.index; 24492 this.buttonItem.replaceWith( this.buttonItem = this._renderButtonItem( item ) ); 24493 this._setAria( item ); 24494 this._trigger( "select", event, { item: item } ); 24495 24496 if ( item.index !== oldIndex ) { 24497 this._trigger( "change", event, { item: item } ); 24498 } 24499 24500 this.close( event ); 24501 }, 24502 24503 _setAria: function( item ) { 24504 var id = this.menuItems.eq( item.index ).attr( "id" ); 24505 24506 this.button.attr( { 24507 "aria-labelledby": id, 24508 "aria-activedescendant": id 24509 } ); 24510 this.menu.attr( "aria-activedescendant", id ); 24511 }, 24512 24513 _setOption: function( key, value ) { 24514 if ( key === "icons" ) { 24515 var icon = this.button.find( "span.ui-icon" ); 24516 this._removeClass( icon, null, this.options.icons.button ) 24517 ._addClass( icon, null, value.button ); 24518 } 24519 24520 this._super( key, value ); 24521 24522 if ( key === "appendTo" ) { 24523 this.menuWrap.appendTo( this._appendTo() ); 24524 } 24525 24526 if ( key === "width" ) { 24527 this._resizeButton(); 24528 } 24529 }, 24530 24531 _setOptionDisabled: function( value ) { 24532 this._super( value ); 24533 24534 this.menuInstance.option( "disabled", value ); 24535 this.button.attr( "aria-disabled", value ); 24536 this._toggleClass( this.button, null, "ui-state-disabled", value ); 24537 24538 this.element.prop( "disabled", value ); 24539 if ( value ) { 24540 this.button.attr( "tabindex", -1 ); 24541 this.close(); 24542 } else { 24543 this.button.attr( "tabindex", 0 ); 24544 } 24545 }, 24546 24547 _appendTo: function() { 24548 var element = this.options.appendTo; 24549 24550 if ( element ) { 24551 element = element.jquery || element.nodeType ? 24552 $( element ) : 24553 this.document.find( element ).eq( 0 ); 24554 } 24555 24556 if ( !element || !element[ 0 ] ) { 24557 element = this.element.closest( ".ui-front, dialog" ); 24558 } 24559 24560 if ( !element.length ) { 24561 element = this.document[ 0 ].body; 24562 } 24563 24564 return element; 24565 }, 24566 24567 _toggleAttr: function() { 24568 this.button.attr( "aria-expanded", this.isOpen ); 24569 24570 // We can't use two _toggleClass() calls here, because we need to make sure 24571 // we always remove classes first and add them second, otherwise if both classes have the 24572 // same theme class, it will be removed after we add it. 24573 this._removeClass( this.button, "ui-selectmenu-button-" + 24574 ( this.isOpen ? "closed" : "open" ) ) 24575 ._addClass( this.button, "ui-selectmenu-button-" + 24576 ( this.isOpen ? "open" : "closed" ) ) 24577 ._toggleClass( this.menuWrap, "ui-selectmenu-open", null, this.isOpen ); 24578 24579 this.menu.attr( "aria-hidden", !this.isOpen ); 24580 }, 24581 24582 _resizeButton: function() { 24583 var width = this.options.width; 24584 24585 // For `width: false`, just remove inline style and stop 24586 if ( width === false ) { 24587 this.button.css( "width", "" ); 24588 return; 24589 } 24590 24591 // For `width: null`, match the width of the original element 24592 if ( width === null ) { 24593 width = this.element.show().outerWidth(); 24594 this.element.hide(); 24595 } 24596 24597 this.button.outerWidth( width ); 24598 }, 24599 24600 _resizeMenu: function() { 24601 this.menu.outerWidth( Math.max( 24602 this.button.outerWidth(), 24603 24604 // Support: IE10 24605 // IE10 wraps long text (possibly a rounding bug) 24606 // so we add 1px to avoid the wrapping 24607 this.menu.width( "" ).outerWidth() + 1 24608 ) ); 24609 }, 24610 24611 _getCreateOptions: function() { 24612 var options = this._super(); 24613 24614 options.disabled = this.element.prop( "disabled" ); 24615 24616 return options; 24617 }, 24618 24619 _parseOptions: function( options ) { 24620 var that = this, 24621 data = []; 24622 options.each( function( index, item ) { 24623
vendor: 3,668 bytes, lines 24623-24773
24623if ( item.hidden ) { 24624 return; 24625 } 24626 24627 data.push( that._parseOption( $( item ), index ) ); 24628 } ); 24629 this.items = data; 24630 }, 24631 24632 _parseOption: function( option, index ) { 24633 var optgroup = option.parent( "optgroup" ); 24634 24635 return { 24636 element: option, 24637 index: index, 24638 value: option.val(), 24639 label: option.text(), 24640 optgroup: optgroup.attr( "label" ) || "", 24641 disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" ) 24642 }; 24643 }, 24644 24645 _destroy: function() { 24646 this._unbindFormResetHandler(); 24647 this.menuWrap.remove(); 24648 this.button.remove(); 24649 this.element.show(); 24650 this.element.removeUniqueId(); 24651 this.labels.attr( "for", this.ids.element ); 24652 } 24653} ] ); 24654 24655 24656/*! 24657 * jQuery UI Slider 1.13.2 24658 * http://jqueryui.com 24659 * 24660 * Copyright jQuery Foundation and other contributors 24661 * Released under the MIT license. 24662 * http://jquery.org/license 24663 */ 24664 24665//>>label: Slider 24666//>>group: Widgets 24667//>>description: Displays a flexible slider with ranges and accessibility via keyboard. 24668//>>docs: http://api.jqueryui.com/slider/ 24669//>>demos: http://jqueryui.com/slider/ 24670//>>css.structure: ../../themes/base/core.css 24671//>>css.structure: ../../themes/base/slider.css 24672//>>css.theme: ../../themes/base/theme.css 24673 24674 24675var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, { 24676 version: "1.13.2", 24677 widgetEventPrefix: "slide", 24678 24679 options: { 24680 animate: false, 24681 classes: { 24682 "ui-slider": "ui-corner-all", 24683 "ui-slider-handle": "ui-corner-all", 24684 24685 // Note: ui-widget-header isn't the most fittingly semantic framework class for this 24686 // element, but worked best visually with a variety of themes 24687 "ui-slider-range": "ui-corner-all ui-widget-header" 24688 }, 24689 distance: 0, 24690 max: 100, 24691 min: 0, 24692 orientation: "horizontal", 24693 range: false, 24694 step: 1, 24695 value: 0, 24696 values: null, 24697 24698 // Callbacks 24699 change: null, 24700 slide: null, 24701 start: null, 24702 stop: null 24703 }, 24704 24705 // Number of pages in a slider 24706 // (how many times can you page up/down to go through the whole range) 24707 numPages: 5, 24708 24709 _create: function() { 24710 this._keySliding = false; 24711 this._mouseSliding = false; 24712 this._animateOff = true; 24713 this._handleIndex = null; 24714 this._detectOrientation(); 24715 this._mouseInit(); 24716 this._calculateNewMax(); 24717 24718 this._addClass( "ui-slider ui-slider-" + this.orientation, 24719 "ui-widget ui-widget-content" ); 24720 24721 this._refresh(); 24722 24723 this._animateOff = false; 24724 }, 24725 24726 _refresh: function() { 24727 this._createRange(); 24728 this._createHandles(); 24729 this._setupEvents(); 24730 this._refreshValue(); 24731 }, 24732 24733 _createHandles: function() { 24734 var i, handleCount, 24735 options = this.options, 24736 existingHandles = this.element.find( ".ui-slider-handle" ), 24737 handle = "<span tabindex='0'></span>", 24738 handles = []; 24739 24740 handleCount = ( options.values && options.values.length ) || 1; 24741 24742 if ( existingHandles.length > handleCount ) { 24743 existingHandles.slice( handleCount ).remove(); 24744 existingHandles = existingHandles.slice( 0, handleCount ); 24745 } 24746 24747 for ( i = existingHandles.length; i < handleCount; i++ ) { 24748 handles.push( handle ); 24749 } 24750 24751 this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) ); 24752 24753 this._addClass( this.handles, "ui-slider-handle", "ui-state-default" ); 24754 24755 this.handle = this.handles.eq( 0 ); 24756 24757 this.handles.each( function( i ) { 24758 $( this ) 24759 .data( "ui-slider-handle-index", i ) 24760 .attr( "tabIndex", 0 ); 24761 } ); 24762 }, 24763 24764 _createRange: function() { 24765 var options = this.options; 24766 24767 if ( options.range ) { 24768 if ( options.range === true ) { 24769 if ( !options.values ) { 24770 options.values = [ this._valueMin(), this._valueMin() ]; 24771 } else if ( options.values.length && options.values.length !== 2 ) { 24772 options.values = [ options.values[ 0 ], options.values[ 0 ] ]; 24773 } else if ( Array
vendor: 6,343 bytes, lines 24773-25019
24773.isArray( options.values ) ) { 24774 options.values = options.values.slice( 0 ); 24775 } 24776 } 24777 24778 if ( !this.range || !this.range.length ) { 24779 this.range = $( "<div>" ) 24780 .appendTo( this.element ); 24781 24782 this._addClass( this.range, "ui-slider-range" ); 24783 } else { 24784 this._removeClass( this.range, "ui-slider-range-min ui-slider-range-max" ); 24785 24786 // Handle range switching from true to min/max 24787 this.range.css( { 24788 "left": "", 24789 "bottom": "" 24790 } ); 24791 } 24792 if ( options.range === "min" || options.range === "max" ) { 24793 this._addClass( this.range, "ui-slider-range-" + options.range ); 24794 } 24795 } else { 24796 if ( this.range ) { 24797 this.range.remove(); 24798 } 24799 this.range = null; 24800 } 24801 }, 24802 24803 _setupEvents: function() { 24804 this._off( this.handles ); 24805 this._on( this.handles, this._handleEvents ); 24806 this._hoverable( this.handles ); 24807 this._focusable( this.handles ); 24808 }, 24809 24810 _destroy: function() { 24811 this.handles.remove(); 24812 if ( this.range ) { 24813 this.range.remove(); 24814 } 24815 24816 this._mouseDestroy(); 24817 }, 24818 24819 _mouseCapture: function( event ) { 24820 var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle, 24821 that = this, 24822 o = this.options; 24823 24824 if ( o.disabled ) { 24825 return false; 24826 } 24827 24828 this.elementSize = { 24829 width: this.element.outerWidth(), 24830 height: this.element.outerHeight() 24831 }; 24832 this.elementOffset = this.element.offset(); 24833 24834 position = { x: event.pageX, y: event.pageY }; 24835 normValue = this._normValueFromMouse( position ); 24836 distance = this._valueMax() - this._valueMin() + 1; 24837 this.handles.each( function( i ) { 24838 var thisDistance = Math.abs( normValue - that.values( i ) ); 24839 if ( ( distance > thisDistance ) || 24840 ( distance === thisDistance && 24841 ( i === that._lastChangedValue || that.values( i ) === o.min ) ) ) { 24842 distance = thisDistance; 24843 closestHandle = $( this ); 24844 index = i; 24845 } 24846 } ); 24847 24848 allowed = this._start( event, index ); 24849 if ( allowed === false ) { 24850 return false; 24851 } 24852 this._mouseSliding = true; 24853 24854 this._handleIndex = index; 24855 24856 this._addClass( closestHandle, null, "ui-state-active" ); 24857 closestHandle.trigger( "focus" ); 24858 24859 offset = closestHandle.offset(); 24860 mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" ); 24861 this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { 24862 left: event.pageX - offset.left - ( closestHandle.width() / 2 ), 24863 top: event.pageY - offset.top - 24864 ( closestHandle.height() / 2 ) - 24865 ( parseInt( closestHandle.css( "borderTopWidth" ), 10 ) || 0 ) - 24866 ( parseInt( closestHandle.css( "borderBottomWidth" ), 10 ) || 0 ) + 24867 ( parseInt( closestHandle.css( "marginTop" ), 10 ) || 0 ) 24868 }; 24869 24870 if ( !this.handles.hasClass( "ui-state-hover" ) ) { 24871 this._slide( event, index, normValue ); 24872 } 24873 this._animateOff = true; 24874 return true; 24875 }, 24876 24877 _mouseStart: function() { 24878 return true; 24879 }, 24880 24881 _mouseDrag: function( event ) { 24882 var position = { x: event.pageX, y: event.pageY }, 24883 normValue = this._normValueFromMouse( position ); 24884 24885 this._slide( event, this._handleIndex, normValue ); 24886 24887 return false; 24888 }, 24889 24890 _mouseStop: function( event ) { 24891 this._removeClass( this.handles, null, "ui-state-active" ); 24892 this._mouseSliding = false; 24893 24894 this._stop( event, this._handleIndex ); 24895 this._change( event, this._handleIndex ); 24896 24897 this._handleIndex = null; 24898 this._clickOffset = null; 24899 this._animateOff = false; 24900 24901 return false; 24902 }, 24903 24904 _detectOrientation: function() { 24905 this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal"; 24906 }, 24907 24908 _normValueFromMouse: function( position ) { 24909 var pixelTotal, 24910 pixelMouse, 24911 percentMouse, 24912 valueTotal, 24913 valueMouse; 24914 24915 if ( this.orientation === "horizontal" ) { 24916 pixelTotal = this.elementSize.width; 24917 pixelMouse = position.x - this.elementOffset.left - 24918 ( this._clickOffset ? this._clickOffset.left : 0 ); 24919 } else { 24920 pixelTotal = this.elementSize.height; 24921 pixelMouse = position.y - this.elementOffset.top - 24922 ( this._clickOffset ? this._clickOffset.top : 0 ); 24923 } 24924 24925 percentMouse = ( pixelMouse / pixelTotal ); 24926 if ( percentMouse > 1 ) { 24927 percentMouse = 1; 24928 } 24929 if ( percentMouse < 0 ) { 24930 percentMouse = 0; 24931 } 24932 if ( this.orientation === "vertical" ) { 24933 percentMouse = 1 - percentMouse; 24934 } 24935 24936 valueTotal = this._valueMax() - this._valueMin(); 24937 valueMouse = this._valueMin() + percentMouse * valueTotal; 24938 24939 return this._trimAlignValue( valueMouse ); 24940 }, 24941 24942 _uiHash: function( index, value, values ) { 24943 var uiHash = { 24944 handle: this.handles[ index ], 24945 handleIndex: index, 24946 value: value !== undefined ? value : this.value() 24947 }; 24948 24949 if ( this._hasMultipleValues() ) { 24950 uiHash.value = value !== undefined ? value : this.values( index ); 24951 uiHash.values = values || this.values(); 24952 } 24953 24954 return uiHash; 24955 }, 24956 24957 _hasMultipleValues: function() { 24958 return this.options.values && this.options.values.length; 24959 }, 24960 24961 _start: function( event, index ) { 24962 return this._trigger( "start", event, this._uiHash( index ) ); 24963 }, 24964 24965 _slide: function( event, index, newVal ) { 24966 var allowed, otherVal, 24967 currentValue = this.value(), 24968 newValues = this.values(); 24969 24970 if ( this._hasMultipleValues() ) { 24971 otherVal = this.values( index ? 0 : 1 ); 24972 currentValue = this.values( index ); 24973 24974 if ( this.options.values.length === 2 && this.options.range === true ) { 24975 newVal = index === 0 ? Math.min( otherVal, newVal ) : Math.max( otherVal, newVal ); 24976 } 24977 24978 newValues[ index ] = newVal; 24979 } 24980 24981 if ( newVal === currentValue ) { 24982 return; 24983 } 24984 24985 allowed = this._trigger( "slide", event, this._uiHash( index, newVal, newValues ) ); 24986 24987 // A slide can be canceled by returning false from the slide callback 24988 if ( allowed === false ) { 24989 return; 24990 } 24991 24992 if ( this._hasMultipleValues() ) { 24993 this.values( index, newVal ); 24994 } else { 24995 this.value( newVal ); 24996 } 24997 }, 24998 24999 _stop: function( event, index ) { 25000 this._trigger( "stop", event, this._uiHash( index ) ); 25001 }, 25002 25003 _change: function( event, index ) { 25004 if ( !this._keySliding && !this._mouseSliding ) { 25005 25006 //store the last changed value index for reference when handles overlap 25007 this._lastChangedValue = index; 25008 this._trigger( "change", event, this._uiHash( index ) ); 25009 } 25010 }, 25011 25012 value: function( newValue ) { 25013 if ( arguments.length ) { 25014 this.options.value = this._trimAlignValue( newValue ); 25015 this._refreshValue(); 25016 this._change( null, 0 ); 25017 return; 25018 } 25019
vendor: 4,358 bytes, lines 25020-25192
25020 return this._value(); 25021 }, 25022 25023 values: function( index, newValue ) { 25024 var vals, 25025 newValues, 25026 i; 25027 25028 if ( arguments.length > 1 ) { 25029 this.options.values[ index ] = this._trimAlignValue( newValue ); 25030 this._refreshValue(); 25031 this._change( null, index ); 25032 return; 25033 } 25034 25035 if ( arguments.length ) { 25036 if ( Array.isArray( arguments[ 0 ] ) ) { 25037 vals = this.options.values; 25038 newValues = arguments[ 0 ]; 25039 for ( i = 0; i < vals.length; i += 1 ) { 25040 vals[ i ] = this._trimAlignValue( newValues[ i ] ); 25041 this._change( null, i ); 25042 } 25043 this._refreshValue(); 25044 } else { 25045 if ( this._hasMultipleValues() ) { 25046 return this._values( index ); 25047 } else { 25048 return this.value(); 25049 } 25050 } 25051 } else { 25052 return this._values(); 25053 } 25054 }, 25055 25056 _setOption: function( key, value ) { 25057 var i, 25058 valsLength = 0; 25059 25060 if ( key === "range" && this.options.range === true ) { 25061 if ( value === "min" ) { 25062 this.options.value = this._values( 0 ); 25063 this.options.values = null; 25064 } else if ( value === "max" ) { 25065 this.options.value = this._values( this.options.values.length - 1 ); 25066 this.options.values = null; 25067 } 25068 } 25069 25070 if ( Array.isArray( this.options.values ) ) { 25071 valsLength = this.options.values.length; 25072 } 25073 25074 this._super( key, value ); 25075 25076 switch ( key ) { 25077 case "orientation": 25078 this._detectOrientation(); 25079 this._removeClass( "ui-slider-horizontal ui-slider-vertical" ) 25080 ._addClass( "ui-slider-" + this.orientation ); 25081 this._refreshValue(); 25082 if ( this.options.range ) { 25083 this._refreshRange( value ); 25084 } 25085 25086 // Reset positioning from previous orientation 25087 this.handles.css( value === "horizontal" ? "bottom" : "left", "" ); 25088 break; 25089 case "value": 25090 this._animateOff = true; 25091 this._refreshValue(); 25092 this._change( null, 0 ); 25093 this._animateOff = false; 25094 break; 25095 case "values": 25096 this._animateOff = true; 25097 this._refreshValue(); 25098 25099 // Start from the last handle to prevent unreachable handles (#9046) 25100 for ( i = valsLength - 1; i >= 0; i-- ) { 25101 this._change( null, i ); 25102 } 25103 this._animateOff = false; 25104 break; 25105 case "step": 25106 case "min": 25107 case "max": 25108 this._animateOff = true; 25109 this._calculateNewMax(); 25110 this._refreshValue(); 25111 this._animateOff = false; 25112 break; 25113 case "range": 25114 this._animateOff = true; 25115 this._refresh(); 25116 this._animateOff = false; 25117 break; 25118 } 25119 }, 25120 25121 _setOptionDisabled: function( value ) { 25122 this._super( value ); 25123 25124 this._toggleClass( null, "ui-state-disabled", !!value ); 25125 }, 25126 25127 //internal value getter 25128 // _value() returns value trimmed by min and max, aligned by step 25129 _value: function() { 25130 var val = this.options.value; 25131 val = this._trimAlignValue( val ); 25132 25133 return val; 25134 }, 25135 25136 //internal values getter 25137 // _values() returns array of values trimmed by min and max, aligned by step 25138 // _values( index ) returns single value trimmed by min and max, aligned by step 25139 _values: function( index ) { 25140 var val, 25141 vals, 25142 i; 25143 25144 if ( arguments.length ) { 25145 val = this.options.values[ index ]; 25146 val = this._trimAlignValue( val ); 25147 25148 return val; 25149 } else if ( this._hasMultipleValues() ) { 25150 25151 // .slice() creates a copy of the array 25152 // this copy gets trimmed by min and max and then returned 25153 vals = this.options.values.slice(); 25154 for ( i = 0; i < vals.length; i += 1 ) { 25155 vals[ i ] = this._trimAlignValue( vals[ i ] ); 25156 } 25157 25158 return vals; 25159 } else { 25160 return []; 25161 } 25162 }, 25163 25164 // Returns the step-aligned value that val is closest to, between (inclusive) min and max 25165 _trimAlignValue: function( val ) { 25166 if ( val <= this._valueMin() ) { 25167 return this._valueMin(); 25168 } 25169 if ( val >= this._valueMax() ) { 25170 return this._valueMax(); 25171 } 25172 var step = ( this.options.step > 0 ) ? this.options.step : 1, 25173 valModStep = ( val - this._valueMin() ) % step, 25174 alignValue = val - valModStep; 25175 25176 if ( Math.abs( valModStep ) * 2 >= step ) { 25177 alignValue += ( valModStep > 0 ) ? step : ( -step ); 25178 } 25179 25180 // Since JavaScript has problems with large floats, round 25181 // the final value to 5 digits after the decimal point (see #4124) 25182 return parseFloat( alignValue.toFixed( 5 ) ); 25183 }, 25184 25185 _calculateNewMax: function() { 25186 var max = this.options.max, 25187 min = this._valueMin(), 25188 step = this.options.step, 25189 aboveMin = Math.round( ( max - min ) / step ) * step; 25190 max = aboveMin + min; 25191 if ( max > this.options.max ) { 25192
vendor: 5,583 bytes, lines 25193-25392
25193 //If max is not divisible by step, rounding off may increase its value 25194 max -= step; 25195 } 25196 this.max = parseFloat( max.toFixed( this._precision() ) ); 25197 }, 25198 25199 _precision: function() { 25200 var precision = this._precisionOf( this.options.step ); 25201 if ( this.options.min !== null ) { 25202 precision = Math.max( precision, this._precisionOf( this.options.min ) ); 25203 } 25204 return precision; 25205 }, 25206 25207 _precisionOf: function( num ) { 25208 var str = num.toString(), 25209 decimal = str.indexOf( "." ); 25210 return decimal === -1 ? 0 : str.length - decimal - 1; 25211 }, 25212 25213 _valueMin: function() { 25214 return this.options.min; 25215 }, 25216 25217 _valueMax: function() { 25218 return this.max; 25219 }, 25220 25221 _refreshRange: function( orientation ) { 25222 if ( orientation === "vertical" ) { 25223 this.range.css( { "width": "", "left": "" } ); 25224 } 25225 if ( orientation === "horizontal" ) { 25226 this.range.css( { "height": "", "bottom": "" } ); 25227 } 25228 }, 25229 25230 _refreshValue: function() { 25231 var lastValPercent, valPercent, value, valueMin, valueMax, 25232 oRange = this.options.range, 25233 o = this.options, 25234 that = this, 25235 animate = ( !this._animateOff ) ? o.animate : false, 25236 _set = {}; 25237 25238 if ( this._hasMultipleValues() ) { 25239 this.handles.each( function( i ) { 25240 valPercent = ( that.values( i ) - that._valueMin() ) / ( that._valueMax() - 25241 that._valueMin() ) * 100; 25242 _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; 25243 $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); 25244 if ( that.options.range === true ) { 25245 if ( that.orientation === "horizontal" ) { 25246 if ( i === 0 ) { 25247 that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 25248 left: valPercent + "%" 25249 }, o.animate ); 25250 } 25251 if ( i === 1 ) { 25252 that.range[ animate ? "animate" : "css" ]( { 25253 width: ( valPercent - lastValPercent ) + "%" 25254 }, { 25255 queue: false, 25256 duration: o.animate 25257 } ); 25258 } 25259 } else { 25260 if ( i === 0 ) { 25261 that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 25262 bottom: ( valPercent ) + "%" 25263 }, o.animate ); 25264 } 25265 if ( i === 1 ) { 25266 that.range[ animate ? "animate" : "css" ]( { 25267 height: ( valPercent - lastValPercent ) + "%" 25268 }, { 25269 queue: false, 25270 duration: o.animate 25271 } ); 25272 } 25273 } 25274 } 25275 lastValPercent = valPercent; 25276 } ); 25277 } else { 25278 value = this.value(); 25279 valueMin = this._valueMin(); 25280 valueMax = this._valueMax(); 25281 valPercent = ( valueMax !== valueMin ) ? 25282 ( value - valueMin ) / ( valueMax - valueMin ) * 100 : 25283 0; 25284 _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; 25285 this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); 25286 25287 if ( oRange === "min" && this.orientation === "horizontal" ) { 25288 this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 25289 width: valPercent + "%" 25290 }, o.animate ); 25291 } 25292 if ( oRange === "max" && this.orientation === "horizontal" ) { 25293 this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 25294 width: ( 100 - valPercent ) + "%" 25295 }, o.animate ); 25296 } 25297 if ( oRange === "min" && this.orientation === "vertical" ) { 25298 this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 25299 height: valPercent + "%" 25300 }, o.animate ); 25301 } 25302 if ( oRange === "max" && this.orientation === "vertical" ) { 25303 this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 25304 height: ( 100 - valPercent ) + "%" 25305 }, o.animate ); 25306 } 25307 } 25308 }, 25309 25310 _handleEvents: { 25311 keydown: function( event ) { 25312 var allowed, curVal, newVal, step, 25313 index = $( event.target ).data( "ui-slider-handle-index" ); 25314 25315 switch ( event.keyCode ) { 25316 case $.ui.keyCode.HOME: 25317 case $.ui.keyCode.END: 25318 case $.ui.keyCode.PAGE_UP: 25319 case $.ui.keyCode.PAGE_DOWN: 25320 case $.ui.keyCode.UP: 25321 case $.ui.keyCode.RIGHT: 25322 case $.ui.keyCode.DOWN: 25323 case $.ui.keyCode.LEFT: 25324 event.preventDefault(); 25325 if ( !this._keySliding ) { 25326 this._keySliding = true; 25327 this._addClass( $( event.target ), null, "ui-state-active" ); 25328 allowed = this._start( event, index ); 25329 if ( allowed === false ) { 25330 return; 25331 } 25332 } 25333 break; 25334 } 25335 25336 step = this.options.step; 25337 if ( this._hasMultipleValues() ) { 25338 curVal = newVal = this.values( index ); 25339 } else { 25340 curVal = newVal = this.value(); 25341 } 25342 25343 switch ( event.keyCode ) { 25344 case $.ui.keyCode.HOME: 25345 newVal = this._valueMin(); 25346 break; 25347 case $.ui.keyCode.END: 25348 newVal = this._valueMax(); 25349 break; 25350 case $.ui.keyCode.PAGE_UP: 25351 newVal = this._trimAlignValue( 25352 curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages ) 25353 ); 25354 break; 25355 case $.ui.keyCode.PAGE_DOWN: 25356 newVal = this._trimAlignValue( 25357 curVal - ( ( this._valueMax() - this._valueMin() ) / this.numPages ) ); 25358 break; 25359 case $.ui.keyCode.UP: 25360 case $.ui.keyCode.RIGHT: 25361 if ( curVal === this._valueMax() ) { 25362 return; 25363 } 25364 newVal = this._trimAlignValue( curVal + step ); 25365 break; 25366 case $.ui.keyCode.DOWN: 25367 case $.ui.keyCode.LEFT: 25368 if ( curVal === this._valueMin() ) { 25369 return; 25370 } 25371 newVal = this._trimAlignValue( curVal - step ); 25372 break; 25373 } 25374 25375 this._slide( event, index, newVal ); 25376 }, 25377 keyup: function( event ) { 25378 var index = $( event.target ).data( "ui-slider-handle-index" ); 25379 25380 if ( this._keySliding ) { 25381 this._keySliding = false; 25382 this._stop( event, index ); 25383 this._change( event, index ); 25384 this._removeClass( $( event.target ), null, "ui-state-active" ); 25385 } 25386 } 25387 } 25388} ); 25389 25390 25391/*! 25392 * jQuery UI S
25392pinner 1.13.2 25393 * http://jqueryui.com 25394 * 25395 * Copyright jQuery Foundation and other contributors 25396 * Released under the MIT license. 25397 * http://jquery.org/license 25398 */ 25399 25400//>>label: Spinner 25401//>>group: Widgets 25402//>>description: Displays buttons to easily input numbers via the keyboard or mouse. 25403//>>docs: http://api.jqueryui.com/spinner/ 25404//>>demos: http://jqueryui.com/spinner/ 25405//>>css.structure: ../../themes/base/core.css 25406//>>css.structure: ../../themes/base/spinner.css 25407//>>css.theme: ../../themes/base/theme.css 25408 25409 25410function spinnerModifier( fn ) { 25411 return function() { 25412 var previous = this.element.val(); 25413 fn.apply( this, arguments ); 25414 this._refresh(); 25415 if ( previous !== this.element.val() ) { 25416 this._trigger( "change" ); 25417 } 25418 }; 25419} 25420 25421$.widget( "ui.spinner", { 25422 version: "1.13.2
vendor: 13,310 bytes, lines 25422-25953
25422", 25423 defaultElement: "<input>", 25424 widgetEventPrefix: "spin", 25425 options: { 25426 classes: { 25427 "ui-spinner": "ui-corner-all", 25428 "ui-spinner-down": "ui-corner-br", 25429 "ui-spinner-up": "ui-corner-tr" 25430 }, 25431 culture: null, 25432 icons: { 25433 down: "ui-icon-triangle-1-s", 25434 up: "ui-icon-triangle-1-n" 25435 }, 25436 incremental: true, 25437 max: null, 25438 min: null, 25439 numberFormat: null, 25440 page: 10, 25441 step: 1, 25442 25443 change: null, 25444 spin: null, 25445 start: null, 25446 stop: null 25447 }, 25448 25449 _create: function() { 25450 25451 // handle string values that need to be parsed 25452 this._setOption( "max", this.options.max ); 25453 this._setOption( "min", this.options.min ); 25454 this._setOption( "step", this.options.step ); 25455 25456 // Only format if there is a value, prevents the field from being marked 25457 // as invalid in Firefox, see #9573. 25458 if ( this.value() !== "" ) { 25459 25460 // Format the value, but don't constrain. 25461 this._value( this.element.val(), true ); 25462 } 25463 25464 this._draw(); 25465 this._on( this._events ); 25466 this._refresh(); 25467 25468 // Turning off autocomplete prevents the browser from remembering the 25469 // value when navigating through history, so we re-enable autocomplete 25470 // if the page is unloaded before the widget is destroyed. #7790 25471 this._on( this.window, { 25472 beforeunload: function() { 25473 this.element.removeAttr( "autocomplete" ); 25474 } 25475 } ); 25476 }, 25477 25478 _getCreateOptions: function() { 25479 var options = this._super(); 25480 var element = this.element; 25481 25482 $.each( [ "min", "max", "step" ], function( i, option ) { 25483 var value = element.attr( option ); 25484 if ( value != null && value.length ) { 25485 options[ option ] = value; 25486 } 25487 } ); 25488 25489 return options; 25490 }, 25491 25492 _events: { 25493 keydown: function( event ) { 25494 if ( this._start( event ) && this._keydown( event ) ) { 25495 event.preventDefault(); 25496 } 25497 }, 25498 keyup: "_stop", 25499 focus: function() { 25500 this.previous = this.element.val(); 25501 }, 25502 blur: function( event ) { 25503 if ( this.cancelBlur ) { 25504 delete this.cancelBlur; 25505 return; 25506 } 25507 25508 this._stop(); 25509 this._refresh(); 25510 if ( this.previous !== this.element.val() ) { 25511 this._trigger( "change", event ); 25512 } 25513 }, 25514 mousewheel: function( event, delta ) { 25515 var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ); 25516 var isActive = this.element[ 0 ] === activeElement; 25517 25518 if ( !isActive || !delta ) { 25519 return; 25520 } 25521 25522 if ( !this.spinning && !this._start( event ) ) { 25523 return false; 25524 } 25525 25526 this._spin( ( delta > 0 ? 1 : -1 ) * this.options.step, event ); 25527 clearTimeout( this.mousewheelTimer ); 25528 this.mousewheelTimer = this._delay( function() { 25529 if ( this.spinning ) { 25530 this._stop( event ); 25531 } 25532 }, 100 ); 25533 event.preventDefault(); 25534 }, 25535 "mousedown .ui-spinner-button": function( event ) { 25536 var previous; 25537 25538 // We never want the buttons to have focus; whenever the user is 25539 // interacting with the spinner, the focus should be on the input. 25540 // If the input is focused then this.previous is properly set from 25541 // when the input first received focus. If the input is not focused 25542 // then we need to set this.previous based on the value before spinning. 25543 previous = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] ) ? 25544 this.previous : this.element.val(); 25545 function checkFocus() { 25546 var isActive = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] ); 25547 if ( !isActive ) { 25548 this.element.trigger( "focus" ); 25549 this.previous = previous; 25550 25551 // support: IE 25552 // IE sets focus asynchronously, so we need to check if focus 25553 // moved off of the input because the user clicked on the button. 25554 this._delay( function() { 25555 this.previous = previous; 25556 } ); 25557 } 25558 } 25559 25560 // Ensure focus is on (or stays on) the text field 25561 event.preventDefault(); 25562 checkFocus.call( this ); 25563 25564 // Support: IE 25565 // IE doesn't prevent moving focus even with event.preventDefault() 25566 // so we set a flag to know when we should ignore the blur event 25567 // and check (again) if focus moved off of the input. 25568 this.cancelBlur = true; 25569 this._delay( function() { 25570 delete this.cancelBlur; 25571 checkFocus.call( this ); 25572 } ); 25573 25574 if ( this._start( event ) === false ) { 25575 return; 25576 } 25577 25578 this._repeat( null, $( event.currentTarget ) 25579 .hasClass( "ui-spinner-up" ) ? 1 : -1, event ); 25580 }, 25581 "mouseup .ui-spinner-button": "_stop", 25582 "mouseenter .ui-spinner-button": function( event ) { 25583 25584 // button will add ui-state-active if mouse was down while mouseleave and kept down 25585 if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) { 25586 return; 25587 } 25588 25589 if ( this._start( event ) === false ) { 25590 return false; 25591 } 25592 this._repeat( null, $( event.currentTarget ) 25593 .hasClass( "ui-spinner-up" ) ? 1 : -1, event ); 25594 }, 25595 25596 // TODO: do we really want to consider this a stop? 25597 // shouldn't we just stop the repeater and wait until mouseup before 25598 // we trigger the stop event? 25599 "mouseleave .ui-spinner-button": "_stop" 25600 }, 25601 25602 // Support mobile enhanced option and make backcompat more sane 25603 _enhance: function() { 25604 this.uiSpinner = this.element 25605 .attr( "autocomplete", "off" ) 25606 .wrap( "<span>" ) 25607 .parent() 25608 25609 // Add buttons 25610 .append( 25611 "<a></a><a></a>" 25612 ); 25613 }, 25614 25615 _draw: function() { 25616 this._enhance(); 25617 25618 this._addClass( this.uiSpinner, "ui-spinner", "ui-widget ui-widget-content" ); 25619 this._addClass( "ui-spinner-input" ); 25620 25621 this.element.attr( "role", "spinbutton" ); 25622 25623 // Button bindings 25624 this.buttons = this.uiSpinner.children( "a" ) 25625 .attr( "tabIndex", -1 ) 25626 .attr( "aria-hidden", true ) 25627 .button( { 25628 classes: { 25629 "ui-button": "" 25630 } 25631 } ); 25632 25633 // TODO: Right now button does not support classes this is already updated in button PR 25634 this._removeClass( this.buttons, "ui-corner-all" ); 25635 25636 this._addClass( this.buttons.first(), "ui-spinner-button ui-spinner-up" ); 25637 this._addClass( this.buttons.last(), "ui-spinner-button ui-spinner-down" ); 25638 this.buttons.first().button( { 25639 "icon": this.options.icons.up, 25640 "showLabel": false 25641 } ); 25642 this.buttons.last().button( { 25643 "icon": this.options.icons.down, 25644 "showLabel": false 25645 } ); 25646 25647 // IE 6 doesn't understand height: 50% for the buttons 25648 // unless the wrapper has an explicit height 25649 if ( this.buttons.height() > Math.ceil( this.uiSpinner.height() * 0.5 ) && 25650 this.uiSpinner.height() > 0 ) { 25651 this.uiSpinner.height( this.uiSpinner.height() ); 25652 } 25653 }, 25654 25655 _keydown: function( event ) { 25656 var options = this.options, 25657 keyCode = $.ui.keyCode; 25658 25659 switch ( event.keyCode ) { 25660 case keyCode.UP: 25661 this._repeat( null, 1, event ); 25662 return true; 25663 case keyCode.DOWN: 25664 this._repeat( null, -1, event ); 25665 return true; 25666 case keyCode.PAGE_UP: 25667 this._repeat( null, options.page, event ); 25668 return true; 25669 case keyCode.PAGE_DOWN: 25670 this._repeat( null, -options.page, event ); 25671 return true; 25672 } 25673 25674 return false; 25675 }, 25676 25677 _start: function( event ) { 25678 if ( !this.spinning && this._trigger( "start", event ) === false ) { 25679 return false; 25680 } 25681 25682 if ( !this.counter ) { 25683 this.counter = 1; 25684 } 25685 this.spinning = true; 25686 return true; 25687 }, 25688 25689 _repeat: function( i, steps, event ) { 25690 i = i || 500; 25691 25692 clearTimeout( this.timer ); 25693 this.timer = this._delay( function() { 25694 this._repeat( 40, steps, event ); 25695 }, i ); 25696 25697 this._spin( steps * this.options.step, event ); 25698 }, 25699 25700 _spin: function( step, event ) { 25701 var value = this.value() || 0; 25702 25703 if ( !this.counter ) { 25704 this.counter = 1; 25705 } 25706 25707 value = this._adjustValue( value + step * this._increment( this.counter ) ); 25708 25709 if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false ) { 25710 this._value( value ); 25711 this.counter++; 25712 } 25713 }, 25714 25715 _increment: function( i ) { 25716 var incremental = this.options.incremental; 25717 25718 if ( incremental ) { 25719 return typeof incremental === "function" ? 25720 incremental( i ) : 25721 Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 ); 25722 } 25723 25724 return 1; 25725 }, 25726 25727 _precision: function() { 25728 var precision = this._precisionOf( this.options.step ); 25729 if ( this.options.min !== null ) { 25730 precision = Math.max( precision, this._precisionOf( this.options.min ) ); 25731 } 25732 return precision; 25733 }, 25734 25735 _precisionOf: function( num ) { 25736 var str = num.toString(), 25737 decimal = str.indexOf( "." ); 25738 return decimal === -1 ? 0 : str.length - decimal - 1; 25739 }, 25740 25741 _adjustValue: function( value ) { 25742 var base, aboveMin, 25743 options = this.options; 25744 25745 // Make sure we're at a valid step 25746 // - find out where we are relative to the base (min or 0) 25747 base = options.min !== null ? options.min : 0; 25748 aboveMin = value - base; 25749 25750 // - round to the nearest step 25751 aboveMin = Math.round( aboveMin / options.step ) * options.step; 25752 25753 // - rounding is based on 0, so adjust back to our base 25754 value = base + aboveMin; 25755 25756 // Fix precision from bad JS floating point math 25757 value = parseFloat( value.toFixed( this._precision() ) ); 25758 25759 // Clamp the value 25760 if ( options.max !== null && value > options.max ) { 25761 return options.max; 25762 } 25763 if ( options.min !== null && value < options.min ) { 25764 return options.min; 25765 } 25766 25767 return value; 25768 }, 25769 25770 _stop: function( event ) { 25771 if ( !this.spinning ) { 25772 return; 25773 } 25774 25775 clearTimeout( this.timer ); 25776 clearTimeout( this.mousewheelTimer ); 25777 this.counter = 0; 25778 this.spinning = false; 25779 this._trigger( "stop", event ); 25780 }, 25781 25782 _setOption: function( key, value ) { 25783 var prevValue, first, last; 25784 25785 if ( key === "culture" || key === "numberFormat" ) { 25786 prevValue = this._parse( this.element.val() ); 25787 this.options[ key ] = value; 25788 this.element.val( this._format( prevValue ) ); 25789 return; 25790 } 25791 25792 if ( key === "max" || key === "min" || key === "step" ) { 25793 if ( typeof value === "string" ) { 25794 value = this._parse( value ); 25795 } 25796 } 25797 if ( key === "icons" ) { 25798 first = this.buttons.first().find( ".ui-icon" ); 25799 this._removeClass( first, null, this.options.icons.up ); 25800 this._addClass( first, null, value.up ); 25801 last = this.buttons.last().find( ".ui-icon" ); 25802 this._removeClass( last, null, this.options.icons.down ); 25803 this._addClass( last, null, value.down ); 25804 } 25805 25806 this._super( key, value ); 25807 }, 25808 25809 _setOptionDisabled: function( value ) { 25810 this._super( value ); 25811 25812 this._toggleClass( this.uiSpinner, null, "ui-state-disabled", !!value ); 25813 this.element.prop( "disabled", !!value ); 25814 this.buttons.button( value ? "disable" : "enable" ); 25815 }, 25816 25817 _setOptions: spinnerModifier( function( options ) { 25818 this._super( options ); 25819 } ), 25820 25821 _parse: function( val ) { 25822 if ( typeof val === "string" && val !== "" ) { 25823 val = window.Globalize && this.options.numberFormat ? 25824 Globalize.parseFloat( val, 10, this.options.culture ) : +val; 25825 } 25826 return val === "" || isNaN( val ) ? null : val; 25827 }, 25828 25829 _format: function( value ) { 25830 if ( value === "" ) { 25831 return ""; 25832 } 25833 return window.Globalize && this.options.numberFormat ? 25834 Globalize.format( value, this.options.numberFormat, this.options.culture ) : 25835 value; 25836 }, 25837 25838 _refresh: function() { 25839 this.element.attr( { 25840 "aria-valuemin": this.options.min, 25841 "aria-valuemax": this.options.max, 25842 25843 // TODO: what should we do with values that can't be parsed? 25844 "aria-valuenow": this._parse( this.element.val() ) 25845 } ); 25846 }, 25847 25848 isValid: function() { 25849 var value = this.value(); 25850 25851 // Null is invalid 25852 if ( value === null ) { 25853 return false; 25854 } 25855 25856 // If value gets adjusted, it's invalid 25857 return value === this._adjustValue( value ); 25858 }, 25859 25860 // Update the value without triggering change 25861 _value: function( value, allowAny ) { 25862 var parsed; 25863 if ( value !== "" ) { 25864 parsed = this._parse( value ); 25865 if ( parsed !== null ) { 25866 if ( !allowAny ) { 25867 parsed = this._adjustValue( parsed ); 25868 } 25869 value = this._format( parsed ); 25870 } 25871 } 25872 this.element.val( value ); 25873 this._refresh(); 25874 }, 25875 25876 _destroy: function() { 25877 this.element 25878 .prop( "disabled", false ) 25879 .removeAttr( "autocomplete role aria-valuemin aria-valuemax aria-valuenow" ); 25880 25881 this.uiSpinner.replaceWith( this.element ); 25882 }, 25883 25884 stepUp: spinnerModifier( function( steps ) { 25885 this._stepUp( steps ); 25886 } ), 25887 _stepUp: function( steps ) { 25888 if ( this._start() ) { 25889 this._spin( ( steps || 1 ) * this.options.step ); 25890 this._stop(); 25891 } 25892 }, 25893 25894 stepDown: spinnerModifier( function( steps ) { 25895 this._stepDown( steps ); 25896 } ), 25897 _stepDown: function( steps ) { 25898 if ( this._start() ) { 25899 this._spin( ( steps || 1 ) * -this.options.step ); 25900 this._stop(); 25901 } 25902 }, 25903 25904 pageUp: spinnerModifier( function( pages ) { 25905 this._stepUp( ( pages || 1 ) * this.options.page ); 25906 } ), 25907 25908 pageDown: spinnerModifier( function( pages ) { 25909 this._stepDown( ( pages || 1 ) * this.options.page ); 25910 } ), 25911 25912 value: function( newVal ) { 25913 if ( !arguments.length ) { 25914 return this._parse( this.element.val() ); 25915 } 25916 spinnerModifier( this._value ).call( this, newVal ); 25917 }, 25918 25919 widget: function() { 25920 return this.uiSpinner; 25921 } 25922} ); 25923 25924// DEPRECATED 25925// TODO: switch return back to widget declaration at top of file when this is removed 25926if ( $.uiBackCompat !== false ) { 25927 25928 // Backcompat for spinner html extension points 25929 $.widget( "ui.spinner", $.ui.spinner, { 25930 _enhance: function() { 25931 this.uiSpinner = this.element 25932 .attr( "autocomplete", "off" ) 25933 .wrap( this._uiSpinnerHtml() ) 25934 .parent() 25935 25936 // Add buttons 25937 .append( this._buttonHtml() ); 25938 }, 25939 _uiSpinnerHtml: function() { 25940 return "<span>"; 25941 }, 25942 25943 _buttonHtml: function() { 25944 return "<a></a><a></a>"; 25945 } 25946 } ); 25947} 25948 25949var widgetsSpinner = $.ui.spinner; 25950 25951 25952/*! 25953 * jQuery UI Tabs 1.13.
259532 25954 * http://jqueryui.com 25955 * 25956 * Copyright jQuery Foundation and other contributors 25957 * Released under the MIT license. 25958 * http://jquery.org/license 25959 */ 25960 25961//>>label: Tabs 25962//>>group: Widgets 25963//>>description: Transforms a set of container elements into a tab structure. 25964//>>docs: http://api.jqueryui.com/tabs/ 25965//>>demos: http://jqueryui.com/tabs/ 25966//>>css.structure: ../../themes/base/core.css 25967//>>css.structure: ../../themes/base/tabs.css 25968//>>css.theme: ../../themes/base/theme.css 25969 25970 25971$.widget( "ui.tabs", { 25972 version: "1.13.2
vendor: 12,261 bytes, lines 25972-26439
25972", 25973 delay: 300, 25974 options: { 25975 active: null, 25976 classes: { 25977 "ui-tabs": "ui-corner-all", 25978 "ui-tabs-nav": "ui-corner-all", 25979 "ui-tabs-panel": "ui-corner-bottom", 25980 "ui-tabs-tab": "ui-corner-top" 25981 }, 25982 collapsible: false, 25983 event: "click", 25984 heightStyle: "content", 25985 hide: null, 25986 show: null, 25987 25988 // Callbacks 25989 activate: null, 25990 beforeActivate: null, 25991 beforeLoad: null, 25992 load: null 25993 }, 25994 25995 _isLocal: ( function() { 25996 var rhash = /#.*$/; 25997 25998 return function( anchor ) { 25999 var anchorUrl, locationUrl; 26000 26001 anchorUrl = anchor.href.replace( rhash, "" ); 26002 locationUrl = location.href.replace( rhash, "" ); 26003 26004 // Decoding may throw an error if the URL isn't UTF-8 (#9518) 26005 try { 26006 anchorUrl = decodeURIComponent( anchorUrl ); 26007 } catch ( error ) {} 26008 try { 26009 locationUrl = decodeURIComponent( locationUrl ); 26010 } catch ( error ) {} 26011 26012 return anchor.hash.length > 1 && anchorUrl === locationUrl; 26013 }; 26014 } )(), 26015 26016 _create: function() { 26017 var that = this, 26018 options = this.options; 26019 26020 this.running = false; 26021 26022 this._addClass( "ui-tabs", "ui-widget ui-widget-content" ); 26023 this._toggleClass( "ui-tabs-collapsible", null, options.collapsible ); 26024 26025 this._processTabs(); 26026 options.active = this._initialActive(); 26027 26028 // Take disabling tabs via class attribute from HTML 26029 // into account and update option properly. 26030 if ( Array.isArray( options.disabled ) ) { 26031 options.disabled = $.uniqueSort( options.disabled.concat( 26032 $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) { 26033 return that.tabs.index( li ); 26034 } ) 26035 ) ).sort(); 26036 } 26037 26038 // Check for length avoids error when initializing empty list 26039 if ( this.options.active !== false && this.anchors.length ) { 26040 this.active = this._findActive( options.active ); 26041 } else { 26042 this.active = $(); 26043 } 26044 26045 this._refresh(); 26046 26047 if ( this.active.length ) { 26048 this.load( options.active ); 26049 } 26050 }, 26051 26052 _initialActive: function() { 26053 var active = this.options.active, 26054 collapsible = this.options.collapsible, 26055 locationHash = location.hash.substring( 1 ); 26056 26057 if ( active === null ) { 26058 26059 // check the fragment identifier in the URL 26060 if ( locationHash ) { 26061 this.tabs.each( function( i, tab ) { 26062 if ( $( tab ).attr( "aria-controls" ) === locationHash ) { 26063 active = i; 26064 return false; 26065 } 26066 } ); 26067 } 26068 26069 // Check for a tab marked active via a class 26070 if ( active === null ) { 26071 active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) ); 26072 } 26073 26074 // No active tab, set to false 26075 if ( active === null || active === -1 ) { 26076 active = this.tabs.length ? 0 : false; 26077 } 26078 } 26079 26080 // Handle numbers: negative, out of range 26081 if ( active !== false ) { 26082 active = this.tabs.index( this.tabs.eq( active ) ); 26083 if ( active === -1 ) { 26084 active = collapsible ? false : 0; 26085 } 26086 } 26087 26088 // Don't allow collapsible: false and active: false 26089 if ( !collapsible && active === false && this.anchors.length ) { 26090 active = 0; 26091 } 26092 26093 return active; 26094 }, 26095 26096 _getCreateEventData: function() { 26097 return { 26098 tab: this.active, 26099 panel: !this.active.length ? $() : this._getPanelForTab( this.active ) 26100 }; 26101 }, 26102 26103 _tabKeydown: function( event ) { 26104 var focusedTab = $( $.ui.safeActiveElement( this.document[ 0 ] ) ).closest( "li" ), 26105 selectedIndex = this.tabs.index( focusedTab ), 26106 goingForward = true; 26107 26108 if ( this._handlePageNav( event ) ) { 26109 return; 26110 } 26111 26112 switch ( event.keyCode ) { 26113 case $.ui.keyCode.RIGHT: 26114 case $.ui.keyCode.DOWN: 26115 selectedIndex++; 26116 break; 26117 case $.ui.keyCode.UP: 26118 case $.ui.keyCode.LEFT: 26119 goingForward = false; 26120 selectedIndex--; 26121 break; 26122 case $.ui.keyCode.END: 26123 selectedIndex = this.anchors.length - 1; 26124 break; 26125 case $.ui.keyCode.HOME: 26126 selectedIndex = 0; 26127 break; 26128 case $.ui.keyCode.SPACE: 26129 26130 // Activate only, no collapsing 26131 event.preventDefault(); 26132 clearTimeout( this.activating ); 26133 this._activate( selectedIndex ); 26134 return; 26135 case $.ui.keyCode.ENTER: 26136 26137 // Toggle (cancel delayed activation, allow collapsing) 26138 event.preventDefault(); 26139 clearTimeout( this.activating ); 26140 26141 // Determine if we should collapse or activate 26142 this._activate( selectedIndex === this.options.active ? false : selectedIndex ); 26143 return; 26144 default: 26145 return; 26146 } 26147 26148 // Focus the appropriate tab, based on which key was pressed 26149 event.preventDefault(); 26150 clearTimeout( this.activating ); 26151 selectedIndex = this._focusNextTab( selectedIndex, goingForward ); 26152 26153 // Navigating with control/command key will prevent automatic activation 26154 if ( !event.ctrlKey && !event.metaKey ) { 26155 26156 // Update aria-selected immediately so that AT think the tab is already selected. 26157 // Otherwise AT may confuse the user by stating that they need to activate the tab, 26158 // but the tab will already be activated by the time the announcement finishes. 26159 focusedTab.attr( "aria-selected", "false" ); 26160 this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" ); 26161 26162 this.activating = this._delay( function() { 26163 this.option( "active", selectedIndex ); 26164 }, this.delay ); 26165 } 26166 }, 26167 26168 _panelKeydown: function( event ) { 26169 if ( this._handlePageNav( event ) ) { 26170 return; 26171 } 26172 26173 // Ctrl+up moves focus to the current tab 26174 if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) { 26175 event.preventDefault(); 26176 this.active.trigger( "focus" ); 26177 } 26178 }, 26179 26180 // Alt+page up/down moves focus to the previous/next tab (and activates) 26181 _handlePageNav: function( event ) { 26182 if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) { 26183 this._activate( this._focusNextTab( this.options.active - 1, false ) ); 26184 return true; 26185 } 26186 if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) { 26187 this._activate( this._focusNextTab( this.options.active + 1, true ) ); 26188 return true; 26189 } 26190 }, 26191 26192 _findNextTab: function( index, goingForward ) { 26193 var lastTabIndex = this.tabs.length - 1; 26194 26195 function constrain() { 26196 if ( index > lastTabIndex ) { 26197 index = 0; 26198 } 26199 if ( index < 0 ) { 26200 index = lastTabIndex; 26201 } 26202 return index; 26203 } 26204 26205 while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) { 26206 index = goingForward ? index + 1 : index - 1; 26207 } 26208 26209 return index; 26210 }, 26211 26212 _focusNextTab: function( index, goingForward ) { 26213 index = this._findNextTab( index, goingForward ); 26214 this.tabs.eq( index ).trigger( "focus" ); 26215 return index; 26216 }, 26217 26218 _setOption: function( key, value ) { 26219 if ( key === "active" ) { 26220 26221 // _activate() will handle invalid values and update this.options 26222 this._activate( value ); 26223 return; 26224 } 26225 26226 this._super( key, value ); 26227 26228 if ( key === "collapsible" ) { 26229 this._toggleClass( "ui-tabs-collapsible", null, value ); 26230 26231 // Setting collapsible: false while collapsed; open first panel 26232 if ( !value && this.options.active === false ) { 26233 this._activate( 0 ); 26234 } 26235 } 26236 26237 if ( key === "event" ) { 26238 this._setupEvents( value ); 26239 } 26240 26241 if ( key === "heightStyle" ) { 26242 this._setupHeightStyle( value ); 26243 } 26244 }, 26245 26246 _sanitizeSelector: function( hash ) { 26247 return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : ""; 26248 }, 26249 26250 refresh: function() { 26251 var options = this.options, 26252 lis = this.tablist.children( ":has(a[href])" ); 26253 26254 // Get disabled tabs from class attribute from HTML 26255 // this will get converted to a boolean if needed in _refresh() 26256 options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) { 26257 return lis.index( tab ); 26258 } ); 26259 26260 this._processTabs(); 26261 26262 // Was collapsed or no tabs 26263 if ( options.active === false || !this.anchors.length ) { 26264 options.active = false; 26265 this.active = $(); 26266 26267 // was active, but active tab is gone 26268 } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) { 26269 26270 // all remaining tabs are disabled 26271 if ( this.tabs.length === options.disabled.length ) { 26272 options.active = false; 26273 this.active = $(); 26274 26275 // activate previous tab 26276 } else { 26277 this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) ); 26278 } 26279 26280 // was active, active tab still exists 26281 } else { 26282 26283 // make sure active index is correct 26284 options.active = this.tabs.index( this.active ); 26285 } 26286 26287 this._refresh(); 26288 }, 26289 26290 _refresh: function() { 26291 this._setOptionDisabled( this.options.disabled ); 26292 this._setupEvents( this.options.event ); 26293 this._setupHeightStyle( this.options.heightStyle ); 26294 26295 this.tabs.not( this.active ).attr( { 26296 "aria-selected": "false", 26297 "aria-expanded": "false", 26298 tabIndex: -1 26299 } ); 26300 this.panels.not( this._getPanelForTab( this.active ) ) 26301 .hide() 26302 .attr( { 26303 "aria-hidden": "true" 26304 } ); 26305 26306 // Make sure one tab is in the tab order 26307 if ( !this.active.length ) { 26308 this.tabs.eq( 0 ).attr( "tabIndex", 0 ); 26309 } else { 26310 this.active 26311 .attr( { 26312 "aria-selected": "true", 26313 "aria-expanded": "true", 26314 tabIndex: 0 26315 } ); 26316 this._addClass( this.active, "ui-tabs-active", "ui-state-active" ); 26317 this._getPanelForTab( this.active ) 26318 .show() 26319 .attr( { 26320 "aria-hidden": "false" 26321 } ); 26322 } 26323 }, 26324 26325 _processTabs: function() { 26326 var that = this, 26327 prevTabs = this.tabs, 26328 prevAnchors = this.anchors, 26329 prevPanels = this.panels; 26330 26331 this.tablist = this._getList().attr( "role", "tablist" ); 26332 this._addClass( this.tablist, "ui-tabs-nav", 26333 "ui-helper-reset ui-helper-clearfix ui-widget-header" ); 26334 26335 // Prevent users from focusing disabled tabs via click 26336 this.tablist 26337 .on( "mousedown" + this.eventNamespace, "> li", function( event ) { 26338 if ( $( this ).is( ".ui-state-disabled" ) ) { 26339 event.preventDefault(); 26340 } 26341 } ) 26342 26343 // Support: IE <9 26344 // Preventing the default action in mousedown doesn't prevent IE 26345 // from focusing the element, so if the anchor gets focused, blur. 26346 // We don't have to worry about focusing the previously focused 26347 // element since clicking on a non-focusable element should focus 26348 // the body anyway. 26349 .on( "focus" + this.eventNamespace, ".ui-tabs-anchor", function() { 26350 if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) { 26351 this.blur(); 26352 } 26353 } ); 26354 26355 this.tabs = this.tablist.find( "> li:has(a[href])" ) 26356 .attr( { 26357 role: "tab", 26358 tabIndex: -1 26359 } ); 26360 this._addClass( this.tabs, "ui-tabs-tab", "ui-state-default" ); 26361 26362 this.anchors = this.tabs.map( function() { 26363 return $( "a", this )[ 0 ]; 26364 } ) 26365 .attr( { 26366 tabIndex: -1 26367 } ); 26368 this._addClass( this.anchors, "ui-tabs-anchor" ); 26369 26370 this.panels = $(); 26371 26372 this.anchors.each( function( i, anchor ) { 26373 var selector, panel, panelId, 26374 anchorId = $( anchor ).uniqueId().attr( "id" ), 26375 tab = $( anchor ).closest( "li" ), 26376 originalAriaControls = tab.attr( "aria-controls" ); 26377 26378 // Inline tab 26379 if ( that._isLocal( anchor ) ) { 26380 selector = anchor.hash; 26381 panelId = selector.substring( 1 ); 26382 panel = that.element.find( that._sanitizeSelector( selector ) ); 26383 26384 // remote tab 26385 } else { 26386 26387 // If the tab doesn't already have aria-controls, 26388 // generate an id by using a throw-away element 26389 panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id; 26390 selector = "#" + panelId; 26391 panel = that.element.find( selector ); 26392 if ( !panel.length ) { 26393 panel = that._createPanel( panelId ); 26394 panel.insertAfter( that.panels[ i - 1 ] || that.tablist ); 26395 } 26396 panel.attr( "aria-live", "polite" ); 26397 } 26398 26399 if ( panel.length ) { 26400 that.panels = that.panels.add( panel ); 26401 } 26402 if ( originalAriaControls ) { 26403 tab.data( "ui-tabs-aria-controls", originalAriaControls ); 26404 } 26405 tab.attr( { 26406 "aria-controls": panelId, 26407 "aria-labelledby": anchorId 26408 } ); 26409 panel.attr( "aria-labelledby", anchorId ); 26410 } ); 26411 26412 this.panels.attr( "role", "tabpanel" ); 26413 this._addClass( this.panels, "ui-tabs-panel", "ui-widget-content" ); 26414 26415 // Avoid memory leaks (#10056) 26416 if ( prevTabs ) { 26417 this._off( prevTabs.not( this.tabs ) ); 26418 this._off( prevAnchors.not( this.anchors ) ); 26419 this._off( prevPanels.not( this.panels ) ); 26420 } 26421 }, 26422 26423 // Allow overriding how to find the list for rare usage scenarios (#7715) 26424 _getList: function() { 26425 return this.tablist || this.element.find( "ol, ul" ).eq( 0 ); 26426 }, 26427 26428 _createPanel: function( id ) { 26429 return $( "<div>" ) 26430 .attr( "id", id ) 26431 .data( "ui-tabs-destroy", true ); 26432 }, 26433 26434 _setOptionDisabled: function( disabled ) { 26435 var currentItem, li, i; 26436 26437 if ( Array.isArray( disabled ) ) { 26438 if ( !disabled.length ) { 26439 disabled = false;
vendor: 6,148 bytes, lines 26440-26668
26440 } else if ( disabled.length === this.anchors.length ) { 26441 disabled = true; 26442 } 26443 } 26444 26445 // Disable tabs 26446 for ( i = 0; ( li = this.tabs[ i ] ); i++ ) { 26447 currentItem = $( li ); 26448 if ( disabled === true || $.inArray( i, disabled ) !== -1 ) { 26449 currentItem.attr( "aria-disabled", "true" ); 26450 this._addClass( currentItem, null, "ui-state-disabled" ); 26451 } else { 26452 currentItem.removeAttr( "aria-disabled" ); 26453 this._removeClass( currentItem, null, "ui-state-disabled" ); 26454 } 26455 } 26456 26457 this.options.disabled = disabled; 26458 26459 this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, 26460 disabled === true ); 26461 }, 26462 26463 _setupEvents: function( event ) { 26464 var events = {}; 26465 if ( event ) { 26466 $.each( event.split( " " ), function( index, eventName ) { 26467 events[ eventName ] = "_eventHandler"; 26468 } ); 26469 } 26470 26471 this._off( this.anchors.add( this.tabs ).add( this.panels ) ); 26472 26473 // Always prevent the default action, even when disabled 26474 this._on( true, this.anchors, { 26475 click: function( event ) { 26476 event.preventDefault(); 26477 } 26478 } ); 26479 this._on( this.anchors, events ); 26480 this._on( this.tabs, { keydown: "_tabKeydown" } ); 26481 this._on( this.panels, { keydown: "_panelKeydown" } ); 26482 26483 this._focusable( this.tabs ); 26484 this._hoverable( this.tabs ); 26485 }, 26486 26487 _setupHeightStyle: function( heightStyle ) { 26488 var maxHeight, 26489 parent = this.element.parent(); 26490 26491 if ( heightStyle === "fill" ) { 26492 maxHeight = parent.height(); 26493 maxHeight -= this.element.outerHeight() - this.element.height(); 26494 26495 this.element.siblings( ":visible" ).each( function() { 26496 var elem = $( this ), 26497 position = elem.css( "position" ); 26498 26499 if ( position === "absolute" || position === "fixed" ) { 26500 return; 26501 } 26502 maxHeight -= elem.outerHeight( true ); 26503 } ); 26504 26505 this.element.children().not( this.panels ).each( function() { 26506 maxHeight -= $( this ).outerHeight( true ); 26507 } ); 26508 26509 this.panels.each( function() { 26510 $( this ).height( Math.max( 0, maxHeight - 26511 $( this ).innerHeight() + $( this ).height() ) ); 26512 } ) 26513 .css( "overflow", "auto" ); 26514 } else if ( heightStyle === "auto" ) { 26515 maxHeight = 0; 26516 this.panels.each( function() { 26517 maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() ); 26518 } ).height( maxHeight ); 26519 } 26520 }, 26521 26522 _eventHandler: function( event ) { 26523 var options = this.options, 26524 active = this.active, 26525 anchor = $( event.currentTarget ), 26526 tab = anchor.closest( "li" ), 26527 clickedIsActive = tab[ 0 ] === active[ 0 ], 26528 collapsing = clickedIsActive && options.collapsible, 26529 toShow = collapsing ? $() : this._getPanelForTab( tab ), 26530 toHide = !active.length ? $() : this._getPanelForTab( active ), 26531 eventData = { 26532 oldTab: active, 26533 oldPanel: toHide, 26534 newTab: collapsing ? $() : tab, 26535 newPanel: toShow 26536 }; 26537 26538 event.preventDefault(); 26539 26540 if ( tab.hasClass( "ui-state-disabled" ) || 26541 26542 // tab is already loading 26543 tab.hasClass( "ui-tabs-loading" ) || 26544 26545 // can't switch durning an animation 26546 this.running || 26547 26548 // click on active header, but not collapsible 26549 ( clickedIsActive && !options.collapsible ) || 26550 26551 // allow canceling activation 26552 ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { 26553 return; 26554 } 26555 26556 options.active = collapsing ? false : this.tabs.index( tab ); 26557 26558 this.active = clickedIsActive ? $() : tab; 26559 if ( this.xhr ) { 26560 this.xhr.abort(); 26561 } 26562 26563 if ( !toHide.length && !toShow.length ) { 26564 $.error( "jQuery UI Tabs: Mismatching fragment identifier." ); 26565 } 26566 26567 if ( toShow.length ) { 26568 this.load( this.tabs.index( tab ), event ); 26569 } 26570 this._toggle( event, eventData ); 26571 }, 26572 26573 // Handles show/hide for selecting tabs 26574 _toggle: function( event, eventData ) { 26575 var that = this, 26576 toShow = eventData.newPanel, 26577 toHide = eventData.oldPanel; 26578 26579 this.running = true; 26580 26581 function complete() { 26582 that.running = false; 26583 that._trigger( "activate", event, eventData ); 26584 } 26585 26586 function show() { 26587 that._addClass( eventData.newTab.closest( "li" ), "ui-tabs-active", "ui-state-active" ); 26588 26589 if ( toShow.length && that.options.show ) { 26590 that._show( toShow, that.options.show, complete ); 26591 } else { 26592 toShow.show(); 26593 complete(); 26594 } 26595 } 26596 26597 // Start out by hiding, then showing, then completing 26598 if ( toHide.length && this.options.hide ) { 26599 this._hide( toHide, this.options.hide, function() { 26600 that._removeClass( eventData.oldTab.closest( "li" ), 26601 "ui-tabs-active", "ui-state-active" ); 26602 show(); 26603 } ); 26604 } else { 26605 this._removeClass( eventData.oldTab.closest( "li" ), 26606 "ui-tabs-active", "ui-state-active" ); 26607 toHide.hide(); 26608 show(); 26609 } 26610 26611 toHide.attr( "aria-hidden", "true" ); 26612 eventData.oldTab.attr( { 26613 "aria-selected": "false", 26614 "aria-expanded": "false" 26615 } ); 26616 26617 // If we're switching tabs, remove the old tab from the tab order. 26618 // If we're opening from collapsed state, remove the previous tab from the tab order. 26619 // If we're collapsing, then keep the collapsing tab in the tab order. 26620 if ( toShow.length && toHide.length ) { 26621 eventData.oldTab.attr( "tabIndex", -1 ); 26622 } else if ( toShow.length ) { 26623 this.tabs.filter( function() { 26624 return $( this ).attr( "tabIndex" ) === 0; 26625 } ) 26626 .attr( "tabIndex", -1 ); 26627 } 26628 26629 toShow.attr( "aria-hidden", "false" ); 26630 eventData.newTab.attr( { 26631 "aria-selected": "true", 26632 "aria-expanded": "true", 26633 tabIndex: 0 26634 } ); 26635 }, 26636 26637 _activate: function( index ) { 26638 var anchor, 26639 active = this._findActive( index ); 26640 26641 // Trying to activate the already active panel 26642 if ( active[ 0 ] === this.active[ 0 ] ) { 26643 return; 26644 } 26645 26646 // Trying to collapse, simulate a click on the current active header 26647 if ( !active.length ) { 26648 active = this.active; 26649 } 26650 26651 anchor = active.find( ".ui-tabs-anchor" )[ 0 ]; 26652 this._eventHandler( { 26653 target: anchor, 26654 currentTarget: anchor, 26655 preventDefault: $.noop 26656 } ); 26657 }, 26658 26659 _findActive: function( index ) { 26660 return index === false ? $() : this.tabs.eq( index ); 26661 }, 26662 26663 _getIndex: function( index ) { 26664 26665 // meta-function to give users option to provide a href string instead of a numerical index. 26666 if ( typeof index === "string" ) { 26667 index = this.anchors.index( this.anchors.filter( "[href$='" + 26668 $.
vendor: 4,911 bytes, lines 26668-26876
26668escapeSelector( index ) + "']" ) ); 26669 } 26670 26671 return index; 26672 }, 26673 26674 _destroy: function() { 26675 if ( this.xhr ) { 26676 this.xhr.abort(); 26677 } 26678 26679 this.tablist 26680 .removeAttr( "role" ) 26681 .off( this.eventNamespace ); 26682 26683 this.anchors 26684 .removeAttr( "role tabIndex" ) 26685 .removeUniqueId(); 26686 26687 this.tabs.add( this.panels ).each( function() { 26688 if ( $.data( this, "ui-tabs-destroy" ) ) { 26689 $( this ).remove(); 26690 } else { 26691 $( this ).removeAttr( "role tabIndex " + 26692 "aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded" ); 26693 } 26694 } ); 26695 26696 this.tabs.each( function() { 26697 var li = $( this ), 26698 prev = li.data( "ui-tabs-aria-controls" ); 26699 if ( prev ) { 26700 li 26701 .attr( "aria-controls", prev ) 26702 .removeData( "ui-tabs-aria-controls" ); 26703 } else { 26704 li.removeAttr( "aria-controls" ); 26705 } 26706 } ); 26707 26708 this.panels.show(); 26709 26710 if ( this.options.heightStyle !== "content" ) { 26711 this.panels.css( "height", "" ); 26712 } 26713 }, 26714 26715 enable: function( index ) { 26716 var disabled = this.options.disabled; 26717 if ( disabled === false ) { 26718 return; 26719 } 26720 26721 if ( index === undefined ) { 26722 disabled = false; 26723 } else { 26724 index = this._getIndex( index ); 26725 if ( Array.isArray( disabled ) ) { 26726 disabled = $.map( disabled, function( num ) { 26727 return num !== index ? num : null; 26728 } ); 26729 } else { 26730 disabled = $.map( this.tabs, function( li, num ) { 26731 return num !== index ? num : null; 26732 } ); 26733 } 26734 } 26735 this._setOptionDisabled( disabled ); 26736 }, 26737 26738 disable: function( index ) { 26739 var disabled = this.options.disabled; 26740 if ( disabled === true ) { 26741 return; 26742 } 26743 26744 if ( index === undefined ) { 26745 disabled = true; 26746 } else { 26747 index = this._getIndex( index ); 26748 if ( $.inArray( index, disabled ) !== -1 ) { 26749 return; 26750 } 26751 if ( Array.isArray( disabled ) ) { 26752 disabled = $.merge( [ index ], disabled ).sort(); 26753 } else { 26754 disabled = [ index ]; 26755 } 26756 } 26757 this._setOptionDisabled( disabled ); 26758 }, 26759 26760 load: function( index, event ) { 26761 index = this._getIndex( index ); 26762 var that = this, 26763 tab = this.tabs.eq( index ), 26764 anchor = tab.find( ".ui-tabs-anchor" ), 26765 panel = this._getPanelForTab( tab ), 26766 eventData = { 26767 tab: tab, 26768 panel: panel 26769 }, 26770 complete = function( jqXHR, status ) { 26771 if ( status === "abort" ) { 26772 that.panels.stop( false, true ); 26773 } 26774 26775 that._removeClass( tab, "ui-tabs-loading" ); 26776 panel.removeAttr( "aria-busy" ); 26777 26778 if ( jqXHR === that.xhr ) { 26779 delete that.xhr; 26780 } 26781 }; 26782 26783 // Not remote 26784 if ( this._isLocal( anchor[ 0 ] ) ) { 26785 return; 26786 } 26787 26788 this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) ); 26789 26790 // Support: jQuery <1.8 26791 // jQuery <1.8 returns false if the request is canceled in beforeSend, 26792 // but as of 1.8, $.ajax() always returns a jqXHR object. 26793 if ( this.xhr && this.xhr.statusText !== "canceled" ) { 26794 this._addClass( tab, "ui-tabs-loading" ); 26795 panel.attr( "aria-busy", "true" ); 26796 26797 this.xhr 26798 .done( function( response, status, jqXHR ) { 26799 26800 // support: jQuery <1.8 26801 // http://bugs.jquery.com/ticket/11778 26802 setTimeout( function() { 26803 panel.html( response ); 26804 that._trigger( "load", event, eventData ); 26805 26806 complete( jqXHR, status ); 26807 }, 1 ); 26808 } ) 26809 .fail( function( jqXHR, status ) { 26810 26811 // support: jQuery <1.8 26812 // http://bugs.jquery.com/ticket/11778 26813 setTimeout( function() { 26814 complete( jqXHR, status ); 26815 }, 1 ); 26816 } ); 26817 } 26818 }, 26819 26820 _ajaxSettings: function( anchor, event, eventData ) { 26821 var that = this; 26822 return { 26823 26824 // Support: IE <11 only 26825 // Strip any hash that exists to prevent errors with the Ajax request 26826 url: anchor.attr( "href" ).replace( /#.*$/, "" ), 26827 beforeSend: function( jqXHR, settings ) { 26828 return that._trigger( "beforeLoad", event, 26829 $.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) ); 26830 } 26831 }; 26832 }, 26833 26834 _getPanelForTab: function( tab ) { 26835 var id = $( tab ).attr( "aria-controls" ); 26836 return this.element.find( this._sanitizeSelector( "#" + id ) ); 26837 } 26838} ); 26839 26840// DEPRECATED 26841// TODO: Switch return back to widget declaration at top of file when this is removed 26842if ( $.uiBackCompat !== false ) { 26843 26844 // Backcompat for ui-tab class (now ui-tabs-tab) 26845 $.widget( "ui.tabs", $.ui.tabs, { 26846 _processTabs: function() { 26847 this._superApply( arguments ); 26848 this._addClass( this.tabs, "ui-tab" ); 26849 } 26850 } ); 26851} 26852 26853var widgetsTabs = $.ui.tabs; 26854 26855 26856/*! 26857 * jQuery UI Tooltip 1.13.2 26858 * http://jqueryui.com 26859 * 26860 * Copyright jQuery Foundation and other contributors 26861 * Released under the MIT license. 26862 * http://jquery.org/license 26863 */ 26864 26865//>>label: Tooltip 26866//>>group: Widgets 26867//>>description: Shows additional information for any element on hover or focus. 26868//>>docs: http://api.jqueryui.com/tooltip/ 26869//>>demos: http://jqueryui.com/tooltip/ 26870//>>css.structure: ../../themes/base/core.css 26871//>>css.structure: ../../themes/base/tooltip.css 26872//>>css.theme: ../../themes/base/theme.css 26873 26874 26875$.widget( "ui.tooltip", { 26876 version: "1.13.2
vendor: 13,562 bytes, lines 26876-27362
26876", 26877 options: { 26878 classes: { 26879 "ui-tooltip": "ui-corner-all ui-widget-shadow" 26880 }, 26881 content: function() { 26882 var title = $( this ).attr( "title" ); 26883 26884 // Escape title, since we're going from an attribute to raw HTML 26885 return $( "<a>" ).text( title ).html(); 26886 }, 26887 hide: true, 26888 26889 // Disabled elements have inconsistent behavior across browsers (#8661) 26890 items: "[title]:not([disabled])", 26891 position: { 26892 my: "left top+15", 26893 at: "left bottom", 26894 collision: "flipfit flip" 26895 }, 26896 show: true, 26897 track: false, 26898 26899 // Callbacks 26900 close: null, 26901 open: null 26902 }, 26903 26904 _addDescribedBy: function( elem, id ) { 26905 var describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ ); 26906 describedby.push( id ); 26907 elem 26908 .data( "ui-tooltip-id", id ) 26909 .attr( "aria-describedby", String.prototype.trim.call( describedby.join( " " ) ) ); 26910 }, 26911 26912 _removeDescribedBy: function( elem ) { 26913 var id = elem.data( "ui-tooltip-id" ), 26914 describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ ), 26915 index = $.inArray( id, describedby ); 26916 26917 if ( index !== -1 ) { 26918 describedby.splice( index, 1 ); 26919 } 26920 26921 elem.removeData( "ui-tooltip-id" ); 26922 describedby = String.prototype.trim.call( describedby.join( " " ) ); 26923 if ( describedby ) { 26924 elem.attr( "aria-describedby", describedby ); 26925 } else { 26926 elem.removeAttr( "aria-describedby" ); 26927 } 26928 }, 26929 26930 _create: function() { 26931 this._on( { 26932 mouseover: "open", 26933 focusin: "open" 26934 } ); 26935 26936 // IDs of generated tooltips, needed for destroy 26937 this.tooltips = {}; 26938 26939 // IDs of parent tooltips where we removed the title attribute 26940 this.parents = {}; 26941 26942 // Append the aria-live region so tooltips announce correctly 26943 this.liveRegion = $( "<div>" ) 26944 .attr( { 26945 role: "log", 26946 "aria-live": "assertive", 26947 "aria-relevant": "additions" 26948 } ) 26949 .appendTo( this.document[ 0 ].body ); 26950 this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" ); 26951 26952 this.disabledTitles = $( [] ); 26953 }, 26954 26955 _setOption: function( key, value ) { 26956 var that = this; 26957 26958 this._super( key, value ); 26959 26960 if ( key === "content" ) { 26961 $.each( this.tooltips, function( id, tooltipData ) { 26962 that._updateContent( tooltipData.element ); 26963 } ); 26964 } 26965 }, 26966 26967 _setOptionDisabled: function( value ) { 26968 this[ value ? "_disable" : "_enable" ](); 26969 }, 26970 26971 _disable: function() { 26972 var that = this; 26973 26974 // Close open tooltips 26975 $.each( this.tooltips, function( id, tooltipData ) { 26976 var event = $.Event( "blur" ); 26977 event.target = event.currentTarget = tooltipData.element[ 0 ]; 26978 that.close( event, true ); 26979 } ); 26980 26981 // Remove title attributes to prevent native tooltips 26982 this.disabledTitles = this.disabledTitles.add( 26983 this.element.find( this.options.items ).addBack() 26984 .filter( function() { 26985 var element = $( this ); 26986 if ( element.is( "[title]" ) ) { 26987 return element 26988 .data( "ui-tooltip-title", element.attr( "title" ) ) 26989 .removeAttr( "title" ); 26990 } 26991 } ) 26992 ); 26993 }, 26994 26995 _enable: function() { 26996 26997 // restore title attributes 26998 this.disabledTitles.each( function() { 26999 var element = $( this ); 27000 if ( element.data( "ui-tooltip-title" ) ) { 27001 element.attr( "title", element.data( "ui-tooltip-title" ) ); 27002 } 27003 } ); 27004 this.disabledTitles = $( [] ); 27005 }, 27006 27007 open: function( event ) { 27008 var that = this, 27009 target = $( event ? event.target : this.element ) 27010 27011 // we need closest here due to mouseover bubbling, 27012 // but always pointing at the same event target 27013 .closest( this.options.items ); 27014 27015 // No element to show a tooltip for or the tooltip is already open 27016 if ( !target.length || target.data( "ui-tooltip-id" ) ) { 27017 return; 27018 } 27019 27020 if ( target.attr( "title" ) ) { 27021 target.data( "ui-tooltip-title", target.attr( "title" ) ); 27022 } 27023 27024 target.data( "ui-tooltip-open", true ); 27025 27026 // Kill parent tooltips, custom or native, for hover 27027 if ( event && event.type === "mouseover" ) { 27028 target.parents().each( function() { 27029 var parent = $( this ), 27030 blurEvent; 27031 if ( parent.data( "ui-tooltip-open" ) ) { 27032 blurEvent = $.Event( "blur" ); 27033 blurEvent.target = blurEvent.currentTarget = this; 27034 that.close( blurEvent, true ); 27035 } 27036 if ( parent.attr( "title" ) ) { 27037 parent.uniqueId(); 27038 that.parents[ this.id ] = { 27039 element: this, 27040 title: parent.attr( "title" ) 27041 }; 27042 parent.attr( "title", "" ); 27043 } 27044 } ); 27045 } 27046 27047 this._registerCloseHandlers( event, target ); 27048 this._updateContent( target, event ); 27049 }, 27050 27051 _updateContent: function( target, event ) { 27052 var content, 27053 contentOption = this.options.content, 27054 that = this, 27055 eventType = event ? event.type : null; 27056 27057 if ( typeof contentOption === "string" || contentOption.nodeType || 27058 contentOption.jquery ) { 27059 return this._open( event, target, contentOption ); 27060 } 27061 27062 content = contentOption.call( target[ 0 ], function( response ) { 27063 27064 // IE may instantly serve a cached response for ajax requests 27065 // delay this call to _open so the other call to _open runs first 27066 that._delay( function() { 27067 27068 // Ignore async response if tooltip was closed already 27069 if ( !target.data( "ui-tooltip-open" ) ) { 27070 return; 27071 } 27072 27073 // JQuery creates a special event for focusin when it doesn't 27074 // exist natively. To improve performance, the native event 27075 // object is reused and the type is changed. Therefore, we can't 27076 // rely on the type being correct after the event finished 27077 // bubbling, so we set it back to the previous value. (#8740) 27078 if ( event ) { 27079 event.type = eventType; 27080 } 27081 this._open( event, target, response ); 27082 } ); 27083 } ); 27084 if ( content ) { 27085 this._open( event, target, content ); 27086 } 27087 }, 27088 27089 _open: function( event, target, content ) { 27090 var tooltipData, tooltip, delayedShow, a11yContent, 27091 positionOption = $.extend( {}, this.options.position ); 27092 27093 if ( !content ) { 27094 return; 27095 } 27096 27097 // Content can be updated multiple times. If the tooltip already 27098 // exists, then just update the content and bail. 27099 tooltipData = this._find( target ); 27100 if ( tooltipData ) { 27101 tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content ); 27102 return; 27103 } 27104 27105 // If we have a title, clear it to prevent the native tooltip 27106 // we have to check first to avoid defining a title if none exists 27107 // (we don't want to cause an element to start matching [title]) 27108 // 27109 // We use removeAttr only for key events, to allow IE to export the correct 27110 // accessible attributes. For mouse events, set to empty string to avoid 27111 // native tooltip showing up (happens only when removing inside mouseover). 27112 if ( target.is( "[title]" ) ) { 27113 if ( event && event.type === "mouseover" ) { 27114 target.attr( "title", "" ); 27115 } else { 27116 target.removeAttr( "title" ); 27117 } 27118 } 27119 27120 tooltipData = this._tooltip( target ); 27121 tooltip = tooltipData.tooltip; 27122 this._addDescribedBy( target, tooltip.attr( "id" ) ); 27123 tooltip.find( ".ui-tooltip-content" ).html( content ); 27124 27125 // Support: Voiceover on OS X, JAWS on IE <= 9 27126 // JAWS announces deletions even when aria-relevant="additions" 27127 // Voiceover will sometimes re-read the entire log region's contents from the beginning 27128 this.liveRegion.children().hide(); 27129 a11yContent = $( "<div>" ).html( tooltip.find( ".ui-tooltip-content" ).html() ); 27130 a11yContent.removeAttr( "name" ).find( "[name]" ).removeAttr( "name" ); 27131 a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" ); 27132 a11yContent.appendTo( this.liveRegion ); 27133 27134 function position( event ) { 27135 positionOption.of = event; 27136 if ( tooltip.is( ":hidden" ) ) { 27137 return; 27138 } 27139 tooltip.position( positionOption ); 27140 } 27141 if ( this.options.track && event && /^mouse/.test( event.type ) ) { 27142 this._on( this.document, { 27143 mousemove: position 27144 } ); 27145 27146 // trigger once to override element-relative positioning 27147 position( event ); 27148 } else { 27149 tooltip.position( $.extend( { 27150 of: target 27151 }, this.options.position ) ); 27152 } 27153 27154 tooltip.hide(); 27155 27156 this._show( tooltip, this.options.show ); 27157 27158 // Handle tracking tooltips that are shown with a delay (#8644). As soon 27159 // as the tooltip is visible, position the tooltip using the most recent 27160 // event. 27161 // Adds the check to add the timers only when both delay and track options are set (#14682) 27162 if ( this.options.track && this.options.show && this.options.show.delay ) { 27163 delayedShow = this.delayedShow = setInterval( function() { 27164 if ( tooltip.is( ":visible" ) ) { 27165 position( positionOption.of ); 27166 clearInterval( delayedShow ); 27167 } 27168 }, 13 ); 27169 } 27170 27171 this._trigger( "open", event, { tooltip: tooltip } ); 27172 }, 27173 27174 _registerCloseHandlers: function( event, target ) { 27175 var events = { 27176 keyup: function( event ) { 27177 if ( event.keyCode === $.ui.keyCode.ESCAPE ) { 27178 var fakeEvent = $.Event( event ); 27179 fakeEvent.currentTarget = target[ 0 ]; 27180 this.close( fakeEvent, true ); 27181 } 27182 } 27183 }; 27184 27185 // Only bind remove handler for delegated targets. Non-delegated 27186 // tooltips will handle this in destroy. 27187 if ( target[ 0 ] !== this.element[ 0 ] ) { 27188 events.remove = function() { 27189 var targetElement = this._find( target ); 27190 if ( targetElement ) { 27191 this._removeTooltip( targetElement.tooltip ); 27192 } 27193 }; 27194 } 27195 27196 if ( !event || event.type === "mouseover" ) { 27197 events.mouseleave = "close"; 27198 } 27199 if ( !event || event.type === "focusin" ) { 27200 events.focusout = "close"; 27201 } 27202 this._on( true, target, events ); 27203 }, 27204 27205 close: function( event ) { 27206 var tooltip, 27207 that = this, 27208 target = $( event ? event.currentTarget : this.element ), 27209 tooltipData = this._find( target ); 27210 27211 // The tooltip may already be closed 27212 if ( !tooltipData ) { 27213 27214 // We set ui-tooltip-open immediately upon open (in open()), but only set the 27215 // additional data once there's actually content to show (in _open()). So even if the 27216 // tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in 27217 // the period between open() and _open(). 27218 target.removeData( "ui-tooltip-open" ); 27219 return; 27220 } 27221 27222 tooltip = tooltipData.tooltip; 27223 27224 // Disabling closes the tooltip, so we need to track when we're closing 27225 // to avoid an infinite loop in case the tooltip becomes disabled on close 27226 if ( tooltipData.closing ) { 27227 return; 27228 } 27229 27230 // Clear the interval for delayed tracking tooltips 27231 clearInterval( this.delayedShow ); 27232 27233 // Only set title if we had one before (see comment in _open()) 27234 // If the title attribute has changed since open(), don't restore 27235 if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) { 27236 target.attr( "title", target.data( "ui-tooltip-title" ) ); 27237 } 27238 27239 this._removeDescribedBy( target ); 27240 27241 tooltipData.hiding = true; 27242 tooltip.stop( true ); 27243 this._hide( tooltip, this.options.hide, function() { 27244 that._removeTooltip( $( this ) ); 27245 } ); 27246 27247 target.removeData( "ui-tooltip-open" ); 27248 this._off( target, "mouseleave focusout keyup" ); 27249 27250 // Remove 'remove' binding only on delegated targets 27251 if ( target[ 0 ] !== this.element[ 0 ] ) { 27252 this._off( target, "remove" ); 27253 } 27254 this._off( this.document, "mousemove" ); 27255 27256 if ( event && event.type === "mouseleave" ) { 27257 $.each( this.parents, function( id, parent ) { 27258 $( parent.element ).attr( "title", parent.title ); 27259 delete that.parents[ id ]; 27260 } ); 27261 } 27262 27263 tooltipData.closing = true; 27264 this._trigger( "close", event, { tooltip: tooltip } ); 27265 if ( !tooltipData.hiding ) { 27266 tooltipData.closing = false; 27267 } 27268 }, 27269 27270 _tooltip: function( element ) { 27271 var tooltip = $( "<div>" ).attr( "role", "tooltip" ), 27272 content = $( "<div>" ).appendTo( tooltip ), 27273 id = tooltip.uniqueId().attr( "id" ); 27274 27275 this._addClass( content, "ui-tooltip-content" ); 27276 this._addClass( tooltip, "ui-tooltip", "ui-widget ui-widget-content" ); 27277 27278 tooltip.appendTo( this._appendTo( element ) ); 27279 27280 return this.tooltips[ id ] = { 27281 element: element, 27282 tooltip: tooltip 27283 }; 27284 }, 27285 27286 _find: function( target ) { 27287 var id = target.data( "ui-tooltip-id" ); 27288 return id ? this.tooltips[ id ] : null; 27289 }, 27290 27291 _removeTooltip: function( tooltip ) { 27292 27293 // Clear the interval for delayed tracking tooltips 27294 clearInterval( this.delayedShow ); 27295 27296 tooltip.remove(); 27297 delete this.tooltips[ tooltip.attr( "id" ) ]; 27298 }, 27299 27300 _appendTo: function( target ) { 27301 var element = target.closest( ".ui-front, dialog" ); 27302 27303 if ( !element.length ) { 27304 element = this.document[ 0 ].body; 27305 } 27306 27307 return element; 27308 }, 27309 27310 _destroy: function() { 27311 var that = this; 27312 27313 // Close open tooltips 27314 $.each( this.tooltips, function( id, tooltipData ) { 27315 27316 // Delegate to close method to handle common cleanup 27317 var event = $.Event( "blur" ), 27318 element = tooltipData.element; 27319 event.target = event.currentTarget = element[ 0 ]; 27320 that.close( event, true ); 27321 27322 // Remove immediately; destroying an open tooltip doesn't use the 27323 // hide animation 27324 $( "#" + id ).remove(); 27325 27326 // Restore the title 27327 if ( element.data( "ui-tooltip-title" ) ) { 27328 27329 // If the title attribute has changed since open(), don't restore 27330 if ( !element.attr( "title" ) ) { 27331 element.attr( "title", element.data( "ui-tooltip-title" ) ); 27332 } 27333 element.removeData( "ui-tooltip-title" ); 27334 } 27335 } ); 27336 this.liveRegion.remove(); 27337 } 27338} ); 27339 27340// DEPRECATED 27341// TODO: Switch return back to widget declaration at top of file when this is removed 27342if ( $.uiBackCompat !== false ) { 27343 27344 // Backcompat for tooltipClass option 27345 $.widget( "ui.tooltip", $.ui.tooltip, { 27346 options: { 27347 tooltipClass: null 27348 }, 27349 _tooltip: function() { 27350 var tooltipData = this._superApply( arguments ); 27351 if ( this.options.tooltipClass ) { 27352 tooltipData.tooltip.addClass( this.options.tooltipClass ); 27353 } 27354 return tooltipData; 27355 } 27356 } ); 27357} 27358 27359var widgetsTooltip = $.ui.tooltip; 27360 27361 27362
27363// Create a local jQuery because jQuery Color relies on it and the 27364// global may not exist with AMD and a custom build (#10199). 27365// This module is a noop if used as a regular AMD module. 27366// eslint-disable-next-line no-unused-vars 27367var jQuery = $; 27368 27369 27370/*! 27371 * jQuery Color Animations v2.2.0 27372 * https://github.com/jquery/jquery-color 27373 * 27374 * Copyright OpenJS Foundation and other contributors 27375 * Released under the MIT license. 27376 * http
vendor: 16,926 bytes, lines 27376-28083
27376://jquery.org/license 27377 * 27378 * Date: Sun May 10 09:02:36 2020 +0200 27379 */ 27380 27381 27382 27383 var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " + 27384 "borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", 27385 27386 class2type = {}, 27387 toString = class2type.toString, 27388 27389 // plusequals test for += 100 -= 100 27390 rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, 27391 27392 // a set of RE's that can match strings and generate color tuples. 27393 stringParsers = [ { 27394 re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 27395 parse: function( execResult ) { 27396 return [ 27397 execResult[ 1 ], 27398 execResult[ 2 ], 27399 execResult[ 3 ], 27400 execResult[ 4 ] 27401 ]; 27402 } 27403 }, { 27404 re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 27405 parse: function( execResult ) { 27406 return [ 27407 execResult[ 1 ] * 2.55, 27408 execResult[ 2 ] * 2.55, 27409 execResult[ 3 ] * 2.55, 27410 execResult[ 4 ] 27411 ]; 27412 } 27413 }, { 27414 27415 // this regex ignores A-F because it's compared against an already lowercased string 27416 re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/, 27417 parse: function( execResult ) { 27418 return [ 27419 parseInt( execResult[ 1 ], 16 ), 27420 parseInt( execResult[ 2 ], 16 ), 27421 parseInt( execResult[ 3 ], 16 ), 27422 execResult[ 4 ] ? 27423 ( parseInt( execResult[ 4 ], 16 ) / 255 ).toFixed( 2 ) : 27424 1 27425 ]; 27426 } 27427 }, { 27428 27429 // this regex ignores A-F because it's compared against an already lowercased string 27430 re: /#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/, 27431 parse: function( execResult ) { 27432 return [ 27433 parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), 27434 parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), 27435 parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ), 27436 execResult[ 4 ] ? 27437 ( parseInt( execResult[ 4 ] + execResult[ 4 ], 16 ) / 255 ) 27438 .toFixed( 2 ) : 27439 1 27440 ]; 27441 } 27442 }, { 27443 re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 27444 space: "hsla", 27445 parse: function( execResult ) { 27446 return [ 27447 execResult[ 1 ], 27448 execResult[ 2 ] / 100, 27449 execResult[ 3 ] / 100, 27450 execResult[ 4 ] 27451 ]; 27452 } 27453 } ], 27454 27455 // jQuery.Color( ) 27456 color = jQuery.Color = function( color, green, blue, alpha ) { 27457 return new jQuery.Color.fn.parse( color, green, blue, alpha ); 27458 }, 27459 spaces = { 27460 rgba: { 27461 props: { 27462 red: { 27463 idx: 0, 27464 type: "byte" 27465 }, 27466 green: { 27467 idx: 1, 27468 type: "byte" 27469 }, 27470 blue: { 27471 idx: 2, 27472 type: "byte" 27473 } 27474 } 27475 }, 27476 27477 hsla: { 27478 props: { 27479 hue: { 27480 idx: 0, 27481 type: "degrees" 27482 }, 27483 saturation: { 27484 idx: 1, 27485 type: "percent" 27486 }, 27487 lightness: { 27488 idx: 2, 27489 type: "percent" 27490 } 27491 } 27492 } 27493 }, 27494 propTypes = { 27495 "byte": { 27496 floor: true, 27497 max: 255 27498 }, 27499 "percent": { 27500 max: 1 27501 }, 27502 "degrees": { 27503 mod: 360, 27504 floor: true 27505 } 27506 }, 27507 support = color.support = {}, 27508 27509 // element for support tests 27510 supportElem = jQuery( "<p>" )[ 0 ], 27511 27512 // colors = jQuery.Color.names 27513 colors, 27514 27515 // local aliases of functions called often 27516 each = jQuery.each; 27517 27518// determine rgba support immediately 27519supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; 27520support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; 27521 27522// define cache name and alpha properties 27523// for rgba and hsla spaces 27524each( spaces, function( spaceName, space ) { 27525 space.cache = "_" + spaceName; 27526 space.props.alpha = { 27527 idx: 3, 27528 type: "percent", 27529 def: 1 27530 }; 27531} ); 27532 27533// Populate the class2type map 27534jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), 27535 function( _i, name ) { 27536 class2type[ "[object " + name + "]" ] = name.toLowerCase(); 27537 } ); 27538 27539function getType( obj ) { 27540 if ( obj == null ) { 27541 return obj + ""; 27542 } 27543 27544 return typeof obj === "object" ? 27545 class2type[ toString.call( obj ) ] || "object" : 27546 typeof obj; 27547} 27548 27549function clamp( value, prop, allowEmpty ) { 27550 var type = propTypes[ prop.type ] || {}; 27551 27552 if ( value == null ) { 27553 return ( allowEmpty || !prop.def ) ? null : prop.def; 27554 } 27555 27556 // ~~ is an short way of doing floor for positive numbers 27557 value = type.floor ? ~~value : parseFloat( value ); 27558 27559 // IE will pass in empty strings as value for alpha, 27560 // which will hit this case 27561 if ( isNaN( value ) ) { 27562 return prop.def; 27563 } 27564 27565 if ( type.mod ) { 27566 27567 // we add mod before modding to make sure that negatives values 27568 // get converted properly: -10 -> 350 27569 return ( value + type.mod ) % type.mod; 27570 } 27571 27572 // for now all property types without mod have min and max 27573 return Math.min( type.max, Math.max( 0, value ) ); 27574} 27575 27576function stringParse( string ) { 27577 var inst = color(), 27578 rgba = inst._rgba = []; 27579 27580 string = string.toLowerCase(); 27581 27582 each( stringParsers, function( _i, parser ) { 27583 var parsed, 27584 match = parser.re.exec( string ), 27585 values = match && parser.parse( match ), 27586 spaceName = parser.space || "rgba"; 27587 27588 if ( values ) { 27589 parsed = inst[ spaceName ]( values ); 27590 27591 // if this was an rgba parse the assignment might happen twice 27592 // oh well.... 27593 inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; 27594 rgba = inst._rgba = parsed._rgba; 27595 27596 // exit each( stringParsers ) here because we matched 27597 return false; 27598 } 27599 } ); 27600 27601 // Found a stringParser that handled it 27602 if ( rgba.length ) { 27603 27604 // if this came from a parsed string, force "transparent" when alpha is 0 27605 // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) 27606 if ( rgba.join() === "0,0,0,0" ) { 27607 jQuery.extend( rgba, colors.transparent ); 27608 } 27609 return inst; 27610 } 27611 27612 // named colors 27613 return colors[ string ]; 27614} 27615 27616color.fn = jQuery.extend( color.prototype, { 27617 parse: function( red, green, blue, alpha ) { 27618 if ( red === undefined ) { 27619 this._rgba = [ null, null, null, null ]; 27620 return this; 27621 } 27622 if ( red.jquery || red.nodeType ) { 27623 red = jQuery( red ).css( green ); 27624 green = undefined; 27625 } 27626 27627 var inst = this, 27628 type = getType( red ), 27629 rgba = this._rgba = []; 27630 27631 // more than 1 argument specified - assume ( red, green, blue, alpha ) 27632 if ( green !== undefined ) { 27633 red = [ red, green, blue, alpha ]; 27634 type = "array"; 27635 } 27636 27637 if ( type === "string" ) { 27638 return this.parse( stringParse( red ) || colors._default ); 27639 } 27640 27641 if ( type === "array" ) { 27642 each( spaces.rgba.props, function( _key, prop ) { 27643 rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); 27644 } ); 27645 return this; 27646 } 27647 27648 if ( type === "object" ) { 27649 if ( red instanceof color ) { 27650 each( spaces, function( _spaceName, space ) { 27651 if ( red[ space.cache ] ) { 27652 inst[ space.cache ] = red[ space.cache ].slice(); 27653 } 27654 } ); 27655 } else { 27656 each( spaces, function( _spaceName, space ) { 27657 var cache = space.cache; 27658 each( space.props, function( key, prop ) { 27659 27660 // if the cache doesn't exist, and we know how to convert 27661 if ( !inst[ cache ] && space.to ) { 27662 27663 // if the value was null, we don't need to copy it 27664 // if the key was alpha, we don't need to copy it either 27665 if ( key === "alpha" || red[ key ] == null ) { 27666 return; 27667 } 27668 inst[ cache ] = space.to( inst._rgba ); 27669 } 27670 27671 // this is the only case where we allow nulls for ALL properties. 27672 // call clamp with alwaysAllowEmpty 27673 inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); 27674 } ); 27675 27676 // everything defined but alpha? 27677 if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { 27678 27679 // use the default of 1 27680 if ( inst[ cache ][ 3 ] == null ) { 27681 inst[ cache ][ 3 ] = 1; 27682 } 27683 27684 if ( space.from ) { 27685 inst._rgba = space.from( inst[ cache ] ); 27686 } 27687 } 27688 } ); 27689 } 27690 return this; 27691 } 27692 }, 27693 is: function( compare ) { 27694 var is = color( compare ), 27695 same = true, 27696 inst = this; 27697 27698 each( spaces, function( _, space ) { 27699 var localCache, 27700 isCache = is[ space.cache ]; 27701 if ( isCache ) { 27702 localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; 27703 each( space.props, function( _, prop ) { 27704 if ( isCache[ prop.idx ] != null ) { 27705 same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); 27706 return same; 27707 } 27708 } ); 27709 } 27710 return same; 27711 } ); 27712 return same; 27713 }, 27714 _space: function() { 27715 var used = [], 27716 inst = this; 27717 each( spaces, function( spaceName, space ) { 27718 if ( inst[ space.cache ] ) { 27719 used.push( spaceName ); 27720 } 27721 } ); 27722 return used.pop(); 27723 }, 27724 transition: function( other, distance ) { 27725 var end = color( other ), 27726 spaceName = end._space(), 27727 space = spaces[ spaceName ], 27728 startColor = this.alpha() === 0 ? color( "transparent" ) : this, 27729 start = startColor[ space.cache ] || space.to( startColor._rgba ), 27730 result = start.slice(); 27731 27732 end = end[ space.cache ]; 27733 each( space.props, function( _key, prop ) { 27734 var index = prop.idx, 27735 startValue = start[ index ], 27736 endValue = end[ index ], 27737 type = propTypes[ prop.type ] || {}; 27738 27739 // if null, don't override start value 27740 if ( endValue === null ) { 27741 return; 27742 } 27743 27744 // if null - use end 27745 if ( startValue === null ) { 27746 result[ index ] = endValue; 27747 } else { 27748 if ( type.mod ) { 27749 if ( endValue - startValue > type.mod / 2 ) { 27750 startValue += type.mod; 27751 } else if ( startValue - endValue > type.mod / 2 ) { 27752 startValue -= type.mod; 27753 } 27754 } 27755 result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); 27756 } 27757 } ); 27758 return this[ spaceName ]( result ); 27759 }, 27760 blend: function( opaque ) { 27761 27762 // if we are already opaque - return ourself 27763 if ( this._rgba[ 3 ] === 1 ) { 27764 return this; 27765 } 27766 27767 var rgb = this._rgba.slice(), 27768 a = rgb.pop(), 27769 blend = color( opaque )._rgba; 27770 27771 return color( jQuery.map( rgb, function( v, i ) { 27772 return ( 1 - a ) * blend[ i ] + a * v; 27773 } ) ); 27774 }, 27775 toRgbaString: function() { 27776 var prefix = "rgba(", 27777 rgba = jQuery.map( this._rgba, function( v, i ) { 27778 if ( v != null ) { 27779 return v; 27780 } 27781 return i > 2 ? 1 : 0; 27782 } ); 27783 27784 if ( rgba[ 3 ] === 1 ) { 27785 rgba.pop(); 27786 prefix = "rgb("; 27787 } 27788 27789 return prefix + rgba.join() + ")"; 27790 }, 27791 toHslaString: function() { 27792 var prefix = "hsla(", 27793 hsla = jQuery.map( this.hsla(), function( v, i ) { 27794 if ( v == null ) { 27795 v = i > 2 ? 1 : 0; 27796 } 27797 27798 // catch 1 and 2 27799 if ( i && i < 3 ) { 27800 v = Math.round( v * 100 ) + "%"; 27801 } 27802 return v; 27803 } ); 27804 27805 if ( hsla[ 3 ] === 1 ) { 27806 hsla.pop(); 27807 prefix = "hsl("; 27808 } 27809 return prefix + hsla.join() + ")"; 27810 }, 27811 toHexString: function( includeAlpha ) { 27812 var rgba = this._rgba.slice(), 27813 alpha = rgba.pop(); 27814 27815 if ( includeAlpha ) { 27816 rgba.push( ~~( alpha * 255 ) ); 27817 } 27818 27819 return "#" + jQuery.map( rgba, function( v ) { 27820 27821 // default to 0 when nulls exist 27822 v = ( v || 0 ).toString( 16 ); 27823 return v.length === 1 ? "0" + v : v; 27824 } ).join( "" ); 27825 }, 27826 toString: function() { 27827 return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); 27828 } 27829} ); 27830color.fn.parse.prototype = color.fn; 27831 27832// hsla conversions adapted from: 27833// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021 27834 27835function hue2rgb( p, q, h ) { 27836 h = ( h + 1 ) % 1; 27837 if ( h * 6 < 1 ) { 27838 return p + ( q - p ) * h * 6; 27839 } 27840 if ( h * 2 < 1 ) { 27841 return q; 27842 } 27843 if ( h * 3 < 2 ) { 27844 return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6; 27845 } 27846 return p; 27847} 27848 27849spaces.hsla.to = function( rgba ) { 27850 if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { 27851 return [ null, null, null, rgba[ 3 ] ]; 27852 } 27853 var r = rgba[ 0 ] / 255, 27854 g = rgba[ 1 ] / 255, 27855 b = rgba[ 2 ] / 255, 27856 a = rgba[ 3 ], 27857 max = Math.max( r, g, b ), 27858 min = Math.min( r, g, b ), 27859 diff = max - min, 27860 add = max + min, 27861 l = add * 0.5, 27862 h, s; 27863 27864 if ( min === max ) { 27865 h = 0; 27866 } else if ( r === max ) { 27867 h = ( 60 * ( g - b ) / diff ) + 360; 27868 } else if ( g === max ) { 27869 h = ( 60 * ( b - r ) / diff ) + 120; 27870 } else { 27871 h = ( 60 * ( r - g ) / diff ) + 240; 27872 } 27873 27874 // chroma (diff) == 0 means greyscale which, by definition, saturation = 0% 27875 // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add) 27876 if ( diff === 0 ) { 27877 s = 0; 27878 } else if ( l <= 0.5 ) { 27879 s = diff / add; 27880 } else { 27881 s = diff / ( 2 - add ); 27882 } 27883 return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ]; 27884}; 27885 27886spaces.hsla.from = function( hsla ) { 27887 if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { 27888 return [ null, null, null, hsla[ 3 ] ]; 27889 } 27890 var h = hsla[ 0 ] / 360, 27891 s = hsla[ 1 ], 27892 l = hsla[ 2 ], 27893 a = hsla[ 3 ], 27894 q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, 27895 p = 2 * l - q; 27896 27897 return [ 27898 Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), 27899 Math.round( hue2rgb( p, q, h ) * 255 ), 27900 Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), 27901 a 27902 ]; 27903}; 27904 27905 27906each( spaces, function( spaceName, space ) { 27907 var props = space.props, 27908 cache = space.cache, 27909 to = space.to, 27910 from = space.from; 27911 27912 // makes rgba() and hsla() 27913 color.fn[ spaceName ] = function( value ) { 27914 27915 // generate a cache for this space if it doesn't exist 27916 if ( to && !this[ cache ] ) { 27917 this[ cache ] = to( this._rgba ); 27918 } 27919 if ( value === undefined ) { 27920 return this[ cache ].slice(); 27921 } 27922 27923 var ret, 27924 type = getType( value ), 27925 arr = ( type === "array" || type === "object" ) ? value : arguments, 27926 local = this[ cache ].slice(); 27927 27928 each( props, function( key, prop ) { 27929 var val = arr[ type === "object" ? key : prop.idx ]; 27930 if ( val == null ) { 27931 val = local[ prop.idx ]; 27932 } 27933 local[ prop.idx ] = clamp( val, prop ); 27934 } ); 27935 27936 if ( from ) { 27937 ret = color( from( local ) ); 27938 ret[ cache ] = local; 27939 return ret; 27940 } else { 27941 return color( local ); 27942 } 27943 }; 27944 27945 // makes red() green() blue() alpha() hue() saturation() lightness() 27946 each( props, function( key, prop ) { 27947 27948 // alpha is included in more than one space 27949 if ( color.fn[ key ] ) { 27950 return; 27951 } 27952 color.fn[ key ] = function( value ) { 27953 var local, cur, match, fn, 27954 vtype = getType( value ); 27955 27956 if ( key === "alpha" ) { 27957 fn = this._hsla ? "hsla" : "rgba"; 27958 } else { 27959 fn = spaceName; 27960 } 27961 local = this[ fn ](); 27962 cur = local[ prop.idx ]; 27963 27964 if ( vtype === "undefined" ) { 27965 return cur; 27966 } 27967 27968 if ( vtype === "function" ) { 27969 value = value.call( this, cur ); 27970 vtype = getType( value ); 27971 } 27972 if ( value == null && prop.empty ) { 27973 return this; 27974 } 27975 if ( vtype === "string" ) { 27976 match = rplusequals.exec( value ); 27977 if ( match ) { 27978 value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); 27979 } 27980 } 27981 local[ prop.idx ] = value; 27982 return this[ fn ]( local ); 27983 }; 27984 } ); 27985} ); 27986 27987// add cssHook and .fx.step function for each named hook. 27988// accept a space separated string of properties 27989color.hook = function( hook ) { 27990 var hooks = hook.split( " " ); 27991 each( hooks, function( _i, hook ) { 27992 jQuery.cssHooks[ hook ] = { 27993 set: function( elem, value ) { 27994 var parsed, curElem, 27995 backgroundColor = ""; 27996 27997 if ( value !== "transparent" && ( getType( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) { 27998 value = color( parsed || value ); 27999 if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { 28000 curElem = hook === "backgroundColor" ? elem.parentNode : elem; 28001 while ( 28002 ( backgroundColor === "" || backgroundColor === "transparent" ) && 28003 curElem && curElem.style 28004 ) { 28005 try { 28006 backgroundColor = jQuery.css( curElem, "backgroundColor" ); 28007 curElem = curElem.parentNode; 28008 } catch ( e ) { 28009 } 28010 } 28011 28012 value = value.blend( backgroundColor && backgroundColor !== "transparent" ? 28013 backgroundColor : 28014 "_default" ); 28015 } 28016 28017 value = value.toRgbaString(); 28018 } 28019 try { 28020 elem.style[ hook ] = value; 28021 } catch ( e ) { 28022 28023 // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit' 28024 } 28025 } 28026 }; 28027 jQuery.fx.step[ hook ] = function( fx ) { 28028 if ( !fx.colorInit ) { 28029 fx.start = color( fx.elem, hook ); 28030 fx.end = color( fx.end ); 28031 fx.colorInit = true; 28032 } 28033 jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); 28034 }; 28035 } ); 28036 28037}; 28038 28039color.hook( stepHooks ); 28040 28041jQuery.cssHooks.borderColor = { 28042 expand: function( value ) { 28043 var expanded = {}; 28044 28045 each( [ "Top", "Right", "Bottom", "Left" ], function( _i, part ) { 28046 expanded[ "border" + part + "Color" ] = value; 28047 } ); 28048 return expanded; 28049 } 28050}; 28051 28052// Basic color names only. 28053// Usage of any of the other color names requires adding yourself or including 28054// jquery.color.svg-names.js. 28055colors = jQuery.Color.names = { 28056 28057 // 4.1. Basic color keywords 28058 aqua: "#00ffff", 28059 black: "#000000", 28060 blue: "#0000ff", 28061 fuchsia: "#ff00ff", 28062 gray: "#808080", 28063 green: "#008000", 28064 lime: "#00ff00", 28065 maroon: "#800000", 28066 navy: "#000080", 28067 olive: "#808000", 28068 purple: "#800080", 28069 red: "#ff0000", 28070 silver: "#c0c0c0", 28071 teal: "#008080", 28072 white: "#ffffff", 28073 yellow: "#ffff00", 28074 28075 // 4.2.3. "transparent" color keyword 28076 transparent: [ null, null, null, 0 ], 28077 28078 _default: "#ffffff" 28079}; 28080 28081 28082/*! 28083 * jQuery UI Effects 1.13.
280832 28084 * http://jqueryui.com 28085 * 28086 * Copyright jQuery Foundation and other contributors 28087 * Released under the MIT license. 28088 * http://jquery.org/license 28089 */ 28090 28091//>>label: Effects Core 28092//>>group: Effects 28093/* eslint-disable max-len */ 28094//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects. 28095/* eslint-enable max-len */ 28096//>>docs: http://api.jqueryui.com/category/effects-core/ 28097//>>demos: http
vendor: 9,484 bytes, lines 28097-28467
28097://jqueryui.com/effect/ 28098 28099 28100var dataSpace = "ui-effects-", 28101 dataSpaceStyle = "ui-effects-style", 28102 dataSpaceAnimated = "ui-effects-animated"; 28103 28104$.effects = { 28105 effect: {} 28106}; 28107 28108/******************************************************************************/ 28109/****************************** CLASS ANIMATIONS ******************************/ 28110/******************************************************************************/ 28111( function() { 28112 28113var classAnimationActions = [ "add", "remove", "toggle" ], 28114 shorthandStyles = { 28115 border: 1, 28116 borderBottom: 1, 28117 borderColor: 1, 28118 borderLeft: 1, 28119 borderRight: 1, 28120 borderTop: 1, 28121 borderWidth: 1, 28122 margin: 1, 28123 padding: 1 28124 }; 28125 28126$.each( 28127 [ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], 28128 function( _, prop ) { 28129 $.fx.step[ prop ] = function( fx ) { 28130 if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { 28131 jQuery.style( fx.elem, prop, fx.end ); 28132 fx.setAttr = true; 28133 } 28134 }; 28135 } 28136); 28137 28138function camelCase( string ) { 28139 return string.replace( /-([\da-z])/gi, function( all, letter ) { 28140 return letter.toUpperCase(); 28141 } ); 28142} 28143 28144function getElementStyles( elem ) { 28145 var key, len, 28146 style = elem.ownerDocument.defaultView ? 28147 elem.ownerDocument.defaultView.getComputedStyle( elem, null ) : 28148 elem.currentStyle, 28149 styles = {}; 28150 28151 if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { 28152 len = style.length; 28153 while ( len-- ) { 28154 key = style[ len ]; 28155 if ( typeof style[ key ] === "string" ) { 28156 styles[ camelCase( key ) ] = style[ key ]; 28157 } 28158 } 28159 28160 // Support: Opera, IE <9 28161 } else { 28162 for ( key in style ) { 28163 if ( typeof style[ key ] === "string" ) { 28164 styles[ key ] = style[ key ]; 28165 } 28166 } 28167 } 28168 28169 return styles; 28170} 28171 28172function styleDifference( oldStyle, newStyle ) { 28173 var diff = {}, 28174 name, value; 28175 28176 for ( name in newStyle ) { 28177 value = newStyle[ name ]; 28178 if ( oldStyle[ name ] !== value ) { 28179 if ( !shorthandStyles[ name ] ) { 28180 if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) { 28181 diff[ name ] = value; 28182 } 28183 } 28184 } 28185 } 28186 28187 return diff; 28188} 28189 28190// Support: jQuery <1.8 28191if ( !$.fn.addBack ) { 28192 $.fn.addBack = function( selector ) { 28193 return this.add( selector == null ? 28194 this.prevObject : this.prevObject.filter( selector ) 28195 ); 28196 }; 28197} 28198 28199$.effects.animateClass = function( value, duration, easing, callback ) { 28200 var o = $.speed( duration, easing, callback ); 28201 28202 return this.queue( function() { 28203 var animated = $( this ), 28204 baseClass = animated.attr( "class" ) || "", 28205 applyClassChange, 28206 allAnimations = o.children ? animated.find( "*" ).addBack() : animated; 28207 28208 // Map the animated objects to store the original styles. 28209 allAnimations = allAnimations.map( function() { 28210 var el = $( this ); 28211 return { 28212 el: el, 28213 start: getElementStyles( this ) 28214 }; 28215 } ); 28216 28217 // Apply class change 28218 applyClassChange = function() { 28219 $.each( classAnimationActions, function( i, action ) { 28220 if ( value[ action ] ) { 28221 animated[ action + "Class" ]( value[ action ] ); 28222 } 28223 } ); 28224 }; 28225 applyClassChange(); 28226 28227 // Map all animated objects again - calculate new styles and diff 28228 allAnimations = allAnimations.map( function() { 28229 this.end = getElementStyles( this.el[ 0 ] ); 28230 this.diff = styleDifference( this.start, this.end ); 28231 return this; 28232 } ); 28233 28234 // Apply original class 28235 animated.attr( "class", baseClass ); 28236 28237 // Map all animated objects again - this time collecting a promise 28238 allAnimations = allAnimations.map( function() { 28239 var styleInfo = this, 28240 dfd = $.Deferred(), 28241 opts = $.extend( {}, o, { 28242 queue: false, 28243 complete: function() { 28244 dfd.resolve( styleInfo ); 28245 } 28246 } ); 28247 28248 this.el.animate( this.diff, opts ); 28249 return dfd.promise(); 28250 } ); 28251 28252 // Once all animations have completed: 28253 $.when.apply( $, allAnimations.get() ).done( function() { 28254 28255 // Set the final class 28256 applyClassChange(); 28257 28258 // For each animated element, 28259 // clear all css properties that were animated 28260 $.each( arguments, function() { 28261 var el = this.el; 28262 $.each( this.diff, function( key ) { 28263 el.css( key, "" ); 28264 } ); 28265 } ); 28266 28267 // This is guarnteed to be there if you use jQuery.speed() 28268 // it also handles dequeuing the next anim... 28269 o.complete.call( animated[ 0 ] ); 28270 } ); 28271 } ); 28272}; 28273 28274$.fn.extend( { 28275 addClass: ( function( orig ) { 28276 return function( classNames, speed, easing, callback ) { 28277 return speed ? 28278 $.effects.animateClass.call( this, 28279 { add: classNames }, speed, easing, callback ) : 28280 orig.apply( this, arguments ); 28281 }; 28282 } )( $.fn.addClass ), 28283 28284 removeClass: ( function( orig ) { 28285 return function( classNames, speed, easing, callback ) { 28286 return arguments.length > 1 ? 28287 $.effects.animateClass.call( this, 28288 { remove: classNames }, speed, easing, callback ) : 28289 orig.apply( this, arguments ); 28290 }; 28291 } )( $.fn.removeClass ), 28292 28293 toggleClass: ( function( orig ) { 28294 return function( classNames, force, speed, easing, callback ) { 28295 if ( typeof force === "boolean" || force === undefined ) { 28296 if ( !speed ) { 28297 28298 // Without speed parameter 28299 return orig.apply( this, arguments ); 28300 } else { 28301 return $.effects.animateClass.call( this, 28302 ( force ? { add: classNames } : { remove: classNames } ), 28303 speed, easing, callback ); 28304 } 28305 } else { 28306 28307 // Without force parameter 28308 return $.effects.animateClass.call( this, 28309 { toggle: classNames }, force, speed, easing ); 28310 } 28311 }; 28312 } )( $.fn.toggleClass ), 28313 28314 switchClass: function( remove, add, speed, easing, callback ) { 28315 return $.effects.animateClass.call( this, { 28316 add: add, 28317 remove: remove 28318 }, speed, easing, callback ); 28319 } 28320} ); 28321 28322} )(); 28323 28324/******************************************************************************/ 28325/*********************************** EFFECTS **********************************/ 28326/******************************************************************************/ 28327 28328( function() { 28329 28330if ( $.expr && $.expr.pseudos && $.expr.pseudos.animated ) { 28331 $.expr.pseudos.animated = ( function( orig ) { 28332 return function( elem ) { 28333 return !!$( elem ).data( dataSpaceAnimated ) || orig( elem ); 28334 }; 28335 } )( $.expr.pseudos.animated ); 28336} 28337 28338if ( $.uiBackCompat !== false ) { 28339 $.extend( $.effects, { 28340 28341 // Saves a set of properties in a data storage 28342 save: function( element, set ) { 28343 var i = 0, length = set.length; 28344 for ( ; i < length; i++ ) { 28345 if ( set[ i ] !== null ) { 28346 element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] ); 28347 } 28348 } 28349 }, 28350 28351 // Restores a set of previously saved properties from a data storage 28352 restore: function( element, set ) { 28353 var val, i = 0, length = set.length; 28354 for ( ; i < length; i++ ) { 28355 if ( set[ i ] !== null ) { 28356 val = element.data( dataSpace + set[ i ] ); 28357 element.css( set[ i ], val ); 28358 } 28359 } 28360 }, 28361 28362 setMode: function( el, mode ) { 28363 if ( mode === "toggle" ) { 28364 mode = el.is( ":hidden" ) ? "show" : "hide"; 28365 } 28366 return mode; 28367 }, 28368 28369 // Wraps the element around a wrapper that copies position properties 28370 createWrapper: function( element ) { 28371 28372 // If the element is already wrapped, return it 28373 if ( element.parent().is( ".ui-effects-wrapper" ) ) { 28374 return element.parent(); 28375 } 28376 28377 // Wrap the element 28378 var props = { 28379 width: element.outerWidth( true ), 28380 height: element.outerHeight( true ), 28381 "float": element.css( "float" ) 28382 }, 28383 wrapper = $( "<div></div>" ) 28384 .addClass( "ui-effects-wrapper" ) 28385 .css( { 28386 fontSize: "100%", 28387 background: "transparent", 28388 border: "none", 28389 margin: 0, 28390 padding: 0 28391 } ), 28392 28393 // Store the size in case width/height are defined in % - Fixes #5245 28394 size = { 28395 width: element.width(), 28396 height: element.height() 28397 }, 28398 active = document.activeElement; 28399 28400 // Support: Firefox 28401 // Firefox incorrectly exposes anonymous content 28402 // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 28403 try { 28404 // eslint-disable-next-line no-unused-expressions 28405 active.id; 28406 } catch ( e ) { 28407 active = document.body; 28408 } 28409 28410 element.wrap( wrapper ); 28411 28412 // Fixes #7595 - Elements lose focus when wrapped. 28413 if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { 28414 $( active ).trigger( "focus" ); 28415 } 28416 28417 // Hotfix for jQuery 1.4 since some change in wrap() seems to actually 28418 // lose the reference to the wrapped element 28419 wrapper = element.parent(); 28420 28421 // Transfer positioning properties to the wrapper 28422 if ( element.css( "position" ) === "static" ) { 28423 wrapper.css( { position: "relative" } ); 28424 element.css( { position: "relative" } ); 28425 } else { 28426 $.extend( props, { 28427 position: element.css( "position" ), 28428 zIndex: element.css( "z-index" ) 28429 } ); 28430 $.each( [ "top", "left", "bottom", "right" ], function( i, pos ) { 28431 props[ pos ] = element.css( pos ); 28432 if ( isNaN( parseInt( props[ pos ], 10 ) ) ) { 28433 props[ pos ] = "auto"; 28434 } 28435 } ); 28436 element.css( { 28437 position: "relative", 28438 top: 0, 28439 left: 0, 28440 right: "auto", 28441 bottom: "auto" 28442 } ); 28443 } 28444 element.css( size ); 28445 28446 return wrapper.css( props ).show(); 28447 }, 28448 28449 removeWrapper: function( element ) { 28450 var active = document.activeElement; 28451 28452 if ( element.parent().is( ".ui-effects-wrapper" ) ) { 28453 element.parent().replaceWith( element ); 28454 28455 // Fixes #7595 - Elements lose focus when wrapped. 28456 if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { 28457 $( active ).trigger( "focus" ); 28458 } 28459 } 28460 28461 return element; 28462 } 28463 } ); 28464} 28465 28466$.extend( $.effects, { 28467 version: "1.13.
vendor: 2,055 bytes, lines 28467-28562
284672", 28468 28469 define: function( name, mode, effect ) { 28470 if ( !effect ) { 28471 effect = mode; 28472 mode = "effect"; 28473 } 28474 28475 $.effects.effect[ name ] = effect; 28476 $.effects.effect[ name ].mode = mode; 28477 28478 return effect; 28479 }, 28480 28481 scaledDimensions: function( element, percent, direction ) { 28482 if ( percent === 0 ) { 28483 return { 28484 height: 0, 28485 width: 0, 28486 outerHeight: 0, 28487 outerWidth: 0 28488 }; 28489 } 28490 28491 var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1, 28492 y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1; 28493 28494 return { 28495 height: element.height() * y, 28496 width: element.width() * x, 28497 outerHeight: element.outerHeight() * y, 28498 outerWidth: element.outerWidth() * x 28499 }; 28500 28501 }, 28502 28503 clipToBox: function( animation ) { 28504 return { 28505 width: animation.clip.right - animation.clip.left, 28506 height: animation.clip.bottom - animation.clip.top, 28507 left: animation.clip.left, 28508 top: animation.clip.top 28509 }; 28510 }, 28511 28512 // Injects recently queued functions to be first in line (after "inprogress") 28513 unshift: function( element, queueLength, count ) { 28514 var queue = element.queue(); 28515 28516 if ( queueLength > 1 ) { 28517 queue.splice.apply( queue, 28518 [ 1, 0 ].concat( queue.splice( queueLength, count ) ) ); 28519 } 28520 element.dequeue(); 28521 }, 28522 28523 saveStyle: function( element ) { 28524 element.data( dataSpaceStyle, element[ 0 ].style.cssText ); 28525 }, 28526 28527 restoreStyle: function( element ) { 28528 element[ 0 ].style.cssText = element.data( dataSpaceStyle ) || ""; 28529 element.removeData( dataSpaceStyle ); 28530 }, 28531 28532 mode: function( element, mode ) { 28533 var hidden = element.is( ":hidden" ); 28534 28535 if ( mode === "toggle" ) { 28536 mode = hidden ? "show" : "hide"; 28537 } 28538 if ( hidden ? mode === "hide" : mode === "show" ) { 28539 mode = "none"; 28540 } 28541 return mode; 28542 }, 28543 28544 // Translates a [top,left] array into a baseline value 28545 getBaseline: function( origin, original ) { 28546 var y, x; 28547 28548 switch ( origin[ 0 ] ) { 28549 case "top": 28550 y = 0; 28551 break; 28552 case "middle": 28553 y = 0.5; 28554 break; 28555 case "bottom": 28556 y = 1; 28557 break; 28558 default: 28559 y = origin[ 0 ] / original.height; 28560 } 28561 28562 switch ( origin[ 1 ] ) {
28563 case "left": 28564 x = 0; 28565 break; 28566 case "center": 28567 x = 0.5; 28568 break; 28569 case "right": 28570 x = 1; 28571 break; 28572 default: 28573 x = origin[ 1 ] / original.width; 28574 } 28575 28576 return { 28577 x: x, 28578 y: y 28579 }; 28580 }, 28581 28582 // Creates a placeholder element so that the original element can be made absolute 28583 createPlaceholder: function( element ) { 28584 var placeholder, 28585 cssPosition = element.css( "position" ), 28586 position = element.position(); 28587 28588 // Lock in margins first to account for form elements, which 28589 // will change margin if you explicitly set height 28590 // see: http
vendor: 10,558 bytes, lines 28590-28984
28590://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380 28591 // Support: Safari 28592 element.css( { 28593 marginTop: element.css( "marginTop" ), 28594 marginBottom: element.css( "marginBottom" ), 28595 marginLeft: element.css( "marginLeft" ), 28596 marginRight: element.css( "marginRight" ) 28597 } ) 28598 .outerWidth( element.outerWidth() ) 28599 .outerHeight( element.outerHeight() ); 28600 28601 if ( /^(static|relative)/.test( cssPosition ) ) { 28602 cssPosition = "absolute"; 28603 28604 placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( { 28605 28606 // Convert inline to inline block to account for inline elements 28607 // that turn to inline block based on content (like img) 28608 display: /^(inline|ruby)/.test( element.css( "display" ) ) ? 28609 "inline-block" : 28610 "block", 28611 visibility: "hidden", 28612 28613 // Margins need to be set to account for margin collapse 28614 marginTop: element.css( "marginTop" ), 28615 marginBottom: element.css( "marginBottom" ), 28616 marginLeft: element.css( "marginLeft" ), 28617 marginRight: element.css( "marginRight" ), 28618 "float": element.css( "float" ) 28619 } ) 28620 .outerWidth( element.outerWidth() ) 28621 .outerHeight( element.outerHeight() ) 28622 .addClass( "ui-effects-placeholder" ); 28623 28624 element.data( dataSpace + "placeholder", placeholder ); 28625 } 28626 28627 element.css( { 28628 position: cssPosition, 28629 left: position.left, 28630 top: position.top 28631 } ); 28632 28633 return placeholder; 28634 }, 28635 28636 removePlaceholder: function( element ) { 28637 var dataKey = dataSpace + "placeholder", 28638 placeholder = element.data( dataKey ); 28639 28640 if ( placeholder ) { 28641 placeholder.remove(); 28642 element.removeData( dataKey ); 28643 } 28644 }, 28645 28646 // Removes a placeholder if it exists and restores 28647 // properties that were modified during placeholder creation 28648 cleanUp: function( element ) { 28649 $.effects.restoreStyle( element ); 28650 $.effects.removePlaceholder( element ); 28651 }, 28652 28653 setTransition: function( element, list, factor, value ) { 28654 value = value || {}; 28655 $.each( list, function( i, x ) { 28656 var unit = element.cssUnit( x ); 28657 if ( unit[ 0 ] > 0 ) { 28658 value[ x ] = unit[ 0 ] * factor + unit[ 1 ]; 28659 } 28660 } ); 28661 return value; 28662 } 28663} ); 28664 28665// Return an effect options object for the given parameters: 28666function _normalizeArguments( effect, options, speed, callback ) { 28667 28668 // Allow passing all options as the first parameter 28669 if ( $.isPlainObject( effect ) ) { 28670 options = effect; 28671 effect = effect.effect; 28672 } 28673 28674 // Convert to an object 28675 effect = { effect: effect }; 28676 28677 // Catch (effect, null, ...) 28678 if ( options == null ) { 28679 options = {}; 28680 } 28681 28682 // Catch (effect, callback) 28683 if ( typeof options === "function" ) { 28684 callback = options; 28685 speed = null; 28686 options = {}; 28687 } 28688 28689 // Catch (effect, speed, ?) 28690 if ( typeof options === "number" || $.fx.speeds[ options ] ) { 28691 callback = speed; 28692 speed = options; 28693 options = {}; 28694 } 28695 28696 // Catch (effect, options, callback) 28697 if ( typeof speed === "function" ) { 28698 callback = speed; 28699 speed = null; 28700 } 28701 28702 // Add options to effect 28703 if ( options ) { 28704 $.extend( effect, options ); 28705 } 28706 28707 speed = speed || options.duration; 28708 effect.duration = $.fx.off ? 0 : 28709 typeof speed === "number" ? speed : 28710 speed in $.fx.speeds ? $.fx.speeds[ speed ] : 28711 $.fx.speeds._default; 28712 28713 effect.complete = callback || options.complete; 28714 28715 return effect; 28716} 28717 28718function standardAnimationOption( option ) { 28719 28720 // Valid standard speeds (nothing, number, named speed) 28721 if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) { 28722 return true; 28723 } 28724 28725 // Invalid strings - treat as "normal" speed 28726 if ( typeof option === "string" && !$.effects.effect[ option ] ) { 28727 return true; 28728 } 28729 28730 // Complete callback 28731 if ( typeof option === "function" ) { 28732 return true; 28733 } 28734 28735 // Options hash (but not naming an effect) 28736 if ( typeof option === "object" && !option.effect ) { 28737 return true; 28738 } 28739 28740 // Didn't match any standard API 28741 return false; 28742} 28743 28744$.fn.extend( { 28745 effect: function( /* effect, options, speed, callback */ ) { 28746 var args = _normalizeArguments.apply( this, arguments ), 28747 effectMethod = $.effects.effect[ args.effect ], 28748 defaultMode = effectMethod.mode, 28749 queue = args.queue, 28750 queueName = queue || "fx", 28751 complete = args.complete, 28752 mode = args.mode, 28753 modes = [], 28754 prefilter = function( next ) { 28755 var el = $( this ), 28756 normalizedMode = $.effects.mode( el, mode ) || defaultMode; 28757 28758 // Sentinel for duck-punching the :animated pseudo-selector 28759 el.data( dataSpaceAnimated, true ); 28760 28761 // Save effect mode for later use, 28762 // we can't just call $.effects.mode again later, 28763 // as the .show() below destroys the initial state 28764 modes.push( normalizedMode ); 28765 28766 // See $.uiBackCompat inside of run() for removal of defaultMode in 1.14 28767 if ( defaultMode && ( normalizedMode === "show" || 28768 ( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) { 28769 el.show(); 28770 } 28771 28772 if ( !defaultMode || normalizedMode !== "none" ) { 28773 $.effects.saveStyle( el ); 28774 } 28775 28776 if ( typeof next === "function" ) { 28777 next(); 28778 } 28779 }; 28780 28781 if ( $.fx.off || !effectMethod ) { 28782 28783 // Delegate to the original method (e.g., .show()) if possible 28784 if ( mode ) { 28785 return this[ mode ]( args.duration, complete ); 28786 } else { 28787 return this.each( function() { 28788 if ( complete ) { 28789 complete.call( this ); 28790 } 28791 } ); 28792 } 28793 } 28794 28795 function run( next ) { 28796 var elem = $( this ); 28797 28798 function cleanup() { 28799 elem.removeData( dataSpaceAnimated ); 28800 28801 $.effects.cleanUp( elem ); 28802 28803 if ( args.mode === "hide" ) { 28804 elem.hide(); 28805 } 28806 28807 done(); 28808 } 28809 28810 function done() { 28811 if ( typeof complete === "function" ) { 28812 complete.call( elem[ 0 ] ); 28813 } 28814 28815 if ( typeof next === "function" ) { 28816 next(); 28817 } 28818 } 28819 28820 // Override mode option on a per element basis, 28821 // as toggle can be either show or hide depending on element state 28822 args.mode = modes.shift(); 28823 28824 if ( $.uiBackCompat !== false && !defaultMode ) { 28825 if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) { 28826 28827 // Call the core method to track "olddisplay" properly 28828 elem[ mode ](); 28829 done(); 28830 } else { 28831 effectMethod.call( elem[ 0 ], args, done ); 28832 } 28833 } else { 28834 if ( args.mode === "none" ) { 28835 28836 // Call the core method to track "olddisplay" properly 28837 elem[ mode ](); 28838 done(); 28839 } else { 28840 effectMethod.call( elem[ 0 ], args, cleanup ); 28841 } 28842 } 28843 } 28844 28845 // Run prefilter on all elements first to ensure that 28846 // any showing or hiding happens before placeholder creation, 28847 // which ensures that any layout changes are correctly captured. 28848 return queue === false ? 28849 this.each( prefilter ).each( run ) : 28850 this.queue( queueName, prefilter ).queue( queueName, run ); 28851 }, 28852 28853 show: ( function( orig ) { 28854 return function( option ) { 28855 if ( standardAnimationOption( option ) ) { 28856 return orig.apply( this, arguments ); 28857 } else { 28858 var args = _normalizeArguments.apply( this, arguments ); 28859 args.mode = "show"; 28860 return this.effect.call( this, args ); 28861 } 28862 }; 28863 } )( $.fn.show ), 28864 28865 hide: ( function( orig ) { 28866 return function( option ) { 28867 if ( standardAnimationOption( option ) ) { 28868 return orig.apply( this, arguments ); 28869 } else { 28870 var args = _normalizeArguments.apply( this, arguments ); 28871 args.mode = "hide"; 28872 return this.effect.call( this, args ); 28873 } 28874 }; 28875 } )( $.fn.hide ), 28876 28877 toggle: ( function( orig ) { 28878 return function( option ) { 28879 if ( standardAnimationOption( option ) || typeof option === "boolean" ) { 28880 return orig.apply( this, arguments ); 28881 } else { 28882 var args = _normalizeArguments.apply( this, arguments ); 28883 args.mode = "toggle"; 28884 return this.effect.call( this, args ); 28885 } 28886 }; 28887 } )( $.fn.toggle ), 28888 28889 cssUnit: function( key ) { 28890 var style = this.css( key ), 28891 val = []; 28892 28893 $.each( [ "em", "px", "%", "pt" ], function( i, unit ) { 28894 if ( style.indexOf( unit ) > 0 ) { 28895 val = [ parseFloat( style ), unit ]; 28896 } 28897 } ); 28898 return val; 28899 }, 28900 28901 cssClip: function( clipObj ) { 28902 if ( clipObj ) { 28903 return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " + 28904 clipObj.bottom + "px " + clipObj.left + "px)" ); 28905 } 28906 return parseClip( this.css( "clip" ), this ); 28907 }, 28908 28909 transfer: function( options, done ) { 28910 var element = $( this ), 28911 target = $( options.to ), 28912 targetFixed = target.css( "position" ) === "fixed", 28913 body = $( "body" ), 28914 fixTop = targetFixed ? body.scrollTop() : 0, 28915 fixLeft = targetFixed ? body.scrollLeft() : 0, 28916 endPosition = target.offset(), 28917 animation = { 28918 top: endPosition.top - fixTop, 28919 left: endPosition.left - fixLeft, 28920 height: target.innerHeight(), 28921 width: target.innerWidth() 28922 }, 28923 startPosition = element.offset(), 28924 transfer = $( "<div class='ui-effects-transfer'></div>" ); 28925 28926 transfer 28927 .appendTo( "body" ) 28928 .addClass( options.className ) 28929 .css( { 28930 top: startPosition.top - fixTop, 28931 left: startPosition.left - fixLeft, 28932 height: element.innerHeight(), 28933 width: element.innerWidth(), 28934 position: targetFixed ? "fixed" : "absolute" 28935 } ) 28936 .animate( animation, options.duration, options.easing, function() { 28937 transfer.remove(); 28938 if ( typeof done === "function" ) { 28939 done(); 28940 } 28941 } ); 28942 } 28943} ); 28944 28945function parseClip( str, element ) { 28946 var outerWidth = element.outerWidth(), 28947 outerHeight = element.outerHeight(), 28948 clipRegex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/, 28949 values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ]; 28950 28951 return { 28952 top: parseFloat( values[ 1 ] ) || 0, 28953 right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ), 28954 bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ), 28955 left: parseFloat( values[ 4 ] ) || 0 28956 }; 28957} 28958 28959$.fx.step.clip = function( fx ) { 28960 if ( !fx.clipInit ) { 28961 fx.start = $( fx.elem ).cssClip(); 28962 if ( typeof fx.end === "string" ) { 28963 fx.end = parseClip( fx.end, fx.elem ); 28964 } 28965 fx.clipInit = true; 28966 } 28967 28968 $( fx.elem ).cssClip( { 28969 top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top, 28970 right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right, 28971 bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom, 28972 left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left 28973 } ); 28974}; 28975 28976} )(); 28977 28978/******************************************************************************/ 28979/*********************************** EASING ***********************************/ 28980/******************************************************************************/ 28981 28982( function() { 28983 28984// Based on easing equations from Robert Penner (http://
vendor: 24,998 bytes, lines 28984-29939
28984www.robertpenner.com/easing) 28985 28986var baseEasings = {}; 28987 28988$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) { 28989 baseEasings[ name ] = function( p ) { 28990 return Math.pow( p, i + 2 ); 28991 }; 28992} ); 28993 28994$.extend( baseEasings, { 28995 Sine: function( p ) { 28996 return 1 - Math.cos( p * Math.PI / 2 ); 28997 }, 28998 Circ: function( p ) { 28999 return 1 - Math.sqrt( 1 - p * p ); 29000 }, 29001 Elastic: function( p ) { 29002 return p === 0 || p === 1 ? p : 29003 -Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 ); 29004 }, 29005 Back: function( p ) { 29006 return p * p * ( 3 * p - 2 ); 29007 }, 29008 Bounce: function( p ) { 29009 var pow2, 29010 bounce = 4; 29011 29012 while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} 29013 return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); 29014 } 29015} ); 29016 29017$.each( baseEasings, function( name, easeIn ) { 29018 $.easing[ "easeIn" + name ] = easeIn; 29019 $.easing[ "easeOut" + name ] = function( p ) { 29020 return 1 - easeIn( 1 - p ); 29021 }; 29022 $.easing[ "easeInOut" + name ] = function( p ) { 29023 return p < 0.5 ? 29024 easeIn( p * 2 ) / 2 : 29025 1 - easeIn( p * -2 + 2 ) / 2; 29026 }; 29027} ); 29028 29029} )(); 29030 29031var effect = $.effects; 29032 29033 29034/*! 29035 * jQuery UI Effects Blind 1.13.2 29036 * http://jqueryui.com 29037 * 29038 * Copyright jQuery Foundation and other contributors 29039 * Released under the MIT license. 29040 * http://jquery.org/license 29041 */ 29042 29043//>>label: Blind Effect 29044//>>group: Effects 29045//>>description: Blinds the element. 29046//>>docs: http://api.jqueryui.com/blind-effect/ 29047//>>demos: http://jqueryui.com/effect/ 29048 29049 29050var effectsEffectBlind = $.effects.define( "blind", "hide", function( options, done ) { 29051 var map = { 29052 up: [ "bottom", "top" ], 29053 vertical: [ "bottom", "top" ], 29054 down: [ "top", "bottom" ], 29055 left: [ "right", "left" ], 29056 horizontal: [ "right", "left" ], 29057 right: [ "left", "right" ] 29058 }, 29059 element = $( this ), 29060 direction = options.direction || "up", 29061 start = element.cssClip(), 29062 animate = { clip: $.extend( {}, start ) }, 29063 placeholder = $.effects.createPlaceholder( element ); 29064 29065 animate.clip[ map[ direction ][ 0 ] ] = animate.clip[ map[ direction ][ 1 ] ]; 29066 29067 if ( options.mode === "show" ) { 29068 element.cssClip( animate.clip ); 29069 if ( placeholder ) { 29070 placeholder.css( $.effects.clipToBox( animate ) ); 29071 } 29072 29073 animate.clip = start; 29074 } 29075 29076 if ( placeholder ) { 29077 placeholder.animate( $.effects.clipToBox( animate ), options.duration, options.easing ); 29078 } 29079 29080 element.animate( animate, { 29081 queue: false, 29082 duration: options.duration, 29083 easing: options.easing, 29084 complete: done 29085 } ); 29086} ); 29087 29088 29089/*! 29090 * jQuery UI Effects Bounce 1.13.2 29091 * http://jqueryui.com 29092 * 29093 * Copyright jQuery Foundation and other contributors 29094 * Released under the MIT license. 29095 * http://jquery.org/license 29096 */ 29097 29098//>>label: Bounce Effect 29099//>>group: Effects 29100//>>description: Bounces an element horizontally or vertically n times. 29101//>>docs: http://api.jqueryui.com/bounce-effect/ 29102//>>demos: http://jqueryui.com/effect/ 29103 29104 29105var effectsEffectBounce = $.effects.define( "bounce", function( options, done ) { 29106 var upAnim, downAnim, refValue, 29107 element = $( this ), 29108 29109 // Defaults: 29110 mode = options.mode, 29111 hide = mode === "hide", 29112 show = mode === "show", 29113 direction = options.direction || "up", 29114 distance = options.distance, 29115 times = options.times || 5, 29116 29117 // Number of internal animations 29118 anims = times * 2 + ( show || hide ? 1 : 0 ), 29119 speed = options.duration / anims, 29120 easing = options.easing, 29121 29122 // Utility: 29123 ref = ( direction === "up" || direction === "down" ) ? "top" : "left", 29124 motion = ( direction === "up" || direction === "left" ), 29125 i = 0, 29126 29127 queuelen = element.queue().length; 29128 29129 $.effects.createPlaceholder( element ); 29130 29131 refValue = element.css( ref ); 29132 29133 // Default distance for the BIGGEST bounce is the outer Distance / 3 29134 if ( !distance ) { 29135 distance = element[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3; 29136 } 29137 29138 if ( show ) { 29139 downAnim = { opacity: 1 }; 29140 downAnim[ ref ] = refValue; 29141 29142 // If we are showing, force opacity 0 and set the initial position 29143 // then do the "first" animation 29144 element 29145 .css( "opacity", 0 ) 29146 .css( ref, motion ? -distance * 2 : distance * 2 ) 29147 .animate( downAnim, speed, easing ); 29148 } 29149 29150 // Start at the smallest distance if we are hiding 29151 if ( hide ) { 29152 distance = distance / Math.pow( 2, times - 1 ); 29153 } 29154 29155 downAnim = {}; 29156 downAnim[ ref ] = refValue; 29157 29158 // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here 29159 for ( ; i < times; i++ ) { 29160 upAnim = {}; 29161 upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; 29162 29163 element 29164 .animate( upAnim, speed, easing ) 29165 .animate( downAnim, speed, easing ); 29166 29167 distance = hide ? distance * 2 : distance / 2; 29168 } 29169 29170 // Last Bounce when Hiding 29171 if ( hide ) { 29172 upAnim = { opacity: 0 }; 29173 upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; 29174 29175 element.animate( upAnim, speed, easing ); 29176 } 29177 29178 element.queue( done ); 29179 29180 $.effects.unshift( element, queuelen, anims + 1 ); 29181} ); 29182 29183 29184/*! 29185 * jQuery UI Effects Clip 1.13.2 29186 * http://jqueryui.com 29187 * 29188 * Copyright jQuery Foundation and other contributors 29189 * Released under the MIT license. 29190 * http://jquery.org/license 29191 */ 29192 29193//>>label: Clip Effect 29194//>>group: Effects 29195//>>description: Clips the element on and off like an old TV. 29196//>>docs: http://api.jqueryui.com/clip-effect/ 29197//>>demos: http://jqueryui.com/effect/ 29198 29199 29200var effectsEffectClip = $.effects.define( "clip", "hide", function( options, done ) { 29201 var start, 29202 animate = {}, 29203 element = $( this ), 29204 direction = options.direction || "vertical", 29205 both = direction === "both", 29206 horizontal = both || direction === "horizontal", 29207 vertical = both || direction === "vertical"; 29208 29209 start = element.cssClip(); 29210 animate.clip = { 29211 top: vertical ? ( start.bottom - start.top ) / 2 : start.top, 29212 right: horizontal ? ( start.right - start.left ) / 2 : start.right, 29213 bottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom, 29214 left: horizontal ? ( start.right - start.left ) / 2 : start.left 29215 }; 29216 29217 $.effects.createPlaceholder( element ); 29218 29219 if ( options.mode === "show" ) { 29220 element.cssClip( animate.clip ); 29221 animate.clip = start; 29222 } 29223 29224 element.animate( animate, { 29225 queue: false, 29226 duration: options.duration, 29227 easing: options.easing, 29228 complete: done 29229 } ); 29230 29231} ); 29232 29233 29234/*! 29235 * jQuery UI Effects Drop 1.13.2 29236 * http://jqueryui.com 29237 * 29238 * Copyright jQuery Foundation and other contributors 29239 * Released under the MIT license. 29240 * http://jquery.org/license 29241 */ 29242 29243//>>label: Drop Effect 29244//>>group: Effects 29245//>>description: Moves an element in one direction and hides it at the same time. 29246//>>docs: http://api.jqueryui.com/drop-effect/ 29247//>>demos: http://jqueryui.com/effect/ 29248 29249 29250var effectsEffectDrop = $.effects.define( "drop", "hide", function( options, done ) { 29251 29252 var distance, 29253 element = $( this ), 29254 mode = options.mode, 29255 show = mode === "show", 29256 direction = options.direction || "left", 29257 ref = ( direction === "up" || direction === "down" ) ? "top" : "left", 29258 motion = ( direction === "up" || direction === "left" ) ? "-=" : "+=", 29259 oppositeMotion = ( motion === "+=" ) ? "-=" : "+=", 29260 animation = { 29261 opacity: 0 29262 }; 29263 29264 $.effects.createPlaceholder( element ); 29265 29266 distance = options.distance || 29267 element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2; 29268 29269 animation[ ref ] = motion + distance; 29270 29271 if ( show ) { 29272 element.css( animation ); 29273 29274 animation[ ref ] = oppositeMotion + distance; 29275 animation.opacity = 1; 29276 } 29277 29278 // Animate 29279 element.animate( animation, { 29280 queue: false, 29281 duration: options.duration, 29282 easing: options.easing, 29283 complete: done 29284 } ); 29285} ); 29286 29287 29288/*! 29289 * jQuery UI Effects Explode 1.13.2 29290 * http://jqueryui.com 29291 * 29292 * Copyright jQuery Foundation and other contributors 29293 * Released under the MIT license. 29294 * http://jquery.org/license 29295 */ 29296 29297//>>label: Explode Effect 29298//>>group: Effects 29299/* eslint-disable max-len */ 29300//>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness. 29301/* eslint-enable max-len */ 29302//>>docs: http://api.jqueryui.com/explode-effect/ 29303//>>demos: http://jqueryui.com/effect/ 29304 29305 29306var effectsEffectExplode = $.effects.define( "explode", "hide", function( options, done ) { 29307 29308 var i, j, left, top, mx, my, 29309 rows = options.pieces ? Math.round( Math.sqrt( options.pieces ) ) : 3, 29310 cells = rows, 29311 element = $( this ), 29312 mode = options.mode, 29313 show = mode === "show", 29314 29315 // Show and then visibility:hidden the element before calculating offset 29316 offset = element.show().css( "visibility", "hidden" ).offset(), 29317 29318 // Width and height of a piece 29319 width = Math.ceil( element.outerWidth() / cells ), 29320 height = Math.ceil( element.outerHeight() / rows ), 29321 pieces = []; 29322 29323 // Children animate complete: 29324 function childComplete() { 29325 pieces.push( this ); 29326 if ( pieces.length === rows * cells ) { 29327 animComplete(); 29328 } 29329 } 29330 29331 // Clone the element for each row and cell. 29332 for ( i = 0; i < rows; i++ ) { // ===> 29333 top = offset.top + i * height; 29334 my = i - ( rows - 1 ) / 2; 29335 29336 for ( j = 0; j < cells; j++ ) { // ||| 29337 left = offset.left + j * width; 29338 mx = j - ( cells - 1 ) / 2; 29339 29340 // Create a clone of the now hidden main element that will be absolute positioned 29341 // within a wrapper div off the -left and -top equal to size of our pieces 29342 element 29343 .clone() 29344 .appendTo( "body" ) 29345 .wrap( "<div></div>" ) 29346 .css( { 29347 position: "absolute", 29348 visibility: "visible", 29349 left: -j * width, 29350 top: -i * height 29351 } ) 29352 29353 // Select the wrapper - make it overflow: hidden and absolute positioned based on 29354 // where the original was located +left and +top equal to the size of pieces 29355 .parent() 29356 .addClass( "ui-effects-explode" ) 29357 .css( { 29358 position: "absolute", 29359 overflow: "hidden", 29360 width: width, 29361 height: height, 29362 left: left + ( show ? mx * width : 0 ), 29363 top: top + ( show ? my * height : 0 ), 29364 opacity: show ? 0 : 1 29365 } ) 29366 .animate( { 29367 left: left + ( show ? 0 : mx * width ), 29368 top: top + ( show ? 0 : my * height ), 29369 opacity: show ? 1 : 0 29370 }, options.duration || 500, options.easing, childComplete ); 29371 } 29372 } 29373 29374 function animComplete() { 29375 element.css( { 29376 visibility: "visible" 29377 } ); 29378 $( pieces ).remove(); 29379 done(); 29380 } 29381} ); 29382 29383 29384/*! 29385 * jQuery UI Effects Fade 1.13.2 29386 * http://jqueryui.com 29387 * 29388 * Copyright jQuery Foundation and other contributors 29389 * Released under the MIT license. 29390 * http://jquery.org/license 29391 */ 29392 29393//>>label: Fade Effect 29394//>>group: Effects 29395//>>description: Fades the element. 29396//>>docs: http://api.jqueryui.com/fade-effect/ 29397//>>demos: http://jqueryui.com/effect/ 29398 29399 29400var effectsEffectFade = $.effects.define( "fade", "toggle", function( options, done ) { 29401 var show = options.mode === "show"; 29402 29403 $( this ) 29404 .css( "opacity", show ? 0 : 1 ) 29405 .animate( { 29406 opacity: show ? 1 : 0 29407 }, { 29408 queue: false, 29409 duration: options.duration, 29410 easing: options.easing, 29411 complete: done 29412 } ); 29413} ); 29414 29415 29416/*! 29417 * jQuery UI Effects Fold 1.13.2 29418 * http://jqueryui.com 29419 * 29420 * Copyright jQuery Foundation and other contributors 29421 * Released under the MIT license. 29422 * http://jquery.org/license 29423 */ 29424 29425//>>label: Fold Effect 29426//>>group: Effects 29427//>>description: Folds an element first horizontally and then vertically. 29428//>>docs: http://api.jqueryui.com/fold-effect/ 29429//>>demos: http://jqueryui.com/effect/ 29430 29431 29432var effectsEffectFold = $.effects.define( "fold", "hide", function( options, done ) { 29433 29434 // Create element 29435 var element = $( this ), 29436 mode = options.mode, 29437 show = mode === "show", 29438 hide = mode === "hide", 29439 size = options.size || 15, 29440 percent = /([0-9]+)%/.exec( size ), 29441 horizFirst = !!options.horizFirst, 29442 ref = horizFirst ? [ "right", "bottom" ] : [ "bottom", "right" ], 29443 duration = options.duration / 2, 29444 29445 placeholder = $.effects.createPlaceholder( element ), 29446 29447 start = element.cssClip(), 29448 animation1 = { clip: $.extend( {}, start ) }, 29449 animation2 = { clip: $.extend( {}, start ) }, 29450 29451 distance = [ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ], 29452 29453 queuelen = element.queue().length; 29454 29455 if ( percent ) { 29456 size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ]; 29457 } 29458 animation1.clip[ ref[ 0 ] ] = size; 29459 animation2.clip[ ref[ 0 ] ] = size; 29460 animation2.clip[ ref[ 1 ] ] = 0; 29461 29462 if ( show ) { 29463 element.cssClip( animation2.clip ); 29464 if ( placeholder ) { 29465 placeholder.css( $.effects.clipToBox( animation2 ) ); 29466 } 29467 29468 animation2.clip = start; 29469 } 29470 29471 // Animate 29472 element 29473 .queue( function( next ) { 29474 if ( placeholder ) { 29475 placeholder 29476 .animate( $.effects.clipToBox( animation1 ), duration, options.easing ) 29477 .animate( $.effects.clipToBox( animation2 ), duration, options.easing ); 29478 } 29479 29480 next(); 29481 } ) 29482 .animate( animation1, duration, options.easing ) 29483 .animate( animation2, duration, options.easing ) 29484 .queue( done ); 29485 29486 $.effects.unshift( element, queuelen, 4 ); 29487} ); 29488 29489 29490/*! 29491 * jQuery UI Effects Highlight 1.13.2 29492 * http://jqueryui.com 29493 * 29494 * Copyright jQuery Foundation and other contributors 29495 * Released under the MIT license. 29496 * http://jquery.org/license 29497 */ 29498 29499//>>label: Highlight Effect 29500//>>group: Effects 29501//>>description: Highlights the background of an element in a defined color for a custom duration. 29502//>>docs: http://api.jqueryui.com/highlight-effect/ 29503//>>demos: http://jqueryui.com/effect/ 29504 29505 29506var effectsEffectHighlight = $.effects.define( "highlight", "show", function( options, done ) { 29507 var element = $( this ), 29508 animation = { 29509 backgroundColor: element.css( "backgroundColor" ) 29510 }; 29511 29512 if ( options.mode === "hide" ) { 29513 animation.opacity = 0; 29514 } 29515 29516 $.effects.saveStyle( element ); 29517 29518 element 29519 .css( { 29520 backgroundImage: "none", 29521 backgroundColor: options.color || "#ffff99" 29522 } ) 29523 .animate( animation, { 29524 queue: false, 29525 duration: options.duration, 29526 easing: options.easing, 29527 complete: done 29528 } ); 29529} ); 29530 29531 29532/*! 29533 * jQuery UI Effects Size 1.13.2 29534 * http://jqueryui.com 29535 * 29536 * Copyright jQuery Foundation and other contributors 29537 * Released under the MIT license. 29538 * http://jquery.org/license 29539 */ 29540 29541//>>label: Size Effect 29542//>>group: Effects 29543//>>description: Resize an element to a specified width and height. 29544//>>docs: http://api.jqueryui.com/size-effect/ 29545//>>demos: http://jqueryui.com/effect/ 29546 29547 29548var effectsEffectSize = $.effects.define( "size", function( options, done ) { 29549 29550 // Create element 29551 var baseline, factor, temp, 29552 element = $( this ), 29553 29554 // Copy for children 29555 cProps = [ "fontSize" ], 29556 vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ], 29557 hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ], 29558 29559 // Set options 29560 mode = options.mode, 29561 restore = mode !== "effect", 29562 scale = options.scale || "both", 29563 origin = options.origin || [ "middle", "center" ], 29564 position = element.css( "position" ), 29565 pos = element.position(), 29566 original = $.effects.scaledDimensions( element ), 29567 from = options.from || original, 29568 to = options.to || $.effects.scaledDimensions( element, 0 ); 29569 29570 $.effects.createPlaceholder( element ); 29571 29572 if ( mode === "show" ) { 29573 temp = from; 29574 from = to; 29575 to = temp; 29576 } 29577 29578 // Set scaling factor 29579 factor = { 29580 from: { 29581 y: from.height / original.height, 29582 x: from.width / original.width 29583 }, 29584 to: { 29585 y: to.height / original.height, 29586 x: to.width / original.width 29587 } 29588 }; 29589 29590 // Scale the css box 29591 if ( scale === "box" || scale === "both" ) { 29592 29593 // Vertical props scaling 29594 if ( factor.from.y !== factor.to.y ) { 29595 from = $.effects.setTransition( element, vProps, factor.from.y, from ); 29596 to = $.effects.setTransition( element, vProps, factor.to.y, to ); 29597 } 29598 29599 // Horizontal props scaling 29600 if ( factor.from.x !== factor.to.x ) { 29601 from = $.effects.setTransition( element, hProps, factor.from.x, from ); 29602 to = $.effects.setTransition( element, hProps, factor.to.x, to ); 29603 } 29604 } 29605 29606 // Scale the content 29607 if ( scale === "content" || scale === "both" ) { 29608 29609 // Vertical props scaling 29610 if ( factor.from.y !== factor.to.y ) { 29611 from = $.effects.setTransition( element, cProps, factor.from.y, from ); 29612 to = $.effects.setTransition( element, cProps, factor.to.y, to ); 29613 } 29614 } 29615 29616 // Adjust the position properties based on the provided origin points 29617 if ( origin ) { 29618 baseline = $.effects.getBaseline( origin, original ); 29619 from.top = ( original.outerHeight - from.outerHeight ) * baseline.y + pos.top; 29620 from.left = ( original.outerWidth - from.outerWidth ) * baseline.x + pos.left; 29621 to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top; 29622 to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left; 29623 } 29624 delete from.outerHeight; 29625 delete from.outerWidth; 29626 element.css( from ); 29627 29628 // Animate the children if desired 29629 if ( scale === "content" || scale === "both" ) { 29630 29631 vProps = vProps.concat( [ "marginTop", "marginBottom" ] ).concat( cProps ); 29632 hProps = hProps.concat( [ "marginLeft", "marginRight" ] ); 29633 29634 // Only animate children with width attributes specified 29635 // TODO: is this right? should we include anything with css width specified as well 29636 element.find( "*[width]" ).each( function() { 29637 var child = $( this ), 29638 childOriginal = $.effects.scaledDimensions( child ), 29639 childFrom = { 29640 height: childOriginal.height * factor.from.y, 29641 width: childOriginal.width * factor.from.x, 29642 outerHeight: childOriginal.outerHeight * factor.from.y, 29643 outerWidth: childOriginal.outerWidth * factor.from.x 29644 }, 29645 childTo = { 29646 height: childOriginal.height * factor.to.y, 29647 width: childOriginal.width * factor.to.x, 29648 outerHeight: childOriginal.height * factor.to.y, 29649 outerWidth: childOriginal.width * factor.to.x 29650 }; 29651 29652 // Vertical props scaling 29653 if ( factor.from.y !== factor.to.y ) { 29654 childFrom = $.effects.setTransition( child, vProps, factor.from.y, childFrom ); 29655 childTo = $.effects.setTransition( child, vProps, factor.to.y, childTo ); 29656 } 29657 29658 // Horizontal props scaling 29659 if ( factor.from.x !== factor.to.x ) { 29660 childFrom = $.effects.setTransition( child, hProps, factor.from.x, childFrom ); 29661 childTo = $.effects.setTransition( child, hProps, factor.to.x, childTo ); 29662 } 29663 29664 if ( restore ) { 29665 $.effects.saveStyle( child ); 29666 } 29667 29668 // Animate children 29669 child.css( childFrom ); 29670 child.animate( childTo, options.duration, options.easing, function() { 29671 29672 // Restore children 29673 if ( restore ) { 29674 $.effects.restoreStyle( child ); 29675 } 29676 } ); 29677 } ); 29678 } 29679 29680 // Animate 29681 element.animate( to, { 29682 queue: false, 29683 duration: options.duration, 29684 easing: options.easing, 29685 complete: function() { 29686 29687 var offset = element.offset(); 29688 29689 if ( to.opacity === 0 ) { 29690 element.css( "opacity", from.opacity ); 29691 } 29692 29693 if ( !restore ) { 29694 element 29695 .css( "position", position === "static" ? "relative" : position ) 29696 .offset( offset ); 29697 29698 // Need to save style here so that automatic style restoration 29699 // doesn't restore to the original styles from before the animation. 29700 $.effects.saveStyle( element ); 29701 } 29702 29703 done(); 29704 } 29705 } ); 29706 29707} ); 29708 29709 29710/*! 29711 * jQuery UI Effects Scale 1.13.2 29712 * http://jqueryui.com 29713 * 29714 * Copyright jQuery Foundation and other contributors 29715 * Released under the MIT license. 29716 * http://jquery.org/license 29717 */ 29718 29719//>>label: Scale Effect 29720//>>group: Effects 29721//>>description: Grows or shrinks an element and its content. 29722//>>docs: http://api.jqueryui.com/scale-effect/ 29723//>>demos: http://jqueryui.com/effect/ 29724 29725 29726var effectsEffectScale = $.effects.define( "scale", function( options, done ) { 29727 29728 // Create element 29729 var el = $( this ), 29730 mode = options.mode, 29731 percent = parseInt( options.percent, 10 ) || 29732 ( parseInt( options.percent, 10 ) === 0 ? 0 : ( mode !== "effect" ? 0 : 100 ) ), 29733 29734 newOptions = $.extend( true, { 29735 from: $.effects.scaledDimensions( el ), 29736 to: $.effects.scaledDimensions( el, percent, options.direction || "both" ), 29737 origin: options.origin || [ "middle", "center" ] 29738 }, options ); 29739 29740 // Fade option to support puff 29741 if ( options.fade ) { 29742 newOptions.from.opacity = 1; 29743 newOptions.to.opacity = 0; 29744 } 29745 29746 $.effects.effect.size.call( this, newOptions, done ); 29747} ); 29748 29749 29750/*! 29751 * jQuery UI Effects Puff 1.13.2 29752 * http://jqueryui.com 29753 * 29754 * Copyright jQuery Foundation and other contributors 29755 * Released under the MIT license. 29756 * http://jquery.org/license 29757 */ 29758 29759//>>label: Puff Effect 29760//>>group: Effects 29761//>>description: Creates a puff effect by scaling the element up and hiding it at the same time. 29762//>>docs: http://api.jqueryui.com/puff-effect/ 29763//>>demos: http://jqueryui.com/effect/ 29764 29765 29766var effectsEffectPuff = $.effects.define( "puff", "hide", function( options, done ) { 29767 var newOptions = $.extend( true, {}, options, { 29768 fade: true, 29769 percent: parseInt( options.percent, 10 ) || 150 29770 } ); 29771 29772 $.effects.effect.scale.call( this, newOptions, done ); 29773} ); 29774 29775 29776/*! 29777 * jQuery UI Effects Pulsate 1.13.2 29778 * http://jqueryui.com 29779 * 29780 * Copyright jQuery Foundation and other contributors 29781 * Released under the MIT license. 29782 * http://jquery.org/license 29783 */ 29784 29785//>>label: Pulsate Effect 29786//>>group: Effects 29787//>>description: Pulsates an element n times by changing the opacity to zero and back. 29788//>>docs: http://api.jqueryui.com/pulsate-effect/ 29789//>>demos: http://jqueryui.com/effect/ 29790 29791 29792var effectsEffectPulsate = $.effects.define( "pulsate", "show", function( options, done ) { 29793 var element = $( this ), 29794 mode = options.mode, 29795 show = mode === "show", 29796 hide = mode === "hide", 29797 showhide = show || hide, 29798 29799 // Showing or hiding leaves off the "last" animation 29800 anims = ( ( options.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ), 29801 duration = options.duration / anims, 29802 animateTo = 0, 29803 i = 1, 29804 queuelen = element.queue().length; 29805 29806 if ( show || !element.is( ":visible" ) ) { 29807 element.css( "opacity", 0 ).show(); 29808 animateTo = 1; 29809 } 29810 29811 // Anims - 1 opacity "toggles" 29812 for ( ; i < anims; i++ ) { 29813 element.animate( { opacity: animateTo }, duration, options.easing ); 29814 animateTo = 1 - animateTo; 29815 } 29816 29817 element.animate( { opacity: animateTo }, duration, options.easing ); 29818 29819 element.queue( done ); 29820 29821 $.effects.unshift( element, queuelen, anims + 1 ); 29822} ); 29823 29824 29825/*! 29826 * jQuery UI Effects Shake 1.13.2 29827 * http://jqueryui.com 29828 * 29829 * Copyright jQuery Foundation and other contributors 29830 * Released under the MIT license. 29831 * http://jquery.org/license 29832 */ 29833 29834//>>label: Shake Effect 29835//>>group: Effects 29836//>>description: Shakes an element horizontally or vertically n times. 29837//>>docs: http://api.jqueryui.com/shake-effect/ 29838//>>demos: http://jqueryui.com/effect/ 29839 29840 29841var effectsEffectShake = $.effects.define( "shake", function( options, done ) { 29842 29843 var i = 1, 29844 element = $( this ), 29845 direction = options.direction || "left", 29846 distance = options.distance || 20, 29847 times = options.times || 3, 29848 anims = times * 2 + 1, 29849 speed = Math.round( options.duration / anims ), 29850 ref = ( direction === "up" || direction === "down" ) ? "top" : "left", 29851 positiveMotion = ( direction === "up" || direction === "left" ), 29852 animation = {}, 29853 animation1 = {}, 29854 animation2 = {}, 29855 29856 queuelen = element.queue().length; 29857 29858 $.effects.createPlaceholder( element ); 29859 29860 // Animation 29861 animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance; 29862 animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2; 29863 animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2; 29864 29865 // Animate 29866 element.animate( animation, speed, options.easing ); 29867 29868 // Shakes 29869 for ( ; i < times; i++ ) { 29870 element 29871 .animate( animation1, speed, options.easing ) 29872 .animate( animation2, speed, options.easing ); 29873 } 29874 29875 element 29876 .animate( animation1, speed, options.easing ) 29877 .animate( animation, speed / 2, options.easing ) 29878 .queue( done ); 29879 29880 $.effects.unshift( element, queuelen, anims + 1 ); 29881} ); 29882 29883 29884/*! 29885 * jQuery UI Effects Slide 1.13.2 29886 * http://jqueryui.com 29887 * 29888 * Copyright jQuery Foundation and other contributors 29889 * Released under the MIT license. 29890 * http://jquery.org/license 29891 */ 29892 29893//>>label: Slide Effect 29894//>>group: Effects 29895//>>description: Slides an element in and out of the viewport. 29896//>>docs: http://api.jqueryui.com/slide-effect/ 29897//>>demos: http://jqueryui.com/effect/ 29898 29899 29900var effectsEffectSlide = $.effects.define( "slide", "show", function( options, done ) { 29901 var startClip, startRef, 29902 element = $( this ), 29903 map = { 29904 up: [ "bottom", "top" ], 29905 down: [ "top", "bottom" ], 29906 left: [ "right", "left" ], 29907 right: [ "left", "right" ] 29908 }, 29909 mode = options.mode, 29910 direction = options.direction || "left", 29911 ref = ( direction === "up" || direction === "down" ) ? "top" : "left", 29912 positiveMotion = ( direction === "up" || direction === "left" ), 29913 distance = options.distance || 29914 element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ), 29915 animation = {}; 29916 29917 $.effects.createPlaceholder( element ); 29918 29919 startClip = element.cssClip(); 29920 startRef = element.position()[ ref ]; 29921 29922 // Define hide animation 29923 animation[ ref ] = ( positiveMotion ? -1 : 1 ) * distance + startRef; 29924 animation.clip = element.cssClip(); 29925 animation.clip[ map[ direction ][ 1 ] ] = animation.clip[ map[ direction ][ 0 ] ]; 29926 29927 // Reverse the animation if we're showing 29928 if ( mode === "show" ) { 29929 element.cssClip( animation.clip ); 29930 element.css( ref, animation[ ref ] ); 29931 animation.clip = startClip; 29932 animation[ ref ] = startRef; 29933 } 29934 29935 // Actually animate 29936 element.animate( animation, { 29937 queue: false, 29938 duration: options.duration, 29939 easing: options.easing,
29940 complete: done 29941 } ); 29942} ); 29943 29944 29945/*! 29946 * jQuery UI Effects Transfer 1.13.2 29947 * http://jqueryui.com 29948 * 29949 * Copyright jQuery Foundation and other contributors 29950 * Released under the MIT license. 29951 * http://jquery.org/license 29952 */ 29953 29954//>>label: Transfer Effect 29955//>>group: Effects 29956//>>description: Displays a transfer effect from one element to another. 29957//>>docs: http://api.jqueryui.com/transfer-effect/ 29958//>>demos: http://jqueryui.com/effect/ 29959 29960 29961var effect; 29962if ( $.uiBackCompat !== false ) { 29963 effect = $.effects.define( "transfer", function( options, done ) { 29964 $( this ).transfer( options, done ); 29965 } ); 29966} 29967var effectsEffectTransfer = effect; 29968 29969 29970 29971 29972} ); 29973 29974/*jslint adsafe: false, bitwise: true, browser: true, cap: false, css: false, 29975 debug: false, devel: true, eqeqeq: true, es5: false, evil: false, 29976 forin: false, fragment: false, immed: true, laxbreak: false, newcap: true, 29977 nomen: false, on: false, onevar: true, passfail: false, plusplus: true, 29978 regexp: false, rhino: true, safe: false, strict: false, sub: false, 29979 undef: true, white: false, widget: false, windows: false */ 29980/*global jQuery: false, window: false */ 29981"use strict"; 29982 29983/* 29984 * Original code (c) 2010 Nick Galbreath 29985 * http://code.google.com/p/stringencoders/source/browse/#svn/trunk/javascript 29986 * 29987 * jQuery port (c) 2010 Carlo Zottmann 29988 * http://github.com/carlo/jquery-base64 29989 * 29990 * Permission is hereby granted, free of charge, to any person 29991 * obtaining a copy of this software and associated documentation 29992 * files (the "Software"), to deal in the Software without 29993 * restriction, including without limitation the rights to use, 29994 * copy, modify, merge, publish, distribute, sublicense, and/or sell 29995 * copies of the Software, and to permit persons to whom the 29996 * Software is furnished to do so, subject to the following 29997 * conditions: 29998 * 29999 * The above copyright notice and this permission notice shall be 30000 * included in all copies or substantial portions of the Software. 30001 * 30002 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 30003 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 30004 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 30005 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 30006 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 30007 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 30008 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 30009 * OTHER DEALINGS IN THE SOFTWARE. 30010*/ 30011 30012/* base64 encode/decode compatible with window.btoa/atob 30013 * 30014 * window.atob/btoa is a Firefox extension to convert binary data (the "b") 30015 * to base64 (ascii, the "a"). 30016 * 30017 * It is also found in Safari and Chrome. It is not available in IE. 30018 * 30019 * if (!window.btoa) window.btoa = $.base64.encode 30020 * if (!window.atob) window.atob = $.base64.decode 30021 * 30022 * The original spec's for atob/btoa are a bit lacking 30023 * https://developer.mozilla.org/en/DOM/window.atob 30024 * https://developer.mozilla.org/en/DOM/window.btoa 30025 * 30026 * window.btoa and $.base64.encode takes a string where charCodeAt is [0,255] 30027 * If any character is not [0,255], then an exception is thrown. 30028 * 30029 * window.atob and $.base64.decode take a base64-encoded string 30030 * If the input length is not a multiple of 4, or contains invalid characters 30031 * then an exception is thrown. 30032 */ 30033 30034jQuery.base64 = ( function( $ ) { 30035 30036 var _PADCHAR = "=", 30037 _ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", 30038 _VERSION = "1.0"; 30039 30040 30041 function _getbyte64( s, i ) { 30042 // This is oddly fast, except on Chrome/V8. 30043 // Minimal or no improvement in performance by using a 30044 // object with properties mapping chars to value (eg. 'A': 0) 30045 30046 var idx = _ALPHA.indexOf( s.charAt( i ) ); 30047 30048 if ( idx === -1 ) { 30049 throw "Cannot decode base64"; 30050 } 30051 30052 return idx; 30053 } 30054 30055 30056 function _decode( s ) { 30057 var pads = 0, 30058 i, 30059 b10, 30060 imax = s.length, 30061 x = []; 30062 30063 s = String( s ); 30064 30065 if ( imax === 0 ) { 30066 return s; 30067 } 30068 30069 if ( imax % 4 !== 0 ) { 30070 throw "Cannot decode base64"; 30071 } 30072 30073 if ( s.charAt( imax - 1 ) === _PADCHAR ) { 30074 pads = 1; 30075 30076 if ( s.charAt( imax - 2 ) === _PADCHAR ) { 30077 pads = 2; 30078 } 30079 30080 // either way, we want to ignore this last block 30081 imax -= 4; 30082 } 30083 30084 for ( i = 0; i < imax; i += 4 ) { 30085 b10 = ( _getbyte64( s, i ) << 18 ) | ( _getbyte64( s, i + 1 ) << 12 ) | ( _getbyte64( s, i + 2 ) << 6 ) | _getbyte64( s, i + 3 ); 30086 x.push( String.fromCharCode( b10 >> 16, ( b10 >> 8 ) & 0xff, b10 & 0xff ) ); 30087 } 30088 30089 switch ( pads ) { 30090 case 1: 30091 b10 = ( _getbyte64( s, i ) << 18 ) | ( _getbyte64( s, i + 1 ) << 12 ) | ( _getbyte64( s, i + 2 ) << 6 ); 30092 x.push( String.fromCharCode( b10 >> 16, ( b10 >> 8 ) & 0xff ) ); 30093 break; 30094 30095 case 2: 30096 b10 = ( _getbyte64( s, i ) << 18) | ( _getbyte64( s, i + 1 ) << 12 ); 30097 x.push( String.fromCharCode( b10 >> 16 ) ); 30098 break; 30099 } 30100 30101 return x.join( "" ); 30102 } 30103 30104
30105 function _getbyte( s, i ) { 30106 var x = s.charCodeAt( i ); 30107 30108 if ( x > 255 ) { 30109 throw "INVALID_CHARACTER_ERR: DOM Exception 5"; 30110 } 30111 30112 return x; 30113 } 30114 30115 30116 function _encode( s ) { 30117 if ( arguments.length !== 1 ) { 30118 throw "SyntaxError: exactly one argument required"; 30119 } 30120 30121 s = String( s ); 30122 30123 var i, 30124 b10, 30125 x = [], 30126 imax = s.length - s.length % 3; 30127 30128 if ( s.length === 0 ) { 30129 return s; 30130 } 30131 30132 for ( i = 0; i < imax; i += 3 ) { 30133 b10 = ( _getbyte( s, i ) << 16 ) | ( _getbyte( s, i + 1 ) << 8 ) | _getbyte( s, i + 2 ); 30134 x.push( _ALPHA.charAt( b10 >> 18 ) ); 30135 x.push( _ALPHA.charAt( ( b10 >> 12 ) & 0x3F ) ); 30136 x.push( _ALPHA.charAt( ( b10 >> 6 ) & 0x3f ) ); 30137 x.push( _ALPHA.charAt( b10 & 0x3f ) ); 30138 } 30139 30140 switch ( s.length - imax ) { 30141 case 1: 30142 b10 = _getbyte( s, i ) << 16; 30143 x.push( _ALPHA.charAt( b10 >> 18 ) + _ALPHA.charAt( ( b10 >> 12 ) & 0x3F ) + _PADCHAR + _PADCHAR ); 30144 break; 30145 30146 case 2: 30147 b10 = ( _getbyte( s, i ) << 16 ) | ( _getbyte( s, i + 1 ) << 8 ); 30148 x.push( _ALPHA.charAt( b10 >> 18 ) + _ALPHA.charAt( ( b10 >> 12 ) & 0x3F ) + _ALPHA.charAt( ( b10 >> 6 ) & 0x3f ) + _PADCHAR ); 30149 break; 30150 } 30151 30152 return x.join( "" ); 30153 } 30154 30155 30156 return { 30157 decode: _decode, 30158 encode: _encode, 30159 VERSION: _VERSION 30160 }; 30161 30162}( jQuery ) ); 30163 30164/*! 30165 * jQuery Cookie Plugin v1.4.0 30166 * https://github.com/carhartl/jquery-cookie 30167 * 30168 * Copyright 2013 Klaus Hartl 30169 * Released under the MIT license 30170 */ 30171(function (factory) { 30172 if (typeof define === 'function' && define.amd) { 30173 // AMD. Register as anonymous module. 30174 define(['jquery'], factory); 30175 } else { 30176 // Browser globals. 30177 factory(jQuery); 30178 } 30179}(function ($) { 30180 30181 var pluses = /\+/g; 30182 30183 function encode(s) { 30184 return config.raw ? s : encodeURIComponent(s); 30185 } 30186 30187 function decode(s) { 30188 return config.raw ? s : decodeURIComponent(s); 30189 } 30190 30191 function stringifyCookieValue(value) { 30192 return encode(config.json ? JSON.stringify(value) : String(value)); 30193 } 30194 30195 function parseCookieValue(s) { 30196 if (s.indexOf('"') === 0) { 30197 // This is a quoted cookie as according to RFC2068, unescape... 30198 s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); 30199 } 30200 30201 try { 30202 // Replace server-side written pluses with spaces. 30203 // If we can't decode the cookie, ignore it, it's unusable. 30204 s = decodeURIComponent(s.replace(pluses, ' ')); 30205 } catch(e) { 30206 return; 30207 } 30208 30209 try { 30210 // If we can't parse the cookie, ignore it, it's unusable. 30211 return config.json ? JSON.parse(s) : s; 30212 } catch(e) {} 30213 } 30214 30215 function read(s, converter) { 30216 var value = config.raw ? s : parseCookieValue(s); 30217 return $.isFunction(converter) ? converter(value) : value; 30218 } 30219 30220 var config = $.cookie = function (key, value, options) { 30221 30222 // Write 30223 if (value !== undefined && !$.isFunction(value)) { 30224 options = $.extend({}, config.defaults, options); 30225 30226 if (typeof options.expires === 'number') { 30227 var days = options.expires, t = options.expires = new Date(); 30228 t.setDate(t.getDate() + days); 30229 } 30230 30231 return (document.cookie = [ 30232 encode(key), '=', stringifyCookieValue(value), 30233 options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 30234 options.path ? '; path=' + options.path : '', 30235 options.domain ? '; domain=' + options.domain : '', 30236 options.secure ? '; secure' : '' 30237 ].join('')); 30238 } 30239 30240 // Read 30241 30242 var result = key ? undefined : {}; 30243 30244 // To prevent the for loop in the first place assign an empty array 30245 // in case there are no cookies at all. Also prevents odd result when 30246 // calling $.cookie(). 30247 var cookies = document.cookie ? document.cookie.split('; ') : []; 30248 30249 for (var i = 0, l = cookies.length; i < l; i++) { 30250 var parts = cookies[i].split('='); 30251 var name = decode(parts.shift()); 30252 var cookie = parts.join('='); 30253 30254 if (key && key === name) { 30255 // If second argument (value) is a function it's a converter... 30256 result = read(cookie, value); 30257 break; 30258 } 30259 30260 // Prevent storing a cookie that we couldn't decode. 30261 if (!key && (cookie = read(cookie)) !== undefined) { 30262 result[name] = cookie; 30263 } 30264 } 30265 30266 return result; 30267 }; 30268 30269 config.defaults = {}; 30270 30271 $.removeCookie = function (key, options) { 30272 if ($.cookie(key) !== undefined) {
30273 // Must not alter options, thus extending a fresh object... 30274 $.cookie(key, '', $.extend({}, options, { expires: -1 })); 30275 return true; 30276 } 30277 return false; 30278 }; 30279 30280})); 30281 30282;(function (global, factory) { 30283 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : 30284 typeof define === 'function' && define.amd ? define(factory) : 30285 global.moment = factory() 30286}(this, function () { 'use strict'; 30287 30288 var hookCallback; 30289 30290 function utils_hooks__hooks () { 30291 return hookCallback.apply(null, arguments); 30292 } 30293 30294 // This is done to register the method called with moment() 30295 // without creating circular dependencies. 30296 function setHookCallback (callback) { 30297 hookCallback = callback; 30298 } 30299 30300 function isArray(input) { 30301 return Object.prototype.toString.call(input) === '[object Array]'; 30302 } 30303 30304 function isDate(input) { 30305 return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; 30306 } 30307 30308 function map(arr, fn) { 30309 var res = [], i; 30310 for (i = 0; i < arr.length; ++i) { 30311 res.push(fn(arr[i], i)); 30312 } 30313 return res; 30314 } 30315 30316 function hasOwnProp(a, b) { 30317 return Object.prototype.hasOwnProperty.call(a, b); 30318 } 30319 30320 function extend(a, b) { 30321 for (var i in b) { 30322 if (hasOwnProp(b, i)) { 30323 a[i] = b[i]; 30324 } 30325 } 30326 30327 if (hasOwnProp(b, 'toString')) { 30328 a.toString = b.toString; 30329 } 30330 30331 if (hasOwnProp(b, 'valueOf')) { 30332 a.valueOf = b.valueOf; 30333 } 30334 30335 return a; 30336 } 30337 30338 function create_utc__createUTC (input, format, locale, strict) { 30339 return createLocalOrUTC(input, format, locale, strict, true).utc(); 30340 } 30341 30342 function defaultParsingFlags() { 30343 // We need to deep clone this object. 30344 return { 30345 empty : false, 30346 unusedTokens : [], 30347 unusedInput : [], 30348 overflow : -2, 30349 charsLeftOver : 0, 30350 nullInput : false, 30351 invalidMonth : null, 30352 invalidFormat : false, 30353 userInvalidated : false, 30354 iso : false 30355 }; 30356 } 30357 30358 function getParsingFlags(m) { 30359 if (m._pf == null) { 30360 m._pf = defaultParsingFlags(); 30361 } 30362 return m._pf; 30363 } 30364 30365 function valid__isValid(m) { 30366 if (m._isValid == null) { 30367 var flags = getParsingFlags(m); 30368 m._isValid = !isNaN(m._d.getTime()) && 30369 flags.overflow < 0 && 30370 !flags.empty && 30371 !flags.invalidMonth && 30372 !flags.invalidWeekday && 30373 !flags.nullInput && 30374 !flags.invalidFormat && 30375 !flags.userInvalidated; 30376 30377 if (m._strict) { 30378 m._isValid = m._isValid && 30379 flags.charsLeftOver === 0 && 30380 flags.unusedTokens.length === 0 && 30381 flags.bigHour === undefined; 30382 } 30383 } 30384 return m._isValid; 30385 } 30386 30387 function valid__createInvalid (flags) { 30388 var m = create_utc__createUTC(NaN); 30389 if (flags != null) { 30390 extend(getParsingFlags(m), flags); 30391 } 30392 else { 30393 getParsingFlags(m).userInvalidated = true; 30394 } 30395 30396 return m; 30397 } 30398 30399 var momentProperties = utils_hooks__hooks.momentProperties = []; 30400 30401 function copyConfig(to, from) { 30402 var i, prop, val; 30403 30404 if (typeof from._isAMomentObject !== 'undefined') { 30405 to._isAMomentObject = from._isAMomentObject; 30406 } 30407 if (typeof from._i !== 'undefined') { 30408 to._i = from._i; 30409 } 30410 if (typeof from._f !== 'undefined') { 30411 to._f = from._f; 30412 } 30413 if (typeof from._l !== 'undefined') { 30414 to._l = from._l; 30415 } 30416 if (typeof from._strict !== 'undefined') { 30417 to._strict = from._strict; 30418 } 30419 if (typeof from._tzm !== 'undefined') { 30420 to._tzm = from._tzm; 30421 } 30422 if (typeof from._isUTC !== 'undefined') { 30423 to._isUTC = from._isUTC; 30424 } 30425 if (typeof from._offset !== 'undefined') { 30426 to._offset = from._offset; 30427 } 30428 if (typeof from._pf !== 'undefined') { 30429 to._pf = getParsingFlags(from); 30430 } 30431 if (typeof from._locale !== 'undefined') { 30432 to._locale = from._locale; 30433 } 30434 30435 if (momentProperties.length > 0) { 30436 for (i in momentProperties) { 30437 prop = momentProperties[i]; 30438 val = from[prop]; 30439 if (typeof val !== 'undefined') { 30440 to[prop] = val; 30441 } 30442 } 30443 } 30444 30445 return to; 30446 } 30447 30448 var updateInProgress = false;
vendor: 18,374 bytes, lines 30449-31022
30449 30450 // Moment prototype object 30451 function Moment(config) { 30452 copyConfig(this, config); 30453 this._d = new Date(config._d != null ? config._d.getTime() : NaN); 30454 // Prevent infinite loop in case updateOffset creates new moment 30455 // objects. 30456 if (updateInProgress === false) { 30457 updateInProgress = true; 30458 utils_hooks__hooks.updateOffset(this); 30459 updateInProgress = false; 30460 } 30461 } 30462 30463 function isMoment (obj) { 30464 return obj instanceof Moment || (obj != null && obj._isAMomentObject != null); 30465 } 30466 30467 function absFloor (number) { 30468 if (number < 0) { 30469 return Math.ceil(number); 30470 } else { 30471 return Math.floor(number); 30472 } 30473 } 30474 30475 function toInt(argumentForCoercion) { 30476 var coercedNumber = +argumentForCoercion, 30477 value = 0; 30478 30479 if (coercedNumber !== 0 && isFinite(coercedNumber)) { 30480 value = absFloor(coercedNumber); 30481 } 30482 30483 return value; 30484 } 30485 30486 function compareArrays(array1, array2, dontConvert) { 30487 var len = Math.min(array1.length, array2.length), 30488 lengthDiff = Math.abs(array1.length - array2.length), 30489 diffs = 0, 30490 i; 30491 for (i = 0; i < len; i++) { 30492 if ((dontConvert && array1[i] !== array2[i]) || 30493 (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { 30494 diffs++; 30495 } 30496 } 30497 return diffs + lengthDiff; 30498 } 30499 30500 function Locale() { 30501 } 30502 30503 var locales = {}; 30504 var globalLocale; 30505 30506 function normalizeLocale(key) { 30507 return key ? key.toLowerCase().replace('_', '-') : key; 30508 } 30509 30510 // pick the locale from the array 30511 // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each 30512 // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root 30513 function chooseLocale(names) { 30514 var i = 0, j, next, locale, split; 30515 30516 while (i < names.length) { 30517 split = normalizeLocale(names[i]).split('-'); 30518 j = split.length; 30519 next = normalizeLocale(names[i + 1]); 30520 next = next ? next.split('-') : null; 30521 while (j > 0) { 30522 locale = loadLocale(split.slice(0, j).join('-')); 30523 if (locale) { 30524 return locale; 30525 } 30526 if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { 30527 //the next array item is better than a shallower substring of this one 30528 break; 30529 } 30530 j--; 30531 } 30532 i++; 30533 } 30534 return null; 30535 } 30536 30537 function loadLocale(name) { 30538 var oldLocale = null; 30539 // TODO: Find a better way to register and load all the locales in Node 30540 if (!locales[name] && typeof module !== 'undefined' && 30541 module && module.exports) { 30542 try { 30543 oldLocale = globalLocale._abbr; 30544 require('./locale/' + name); 30545 // because defineLocale currently also sets the global locale, we 30546 // want to undo that for lazy loaded locales 30547 locale_locales__getSetGlobalLocale(oldLocale); 30548 } catch (e) { } 30549 } 30550 return locales[name]; 30551 } 30552 30553 // This function will load locale and then set the global locale. If 30554 // no arguments are passed in, it will simply return the current global 30555 // locale key. 30556 function locale_locales__getSetGlobalLocale (key, values) { 30557 var data; 30558 if (key) { 30559 if (typeof values === 'undefined') { 30560 data = locale_locales__getLocale(key); 30561 } 30562 else { 30563 data = defineLocale(key, values); 30564 } 30565 30566 if (data) { 30567 // moment.duration._locale = moment._locale = data; 30568 globalLocale = data; 30569 } 30570 } 30571 30572 return globalLocale._abbr; 30573 } 30574 30575 function defineLocale (name, values) { 30576 if (values !== null) { 30577 values.abbr = name; 30578 locales[name] = locales[name] || new Locale(); 30579 locales[name].set(values); 30580 30581 // backwards compat for now: also set the locale 30582 locale_locales__getSetGlobalLocale(name); 30583 30584 return locales[name]; 30585 } else { 30586 // useful for testing 30587 delete locales[name]; 30588 return null; 30589 } 30590 } 30591 30592 // returns locale data 30593 function locale_locales__getLocale (key) { 30594 var locale; 30595 30596 if (key && key._locale && key._locale._abbr) { 30597 key = key._locale._abbr; 30598 } 30599 30600 if (!key) { 30601 return globalLocale; 30602 } 30603 30604 if (!isArray(key)) { 30605 //short-circuit everything else 30606 locale = loadLocale(key); 30607 if (locale) { 30608 return locale; 30609 } 30610 key = [key]; 30611 } 30612 30613 return chooseLocale(key); 30614 } 30615 30616 var aliases = {}; 30617 30618 function addUnitAlias (unit, shorthand) { 30619 var lowerCase = unit.toLowerCase(); 30620 aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; 30621 } 30622 30623 function normalizeUnits(units) { 30624 return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; 30625 } 30626 30627 function normalizeObjectUnits(inputObject) { 30628 var normalizedInput = {}, 30629 normalizedProp, 30630 prop; 30631 30632 for (prop in inputObject) { 30633 if (hasOwnProp(inputObject, prop)) { 30634 normalizedProp = normalizeUnits(prop); 30635 if (normalizedProp) { 30636 normalizedInput[normalizedProp] = inputObject[prop]; 30637 } 30638 } 30639 } 30640 30641 return normalizedInput; 30642 } 30643 30644 function makeGetSet (unit, keepTime) { 30645 return function (value) { 30646 if (value != null) { 30647 get_set__set(this, unit, value); 30648 utils_hooks__hooks.updateOffset(this, keepTime); 30649 return this; 30650 } else { 30651 return get_set__get(this, unit); 30652 } 30653 }; 30654 } 30655 30656 function get_set__get (mom, unit) { 30657 return mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit](); 30658 } 30659 30660 function get_set__set (mom, unit, value) { 30661 return mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); 30662 } 30663 30664 // MOMENTS 30665 30666 function getSet (units, value) { 30667 var unit; 30668 if (typeof units === 'object') { 30669 for (unit in units) { 30670 this.set(unit, units[unit]); 30671 } 30672 } else { 30673 units = normalizeUnits(units); 30674 if (typeof this[units] === 'function') { 30675 return this[units](value); 30676 } 30677 } 30678 return this; 30679 } 30680 30681 function zeroFill(number, targetLength, forceSign) { 30682 var absNumber = '' + Math.abs(number), 30683 zerosToFill = targetLength - absNumber.length, 30684 sign = number >= 0; 30685 return (sign ? (forceSign ? '+' : '') : '-') + 30686 Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; 30687 } 30688 30689 var formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; 30690 30691 var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; 30692 30693 var formatFunctions = {}; 30694 30695 var formatTokenFunctions = {}; 30696 30697 // token: 'M' 30698 // padded: ['MM', 2] 30699 // ordinal: 'Mo' 30700 // callback: function () { this.month() + 1 } 30701 function addFormatToken (token, padded, ordinal, callback) { 30702 var func = callback; 30703 if (typeof callback === 'string') { 30704 func = function () { 30705 return this[callback](); 30706 }; 30707 } 30708 if (token) { 30709 formatTokenFunctions[token] = func; 30710 } 30711 if (padded) { 30712 formatTokenFunctions[padded[0]] = function () { 30713 return zeroFill(func.apply(this, arguments), padded[1], padded[2]); 30714 }; 30715 } 30716 if (ordinal) { 30717 formatTokenFunctions[ordinal] = function () { 30718 return this.localeData().ordinal(func.apply(this, arguments), token); 30719 }; 30720 } 30721 } 30722 30723 function removeFormattingTokens(input) { 30724 if (input.match(/\[[\s\S]/)) { 30725 return input.replace(/^\[|\]$/g, ''); 30726 } 30727 return input.replace(/\\/g, ''); 30728 } 30729 30730 function makeFormatFunction(format) { 30731 var array = format.match(formattingTokens), i, length; 30732 30733 for (i = 0, length = array.length; i < length; i++) { 30734 if (formatTokenFunctions[array[i]]) { 30735 array[i] = formatTokenFunctions[array[i]]; 30736 } else { 30737 array[i] = removeFormattingTokens(array[i]); 30738 } 30739 } 30740 30741 return function (mom) { 30742 var output = ''; 30743 for (i = 0; i < length; i++) { 30744 output += array[i] instanceof Function ? array[i].call(mom, format) : array[i]; 30745 } 30746 return output; 30747 }; 30748 } 30749 30750 // format date using native date object 30751 function formatMoment(m, format) { 30752 if (!m.isValid()) { 30753 return m.localeData().invalidDate(); 30754 } 30755 30756 format = expandFormat(format, m.localeData()); 30757 formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); 30758 30759 return formatFunctions[format](m); 30760 } 30761 30762 function expandFormat(format, locale) { 30763 var i = 5; 30764 30765 function replaceLongDateFormatTokens(input) { 30766 return locale.longDateFormat(input) || input; 30767 } 30768 30769 localFormattingTokens.lastIndex = 0; 30770 while (i >= 0 && localFormattingTokens.test(format)) { 30771 format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); 30772 localFormattingTokens.lastIndex = 0; 30773 i -= 1; 30774 } 30775 30776 return format; 30777 } 30778 30779 var match1 = /\d/; // 0 - 9 30780 var match2 = /\d\d/; // 00 - 99 30781 var match3 = /\d{3}/; // 000 - 999 30782 var match4 = /\d{4}/; // 0000 - 9999 30783 var match6 = /[+-]?\d{6}/; // -999999 - 999999 30784 var match1to2 = /\d\d?/; // 0 - 99 30785 var match1to3 = /\d{1,3}/; // 0 - 999 30786 var match1to4 = /\d{1,4}/; // 0 - 9999 30787 var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 30788 30789 var matchUnsigned = /\d+/; // 0 - inf 30790 var matchSigned = /[+-]?\d+/; // -inf - inf 30791 30792 var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z 30793 30794 var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 30795 30796 // any word (or two) characters or numbers including two/three word month in arabic. 30797 var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i; 30798 30799 var regexes = {}; 30800 30801 function isFunction (sth) { 30802 // https://github.com/moment/moment/issues/2325 30803 return typeof sth === 'function' && 30804 Object.prototype.toString.call(sth) === '[object Function]'; 30805 } 30806 30807 30808 function addRegexToken (token, regex, strictRegex) { 30809 regexes[token] = isFunction(regex) ? regex : function (isStrict) { 30810 return (isStrict && strictRegex) ? strictRegex : regex; 30811 }; 30812 } 30813 30814 function getParseRegexForToken (token, config) { 30815 if (!hasOwnProp(regexes, token)) { 30816 return new RegExp(unescapeFormat(token)); 30817 } 30818 30819 return regexes[token](config._strict, config._locale); 30820 } 30821 30822 // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript 30823 function unescapeFormat(s) { 30824 return s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { 30825 return p1 || p2 || p3 || p4; 30826 }).replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); 30827 } 30828 30829 var tokens = {}; 30830 30831 function addParseToken (token, callback) { 30832 var i, func = callback; 30833 if (typeof token === 'string') { 30834 token = [token]; 30835 } 30836 if (typeof callback === 'number') { 30837 func = function (input, array) { 30838 array[callback] = toInt(input); 30839 }; 30840 } 30841 for (i = 0; i < token.length; i++) { 30842 tokens[token[i]] = func; 30843 } 30844 } 30845 30846 function addWeekParseToken (token, callback) { 30847 addParseToken(token, function (input, array, config, token) { 30848 config._w = config._w || {}; 30849 callback(input, config._w, config, token); 30850 }); 30851 } 30852 30853 function addTimeToArrayFromToken(token, input, config) { 30854 if (input != null && hasOwnProp(tokens, token)) { 30855 tokens[token](input, config._a, config, token); 30856 } 30857 } 30858 30859 var YEAR = 0; 30860 var MONTH = 1; 30861 var DATE = 2; 30862 var HOUR = 3; 30863 var MINUTE = 4; 30864 var SECOND = 5; 30865 var MILLISECOND = 6; 30866 30867 function daysInMonth(year, month) { 30868 return new Date(Date.UTC(year, month + 1, 0)).getUTCDate(); 30869 } 30870 30871 // FORMATTING 30872 30873 addFormatToken('M', ['MM', 2], 'Mo', function () { 30874 return this.month() + 1; 30875 }); 30876 30877 addFormatToken('MMM', 0, 0, function (format) { 30878 return this.localeData().monthsShort(this, format); 30879 }); 30880 30881 addFormatToken('MMMM', 0, 0, function (format) { 30882 return this.localeData().months(this, format); 30883 }); 30884 30885 // ALIASES 30886 30887 addUnitAlias('month', 'M'); 30888 30889 // PARSING 30890 30891 addRegexToken('M', match1to2); 30892 addRegexToken('MM', match1to2, match2); 30893 addRegexToken('MMM', matchWord); 30894 addRegexToken('MMMM', matchWord); 30895 30896 addParseToken(['M', 'MM'], function (input, array) { 30897 array[MONTH] = toInt(input) - 1; 30898 }); 30899 30900 addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { 30901 var month = config._locale.monthsParse(input, token, config._strict); 30902 // if we didn't find a month name, mark the date as invalid. 30903 if (month != null) { 30904 array[MONTH] = month; 30905 } else { 30906 getParsingFlags(config).invalidMonth = input; 30907 } 30908 }); 30909 30910 // LOCALES 30911 30912 var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); 30913 function localeMonths (m) { 30914 return this._months[m.month()]; 30915 } 30916 30917 var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); 30918 function localeMonthsShort (m) { 30919 return this._monthsShort[m.month()]; 30920 } 30921 30922 function localeMonthsParse (monthName, format, strict) { 30923 var i, mom, regex; 30924 30925 if (!this._monthsParse) { 30926 this._monthsParse = []; 30927 this._longMonthsParse = []; 30928 this._shortMonthsParse = []; 30929 } 30930 30931 for (i = 0; i < 12; i++) { 30932 // make the regex if we don't have it already 30933 mom = create_utc__createUTC([2000, i]); 30934 if (strict && !this._longMonthsParse[i]) { 30935 this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); 30936 this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); 30937 } 30938 if (!strict && !this._monthsParse[i]) { 30939 regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); 30940 this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); 30941 } 30942 // test the regex 30943 if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { 30944 return i; 30945 } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { 30946 return i; 30947 } else if (!strict && this._monthsParse[i].test(monthName)) { 30948 return i; 30949 } 30950 } 30951 } 30952 30953 // MOMENTS 30954 30955 function setMonth (mom, value) { 30956 var dayOfMonth; 30957 30958 // TODO: Move this out of here! 30959 if (typeof value === 'string') { 30960 value = mom.localeData().monthsParse(value); 30961 // TODO: Another silent failure? 30962 if (typeof value !== 'number') { 30963 return mom; 30964 } 30965 } 30966 30967 dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); 30968 mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); 30969 return mom; 30970 } 30971 30972 function getSetMonth (value) { 30973 if (value != null) { 30974 setMonth(this, value); 30975 utils_hooks__hooks.updateOffset(this, true); 30976 return this; 30977 } else { 30978 return get_set__get(this, 'Month'); 30979 } 30980 } 30981 30982 function getDaysInMonth () { 30983 return daysInMonth(this.year(), this.month()); 30984 } 30985 30986 function checkOverflow (m) { 30987 var overflow; 30988 var a = m._a; 30989 30990 if (a && getParsingFlags(m).overflow === -2) { 30991 overflow = 30992 a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : 30993 a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : 30994 a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : 30995 a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : 30996 a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : 30997 a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : 30998 -1; 30999 31000 if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { 31001 overflow = DATE; 31002 } 31003 31004 getParsingFlags(m).overflow = overflow; 31005 } 31006 31007 return m; 31008 } 31009 31010 function warn(msg) { 31011 if (utils_hooks__hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) { 31012 console.warn('Deprecation warning: ' + msg); 31013 } 31014 } 31015 31016 function deprecate(msg, fn) { 31017 var firstTime = true; 31018 31019 return extend(function () { 31020 if (firstTime) { 31021 warn(msg + '\n' + (new Error()).stack); 31022 firstTime = false;
31023 } 31024 return fn.apply(this, arguments); 31025 }, fn); 31026 } 31027 31028 var deprecations = {}; 31029 31030 function deprecateSimple(name, msg) { 31031 if (!deprecations[name]) { 31032 warn(msg); 31033 deprecations[name] = true; 31034 } 31035 } 31036 31037 utils_hooks__hooks.suppressDeprecationWarnings = false; 31038 31039 var from_string__isoRegex = /^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; 31040 31041 var isoDates = [ 31042 ['YYYYYY-MM-DD', /[+-]\d{6}-\d{2}-\d{2}/], 31043 ['YYYY-MM-DD', /\d{4}-\d{2}-\d{2}/], 31044 ['GGGG-[W]WW-E', /\d{4}-W\d{2}-\d/], 31045 ['GGGG-[W]WW', /\d{4}-W\d{2}/], 31046 ['YYYY-DDD', /\d{4}-\d{3}/] 31047 ]; 31048 31049 // iso time formats and regexes 31050 var isoTimes = [ 31051 ['HH:mm:ss.SSSS', /(T| )\d\d:\d\d:\d\d\.\d+/], 31052 ['HH:mm:ss', /(T| )\d\d:\d\d:\d\d/], 31053 ['HH:mm', /(T| )\d\d:\d\d/], 31054 ['HH', /(T| )\d\d/] 31055 ]; 31056 31057 var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; 31058 31059 // date from iso format 31060 function configFromISO(config) { 31061 var i, l, 31062 string = config._i, 31063 match = from_string__isoRegex.exec(string); 31064 31065 if (match) { 31066 getParsingFlags(config).iso = true; 31067 for (i = 0, l = isoDates.length; i < l; i++) { 31068 if (isoDates[i][1].exec(string)) { 31069 config._f = isoDates[i][0]; 31070 break; 31071 } 31072 } 31073 for (i = 0, l = isoTimes.length; i < l; i++) { 31074 if (isoTimes[i][1].exec(string)) { 31075 // match[6] should be 'T' or space 31076 config._f += (match[6] || ' ') + isoTimes[i][0]; 31077 break; 31078 } 31079 } 31080 if (string.match(matchOffset)) { 31081 config._f += 'Z'; 31082 } 31083 configFromStringAndFormat(config); 31084 } else { 31085 config._isValid = false; 31086 } 31087 } 31088 31089 // date from iso format or fallback 31090 function configFromString(config) { 31091 var matched = aspNetJsonRegex.exec(config._i); 31092 31093 if (matched !== null) { 31094 config._d = new Date(+matched[1]); 31095 return; 31096 } 31097 31098 configFromISO(config); 31099 if (config._isValid === false) { 31100 delete config._isValid; 31101 utils_hooks__hooks.createFromInputFallback(config); 31102 } 31103 } 31104 31105 utils_hooks__hooks.createFromInputFallback = deprecate( 31106 'moment construction falls back to js Date. This is ' + 31107 'discouraged and will be removed in upcoming major ' + 31108 'release. Please refer to ' + 31109 'https://github.com/moment/moment/issues/1407 for more info.', 31110 function (config) { 31111 config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); 31112 } 31113 ); 31114 31115 function createDate (y, m, d, h, M, s, ms) { 31116 //can't just apply() to create a date: 31117 //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply 31118 var date = new Date(y, m, d, h, M, s, ms); 31119 31120 //the date constructor doesn't accept years < 1970 31121 if (y < 1970) { 31122 date.setFullYear(y); 31123 } 31124 return date; 31125 } 31126 31127 function createUTCDate (y) { 31128 var date = new Date(Date.UTC.apply(null, arguments)); 31129 if (y < 1970) { 31130 date.setUTCFullYear(y); 31131 } 31132 return date; 31133 } 31134 31135 addFormatToken(0, ['YY', 2], 0, function () { 31136 return this.year() % 100; 31137 }); 31138 31139 addFormatToken(0, ['YYYY', 4], 0, 'year'); 31140 addFormatToken(0, ['YYYYY', 5], 0, 'year'); 31141 addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); 31142 31143 // ALIASES 31144 31145 addUnitAlias('year', 'y'); 31146 31147 // PARSING 31148 31149 addRegexToken('Y', matchSigned); 31150 addRegexToken('YY', match1to2, match2); 31151 addRegexToken('YYYY', match1to4, match4); 31152 addRegexToken('YYYYY', match1to6, match6); 31153 addRegexToken('YYYYYY', match1to6, match6); 31154 31155 addParseToken(['YYYYY', 'YYYYYY'], YEAR); 31156 addParseToken('YYYY', function (input, array) { 31157 array[YEAR] = input.length === 2 ? utils_hooks__hooks.parseTwoDigitYear(input) : toInt(input); 31158 }); 31159 addParseToken('YY', function (input, array) { 31160 array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input); 31161 }); 31162 31163 // HELPERS 31164 31165 function daysInYear(year) { 31166 return isLeapYear(year) ? 366 : 365; 31167 } 31168 31169 function isLeapYear(year) { 31170 return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; 31171 } 31172 31173 // HOOKS 31174 31175 utils_hooks__hooks.parseTwoDigitYear = function (input) { 31176 return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); 31177 }; 31178 31179 // MOMENTS 31180 31181 var getSetYear = makeGetSet('FullYear', false); 31182 31183 function getIsLeapYear () { 31184 return isLeapYear(this.year()); 31185 } 31186 31187 addFormatToken('w', ['ww', 2], 'wo', 'week'); 31188 addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); 31189 31190 // ALIASES 31191 31192 addUnitAlias('week', 'w'); 31193 addUnitAlias('isoWeek', 'W'); 31194 31195 // PARSING 31196 31197 addRegexToken('w', match1to2); 31198 addRegexToken('ww', match1to2, match2); 31199 addRegexToken('W', match1to2); 31200 addRegexToken('WW', match1to2, match2); 31201
31202 addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { 31203 week[token.substr(0, 1)] = toInt(input); 31204 }); 31205 31206 // HELPERS 31207 31208 // firstDayOfWeek 0 = sun, 6 = sat 31209 // the day of the week that starts the week 31210 // (usually sunday or monday) 31211 // firstDayOfWeekOfYear 0 = sun, 6 = sat 31212 // the first week is the week that contains the first 31213 // of this day of the week 31214 // (eg. ISO weeks use thursday (4)) 31215 function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) { 31216 var end = firstDayOfWeekOfYear - firstDayOfWeek, 31217 daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(), 31218 adjustedMoment; 31219 31220 31221 if (daysToDayOfWeek > end) { 31222 daysToDayOfWeek -= 7; 31223 } 31224 31225 if (daysToDayOfWeek < end - 7) { 31226 daysToDayOfWeek += 7; 31227 } 31228 31229 adjustedMoment = local__createLocal(mom).add(daysToDayOfWeek, 'd'); 31230 return { 31231 week: Math.ceil(adjustedMoment.dayOfYear() / 7), 31232 year: adjustedMoment.year() 31233 }; 31234 } 31235 31236 // LOCALES 31237 31238 function localeWeek (mom) { 31239 return weekOfYear(mom, this._week.dow, this._week.doy).week; 31240 } 31241 31242 var defaultLocaleWeek = { 31243 dow : 0, // Sunday is the first day of the week. 31244 doy : 6 // The week that contains Jan 1st is the first week of the year. 31245 }; 31246 31247 function localeFirstDayOfWeek () { 31248 return this._week.dow; 31249 } 31250 31251 function localeFirstDayOfYear () { 31252 return this._week.doy; 31253 } 31254 31255 // MOMENTS 31256 31257 function getSetWeek (input) { 31258 var week = this.localeData().week(this); 31259 return input == null ? week : this.add((input - week) * 7, 'd'); 31260 } 31261 31262 function getSetISOWeek (input) { 31263 var week = weekOfYear(this, 1, 4).week; 31264 return input == null ? week : this.add((input - week) * 7, 'd'); 31265 } 31266 31267 addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); 31268 31269 // ALIASES 31270 31271 addUnitAlias('dayOfYear', 'DDD'); 31272 31273 // PARSING 31274 31275 addRegexToken('DDD', match1to3); 31276 addRegexToken('DDDD', match3); 31277 addParseToken(['DDD', 'DDDD'], function (input, array, config) { 31278 config._dayOfYear = toInt(input); 31279 }); 31280 31281 // HELPERS 31282 31283 //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday 31284 function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) { 31285 var week1Jan = 6 + firstDayOfWeek - firstDayOfWeekOfYear, janX = createUTCDate(year, 0, 1 + week1Jan), d = janX.getUTCDay(), dayOfYear; 31286 if (d < firstDayOfWeek) { 31287 d += 7; 31288 } 31289 31290 weekday = weekday != null ? 1 * weekday : firstDayOfWeek; 31291 31292 dayOfYear = 1 + week1Jan + 7 * (week - 1) - d + weekday; 31293 31294 return { 31295 year: dayOfYear > 0 ? year : year - 1, 31296 dayOfYear: dayOfYear > 0 ? dayOfYear : daysInYear(year - 1) + dayOfYear 31297 }; 31298 } 31299 31300 // MOMENTS 31301 31302 function getSetDayOfYear (input) { 31303 var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; 31304 return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); 31305 } 31306 31307 // Pick the first defined of two or three arguments. 31308 function defaults(a, b, c) { 31309 if (a != null) { 31310 return a; 31311 } 31312 if (b != null) { 31313 return b; 31314 } 31315 return c; 31316 } 31317 31318 function currentDateArray(config) { 31319 var now = new Date(); 31320 if (config._useUTC) { 31321 return [now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate()]; 31322 } 31323 return [now.getFullYear(), now.getMonth(), now.getDate()]; 31324 } 31325 31326 // convert an array to a date. 31327 // the array should mirror the parameters below 31328 // note: all values past the year are optional and will default to the lowest possible value. 31329 // [year, month, day , hour, minute, second, millisecond] 31330 function configFromArray (config) { 31331 var i, date, input = [], currentDate, yearToUse; 31332 31333 if (config._d) { 31334 return; 31335 } 31336 31337 currentDate = currentDateArray(config); 31338 31339 //compute day of the year from weeks and weekdays 31340 if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { 31341 dayOfYearFromWeekInfo(config); 31342 } 31343 31344 //if the day of the year is set, figure out what it is 31345 if (config._dayOfYear) { 31346 yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); 31347 31348 if (config._dayOfYear > daysInYear(yearToUse)) { 31349 getParsingFlags(config)._overflowDayOfYear = true; 31350 } 31351 31352 date = createUTCDate(yearToUse, 0, config._dayOfYear); 31353 config._a[MONTH] = date.getUTCMonth(); 31354 config._a[DATE] = date.getUTCDate(); 31355 } 31356 31357 // Default to current date. 31358 // * if no year, month, day of month are given, default to today 31359 // * if day of month is given, default month and year 31360 // * if month is given, default only year 31361 // * if year is given, don't default anything 31362 for (i = 0; i < 3 && config._a[i] == null; ++i) {
vendor: 29,378 bytes, lines 31363-32225
31363 config._a[i] = input[i] = currentDate[i]; 31364 } 31365 31366 // Zero out whatever was not defaulted, including time 31367 for (; i < 7; i++) { 31368 config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; 31369 } 31370 31371 // Check for 24:00:00.000 31372 if (config._a[HOUR] === 24 && 31373 config._a[MINUTE] === 0 && 31374 config._a[SECOND] === 0 && 31375 config._a[MILLISECOND] === 0) { 31376 config._nextDay = true; 31377 config._a[HOUR] = 0; 31378 } 31379 31380 config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); 31381 // Apply timezone offset from input. The actual utcOffset can be changed 31382 // with parseZone. 31383 if (config._tzm != null) { 31384 config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); 31385 } 31386 31387 if (config._nextDay) { 31388 config._a[HOUR] = 24; 31389 } 31390 } 31391 31392 function dayOfYearFromWeekInfo(config) { 31393 var w, weekYear, week, weekday, dow, doy, temp; 31394 31395 w = config._w; 31396 if (w.GG != null || w.W != null || w.E != null) { 31397 dow = 1; 31398 doy = 4; 31399 31400 // TODO: We need to take the current isoWeekYear, but that depends on 31401 // how we interpret now (local, utc, fixed offset). So create 31402 // a now version of current config (take local/utc/offset flags, and 31403 // create now). 31404 weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year); 31405 week = defaults(w.W, 1); 31406 weekday = defaults(w.E, 1); 31407 } else { 31408 dow = config._locale._week.dow; 31409 doy = config._locale._week.doy; 31410 31411 weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year); 31412 week = defaults(w.w, 1); 31413 31414 if (w.d != null) { 31415 // weekday -- low day numbers are considered next week 31416 weekday = w.d; 31417 if (weekday < dow) { 31418 ++week; 31419 } 31420 } else if (w.e != null) { 31421 // local weekday -- counting starts from begining of week 31422 weekday = w.e + dow; 31423 } else { 31424 // default to begining of week 31425 weekday = dow; 31426 } 31427 } 31428 temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow); 31429 31430 config._a[YEAR] = temp.year; 31431 config._dayOfYear = temp.dayOfYear; 31432 } 31433 31434 utils_hooks__hooks.ISO_8601 = function () {}; 31435 31436 // date from string and format string 31437 function configFromStringAndFormat(config) { 31438 // TODO: Move this to another part of the creation flow to prevent circular deps 31439 if (config._f === utils_hooks__hooks.ISO_8601) { 31440 configFromISO(config); 31441 return; 31442 } 31443 31444 config._a = []; 31445 getParsingFlags(config).empty = true; 31446 31447 // This array is used to make a Date, either with `new Date` or `Date.UTC` 31448 var string = '' + config._i, 31449 i, parsedInput, tokens, token, skipped, 31450 stringLength = string.length, 31451 totalParsedInputLength = 0; 31452 31453 tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; 31454 31455 for (i = 0; i < tokens.length; i++) { 31456 token = tokens[i]; 31457 parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; 31458 if (parsedInput) { 31459 skipped = string.substr(0, string.indexOf(parsedInput)); 31460 if (skipped.length > 0) { 31461 getParsingFlags(config).unusedInput.push(skipped); 31462 } 31463 string = string.slice(string.indexOf(parsedInput) + parsedInput.length); 31464 totalParsedInputLength += parsedInput.length; 31465 } 31466 // don't parse if it's not a known token 31467 if (formatTokenFunctions[token]) { 31468 if (parsedInput) { 31469 getParsingFlags(config).empty = false; 31470 } 31471 else { 31472 getParsingFlags(config).unusedTokens.push(token); 31473 } 31474 addTimeToArrayFromToken(token, parsedInput, config); 31475 } 31476 else if (config._strict && !parsedInput) { 31477 getParsingFlags(config).unusedTokens.push(token); 31478 } 31479 } 31480 31481 // add remaining unparsed input length to the string 31482 getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; 31483 if (string.length > 0) { 31484 getParsingFlags(config).unusedInput.push(string); 31485 } 31486 31487 // clear _12h flag if hour is <= 12 31488 if (getParsingFlags(config).bigHour === true && 31489 config._a[HOUR] <= 12 && 31490 config._a[HOUR] > 0) { 31491 getParsingFlags(config).bigHour = undefined; 31492 } 31493 // handle meridiem 31494 config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); 31495 31496 configFromArray(config); 31497 checkOverflow(config); 31498 } 31499 31500 31501 function meridiemFixWrap (locale, hour, meridiem) { 31502 var isPm; 31503 31504 if (meridiem == null) { 31505 // nothing to do 31506 return hour; 31507 } 31508 if (locale.meridiemHour != null) { 31509 return locale.meridiemHour(hour, meridiem); 31510 } else if (locale.isPM != null) { 31511 // Fallback 31512 isPm = locale.isPM(meridiem); 31513 if (isPm && hour < 12) { 31514 hour += 12; 31515 } 31516 if (!isPm && hour === 12) { 31517 hour = 0; 31518 } 31519 return hour; 31520 } else { 31521 // this is not supposed to happen 31522 return hour; 31523 } 31524 } 31525 31526 function configFromStringAndArray(config) { 31527 var tempConfig, 31528 bestMoment, 31529 31530 scoreToBeat, 31531 i, 31532 currentScore; 31533 31534 if (config._f.length === 0) { 31535 getParsingFlags(config).invalidFormat = true; 31536 config._d = new Date(NaN); 31537 return; 31538 } 31539 31540 for (i = 0; i < config._f.length; i++) { 31541 currentScore = 0; 31542 tempConfig = copyConfig({}, config); 31543 if (config._useUTC != null) { 31544 tempConfig._useUTC = config._useUTC; 31545 } 31546 tempConfig._f = config._f[i]; 31547 configFromStringAndFormat(tempConfig); 31548 31549 if (!valid__isValid(tempConfig)) { 31550 continue; 31551 } 31552 31553 // if there is any input that was not parsed add a penalty for that format 31554 currentScore += getParsingFlags(tempConfig).charsLeftOver; 31555 31556 //or tokens 31557 currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; 31558 31559 getParsingFlags(tempConfig).score = currentScore; 31560 31561 if (scoreToBeat == null || currentScore < scoreToBeat) { 31562 scoreToBeat = currentScore; 31563 bestMoment = tempConfig; 31564 } 31565 } 31566 31567 extend(config, bestMoment || tempConfig); 31568 } 31569 31570 function configFromObject(config) { 31571 if (config._d) { 31572 return; 31573 } 31574 31575 var i = normalizeObjectUnits(config._i); 31576 config._a = [i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond]; 31577 31578 configFromArray(config); 31579 } 31580 31581 function createFromConfig (config) { 31582 var res = new Moment(checkOverflow(prepareConfig(config))); 31583 if (res._nextDay) { 31584 // Adding is smart enough around DST 31585 res.add(1, 'd'); 31586 res._nextDay = undefined; 31587 } 31588 31589 return res; 31590 } 31591 31592 function prepareConfig (config) { 31593 var input = config._i, 31594 format = config._f; 31595 31596 config._locale = config._locale || locale_locales__getLocale(config._l); 31597 31598 if (input === null || (format === undefined && input === '')) { 31599 return valid__createInvalid({nullInput: true}); 31600 } 31601 31602 if (typeof input === 'string') { 31603 config._i = input = config._locale.preparse(input); 31604 } 31605 31606 if (isMoment(input)) { 31607 return new Moment(checkOverflow(input)); 31608 } else if (isArray(format)) { 31609 configFromStringAndArray(config); 31610 } else if (format) { 31611 configFromStringAndFormat(config); 31612 } else if (isDate(input)) { 31613 config._d = input; 31614 } else { 31615 configFromInput(config); 31616 } 31617 31618 return config; 31619 } 31620 31621 function configFromInput(config) { 31622 var input = config._i; 31623 if (input === undefined) { 31624 config._d = new Date(); 31625 } else if (isDate(input)) { 31626 config._d = new Date(+input); 31627 } else if (typeof input === 'string') { 31628 configFromString(config); 31629 } else if (isArray(input)) { 31630 config._a = map(input.slice(0), function (obj) { 31631 return parseInt(obj, 10); 31632 }); 31633 configFromArray(config); 31634 } else if (typeof(input) === 'object') { 31635 configFromObject(config); 31636 } else if (typeof(input) === 'number') { 31637 // from milliseconds 31638 config._d = new Date(input); 31639 } else { 31640 utils_hooks__hooks.createFromInputFallback(config); 31641 } 31642 } 31643 31644 function createLocalOrUTC (input, format, locale, strict, isUTC) { 31645 var c = {}; 31646 31647 if (typeof(locale) === 'boolean') { 31648 strict = locale; 31649 locale = undefined; 31650 } 31651 // object construction must be done this way. 31652 // https://github.com/moment/moment/issues/1423 31653 c._isAMomentObject = true; 31654 c._useUTC = c._isUTC = isUTC; 31655 c._l = locale; 31656 c._i = input; 31657 c._f = format; 31658 c._strict = strict; 31659 31660 return createFromConfig(c); 31661 } 31662 31663 function local__createLocal (input, format, locale, strict) { 31664 return createLocalOrUTC(input, format, locale, strict, false); 31665 } 31666 31667 var prototypeMin = deprecate( 31668 'moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548', 31669 function () { 31670 var other = local__createLocal.apply(null, arguments); 31671 return other < this ? this : other; 31672 } 31673 ); 31674 31675 var prototypeMax = deprecate( 31676 'moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548', 31677 function () { 31678 var other = local__createLocal.apply(null, arguments); 31679 return other > this ? this : other; 31680 } 31681 ); 31682 31683 // Pick a moment m from moments so that m[fn](other) is true for all 31684 // other. This relies on the function fn to be transitive. 31685 // 31686 // moments should either be an array of moment objects or an array, whose 31687 // first element is an array of moment objects. 31688 function pickBy(fn, moments) { 31689 var res, i; 31690 if (moments.length === 1 && isArray(moments[0])) { 31691 moments = moments[0]; 31692 } 31693 if (!moments.length) { 31694 return local__createLocal(); 31695 } 31696 res = moments[0]; 31697 for (i = 1; i < moments.length; ++i) { 31698 if (!moments[i].isValid() || moments[i][fn](res)) { 31699 res = moments[i]; 31700 } 31701 } 31702 return res; 31703 } 31704 31705 // TODO: Use [].sort instead? 31706 function min () { 31707 var args = [].slice.call(arguments, 0); 31708 31709 return pickBy('isBefore', args); 31710 } 31711 31712 function max () { 31713 var args = [].slice.call(arguments, 0); 31714 31715 return pickBy('isAfter', args); 31716 } 31717 31718 function Duration (duration) { 31719 var normalizedInput = normalizeObjectUnits(duration), 31720 years = normalizedInput.year || 0, 31721 quarters = normalizedInput.quarter || 0, 31722 months = normalizedInput.month || 0, 31723 weeks = normalizedInput.week || 0, 31724 days = normalizedInput.day || 0, 31725 hours = normalizedInput.hour || 0, 31726 minutes = normalizedInput.minute || 0, 31727 seconds = normalizedInput.second || 0, 31728 milliseconds = normalizedInput.millisecond || 0; 31729 31730 // representation for dateAddRemove 31731 this._milliseconds = +milliseconds + 31732 seconds * 1e3 + // 1000 31733 minutes * 6e4 + // 1000 * 60 31734 hours * 36e5; // 1000 * 60 * 60 31735 // Because of dateAddRemove treats 24 hours as different from a 31736 // day when working around DST, we need to store them separately 31737 this._days = +days + 31738 weeks * 7; 31739 // It is impossible translate months into days without knowing 31740 // which months you are are talking about, so we have to store 31741 // it separately. 31742 this._months = +months + 31743 quarters * 3 + 31744 years * 12; 31745 31746 this._data = {}; 31747 31748 this._locale = locale_locales__getLocale(); 31749 31750 this._bubble(); 31751 } 31752 31753 function isDuration (obj) { 31754 return obj instanceof Duration; 31755 } 31756 31757 function offset (token, separator) { 31758 addFormatToken(token, 0, 0, function () { 31759 var offset = this.utcOffset(); 31760 var sign = '+'; 31761 if (offset < 0) { 31762 offset = -offset; 31763 sign = '-'; 31764 } 31765 return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2); 31766 }); 31767 } 31768 31769 offset('Z', ':'); 31770 offset('ZZ', ''); 31771 31772 // PARSING 31773 31774 addRegexToken('Z', matchOffset); 31775 addRegexToken('ZZ', matchOffset); 31776 addParseToken(['Z', 'ZZ'], function (input, array, config) { 31777 config._useUTC = true; 31778 config._tzm = offsetFromString(input); 31779 }); 31780 31781 // HELPERS 31782 31783 // timezone chunker 31784 // '+10:00' > ['10', '00'] 31785 // '-1530' > ['-15', '30'] 31786 var chunkOffset = /([\+\-]|\d\d)/gi; 31787 31788 function offsetFromString(string) { 31789 var matches = ((string || '').match(matchOffset) || []); 31790 var chunk = matches[matches.length - 1] || []; 31791 var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; 31792 var minutes = +(parts[1] * 60) + toInt(parts[2]); 31793 31794 return parts[0] === '+' ? minutes : -minutes; 31795 } 31796 31797 // Return a moment from input, that is local/utc/zone equivalent to model. 31798 function cloneWithOffset(input, model) { 31799 var res, diff; 31800 if (model._isUTC) { 31801 res = model.clone(); 31802 diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res); 31803 // Use low-level api, because this fn is low-level api. 31804 res._d.setTime(+res._d + diff); 31805 utils_hooks__hooks.updateOffset(res, false); 31806 return res; 31807 } else { 31808 return local__createLocal(input).local(); 31809 } 31810 } 31811 31812 function getDateOffset (m) { 31813 // On Firefox.24 Date#getTimezoneOffset returns a floating point. 31814 // https://github.com/moment/moment/pull/1871 31815 return -Math.round(m._d.getTimezoneOffset() / 15) * 15; 31816 } 31817 31818 // HOOKS 31819 31820 // This function will be called whenever a moment is mutated. 31821 // It is intended to keep the offset in sync with the timezone. 31822 utils_hooks__hooks.updateOffset = function () {}; 31823 31824 // MOMENTS 31825 31826 // keepLocalTime = true means only change the timezone, without 31827 // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> 31828 // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset 31829 // +0200, so we adjust the time as needed, to be valid. 31830 // 31831 // Keeping the time actually adds/subtracts (one hour) 31832 // from the actual represented time. That is why we call updateOffset 31833 // a second time. In case it wants us to change the offset again 31834 // _changeInProgress == true case, then we have to adjust, because 31835 // there is no such time in the given timezone. 31836 function getSetOffset (input, keepLocalTime) { 31837 var offset = this._offset || 0, 31838 localAdjust; 31839 if (input != null) { 31840 if (typeof input === 'string') { 31841 input = offsetFromString(input); 31842 } 31843 if (Math.abs(input) < 16) { 31844 input = input * 60; 31845 } 31846 if (!this._isUTC && keepLocalTime) { 31847 localAdjust = getDateOffset(this); 31848 } 31849 this._offset = input; 31850 this._isUTC = true; 31851 if (localAdjust != null) { 31852 this.add(localAdjust, 'm'); 31853 } 31854 if (offset !== input) { 31855 if (!keepLocalTime || this._changeInProgress) { 31856 add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false); 31857 } else if (!this._changeInProgress) { 31858 this._changeInProgress = true; 31859 utils_hooks__hooks.updateOffset(this, true); 31860 this._changeInProgress = null; 31861 } 31862 } 31863 return this; 31864 } else { 31865 return this._isUTC ? offset : getDateOffset(this); 31866 } 31867 } 31868 31869 function getSetZone (input, keepLocalTime) { 31870 if (input != null) { 31871 if (typeof input !== 'string') { 31872 input = -input; 31873 } 31874 31875 this.utcOffset(input, keepLocalTime); 31876 31877 return this; 31878 } else { 31879 return -this.utcOffset(); 31880 } 31881 } 31882 31883 function setOffsetToUTC (keepLocalTime) { 31884 return this.utcOffset(0, keepLocalTime); 31885 } 31886 31887 function setOffsetToLocal (keepLocalTime) { 31888 if (this._isUTC) { 31889 this.utcOffset(0, keepLocalTime); 31890 this._isUTC = false; 31891 31892 if (keepLocalTime) { 31893 this.subtract(getDateOffset(this), 'm'); 31894 } 31895 } 31896 return this; 31897 } 31898 31899 function setOffsetToParsedOffset () { 31900 if (this._tzm) { 31901 this.utcOffset(this._tzm); 31902 } else if (typeof this._i === 'string') { 31903 this.utcOffset(offsetFromString(this._i)); 31904 } 31905 return this; 31906 } 31907 31908 function hasAlignedHourOffset (input) { 31909 input = input ? local__createLocal(input).utcOffset() : 0; 31910 31911 return (this.utcOffset() - input) % 60 === 0; 31912 } 31913 31914 function isDaylightSavingTime () { 31915 return ( 31916 this.utcOffset() > this.clone().month(0).utcOffset() || 31917 this.utcOffset() > this.clone().month(5).utcOffset() 31918 ); 31919 } 31920 31921 function isDaylightSavingTimeShifted () { 31922 if (typeof this._isDSTShifted !== 'undefined') { 31923 return this._isDSTShifted; 31924 } 31925 31926 var c = {}; 31927 31928 copyConfig(c, this); 31929 c = prepareConfig(c); 31930 31931 if (c._a) { 31932 var other = c._isUTC ? create_utc__createUTC(c._a) : local__createLocal(c._a); 31933 this._isDSTShifted = this.isValid() && 31934 compareArrays(c._a, other.toArray()) > 0; 31935 } else { 31936 this._isDSTShifted = false; 31937 } 31938 31939 return this._isDSTShifted; 31940 } 31941 31942 function isLocal () { 31943 return !this._isUTC; 31944 } 31945 31946 function isUtcOffset () { 31947 return this._isUTC; 31948 } 31949 31950 function isUtc () { 31951 return this._isUTC && this._offset === 0; 31952 } 31953 31954 var aspNetRegex = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/; 31955 31956 // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html 31957 // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere 31958 var create__isoRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/; 31959 31960 function create__createDuration (input, key) { 31961 var duration = input, 31962 // matching against regexp is expensive, do it on demand 31963 match = null, 31964 sign, 31965 ret, 31966 diffRes; 31967 31968 if (isDuration(input)) { 31969 duration = { 31970 ms : input._milliseconds, 31971 d : input._days, 31972 M : input._months 31973 }; 31974 } else if (typeof input === 'number') { 31975 duration = {}; 31976 if (key) { 31977 duration[key] = input; 31978 } else { 31979 duration.milliseconds = input; 31980 } 31981 } else if (!!(match = aspNetRegex.exec(input))) { 31982 sign = (match[1] === '-') ? -1 : 1; 31983 duration = { 31984 y : 0, 31985 d : toInt(match[DATE]) * sign, 31986 h : toInt(match[HOUR]) * sign, 31987 m : toInt(match[MINUTE]) * sign, 31988 s : toInt(match[SECOND]) * sign, 31989 ms : toInt(match[MILLISECOND]) * sign 31990 }; 31991 } else if (!!(match = create__isoRegex.exec(input))) { 31992 sign = (match[1] === '-') ? -1 : 1; 31993 duration = { 31994 y : parseIso(match[2], sign), 31995 M : parseIso(match[3], sign), 31996 d : parseIso(match[4], sign), 31997 h : parseIso(match[5], sign), 31998 m : parseIso(match[6], sign), 31999 s : parseIso(match[7], sign), 32000 w : parseIso(match[8], sign) 32001 }; 32002 } else if (duration == null) {// checks for null or undefined 32003 duration = {}; 32004 } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { 32005 diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to)); 32006 32007 duration = {}; 32008 duration.ms = diffRes.milliseconds; 32009 duration.M = diffRes.months; 32010 } 32011 32012 ret = new Duration(duration); 32013 32014 if (isDuration(input) && hasOwnProp(input, '_locale')) { 32015 ret._locale = input._locale; 32016 } 32017 32018 return ret; 32019 } 32020 32021 create__createDuration.fn = Duration.prototype; 32022 32023 function parseIso (inp, sign) { 32024 // We'd normally use ~~inp for this, but unfortunately it also 32025 // converts floats to ints. 32026 // inp may be undefined, so careful calling replace on it. 32027 var res = inp && parseFloat(inp.replace(',', '.')); 32028 // apply sign while we're at it 32029 return (isNaN(res) ? 0 : res) * sign; 32030 } 32031 32032 function positiveMomentsDifference(base, other) { 32033 var res = {milliseconds: 0, months: 0}; 32034 32035 res.months = other.month() - base.month() + 32036 (other.year() - base.year()) * 12; 32037 if (base.clone().add(res.months, 'M').isAfter(other)) { 32038 --res.months; 32039 } 32040 32041 res.milliseconds = +other - +(base.clone().add(res.months, 'M')); 32042 32043 return res; 32044 } 32045 32046 function momentsDifference(base, other) { 32047 var res; 32048 other = cloneWithOffset(other, base); 32049 if (base.isBefore(other)) { 32050 res = positiveMomentsDifference(base, other); 32051 } else { 32052 res = positiveMomentsDifference(other, base); 32053 res.milliseconds = -res.milliseconds; 32054 res.months = -res.months; 32055 } 32056 32057 return res; 32058 } 32059 32060 function createAdder(direction, name) { 32061 return function (val, period) { 32062 var dur, tmp; 32063 //invert the arguments, but complain about it 32064 if (period !== null && !isNaN(+period)) { 32065 deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).'); 32066 tmp = val; val = period; period = tmp; 32067 } 32068 32069 val = typeof val === 'string' ? +val : val; 32070 dur = create__createDuration(val, period); 32071 add_subtract__addSubtract(this, dur, direction); 32072 return this; 32073 }; 32074 } 32075 32076 function add_subtract__addSubtract (mom, duration, isAdding, updateOffset) { 32077 var milliseconds = duration._milliseconds, 32078 days = duration._days, 32079 months = duration._months; 32080 updateOffset = updateOffset == null ? true : updateOffset; 32081 32082 if (milliseconds) { 32083 mom._d.setTime(+mom._d + milliseconds * isAdding); 32084 } 32085 if (days) { 32086 get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding); 32087 } 32088 if (months) { 32089 setMonth(mom, get_set__get(mom, 'Month') + months * isAdding); 32090 } 32091 if (updateOffset) { 32092 utils_hooks__hooks.updateOffset(mom, days || months); 32093 } 32094 } 32095 32096 var add_subtract__add = createAdder(1, 'add'); 32097 var add_subtract__subtract = createAdder(-1, 'subtract'); 32098 32099 function moment_calendar__calendar (time, formats) { 32100 // We want to compare the start of today, vs this. 32101 // Getting start-of-today depends on whether we're local/utc/offset or not. 32102 var now = time || local__createLocal(), 32103 sod = cloneWithOffset(now, this).startOf('day'), 32104 diff = this.diff(sod, 'days', true), 32105 format = diff < -6 ? 'sameElse' : 32106 diff < -1 ? 'lastWeek' : 32107 diff < 0 ? 'lastDay' : 32108 diff < 1 ? 'sameDay' : 32109 diff < 2 ? 'nextDay' : 32110 diff < 7 ? 'nextWeek' : 'sameElse'; 32111 return this.format(formats && formats[format] || this.localeData().calendar(format, this, local__createLocal(now))); 32112 } 32113 32114 function clone () { 32115 return new Moment(this); 32116 } 32117 32118 function isAfter (input, units) { 32119 var inputMs; 32120 units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); 32121 if (units === 'millisecond') { 32122 input = isMoment(input) ? input : local__createLocal(input); 32123 return +this > +input; 32124 } else { 32125 inputMs = isMoment(input) ? +input : +local__createLocal(input); 32126 return inputMs < +this.clone().startOf(units); 32127 } 32128 } 32129 32130 function isBefore (input, units) { 32131 var inputMs; 32132 units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); 32133 if (units === 'millisecond') { 32134 input = isMoment(input) ? input : local__createLocal(input); 32135 return +this < +input; 32136 } else { 32137 inputMs = isMoment(input) ? +input : +local__createLocal(input); 32138 return +this.clone().endOf(units) < inputMs; 32139 } 32140 } 32141 32142 function isBetween (from, to, units) { 32143 return this.isAfter(from, units) && this.isBefore(to, units); 32144 } 32145 32146 function isSame (input, units) { 32147 var inputMs; 32148 units = normalizeUnits(units || 'millisecond'); 32149 if (units === 'millisecond') { 32150 input = isMoment(input) ? input : local__createLocal(input); 32151 return +this === +input; 32152 } else { 32153 inputMs = +local__createLocal(input); 32154 return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units)); 32155 } 32156 } 32157 32158 function diff (input, units, asFloat) { 32159 var that = cloneWithOffset(input, this), 32160 zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4, 32161 delta, output; 32162 32163 units = normalizeUnits(units); 32164 32165 if (units === 'year' || units === 'month' || units === 'quarter') { 32166 output = monthDiff(this, that); 32167 if (units === 'quarter') { 32168 output = output / 3; 32169 } else if (units === 'year') { 32170 output = output / 12; 32171 } 32172 } else { 32173 delta = this - that; 32174 output = units === 'second' ? delta / 1e3 : // 1000 32175 units === 'minute' ? delta / 6e4 : // 1000 * 60 32176 units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60 32177 units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst 32178 units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst 32179 delta; 32180 } 32181 return asFloat ? output : absFloor(output); 32182 } 32183 32184 function monthDiff (a, b) { 32185 // difference in months 32186 var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), 32187 // b is in (anchor - 1 month, anchor + 1 month) 32188 anchor = a.clone().add(wholeMonthDiff, 'months'), 32189 anchor2, adjust; 32190 32191 if (b - anchor < 0) { 32192 anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); 32193 // linear across the month 32194 adjust = (b - anchor) / (anchor - anchor2); 32195 } else { 32196 anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); 32197 // linear across the month 32198 adjust = (b - anchor) / (anchor2 - anchor); 32199 } 32200 32201 return -(wholeMonthDiff + adjust); 32202 } 32203 32204 utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; 32205 32206 function toString () { 32207 return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); 32208 } 32209 32210 function moment_format__toISOString () { 32211 var m = this.clone().utc(); 32212 if (0 < m.year() && m.year() <= 9999) { 32213 if ('function' === typeof Date.prototype.toISOString) { 32214 // native implementation is ~50x faster, use it when we can 32215 return this.toDate().toISOString(); 32216 } else { 32217 return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); 32218 } 32219 } else { 32220 return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); 32221 } 32222 } 32223 32224 function moment_format__format (inputString) { 32225 var output = formatMoment(this, inputString || utils_hooks__hooks.defaultFormat);
32226 return this.localeData().postformat(output); 32227 } 32228 32229 function from (time, withoutSuffix) { 32230 if (!this.isValid()) { 32231 return this.localeData().invalidDate(); 32232 } 32233 return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); 32234 } 32235 32236 function fromNow (withoutSuffix) { 32237 return this.from(local__createLocal(), withoutSuffix); 32238 } 32239 32240 function to (time, withoutSuffix) { 32241 if (!this.isValid()) { 32242 return this.localeData().invalidDate(); 32243 } 32244 return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); 32245 } 32246 32247 function toNow (withoutSuffix) { 32248 return this.to(local__createLocal(), withoutSuffix); 32249 } 32250 32251 function locale (key) { 32252 var newLocaleData; 32253 32254 if (key === undefined) { 32255 return this._locale._abbr; 32256 } else { 32257 newLocaleData = locale_locales__getLocale(key); 32258 if (newLocaleData != null) { 32259 this._locale = newLocaleData; 32260 } 32261 return this; 32262 } 32263 } 32264 32265 var lang = deprecate( 32266 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', 32267 function (key) { 32268 if (key === undefined) { 32269 return this.localeData(); 32270 } else { 32271 return this.locale(key); 32272 } 32273 } 32274 ); 32275 32276 function localeData () { 32277 return this._locale; 32278 } 32279 32280 function startOf (units) { 32281 units = normalizeUnits(units); 32282 // the following switch intentionally omits break keywords 32283 // to utilize falling through the cases. 32284 switch (units) { 32285 case 'year': 32286 this.month(0); 32287 /* falls through */ 32288 case 'quarter': 32289 case 'month': 32290 this.date(1); 32291 /* falls through */ 32292 case 'week': 32293 case 'isoWeek': 32294 case 'day': 32295 this.hours(0); 32296 /* falls through */ 32297 case 'hour': 32298 this.minutes(0); 32299 /* falls through */ 32300 case 'minute': 32301 this.seconds(0); 32302 /* falls through */ 32303 case 'second': 32304 this.milliseconds(0); 32305 } 32306 32307 // weeks are a special case 32308 if (units === 'week') { 32309 this.weekday(0); 32310 } 32311 if (units === 'isoWeek') { 32312 this.isoWeekday(1); 32313 } 32314 32315 // quarters are also special 32316 if (units === 'quarter') { 32317 this.month(Math.floor(this.month() / 3) * 3); 32318 } 32319 32320 return this; 32321 } 32322 32323 function endOf (units) { 32324 units = normalizeUnits(units); 32325 if (units === undefined || units === 'millisecond') { 32326 return this; 32327 } 32328 return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms'); 32329 } 32330 32331 function to_type__valueOf () { 32332 return +this._d - ((this._offset || 0) * 60000); 32333 } 32334 32335 function unix () { 32336 return Math.floor(+this / 1000); 32337 } 32338 32339 function toDate () { 32340 return this._offset ? new Date(+this) : this._d; 32341 } 32342 32343 function toArray () { 32344 var m = this; 32345 return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; 32346 } 32347 32348 function toObject () { 32349 var m = this; 32350 return { 32351 years: m.year(), 32352 months: m.month(), 32353 date: m.date(), 32354 hours: m.hours(), 32355 minutes: m.minutes(), 32356 seconds: m.seconds(), 32357 milliseconds: m.milliseconds() 32358 }; 32359 } 32360 32361 function moment_valid__isValid () { 32362 return valid__isValid(this); 32363 } 32364 32365 function parsingFlags () { 32366 return extend({}, getParsingFlags(this)); 32367 } 32368
vendor: 17,624 bytes, lines 32369-32924
32369 function invalidAt () { 32370 return getParsingFlags(this).overflow; 32371 } 32372 32373 addFormatToken(0, ['gg', 2], 0, function () { 32374 return this.weekYear() % 100; 32375 }); 32376 32377 addFormatToken(0, ['GG', 2], 0, function () { 32378 return this.isoWeekYear() % 100; 32379 }); 32380 32381 function addWeekYearFormatToken (token, getter) { 32382 addFormatToken(0, [token, token.length], 0, getter); 32383 } 32384 32385 addWeekYearFormatToken('gggg', 'weekYear'); 32386 addWeekYearFormatToken('ggggg', 'weekYear'); 32387 addWeekYearFormatToken('GGGG', 'isoWeekYear'); 32388 addWeekYearFormatToken('GGGGG', 'isoWeekYear'); 32389 32390 // ALIASES 32391 32392 addUnitAlias('weekYear', 'gg'); 32393 addUnitAlias('isoWeekYear', 'GG'); 32394 32395 // PARSING 32396 32397 addRegexToken('G', matchSigned); 32398 addRegexToken('g', matchSigned); 32399 addRegexToken('GG', match1to2, match2); 32400 addRegexToken('gg', match1to2, match2); 32401 addRegexToken('GGGG', match1to4, match4); 32402 addRegexToken('gggg', match1to4, match4); 32403 addRegexToken('GGGGG', match1to6, match6); 32404 addRegexToken('ggggg', match1to6, match6); 32405 32406 addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { 32407 week[token.substr(0, 2)] = toInt(input); 32408 }); 32409 32410 addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { 32411 week[token] = utils_hooks__hooks.parseTwoDigitYear(input); 32412 }); 32413 32414 // HELPERS 32415 32416 function weeksInYear(year, dow, doy) { 32417 return weekOfYear(local__createLocal([year, 11, 31 + dow - doy]), dow, doy).week; 32418 } 32419 32420 // MOMENTS 32421 32422 function getSetWeekYear (input) { 32423 var year = weekOfYear(this, this.localeData()._week.dow, this.localeData()._week.doy).year; 32424 return input == null ? year : this.add((input - year), 'y'); 32425 } 32426 32427 function getSetISOWeekYear (input) { 32428 var year = weekOfYear(this, 1, 4).year; 32429 return input == null ? year : this.add((input - year), 'y'); 32430 } 32431 32432 function getISOWeeksInYear () { 32433 return weeksInYear(this.year(), 1, 4); 32434 } 32435 32436 function getWeeksInYear () { 32437 var weekInfo = this.localeData()._week; 32438 return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); 32439 } 32440 32441 addFormatToken('Q', 0, 0, 'quarter'); 32442 32443 // ALIASES 32444 32445 addUnitAlias('quarter', 'Q'); 32446 32447 // PARSING 32448 32449 addRegexToken('Q', match1); 32450 addParseToken('Q', function (input, array) { 32451 array[MONTH] = (toInt(input) - 1) * 3; 32452 }); 32453 32454 // MOMENTS 32455 32456 function getSetQuarter (input) { 32457 return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); 32458 } 32459 32460 addFormatToken('D', ['DD', 2], 'Do', 'date'); 32461 32462 // ALIASES 32463 32464 addUnitAlias('date', 'D'); 32465 32466 // PARSING 32467 32468 addRegexToken('D', match1to2); 32469 addRegexToken('DD', match1to2, match2); 32470 addRegexToken('Do', function (isStrict, locale) { 32471 return isStrict ? locale._ordinalParse : locale._ordinalParseLenient; 32472 }); 32473 32474 addParseToken(['D', 'DD'], DATE); 32475 addParseToken('Do', function (input, array) { 32476 array[DATE] = toInt(input.match(match1to2)[0], 10); 32477 }); 32478 32479 // MOMENTS 32480 32481 var getSetDayOfMonth = makeGetSet('Date', true); 32482 32483 addFormatToken('d', 0, 'do', 'day'); 32484 32485 addFormatToken('dd', 0, 0, function (format) { 32486 return this.localeData().weekdaysMin(this, format); 32487 }); 32488 32489 addFormatToken('ddd', 0, 0, function (format) { 32490 return this.localeData().weekdaysShort(this, format); 32491 }); 32492 32493 addFormatToken('dddd', 0, 0, function (format) { 32494 return this.localeData().weekdays(this, format); 32495 }); 32496 32497 addFormatToken('e', 0, 0, 'weekday'); 32498 addFormatToken('E', 0, 0, 'isoWeekday'); 32499 32500 // ALIASES 32501 32502 addUnitAlias('day', 'd'); 32503 addUnitAlias('weekday', 'e'); 32504 addUnitAlias('isoWeekday', 'E'); 32505 32506 // PARSING 32507 32508 addRegexToken('d', match1to2); 32509 addRegexToken('e', match1to2); 32510 addRegexToken('E', match1to2); 32511 addRegexToken('dd', matchWord); 32512 addRegexToken('ddd', matchWord); 32513 addRegexToken('dddd', matchWord); 32514 32515 addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config) { 32516 var weekday = config._locale.weekdaysParse(input); 32517 // if we didn't get a weekday name, mark the date as invalid 32518 if (weekday != null) { 32519 week.d = weekday; 32520 } else { 32521 getParsingFlags(config).invalidWeekday = input; 32522 } 32523 }); 32524 32525 addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { 32526 week[token] = toInt(input); 32527 }); 32528 32529 // HELPERS 32530 32531 function parseWeekday(input, locale) { 32532 if (typeof input !== 'string') { 32533 return input; 32534 } 32535 32536 if (!isNaN(input)) { 32537 return parseInt(input, 10); 32538 } 32539 32540 input = locale.weekdaysParse(input); 32541 if (typeof input === 'number') { 32542 return input; 32543 } 32544 32545 return null; 32546 } 32547 32548 // LOCALES 32549 32550 var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); 32551 function localeWeekdays (m) { 32552 return this._weekdays[m.day()]; 32553 } 32554 32555 var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); 32556 function localeWeekdaysShort (m) { 32557 return this._weekdaysShort[m.day()]; 32558 } 32559 32560 var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); 32561 function localeWeekdaysMin (m) { 32562 return this._weekdaysMin[m.day()]; 32563 } 32564 32565 function localeWeekdaysParse (weekdayName) { 32566 var i, mom, regex; 32567 32568 this._weekdaysParse = this._weekdaysParse || []; 32569 32570 for (i = 0; i < 7; i++) { 32571 // make the regex if we don't have it already 32572 if (!this._weekdaysParse[i]) { 32573 mom = local__createLocal([2000, 1]).day(i); 32574 regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); 32575 this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); 32576 } 32577 // test the regex 32578 if (this._weekdaysParse[i].test(weekdayName)) { 32579 return i; 32580 } 32581 } 32582 } 32583 32584 // MOMENTS 32585 32586 function getSetDayOfWeek (input) { 32587 var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); 32588 if (input != null) { 32589 input = parseWeekday(input, this.localeData()); 32590 return this.add(input - day, 'd'); 32591 } else { 32592 return day; 32593 } 32594 } 32595 32596 function getSetLocaleDayOfWeek (input) { 32597 var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; 32598 return input == null ? weekday : this.add(input - weekday, 'd'); 32599 } 32600 32601 function getSetISODayOfWeek (input) { 32602 // behaves the same as moment#day except 32603 // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) 32604 // as a setter, sunday should belong to the previous week. 32605 return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7); 32606 } 32607 32608 addFormatToken('H', ['HH', 2], 0, 'hour'); 32609 addFormatToken('h', ['hh', 2], 0, function () { 32610 return this.hours() % 12 || 12; 32611 }); 32612 32613 function meridiem (token, lowercase) { 32614 addFormatToken(token, 0, 0, function () { 32615 return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); 32616 }); 32617 } 32618 32619 meridiem('a', true); 32620 meridiem('A', false); 32621 32622 // ALIASES 32623 32624 addUnitAlias('hour', 'h'); 32625 32626 // PARSING 32627 32628 function matchMeridiem (isStrict, locale) { 32629 return locale._meridiemParse; 32630 } 32631 32632 addRegexToken('a', matchMeridiem); 32633 addRegexToken('A', matchMeridiem); 32634 addRegexToken('H', match1to2); 32635 addRegexToken('h', match1to2); 32636 addRegexToken('HH', match1to2, match2); 32637 addRegexToken('hh', match1to2, match2); 32638 32639 addParseToken(['H', 'HH'], HOUR); 32640 addParseToken(['a', 'A'], function (input, array, config) { 32641 config._isPm = config._locale.isPM(input); 32642 config._meridiem = input; 32643 }); 32644 addParseToken(['h', 'hh'], function (input, array, config) { 32645 array[HOUR] = toInt(input); 32646 getParsingFlags(config).bigHour = true; 32647 }); 32648 32649 // LOCALES 32650 32651 function localeIsPM (input) { 32652 // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays 32653 // Using charAt should be more compatible. 32654 return ((input + '').toLowerCase().charAt(0) === 'p'); 32655 } 32656 32657 var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; 32658 function localeMeridiem (hours, minutes, isLower) { 32659 if (hours > 11) { 32660 return isLower ? 'pm' : 'PM'; 32661 } else { 32662 return isLower ? 'am' : 'AM'; 32663 } 32664 } 32665 32666 32667 // MOMENTS 32668 32669 // Setting the hour should keep the time, because the user explicitly 32670 // specified which hour he wants. So trying to maintain the same hour (in 32671 // a new timezone) makes sense. Adding/subtracting hours does not follow 32672 // this rule. 32673 var getSetHour = makeGetSet('Hours', true); 32674 32675 addFormatToken('m', ['mm', 2], 0, 'minute'); 32676 32677 // ALIASES 32678 32679 addUnitAlias('minute', 'm'); 32680 32681 // PARSING 32682 32683 addRegexToken('m', match1to2); 32684 addRegexToken('mm', match1to2, match2); 32685 addParseToken(['m', 'mm'], MINUTE); 32686 32687 // MOMENTS 32688 32689 var getSetMinute = makeGetSet('Minutes', false); 32690 32691 addFormatToken('s', ['ss', 2], 0, 'second'); 32692 32693 // ALIASES 32694 32695 addUnitAlias('second', 's'); 32696 32697 // PARSING 32698 32699 addRegexToken('s', match1to2); 32700 addRegexToken('ss', match1to2, match2); 32701 addParseToken(['s', 'ss'], SECOND); 32702 32703 // MOMENTS 32704 32705 var getSetSecond = makeGetSet('Seconds', false); 32706 32707 addFormatToken('S', 0, 0, function () { 32708 return ~~(this.millisecond() / 100); 32709 }); 32710 32711 addFormatToken(0, ['SS', 2], 0, function () { 32712 return ~~(this.millisecond() / 10); 32713 }); 32714 32715 addFormatToken(0, ['SSS', 3], 0, 'millisecond'); 32716 addFormatToken(0, ['SSSS', 4], 0, function () { 32717 return this.millisecond() * 10; 32718 }); 32719 addFormatToken(0, ['SSSSS', 5], 0, function () { 32720 return this.millisecond() * 100; 32721 }); 32722 addFormatToken(0, ['SSSSSS', 6], 0, function () { 32723 return this.millisecond() * 1000; 32724 }); 32725 addFormatToken(0, ['SSSSSSS', 7], 0, function () { 32726 return this.millisecond() * 10000; 32727 }); 32728 addFormatToken(0, ['SSSSSSSS', 8], 0, function () { 32729 return this.millisecond() * 100000; 32730 }); 32731 addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { 32732 return this.millisecond() * 1000000; 32733 }); 32734 32735 32736 // ALIASES 32737 32738 addUnitAlias('millisecond', 'ms'); 32739 32740 // PARSING 32741 32742 addRegexToken('S', match1to3, match1); 32743 addRegexToken('SS', match1to3, match2); 32744 addRegexToken('SSS', match1to3, match3); 32745 32746 var token; 32747 for (token = 'SSSS'; token.length <= 9; token += 'S') { 32748 addRegexToken(token, matchUnsigned); 32749 } 32750 32751 function parseMs(input, array) { 32752 array[MILLISECOND] = toInt(('0.' + input) * 1000); 32753 } 32754 32755 for (token = 'S'; token.length <= 9; token += 'S') { 32756 addParseToken(token, parseMs); 32757 } 32758 // MOMENTS 32759 32760 var getSetMillisecond = makeGetSet('Milliseconds', false); 32761 32762 addFormatToken('z', 0, 0, 'zoneAbbr'); 32763 addFormatToken('zz', 0, 0, 'zoneName'); 32764 32765 // MOMENTS 32766 32767 function getZoneAbbr () { 32768 return this._isUTC ? 'UTC' : ''; 32769 } 32770 32771 function getZoneName () { 32772 return this._isUTC ? 'Coordinated Universal Time' : ''; 32773 } 32774 32775 var momentPrototype__proto = Moment.prototype; 32776 32777 momentPrototype__proto.add = add_subtract__add; 32778 momentPrototype__proto.calendar = moment_calendar__calendar; 32779 momentPrototype__proto.clone = clone; 32780 momentPrototype__proto.diff = diff; 32781 momentPrototype__proto.endOf = endOf; 32782 momentPrototype__proto.format = moment_format__format; 32783 momentPrototype__proto.from = from; 32784 momentPrototype__proto.fromNow = fromNow; 32785 momentPrototype__proto.to = to; 32786 momentPrototype__proto.toNow = toNow; 32787 momentPrototype__proto.get = getSet; 32788 momentPrototype__proto.invalidAt = invalidAt; 32789 momentPrototype__proto.isAfter = isAfter; 32790 momentPrototype__proto.isBefore = isBefore; 32791 momentPrototype__proto.isBetween = isBetween; 32792 momentPrototype__proto.isSame = isSame; 32793 momentPrototype__proto.isValid = moment_valid__isValid; 32794 momentPrototype__proto.lang = lang; 32795 momentPrototype__proto.locale = locale; 32796 momentPrototype__proto.localeData = localeData; 32797 momentPrototype__proto.max = prototypeMax; 32798 momentPrototype__proto.min = prototypeMin; 32799 momentPrototype__proto.parsingFlags = parsingFlags; 32800 momentPrototype__proto.set = getSet; 32801 momentPrototype__proto.startOf = startOf; 32802 momentPrototype__proto.subtract = add_subtract__subtract; 32803 momentPrototype__proto.toArray = toArray; 32804 momentPrototype__proto.toObject = toObject; 32805 momentPrototype__proto.toDate = toDate; 32806 momentPrototype__proto.toISOString = moment_format__toISOString; 32807 momentPrototype__proto.toJSON = moment_format__toISOString; 32808 momentPrototype__proto.toString = toString; 32809 momentPrototype__proto.unix = unix; 32810 momentPrototype__proto.valueOf = to_type__valueOf; 32811 32812 // Year 32813 momentPrototype__proto.year = getSetYear; 32814 momentPrototype__proto.isLeapYear = getIsLeapYear; 32815 32816 // Week Year 32817 momentPrototype__proto.weekYear = getSetWeekYear; 32818 momentPrototype__proto.isoWeekYear = getSetISOWeekYear; 32819 32820 // Quarter 32821 momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter; 32822 32823 // Month 32824 momentPrototype__proto.month = getSetMonth; 32825 momentPrototype__proto.daysInMonth = getDaysInMonth; 32826 32827 // Week 32828 momentPrototype__proto.week = momentPrototype__proto.weeks = getSetWeek; 32829 momentPrototype__proto.isoWeek = momentPrototype__proto.isoWeeks = getSetISOWeek; 32830 momentPrototype__proto.weeksInYear = getWeeksInYear; 32831 momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear; 32832 32833 // Day 32834 momentPrototype__proto.date = getSetDayOfMonth; 32835 momentPrototype__proto.day = momentPrototype__proto.days = getSetDayOfWeek; 32836 momentPrototype__proto.weekday = getSetLocaleDayOfWeek; 32837 momentPrototype__proto.isoWeekday = getSetISODayOfWeek; 32838 momentPrototype__proto.dayOfYear = getSetDayOfYear; 32839 32840 // Hour 32841 momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour; 32842 32843 // Minute 32844 momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute; 32845 32846 // Second 32847 momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond; 32848 32849 // Millisecond 32850 momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond; 32851 32852 // Offset 32853 momentPrototype__proto.utcOffset = getSetOffset; 32854 momentPrototype__proto.utc = setOffsetToUTC; 32855 momentPrototype__proto.local = setOffsetToLocal; 32856 momentPrototype__proto.parseZone = setOffsetToParsedOffset; 32857 momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset; 32858 momentPrototype__proto.isDST = isDaylightSavingTime; 32859 momentPrototype__proto.isDSTShifted = isDaylightSavingTimeShifted; 32860 momentPrototype__proto.isLocal = isLocal; 32861 momentPrototype__proto.isUtcOffset = isUtcOffset; 32862 momentPrototype__proto.isUtc = isUtc; 32863 momentPrototype__proto.isUTC = isUtc; 32864 32865 // Timezone 32866 momentPrototype__proto.zoneAbbr = getZoneAbbr; 32867 momentPrototype__proto.zoneName = getZoneName; 32868 32869 // Deprecations 32870 momentPrototype__proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); 32871 momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); 32872 momentPrototype__proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); 32873 momentPrototype__proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779', getSetZone); 32874 32875 var momentPrototype = momentPrototype__proto; 32876 32877 function moment_moment__createUnix (input) { 32878 return local__createLocal(input * 1000); 32879 } 32880 32881 function moment_moment__createInZone () { 32882 return local__createLocal.apply(null, arguments).parseZone(); 32883 } 32884 32885 var defaultCalendar = { 32886 sameDay : '[Today at] LT', 32887 nextDay : '[Tomorrow at] LT', 32888 nextWeek : 'dddd [at] LT', 32889 lastDay : '[Yesterday at] LT', 32890 lastWeek : '[Last] dddd [at] LT', 32891 sameElse : 'L' 32892 }; 32893 32894 function locale_calendar__calendar (key, mom, now) { 32895 var output = this._calendar[key]; 32896 return typeof output === 'function' ? output.call(mom, now) : output; 32897 } 32898 32899 var defaultLongDateFormat = { 32900 LTS : 'h:mm:ss A', 32901 LT : 'h:mm A', 32902 L : 'MM/DD/YYYY', 32903 LL : 'MMMM D, YYYY', 32904 LLL : 'MMMM D, YYYY h:mm A', 32905 LLLL : 'dddd, MMMM D, YYYY h:mm A' 32906 }; 32907 32908 function longDateFormat (key) { 32909 var format = this._longDateFormat[key], 32910 formatUpper = this._longDateFormat[key.toUpperCase()]; 32911 32912 if (format || !formatUpper) { 32913 return format; 32914 } 32915 32916 this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { 32917 return val.slice(1); 32918 }); 32919 32920 return this._longDateFormat[key]; 32921 } 32922 32923 var defaultInvalidDate = 'Invalid date'; 32924
32925 function invalidDate () { 32926 return this._invalidDate; 32927 } 32928 32929 var defaultOrdinal = '%d'; 32930 var defaultOrdinalParse = /\d{1,2}/; 32931 32932 function ordinal (number) { 32933 return this._ordinal.replace('%d', number); 32934 } 32935 32936 function preParsePostFormat (string) { 32937 return string; 32938 } 32939 32940 var defaultRelativeTime = { 32941 future : 'in %s', 32942 past : '%s ago', 32943 s : 'a few seconds', 32944 m : 'a minute', 32945 mm : '%d minutes', 32946 h : 'an hour', 32947 hh : '%d hours', 32948 d : 'a day', 32949 dd : '%d days', 32950 M : 'a month', 32951 MM : '%d months', 32952 y : 'a year', 32953 yy : '%d years' 32954 }; 32955 32956 function relative__relativeTime (number, withoutSuffix, string, isFuture) { 32957 var output = this._relativeTime[string]; 32958 return (typeof output === 'function') ? 32959 output(number, withoutSuffix, string, isFuture) : 32960 output.replace(/%d/i, number); 32961 } 32962 32963 function pastFuture (diff, output) { 32964 var format = this._relativeTime[diff > 0 ? 'future' : 'past']; 32965 return typeof format === 'function' ? format(output) : format.replace(/%s/i, output); 32966 } 32967 32968 function locale_set__set (config) { 32969 var prop, i; 32970 for (i in config) { 32971 prop = config[i]; 32972 if (typeof prop === 'function') { 32973 this[i] = prop; 32974 } else { 32975 this['_' + i] = prop; 32976 } 32977 } 32978 // Lenient ordinal parsing accepts just a number in addition to 32979 // number + (possibly) stuff coming from _ordinalParseLenient. 32980 this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source); 32981 } 32982 32983 var prototype__proto = Locale.prototype; 32984 32985 prototype__proto._calendar = defaultCalendar; 32986 prototype__proto.calendar = locale_calendar__calendar; 32987 prototype__proto._longDateFormat = defaultLongDateFormat; 32988 prototype__proto.longDateFormat = longDateFormat; 32989 prototype__proto._invalidDate = defaultInvalidDate; 32990 prototype__proto.invalidDate = invalidDate; 32991 prototype__proto._ordinal = defaultOrdinal; 32992 prototype__proto.ordinal = ordinal; 32993 prototype__proto._ordinalParse = defaultOrdinalParse; 32994 prototype__proto.preparse = preParsePostFormat; 32995 prototype__proto.postformat = preParsePostFormat; 32996 prototype__proto._relativeTime = defaultRelativeTime; 32997 prototype__proto.relativeTime = relative__relativeTime; 32998 prototype__proto.pastFuture = pastFuture; 32999 prototype__proto.set = locale_set__set; 33000 33001 // Month 33002 prototype__proto.months = localeMonths; 33003 prototype__proto._months = defaultLocaleMonths; 33004 prototype__proto.monthsShort = localeMonthsShort; 33005 prototype__proto._monthsShort = defaultLocaleMonthsShort; 33006 prototype__proto.monthsParse = localeMonthsParse; 33007 33008 // Week 33009 prototype__proto.week = localeWeek; 33010 prototype__proto._week = defaultLocaleWeek; 33011 prototype__proto.firstDayOfYear = localeFirstDayOfYear; 33012 prototype__proto.firstDayOfWeek = localeFirstDayOfWeek; 33013 33014 // Day of Week 33015 prototype__proto.weekdays = localeWeekdays; 33016 prototype__proto._weekdays = defaultLocaleWeekdays; 33017 prototype__proto.weekdaysMin = localeWeekdaysMin; 33018 prototype__proto._weekdaysMin = defaultLocaleWeekdaysMin; 33019 prototype__proto.weekdaysShort = localeWeekdaysShort; 33020 prototype__proto._weekdaysShort = defaultLocaleWeekdaysShort; 33021 prototype__proto.weekdaysParse = localeWeekdaysParse; 33022 33023 // Hours 33024 prototype__proto.isPM = localeIsPM; 33025 prototype__proto._meridiemParse = defaultLocaleMeridiemParse; 33026 prototype__proto.meridiem = localeMeridiem; 33027 33028 function lists__get (format, index, field, setter) { 33029 var locale = locale_locales__getLocale(); 33030 var utc = create_utc__createUTC().set(setter, index); 33031 return locale[field](utc, format); 33032 } 33033 33034 function list (format, index, field, count, setter) { 33035 if (typeof format === 'number') { 33036 index = format; 33037 format = undefined; 33038 } 33039 33040 format = format || ''; 33041 33042 if (index != null) { 33043 return lists__get(format, index, field, setter); 33044 } 33045 33046 var i; 33047 var out = []; 33048 for (i = 0; i < count; i++) { 33049 out[i] = lists__get(format, i, field, setter); 33050 } 33051 return out; 33052 } 33053 33054 function lists__listMonths (format, index) { 33055 return list(format, index, 'months', 12, 'month'); 33056 } 33057 33058 function lists__listMonthsShort (format, index) { 33059 return list(format, index, 'monthsShort', 12, 'month'); 33060 } 33061 33062 function lists__listWeekdays (format, index) { 33063 return list(format, index, 'weekdays', 7, 'day'); 33064 } 33065 33066 function lists__listWeekdaysShort (format, index) { 33067 return list(format, index, 'weekdaysShort', 7, 'day'); 33068 } 33069 33070 function lists__listWeekdaysMin (format, index) { 33071 return list(format, index, 'weekdaysMin', 7, 'day'); 33072 } 33073 33074 locale_locales__getSetGlobalLocale('en', { 33075 ordinalParse: /\d{1,2}(th|st|nd|rd)/, 33076 ordinal : function (number) { 33077 var b = number % 10, 33078 output = (toInt(number % 100 / 10) === 1) ? 'th' : 33079 (b === 1) ? 'st' : 33080 (b === 2) ? 'nd' : 33081 (b === 3) ? 'rd' : 'th'; 33082 return number + output; 33083 } 33084 }); 33085 33086 // Side effect imports 33087 utils_hooks__hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale); 33088 utils_hooks__hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale); 33089 33090 var mathAbs = Math.abs; 33091 33092 function duration_abs__abs () { 33093 var data = this._data; 33094 33095 this._milliseconds = mathAbs(this._milliseconds); 33096 this._days = mathAbs(this._days); 33097 this._months = mathAbs(this._months); 33098 33099 data.milliseconds = mathAbs(data.milliseconds); 33100 data.seconds = mathAbs(data.seconds); 33101 data.minutes = mathAbs(data.minutes); 33102 data.hours = mathAbs(data.hours); 33103 data.months = mathAbs(data.months); 33104 data.years = mathAbs(data.years); 33105 33106 return this; 33107 } 33108 33109 function duration_add_subtract__addSubtract (duration, input, value, direction) { 33110 var other = create__createDuration(input, value); 33111 33112 duration._milliseconds += direction * other._milliseconds; 33113 duration._days += direction * other._days;
vendor: 14,987 bytes, lines 33114-33512
33114 duration._months += direction * other._months; 33115 33116 return duration._bubble(); 33117 } 33118 33119 // supports only 2.0-style add(1, 's') or add(duration) 33120 function duration_add_subtract__add (input, value) { 33121 return duration_add_subtract__addSubtract(this, input, value, 1); 33122 } 33123 33124 // supports only 2.0-style subtract(1, 's') or subtract(duration) 33125 function duration_add_subtract__subtract (input, value) { 33126 return duration_add_subtract__addSubtract(this, input, value, -1); 33127 } 33128 33129 function absCeil (number) { 33130 if (number < 0) { 33131 return Math.floor(number); 33132 } else { 33133 return Math.ceil(number); 33134 } 33135 } 33136 33137 function bubble () { 33138 var milliseconds = this._milliseconds; 33139 var days = this._days; 33140 var months = this._months; 33141 var data = this._data; 33142 var seconds, minutes, hours, years, monthsFromDays; 33143 33144 // if we have a mix of positive and negative values, bubble down first 33145 // check: https://github.com/moment/moment/issues/2166 33146 if (!((milliseconds >= 0 && days >= 0 && months >= 0) || 33147 (milliseconds <= 0 && days <= 0 && months <= 0))) { 33148 milliseconds += absCeil(monthsToDays(months) + days) * 864e5; 33149 days = 0; 33150 months = 0; 33151 } 33152 33153 // The following code bubbles up values, see the tests for 33154 // examples of what that means. 33155 data.milliseconds = milliseconds % 1000; 33156 33157 seconds = absFloor(milliseconds / 1000); 33158 data.seconds = seconds % 60; 33159 33160 minutes = absFloor(seconds / 60); 33161 data.minutes = minutes % 60; 33162 33163 hours = absFloor(minutes / 60); 33164 data.hours = hours % 24; 33165 33166 days += absFloor(hours / 24); 33167 33168 // convert days to months 33169 monthsFromDays = absFloor(daysToMonths(days)); 33170 months += monthsFromDays; 33171 days -= absCeil(monthsToDays(monthsFromDays)); 33172 33173 // 12 months -> 1 year 33174 years = absFloor(months / 12); 33175 months %= 12; 33176 33177 data.days = days; 33178 data.months = months; 33179 data.years = years; 33180 33181 return this; 33182 } 33183 33184 function daysToMonths (days) { 33185 // 400 years have 146097 days (taking into account leap year rules) 33186 // 400 years have 12 months === 4800 33187 return days * 4800 / 146097; 33188 } 33189 33190 function monthsToDays (months) { 33191 // the reverse of daysToMonths 33192 return months * 146097 / 4800; 33193 } 33194 33195 function as (units) { 33196 var days; 33197 var months; 33198 var milliseconds = this._milliseconds; 33199 33200 units = normalizeUnits(units); 33201 33202 if (units === 'month' || units === 'year') { 33203 days = this._days + milliseconds / 864e5; 33204 months = this._months + daysToMonths(days); 33205 return units === 'month' ? months : months / 12; 33206 } else { 33207 // handle milliseconds separately because of floating point math errors (issue #1867) 33208 days = this._days + Math.round(monthsToDays(this._months)); 33209 switch (units) { 33210 case 'week' : return days / 7 + milliseconds / 6048e5; 33211 case 'day' : return days + milliseconds / 864e5; 33212 case 'hour' : return days * 24 + milliseconds / 36e5; 33213 case 'minute' : return days * 1440 + milliseconds / 6e4; 33214 case 'second' : return days * 86400 + milliseconds / 1000; 33215 // Math.floor prevents floating point math errors here 33216 case 'millisecond': return Math.floor(days * 864e5) + milliseconds; 33217 default: throw new Error('Unknown unit ' + units); 33218 } 33219 } 33220 } 33221 33222 // TODO: Use this.as('ms')? 33223 function duration_as__valueOf () { 33224 return ( 33225 this._milliseconds + 33226 this._days * 864e5 + 33227 (this._months % 12) * 2592e6 + 33228 toInt(this._months / 12) * 31536e6 33229 ); 33230 } 33231 33232 function makeAs (alias) { 33233 return function () { 33234 return this.as(alias); 33235 }; 33236 } 33237 33238 var asMilliseconds = makeAs('ms'); 33239 var asSeconds = makeAs('s'); 33240 var asMinutes = makeAs('m'); 33241 var asHours = makeAs('h'); 33242 var asDays = makeAs('d'); 33243 var asWeeks = makeAs('w'); 33244 var asMonths = makeAs('M'); 33245 var asYears = makeAs('y'); 33246 33247 function duration_get__get (units) { 33248 units = normalizeUnits(units); 33249 return this[units + 's'](); 33250 } 33251 33252 function makeGetter(name) { 33253 return function () { 33254 return this._data[name]; 33255 }; 33256 } 33257 33258 var milliseconds = makeGetter('milliseconds'); 33259 var seconds = makeGetter('seconds'); 33260 var minutes = makeGetter('minutes'); 33261 var hours = makeGetter('hours'); 33262 var days = makeGetter('days'); 33263 var duration_get__months = makeGetter('months'); 33264 var years = makeGetter('years'); 33265 33266 function weeks () { 33267 return absFloor(this.days() / 7); 33268 } 33269 33270 var round = Math.round; 33271 var thresholds = { 33272 s: 45, // seconds to minute 33273 m: 45, // minutes to hour 33274 h: 22, // hours to day 33275 d: 26, // days to month 33276 M: 11 // months to year 33277 }; 33278 33279 // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize 33280 function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { 33281 return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); 33282 } 33283 33284 function duration_humanize__relativeTime (posNegDuration, withoutSuffix, locale) { 33285 var duration = create__createDuration(posNegDuration).abs(); 33286 var seconds = round(duration.as('s')); 33287 var minutes = round(duration.as('m')); 33288 var hours = round(duration.as('h')); 33289 var days = round(duration.as('d')); 33290 var months = round(duration.as('M')); 33291 var years = round(duration.as('y')); 33292 33293 var a = seconds < thresholds.s && ['s', seconds] || 33294 minutes === 1 && ['m'] || 33295 minutes < thresholds.m && ['mm', minutes] || 33296 hours === 1 && ['h'] || 33297 hours < thresholds.h && ['hh', hours] || 33298 days === 1 && ['d'] || 33299 days < thresholds.d && ['dd', days] || 33300 months === 1 && ['M'] || 33301 months < thresholds.M && ['MM', months] || 33302 years === 1 && ['y'] || ['yy', years]; 33303 33304 a[2] = withoutSuffix; 33305 a[3] = +posNegDuration > 0; 33306 a[4] = locale; 33307 return substituteTimeAgo.apply(null, a); 33308 } 33309 33310 // This function allows you to set a threshold for relative time strings 33311 function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) { 33312 if (thresholds[threshold] === undefined) { 33313 return false; 33314 } 33315 if (limit === undefined) { 33316 return thresholds[threshold]; 33317 } 33318 thresholds[threshold] = limit; 33319 return true; 33320 } 33321 33322 function humanize (withSuffix) { 33323 var locale = this.localeData(); 33324 var output = duration_humanize__relativeTime(this, !withSuffix, locale); 33325 33326 if (withSuffix) { 33327 output = locale.pastFuture(+this, output); 33328 } 33329 33330 return locale.postformat(output); 33331 } 33332 33333 var iso_string__abs = Math.abs; 33334 33335 function iso_string__toISOString() { 33336 // for ISO strings we do not use the normal bubbling rules: 33337 // * milliseconds bubble up until they become hours 33338 // * days do not bubble at all 33339 // * months bubble up until they become years 33340 // This is because there is no context-free conversion between hours and days 33341 // (think of clock changes) 33342 // and also not between days and months (28-31 days per month) 33343 var seconds = iso_string__abs(this._milliseconds) / 1000; 33344 var days = iso_string__abs(this._days); 33345 var months = iso_string__abs(this._months); 33346 var minutes, hours, years; 33347 33348 // 3600 seconds -> 60 minutes -> 1 hour 33349 minutes = absFloor(seconds / 60); 33350 hours = absFloor(minutes / 60); 33351 seconds %= 60; 33352 minutes %= 60; 33353 33354 // 12 months -> 1 year 33355 years = absFloor(months / 12); 33356 months %= 12; 33357 33358 33359 // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js 33360 var Y = years; 33361 var M = months; 33362 var D = days; 33363 var h = hours; 33364 var m = minutes; 33365 var s = seconds; 33366 var total = this.asSeconds(); 33367 33368 if (!total) { 33369 // this is the same as C#'s (Noda) and python (isodate)... 33370 // but not other JS (goog.date) 33371 return 'P0D'; 33372 } 33373 33374 return (total < 0 ? '-' : '') + 33375 'P' + 33376 (Y ? Y + 'Y' : '') + 33377 (M ? M + 'M' : '') + 33378 (D ? D + 'D' : '') + 33379 ((h || m || s) ? 'T' : '') + 33380 (h ? h + 'H' : '') + 33381 (m ? m + 'M' : '') + 33382 (s ? s + 'S' : ''); 33383 } 33384 33385 var duration_prototype__proto = Duration.prototype; 33386 33387 duration_prototype__proto.abs = duration_abs__abs; 33388 duration_prototype__proto.add = duration_add_subtract__add; 33389 duration_prototype__proto.subtract = duration_add_subtract__subtract; 33390 duration_prototype__proto.as = as; 33391 duration_prototype__proto.asMilliseconds = asMilliseconds; 33392 duration_prototype__proto.asSeconds = asSeconds; 33393 duration_prototype__proto.asMinutes = asMinutes; 33394 duration_prototype__proto.asHours = asHours; 33395 duration_prototype__proto.asDays = asDays; 33396 duration_prototype__proto.asWeeks = asWeeks; 33397 duration_prototype__proto.asMonths = asMonths; 33398 duration_prototype__proto.asYears = asYears; 33399 duration_prototype__proto.valueOf = duration_as__valueOf; 33400 duration_prototype__proto._bubble = bubble; 33401 duration_prototype__proto.get = duration_get__get; 33402 duration_prototype__proto.milliseconds = milliseconds; 33403 duration_prototype__proto.seconds = seconds; 33404 duration_prototype__proto.minutes = minutes; 33405 duration_prototype__proto.hours = hours; 33406 duration_prototype__proto.days = days; 33407 duration_prototype__proto.weeks = weeks; 33408 duration_prototype__proto.months = duration_get__months; 33409 duration_prototype__proto.years = years; 33410 duration_prototype__proto.humanize = humanize; 33411 duration_prototype__proto.toISOString = iso_string__toISOString; 33412 duration_prototype__proto.toString = iso_string__toISOString; 33413 duration_prototype__proto.toJSON = iso_string__toISOString; 33414 duration_prototype__proto.locale = locale; 33415 duration_prototype__proto.localeData = localeData; 33416 33417 // Deprecations 33418 duration_prototype__proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString); 33419 duration_prototype__proto.lang = lang; 33420 33421 // Side effect imports 33422 33423 addFormatToken('X', 0, 0, 'unix'); 33424 addFormatToken('x', 0, 0, 'valueOf'); 33425 33426 // PARSING 33427 33428 addRegexToken('x', matchSigned); 33429 addRegexToken('X', matchTimestamp); 33430 addParseToken('X', function (input, array, config) { 33431 config._d = new Date(parseFloat(input, 10) * 1000); 33432 }); 33433 addParseToken('x', function (input, array, config) { 33434 config._d = new Date(toInt(input)); 33435 }); 33436 33437 // Side effect imports 33438 33439 ; 33440 33441 //! moment.js 33442 //! version : 2.10.6 33443 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors 33444 //! license : MIT 33445 //! momentjs.com 33446 33447 utils_hooks__hooks.version = '2.10.6'; 33448 33449 setHookCallback(local__createLocal); 33450 33451 utils_hooks__hooks.fn = momentPrototype; 33452 utils_hooks__hooks.min = min; 33453 utils_hooks__hooks.max = max; 33454 utils_hooks__hooks.utc = create_utc__createUTC; 33455 utils_hooks__hooks.unix = moment_moment__createUnix; 33456 utils_hooks__hooks.months = lists__listMonths; 33457 utils_hooks__hooks.isDate = isDate; 33458 utils_hooks__hooks.locale = locale_locales__getSetGlobalLocale; 33459 utils_hooks__hooks.invalid = valid__createInvalid; 33460 utils_hooks__hooks.duration = create__createDuration; 33461 utils_hooks__hooks.isMoment = isMoment; 33462 utils_hooks__hooks.weekdays = lists__listWeekdays; 33463 utils_hooks__hooks.parseZone = moment_moment__createInZone; 33464 utils_hooks__hooks.localeData = locale_locales__getLocale; 33465 utils_hooks__hooks.isDuration = isDuration; 33466 utils_hooks__hooks.monthsShort = lists__listMonthsShort; 33467 utils_hooks__hooks.weekdaysMin = lists__listWeekdaysMin; 33468 utils_hooks__hooks.defineLocale = defineLocale; 33469 utils_hooks__hooks.weekdaysShort = lists__listWeekdaysShort; 33470 utils_hooks__hooks.normalizeUnits = normalizeUnits; 33471 utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold; 33472 33473 var _moment__default = utils_hooks__hooks; 33474 33475 //! moment.js locale configuration 33476 //! locale : afrikaans (af) 33477 //! author : Werner Mollentze : https://github.com/wernerm 33478 33479 var af = _moment__default.defineLocale('af', { 33480 months : 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'), 33481 monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'), 33482 weekdays : 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'), 33483 weekdaysShort : 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'), 33484 weekdaysMin : 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'), 33485 meridiemParse: /vm|nm/i, 33486 isPM : function (input) { 33487 return /^nm$/i.test(input); 33488 }, 33489 meridiem : function (hours, minutes, isLower) { 33490 if (hours < 12) { 33491 return isLower ? 'vm' : 'VM'; 33492 } else { 33493 return isLower ? 'nm' : 'NM'; 33494 } 33495 }, 33496 longDateFormat : { 33497 LT : 'HH:mm', 33498 LTS : 'HH:mm:ss', 33499 L : 'DD/MM/YYYY', 33500 LL : 'D MMMM YYYY', 33501 LLL : 'D MMMM YYYY HH:mm', 33502 LLLL : 'dddd, D MMMM YYYY HH:mm' 33503 }, 33504 calendar : { 33505 sameDay : '[Vandag om] LT', 33506 nextDay : '[Môre om] LT', 33507 nextWeek : 'dddd [om] LT', 33508 lastDay : '[Gister om] LT', 33509 lastWeek : '[Laas] dddd [om] LT', 33510 sameElse : 'L' 33511 }, 33512 relativeTime : {
vendor: 43,704 bytes, lines 33513-34655
33513 future : 'oor %s', 33514 past : '%s gelede', 33515 s : '\'n paar sekondes', 33516 m : '\'n minuut', 33517 mm : '%d minute', 33518 h : '\'n uur', 33519 hh : '%d ure', 33520 d : '\'n dag', 33521 dd : '%d dae', 33522 M : '\'n maand', 33523 MM : '%d maande', 33524 y : '\'n jaar', 33525 yy : '%d jaar' 33526 }, 33527 ordinalParse: /\d{1,2}(ste|de)/, 33528 ordinal : function (number) { 33529 return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter 33530 }, 33531 week : { 33532 dow : 1, // Maandag is die eerste dag van die week. 33533 doy : 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar. 33534 } 33535 }); 33536 33537 //! moment.js locale configuration 33538 //! locale : Moroccan Arabic (ar-ma) 33539 //! author : ElFadili Yassine : https://github.com/ElFadiliY 33540 //! author : Abdel Said : https://github.com/abdelsaid 33541 33542 var ar_ma = _moment__default.defineLocale('ar-ma', { 33543 months : 'ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙ_ÙÙÙÙÙ_ÙÙÙÙÙØ²_غشت_Ø´ØªÙØ¨Ø±_Ø£ÙØªÙبر_ÙÙÙØ¨Ø±_Ø¯Ø¬ÙØ¨Ø±'.split('_'), 33544 monthsShort : 'ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙ_ÙÙÙÙÙ_ÙÙÙÙÙØ²_غشت_Ø´ØªÙØ¨Ø±_Ø£ÙØªÙبر_ÙÙÙØ¨Ø±_Ø¯Ø¬ÙØ¨Ø±'.split('_'), 33545 weekdays : 'Ø§ÙØ£ØØ¯_Ø§ÙØ¥ØªÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª'.split('_'), 33546 weekdaysShort : 'Ø§ØØ¯_اتÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_اربعاء_Ø®Ù ÙØ³_ج٠عة_سبت'.split('_'), 33547 weekdaysMin : 'Ø_Ù_Ø«_ر_Ø®_ج_س'.split('_'), 33548 longDateFormat : { 33549 LT : 'HH:mm', 33550 LTS : 'HH:mm:ss', 33551 L : 'DD/MM/YYYY', 33552 LL : 'D MMMM YYYY', 33553 LLL : 'D MMMM YYYY HH:mm', 33554 LLLL : 'dddd D MMMM YYYY HH:mm' 33555 }, 33556 calendar : { 33557 sameDay: '[اÙÙÙ٠عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33558 nextDay: '[غدا عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33559 nextWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33560 lastDay: '[أ٠س عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33561 lastWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33562 sameElse: 'L' 33563 }, 33564 relativeTime : { 33565 future : 'ÙÙ %s', 33566 past : 'Ù ÙØ° %s', 33567 s : 'Ø«ÙØ§Ù', 33568 m : 'دÙÙÙØ©', 33569 mm : '%d Ø¯ÙØ§Ø¦Ù', 33570 h : 'ساعة', 33571 hh : '%d ساعات', 33572 d : 'ÙÙÙ ', 33573 dd : '%d Ø£ÙØ§Ù ', 33574 M : 'Ø´ÙØ±', 33575 MM : '%d Ø£Ø´ÙØ±', 33576 y : 'Ø³ÙØ©', 33577 yy : '%d سÙÙØ§Øª' 33578 }, 33579 week : { 33580 dow : 6, // Saturday is the first day of the week. 33581 doy : 12 // The week that contains Jan 1st is the first week of the year. 33582 } 33583 }); 33584 33585 //! moment.js locale configuration 33586 //! locale : Arabic Saudi Arabia (ar-sa) 33587 //! author : Suhail Alkowaileet : https://github.com/xsoh 33588 33589 var ar_sa__symbolMap = { 33590 '1': 'Ù¡', 33591 '2': 'Ù¢', 33592 '3': 'Ù£', 33593 '4': 'Ù¤', 33594 '5': 'Ù¥', 33595 '6': 'Ù¦', 33596 '7': 'Ù§', 33597 '8': 'Ù¨', 33598 '9': 'Ù©', 33599 '0': 'Ù ' 33600 }, ar_sa__numberMap = { 33601 'Ù¡': '1', 33602 'Ù¢': '2', 33603 'Ù£': '3', 33604 'Ù¤': '4', 33605 'Ù¥': '5', 33606 'Ù¦': '6', 33607 'Ù§': '7', 33608 'Ù¨': '8', 33609 'Ù©': '9', 33610 'Ù ': '0' 33611 }; 33612 33613 var ar_sa = _moment__default.defineLocale('ar-sa', { 33614 months : 'ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙÙ_ÙÙÙÙÙ_ÙÙÙÙÙ_أغسطس_سبت٠بر_Ø£ÙØªÙبر_ÙÙÙ٠بر_Ø¯ÙØ³Ù بر'.split('_'), 33615 monthsShort : 'ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙÙ_ÙÙÙÙÙ_ÙÙÙÙÙ_أغسطس_سبت٠بر_Ø£ÙØªÙبر_ÙÙÙ٠بر_Ø¯ÙØ³Ù بر'.split('_'), 33616 weekdays : 'Ø§ÙØ£ØØ¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª'.split('_'), 33617 weekdaysShort : 'Ø£ØØ¯_إثÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_أربعاء_Ø®Ù ÙØ³_ج٠عة_سبت'.split('_'), 33618 weekdaysMin : 'Ø_Ù_Ø«_ر_Ø®_ج_س'.split('_'), 33619 longDateFormat : { 33620 LT : 'HH:mm', 33621 LTS : 'HH:mm:ss', 33622 L : 'DD/MM/YYYY', 33623 LL : 'D MMMM YYYY', 33624 LLL : 'D MMMM YYYY HH:mm', 33625 LLLL : 'dddd D MMMM YYYY HH:mm' 33626 }, 33627 meridiemParse: /ص|Ù /, 33628 isPM : function (input) { 33629 return 'Ù ' === input; 33630 }, 33631 meridiem : function (hour, minute, isLower) { 33632 if (hour < 12) { 33633 return 'ص'; 33634 } else { 33635 return 'Ù '; 33636 } 33637 }, 33638 calendar : { 33639 sameDay: '[اÙÙÙ٠عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33640 nextDay: '[غدا عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33641 nextWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33642 lastDay: '[أ٠س عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33643 lastWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33644 sameElse: 'L' 33645 }, 33646 relativeTime : { 33647 future : 'ÙÙ %s', 33648 past : 'Ù ÙØ° %s', 33649 s : 'Ø«ÙØ§Ù', 33650 m : 'دÙÙÙØ©', 33651 mm : '%d Ø¯ÙØ§Ø¦Ù', 33652 h : 'ساعة', 33653 hh : '%d ساعات', 33654 d : 'ÙÙÙ ', 33655 dd : '%d Ø£ÙØ§Ù ', 33656 M : 'Ø´ÙØ±', 33657 MM : '%d Ø£Ø´ÙØ±', 33658 y : 'Ø³ÙØ©', 33659 yy : '%d سÙÙØ§Øª' 33660 }, 33661 preparse: function (string) { 33662 return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { 33663 return ar_sa__numberMap[match]; 33664 }).replace(/Ø/g, ','); 33665 }, 33666 postformat: function (string) { 33667 return string.replace(/\d/g, function (match) { 33668 return ar_sa__symbolMap[match]; 33669 }).replace(/,/g, 'Ø'); 33670 }, 33671 week : { 33672 dow : 6, // Saturday is the first day of the week. 33673 doy : 12 // The week that contains Jan 1st is the first week of the year. 33674 } 33675 }); 33676 33677 //! moment.js locale configuration 33678 //! locale : Tunisian Arabic (ar-tn) 33679 33680 var ar_tn = _moment__default.defineLocale('ar-tn', { 33681 months: 'جاÙÙÙ_ÙÙÙØ±Ù_٠ارس_Ø£ÙØ±ÙÙ_٠اÙ_Ø¬ÙØ§Ù_جÙÙÙÙØ©_Ø£ÙØª_سبت٠بر_Ø£ÙØªÙبر_ÙÙÙ٠بر_Ø¯ÙØ³Ù بر'.split('_'), 33682 monthsShort: 'جاÙÙÙ_ÙÙÙØ±Ù_٠ارس_Ø£ÙØ±ÙÙ_٠اÙ_Ø¬ÙØ§Ù_جÙÙÙÙØ©_Ø£ÙØª_سبت٠بر_Ø£ÙØªÙبر_ÙÙÙ٠بر_Ø¯ÙØ³Ù بر'.split('_'), 33683 weekdays: 'Ø§ÙØ£ØØ¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª'.split('_'), 33684 weekdaysShort: 'Ø£ØØ¯_إثÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_أربعاء_Ø®Ù ÙØ³_ج٠عة_سبت'.split('_'), 33685 weekdaysMin: 'Ø_Ù_Ø«_ر_Ø®_ج_س'.split('_'), 33686 longDateFormat: { 33687 LT: 'HH:mm', 33688 LTS: 'HH:mm:ss', 33689 L: 'DD/MM/YYYY', 33690 LL: 'D MMMM YYYY', 33691 LLL: 'D MMMM YYYY HH:mm', 33692 LLLL: 'dddd D MMMM YYYY HH:mm' 33693 }, 33694 calendar: { 33695 sameDay: '[اÙÙÙ٠عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33696 nextDay: '[غدا عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33697 nextWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33698 lastDay: '[أ٠س عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33699 lastWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33700 sameElse: 'L' 33701 }, 33702 relativeTime: { 33703 future: 'ÙÙ %s', 33704 past: 'Ù ÙØ° %s', 33705 s: 'Ø«ÙØ§Ù', 33706 m: 'دÙÙÙØ©', 33707 mm: '%d Ø¯ÙØ§Ø¦Ù', 33708 h: 'ساعة', 33709 hh: '%d ساعات', 33710 d: 'ÙÙÙ ', 33711 dd: '%d Ø£ÙØ§Ù ', 33712 M: 'Ø´ÙØ±', 33713 MM: '%d Ø£Ø´ÙØ±', 33714 y: 'Ø³ÙØ©', 33715 yy: '%d سÙÙØ§Øª' 33716 }, 33717 week: { 33718 dow: 1, // Monday is the first day of the week. 33719 doy: 4 // The week that contains Jan 4th is the first week of the year. 33720 } 33721 }); 33722 33723 //! moment.js locale configuration 33724 //! Locale: Arabic (ar) 33725 //! Author: Abdel Said: https://github.com/abdelsaid 33726 //! Changes in months, weekdays: Ahmed Elkhatib 33727 //! Native plural forms: forabi https://github.com/forabi 33728 33729 var ar__symbolMap = { 33730 '1': 'Ù¡', 33731 '2': 'Ù¢', 33732 '3': 'Ù£', 33733 '4': 'Ù¤', 33734 '5': 'Ù¥', 33735 '6': 'Ù¦', 33736 '7': 'Ù§', 33737 '8': 'Ù¨', 33738 '9': 'Ù©', 33739 '0': 'Ù ' 33740 }, ar__numberMap = { 33741 'Ù¡': '1', 33742 'Ù¢': '2', 33743 'Ù£': '3', 33744 'Ù¤': '4', 33745 'Ù¥': '5', 33746 'Ù¦': '6', 33747 'Ù§': '7', 33748 'Ù¨': '8', 33749 'Ù©': '9', 33750 'Ù ': '0' 33751 }, pluralForm = function (n) { 33752 return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5; 33753 }, plurals = { 33754 s : ['Ø£Ù٠٠٠ثاÙÙØ©', 'ثاÙÙØ© ÙØ§ØØ¯Ø©', ['ثاÙÙØªØ§Ù', 'ثاÙÙØªÙÙ'], '%d Ø«ÙØ§Ù', '%d ثاÙÙØ©', '%d ثاÙÙØ©'], 33755 m : ['Ø£Ù٠٠٠دÙÙÙØ©', 'دÙÙÙØ© ÙØ§ØØ¯Ø©', ['دÙÙÙØªØ§Ù', 'دÙÙÙØªÙÙ'], '%d Ø¯ÙØ§Ø¦Ù', '%d دÙÙÙØ©', '%d دÙÙÙØ©'], 33756 h : ['Ø£Ù٠٠٠ساعة', 'ساعة ÙØ§ØØ¯Ø©', ['ساعتاÙ', 'ساعتÙÙ'], '%d ساعات', '%d ساعة', '%d ساعة'], 33757 d : ['Ø£ÙÙ Ù Ù ÙÙÙ ', 'ÙÙÙ ÙØ§ØØ¯', ['ÙÙ٠اÙ', 'ÙÙÙ ÙÙ'], '%d Ø£ÙØ§Ù ', '%d ÙÙÙ ÙØ§', '%d ÙÙÙ '], 33758 M : ['Ø£ÙÙ Ù Ù Ø´ÙØ±', 'Ø´ÙØ± ÙØ§ØØ¯', ['Ø´ÙØ±Ø§Ù', 'Ø´ÙØ±ÙÙ'], '%d Ø£Ø´ÙØ±', '%d Ø´ÙØ±Ø§', '%d Ø´ÙØ±'], 33759 y : ['Ø£Ù٠٠٠عا٠', 'Ø¹Ø§Ù ÙØ§ØØ¯', ['عا٠اÙ', 'عا٠ÙÙ'], '%d Ø£Ø¹ÙØ§Ù ', '%d Ø¹Ø§Ù ÙØ§', '%d عا٠'] 33760 }, pluralize = function (u) { 33761 return function (number, withoutSuffix, string, isFuture) { 33762 var f = pluralForm(number), 33763 str = plurals[u][pluralForm(number)]; 33764 if (f === 2) { 33765 str = str[withoutSuffix ? 0 : 1]; 33766 } 33767 return str.replace(/%d/i, number); 33768 }; 33769 }, ar__months = [ 33770 'ÙØ§ÙÙÙ Ø§ÙØ«Ø§ÙÙ ÙÙØ§Ùر', 33771 'شباط ÙØ¨Ø±Ø§Ùر', 33772 'آذار ٠ارس', 33773 'ÙÙØ³Ø§Ù أبرÙÙ', 33774 'Ø£ÙØ§Ø± ٠اÙÙ', 33775 'ØØ²Ùرا٠ÙÙÙÙÙ', 33776 'ØªÙ ÙØ² ÙÙÙÙÙ', 33777 'آب أغسطس', 33778 'Ø£ÙÙÙ٠سبت٠بر', 33779 'تشرÙÙ Ø§ÙØ£ÙÙ Ø£ÙØªÙبر', 33780 'تشرÙÙ Ø§ÙØ«Ø§ÙÙ ÙÙÙ٠بر', 33781 'ÙØ§ÙÙÙ Ø§ÙØ£ÙÙ Ø¯ÙØ³Ù بر' 33782 ]; 33783 33784 var ar = _moment__default.defineLocale('ar', { 33785 months : ar__months, 33786 monthsShort : ar__months, 33787 weekdays : 'Ø§ÙØ£ØØ¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª'.split('_'), 33788 weekdaysShort : 'Ø£ØØ¯_إثÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_أربعاء_Ø®Ù ÙØ³_ج٠عة_سبت'.split('_'), 33789 weekdaysMin : 'Ø_Ù_Ø«_ر_Ø®_ج_س'.split('_'), 33790 longDateFormat : { 33791 LT : 'HH:mm', 33792 LTS : 'HH:mm:ss', 33793 L : 'D/\u200FM/\u200FYYYY', 33794 LL : 'D MMMM YYYY', 33795 LLL : 'D MMMM YYYY HH:mm', 33796 LLLL : 'dddd D MMMM YYYY HH:mm' 33797 }, 33798 meridiemParse: /ص|Ù /, 33799 isPM : function (input) { 33800 return 'Ù ' === input; 33801 }, 33802 meridiem : function (hour, minute, isLower) { 33803 if (hour < 12) { 33804 return 'ص'; 33805 } else { 33806 return 'Ù '; 33807 } 33808 }, 33809 calendar : { 33810 sameDay: '[اÙÙÙÙ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33811 nextDay: '[ØºØ¯ÙØ§ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33812 nextWeek: 'dddd [Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33813 lastDay: '[أ٠س Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33814 lastWeek: 'dddd [Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 33815 sameElse: 'L' 33816 }, 33817 relativeTime : { 33818 future : 'بعد %s', 33819 past : 'Ù ÙØ° %s', 33820 s : pluralize('s'), 33821 m : pluralize('m'), 33822 mm : pluralize('m'), 33823 h : pluralize('h'), 33824 hh : pluralize('h'), 33825 d : pluralize('d'), 33826 dd : pluralize('d'), 33827 M : pluralize('M'), 33828 MM : pluralize('M'), 33829 y : pluralize('y'), 33830 yy : pluralize('y') 33831 }, 33832 preparse: function (string) { 33833 return string.replace(/\u200f/g, '').replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { 33834 return ar__numberMap[match]; 33835 }).replace(/Ø/g, ','); 33836 }, 33837 postformat: function (string) { 33838 return string.replace(/\d/g, function (match) { 33839 return ar__symbolMap[match]; 33840 }).replace(/,/g, 'Ø'); 33841 }, 33842 week : { 33843 dow : 6, // Saturday is the first day of the week. 33844 doy : 12 // The week that contains Jan 1st is the first week of the year. 33845 } 33846 }); 33847 33848 //! moment.js locale configuration 33849 //! locale : azerbaijani (az) 33850 //! author : topchiyev : https://github.com/topchiyev 33851 33852 var az__suffixes = { 33853 1: '-inci', 33854 5: '-inci', 33855 8: '-inci', 33856 70: '-inci', 33857 80: '-inci', 33858 2: '-nci', 33859 7: '-nci', 33860 20: '-nci', 33861 50: '-nci', 33862 3: '-üncü', 33863 4: '-üncü', 33864 100: '-üncü', 33865 6: '-ncı', 33866 9: '-uncu', 33867 10: '-uncu', 33868 30: '-uncu', 33869 60: '-ıncı', 33870 90: '-ıncı' 33871 }; 33872 33873 var az = _moment__default.defineLocale('az', { 33874 months : 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'), 33875 monthsShort : 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'), 33876 weekdays : 'Bazar_Bazar ertÉsi_ÃÉrÅÉnbÉ axÅamı_ÃÉrÅÉnbÉ_CümÉ axÅamı_CümÉ_ÅÉnbÉ'.split('_'), 33877 weekdaysShort : 'Baz_BzE_ÃAx_ÃÉr_CAx_Cüm_ÅÉn'.split('_'), 33878 weekdaysMin : 'Bz_BE_ÃA_ÃÉ_CA_Cü_ÅÉ'.split('_'), 33879 longDateFormat : { 33880 LT : 'HH:mm', 33881 LTS : 'HH:mm:ss', 33882 L : 'DD.MM.YYYY', 33883 LL : 'D MMMM YYYY', 33884 LLL : 'D MMMM YYYY HH:mm', 33885 LLLL : 'dddd, D MMMM YYYY HH:mm' 33886 }, 33887 calendar : { 33888 sameDay : '[bugün saat] LT', 33889 nextDay : '[sabah saat] LT', 33890 nextWeek : '[gÉlÉn hÉftÉ] dddd [saat] LT', 33891 lastDay : '[dünÉn] LT', 33892 lastWeek : '[keçÉn hÉftÉ] dddd [saat] LT', 33893 sameElse : 'L' 33894 }, 33895 relativeTime : { 33896 future : '%s sonra', 33897 past : '%s ÉvvÉl', 33898 s : 'birneÃ§É saniyyÉ', 33899 m : 'bir dÉqiqÉ', 33900 mm : '%d dÉqiqÉ', 33901 h : 'bir saat', 33902 hh : '%d saat', 33903 d : 'bir gün', 33904 dd : '%d gün', 33905 M : 'bir ay', 33906 MM : '%d ay', 33907 y : 'bir il', 33908 yy : '%d il' 33909 }, 33910 meridiemParse: /gecÉ|sÉhÉr|gündüz|axÅam/, 33911 isPM : function (input) { 33912 return /^(gündüz|axÅam)$/.test(input); 33913 }, 33914 meridiem : function (hour, minute, isLower) { 33915 if (hour < 4) { 33916 return 'gecÉ'; 33917 } else if (hour < 12) { 33918 return 'sÉhÉr'; 33919 } else if (hour < 17) { 33920 return 'gündüz'; 33921 } else { 33922 return 'axÅam'; 33923 } 33924 }, 33925 ordinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/, 33926 ordinal : function (number) { 33927 if (number === 0) { // special case for zero 33928 return number + '-ıncı'; 33929 } 33930 var a = number % 10, 33931 b = number % 100 - a, 33932 c = number >= 100 ? 100 : null; 33933 return number + (az__suffixes[a] || az__suffixes[b] || az__suffixes[c]); 33934 }, 33935 week : { 33936 dow : 1, // Monday is the first day of the week. 33937 doy : 7 // The week that contains Jan 1st is the first week of the year. 33938 } 33939 }); 33940 33941 //! moment.js locale configuration 33942 //! locale : belarusian (be) 33943 //! author : Dmitry Demidov : https://github.com/demidov91 33944 //! author: Praleska: http://praleska.pro/ 33945 //! Author : Menelion Elensúle : https://github.com/Oire 33946 33947 function be__plural(word, num) { 33948 var forms = word.split('_'); 33949 return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); 33950 } 33951 function be__relativeTimeWithPlural(number, withoutSuffix, key) { 33952 var format = { 33953 'mm': withoutSuffix ? 'Ñ Ð²ÑлÑна_Ñ Ð²ÑлÑнÑ_Ñ Ð²ÑлÑн' : 'Ñ Ð²ÑлÑнÑ_Ñ Ð²ÑлÑнÑ_Ñ Ð²ÑлÑн', 33954 'hh': withoutSuffix ? 'гадзÑна_гадзÑнÑ_гадзÑн' : 'гадзÑнÑ_гадзÑнÑ_гадзÑн', 33955 'dd': 'дзенÑ_днÑ_дзÑн', 33956 'MM': 'меÑÑÑ_меÑÑÑÑ_меÑÑÑаÑ', 33957 'yy': 'год_гадÑ_гадоÑ' 33958 }; 33959 if (key === 'm') { 33960 return withoutSuffix ? 'Ñ Ð²ÑлÑна' : 'Ñ Ð²ÑлÑнÑ'; 33961 } 33962 else if (key === 'h') { 33963 return withoutSuffix ? 'гадзÑна' : 'гадзÑнÑ'; 33964 } 33965 else { 33966 return number + ' ' + be__plural(format[key], +number); 33967 } 33968 } 33969 function be__monthsCaseReplace(m, format) { 33970 var months = { 33971 'nominative': 'ÑÑÑдзенÑ_лÑÑÑ_ÑакавÑк_кÑаÑавÑк_ÑÑавенÑ_ÑÑÑвенÑ_лÑпенÑ_жнÑвенÑ_веÑаÑенÑ_каÑÑÑÑÑнÑк_лÑÑÑапад_ÑнежанÑ'.split('_'), 33972 'accusative': 'ÑÑÑдзенÑ_лÑÑага_ÑакавÑка_кÑаÑавÑка_ÑÑаÑнÑ_ÑÑÑвенÑ_лÑпенÑ_жнÑÑнÑ_веÑаÑнÑ_каÑÑÑÑÑнÑка_лÑÑÑапада_ÑнежнÑ'.split('_') 33973 }, 33974 nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ? 33975 'accusative' : 33976 'nominative'; 33977 return months[nounCase][m.month()]; 33978 } 33979 function be__weekdaysCaseReplace(m, format) { 33980 var weekdays = { 33981 'nominative': 'нÑдзелÑ_панÑдзелак_аÑÑоÑак_ÑеÑада_ÑаÑвеÑ_пÑÑнÑÑа_ÑÑбоÑа'.split('_'), 33982 'accusative': 'нÑдзелÑ_панÑдзелак_аÑÑоÑак_ÑеÑадÑ_ÑаÑвеÑ_пÑÑнÑÑÑ_ÑÑбоÑÑ'.split('_') 33983 }, 33984 nounCase = (/\[ ?[Ðв] ?(?:мÑнÑлÑÑ|наÑÑÑпнÑÑ)? ?\] ?dddd/).test(format) ? 33985 'accusative' : 33986 'nominative'; 33987 return weekdays[nounCase][m.day()]; 33988 } 33989 33990 var be = _moment__default.defineLocale('be', { 33991 months : be__monthsCaseReplace, 33992 monthsShort : 'ÑÑÑд_лÑÑ_Ñак_кÑаÑ_ÑÑав_ÑÑÑв_лÑп_жнÑв_веÑ_каÑÑ_лÑÑÑ_Ñнеж'.split('_'), 33993 weekdays : be__weekdaysCaseReplace, 33994 weekdaysShort : 'нд_пн_аÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 33995 weekdaysMin : 'нд_пн_аÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 33996 longDateFormat : { 33997 LT : 'HH:mm', 33998 LTS : 'HH:mm:ss', 33999 L : 'DD.MM.YYYY', 34000 LL : 'D MMMM YYYY г.', 34001 LLL : 'D MMMM YYYY г., HH:mm', 34002 LLLL : 'dddd, D MMMM YYYY г., HH:mm' 34003 }, 34004 calendar : { 34005 sameDay: '[СÑÐ½Ð½Ñ Ñ] LT', 34006 nextDay: '[ÐаÑÑÑа Ñ] LT', 34007 lastDay: '[УÑоÑа Ñ] LT', 34008 nextWeek: function () { 34009 return '[У] dddd [Ñ] LT'; 34010 }, 34011 lastWeek: function () { 34012 switch (this.day()) { 34013 case 0: 34014 case 3: 34015 case 5: 34016 case 6: 34017 return '[У мÑнÑлÑÑ] dddd [Ñ] LT'; 34018 case 1: 34019 case 2: 34020 case 4: 34021 return '[У мÑнÑлÑ] dddd [Ñ] LT'; 34022 } 34023 }, 34024 sameElse: 'L' 34025 }, 34026 relativeTime : { 34027 future : 'пÑаз %s', 34028 past : '%s ÑамÑ', 34029 s : 'некалÑÐºÑ ÑекÑнд', 34030 m : be__relativeTimeWithPlural, 34031 mm : be__relativeTimeWithPlural, 34032 h : be__relativeTimeWithPlural, 34033 hh : be__relativeTimeWithPlural, 34034 d : 'дзенÑ', 34035 dd : be__relativeTimeWithPlural, 34036 M : 'меÑÑÑ', 34037 MM : be__relativeTimeWithPlural, 34038 y : 'год', 34039 yy : be__relativeTimeWithPlural 34040 }, 34041 meridiemParse: /ноÑÑ|ÑанÑÑÑ|днÑ|веÑаÑа/, 34042 isPM : function (input) { 34043 return /^(днÑ|веÑаÑа)$/.test(input); 34044 }, 34045 meridiem : function (hour, minute, isLower) { 34046 if (hour < 4) { 34047 return 'ноÑÑ'; 34048 } else if (hour < 12) { 34049 return 'ÑанÑÑÑ'; 34050 } else if (hour < 17) { 34051 return 'днÑ'; 34052 } else { 34053 return 'веÑаÑа'; 34054 } 34055 }, 34056 ordinalParse: /\d{1,2}-(Ñ|Ñ|га)/, 34057 ordinal: function (number, period) { 34058 switch (period) { 34059 case 'M': 34060 case 'd': 34061 case 'DDD': 34062 case 'w': 34063 case 'W': 34064 return (number % 10 === 2 || number % 10 === 3) && (number % 100 !== 12 && number % 100 !== 13) ? number + '-Ñ' : number + '-Ñ'; 34065 case 'D': 34066 return number + '-га'; 34067 default: 34068 return number; 34069 } 34070 }, 34071 week : { 34072 dow : 1, // Monday is the first day of the week. 34073 doy : 7 // The week that contains Jan 1st is the first week of the year. 34074 } 34075 }); 34076 34077 //! moment.js locale configuration 34078 //! locale : bulgarian (bg) 34079 //! author : Krasen Borisov : https://github.com/kraz 34080 34081 var bg = _moment__default.defineLocale('bg', { 34082 months : 'ÑнÑаÑи_ÑевÑÑаÑи_маÑÑ_апÑил_май_Ñни_Ñли_авгÑÑÑ_ÑепÑемвÑи_окÑомвÑи_ноемвÑи_декемвÑи'.split('_'), 34083 monthsShort : 'ÑнÑ_Ñев_маÑ_апÑ_май_Ñни_Ñли_авг_Ñеп_окÑ_ное_дек'.split('_'), 34084 weekdays : 'неделÑ_понеделник_вÑоÑник_ÑÑÑда_ÑеÑвÑÑÑÑк_пеÑÑк_ÑÑбоÑа'.split('_'), 34085 weekdaysShort : 'нед_пон_вÑо_ÑÑÑ_ÑеÑ_пеÑ_ÑÑб'.split('_'), 34086 weekdaysMin : 'нд_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 34087 longDateFormat : { 34088 LT : 'H:mm', 34089 LTS : 'H:mm:ss', 34090 L : 'D.MM.YYYY', 34091 LL : 'D MMMM YYYY', 34092 LLL : 'D MMMM YYYY H:mm', 34093 LLLL : 'dddd, D MMMM YYYY H:mm' 34094 }, 34095 calendar : { 34096 sameDay : '[ÐÐ½ÐµÑ Ð²] LT', 34097 nextDay : '[УÑÑе в] LT', 34098 nextWeek : 'dddd [в] LT', 34099 lastDay : '[ÐÑеÑа в] LT', 34100 lastWeek : function () { 34101 switch (this.day()) { 34102 case 0: 34103 case 3: 34104 case 6: 34105 return '[РизминалаÑа] dddd [в] LT'; 34106 case 1: 34107 case 2: 34108 case 4: 34109 case 5: 34110 return '[РизминалиÑ] dddd [в] LT'; 34111 } 34112 }, 34113 sameElse : 'L' 34114 }, 34115 relativeTime : { 34116 future : 'Ñлед %s', 34117 past : 'пÑеди %s', 34118 s : 'нÑколко ÑекÑнди', 34119 m : 'минÑÑа', 34120 mm : '%d минÑÑи', 34121 h : 'ÑаÑ', 34122 hh : '%d ÑаÑа', 34123 d : 'ден', 34124 dd : '%d дни', 34125 M : 'меÑеÑ', 34126 MM : '%d меÑеÑа', 34127 y : 'година', 34128 yy : '%d години' 34129 }, 34130 ordinalParse: /\d{1,2}-(ев|ен|Ñи|ви|Ñи|ми)/, 34131 ordinal : function (number) { 34132 var lastDigit = number % 10, 34133 last2Digits = number % 100; 34134 if (number === 0) { 34135 return number + '-ев'; 34136 } else if (last2Digits === 0) { 34137 return number + '-ен'; 34138 } else if (last2Digits > 10 && last2Digits < 20) { 34139 return number + '-Ñи'; 34140 } else if (lastDigit === 1) { 34141 return number + '-ви'; 34142 } else if (lastDigit === 2) { 34143 return number + '-Ñи'; 34144 } else if (lastDigit === 7 || lastDigit === 8) { 34145 return number + '-ми'; 34146 } else { 34147 return number + '-Ñи'; 34148 } 34149 }, 34150 week : { 34151 dow : 1, // Monday is the first day of the week. 34152 doy : 7 // The week that contains Jan 1st is the first week of the year. 34153 } 34154 }); 34155 34156 //! moment.js locale configuration 34157 //! locale : Bengali (bn) 34158 //! author : Kaushik Gandhi : https://github.com/kaushikgandhi 34159 34160 var bn__symbolMap = { 34161 '1': 'à§§', 34162 '2': '২', 34163 '3': 'à§©', 34164 '4': '৪', 34165 '5': 'à§«', 34166 '6': '৬', 34167 '7': 'à§', 34168 '8': 'à§®', 34169 '9': '৯', 34170 '0': '০' 34171 }, 34172 bn__numberMap = { 34173 'à§§': '1', 34174 '২': '2', 34175 'à§©': '3', 34176 '৪': '4', 34177 'à§«': '5', 34178 '৬': '6', 34179 'à§': '7', 34180 'à§®': '8', 34181 '৯': '9', 34182 '০': '0' 34183 }; 34184 34185 var bn = _moment__default.defineLocale('bn', { 34186 months : 'à¦à¦¾à¦¨à§à§à¦¾à¦°à§_ফà§à¦¬à§à§à¦¾à¦°à§_মারà§à¦_à¦à¦ªà§à¦°à¦¿à¦²_মà§_à¦à§à¦¨_à¦à§à¦²à¦¾à¦_ঠà¦à¦¾à¦¸à§à¦_সà§à¦ªà§à¦à§à¦®à§à¦¬à¦°_ঠà¦à§à¦à§à¦¬à¦°_নà¦à§à¦®à§à¦¬à¦°_ডিসà§à¦®à§à¦¬à¦°'.split('_'), 34187 monthsShort : 'à¦à¦¾à¦¨à§_ফà§à¦¬_মারà§à¦_à¦à¦ªà¦°_মà§_à¦à§à¦¨_à¦à§à¦²_ঠà¦_সà§à¦ªà§à¦_ঠà¦à§à¦à§_নà¦_ডিসà§à¦®à§'.split('_'), 34188 weekdays : 'রবিবার_সà§à¦®à¦¬à¦¾à¦°_মà¦à§à¦à¦²à¦¬à¦¾à¦°_বà§à¦§à¦¬à¦¾à¦°_বà§à¦¹à¦¸à§à¦ªà¦¤à§à¦¤à¦¿à¦¬à¦¾à¦°_শà§à¦à§à¦°à§à¦¬à¦¾à¦°_শনিবার'.split('_'), 34189 weekdaysShort : 'রবি_সà§à¦®_মà¦à§à¦à¦²_বà§à¦§_বà§à¦¹à¦¸à§à¦ªà¦¤à§à¦¤à¦¿_শà§à¦à§à¦°à§_শনি'.split('_'), 34190 weekdaysMin : 'রব_সম_মà¦à§à¦_বà§_বà§à¦°à¦¿à¦¹_শà§_শনি'.split('_'), 34191 longDateFormat : { 34192 LT : 'A h:mm সমà§', 34193 LTS : 'A h:mm:ss সমà§', 34194 L : 'DD/MM/YYYY', 34195 LL : 'D MMMM YYYY', 34196 LLL : 'D MMMM YYYY, A h:mm সমà§', 34197 LLLL : 'dddd, D MMMM YYYY, A h:mm সমà§' 34198 }, 34199 calendar : { 34200 sameDay : '[à¦à¦] LT', 34201 nextDay : '[à¦à¦à¦¾à¦®à§à¦à¦¾à¦²] LT', 34202 nextWeek : 'dddd, LT', 34203 lastDay : '[à¦à¦¤à¦à¦¾à¦²] LT', 34204 lastWeek : '[à¦à¦¤] dddd, LT', 34205 sameElse : 'L' 34206 }, 34207 relativeTime : { 34208 future : '%s পরà§', 34209 past : '%s à¦à¦à§', 34210 s : 'à¦à¦à¦ সà§à¦à§à¦¨à§à¦¡', 34211 m : 'à¦à¦ মিনিà¦', 34212 mm : '%d মিনিà¦', 34213 h : 'à¦à¦ à¦à¦¨à§à¦à¦¾', 34214 hh : '%d à¦à¦¨à§à¦à¦¾', 34215 d : 'à¦à¦ দিন', 34216 dd : '%d দিন', 34217 M : 'à¦à¦ মাস', 34218 MM : '%d মাস', 34219 y : 'à¦à¦ বà¦à¦°', 34220 yy : '%d বà¦à¦°' 34221 }, 34222 preparse: function (string) { 34223 return string.replace(/[১২৩৪৫৬à§à§®à§¯à§¦]/g, function (match) { 34224 return bn__numberMap[match]; 34225 }); 34226 }, 34227 postformat: function (string) { 34228 return string.replace(/\d/g, function (match) { 34229 return bn__symbolMap[match]; 34230 }); 34231 }, 34232 meridiemParse: /রাত|সà¦à¦¾à¦²|দà§à¦ªà§à¦°|বিà¦à§à¦²|রাত/, 34233 isPM: function (input) { 34234 return /^(দà§à¦ªà§à¦°|বিà¦à§à¦²|রাত)$/.test(input); 34235 }, 34236 //Bengali is a vast language its spoken 34237 //in different forms in various parts of the world. 34238 //I have just generalized with most common one used 34239 meridiem : function (hour, minute, isLower) { 34240 if (hour < 4) { 34241 return 'রাত'; 34242 } else if (hour < 10) { 34243 return 'সà¦à¦¾à¦²'; 34244 } else if (hour < 17) { 34245 return 'দà§à¦ªà§à¦°'; 34246 } else if (hour < 20) { 34247 return 'বিà¦à§à¦²'; 34248 } else { 34249 return 'রাত'; 34250 } 34251 }, 34252 week : { 34253 dow : 0, // Sunday is the first day of the week. 34254 doy : 6 // The week that contains Jan 1st is the first week of the year. 34255 } 34256 }); 34257 34258 //! moment.js locale configuration 34259 //! locale : tibetan (bo) 34260 //! author : Thupten N. Chakrishar : https://github.com/vajradog 34261 34262 var bo__symbolMap = { 34263 '1': '༡', 34264 '2': '༢', 34265 '3': '༣', 34266 '4': '༤', 34267 '5': '༥', 34268 '6': '༦', 34269 '7': '༧', 34270 '8': '༨', 34271 '9': '༩', 34272 '0': '༠' 34273 }, 34274 bo__numberMap = { 34275 '༡': '1', 34276 '༢': '2', 34277 '༣': '3', 34278 '༤': '4', 34279 '༥': '5', 34280 '༦': '6', 34281 '༧': '7', 34282 '༨': '8', 34283 '༩': '9', 34284 '༠': '0' 34285 }; 34286 34287 var bo = _moment__default.defineLocale('bo', { 34288 months : 'à½à¾³à¼à½à¼à½à½à¼à½à½¼_à½à¾³à¼à½à¼à½à½à½²à½¦à¼à½_à½à¾³à¼à½à¼à½à½¦à½´à½à¼à½_à½à¾³à¼à½à¼à½à½à½²à¼à½_à½à¾³à¼à½à¼à½£à¾à¼à½_à½à¾³à¼à½à¼à½à¾²à½´à½à¼à½_à½à¾³à¼à½à¼à½à½à½´à½à¼à½_à½à¾³à¼à½à¼à½à½¢à¾à¾±à½à¼à½_à½à¾³à¼à½à¼à½à½à½´à¼à½_à½à¾³à¼à½à¼à½à½ ུà¼à½_à½à¾³à¼à½à¼à½à½ ུà¼à½à½ ིà½à¼à½_à½à¾³à¼à½à¼à½à½ ུà¼à½à½à½²à½¦à¼à½'.split('_'), 34289 monthsShort : 'à½à¾³à¼à½à¼à½à½à¼à½à½¼_à½à¾³à¼à½à¼à½à½à½²à½¦à¼à½_à½à¾³à¼à½à¼à½à½¦à½´à½à¼à½_à½à¾³à¼à½à¼à½à½à½²à¼à½_à½à¾³à¼à½à¼à½£à¾à¼à½_à½à¾³à¼à½à¼à½à¾²à½´à½à¼à½_à½à¾³à¼à½à¼à½à½à½´à½à¼à½_à½à¾³à¼à½à¼à½à½¢à¾à¾±à½à¼à½_à½à¾³à¼à½à¼à½à½à½´à¼à½_à½à¾³à¼à½à¼à½à½ ུà¼à½_à½à¾³à¼à½à¼à½à½ ུà¼à½à½ ིà½à¼à½_à½à¾³à¼à½à¼à½à½ ུà¼à½à½à½²à½¦à¼à½'.split('_'), 34290 weekdays : 'à½à½à½ à¼à½à½²à¼à½à¼_à½à½à½ à¼à½à¾³à¼à½à¼_à½à½à½ à¼à½à½²à½à¼à½à½à½¢à¼_à½à½à½ à¼à½£à¾·à½à¼à½à¼_à½à½à½ à¼à½à½´à½¢à¼à½à½´_à½à½à½ à¼à½à¼à½¦à½à½¦à¼_à½à½à½ à¼à½¦à¾¤à½ºà½à¼à½à¼'.split('_'), 34291 weekdaysShort : 'à½à½²à¼à½à¼_à½à¾³à¼à½à¼_à½à½²à½à¼à½à½à½¢à¼_ལྷà½à¼à½à¼_à½à½´à½¢à¼à½à½´_à½à¼à½¦à½à½¦à¼_སྤེà½à¼à½à¼'.split('_'), 34292 weekdaysMin : 'à½à½²à¼à½à¼_à½à¾³à¼à½à¼_à½à½²à½à¼à½à½à½¢à¼_ལྷà½à¼à½à¼_à½à½´à½¢à¼à½à½´_à½à¼à½¦à½à½¦à¼_སྤེà½à¼à½à¼'.split('_'), 34293 longDateFormat : { 34294 LT : 'A h:mm', 34295 LTS : 'A h:mm:ss', 34296 L : 'DD/MM/YYYY', 34297 LL : 'D MMMM YYYY', 34298 LLL : 'D MMMM YYYY, A h:mm', 34299 LLLL : 'dddd, D MMMM YYYY, A h:mm' 34300 }, 34301 calendar : { 34302 sameDay : '[à½à½²à¼à½¢à½²à½] LT', 34303 nextDay : '[སà½à¼à½à½²à½] LT', 34304 nextWeek : '[à½à½à½´à½à¼à½à¾²à½à¼à½¢à¾à½ºà½¦à¼à½], LT', 34305 lastDay : '[à½à¼à½¦à½] LT', 34306 lastWeek : '[à½à½à½´à½à¼à½à¾²à½à¼à½à½à½ à¼à½] dddd, LT', 34307 sameElse : 'L' 34308 }, 34309 relativeTime : { 34310 future : '%s ལà¼', 34311 past : '%s སà¾à½à¼à½£', 34312 s : 'ལà½à¼à½¦à½', 34313 m : 'སà¾à½¢à¼à½à¼à½à½ ིà½', 34314 mm : '%d སà¾à½¢à¼à½', 34315 h : 'à½à½´à¼à½à½¼à½à¼à½à½ ིà½', 34316 hh : '%d à½à½´à¼à½à½¼à½', 34317 d : 'à½à½²à½à¼à½à½ ིà½', 34318 dd : '%d à½à½²à½à¼', 34319 M : 'à½à¾³à¼à½à¼à½à½ ིà½', 34320 MM : '%d à½à¾³à¼à½', 34321 y : 'ལོà¼à½à½ ིà½', 34322 yy : '%d ལོ' 34323 }, 34324 preparse: function (string) { 34325 return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) { 34326 return bo__numberMap[match]; 34327 }); 34328 }, 34329 postformat: function (string) { 34330 return string.replace(/\d/g, function (match) { 34331 return bo__symbolMap[match]; 34332 }); 34333 }, 34334 meridiemParse: /à½à½à½à¼à½à½¼|à½à½¼à½à½¦à¼à½à½¦|à½à½²à½à¼à½à½´à½|à½à½à½¼à½à¼à½à½|à½à½à½à¼à½à½¼/, 34335 isPM: function (input) { 34336 return /^(à½à½²à½à¼à½à½´à½|à½à½à½¼à½à¼à½à½|à½à½à½à¼à½à½¼)$/.test(input); 34337 }, 34338 meridiem : function (hour, minute, isLower) { 34339 if (hour < 4) { 34340 return 'à½à½à½à¼à½à½¼'; 34341 } else if (hour < 10) { 34342 return 'à½à½¼à½à½¦à¼à½à½¦'; 34343 } else if (hour < 17) { 34344 return 'à½à½²à½à¼à½à½´à½'; 34345 } else if (hour < 20) { 34346 return 'à½à½à½¼à½à¼à½à½'; 34347 } else { 34348 return 'à½à½à½à¼à½à½¼'; 34349 } 34350 }, 34351 week : { 34352 dow : 0, // Sunday is the first day of the week. 34353 doy : 6 // The week that contains Jan 1st is the first week of the year. 34354 } 34355 }); 34356 34357 //! moment.js locale configuration 34358 //! locale : breton (br) 34359 //! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou 34360 34361 function relativeTimeWithMutation(number, withoutSuffix, key) { 34362 var format = { 34363 'mm': 'munutenn', 34364 'MM': 'miz', 34365 'dd': 'devezh' 34366 }; 34367 return number + ' ' + mutation(format[key], number); 34368 } 34369 function specialMutationForYears(number) { 34370 switch (lastNumber(number)) { 34371 case 1: 34372 case 3: 34373 case 4: 34374 case 5: 34375 case 9: 34376 return number + ' bloaz'; 34377 default: 34378 return number + ' vloaz'; 34379 } 34380 } 34381 function lastNumber(number) { 34382 if (number > 9) { 34383 return lastNumber(number % 10); 34384 } 34385 return number; 34386 } 34387 function mutation(text, number) { 34388 if (number === 2) { 34389 return softMutation(text); 34390 } 34391 return text; 34392 } 34393 function softMutation(text) { 34394 var mutationTable = { 34395 'm': 'v', 34396 'b': 'v', 34397 'd': 'z' 34398 }; 34399 if (mutationTable[text.charAt(0)] === undefined) { 34400 return text; 34401 } 34402 return mutationTable[text.charAt(0)] + text.substring(1); 34403 } 34404 34405 var br = _moment__default.defineLocale('br', { 34406 months : 'Genver_C\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'), 34407 monthsShort : 'Gen_C\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'), 34408 weekdays : 'Sul_Lun_Meurzh_Merc\'her_Yaou_Gwener_Sadorn'.split('_'), 34409 weekdaysShort : 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'), 34410 weekdaysMin : 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'), 34411 longDateFormat : { 34412 LT : 'h[e]mm A', 34413 LTS : 'h[e]mm:ss A', 34414 L : 'DD/MM/YYYY', 34415 LL : 'D [a viz] MMMM YYYY', 34416 LLL : 'D [a viz] MMMM YYYY h[e]mm A', 34417 LLLL : 'dddd, D [a viz] MMMM YYYY h[e]mm A' 34418 }, 34419 calendar : { 34420 sameDay : '[Hiziv da] LT', 34421 nextDay : '[Warc\'hoazh da] LT', 34422 nextWeek : 'dddd [da] LT', 34423 lastDay : '[Dec\'h da] LT', 34424 lastWeek : 'dddd [paset da] LT', 34425 sameElse : 'L' 34426 }, 34427 relativeTime : { 34428 future : 'a-benn %s', 34429 past : '%s \'zo', 34430 s : 'un nebeud segondennoù', 34431 m : 'ur vunutenn', 34432 mm : relativeTimeWithMutation, 34433 h : 'un eur', 34434 hh : '%d eur', 34435 d : 'un devezh', 34436 dd : relativeTimeWithMutation, 34437 M : 'ur miz', 34438 MM : relativeTimeWithMutation, 34439 y : 'ur bloaz', 34440 yy : specialMutationForYears 34441 }, 34442 ordinalParse: /\d{1,2}(añ|vet)/, 34443 ordinal : function (number) { 34444 var output = (number === 1) ? 'añ' : 'vet'; 34445 return number + output; 34446 }, 34447 week : { 34448 dow : 1, // Monday is the first day of the week. 34449 doy : 4 // The week that contains Jan 4th is the first week of the year. 34450 } 34451 }); 34452 34453 //! moment.js locale configuration 34454 //! locale : bosnian (bs) 34455 //! author : Nedim Cholich : https://github.com/frontyard 34456 //! based on (hr) translation by Bojan MarkoviÄ 34457 34458 function bs__translate(number, withoutSuffix, key) { 34459 var result = number + ' '; 34460 switch (key) { 34461 case 'm': 34462 return withoutSuffix ? 'jedna minuta' : 'jedne minute'; 34463 case 'mm': 34464 if (number === 1) { 34465 result += 'minuta'; 34466 } else if (number === 2 || number === 3 || number === 4) { 34467 result += 'minute'; 34468 } else { 34469 result += 'minuta'; 34470 } 34471 return result; 34472 case 'h': 34473 return withoutSuffix ? 'jedan sat' : 'jednog sata'; 34474 case 'hh': 34475 if (number === 1) { 34476 result += 'sat'; 34477 } else if (number === 2 || number === 3 || number === 4) { 34478 result += 'sata'; 34479 } else { 34480 result += 'sati'; 34481 } 34482 return result; 34483 case 'dd': 34484 if (number === 1) { 34485 result += 'dan'; 34486 } else { 34487 result += 'dana'; 34488 } 34489 return result; 34490 case 'MM': 34491 if (number === 1) { 34492 result += 'mjesec'; 34493 } else if (number === 2 || number === 3 || number === 4) { 34494 result += 'mjeseca'; 34495 } else { 34496 result += 'mjeseci'; 34497 } 34498 return result; 34499 case 'yy': 34500 if (number === 1) { 34501 result += 'godina'; 34502 } else if (number === 2 || number === 3 || number === 4) { 34503 result += 'godine'; 34504 } else { 34505 result += 'godina'; 34506 } 34507 return result; 34508 } 34509 } 34510 34511 var bs = _moment__default.defineLocale('bs', { 34512 months : 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'), 34513 monthsShort : 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'), 34514 weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_Äetvrtak_petak_subota'.split('_'), 34515 weekdaysShort : 'ned._pon._uto._sri._Äet._pet._sub.'.split('_'), 34516 weekdaysMin : 'ne_po_ut_sr_Äe_pe_su'.split('_'), 34517 longDateFormat : { 34518 LT : 'H:mm', 34519 LTS : 'H:mm:ss', 34520 L : 'DD. MM. YYYY', 34521 LL : 'D. MMMM YYYY', 34522 LLL : 'D. MMMM YYYY H:mm', 34523 LLLL : 'dddd, D. MMMM YYYY H:mm' 34524 }, 34525 calendar : { 34526 sameDay : '[danas u] LT', 34527 nextDay : '[sutra u] LT', 34528 nextWeek : function () { 34529 switch (this.day()) { 34530 case 0: 34531 return '[u] [nedjelju] [u] LT'; 34532 case 3: 34533 return '[u] [srijedu] [u] LT'; 34534 case 6: 34535 return '[u] [subotu] [u] LT'; 34536 case 1: 34537 case 2: 34538 case 4: 34539 case 5: 34540 return '[u] dddd [u] LT'; 34541 } 34542 }, 34543 lastDay : '[juÄer u] LT', 34544 lastWeek : function () { 34545 switch (this.day()) { 34546 case 0: 34547 case 3: 34548 return '[proÅ¡lu] dddd [u] LT'; 34549 case 6: 34550 return '[proÅ¡le] [subote] [u] LT'; 34551 case 1: 34552 case 2: 34553 case 4: 34554 case 5: 34555 return '[proÅ¡li] dddd [u] LT'; 34556 } 34557 }, 34558 sameElse : 'L' 34559 }, 34560 relativeTime : { 34561 future : 'za %s', 34562 past : 'prije %s', 34563 s : 'par sekundi', 34564 m : bs__translate, 34565 mm : bs__translate, 34566 h : bs__translate, 34567 hh : bs__translate, 34568 d : 'dan', 34569 dd : bs__translate, 34570 M : 'mjesec', 34571 MM : bs__translate, 34572 y : 'godinu', 34573 yy : bs__translate 34574 }, 34575 ordinalParse: /\d{1,2}\./, 34576 ordinal : '%d.', 34577 week : { 34578 dow : 1, // Monday is the first day of the week. 34579 doy : 7 // The week that contains Jan 1st is the first week of the year. 34580 } 34581 }); 34582 34583 //! moment.js locale configuration 34584 //! locale : catalan (ca) 34585 //! author : Juan G. Hurtado : https://github.com/juanghurtado 34586 34587 var ca = _moment__default.defineLocale('ca', { 34588 months : 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'), 34589 monthsShort : 'gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.'.split('_'), 34590 weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'), 34591 weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'), 34592 weekdaysMin : 'Dg_Dl_Dt_Dc_Dj_Dv_Ds'.split('_'), 34593 longDateFormat : { 34594 LT : 'H:mm', 34595 LTS : 'LT:ss', 34596 L : 'DD/MM/YYYY', 34597 LL : 'D MMMM YYYY', 34598 LLL : 'D MMMM YYYY H:mm', 34599 LLLL : 'dddd D MMMM YYYY H:mm' 34600 }, 34601 calendar : { 34602 sameDay : function () { 34603 return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; 34604 }, 34605 nextDay : function () { 34606 return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; 34607 }, 34608 nextWeek : function () { 34609 return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; 34610 }, 34611 lastDay : function () { 34612 return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; 34613 }, 34614 lastWeek : function () { 34615 return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; 34616 }, 34617 sameElse : 'L' 34618 }, 34619 relativeTime : { 34620 future : 'en %s', 34621 past : 'fa %s', 34622 s : 'uns segons', 34623 m : 'un minut', 34624 mm : '%d minuts', 34625 h : 'una hora', 34626 hh : '%d hores', 34627 d : 'un dia', 34628 dd : '%d dies', 34629 M : 'un mes', 34630 MM : '%d mesos', 34631 y : 'un any', 34632 yy : '%d anys' 34633 }, 34634 ordinalParse: /\d{1,2}(r|n|t|è|a)/, 34635 ordinal : function (number, period) { 34636 var output = (number === 1) ? 'r' : 34637 (number === 2) ? 'n' : 34638 (number === 3) ? 'r' : 34639 (number === 4) ? 't' : 'è'; 34640 if (period === 'w' || period === 'W') { 34641 output = 'a'; 34642 } 34643 return number + output; 34644 }, 34645 week : { 34646 dow : 1, // Monday is the first day of the week. 34647 doy : 4 // The week that contains Jan 4th is the first week of the year. 34648 } 34649 }); 34650 34651 //! moment.js locale configuration 34652 //! locale : czech (cs) 34653 //! author : petrbela : https://github.com/petrbela 34654 34655 var cs__months = 'leden_únor_bÅezen_duben_kvÄten_Äerven_Äervenec_srpen_záÅÃ_ÅÃjen_listopad_prosinec'.
34655split('_'), 34656 cs__monthsShort = 'led_úno_bÅe_dub_kvÄ_Ävn_Ävc_srp_záÅ_ÅÃj_lis_pro'.split('_'); 34657 function cs__plural(n) { 34658 return (n > 1) && (n < 5) && (~~(n / 10) !== 1); 34659 } 34660 function cs__translate(number, withoutSuffix, key, isFuture) { 34661 var result = number + ' '; 34662 switch (key) { 34663 case 's': // a few seconds / in a few seconds / a few seconds ago 34664 return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami'; 34665 case 'm': // a minute / in a minute / a minute ago 34666 return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou'); 34667 case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago 34668 if (withoutSuffix || isFuture) { 34669 return result + (cs__plural(number) ? 'minuty' : 'minut'); 34670 } else { 34671 return result + 'minutami'; 34672 } 34673 break; 34674 case 'h': // an hour / in an hour / an hour ago 34675 return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou'); 34676 case 'hh': // 9 hours / in 9 hours / 9 hours ago 34677 if (withoutSuffix || isFuture) { 34678 return result + (cs__plural(number) ? 'hodiny' : 'hodin'); 34679 } else { 34680 return result + 'hodinami'; 34681 } 34682 break; 34683 case 'd': // a day / in a day / a day ago 34684 return (withoutSuffix || isFuture) ? 'den' : 'dnem'; 34685 case 'dd': // 9 days / in 9 days / 9 days ago 34686 if (withoutSuffix || isFuture) { 34687 return result + (cs__plural(number) ? 'dny' : 'dnÃ'); 34688 } else { 34689 return result + 'dny'; 34690 } 34691 break; 34692 case 'M': // a month / in a month / a month ago 34693 return (withoutSuffix || isFuture) ? 'mÄsÃc' : 'mÄsÃcem'; 34694 case 'MM': // 9 months / in 9 months / 9 months ago 34695 if (withoutSuffix || isFuture) { 34696 return result + (cs__plural(number) ? 'mÄsÃce' : 'mÄsÃců'); 34697 } else { 34698 return result + 'mÄsÃci'; 34699 } 34700 break; 34701 case 'y': // a year / in a year / a year ago 34702 return (withoutSuffix || isFuture) ? 'rok' : 'rokem'; 34703 case 'yy': // 9 years / in 9 years / 9 years ago 34704 if (withoutSuffix || isFuture) { 34705 return result + (cs__plural(number) ? 'roky' : 'let'); 34706 } else { 34707 return result + 'lety'; 34708 } 34709 break; 34710 } 34711 } 34712 34713 var cs = _moment__default.defineLocale('cs', { 34714 months : cs__months, 34715 monthsShort : cs__monthsShort, 34716 monthsParse : (function (months, monthsShort) { 34717 var i, _monthsParse = []; 34718 for (i = 0; i < 12; i++) { 34719 // use custom parser to solve problem with July (Äervenec) 34720 _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i'); 34721 } 34722 return _monthsParse; 34723 }(cs__months, cs__monthsShort)), 34724 weekdays : 'nedÄle_pondÄlÃ_úterý_stÅeda_Ätvrtek_pátek_sobota'.split('_'), 34725 weekdaysShort : 'ne_po_út_st_Ät_pá_so'.split('_'), 34726 weekdaysMin : 'ne_po_út_st_Ät_pá_so'.split('_'), 34727 longDateFormat : { 34728 LT: 'H:mm', 34729 LTS : 'H:mm:ss', 34730 L : 'DD.MM.YYYY', 34731 LL : 'D. MMMM YYYY', 34732 LLL : 'D. MMMM YYYY H:mm', 34733 LLLL : 'dddd D. MMMM YYYY H:mm' 34734 }, 34735 calendar : { 34736 sameDay: '[dnes v] LT', 34737 nextDay: '[zÃtra v] LT', 34738 nextWeek: function () { 34739 switch (this.day()) { 34740 case 0: 34741 return '[v nedÄli v] LT'; 34742 case 1: 34743 case 2: 34744 return '[v] dddd [v] LT'; 34745 case 3: 34746 return '[ve stÅedu v] LT'; 34747 case 4: 34748 return '[ve Ätvrtek v] LT'; 34749 case 5: 34750 return '[v pátek v] LT'; 34751 case 6: 34752 return '[v sobotu v] LT'; 34753 } 34754 }, 34755 lastDay: '[vÄera v] LT', 34756 lastWeek: function () { 34757 switch (this.day()) { 34758 case 0: 34759 return '[minulou nedÄli v] LT'; 34760 case 1: 34761 case 2: 34762 return '[minulé] dddd [v] LT'; 34763 case 3: 34764 return '[minulou stÅedu v] LT'; 34765 case 4: 34766 case 5: 34767 return '[minulý] dddd [v] LT'; 34768 case 6: 34769 return '[minulou sobotu v] LT'; 34770 } 34771 }, 34772 sameElse: 'L' 34773 }, 34774 relativeTime : { 34775 future : 'za %s', 34776 past : 'pÅed %s', 34777 s : cs__translate, 34778 m : cs__translate, 34779 mm : cs__translate, 34780 h : cs__translate, 34781 hh : cs__translate, 34782 d : cs__translate, 34783 dd : cs__translate, 34784 M : cs__translate, 34785 MM : cs__translate, 34786 y : cs__translate, 34787 yy : cs__translate 34788 }, 34789 ordinalParse : /\d{1,2}\./, 34790 ordinal : '%d.', 34791 week : { 34792 dow : 1, // Monday is the first day of the week. 34793 doy : 4 // The week that contains Jan 4th is the first week of the year. 34794 } 34795 }); 34796 34797 //! moment.js locale configuration 34798 //! locale : chuvash (cv) 34799 //! author : Anatoly Mironov : https://github.com/mirontoli 34800 34801 var cv = _moment__default.defineLocale('cv', { 34802 months : 'кÓÑлаÑ_наÑÓÑ_пÑÑ_ака_май_Ò«ÓÑÑме_ÑÑÓ_Ò«ÑÑла_авÓн_Ñпа_Ñӳк_ÑаÑÑав'.split('_'), 34803 monthsShort : 'кÓÑ_наÑ_пÑÑ_ака_май_Ò«ÓÑ_ÑÑÓ_Ò«ÑÑ_авн_Ñпа_Ñӳк_ÑаÑ'.split('_'), 34804 weekdays : 'вÑÑÑаÑникÑн_ÑÑнÑикÑн_ÑÑлаÑикÑн_ÑнкÑн_кÓҫнеÑникÑн_ÑÑнекÑн_ÑÓмаÑкÑн'.split('_'), 34805 weekdaysShort : 'вÑÑ_ÑÑн_ÑÑл_Ñн_кÓÒ«_ÑÑн_ÑÓм'.split('_'), 34806 weekdaysMin : 'вÑ_Ñн_ÑÑ_Ñн_кҫ_ÑÑ_Ñм'.split('_'), 34807 longDateFormat : { 34808 LT : 'HH:mm', 34809 LTS : 'HH:mm:ss', 34810 L : 'DD-MM-YYYY', 34811 LL : 'YYYY [Ò«ÑÐ»Ñ Ð¸] MMMM [ÑйÓÑ Óн] D[-мÓÑÓ]', 34812 LLL : 'YYYY [Ò«ÑÐ»Ñ Ð¸] MMMM [ÑйÓÑ Óн] D[-мÓÑÓ], HH:mm', 34813 LLLL : 'dddd, YYYY [Ò«ÑÐ»Ñ Ð¸] MMMM [ÑйÓÑ Óн] D[-мÓÑÓ], HH:mm' 34814 }, 34815 calendar : { 34816 sameDay: '[ÐаÑн] LT [ÑÐµÑ ÐµÑÑе]', 34817 nextDay: '[ЫÑан] LT [ÑÐµÑ ÐµÑÑе]', 34818 lastDay: '[ÓнеÑ] LT [ÑÐµÑ ÐµÑÑе]', 34819 nextWeek: '[ҪиÑеÑ] dddd LT [ÑÐµÑ ÐµÑÑе]', 34820 lastWeek: '[ÐÑÑнÓ] dddd LT [ÑÐµÑ ÐµÑÑе]', 34821 sameElse: 'L' 34822 }, 34823 relativeTime : { 34824 future : function (output) {
34825 var affix = /ÑÐµÑ ÐµÑ$/i.exec(output) ? 'Ñен' : /Ò«Ñл$/i.exec(output) ? 'Ñан' : 'Ñан'; 34826 return output + affix; 34827 }, 34828 past : '%s каÑлла', 34829 s : 'пÓÑ-ик ҫеккÑнÑ', 34830 m : 'пÓÑ Ð¼Ð¸Ð½ÑÑ', 34831 mm : '%d минÑÑ', 34832 h : 'пÓÑ ÑÐµÑ ÐµÑ', 34833 hh : '%d ÑÐµÑ ÐµÑ', 34834 d : 'пÓÑ ÐºÑн', 34835 dd : '%d кÑн', 34836 M : 'пÓÑ ÑйÓÑ ', 34837 MM : '%d ÑйÓÑ ', 34838 y : 'пÓÑ Ò«Ñл', 34839 yy : '%d Ò«Ñл' 34840 }, 34841 ordinalParse: /\d{1,2}-мÓÑ/, 34842 ordinal : '%d-мÓÑ', 34843 week : { 34844 dow : 1, // Monday is the first day of the week. 34845 doy : 7 // The week that contains Jan 1st is the first week of the year. 34846 } 34847 }); 34848 34849 //! moment.js locale configuration 34850 //! locale : Welsh (cy) 34851 //! author : Robert Allen 34852 34853 var cy = _moment__default.defineLocale('cy', { 34854 months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'), 34855 monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'), 34856 weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'), 34857 weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'), 34858 weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'), 34859 // time formats are the same as en-gb 34860 longDateFormat: { 34861 LT: 'HH:mm', 34862 LTS : 'HH:mm:ss', 34863 L: 'DD/MM/YYYY', 34864 LL: 'D MMMM YYYY', 34865 LLL: 'D MMMM YYYY HH:mm', 34866 LLLL: 'dddd, D MMMM YYYY HH:mm' 34867 }, 34868 calendar: { 34869 sameDay: '[Heddiw am] LT', 34870 nextDay: '[Yfory am] LT', 34871 nextWeek: 'dddd [am] LT', 34872 lastDay: '[Ddoe am] LT', 34873 lastWeek: 'dddd [diwethaf am] LT', 34874 sameElse: 'L' 34875 }, 34876 relativeTime: { 34877 future: 'mewn %s', 34878 past: '%s yn ôl', 34879 s: 'ychydig eiliadau', 34880 m: 'munud', 34881 mm: '%d munud', 34882 h: 'awr', 34883 hh: '%d awr', 34884 d: 'diwrnod', 34885 dd: '%d diwrnod', 34886 M: 'mis', 34887 MM: '%d mis', 34888 y: 'blwyddyn', 34889 yy: '%d flynedd' 34890 }, 34891 ordinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/, 34892 // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh 34893 ordinal: function (number) { 34894 var b = number, 34895 output = '', 34896 lookup = [
vendor: 76,672 bytes, lines 34897-36927
34897 '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed 34898 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed 34899 ]; 34900 if (b > 20) { 34901 if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) { 34902 output = 'fed'; // not 30ain, 70ain or 90ain 34903 } else { 34904 output = 'ain'; 34905 } 34906 } else if (b > 0) { 34907 output = lookup[b]; 34908 } 34909 return number + output; 34910 }, 34911 week : { 34912 dow : 1, // Monday is the first day of the week. 34913 doy : 4 // The week that contains Jan 4th is the first week of the year. 34914 } 34915 }); 34916 34917 //! moment.js locale configuration 34918 //! locale : danish (da) 34919 //! author : Ulrik Nielsen : https://github.com/mrbase 34920 34921 var da = _moment__default.defineLocale('da', { 34922 months : 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'), 34923 monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), 34924 weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), 34925 weekdaysShort : 'søn_man_tir_ons_tor_fre_lør'.split('_'), 34926 weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'), 34927 longDateFormat : { 34928 LT : 'HH:mm', 34929 LTS : 'HH:mm:ss', 34930 L : 'DD/MM/YYYY', 34931 LL : 'D. MMMM YYYY', 34932 LLL : 'D. MMMM YYYY HH:mm', 34933 LLLL : 'dddd [d.] D. MMMM YYYY HH:mm' 34934 }, 34935 calendar : { 34936 sameDay : '[I dag kl.] LT', 34937 nextDay : '[I morgen kl.] LT', 34938 nextWeek : 'dddd [kl.] LT', 34939 lastDay : '[I gÃ¥r kl.] LT', 34940 lastWeek : '[sidste] dddd [kl] LT', 34941 sameElse : 'L' 34942 }, 34943 relativeTime : { 34944 future : 'om %s', 34945 past : '%s siden', 34946 s : 'fÃ¥ sekunder', 34947 m : 'et minut', 34948 mm : '%d minutter', 34949 h : 'en time', 34950 hh : '%d timer', 34951 d : 'en dag', 34952 dd : '%d dage', 34953 M : 'en mÃ¥ned', 34954 MM : '%d mÃ¥neder', 34955 y : 'et Ã¥r', 34956 yy : '%d Ã¥r' 34957 }, 34958 ordinalParse: /\d{1,2}\./, 34959 ordinal : '%d.', 34960 week : { 34961 dow : 1, // Monday is the first day of the week. 34962 doy : 4 // The week that contains Jan 4th is the first week of the year. 34963 } 34964 }); 34965 34966 //! moment.js locale configuration 34967 //! locale : austrian german (de-at) 34968 //! author : lluchs : https://github.com/lluchs 34969 //! author: Menelion Elensúle: https://github.com/Oire 34970 //! author : Martin Groller : https://github.com/MadMG 34971 34972 function de_at__processRelativeTime(number, withoutSuffix, key, isFuture) { 34973 var format = { 34974 'm': ['eine Minute', 'einer Minute'], 34975 'h': ['eine Stunde', 'einer Stunde'], 34976 'd': ['ein Tag', 'einem Tag'], 34977 'dd': [number + ' Tage', number + ' Tagen'], 34978 'M': ['ein Monat', 'einem Monat'], 34979 'MM': [number + ' Monate', number + ' Monaten'], 34980 'y': ['ein Jahr', 'einem Jahr'], 34981 'yy': [number + ' Jahre', number + ' Jahren'] 34982 }; 34983 return withoutSuffix ? format[key][0] : format[key][1]; 34984 } 34985 34986 var de_at = _moment__default.defineLocale('de-at', { 34987 months : 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), 34988 monthsShort : 'Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'), 34989 weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), 34990 weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), 34991 weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), 34992 longDateFormat : { 34993 LT: 'HH:mm', 34994 LTS: 'HH:mm:ss', 34995 L : 'DD.MM.YYYY', 34996 LL : 'D. MMMM YYYY', 34997 LLL : 'D. MMMM YYYY HH:mm', 34998 LLLL : 'dddd, D. MMMM YYYY HH:mm' 34999 }, 35000 calendar : { 35001 sameDay: '[Heute um] LT [Uhr]', 35002 sameElse: 'L', 35003 nextDay: '[Morgen um] LT [Uhr]', 35004 nextWeek: 'dddd [um] LT [Uhr]', 35005 lastDay: '[Gestern um] LT [Uhr]', 35006 lastWeek: '[letzten] dddd [um] LT [Uhr]' 35007 }, 35008 relativeTime : { 35009 future : 'in %s', 35010 past : 'vor %s', 35011 s : 'ein paar Sekunden', 35012 m : de_at__processRelativeTime, 35013 mm : '%d Minuten', 35014 h : de_at__processRelativeTime, 35015 hh : '%d Stunden', 35016 d : de_at__processRelativeTime, 35017 dd : de_at__processRelativeTime, 35018 M : de_at__processRelativeTime, 35019 MM : de_at__processRelativeTime, 35020 y : de_at__processRelativeTime, 35021 yy : de_at__processRelativeTime 35022 }, 35023 ordinalParse: /\d{1,2}\./, 35024 ordinal : '%d.', 35025 week : { 35026 dow : 1, // Monday is the first day of the week. 35027 doy : 4 // The week that contains Jan 4th is the first week of the year. 35028 } 35029 }); 35030 35031 //! moment.js locale configuration 35032 //! locale : german (de) 35033 //! author : lluchs : https://github.com/lluchs 35034 //! author: Menelion Elensúle: https://github.com/Oire 35035 35036 function de__processRelativeTime(number, withoutSuffix, key, isFuture) { 35037 var format = { 35038 'm': ['eine Minute', 'einer Minute'], 35039 'h': ['eine Stunde', 'einer Stunde'], 35040 'd': ['ein Tag', 'einem Tag'], 35041 'dd': [number + ' Tage', number + ' Tagen'], 35042 'M': ['ein Monat', 'einem Monat'], 35043 'MM': [number + ' Monate', number + ' Monaten'], 35044 'y': ['ein Jahr', 'einem Jahr'], 35045 'yy': [number + ' Jahre', number + ' Jahren'] 35046 }; 35047 return withoutSuffix ? format[key][0] : format[key][1]; 35048 } 35049 35050 var de = _moment__default.defineLocale('de', { 35051 months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), 35052 monthsShort : 'Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'), 35053 weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), 35054 weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), 35055 weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), 35056 longDateFormat : { 35057 LT: 'HH:mm', 35058 LTS: 'HH:mm:ss', 35059 L : 'DD.MM.YYYY', 35060 LL : 'D. MMMM YYYY', 35061 LLL : 'D. MMMM YYYY HH:mm', 35062 LLLL : 'dddd, D. MMMM YYYY HH:mm' 35063 }, 35064 calendar : { 35065 sameDay: '[Heute um] LT [Uhr]', 35066 sameElse: 'L', 35067 nextDay: '[Morgen um] LT [Uhr]', 35068 nextWeek: 'dddd [um] LT [Uhr]', 35069 lastDay: '[Gestern um] LT [Uhr]', 35070 lastWeek: '[letzten] dddd [um] LT [Uhr]' 35071 }, 35072 relativeTime : { 35073 future : 'in %s', 35074 past : 'vor %s', 35075 s : 'ein paar Sekunden', 35076 m : de__processRelativeTime, 35077 mm : '%d Minuten', 35078 h : de__processRelativeTime, 35079 hh : '%d Stunden', 35080 d : de__processRelativeTime, 35081 dd : de__processRelativeTime, 35082 M : de__processRelativeTime, 35083 MM : de__processRelativeTime, 35084 y : de__processRelativeTime, 35085 yy : de__processRelativeTime 35086 }, 35087 ordinalParse: /\d{1,2}\./, 35088 ordinal : '%d.', 35089 week : { 35090 dow : 1, // Monday is the first day of the week. 35091 doy : 4 // The week that contains Jan 4th is the first week of the year. 35092 } 35093 }); 35094 35095 //! moment.js locale configuration 35096 //! locale : modern greek (el) 35097 //! author : Aggelos Karalias : https://github.com/mehiel 35098 35099 var el = _moment__default.defineLocale('el', { 35100 monthsNominativeEl : 'ÎÎ±Î½Î¿Ï Î¬ÏιοÏ_ΦεβÏÎ¿Ï Î¬ÏιοÏ_ÎάÏÏιοÏ_ÎÏÏίλιοÏ_ÎάιοÏ_ÎοÏνιοÏ_ÎοÏλιοÏ_ÎÏÎ³Î¿Ï ÏÏοÏ_ΣεÏÏÎμβÏιοÏ_ÎκÏÏβÏιοÏ_ÎοÎμβÏιοÏ_ÎεκÎμβÏιοÏ'.split('_'), 35101 monthsGenitiveEl : 'ÎÎ±Î½Î¿Ï Î±ÏÎ¯Î¿Ï _ΦεβÏÎ¿Ï Î±ÏÎ¯Î¿Ï _ÎαÏÏÎ¯Î¿Ï _ÎÏÏÎ¹Î»Î¯Î¿Ï _ÎαÎÎ¿Ï _ÎÎ¿Ï Î½Î¯Î¿Ï _ÎÎ¿Ï Î»Î¯Î¿Ï _ÎÏ Î³Î¿ÏÏÏÎ¿Ï _ΣεÏÏεμβÏÎ¯Î¿Ï _ÎκÏÏβÏÎ¯Î¿Ï _ÎοεμβÏÎ¯Î¿Ï _ÎεκεμβÏÎ¯Î¿Ï '.split('_'), 35102 months : function (momentToFormat, format) { 35103 if (/D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM' 35104 return this._monthsGenitiveEl[momentToFormat.month()]; 35105 } else { 35106 return this._monthsNominativeEl[momentToFormat.month()]; 35107 } 35108 }, 35109 monthsShort : 'Îαν_Φεβ_ÎαÏ_ÎÏÏ_ÎαÏ_ÎÎ¿Ï Î½_ÎÎ¿Ï Î»_ÎÏ Î³_ΣεÏ_ÎκÏ_Îοε_Îεκ'.split('_'), 35110 weekdays : 'ÎÏ Ïιακή_ÎÎµÏ ÏÎÏα_ΤÏίÏη_ΤεÏάÏÏη_Î ÎμÏÏη_ΠαÏαÏÎºÎµÏ Î®_ΣάββαÏο'.split('_'), 35111 weekdaysShort : 'ÎÏ Ï_ÎÎµÏ _ΤÏι_ΤεÏ_Πεμ_ΠαÏ_Σαβ'.split('_'), 35112 weekdaysMin : 'ÎÏ _Îε_ΤÏ_Τε_Πε_Πα_Σα'.split('_'), 35113 meridiem : function (hours, minutes, isLower) { 35114 if (hours > 11) { 35115 return isLower ? 'μμ' : 'ÎÎ'; 35116 } else { 35117 return isLower ? 'Ïμ' : 'Î Î'; 35118 } 35119 }, 35120 isPM : function (input) { 35121 return ((input + '').toLowerCase()[0] === 'μ'); 35122 }, 35123 meridiemParse : /[Î Î]\.?Î?\.?/i, 35124 longDateFormat : { 35125 LT : 'h:mm A', 35126 LTS : 'h:mm:ss A', 35127 L : 'DD/MM/YYYY', 35128 LL : 'D MMMM YYYY', 35129 LLL : 'D MMMM YYYY h:mm A', 35130 LLLL : 'dddd, D MMMM YYYY h:mm A' 35131 }, 35132 calendarEl : { 35133 sameDay : '[ΣήμεÏα {}] LT', 35134 nextDay : '[ÎÏÏιο {}] LT', 35135 nextWeek : 'dddd [{}] LT', 35136 lastDay : '[Î§Î¸ÎµÏ {}] LT', 35137 lastWeek : function () { 35138 switch (this.day()) { 35139 case 6: 35140 return '[Ïο ÏÏοηγοÏμενο] dddd [{}] LT'; 35141 default: 35142 return '[Ïην ÏÏοηγοÏμενη] dddd [{}] LT'; 35143 } 35144 }, 35145 sameElse : 'L' 35146 }, 35147 calendar : function (key, mom) { 35148 var output = this._calendarEl[key], 35149 hours = mom && mom.hours(); 35150 if (typeof output === 'function') { 35151 output = output.apply(mom); 35152 } 35153 return output.replace('{}', (hours % 12 === 1 ? 'ÏÏη' : 'ÏÏιÏ')); 35154 }, 35155 relativeTime : { 35156 future : 'Ïε %s', 35157 past : '%s ÏÏιν', 35158 s : 'λίγα Î´ÎµÏ ÏεÏÏλεÏÏα', 35159 m : 'Îνα λεÏÏÏ', 35160 mm : '%d λεÏÏά', 35161 h : 'μία ÏÏα', 35162 hh : '%d ÏÏεÏ', 35163 d : 'μία μÎÏα', 35164 dd : '%d μÎÏεÏ', 35165 M : 'ÎÎ½Î±Ï Î¼Î®Î½Î±Ï', 35166 MM : '%d μήνεÏ', 35167 y : 'ÎÎ½Î±Ï ÏÏÏνοÏ', 35168 yy : '%d ÏÏÏνια' 35169 }, 35170 ordinalParse: /\d{1,2}η/, 35171 ordinal: '%dη', 35172 week : { 35173 dow : 1, // Monday is the first day of the week. 35174 doy : 4 // The week that contains Jan 4st is the first week of the year. 35175 } 35176 }); 35177 35178 //! moment.js locale configuration 35179 //! locale : australian english (en-au) 35180 35181 var en_au = _moment__default.defineLocale('en-au', { 35182 months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), 35183 monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 35184 weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), 35185 weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 35186 weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 35187 longDateFormat : { 35188 LT : 'h:mm A', 35189 LTS : 'h:mm:ss A', 35190 L : 'DD/MM/YYYY', 35191 LL : 'D MMMM YYYY', 35192 LLL : 'D MMMM YYYY h:mm A', 35193 LLLL : 'dddd, D MMMM YYYY h:mm A' 35194 }, 35195 calendar : { 35196 sameDay : '[Today at] LT', 35197 nextDay : '[Tomorrow at] LT', 35198 nextWeek : 'dddd [at] LT', 35199 lastDay : '[Yesterday at] LT', 35200 lastWeek : '[Last] dddd [at] LT', 35201 sameElse : 'L' 35202 }, 35203 relativeTime : { 35204 future : 'in %s', 35205 past : '%s ago', 35206 s : 'a few seconds', 35207 m : 'a minute', 35208 mm : '%d minutes', 35209 h : 'an hour', 35210 hh : '%d hours', 35211 d : 'a day', 35212 dd : '%d days', 35213 M : 'a month', 35214 MM : '%d months', 35215 y : 'a year', 35216 yy : '%d years' 35217 }, 35218 ordinalParse: /\d{1,2}(st|nd|rd|th)/, 35219 ordinal : function (number) { 35220 var b = number % 10, 35221 output = (~~(number % 100 / 10) === 1) ? 'th' : 35222 (b === 1) ? 'st' : 35223 (b === 2) ? 'nd' : 35224 (b === 3) ? 'rd' : 'th'; 35225 return number + output; 35226 }, 35227 week : { 35228 dow : 1, // Monday is the first day of the week. 35229 doy : 4 // The week that contains Jan 4th is the first week of the year. 35230 } 35231 }); 35232 35233 //! moment.js locale configuration 35234 //! locale : canadian english (en-ca) 35235 //! author : Jonathan Abourbih : https://github.com/jonbca 35236 35237 var en_ca = _moment__default.defineLocale('en-ca', { 35238 months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), 35239 monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 35240 weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), 35241 weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 35242 weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 35243 longDateFormat : { 35244 LT : 'h:mm A', 35245 LTS : 'h:mm:ss A', 35246 L : 'YYYY-MM-DD', 35247 LL : 'D MMMM, YYYY', 35248 LLL : 'D MMMM, YYYY h:mm A', 35249 LLLL : 'dddd, D MMMM, YYYY h:mm A' 35250 }, 35251 calendar : { 35252 sameDay : '[Today at] LT', 35253 nextDay : '[Tomorrow at] LT', 35254 nextWeek : 'dddd [at] LT', 35255 lastDay : '[Yesterday at] LT', 35256 lastWeek : '[Last] dddd [at] LT', 35257 sameElse : 'L' 35258 }, 35259 relativeTime : { 35260 future : 'in %s', 35261 past : '%s ago', 35262 s : 'a few seconds', 35263 m : 'a minute', 35264 mm : '%d minutes', 35265 h : 'an hour', 35266 hh : '%d hours', 35267 d : 'a day', 35268 dd : '%d days', 35269 M : 'a month', 35270 MM : '%d months', 35271 y : 'a year', 35272 yy : '%d years' 35273 }, 35274 ordinalParse: /\d{1,2}(st|nd|rd|th)/, 35275 ordinal : function (number) { 35276 var b = number % 10, 35277 output = (~~(number % 100 / 10) === 1) ? 'th' : 35278 (b === 1) ? 'st' : 35279 (b === 2) ? 'nd' : 35280 (b === 3) ? 'rd' : 'th'; 35281 return number + output; 35282 } 35283 }); 35284 35285 //! moment.js locale configuration 35286 //! locale : great britain english (en-gb) 35287 //! author : Chris Gedrim : https://github.com/chrisgedrim 35288 35289 var en_gb = _moment__default.defineLocale('en-gb', { 35290 months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), 35291 monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 35292 weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), 35293 weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 35294 weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 35295 longDateFormat : { 35296 LT : 'HH:mm', 35297 LTS : 'HH:mm:ss', 35298 L : 'DD/MM/YYYY', 35299 LL : 'D MMMM YYYY', 35300 LLL : 'D MMMM YYYY HH:mm', 35301 LLLL : 'dddd, D MMMM YYYY HH:mm' 35302 }, 35303 calendar : { 35304 sameDay : '[Today at] LT', 35305 nextDay : '[Tomorrow at] LT', 35306 nextWeek : 'dddd [at] LT', 35307 lastDay : '[Yesterday at] LT', 35308 lastWeek : '[Last] dddd [at] LT', 35309 sameElse : 'L' 35310 }, 35311 relativeTime : { 35312 future : 'in %s', 35313 past : '%s ago', 35314 s : 'a few seconds', 35315 m : 'a minute', 35316 mm : '%d minutes', 35317 h : 'an hour', 35318 hh : '%d hours', 35319 d : 'a day', 35320 dd : '%d days', 35321 M : 'a month', 35322 MM : '%d months', 35323 y : 'a year', 35324 yy : '%d years' 35325 }, 35326 ordinalParse: /\d{1,2}(st|nd|rd|th)/, 35327 ordinal : function (number) { 35328 var b = number % 10, 35329 output = (~~(number % 100 / 10) === 1) ? 'th' : 35330 (b === 1) ? 'st' : 35331 (b === 2) ? 'nd' : 35332 (b === 3) ? 'rd' : 'th'; 35333 return number + output; 35334 }, 35335 week : { 35336 dow : 1, // Monday is the first day of the week. 35337 doy : 4 // The week that contains Jan 4th is the first week of the year. 35338 } 35339 }); 35340 35341 //! moment.js locale configuration 35342 //! locale : esperanto (eo) 35343 //! author : Colin Dean : https://github.com/colindean 35344 //! komento: Mi estas malcerta se mi korekte traktis akuzativojn en tiu traduko. 35345 //! Se ne, bonvolu korekti kaj avizi min por ke mi povas lerni! 35346 35347 var eo = _moment__default.defineLocale('eo', { 35348 months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aÅgusto_septembro_oktobro_novembro_decembro'.split('_'), 35349 monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aÅg_sep_okt_nov_dec'.split('_'), 35350 weekdays : 'DimanÄo_Lundo_Mardo_Merkredo_Ä´aÅdo_Vendredo_Sabato'.split('_'), 35351 weekdaysShort : 'Dim_Lun_Mard_Merk_Ä´aÅ_Ven_Sab'.split('_'), 35352 weekdaysMin : 'Di_Lu_Ma_Me_Ä´a_Ve_Sa'.split('_'), 35353 longDateFormat : { 35354 LT : 'HH:mm', 35355 LTS : 'HH:mm:ss', 35356 L : 'YYYY-MM-DD', 35357 LL : 'D[-an de] MMMM, YYYY', 35358 LLL : 'D[-an de] MMMM, YYYY HH:mm', 35359 LLLL : 'dddd, [la] D[-an de] MMMM, YYYY HH:mm' 35360 }, 35361 meridiemParse: /[ap]\.t\.m/i, 35362 isPM: function (input) { 35363 return input.charAt(0).toLowerCase() === 'p'; 35364 }, 35365 meridiem : function (hours, minutes, isLower) { 35366 if (hours > 11) { 35367 return isLower ? 'p.t.m.' : 'P.T.M.'; 35368 } else { 35369 return isLower ? 'a.t.m.' : 'A.T.M.'; 35370 } 35371 }, 35372 calendar : { 35373 sameDay : '[HodiaÅ je] LT', 35374 nextDay : '[MorgaÅ je] LT', 35375 nextWeek : 'dddd [je] LT', 35376 lastDay : '[HieraÅ je] LT', 35377 lastWeek : '[pasinta] dddd [je] LT', 35378 sameElse : 'L' 35379 }, 35380 relativeTime : { 35381 future : 'je %s', 35382 past : 'antaÅ %s', 35383 s : 'sekundoj', 35384 m : 'minuto', 35385 mm : '%d minutoj', 35386 h : 'horo', 35387 hh : '%d horoj', 35388 d : 'tago',//ne 'diurno', Äar estas uzita por proksimumo 35389 dd : '%d tagoj', 35390 M : 'monato', 35391 MM : '%d monatoj', 35392 y : 'jaro', 35393 yy : '%d jaroj' 35394 }, 35395 ordinalParse: /\d{1,2}a/, 35396 ordinal : '%da', 35397 week : { 35398 dow : 1, // Monday is the first day of the week. 35399 doy : 7 // The week that contains Jan 1st is the first week of the year. 35400 } 35401 }); 35402 35403 //! moment.js locale configuration 35404 //! locale : spanish (es) 35405 //! author : Julio Napurà : https://github.com/julionc 35406 35407 var monthsShortDot = 'Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.'.split('_'), 35408 es__monthsShort = 'Ene_Feb_Mar_Abr_May_Jun_Jul_Ago_Sep_Oct_Nov_Dic'.split('_'); 35409 35410 var es = _moment__default.defineLocale('es', { 35411 months : 'Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre'.split('_'), 35412 monthsShort : function (m, format) { 35413 if (/-MMM-/.test(format)) { 35414 return es__monthsShort[m.month()]; 35415 } else { 35416 return monthsShortDot[m.month()]; 35417 } 35418 }, 35419 weekdays : 'Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado'.split('_'), 35420 weekdaysShort : 'Dom._Lun._Mar._Mié._Jue._Vie._Sáb.'.split('_'), 35421 weekdaysMin : 'Do_Lu_Ma_Mi_Ju_Vi_Sá'.split('_'), 35422 longDateFormat : { 35423 LT : 'H:mm', 35424 LTS : 'H:mm:ss', 35425 L : 'DD/MM/YYYY', 35426 LL : 'D [de] MMMM [de] YYYY', 35427 LLL : 'D [de] MMMM [de] YYYY H:mm', 35428 LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm' 35429 }, 35430 calendar : { 35431 sameDay : function () { 35432 return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; 35433 }, 35434 nextDay : function () { 35435 return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; 35436 }, 35437 nextWeek : function () { 35438 return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; 35439 }, 35440 lastDay : function () { 35441 return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; 35442 }, 35443 lastWeek : function () { 35444 return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; 35445 }, 35446 sameElse : 'L' 35447 }, 35448 relativeTime : { 35449 future : 'en %s', 35450 past : 'hace %s', 35451 s : 'unos segundos', 35452 m : 'un minuto', 35453 mm : '%d minutos', 35454 h : 'una hora', 35455 hh : '%d horas', 35456 d : 'un dÃa', 35457 dd : '%d dÃas', 35458 M : 'un mes', 35459 MM : '%d meses', 35460 y : 'un año', 35461 yy : '%d años' 35462 }, 35463 ordinalParse : /\d{1,2}º/, 35464 ordinal : '%dº', 35465 week : { 35466 dow : 1, // Monday is the first day of the week. 35467 doy : 4 // The week that contains Jan 4th is the first week of the year. 35468 } 35469 }); 35470 35471 //! moment.js locale configuration 35472 //! locale : estonian (et) 35473 //! author : Henry Kehlmann : https://github.com/madhenry 35474 //! improvements : Illimar Tambek : https://github.com/ragulka 35475 35476 function et__processRelativeTime(number, withoutSuffix, key, isFuture) { 35477 var format = { 35478 's' : ['mõne sekundi', 'mõni sekund', 'paar sekundit'], 35479 'm' : ['ühe minuti', 'üks minut'], 35480 'mm': [number + ' minuti', number + ' minutit'], 35481 'h' : ['ühe tunni', 'tund aega', 'üks tund'], 35482 'hh': [number + ' tunni', number + ' tundi'], 35483 'd' : ['ühe päeva', 'üks päev'], 35484 'M' : ['kuu aja', 'kuu aega', 'üks kuu'], 35485 'MM': [number + ' kuu', number + ' kuud'], 35486 'y' : ['ühe aasta', 'aasta', 'üks aasta'], 35487 'yy': [number + ' aasta', number + ' aastat'] 35488 }; 35489 if (withoutSuffix) { 35490 return format[key][2] ? format[key][2] : format[key][1]; 35491 } 35492 return isFuture ? format[key][0] : format[key][1]; 35493 } 35494 35495 var et = _moment__default.defineLocale('et', { 35496 months : 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'), 35497 monthsShort : 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'), 35498 weekdays : 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'), 35499 weekdaysShort : 'P_E_T_K_N_R_L'.split('_'), 35500 weekdaysMin : 'P_E_T_K_N_R_L'.split('_'), 35501 longDateFormat : { 35502 LT : 'H:mm', 35503 LTS : 'H:mm:ss', 35504 L : 'DD.MM.YYYY', 35505 LL : 'D. MMMM YYYY', 35506 LLL : 'D. MMMM YYYY H:mm', 35507 LLLL : 'dddd, D. MMMM YYYY H:mm' 35508 }, 35509 calendar : { 35510 sameDay : '[Täna,] LT', 35511 nextDay : '[Homme,] LT', 35512 nextWeek : '[Järgmine] dddd LT', 35513 lastDay : '[Eile,] LT', 35514 lastWeek : '[Eelmine] dddd LT', 35515 sameElse : 'L' 35516 }, 35517 relativeTime : { 35518 future : '%s pärast', 35519 past : '%s tagasi', 35520 s : et__processRelativeTime, 35521 m : et__processRelativeTime, 35522 mm : et__processRelativeTime, 35523 h : et__processRelativeTime, 35524 hh : et__processRelativeTime, 35525 d : et__processRelativeTime, 35526 dd : '%d päeva', 35527 M : et__processRelativeTime, 35528 MM : et__processRelativeTime, 35529 y : et__processRelativeTime, 35530 yy : et__processRelativeTime 35531 }, 35532 ordinalParse: /\d{1,2}\./, 35533 ordinal : '%d.', 35534 week : { 35535 dow : 1, // Monday is the first day of the week. 35536 doy : 4 // The week that contains Jan 4th is the first week of the year. 35537 } 35538 }); 35539 35540 //! moment.js locale configuration 35541 //! locale : euskara (eu) 35542 //! author : Eneko Illarramendi : https://github.com/eillarra 35543 35544 var eu = _moment__default.defineLocale('eu', { 35545 months : 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'), 35546 monthsShort : 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'), 35547 weekdays : 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'), 35548 weekdaysShort : 'ig._al._ar._az._og._ol._lr.'.split('_'), 35549 weekdaysMin : 'ig_al_ar_az_og_ol_lr'.split('_'), 35550 longDateFormat : { 35551 LT : 'HH:mm', 35552 LTS : 'HH:mm:ss', 35553 L : 'YYYY-MM-DD', 35554 LL : 'YYYY[ko] MMMM[ren] D[a]', 35555 LLL : 'YYYY[ko] MMMM[ren] D[a] HH:mm', 35556 LLLL : 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm', 35557 l : 'YYYY-M-D', 35558 ll : 'YYYY[ko] MMM D[a]', 35559 lll : 'YYYY[ko] MMM D[a] HH:mm', 35560 llll : 'ddd, YYYY[ko] MMM D[a] HH:mm' 35561 }, 35562 calendar : { 35563 sameDay : '[gaur] LT[etan]', 35564 nextDay : '[bihar] LT[etan]', 35565 nextWeek : 'dddd LT[etan]', 35566 lastDay : '[atzo] LT[etan]', 35567 lastWeek : '[aurreko] dddd LT[etan]', 35568 sameElse : 'L' 35569 }, 35570 relativeTime : { 35571 future : '%s barru', 35572 past : 'duela %s', 35573 s : 'segundo batzuk', 35574 m : 'minutu bat', 35575 mm : '%d minutu', 35576 h : 'ordu bat', 35577 hh : '%d ordu', 35578 d : 'egun bat', 35579 dd : '%d egun', 35580 M : 'hilabete bat', 35581 MM : '%d hilabete', 35582 y : 'urte bat', 35583 yy : '%d urte' 35584 }, 35585 ordinalParse: /\d{1,2}\./, 35586 ordinal : '%d.', 35587 week : { 35588 dow : 1, // Monday is the first day of the week. 35589 doy : 7 // The week that contains Jan 1st is the first week of the year. 35590 } 35591 }); 35592 35593 //! moment.js locale configuration 35594 //! locale : Persian (fa) 35595 //! author : Ebrahim Byagowi : https://github.com/ebraminio 35596 35597 var fa__symbolMap = { 35598 '1': 'Û±', 35599 '2': 'Û²', 35600 '3': 'Û³', 35601 '4': 'Û´', 35602 '5': 'Ûµ', 35603 '6': 'Û¶', 35604 '7': 'Û·', 35605 '8': 'Û¸', 35606 '9': 'Û¹', 35607 '0': 'Û°' 35608 }, fa__numberMap = { 35609 'Û±': '1', 35610 'Û²': '2', 35611 'Û³': '3', 35612 'Û´': '4', 35613 'Ûµ': '5', 35614 'Û¶': '6', 35615 'Û·': '7', 35616 'Û¸': '8', 35617 'Û¹': '9', 35618 'Û°': '0' 35619 }; 35620 35621 var fa = _moment__default.defineLocale('fa', { 35622 months : 'ÚØ§ÙÙÛÙ_ÙÙØ±ÛÙ_٠ارس_Ø¢ÙØ±ÛÙ_Ù Ù_ÚÙØ¦Ù_ÚÙØ¦ÛÙ_Ø§ÙØª_سپتا٠بر_اکتبر_ÙÙØ§Ù بر_دسا٠بر'.split('_'), 35623 monthsShort : 'ÚØ§ÙÙÛÙ_ÙÙØ±ÛÙ_٠ارس_Ø¢ÙØ±ÛÙ_Ù Ù_ÚÙØ¦Ù_ÚÙØ¦ÛÙ_Ø§ÙØª_سپتا٠بر_اکتبر_ÙÙØ§Ù بر_دسا٠بر'.split('_'), 35624 weekdays : 'ÛÚ©\u200cØ´ÙØ¨Ù_Ø¯ÙØ´ÙبÙ_سÙ\u200cØ´ÙØ¨Ù_ÚÙØ§Ø±Ø´ÙبÙ_Ù¾ÙØ¬\u200cØ´ÙØ¨Ù_ج٠عÙ_Ø´ÙØ¨Ù'.split('_'), 35625 weekdaysShort : 'ÛÚ©\u200cØ´ÙØ¨Ù_Ø¯ÙØ´ÙبÙ_سÙ\u200cØ´ÙØ¨Ù_ÚÙØ§Ø±Ø´ÙبÙ_Ù¾ÙØ¬\u200cØ´ÙØ¨Ù_ج٠عÙ_Ø´ÙØ¨Ù'.split('_'), 35626 weekdaysMin : 'Û_د_س_Ú_Ù¾_ج_Ø´'.split('_'), 35627 longDateFormat : { 35628 LT : 'HH:mm', 35629 LTS : 'HH:mm:ss', 35630 L : 'DD/MM/YYYY', 35631 LL : 'D MMMM YYYY', 35632 LLL : 'D MMMM YYYY HH:mm', 35633 LLLL : 'dddd, D MMMM YYYY HH:mm' 35634 }, 35635 meridiemParse: /ÙØ¨Ù از Ø¸ÙØ±|بعد از Ø¸ÙØ±/, 35636 isPM: function (input) { 35637 return /بعد از Ø¸ÙØ±/.test(input); 35638 }, 35639 meridiem : function (hour, minute, isLower) { 35640 if (hour < 12) { 35641 return 'ÙØ¨Ù از Ø¸ÙØ±'; 35642 } else { 35643 return 'بعد از Ø¸ÙØ±'; 35644 } 35645 }, 35646 calendar : { 35647 sameDay : '[Ø§Ù Ø±ÙØ² ساعت] LT', 35648 nextDay : '[ÙØ±Ø¯Ø§ ساعت] LT', 35649 nextWeek : 'dddd [ساعت] LT', 35650 lastDay : '[Ø¯ÛØ±Ùز ساعت] LT', 35651 lastWeek : 'dddd [Ù¾ÛØ´] [ساعت] LT', 35652 sameElse : 'L' 35653 }, 35654 relativeTime : { 35655 future : 'در %s', 35656 past : '%s Ù¾ÛØ´', 35657 s : 'ÚÙØ¯Û٠ثاÙÛÙ', 35658 m : 'ÛÚ© دÙÛÙÙ', 35659 mm : '%d دÙÛÙÙ', 35660 h : 'ÛÚ© ساعت', 35661 hh : '%d ساعت', 35662 d : 'ÛÚ© Ø±ÙØ²', 35663 dd : '%d Ø±ÙØ²', 35664 M : 'ÛÚ© ٠اÙ', 35665 MM : '%d ٠اÙ', 35666 y : 'ÛÚ© ساÙ', 35667 yy : '%d ساÙ' 35668 }, 35669 preparse: function (string) { 35670 return string.replace(/[Û°-Û¹]/g, function (match) { 35671 return fa__numberMap[match]; 35672 }).replace(/Ø/g, ','); 35673 }, 35674 postformat: function (string) { 35675 return string.replace(/\d/g, function (match) { 35676 return fa__symbolMap[match]; 35677 }).replace(/,/g, 'Ø'); 35678 }, 35679 ordinalParse: /\d{1,2}Ù /, 35680 ordinal : '%dÙ ', 35681 week : { 35682 dow : 6, // Saturday is the first day of the week. 35683 doy : 12 // The week that contains Jan 1st is the first week of the year. 35684 } 35685 }); 35686 35687 //! moment.js locale configuration 35688 //! locale : finnish (fi) 35689 //! author : Tarmo Aidantausta : https://github.com/bleadof 35690 35691 var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' '), 35692 numbersFuture = [ 35693 'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden', 35694 numbersPast[7], numbersPast[8], numbersPast[9] 35695 ]; 35696 function fi__translate(number, withoutSuffix, key, isFuture) { 35697 var result = ''; 35698 switch (key) { 35699 case 's': 35700 return isFuture ? 'muutaman sekunnin' : 'muutama sekunti'; 35701 case 'm': 35702 return isFuture ? 'minuutin' : 'minuutti'; 35703 case 'mm': 35704 result = isFuture ? 'minuutin' : 'minuuttia'; 35705 break; 35706 case 'h': 35707 return isFuture ? 'tunnin' : 'tunti'; 35708 case 'hh': 35709 result = isFuture ? 'tunnin' : 'tuntia'; 35710 break; 35711 case 'd': 35712 return isFuture ? 'päivän' : 'päivä'; 35713 case 'dd': 35714 result = isFuture ? 'päivän' : 'päivää'; 35715 break; 35716 case 'M': 35717 return isFuture ? 'kuukauden' : 'kuukausi'; 35718 case 'MM': 35719 result = isFuture ? 'kuukauden' : 'kuukautta'; 35720 break; 35721 case 'y': 35722 return isFuture ? 'vuoden' : 'vuosi'; 35723 case 'yy': 35724 result = isFuture ? 'vuoden' : 'vuotta'; 35725 break; 35726 } 35727 result = verbalNumber(number, isFuture) + ' ' + result; 35728 return result; 35729 } 35730 function verbalNumber(number, isFuture) { 35731 return number < 10 ? (isFuture ? numbersFuture[number] : numbersPast[number]) : number; 35732 } 35733 35734 var fi = _moment__default.defineLocale('fi', { 35735 months : 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'), 35736 monthsShort : 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'), 35737 weekdays : 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'), 35738 weekdaysShort : 'su_ma_ti_ke_to_pe_la'.split('_'), 35739 weekdaysMin : 'su_ma_ti_ke_to_pe_la'.split('_'), 35740 longDateFormat : { 35741 LT : 'HH.mm', 35742 LTS : 'HH.mm.ss', 35743 L : 'DD.MM.YYYY', 35744 LL : 'Do MMMM[ta] YYYY', 35745 LLL : 'Do MMMM[ta] YYYY, [klo] HH.mm', 35746 LLLL : 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm', 35747 l : 'D.M.YYYY', 35748 ll : 'Do MMM YYYY', 35749 lll : 'Do MMM YYYY, [klo] HH.mm', 35750 llll : 'ddd, Do MMM YYYY, [klo] HH.mm' 35751 }, 35752 calendar : { 35753 sameDay : '[tänään] [klo] LT', 35754 nextDay : '[huomenna] [klo] LT', 35755 nextWeek : 'dddd [klo] LT', 35756 lastDay : '[eilen] [klo] LT', 35757 lastWeek : '[viime] dddd[na] [klo] LT', 35758 sameElse : 'L' 35759 }, 35760 relativeTime : { 35761 future : '%s päästä', 35762 past : '%s sitten', 35763 s : fi__translate, 35764 m : fi__translate, 35765 mm : fi__translate, 35766 h : fi__translate, 35767 hh : fi__translate, 35768 d : fi__translate, 35769 dd : fi__translate, 35770 M : fi__translate, 35771 MM : fi__translate, 35772 y : fi__translate, 35773 yy : fi__translate 35774 }, 35775 ordinalParse: /\d{1,2}\./, 35776 ordinal : '%d.', 35777 week : { 35778 dow : 1, // Monday is the first day of the week. 35779 doy : 4 // The week that contains Jan 4th is the first week of the year. 35780 } 35781 }); 35782 35783 //! moment.js locale configuration 35784 //! locale : faroese (fo) 35785 //! author : Ragnar Johannesen : https://github.com/ragnar123 35786 35787 var fo = _moment__default.defineLocale('fo', { 35788 months : 'januar_februar_mars_aprÃl_mai_juni_juli_august_september_oktober_november_desember'.split('_'), 35789 monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), 35790 weekdays : 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_frÃggjadagur_leygardagur'.split('_'), 35791 weekdaysShort : 'sun_mán_týs_mik_hós_frÃ_ley'.split('_'), 35792 weekdaysMin : 'su_má_tý_mi_hó_fr_le'.split('_'), 35793 longDateFormat : { 35794 LT : 'HH:mm', 35795 LTS : 'HH:mm:ss', 35796 L : 'DD/MM/YYYY', 35797 LL : 'D MMMM YYYY', 35798 LLL : 'D MMMM YYYY HH:mm', 35799 LLLL : 'dddd D. MMMM, YYYY HH:mm' 35800 }, 35801 calendar : { 35802 sameDay : '[à dag kl.] LT', 35803 nextDay : '[à morgin kl.] LT', 35804 nextWeek : 'dddd [kl.] LT', 35805 lastDay : '[à gjár kl.] LT', 35806 lastWeek : '[sÃðstu] dddd [kl] LT', 35807 sameElse : 'L' 35808 }, 35809 relativeTime : { 35810 future : 'um %s', 35811 past : '%s sÃðani', 35812 s : 'fá sekund', 35813 m : 'ein minutt', 35814 mm : '%d minuttir', 35815 h : 'ein tÃmi', 35816 hh : '%d tÃmar', 35817 d : 'ein dagur', 35818 dd : '%d dagar', 35819 M : 'ein mánaði', 35820 MM : '%d mánaðir', 35821 y : 'eitt ár', 35822 yy : '%d ár' 35823 }, 35824 ordinalParse: /\d{1,2}\./, 35825 ordinal : '%d.', 35826 week : { 35827 dow : 1, // Monday is the first day of the week. 35828 doy : 4 // The week that contains Jan 4th is the first week of the year. 35829 } 35830 }); 35831 35832 //! moment.js locale configuration 35833 //! locale : canadian french (fr-ca) 35834 //! author : Jonathan Abourbih : https://github.com/jonbca 35835 35836 var fr_ca = _moment__default.defineLocale('fr-ca', { 35837 months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), 35838 monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), 35839 weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), 35840 weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), 35841 weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'), 35842 longDateFormat : { 35843 LT : 'HH:mm', 35844 LTS : 'HH:mm:ss', 35845 L : 'YYYY-MM-DD', 35846 LL : 'D MMMM YYYY', 35847 LLL : 'D MMMM YYYY HH:mm', 35848 LLLL : 'dddd D MMMM YYYY HH:mm' 35849 }, 35850 calendar : { 35851 sameDay: '[Aujourd\'hui à ] LT', 35852 nextDay: '[Demain à ] LT', 35853 nextWeek: 'dddd [à ] LT', 35854 lastDay: '[Hier à ] LT', 35855 lastWeek: 'dddd [dernier à ] LT', 35856 sameElse: 'L' 35857 }, 35858 relativeTime : { 35859 future : 'dans %s', 35860 past : 'il y a %s', 35861 s : 'quelques secondes', 35862 m : 'une minute', 35863 mm : '%d minutes', 35864 h : 'une heure', 35865 hh : '%d heures', 35866 d : 'un jour', 35867 dd : '%d jours', 35868 M : 'un mois', 35869 MM : '%d mois', 35870 y : 'un an', 35871 yy : '%d ans' 35872 }, 35873 ordinalParse: /\d{1,2}(er|e)/, 35874 ordinal : function (number) { 35875 return number + (number === 1 ? 'er' : 'e'); 35876 } 35877 }); 35878 35879 //! moment.js locale configuration 35880 //! locale : french (fr) 35881 //! author : John Fischer : https://github.com/jfroffice 35882 35883 var fr = _moment__default.defineLocale('fr', { 35884 months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), 35885 monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), 35886 weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), 35887 weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), 35888 weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'), 35889 longDateFormat : { 35890 LT : 'HH:mm', 35891 LTS : 'HH:mm:ss', 35892 L : 'DD/MM/YYYY', 35893 LL : 'D MMMM YYYY', 35894 LLL : 'D MMMM YYYY HH:mm', 35895 LLLL : 'dddd D MMMM YYYY HH:mm' 35896 }, 35897 calendar : { 35898 sameDay: '[Aujourd\'hui à ] LT', 35899 nextDay: '[Demain à ] LT', 35900 nextWeek: 'dddd [à ] LT', 35901 lastDay: '[Hier à ] LT', 35902 lastWeek: 'dddd [dernier à ] LT', 35903 sameElse: 'L' 35904 }, 35905 relativeTime : { 35906 future : 'dans %s', 35907 past : 'il y a %s', 35908 s : 'quelques secondes', 35909 m : 'une minute', 35910 mm : '%d minutes', 35911 h : 'une heure', 35912 hh : '%d heures', 35913 d : 'un jour', 35914 dd : '%d jours', 35915 M : 'un mois', 35916 MM : '%d mois', 35917 y : 'un an', 35918 yy : '%d ans' 35919 }, 35920 ordinalParse: /\d{1,2}(er|)/, 35921 ordinal : function (number) { 35922 return number + (number === 1 ? 'er' : ''); 35923 }, 35924 week : { 35925 dow : 1, // Monday is the first day of the week. 35926 doy : 4 // The week that contains Jan 4th is the first week of the year. 35927 } 35928 }); 35929 35930 //! moment.js locale configuration 35931 //! locale : frisian (fy) 35932 //! author : Robin van der Vliet : https://github.com/robin0van0der0v 35933 35934 var fy__monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'), 35935 fy__monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'); 35936 35937 var fy = _moment__default.defineLocale('fy', { 35938 months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'), 35939 monthsShort : function (m, format) { 35940 if (/-MMM-/.test(format)) { 35941 return fy__monthsShortWithoutDots[m.month()]; 35942 } else { 35943 return fy__monthsShortWithDots[m.month()]; 35944 } 35945 }, 35946 weekdays : 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'), 35947 weekdaysShort : 'si._mo._ti._wo._to._fr._so.'.split('_'), 35948 weekdaysMin : 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'), 35949 longDateFormat : { 35950 LT : 'HH:mm', 35951 LTS : 'HH:mm:ss', 35952 L : 'DD-MM-YYYY', 35953 LL : 'D MMMM YYYY', 35954 LLL : 'D MMMM YYYY HH:mm', 35955 LLLL : 'dddd D MMMM YYYY HH:mm' 35956 }, 35957 calendar : { 35958 sameDay: '[hjoed om] LT', 35959 nextDay: '[moarn om] LT', 35960 nextWeek: 'dddd [om] LT', 35961 lastDay: '[juster om] LT', 35962 lastWeek: '[ôfrûne] dddd [om] LT', 35963 sameElse: 'L' 35964 }, 35965 relativeTime : { 35966 future : 'oer %s', 35967 past : '%s lyn', 35968 s : 'in pear sekonden', 35969 m : 'ien minút', 35970 mm : '%d minuten', 35971 h : 'ien oere', 35972 hh : '%d oeren', 35973 d : 'ien dei', 35974 dd : '%d dagen', 35975 M : 'ien moanne', 35976 MM : '%d moannen', 35977 y : 'ien jier', 35978 yy : '%d jierren' 35979 }, 35980 ordinalParse: /\d{1,2}(ste|de)/, 35981 ordinal : function (number) { 35982 return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); 35983 }, 35984 week : { 35985 dow : 1, // Monday is the first day of the week. 35986 doy : 4 // The week that contains Jan 4th is the first week of the year. 35987 } 35988 }); 35989 35990 //! moment.js locale configuration 35991 //! locale : galician (gl) 35992 //! author : Juan G. Hurtado : https://github.com/juanghurtado 35993 35994 var gl = _moment__default.defineLocale('gl', { 35995 months : 'Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Outubro_Novembro_Decembro'.split('_'), 35996 monthsShort : 'Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.'.split('_'), 35997 weekdays : 'Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado'.split('_'), 35998 weekdaysShort : 'Dom._Lun._Mar._Mér._Xov._Ven._Sáb.'.split('_'), 35999 weekdaysMin : 'Do_Lu_Ma_Mé_Xo_Ve_Sá'.split('_'), 36000 longDateFormat : { 36001 LT : 'H:mm', 36002 LTS : 'H:mm:ss', 36003 L : 'DD/MM/YYYY', 36004 LL : 'D MMMM YYYY', 36005 LLL : 'D MMMM YYYY H:mm', 36006 LLLL : 'dddd D MMMM YYYY H:mm' 36007 }, 36008 calendar : { 36009 sameDay : function () { 36010 return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT'; 36011 }, 36012 nextDay : function () { 36013 return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT'; 36014 }, 36015 nextWeek : function () { 36016 return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; 36017 }, 36018 lastDay : function () { 36019 return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT'; 36020 }, 36021 lastWeek : function () { 36022 return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; 36023 }, 36024 sameElse : 'L' 36025 }, 36026 relativeTime : { 36027 future : function (str) { 36028 if (str === 'uns segundos') { 36029 return 'nuns segundos'; 36030 } 36031 return 'en ' + str; 36032 }, 36033 past : 'hai %s', 36034 s : 'uns segundos', 36035 m : 'un minuto', 36036 mm : '%d minutos', 36037 h : 'unha hora', 36038 hh : '%d horas', 36039 d : 'un dÃa', 36040 dd : '%d dÃas', 36041 M : 'un mes', 36042 MM : '%d meses', 36043 y : 'un ano', 36044 yy : '%d anos' 36045 }, 36046 ordinalParse : /\d{1,2}º/, 36047 ordinal : '%dº', 36048 week : { 36049 dow : 1, // Monday is the first day of the week. 36050 doy : 7 // The week that contains Jan 1st is the first week of the year. 36051 } 36052 }); 36053 36054 //! moment.js locale configuration 36055 //! locale : Hebrew (he) 36056 //! author : Tomer Cohen : https://github.com/tomer 36057 //! author : Moshe Simantov : https://github.com/DevelopmentIL 36058 //! author : Tal Ater : https://github.com/TalAter 36059 36060 var he = _moment__default.defineLocale('he', { 36061 months : '×× ××ר_פ×ר××ר_×רץ_×פר××_×××_××× ×_××××_××××ס×_ספ×××ר_×××§×××ר_× ××××ר_×צ××ר'.split('_'), 36062 monthsShort : '×× ×׳_פ×ר׳_×רץ_×פר׳_×××_××× ×_××××_×××׳_ספ×׳_××ק׳_× ××׳_×צ×׳'.split('_'), 36063 weekdays : 'ר×ש××_×©× ×_ש××ש×_ר×××¢×_×××ש×_ש×ש×_ש×ת'.split('_'), 36064 weekdaysShort : '×׳_×׳_×׳_×׳_×׳_×׳_ש׳'.split('_'), 36065 weekdaysMin : '×_×_×_×_×_×_ש'.split('_'), 36066 longDateFormat : { 36067 LT : 'HH:mm', 36068 LTS : 'HH:mm:ss', 36069 L : 'DD/MM/YYYY', 36070 LL : 'D [×]MMMM YYYY', 36071 LLL : 'D [×]MMMM YYYY HH:mm', 36072 LLLL : 'dddd, D [×]MMMM YYYY HH:mm', 36073 l : 'D/M/YYYY', 36074 ll : 'D MMM YYYY', 36075 lll : 'D MMM YYYY HH:mm', 36076 llll : 'ddd, D MMM YYYY HH:mm' 36077 }, 36078 calendar : { 36079 sameDay : '[×××× ×Ö¾]LT', 36080 nextDay : '[××ר ×Ö¾]LT', 36081 nextWeek : 'dddd [×שע×] LT', 36082 lastDay : '[×ת××× ×Ö¾]LT', 36083 lastWeek : '[××××] dddd [×××ר×× ×שע×] LT', 36084 sameElse : 'L' 36085 }, 36086 relativeTime : { 36087 future : '××¢×× %s', 36088 past : '××¤× × %s', 36089 s : '×ספר ×©× ××ת', 36090 m : '××§×', 36091 mm : '%d ××§×ת', 36092 h : 'שע×', 36093 hh : function (number) { 36094 if (number === 2) { 36095 return 'שעת×××'; 36096 } 36097 return number + ' שע×ת'; 36098 }, 36099 d : '×××', 36100 dd : function (number) { 36101 if (number === 2) { 36102 return '××××××'; 36103 } 36104 return number + ' ××××'; 36105 }, 36106 M : '×××ש', 36107 MM : function (number) { 36108 if (number === 2) { 36109 return '×××ש×××'; 36110 } 36111 return number + ' ×××ש××'; 36112 }, 36113 y : '×©× ×', 36114 yy : function (number) { 36115 if (number === 2) { 36116 return '×©× ×ª×××'; 36117 } else if (number % 10 === 0 && number !== 10) { 36118 return number + ' ×©× ×'; 36119 } 36120 return number + ' ×©× ××'; 36121 } 36122 } 36123 }); 36124 36125 //! moment.js locale configuration 36126 //! locale : hindi (hi) 36127 //! author : Mayank Singhal : https://github.com/mayanksinghal 36128 36129 var hi__symbolMap = { 36130 '1': '१', 36131 '2': '२', 36132 '3': '३', 36133 '4': '४', 36134 '5': '५', 36135 '6': '६', 36136 '7': 'à¥', 36137 '8': '८', 36138 '9': '९', 36139 '0': '०' 36140 }, 36141 hi__numberMap = { 36142 '१': '1', 36143 '२': '2', 36144 '३': '3', 36145 '४': '4', 36146 '५': '5', 36147 '६': '6', 36148 'à¥': '7', 36149 '८': '8', 36150 '९': '9', 36151 '०': '0' 36152 }; 36153 36154 var hi = _moment__default.defineLocale('hi', { 36155 months : 'à¤à¤¨à¤µà¤°à¥_फ़रवरà¥_मारà¥à¤_ठपà¥à¤°à¥à¤²_मà¤_à¤à¥à¤¨_à¤à¥à¤²à¤¾à¤_ठà¤à¤¸à¥à¤¤_सितमà¥à¤¬à¤°_ठà¤à¥à¤à¥à¤¬à¤°_नवमà¥à¤¬à¤°_दिसमà¥à¤¬à¤°'.split('_'), 36156 monthsShort : 'à¤à¤¨._फ़र._मारà¥à¤_ठपà¥à¤°à¥._मà¤_à¤à¥à¤¨_à¤à¥à¤²._ठà¤._सित._ठà¤à¥à¤à¥._नव._दिस.'.split('_'), 36157 weekdays : 'रविवार_सà¥à¤®à¤µà¤¾à¤°_मà¤à¤à¤²à¤µà¤¾à¤°_बà¥à¤§à¤µà¤¾à¤°_à¤à¥à¤°à¥à¤µà¤¾à¤°_शà¥à¤à¥à¤°à¤µà¤¾à¤°_शनिवार'.split('_'), 36158 weekdaysShort : 'रवि_सà¥à¤®_मà¤à¤à¤²_बà¥à¤§_à¤à¥à¤°à¥_शà¥à¤à¥à¤°_शनि'.split('_'), 36159 weekdaysMin : 'र_सà¥_मà¤_बà¥_à¤à¥_शà¥_श'.split('_'), 36160 longDateFormat : { 36161 LT : 'A h:mm बà¤à¥', 36162 LTS : 'A h:mm:ss बà¤à¥', 36163 L : 'DD/MM/YYYY', 36164 LL : 'D MMMM YYYY', 36165 LLL : 'D MMMM YYYY, A h:mm बà¤à¥', 36166 LLLL : 'dddd, D MMMM YYYY, A h:mm बà¤à¥' 36167 }, 36168 calendar : { 36169 sameDay : '[à¤à¤] LT', 36170 nextDay : '[à¤à¤²] LT', 36171 nextWeek : 'dddd, LT', 36172 lastDay : '[à¤à¤²] LT', 36173 lastWeek : '[पिà¤à¤²à¥] dddd, LT', 36174 sameElse : 'L' 36175 }, 36176 relativeTime : { 36177 future : '%s मà¥à¤', 36178 past : '%s पहलà¥', 36179 s : 'à¤à¥à¤ हॠà¤à¥à¤·à¤£', 36180 m : 'à¤à¤ मिनà¤', 36181 mm : '%d मिनà¤', 36182 h : 'à¤à¤ à¤à¤à¤à¤¾', 36183 hh : '%d à¤à¤à¤à¥', 36184 d : 'à¤à¤ दिन', 36185 dd : '%d दिन', 36186 M : 'à¤à¤ महà¥à¤¨à¥', 36187 MM : '%d महà¥à¤¨à¥', 36188 y : 'à¤à¤ वरà¥à¤·', 36189 yy : '%d वरà¥à¤·' 36190 }, 36191 preparse: function (string) { 36192 return string.replace(/[१२३४५६à¥à¥®à¥¯à¥¦]/g, function (match) { 36193 return hi__numberMap[match]; 36194 }); 36195 }, 36196 postformat: function (string) { 36197 return string.replace(/\d/g, function (match) { 36198 return hi__symbolMap[match]; 36199 }); 36200 }, 36201 // Hindi notation for meridiems are quite fuzzy in practice. While there exists 36202 // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi. 36203 meridiemParse: /रात|सà¥à¤¬à¤¹|दà¥à¤ªà¤¹à¤°|शाम/, 36204 meridiemHour : function (hour, meridiem) { 36205 if (hour === 12) { 36206 hour = 0; 36207 } 36208 if (meridiem === 'रात') { 36209 return hour < 4 ? hour : hour + 12; 36210 } else if (meridiem === 'सà¥à¤¬à¤¹') { 36211 return hour; 36212 } else if (meridiem === 'दà¥à¤ªà¤¹à¤°') { 36213 return hour >= 10 ? hour : hour + 12; 36214 } else if (meridiem === 'शाम') { 36215 return hour + 12; 36216 } 36217 }, 36218 meridiem : function (hour, minute, isLower) { 36219 if (hour < 4) { 36220 return 'रात'; 36221 } else if (hour < 10) { 36222 return 'सà¥à¤¬à¤¹'; 36223 } else if (hour < 17) { 36224 return 'दà¥à¤ªà¤¹à¤°'; 36225 } else if (hour < 20) { 36226 return 'शाम'; 36227 } else { 36228 return 'रात'; 36229 } 36230 }, 36231 week : { 36232 dow : 0, // Sunday is the first day of the week. 36233 doy : 6 // The week that contains Jan 1st is the first week of the year. 36234 } 36235 }); 36236 36237 //! moment.js locale configuration 36238 //! locale : hrvatski (hr) 36239 //! author : Bojan MarkoviÄ : https://github.com/bmarkovic 36240 36241 function hr__translate(number, withoutSuffix, key) { 36242 var result = number + ' '; 36243 switch (key) { 36244 case 'm': 36245 return withoutSuffix ? 'jedna minuta' : 'jedne minute'; 36246 case 'mm': 36247 if (number === 1) { 36248 result += 'minuta'; 36249 } else if (number === 2 || number === 3 || number === 4) { 36250 result += 'minute'; 36251 } else { 36252 result += 'minuta'; 36253 } 36254 return result; 36255 case 'h': 36256 return withoutSuffix ? 'jedan sat' : 'jednog sata'; 36257 case 'hh': 36258 if (number === 1) { 36259 result += 'sat'; 36260 } else if (number === 2 || number === 3 || number === 4) { 36261 result += 'sata'; 36262 } else { 36263 result += 'sati'; 36264 } 36265 return result; 36266 case 'dd': 36267 if (number === 1) { 36268 result += 'dan'; 36269 } else { 36270 result += 'dana'; 36271 } 36272 return result; 36273 case 'MM': 36274 if (number === 1) { 36275 result += 'mjesec'; 36276 } else if (number === 2 || number === 3 || number === 4) { 36277 result += 'mjeseca'; 36278 } else { 36279 result += 'mjeseci'; 36280 } 36281 return result; 36282 case 'yy': 36283 if (number === 1) { 36284 result += 'godina'; 36285 } else if (number === 2 || number === 3 || number === 4) { 36286 result += 'godine'; 36287 } else { 36288 result += 'godina'; 36289 } 36290 return result; 36291 } 36292 } 36293 36294 var hr = _moment__default.defineLocale('hr', { 36295 months : 'sijeÄanj_veljaÄa_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_'), 36296 monthsShort : 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'), 36297 weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_Äetvrtak_petak_subota'.split('_'), 36298 weekdaysShort : 'ned._pon._uto._sri._Äet._pet._sub.'.split('_'), 36299 weekdaysMin : 'ne_po_ut_sr_Äe_pe_su'.split('_'), 36300 longDateFormat : { 36301 LT : 'H:mm', 36302 LTS : 'H:mm:ss', 36303 L : 'DD. MM. YYYY', 36304 LL : 'D. MMMM YYYY', 36305 LLL : 'D. MMMM YYYY H:mm', 36306 LLLL : 'dddd, D. MMMM YYYY H:mm' 36307 }, 36308 calendar : { 36309 sameDay : '[danas u] LT', 36310 nextDay : '[sutra u] LT', 36311 nextWeek : function () { 36312 switch (this.day()) { 36313 case 0: 36314 return '[u] [nedjelju] [u] LT'; 36315 case 3: 36316 return '[u] [srijedu] [u] LT'; 36317 case 6: 36318 return '[u] [subotu] [u] LT'; 36319 case 1: 36320 case 2: 36321 case 4: 36322 case 5: 36323 return '[u] dddd [u] LT'; 36324 } 36325 }, 36326 lastDay : '[juÄer u] LT', 36327 lastWeek : function () { 36328 switch (this.day()) { 36329 case 0: 36330 case 3: 36331 return '[proÅ¡lu] dddd [u] LT'; 36332 case 6: 36333 return '[proÅ¡le] [subote] [u] LT'; 36334 case 1: 36335 case 2: 36336 case 4: 36337 case 5: 36338 return '[proÅ¡li] dddd [u] LT'; 36339 } 36340 }, 36341 sameElse : 'L' 36342 }, 36343 relativeTime : { 36344 future : 'za %s', 36345 past : 'prije %s', 36346 s : 'par sekundi', 36347 m : hr__translate, 36348 mm : hr__translate, 36349 h : hr__translate, 36350 hh : hr__translate, 36351 d : 'dan', 36352 dd : hr__translate, 36353 M : 'mjesec', 36354 MM : hr__translate, 36355 y : 'godinu', 36356 yy : hr__translate 36357 }, 36358 ordinalParse: /\d{1,2}\./, 36359 ordinal : '%d.', 36360 week : { 36361 dow : 1, // Monday is the first day of the week. 36362 doy : 7 // The week that contains Jan 1st is the first week of the year. 36363 } 36364 }); 36365 36366 //! moment.js locale configuration 36367 //! locale : hungarian (hu) 36368 //! author : Adam Brunner : https://github.com/adambrunner 36369 36370 var weekEndings = 'vasárnap hétfÅn kedden szerdán csütörtökön pénteken szombaton'.split(' '); 36371 function hu__translate(number, withoutSuffix, key, isFuture) { 36372 var num = number, 36373 suffix; 36374 switch (key) { 36375 case 's': 36376 return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce'; 36377 case 'm': 36378 return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce'); 36379 case 'mm': 36380 return num + (isFuture || withoutSuffix ? ' perc' : ' perce'); 36381 case 'h': 36382 return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája'); 36383 case 'hh': 36384 return num + (isFuture || withoutSuffix ? ' óra' : ' órája'); 36385 case 'd': 36386 return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja'); 36387 case 'dd': 36388 return num + (isFuture || withoutSuffix ? ' nap' : ' napja'); 36389 case 'M': 36390 return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); 36391 case 'MM': 36392 return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); 36393 case 'y': 36394 return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve'); 36395 case 'yy': 36396 return num + (isFuture || withoutSuffix ? ' év' : ' éve'); 36397 } 36398 return ''; 36399 } 36400 function week(isFuture) { 36401 return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]'; 36402 } 36403 36404 var hu = _moment__default.defineLocale('hu', { 36405 months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'), 36406 monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'), 36407 weekdays : 'vasárnap_hétfÅ_kedd_szerda_csütörtök_péntek_szombat'.split('_'), 36408 weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'), 36409 weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'), 36410 longDateFormat : { 36411 LT : 'H:mm', 36412 LTS : 'H:mm:ss', 36413 L : 'YYYY.MM.DD.', 36414 LL : 'YYYY. MMMM D.', 36415 LLL : 'YYYY. MMMM D. H:mm', 36416 LLLL : 'YYYY. MMMM D., dddd H:mm' 36417 }, 36418 meridiemParse: /de|du/i, 36419 isPM: function (input) { 36420 return input.charAt(1).toLowerCase() === 'u'; 36421 }, 36422 meridiem : function (hours, minutes, isLower) { 36423 if (hours < 12) { 36424 return isLower === true ? 'de' : 'DE'; 36425 } else { 36426 return isLower === true ? 'du' : 'DU'; 36427 } 36428 }, 36429 calendar : { 36430 sameDay : '[ma] LT[-kor]', 36431 nextDay : '[holnap] LT[-kor]', 36432 nextWeek : function () { 36433 return week.call(this, true); 36434 }, 36435 lastDay : '[tegnap] LT[-kor]', 36436 lastWeek : function () { 36437 return week.call(this, false); 36438 }, 36439 sameElse : 'L' 36440 }, 36441 relativeTime : { 36442 future : '%s múlva', 36443 past : '%s', 36444 s : hu__translate, 36445 m : hu__translate, 36446 mm : hu__translate, 36447 h : hu__translate, 36448 hh : hu__translate, 36449 d : hu__translate, 36450 dd : hu__translate, 36451 M : hu__translate, 36452 MM : hu__translate, 36453 y : hu__translate, 36454 yy : hu__translate 36455 }, 36456 ordinalParse: /\d{1,2}\./, 36457 ordinal : '%d.', 36458 week : { 36459 dow : 1, // Monday is the first day of the week. 36460 doy : 7 // The week that contains Jan 1st is the first week of the year. 36461 } 36462 }); 36463 36464 //! moment.js locale configuration 36465 //! locale : Armenian (hy-am) 36466 //! author : Armendarabyan : https://github.com/armendarabyan 36467 36468 function hy_am__monthsCaseReplace(m, format) { 36469 var months = { 36470 'nominative': 'Õ°Õ¸ÖÕ¶Õ¾Õ¡Ö_ÖÕ¥Õ¿ÖÕ¾Õ¡Ö_Õ´Õ¡ÖÕ¿_Õ¡ÕºÖÕ«Õ¬_Õ´Õ¡ÕµÕ«Õ½_Õ°Õ¸ÖÕ¶Õ«Õ½_Õ°Õ¸ÖÕ¬Õ«Õ½_Ö Õ£Õ¸Õ½Õ¿Õ¸Õ½_Õ½Õ¥ÕºÕ¿Õ¥Õ´Õ¢Õ¥Ö_Õ°Õ¸Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö_Õ¶Õ¸ÕµÕ¥Õ´Õ¢Õ¥Ö_Õ¤Õ¥Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö'.split('_'), 36471 'accusative': 'Õ°Õ¸ÖÕ¶Õ¾Õ¡ÖÕ«_ÖÕ¥Õ¿ÖÕ¾Õ¡ÖÕ«_Õ´Õ¡ÖÕ¿Õ«_Õ¡ÕºÖÕ«Õ¬Õ«_Õ´Õ¡ÕµÕ«Õ½Õ«_Õ°Õ¸ÖÕ¶Õ«Õ½Õ«_Õ°Õ¸ÖÕ¬Õ«Õ½Õ«_Ö Õ£Õ¸Õ½Õ¿Õ¸Õ½Õ«_Õ½Õ¥ÕºÕ¿Õ¥Õ´Õ¢Õ¥ÖÕ«_Õ°Õ¸Õ¯Õ¿Õ¥Õ´Õ¢Õ¥ÖÕ«_Õ¶Õ¸ÕµÕ¥Õ´Õ¢Õ¥ÖÕ«_Õ¤Õ¥Õ¯Õ¿Õ¥Õ´Õ¢Õ¥ÖÕ«'.split('_') 36472 }, 36473 nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ? 36474 'accusative' : 36475 'nominative'; 36476 return months[nounCase][m.month()]; 36477 } 36478 function hy_am__monthsShortCaseReplace(m, format) { 36479 var monthsShort = 'Õ°Õ¶Õ¾_ÖÕ¿Ö_Õ´ÖÕ¿_Õ¡ÕºÖ_Õ´ÕµÕ½_Õ°Õ¶Õ½_Õ°Õ¬Õ½_Ö Õ£Õ½_Õ½ÕºÕ¿_Õ°Õ¯Õ¿_Õ¶Õ´Õ¢_Õ¤Õ¯Õ¿'.split('_'); 36480 return monthsShort[m.month()]; 36481 } 36482 function hy_am__weekdaysCaseReplace(m, format) { 36483 var weekdays = 'Õ¯Õ«ÖÕ¡Õ¯Õ«_Õ¥ÖÕ¯Õ¸ÖÕ·Õ¡Õ¢Õ©Õ«_Õ¥ÖÕ¥ÖÕ·Õ¡Õ¢Õ©Õ«_Õ¹Õ¸ÖÕ¥ÖÕ·Õ¡Õ¢Õ©Õ«_Õ°Õ«Õ¶Õ£Õ·Õ¡Õ¢Õ©Õ«_Õ¸ÖÖÕ¢Õ¡Õ©_Õ·Õ¡Õ¢Õ¡Õ©'.split('_'); 36484 return weekdays[m.day()]; 36485 } 36486 36487 var hy_am = _moment__default.defineLocale('hy-am', { 36488 months : hy_am__monthsCaseReplace, 36489 monthsShort : hy_am__monthsShortCaseReplace, 36490 weekdays : hy_am__weekdaysCaseReplace, 36491 weekdaysShort : 'Õ¯ÖÕ¯_Õ¥ÖÕ¯_Õ¥ÖÖ_Õ¹ÖÖ_Õ°Õ¶Õ£_Õ¸ÖÖÕ¢_Õ·Õ¢Õ©'.split('_'), 36492 weekdaysMin : 'Õ¯ÖÕ¯_Õ¥ÖÕ¯_Õ¥ÖÖ_Õ¹ÖÖ_Õ°Õ¶Õ£_Õ¸ÖÖÕ¢_Õ·Õ¢Õ©'.split('_'), 36493 longDateFormat : { 36494 LT : 'HH:mm', 36495 LTS : 'HH:mm:ss', 36496 L : 'DD.MM.YYYY', 36497 LL : 'D MMMM YYYY Õ©.', 36498 LLL : 'D MMMM YYYY Õ©., HH:mm', 36499 LLLL : 'dddd, D MMMM YYYY Õ©., HH:mm' 36500 }, 36501 calendar : { 36502 sameDay: '[Õ¡ÕµÕ½Ö Ö] LT', 36503 nextDay: '[Õ¾Õ¡Õ²Õ¨] LT', 36504 lastDay: '[Õ¥ÖÕ¥Õ¯] LT', 36505 nextWeek: function () { 36506 return 'dddd [Ö ÖÕ¨ ÕªÕ¡Õ´Õ¨] LT'; 36507 }, 36508 lastWeek: function () { 36509 return '[Õ¡Õ¶ÖÕ¡Õ®] dddd [Ö ÖÕ¨ ÕªÕ¡Õ´Õ¨] LT'; 36510 }, 36511 sameElse: 'L' 36512 }, 36513 relativeTime : { 36514 future : '%s Õ°Õ¥Õ¿Õ¸', 36515 past : '%s Õ¡Õ¼Õ¡Õ»', 36516 s : 'Õ´Õ« ÖÕ¡Õ¶Õ« Õ¾Õ¡ÕµÖÕ¯ÕµÕ¡Õ¶', 36517 m : 'ÖÕ¸ÕºÕ¥', 36518 mm : '%d ÖÕ¸ÕºÕ¥', 36519 h : 'ÕªÕ¡Õ´', 36520 hh : '%d ÕªÕ¡Õ´', 36521 d : 'Ö Ö', 36522 dd : '%d Ö Ö', 36523 M : 'Õ¡Õ´Õ«Õ½', 36524 MM : '%d Õ¡Õ´Õ«Õ½', 36525 y : 'Õ¿Õ¡ÖÕ«', 36526 yy : '%d Õ¿Õ¡ÖÕ«' 36527 }, 36528 meridiemParse: /Õ£Õ«Õ·Õ¥ÖÕ¾Õ¡|Õ¡Õ¼Õ¡Õ¾Õ¸Õ¿Õ¾Õ¡|ÖÕ¥ÖÕ¥Õ¯Õ¾Õ¡|Õ¥ÖÕ¥Õ¯Õ¸ÕµÕ¡Õ¶/, 36529 isPM: function (input) { 36530 return /^(ÖÕ¥ÖÕ¥Õ¯Õ¾Õ¡|Õ¥ÖÕ¥Õ¯Õ¸ÕµÕ¡Õ¶)$/.test(input); 36531 }, 36532 meridiem : function (hour) { 36533 if (hour < 4) { 36534 return 'Õ£Õ«Õ·Õ¥ÖÕ¾Õ¡'; 36535 } else if (hour < 12) { 36536 return 'Õ¡Õ¼Õ¡Õ¾Õ¸Õ¿Õ¾Õ¡'; 36537 } else if (hour < 17) { 36538 return 'ÖÕ¥ÖÕ¥Õ¯Õ¾Õ¡'; 36539 } else { 36540 return 'Õ¥ÖÕ¥Õ¯Õ¸ÕµÕ¡Õ¶'; 36541 } 36542 }, 36543 ordinalParse: /\d{1,2}|\d{1,2}-(Õ«Õ¶|ÖÕ¤)/, 36544 ordinal: function (number, period) { 36545 switch (period) { 36546 case 'DDD': 36547 case 'w': 36548 case 'W': 36549 case 'DDDo': 36550 if (number === 1) { 36551 return number + '-Õ«Õ¶'; 36552 } 36553 return number + '-ÖÕ¤'; 36554 default: 36555 return number; 36556 } 36557 }, 36558 week : { 36559 dow : 1, // Monday is the first day of the week. 36560 doy : 7 // The week that contains Jan 1st is the first week of the year. 36561 } 36562 }); 36563 36564 //! moment.js locale configuration 36565 //! locale : Bahasa Indonesia (id) 36566 //! author : Mohammad Satrio Utomo : https://github.com/tyok 36567 //! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan 36568 36569 var id = _moment__default.defineLocale('id', { 36570 months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'), 36571 monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des'.split('_'), 36572 weekdays : 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'), 36573 weekdaysShort : 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'), 36574 weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'), 36575 longDateFormat : { 36576 LT : 'HH.mm', 36577 LTS : 'HH.mm.ss', 36578 L : 'DD/MM/YYYY', 36579 LL : 'D MMMM YYYY', 36580 LLL : 'D MMMM YYYY [pukul] HH.mm', 36581 LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' 36582 }, 36583 meridiemParse: /pagi|siang|sore|malam/, 36584 meridiemHour : function (hour, meridiem) { 36585 if (hour === 12) { 36586 hour = 0; 36587 } 36588 if (meridiem === 'pagi') { 36589 return hour; 36590 } else if (meridiem === 'siang') { 36591 return hour >= 11 ? hour : hour + 12; 36592 } else if (meridiem === 'sore' || meridiem === 'malam') { 36593 return hour + 12; 36594 } 36595 }, 36596 meridiem : function (hours, minutes, isLower) { 36597 if (hours < 11) { 36598 return 'pagi'; 36599 } else if (hours < 15) { 36600 return 'siang'; 36601 } else if (hours < 19) { 36602 return 'sore'; 36603 } else { 36604 return 'malam'; 36605 } 36606 }, 36607 calendar : { 36608 sameDay : '[Hari ini pukul] LT', 36609 nextDay : '[Besok pukul] LT', 36610 nextWeek : 'dddd [pukul] LT', 36611 lastDay : '[Kemarin pukul] LT', 36612 lastWeek : 'dddd [lalu pukul] LT', 36613 sameElse : 'L' 36614 }, 36615 relativeTime : { 36616 future : 'dalam %s', 36617 past : '%s yang lalu', 36618 s : 'beberapa detik', 36619 m : 'semenit', 36620 mm : '%d menit', 36621 h : 'sejam', 36622 hh : '%d jam', 36623 d : 'sehari', 36624 dd : '%d hari', 36625 M : 'sebulan', 36626 MM : '%d bulan', 36627 y : 'setahun', 36628 yy : '%d tahun' 36629 }, 36630 week : { 36631 dow : 1, // Monday is the first day of the week. 36632 doy : 7 // The week that contains Jan 1st is the first week of the year. 36633 } 36634 }); 36635 36636 //! moment.js locale configuration 36637 //! locale : icelandic (is) 36638 //! author : Hinrik Ãrn Sigurðsson : https://github.com/hinrik 36639 36640 function is__plural(n) { 36641 if (n % 100 === 11) { 36642 return true; 36643 } else if (n % 10 === 1) { 36644 return false; 36645 } 36646 return true; 36647 } 36648 function is__translate(number, withoutSuffix, key, isFuture) { 36649 var result = number + ' '; 36650 switch (key) { 36651 case 's': 36652 return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum'; 36653 case 'm': 36654 return withoutSuffix ? 'mÃnúta' : 'mÃnútu'; 36655 case 'mm': 36656 if (is__plural(number)) { 36657 return result + (withoutSuffix || isFuture ? 'mÃnútur' : 'mÃnútum'); 36658 } else if (withoutSuffix) { 36659 return result + 'mÃnúta'; 36660 } 36661 return result + 'mÃnútu'; 36662 case 'hh': 36663 if (is__plural(number)) { 36664 return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum'); 36665 } 36666 return result + 'klukkustund'; 36667 case 'd': 36668 if (withoutSuffix) { 36669 return 'dagur'; 36670 } 36671 return isFuture ? 'dag' : 'degi'; 36672 case 'dd': 36673 if (is__plural(number)) { 36674 if (withoutSuffix) { 36675 return result + 'dagar'; 36676 } 36677 return result + (isFuture ? 'daga' : 'dögum'); 36678 } else if (withoutSuffix) { 36679 return result + 'dagur'; 36680 } 36681 return result + (isFuture ? 'dag' : 'degi'); 36682 case 'M': 36683 if (withoutSuffix) { 36684 return 'mánuður'; 36685 } 36686 return isFuture ? 'mánuð' : 'mánuði'; 36687 case 'MM': 36688 if (is__plural(number)) { 36689 if (withoutSuffix) { 36690 return result + 'mánuðir'; 36691 } 36692 return result + (isFuture ? 'mánuði' : 'mánuðum'); 36693 } else if (withoutSuffix) { 36694 return result + 'mánuður'; 36695 } 36696 return result + (isFuture ? 'mánuð' : 'mánuði'); 36697 case 'y': 36698 return withoutSuffix || isFuture ? 'ár' : 'ári'; 36699 case 'yy': 36700 if (is__plural(number)) { 36701 return result + (withoutSuffix || isFuture ? 'ár' : 'árum'); 36702 } 36703 return result + (withoutSuffix || isFuture ? 'ár' : 'ári'); 36704 } 36705 } 36706 36707 var is = _moment__default.defineLocale('is', { 36708 months : 'janúar_febrúar_mars_aprÃl_maÃ_júnÃ_júlÃ_ágúst_september_október_nóvember_desember'.split('_'), 36709 monthsShort : 'jan_feb_mar_apr_maÃ_jún_júl_ágú_sep_okt_nóv_des'.split('_'), 36710 weekdays : 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'), 36711 weekdaysShort : 'sun_mán_þri_mið_fim_fös_lau'.split('_'), 36712 weekdaysMin : 'Su_Má_Ãr_Mi_Fi_Fö_La'.split('_'), 36713 longDateFormat : { 36714 LT : 'H:mm', 36715 LTS : 'H:mm:ss', 36716 L : 'DD/MM/YYYY', 36717 LL : 'D. MMMM YYYY', 36718 LLL : 'D. MMMM YYYY [kl.] H:mm', 36719 LLLL : 'dddd, D. MMMM YYYY [kl.] H:mm' 36720 }, 36721 calendar : { 36722 sameDay : '[à dag kl.] LT', 36723 nextDay : '[á morgun kl.] LT', 36724 nextWeek : 'dddd [kl.] LT', 36725 lastDay : '[à gær kl.] LT', 36726 lastWeek : '[sÃðasta] dddd [kl.] LT', 36727 sameElse : 'L' 36728 }, 36729 relativeTime : { 36730 future : 'eftir %s', 36731 past : 'fyrir %s sÃðan', 36732 s : is__translate, 36733 m : is__translate, 36734 mm : is__translate, 36735 h : 'klukkustund', 36736 hh : is__translate, 36737 d : is__translate, 36738 dd : is__translate, 36739 M : is__translate, 36740 MM : is__translate, 36741 y : is__translate, 36742 yy : is__translate 36743 }, 36744 ordinalParse: /\d{1,2}\./, 36745 ordinal : '%d.', 36746 week : { 36747 dow : 1, // Monday is the first day of the week. 36748 doy : 4 // The week that contains Jan 4th is the first week of the year. 36749 } 36750 }); 36751 36752 //! moment.js locale configuration 36753 //! locale : italian (it) 36754 //! author : Lorenzo : https://github.com/aliem 36755 //! author: Mattia Larentis: https://github.com/nostalgiaz 36756 36757 var it = _moment__default.defineLocale('it', { 36758 months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'), 36759 monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), 36760 weekdays : 'Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato'.split('_'), 36761 weekdaysShort : 'Dom_Lun_Mar_Mer_Gio_Ven_Sab'.split('_'), 36762 weekdaysMin : 'D_L_Ma_Me_G_V_S'.split('_'), 36763 longDateFormat : { 36764 LT : 'HH:mm', 36765 LTS : 'HH:mm:ss', 36766 L : 'DD/MM/YYYY', 36767 LL : 'D MMMM YYYY', 36768 LLL : 'D MMMM YYYY HH:mm', 36769 LLLL : 'dddd, D MMMM YYYY HH:mm' 36770 }, 36771 calendar : { 36772 sameDay: '[Oggi alle] LT', 36773 nextDay: '[Domani alle] LT', 36774 nextWeek: 'dddd [alle] LT', 36775 lastDay: '[Ieri alle] LT', 36776 lastWeek: function () { 36777 switch (this.day()) { 36778 case 0: 36779 return '[la scorsa] dddd [alle] LT'; 36780 default: 36781 return '[lo scorso] dddd [alle] LT'; 36782 } 36783 }, 36784 sameElse: 'L' 36785 }, 36786 relativeTime : { 36787 future : function (s) { 36788 return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s; 36789 }, 36790 past : '%s fa', 36791 s : 'alcuni secondi', 36792 m : 'un minuto', 36793 mm : '%d minuti', 36794 h : 'un\'ora', 36795 hh : '%d ore', 36796 d : 'un giorno', 36797 dd : '%d giorni', 36798 M : 'un mese', 36799 MM : '%d mesi', 36800 y : 'un anno', 36801 yy : '%d anni' 36802 }, 36803 ordinalParse : /\d{1,2}º/, 36804 ordinal: '%dº', 36805 week : { 36806 dow : 1, // Monday is the first day of the week. 36807 doy : 4 // The week that contains Jan 4th is the first week of the year. 36808 } 36809 }); 36810 36811 //! moment.js locale configuration 36812 //! locale : japanese (ja) 36813 //! author : LI Long : https://github.com/baryon 36814 36815 var ja = _moment__default.defineLocale('ja', { 36816 months : '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split('_'), 36817 monthsShort : '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split('_'), 36818 weekdays : 'æ¥ææ¥_æææ¥_ç«ææ¥_æ°´ææ¥_æ¨ææ¥_éææ¥_åææ¥'.split('_'), 36819 weekdaysShort : 'æ¥_æ_ç«_æ°´_æ¨_é_å'.split('_'), 36820 weekdaysMin : 'æ¥_æ_ç«_æ°´_æ¨_é_å'.split('_'), 36821 longDateFormat : { 36822 LT : 'Ahæmå', 36823 LTS : 'Ahæmåsç§', 36824 L : 'YYYY/MM/DD', 36825 LL : 'YYYYå¹´MæDæ¥', 36826 LLL : 'YYYYå¹´MæDæ¥Ahæmå', 36827 LLLL : 'YYYYå¹´MæDæ¥Ahæmå dddd' 36828 }, 36829 meridiemParse: /åå|åå¾/i, 36830 isPM : function (input) { 36831 return input === 'åå¾'; 36832 }, 36833 meridiem : function (hour, minute, isLower) { 36834 if (hour < 12) { 36835 return 'åå'; 36836 } else { 36837 return 'åå¾'; 36838 } 36839 }, 36840 calendar : { 36841 sameDay : '[仿¥] LT', 36842 nextDay : '[ææ¥] LT', 36843 nextWeek : '[æ¥é±]dddd LT', 36844 lastDay : '[æ¨æ¥] LT', 36845 lastWeek : '[åé±]dddd LT', 36846 sameElse : 'L' 36847 }, 36848 relativeTime : { 36849 future : '%så¾', 36850 past : '%så', 36851 s : 'æ°ç§', 36852 m : '1å', 36853 mm : '%då', 36854 h : '1æé', 36855 hh : '%dæé', 36856 d : '1æ¥', 36857 dd : '%dæ¥', 36858 M : '1ã¶æ', 36859 MM : '%dã¶æ', 36860 y : '1å¹´', 36861 yy : '%då¹´' 36862 } 36863 }); 36864 36865 //! moment.js locale configuration 36866 //! locale : Boso Jowo (jv) 36867 //! author : Rony Lantip : https://github.com/lantip 36868 //! reference: http://jv.wikipedia.org/wiki/Basa_Jawa 36869 36870 var jv = _moment__default.defineLocale('jv', { 36871 months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'), 36872 monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'), 36873 weekdays : 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'), 36874 weekdaysShort : 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'), 36875 weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'), 36876 longDateFormat : { 36877 LT : 'HH.mm', 36878 LTS : 'HH.mm.ss', 36879 L : 'DD/MM/YYYY', 36880 LL : 'D MMMM YYYY', 36881 LLL : 'D MMMM YYYY [pukul] HH.mm', 36882 LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' 36883 }, 36884 meridiemParse: /enjing|siyang|sonten|ndalu/, 36885 meridiemHour : function (hour, meridiem) { 36886 if (hour === 12) { 36887 hour = 0; 36888 } 36889 if (meridiem === 'enjing') { 36890 return hour; 36891 } else if (meridiem === 'siyang') { 36892 return hour >= 11 ? hour : hour + 12; 36893 } else if (meridiem === 'sonten' || meridiem === 'ndalu') { 36894 return hour + 12; 36895 } 36896 }, 36897 meridiem : function (hours, minutes, isLower) { 36898 if (hours < 11) { 36899 return 'enjing'; 36900 } else if (hours < 15) { 36901 return 'siyang'; 36902 } else if (hours < 19) { 36903 return 'sonten'; 36904 } else { 36905 return 'ndalu'; 36906 } 36907 }, 36908 calendar : { 36909 sameDay : '[Dinten puniko pukul] LT', 36910 nextDay : '[Mbenjang pukul] LT', 36911 nextWeek : 'dddd [pukul] LT', 36912 lastDay : '[Kala wingi pukul] LT', 36913 lastWeek : 'dddd [kepengker pukul] LT', 36914 sameElse : 'L' 36915 }, 36916 relativeTime : { 36917 future : 'wonten ing %s', 36918 past : '%s ingkang kepengker', 36919 s : 'sawetawis detik', 36920 m : 'setunggal menit', 36921 mm : '%d menit', 36922 h : 'setunggal jam', 36923 hh : '%d jam', 36924 d : 'sedinten', 36925 dd : '%d dinten', 36926 M : 'sewulan', 36927 MM : '%d wulan',
36928 y : 'setaun', 36929 yy : '%d taun' 36930 }, 36931 week : { 36932 dow : 1, // Monday is the first day of the week. 36933 doy : 7 // The week that contains Jan 1st is the first week of the year. 36934 } 36935 }); 36936 36937 //! moment.js locale configuration 36938 //! locale : Georgian (ka) 36939 //! author : Irakli Janiashvili : https://github.com/irakli-janiashvili 36940 36941 function ka__monthsCaseReplace(m, format) { 36942 var months = { 36943 'nominative': 'áááááá á_ááááá áááá_ááá á¢á_ááá ááá_áááá¡á_ááááá¡á_ááááá¡á_ááááá¡á¢á_á¡áá¥á¢ááááá á_áá¥á¢ááááá á_ááááááá á_áááááááá á'.split('_'), 36944 'accusative': 'áááááá á¡_ááááá áááá¡_ááá á¢á¡_ááá áááá¡_áááá¡á¡_ááááá¡á¡_ááááá¡á¡_ááááá¡á¢á¡_á¡áá¥á¢ááááá á¡_áá¥á¢ááááá á¡_ááááááá á¡_áááááááá á¡'.split('_') 36945 }, 36946 nounCase = (/D[oD] *MMMM?/).test(format) ? 36947 'accusative' : 36948 'nominative'; 36949 return months[nounCase][m.month()]; 36950 } 36951 function ka__weekdaysCaseReplace(m, format) { 36952 var weekdays = { 36953 'nominative': 'áááá á_áá á¨ááááá_á¡ááá¨ááááá_ááá®á¨ááááá_á®á£áá¨ááááá_ááá áá¡áááá_á¨ááááá'.split('_'), 36954 'accusative': 'áááá áá¡_áá á¨ááááá¡_á¡ááá¨ááááá¡_ááá®á¨ááááá¡_á®á£áá¨ááááá¡_ááá áá¡áááá¡_á¨ááááá¡'.split('_') 36955 }, 36956 nounCase = (/(á¬ááá|á¨ááááá)/).test(format) ? 36957 'accusative' : 36958 'nominative'; 36959 return weekdays[nounCase][m.day()]; 36960 } 36961 36962 var ka = _moment__default.defineLocale('ka', { 36963 months : ka__monthsCaseReplace, 36964 monthsShort : 'ááá_ááá_ááá _ááá _ááá_ááá_ááá_ááá_á¡áá¥_áá¥á¢_ááá_ááá'.split('_'), 36965 weekdays : ka__weekdaysCaseReplace, 36966 weekdaysShort : 'ááá_áá á¨_á¡áá_ááá®_á®á£á_ááá _á¨áá'.split('_'), 36967 weekdaysMin : 'áá_áá _á¡á_áá_á®á£_áá_á¨á'.split('_'), 36968 longDateFormat : { 36969 LT : 'h:mm A', 36970 LTS : 'h:mm:ss A', 36971 L : 'DD/MM/YYYY', 36972 LL : 'D MMMM YYYY', 36973 LLL : 'D MMMM YYYY h:mm A', 36974 LLLL : 'dddd, D MMMM YYYY h:mm A' 36975 }, 36976 calendar : { 36977 sameDay : '[áá¦áá¡] LT[-áá]', 36978 nextDay : '[á®ááá] LT[-áá]', 36979 lastDay : '[áá£á¨áá] LT[-áá]', 36980 nextWeek : '[á¨ááááá] dddd LT[-áá]', 36981 lastWeek : '[á¬ááá] dddd LT-áá', 36982 sameElse : 'L' 36983 }, 36984 relativeTime : { 36985 future : function (s) { 36986 return (/(á¬ááá|á¬á£áá|á¡áááá|á¬ááá)/).test(s) ? 36987 s.replace(/á$/, 'á¨á') : 36988 s + 'á¨á'; 36989 }, 36990 past : function (s) { 36991 if ((/(á¬ááá|á¬á£áá|á¡áááá|áá¦á|ááá)/).test(s)) { 36992 return s.replace(/(á|á)$/, 'áá¡ á¬áá'); 36993 } 36994 if ((/á¬ááá/).test(s)) { 36995 return s.replace(/á¬ááá$/, 'á¬ááá¡ á¬áá'); 36996 } 36997 }, 36998 s : 'á áááááááá á¬ááá', 36999 m : 'á¬á£áá', 37000 mm : '%d á¬á£áá', 37001 h : 'á¡áááá', 37002 hh : '%d á¡áááá', 37003 d : 'áá¦á', 37004 dd : '%d áá¦á', 37005 M : 'ááá', 37006 MM : '%d ááá', 37007 y : 'á¬ááá', 37008 yy : '%d á¬ááá' 37009 }, 37010 ordinalParse: /0|1-áá|áá-\d{1,2}|\d{1,2}-á/, 37011 ordinal : function (number) { 37012 if (number === 0) { 37013 return number; 37014 } 37015 if (number === 1) { 37016 return number + '-áá'; 37017 } 37018 if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) { 37019 return 'áá-' + number; 37020 } 37021 return number + '-á'; 37022 }, 37023 week : { 37024 dow : 1, 37025 doy : 7 37026 } 37027 }); 37028 37029 //! moment.js locale configuration 37030 //! locale : khmer (km) 37031 //! author : Kruy Vanna : https://github.com/kruyvanna 37032 37033 var km = _moment__default.defineLocale('km', { 37034 months: 'áááá¶_áá»áááá_áá·áá¶_áááá¶_á§ááá¶_áá·áá»áá¶_áááááá¶_áá¸á á¶_ááááá¶_áá»áá¶_áá·á ááá·áá¶_áááá¼'.split('_'), 37035 monthsShort: 'áááá¶_áá»áááá_áá·áá¶_áááá¶_á§ááá¶_áá·áá»áá¶_áááááá¶_áá¸á á¶_ááááá¶_áá»áá¶_áá·á ááá·áá¶_áááá¼'.split('_'), 37036 weekdays: 'á¢á¶áá·ááá_á áááá_á¢áááá¶á_áá»á_áááá ááááá·á_áá»ááá_áá áá'.split('_'), 37037 weekdaysShort: 'á¢á¶áá·ááá_á áááá_á¢áááá¶á_áá»á_áááá ááááá·á_áá»ááá_áá áá'.split('_'), 37038 weekdaysMin: 'á¢á¶áá·ááá_á áááá_á¢áááá¶á_áá»á_áááá ááááá·á_áá»ááá_áá áá'.split('_'), 37039 longDateFormat: { 37040 LT: 'HH:mm', 37041 LTS : 'HH:mm:ss', 37042 L: 'DD/MM/YYYY', 37043 LL: 'D MMMM YYYY', 37044 LLL: 'D MMMM YYYY HH:mm', 37045 LLLL: 'dddd, D MMMM YYYY HH:mm' 37046 }, 37047 calendar: {
vendor: 9,614 bytes, lines 37048-37302
37048 sameDay: '[áááááá áááá] LT', 37049 nextDay: '[ááá¢áá áááá] LT', 37050 nextWeek: 'dddd [áááá] LT', 37051 lastDay: '[áááá·ááá·á áááá] LT', 37052 lastWeek: 'dddd [ááááá¶á ááá»á] [áááá] LT', 37053 sameElse: 'L' 37054 }, 37055 relativeTime: { 37056 future: '%sááá', 37057 past: '%sáá»á', 37058 s: 'ááá»áááá¶ááá·áá¶áá¸', 37059 m: 'áá½ááá¶áá¸', 37060 mm: '%d áá¶áá¸', 37061 h: 'áá½ááááá', 37062 hh: '%d áááá', 37063 d: 'áá½ááááá', 37064 dd: '%d áááá', 37065 M: 'áá½ááá', 37066 MM: '%d áá', 37067 y: 'áá½ááááá¶á', 37068 yy: '%d áááá¶á' 37069 }, 37070 week: { 37071 dow: 1, // Monday is the first day of the week. 37072 doy: 4 // The week that contains Jan 4th is the first week of the year. 37073 } 37074 }); 37075 37076 //! moment.js locale configuration 37077 //! locale : korean (ko) 37078 //! 37079 //! authors 37080 //! 37081 //! - Kyungwook, Park : https://github.com/kyungw00k 37082 //! - Jeeeyul Lee <[email protected]> 37083 37084 var ko = _moment__default.defineLocale('ko', { 37085 months : '1ì_2ì_3ì_4ì_5ì_6ì_7ì_8ì_9ì_10ì_11ì_12ì'.split('_'), 37086 monthsShort : '1ì_2ì_3ì_4ì_5ì_6ì_7ì_8ì_9ì_10ì_11ì_12ì'.split('_'), 37087 weekdays : 'ì¼ìì¼_ììì¼_íìì¼_ììì¼_목ìì¼_ê¸ìì¼_í ìì¼'.split('_'), 37088 weekdaysShort : 'ì¼_ì_í_ì_목_ê¸_í '.split('_'), 37089 weekdaysMin : 'ì¼_ì_í_ì_목_ê¸_í '.split('_'), 37090 longDateFormat : { 37091 LT : 'A hì më¶', 37092 LTS : 'A hì më¶ sì´', 37093 L : 'YYYY.MM.DD', 37094 LL : 'YYYYë MMMM Dì¼', 37095 LLL : 'YYYYë MMMM Dì¼ A hì më¶', 37096 LLLL : 'YYYYë MMMM Dì¼ dddd A hì më¶' 37097 }, 37098 calendar : { 37099 sameDay : 'ì¤ë LT', 37100 nextDay : 'ë´ì¼ LT', 37101 nextWeek : 'dddd LT', 37102 lastDay : 'ì´ì LT', 37103 lastWeek : 'ì§ë주 dddd LT', 37104 sameElse : 'L' 37105 }, 37106 relativeTime : { 37107 future : '%s í', 37108 past : '%s ì ', 37109 s : 'ëªì´', 37110 ss : '%dì´', 37111 m : 'ì¼ë¶', 37112 mm : '%dë¶', 37113 h : 'íìê°', 37114 hh : '%dìê°', 37115 d : 'í루', 37116 dd : '%dì¼', 37117 M : 'íë¬', 37118 MM : '%dë¬', 37119 y : 'ì¼ë ', 37120 yy : '%dë ' 37121 }, 37122 ordinalParse : /\d{1,2}ì¼/, 37123 ordinal : '%dì¼', 37124 meridiemParse : /ì¤ì |ì¤í/, 37125 isPM : function (token) { 37126 return token === 'ì¤í'; 37127 }, 37128 meridiem : function (hour, minute, isUpper) { 37129 return hour < 12 ? 'ì¤ì ' : 'ì¤í'; 37130 } 37131 }); 37132 37133 //! moment.js locale configuration 37134 //! locale : Luxembourgish (lb) 37135 //! author : mweimerskirch : https://github.com/mweimerskirch, David Raison : https://github.com/kwisatz 37136 37137 function lb__processRelativeTime(number, withoutSuffix, key, isFuture) { 37138 var format = { 37139 'm': ['eng Minutt', 'enger Minutt'], 37140 'h': ['eng Stonn', 'enger Stonn'], 37141 'd': ['een Dag', 'engem Dag'], 37142 'M': ['ee Mount', 'engem Mount'], 37143 'y': ['ee Joer', 'engem Joer'] 37144 }; 37145 return withoutSuffix ? format[key][0] : format[key][1]; 37146 } 37147 function processFutureTime(string) { 37148 var number = string.substr(0, string.indexOf(' ')); 37149 if (eifelerRegelAppliesToNumber(number)) { 37150 return 'a ' + string; 37151 } 37152 return 'an ' + string; 37153 } 37154 function processPastTime(string) { 37155 var number = string.substr(0, string.indexOf(' ')); 37156 if (eifelerRegelAppliesToNumber(number)) { 37157 return 'viru ' + string; 37158 } 37159 return 'virun ' + string; 37160 } 37161 /** 37162 * Returns true if the word before the given number loses the '-n' ending. 37163 * e.g. 'an 10 Deeg' but 'a 5 Deeg' 37164 * 37165 * @param number {integer} 37166 * @returns {boolean} 37167 */ 37168 function eifelerRegelAppliesToNumber(number) { 37169 number = parseInt(number, 10); 37170 if (isNaN(number)) { 37171 return false; 37172 } 37173 if (number < 0) { 37174 // Negative Number --> always true 37175 return true; 37176 } else if (number < 10) { 37177 // Only 1 digit 37178 if (4 <= number && number <= 7) { 37179 return true; 37180 } 37181 return false; 37182 } else if (number < 100) { 37183 // 2 digits 37184 var lastDigit = number % 10, firstDigit = number / 10; 37185 if (lastDigit === 0) { 37186 return eifelerRegelAppliesToNumber(firstDigit); 37187 } 37188 return eifelerRegelAppliesToNumber(lastDigit); 37189 } else if (number < 10000) { 37190 // 3 or 4 digits --> recursively check first digit 37191 while (number >= 10) { 37192 number = number / 10; 37193 } 37194 return eifelerRegelAppliesToNumber(number); 37195 } else { 37196 // Anything larger than 4 digits: recursively check first n-3 digits 37197 number = number / 1000; 37198 return eifelerRegelAppliesToNumber(number); 37199 } 37200 } 37201 37202 var lb = _moment__default.defineLocale('lb', { 37203 months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), 37204 monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'), 37205 weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'), 37206 weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'), 37207 weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'), 37208 longDateFormat: { 37209 LT: 'H:mm [Auer]', 37210 LTS: 'H:mm:ss [Auer]', 37211 L: 'DD.MM.YYYY', 37212 LL: 'D. MMMM YYYY', 37213 LLL: 'D. MMMM YYYY H:mm [Auer]', 37214 LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]' 37215 }, 37216 calendar: { 37217 sameDay: '[Haut um] LT', 37218 sameElse: 'L', 37219 nextDay: '[Muer um] LT', 37220 nextWeek: 'dddd [um] LT', 37221 lastDay: '[Gëschter um] LT', 37222 lastWeek: function () { 37223 // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule 37224 switch (this.day()) { 37225 case 2: 37226 case 4: 37227 return '[Leschten] dddd [um] LT'; 37228 default: 37229 return '[Leschte] dddd [um] LT'; 37230 } 37231 } 37232 }, 37233 relativeTime : { 37234 future : processFutureTime, 37235 past : processPastTime, 37236 s : 'e puer Sekonnen', 37237 m : lb__processRelativeTime, 37238 mm : '%d Minutten', 37239 h : lb__processRelativeTime, 37240 hh : '%d Stonnen', 37241 d : lb__processRelativeTime, 37242 dd : '%d Deeg', 37243 M : lb__processRelativeTime, 37244 MM : '%d Méint', 37245 y : lb__processRelativeTime, 37246 yy : '%d Joer' 37247 }, 37248 ordinalParse: /\d{1,2}\./, 37249 ordinal: '%d.', 37250 week: { 37251 dow: 1, // Monday is the first day of the week. 37252 doy: 4 // The week that contains Jan 4th is the first week of the year. 37253 } 37254 }); 37255 37256 //! moment.js locale configuration 37257 //! locale : Lithuanian (lt) 37258 //! author : Mindaugas MozÅ«ras : https://github.com/mmozuras 37259 37260 var lt__units = { 37261 'm' : 'minutÄ_minutÄs_minutÄ', 37262 'mm': 'minutÄs_minuÄių_minutes', 37263 'h' : 'valanda_valandos_valandÄ ', 37264 'hh': 'valandos_valandų_valandas', 37265 'd' : 'diena_dienos_dienÄ ', 37266 'dd': 'dienos_dienų_dienas', 37267 'M' : 'mÄnuo_mÄnesio_mÄnesį', 37268 'MM': 'mÄnesiai_mÄnesių_mÄnesius', 37269 'y' : 'metai_metų_metus', 37270 'yy': 'metai_metų_metus' 37271 }, 37272 weekDays = 'sekmadienis_pirmadienis_antradienis_treÄiadienis_ketvirtadienis_penktadienis_Å¡eÅ¡tadienis'.split('_'); 37273 function translateSeconds(number, withoutSuffix, key, isFuture) { 37274 if (withoutSuffix) { 37275 return 'kelios sekundÄs'; 37276 } else { 37277 return isFuture ? 'kelių sekundžių' : 'kelias sekundes'; 37278 } 37279 } 37280 function lt__monthsCaseReplace(m, format) { 37281 var months = { 37282 'nominative': 'sausis_vasaris_kovas_balandis_gegužÄ_birželis_liepa_rugpjÅ«tis_rugsÄjis_spalis_lapkritis_gruodis'.split('_'), 37283 'accusative': 'sausio_vasario_kovo_balandžio_gegužÄs_birželio_liepos_rugpjÅ«Äio_rugsÄjo_spalio_lapkriÄio_gruodžio'.split('_') 37284 }, 37285 nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ? 37286 'accusative' : 37287 'nominative'; 37288 return months[nounCase][m.month()]; 37289 } 37290 function translateSingular(number, withoutSuffix, key, isFuture) { 37291 return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]); 37292 } 37293 function special(number) { 37294 return number % 10 === 0 || (number > 10 && number < 20); 37295 } 37296 function forms(key) { 37297 return lt__units[key].split('_'); 37298 } 37299 function lt__translate(number, withoutSuffix, key, isFuture) { 37300 var result = number + ' '; 37301 if (number === 1) { 37302 return result + translateSingular(number, withoutSuffix, key[
373020], isFuture); 37303 } else if (withoutSuffix) { 37304 return result + (special(number) ? forms(key)[1] : forms(key)[0]); 37305 } else { 37306 if (isFuture) { 37307 return result + forms(key)[1]; 37308 } else { 37309 return result + (special(number) ? forms(key)[1] : forms(key)[2]); 37310 } 37311 } 37312 } 37313 function relativeWeekDay(moment, format) { 37314 var nominative = format.indexOf('dddd HH:mm') === -1, 37315 weekDay = weekDays[moment.day()]; 37316 return nominative ? weekDay : weekDay.substring(0, weekDay.length - 2) + 'į'; 37317 } 37318 37319 var lt = _moment__default.defineLocale('lt', { 37320 months : lt__monthsCaseReplace, 37321 monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'), 37322 weekdays : relativeWeekDay, 37323 weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Å eÅ¡'.split('_'), 37324 weekdaysMin : 'S_P_A_T_K_Pn_Å '.split('_'), 37325 longDateFormat : { 37326 LT : 'HH:mm', 37327 LTS : 'HH:mm:ss', 37328 L : 'YYYY-MM-DD', 37329 LL : 'YYYY [m.] MMMM D [d.]', 37330 LLL : 'YYYY [m.] MMMM D [d.], HH:mm [val.]', 37331 LLLL : 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]', 37332 l : 'YYYY-MM-DD', 37333 ll : 'YYYY [m.] MMMM D [d.]', 37334 lll : 'YYYY [m.] MMMM D [d.], HH:mm [val.]', 37335 llll : 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]' 37336 }, 37337 calendar : { 37338 sameDay : '[Å iandien] LT', 37339 nextDay : '[Rytoj] LT', 37340 nextWeek : 'dddd LT', 37341 lastDay : '[Vakar] LT', 37342 lastWeek : '[PraÄjusį] dddd LT', 37343 sameElse : 'L' 37344 }, 37345 relativeTime : { 37346 future : 'po %s', 37347 past : 'prieÅ¡ %s', 37348 s : translateSeconds, 37349 m : translateSingular, 37350 mm : lt__translate, 37351 h : translateSingular, 37352 hh : lt__translate, 37353 d : translateSingular, 37354 dd : lt__translate, 37355 M : translateSingular, 37356 MM : lt__translate, 37357 y : translateSingular, 37358 yy : lt__translate 37359 }, 37360 ordinalParse: /\d{1,2}-oji/, 37361 ordinal : function (number) { 37362 return number + '-oji'; 37363 }, 37364 week : { 37365 dow : 1, // Monday is the first day of the week. 37366 doy : 4 // The week that contains Jan 4th is the first week of the year. 37367 } 37368 }); 37369 37370 //! moment.js locale configuration 37371 //! locale : latvian (lv) 37372 //! author : Kristaps Karlsons : https://github.com/skakri 37373 //! author : JÄnis Elmeris : https://github.com/JanisE 37374 37375 var lv__units = { 37376 'm': 'minÅ«tes_minÅ«tÄm_minÅ«te_minÅ«tes'.split('_'), 37377 'mm': 'minÅ«tes_minÅ«tÄm_minÅ«te_minÅ«tes'.split('_'), 37378 'h': 'stundas_stundÄm_stunda_stundas'.split('_'), 37379 'hh': 'stundas_stundÄm_stunda_stundas'.split('_'), 37380 'd': 'dienas_dienÄm_diena_dienas'.split('_'), 37381 'dd': 'dienas_dienÄm_diena_dienas'.split('_'), 37382 'M': 'mÄneÅ¡a_mÄneÅ¡iem_mÄnesis_mÄneÅ¡i'.split('_'), 37383 'MM': 'mÄneÅ¡a_mÄneÅ¡iem_mÄnesis_mÄneÅ¡i'.split('_'), 37384 'y': 'gada_gadiem_gads_gadi'.split('_'), 37385 'yy': 'gada_gadiem_gads_gadi'.split('_') 37386 }; 37387 /** 37388 * @param withoutSuffix boolean true = a length of time; false = before/after a period of time. 37389 */ 37390 function lv__format(forms, number, withoutSuffix) { 37391 if (withoutSuffix) { 37392 // E.g. "21 minÅ«te", "3 minÅ«tes". 37393 return number % 10 === 1 && number !== 11 ? forms[2] : forms[3]; 37394 } else { 37395 // E.g. "21 minÅ«tes" as in "pÄc 21 minÅ«tes". 37396 // E.g. "3 minÅ«tÄm" as in "pÄc 3 minÅ«tÄm". 37397 return number % 10 === 1 && number !== 11 ? forms[0] : forms[1]; 37398 } 37399 } 37400 function lv__relativeTimeWithPlural(number, withoutSuffix, key) { 37401 return number + ' ' + lv__format(lv__units[key], number, withoutSuffix); 37402 } 37403 function relativeTimeWithSingular(number, withoutSuffix, key) { 37404 return lv__format(lv__units[key], number, withoutSuffix); 37405 } 37406 function relativeSeconds(number, withoutSuffix) { 37407 return withoutSuffix ? 'dažas sekundes' : 'dažÄm sekundÄm'; 37408 } 37409 37410 var lv = _moment__default.defineLocale('lv', { 37411 months : 'janvÄris_februÄris_marts_aprÄ«lis_maijs_jÅ«nijs_
vendor: 20,984 bytes, lines 37411-37934
37411jÅ«lijs_augusts_septembris_oktobris_novembris_decembris'.split('_'), 37412 monthsShort : 'jan_feb_mar_apr_mai_jÅ«n_jÅ«l_aug_sep_okt_nov_dec'.split('_'), 37413 weekdays : 'svÄtdiena_pirmdiena_otrdiena_treÅ¡diena_ceturtdiena_piektdiena_sestdiena'.split('_'), 37414 weekdaysShort : 'Sv_P_O_T_C_Pk_S'.split('_'), 37415 weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'), 37416 longDateFormat : { 37417 LT : 'HH:mm', 37418 LTS : 'HH:mm:ss', 37419 L : 'DD.MM.YYYY.', 37420 LL : 'YYYY. [gada] D. MMMM', 37421 LLL : 'YYYY. [gada] D. MMMM, HH:mm', 37422 LLLL : 'YYYY. [gada] D. MMMM, dddd, HH:mm' 37423 }, 37424 calendar : { 37425 sameDay : '[Å odien pulksten] LT', 37426 nextDay : '[RÄ«t pulksten] LT', 37427 nextWeek : 'dddd [pulksten] LT', 37428 lastDay : '[Vakar pulksten] LT', 37429 lastWeek : '[PagÄjuÅ¡Ä] dddd [pulksten] LT', 37430 sameElse : 'L' 37431 }, 37432 relativeTime : { 37433 future : 'pÄc %s', 37434 past : 'pirms %s', 37435 s : relativeSeconds, 37436 m : relativeTimeWithSingular, 37437 mm : lv__relativeTimeWithPlural, 37438 h : relativeTimeWithSingular, 37439 hh : lv__relativeTimeWithPlural, 37440 d : relativeTimeWithSingular, 37441 dd : lv__relativeTimeWithPlural, 37442 M : relativeTimeWithSingular, 37443 MM : lv__relativeTimeWithPlural, 37444 y : relativeTimeWithSingular, 37445 yy : lv__relativeTimeWithPlural 37446 }, 37447 ordinalParse: /\d{1,2}\./, 37448 ordinal : '%d.', 37449 week : { 37450 dow : 1, // Monday is the first day of the week. 37451 doy : 4 // The week that contains Jan 4th is the first week of the year. 37452 } 37453 }); 37454 37455 //! moment.js locale configuration 37456 //! locale : Montenegrin (me) 37457 //! author : Miodrag NikaÄ <[email protected]> : https://github.com/miodragnikac 37458 37459 var me__translator = { 37460 words: { //Different grammatical cases 37461 m: ['jedan minut', 'jednog minuta'], 37462 mm: ['minut', 'minuta', 'minuta'], 37463 h: ['jedan sat', 'jednog sata'], 37464 hh: ['sat', 'sata', 'sati'], 37465 dd: ['dan', 'dana', 'dana'], 37466 MM: ['mjesec', 'mjeseca', 'mjeseci'], 37467 yy: ['godina', 'godine', 'godina'] 37468 }, 37469 correctGrammaticalCase: function (number, wordKey) { 37470 return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); 37471 }, 37472 translate: function (number, withoutSuffix, key) { 37473 var wordKey = me__translator.words[key]; 37474 if (key.length === 1) { 37475 return withoutSuffix ? wordKey[0] : wordKey[1]; 37476 } else { 37477 return number + ' ' + me__translator.correctGrammaticalCase(number, wordKey); 37478 } 37479 } 37480 }; 37481 37482 var me = _moment__default.defineLocale('me', { 37483 months: ['januar', 'februar', 'mart', 'april', 'maj', 'jun', 'jul', 'avgust', 'septembar', 'oktobar', 'novembar', 'decembar'], 37484 monthsShort: ['jan.', 'feb.', 'mar.', 'apr.', 'maj', 'jun', 'jul', 'avg.', 'sep.', 'okt.', 'nov.', 'dec.'], 37485 weekdays: ['nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'Äetvrtak', 'petak', 'subota'], 37486 weekdaysShort: ['ned.', 'pon.', 'uto.', 'sri.', 'Äet.', 'pet.', 'sub.'], 37487 weekdaysMin: ['ne', 'po', 'ut', 'sr', 'Äe', 'pe', 'su'], 37488 longDateFormat: { 37489 LT: 'H:mm', 37490 LTS : 'H:mm:ss', 37491 L: 'DD. MM. YYYY', 37492 LL: 'D. MMMM YYYY', 37493 LLL: 'D. MMMM YYYY H:mm', 37494 LLLL: 'dddd, D. MMMM YYYY H:mm' 37495 }, 37496 calendar: { 37497 sameDay: '[danas u] LT', 37498 nextDay: '[sjutra u] LT', 37499 37500 nextWeek: function () { 37501 switch (this.day()) { 37502 case 0: 37503 return '[u] [nedjelju] [u] LT'; 37504 case 3: 37505 return '[u] [srijedu] [u] LT'; 37506 case 6: 37507 return '[u] [subotu] [u] LT'; 37508 case 1: 37509 case 2: 37510 case 4: 37511 case 5: 37512 return '[u] dddd [u] LT'; 37513 } 37514 }, 37515 lastDay : '[juÄe u] LT', 37516 lastWeek : function () { 37517 var lastWeekDays = [ 37518 '[proÅ¡le] [nedjelje] [u] LT', 37519 '[proÅ¡log] [ponedjeljka] [u] LT', 37520 '[proÅ¡log] [utorka] [u] LT', 37521 '[proÅ¡le] [srijede] [u] LT', 37522 '[proÅ¡log] [Äetvrtka] [u] LT', 37523 '[proÅ¡log] [petka] [u] LT', 37524 '[proÅ¡le] [subote] [u] LT' 37525 ]; 37526 return lastWeekDays[this.day()]; 37527 }, 37528 sameElse : 'L' 37529 }, 37530 relativeTime : { 37531 future : 'za %s', 37532 past : 'prije %s', 37533 s : 'nekoliko sekundi', 37534 m : me__translator.translate, 37535 mm : me__translator.translate, 37536 h : me__translator.translate, 37537 hh : me__translator.translate, 37538 d : 'dan', 37539 dd : me__translator.translate, 37540 M : 'mjesec', 37541 MM : me__translator.translate, 37542 y : 'godinu', 37543 yy : me__translator.translate 37544 }, 37545 ordinalParse: /\d{1,2}\./, 37546 ordinal : '%d.', 37547 week : { 37548 dow : 1, // Monday is the first day of the week. 37549 doy : 7 // The week that contains Jan 1st is the first week of the year. 37550 } 37551 }); 37552 37553 //! moment.js locale configuration 37554 //! locale : macedonian (mk) 37555 //! author : Borislav Mickov : https://github.com/B0k0 37556 37557 var mk = _moment__default.defineLocale('mk', { 37558 months : 'ÑанÑаÑи_ÑевÑÑаÑи_маÑÑ_апÑил_маÑ_ÑÑни_ÑÑли_авгÑÑÑ_ÑепÑемвÑи_окÑомвÑи_ноемвÑи_декемвÑи'.split('_'), 37559 monthsShort : 'Ñан_Ñев_маÑ_апÑ_маÑ_ÑÑн_ÑÑл_авг_Ñеп_окÑ_ное_дек'.split('_'), 37560 weekdays : 'недела_понеделник_вÑоÑник_ÑÑеда_ÑеÑвÑÑок_пеÑок_ÑабоÑа'.split('_'), 37561 weekdaysShort : 'нед_пон_вÑо_ÑÑе_ÑеÑ_пеÑ_Ñаб'.split('_'), 37562 weekdaysMin : 'нe_пo_вÑ_ÑÑ_Ñе_пе_Ña'.split('_'), 37563 longDateFormat : { 37564 LT : 'H:mm', 37565 LTS : 'H:mm:ss', 37566 L : 'D.MM.YYYY', 37567 LL : 'D MMMM YYYY', 37568 LLL : 'D MMMM YYYY H:mm', 37569 LLLL : 'dddd, D MMMM YYYY H:mm' 37570 }, 37571 calendar : { 37572 sameDay : '[ÐÐµÐ½ÐµÑ Ð²Ð¾] LT', 37573 nextDay : '[УÑÑе во] LT', 37574 nextWeek : 'dddd [во] LT', 37575 lastDay : '[ÐÑеÑа во] LT', 37576 lastWeek : function () { 37577 switch (this.day()) { 37578 case 0: 37579 case 3: 37580 case 6: 37581 return '[Ðо изминаÑаÑа] dddd [во] LT'; 37582 case 1: 37583 case 2: 37584 case 4: 37585 case 5: 37586 return '[Ðо изминаÑиоÑ] dddd [во] LT'; 37587 } 37588 }, 37589 sameElse : 'L' 37590 }, 37591 relativeTime : { 37592 future : 'поÑле %s', 37593 past : 'пÑед %s', 37594 s : 'Ð½ÐµÐºÐ¾Ð»ÐºÑ ÑекÑнди', 37595 m : 'минÑÑа', 37596 mm : '%d минÑÑи', 37597 h : 'ÑаÑ', 37598 hh : '%d ÑаÑа', 37599 d : 'ден', 37600 dd : '%d дена', 37601 M : 'меÑеÑ', 37602 MM : '%d меÑеÑи', 37603 y : 'година', 37604 yy : '%d години' 37605 }, 37606 ordinalParse: /\d{1,2}-(ев|ен|Ñи|ви|Ñи|ми)/, 37607 ordinal : function (number) { 37608 var lastDigit = number % 10, 37609 last2Digits = number % 100; 37610 if (number === 0) { 37611 return number + '-ев'; 37612 } else if (last2Digits === 0) { 37613 return number + '-ен'; 37614 } else if (last2Digits > 10 && last2Digits < 20) { 37615 return number + '-Ñи'; 37616 } else if (lastDigit === 1) { 37617 return number + '-ви'; 37618 } else if (lastDigit === 2) { 37619 return number + '-Ñи'; 37620 } else if (lastDigit === 7 || lastDigit === 8) { 37621 return number + '-ми'; 37622 } else { 37623 return number + '-Ñи'; 37624 } 37625 }, 37626 week : { 37627 dow : 1, // Monday is the first day of the week. 37628 doy : 7 // The week that contains Jan 1st is the first week of the year. 37629 } 37630 }); 37631 37632 //! moment.js locale configuration 37633 //! locale : malayalam (ml) 37634 //! author : Floyd Pink : https://github.com/floydpink 37635 37636 var ml = _moment__default.defineLocale('ml', { 37637 months : 'à´à´¨àµà´µà´°à´¿_à´«àµà´¬àµà´°àµà´µà´°à´¿_മാർà´àµà´àµ_à´à´ªàµà´°à´¿àµ½_à´®àµà´¯àµ_à´àµàµº_à´àµà´²àµ_à´à´à´¸àµà´±àµà´±àµ_à´¸àµà´ªàµà´±àµà´±à´à´¬àµ¼_à´à´àµà´àµà´¬àµ¼_നവà´à´¬àµ¼_à´¡à´¿à´¸à´à´¬àµ¼'.split('_'), 37638 monthsShort : 'à´à´¨àµ._à´«àµà´¬àµà´°àµ._മാർ._à´à´ªàµà´°à´¿._à´®àµà´¯àµ_à´àµàµº_à´àµà´²àµ._à´à´._à´¸àµà´ªàµà´±àµà´±._à´à´àµà´àµ._നവà´._à´¡à´¿à´¸à´.'.split('_'), 37639 weekdays : 'à´à´¾à´¯à´±à´¾à´´àµà´_തിà´àµà´à´³à´¾à´´àµà´_à´àµà´µàµà´µà´¾à´´àµà´_à´¬àµà´§à´¨à´¾à´´àµà´_à´µàµà´¯à´¾à´´à´¾à´´àµà´_à´µàµà´³àµà´³à´¿à´¯à´¾à´´àµà´_ശനിയാഴàµà´'.split('_'), 37640 weekdaysShort : 'à´à´¾à´¯àµ¼_തിà´àµà´àµ¾_à´àµà´µàµà´µ_à´¬àµà´§àµ»_à´µàµà´¯à´¾à´´à´_à´µàµà´³àµà´³à´¿_ശനി'.split('_'), 37641 weekdaysMin : 'à´à´¾_തി_à´àµ_à´¬àµ_à´µàµà´¯à´¾_à´µàµ_à´¶'.split('_'), 37642 longDateFormat : { 37643 LT : 'A h:mm -à´¨àµ', 37644 LTS : 'A h:mm:ss -à´¨àµ', 37645 L : 'DD/MM/YYYY', 37646 LL : 'D MMMM YYYY', 37647 LLL : 'D MMMM YYYY, A h:mm -à´¨àµ', 37648 LLLL : 'dddd, D MMMM YYYY, A h:mm -à´¨àµ' 37649 }, 37650 calendar : { 37651 sameDay : '[à´à´¨àµà´¨àµ] LT', 37652 nextDay : '[നാളàµ] LT', 37653 nextWeek : 'dddd, LT', 37654 lastDay : '[à´à´¨àµà´¨à´²àµ] LT', 37655 lastWeek : '[à´à´´à´¿à´àµà´] dddd, LT', 37656 sameElse : 'L' 37657 }, 37658 relativeTime : { 37659 future : '%s à´à´´à´¿à´àµà´àµ', 37660 past : '%s à´®àµàµ»à´ªàµ', 37661 s : 'ഠൽപ നിമിഷà´àµà´àµ¾', 37662 m : 'à´à´°àµ മിനിറàµà´±àµ', 37663 mm : '%d മിനിറàµà´±àµ', 37664 h : 'à´à´°àµ മണിà´àµà´àµàµ¼', 37665 hh : '%d മണിà´àµà´àµàµ¼', 37666 d : 'à´à´°àµ ദിവസà´', 37667 dd : '%d ദിവസà´', 37668 M : 'à´à´°àµ മാസà´', 37669 MM : '%d മാസà´', 37670 y : 'à´à´°àµ വർഷà´', 37671 yy : '%d വർഷà´' 37672 }, 37673 meridiemParse: /രാതàµà´°à´¿|രാവിലàµ|à´à´àµà´ à´à´´à´¿à´àµà´àµ|à´µàµà´àµà´¨àµà´¨àµà´°à´|രാതàµà´°à´¿/i, 37674 isPM : function (input) { 37675 return /^(à´à´àµà´ à´à´´à´¿à´àµà´àµ|à´µàµà´àµà´¨àµà´¨àµà´°à´|രാതàµà´°à´¿)$/.test(input); 37676 }, 37677 meridiem : function (hour, minute, isLower) { 37678 if (hour < 4) { 37679 return 'രാതàµà´°à´¿'; 37680 } else if (hour < 12) { 37681 return 'രാവിലàµ'; 37682 } else if (hour < 17) { 37683 return 'à´à´àµà´ à´à´´à´¿à´àµà´àµ'; 37684 } else if (hour < 20) { 37685 return 'à´µàµà´àµà´¨àµà´¨àµà´°à´'; 37686 } else { 37687 return 'രാതàµà´°à´¿'; 37688 } 37689 } 37690 }); 37691 37692 //! moment.js locale configuration 37693 //! locale : Marathi (mr) 37694 //! author : Harshad Kale : https://github.com/kalehv 37695 37696 var mr__symbolMap = { 37697 '1': '१', 37698 '2': '२', 37699 '3': '३', 37700 '4': '४', 37701 '5': '५', 37702 '6': '६', 37703 '7': 'à¥', 37704 '8': '८', 37705 '9': '९', 37706 '0': '०' 37707 }, 37708 mr__numberMap = { 37709 '१': '1', 37710 '२': '2', 37711 '३': '3', 37712 '४': '4', 37713 '५': '5', 37714 '६': '6', 37715 'à¥': '7', 37716 '८': '8', 37717 '९': '9', 37718 '०': '0' 37719 }; 37720 37721 var mr = _moment__default.defineLocale('mr', { 37722 months : 'à¤à¤¾à¤¨à¥à¤µà¤¾à¤°à¥_फà¥à¤¬à¥à¤°à¥à¤µà¤¾à¤°à¥_मारà¥à¤_à¤à¤ªà¥à¤°à¤¿à¤²_मà¥_à¤à¥à¤¨_à¤à¥à¤²à¥_à¤à¤à¤¸à¥à¤_सपà¥à¤à¥à¤à¤¬à¤°_à¤à¤à¥à¤à¥à¤¬à¤°_नà¥à¤µà¥à¤¹à¥à¤à¤¬à¤°_डिसà¥à¤à¤¬à¤°'.split('_'), 37723 monthsShort: 'à¤à¤¾à¤¨à¥._फà¥à¤¬à¥à¤°à¥._मारà¥à¤._à¤à¤ªà¥à¤°à¤¿._मà¥._à¤à¥à¤¨._à¤à¥à¤²à¥._à¤à¤._सपà¥à¤à¥à¤._à¤à¤à¥à¤à¥._नà¥à¤µà¥à¤¹à¥à¤._डिसà¥à¤.'.split('_'), 37724 weekdays : 'रविवार_सà¥à¤®à¤µà¤¾à¤°_मà¤à¤à¤³à¤µà¤¾à¤°_बà¥à¤§à¤µà¤¾à¤°_à¤à¥à¤°à¥à¤µà¤¾à¤°_शà¥à¤à¥à¤°à¤µà¤¾à¤°_शनिवार'.split('_'), 37725 weekdaysShort : 'रवि_सà¥à¤®_मà¤à¤à¤³_बà¥à¤§_à¤à¥à¤°à¥_शà¥à¤à¥à¤°_शनि'.split('_'), 37726 weekdaysMin : 'र_सà¥_मà¤_बà¥_à¤à¥_शà¥_श'.split('_'), 37727 longDateFormat : { 37728 LT : 'A h:mm वाà¤à¤¤à¤¾', 37729 LTS : 'A h:mm:ss वाà¤à¤¤à¤¾', 37730 L : 'DD/MM/YYYY', 37731 LL : 'D MMMM YYYY', 37732 LLL : 'D MMMM YYYY, A h:mm वाà¤à¤¤à¤¾', 37733 LLLL : 'dddd, D MMMM YYYY, A h:mm वाà¤à¤¤à¤¾' 37734 }, 37735 calendar : { 37736 sameDay : '[à¤à¤] LT', 37737 nextDay : '[à¤à¤¦à¥à¤¯à¤¾] LT', 37738 nextWeek : 'dddd, LT', 37739 lastDay : '[à¤à¤¾à¤²] LT', 37740 lastWeek: '[माà¤à¥à¤²] dddd, LT', 37741 sameElse : 'L' 37742 }, 37743 relativeTime : { 37744 future : '%s नà¤à¤¤à¤°', 37745 past : '%s पà¥à¤°à¥à¤µà¥', 37746 s : 'सà¥à¤à¤à¤¦', 37747 m: 'à¤à¤ मिनिà¤', 37748 mm: '%d मिनिà¤à¥', 37749 h : 'à¤à¤ तास', 37750 hh : '%d तास', 37751 d : 'à¤à¤ दिवस', 37752 dd : '%d दिवस', 37753 M : 'à¤à¤ महिना', 37754 MM : '%d महिनà¥', 37755 y : 'à¤à¤ वरà¥à¤·', 37756 yy : '%d वरà¥à¤·à¥' 37757 }, 37758 preparse: function (string) { 37759 return string.replace(/[१२३४५६à¥à¥®à¥¯à¥¦]/g, function (match) { 37760 return mr__numberMap[match]; 37761 }); 37762 }, 37763 postformat: function (string) { 37764 return string.replace(/\d/g, function (match) { 37765 return mr__symbolMap[match]; 37766 }); 37767 }, 37768 meridiemParse: /रातà¥à¤°à¥|सà¤à¤¾à¤³à¥|दà¥à¤ªà¤¾à¤°à¥|सायà¤à¤à¤¾à¤³à¥/, 37769 meridiemHour : function (hour, meridiem) { 37770 if (hour === 12) { 37771 hour = 0; 37772 } 37773 if (meridiem === 'रातà¥à¤°à¥') { 37774 return hour < 4 ? hour : hour + 12; 37775 } else if (meridiem === 'सà¤à¤¾à¤³à¥') { 37776 return hour; 37777 } else if (meridiem === 'दà¥à¤ªà¤¾à¤°à¥') { 37778 return hour >= 10 ? hour : hour + 12; 37779 } else if (meridiem === 'सायà¤à¤à¤¾à¤³à¥') { 37780 return hour + 12; 37781 } 37782 }, 37783 meridiem: function (hour, minute, isLower) { 37784 if (hour < 4) { 37785 return 'रातà¥à¤°à¥'; 37786 } else if (hour < 10) { 37787 return 'सà¤à¤¾à¤³à¥'; 37788 } else if (hour < 17) { 37789 return 'दà¥à¤ªà¤¾à¤°à¥'; 37790 } else if (hour < 20) { 37791 return 'सायà¤à¤à¤¾à¤³à¥'; 37792 } else { 37793 return 'रातà¥à¤°à¥'; 37794 } 37795 }, 37796 week : { 37797 dow : 0, // Sunday is the first day of the week. 37798 doy : 6 // The week that contains Jan 1st is the first week of the year. 37799 } 37800 }); 37801 37802 //! moment.js locale configuration 37803 //! locale : Bahasa Malaysia (ms-MY) 37804 //! author : Weldan Jamili : https://github.com/weldan 37805 37806 var ms_my = _moment__default.defineLocale('ms-my', { 37807 months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'), 37808 monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), 37809 weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), 37810 weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), 37811 weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), 37812 longDateFormat : { 37813 LT : 'HH.mm', 37814 LTS : 'HH.mm.ss', 37815 L : 'DD/MM/YYYY', 37816 LL : 'D MMMM YYYY', 37817 LLL : 'D MMMM YYYY [pukul] HH.mm', 37818 LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' 37819 }, 37820 meridiemParse: /pagi|tengahari|petang|malam/, 37821 meridiemHour: function (hour, meridiem) { 37822 if (hour === 12) { 37823 hour = 0; 37824 } 37825 if (meridiem === 'pagi') { 37826 return hour; 37827 } else if (meridiem === 'tengahari') { 37828 return hour >= 11 ? hour : hour + 12; 37829 } else if (meridiem === 'petang' || meridiem === 'malam') { 37830 return hour + 12; 37831 } 37832 }, 37833 meridiem : function (hours, minutes, isLower) { 37834 if (hours < 11) { 37835 return 'pagi'; 37836 } else if (hours < 15) { 37837 return 'tengahari'; 37838 } else if (hours < 19) { 37839 return 'petang'; 37840 } else { 37841 return 'malam'; 37842 } 37843 }, 37844 calendar : { 37845 sameDay : '[Hari ini pukul] LT', 37846 nextDay : '[Esok pukul] LT', 37847 nextWeek : 'dddd [pukul] LT', 37848 lastDay : '[Kelmarin pukul] LT', 37849 lastWeek : 'dddd [lepas pukul] LT', 37850 sameElse : 'L' 37851 }, 37852 relativeTime : { 37853 future : 'dalam %s', 37854 past : '%s yang lepas', 37855 s : 'beberapa saat', 37856 m : 'seminit', 37857 mm : '%d minit', 37858 h : 'sejam', 37859 hh : '%d jam', 37860 d : 'sehari', 37861 dd : '%d hari', 37862 M : 'sebulan', 37863 MM : '%d bulan', 37864 y : 'setahun', 37865 yy : '%d tahun' 37866 }, 37867 week : { 37868 dow : 1, // Monday is the first day of the week. 37869 doy : 7 // The week that contains Jan 1st is the first week of the year. 37870 } 37871 }); 37872 37873 //! moment.js locale configuration 37874 //! locale : Bahasa Malaysia (ms-MY) 37875 //! author : Weldan Jamili : https://github.com/weldan 37876 37877 var locale_ms = _moment__default.defineLocale('ms', { 37878 months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'), 37879 monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), 37880 weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), 37881 weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), 37882 weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), 37883 longDateFormat : { 37884 LT : 'HH.mm', 37885 LTS : 'HH.mm.ss', 37886 L : 'DD/MM/YYYY', 37887 LL : 'D MMMM YYYY', 37888 LLL : 'D MMMM YYYY [pukul] HH.mm', 37889 LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' 37890 }, 37891 meridiemParse: /pagi|tengahari|petang|malam/, 37892 meridiemHour: function (hour, meridiem) { 37893 if (hour === 12) { 37894 hour = 0; 37895 } 37896 if (meridiem === 'pagi') { 37897 return hour; 37898 } else if (meridiem === 'tengahari') { 37899 return hour >= 11 ? hour : hour + 12; 37900 } else if (meridiem === 'petang' || meridiem === 'malam') { 37901 return hour + 12; 37902 } 37903 }, 37904 meridiem : function (hours, minutes, isLower) { 37905 if (hours < 11) { 37906 return 'pagi'; 37907 } else if (hours < 15) { 37908 return 'tengahari'; 37909 } else if (hours < 19) { 37910 return 'petang'; 37911 } else { 37912 return 'malam'; 37913 } 37914 }, 37915 calendar : { 37916 sameDay : '[Hari ini pukul] LT', 37917 nextDay : '[Esok pukul] LT', 37918 nextWeek : 'dddd [pukul] LT', 37919 lastDay : '[Kelmarin pukul] LT', 37920 lastWeek : 'dddd [lepas pukul] LT', 37921 sameElse : 'L' 37922 }, 37923 relativeTime : { 37924 future : 'dalam %s', 37925 past : '%s yang lepas', 37926 s : 'beberapa saat', 37927 m : 'seminit', 37928 mm : '%d minit', 37929 h : 'sejam', 37930 hh : '%d jam', 37931 d : 'sehari', 37932 dd : '%d hari', 37933 M : 'sebulan', 37934 MM : '%d bulan',
37935 y : 'setahun', 37936 yy : '%d tahun' 37937 }, 37938 week : { 37939 dow : 1, // Monday is the first day of the week. 37940 doy : 7 // The week that contains Jan 1st is the first week of the year. 37941 } 37942 }); 37943 37944 //! moment.js locale configuration 37945 //! locale : Burmese (my) 37946 //! author : Squar team, mysquar.com 37947 37948 var my__symbolMap = { 37949 '1': 'á', 37950 '2': 'á', 37951 '3': 'á', 37952 '4': 'á', 37953 '5': 'á ', 37954 '6': 'á', 37955 '7': 'á', 37956 '8': 'á', 37957 '9': 'á', 37958 '0': 'á' 37959 }, my__numberMap = { 37960 'á': '1', 37961 'á': '2', 37962 'á': '3', 37963 'á': '4', 37964 'á ': '5', 37965 'á': '6', 37966 'á': '7', 37967 'á': '8', 37968 'á': '9', 37969 'á': '0' 37970 }; 37971 37972 var my = _moment__default.defineLocale('my', { 37973 months: 'áááºááá«áá®_áá±áá±á¬áºáá«áá®_áááº_á§áá¼á®_áá±_áá½ááº_áá°ááá¯ááº_áá¼áá¯ááº_á ááºáááºáá¬_á¡á±á¬ááºááá¯áá¬_ááá¯áááºáá¬_áá®áááºáá¬'.split('_'), 37974 monthsShort: 'áááº_áá±_áááº_áá¼á®_áá±_áá½ááº_ááá¯ááº_áá¼_á ááº_á¡á±á¬ááº_ááá¯_áá®'.split('_'), 37975 weekdays: 'ááááºá¹ááá½á±_ááááºá¹áá¬_á¡ááºá¹áá«_áá¯áá¹ááá°á¸_áá¼á¬áááá±á¸_áá±á¬áá¼á¬_á áá±'.split('_'), 37976 weekdaysShort: 'áá½á±_áá¬_áá«_áá°á¸_áá¼á¬_áá±á¬_áá±'.split('_'), 37977 weekdaysMin: 'áá½á±_áá¬_áá«_áá°á¸_áá¼á¬_áá±á¬_áá±'.split('_'), 37978 37979 longDateFormat: { 37980 LT: 'HH:mm', 37981 LTS: 'HH:mm:ss', 37982 L: 'DD/MM/YYYY', 37983 LL: 'D MMMM YYYY', 37984 LLL: 'D MMMM YYYY HH:mm', 37985 LLLL: 'dddd D MMMM YYYY HH:mm' 37986 }, 37987 calendar: { 37988 sameDay: '[ááá±.] LT [áá¾á¬]', 37989 nextDay: '[ááááºáá¼ááº] LT [áá¾á¬]', 37990 nextWeek: 'dddd LT [áá¾á¬]', 37991 lastDay: '[ááá±.á] LT [áá¾á¬]', 37992 lastWeek: '[áá¼á®á¸áá²á·áá±á¬] dddd LT [áá¾á¬]', 37993 sameElse: 'L' 37994 }, 37995 relativeTime: { 37996 future: 'áá¬áááºá· %s áá¾á¬', 37997 past: 'áá½ááºáá²á·áá±á¬ %s á', 37998 s: 'á áá¹áááº.á¡áááºá¸áááº', 37999 m: 'áá áºáááá áº', 38000 mm: '%d áááá áº', 38001 h: 'áá áºáá¬áá®', 38002 hh: '%d áá¬áá®', 38003 d: 'áá áºáááº', 38004 dd: '%d áááº', 38005 M: 'áá áºá', 38006 MM: '%d á', 38007 y: 'áá áºáá¾á áº', 38008 yy: '%d áá¾á áº' 38009 }, 38010 preparse: function (string) { 38011 return string.replace(/[ááááá ááááá]/g, function (match) { 38012 return my__numberMap[match]; 38013 }); 38014 }, 38015 postformat: function (string) { 38016 return string.replace(/\d/g, function (match) { 38017 return my__symbolMap[match]; 38018 }); 38019 }, 38020 week: { 38021 dow: 1, // Monday is the first day of the week. 38022 doy: 4 // The week that contains Jan 1st is the first week of the year. 38023 } 38024 }); 38025 38026 //! moment.js locale configuration 38027 //! locale : norwegian bokmÃ¥l (nb) 38028 //! authors : Espen Hovlandsdal : https://github.com/rexxars 38029 //! Sigurd Gartmann : https://github.com/sigurdga 38030 38031 var nb = _moment__default.defineLocale('nb', { 38032 months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'), 38033 monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), 38034 weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), 38035 weekdaysShort : 'søn_man_tirs_ons_tors_fre_lør'.split('_'), 38036 weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'), 38037 longDateFormat : { 38038 LT : 'H.mm', 38039 LTS : 'H.mm.ss', 38040 L : 'DD.MM.YYYY', 38041 LL : 'D. MMMM YYYY', 38042 LLL : 'D. MMMM YYYY [kl.] H.mm', 38043 LLLL : 'dddd D. MMMM YYYY [kl.] H.mm' 38044 }, 38045 calendar : { 38046 sameDay: '[i dag kl.] LT', 38047 nextDay: '[i morgen kl.] LT', 38048 nextWeek: 'dddd [kl.] LT', 38049 lastDay: '[i gÃ¥r kl.] LT', 38050 lastWeek: '[forrige] dddd [kl.] LT', 38051 sameElse: 'L' 38052 }, 38053 relativeTime : { 38054 future : 'om %s', 38055 past : 'for %s siden', 38056 s : 'noen sekunder', 38057 m : 'ett minutt', 38058 mm : '%d minutter', 38059 h : 'en time', 38060 hh : '%d timer', 38061 d : 'en dag', 38062 dd : '%d dager', 38063 M : 'en mÃ¥ned', 38064 MM : '%d mÃ¥neder', 38065 y : 'ett Ã¥r', 38066 yy : '%d Ã¥r' 38067 }, 38068 ordinalParse: /\d{1,2}\./, 38069 ordinal : '%d.', 38070 week : { 38071 dow : 1, // Monday is the first day of the week. 38072 doy : 4 // The week that contains Jan 4th is the first week of the year. 38073 } 38074 }); 38075 38076 //! moment.js locale configuration 38077 //! locale : nepali/nepalese 38078 //! author : suvash : https://github.com/suvash 38079 38080 var ne__symbolMap = { 38081 '1': '१', 38082 '2': '२', 38083 '3': '३', 38084 '4': '४', 38085 '5': '५', 38086 '6': '६', 38087 '7': 'à¥', 38088 '8': '८', 38089 '9': '९', 38090 '0': '०' 38091 }, 38092 ne__numberMap = { 38093 '१': '1', 38094 '२': '2', 38095 '३': '3', 38096 '४': '4', 38097 '५': '5', 38098 '६': '6', 38099 'à¥': '7', 38100 '८': '8', 38101 '९': '9', 38102 '०': '0' 38103 }; 38104 38105 var ne = _moment__default.defineLocale('ne', { 38106 months : 'à¤à¤¨à¤µà¤°à¥_फà¥à¤¬à¥à¤°à¥à¤µà¤°à¥_मारà¥à¤_ठपà¥à¤°à¤¿à¤²_मà¤_à¤à¥à¤¨_à¤à¥à¤²à¤¾à¤_ठà¤à¤·à¥à¤_सà¥à¤ªà¥à¤à¥à¤®à¥à¤¬à¤°_ठà¤à¥à¤à¥à¤¬à¤°_नà¥à¤à¥à¤®à¥à¤¬à¤°_डिसà¥à¤®à¥à¤¬à¤°'.split('_'), 38107 monthsShort : 'à¤à¤¨._फà¥à¤¬à¥à¤°à¥._मारà¥à¤_ठपà¥à¤°à¤¿._मà¤_à¤à¥à¤¨_à¤à¥à¤²à¤¾à¤._ठà¤._सà¥à¤ªà¥à¤._ठà¤à¥à¤à¥._नà¥à¤à¥._डिसà¥.'.split('_'), 38108 weekdays : 'à¤à¤à¤¤à¤¬à¤¾à¤°_सà¥à¤®à¤¬à¤¾à¤°_मà¤à¥à¤à¤²à¤¬à¤¾à¤°_बà¥à¤§à¤¬à¤¾à¤°_बिहिबार_शà¥à¤à¥à¤°à¤¬à¤¾à¤°_शनिबार'.split('_'), 38109 weekdaysShort : 'à¤à¤à¤¤._सà¥à¤®._मà¤à¥à¤à¤²._बà¥à¤§._बिहि._शà¥à¤à¥à¤°._शनि.'.split('_'), 38110 weekdaysMin : 'à¤à¤._सà¥._मà¤à¥_बà¥._बि._शà¥._श.'.split('_'), 38111 longDateFormat : { 38112 LT : 'Aà¤à¥ h:mm बà¤à¥', 38113 LTS : 'Aà¤à¥ h:mm:ss बà¤à¥', 38114 L : 'DD/MM/YYYY', 38115 LL : 'D MMMM YYYY', 38116 LLL : 'D MMMM YYYY, Aà¤à¥ h:mm बà¤à¥', 38117 LLLL : 'dddd, D MMMM YYYY, Aà¤à¥ h:mm बà¤à¥' 38118 }, 38119 preparse: function (string) { 38120 return string.replace(/[१२३४५६à¥à¥®à¥¯à¥¦]/g, function (match) { 38121 return ne__numberMap[match]; 38122 }); 38123 }, 38124 postformat: function (string) { 38125 return string.replace(/\d/g, function (match) { 38126 return ne__symbolMap[match]; 38127 }); 38128 },
vendor: 17,167 bytes, lines 38129-38576
38129 meridiemParse: /रातà¥|बिहान|दिà¤à¤à¤¸à¥|बà¥à¤²à¥à¤à¤¾|साà¤à¤|रातà¥/, 38130 meridiemHour : function (hour, meridiem) { 38131 if (hour === 12) { 38132 hour = 0; 38133 } 38134 if (meridiem === 'रातà¥') { 38135 return hour < 3 ? hour : hour + 12; 38136 } else if (meridiem === 'बिहान') { 38137 return hour; 38138 } else if (meridiem === 'दिà¤à¤à¤¸à¥') { 38139 return hour >= 10 ? hour : hour + 12; 38140 } else if (meridiem === 'बà¥à¤²à¥à¤à¤¾' || meridiem === 'साà¤à¤') { 38141 return hour + 12; 38142 } 38143 }, 38144 meridiem : function (hour, minute, isLower) { 38145 if (hour < 3) { 38146 return 'रातà¥'; 38147 } else if (hour < 10) { 38148 return 'बिहान'; 38149 } else if (hour < 15) { 38150 return 'दिà¤à¤à¤¸à¥'; 38151 } else if (hour < 18) { 38152 return 'बà¥à¤²à¥à¤à¤¾'; 38153 } else if (hour < 20) { 38154 return 'साà¤à¤'; 38155 } else { 38156 return 'रातà¥'; 38157 } 38158 }, 38159 calendar : { 38160 sameDay : '[à¤à¤] LT', 38161 nextDay : '[à¤à¥à¤²à¥] LT', 38162 nextWeek : '[à¤à¤à¤à¤¦à¥] dddd[,] LT', 38163 lastDay : '[हिà¤à¥] LT', 38164 lastWeek : '[à¤à¤à¤à¥] dddd[,] LT', 38165 sameElse : 'L' 38166 }, 38167 relativeTime : { 38168 future : '%sमा', 38169 past : '%s ठà¤à¤¾à¤¡à¥', 38170 s : 'à¤à¥à¤¹à¥ समय', 38171 m : 'à¤à¤ मिनà¥à¤', 38172 mm : '%d मिनà¥à¤', 38173 h : 'à¤à¤ à¤à¤£à¥à¤à¤¾', 38174 hh : '%d à¤à¤£à¥à¤à¤¾', 38175 d : 'à¤à¤ दिन', 38176 dd : '%d दिन', 38177 M : 'à¤à¤ महिना', 38178 MM : '%d महिना', 38179 y : 'à¤à¤ बरà¥à¤·', 38180 yy : '%d बरà¥à¤·' 38181 }, 38182 week : { 38183 dow : 1, // Monday is the first day of the week. 38184 doy : 7 // The week that contains Jan 1st is the first week of the year. 38185 } 38186 }); 38187 38188 //! moment.js locale configuration 38189 //! locale : dutch (nl) 38190 //! author : Joris Röling : https://github.com/jjupiter 38191 38192 var nl__monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), 38193 nl__monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'); 38194 38195 var nl = _moment__default.defineLocale('nl', { 38196 months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'), 38197 monthsShort : function (m, format) { 38198 if (/-MMM-/.test(format)) { 38199 return nl__monthsShortWithoutDots[m.month()]; 38200 } else { 38201 return nl__monthsShortWithDots[m.month()]; 38202 } 38203 }, 38204 weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), 38205 weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'), 38206 weekdaysMin : 'Zo_Ma_Di_Wo_Do_Vr_Za'.split('_'), 38207 longDateFormat : { 38208 LT : 'HH:mm', 38209 LTS : 'HH:mm:ss', 38210 L : 'DD-MM-YYYY', 38211 LL : 'D MMMM YYYY', 38212 LLL : 'D MMMM YYYY HH:mm', 38213 LLLL : 'dddd D MMMM YYYY HH:mm' 38214 }, 38215 calendar : { 38216 sameDay: '[vandaag om] LT', 38217 nextDay: '[morgen om] LT', 38218 nextWeek: 'dddd [om] LT', 38219 lastDay: '[gisteren om] LT', 38220 lastWeek: '[afgelopen] dddd [om] LT', 38221 sameElse: 'L' 38222 }, 38223 relativeTime : { 38224 future : 'over %s', 38225 past : '%s geleden', 38226 s : 'een paar seconden', 38227 m : 'één minuut', 38228 mm : '%d minuten', 38229 h : 'één uur', 38230 hh : '%d uur', 38231 d : 'één dag', 38232 dd : '%d dagen', 38233 M : 'één maand', 38234 MM : '%d maanden', 38235 y : 'één jaar', 38236 yy : '%d jaar' 38237 }, 38238 ordinalParse: /\d{1,2}(ste|de)/, 38239 ordinal : function (number) { 38240 return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); 38241 }, 38242 week : { 38243 dow : 1, // Monday is the first day of the week. 38244 doy : 4 // The week that contains Jan 4th is the first week of the year. 38245 } 38246 }); 38247 38248 //! moment.js locale configuration 38249 //! locale : norwegian nynorsk (nn) 38250 //! author : https://github.com/mechuwind 38251 38252 var nn = _moment__default.defineLocale('nn', { 38253 months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'), 38254 monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), 38255 weekdays : 'sundag_mÃ¥ndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'), 38256 weekdaysShort : 'sun_mÃ¥n_tys_ons_tor_fre_lau'.split('_'), 38257 weekdaysMin : 'su_mÃ¥_ty_on_to_fr_lø'.split('_'), 38258 longDateFormat : { 38259 LT : 'HH:mm', 38260 LTS : 'HH:mm:ss', 38261 L : 'DD.MM.YYYY', 38262 LL : 'D MMMM YYYY', 38263 LLL : 'D MMMM YYYY HH:mm', 38264 LLLL : 'dddd D MMMM YYYY HH:mm' 38265 }, 38266 calendar : { 38267 sameDay: '[I dag klokka] LT', 38268 nextDay: '[I morgon klokka] LT', 38269 nextWeek: 'dddd [klokka] LT', 38270 lastDay: '[I gÃ¥r klokka] LT', 38271 lastWeek: '[FøregÃ¥ande] dddd [klokka] LT', 38272 sameElse: 'L' 38273 }, 38274 relativeTime : { 38275 future : 'om %s', 38276 past : 'for %s sidan', 38277 s : 'nokre sekund', 38278 m : 'eit minutt', 38279 mm : '%d minutt', 38280 h : 'ein time', 38281 hh : '%d timar', 38282 d : 'ein dag', 38283 dd : '%d dagar', 38284 M : 'ein mÃ¥nad', 38285 MM : '%d mÃ¥nader', 38286 y : 'eit Ã¥r', 38287 yy : '%d Ã¥r' 38288 }, 38289 ordinalParse: /\d{1,2}\./, 38290 ordinal : '%d.', 38291 week : { 38292 dow : 1, // Monday is the first day of the week. 38293 doy : 4 // The week that contains Jan 4th is the first week of the year. 38294 } 38295 }); 38296 38297 //! moment.js locale configuration 38298 //! locale : polish (pl) 38299 //! author : Rafal Hirsz : https://github.com/evoL 38300 38301 var monthsNominative = 'styczeÅ_luty_marzec_kwiecieÅ_maj_czerwiec_lipiec_sierpieÅ_wrzesieÅ_październik_listopad_grudzieÅ'.split('_'), 38302 monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_wrzeÅnia_października_listopada_grudnia'.split('_'); 38303 function pl__plural(n) { 38304 return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1); 38305 } 38306 function pl__translate(number, withoutSuffix, key) { 38307 var result = number + ' '; 38308 switch (key) { 38309 case 'm': 38310 return withoutSuffix ? 'minuta' : 'minutÄ'; 38311 case 'mm': 38312 return result + (pl__plural(number) ? 'minuty' : 'minut'); 38313 case 'h': 38314 return withoutSuffix ? 'godzina' : 'godzinÄ'; 38315 case 'hh': 38316 return result + (pl__plural(number) ? 'godziny' : 'godzin'); 38317 case 'MM': 38318 return result + (pl__plural(number) ? 'miesiÄ ce' : 'miesiÄcy'); 38319 case 'yy': 38320 return result + (pl__plural(number) ? 'lata' : 'lat'); 38321 } 38322 } 38323 38324 var pl = _moment__default.defineLocale('pl', { 38325 months : function (momentToFormat, format) { 38326 if (format === '') { 38327 // Hack: if format empty we know this is used to generate 38328 // RegExp by moment. Give then back both valid forms of months 38329 // in RegExp ready format. 38330 return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')'; 38331 } else if (/D MMMM/.test(format)) { 38332 return monthsSubjective[momentToFormat.month()]; 38333 } else { 38334 return monthsNominative[momentToFormat.month()]; 38335 } 38336 }, 38337 monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'), 38338 weekdays : 'niedziela_poniedziaÅek_wtorek_Åroda_czwartek_piÄ tek_sobota'.split('_'), 38339 weekdaysShort : 'nie_pon_wt_År_czw_pt_sb'.split('_'), 38340 weekdaysMin : 'N_Pn_Wt_År_Cz_Pt_So'.split('_'), 38341 longDateFormat : { 38342 LT : 'HH:mm', 38343 LTS : 'HH:mm:ss', 38344 L : 'DD.MM.YYYY', 38345 LL : 'D MMMM YYYY', 38346 LLL : 'D MMMM YYYY HH:mm', 38347 LLLL : 'dddd, D MMMM YYYY HH:mm' 38348 }, 38349 calendar : { 38350 sameDay: '[DziÅ o] LT', 38351 nextDay: '[Jutro o] LT', 38352 nextWeek: '[W] dddd [o] LT', 38353 lastDay: '[Wczoraj o] LT', 38354 lastWeek: function () { 38355 switch (this.day()) { 38356 case 0: 38357 return '[W zeszÅÄ niedzielÄ o] LT'; 38358 case 3: 38359 return '[W zeszÅÄ ÅrodÄ o] LT'; 38360 case 6: 38361 return '[W zeszÅÄ sobotÄ o] LT'; 38362 default: 38363 return '[W zeszÅy] dddd [o] LT'; 38364 } 38365 }, 38366 sameElse: 'L' 38367 }, 38368 relativeTime : { 38369 future : 'za %s', 38370 past : '%s temu', 38371 s : 'kilka sekund', 38372 m : pl__translate, 38373 mm : pl__translate, 38374 h : pl__translate, 38375 hh : pl__translate, 38376 d : '1 dzieÅ', 38377 dd : '%d dni', 38378 M : 'miesiÄ c', 38379 MM : pl__translate, 38380 y : 'rok', 38381 yy : pl__translate 38382 }, 38383 ordinalParse: /\d{1,2}\./, 38384 ordinal : '%d.', 38385 week : { 38386 dow : 1, // Monday is the first day of the week. 38387 doy : 4 // The week that contains Jan 4th is the first week of the year. 38388 } 38389 }); 38390 38391 //! moment.js locale configuration 38392 //! locale : brazilian portuguese (pt-br) 38393 //! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira 38394 38395 var pt_br = _moment__default.defineLocale('pt-br', { 38396 months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'), 38397 monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), 38398 weekdays : 'Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado'.split('_'), 38399 weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), 38400 weekdaysMin : 'Dom_2ª_3ª_4ª_5ª_6ª_Sáb'.split('_'), 38401 longDateFormat : { 38402 LT : 'HH:mm', 38403 LTS : 'HH:mm:ss', 38404 L : 'DD/MM/YYYY', 38405 LL : 'D [de] MMMM [de] YYYY', 38406 LLL : 'D [de] MMMM [de] YYYY [à s] HH:mm', 38407 LLLL : 'dddd, D [de] MMMM [de] YYYY [à s] HH:mm' 38408 }, 38409 calendar : { 38410 sameDay: '[Hoje à s] LT', 38411 nextDay: '[Amanhã à s] LT', 38412 nextWeek: 'dddd [à s] LT', 38413 lastDay: '[Ontem à s] LT', 38414 lastWeek: function () { 38415 return (this.day() === 0 || this.day() === 6) ? 38416 '[Ãltimo] dddd [à s] LT' : // Saturday + Sunday 38417 '[Ãltima] dddd [à s] LT'; // Monday - Friday 38418 }, 38419 sameElse: 'L' 38420 }, 38421 relativeTime : { 38422 future : 'em %s', 38423 past : '%s atrás', 38424 s : 'poucos segundos', 38425 m : 'um minuto', 38426 mm : '%d minutos', 38427 h : 'uma hora', 38428 hh : '%d horas', 38429 d : 'um dia', 38430 dd : '%d dias', 38431 M : 'um mês', 38432 MM : '%d meses', 38433 y : 'um ano', 38434 yy : '%d anos' 38435 }, 38436 ordinalParse: /\d{1,2}º/, 38437 ordinal : '%dº' 38438 }); 38439 38440 //! moment.js locale configuration 38441 //! locale : portuguese (pt) 38442 //! author : Jefferson : https://github.com/jalex79 38443 38444 var pt = _moment__default.defineLocale('pt', { 38445 months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'), 38446 monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), 38447 weekdays : 'Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado'.split('_'), 38448 weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), 38449 weekdaysMin : 'Dom_2ª_3ª_4ª_5ª_6ª_Sáb'.split('_'), 38450 longDateFormat : { 38451 LT : 'HH:mm', 38452 LTS : 'HH:mm:ss', 38453 L : 'DD/MM/YYYY', 38454 LL : 'D [de] MMMM [de] YYYY', 38455 LLL : 'D [de] MMMM [de] YYYY HH:mm', 38456 LLLL : 'dddd, D [de] MMMM [de] YYYY HH:mm' 38457 }, 38458 calendar : { 38459 sameDay: '[Hoje à s] LT', 38460 nextDay: '[Amanhã à s] LT', 38461 nextWeek: 'dddd [à s] LT', 38462 lastDay: '[Ontem à s] LT', 38463 lastWeek: function () { 38464 return (this.day() === 0 || this.day() === 6) ? 38465 '[Ãltimo] dddd [à s] LT' : // Saturday + Sunday 38466 '[Ãltima] dddd [à s] LT'; // Monday - Friday 38467 }, 38468 sameElse: 'L' 38469 }, 38470 relativeTime : { 38471 future : 'em %s', 38472 past : 'há %s', 38473 s : 'segundos', 38474 m : 'um minuto', 38475 mm : '%d minutos', 38476 h : 'uma hora', 38477 hh : '%d horas', 38478 d : 'um dia', 38479 dd : '%d dias', 38480 M : 'um mês', 38481 MM : '%d meses', 38482 y : 'um ano', 38483 yy : '%d anos' 38484 }, 38485 ordinalParse: /\d{1,2}º/, 38486 ordinal : '%dº', 38487 week : { 38488 dow : 1, // Monday is the first day of the week. 38489 doy : 4 // The week that contains Jan 4th is the first week of the year. 38490 } 38491 }); 38492 38493 //! moment.js locale configuration 38494 //! locale : romanian (ro) 38495 //! author : Vlad Gurdiga : https://github.com/gurdiga 38496 //! author : Valentin Agachi : https://github.com/avaly 38497 38498 function ro__relativeTimeWithPlural(number, withoutSuffix, key) { 38499 var format = { 38500 'mm': 'minute', 38501 'hh': 'ore', 38502 'dd': 'zile', 38503 'MM': 'luni', 38504 'yy': 'ani' 38505 }, 38506 separator = ' '; 38507 if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) { 38508 separator = ' de '; 38509 } 38510 return number + separator + format[key]; 38511 } 38512 38513 var ro = _moment__default.defineLocale('ro', { 38514 months : 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'), 38515 monthsShort : 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'), 38516 weekdays : 'duminicÄ_luni_marÈi_miercuri_joi_vineri_sâmbÄtÄ'.split('_'), 38517 weekdaysShort : 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'), 38518 weekdaysMin : 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'), 38519 longDateFormat : { 38520 LT : 'H:mm', 38521 LTS : 'H:mm:ss', 38522 L : 'DD.MM.YYYY', 38523 LL : 'D MMMM YYYY', 38524 LLL : 'D MMMM YYYY H:mm', 38525 LLLL : 'dddd, D MMMM YYYY H:mm' 38526 }, 38527 calendar : { 38528 sameDay: '[azi la] LT', 38529 nextDay: '[mâine la] LT', 38530 nextWeek: 'dddd [la] LT', 38531 lastDay: '[ieri la] LT', 38532 lastWeek: '[fosta] dddd [la] LT', 38533 sameElse: 'L' 38534 }, 38535 relativeTime : { 38536 future : 'peste %s', 38537 past : '%s în urmÄ', 38538 s : 'câteva secunde', 38539 m : 'un minut', 38540 mm : ro__relativeTimeWithPlural, 38541 h : 'o orÄ', 38542 hh : ro__relativeTimeWithPlural, 38543 d : 'o zi', 38544 dd : ro__relativeTimeWithPlural, 38545 M : 'o lunÄ', 38546 MM : ro__relativeTimeWithPlural, 38547 y : 'un an', 38548 yy : ro__relativeTimeWithPlural 38549 }, 38550 week : { 38551 dow : 1, // Monday is the first day of the week. 38552 doy : 7 // The week that contains Jan 1st is the first week of the year. 38553 } 38554 }); 38555 38556 //! moment.js locale configuration 38557 //! locale : russian (ru) 38558 //! author : Viktorminator : https://github.com/Viktorminator 38559 //! Author : Menelion Elensúle : https://github.com/Oire 38560 38561 function ru__plural(word, num) { 38562 var forms = word.split('_'); 38563 return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); 38564 } 38565 function ru__relativeTimeWithPlural(number, withoutSuffix, key) { 38566 var format = { 38567 'mm': withoutSuffix ? 'минÑÑа_минÑÑÑ_минÑÑ' : 'минÑÑÑ_минÑÑÑ_минÑÑ', 38568 'hh': 'ÑаÑ_ÑаÑа_ÑаÑов', 38569 'dd': 'денÑ_днÑ_дней', 38570 'MM': 'меÑÑÑ_меÑÑÑа_меÑÑÑев', 38571 'yy': 'год_года_леÑ' 38572 }; 38573 if (key === 'm') { 38574 return withoutSuffix ? 'минÑÑа' : 'минÑÑÑ'; 38575 } 38576 else {
38577 return number + ' ' + ru__plural(format[key], +number); 38578 } 38579 } 38580 function ru__monthsCaseReplace(m, format) { 38581 var months = { 38582 'nominative': 'ÑнваÑÑ_ÑевÑалÑ_маÑÑ_апÑелÑ_май_иÑнÑ_иÑлÑ_авгÑÑÑ_ÑенÑÑбÑÑ_окÑÑбÑÑ_ноÑбÑÑ_декабÑÑ'.split('_'), 38583 'accusative': 'ÑнваÑÑ_ÑевÑалÑ_маÑÑа_апÑелÑ_маÑ_иÑнÑ_иÑлÑ_авгÑÑÑа_ÑенÑÑбÑÑ_окÑÑбÑÑ_ноÑбÑÑ_декабÑÑ'.split('_') 38584 }, 38585 nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ? 38586 'accusative' : 38587 'nominative'; 38588 return months[nounCase][m.month()]; 38589 } 38590 function ru__monthsShortCaseReplace(m, format) { 38591 var monthsShort = { 38592 'nominative': 'Ñнв_Ñев_маÑÑ_апÑ_май_иÑнÑ_иÑлÑ_авг_Ñен_окÑ_ноÑ_дек'.split('_'), 38593 'accusative': 'Ñнв_Ñев_маÑ_апÑ_маÑ_иÑнÑ_иÑлÑ_авг_Ñен_окÑ_ноÑ_дек'.split('_') 38594 }, 38595 nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ? 38596 'accusative' : 38597 'nominative'; 38598 return monthsShort[nounCase][m.month()]; 38599 } 38600 function ru__weekdaysCaseReplace(m, format) { 38601 var weekdays = { 38602 'nominative': 'воÑкÑеÑенÑе_понеделÑник_вÑоÑник_ÑÑеда_ÑеÑвеÑг_пÑÑниÑа_ÑÑббоÑа'.split('_'), 38603 'accusative': 'воÑкÑеÑенÑе_понеделÑник_вÑоÑник_ÑÑедÑ_ÑеÑвеÑг_пÑÑниÑÑ_ÑÑббоÑÑ'.split('_') 38604 }, 38605 nounCase = (/\[ ?[Ðв] ?(?:пÑоÑлÑÑ|ÑледÑÑÑÑÑ|ÑÑÑ)? ?\] ?dddd/).test(format) ? 38606 'accusative' : 38607 'nominative'; 38608 return weekdays[nounCase][m.day()]; 38609 } 38610 38611 var ru = _moment__default.defineLocale('ru', { 38612 months : ru__monthsCaseReplace, 38613 monthsShort : ru__monthsShortCaseReplace, 38614 weekdays : ru__weekdaysCaseReplace, 38615 weekdaysShort : 'вÑ_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 38616 weekdaysMin : 'вÑ_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 38617 monthsParse : [/^Ñнв/i, /^Ñев/i, /^маÑ/i, /^апÑ/i, /^ма[й|Ñ]/i, /^иÑн/i, /^иÑл/i, /^авг/i, /^Ñен/i, /^окÑ/i, /^ноÑ/i, /^дек/i], 38618 longDateFormat : { 38619 LT : 'HH:mm', 38620 LTS : 'HH:mm:ss', 38621 L : 'DD.MM.YYYY', 38622 LL : 'D MMMM YYYY г.', 38623 LLL : 'D MMMM YYYY г., HH:mm', 38624 LLLL : 'dddd, D MMMM YYYY г., HH:mm' 38625 }, 38626 calendar : { 38627 sameDay: '[Ð¡ÐµÐ³Ð¾Ð´Ð½Ñ Ð²] LT', 38628 nextDay: '[ÐавÑÑа в] LT', 38629 lastDay: '[ÐÑеÑа в] LT', 38630 nextWeek: function () { 38631 return this.day() === 2 ? '[Ðо] dddd [в] LT' : '[Ð] dddd [в] LT'; 38632 }, 38633 lastWeek: function (now) { 38634 if (now.week() !== this.week()) { 38635 switch (this.day()) { 38636 case 0: 38637 return '[РпÑоÑлое] dddd [в] LT'; 38638 case 1: 38639 case 2: 38640 case 4: 38641 return '[РпÑоÑлÑй] dddd [в] LT'; 38642 case 3: 38643 case 5: 38644 case 6: 38645 return '[РпÑоÑлÑÑ] dddd [в] LT'; 38646 } 38647 } else { 38648 if (this.day() === 2) { 38649 return '[Ðо] dddd [в] LT'; 38650 } else { 38651 return '[Ð] dddd [в] LT'; 38652 } 38653 } 38654 }, 38655 sameElse: 'L' 38656 }, 38657 relativeTime : { 38658 future : 'ÑеÑез %s', 38659 past : '%s назад', 38660 s : 'неÑколÑко ÑекÑнд', 38661 m : ru__relativeTimeWithPlural, 38662 mm : ru__relativeTimeWithPlural, 38663 h : 'ÑаÑ', 38664 hh : ru__relativeTimeWithPlural, 38665 d : 'денÑ', 38666 dd : ru__relativeTimeWithPlural, 38667 M : 'меÑÑÑ', 38668 MM : ru__relativeTimeWithPlural, 38669 y : 'год', 38670 yy : ru__relativeTimeWithPlural 38671 }, 38672 meridiemParse: /ноÑи|ÑÑÑа|днÑ|веÑеÑа/i, 38673 isPM : function (input) { 38674 return /^(днÑ|веÑеÑа)$/.test(input); 38675 }, 38676 meridiem : function (hour, minute, isLower) { 38677 if (hour < 4) { 38678 return 'ноÑи'; 38679 } else if (hour < 12) { 38680 return 'ÑÑÑа'; 38681 } else if (hour < 17) { 38682 return 'днÑ'; 38683 } else { 38684 return 'веÑеÑа'; 38685 } 38686 }, 38687 ordinalParse: /\d{1,2}-(й|го|Ñ)/, 38688 ordinal: function (number, period) { 38689 switch (period) { 38690 case 'M': 38691 case 'd': 38692 case 'DDD': 38693 return number + '-й'; 38694 case 'D': 38695 return number + '-го'; 38696 case 'w': 38697 case 'W': 38698 return number + '-Ñ'; 38699 default: 38700 return number; 38701 } 38702 }, 38703 week : { 38704 dow : 1, // Monday is the first day of the week. 38705 doy : 7 // The week that contains Jan 1st is the first week of the year. 38706 } 38707 }); 38708 38709 //! moment.js locale configuration 38710 //! locale : Sinhalese (si) 38711 //! author : Sampath Sitinamaluwa : https://github.com/sampathsris 38712 38713 var si = _moment__default.defineLocale('si', { 38714 months : 'ජනà·à·à¶»à·_à¶´à·à¶¶à¶»à·à·à¶»à·_මà·à¶»à·à¶à·_à¶ à¶´à·âà¶»à·à¶½à·_මà·à¶ºà·_à¶¢à·à¶±à·_à¶¢à·à¶½à·_à¶ à¶à·à·à·à¶à·_à·à·à¶´à·à¶à·à¶¸à·à¶¶à¶»à·_à¶à¶à·à¶à·à¶¶à¶»à·_à¶±à·à·à·à¶¸à·à¶¶à¶»à·_දà·à·à·à¶¸à·à¶¶à¶»à·'.split('_'), 38715 monthsShort : 'ජන_à¶´à·à¶¶_මà·à¶»à·_à¶ à¶´à·_මà·à¶ºà·_à¶¢à·à¶±à·_à¶¢à·à¶½à·_à¶ à¶à·_à·à·à¶´à·_à¶à¶à·_à¶±à·à·à·_දà·à·à·'.split('_'), 38716 weekdays : 'à¶à¶»à·à¶¯à·_à·à¶³à·à¶¯à·_à¶ à¶à·à¶»à·à·à·à¶¯à·_බදà·à¶¯à·_à¶¶à·âà¶»à·
vendor: 30,564 bytes, lines 38716-39457
38716à·à·à¶´à¶à·à¶±à·à¶¯à·_à·à·à¶à·à¶»à·à¶¯à·_à·à·à¶±à·à·à¶»à·à¶¯à·'.split('_'), 38717 weekdaysShort : 'à¶à¶»à·_à·à¶³à·_à¶ à¶_බදà·_à¶¶à·âà¶»à·_à·à·à¶à·_à·à·à¶±'.split('_'), 38718 weekdaysMin : 'à¶_à·_à¶ _à¶¶_à¶¶à·âà¶»_à·à·_à·à·'.split('_'), 38719 longDateFormat : { 38720 LT : 'a h:mm', 38721 LTS : 'a h:mm:ss', 38722 L : 'YYYY/MM/DD', 38723 LL : 'YYYY MMMM D', 38724 LLL : 'YYYY MMMM D, a h:mm', 38725 LLLL : 'YYYY MMMM D [à·à·à¶±à·] dddd, a h:mm:ss' 38726 }, 38727 calendar : { 38728 sameDay : '[චද] LT[à¶§]', 38729 nextDay : '[à·à·à¶§] LT[à¶§]', 38730 nextWeek : 'dddd LT[à¶§]', 38731 lastDay : '[à¶à¶ºà·] LT[à¶§]', 38732 lastWeek : '[à¶´à·à·à¶à·à¶º] dddd LT[à¶§]', 38733 sameElse : 'L' 38734 }, 38735 relativeTime : { 38736 future : '%sà¶à·à¶±à·', 38737 past : '%sà¶à¶§ à¶´à·à¶»', 38738 s : 'à¶à¶à·à¶´à¶» à¶à·à·à·à¶´à¶º', 38739 m : 'මà·à¶±à·à¶à·à¶à·à·', 38740 mm : 'මà·à¶±à·à¶à·à¶à· %d', 38741 h : 'à¶´à·à¶º', 38742 hh : 'à¶´à·à¶º %d', 38743 d : 'දà·à¶±à¶º', 38744 dd : 'දà·à¶± %d', 38745 M : 'මà·à·à¶º', 38746 MM : 'මà·à· %d', 38747 y : 'à·à·à¶»', 38748 yy : 'à·à·à¶» %d' 38749 }, 38750 ordinalParse: /\d{1,2} à·à·à¶±à·/, 38751 ordinal : function (number) { 38752 return number + ' à·à·à¶±à·'; 38753 }, 38754 meridiem : function (hours, minutes, isLower) { 38755 if (hours > 11) { 38756 return isLower ? 'à¶´.à·.' : 'à¶´à·à· à·à¶»à·'; 38757 } else { 38758 return isLower ? 'à¶´à·.à·.' : 'à¶´à·à¶» à·à¶»à·'; 38759 } 38760 } 38761 }); 38762 38763 //! moment.js locale configuration 38764 //! locale : slovak (sk) 38765 //! author : Martin Minka : https://github.com/k2s 38766 //! based on work of petrbela : https://github.com/petrbela 38767 38768 var sk__months = 'január_február_marec_aprÃl_máj_jún_júl_august_september_október_november_december'.split('_'), 38769 sk__monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_'); 38770 function sk__plural(n) { 38771 return (n > 1) && (n < 5); 38772 } 38773 function sk__translate(number, withoutSuffix, key, isFuture) { 38774 var result = number + ' '; 38775 switch (key) { 38776 case 's': // a few seconds / in a few seconds / a few seconds ago 38777 return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami'; 38778 case 'm': // a minute / in a minute / a minute ago 38779 return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou'); 38780 case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago 38781 if (withoutSuffix || isFuture) { 38782 return result + (sk__plural(number) ? 'minúty' : 'minút'); 38783 } else { 38784 return result + 'minútami'; 38785 } 38786 break; 38787 case 'h': // an hour / in an hour / an hour ago 38788 return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou'); 38789 case 'hh': // 9 hours / in 9 hours / 9 hours ago 38790 if (withoutSuffix || isFuture) { 38791 return result + (sk__plural(number) ? 'hodiny' : 'hodÃn'); 38792 } else { 38793 return result + 'hodinami'; 38794 } 38795 break; 38796 case 'd': // a day / in a day / a day ago 38797 return (withoutSuffix || isFuture) ? 'deÅ' : 'dÅom'; 38798 case 'dd': // 9 days / in 9 days / 9 days ago 38799 if (withoutSuffix || isFuture) { 38800 return result + (sk__plural(number) ? 'dni' : 'dnÃ'); 38801 } else { 38802 return result + 'dÅami'; 38803 } 38804 break; 38805 case 'M': // a month / in a month / a month ago 38806 return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom'; 38807 case 'MM': // 9 months / in 9 months / 9 months ago 38808 if (withoutSuffix || isFuture) { 38809 return result + (sk__plural(number) ? 'mesiace' : 'mesiacov'); 38810 } else { 38811 return result + 'mesiacmi'; 38812 } 38813 break; 38814 case 'y': // a year / in a year / a year ago 38815 return (withoutSuffix || isFuture) ? 'rok' : 'rokom'; 38816 case 'yy': // 9 years / in 9 years / 9 years ago 38817 if (withoutSuffix || isFuture) { 38818 return result + (sk__plural(number) ? 'roky' : 'rokov'); 38819 } else { 38820 return result + 'rokmi'; 38821 } 38822 break; 38823 } 38824 } 38825 38826 var sk = _moment__default.defineLocale('sk', { 38827 months : sk__months, 38828 monthsShort : sk__monthsShort, 38829 monthsParse : (function (months, monthsShort) { 38830 var i, _monthsParse = []; 38831 for (i = 0; i < 12; i++) { 38832 // use custom parser to solve problem with July (Äervenec) 38833 _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i'); 38834 } 38835 return _monthsParse; 38836 }(sk__months, sk__monthsShort)), 38837 weekdays : 'nedeľa_pondelok_utorok_streda_Å¡tvrtok_piatok_sobota'.split('_'), 38838 weekdaysShort : 'ne_po_ut_st_Å¡t_pi_so'.split('_'), 38839 weekdaysMin : 'ne_po_ut_st_Å¡t_pi_so'.split('_'), 38840 longDateFormat : { 38841 LT: 'H:mm', 38842 LTS : 'H:mm:ss', 38843 L : 'DD.MM.YYYY', 38844 LL : 'D. MMMM YYYY', 38845 LLL : 'D. MMMM YYYY H:mm', 38846 LLLL : 'dddd D. MMMM YYYY H:mm' 38847 }, 38848 calendar : { 38849 sameDay: '[dnes o] LT', 38850 nextDay: '[zajtra o] LT', 38851 nextWeek: function () { 38852 switch (this.day()) { 38853 case 0: 38854 return '[v nedeľu o] LT'; 38855 case 1: 38856 case 2: 38857 return '[v] dddd [o] LT'; 38858 case 3: 38859 return '[v stredu o] LT'; 38860 case 4: 38861 return '[vo Å¡tvrtok o] LT'; 38862 case 5: 38863 return '[v piatok o] LT'; 38864 case 6: 38865 return '[v sobotu o] LT'; 38866 } 38867 }, 38868 lastDay: '[vÄera o] LT', 38869 lastWeek: function () { 38870 switch (this.day()) { 38871 case 0: 38872 return '[minulú nedeľu o] LT'; 38873 case 1: 38874 case 2: 38875 return '[minulý] dddd [o] LT'; 38876 case 3: 38877 return '[minulú stredu o] LT'; 38878 case 4: 38879 case 5: 38880 return '[minulý] dddd [o] LT'; 38881 case 6: 38882 return '[minulú sobotu o] LT'; 38883 } 38884 }, 38885 sameElse: 'L' 38886 }, 38887 relativeTime : { 38888 future : 'za %s', 38889 past : 'pred %s', 38890 s : sk__translate, 38891 m : sk__translate, 38892 mm : sk__translate, 38893 h : sk__translate, 38894 hh : sk__translate, 38895 d : sk__translate, 38896 dd : sk__translate, 38897 M : sk__translate, 38898 MM : sk__translate, 38899 y : sk__translate, 38900 yy : sk__translate 38901 }, 38902 ordinalParse: /\d{1,2}\./, 38903 ordinal : '%d.', 38904 week : { 38905 dow : 1, // Monday is the first day of the week. 38906 doy : 4 // The week that contains Jan 4th is the first week of the year. 38907 } 38908 }); 38909 38910 //! moment.js locale configuration 38911 //! locale : slovenian (sl) 38912 //! author : Robert SedovÅ¡ek : https://github.com/sedovsek 38913 38914 function sl__processRelativeTime(number, withoutSuffix, key, isFuture) { 38915 var result = number + ' '; 38916 switch (key) { 38917 case 's': 38918 return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami'; 38919 case 'm': 38920 return withoutSuffix ? 'ena minuta' : 'eno minuto'; 38921 case 'mm': 38922 if (number === 1) { 38923 result += withoutSuffix ? 'minuta' : 'minuto'; 38924 } else if (number === 2) { 38925 result += withoutSuffix || isFuture ? 'minuti' : 'minutama'; 38926 } else if (number < 5) { 38927 result += withoutSuffix || isFuture ? 'minute' : 'minutami'; 38928 } else { 38929 result += withoutSuffix || isFuture ? 'minut' : 'minutami'; 38930 } 38931 return result; 38932 case 'h': 38933 return withoutSuffix ? 'ena ura' : 'eno uro'; 38934 case 'hh': 38935 if (number === 1) { 38936 result += withoutSuffix ? 'ura' : 'uro'; 38937 } else if (number === 2) { 38938 result += withoutSuffix || isFuture ? 'uri' : 'urama'; 38939 } else if (number < 5) { 38940 result += withoutSuffix || isFuture ? 'ure' : 'urami'; 38941 } else { 38942 result += withoutSuffix || isFuture ? 'ur' : 'urami'; 38943 } 38944 return result; 38945 case 'd': 38946 return withoutSuffix || isFuture ? 'en dan' : 'enim dnem'; 38947 case 'dd': 38948 if (number === 1) { 38949 result += withoutSuffix || isFuture ? 'dan' : 'dnem'; 38950 } else if (number === 2) { 38951 result += withoutSuffix || isFuture ? 'dni' : 'dnevoma'; 38952 } else { 38953 result += withoutSuffix || isFuture ? 'dni' : 'dnevi'; 38954 } 38955 return result; 38956 case 'M': 38957 return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem'; 38958 case 'MM': 38959 if (number === 1) { 38960 result += withoutSuffix || isFuture ? 'mesec' : 'mesecem'; 38961 } else if (number === 2) { 38962 result += withoutSuffix || isFuture ? 'meseca' : 'mesecema'; 38963 } else if (number < 5) { 38964 result += withoutSuffix || isFuture ? 'mesece' : 'meseci'; 38965 } else { 38966 result += withoutSuffix || isFuture ? 'mesecev' : 'meseci'; 38967 } 38968 return result; 38969 case 'y': 38970 return withoutSuffix || isFuture ? 'eno leto' : 'enim letom'; 38971 case 'yy': 38972 if (number === 1) { 38973 result += withoutSuffix || isFuture ? 'leto' : 'letom'; 38974 } else if (number === 2) { 38975 result += withoutSuffix || isFuture ? 'leti' : 'letoma'; 38976 } else if (number < 5) { 38977 result += withoutSuffix || isFuture ? 'leta' : 'leti'; 38978 } else { 38979 result += withoutSuffix || isFuture ? 'let' : 'leti'; 38980 } 38981 return result; 38982 } 38983 } 38984 38985 var sl = _moment__default.defineLocale('sl', { 38986 months : 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'), 38987 monthsShort : 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'), 38988 weekdays : 'nedelja_ponedeljek_torek_sreda_Äetrtek_petek_sobota'.split('_'), 38989 weekdaysShort : 'ned._pon._tor._sre._Äet._pet._sob.'.split('_'), 38990 weekdaysMin : 'ne_po_to_sr_Äe_pe_so'.split('_'), 38991 longDateFormat : { 38992 LT : 'H:mm', 38993 LTS : 'H:mm:ss', 38994 L : 'DD. MM. YYYY', 38995 LL : 'D. MMMM YYYY', 38996 LLL : 'D. MMMM YYYY H:mm', 38997 LLLL : 'dddd, D. MMMM YYYY H:mm' 38998 }, 38999 calendar : { 39000 sameDay : '[danes ob] LT', 39001 nextDay : '[jutri ob] LT', 39002 39003 nextWeek : function () { 39004 switch (this.day()) { 39005 case 0: 39006 return '[v] [nedeljo] [ob] LT'; 39007 case 3: 39008 return '[v] [sredo] [ob] LT'; 39009 case 6: 39010 return '[v] [soboto] [ob] LT'; 39011 case 1: 39012 case 2: 39013 case 4: 39014 case 5: 39015 return '[v] dddd [ob] LT'; 39016 } 39017 }, 39018 lastDay : '[vÄeraj ob] LT', 39019 lastWeek : function () { 39020 switch (this.day()) { 39021 case 0: 39022 return '[prejÅ¡njo] [nedeljo] [ob] LT'; 39023 case 3: 39024 return '[prejÅ¡njo] [sredo] [ob] LT'; 39025 case 6: 39026 return '[prejÅ¡njo] [soboto] [ob] LT'; 39027 case 1: 39028 case 2: 39029 case 4: 39030 case 5: 39031 return '[prejÅ¡nji] dddd [ob] LT'; 39032 } 39033 }, 39034 sameElse : 'L' 39035 }, 39036 relativeTime : { 39037 future : 'Äez %s', 39038 past : 'pred %s', 39039 s : sl__processRelativeTime, 39040 m : sl__processRelativeTime, 39041 mm : sl__processRelativeTime, 39042 h : sl__processRelativeTime, 39043 hh : sl__processRelativeTime, 39044 d : sl__processRelativeTime, 39045 dd : sl__processRelativeTime, 39046 M : sl__processRelativeTime, 39047 MM : sl__processRelativeTime, 39048 y : sl__processRelativeTime, 39049 yy : sl__processRelativeTime 39050 }, 39051 ordinalParse: /\d{1,2}\./, 39052 ordinal : '%d.', 39053 week : { 39054 dow : 1, // Monday is the first day of the week. 39055 doy : 7 // The week that contains Jan 1st is the first week of the year. 39056 } 39057 }); 39058 39059 //! moment.js locale configuration 39060 //! locale : Albanian (sq) 39061 //! author : Flakërim Ismani : https://github.com/flakerimi 39062 //! author: Menelion Elensúle: https://github.com/Oire (tests) 39063 //! author : Oerd Cukalla : https://github.com/oerd (fixes) 39064 39065 var sq = _moment__default.defineLocale('sq', { 39066 months : 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'), 39067 monthsShort : 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'), 39068 weekdays : 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'), 39069 weekdaysShort : 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'), 39070 weekdaysMin : 'D_H_Ma_Më_E_P_Sh'.split('_'), 39071 meridiemParse: /PD|MD/, 39072 isPM: function (input) { 39073 return input.charAt(0) === 'M'; 39074 }, 39075 meridiem : function (hours, minutes, isLower) { 39076 return hours < 12 ? 'PD' : 'MD'; 39077 }, 39078 longDateFormat : { 39079 LT : 'HH:mm', 39080 LTS : 'HH:mm:ss', 39081 L : 'DD/MM/YYYY', 39082 LL : 'D MMMM YYYY', 39083 LLL : 'D MMMM YYYY HH:mm', 39084 LLLL : 'dddd, D MMMM YYYY HH:mm' 39085 }, 39086 calendar : { 39087 sameDay : '[Sot në] LT', 39088 nextDay : '[Nesër në] LT', 39089 nextWeek : 'dddd [në] LT', 39090 lastDay : '[Dje në] LT', 39091 lastWeek : 'dddd [e kaluar në] LT', 39092 sameElse : 'L' 39093 }, 39094 relativeTime : { 39095 future : 'në %s', 39096 past : '%s më parë', 39097 s : 'disa sekonda', 39098 m : 'një minutë', 39099 mm : '%d minuta', 39100 h : 'një orë', 39101 hh : '%d orë', 39102 d : 'një ditë', 39103 dd : '%d ditë', 39104 M : 'një muaj', 39105 MM : '%d muaj', 39106 y : 'një vit', 39107 yy : '%d vite' 39108 }, 39109 ordinalParse: /\d{1,2}\./, 39110 ordinal : '%d.', 39111 week : { 39112 dow : 1, // Monday is the first day of the week. 39113 doy : 4 // The week that contains Jan 4th is the first week of the year. 39114 } 39115 }); 39116 39117 //! moment.js locale configuration 39118 //! locale : Serbian-cyrillic (sr-cyrl) 39119 //! author : Milan JanaÄkoviÄ<[email protected]> : https://github.com/milan-j 39120 39121 var sr_cyrl__translator = { 39122 words: { //Different grammatical cases 39123 m: ['Ñедан минÑÑ', 'Ñедне минÑÑе'], 39124 mm: ['минÑÑ', 'минÑÑе', 'минÑÑа'], 39125 h: ['Ñедан ÑаÑ', 'Ñедног ÑаÑа'], 39126 hh: ['ÑаÑ', 'ÑаÑа', 'ÑаÑи'], 39127 dd: ['дан', 'дана', 'дана'], 39128 MM: ['меÑеÑ', 'меÑеÑа', 'меÑеÑи'], 39129 yy: ['година', 'године', 'година'] 39130 }, 39131 correctGrammaticalCase: function (number, wordKey) { 39132 return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); 39133 }, 39134 translate: function (number, withoutSuffix, key) { 39135 var wordKey = sr_cyrl__translator.words[key]; 39136 if (key.length === 1) { 39137 return withoutSuffix ? wordKey[0] : wordKey[1]; 39138 } else { 39139 return number + ' ' + sr_cyrl__translator.correctGrammaticalCase(number, wordKey); 39140 } 39141 } 39142 }; 39143 39144 var sr_cyrl = _moment__default.defineLocale('sr-cyrl', { 39145 months: ['ÑанÑаÑ', 'ÑебÑÑаÑ', 'маÑÑ', 'апÑил', 'маÑ', 'ÑÑн', 'ÑÑл', 'авгÑÑÑ', 'ÑепÑембаÑ', 'окÑобаÑ', 'новембаÑ', 'деÑембаÑ'], 39146 monthsShort: ['Ñан.', 'Ñеб.', 'маÑ.', 'апÑ.', 'маÑ', 'ÑÑн', 'ÑÑл', 'авг.', 'Ñеп.', 'окÑ.', 'нов.', 'деÑ.'], 39147 weekdays: ['недеÑа', 'понедеÑак', 'ÑÑоÑак', 'ÑÑеда', 'ÑеÑвÑÑак', 'пеÑак', 'ÑÑбоÑа'], 39148 weekdaysShort: ['нед.', 'пон.', 'ÑÑо.', 'ÑÑе.', 'ÑеÑ.', 'пеÑ.', 'ÑÑб.'], 39149 weekdaysMin: ['не', 'по', 'ÑÑ', 'ÑÑ', 'Ñе', 'пе', 'ÑÑ'], 39150 longDateFormat: { 39151 LT: 'H:mm', 39152 LTS : 'H:mm:ss', 39153 L: 'DD. MM. YYYY', 39154 LL: 'D. MMMM YYYY', 39155 LLL: 'D. MMMM YYYY H:mm', 39156 LLLL: 'dddd, D. MMMM YYYY H:mm' 39157 }, 39158 calendar: { 39159 sameDay: '[Ð´Ð°Ð½Ð°Ñ Ñ] LT', 39160 nextDay: '[ÑÑÑÑа Ñ] LT', 39161 nextWeek: function () { 39162 switch (this.day()) { 39163 case 0: 39164 return '[Ñ] [недеÑÑ] [Ñ] LT'; 39165 case 3: 39166 return '[Ñ] [ÑÑедÑ] [Ñ] LT'; 39167 case 6: 39168 return '[Ñ] [ÑÑбоÑÑ] [Ñ] LT'; 39169 case 1: 39170 case 2: 39171 case 4: 39172 case 5: 39173 return '[Ñ] dddd [Ñ] LT'; 39174 } 39175 }, 39176 lastDay : '[ÑÑÑе Ñ] LT', 39177 lastWeek : function () { 39178 var lastWeekDays = [ 39179 '[пÑоÑле] [недеÑе] [Ñ] LT', 39180 '[пÑоÑлог] [понедеÑка] [Ñ] LT', 39181 '[пÑоÑлог] [ÑÑоÑка] [Ñ] LT', 39182 '[пÑоÑле] [ÑÑеде] [Ñ] LT', 39183 '[пÑоÑлог] [ÑеÑвÑÑка] [Ñ] LT', 39184 '[пÑоÑлог] [пеÑка] [Ñ] LT', 39185 '[пÑоÑле] [ÑÑбоÑе] [Ñ] LT' 39186 ]; 39187 return lastWeekDays[this.day()]; 39188 }, 39189 sameElse : 'L' 39190 }, 39191 relativeTime : { 39192 future : 'за %s', 39193 past : 'пÑе %s', 39194 s : 'неколико ÑекÑнди', 39195 m : sr_cyrl__translator.translate, 39196 mm : sr_cyrl__translator.translate, 39197 h : sr_cyrl__translator.translate, 39198 hh : sr_cyrl__translator.translate, 39199 d : 'дан', 39200 dd : sr_cyrl__translator.translate, 39201 M : 'меÑеÑ', 39202 MM : sr_cyrl__translator.translate, 39203 y : 'годинÑ', 39204 yy : sr_cyrl__translator.translate 39205 }, 39206 ordinalParse: /\d{1,2}\./, 39207 ordinal : '%d.', 39208 week : { 39209 dow : 1, // Monday is the first day of the week. 39210 doy : 7 // The week that contains Jan 1st is the first week of the year. 39211 } 39212 }); 39213 39214 //! moment.js locale configuration 39215 //! locale : Serbian-latin (sr) 39216 //! author : Milan JanaÄkoviÄ<[email protected]> : https://github.com/milan-j 39217 39218 var sr__translator = { 39219 words: { //Different grammatical cases 39220 m: ['jedan minut', 'jedne minute'], 39221 mm: ['minut', 'minute', 'minuta'], 39222 h: ['jedan sat', 'jednog sata'], 39223 hh: ['sat', 'sata', 'sati'], 39224 dd: ['dan', 'dana', 'dana'], 39225 MM: ['mesec', 'meseca', 'meseci'], 39226 yy: ['godina', 'godine', 'godina'] 39227 }, 39228 correctGrammaticalCase: function (number, wordKey) { 39229 return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); 39230 }, 39231 translate: function (number, withoutSuffix, key) { 39232 var wordKey = sr__translator.words[key]; 39233 if (key.length === 1) { 39234 return withoutSuffix ? wordKey[0] : wordKey[1]; 39235 } else { 39236 return number + ' ' + sr__translator.correctGrammaticalCase(number, wordKey); 39237 } 39238 } 39239 }; 39240 39241 var sr = _moment__default.defineLocale('sr', { 39242 months: ['januar', 'februar', 'mart', 'april', 'maj', 'jun', 'jul', 'avgust', 'septembar', 'oktobar', 'novembar', 'decembar'], 39243 monthsShort: ['jan.', 'feb.', 'mar.', 'apr.', 'maj', 'jun', 'jul', 'avg.', 'sep.', 'okt.', 'nov.', 'dec.'], 39244 weekdays: ['nedelja', 'ponedeljak', 'utorak', 'sreda', 'Äetvrtak', 'petak', 'subota'], 39245 weekdaysShort: ['ned.', 'pon.', 'uto.', 'sre.', 'Äet.', 'pet.', 'sub.'], 39246 weekdaysMin: ['ne', 'po', 'ut', 'sr', 'Äe', 'pe', 'su'], 39247 longDateFormat: { 39248 LT: 'H:mm', 39249 LTS : 'H:mm:ss', 39250 L: 'DD. MM. YYYY', 39251 LL: 'D. MMMM YYYY', 39252 LLL: 'D. MMMM YYYY H:mm', 39253 LLLL: 'dddd, D. MMMM YYYY H:mm' 39254 }, 39255 calendar: { 39256 sameDay: '[danas u] LT', 39257 nextDay: '[sutra u] LT', 39258 nextWeek: function () { 39259 switch (this.day()) { 39260 case 0: 39261 return '[u] [nedelju] [u] LT'; 39262 case 3: 39263 return '[u] [sredu] [u] LT'; 39264 case 6: 39265 return '[u] [subotu] [u] LT'; 39266 case 1: 39267 case 2: 39268 case 4: 39269 case 5: 39270 return '[u] dddd [u] LT'; 39271 } 39272 }, 39273 lastDay : '[juÄe u] LT', 39274 lastWeek : function () { 39275 var lastWeekDays = [ 39276 '[proÅ¡le] [nedelje] [u] LT', 39277 '[proÅ¡log] [ponedeljka] [u] LT', 39278 '[proÅ¡log] [utorka] [u] LT', 39279 '[proÅ¡le] [srede] [u] LT', 39280 '[proÅ¡log] [Äetvrtka] [u] LT', 39281 '[proÅ¡log] [petka] [u] LT', 39282 '[proÅ¡le] [subote] [u] LT' 39283 ]; 39284 return lastWeekDays[this.day()]; 39285 }, 39286 sameElse : 'L' 39287 }, 39288 relativeTime : { 39289 future : 'za %s', 39290 past : 'pre %s', 39291 s : 'nekoliko sekundi', 39292 m : sr__translator.translate, 39293 mm : sr__translator.translate, 39294 h : sr__translator.translate, 39295 hh : sr__translator.translate, 39296 d : 'dan', 39297 dd : sr__translator.translate, 39298 M : 'mesec', 39299 MM : sr__translator.translate, 39300 y : 'godinu', 39301 yy : sr__translator.translate 39302 }, 39303 ordinalParse: /\d{1,2}\./, 39304 ordinal : '%d.', 39305 week : { 39306 dow : 1, // Monday is the first day of the week. 39307 doy : 7 // The week that contains Jan 1st is the first week of the year. 39308 } 39309 }); 39310 39311 //! moment.js locale configuration 39312 //! locale : swedish (sv) 39313 //! author : Jens Alm : https://github.com/ulmus 39314 39315 var sv = _moment__default.defineLocale('sv', { 39316 months : 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'), 39317 monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), 39318 weekdays : 'söndag_mÃ¥ndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'), 39319 weekdaysShort : 'sön_mÃ¥n_tis_ons_tor_fre_lör'.split('_'), 39320 weekdaysMin : 'sö_mÃ¥_ti_on_to_fr_lö'.split('_'), 39321 longDateFormat : { 39322 LT : 'HH:mm', 39323 LTS : 'HH:mm:ss', 39324 L : 'YYYY-MM-DD', 39325 LL : 'D MMMM YYYY', 39326 LLL : 'D MMMM YYYY HH:mm', 39327 LLLL : 'dddd D MMMM YYYY HH:mm' 39328 }, 39329 calendar : { 39330 sameDay: '[Idag] LT', 39331 nextDay: '[Imorgon] LT', 39332 lastDay: '[IgÃ¥r] LT', 39333 nextWeek: '[PÃ¥] dddd LT', 39334 lastWeek: '[I] dddd[s] LT', 39335 sameElse: 'L' 39336 }, 39337 relativeTime : { 39338 future : 'om %s', 39339 past : 'för %s sedan', 39340 s : 'nÃ¥gra sekunder', 39341 m : 'en minut', 39342 mm : '%d minuter', 39343 h : 'en timme', 39344 hh : '%d timmar', 39345 d : 'en dag', 39346 dd : '%d dagar', 39347 M : 'en mÃ¥nad', 39348 MM : '%d mÃ¥nader', 39349 y : 'ett Ã¥r', 39350 yy : '%d Ã¥r' 39351 }, 39352 ordinalParse: /\d{1,2}(e|a)/, 39353 ordinal : function (number) { 39354 var b = number % 10, 39355 output = (~~(number % 100 / 10) === 1) ? 'e' : 39356 (b === 1) ? 'a' : 39357 (b === 2) ? 'a' : 39358 (b === 3) ? 'e' : 'e'; 39359 return number + output; 39360 }, 39361 week : { 39362 dow : 1, // Monday is the first day of the week. 39363 doy : 4 // The week that contains Jan 4th is the first week of the year. 39364 } 39365 }); 39366 39367 //! moment.js locale configuration 39368 //! locale : tamil (ta) 39369 //! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404 39370 39371 var ta = _moment__default.defineLocale('ta', { 39372 months : 'à®à®©à®µà®°à®¿_பிபà¯à®°à®µà®°à®¿_மாரà¯à®à¯_à®à®ªà¯à®°à®²à¯_à®®à¯_à®à¯à®©à¯_à®à¯à®²à¯_à®à®à®¸à¯à®à¯_à®à¯à®ªà¯à®à¯à®®à¯à®ªà®°à¯_à® à®à¯à®à¯à®¾à®ªà®°à¯_நவமà¯à®ªà®°à¯_à®à®¿à®à®®à¯à®ªà®°à¯'.split('_'), 39373 monthsShort : 'à®à®©à®µà®°à®¿_பிபà¯à®°à®µà®°à®¿_மாரà¯à®à¯_à®à®ªà¯à®°à®²à¯_à®®à¯_à®à¯à®©à¯_à®à¯à®²à¯_à®à®à®¸à¯à®à¯_à®à¯à®ªà¯à®à¯à®®à¯à®ªà®°à¯_à® à®à¯à®à¯à®¾à®ªà®°à¯_நவமà¯à®ªà®°à¯_à®à®¿à®à®®à¯à®ªà®°à¯'.split('_'), 39374 weekdays : 'à®à®¾à®¯à®¿à®±à¯à®±à¯à®à¯à®à®¿à®´à®®à¯_திà®à¯à®à®à¯à®à®¿à®´à®®à¯_à®à¯à®µà¯à®µà®¾à®¯à¯à®à®¿à®´à®®à¯_பà¯à®¤à®©à¯à®à®¿à®´à®®à¯_வியாழà®à¯à®à®¿à®´à®®à¯_வà¯à®³à¯à®³à®¿à®à¯à®à®¿à®´à®®à¯_à®à®©à®¿à®à¯à®à®¿à®´à®®à¯'.split('_'), 39375 weekdaysShort : 'à®à®¾à®¯à®¿à®±à¯_திà®à¯à®à®³à¯_à®à¯à®µà¯à®µà®¾à®¯à¯_பà¯à®¤à®©à¯_வியாழனà¯_வà¯à®³à¯à®³à®¿_à®à®©à®¿'.split('_'), 39376 weekdaysMin : 'à®à®¾_தி_à®à¯_பà¯_வி_வà¯_à®'.split('_'), 39377 longDateFormat : { 39378 LT : 'HH:mm', 39379 LTS : 'HH:mm:ss', 39380 L : 'DD/MM/YYYY', 39381 LL : 'D MMMM YYYY', 39382 LLL : 'D MMMM YYYY, HH:mm', 39383 LLLL : 'dddd, D MMMM YYYY, HH:mm' 39384 }, 39385 calendar : { 39386 sameDay : '[à®à®©à¯à®±à¯] LT', 39387 nextDay : '[நாளà¯] LT', 39388 nextWeek : 'dddd, LT', 39389 lastDay : '[நà¯à®±à¯à®±à¯] LT', 39390 lastWeek : '[à®à®à®¨à¯à®¤ வாரமà¯] dddd, LT', 39391 sameElse : 'L' 39392 }, 39393 relativeTime : { 39394 future : '%s à®à®²à¯', 39395 past : '%s à®®à¯à®©à¯', 39396 s : 'à®à®°à¯ à®à®¿à®² விநாà®à®¿à®à®³à¯', 39397 m : 'à®à®°à¯ நிமிà®à®®à¯', 39398 mm : '%d நிமிà®à®à¯à®à®³à¯', 39399 h : 'à®à®°à¯ மணி நà¯à®°à®®à¯', 39400 hh : '%d மணி நà¯à®°à®®à¯', 39401 d : 'à®à®°à¯ நாளà¯', 39402 dd : '%d நாà®à¯à®à®³à¯', 39403 M : 'à®à®°à¯ மாதமà¯', 39404 MM : '%d மாதà®à¯à®à®³à¯', 39405 y : 'à®à®°à¯ வரà¯à®à®®à¯', 39406 yy : '%d à®à®£à¯à®à¯à®à®³à¯' 39407 }, 39408 ordinalParse: /\d{1,2}வதà¯/, 39409 ordinal : function (number) { 39410 return number + 'வதà¯'; 39411 }, 39412 // refer http://ta.wikipedia.org/s/1er1 39413 meridiemParse: /யாமமà¯|வà¯à®à®±à¯|à®à®¾à®²à¯|நணà¯à®ªà®à®²à¯|à®à®±à¯à®ªà®¾à®à¯|மாலà¯/, 39414 meridiem : function (hour, minute, isLower) { 39415 if (hour < 2) { 39416 return ' யாமமà¯'; 39417 } else if (hour < 6) { 39418 return ' வà¯à®à®±à¯'; // வà¯à®à®±à¯ 39419 } else if (hour < 10) { 39420 return ' à®à®¾à®²à¯'; // à®à®¾à®²à¯ 39421 } else if (hour < 14) { 39422 return ' நணà¯à®ªà®à®²à¯'; // நணà¯à®ªà®à®²à¯ 39423 } else if (hour < 18) { 39424 return ' à®à®±à¯à®ªà®¾à®à¯'; // à®à®±à¯à®ªà®¾à®à¯ 39425 } else if (hour < 22) { 39426 return ' மாலà¯'; // மால௠39427 } else { 39428 return ' யாமமà¯'; 39429 } 39430 }, 39431 meridiemHour : function (hour, meridiem) { 39432 if (hour === 12) { 39433 hour = 0; 39434 } 39435 if (meridiem === 'யாமமà¯') { 39436 return hour < 2 ? hour : hour + 12; 39437 } else if (meridiem === 'வà¯à®à®±à¯' || meridiem === 'à®à®¾à®²à¯') { 39438 return hour; 39439 } else if (meridiem === 'நணà¯à®ªà®à®²à¯') { 39440 return hour >= 10 ? hour : hour + 12; 39441 } else { 39442 return hour + 12; 39443 } 39444 }, 39445 week : { 39446 dow : 0, // Sunday is the first day of the week. 39447 doy : 6 // The week that contains Jan 1st is the first week of the year. 39448 } 39449 }); 39450 39451 //! moment.js locale configuration 39452 //! locale : thai (th) 39453 //! author : Kridsada Thanabulpong : https://github.com/sirn 39454 39455 var th = _moment__default.defineLocale('th', { 39456 months : 'มà¸à¸£à¸²à¸à¸¡_à¸à¸¸à¸¡à¸ าà¸à¸±à¸à¸à¹_มีà¸à¸²à¸à¸¡_à¹à¸¡à¸©à¸²à¸¢à¸_à¸à¸¤à¸©à¸ าà¸à¸¡_มิà¸à¸¸à¸à¸²à¸¢à¸_à¸à¸£à¸à¸à¸²à¸à¸¡_สิà¸à¸«à¸²à¸à¸¡_à¸à¸±à¸à¸¢à¸²à¸¢à¸_à¸à¸¸à¸¥à¸²à¸à¸¡_à¸à¸¤à¸¨à¸à¸´à¸à¸²à¸¢à¸_à¸à¸±à¸à¸§à¸²à¸à¸¡'.split('_'), 39457 monthsShort : 'มà¸à¸£à¸²_à¸à¸¸à¸¡à¸ า_มีà¸à¸²_à¹à¸¡à¸©à¸²_à¸à¸¤à¸©à¸ า_มิà¸à¸¸à¸à¸²_à¸à¸£à¸à¸à¸²_สิà¸à¸«à¸²_à¸à¸±à¸à¸¢à¸²_à¸à¸¸à¸¥à¸²_à¸à¸¤à¸¨à¸à¸´à¸à¸²_à¸
39457ัà¸à¸§à¸²'.split('_'), 39458 weekdays : 'à¸à¸²à¸à¸´à¸à¸¢à¹_à¸à¸±à¸à¸à¸£à¹_à¸à¸±à¸à¸à¸²à¸£_à¸à¸¸à¸_à¸à¸¤à¸«à¸±à¸ªà¸à¸à¸µ_ศุà¸à¸£à¹_à¹à¸ªà¸²à¸£à¹'.split('_'), 39459 weekdaysShort : 'à¸à¸²à¸à¸´à¸à¸¢à¹_à¸à¸±à¸à¸à¸£à¹_à¸à¸±à¸à¸à¸²à¸£_à¸à¸¸à¸_à¸à¸¤à¸«à¸±à¸ª_ศุà¸à¸£à¹_à¹à¸ªà¸²à¸£à¹'.split('_'), // yes, three characters difference 39460 weekdaysMin : 'à¸à¸²._à¸._à¸._à¸._à¸à¸¤._ศ._ส.'.split('_'), 39461 longDateFormat : { 39462 LT : 'H à¸à¸²à¸¬à¸´à¸à¸² m à¸à¸²à¸à¸µ', 39463 LTS : 'H à¸à¸²à¸¬à¸´à¸à¸² m à¸à¸²à¸à¸µ s วิà¸à¸²à¸à¸µ', 39464 L : 'YYYY/MM/DD', 39465 LL : 'D MMMM YYYY', 39466 LLL : 'D MMMM YYYY à¹à¸§à¸¥à¸² H à¸à¸²à¸¬à¸´à¸à¸² m à¸à¸²à¸à¸µ', 39467 LLLL : 'วัà¸ddddà¸à¸µà¹ D MMMM YYYY à¹à¸§à¸¥à¸² H à¸à¸²à¸¬à¸´à¸à¸² m à¸à¸²à¸à¸µ' 39468 }, 39469 meridiemParse: /à¸à¹à¸à¸à¹à¸à¸µà¹à¸¢à¸|หลัà¸à¹à¸à¸µà¹à¸¢à¸/, 39470 isPM: function (input) { 39471 return input === 'หลัà¸à¹à¸à¸µà¹à¸¢à¸'; 39472 }, 39473 meridiem : function (hour, minute, isLower) { 39474 if (hour < 12) { 39475 return 'à¸à¹à¸à¸à¹à¸à¸µà¹à¸¢à¸'; 39476 } else { 39477 return 'หลัà¸à¹à¸à¸µà¹à¸¢à¸'; 39478 } 39479 }, 39480 calendar : { 39481 sameDay : '[วัà¸à¸à¸µà¹ à¹à¸§à¸¥à¸²] LT', 39482 nextDay : '[à¸à¸£à¸¸à¹à¸à¸à¸µà¹ à¹à¸§à¸¥à¸²] LT', 39483 nextWeek : 'dddd[หà¸à¹à¸² à¹à¸§à¸¥à¸²] LT', 39484 lastDay : '[à¹à¸¡à¸·à¹à¸à¸§à¸²à¸à¸à¸µà¹ à¹à¸§à¸¥à¸²] LT', 39485 lastWeek : '[วัà¸]dddd[à¸à¸µà¹à¹à¸¥à¹à¸§ à¹à¸§à¸¥à¸²] LT', 39486 sameElse : 'L' 39487 }, 39488 relativeTime : { 39489 future : 'à¸à¸µà¸ %s', 39490 past : '%sà¸à¸µà¹à¹à¸¥à¹à¸§', 39491 s : 'à¹à¸¡à¹à¸à¸µà¹à¸§à¸´à¸à¸²à¸à¸µ', 39492 m : '1 à¸à¸²à¸à¸µ', 39493 mm : '%d à¸à¸²à¸à¸µ', 39494 h : '1 à¸à¸±à¹à¸§à¹à¸¡à¸', 39495 hh : '%d à¸à¸±à¹à¸§à¹à¸¡à¸', 39496 d : '1 วัà¸', 39497 dd : '%d วัà¸', 39498 M : '1 à¹à¸à¸·à¸à¸', 39499 MM : '%d à¹à¸à¸·à¸à¸', 39500 y : '1 à¸à¸µ', 39501 yy : '%d à¸à¸µ' 39502 } 39503 }); 39504 39505 //! moment.js locale configuration 39506 //! locale : Tagalog/Filipino (tl-ph) 39507 //! author : Dan Hagman 39508 39509 var tl_ph = _moment__default.defineLocale('tl-ph', { 39510 months : 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'), 39511 monthsShort : 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), 39512 weekdays : 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'), 39513 weekdaysShort : 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), 39514 weekdaysMin : 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), 39515 longDateFormat : { 39516 LT : 'HH:mm', 39517 LTS : 'HH:mm:ss', 39518 L : 'MM/D/YYYY', 39519 LL : 'MMMM D, YYYY', 39520 LLL : 'MMMM D, YYYY HH:mm', 39521 LLLL : 'dddd, MMMM DD, YYYY HH:mm' 39522 }, 39523 calendar : { 39524 sameDay: '[Ngayon sa] LT', 39525 nextDay: '[Bukas sa] LT', 39526 nextWeek: 'dddd [sa] LT', 39527 lastDay: '[Kahapon sa] LT', 39528 lastWeek: 'dddd [huling linggo] LT', 39529 sameElse: 'L' 39530 }, 39531 relativeTime : { 39532 future : 'sa loob ng %s', 39533 past : '%s ang nakalipas', 39534 s : 'ilang segundo', 39535 m : 'isang minuto', 39536 mm : '%d minuto', 39537 h : 'isang oras', 39538 hh : '%d oras', 39539 d : 'isang araw', 39540 dd : '%d araw', 39541 M : 'isang buwan', 39542 MM : '%d buwan', 39543 y : 'isang taon', 39544 yy : '%d taon' 39545 }, 39546 ordinalParse: /\d{1,2}/, 39547 ordinal : function (number) { 39548 return number; 39549 }, 39550 week : { 39551 dow : 1, // Monday is the first day of the week. 39552 doy : 4 // The week that contains Jan 4th is the first week of the year. 39553 } 39554 }); 39555 39556 //! moment.js locale configuration 39557 //! locale : turkish (tr) 39558 //! authors : Erhan Gundogan : https://github.com/erhangundogan, 39559 //! Burak YiÄit Kaya: https://github.com/BYK 39560 39561 var tr__suffixes = { 39562 1: '\'inci', 39563 5: '\'inci', 39564 8: '\'inci', 39565 70: '\'inci', 39566 80: '\'inci', 39567 2: '\'nci', 39568 7: '\'nci', 39569 20: '\'nci', 39570 50: '\'nci', 39571 3: '\'üncü', 39572 4: '\'üncü', 39573 100: '\'üncü',
vendor: 26,902 bytes, lines 39574-40240
39574 6: '\'ncı', 39575 9: '\'uncu', 39576 10: '\'uncu', 39577 30: '\'uncu', 39578 60: '\'ıncı', 39579 90: '\'ıncı' 39580 }; 39581 39582 var tr = _moment__default.defineLocale('tr', { 39583 months : 'Ocak_Åubat_Mart_Nisan_Mayıs_Haziran_Temmuz_AÄustos_Eylül_Ekim_Kasım_Aralık'.split('_'), 39584 monthsShort : 'Oca_Åub_Mar_Nis_May_Haz_Tem_AÄu_Eyl_Eki_Kas_Ara'.split('_'), 39585 weekdays : 'Pazar_Pazartesi_Salı_ÃarÅamba_PerÅembe_Cuma_Cumartesi'.split('_'), 39586 weekdaysShort : 'Paz_Pts_Sal_Ãar_Per_Cum_Cts'.split('_'), 39587 weekdaysMin : 'Pz_Pt_Sa_Ãa_Pe_Cu_Ct'.split('_'), 39588 longDateFormat : { 39589 LT : 'HH:mm', 39590 LTS : 'HH:mm:ss', 39591 L : 'DD.MM.YYYY', 39592 LL : 'D MMMM YYYY', 39593 LLL : 'D MMMM YYYY HH:mm', 39594 LLLL : 'dddd, D MMMM YYYY HH:mm' 39595 }, 39596 calendar : { 39597 sameDay : '[bugün saat] LT', 39598 nextDay : '[yarın saat] LT', 39599 nextWeek : '[haftaya] dddd [saat] LT', 39600 lastDay : '[dün] LT', 39601 lastWeek : '[geçen hafta] dddd [saat] LT', 39602 sameElse : 'L' 39603 }, 39604 relativeTime : { 39605 future : '%s sonra', 39606 past : '%s önce', 39607 s : 'birkaç saniye', 39608 m : 'bir dakika', 39609 mm : '%d dakika', 39610 h : 'bir saat', 39611 hh : '%d saat', 39612 d : 'bir gün', 39613 dd : '%d gün', 39614 M : 'bir ay', 39615 MM : '%d ay', 39616 y : 'bir yıl', 39617 yy : '%d yıl' 39618 }, 39619 ordinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/, 39620 ordinal : function (number) { 39621 if (number === 0) { // special case for zero 39622 return number + '\'ıncı'; 39623 } 39624 var a = number % 10, 39625 b = number % 100 - a, 39626 c = number >= 100 ? 100 : null; 39627 return number + (tr__suffixes[a] || tr__suffixes[b] || tr__suffixes[c]); 39628 }, 39629 week : { 39630 dow : 1, // Monday is the first day of the week. 39631 doy : 7 // The week that contains Jan 1st is the first week of the year. 39632 } 39633 }); 39634 39635 //! moment.js locale configuration 39636 //! locale : talossan (tzl) 39637 //! author : Robin van der Vliet : https://github.com/robin0van0der0v with the help of Iustì Canun 39638 39639 39640 var tzl = _moment__default.defineLocale('tzl', { 39641 months : 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'), 39642 monthsShort : 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'), 39643 weekdays : 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'), 39644 weekdaysShort : 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'), 39645 weekdaysMin : 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'), 39646 longDateFormat : { 39647 LT : 'HH.mm', 39648 LTS : 'LT.ss', 39649 L : 'DD.MM.YYYY', 39650 LL : 'D. MMMM [dallas] YYYY', 39651 LLL : 'D. MMMM [dallas] YYYY LT', 39652 LLLL : 'dddd, [li] D. MMMM [dallas] YYYY LT' 39653 }, 39654 meridiem : function (hours, minutes, isLower) { 39655 if (hours > 11) { 39656 return isLower ? 'd\'o' : 'D\'O'; 39657 } else { 39658 return isLower ? 'd\'a' : 'D\'A'; 39659 } 39660 }, 39661 calendar : { 39662 sameDay : '[oxhi à ] LT', 39663 nextDay : '[demà à ] LT', 39664 nextWeek : 'dddd [à ] LT', 39665 lastDay : '[ieiri à ] LT', 39666 lastWeek : '[sür el] dddd [lasteu à ] LT', 39667 sameElse : 'L' 39668 }, 39669 relativeTime : { 39670 future : 'osprei %s', 39671 past : 'ja%s', 39672 s : tzl__processRelativeTime, 39673 m : tzl__processRelativeTime, 39674 mm : tzl__processRelativeTime, 39675 h : tzl__processRelativeTime, 39676 hh : tzl__processRelativeTime, 39677 d : tzl__processRelativeTime, 39678 dd : tzl__processRelativeTime, 39679 M : tzl__processRelativeTime, 39680 MM : tzl__processRelativeTime, 39681 y : tzl__processRelativeTime, 39682 yy : tzl__processRelativeTime 39683 }, 39684 ordinalParse: /\d{1,2}\./, 39685 ordinal : '%d.', 39686 week : { 39687 dow : 1, // Monday is the first day of the week. 39688 doy : 4 // The week that contains Jan 4th is the first week of the year. 39689 } 39690 }); 39691 39692 function tzl__processRelativeTime(number, withoutSuffix, key, isFuture) { 39693 var format = { 39694 's': ['viensas secunds', '\'iensas secunds'], 39695 'm': ['\'n mÃut', '\'iens mÃut'], 39696 'mm': [number + ' mÃuts', ' ' + number + ' mÃuts'], 39697 'h': ['\'n þora', '\'iensa þora'], 39698 'hh': [number + ' þoras', ' ' + number + ' þoras'], 39699 'd': ['\'n ziua', '\'iensa ziua'], 39700 'dd': [number + ' ziuas', ' ' + number + ' ziuas'], 39701 'M': ['\'n mes', '\'iens mes'], 39702 'MM': [number + ' mesen', ' ' + number + ' mesen'], 39703 'y': ['\'n ar', '\'iens ar'], 39704 'yy': [number + ' ars', ' ' + number + ' ars'] 39705 }; 39706 return isFuture ? format[key][0] : (withoutSuffix ? format[key][0] : format[key][1].trim()); 39707 } 39708 39709 //! moment.js locale configuration 39710 //! locale : Morocco Central Atlas TamaziÉ£t in Latin (tzm-latn) 39711 //! author : Abdel Said : https://github.com/abdelsaid 39712 39713 var tzm_latn = _moment__default.defineLocale('tzm-latn', { 39714 months : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_É£wÅ¡t_Å¡wtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'), 39715 monthsShort : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_É£wÅ¡t_Å¡wtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'), 39716 weekdays : 'asamas_aynas_asinas_akras_akwas_asimwas_asiá¸yas'.split('_'), 39717 weekdaysShort : 'asamas_aynas_asinas_akras_akwas_asimwas_asiá¸yas'.split('_'), 39718 weekdaysMin : 'asamas_aynas_asinas_akras_akwas_asimwas_asiá¸yas'.split('_'), 39719 longDateFormat : { 39720 LT : 'HH:mm', 39721 LTS : 'HH:mm:ss', 39722 L : 'DD/MM/YYYY', 39723 LL : 'D MMMM YYYY', 39724 LLL : 'D MMMM YYYY HH:mm', 39725 LLLL : 'dddd D MMMM YYYY HH:mm' 39726 }, 39727 calendar : { 39728 sameDay: '[asdkh g] LT', 39729 nextDay: '[aska g] LT', 39730 nextWeek: 'dddd [g] LT', 39731 lastDay: '[assant g] LT', 39732 lastWeek: 'dddd [g] LT', 39733 sameElse: 'L' 39734 }, 39735 relativeTime : { 39736 future : 'dadkh s yan %s', 39737 past : 'yan %s', 39738 s : 'imik', 39739 m : 'minuá¸', 39740 mm : '%d minuá¸', 39741 h : 'saÉa', 39742 hh : '%d tassaÉin', 39743 d : 'ass', 39744 dd : '%d ossan', 39745 M : 'ayowr', 39746 MM : '%d iyyirn', 39747 y : 'asgas', 39748 yy : '%d isgasn' 39749 }, 39750 week : { 39751 dow : 6, // Saturday is the first day of the week. 39752 doy : 12 // The week that contains Jan 1st is the first week of the year. 39753 } 39754 }); 39755 39756 //! moment.js locale configuration 39757 //! locale : Morocco Central Atlas TamaziÉ£t (tzm) 39758 //! author : Abdel Said : https://github.com/abdelsaid 39759 39760 var tzm = _moment__default.defineLocale('tzm', { 39761 months : 'âµâµâµâ´°âµ¢âµ_â´±âµâ´°âµ¢âµ_âµâ´°âµâµ_âµâ´±âµâµâµ_âµâ´°âµ¢âµ¢âµ_âµ¢âµâµâµ¢âµ_âµ¢âµâµâµ¢âµâµ£_âµâµâµâµ_âµâµâµâ´°âµâ´±âµâµ_â´½âµâµâ´±âµ_âµâµâµ¡â´°âµâ´±âµâµ_â´·âµâµâµâ´±âµâµ'.split('_'), 39762 monthsShort : 'âµâµâµâ´°âµ¢âµ_â´±âµâ´°âµ¢âµ_âµâ´°âµâµ_âµâ´±âµâµâµ_âµâ´°âµ¢âµ¢âµ_âµ¢âµâµâµ¢âµ_âµ¢âµâµâµ¢âµâµ£_âµâµâµâµ_âµâµâµâ´°âµâ´±âµâµ_â´½âµâµâ´±âµ_âµâµâµ¡â´°âµâ´±âµâµ_â´·âµâµâµâ´±âµâµ'.split('_'), 39763 weekdays : 'â´°âµâ´°âµâ´°âµ_â´°âµ¢âµâ´°âµ_â´°âµâµâµâ´°âµ_â´°â´½âµâ´°âµ_ⴰⴽⵡⴰâµ_â´°âµâµâµâµ¡â´°âµ_â´°âµâµâ´¹âµ¢â´°âµ'.split('_'), 39764 weekdaysShort : 'â´°âµâ´°âµâ´°âµ_â´°âµ¢âµâ´°âµ_â´°âµâµâµâ´°âµ_â´°â´½âµâ´°âµ_ⴰⴽⵡⴰâµ_â´°âµâµâµâµ¡â´°âµ_â´°âµâµâ´¹âµ¢â´°âµ'.split('_'), 39765 weekdaysMin : 'â´°âµâ´°âµâ´°âµ_â´°âµ¢âµâ´°âµ_â´°âµâµâµâ´°âµ_â´°â´½âµâ´°âµ_ⴰⴽⵡⴰâµ_â´°âµâµâµâµ¡â´°âµ_â´°âµâµâ´¹âµ¢â´°âµ'.split('_'), 39766 longDateFormat : { 39767 LT : 'HH:mm', 39768 LTS: 'HH:mm:ss', 39769 L : 'DD/MM/YYYY', 39770 LL : 'D MMMM YYYY', 39771 LLL : 'D MMMM YYYY HH:mm', 39772 LLLL : 'dddd D MMMM YYYY HH:mm' 39773 }, 39774 calendar : { 39775 sameDay: '[â´°âµâ´·âµ â´´] LT', 39776 nextDay: '[â´°âµâ´½â´° â´´] LT', 39777 nextWeek: 'dddd [â´´] LT', 39778 lastDay: '[â´°âµâ´°âµâµ â´´] LT', 39779 lastWeek: 'dddd [â´´] LT', 39780 sameElse: 'L' 39781 }, 39782 relativeTime : { 39783 future : 'ⴷⴰⴷⵠⵠⵢⴰⵠ%s', 39784 past : 'ⵢⴰⵠ%s', 39785 s : 'âµâµâµâ´½', 39786 m : 'âµâµâµâµâ´º', 39787 mm : '%d âµâµâµâµâ´º', 39788 h : 'âµâ´°âµâ´°', 39789 hh : '%d âµâ´°âµâµâ´°âµâµâµ', 39790 d : 'â´°âµâµ', 39791 dd : '%d oâµâµâ´°âµ', 39792 M : 'â´°âµ¢oâµâµ', 39793 MM : '%d âµâµ¢âµ¢âµâµâµ', 39794 y : 'â´°âµâ´³â´°âµ', 39795 yy : '%d âµâµâ´³â´°âµâµ' 39796 }, 39797 week : { 39798 dow : 6, // Saturday is the first day of the week. 39799 doy : 12 // The week that contains Jan 1st is the first week of the year. 39800 } 39801 }); 39802 39803 //! moment.js locale configuration 39804 //! locale : ukrainian (uk) 39805 //! author : zemlanin : https://github.com/zemlanin 39806 //! Author : Menelion Elensúle : https://github.com/Oire 39807 39808 function uk__plural(word, num) { 39809 var forms = word.split('_'); 39810 return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); 39811 } 39812 function uk__relativeTimeWithPlural(number, withoutSuffix, key) { 39813 var format = { 39814 'mm': 'Ñ Ð²Ð¸Ð»Ð¸Ð½Ð°_Ñ Ð²Ð¸Ð»Ð¸Ð½Ð¸_Ñ Ð²Ð¸Ð»Ð¸Ð½', 39815 'hh': 'година_години_годин', 39816 'dd': 'денÑ_днÑ_днÑв', 39817 'MM': 'мÑÑÑÑÑ_мÑÑÑÑÑ_мÑÑÑÑÑв', 39818 'yy': 'ÑÑк_Ñоки_ÑокÑв' 39819 }; 39820 if (key === 'm') { 39821 return withoutSuffix ? 'Ñ Ð²Ð¸Ð»Ð¸Ð½Ð°' : 'Ñ Ð²Ð¸Ð»Ð¸Ð½Ñ'; 39822 } 39823 else if (key === 'h') { 39824 return withoutSuffix ? 'година' : 'годинÑ'; 39825 } 39826 else { 39827 return number + ' ' + uk__plural(format[key], +number); 39828 } 39829 } 39830 function uk__monthsCaseReplace(m, format) { 39831 var months = { 39832 'nominative': 'ÑÑÑенÑ_лÑÑий_беÑезенÑ_квÑÑенÑ_ÑÑавенÑ_ÑеÑвенÑ_липенÑ_ÑеÑпенÑ_веÑеÑенÑ_жовÑенÑ_лиÑÑопад_гÑÑденÑ'.split('_'), 39833 'accusative': 'ÑÑÑнÑ_лÑÑого_беÑезнÑ_квÑÑнÑ_ÑÑавнÑ_ÑеÑвнÑ_липнÑ_ÑеÑпнÑ_веÑеÑнÑ_жовÑнÑ_лиÑÑопада_гÑÑднÑ'.split('_') 39834 }, 39835 nounCase = (/D[oD]? *MMMM?/).test(format) ? 39836 'accusative' : 39837 'nominative'; 39838 return months[nounCase][m.month()]; 39839 } 39840 function uk__weekdaysCaseReplace(m, format) { 39841 var weekdays = { 39842 'nominative': 'недÑлÑ_понедÑлок_вÑвÑоÑок_ÑеÑеда_ÑеÑвеÑ_пâÑÑниÑÑ_ÑÑбоÑа'.split('_'), 39843 'accusative': 'недÑлÑ_понедÑлок_вÑвÑоÑок_ÑеÑедÑ_ÑеÑвеÑ_пâÑÑниÑÑ_ÑÑбоÑÑ'.split('_'), 39844 'genitive': 'недÑлÑ_понедÑлка_вÑвÑоÑка_ÑеÑеди_ÑеÑвеÑга_пâÑÑниÑÑ_ÑÑбоÑи'.split('_') 39845 }, 39846 nounCase = (/(\[[ÐвУÑ]\]) ?dddd/).test(format) ? 39847 'accusative' : 39848 ((/\[?(?:минÑлоÑ|наÑÑÑпноÑ)? ?\] ?dddd/).test(format) ? 39849 'genitive' : 39850 'nominative'); 39851 return weekdays[nounCase][m.day()]; 39852 } 39853 function processHoursFunction(str) { 39854 return function () { 39855 return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT'; 39856 }; 39857 } 39858 39859 var uk = _moment__default.defineLocale('uk', { 39860 months : uk__monthsCaseReplace, 39861 monthsShort : 'ÑÑÑ_лÑÑ_беÑ_квÑÑ_ÑÑав_ÑеÑв_лип_ÑеÑп_веÑ_жовÑ_лиÑÑ_гÑÑд'.split('_'), 39862 weekdays : uk__weekdaysCaseReplace, 39863 weekdaysShort : 'нд_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 39864 weekdaysMin : 'нд_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 39865 longDateFormat : { 39866 LT : 'HH:mm', 39867 LTS : 'HH:mm:ss', 39868 L : 'DD.MM.YYYY', 39869 LL : 'D MMMM YYYY Ñ.', 39870 LLL : 'D MMMM YYYY Ñ., HH:mm', 39871 LLLL : 'dddd, D MMMM YYYY Ñ., HH:mm' 39872 }, 39873 calendar : { 39874 sameDay: processHoursFunction('[СÑÐ¾Ð³Ð¾Ð´Ð½Ñ '), 39875 nextDay: processHoursFunction('[ÐавÑÑа '), 39876 lastDay: processHoursFunction('[ÐÑоÑа '), 39877 nextWeek: processHoursFunction('[У] dddd ['), 39878 lastWeek: function () { 39879 switch (this.day()) { 39880 case 0: 39881 case 3: 39882 case 5: 39883 case 6: 39884 return processHoursFunction('[ÐинÑлоÑ] dddd [').call(this); 39885 case 1: 39886 case 2: 39887 case 4: 39888 return processHoursFunction('[ÐинÑлого] dddd [').call(this); 39889 } 39890 }, 39891 sameElse: 'L' 39892 }, 39893 relativeTime : { 39894 future : 'за %s', 39895 past : '%s ÑомÑ', 39896 s : 'декÑлÑка ÑекÑнд', 39897 m : uk__relativeTimeWithPlural, 39898 mm : uk__relativeTimeWithPlural, 39899 h : 'годинÑ', 39900 hh : uk__relativeTimeWithPlural, 39901 d : 'денÑ', 39902 dd : uk__relativeTimeWithPlural, 39903 M : 'мÑÑÑÑÑ', 39904 MM : uk__relativeTimeWithPlural, 39905 y : 'ÑÑк', 39906 yy : uk__relativeTimeWithPlural 39907 }, 39908 // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason 39909 meridiemParse: /ноÑÑ|ÑанкÑ|днÑ|веÑоÑа/, 39910 isPM: function (input) { 39911 return /^(днÑ|веÑоÑа)$/.test(input); 39912 }, 39913 meridiem : function (hour, minute, isLower) { 39914 if (hour < 4) { 39915 return 'ноÑÑ'; 39916 } else if (hour < 12) { 39917 return 'ÑанкÑ'; 39918 } else if (hour < 17) { 39919 return 'днÑ'; 39920 } else { 39921 return 'веÑоÑа'; 39922 } 39923 }, 39924 ordinalParse: /\d{1,2}-(й|го)/, 39925 ordinal: function (number, period) { 39926 switch (period) { 39927 case 'M': 39928 case 'd': 39929 case 'DDD': 39930 case 'w': 39931 case 'W': 39932 return number + '-й'; 39933 case 'D': 39934 return number + '-го'; 39935 default: 39936 return number; 39937 } 39938 }, 39939 week : { 39940 dow : 1, // Monday is the first day of the week. 39941 doy : 7 // The week that contains Jan 1st is the first week of the year. 39942 } 39943 }); 39944 39945 //! moment.js locale configuration 39946 //! locale : uzbek (uz) 39947 //! author : Sardor Muminov : https://github.com/muminoff 39948 39949 var uz = _moment__default.defineLocale('uz', { 39950 months : 'ÑнваÑÑ_ÑевÑалÑ_маÑÑ_апÑелÑ_май_иÑнÑ_иÑлÑ_авгÑÑÑ_ÑенÑÑбÑÑ_окÑÑбÑÑ_ноÑбÑÑ_декабÑÑ'.split('_'), 39951 monthsShort : 'Ñнв_Ñев_маÑ_апÑ_май_иÑн_иÑл_авг_Ñен_окÑ_ноÑ_дек'.split('_'), 39952 weekdays : 'ЯкÑанба_ÐÑÑанба_СеÑанба_ЧоÑÑанба_ÐайÑанба_ÐÑма_Шанба'.split('_'), 39953 weekdaysShort : 'ЯкÑ_ÐÑÑ_СеÑ_ЧоÑ_Ðай_ÐÑм_Шан'.split('_'), 39954 weekdaysMin : 'Як_ÐÑ_Се_Чо_Ðа_ÐÑ_Ша'.split('_'), 39955 longDateFormat : { 39956 LT : 'HH:mm', 39957 LTS : 'HH:mm:ss', 39958 L : 'DD/MM/YYYY', 39959 LL : 'D MMMM YYYY', 39960 LLL : 'D MMMM YYYY HH:mm', 39961 LLLL : 'D MMMM YYYY, dddd HH:mm' 39962 }, 39963 calendar : { 39964 sameDay : '[ÐÑгÑн ÑоаÑ] LT [да]', 39965 nextDay : '[ÐÑÑага] LT [да]', 39966 nextWeek : 'dddd [кÑни ÑоаÑ] LT [да]', 39967 lastDay : '[ÐеÑа ÑоаÑ] LT [да]', 39968 lastWeek : '[УÑган] dddd [кÑни ÑоаÑ] LT [да]', 39969 sameElse : 'L' 39970 }, 39971 relativeTime : { 39972 future : 'Якин %s иÑида', 39973 past : 'ÐÐ¸Ñ Ð½ÐµÑа %s олдин', 39974 s : 'ÑÑÑÑаÑ', 39975 m : 'Ð±Ð¸Ñ Ð´Ð°ÐºÐ¸ÐºÐ°', 39976 mm : '%d дакика', 39977 h : 'Ð±Ð¸Ñ ÑоаÑ', 39978 hh : '%d ÑоаÑ', 39979 d : 'Ð±Ð¸Ñ ÐºÑн', 39980 dd : '%d кÑн', 39981 M : 'Ð±Ð¸Ñ Ð¾Ð¹', 39982 MM : '%d ой', 39983 y : 'Ð±Ð¸Ñ Ð¹Ð¸Ð»', 39984 yy : '%d йил' 39985 }, 39986 week : { 39987 dow : 1, // Monday is the first day of the week. 39988 doy : 7 // The week that contains Jan 4th is the first week of the year. 39989 } 39990 }); 39991 39992 //! moment.js locale configuration 39993 //! locale : vietnamese (vi) 39994 //! author : Bang Nguyen : https://github.com/bangnk 39995 39996 var vi = _moment__default.defineLocale('vi', { 39997 months : 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'), 39998 monthsShort : 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'), 39999 weekdays : 'chá»§ nháºt_thứ hai_thứ ba_thứ tư_thứ nÄm_thứ sáu_thứ bảy'.split('_'), 40000 weekdaysShort : 'CN_T2_T3_T4_T5_T6_T7'.split('_'), 40001 weekdaysMin : 'CN_T2_T3_T4_T5_T6_T7'.split('_'), 40002 longDateFormat : { 40003 LT : 'HH:mm', 40004 LTS : 'HH:mm:ss', 40005 L : 'DD/MM/YYYY', 40006 LL : 'D MMMM [nÄm] YYYY', 40007 LLL : 'D MMMM [nÄm] YYYY HH:mm', 40008 LLLL : 'dddd, D MMMM [nÄm] YYYY HH:mm', 40009 l : 'DD/M/YYYY', 40010 ll : 'D MMM YYYY', 40011 lll : 'D MMM YYYY HH:mm', 40012 llll : 'ddd, D MMM YYYY HH:mm' 40013 }, 40014 calendar : { 40015 sameDay: '[Hôm nay lúc] LT', 40016 nextDay: '[Ngà y mai lúc] LT', 40017 nextWeek: 'dddd [tuần tá»i lúc] LT', 40018 lastDay: '[Hôm qua lúc] LT', 40019 lastWeek: 'dddd [tuần rá»i lúc] LT', 40020 sameElse: 'L' 40021 }, 40022 relativeTime : { 40023 future : '%s tá»i', 40024 past : '%s trưá»c', 40025 s : 'và i giây', 40026 m : 'má»t phút', 40027 mm : '%d phút', 40028 h : 'má»t giá»', 40029 hh : '%d giá»', 40030 d : 'má»t ngà y', 40031 dd : '%d ngà y', 40032 M : 'má»t tháng', 40033 MM : '%d tháng', 40034 y : 'má»t nÄm', 40035 yy : '%d nÄm' 40036 }, 40037 ordinalParse: /\d{1,2}/, 40038 ordinal : function (number) { 40039 return number; 40040 }, 40041 week : { 40042 dow : 1, // Monday is the first day of the week. 40043 doy : 4 // The week that contains Jan 4th is the first week of the year. 40044 } 40045 }); 40046 40047 //! moment.js locale configuration 40048 //! locale : chinese (zh-cn) 40049 //! author : suupic : https://github.com/suupic 40050 //! author : Zeno Zeng : https://github.com/zenozeng 40051 40052 var zh_cn = _moment__default.defineLocale('zh-cn', { 40053 months : '䏿_äºæ_䏿_åæ_äºæ_å æ_䏿_å «æ_乿_åæ_å䏿_åäºæ'.split('_'), 40054 monthsShort : '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split('_'), 40055 weekdays : 'æææ¥_ææä¸_ææäº_ææä¸_ææå_ææäº_ææå '.split('_'), 40056 weekdaysShort : '卿¥_å¨ä¸_å¨äº_å¨ä¸_å¨å_å¨äº_å¨å '.split('_'), 40057 weekdaysMin : 'æ¥_ä¸_äº_ä¸_å_äº_å '.split('_'), 40058 longDateFormat : { 40059 LT : 'Ahç¹mmå', 40060 LTS : 'Ahç¹måsç§', 40061 L : 'YYYY-MM-DD', 40062 LL : 'YYYYå¹´MMMDæ¥', 40063 LLL : 'YYYYå¹´MMMDæ¥Ahç¹mmå', 40064 LLLL : 'YYYYå¹´MMMDæ¥ddddAhç¹mmå', 40065 l : 'YYYY-MM-DD', 40066 ll : 'YYYYå¹´MMMDæ¥', 40067 lll : 'YYYYå¹´MMMDæ¥Ahç¹mmå', 40068 llll : 'YYYYå¹´MMMDæ¥ddddAhç¹mmå' 40069 }, 40070 meridiemParse: /忍|æ©ä¸|ä¸å|ä¸å|ä¸å|æä¸/, 40071 meridiemHour: function (hour, meridiem) { 40072 if (hour === 12) { 40073 hour = 0; 40074 } 40075 if (meridiem === '忍' || meridiem === 'æ©ä¸' || 40076 meridiem === 'ä¸å') { 40077 return hour; 40078 } else if (meridiem === 'ä¸å' || meridiem === 'æä¸') { 40079 return hour + 12; 40080 } else { 40081 // 'ä¸å' 40082 return hour >= 11 ? hour : hour + 12; 40083 } 40084 }, 40085 meridiem : function (hour, minute, isLower) { 40086 var hm = hour * 100 + minute; 40087 if (hm < 600) { 40088 return '忍'; 40089 } else if (hm < 900) { 40090 return 'æ©ä¸'; 40091 } else if (hm < 1130) { 40092 return 'ä¸å'; 40093 } else if (hm < 1230) { 40094 return 'ä¸å'; 40095 } else if (hm < 1800) { 40096 return 'ä¸å'; 40097 } else { 40098 return 'æä¸'; 40099 } 40100 }, 40101 calendar : { 40102 sameDay : function () { 40103 return this.minutes() === 0 ? '[ä»å¤©]Ah[ç¹æ´]' : '[ä»å¤©]LT'; 40104 }, 40105 nextDay : function () { 40106 return this.minutes() === 0 ? '[æå¤©]Ah[ç¹æ´]' : '[æå¤©]LT'; 40107 }, 40108 lastDay : function () { 40109 return this.minutes() === 0 ? '[æ¨å¤©]Ah[ç¹æ´]' : '[æ¨å¤©]LT'; 40110 }, 40111 nextWeek : function () { 40112 var startOfWeek, prefix; 40113 startOfWeek = _moment__default().startOf('week'); 40114 prefix = this.unix() - startOfWeek.unix() >= 7 * 24 * 3600 ? '[ä¸]' : '[æ¬]'; 40115 return this.minutes() === 0 ? prefix + 'dddAhç¹æ´' : prefix + 'dddAhç¹mm'; 40116 }, 40117 lastWeek : function () { 40118 var startOfWeek, prefix; 40119 startOfWeek = _moment__default().startOf('week'); 40120 prefix = this.unix() < startOfWeek.unix() ? '[ä¸]' : '[æ¬]'; 40121 return this.minutes() === 0 ? prefix + 'dddAhç¹æ´' : prefix + 'dddAhç¹mm'; 40122 }, 40123 sameElse : 'LL' 40124 }, 40125 ordinalParse: /\d{1,2}(æ¥|æ|å¨)/, 40126 ordinal : function (number, period) { 40127 switch (period) { 40128 case 'd': 40129 case 'D': 40130 case 'DDD': 40131 return number + 'æ¥'; 40132 case 'M': 40133 return number + 'æ'; 40134 case 'w': 40135 case 'W': 40136 return number + 'å¨'; 40137 default: 40138 return number; 40139 } 40140 }, 40141 relativeTime : { 40142 future : '%så ', 40143 past : '%så', 40144 s : 'å ç§', 40145 m : '1 åé', 40146 mm : '%d åé', 40147 h : '1 å°æ¶', 40148 hh : '%d å°æ¶', 40149 d : '1 天', 40150 dd : '%d 天', 40151 M : '1 个æ', 40152 MM : '%d 个æ', 40153 y : '1 å¹´', 40154 yy : '%d å¹´' 40155 }, 40156 week : { 40157 // GB/T 7408-1994ãæ°æ®å åäº¤æ¢æ ¼å¼Â·ä¿¡æ¯äº¤æ¢Â·æ¥æåæ¶é´è¡¨ç¤ºæ³ãä¸ISO 8601:1988çæ 40158 dow : 1, // Monday is the first day of the week. 40159 doy : 4 // The week that contains Jan 4th is the first week of the year. 40160 } 40161 }); 40162 40163 //! moment.js locale configuration 40164 //! locale : traditional chinese (zh-tw) 40165 //! author : Ben : https://github.com/ben-lin 40166 40167 var zh_tw = _moment__default.defineLocale('zh-tw', { 40168 months : '䏿_äºæ_䏿_åæ_äºæ_å æ_䏿_å «æ_乿_åæ_å䏿_åäºæ'.split('_'), 40169 monthsShort : '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split('_'), 40170 weekdays : 'æææ¥_ææä¸_ææäº_ææä¸_ææå_ææäº_ææå '.split('_'), 40171 weekdaysShort : '鱿¥_é±ä¸_é±äº_é±ä¸_é±å_é±äº_é±å '.split('_'), 40172 weekdaysMin : 'æ¥_ä¸_äº_ä¸_å_äº_å '.split('_'), 40173 longDateFormat : { 40174 LT : 'Ahé»mmå', 40175 LTS : 'Ahé»måsç§', 40176 L : 'YYYYå¹´MMMDæ¥', 40177 LL : 'YYYYå¹´MMMDæ¥', 40178 LLL : 'YYYYå¹´MMMDæ¥Ahé»mmå', 40179 LLLL : 'YYYYå¹´MMMDæ¥ddddAhé»mmå', 40180 l : 'YYYYå¹´MMMDæ¥', 40181 ll : 'YYYYå¹´MMMDæ¥', 40182 lll : 'YYYYå¹´MMMDæ¥Ahé»mmå', 40183 llll : 'YYYYå¹´MMMDæ¥ddddAhé»mmå' 40184 }, 40185 meridiemParse: /æ©ä¸|ä¸å|ä¸å|ä¸å|æä¸/, 40186 meridiemHour : function (hour, meridiem) { 40187 if (hour === 12) { 40188 hour = 0; 40189 } 40190 if (meridiem === 'æ©ä¸' || meridiem === 'ä¸å') { 40191 return hour; 40192 } else if (meridiem === 'ä¸å') { 40193 return hour >= 11 ? hour : hour + 12; 40194 } else if (meridiem === 'ä¸å' || meridiem === 'æä¸') { 40195 return hour + 12; 40196 } 40197 }, 40198 meridiem : function (hour, minute, isLower) { 40199 var hm = hour * 100 + minute; 40200 if (hm < 900) { 40201 return 'æ©ä¸'; 40202 } else if (hm < 1130) { 40203 return 'ä¸å'; 40204 } else if (hm < 1230) { 40205 return 'ä¸å'; 40206 } else if (hm < 1800) { 40207 return 'ä¸å'; 40208 } else { 40209 return 'æä¸'; 40210 } 40211 }, 40212 calendar : { 40213 sameDay : '[ä»å¤©]LT', 40214 nextDay : '[æå¤©]LT', 40215 nextWeek : '[ä¸]ddddLT', 40216 lastDay : '[æ¨å¤©]LT', 40217 lastWeek : '[ä¸]ddddLT', 40218 sameElse : 'L' 40219 }, 40220 ordinalParse: /\d{1,2}(æ¥|æ|é±)/, 40221 ordinal : function (number, period) { 40222 switch (period) { 40223 case 'd' : 40224 case 'D' : 40225 case 'DDD' : 40226 return number + 'æ¥'; 40227 case 'M' : 40228 return number + 'æ'; 40229 case 'w' : 40230 case 'W' : 40231 return number + 'é±'; 40232 default : 40233 return number; 40234 } 40235 }, 40236 relativeTime : { 40237 future : '%så §', 40238 past : '%så', 40239 s : 'å¹¾ç§', 40240
vendor: 21,376 bytes, lines 40240-40716
40240 m : 'ä¸åé', 40241 mm : '%dåé', 40242 h : 'ä¸å°æ', 40243 hh : '%då°æ', 40244 d : 'ä¸å¤©', 40245 dd : '%d天', 40246 M : 'ä¸åæ', 40247 MM : '%dåæ', 40248 y : 'ä¸å¹´', 40249 yy : '%då¹´' 40250 } 40251 }); 40252 40253 var moment_with_locales = _moment__default; 40254 moment_with_locales.locale('en'); 40255 40256 return moment_with_locales; 40257 40258})); 40259 40260//! moment-timezone.js 40261//! version : 0.4.0 40262//! author : Tim Wood 40263//! license : MIT 40264//! github.com/moment/moment-timezone 40265 40266(function (root, factory) { 40267 "use strict"; 40268 40269 /*global define*/ 40270 if (typeof define === 'function' && define.amd) { 40271 define(['moment'], factory); // AMD 40272 } else if (typeof exports === 'object') { 40273 module.exports = factory(require('moment')); // Node 40274 } else { 40275 factory(root.moment); // Browser 40276 } 40277}(this, function (moment) { 40278 "use strict"; 40279 40280 // Do not load moment-timezone a second time. 40281 if (moment.tz !== undefined) { 40282 logError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion); 40283 return moment; 40284 } 40285 40286 var VERSION = "0.4.0", 40287 zones = {}, 40288 links = {}, 40289 names = {}, 40290 40291 momentVersion = moment.version.split('.'), 40292 major = +momentVersion[0], 40293 minor = +momentVersion[1]; 40294 40295 // Moment.js version check 40296 if (major < 2 || (major === 2 && minor < 6)) { 40297 logError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com'); 40298 } 40299 40300 /************************************ 40301 Unpacking 40302 ************************************/ 40303 40304 function charCodeToInt(charCode) { 40305 if (charCode > 96) { 40306 return charCode - 87; 40307 } else if (charCode > 64) { 40308 return charCode - 29; 40309 } 40310 return charCode - 48; 40311 } 40312 40313 function unpackBase60(string) { 40314 var i = 0, 40315 parts = string.split('.'), 40316 whole = parts[0], 40317 fractional = parts[1] || '', 40318 multiplier = 1, 40319 num, 40320 out = 0, 40321 sign = 1; 40322 40323 // handle negative numbers 40324 if (string.charCodeAt(0) === 45) { 40325 i = 1; 40326 sign = -1; 40327 } 40328 40329 // handle digits before the decimal 40330 for (i; i < whole.length; i++) { 40331 num = charCodeToInt(whole.charCodeAt(i)); 40332 out = 60 * out + num; 40333 } 40334 40335 // handle digits after the decimal 40336 for (i = 0; i < fractional.length; i++) { 40337 multiplier = multiplier / 60; 40338 num = charCodeToInt(fractional.charCodeAt(i)); 40339 out += num * multiplier; 40340 } 40341 40342 return out * sign; 40343 } 40344 40345 function arrayToInt (array) { 40346 for (var i = 0; i < array.length; i++) { 40347 array[i] = unpackBase60(array[i]); 40348 } 40349 } 40350 40351 function intToUntil (array, length) { 40352 for (var i = 0; i < length; i++) { 40353 array[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds 40354 } 40355 40356 array[length - 1] = Infinity; 40357 } 40358 40359 function mapIndices (source, indices) { 40360 var out = [], i; 40361 40362 for (i = 0; i < indices.length; i++) { 40363 out[i] = source[indices[i]]; 40364 } 40365 40366 return out; 40367 } 40368 40369 function unpack (string) { 40370 var data = string.split('|'), 40371 offsets = data[2].split(' '), 40372 indices = data[3].split(''), 40373 untils = data[4].split(' '); 40374 40375 arrayToInt(offsets); 40376 arrayToInt(indices); 40377 arrayToInt(untils); 40378 40379 intToUntil(untils, indices.length); 40380 40381 return { 40382 name : data[0], 40383 abbrs : mapIndices(data[1].split(' '), indices), 40384 offsets : mapIndices(offsets, indices), 40385 untils : untils 40386 }; 40387 } 40388 40389 /************************************ 40390 Zone object 40391 ************************************/ 40392 40393 function Zone (packedString) { 40394 if (packedString) { 40395 this._set(unpack(packedString)); 40396 } 40397 } 40398 40399 Zone.prototype = { 40400 _set : function (unpacked) { 40401 this.name = unpacked.name; 40402 this.abbrs = unpacked.abbrs; 40403 this.untils = unpacked.untils; 40404 this.offsets = unpacked.offsets; 40405 }, 40406 40407 _index : function (timestamp) { 40408 var target = +timestamp, 40409 untils = this.untils, 40410 i; 40411 40412 for (i = 0; i < untils.length; i++) { 40413 if (target < untils[i]) { 40414 return i; 40415 } 40416 } 40417 }, 40418 40419 parse : function (timestamp) { 40420 var target = +timestamp, 40421 offsets = this.offsets, 40422 untils = this.untils, 40423 max = untils.length - 1, 40424 offset, offsetNext, offsetPrev, i; 40425 40426 for (i = 0; i < max; i++) { 40427 offset = offsets[i]; 40428 offsetNext = offsets[i + 1]; 40429 offsetPrev = offsets[i ? i - 1 : i]; 40430 40431 if (offset < offsetNext && tz.moveAmbiguousForward) { 40432 offset = offsetNext; 40433 } else if (offset > offsetPrev && tz.moveInvalidForward) { 40434 offset = offsetPrev; 40435 } 40436 40437 if (target < untils[i] - (offset * 60000)) { 40438 return offsets[i]; 40439 } 40440 } 40441 40442 return offsets[max]; 40443 }, 40444 40445 abbr : function (mom) { 40446 return this.abbrs[this._index(mom)]; 40447 }, 40448 40449 offset : function (mom) { 40450 return this.offsets[this._index(mom)]; 40451 } 40452 }; 40453 40454 /************************************ 40455 Global Methods 40456 ************************************/ 40457 40458 function normalizeName (name) { 40459 return (name || '').toLowerCase().replace(/\//g, '_'); 40460 } 40461 40462 function addZone (packed) { 40463 var i, name, normalized; 40464 40465 if (typeof packed === "string") { 40466 packed = [packed]; 40467 } 40468 40469 for (i = 0; i < packed.length; i++) { 40470 name = packed[i].split('|')[0]; 40471 normalized = normalizeName(name); 40472 zones[normalized] = packed[i]; 40473 names[normalized] = name; 40474 } 40475 } 40476 40477 function getZone (name, caller) { 40478 name = normalizeName(name); 40479 40480 var zone = zones[name]; 40481 var link; 40482 40483 if (zone instanceof Zone) { 40484 return zone; 40485 } 40486 40487 if (typeof zone === 'string') { 40488 zone = new Zone(zone); 40489 zones[name] = zone; 40490 return zone; 40491 } 40492 40493 // Pass getZone to prevent recursion more than 1 level deep 40494 if (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) { 40495 zone = zones[name] = new Zone(); 40496 zone._set(link); 40497 zone.name = names[name]; 40498 return zone; 40499 } 40500 40501 return null; 40502 } 40503 40504 function getNames () { 40505 var i, out = []; 40506 40507 for (i in names) { 40508 if (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) { 40509 out.push(names[i]); 40510 } 40511 } 40512 40513 return out.sort(); 40514 } 40515 40516 function addLink (aliases) { 40517 var i, alias, normal0, normal1; 40518 40519 if (typeof aliases === "string") { 40520 aliases = [aliases]; 40521 } 40522 40523 for (i = 0; i < aliases.length; i++) { 40524 alias = aliases[i].split('|'); 40525 40526 normal0 = normalizeName(alias[0]); 40527 normal1 = normalizeName(alias[1]); 40528 40529 links[normal0] = normal1; 40530 names[normal0] = alias[0]; 40531 40532 links[normal1] = normal0; 40533 names[normal1] = alias[1]; 40534 } 40535 } 40536 40537 function loadData (data) { 40538 addZone(data.zones); 40539 addLink(data.links); 40540 tz.dataVersion = data.version; 40541 } 40542 40543 function zoneExists (name) { 40544 if (!zoneExists.didShowError) { 40545 zoneExists.didShowError = true; 40546 logError("moment.tz.zoneExists('" + name + "') has been deprecated in favor of !moment.tz.zone('" + name + "')"); 40547 } 40548 return !!getZone(name); 40549 } 40550 40551 function needsOffset (m) { 40552 return !!(m._a && (m._tzm === undefined)); 40553 } 40554 40555 function logError (message) { 40556 if (typeof console !== 'undefined' && typeof console.error === 'function') { 40557 console.error(message); 40558 } 40559 } 40560 40561 /************************************ 40562 moment.tz namespace 40563 ************************************/ 40564 40565 function tz (input) { 40566 var args = Array.prototype.slice.call(arguments, 0, -1), 40567 name = arguments[arguments.length - 1], 40568 zone = getZone(name), 40569 out = moment.utc.apply(null, args); 40570 40571 if (zone && !moment.isMoment(input) && needsOffset(out)) { 40572 out.add(zone.parse(out), 'minutes'); 40573 } 40574 40575 out.tz(name); 40576 40577 return out; 40578 } 40579 40580 tz.version = VERSION; 40581 tz.dataVersion = ''; 40582 tz._zones = zones; 40583 tz._links = links; 40584 tz._names = names; 40585 tz.add = addZone; 40586 tz.link = addLink; 40587 tz.load = loadData; 40588 tz.zone = getZone; 40589 tz.zoneExists = zoneExists; // deprecated in 0.1.0 40590 tz.names = getNames; 40591 tz.Zone = Zone; 40592 tz.unpack = unpack; 40593 tz.unpackBase60 = unpackBase60; 40594 tz.needsOffset = needsOffset; 40595 tz.moveInvalidForward = true; 40596 tz.moveAmbiguousForward = false; 40597 40598 /************************************ 40599 Interface with Moment.js 40600 ************************************/ 40601 40602 var fn = moment.fn; 40603 40604 moment.tz = tz; 40605 40606 moment.defaultZone = null; 40607 40608 moment.updateOffset = function (mom, keepTime) { 40609 var zone = moment.defaultZone, 40610 offset; 40611 40612 if (mom._z === undefined) { 40613 if (zone && needsOffset(mom) && !mom._isUTC) { 40614 mom._d = moment.utc(mom._a)._d; 40615 mom.utc().add(zone.parse(mom), 'minutes'); 40616 } 40617 mom._z = zone; 40618 } 40619 if (mom._z) { 40620 offset = mom._z.offset(mom); 40621 if (Math.abs(offset) < 16) { 40622 offset = offset / 60; 40623 } 40624 if (mom.utcOffset !== undefined) { 40625 mom.utcOffset(-offset, keepTime); 40626 } else { 40627 mom.zone(offset, keepTime); 40628 } 40629 } 40630 }; 40631 40632 fn.tz = function (name) { 40633 if (name) { 40634 this._z = getZone(name); 40635 if (this._z) { 40636 moment.updateOffset(this); 40637 } else { 40638 logError("Moment Timezone has no data for " + name + ". See http://momentjs.com/timezone/docs/#/data-loading/."); 40639 } 40640 return this; 40641 } 40642 if (this._z) { return this._z.name; } 40643 }; 40644 40645 function abbrWrap (old) { 40646 return function () { 40647 if (this._z) { return this._z.abbr(this); } 40648 return old.call(this); 40649 }; 40650 } 40651 40652 function resetZoneWrap (old) { 40653 return function () { 40654 this._z = null; 40655 return old.apply(this, arguments); 40656 }; 40657 } 40658 40659 fn.zoneName = abbrWrap(fn.zoneName); 40660 fn.zoneAbbr = abbrWrap(fn.zoneAbbr); 40661 fn.utc = resetZoneWrap(fn.utc); 40662 40663 moment.tz.setDefault = function(name) { 40664 if (major < 2 || (major === 2 && minor < 9)) { 40665 logError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.'); 40666 } 40667 moment.defaultZone = name ? getZone(name) : null; 40668 return moment; 40669 }; 40670 40671 // Cloning a moment should include the _z property. 40672 var momentProperties = moment.momentProperties; 40673 if (Object.prototype.toString.call(momentProperties) === '[object Array]') { 40674 // moment 2.8.1+ 40675 momentProperties.push('_z'); 40676 momentProperties.push('_a'); 40677 } else if (momentProperties) { 40678 // moment 2.7.0 40679 momentProperties._z = null; 40680 } 40681 40682 loadData({ 40683 "version": "2015d", 40684 "zones": [ 40685 "Africa/Abidjan|LMT GMT|g.8 0|01|-2ldXH.Q", 40686 "Africa/Accra|LMT GMT GHST|.Q 0 -k|012121212121212121212121212121212121212121212121|-26BbX.8 6tzX.8 MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE", 40687 "Africa/Addis_Ababa|LMT EAT BEAT BEAUT|-2r.g -30 -2u -2J|01231|-1F3Cr.g 3Dzr.g okMu MFXJ", 40688 "Africa/Algiers|PMT WET WEST CET CEST|-9.l 0 -10 -10 -20|0121212121212121343431312123431213|-2nco9.l cNb9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 DA0 Imo0 rd0 De0 9Xz0 1fb0 1ap0 16K0 2yo0 mEp0 hwL0 jxA0 11A0 dDd0 17b0 11B0 1cN0 2Dy0 1cN0 1fB0 1cL0", 40689 "Africa/Bangui|LMT WAT|-d.A -10|01|-22y0d.A", 40690 "Africa/Bissau|LMT WAT GMT|12.k 10 0|012|-2ldWV.E 2xonV.E", 40691 "Africa/Blantyre|LMT CAT|-2a.k -20|01|-2GJea.k", 40692 "Africa/Cairo|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1bIO0 vb0 1ip0 11z0 1iN0 1nz0 12p0 1pz0 10N0 1pz0 16p0 1jz0 s3d0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1WL0 rd0 1Rz0 wp0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1qL0 Xd0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1ny0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 WL0 1qN0 Rb0 1wp0 On0 1zd0 Lz0 1EN0 Fb0 c10 8n0 8Nd0 gL0 e10 mn0", 40693 "Africa/Casablanca|LMT WET WEST CET|u.k 0 -10 -10|012121212121212121312121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2gMnt.E 130Lt.E rb0 Dd0 dVb0 b6p0 TX0 EoB0 LL0 gnd0 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4mn0 SyN0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uo0 e00 DA0 11A0 rA0 e00 Jc0 WM0 m00 gM0 M00 WM0 jc0 e00 RA0 11A0 dA0 e00 Uo0 11A0 800 gM0 Xc0 11A0 5c0 e00 17A0 WM0 2o0 e00 1ao0 19A0 1g00 16M0 1iM0 1400 1lA0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qo0 1200 1kM0 14M0 1i00", 40694 "Africa/Ceuta|WET WEST CET CEST|0 -10 -10 -20|010101010101010101010232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-25KN0 11z0 drd0 18o0 3I00 17c0 1fA0 1a00 1io0 1a00 1y7p0 LL0 gnd0 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4VB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40695 "Africa/El_Aaiun|LMT WAT WET WEST|Q.M 10 0 -10|0123232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1rDz7.c 1GVA7.c 6L0 AL0 1Nd0 XX0 1Cp0 pz0 1cBB0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uo0 e00 DA0 11A0 rA0 e00 Jc0 WM0 m00 gM0 M00 WM0 jc0 e00 RA0 11A0 dA0 e00 Uo0 11A0 800 gM0 Xc0 11A0 5c0 e00 17A0 WM0 2o0 e00 1ao0 19A0 1g00 16M0 1iM0 1400 1lA0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qo0 1200 1kM0 14M0 1i00", 40696 "Africa/Johannesburg|SAST SAST SAST|-1u -20 -30|012121|-2GJdu 1Ajdu 1cL0 1cN0 1cL0", 40697 "Africa/Juba|LMT CAT CAST EAT|-2a.8 -20 -30 -30|01212121212121212121212121212121213|-1yW2a.8 1zK0a.8 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0", 40698 "Africa/Monrovia|MMT LRT GMT|H.8 I.u 0|012|-23Lzg.Q 29s01.m", 40699 "Africa/Ndjamena|LMT WAT WAST|-10.c -10 -20|0121|-2le10.c 2J3c0.c Wn0", 40700 "Africa/Tripoli|LMT CET CEST EET|-Q.I -10 -20 -20|012121213121212121212121213123123|-21JcQ.I 1hnBQ.I vx0 4iP0 xx0 4eN0 Bb0 7ip0 U0n0 A10 1db0 1cN0 1db0 1dd0 1db0 1eN0 1bb0 1e10 1cL0 1c10 1db0 1dd0 1db0 1cN0 1db0 1q10 fAn0 1ep0 1db0 AKq0 TA0 1o00", 40701 "Africa/Tunis|PMT CET CEST|-9.l -10 -20|0121212121212121212121212121212121|-2nco9.l 18pa9.l 1qM0 DA0 3Tc0 11B0 1ze0 WM0 7z0 3d0 14L0 1cN0 1f90 1ar0 16J0 1gXB0 WM0 1rA0 11c0 nwo0 Ko0 1cM0 1cM0 1rA0 10M0 zuM0 10N0 1aN0 1qM0 WM0 1qM0 11A0 1o00", 40702 "Africa/Windhoek|SWAT SAST SAST CAT WAT WAST|-1u -20 -30 -20 -10 -20|012134545454545454545454545454545454545454545454545454545454545454545454545454545454545454545|-2GJdu 1Ajdu 1cL0 1SqL0 9NA0 11D0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0", 40703 "America/Adak|NST NWT NPT BST BDT AHST HST HDT|b0 a0 a0 b0 a0 a0 a0 90|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17SX0 8wW0 iB0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40704 "America/Anchorage|CAT CAWT CAPT AHST AHDT YST AKST AKDT|a0 90 90 a0 90 90 90 80|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17T00 8wX0 iA0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40705 "America/Anguilla|LMT AST|46.4 40|01|-2kNvR.U", 40706 "America/Araguaina|LMT BRT BRST|3c.M 30 20|0121212121212121212121212121212121212121212121212121|-2glwL.c HdKL.c 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 ny10 Lz0", 40707 "America/Argentina/Buenos_Aires|CMT ART ARST ART ARST|4g.M 40 30 30 20|0121212121212121212121212121212121212121213434343434343234343|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 g0p0 10M0 j3c0 uL0 1qN0 WL0", 40708 "America/Argentina/Catamarca|CMT ART ARST ART ARST WART|4g.M 40 30 30 20 40|0121212121212121212121212121212121212121213434343454343235343|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 g0p0 10M0 ako0 7B0 8zb0 uL0", 40709 "America/Argentina/Cordoba|CMT ART ARST ART ARST WART|4g.M 40 30 30 20 40|0121212121212121212121212121212121212121213434343454343234343|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 g0p0 10M0 j3c0 uL0 1qN0 WL0", 40710 "America/Argentina/Jujuy|CMT ART ARST ART ARST WART WARST|4g.M 40 30 30 20 40 30|01212121212121212121212121212121212121212134343456543432343|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1ze0 TX0 1ld0 WK0 1wp0 TX0 g0p0 10M0 j3c0 uL0", 40711 "America/Argentina/La_Rioja|CMT ART ARST ART ARST WART|4g.M 40 30 30 20 40|01212121212121212121212121212121212121212134343434534343235343|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 g0p0 10M0 ako0 7B0 8zb0 uL0", 40712 "America/Argentina/Mendoza|CMT ART ARST ART ARST WART WARST|4g.M 40 30 30 20 40 30|0121212121212121212121212121212121212121213434345656543235343|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1u20 SL0 1vd0 Tb0 1wp0 TW0 g0p0 10M0 agM0 Op0 7TX0 uL0", 40713 "America/Argentina/Rio_Gallegos|CMT ART ARST ART ARST WART|4g.M 40 30 30 20 40|0121212121212121212121212121212121212121213434343434343235343|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 g0p0 10M0 ako0 7B0 8zb0 uL0", 40714 "America/Argentina/Salta|CMT ART ARST ART ARST WART|4g.M 40 30 30 20 40|01212121212121212121212121212121212121212134343434543432343|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 g0p0 10M0 j3c0 uL0", 40715 "America/Argentina/San_Juan|CMT ART ARST ART ARST WART|4g.M 40 30 30 20 40|01212121212121212121212121212121212121212134343434534343235343|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 g0p0 10M0 ak00 m10 8lb0 uL0", 40716 "America/Argentina/San_Luis|CMT ART ARST ART ARST WART WARST|4g.M 40 30 30 20 40 30|01212121212121212121212121212121212121212134343456536353465653
40716|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 XX0 1q20 SL0 AN0 kin0 10M0 ak00 m10 8lb0 8L0 jd0 1qN0 WL0 1qN0", 40717 "America/Argentina/Tucuman|CMT ART ARST ART ARST WART|4g.M 40 30 30 20 40|012121212121212121212121212121212121212121343434345434323534343|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 g0p0 10M0 ako0 4N0 8BX0 uL0 1qN0 WL0", 40718 "America/Argentina/Ushuaia|CMT ART ARST ART ARST WART|4g.M 40 30 30 20 40|0121212121212121212121212121212121212121213434343434343235343|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 g0p0 10M0 ajA0 8p0 8zb0 uL0", 40719 "America/Aruba|LMT ANT AST|4z.L 4u 40|012|-2kV7o.d 28KLS.d", 40720 "America/Asuncion|AMT PYT PYT PYST|3O.E 40 30 30|012131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313|-1x589.k 1DKM9.k 3CL0 3Dd0 10L0 1pB0 10n0 1pB0 10n0 1pB0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1lB0 14n0 1dd0 1cL0 1fd0 WL0 1rd0 1aL0 1dB0 Xz0 1qp0 Xb0 1qN0 10L0 1rB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 WN0 1qL0 11B0 1nX0 1ip0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 TX0 1tB0 19X0 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0", 40721 "America/Atikokan|CST CDT CWT CPT EST|60 50 50 50 50|0101234|-25TQ0 1in0 Rnb0 3je0 8x30 iw0", 40722 "America/Bahia|LMT BRT BRST|2y.4 30 20|01212121212121212121212121212121212121212121212121212121212121|-2glxp.U HdLp.U 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 l5B0 Rb0", 40723 "America/Bahia_Banderas|LMT MST CST PST MDT CDT|71 70 60 80 60 50|0121212131414141414141414141414141414152525252525252525252525252525252525252525252525252525252|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0", 40724 "America/Barbados|LMT BMT AST ADT|3W.t 3W.t 40 30|01232323232|-1Q0I1.v jsM0 1ODC1.v IL0 1ip0 17b0 1ip0 17b0 1ld0 13b0", 40725 "America/Belem|LMT BRT BRST|3d.U 30 20|012121212121212121212121212121|-2glwK.4 HdKK.4 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0", 40726 "America/Belize|LMT CST CHDT CDT|5Q.M 60 5u 50|01212121212121212121212121212121212121212121212121213131|-2kBu7.c fPA7.c Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1f0Mu qn0 lxB0 mn0", 40727 "America/Blanc-Sablon|AST ADT AWT APT|40 30 30 30|010230|-25TS0 1in0 UGp0 8x50 iu0", 40728 "America/Boa_Vista|LMT AMT AMST|42.E 40 30|0121212121212121212121212121212121|-2glvV.k HdKV.k 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 smp0 WL0 1tB0 2L0", 40729 "America/Bogota|BMT COT COST|4U.g 50 40|0121|-2eb73.I 38yo3.I 2en0", 40730 "America/Boise|PST PDT MST MWT MPT MDT|80 70 70 60 60 60|0101023425252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-261q0 1nX0 11B0 1nX0 8C10 JCL0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 Dd0 1Kn0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40731 "America/Cambridge_Bay|zzz MST MWT MPT MDDT MDT CST CDT EST|0 70 60 60 50 60 60 50 50|0123141515151515151515151515151515151515151515678651515151515151515151515151515151515151515151515151515151515151515151515151|-21Jc0 RO90 8x20 ix0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11A0 1nX0 2K0 WQ0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40732 "America/Campo_Grande|LMT AMT AMST|3C.s 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-2glwl.w HdLl.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10 Lz0 1C10 On0 1zd0 Rb0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0", 40733 "America/Cancun|LMT CST EST EDT CDT|5L.4 60 50 40 50|0123232341414141414141414141414141414141412|-1UQG
407330 2q2o0 yLB0 1lb0 14p0 1lb0 14p0 Lz0 xB0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0", 40734 "America/Caracas|CMT VET VET|4r.E 4u 40|0121|-2kV7w.k 28KM2.k 1IwOu", 40735 "America/Cayenne|LMT GFT GFT|3t.k 40 30|012|-2mrwu.E 2gWou.E", 40736 "America/Cayman|CMT EST|5j.A 50|01|-2uduE.o", 40737 "America/Chicago|CST CDT EST CWT CPT|60 50 50 50 50|01010101010101010101010101010101010102010101010103401010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 1wp0 TX0 WN0 1qL0 1cN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 11B0 1Hz0 14p0 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 RB0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40738 "America/Chihuahua|LMT MST CST CDT MDT|74.k 70 60 50 60|0121212323241414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 2zQN0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0", 40739 "America/Costa_Rica|SJMT CST CDT|5A.d 60 50|0121212121|-1Xd6n.L 2lu0n.L Db0 1Kp0 Db0 pRB0 15b0 1kp0 mL0", 40740 "America/Creston|MST PST|70 80|010|-29DR0 43B0", 40741 "America/Cuiaba|LMT AMT AMST|3I.k 40 30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-2glwf.E HdLf.E 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 4a10 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10 Lz0 1C10 On0 1zd0 Rb0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0", 40742 "America/Danmarkshavn|LMT WGT WGST GMT|1e.E 30 20 0|01212121212121212121212121212121213|-2a5WJ.k 2z5fJ.k 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 DC0", 40743 "America/Dawson|YST YDT YWT YPT YDDT PST PDT|90 80 80 80 70 80 70|0101023040565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565|-25TN0 1in0 1o10 13V0 Ser0 8x00 iz0 LCL0 1fA0 jrA0 fNd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40744 "America/Dawson_Creek|PST PDT PWT PPT MST|80 70 70 70 70|0102301010101010101010101010101010101010101010101010101014|-25TO0 1in0 UGp0 8x10 iy0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 ML0", 40745 "America/Denver|MST MDT MWT MPT|70 60 60 60|01010101023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261r0 1nX0 11B0 1nX0 11B0 1qL0 WN0 mn0 Ord0 8x20 ix0 LCN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40746 "America/Detroit|LMT CST EST EWT EPT EDT|5w.b 60 50 40 40 40|01234252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-2Cgir.N peqr.N 156L0 8x40 iv0 6fd0 11z0 Jy10 SL0 dnB0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40747 "America/Edmonton|LMT MST MDT MWT MPT|7x.Q 70 60 60 60|01212121212121341212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2yd4q.8 shdq.8 1in0 17d0 hz0 2dB0 1fz0 1a10 11z0 1qN0 WL0 1qN0 11z0 IGN0 8x20 ix0 3NB0 11z0 LFB0 1cL0 3Cp0 1cL0 66N0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40748 "America/Eirunepe|LMT ACT ACST AMT|4D.s 50 40 40|0121212121212121212121212121212131|-2glvk.w HdLk.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0 yTd0 d5X0", 40749 "America/El_Salvador|LMT CST CDT|5U.M 60 50|012121|-1XiG3.c 2Fvc3.c WL0 1qN0 WL0", 40750 "America/Ensenada|LMT MST PST PDT PWT PPT|7M.4 70 80 70 70 70|012123245232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UQE0 4PX0 8mM0 8lc0 SN0 1cL0 pHB0 83r0 zI0 5O10 1Rz0 cOP0 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 BUp0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40751 "America/Fort_Wayne|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|010101023010101010101010101040454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 QI10 Db0 RB0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 5Tz0 1o10 qLb0 1cL0 1cN0 1cL0 1qhd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40752 "America/Fortaleza|LMT BRT BRST|2y 30 20|0121212121212121212121212121212121212121|-2glxq HdLq 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 5z0 2mN0 On0", 40753 "America/Glace_Bay|LMT AST ADT AWT APT|3X.M 40 30 30 30|012134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsI0.c CwO0.c 1in0 UGp0 8x50 iu0 iq10 11z0 Jg10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40754 "America/Godthab|LMT WGT WGST|3q.U 30 20|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a5Ux.4 2z5dx.4 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40755 "America/Goose_Bay|NST NDT NST NDT NWT NPT AST ADT ADDT|3u.Q 2u.Q 3u 2u 2u 2u 40 30 20|01023232323232324523232323232323232323232323232323232323232676767676767676767676767676767676767676767676867676
407557676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-25TSt.8 1in0 DXb0 2HbX.8 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 WL0 1qN0 WL0 1qN0 7UHu itu 1tB0 WL0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1tB0 WL0 1ld0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 S10 g0u 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40756 "America/Grand_Turk|KMT EST EDT AST|57.b 50 40 40|0121212121212121212121212121212121212121212121212121212121212121212121212123|-2l1uQ.N 2HHBQ.N 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40757 "America/Guatemala|LMT CST CDT|62.4 60 50|0121212121|-24KhV.U 2efXV.U An0 mtd0 Nz0 ifB0 17b0 zDB0 11z0", 40758 "America/Guayaquil|QMT ECT|5e 50|01|-1yVSK", 40759 "America/Guyana|LMT GBGT GYT GYT GYT|3Q.E 3J 3J 30 40|01234|-2dvU7.k 24JzQ.k mlc0 Bxbf", 40760 "America/Halifax|LMT AST ADT AWT APT|4e.o 40 30 30 30|0121212121212121212121212121212121212121212121212134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsHJ.A xzzJ.A 1db0 3I30 1in0 3HX0 IL0 1E10 ML0 1yN0 Pb0 1Bd0 Mn0 1Bd0 Rz0 1w10 Xb0 1w10 LX0 1w10 Xb0 1w10 Lz0 1C10 Jz0 1E10 OL0 1yN0 Un0 1qp0 Xb0 1qp0 11X0 1w10 Lz0 1HB0 LX0 1C10 FX0 1w10 Xb0 1qp0 Xb0 1BB0 LX0 1td0 Xb0 1qp0 Xb0 Rf0 8x50 iu0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 3Qp0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 3Qp0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 6i10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40761 "America/Havana|HMT CST CDT|5t.A 50 40|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1Meuu.o 72zu.o ML0 sld0 An0 1Nd0 Db0 1Nd0 An0 6Ep0 An0 1Nd0 An0 JDd0 Mn0 1Ap0 On0 1fd0 11X0 1qN0 WL0 1wp0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 14n0 1ld0 14L0 1kN0 15b0 1kp0 1cL0 1cN0 1fz0 1a10 1fz0 1fB0 11z0 14p0 1nX0 11B0 1nX0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 1a10 1in0 1a10 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 17c0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 11A0 6i00 Rc0 1wo0 U00 1tA0 Rc0 1wo0 U00 1wo0 U00 1zc0 U00 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0",
40762 "America/Hermosillo|LMT MST CST PST MDT|7n.Q 70 60 80 60|0121212131414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0", 40763 "America/Indiana/Knox|CST CDT CWT CPT EST|60 50 50 50 50|0101023010101010101010101010101010101040101010101010101010101010101010101010101010101010141010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 11z0 1o10 11z0 1o10 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 3Cn0 8wp0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 z8o0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40764 "America/Indiana/Marengo|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101023010101010101010104545454545414545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 dyN0 11z0 6fd0 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 jrz0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1e6p0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40765 "America/Indiana/Petersburg|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010104010101010101010101010141014545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 njX0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 3Fb0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 19co0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40766 "America/Indiana/Tell_City|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010454541010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 g0p0 11z0 1o10 11z0 1qL0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 caL0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40767 "America/Indiana/Vevay|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|010102304545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 kPB0 Awn0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1lnd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40768 "America/Indiana/Vincennes|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010454541014545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 g0p0 11z0 1o10 11z0 1qL0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 caL0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40769 "America/Indiana/Winamac|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010101010454541054545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 jrz0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1za0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
40770 "America/Inuvik|zzz PST PDDT MST MDT|0 80 60 70 60|0121343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-FnA0 tWU0 1fA0 wPe0 2pz0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40771 "America/Iqaluit|zzz EWT EPT EST EDDT EDT CST CDT|0 40 40 50 30 40 60 50|01234353535353535353535353535353535353535353567353535353535353535353535353535353535353535353535353535353535353535353535353|-16K00 7nX0 iv0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40772 "America/Jamaica|KMT EST EDT|57.b 50 40|0121212121212121212121|-2l1uQ.N 2uM1Q.N 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0", 40773 "America/Juneau|PST PWT PPT PDT YDT YST AKST AKDT|80 70 70 70 80 90 90 80|01203030303030303030303030403030356767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cM0 1cM0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40774 "America/Kentucky/Louisville|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101010102301010101010101010101010101454545454545414545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 3Fd0 Nb0 LPd0 11z0 RB0 8x30 iw0 Bb0 10N0 2bB0 8in0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 xz0 gso0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40775 "America/Kentucky/Monticello|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101023010101010101010101010101010101010101010101010101010101010101010101454545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 SWp0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40776 "America/La_Paz|CMT BOST BOT|4w.A 3w.A 40|012|-1x37r.o 13b0", 40777 "America/Lima|LMT PET PEST|58.A 50 40|0121212121212121|-2tyGP.o 1bDzP.o zX0 1aN0 1cL0 1cN0 1cL0 1PrB0 zX0 1O10 zX0 6Gp0 zX0 98p0 zX0", 40778 "America/Los_Angeles|PST PDT PWT PPT|80 70 70 70|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261q0 1nX0 11B0 1nX0 SgN0 8x10 iy0 5Wp0 1Vb0 3dB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40779 "America/Maceio|LMT BRT BRST|2m.Q 30 20|012121212121212121212121212121212121212121|-2glxB.8 HdLB.8 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 8Q10 WL0 1tB0 5z0 2mN0 On0", 40780 "America/Managua|MMT CST EST CDT|5J.c 60 50 50|0121313121213131|-1quie.M 1yAMe.M 4mn0 9Up0 Dz0 1K10 Dz0 s3F0 1KH0 DB0 9In0 k8p0 19X0 1o30 11y0", 40781 "America/Manaus|LMT AMT AMST|40.4 40 30|01212121212121212121212121212121|-2glvX.U HdKX.U 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0", 40782 "America/Martinique|FFMT AST ADT|44.k 40 30|0121|-2mPTT.E 2LPbT.E 19X0", 40783 "America/Matamoros|LMT CST CDT|6E 60 50|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1UQG0 2FjC0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
40784 "America/Mazatlan|LMT MST CST PST MDT|75.E 70 60 80 60|0121212131414141414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0", 40785 "America/Menominee|CST CDT CWT CPT EST|60 50 50 50 50|01010230101041010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 LCN0 1fz0 6410 9Jb0 1cM0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40786 "America/Merida|LMT CST EST CDT|5W.s 60 50 50|0121313131313131313131313131313131313131313131313131313131313131313131313131313131313131|-1UQG0 2q2o0 2hz0 wu30 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0", 40787 "America/Metlakatla|PST PWT PPT PDT|80 70 70 70|0120303030303030303030303030303030|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0", 40788 "America/Mexico_City|LMT MST CST CDT CWT|6A.A 70 60 50 50|012121232324232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 gEn0 TX0 3xd0 Jb0 6zB0 SL0 e5d0 17b0 1Pff0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0", 40789 "America/Miquelon|LMT AST PMST PMDT|3I.E 40 30 20|012323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2mKkf.k 2LTAf.k gQ10 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40790 "America/Moncton|EST AST ADT AWT APT|50 40 30 30 30|012121212121212121212134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsH0 CwN0 1in0 zAo0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1K10 Lz0 1zB0 NX0 1u10 Wn0 S20 8x50 iu0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14n1 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 ReX 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40791 "America/Monterrey|LMT CST CDT|6F.g 60 50|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1UQG0 2FjC0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0", 40792 "America/Montevideo|MMT UYT UYHST UYST UYT UYHST|3I.I 3u 30 20 30 2u|012121212121212121212121213434343434345454543453434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-20UIf.g 8jzJ.g 1cLu 1dcu 1cLu 1dcu 1cLu ircu 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu WLu 1qMu WLu 1qMu 11zu 1o0u 11zu NAu 11bu 2iMu zWu Dq10 19X0 pd0 jz0 cm10 19X0 1fB0 1on0 11d0 1oL0 1nB0 1fzu 1aou 1fzu 1aou 1fzu 3nAu Jb0 3MN0 1SLu 4jzu 2PB0 Lb0 3Dd0 1pb0 ixd0 An0 1MN0 An0 1wp0 On0 1wp0 Rb0 1zd0 On0 1wp0 Rb0 s8p0 1fB0 1ip0 11z0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10", 40793 "America/Montreal|EST EDT EWT EPT|50 40 40 40|01010101010101010101010101010101010101010101012301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TR0 1in0 11Wu 1nzu 1fD0 WJ0 1wr0 Nb0 1Ap0 On0 1zd0 On0 1wp0 TX0 1tB0 TX0 1tB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 4kM0 8x40 iv0 1o10 11z0 1nX0 11z0 1o10 11z0 1o10 1qL0 11D0 1nX0 11B0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40794 "America/Nassau|LMT EST EDT|59.u 50 40|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2kNuO.u 26XdO.u 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
40795 "America/New_York|EST EDT EWT EPT|50 40 40 40|01010101010101010101010101010101010101010101010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261t0 1nX0 11B0 1nX0 11B0 1qL0 1a10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 RB0 8x40 iv0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40796 "America/Nipigon|EST EDT EWT EPT|50 40 40 40|010123010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TR0 1in0 Rnb0 3je0 8x40 iv0 19yN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40797 "America/Nome|NST NWT NPT BST BDT YST AKST AKDT|b0 a0 a0 b0 a0 90 90 80|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17SX0 8wW0 iB0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cl0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40798 "America/Noronha|LMT FNT FNST|29.E 20 10|0121212121212121212121212121212121212121|-2glxO.k HdKO.k 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0", 40799 "America/North_Dakota/Beulah|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101014545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40800 "America/North_Dakota/Center|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101014545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40801 "America/North_Dakota/New_Salem|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101454545454545454545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40802 "America/Ojinaga|LMT MST CST CDT MDT|6V.E 70 60 50 60|0121212323241414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 de
40802L0 8lc0 17c0 10M0 1dd0 2zQN0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40803 "America/Pangnirtung|zzz AST AWT APT ADDT ADT EDT EST CST CDT|0 40 30 30 20 30 40 50 60 50|012314151515151515151515151515151515167676767689767676767676767676767676767676767676767676767676767676767676767676767676767|-1XiM0 PnG0 8x50 iu0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1o00 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40804 "America/Paramaribo|LMT PMT PMT NEGT SRT SRT|3E.E 3E.Q 3E.A 3u 3u 30|012345|-2nDUj.k Wqo0.c qanX.I 1dmLN.o lzc0", 40805 "America/Phoenix|MST MDT MWT|70 60 60|01010202010|-261r0 1nX0 11B0 1nX0 SgN0 4Al1 Ap0 1db0 SWqX 1cL0", 40806 "America/Port-au-Prince|PPMT EST EDT|4N 50 40|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-28RHb 2FnMb 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14q0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 i6n0 1nX0 11B0 1nX0 d430 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
40807 "America/Porto_Acre|LMT ACT ACST AMT|4v.c 50 40 40|01212121212121212121212121212131|-2glvs.M HdLs.M 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 NBd0 d5X0", 40808 "America/Porto_Velho|LMT AMT AMST|4f.A 40 30|012121212121212121212121212121|-2glvI.o HdKI.o 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0", 40809 "America/Puerto_Rico|AST AWT APT|40 30 30|0120|-17lU0 7XT0 iu0", 40810 "America/Rainy_River|CST CDT CWT CPT|60 50 50 50|010123010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TQ0 1in0 Rnb0 3je0 8x30 iw0 19yN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40811 "America/Rankin_Inlet|zzz CST CDDT CDT EST|0 60 40 50 50|012131313131313131313131313131313131313131313431313131313131313131313131313131313131313131313131313131313131313131313131|-vDc0 keu0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40812 "America/Recife|LMT BRT BRST|2j.A 30 20|0121212121212121212121212121212121212121|-2glxE.o HdLE.o 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0", 40813 "America/Regina|LMT MST MDT MWT MPT CST|6W.A 70 60 60 60 60|012121212121212121212121341212121212121212121212121215|-2AD51.o uHe1.o 1in0 s2L0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 66N0 1cL0 1cN0 19X0 1fB0 1cL0 1fB0 1cL0 1cN0 1cL0 M30 8x20 ix0 1ip0 1cL0 1ip0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 3NB0 1cL0 1cN0", 40814 "America/Resolute|zzz CST CDDT CDT EST|0 60 40 50 50|012131313131313131313131313131313131313131313431313131313431313131313131313131313131313131313131313131313131313131313131|-SnA0 GWS0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40815 "America/Santa_Isabel|LMT MST PST PDT PWT PPT|7D.s 70 80 70 70 70|012123245232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UQE0 4PX0 8mM0 8lc0 SN0 1cL0 pHB0 83r0 zI0 5O10 1Rz0 cOP0 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 BUp0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0", 40816 "America/Santarem|LMT AMT AMST BRT|3C.M 40 30 30|0121212121212121212121212121213|-2glwl.c HdLl.c 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 NBd0", 40817 "America/Santiago|SMT CLT CLT CLST CLST CLT|4G.K 50 40 40 30 30|01020313131313121242124242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424245|-2q2jh.e fJAh.e 5knG.K 1Vzh.e jRAG.K 1pbh.e 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 nHX0 op0 9Bz0 jb0 1oN0 ko0 Qeo0 WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 1wn0", 40818 "America/Santo_Domingo|SDMT EST EDT EHDT AST|4E 50 40 4u 40|01213131313131414|-1ttjk 1lJMk Mn0 6sp0 Lbu 1Cou yLu 1RAu wLu 1QMu xzu 1Q0u xXu 1PAu 13jB0 e00", 40819 "America/Sao_Paulo|LMT BRT BRST|36.s 30 20|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-2glwR.w HdKR.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 pTd0 PX0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10 Lz0 1C10 On0 1zd0 Rb0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0", 40820 "America/Scoresbysund|LMT CGT CGST EGST EGT|1r.Q 20 10 0 10|0121343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434|-2a5Ww.8 2z5ew.8 1a00 1cK0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40821 "America/Sitka|PST PWT PPT PDT YST AKST AKDT|80 70 70 70 90 90 80|01203030303030303030303030303030345656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
40822 "America/St_Johns|NST NDT NST NDT NWT NPT NDDT|3u.Q 2u.Q 3u 2u 2u 2u 1u|01010101010101010101010101010101010102323232323232324523232323232323232323232323232323232323232323232323232323232323232323232323232323232326232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-28oit.8 14L0 1nB0 1in0 1gm0 Dz0 1JB0 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 1cL0 1fB0 19X0 1fB0 19X0 10O0 eKX.8 19X0 1iq0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 WL0 1qN0 WL0 1qN0 7UHu itu 1tB0 WL0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1tB0 WL0 1ld0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40823 "America/Swift_Current|LMT MST MDT MWT MPT CST|7b.k 70 60 60 60 60|012134121212121212121215|-2AD4M.E uHdM.E 1in0 UGp0 8x20 ix0 1o10 17b0 1ip0 11z0 1o10 11z0 1o10 11z0 isN0 1cL0 3Cp0 1cL0 1cN0 11z0 1qN0 WL0 pMp0", 40824 "America/Tegucigalpa|LMT CST CDT|5M.Q 60 50|01212121|-1WGGb.8 2ETcb.8 WL0 1qN0 WL0 GRd0 AL0", 40825 "America/Thule|LMT AST ADT|4z.8 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a5To.Q 31NBo.Q 1cL0 1cN0 1cL0 1fB0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40826 "America/Thunder_Bay|CST EST EWT EPT EDT|60 50 40 40 40|0123141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141|-2q5S0 1iaN0 8x40 iv0 XNB0 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40827 "America/Vancouver|PST PDT PWT PPT|80 70 70 70|0102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TO0 1in0 UGp0 8x10 iy0 1o10 17b0 1ip0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40828 "America/Whitehorse|YST YDT YWT YPT YDDT PST PDT|90 80 80 80 70 80 70|0101023040565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565|-25TN0 1in0 1o10 13V0 Ser0 8x00 iz0 LCL0 1fA0 3NA0 vrd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40829 "America/Winnipeg|CST CDT CWT CPT|60 50 50 50|010101023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aIi0 WL0 3ND0 1in0 Jap0 Rb0 aCN0 8x30 iw0 1tB0 11z0 1ip0 11z0 1o10 11z0 1o10 11z0 1rd0 10L0 1op0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 1cL0 1cN0 11z0 6i10 WL0 6i10 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40830 "America/Yakutat|YST YWT YPT YDT AKST AKDT|90 80 80 80 90 80|01203030303030303030303030303030304545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-17T10 8x00 iz0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cn0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40831 "America/Yellowknife|zzz MST MWT MPT MDDT MDT|0 70 60 60 50 60|012314151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151|-1pdA0 hix0 8x20 ix0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40832 "Antarctica/Casey|zzz AWST CAST|0 -80 -b0|012121|-2q00 1DjS0 T90 40P0 KL0", 40833 "Antarctica/Davis|zzz DAVT DAVT|0 -70 -50|01012121|-vyo0 iXt0 alj0 1D7v0 VB0 3Wn0 KN0", 40834 "Antarctica/DumontDUrville|zzz PMT DDUT|0 -a0 -a0|0102|-U0o0 cfq0 bFm0", 40835 "Antarctica/Macquarie|AEST AEDT zzz MIST|-a0 -b0 0 -b0|0102010101010101010101010101010101010101010101010101010101010101010101010101010101010101013|-29E80 19X0 4SL0 1ayy0 Lvs0 1cM0 1o00 Rc0 1wo0 Rc0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0", 40836 "Antarctica/Mawson|zzz MAWT MAWT|0 -60 -50|012|-CEo0 2fyk0", 40837 "Antarctica/McMurdo|NZMT NZST NZST NZDT|-bu -cu -c0 -d0|010202020202
4083702020202020202023232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1GCVu Lz0 1tB0 11zu 1o0u 11zu 1o0u 11zu 1o0u 14nu 1lcu 14nu 1lcu 1lbu 11Au 1nXu 11Au 1nXu 11Au 1nXu 11Au 1nXu 11Au 1qLu WMu 1qLu 11Au 1n1bu IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00", 40838 "Antarctica/Palmer|zzz ARST ART ART ARST CLT CLST CLT|0 30 40 30 20 40 30 30|012121212123435656565656565656565656565656565656565656565656565656565656565656567|-cao0 nD0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 jsN0 14N0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 1wn0", 40839 "Antarctica/Rothera|zzz ROTT|0 30|01|gOo0", 40840 "Antarctica/Syowa|zzz SYOT|0 -30|01|-vs00", 40841 "Antarctica/Troll|zzz UTC CEST|0 0 -20|01212121212121212121212121212121212121212121212121212121212121212121|1puo0 hd0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40842 "Antarctica/Vostok|zzz VOST|0 -60|01|-tjA0", 40843 "Arctic/Longyearbyen|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2awM0 Qm0 W6o0 5pf0 WM0 1fA0 1cM0 1cM0 1cM0 1cM0 wJc0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1qM0 WM0 zpc0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40844 "Asia/Aden|LMT AST|-36.Q -30|01|-TvD6.Q", 40845 "Asia/Almaty|LMT ALMT ALMT ALMST|-57.M -50 -60 -70|0123232323232323232323232323232323232323232323232|-1Pc57.M eUo7.M 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 3Cl0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0", 40846 "Asia/Amman|LMT EET EEST|-2n.I -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1yW2n.I 1HiMn.I KL0 1oN0 11b0 1oN0 11b0 1pd0 1dz0 1cp0 11b0 1op0 11b0 fO10 1db0 1e10 1cL0 1cN0 1cL0 1cN0 1fz0 1pd0 10n0 1ld0 14n0 1hB0 15b0 1ip0 19X0 1cN0 1cL0 1cN0 17b0 1ld0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1So0 y00 1fc0 1dc0 1co0 1dc0 1cM0 1cM0 1cM0 1o00 11A0 1lc0 17c0 1cM0 1cM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0", 40847 "Asia/Anadyr|LMT ANAT ANAT ANAST ANAST ANAST ANAT|-bN.U -c0 -d0 -e0 -d0 -c0 -b0|01232414141414141414141561414141414141414141414141414141414141561|-1PcbN.U eUnN.U 23CL0 1db0 1cN0 1dc0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rU0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qN0 WM0", 40848 "Asia/Aqtau|LMT FORT FORT SHET SHET SHEST AQTT AQTST AQTST AQTT|-3l.4 -40 -50 -50 -60 -60 -50 -60 -50 -40|0123453535353535353535367676
4084876898989898989898989896|-1Pc3l.4 eUnl.4 1jcL0 JDc0 1cL0 1dc0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2UK0 Fz0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cN0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 RW0", 40849 "Asia/Aqtobe|LMT AKTT AKTT AKTST AKTT AQTT AQTST|-3M.E -40 -50 -60 -60 -50 -60|01234323232323232323232565656565656565656565656565|-1Pc3M.E eUnM.E 23CL0 1db0 1cM0 1dc0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2UK0 Fz0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0", 40850 "Asia/Ashgabat|LMT ASHT ASHT ASHST ASHST TMT TMT|-3R.w -40 -50 -60 -50 -40 -50|012323232323232323232324156|-1Pc3R.w eUnR.w 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 ba0 xC0", 40851 "Asia/Baghdad|BMT AST ADT|-2V.A -30 -40|012121212121212121212121212121212121212121212121212121|-26BeV.A 2ACnV.A 11b0 1cp0 1dz0 1dd0 1db0 1cN0 1cp0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1de0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0", 40852 "Asia/Bahrain|LMT GST AST|-3q.8 -40 -30|012|-21Jfq.8 27BXq.8", 40853 "Asia/Baku|LMT BAKT BAKT BAKST BAKST AZST AZT AZT AZST|-3j.o -30 -40 -50 -40 -40 -30 -40 -50|0123232323232323232323245657878787878787878787878787878787878787878787878787878787878787878787878787878787878787|-1Pc3j.o 1jUoj.o WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 10K0 c30 1cJ0 1cL0 8wu0 1o00 11z0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40854 "Asia/Bangkok|BMT ICT|-6G.4 -70|01|-218SG.4", 40855 "Asia/Beirut|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-21aq0 1on0 1410 1db0 19B0 1in0 1ip0 WL0 1lQp0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 q6N0 En0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1op0 11b0 dA10 17b0 1iN0 17b0 1iN0 17b0 1iN0 17b0 1vB0 SL0 1mp0 13z0 1iN0 17b0 1iN0 17b0 1jd0 12n0 1a10 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0", 40856 "Asia/Bishkek|LMT FRUT FRUT FRUST FRUST KGT KGST KGT|-4W.o -50 -60 -70 -60 -50 -60 -60|01232323232323232323232456565656565656565656565656567|-1Pc4W.o eUnW.o 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 11c0 1tX0 17b0 1ip0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1cPu 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 T8u", 40857 "Asia/Brunei|LMT BNT BNT|-7D.E -7u -80|012|-1KITD.E gDc9.E", 40858 "Asia/Calcutta|HMT BURT IST IST|-5R.k -6u -5u -6u|01232|-18LFR.k 1unn.k HB0 7zX0", 40859 "Asia/Chita|LMT YAKT YAKT YAKST YAKST YAKT IRKT|-7x.Q -80 -90 -a0 -90 -a0 -80|012323232323232323232324123232323232323232323232323232323232323256|-21Q7x.Q pAnx.Q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rU0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0", 40860 "Asia/Choibalsan|LMT ULAT ULAT CHOST CHOT CHOT CHOST|-7C -70 -80 -a0 -90 -80 -90|0123434343434343434343434343434343434343434343456565656565656565656565656565656565656565656565|-2APHC 2UkoC cKn0 1da0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 3Db0 h1f0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0", 40861 "Asia/Chongqing|CST CDT|-80 -90|01010101010101010|-1c1I0 LX0 16p0 1jz0 1Myp0 Rb0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0", 40862 "Asia/Colombo|MMT IST IHST IST LKT LKT|-5j.w -5u -60 -6u -6u -60|01231451|-2zOtj.w 1rFbN.w 1zzu 7Apu 23dz0 11zu n3cu", 40863 "Asia/Dacca|HMT BURT IST DACT BDT BDST|-5R.k -6u -5u -60 -60 -70|01213454|-18LFR.k 1unn.k HB0 m6n0 LqMu 1x6n0 1i00", 40864 "Asia/Damascus|LMT EET EEST|-2p.c -20 -30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-21Jep.c Hep.c 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1xRB0 11X0 1oN0 10L0 1pB0 11b0 1oN0 10L0 1mp0 13X0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 Nb0 1AN0 Nb0 bcp0 19X0 1gp0 19X0 3ld0 1xX0 Vd0 1Bz0 Sp0 1vX0 10p0 1dz0 1cN0 1cL0 1db0 1db0 1g10 1an0 1ap0 1db0 1fd0 1db0 1cN0 1db0 1dd0 1db0 1cp0 1dz0 1c10 1dX0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 19z0 1fB0 1qL0 11B0 1on0 Wp0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0", 40865 "Asia/Dili|LMT TLT JST TLT WITA|-8m.k -80 -90 -90 -80|012343|-2le8m.k 1dnXm.k 8HA0 1ew00 Xld0", 40866 "Asia/Dubai|LMT GST|-3F.c -40|01|-21JfF.c", 40867 "Asia/Dushanbe|LMT DUST DUST DUSST DUSST TJT|-4z.c -50 -60 -70 -60 -50|0123232323232323232323245|-1Pc4z.c eUnz.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 14N0", 40868 "Asia/Gaza|EET EET EEST IST IDT|-20 -30 -30 -20 -30|01010101010202020202
408680202020202023434343434343434343434343430202020202020202020202020202020202020202020202020202020202020202020202020202020202020|-1c2q0 5Rb0 10r0 1px0 10N0 1pz0 16p0 1jB0 16p0 1jx0 pBd0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 dW0 hfB0 Db0 1fB0 Rb0 npB0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 11z0 1o10 14o0 1lA1 SKX 1xd1 MKX 1AN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1210 1nz0 14N0 1nz0 1210 1nz0 1210 1nz0 1210 1nz0 1210 1nz0 1210 1nz0 14N0 1nz0 1210 1nz0 1210 1nz0 1210 1nz0 1210 1nz0 14N0 1nz0 1210 1nz0 1210 1nz0 1210 1nz0 1210 1nz0 1210 1nz0 14N0 1nz0 1210 1nz0 1210 1nz0 1210 1nz0", 40869 "Asia/Hebron|EET EET EEST IST IDT|-20 -30 -30 -20 -30|01010101010202020202020202020202343434343434343434343434343020202020202020202020202020202020202020202020202020202020202020202020202020202020202020|-1c2q0 5Rb0 10r0 1px0 10N0 1pz0 16p0 1jB0 16p0 1jx0 pBd0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 dW0 hfB0 Db0 1fB0 Rb0 npB0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 12L0 1mN0 14o0 1lc0 Tb0 1xd1 MKX bB0 cn0 1cN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1210 1nz0 14N0 1nz0 1210 1nz0 1210 1nz0 1210 1nz0 1210 1nz0 1210 1nz0 14N0 1nz0 1210 1nz0 1210 1nz0 1210 1nz0 1210 1nz0 14N0 1nz0 1210 1nz0 1210 1nz0 1210 1nz0 1210 1nz0 1210 1nz0 14N0 1nz0 1210 1nz0 1210 1nz0 1210 1nz0", 40870 "Asia/Ho_Chi_Minh|LMT PLMT ICT IDT JST|-76.E -76.u -70 -80 -90|0123423232|-2yC76.E bK00.a 1h7b6.u 5lz0 18o0 3Oq0 k5b0 aW00 BAM0", 40871 "Asia/Hong_Kong|LMT HKT HKST JST|-7A.G -80 -90 -90|0121312121212121212121212121212121212121212121212121212121212121212121|-2CFHA.G 1sEP6.G 1cL0 ylu 93X0 1qQu 1tX0 Rd0 1In0 NB0 1cL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1kL0 14N0 1nX0 U10 1tz0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 Rd0 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 17d0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0", 40872 "Asia/Hovd|LMT HOVT HOVT HOVST|-66.A -60 -70 -80|012323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2APG6.A 2Uko6.A cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0", 40873 "Asia/Irkutsk|IMT IRKT IRKT IRKST IRKST IRKT|-6V.5 -70 -80 -90 -80 -90|012323232323232323232324123232323232323232323232323232323232323252|-21zGV.5 pjXV.5 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rU0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0", 40874 "Asia/Istanbul|IMT EET EEST TRST TRT|-1U.U -20 -30 -40 -30|012121212121212121212121212121212121212121212121212121234343434342121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2ogNU.U dzzU.U 11b0 8tB0 1on0 1410 1db0 19B0 1in0 3Rd0 Un0 1oN0 11b0 zSp0 CL0 mN0 1Vz0 1gN0 1pz0 5Rd0 1fz0 1yp0 ML0 1kp0 17b0 1ip0 17b0 1fB0 19X0 1jB0 18L0 1ip0 17z0 qdd0 xX0 3S10 Tz0 dA10 11z0 1o10 11z0 1qN0 11z0 1ze0 11B0 WM0 1qO0 WI0 1nX0 1rB0 10L0 11B0 1in0 17d0 1in0 2pX0 19E0 1fU0 16Q0 1iI0 16Q0 1iI0 1Vd0 pb0 3Kp0 14o0 1df0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WO0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 Xc0 1qo0 WM0 1qM0 11A0 1o00 1200 1nA0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40875 "Asia/Jakarta|BMT JAVT WIB JST WIB WIB|-77.c -7k -7u -90 -80 -70|01232425|-1Q0Tk luM0 mPzO 8vWu 6kpu 4PXu xhcu", 40876 "Asia/Jayapura|LMT WIT ACST|-9m.M -90 -9u|0121|-1uu9m.M sMMm.M L4nu", 40877 "Asia/Jerusalem|JMT IST IDT IDDT|-2k.E -20 -30 -40|01212121212132121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-26Bek.E SyMk.E 5Rb0 10r0 1px0 10N0 1pz0 16p0 1jB0 16p0 1jx0 3LB0 Em0 or0 1cn0 1dB0 16n0 10O0 1ja0 1tC0 14o0 1cM0 1a00 11A0 1Na0 An0 1MP0 AJ0 1Kp0 LC0 1oo0 Wl0 EQN0 Db0 1fB0 Rb0 npB0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 1hB0 1dX0 1ep0 1aL0 1eN0 17X0 1nf0 11z0 1tB0 19W0 1e10 17b0 1ep0 1gL0 18N0 1fz0 1eN0 17b
408770 1gq0 1gn0 19d0 1dz0 1c10 17X0 1hB0 1gn0 19d0 1dz0 1c10 17X0 1kp0 1dz0 1c10 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0", 40878 "Asia/Kabul|AFT AFT|-40 -4u|01|-10Qs0", 40879 "Asia/Kamchatka|LMT PETT PETT PETST PETST|-ay.A -b0 -c0 -d0 -c0|01232323232323232323232412323232323232323232323232323232323232412|-1SLKy.A ivXy.A 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rU0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qN0 WM0", 40880 "Asia/Karachi|LMT IST IST KART PKT PKST|-4s.c -5u -6u -50 -50 -60|012134545454|-2xoss.c 1qOKW.c 7zX0 eup0 LqMu 1fy01 1cL0 dK0X 11b0 1610 1jX0", 40881 "Asia/Kashgar|LMT XJT|-5O.k -60|01|-1GgtO.k", 40882 "Asia/Kathmandu|LMT IST NPT|-5F.g -5u -5J|012|-21JhF.g 2EGMb.g", 40883 "Asia/Khandyga|LMT YAKT YAKT YAKST YAKST VLAT VLAST VLAT YAKT|-92.d -80 -90 -a0 -90 -a0 -b0 -b0 -a0|01232323232323232323232412323232323232323232323232565656565656565782|-21Q92.d pAp2.d 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rU0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 qK0 yN0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0", 40884 "Asia/Krasnoyarsk|LMT KRAT KRAT KRAST KRAST KRAT|-6b.q -60 -70 -80 -70 -80|012323232323232323232324123232323232323232323232323232323232323252|-21Hib.q prAb.q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rU0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0", 40885 "Asia/Kuala_Lumpur|SMT MALT MALST MALT MALT JST MYT|-6T.p -70 -7k -7k -7u -90 -80|01234546|-2Bg6T.p 17anT.p 7hXE dM00 17bO 8Fyu 1so1u", 40886 "Asia/Kuching|LMT BORT BORT BORTST JST MYT|-7l.k -7u -80 -8k -90 -80|01232323232323232425|-1KITl.k gDbP.k 6ynu AnE 1O0k AnE 1NAk AnE 1NAk AnE 1NAk AnE 1O0k AnE 1NAk AnE pAk 8Fz0 1so10", 40887 "Asia/Macao|LMT MOT MOST CST|-7y.k -80 -90 -80|0121212121212121212121212121212121212121213|-2le7y.k 1XO34.k 1wn0 Rd0 1wn0 R9u 1wqu U10 1tz0 TVu 1tz0 17gu 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cJu 1cL0 1cN0 1fz0 1cN0 1cOu 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cJu 1cL0 1cN0 1fz0 1cN0 1cL0 KEp0", 40888 "Asia/Magadan|LMT MAGT MAGT MAGST MAGST MAGT|-a3.c -a0 -b0 -c0 -b0 -c0|012323232323232323232324123232323232323232323232323232323232323251|-1Pca3.c eUo3.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rU0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0", 40889 "Asia/Makassar|LMT MMT WITA JST|-7V.A -7V.A -80 -90|01232|-21JjV.A vfc0 myLV.A 8ML0", 40890 "Asia/Manila|PHT PHST JST|-80 -90 -90|010201010|-1kJI0 AL0 cK10 65X0 mXB0 vX0 VK10 1db0", 40891 "Asia/Nicosia|LMT EET EEST|-2d.s -20 -30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1Vc2d.s 2a3cd.s 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40892 "Asia/Novokuznetsk|LMT KRAT KRAT KRAST KRAST NOVST NOVT NOVT|-5M.M -60 -70 -80 -70 -70 -60 -70|012323232323232323232324123232323232323232323232323232323232325672|-1PctM.M eULM.M 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rU0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qN0 WM0 8Hz0", 40893 "Asia/Novosibirsk|LMT NOVT NOVT NOVST NOVST|-5v.E -60 -70 -80 -70|0123232323232323232323241232341414141414141414141414141414141414121|-21Qnv.E pAFv.E 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rU0 1cL0 1cQ0 ml0 Os0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0", 40894 "Asia/Omsk|LMT OMST OMST OMSST OMSST OMST|-4R.u -50 -60 -70 -60 -70|012323232323232323232324123232323232323232323232323232323232323252|-224sR.u pMLR.u 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rU0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0", 40895 "Asia/Oral|LMT URAT URAT URAST URAT URAST ORAT ORAST ORAT|-3p.o -40 -50 -60 -60 -50 -40 -50 -50|012343232323232323251516767676767676767676767676768|-1Pc3p.o eUnp.o 23CL0 1db0 1cM0 1dc0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 2UK0 Fz0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 RW0", 40896 "Asia/Pontianak|LMT PMT WIB JST WIB WITA WIB|-7h.k -7h.k -7u -90 -80 -80 -70|012324256|-2ua7h.k XE00 munL.k 8Rau 6kpu 4PXu xhcu Wqnu", 40897 "Asia/Pyongyang|LMT KST JCST JST KST|-8n -8u -90 -90 -90|01234|-2um8n 97XR 12FXu jdA0", 40898 "Asia/Qyzylorda|LMT KIZT KIZT KIZST KIZT QYZT QYZT QYZST|-4l.Q -40 -50 -60 -60 -50 -60 -70|012343232323232323232325676767676767676767676767676|-1Pc4l.Q eUol.Q 23CL0 1db0 1cM0 1dc0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2UK0 dC0 rU0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0", 40899 "Asia/Rangoon|RMT BURT JST MMT|-6o.E -6u -90 -6u|0123|-21Jio.E SmnS.E 7j9u", 40900 "Asia/Sakhalin|LMT JCST JST SAKT SAKST SAKST SAKT|-9u.M -90 -90 -b0 -c0 -b0 -a0|012343434343434343434343563434343434356
409005656565656565656565656565636|-2AGVu.M 1iaMu.M je00 1qFa0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rU0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o10 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0", 40901 "Asia/Samarkand|LMT SAMT SAMT SAMST TAST UZST UZT|-4r.R -40 -50 -60 -60 -60 -50|01234323232323232323232356|-1Pc4r.R eUor.R 23CL0 1db0 1cM0 1dc0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 11x0 bf0", 40902 "Asia/Seoul|LMT KST JCST JST KST KDT KDT|-8r.Q -8u -90 -90 -90 -9u -a0|01234151515151515146464|-2um8r.Q 97XV.Q 12FXu jjA0 kKo0 2I0u OL0 1FB0 Rb0 1qN0 TX0 1tB0 TX0 1tB0 TX0 1tB0 TX0 2ap0 12FBu 11A0 1o00 11A0", 40903 "Asia/Singapore|SMT MALT MALST MALT MALT JST SGT SGT|-6T.p -70 -7k -7k -7u -90 -7u -80|012345467|-2Bg6T.p 17anT.p 7hXE dM00 17bO 8Fyu Mspu DTA0", 40904 "Asia/Srednekolymsk|LMT MAGT MAGT MAGST MAGST MAGT SRET|-ae.Q -a0 -b0 -c0 -b0 -c0 -b0|012323232323232323232324123232323232323232323232323232323232323256|-1Pcae.Q eUoe.Q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rU0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0", 40905 "Asia/Taipei|JWST JST CST CDT|-80 -90 -80 -90|01232323232323232323232323232323232323232|-1iw80 joM0 1yo0 Tz0 1ip0 1jX0 1cN0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 10N0 1BX0 10p0 1pz0 10p0 1pz0 10p0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1BB0 ML0 1Bd0 ML0 uq10 1db0 1cN0 1db0 97B0 AL0", 40906 "Asia/Tashkent|LMT TAST TAST TASST TASST UZST UZT|-4B.b -50 -60 -70 -60 -60 -50|01232323232323232323232456|-1Pc4B.b eUnB.b 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 11y0 bf0", 40907 "Asia/Tbilisi|TBMT TBIT TBIT TBIST TBIST GEST GET GET GEST|-2X.b -30 -40 -50 -40 -40 -30 -40 -50|0123232323232323232323245656565787878787878787878567|-1Pc2X.b 1jUnX.b WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 3y0 19f0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cM0 1cL0 1fB0 3Nz0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 An0 Os0 WM0", 40908 "Asia/Tehran|LMT TMT IRST IRST IRDT IRDT|-3p.I -3p.I -3u -40 -50 -4u|01234325252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-2btDp.I 1d3c0 1huLT.I TXu 1pz0 sN0 vAu 1cL0 1dB0 1en0 pNB0 UL0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 64p0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0", 40909 "Asia/Thimbu|LMT IST BTT|-5W.A -5u -60|012|-Su5W.A 1BGMs.A", 40910 "Asia/Tokyo|JCST JST JDT|-90 -90 -a0|0121212121|-1iw90 pKq0 QL0 1lB0 13X0 1zB0 NX0 1zB0 NX0", 40911 "Asia/Ulaanbaatar|LMT ULAT ULAT ULAST|-77.w -70 -80 -90|012323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2APH7.w 2Uko7.w cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0", 40912 "Asia/Ust-Nera|LMT YAKT YAKT MAGST MAGT MAGST MAGT MAGT VLAT VLAT|-9w.S -80 -90 -c0 -b0 -b0 -a0 -c0 -b0 -a0|0123434343434343434343456434343434343434343434343434343434343434789|-21Q9w.S pApw.S 23CL0 1d90 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rU0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0", 40913 "Asia/Vladivostok|LMT VLAT VLAT VLAST VLAST VLAT|-8L.v -90 -a0 -b0 -a0 -b0|012323232323232323232324123232323232323232323232323232323232323252|-1SJIL.v itXL.v 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rU0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0", 40914 "Asia/Yakutsk|LMT YAKT YAKT YAKST YAKST YAKT|-8C.W -80 -90 -a0 -90 -a0|012323232323232323232324123232323232323232323232323232323232323252|-21Q8C.W pAoC.W 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rU0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0", 40915 "Asia/Yekaterinburg|LMT PMT SVET SVET SVEST SVEST YEKT YEKST YEKT|-42.x -3J.5 -40 -50 -60 -50 -50 -60 -60|0123434343434343434343435267676767676767676767676767676767676767686|-2ag42.x 7mQh.s qBvJ.5 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rU0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0", 40916 "Asia/Yerevan|LMT YERT YERT YERST YERST AMST AMT AMT AMST|-2W -30 -40 -50 -40 -40 -30 -40 -50|0123232323232323232323245656565657878787878787878787878787878787|-1Pc2W 1jUnW WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1am0 2r0 1cJ0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 3Fb0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0", 40917 "Atlantic/Azores|HMT AZOT AZOST AZOMT AZOT AZOST WET|1S.w 20 10 0 10 0 0|01212121212121212121212121212121212121212121232123212321232121212121212121212121212121212121212121454545454545454545454545454545456545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-2ldW5.s aPX5.s Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 qIl0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40918 "Atlantic/Bermuda|LMT AST ADT|4j.i 40 30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1BnRE.G 1LTbE.G 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
40919 "Atlantic/Canary|LMT CANT WET WEST|11.A 10 0 -10|01232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UtaW.o XPAW.o 1lAK0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40920 "Atlantic/Cape_Verde|LMT CVT CVST CVT|1y.4 20 10 10|01213|-2xomp.U 1qOMp.U 7zX0 1djf0", 40921 "Atlantic/Faeroe|LMT WET WEST|r.4 0 -10|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2uSnw.U 2Wgow.U 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40922 "Atlantic/Madeira|FMT MADT MADST MADMT WET WEST|17.A 10 0 -10 0 -10|01212121212121212121212121212121212121212121232123212321232121212121212121212121212121212121212121454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-2ldWQ.o aPWQ.o Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 qIl0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40923 "Atlantic/Reykjavik|LMT IST ISST GMT|1s 10 0 0|012121212121212121212121212121212121212121212121212121212121212121213|-2uWmw mfaw 1Bd0 ML0 1LB0 Cn0 1LB0 3fX0 C10 HrX0 1cO0 LB0 1EL0 LA0 1C00 Oo0 1wo0 Rc0 1wo0 Rc0 1wo0 Rc0 1zc0 Oo0 1zc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0", 40924 "Atlantic/South_Georgia|GST|20|0|", 40925 "Atlantic/Stanley|SMT FKT FKST FKT FKST|3P.o 40 30 30 20|0121212121212134343212121212121212121212121212121212121212121212121212|-2kJw8.A 12bA8.A 19X0 1fB0 19X0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 Cn0 1Cc10 WL0 1qL0 U10 1tz0 U10 1qM0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 U10 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qN0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 U10 1tz0 U10 1tz0 U10", 40926 "Australia/ACT|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0", 40927 "Australia/Adelaide|ACST ACDT|-9u -au|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lt xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 WM0 1qM0 Rc0 1zc0 U00 1tA0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0", 40928 "Australia/Brisbane|AEST AEDT|-a0 -b0|01010101010101010|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0", 40929 "Australia/Broken_Hill|ACST ACDT|-9u -au|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lt xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0", 40930 "Australia/Currie|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-29E80 19X0 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0", 40931 "Australia/Darwin|ACST ACDT|-9u -au|010101010|-293lt xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0", 40932 "Australia/Eucla|ACWST ACWDT|-8J -9J|0101010101010101010|-293kI xcX 10jd0 yL0 1cN0 1cL0 1gSp0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0", 40933 "Australia/Hobart|AEST AEDT|-a0 -b0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-29E80 19X0 10jd0 yL0 1cN0 1cL0 1fB0 19X0 VfB0 1cM0 1o00 Rc0 1wo0 Rc0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0", 40934 "Australia/LHI|AEST LHST LHDT LHDT|-a0 -au -bu -b0|0121212121313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313|raC0 1zdu Rb0 1zd0 On0 1zd0 On0 1zd0 On0 1zd0 TXu 1qMu WLu 1tAu WLu 1tAu TXu 1tAu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu 11zu 1o0u 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 11Au 1nXu 1qMu 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu 11zu 1o0u WLu 1qMu 14nu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1fzu 1cMu
409341cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu", 40935 "Australia/Lindeman|AEST AEDT|-a0 -b0|010101010101010101010|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0", 40936 "Australia/Melbourne|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1qM0 11A0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0", 40937 "Australia/Perth|AWST AWDT|-80 -90|0101010101010101010|-293jX xcX 10jd0 yL0 1cN0 1cL0 1gSp0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0", 40938 "CET|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40939 "CST6CDT|CST CDT CWT CPT|60 50 50 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40940 "Chile/EasterIsland|EMT EAST EASST EAST EASST EAST|7h.s 70 60 60 50 50|012121212121212121212121212123434343434343434343434343434343434343434343434343434343434343434345|-1uSgG.w 1s4IG.w WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 1wn0", 40941 "EET|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40942 "EST|EST|50|0|", 40943 "EST5EDT|EST EDT EWT EPT|50 40 40 40|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261t0 1nX0 11B0 1nX0 SgN0 8x40 iv0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 40944 "Eire|DMT IST GMT BST IST|p.l -y.D 0 -10 -10|01232323232324242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242|-2ax9y.D Rc0 1fzy.D 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 g5X0 14p0 1wn0 17d0 1io0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1a00 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1tA0 IM0 90o0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40945 "Etc/GMT+0|GMT|0|0|", 40946 "Etc/GMT+1|GMT+1|10|0|", 40947 "Etc/GMT+10|GMT+10|a0|0|", 40948 "Etc/GMT+11|GMT+11|b0|0|", 40949 "Etc/GMT+12|GMT+12|c0|0|", 40950 "Etc/GMT+2|GMT+2|20|0|", 40951 "Etc/GMT+3|GMT+3|30|0|", 40952 "Etc/GMT+4|GMT+4|40|0|", 40953 "Etc/GMT+5|GMT+5|50|0|", 40954 "Etc/GMT+6|GMT+6|60|0|", 40955 "Etc/GMT+7|GMT+7|70|0|", 40956 "Etc/GMT+8|GMT+8|80|0|", 40957 "Etc/GMT+9|GMT+9|90|0|", 40958 "Etc/GMT-1|GMT-1|-10|0|", 40959 "Etc/GMT-10|GMT-10|-a0|0|", 40960 "Etc/GMT-11|GMT-11|-b0|0|", 40961 "Etc/GMT-12|GMT-12|-c0|0|", 40962 "Etc/GMT-13|GMT-13|-d0|0|", 40963 "Etc/GMT-14|GMT-14|-e0|0|", 40964 "Etc/GMT-2|GMT-2|-20|0|", 40965 "Etc/GMT-3|GMT-3|-30|0|", 40966 "Etc/GMT-4|GMT-4|-40|0|", 40967 "Etc/GMT-5|GMT-5|-50|0|", 40968 "Etc/GMT-6|GMT-6|-60|0|", 40969 "Etc/GMT-7|GMT-7|-70|0|", 40970 "Etc/GMT-8|GMT-8|-80|0|", 40971 "Etc/GMT-9|GMT-9|-90|0|", 40972 "Etc/UCT|UCT|0|0|", 40973 "Etc/UTC|UTC|0|0|", 40974 "Europe/Amsterdam|AMT NST NEST NET CEST CET|-j.w -1j.w -1k -k -20 -10|010101010101010101010101010101010101010101012323234545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545|-2aFcj.w 11b0 1iP0 11A0 1io0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1co0 1io0 1yo0 Pc0 1a00 1fA0 1Bc0 Mo0 1tc0 U
40974o0 1tA0 U00 1uo0 W00 1s00 VA0 1so0 Vc0 1sM0 UM0 1wo0 Rc0 1u00 Wo0 1rA0 W00 1s00 VA0 1sM0 UM0 1w00 fV0 BCX.w 1tA0 U00 1u00 Wo0 1sm0 601k WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40975 "Europe/Andorra|WET CET CEST|0 -10 -20|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-UBA0 1xIN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40976 "Europe/Athens|AMT EET EEST CEST CET|-1y.Q -20 -30 -20 -10|012123434121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a61x.Q CNbx.Q mn0 kU10 9b0 3Es0 Xa0 1fb0 1dd0 k3X0 Nz0 SCp0 1vc0 SO0 1cM0 1a00 1ao0 1fc0 1a10 1fG0 1cg0 1dX0 1bX0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40977 "Europe/Belfast|GMT BST BDST|0 -10 -20|0101010101010101010101010101010101010101010101010121212121210101210101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2axa0 Rc0 1fA0 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 2Rz0 Dc0 1zc0 Oo0 1zc0 Rc0 1wo0 17c0 1iM0 FA0 xB0 1fA0 1a00 14o0 bb0 LA0 xB0 Rc0 1wo0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1a00 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1tA0 IM0 90o0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40978 "Europe/Belgrade|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-19RC0 3IP0 WM0 1fA0 1cM0 1cM0 1rc0 Qo0 1vmo0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40979 "Europe/Berlin|CET CEST CEMT|-10 -20 -30|01010101010101210101210101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 kL0 Nc0 m10 WM0 1ao0 1cp0 dX0 jz0 Dd0 1io0 17c0 1fA0 1a00 1ehA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40980 "Europe/Bratislava|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 16M0 1lc0 1tA0 17A0 11c0 1io0 17c0 1io0 17c0 1fc0 1ao0 1bNc0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40981 "Europe/Brussels|WET CET CEST WEST|0 -10 -20 -10|0121212103030303030303030303030303030303030303030303212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2ehc0 3zX0 11c0 1iO0 11A0 1o00 11A0 my0 Ic0 1qM0 Rc0 1EM0 UM0 1u00 10o0 1io0 1io0 17c0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a30 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 y00 5Wn0 WM0 1fA0 1cM0 16M0 1iM0 16M0 1C00 Uo0 1eeo0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40982 "Europe/Bucharest|BMT EET EEST|-1I.o -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1xApI.o 20LI.o RA0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Axc0 On0 1fA0 1a10 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40983 "Europe/Budapest|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1ip0 17b0 1op0 1tb0 Q2m0 3Ne0 WM0 1fA0 1cM0 1cM0 1oJ0 1dc0 1030 1fA0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1iM0 1fA0 8Ha0 Rb0 1wN0 Rb0 1BB0 Lz0 1C20 LB0 SNX0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40984 "Europe/Busingen|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-19Lc0 11A0 1o00 11A0 1xG10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40985 "Europe/Chisinau|CMT BMT EET EEST CEST CET MSK MSD|-1T -1I.o -20 -30 -20 -10 -30 -40|0123232323232323232345454676767676767676767623232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-26jdT wGMa.A 20LI.o RA0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 27A0 2en0 39g0 WM0 1fA0 1cM0 V90 1t7z0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1ty0 2bD0 1cM0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40986 "Europe/Copenhagen|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2azC0 Tz0 VuO0 60q0 WM0 1fA0 1cM0 1cM0 1cM0 S00 1HA0 Nc0 1C00 Dc0 1Nc0 Ao0 1h5A0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40987 "Europe/Gibraltar|GMT BST BDST CET CEST|0 -10 -20 -10 -20|010101010101010101010101010101010101010101010101012121212121010121010101010101010101034343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-2axa0 Rc0 1fA0 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 2Rz0 Dc0 1zc0 Oo0 1zc0 Rc0 1wo0 17c0 1iM0 FA0 xB0 1fA0 1a00 14o0 bb0 LA0 xB0 Rc0 1wo0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 10Jz0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40988 "Europe/Helsinki|HMT EET EEST|-1D.N -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1WuND.N OULD.N 1dA0 1xGq0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40989 "Europe/Kaliningrad|CET CEST CET CEST MSK MSD EEST EET FET|-10 -20 -20 -30 -30 -40 -30 -20 -30|0101010101010232454545454545454545454676767676767676767676767676767676767676787|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 Am0 Lb0 1en0 op0 1pNz0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 1cJ0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0", 40990 "Europe/Kiev|KMT EET MSK CEST CET MSD EEST|-22.4 -20 -30 -20 -10 -40 -30|0123434252525252525252525256161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161|-1Pc22.4 eUo2.4 rnz0 2Hg0 WM0 1fA0 da0 1v4m0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 Db0 3220 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00",
40991 "Europe/Lisbon|LMT WET WEST WEMT CET CEST|A.J 0 -10 -20 -10 -20|012121212121212121212121212121212121212121212321232123212321212121212121212121212121212121212121214121212121212121212121212121212124545454212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2ldXn.f aPWn.f Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 pvy0 1cM0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40992 "Europe/Luxembourg|LMT CET CEST WET WEST WEST WET|-o.A -10 -20 0 -10 -20 -10|0121212134343434343434343434343434343434343434343434565651212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2DG0o.A t6mo.A TB0 1nX0 Up0 1o20 11A0 rW0 CM0 1qP0 R90 1EO0 UK0 1u20 10m0 1ip0 1in0 17e0 19W0 1fB0 1db0 1cp0 1in0 17d0 1fz0 1a10 1in0 1a10 1in0 17f0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 vA0 60L0 WM0 1fA0 1cM0 17c0 1io0 16M0 1C00 Uo0 1eeo0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40993 "Europe/Madrid|WET WEST WEMT CET CEST|0 -10 -20 -10 -20|01010101010101010101010121212121234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-28dd0 11A0 1go0 19A0 1co0 1dA0 b1A0 18o0 3I00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 iyo0 Rc0 18o0 1hc0 1io0 1a00 14o0 5aL0 MM0 1vc0 17A0 1i00 1bc0 1eo0 17d0 1in0 17A0 6hA0 10N0 XIL0 1a10 1in0 17d0 19X0 1cN0 1fz0 1a10 1fX0 1cp0 1cO0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40994 "Europe/Malta|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2as10 M00 1cM0 1cM0 14o0 1o00 WM0 1qM0 17c0 1cM0 M3A0 5M20 WM0 1fA0 1cM0 1cM0 1cM0 16m0 1de0 1lc0 14m0 1lc0 WO0 1qM0 GTW0 On0 1C10 Lz0 1C10 Lz0 1EN0 Lz0 1C10 Lz0 1zd0 Oo0 1C00 On0 1cp0 1cM0 1lA0 Xc0 1qq0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1iN0 19z0 1fB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40995 "Europe/Minsk|MMT EET MSK CEST CET MSD EEST FET|-1O -20 -30 -20 -10 -40 -30 -30|012343432525252525252525252616161616161616161616161616161616161616172|-1Pc1O eUnO qNX0 3gQ0 WM0 1fA0 1cM0 Al0 1tsn0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 3Fc0 1cN0 1cK0 1cM0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hy0", 40996 "Europe/Monaco|PMT WET WEST WEMT CET CEST|-9.l 0 -10 -20 -10 -20|01212121212121212121212121212121212121212121212121232323232345454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-2nco9.l cNb9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 1u00 10o0 1io0 1wo0 Rc0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Df0 2RV0 11z0 11B0 1ze0 WM0 1fA0 1cM0 1fa0 1aq0 16M0 1ekn0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40997 "Europe/Moscow|MMT MMT MST MDST MSD MSK MSM EET EEST MSK|-2u.h -2v.j -3v.j -4v.j -40 -30 -50 -20 -30 -40|012132345464575454545454545454545458754545454545454545454545454545454545454595|-2ag2u.h 2pyW.W 1bA0 11X0 GN0 1Hb0 c20 imv.j 3DA0 dz0 15A0 c10 2q10 iM10 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rU0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0", 40998 "Europe/Paris|PMT WET WEST CEST CET WEMT|-9.l 0 -10 -20 -10 -20|0121212121212121212121212121212121212121212121212123434352543434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434|-2nco8.l cNb8.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 1u00 10o0 1io0 1wo0 Rc0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Df0 Ik0 5M30 WM0 1fA0 1cM0 Vx0 hB0 1aq0 16M0 1ekn0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 40999 "Europe/Riga|RMT LST EET MSK CEST CET MSD EEST|-1A.y -2A.y -2
409990 -30 -20 -10 -40 -30|010102345454536363636363636363727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272|-25TzA.y 11A0 1iM0 ko0 gWm0 yDXA.y 2bX0 3fE0 WM0 1fA0 1cM0 1cM0 4m0 1sLy0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 1o00 11A0 1o00 11A0 1qM0 3oo0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 41000 "Europe/Rome|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2as10 M00 1cM0 1cM0 14o0 1o00 WM0 1qM0 17c0 1cM0 M3A0 5M20 WM0 1fA0 1cM0 16K0 1iO0 16m0 1de0 1lc0 14m0 1lc0 WO0 1qM0 GTW0 On0 1C10 Lz0 1C10 Lz0 1EN0 Lz0 1C10 Lz0 1zd0 Oo0 1C00 On0 1C10 Lz0 1zd0 On0 1C10 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1zc0 Oo0 1fC0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 41001 "Europe/Samara|LMT SAMT SAMT KUYT KUYST MSD MSK EEST KUYT SAMST SAMST|-3k.k -30 -40 -40 -50 -40 -30 -30 -30 -50 -40|012343434343434343435656782929292929292929292929292929292929292a12|-22WNk.k qHak.k bcn0 1Qqo0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cN0 8o0 14j0 1cL0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qN0 WM0", 41002 "Europe/Simferopol|SMT EET MSK CEST CET MSD EEST MSK|-2g -20 -30 -20 -10 -40 -30 -40|012343432525252525252525252161616525252616161616161616161616161616161616172|-1Pc2g eUog rEn0 2qs0 WM0 1fA0 1cM0 3V0 1u0L0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 4eL0 1cL0 1cN0 1cL0 1cN0 dX0 WL0 1cN0 1cL0 1fB0 1o30 11B0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11z0 1nW0", 41003 "Europe/Sofia|EET CET CEST EEST|-20 -10 -20 -30|01212103030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030|-168L0 WM0 1fA0 1cM0 1cM0 1cN0 1mKH0 1dd0 1fb0 1ap0 1fb0 1a20 1fy0 1a30 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 41004 "Europe/Stockholm|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2azC0 TB0 2yDe0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 41005 "Europe/Tallinn|TMT CET CEST EET MSK MSD EEST|-1D -10 -20 -20 -30 -40 -30|012103421212454545454545454546363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363|-26oND teD 11A0 1Ta0 4rXl KSLD 2FX0 2Jg0 WM0 1fA0 1cM0 18J0 1sTX0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o10 11A0 1qM0 5QM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 41006 "Europe/Tirane|LMT CET CEST|-1j.k -10 -20|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glBj.k 14pcj.k 5LC0 WM0 4M0 1fCK0 10n0 1op0 11z0 1pd0 11z0 1qN0 WL0 1qp0 Xb0 1qp0 Xb0 1qp0 11z0 1lB0 11z0 1qN0 11z0 1iN0 16n0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 41007 "Europe/Uzhgorod|CET CEST MSK MSD EET EEST|-10 -20 -30 -40 -20 -30|010101023232323232323232320454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-1cqL0 6i00 WM0 1fA0 1cM0 1ml0 1Cp0 1r3W0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 1Nf0 2pw0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 41008 "Europe/Vienna|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 3KM0 14o0 LA00 6i00 WM0 1fA0 1cM0 1cM0 1cM0 400 2qM0 1a00 1cM0 1cM0 1io0 17c0 1gHa0 19X0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 41009 "Europe/Vilnius|WMT KMT CET EET MSK CEST MSD EEST|-1o -1z.A -10 -20 -30 -20 -40 -30|012324525254646464646464646464647373737373737352537373737373737373737373737373737373737373737373737373737373737373737373|-293do 6ILM.o 1Ooz.A zz0 Mfd0 29W0 3is0 WM0 1fA0 1cM0 LV0 1tgL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11B0 1o00 11A0 1qM0 8io0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 41010 "Europe/Volgograd|LMT TSAT STAT STAT VOLT VOLST VOLST VOLT MSD MSK MSK|-2V.E -30 -30 -40 -40 -50 -40 -30 -40 -30 -40|0123454545454545454546767489898989898989898989898989898989898989a9|-21IqV.E cLXV.E cEM0 1gqn0 Lco0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 2pz0 1cJ0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0", 41011 "Europe/Warsaw|WMT CET CEST EET EEST|-1o -10 -20 -20 -30|012121234312121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2ctdo 1LXo 11d0 1iO0 11A0 1o00 11A0 1on0 11A0 6zy0 HWP0 5IM0 WM0 1fA0 1cM0 1dz0 1mL0 1en0 15B0 1aq0 1nA0 11A0 1io0 17c0 1fA0 1a00 iDX0 LA0 1cM0 1cM0 1C00 Oo0 1cM0 1cM0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1C00 LA0 uso0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 41012 "Europe/Zaporozhye|CUT EET MSK CEST CET MSD EEST|-2k -20 -30 -20 -10 -40 -30|01234342525252525252525252526161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161|-1Pc2k eUok rdb0 2RE0 WM0 1fA0 8m0 1v9a0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cK0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 41013 "HST|HST|a0|0|", 41014 "Indian/Chagos|LMT IOT IOT|-4N.E -50 -60|012|-2xosN.E 3AGLN.E", 41015 "Indian/Christmas|CXT|-70|0|", 41016 "Indian/Cocos|CCT|-6u|0|", 41017 "Indian/Kerguelen|zzz TFT|0 -50|01|-MG00", 41018 "Indian/Mahe|LMT SCT|-3F.M -40|01|-2yO3F.M", 41019 "Indian/Maldives|MMT MVT|-4S -50|01|-olgS", 41020 "Indian/Mauritius|LMT MUT MUST|-3O -40 -50|012121|-2xorO 34unO 14L0 12kr0 11z0", 41021 "Indian/Reunion|LMT RET|-3F.Q -40|01|-2mDDF.Q", 41022 "Kwajalein|MHT KWAT MHT|-b0 c0 -c0|012|-AX0 W9X0", 41023 "MET|MET MEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 41024 "MST|MST|70|0|", 41025 "MST7MDT|MST MDT MWT MPT|70 60 60 60|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 41026 "NZ-CHAT|CHAST CHAST CHADT|-cf -cJ -dJ|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-WqAf 1adef IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00", 41027 "PST8PDT|PST PDT PWT PPT|80 70 70 70|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261q0 1nX0 11B0 1nX0 SgN0 8x10 iy0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 41028 "Pacific/Apia|LMT WSST SST SDT WSDT WSST|bq.U bu b0 a0 -e0 -d0|01232345454545454545454545454545454545454545454545454545454|-2nDMx.4 1yW03.4 2rRbu 1ff0 1a00 CI0 AQ0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00", 41029 "Pacific/Bougainville|PGT JST BST|-a0 -90 -b0|0102|-16Wy0 7CN0 2MQp0", 41030 "Pacific/Chuuk|CHUT|-a0|0|", 41031 "Pacific/Efate|LMT VUT VUST|-bd.g -b0 -c0|0121212121212121212121|-2l9nd.g 2Szcd.g 1cL0 1oN0 10L0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 Lz0 1Nd0 An0", 41032 "Pacific/Enderbury|PHOT PHOT PHOT|c0 b0 -d0|012|nIc0 B8n0", 41033 "Pacific/Fakaofo|TKT TKT|b0 -d0|01|1Gfn0", 41034 "Pacific/Fiji|LMT FJT FJST|-bT.I -c0 -d0|012121212121212121212121212121212121212121212121212121212121212|-2bUzT.I 3m8NT.I LA0 1EM0 IM0 nJc0 LA0 1o00 Rc0 1wo0 Ao0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 xA0 1SM0 uM0 1SM0 uM0 1SM0 uM0 1SM0 uM0 1SM0 xA0 1SM0 uM0 1SM0 uM0 1SM0 uM0 1SM0 uM0 1SM0 uM0 1SM0 xA0 1SM0 uM0 1SM0 uM0 1SM0 uM0 1SM0 uM0 1SM0 uM0 1VA0 uM0 1SM0 uM0 1SM0 uM0 1SM0 uM0 1SM0 uM0 1SM0", 41035 "Pacific/Funafuti|TVT|-c0|0|", 41036 "Pacific/Galapagos|LMT ECT GALT|5W.o 50 60|012|-1yVS1.A 2dTz1.A", 41037 "Pacific/Gambier|LMT GAMT|8X.M 90|01|-2jof0.c", 41038 "Pacific/Guadalcanal|LMT SBT|-aD.M -b0|01|-2joyD.M", 41039 "Pacific/Guam|GST ChST|-a0 -a0|01|1fpq0", 41040 "Pacific/Honolulu|HST HDT HST|au 9u a0|010102|-1thLu 8x0 lef0 8Pz0 46p0",
41041 "Pacific/Kiritimati|LINT LINT LINT|aE a0 -e0|012|nIaE B8nk", 41042 "Pacific/Kosrae|KOST KOST|-b0 -c0|010|-AX0 1bdz0", 41043 "Pacific/Majuro|MHT MHT|-b0 -c0|01|-AX0", 41044 "Pacific/Marquesas|LMT MART|9i 9u|01|-2joeG", 41045 "Pacific/Midway|LMT NST BST SST|bm.M b0 b0 b0|0123|-2nDMB.c 2gVzB.c EyM0", 41046 "Pacific/Nauru|LMT NRT JST NRT|-b7.E -bu -90 -c0|01213|-1Xdn7.E PvzB.E 5RCu 1ouJu", 41047 "Pacific/Niue|NUT NUT NUT|bk bu b0|012|-KfME 17y0a", 41048 "Pacific/Norfolk|NMT NFT|-bc -bu|01|-Kgbc", 41049 "Pacific/Noumea|LMT NCT NCST|-b5.M -b0 -c0|01212121|-2l9n5.M 2EqM5.M xX0 1PB0 yn0 HeP0 Ao0", 41050 "Pacific/Palau|PWT|-90|0|", 41051 "Pacific/Pitcairn|PNT PST|8u 80|01|18Vku", 41052 "Pacific/Pohnpei|PONT|-b0|0|", 41053 "Pacific/Port_Moresby|PGT|-a0|0|", 41054 "Pacific/Rarotonga|CKT CKHST CKT|au 9u a0|012121212121212121212121212|lyWu IL0 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu", 41055 "Pacific/Tahiti|LMT TAHT|9W.g a0|01|-2joe1.I", 41056 "Pacific/Tarawa|GILT|-c0|0|", 41057 "Pacific/Tongatapu|TOT TOT TOST|-ck -d0 -e0|01212121|-1aB0k 2n5dk 15A0 1wo0 xz0 1Q10 xz0", 41058 "Pacific/Wake|WAKT|-c0|0|", 41059 "Pacific/Wallis|WFT|-c0|0|", 41060 "WET|WET WEST|0 -10|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00" 41061 ], 41062 "links": [ 41063 "Africa/Abidjan|Africa/Bamako", 41064 "Africa/Abidjan|Africa/Banjul", 41065 "Africa/Abidjan|Africa/Conakry", 41066 "Africa/Abidjan|Africa/Dakar", 41067 "Africa/Abidjan|Africa/Freetown", 41068 "Africa/Abidjan|Africa/Lome", 41069 "Africa/Abidjan|Africa/Nouakchott", 41070 "Africa/Abidjan|Africa/Ouagadougou", 41071 "Africa/Abidjan|Africa/Sao_Tome", 41072 "Africa/Abidjan|Africa/Timbuktu", 41073 "Africa/Abidjan|Atlantic/St_Helena", 41074 "Africa/Addis_Ababa|Africa/Asmara", 41075 "Africa/Addis_Ababa|Africa/Asmera", 41076 "Africa/Addis_Ababa|Africa/Dar_es_Salaam", 41077 "Africa/Addis_Ababa|Africa/Djibouti", 41078 "Africa/Addis_Ababa|Africa/Kampala", 41079 "Africa/Addis_Ababa|Africa/Mogadishu", 41080 "Africa/Addis_Ababa|Africa/Nairobi", 41081 "Africa/Addis_Ababa|Indian/Antananarivo", 41082 "Africa/Addis_Ababa|Indian/Comoro", 41083 "Africa/Addis_Ababa|Indian/Mayotte", 41084 "Africa/Bangui|Africa/Brazzaville", 41085 "Africa/Bangui|Africa/Douala", 41086 "Africa/Bangui|Africa/Kinshasa", 41087 "Africa/Bangui|Africa/Lagos", 41088 "Africa/Bangui|Africa/Libreville", 41089 "Africa/Bangui|Africa/Luanda", 41090 "Africa/Bangui|Africa/Malabo", 41091 "Africa/Bangui|Africa/Niamey", 41092 "Africa/Bangui|Africa/Porto-Novo", 41093 "Africa/Blantyre|Africa/Bujumbura", 41094 "Africa/Blantyre|Africa/Gaborone", 41095 "Africa/Blantyre|Africa/Harare", 41096 "Africa/Blantyre|Africa/Kigali", 41097 "Africa/Blantyre|Africa/Lubumbashi", 41098 "Africa/Blantyre|Africa/Lusaka", 41099 "Africa/Blantyre|Africa/Maputo", 41100 "Africa/Cairo|Egypt", 41101 "Africa/Johannesburg|Africa/Maseru", 41102 "Africa/Johannesburg|Africa/Mbabane", 41103 "Africa/Juba|Africa/Khartoum", 41104 "Africa/Tripoli|Libya", 41105 "America/Adak|America/Atka", 41106 "America/Adak|US/Aleutian", 41107 "America/Anchorage|US/Alaska", 41108 "America/Anguilla|America/Antigua", 41109 "America/Anguilla|America/Dominica", 41110 "America/Anguilla|America/Grenada", 41111 "America/Anguilla|America/Guadeloupe", 41112 "America/Anguilla|America/Marigot", 41113 "America/Anguilla|America/Montserrat", 41114 "America/Anguilla|America/Port_of_Spain", 41115 "America/Anguilla|America/St_Barthelemy", 41116 "America/Anguilla|America/St_Kitts", 41117 "America/Anguilla|America/St_Lucia", 41118 "America/Anguilla|America/St_Thomas", 41119 "America/Anguilla|America/St_Vincent", 41120 "America/Anguilla|America/Tortola", 41121 "America/Anguilla|America/Virgin", 41122 "America/Argentina/Buenos_Aires|America/Buenos_Aires", 41123 "America/Argentina/Catamarca|America/Argentina/ComodRivadavia", 41124 "America/Argentina/Catamarca|America/Catamarca", 41125 "America/Argentina/Cordoba|America/Cordoba", 41126 "America/Argentina/Cordoba|America/Rosario", 41127 "America/Argentina/Jujuy|America/Jujuy", 41128 "America/Argentina/Mendoza|America/Mendoza", 41129 "America/Aruba|America/Curacao", 41130 "America/Aruba|America/Kralendijk", 41131 "America/Aruba|America/Lower_Princes", 41132 "America/Atikokan|America/Coral_Harbour", 41133 "America/Cayman|America/Panama", 41134 "America/Chicago|US/Central", 41135 "America/Denver|America/Shiprock", 41136 "America/Denver|Navajo", 41137 "America/Denver|US/Mountain", 41138 "America/Detroit|US/Michigan",
41139 "America/Edmonton|Canada/Mountain", 41140 "America/Ensenada|America/Tijuana", 41141 "America/Ensenada|Mexico/BajaNorte", 41142 "America/Fort_Wayne|America/Indiana/Indianapolis", 41143 "America/Fort_Wayne|America/Indianapolis", 41144 "America/Fort_Wayne|US/East-Indiana", 41145 "America/Halifax|Canada/Atlantic", 41146 "America/Havana|Cuba", 41147 "America/Indiana/Knox|America/Knox_IN", 41148 "America/Indiana/Knox|US/Indiana-Starke", 41149 "America/Jamaica|Jamaica", 41150 "America/Kentucky/Louisville|America/Louisville", 41151 "America/Los_Angeles|US/Pacific", 41152 "America/Los_Angeles|US/Pacific-New", 41153 "America/Manaus|Brazil/West", 41154 "America/Mazatlan|Mexico/BajaSur", 41155 "America/Mexico_City|Mexico/General", 41156 "America/Montreal|America/Toronto", 41157 "America/Montreal|Canada/Eastern", 41158 "America/New_York|US/Eastern", 41159 "America/Noronha|Brazil/DeNoronha", 41160 "America/Phoenix|US/Arizona", 41161 "America/Porto_Acre|America/Rio_Branco", 41162 "America/Porto_Acre|Brazil/Acre", 41163 "America/Regina|Canada/East-Saskatchewan", 41164 "America/Regina|Canada/Saskatchewan", 41165 "America/Santiago|Chile/Continental", 41166 "America/Sao_Paulo|Brazil/East",
41167 "America/St_Johns|Canada/Newfoundland", 41168 "America/Vancouver|Canada/Pacific", 41169 "America/Whitehorse|Canada/Yukon", 41170 "America/Winnipeg|Canada/Central", 41171 "Antarctica/McMurdo|Antarctica/South_Pole", 41172 "Antarctica/McMurdo|NZ", 41173 "Antarctica/McMurdo|Pacific/Auckland", 41174 "Arctic/Longyearbyen|Atlantic/Jan_Mayen", 41175 "Arctic/Longyearbyen|Europe/Oslo", 41176 "Asia/Aden|Asia/Kuwait", 41177 "Asia/Aden|Asia/Riyadh", 41178 "Asia/Ashgabat|Asia/Ashkhabad", 41179 "Asia/Bahrain|Asia/Qatar", 41180 "Asia/Bangkok|Asia/Phnom_Penh", 41181 "Asia/Bangkok|Asia/Vientiane", 41182 "Asia/Calcutta|Asia/Kolkata", 41183 "Asia/Chongqing|Asia/Chungking", 41184 "Asia/Chongqing|Asia/Harbin", 41185 "Asia/Chongqing|Asia/Shanghai", 41186 "Asia/Chongqing|PRC", 41187 "Asia/Dacca|Asia/Dhaka", 41188 "Asia/Dubai|Asia/Muscat", 41189 "Asia/Ho_Chi_Minh|Asia/Saigon", 41190 "Asia/Hong_Kong|Hongkong", 41191 "Asia/Istanbul|Europe/Istanbul", 41192 "Asia/Istanbul|Turkey", 41193 "Asia/Jerusalem|Asia/Tel_Aviv", 41194 "Asia/Jerusalem|Israel", 41195 "Asia/Kashgar|Asia/Urumqi", 41196 "Asia/Kathmandu|Asia/Katmandu", 41197 "Asia/Macao|Asia/Macau", 41198 "Asia/Makassar|Asia/Ujung_Pandang", 41199 "Asia/Nicosia|Europe/Nicosia", 41200 "Asia/Seoul|ROK", 41201 "Asia/Singapore|Singapore", 41202 "Asia/Taipei|ROC", 41203 "Asia/Tehran|Iran", 41204 "Asia/Thimbu|Asia/Thimphu", 41205 "Asia/Tokyo|Japan", 41206 "Asia/Ulaanbaatar|Asia/Ulan_Bator", 41207 "Atlantic/Faeroe|Atlantic/Faroe", 41208 "Atlantic/Reykjavik|Iceland", 41209 "Australia/ACT|Australia/Canberra", 41210 "Australia/ACT|Australia/NSW", 41211 "Australia/ACT|Australia/Sydney", 41212 "Australia/Adelaide|Australia/South", 41213 "Australia/Brisbane|Australia/Queensland", 41214 "Australia/Broken_Hill|Australia/Yancowinna", 41215 "Australia/Darwin|Australia/North", 41216 "Australia/Hobart|Australia/Tasmania", 41217 "Australia/LHI|Australia/Lord_Howe", 41218 "Australia/Melbourne|Australia/Victoria", 41219 "Australia/Perth|Australia/West", 41220 "Chile/EasterIsland|Pacific/Easter", 41221 "Eire|Europe/Dublin", 41222 "Etc/GMT+0|Etc/GMT", 41223 "Etc/GMT+0|Etc/GMT-0", 41224 "Etc/GMT+0|Etc/GMT0", 41225 "Etc/GMT+0|Etc/Greenwich", 41226 "Etc/GMT+0|GMT", 41227 "Etc/GMT+0|GMT+0", 41228 "Etc/GMT+0|GMT-0", 41229 "Etc/GMT+0|GMT0", 41230 "Etc/GMT+0|Greenwich", 41231 "Etc/UCT|UCT", 41232 "Etc/UTC|Etc/Universal", 41233 "Etc/UTC|Etc/Zulu", 41234 "Etc/UTC|UTC", 41235 "Etc/UTC|Universal", 41236 "Etc/UTC|Zulu", 41237 "Europe/Belfast|Europe/Guernsey", 41238 "Europe/Belfast|Europe/Isle_of_Man", 41239 "Europe/Belfast|Europe/Jersey", 41240 "Europe/Belfast|Europe/London", 41241 "Europe/Belfast|GB", 41242 "Europe/Belfast|GB-Eire", 41243 "Europe/Belgrade|Europe/Ljubljana", 41244 "Europe/Belgrade|Europe/Podgorica", 41245 "Europe/Belgrade|Europe/Sarajevo", 41246 "Europe/Belgrade|Europe/Skopje", 41247 "Europe/Belgrade|Europe/Zagreb", 41248 "Europe/Bratislava|Europe/Prague", 41249 "Europe/Busingen|Europe/Vaduz", 41250 "Europe/Busingen|Europe/Zurich", 41251 "Europe/Chisinau|Europe/Tiraspol", 41252 "Europe/Helsinki|Europe/Mariehamn", 41253 "Europe/Lisbon|Portugal", 41254 "Europe/Moscow|W-SU", 41255 "Europe/Rome|Europe/San_Marino", 41256 "Europe/Rome|Europe/Vatican", 41257 "Europe/Warsaw|Poland", 41258 "Kwajalein|Pacific/Kwajalein", 41259 "NZ-CHAT|Pacific/Chatham", 41260 "Pacific/Chuuk|Pacific/Truk", 41261 "Pacific/Chuuk|Pacific/Yap", 41262 "Pacific/Guam|Pacific/Saipan", 41263 "Pacific/Honolulu|Pacific/Johnston", 41264 "Pacific/Honolulu|US/Hawaii", 41265 "Pacific/Midway|Pacific/Pago_Pago", 41266 "Pacific/Midway|Pacific/Samoa", 41267 "Pacific/Midway|US/Samoa", 41268 "Pacific/Pohnpei|Pacific/Ponape" 41269 ] 41270 }); 41271 41272 41273 return moment; 41274})); 41275 41276SiteConfig = { 41277 "basepath": "https://iahs.info/", 41278 "recaptcha": "6LchM7QmAAAAAPJmnDPPQe2gGQOKgqbIQpmVBcPF" 41279}; 41280Samui = function($) { 41281 $.browser = {}; 41282 $.browser.msie = false; 41283 $.browser.version = 0; 41284 if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) { 41285 $.browser.msie = true; 41286 $.browser.version = RegExp.$1; 41287 } 41288}; 41289Samui.prototype = { 41290 overlay: function() { 41291 var self = Samui.prototype.overlay; 41292 $("body").css("overflow", "scroll"); 41293 var overlay = $("<div class='overlay'></div>").appendTo("body"); 41294 overlay.append($("<div class='overlaybg'></div>")); 41295 var contentContainer = $("<div class='overlaycont ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable ui-resizable'></div>").appendTo(overlay); 41296 var closeBTN = $("<div class='overlayclose'></div>").on('click', function() { 41297 $("body").css("overflow-y", ""); 41298 cContent.close(); 41299 }).append('<button type="button" class="button" role="button" aria-disabled="false" title="close"><span class="ui-button-icon-primary ui-icon ui-icon-closethick"></span><span class="ui-button-text">close</span></button>'/*<img src='" + SiteConfig.basepath + "img/js-close.png' width='24' height='24px' alt='close'/>"*/).appendTo(contentContainer); 41300 var content = $("<div></div>").appendTo(contentContainer); 41301 var cOverlay = $("<div />", { 41302 'html': '<i class="fas fa-sync fa-spin"></i> Loading, please wait...', 41303 'class': 'overlay-loading' 41304 }).appendTo(content); 41305 41306 var cContent = $("<div></div>").css("display", "none").appendTo(content); 41307 cContent.htmlContent = function(html) { 41308 cContent.append($('<div><div style="display: block; width: auto; min-height: 0px; height: 44px; height: auto;padding: 1em;" class="ui-dialog-content ui-widget-content" scrolltop="0" scrollleft="0"></div>')); 41309 cContent.find('div.ui-dialog-content').html(html); 41310 }; 41311 cContent.title = function(title) {
41312 cContent.prepend($("<div class='ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix'><span class='ui-dialog-title'>" + title + "</span></div>")); 41313 closeBTN.css({'top': '9px', 'right': '6px'}); 41314 }; 41315 cContent.content = function(html) { 41316 cContent.append($('<div><div style="display: block; width: auto; min-height: 0px; height: 44px; height: auto;padding: 1em;" class="ui-dialog-content ui-widget-content" scrolltop="0" scrollleft="0">' + html + '</div>')); 41317 }; 41318 cContent.appendContent = function(html) { 41319 cContent.find('div.ui-dialog-content').append(html); 41320 }; 41321 cContent.prependContent = function(html) { 41322 cContent.find('div.ui-dialog-content').prepend(html); 41323 }; 41324 cContent.hideDefault = function(bool) { 41325 if (bool) { 41326 closeBTN.remove(); 41327 } 41328 }; 41329 cContent.buttons = function(buttons) { 41330 var buttonpane = $('<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"></div>'); 41331 cContent.append(buttonpane); 41332 $.each(buttons, function(i) { 41333 $(this).appendTo(buttonpane); 41334 }) 41335 }; 41336 cContent.loading = function() { 41337 cOverlay.css("display", "block"); 41338 cContent.css("display", "none"); 41339 setTimeout(function() { 41340 cOverlay.append( 41341 $('<div />', { 41342 'html': '<p>We are still working on your request....</p>' 41343 }) 41344 ) 41345 }, 30000); 41346 setTimeout(function() { 41347 cOverlay.find('div').html( 41348 '<p>You must be uploading some large files? We\'re going as quick as we can!....</p>' 41349 ) 41350 }, 60000); 41351 setTimeout(function() { 41352 cOverlay.find('div').html( 41353 '<p>Thanks for being patient. If you\'re not uploading files something may have gone wrong here. Please close and try again. If you are uploading, please continue to wait....</p>' 41354 ) 41355 }, 90000); 41356 }; 41357 cContent.show = function() { 41358 cOverlay.css("display", "none"); 41359 cContent.css("display", "block"); 41360 }; 41361 cContent.resize = function(newWidth) { 41362 // Let's calculate some stuff. 41363 if (newWidth.toString().indexOf("%") > 0) { 41364 var newLeft = ((100 - newWidth.replace('%', '')) / 2); 41365 contentContainer.attr("style", "left: " + newLeft + "% !important;").width(newWidth); 41366 } 41367 else { 41368 var newLeft = ($(window).width() - newWidth) / 2; 41369 contentContainer.attr("style", "left: " + newLeft + "px !important;").width(newWidth); 41370 } 41371 }; 41372 cContent.clearContent = function() { 41373 var title = cContent.find('.ui-dialog-title').html(); 41374 cContent.html(""); 41375 cContent.title(title); 41376 }; 41377 cContent.close = function() { 41378 $("body").css("overflow-y", ""); 41379 if (typeof(tinymce) !== 'undefined') { 41380 $.each(tinymce.editors, function(i,e) { 41381 if ($(cContent).find('textarea#'+tinymce.editors[i].id).length) { 41382 tinymce.editors[i].remove(); 41383 } 41384 }); 41385 } 41386 overlay.remove(); 41387 }; 41388 cContent.hide = function() { 41389 cOverlay.css("display", "block"); 41390 cContent.css("display", "none"); 41391 }; 41392 return cContent; 41393 }, 41394 bootTextEditor: null 41395}; 41396S = new Samui(jQuery); 41397 41398/*! 41399 * FullCalendar v1.6.0 41400 * Docs & License: http://arshaw.com/fullcalendar/ 41401 * (c) 2013 Adam Shaw 41402 */ 41403(function(t,e){function n(e){t.extend(!0,ye,e)}function r(n,r,l){function u(t){G?(S(),C(),R(),b(t)):f()}function f(){K=r.theme?"ui":"fc",n.addClass("fc"),r.isRTL?n.addClass("fc-rtl"):n.addClass("fc-ltr"),r.theme&&n.addClass("ui-widget"),G=t("<div class='fc-content' style='position:relative'/>").prependTo(n),$=new a(Z,r),Q=$.render(),Q&&n.prepend(Q),y(r.defaultView),t(window).resize(x),m()||v()}function v(){setTimeout(function(){!te.start&&m()&&b()}
41403,0)}function h(){t(window).unbind("resize",x),$.destroy(),G.remove(),n.removeClass("fc fc-rtl ui-widget")}function g(){return 0!==se.offsetWidth}function m(){return 0!==t("body")[0].offsetWidth}function y(e){if(!te||e!=te.name){ue++,W();var n,r=te;r?((r.beforeHide||I)(),q(G,G.height()),r.element.hide()):q(G,1),G.css("overflow","hidden"),te=ce[e],te?te.element.show():te=ce[e]=new De[e](n=re=t("<div class='fc-view fc-view-"+e+"' style='position:absolute'/>").appendTo(G),Z),r&&$.deactivateButton(r.name),$.activateButton(e),b(),G.css("overflow",""),r&&q(G,1),n||(te.afterShow||I)(),ue--}}function b(t){if(g()){ue++,W(),ne===e&&S();var r=!1;!te.start||t||te.start>fe||fe>=te.end?(te.render(fe,t||0),E(!0),r=!0):te.sizeDirty?(te.clearEvents(),E(),r=!0):te.eventsDirty&&(te.clearEvents(),r=!0),te.sizeDirty=!1,te.eventsDirty=!1,T(r),ee=n.outerWidth(),$.updateTitle(te.title);var a=new Date;a>=te.start&&te.end>a?$.disableButton("today"):$.enableButton("today"),ue--,te.trigger("viewDisplay",se)}}function M(){C(),g()&&(S(),E(),W(),te.clearEvents(),te.renderEvents(de),te.sizeDirty=!1)}function C(){t.each(ce,function(t,e){e.sizeDirty=!0})}function S(){ne=r.contentHeight?r.contentHeight:r.height?r.height-(Q?Q.height():0)-L(G):Math.round(G.width()/Math.max(r.aspectRatio,.5))}function E(t){ue++,te.setHeight(ne,t),re&&(re.css("position","relative"),re=null),te.setWidth(G.width(),t),ue--}function x(){if(!ue)if(te.start){var t=++le;setTimeout(function(){t==le&&!ue&&g()&&ee!=(ee=n.outerWidth())&&(ue++,M(),te.trigger("windowResize",se),ue--)},200)}else v()}function T(t){!r.lazyFetching||oe(te.visStart,te.visEnd)?k():t&&F()}function k(){ie(te.visStart,te.visEnd)}function H(t){de=t,F()}function z(t){F(t)}function F(t){R(),g()&&(te.clearEvents(),te.renderEvents(de,t),te.eventsDirty=!1)}function R(){t.each(ce,function(t,e){e.eventsDirty=!0})}function N(t,n,r){te.select(t,n,r===e?!0:r)}function W(){te&&te.unselect()}function A(){b(-1)}function _(){b(1)}function O(){i(fe,-1),b()}function B(){i(fe,1),b()}function Y(){fe=new Date,b()}function j(t,e,n){t instanceof Date?fe=d(t):p(fe,t,e,n),b()}function P(t,n,r){t!==e&&i(fe,t),n!==e&&s(fe,n),r!==e&&c(fe,r),b()}function J(){return d(fe)}function V(){return te}function X(t,n){return n===e?r[t]:(("height"==t||"contentHeight"==t||"aspectRatio"==t)&&(r[t]=n,M()),e)}function U(t,n){return r[t]?r[t].apply(n||se,Array.prototype.slice.call(arguments,2)):e}var Z=this;Z.options=r,Z.render=u,Z.destroy=h,Z.refetchEvents=k,Z.reportEvents=H,Z.reportEventChange=z,Z.rerenderEvents=F,Z.changeView=y,Z.select=N,Z.unselect=W,Z.prev=A,Z.next=_,Z.prevYear=O,Z.nextYear=B,Z.today=Y,Z.gotoDate=j,Z.incrementDate=P,Z.formatDate=function(t,e){return w(t,e,r)},Z.formatDates=function(t,e,n){return D(t,e,n,r)},Z.getDate=J,Z.getView=V,Z.option=X,Z.trigger=U,o.call(Z,r,l);var $,Q,G,K,te,ee,ne,re,ae,oe=Z.isFetchNeeded,ie=Z.fetchEvents,se=n[0],ce={},le=0,ue=0,fe=new Date,de=[];p(fe,r.year,r.month,r.date),r.droppable&&t(document).bind("dragstart",function(e,n){var a=e.target,o=t(a);if(!o.parents(".fc").length){var i=r.dropAccept;(t.isFunction(i)?i.call(a,o):o.is(i))&&(ae=a,te.dragStart(ae,e,n))}}).bind("dragstop",function(t,e){ae&&(te.dragStop(ae,t,e),ae=null)})}function a(n,r){function a(){v=r.theme?"ui":"fc";var n=r.header;return n?h=t("<table class='fc-header' style='width:100%'/>").append(t("<tr/>").append(i("left")).append(i("center")).append(i("right"))):e}function o(){h.remove()}function i(e){var a=t("<td class='fc-header-"+e+"'/>"),o=r.header[e];return o&&t.each(o.split(" "),function(e){e>0&&a.append("<span class='fc-header-space'/>");var o;t.each(this.split(","),function(e,i){if("title"==i)a.append("<span class='fc-header-title'><h2> </h2></span>"),o&&o.addClass(v+"-corner-right"),o=null;else{var s;if(n[i]?s=n[i]:De[i]&&(s=function(){u.removeClass(v+"-state-hover"),n.changeView(i)}),s){var c=r.theme?J(r.buttonIcons,i):null,l=J(r.buttonText,i),u=t("<span class='fc-button fc-button-"+i+" "+v+"-state-default'>"+(c?"<span class='fc-icon-wrap'><span class='ui-icon ui-icon-"+c+"'/>"+"</span>":l)+"</span>").click(function(){u.hasClass(v+"-state-disabled")||s()}).mousedown(function(){u.not("."+v+"-state-active").not("."+v+"-state-disabled").addClass(v+"-state-down")}).mouseup(function(){u.removeClass(v+"-state-down")}).hover(function(){u.not("."+v+"-state-active").not("."+v+"-state-disabled").addClass(v+"-state-hover")},function(){u.removeClass(v+"-state-hover").removeClass(v+"-state-down")}).appendTo(a);U(u),o||u.addClass(v+"-corner-left"),o=u}}}),o&&o.addClass(v+"-corner-right")}),a}function s(t){h.find("h2").html(t)}function c(t){h.find("span.fc-button-"+t).addClass(v+"-state-active")}function l(t){h.find("span.fc-button-"+t).removeClass(v+"-state-active")}function u(t){h.find("span.fc-button-"+t).addClass(v+"-state-disabled")}function f(t){h.find("span.fc-button-"+t).removeClass(v+"-state-disabled")}var d=this;d.render=a,d.destroy=o,d.updateTitle=s,d.activateButton=c,d.deactivateButton=l,d.disableButton=u,d.enableButton=f;var v,h=t([])}function o(n,r){function a(t,e){return!S||S>t||e>E}function o(t,e){S=t,E=e,W=[];var n=++F,r=z.length;R=r;for(var a=0;r>a;a++)i(z[a],n)}
41403function i(e,r){s(e,function(a){if(r==F){if(a){n.eventDataTransform&&(a=t.map(a,n.eventDataTransform)),e.eventDataTransform&&(a=t.map(a,e.eventDataTransform));for(var o=0;a.length>o;o++)a[o].source=e,b(a[o]);W=W.concat(a)}R--,R||k(W)}})}function s(r,a){var o,i,c=we.sourceFetchers;for(o=0;c.length>o;o++){if(i=c[o](r,S,E,a),i===!0)return;if("object"==typeof i)return s(i,a),e}var l=r.events;if(l)t.isFunction(l)?(p(),l(d(S),d(E),function(t){a(t),y()})):t.isArray(l)?a(l):a();else{var u=r.url;if(u){var f=r.success,v=r.error,h=r.complete,g=t.extend({},r.data||{}),m=K(r.startParam,n.startParam),b=K(r.endParam,n.endParam);m&&(g[m]=Math.round(+S/1e3)),b&&(g[b]=Math.round(+E/1e3)),p(),t.ajax(t.extend({},Me,r,{data:g,success:function(e){e=e||[];var n=G(f,this,arguments);t.isArray(n)&&(e=n),a(e)},error:function(){G(v,this,arguments),a()},complete:function(){G(h,this,arguments),y()}}))}else a()}}function c(t){t=l(t),t&&(R++,i(t,F))}function l(n){return t.isFunction(n)||t.isArray(n)?n={events:n}:"string"==typeof n&&(n={url:n}),"object"==typeof n?(w(n),z.push(n),n):e}function u(e){z=t.grep(z,function(t){return!D(t,e)}),W=t.grep(W,function(t){return!D(t.source,e)}),k(W)}function f(t){var e,n,r=W.length,a=T().defaultEventEnd,o=t.start-t._start,i=t.end?t.end-(t._end||a(t)):0;for(e=0;r>e;e++)n=W[e],n._id==t._id&&n!=t&&(n.start=new Date(+n.start+o),n.end=t.end?n.end?new Date(+n.end+i):new Date(+a(n)+i):null,n.title=t.title,n.url=t.url,n.allDay=t.allDay,n.className=t.className,n.editable=t.editable,n.color=t.color,n.backgroudColor=t.backgroudColor,n.borderColor=t.borderColor,n.textColor=t.textColor,b(n));b(t),k(W)}function v(t,e){b(t),t.source||(e&&(H.events.push(t),t.source=H),W.push(t)),k(W)}function h(e){if(e){if(!t.isFunction(e)){var n=e+"";e=function(t){return t._id==n}}W=t.grep(W,e,!0);for(var r=0;z.length>r;r++)t.isArray(z[r].events)&&(z[r].events=t.grep(z[r].events,e,!0))}else{W=[];for(var r=0;z.length>r;r++)t.isArray(z[r].events)&&(z[r].events=[])}k(W)}function g(e){return t.isFunction(e)?t.grep(W,e):e?(e+="",t.grep(W,function(t){return t._id==e})):W}function p(){N++||x("loading",null,!0)}function y(){--N||x("loading",null,!1)}function b(t){var r=t.source||{},a=K(r.ignoreTimezone,n.ignoreTimezone);t._id=t._id||(t.id===e?"_fc"+Ce++:t.id+""),t.date&&(t.start||(t.start=t.date),delete t.date),t._start=d(t.start=m(t.start,a)),t.end=m(t.end,a),t.end&&t.end<=t.start&&(t.end=null),t._end=t.end?d(t.end):null,t.allDay===e&&(t.allDay=K(r.allDayDefault,n.allDayDefault)),t.className?"string"==typeof t.className&&(t.className=t.className.split(/\s+/)):t.className=[]}function w(t){t.className?"string"==typeof t.className&&(t.className=t.className.split(/\s+/)):t.className=[];for(var e=we.sourceNormalizers,n=0;e.length>n;n++)e[n](t)}function D(t,e){return t&&e&&M(t)==M(e)}function M(t){return("object"==typeof t?t.events||t.url:"")||t}var C=this;C.isFetchNeeded=a,C.fetchEvents=o,C.addEventSource=c,C.removeEventSource=u,C.updateEvent=f,C.renderEvent=v,C.removeEvents=h,C.clientEvents=g,C.normalizeEvent=b;for(var S,E,x=C.trigger,T=C.getView,k=C.reportEvents,H={events:[]},z=[H],F=0,R=0,N=0,W=[],A=0;r.length>A;A++)l(r[A])}function i(t,e,n){return t.setFullYear(t.getFullYear()+e),n||f(t),t}function s(t,e,n){if(+t){var r=t.getMonth()+e,a=d(t);for(a.setDate(1),a.setMonth(r),t.setMonth(r),n||f(t);t.getMonth()!=a.getMonth();)t.setDate(t.getDate()+(a>t?1:-1))}return t}function c(t,e,n){if(+t){var r=t.getDate()+e,a=d(t);a.setHours(9),a.setDate(r),t.setDate(r),n||f(t),l(t,a)}return t}function l(t,e){if(+t)for(;t.getDate()!=e.getDate();)t.setTime(+t+(e>t?1:-1)*xe)}function u(t,e){return t.setMinutes(t.getMinutes()+e),t}function f(t){return t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t}function d(t,e){return e?f(new Date(+t)):new Date(+t)}function v(){var t,e=0;do t=new Date(1970,e++,1);while(t.getHours());return t}function h(t,e,n){for(e=e||1;!t.getDay()||n&&1==t.getDay()||!n&&6==t.getDay();)c(t,e);return t}function g(t,e){return Math.round((d(t,!0)-d(e,!0))/Ee)}function p(t,n,r,a){n!==e&&n!=t.getFullYear()&&(t.setDate(1),t.setMonth(0),t.setFullYear(n)),r!==e&&r!=t.getMonth()&&(t.setDate(1),t.setMonth(r)),a!==e&&t.setDate(a)}function m(t,n){return"object"==typeof t?t:"number"==typeof t?new Date(1e3*t):"string"==typeof t?t.match(/^\d+(\.\d+)?$/)?new Date(1e3*parseFloat(t)):(n===e&&(n=!0),y(t,n)||(t?new Date(t):null)):null}function y(t,e){var n=t.match(/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})([T ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2})(:?([0-9]{2}))?))?)?)?)?$/);if(!n)return null;var r=new Date(n[1],0,1);if(e||!n[13]){var a=new Date(n[1],0,1,9,0);n[3]&&(r.setMonth(n[3]-1),a.setMonth(n[3]-1)),n[5]&&(r.setDate(n[5]),a.setDate(n[5])),l(r,a),n[7]&&r.setHours(n[7]),n[8]&&r.setMinutes(n[8]),n[10]&&r.setSeconds(n[10]),n[12]&&r.setMilliseconds(1e3*Number("0."+n[12])),l(r,a)}else if(r.setUTCFullYear(n[1],n[3]?n[3]-1:0,n[5]||1),r.setUTCHours(n[7]||0,n[8]||0,n[10]||0,n[12]?1e3*Number("0."+n[12]):0),n[14]){var o=60*Number(n[16])+(n[18]?Number(n[18]):0);o*="-"==n[15]?1:-1,r=new Date(+r+1e3*60*o)}return r}function b(t){if("number"==typeof t)return 60*t;if("object"==typeof t)return 60*t.getHours()+t.getMinutes();var e=t.match(/(\d+)(?::(\d+))?\s*(\w+)?/);if(e){var n=parseInt(e[1],10);return e[3]&&(n%=12,"p"==e[3].toLowerCase().charAt(0)&&(n+=12)),60*n+(e[2]?parseInt(e[2],10):0)}}function w(t,e,n){return D(t,null,e,n)}function D(t,e,n,r){r=r||ye;var a,o,i,s,c=t,l=e,u=n.length,f="";for(a=0;u>a;a++)if(o=n.charAt(a),"'"==o){for(i=a+1;u>i;
41403i++)if("'"==n.charAt(i)){c&&(f+=i==a+1?"'":n.substring(a+1,i),a=i);break}}else if("("==o){for(i=a+1;u>i;i++)if(")"==n.charAt(i)){var d=w(c,n.substring(a+1,i),r);parseInt(d.replace(/\D/,""),10)&&(f+=d),a=i;break}}else if("["==o){for(i=a+1;u>i;i++)if("]"==n.charAt(i)){var v=n.substring(a+1,i),d=w(c,v,r);d!=w(l,v,r)&&(f+=d),a=i;break}}else if("{"==o)c=e,l=t;else if("}"==o)c=t,l=e;else{for(i=u;i>a;i--)if(s=ke[n.substring(a,i)]){c&&(f+=s(c,r)),a=i-1;break}i==a&&c&&(f+=o)}return f}function M(t){var e,n=new Date(t.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),e=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((e-n)/864e5)/7)+1}function C(t){return t.end?S(t.end,t.allDay):c(d(t.start),1)}function S(t,e){return t=d(t),e||t.getHours()||t.getMinutes()?c(t,1):f(t)}function E(t,e){return 100*(e.msLength-t.msLength)+(t.event.start-e.event.start)}function x(t,e){return t.end>e.start&&t.start<e.end}function T(t,e,n,r){var a,o,i,s,c,l,u,f,v=[],h=t.length;for(a=0;h>a;a++)o=t[a],i=o.start,s=e[a],s>n&&r>i&&(n>i?(c=d(n),u=!1):(c=i,u=!0),s>r?(l=d(r),f=!1):(l=s,f=!0),v.push({event:o,start:c,end:l,isStart:u,isEnd:f,msLength:l-c}));return v.sort(E)}function k(t){var e,n,r,a,o,i=[],s=t.length;for(e=0;s>e;e++){for(n=t[e],r=0;;){if(a=!1,i[r])for(o=0;i[r].length>o;o++)if(x(i[r][o],n)){a=!0;break}if(!a)break;r++}i[r]?i[r].push(n):i[r]=[n]}return i}function H(n,r,a){n.unbind("mouseover").mouseover(function(n){for(var o,i,s,c=n.target;c!=this;)o=c,c=c.parentNode;(i=o._fci)!==e&&(o._fci=e,s=r[i],a(s.event,s.element,s),t(n.target).trigger(n)),n.stopPropagation()})}function z(e,n,r){for(var a,o=0;e.length>
41403o;o++)a=t(e[o]),a.width(Math.max(0,n-R(a,r)))}function F(e,n,r){for(var a,o=0;e.length>o;o++)a=t(e[o]),a.height(Math.max(0,n-L(a,r)))}function R(t,e){return N(t)+A(t)+(e?W(t):0)}function N(e){return(parseFloat(t.css(e[0],"paddingLeft",!0))||0)+(parseFloat(t.css(e[0],"paddingRight",!0))||0)}function W(e){return(parseFloat(t.css(e[0],"marginLeft",!0))||0)+(parseFloat(t.css(e[0],"marginRight",!0))||0)}function A(e){return(parseFloat(t.css(e[0],"borderLeftWidth",!0))||0)+(parseFloat(t.css(e[0],"borderRightWidth",!0))||0)}function L(t,e){return _(t)+B(t)+(e?O(t):0)}function _(e){return(parseFloat(t.css(e[0],"paddingTop",!0))||0)+(parseFloat(t.css(e[0],"paddingBottom",!0))||0)}function O(e){return(parseFloat(t.css(e[0],"marginTop",!0))||0)+(parseFloat(t.css(e[0],"marginBottom",!0))||0)}function B(e){return(parseFloat(t.css(e[0],"borderTopWidth",!0))||0)+(parseFloat(t.css(e[0],"borderBottomWidth",!0))||0)}function q(t,e){e="number"==typeof e?e+"px":e,t.each(function(t,n){n.style.cssText+=";min-height:"+e+";_height:"+e})}function I(){}function Y(t,e){return t-e}function j(t){return Math.max.apply(Math,t)}function P(t){return(10>t?"0":"")+t}function J(t,n){if(t[n]!==e)return t[n];for(var r,a=n.split(/(?=[A-Z])/),o=a.length-1;o>=0;o--)if(r=t[a[o].toLowerCase()],r!==e)return r;return t[""]}function V(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"<br />")}function X(t){return t.id+"/"+t.className+"/"+t.style.cssText.replace(/(^|;)\s*(top|left|width|height)\s*:[^;]*/gi,"")}function U(t){t.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return!1})}function Z(t){t.children().removeClass("fc-first fc-last").filter(":first-child").addClass("fc-first").end().filter(":last-child").addClass("fc-last")}function $(t,e){t.each(function(t,n){n.className=n.className.replace(/^fc-\w*/,"fc-"+Se[e.getDay()])})}function Q(t,e){var n=t.source||{},r=t.color,a=n.color,o=e("eventColor"),i=t.backgroundColor||r||n.backgroundColor||a||e("eventBackgroundColor")||o,s=t.borderColor||r||n.borderColor||a||e("eventBorderColor")||o,c=t.textColor||n.textColor||e("eventTextColor"),l=[];return i&&l.push("background-color:"+i),s&&l.push("border-color:"+s),c&&l.push("color:"+c),l.join(";")}function G(e,n,r){if(t.isFunction(e)&&(e=[e]),e){var a,o;for(a=0;e.length>a;a++)o=e[a].apply(n,r)||o;return o}}function K(){for(var t=0;arguments.length>t;t++)if(arguments[t]!==e)return arguments[t]}function te(t,e){function n(t,e){e&&(s(t,e),t.setDate(1));var n=d(t,!0);n.setDate(1);var l=s(d(n),1),u=d(n),f=d(l),v=a("firstDay"),g=a("weekends")?0:1;g&&(h(u),h(f,-1,!0)),c(u,-((u.getDay()-Math.max(v,g)+7)%7)),c(f,(7-f.getDay()+Math.max(v,g))%7);var p=Math.round((f-u)/(7*Ee));"fixed"==a("weekMode")&&(c(f,7*(6-p)),p=6),r.title=i(n,a("titleFormat")),r.start=n,r.end=l,r.visStart=u,r.visEnd=f,o(p,g?5:7,!0)}var r=this;r.render=n,re.call(r,t,e,"month");var a=r.opt,o=r.renderBasic,i=e.formatDate}function ee(t,e){function n(t,e){e&&c(t,7*e);var n=c(d(t),-((t.getDay()-a("firstDay")+7)%7)),s=c(d(n),7),l=d(n),u=d(s),f=a("weekends");f||(h(l),h(u,-1,!0)),r.title=i(l,c(d(u),-1),a("titleFormat")),r.start=n,r.end=s,r.visStart=l,r.visEnd=u,o(1,f?7:5,!1)}var r=this;r.render=n,re.call(r,t,e,"basicWeek");var a=r.opt,o=r.renderBasic,i=e.formatDates}function ne(t,e){function n(t,e){e&&(c(t,e),a("weekends")||h(t,0>e?-1:1)),r.title=i(t,a("titleFormat")),r.start=r.visStart=d(t,!0),r.end=r.visEnd=c(d(r.start),1),o(1,1,!1)}var r=this;r.render=n,re.call(r,t,e,"basicDay");var a=r.opt,o=r.renderBasic,i=e.formatDate}function re(e,n,r){function a(t,e,n){ne=t,re=e,o();var r=!P;r?i():Te(),s(n)}function o(){ce=Ee("isRTL"),ce?(le=-1,fe=re-1):(le=1,fe=0),pe=Ee("firstDay"),ye=Ee("weekends")?0:1,be=Ee("theme")?"ui":"fc",we=Ee("columnFormat"),De=Ee("weekNumbers"),Me=Ee("weekNumberTitle"),Ce="iso"!=Ee("weekNumberCalculation")?"w":"W"}function i(){Q=t("<div style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(e)}function s(n){var r,a,o,i,s="",c=be+"-widget-header",l=be+"-widget-content",u=B.start.getMonth(),d=f(new Date);for(s+="<table class='fc-border-separate' style='width:100%' cellspacing='0'><thead><tr>",De&&(s+="<th class='fc-week-number "+c+"'/>"),r=0;re>r;r++)s+="<th class='fc-day-header fc-"+Se[r]+" "+c+"'/>";for(s+="</tr></thead><tbody>",r=0;ne>r;r++){for(s+="<tr class='fc-week'>",De&&(s+="<td class='fc-week-number "+l+"'>"+"<div/>"+"</td>"),a=0;re>a;a++)o=F(r,a),i=["fc-day","fc-"+Se[o.getDay()],l],o.getMonth()!=u&&i.push("fc-other-month"),+o==+d&&(i.push("fc-today"),i.push(be+"-state-highlight")),s+="<td class='"+i.join(" ")+"'"+" data-date='"+Fe(o,"yyyy-MM-dd")+"'"+">"+"<div>",n&&(s+="<div class='fc-day-number'>"+o.getDate()+"</div>"),s+="<div class='fc-day-content'><div style='position:relative'>
41403 </div></div></div></td>";s+="</tr>"}s+="</tbody></table>",_(),I&&I.remove(),I=t(s).appendTo(e),Y=I.find("thead"),j=Y.find(".fc-day-header"),P=I.find("tbody"),J=P.find("tr"),V=P.find(".fc-day"),X=J.find("td:first-child"),$=J.eq(0).find(".fc-day-content > div"),Z(Y.add(Y.find("tr"))),Z(J),J.eq(0).addClass("fc-first"),J.filter(":last").addClass("fc-last"),De&&Y.find(".fc-week-number").text(Me),j.each(function(e,n){var r=R(e);t(n).text(Fe(r,we))}),De&&P.find(".fc-week-number > div").each(function(e,n){var r=F(e,0);t(n).text(Fe(r,Ce))}),V.each(function(e,n){var r=R(e);xe("dayRender",B,r,t(n))}),v(V)}function l(e){K=e;var n,r,a,o=K-Y.height();"variable"==Ee("weekMode")?n=r=Math.floor(o/(1==ne?2:6)):(n=Math.floor(o/ne),r=o-n*(ne-1)),X.each(function(e,o){ne>e&&(a=t(o),q(a.find("> div"),(e==ne-1?r:n)-L(a)))}),O()}function u(t){G=t,se.clear(),ee=0,De&&(ee=Y.find("th.fc-week-number").outerWidth()),te=Math.floor((G-ee)/re),z(j.slice(0,-1),te)}function v(t){t.click(h).mousedown(ze)}function h(e){if(!Ee("selectable")){var n=y(t(this).data("date"));xe("dayClick",this,n,!0,e)}}function p(t,e,n){n&&oe.build();for(var r=d(B.visStart),a=c(d(r),re),o=0;ne>o;o++){var i=new Date(Math.max(r,t)),s=new Date(Math.min(a,e));if(s>i){var l,u;ce?(l=g(s,r)*le+fe+1,u=g(i,r)*le+fe+1):(l=g(i,r),u=g(s,r)),v(m(o,l,o,u-1))}c(r,7),c(a,7)}}function m(t,n,r,a){var o=oe.rect(t,n,r,a,e);return ke(o,e)}function b(t){return d(t)}function w(t,e){p(t,c(d(e),1),!0)}function D(){He()}function M(t,e,n){var r=k(t),a=V[r.row*re+r.col];xe("dayClick",a,t,e,n)}function C(t,e){ie.start(function(t){He(),t&&m(t.row,t.col,t.row,t.col)},e)}function S(t,e,n){var r=ie.stop();if(He(),r){var a=H(r);xe("drop",t,a,!0,e,n)}}function E(t){return d(t.start)}function x(t){return se.left(t)}function T(t){return se.right(t)}function k(t){return{row:Math.floor(g(t,B.visStart)/7),col:N(t.getDay())}}function H(t){return F(t.row,t.col)}function F(t,e){return c(d(B.visStart),7*t+e*le+fe)}function R(t){return F(Math.floor(t/re),t%re)}function N(t){return(t-Math.max(pe,ye)+re)%re*le+fe}function W(t){return J.eq(t)}function A(){var t=0;return De&&(t+=ee),{left:t,right:G}}function _(){q(e,e.height())}function O(){q(e,1)}var B=this;B.renderBasic=a,B.setHeight=l,B.setWidth=u,B.renderDayOverlay=p,B.defaultSelectionEnd=b,B.renderSelection=w,B.clearSelection=D,B.reportDayClick=M,B.dragStart=C,B.dragStop=S,B.defaultEventEnd=E,B.getHoverListener=function(){return ie},B.colContentLeft=x,B.colContentRight=T,B.dayOfWeekCol=N,B.dateCell=k,B.cellDate=H,B.cellIsAllDay=function(){return!0},B.allDayRow=W,B.allDayBounds=A,B.getRowCnt=function(){return ne},B.getColCnt=function(){return re},B.getColWidth=function(){return te},B.getDaySegmentContainer=function(){return Q},ue.call(B,e,n,r),ve.call(B),de.call(B),ae.call(B);var I,Y,j,P,J,V,X,$,Q,G,K,te,ee,ne,re,oe,ie,se,ce,le,fe,pe,ye,be,we,De,Me,Ce,Ee=B.opt,xe=B.trigger,Te=B.clearEvents,ke=B.renderOverlay,He=B.clearOverlays,ze=B.daySelectionMousedown,Fe=n.formatDate;U(e.addClass("fc-grid")),oe=new he(function(e,n){var r,a,o;j.each(function(e,i){r=t(i),a=r.offset().left,e&&(o[1]=a),o=[a],n[e]=o}),o[1]=a+r.outerWidth(),J.each(function(n,i){ne>n&&(r=t(i),a=r.offset().top,n&&(o[1]=a),o=[a],e[n]=o)}),o[1]=a+r.outerHeight()}),ie=new ge(oe),se=new me(function(t){return $.eq(t)})}function ae(){function e(t,e){v(t),x(r(t),e),l("eventAfterAllRender")}function n(){h(),b().empty()}function r(e){var n,r,a,o,s,l,u=S(),f=E(),v=d(i.visStart),h=c(d(v),f),g=t.map(e,C),p=[];for(n=0;u>n;n++){for(r=k(T(e,g,v,h)),a=0;r.length>a;a++)for(o=r[a],s=0;o.length>s;s++)l=o[s],l.row=n,l.level=a,p.push(l);c(v,7),c(h,7)}return p}function a(t,e,n){u(t)&&o(t,e),n.isEnd&&f(t)&&H(t,e,n),g(t,e)}function o(t,e){var n,r=w();e.draggable({zIndex:9,delay:50,opacity:s("dragOpacity"),revertDuration:s("dragRevertDuration"),start:function(a,o){l("eventDragStart",e,t,a,o),m(t,e),r.start(function(r,a,o,i){e.draggable("option","revert",!r||!o&&!i),M(),r?(n=7*o+i*(s("isRTL")?-1:1),D(c(d(t.start),n),c(C(t),n))):n=0},a,"drag")},stop:function(a,o){r.stop(),M(),l("eventDragStop",e,t,a,o),n?y(this,t,n,0,t.allDay,a,o):(e.css("filter",""),p(t,e))}})}var i=this;i.renderEvents=e,i.compileDaySegs=r,i.clearEvents=n,i.bindDaySeg=a,fe.call(i);var s=i.opt,l=i.trigger,u=i.isEventDraggable,f=i.isEventResizable,v=i.reportEvents,h=i.reportEventClear,g=i.eventElementHandlers,p=i.showEvents,m=i.hideEvents,y=i.eventDrop,b=i.getDaySegmentContainer,w=i.getHoverListener,D=i.renderDayOverlay,M=i.clearOverlays,S=i.getRowCnt,E=i.getColCnt,x=i.renderDaySegs,H=i.resizableDayEvent}function oe(t,e){function n(t,e){e&&c(t,7*e);var n=c(d(t),-((t.getDay()-a("firstDay")+7)%7)),s=c(d(n),7),l=d(n),u=d(s),f=a("weekends");
41403f||(h(l),h(u,-1,!0)),r.title=i(l,c(d(u),-1),a("titleFormat")),r.start=n,r.end=s,r.visStart=l,r.visEnd=u,o(f?7:5)}var r=this;r.render=n,se.call(r,t,e,"agendaWeek");var a=r.opt,o=r.renderAgenda,i=e.formatDates}function ie(t,e){function n(t,e){e&&(c(t,e),a("weekends")||h(t,0>e?-1:1));var n=d(t,!0),s=c(d(n),1);r.title=i(t,a("titleFormat")),r.start=r.visStart=n,r.end=r.visEnd=s,o(1)}var r=this;r.render=n,se.call(r,t,e,"agendaDay");var a=r.opt,o=r.renderAgenda,i=e.formatDate}function se(n,r,a){function o(t){Le=t,i(),te?nn():s(),l()}function i(){Ye=tn("theme")?"ui":"fc",Pe=tn("weekends")?0:1,je=tn("firstDay"),(Je=tn("isRTL"))?(Ve=-1,Xe=Le-1):(Ve=1,Xe=0),Ue=b(tn("minTime")),Ze=b(tn("maxTime")),$e=tn("columnFormat"),Qe=tn("weekNumbers"),Ge=tn("weekNumberTitle"),Ke="iso"!=tn("weekNumberCalculation")?"w":"W",Ne=tn("snapMinutes")||tn("slotMinutes")}function s(){var e,r,a,o,i,s=Ye+"-widget-header",c=Ye+"-widget-content",l=0==tn("slotMinutes")%15;for(e="<table style='width:100%' class='fc-agenda-days fc-border-separate' cellspacing='0'><thead><tr>",e+=Qe?"<th class='fc-agenda-axis fc-week-number "+s+"'/>":"<th class='fc-agenda-axis "+s+"'> </th>",r=0;Le>r;r++)e+="<th class='fc- fc-col"+r+" "+s+"'/>";for(e+="<th class='fc-agenda-gutter "+s+"'> </th>"+"</tr>"+"</thead>"+"<tbody>"+"<tr>"+"<th class='fc-agenda-axis "+s+"'> </th>",r=0;Le>r;r++)e+="<td class='fc- fc-col"+r+" "+c+"'>"+"<div>"+"<div class='fc-day-content'>"+"<div style='position:relative'> </div>"+"</div>"+"</div>"+"</td>";for(e+="<td class='fc-agenda-gutter "+c+"'> </td>"+"</tr>"+"</tbody>"+"</table>",te=t(e).appendTo(n),ee=te.find("thead"),ne=ee.find("th").slice(1,-1),re=te.find("tbody"),ae=re.find("td").slice(0,-1),oe=ae.find("div.fc-day-content div"),ie=ae.eq(0),se=ie.find("> div"),Z(ee.add(ee.find("tr"))),Z(re.add(re.find("tr"))),Se=ee.find("th:first"),Ee=te.find(".fc-agenda-gutter"),le=t("<div style='position:absolute;z-index:2;left:0;width:100%'/>").appendTo(n),tn("allDaySlot")?(fe=t("<div style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(le),e="<table style='width:100%' class='fc-agenda-allday' cellspacing='0'><tr><th class='"+s+" fc-agenda-axis'>"+tn("allDayText")+"</th>"+"<td>"+"<div class='fc-day-content'><div style='position:relative'/></div>"+"</td>"+"<th class='"+s+" fc-agenda-gutter'> </th>"+"</tr>"+"</table>",pe=t(e).appendTo(le),ye=pe.find("tr"),D(ye.find("td")),Se=Se.add(pe.find("th:first")),Ee=Ee.add(pe.find("th.fc-agenda-gutter")),le.append("<div class='fc-agenda-divider "+s+"'>"+"<div class='fc-agenda-divider-inner'/>"+"</div>")):fe=t([]),be=t("<div style='position:absolute;width:100%;overflow-x:hidden;overflow-y:auto'/>").appendTo(le),we=t("<div style='position:relative;width:100%;overflow:hidden'/>").appendTo(be),De=t("<div style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(we),e="<table class='fc-agenda-slots' style='width:100%' cellspacing='0'><tbody>",a=v(),o=u(d(a),Ze),u(a,Ue),_e=0,r=0;o>a;r++)i=a.getMinutes(),e+="<tr class='fc-slot"+r+" "+(i?"fc-minor":"")+"'>"+"<th class='fc-agenda-axis "+s+"'>"+(l&&i?" ":un(a,tn("axisFormat")))+"</th>"+"<td class='"+c+"'>"+"<div style='position:relative'> </div>"+"</td>"+"</tr>",u(a,tn("slotMinutes")),_e++;e+="</tbody></table>",Me=t(e).appendTo(we),Ce=Me.find("div:first"),M(Me.find("td")),Se=Se.add(Me.find("th:first"))}function l(){var t,e,n,r,a=f(new Date);if(Qe){var o=un(N(0),Ke);Je?o+=Ge:o=Ge+o,ee.find(".fc-week-number").text(o)}for(t=0;Le>t;t++)r=N(t),e=ne.eq(t),e.html(un(r,$e)),n=ae.eq(t),+r==+a?n.addClass(Ye+"-state-highlight fc-today"):n.removeClass(Ye+"-state-highlight fc-today"),$(e.add(n),r)}function h(t,n){t===e&&(t=ke),ke=t,fn={};var r=re.position().top,a=be.position().top,o=Math.min(t-r,Me.height()+a+1);se.height(o-L(ie)),le.css("top",r),be.height(o-a-1),Re=Ce.height()+1,We=tn("slotMinutes")/Ne,Ae=Re/We,n&&m()}function p(e){Te=e,qe.clear(),He=0,z(Se.width("").each(function(e,n){He=Math.max(He,t(n).outerWidth())}),He);var n=be[0].clientWidth;Fe=be.width()-n,Fe?(z(Ee,Fe),Ee.show().prev().removeClass("fc-last")):Ee.hide().prev().addClass("fc-last"),ze=Math.floor((n-He)/Le),z(ne.slice(0,-1),ze)}function m(){function t(){be.scrollTop(r)}var e=v(),n=d(e);n.setHours(tn("firstHour"));var r=_(e,n)+1;t(),setTimeout(t,0)}function y(){Ie=be.scrollTop()}function w(){be.scrollTop(Ie)}function D(t){t.click(C).mousedown(cn)}function M(t){t.click(C).mousedown(V)}function C(t){if(!tn("selectable")){var e=Math.min(Le-1,Math.floor((t.pageX-te.offset().left-He)/ze)),n=N(e),r=this.parentNode.className.match(/fc-slot(\d+)/);if(r){var a=parseInt(r[1])*tn("slotMinutes"),o=Math.floor(a/60);n.setHours(o),n.setMinutes(a%60+Ue),en("dayClick",ae[e],n,!1,t)}else en("dayClick",ae[e],n,!0,t)}}function S(t,e,n){n&&Oe.build();var r,a,o=d(K.visStart);Je?(r=g(e,o)*Ve+Xe+1,a=g(t,o)*Ve+Xe+1):(r=g(t,o),a=g(e,o)),r=Math.max(0,r),a=Math.min(Le,a),a>r&&D(E(0,r,0,a-1))}function E(t,e,n,r){var a=Oe.rect(t,e,n,r,le);return rn(a,le)}function x(t,e){for(var n=d(K.visStart),r=c(d(n),1),a=0;Le>a;a++){var o=new Date(Math.max(n,t)),i=new Date(Math.min(r,e));if(i>o){var s=a*Ve+Xe,l=Oe.rect(0,s,0,s,we),u=_(n,o),f=_(n,i);l.top=u,l.height=f-u,M(rn(l,we))}c(n,1),c(r,1)}}function T(t){return qe.left(t)}function k(t){return qe.right(t)}
41403function H(t){return{row:Math.floor(g(t,K.visStart)/7),col:A(t.getDay())}}function R(t){var e=N(t.col),n=t.row;return tn("allDaySlot")&&n--,n>=0&&u(e,Ue+n*Ne),e}function N(t){return c(d(K.visStart),t*Ve+Xe)}function W(t){return tn("allDaySlot")&&!t.row}function A(t){return(t-Math.max(je,Pe)+Le)%Le*Ve+Xe}function _(t,n){if(t=d(t,!0),u(d(t),Ue)>n)return 0;if(n>=u(d(t),Ze))return Me.height();var r=tn("slotMinutes"),a=60*n.getHours()+n.getMinutes()-Ue,o=Math.floor(a/r),i=fn[o];return i===e&&(i=fn[o]=Me.find("tr:eq("+o+") td div")[0].offsetTop),Math.max(0,Math.round(i-1+Re*(a%r/r)))}function O(){return{left:He,right:Te-Fe}}function B(){return ye}function q(t){var e=d(t.start);return t.allDay?e:u(e,tn("defaultEventMinutes"))}function I(t,e){return e?d(t):u(d(t),tn("slotMinutes"))}function j(t,e,n){n?tn("allDaySlot")&&S(t,c(d(e),1),!0):P(t,e)}function P(e,n){var r=tn("selectHelper");if(Oe.build(),r){var a=g(e,K.visStart)*Ve+Xe;if(a>=0&&Le>a){var o=Oe.rect(0,a,0,a,we),i=_(e,e),s=_(e,n);if(s>i){if(o.top=i,o.height=s-i,o.left+=2,o.width-=5,t.isFunction(r)){var c=r(e,n);c&&(o.position="absolute",o.zIndex=8,xe=t(c).css(o).appendTo(we))}else o.isStart=!0,o.isEnd=!0,xe=t(ln({title:"",start:e,end:n,className:["fc-select-helper"],editable:!1},o)),xe.css("opacity",tn("dragOpacity"));xe&&(M(xe),we.append(xe),z(xe,o.width,!0),F(xe,o.height,!0))}}}else x(e,n)}function J(){an(),xe&&(xe.remove(),xe=null)}function V(e){if(1==e.which&&tn("selectable")){sn(e);var n;Be.start(function(t,e){if(J(),t&&t.col==e.col&&!W(t)){var r=R(e),a=R(t);n=[r,u(d(r),Ne),a,u(d(a),Ne)].sort(Y),P(n[0],n[3])}else n=null},e),t(document).one("mouseup",function(t){Be.stop(),n&&(+n[0]==+n[1]&&X(n[0],!1,t),on(n[0],n[3],!1,t))})}}function X(t,e,n){en("dayClick",ae[A(t.getDay())],t,e,n)}function Q(t,e){Be.start(function(t){if(an(),t)if(W(t))E(t.row,t.col,t.row,t.col);else{var e=R(t),n=u(d(e),tn("defaultEventMinutes"));x(e,n)}},e)}function G(t,e,n){var r=Be.stop();an(),r&&en("drop",t,R(r),W(r),e,n)}var K=this;K.renderAgenda=o,K.setWidth=p,K.setHeight=h,K.beforeHide=y,K.afterShow=w,K.defaultEventEnd=q,K.timePosition=_,K.dayOfWeekCol=A,K.dateCell=H,K.cellDate=R,K.cellIsAllDay=W,K.allDayRow=B,K.allDayBounds=O,K.getHoverListener=function(){return Be},K.colContentLeft=T,K.colContentRight=k,K.getDaySegmentContainer=function(){return fe},K.getSlotSegmentContainer=function(){return De},K.getMinMinute=function(){return Ue},K.getMaxMinute=function(){return Ze},K.getBodyContent=function(){return we},K.getRowCnt=function(){return 1},K.getColCnt=function(){return Le},K.getColWidth=function(){return ze},K.getSnapHeight=function(){return Ae},K.getSnapMinutes=function(){return Ne},K.defaultSelectionEnd=I,K.renderDayOverlay=S,K.renderSelection=j,K.clearSelection=J,K.reportDayClick=X,K.dragStart=Q,K.dragStop=G,ue.call(K,n,r,a),ve.call(K),de.call(K),ce.call(K);var te,ee,ne,re,ae,oe,ie,se,le,fe,pe,ye,be,we,De,Me,Ce,Se,Ee,xe,Te,ke,He,ze,Fe,Re,
41403Ne,We,Ae,Le,_e,Oe,Be,qe,Ie,Ye,je,Pe,Je,Ve,Xe,Ue,Ze,$e,Qe,Ge,Ke,tn=K.opt,en=K.trigger,nn=K.clearEvents,rn=K.renderOverlay,an=K.clearOverlays,on=K.reportSelection,sn=K.unselect,cn=K.daySelectionMousedown,ln=K.slotSegHtml,un=r.formatDate,fn={};U(n.addClass("fc-agenda")),Oe=new he(function(e,n){function r(t){return Math.max(c,Math.min(l,t))}var a,o,i;ne.each(function(e,r){a=t(r),o=a.offset().left,e&&(i[1]=o),i=[o],n[e]=i}),i[1]=o+a.outerWidth(),tn("allDaySlot")&&(a=ye,o=a.offset().top,e[0]=[o,o+a.outerHeight()]);for(var s=we.offset().top,c=be.offset().top,l=c+be.outerHeight(),u=0;_e*We>u;u++)e.push([r(s+Ae*u),r(s+Ae*(u+1))])}),Be=new ge(Oe),qe=new me(function(t){return oe.eq(t)})}function ce(){function n(t,e){S(t);var n,r=t.length,i=[],c=[];for(n=0;r>n;n++)t[n].allDay?i.push(t[n]):c.push(t[n]);y("allDaySlot")&&(Y(a(i),e),z()),s(o(c),e),b("eventAfterAllRender")}function r(){E(),N().empty(),W().empty()}function a(e){var n,r,a,o,i=k(T(e,t.map(e,C),m.visStart,m.visEnd)),s=i.length,c=[];for(n=0;s>n;n++)for(r=i[n],a=0;r.length>a;a++)o=r[a],o.row=0,o.level=n,c.push(o);return c}function o(e){var n,r,a,o,s,l,f=P(),v=O(),h=_(),g=u(d(m.visStart),v),p=t.map(e,i),y=[];for(n=0;f>n;n++){for(r=k(T(e,p,g,u(d(g),h-v))),le(r),a=0;r.length>a;a++)for(o=r[a],s=0;o.length>s;s++)l=o[s],l.col=n,l.level=a,y.push(l);c(g,1,!0)}return y}function i(t){return t.end?d(t.end):u(d(t.start),y("defaultEventMinutes"))}function s(n,r){var a,o,i,s,c,u,f,d,h,g,p,m,w,D,M,C,S,E,x,T,k,z,F=n.length,N="",A={},_={},O=W(),Y=P();for((T=y("isRTL"))?(k=-1,z=Y-1):(k=1,z=0),a=0;F>a;a++)o=n[a],i=o.event,s=B(o.start,o.start),c=B(o.start,o.end),u=o.col,f=o.level,d=o.forward||0,h=q(u*k+z),g=I(u*k+z)-h,g=Math.min(g-6,.95*g),p=f?g/(f+d+1):d?2*(g/(d+1)-6):g,m=h+g/(f+d+1)*f*k+(T?g-p:0),o.top=s,o.left=m,o.outerWidth=p,o.outerHeight=c-s,N+=l(i,o); 41404for(O[0].innerHTML=N,w=O.children(),a=0;F>a;a++)o=n[a],i=o.event,D=t(w[a]),M=b("eventRender",i,i,D),M===!1?D.remove():(M&&M!==!0&&(D.remove(),D=t(M).css({position:"absolute",top:o.top,left:o.left}).appendTo(O)),o.element=D,i._id===r?v(i,D,o):D[0]._fci=a,G(i,D));for(H(O,n,v),a=0;F>a;a++)o=n[a],(D=o.element)&&(S=A[C=o.key=X(D[0])],o.vsides=S===e?A[C]=L(D,!0):S,S=_[C],o.hsides=S===e?_[C]=R(D,!0):S,E=D.find(".fc-event-title"),E.length&&(o.contentTop=E[0].offsetTop));for(a=0;F>a;a++)o=n[a],(D=o.element)&&(D[0].style.width=Math.max(0,o.outerWidth-o.hsides)+"px",x=Math.max(0,o.outerHeight-o.vsides),D[0].style.height=x+"px",i=o.event,o.contentTop!==e&&10>x-o.contentTop&&(D.find("div.fc-event-time").text(ie(i.start,y("timeFormat"))+" - "+i.title),D.find("div.fc-event-title").remove()),b("eventAfterRender",i,i,D))}function l(t,e){var n="<",r=t.url,a=Q(t,y),o=["fc-event","fc-event-vert"];return w(t)&&o.push("fc-event-draggable"),e.isStart&&o.push("fc-event-start"),e.isEnd&&o.push("fc-event-end"),o=o.concat(t.className),t.source&&(o=o.concat(t.source.className||[])),n+=r?"a href='"+V(t.url)+"'":"div",n+=" class='"+o.join(" ")+"'"+" style='position:absolute;z-index:8;top:"+e.top+"px;left:"+e.left+"px;"+a+"'"+">"+"<div class='fc-event-inner'>"+"<div class='fc-event-time'>"+V(se(t.start,t.end,y("timeFormat")))+"</div>"+"<div class='fc-event-title'>"+V(t.title)+"</div>"+"</div>"+"<div class='fc-event-bg'></div>",e.isEnd&&D(t)&&(n+="<div class='ui-resizable-handle ui-resizable-s'>=</div>"),n+="</"+(r?"a":"div")+">"}function f(t,e,n){w(t)&&h(t,e,n.isStart),n.isEnd&&D(t)&&j(t,e,n),x(t,e)}function v(t,e,n){var r=e.find("div.fc-event-time");w(t)&&g(t,e,r),n.isEnd&&D(t)&&p(t,e,r),x(t,e)}function h(t,e,n){function r(){s||(e.width(a).height("").draggable("option","grid",null),s=!0)}var a,o,i,s=!0,l=y("isRTL")?-1:1,u=A(),f=J(),v=U(),h=Z(),g=O();e.draggable({zIndex:9,opacity:y("dragOpacity","month"),revertDuration:y("dragRevertDuration"),start:function(g,p){b("eventDragStart",e,t,g,p),te(t,e),a=e.width(),u.start(function(a,u,g,p){ae(),a?(o=!1,i=p*l,a.row?n?s&&(e.width(f-10),F(e,v*Math.round((t.end?(t.end-t.start)/Te:y("defaultEventMinutes"))/h)),e.draggable("option","grid",[f,1]),s=!1):o=!0:(re(c(d(t.start),i),c(C(t),i)),r()),o=o||s&&!i):(r(),o=!0),e.draggable("option","revert",o)},g,"drag")},stop:function(n,a){if(u.stop(),ae(),b("eventDragStop",e,t,n,a),o)r(),e.css("filter",""),K(t,e);else{var c=0;s||(c=Math.round((e.offset().top-$().offset().top)/v)*h+g-(60*t.start.getHours()+t.start.getMinutes())),ee(this,t,i,c,s,n,a)}}})}function g(t,e,n){function r(e){var r,a=u(d(t.start),e);t.end&&(r=u(d(t.end),e)),n.text(se(a,r,y("timeFormat")))}function a(){f&&(n.css("display",""),e.draggable("option","grid",[p,m]),f=!1)}var o,i,s,l,f=!1,v=y("isRTL")?-1:1,h=A(),g=P(),p=J(),m=U(),w=Z();e.draggable({zIndex:9,scroll:!1,grid:[p,m],axis:1==g?"y":!1,opacity:y("dragOpacity"),revertDuration:y("dragRevertDuration"),start:function(r,u){b("eventDragStart",e,t,r,u),te(t,e),o=e.position(),s=l=0,h.start(function(r,o,s,l){e.draggable("option","revert",!r),ae(),r&&(i=l*v,y("allDaySlot")&&!r.row?(f||(f=!0,n.hide(),e.draggable("option","grid",null)),re(c(d(t.start),i),c(C(t),i))):a())},r,"drag")},drag:function(t,e){s=Math.round((e.position.top-o.top)/m)*w,s!=l&&(f||r(s),l=s)},stop:function(n,c){var l=h.stop();ae(),b("eventDragStop",e,t,n,c),l&&(i||s||f)?ee(this,t,i,f?0:s,f,n,c):(a(),e.css("filter",""),e.css(o),r(0),K(t,e))}})}function p(t,e,n){var r,a,o=U(),i=Z();e.resizable({handles:{s:".ui-resizable-handle"},grid:o,start:function(n,o){r=a=0,te(t,e),e.css("z-index",9),b("eventResizeStart",this,t,n,o)},resize:function(s,c){r=Math.round((Math.max(o,e.height())-c.originalSize.height)/o),r!=a&&(n.text(se(t.start,r||t.end?u(M(t),i*r):null,y("timeFormat"))),a=r)},stop:function(n,a){b("eventResizeStop",this,t,n,a),r?ne(this,t,0,i*r,n,a):(e.css("z-index",8),K(t,e))}})}var m=this;m.renderEvents=n,m.compileDaySegs=a,m.clearEvents=r,m.slotSegHtml=l,m.bindDaySeg=f,fe.call(m);var y=m.opt,b=m.trigger,w=m.isEventDraggable,D=m.isEventResizable,M=m.eventEnd,S=m.reportEvents,E=m.reportEventClear,x=m.eventElementHandlers,z=m.setHeight,N=m.getDaySegmentContainer,W=m.getSlotSegmentContainer,A=m.getHoverListener,_=m.getMaxMinute,O=m.getMinMinute,B=m.timePosition,q=m.colContentLeft,I=m.colContentRight,Y=m.renderDaySegs,j=m.resizableDayEvent,P=m.getColCnt,J=m.getColWidth,U=m.getSnapHeight,Z=m.getSnapMinutes,$=m.getBodyContent,G=m.reportEventElement,K=m.showEvents,te=m.hideEvents,ee=m.eventDrop,ne=m.eventResize,re=m.renderDayOverlay,ae=m.clearOverlays,oe=m.calendar,ie=oe.formatDate,se=oe.formatDates}function le(t){var e,n,r,a,o,i;for(e=t.length-1;e>0;e--)for(a=t[e],n=0;a.length>n;n++)for(o=a[n],r=0;t[e-1].length>r;r++)i=t[e-1][r],x(o,i)&&(i.forward=Math.max(i.forward||0,(o.forward||0)+1))}function ue(t,n,r){function a(t,e){var n=F[t];return"object"==typeof n?J(n,e||r):n}function o(t,e){return n.trigger.apply(n,[t,e||S].concat(Array.prototype.slice.call(arguments,2),[S]))}function i(t){return l(t)&&!a("disableDragging")}function s(t){return l(t)&&!a("disableResizing")}function l(t){return K(t.editable,(t.source||{}).editable,a("editable"))}function f(t){k={};var e,n,r=t.length;for(e=0;r>e;e++)n=t[e],k[n._id]?k[n._id].push(n):k[n._id]=[n]}function v(t){return t.end?d(t.end):E(t)}function h(t,e){H.push(e),z[t._id]?z[t._id].push(e):z[t._id]=[e]}function g(){H=[],z={}}function p(t,n){n.click(function(r){return n.hasClass("ui-draggable-dragging")||n.hasClass("ui-resizable-resizing")?e:o("eventClick",this,t,r)}).hover(function(e){o("eventMouseover",this,t,e)},function(e){o("eventMouseout",this,t,e)})}function m(t,e){b(t,e,"show")}function y(t,e){b(t,e,"hide")}function b(t,e,n){var r,a=z[t._id],o=a.length;for(r=0;o>r;r++)e&&a[r][0]==e[0]||a[r][n]()}function w(t,e,n,r,a,i,s){var c=e.allDay,l=e._id;M(k[l],n,r,a),o("eventDrop",t,e,n,r,a,function(){M(k[l],-n,-r,c),T(l)},i,s),T(l)}function D(t,e,n,r,a,i){var s=e._id;C(k[s],n,r),o("eventResize",t,e,n,r,function(){C(k[s],-n,-r),T(s)},a,i),T(s)}function M(t,n,r,a){r=r||0;for(var o,i=t.length,s=0;i>s;s++)o=t[s],a!==e&&(o.allDay=a),u(c(o.start,n,!0),r),o.end&&(o.end=u(c(o.end,n,!0),r)),x(o,F)}function C(t,e,n){n=n||0;for(var r,a=t.length,o=0;a>o;o++)r=t[o],r.end=u(c(v(r),e,!0),n),x(r,F)}var S=this;S.element=t,S.calendar=n,S.name=r,S.opt=a,S.trigger=o,S.isEventDraggable=i,S.isEventResizable=s,S.reportEvents=f,S.eventEnd=v,S.reportEventElement=h,S.reportEventClear=g,S.eventElementHandlers=p,S.showEvents=m,S.hideEvents=y,S.eventDrop=w,S.eventResize=D;var E=S.defaultEventEnd,x=n.normalizeEvent,T=n.reportEventChange,k={},H=[],z={},F=n.options}function fe(){function n(t,e){var n,r,c,d,p,m,y,b,w=B(),D=T(),M=k(),C=0,S=t.length;for(w[0].innerHTML=a(t),o(t,w.children()),i(t),s(t,w,e),l(t),u(t),f(t),n=v(),r=0;D>r;r++){for(c=0,d=[],p=0;M>p;p++)d[p]=0;for(;S>C&&(m=t[C]).row==r;){for(y=j(d.slice(m.startCol,m.endCol)),m.top=y,y+=m.outerHeight,b=m.startCol;m.endCol>b;b++)d[b]=y;C++}
41404n[r].height(j(d))}g(t,h(n))}function r(e,n,r){var i,s,c,d=t("<div/>"),p=B(),m=e.length;for(d[0].innerHTML=a(e),i=d.children(),p.append(i),o(e,i),l(e),u(e),f(e),g(e,h(v())),i=[],s=0;m>s;s++)c=e[s].element,c&&(e[s].row===n&&c.css("top",r),i.push(c[0]));return t(i)}function a(t){var e,n,r,a,o,i,s,c,l,u,f=y("isRTL"),d=t.length,v=F(),h=v.left,g=v.right,p="";for(e=0;d>e;e++)n=t[e],r=n.event,o=["fc-event","fc-event-hori"],w(r)&&o.push("fc-event-draggable"),n.isStart&&o.push("fc-event-start"),n.isEnd&&o.push("fc-event-end"),f?(i=A(n.end.getDay()-1),s=A(n.start.getDay()),c=n.isEnd?N(i):h,l=n.isStart?W(s):g):(i=A(n.start.getDay()),s=A(n.end.getDay()-1),c=n.isStart?N(i):h,l=n.isEnd?W(s):g),o=o.concat(r.className),r.source&&(o=o.concat(r.source.className||[])),a=r.url,u=Q(r,y),p+=a?"<a href='"+V(a)+"'":"<div",p+=" class='"+o.join(" ")+"'"+" style='position:absolute;z-index:8;left:"+c+"px;"+u+"'"+">"+"<div class='fc-event-inner'>",!r.allDay&&n.isStart&&(p+="<span class='fc-event-time'>"+V(I(r.start,r.end,y("timeFormat")))+"</span>"),p+="<span class='fc-event-title'>"+V(r.title)+"</span>"+"</div>",n.isEnd&&D(r)&&(p+="<div class='ui-resizable-handle ui-resizable-"+(f?"w":"e")+"'>"+" "+"</div>"),p+="</"+(a?"a":"div")+">",n.left=c,n.outerWidth=l-c,n.startCol=i,n.endCol=s+1;return p}function o(e,n){var r,a,o,i,s,c=e.length;for(r=0;c>r;r++)a=e[r],o=a.event,i=t(n[r]),s=b("eventRender",o,o,i),s===!1?i.remove():(s&&s!==!0&&(s=t(s).css({position:"absolute",left:a.left}),i.replaceWith(s),i=s),a.element=i)}function i(t){var e,n,r,a=t.length;for(e=0;a>e;e++)n=t[e],r=n.element,r&&C(n.event,r)}function s(t,e,n){var r,a,o,i,s=t.length;for(r=0;s>r;r++)a=t[r],o=a.element,o&&(i=a.event,i._id===n?q(i,o,a):o[0]._fci=r);H(e,t,q)}function l(t){var n,r,a,o,i,s=t.length,c={};for(n=0;s>n;n++)r=t[n],a=r.element,a&&(o=r.key=X(a[0]),i=c[o],i===e&&(i=c[o]=R(a,!0)),r.hsides=i)}function u(t){var e,n,r,a=t.length;for(e=0;a>e;e++)n=t[e],r=n.element,r&&(r[0].style.width=Math.max(0,n.outerWidth-n.hsides)+"px")}function f(t){var n,r,a,o,i,s=t.length,c={};for(n=0;s>n;n++)r=t[n],a=r.element,a&&(o=r.key,i=c[o],i===e&&(i=c[o]=O(a)),r.outerHeight=a[0].offsetHeight+i)}function v(){var t,e=T(),n=[];for(t=0;e>t;t++)n[t]=z(t).find("div.fc-day-content > div");return n}function h(t){var e,n=t.length,r=[];for(e=0;
41404n>e;e++)r[e]=t[e][0].offsetTop;return r}function g(t,e){var n,r,a,o,i=t.length;for(n=0;i>n;n++)r=t[n],a=r.element,a&&(a[0].style.top=e[r.row]+(r.top||0)+"px",o=r.event,b("eventAfterRender",o,o,a))}function p(e,n,a){var o=y("isRTL"),i=o?"w":"e",s=n.find(".ui-resizable-"+i),l=!1;U(n),n.mousedown(function(t){t.preventDefault()}).click(function(t){l&&(t.preventDefault(),t.stopImmediatePropagation())}),s.mousedown(function(s){function u(n){b("eventResizeStop",this,e,n),t("body").css("cursor",""),h.stop(),P(),f&&x(this,e,f,0,n),setTimeout(function(){l=!1},0)}if(1==s.which){l=!0;var f,v,h=m.getHoverListener(),g=T(),p=k(),y=o?-1:1,w=o?p-1:0,D=n.css("top"),C=t.extend({},e),H=L(e.start);J(),t("body").css("cursor",i+"-resize").one("mouseup",u),b("eventResizeStart",this,e,s),h.start(function(t,n){if(t){var s=Math.max(H.row,t.row),l=t.col;1==g&&(s=0),s==H.row&&(l=o?Math.min(H.col,l):Math.max(H.col,l)),f=7*s+l*y+w-(7*n.row+n.col*y+w);var u=c(M(e),f,!0);if(f){C.end=u;var h=v;v=r(_([C]),a.row,D),v.find("*").css("cursor",i+"-resize"),h&&h.remove(),E(e)}else v&&(S(e),v.remove(),v=null);P(),Y(e.start,c(d(u),1))}},s)}})}var m=this;m.renderDaySegs=n,m.resizableDayEvent=p;var y=m.opt,b=m.trigger,w=m.isEventDraggable,D=m.isEventResizable,M=m.eventEnd,C=m.reportEventElement,S=m.showEvents,E=m.hideEvents,x=m.eventResize,T=m.getRowCnt,k=m.getColCnt;m.getColWidth;var z=m.allDayRow,F=m.allDayBounds,N=m.colContentLeft,W=m.colContentRight,A=m.dayOfWeekCol,L=m.dateCell,_=m.compileDaySegs,B=m.getDaySegmentContainer,q=m.bindDaySeg,I=m.calendar.formatDates,Y=m.renderDayOverlay,P=m.clearOverlays,J=m.clearSelection}function de(){function e(t,e,a){n(),e||(e=c(t,a)),l(t,e,a),r(t,e,a)}function n(t){f&&(f=!1,u(),s("unselect",null,t))}function r(t,e,n,r){f=!0,s("select",null,t,e,n,r)}function a(e){var a=o.cellDate,s=o.cellIsAllDay,c=o.getHoverListener(),f=o.reportDayClick;if(1==e.which&&i("selectable")){n(e);var d;c.start(function(t,e){u(),t&&s(t)?(d=[a(e),a(t)].sort(Y),l(d[0],d[1],!0)):d=null},e),t(document).one("mouseup",function(t){c.stop(),d&&(+d[0]==+d[1]&&f(d[0],!0,t),r(d[0],d[1],!0,t))})}}var o=this;o.select=e,o.unselect=n,o.reportSelection=r,o.daySelectionMousedown=a;var i=o.opt,s=o.trigger,c=o.defaultSelectionEnd,l=o.renderSelection,u=o.clearSelection,f=!1;i("selectable")&&i("unselectAuto")&&t(document).mousedown(function(e){var r=i("unselectCancel");r&&t(e.target).parents(r).length||n(e)})}function ve(){function e(e,n){var r=o.shift();return r||(r=t("<div class='fc-cell-overlay' style='position:absolute;z-index:3'/>")),r[0].parentNode!=n[0]&&r.appendTo(n),a.push(r.css(e).show()),r}function n(){for(var t;t=a.shift();)o.push(t.hide().unbind())}var r=this;r.renderOverlay=e,r.clearOverlays=n;var a=[],o=[]}function he(t){var e,n,r=this;r.build=function(){e=[],n=[],t(e,n)},r.cell=function(t,r){var a,o=e.length,i=n.length,s=-1,c=-1;for(a=0;o>a;a++)if(r>=e[a][0]&&e[a][1]>r){s=a;break}for(a=0;i>a;a++)if(t>=n[a][0]&&n[a][1]>t){c=a;break}return s>=0&&c>=0?{row:s,col:c}:null},r.rect=function(t,r,a,o,i){var s=i.offset();return{top:e[t][0]-s.top,left:n[r][0]-s.left,width:n[o][1]-n[r][0],height:e[a][1]-e[t][0]}}}function ge(e){function n(t){pe(t);var n=e.cell(t.pageX,t.pageY);(!n!=!i||n&&(n.row!=i.row||n.col!=i.col))&&(n?(o||(o=n),a(n,o,n.row-o.row,n.col-o.col)):a(n,o),i=n)}var r,a,o,i,s=this;s.start=function(s,c,l){a=s,o=i=null,e.build(),n(c),r=l||"mousemove",t(document).bind(r,n)},s.stop=function(){return t(document).unbind(r,n),i}}function pe(t){t.pageX===e&&(t.pageX=t.originalEvent.pageX,t.pageY=t.originalEvent.pageY)}function me(t){function n(e){return a[e]=a[e]||t(e)}var r=this,a={},o={},i={};r.left=function(t){return o[t]=o[t]===e?n(t).position().left:o[t]},r.right=function(t){return i[t]=i[t]===e?r.left(t)+n(t).width():i[t]},r.clear=function(){a={},o={},i={}}}var ye={defaultView:"month",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"iso",weekNumberTitle:"W",allDayDefault:!0,ignoreTimezone:!0,lazyFetching:!0,startParam:"start",endParam:"end",titleFormat:{month:"MMMM yyyy",week:"MMM d[ yyyy]{ '—'[ MMM] d yyyy}",day:"dddd, MMM d, yyyy"},columnFormat:{month:"ddd",week:"ddd M/d",day:"dddd M/d"},timeFormat:{"":"h(:mm)t"},isRTL:!1,firstDay:0,monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
41404ay","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],buttonText:{prev:"<span class='fc-text-arrow'>‹</span>",next:"<span class='fc-text-arrow'>›</span>",prevYear:"<span class='fc-text-arrow'>«</span>",nextYear:"<span class='fc-text-arrow'>»</span>",today:"today",month:"month",week:"week",day:"day"},theme:!1,buttonIcons:{prev:"circle-triangle-w",next:"circle-triangle-e"},unselectAuto:!0,dropAccept:"*"},be={header:{left:"next,prev today",center:"",right:"title"},buttonText:{prev:"<span class='fc-text-arrow'>›</span>",next:"<span class='fc-text-arrow'>‹</span>",prevYear:"<span class='fc-text-arrow'>»</span>",nextYear:"<span class='fc-text-arrow'>«</span>"},buttonIcons:{prev:"circle-triangle-e",next:"circle-triangle-w"}},we=t.fullCalendar={version:"1.6.0"},De=we.views={};t.fn.fullCalendar=function(n){if("string"==typeof n){var a,o=Array.prototype.slice.call(arguments,1);return this.each(function(){var r=t.data(this,"fullCalendar");if(r&&t.isFunction(r[n])){var i=r[n].apply(r,o);a===e&&(a=i),"destroy"==n&&t.removeData(this,"fullCalendar")}}),a!==e?a:this}var i=n.eventSources||[];return delete n.eventSources,n.events&&(i.push(n.events),delete n.events),n=t.extend(!0,{},ye,n.isRTL||n.isRTL===e&&ye.isRTL?be:{},n),this.each(function(e,a){var o=t(a),s=new r(o,n,i);o.data("fullCalendar",s),s.render()}),this},we.sourceNormalizers=[],we.sourceFetchers=[];var Me={dataType:"json",cache:!1},Ce=1;we.addDays=c,we.cloneDate=d,we.parseDate=m,we.parseISO8601=y,we.parseTime=b,we.formatDate=w,we.formatDates=D;var Se=["sun","mon","tue","wed","thu","fri","sat"],Ee=864e5,xe=36e5,Te=6e4,ke={s:function(t){return t.getSeconds()},ss:function(t){return P(t.getSeconds())},m:function(t){return t.getMinutes()},mm:function(t){return P(t.getMinutes())},h:function(t){return t.getHours()%12||12},hh:function(t){return P(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return P(t.getHours())},d:function(t){return t.getDate()},dd:function(t){return P(t.getDate())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return P(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},yy:function(t){return(t.getFullYear()+"").substring(2)},yyyy:function(t){return t.getFullYear()},t:function(t){return 12>t.getHours()?"am":"pm"},tt:function(t){return 12>t.getHours()?"am":"pm"},T:function(t){return 12>t.getHours()?"A":"P"},TT:function(t){return 12>t.getHours()?"AM":"PM"},u:function(t){return w(t,"yyyy-MM-dd'T'HH:mm:ss'Z'")},S:function(t){var e=t.getDate();return e>10&&20>e?"th":["st","nd","rd"][e%10-1]||"th"},w:function(t,e){return e.weekNumberCalculation(t)},W:function(t){return M(t)}};we.dateFormatters=ke,we.applyAll=G,De.month=te,De.basicWeek=ee,De.basicDay=ne,n({weekMode:"fixed"}),De.agendaWeek=oe,De.agendaDay=ie,n({allDaySlot:!0,allDayText:"all-day",firstHour:6,slotMinutes:30,defaultEventMinutes:120,axisFormat:"h(:mm)tt",timeFormat:{agenda:"h:mm{ - h:mm}"},dragOpacity:{agenda:.5},minTime:0,maxTime:24})})(jQuery); 41405
vendor: 78,475 bytes, lines 41406-43696
41406/*! jQuery Timepicker Addon - v1.6.3 - 2016-04-20 41407* http://trentrichardson.com/examples/timepicker 41408* Copyright (c) 2016 Trent Richardson; Licensed MIT */ 41409(function (factory) { 41410 if (typeof define === 'function' && define.amd) { 41411 define(['jquery', 'jquery-ui'], factory); 41412 } else { 41413 factory(jQuery); 41414 } 41415}(function ($) { 41416 41417 /* 41418 * Lets not redefine timepicker, Prevent "Uncaught RangeError: Maximum call stack size exceeded" 41419 */ 41420 $.ui.timepicker = $.ui.timepicker || {}; 41421 if ($.ui.timepicker.version) { 41422 return; 41423 } 41424 41425 /* 41426 * Extend jQueryUI, get it started with our version number 41427 */ 41428 $.extend($.ui, { 41429 timepicker: { 41430 version: "1.6.3" 41431 } 41432 }); 41433 41434 /* 41435 * Timepicker manager. 41436 * Use the singleton instance of this class, $.timepicker, to interact with the time picker. 41437 * Settings for (groups of) time pickers are maintained in an instance object, 41438 * allowing multiple different settings on the same page. 41439 */ 41440 var Timepicker = function () { 41441 this.regional = []; // Available regional settings, indexed by language code 41442 this.regional[''] = { // Default regional settings 41443 currentText: 'Now', 41444 closeText: 'Done', 41445 amNames: ['AM', 'A'], 41446 pmNames: ['PM', 'P'], 41447 timeFormat: 'HH:mm', 41448 timeSuffix: '', 41449 timeOnlyTitle: 'Choose Time', 41450 timeText: 'Time', 41451 hourText: 'Hour', 41452 minuteText: 'Minute', 41453 secondText: 'Second', 41454 millisecText: 'Millisecond', 41455 microsecText: 'Microsecond', 41456 timezoneText: 'Time Zone', 41457 isRTL: false 41458 }; 41459 this._defaults = { // Global defaults for all the datetime picker instances 41460 showButtonPanel: true, 41461 timeOnly: false, 41462 timeOnlyShowDate: false, 41463 showHour: null, 41464 showMinute: null, 41465 showSecond: null, 41466 showMillisec: null, 41467 showMicrosec: null, 41468 showTimezone: null, 41469 showTime: true, 41470 stepHour: 1, 41471 stepMinute: 1, 41472 stepSecond: 1, 41473 stepMillisec: 1, 41474 stepMicrosec: 1, 41475 hour: 0, 41476 minute: 0, 41477 second: 0, 41478 millisec: 0, 41479 microsec: 0, 41480 timezone: null, 41481 hourMin: 0, 41482 minuteMin: 0, 41483 secondMin: 0, 41484 millisecMin: 0, 41485 microsecMin: 0, 41486 hourMax: 23, 41487 minuteMax: 59, 41488 secondMax: 59, 41489 millisecMax: 999, 41490 microsecMax: 999, 41491 minDateTime: null, 41492 maxDateTime: null, 41493 maxTime: null, 41494 minTime: null, 41495 onSelect: null, 41496 hourGrid: 0, 41497 minuteGrid: 0, 41498 secondGrid: 0, 41499 millisecGrid: 0, 41500 microsecGrid: 0, 41501 alwaysSetTime: true, 41502 separator: ' ', 41503 altFieldTimeOnly: true, 41504 altTimeFormat: null, 41505 altSeparator: null, 41506 altTimeSuffix: null, 41507 altRedirectFocus: true, 41508 pickerTimeFormat: null, 41509 pickerTimeSuffix: null, 41510 showTimepicker: true, 41511 timezoneList: null, 41512 addSliderAccess: false, 41513 sliderAccessArgs: null, 41514 controlType: 'slider', 41515 oneLine: false, 41516 defaultValue: null, 41517 parse: 'strict', 41518 afterInject: null 41519 }; 41520 $.extend(this._defaults, this.regional['']); 41521 }; 41522 41523 $.extend(Timepicker.prototype, { 41524 $input: null, 41525 $altInput: null, 41526 $timeObj: null, 41527 inst: null, 41528 hour_slider: null, 41529 minute_slider: null, 41530 second_slider: null, 41531 millisec_slider: null, 41532 microsec_slider: null, 41533 timezone_select: null, 41534 maxTime: null, 41535 minTime: null, 41536 hour: 0, 41537 minute: 0, 41538 second: 0, 41539 millisec: 0, 41540 microsec: 0, 41541 timezone: null, 41542 hourMinOriginal: null, 41543 minuteMinOriginal: null, 41544 secondMinOriginal: null, 41545 millisecMinOriginal: null, 41546 microsecMinOriginal: null, 41547 hourMaxOriginal: null, 41548 minuteMaxOriginal: null, 41549 secondMaxOriginal: null, 41550 millisecMaxOriginal: null, 41551 microsecMaxOriginal: null, 41552 ampm: '', 41553 formattedDate: '', 41554 formattedTime: '', 41555 formattedDateTime: '', 41556 timezoneList: null, 41557 units: ['hour', 'minute', 'second', 'millisec', 'microsec'], 41558 support: {}, 41559 control: null, 41560 41561 /* 41562 * Override the default settings for all instances of the time picker. 41563 * @param {Object} settings object - the new settings to use as defaults (anonymous object) 41564 * @return {Object} the manager object 41565 */ 41566 setDefaults: function (settings) { 41567 extendRemove(this._defaults, settings || {}); 41568 return this; 41569 }, 41570 41571 /* 41572 * Create a new Timepicker instance 41573 */ 41574 _newInst: function ($input, opts) { 41575 var tp_inst = new Timepicker(), 41576 inlineSettings = {}, 41577 fns = {}, 41578 overrides, i; 41579 41580 for (var attrName in this._defaults) { 41581 if (this._defaults.hasOwnProperty(attrName)) { 41582 var attrValue = $input.attr('time:' + attrName); 41583 if (attrValue) { 41584 try { 41585 inlineSettings[attrName] = eval(attrValue); 41586 } catch (err) { 41587 inlineSettings[attrName] = attrValue; 41588 } 41589 } 41590 } 41591 } 41592 41593 overrides = { 41594 beforeShow: function (input, dp_inst) { 41595 if ($.isFunction(tp_inst._defaults.evnts.beforeShow)) { 41596 return tp_inst._defaults.evnts.beforeShow.call($input[0], input, dp_inst, tp_inst); 41597 } 41598 }, 41599 onChangeMonthYear: function (year, month, dp_inst) { 41600 // Update the time as well : this prevents the time from disappearing from the $input field. 41601 // tp_inst._updateDateTime(dp_inst); 41602 if ($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)) { 41603 tp_inst._defaults.evnts.onChangeMonthYear.call($input[0], year, month, dp_inst, tp_inst); 41604 } 41605 }, 41606 onClose: function (dateText, dp_inst) { 41607 if (tp_inst.timeDefined === true && $input.val() !== '') { 41608 tp_inst._updateDateTime(dp_inst); 41609 } 41610 if ($.isFunction(tp_inst._defaults.evnts.onClose)) { 41611 tp_inst._defaults.evnts.onClose.call($input[0], dateText, dp_inst, tp_inst); 41612 } 41613 } 41614 }; 41615 for (i in overrides) { 41616 if (overrides.hasOwnProperty(i)) { 41617 fns[i] = opts[i] || this._defaults[i] || null; 41618 } 41619 } 41620 41621 tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, opts, overrides, { 41622 evnts: fns, 41623 timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker'); 41624 }); 41625 tp_inst.amNames = $.map(tp_inst._defaults.amNames, function (val) { 41626 return val.toUpperCase(); 41627 }); 41628 tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function (val) { 41629 return val.toUpperCase(); 41630 }); 41631 41632 // detect which units are supported 41633 tp_inst.support = detectSupport( 41634 tp_inst._defaults.timeFormat + 41635 (tp_inst._defaults.pickerTimeFormat ? tp_inst._defaults.pickerTimeFormat : '') + 41636 (tp_inst._defaults.altTimeFormat ? tp_inst._defaults.altTimeFormat : '')); 41637 41638 // controlType is string - key to our this._controls 41639 if (typeof(tp_inst._defaults.controlType) === 'string') { 41640 if (tp_inst._defaults.controlType === 'slider' && typeof($.ui.slider) === 'undefined') { 41641 tp_inst._defaults.controlType = 'select'; 41642 } 41643 tp_inst.control = tp_inst._controls[tp_inst._defaults.controlType]; 41644 } 41645 // controlType is an object and must implement create, options, value methods 41646 else { 41647 tp_inst.control = tp_inst._defaults.controlType; 41648 } 41649 41650 // prep the timezone options 41651 var timezoneList = [-720, -660, -600, -570, -540, -480, -420, -360, -300, -270, -240, -210, -180, -120, -60, 41652 0, 60, 120, 180, 210, 240, 270, 300, 330, 345, 360, 390, 420, 480, 525, 540, 570, 600, 630, 660, 690, 720, 765, 780, 840]; 41653 if (tp_inst._defaults.timezoneList !== null) { 41654 timezoneList = tp_inst._defaults.timezoneList; 41655 } 41656 var tzl = timezoneList.length, tzi = 0, tzv = null; 41657 if (tzl > 0 && typeof timezoneList[0] !== 'object') { 41658 for (; tzi < tzl; tzi++) { 41659 tzv = timezoneList[tzi]; 41660 timezoneList[tzi] = { value: tzv, label: $.timepicker.timezoneOffsetString(tzv, tp_inst.support.iso8601) }; 41661 } 41662 } 41663 tp_inst._defaults.timezoneList = timezoneList; 41664 41665 // set the default units 41666 tp_inst.timezone = tp_inst._defaults.timezone !== null ? $.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone) : 41667 ((new Date()).getTimezoneOffset() * -1); 41668 tp_inst.hour = tp_inst._defaults.hour < tp_inst._defaults.hourMin ? tp_inst._defaults.hourMin : 41669 tp_inst._defaults.hour > tp_inst._defaults.hourMax ? tp_inst._defaults.hourMax : tp_inst._defaults.hour; 41670 tp_inst.minute = tp_inst._defaults.minute < tp_inst._defaults.minuteMin ? tp_inst._defaults.minuteMin : 41671 tp_inst._defaults.minute > tp_inst._defaults.minuteMax ? tp_inst._defaults.minuteMax : tp_inst._defaults.minute; 41672 tp_inst.second = tp_inst._defaults.second < tp_inst._defaults.secondMin ? tp_inst._defaults.secondMin : 41673 tp_inst._defaults.second > tp_inst._defaults.secondMax ? tp_inst._defaults.secondMax : tp_inst._defaults.second; 41674 tp_inst.millisec = tp_inst._defaults.millisec < tp_inst._defaults.millisecMin ? tp_inst._defaults.millisecMin : 41675 tp_inst._defaults.millisec > tp_inst._defaults.millisecMax ? tp_inst._defaults.millisecMax : tp_inst._defaults.millisec; 41676 tp_inst.microsec = tp_inst._defaults.microsec < tp_inst._defaults.microsecMin ? tp_inst._defaults.microsecMin : 41677 tp_inst._defaults.microsec > tp_inst._defaults.microsecMax ? tp_inst._defaults.microsecMax : tp_inst._defaults.microsec; 41678 tp_inst.ampm = ''; 41679 tp_inst.$input = $input; 41680 41681 if (tp_inst._defaults.altField) { 41682 tp_inst.$altInput = $(tp_inst._defaults.altField); 41683 if (tp_inst._defaults.altRedirectFocus === true) { 41684 tp_inst.$altInput.css({ 41685 cursor: 'pointer' 41686 }).focus(function () { 41687 $input.trigger("focus"); 41688 }); 41689 } 41690 } 41691 41692 if (tp_inst._defaults.minDate === 0 || tp_inst._defaults.minDateTime === 0) { 41693 tp_inst._defaults.minDate = new Date(); 41694 } 41695 if (tp_inst._defaults.maxDate === 0 || tp_inst._defaults.maxDateTime === 0) { 41696 tp_inst._defaults.maxDate = new Date(); 41697 } 41698 41699 // datepicker needs minDate/maxDate, timepicker needs minDateTime/maxDateTime.. 41700 if (tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date) { 41701 tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime()); 41702 } 41703 if (tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date) { 41704 tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime()); 41705 } 41706 if (tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date) { 41707 tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime()); 41708 } 41709 if (tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date) { 41710 tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime()); 41711 } 41712 tp_inst.$input.bind('focus', function () { 41713 tp_inst._onFocus(); 41714 }); 41715 41716 return tp_inst; 41717 }, 41718 41719 /* 41720 * add our sliders to the calendar 41721 */ 41722 _addTimePicker: function (dp_inst) { 41723 var currDT = $.trim((this.$altInput && this._defaults.altFieldTimeOnly) ? this.$input.val() + ' ' + this.$altInput.val() : this.$input.val()); 41724 41725 this.timeDefined = this._parseTime(currDT); 41726 this._limitMinMaxDateTime(dp_inst, false); 41727 this._injectTimePicker(); 41728 this._afterInject(); 41729 }, 41730 41731 /* 41732 * parse the time string from input value or _setTime 41733 */ 41734 _parseTime: function (timeString, withDate) { 41735 if (!this.inst) { 41736 this.inst = $.datepicker._getInst(this.$input[0]); 41737 } 41738 41739 if (withDate || !this._defaults.timeOnly) { 41740 var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat'); 41741 try { 41742 var parseRes = parseDateTimeInternal(dp_dateFormat, this._defaults.timeFormat, timeString, $.datepicker._getFormatConfig(this.inst), this._defaults); 41743 if (!parseRes.timeObj) { 41744 return false; 41745 } 41746 $.extend(this, parseRes.timeObj); 41747 } catch (err) { 41748 $.timepicker.log("Error parsing the date/time string: " + err + 41749 "\ndate/time string = " + timeString + 41750 "\ntimeFormat = " + this._defaults.timeFormat + 41751 "\ndateFormat = " + dp_dateFormat); 41752 return false; 41753 } 41754 return true; 41755 } else { 41756 var timeObj = $.datepicker.parseTime(this._defaults.timeFormat, timeString, this._defaults); 41757 if (!timeObj) { 41758 return false; 41759 } 41760 $.extend(this, timeObj); 41761 return true; 41762 } 41763 }, 41764 41765 /* 41766 * Handle callback option after injecting timepicker 41767 */ 41768 _afterInject: function() { 41769 var o = this.inst.settings; 41770 if ($.isFunction(o.afterInject)) { 41771 o.afterInject.call(this); 41772 } 41773 }, 41774 41775 /* 41776 * generate and inject html for timepicker into ui datepicker 41777 */ 41778 _injectTimePicker: function () { 41779 var $dp = this.inst.dpDiv, 41780 o = this.inst.settings, 41781 tp_inst = this, 41782 litem = '', 41783 uitem = '', 41784 show = null, 41785 max = {}, 41786 gridSize = {}, 41787 size = null, 41788 i = 0, 41789 l = 0; 41790 41791 // Prevent displaying twice 41792 if ($dp.find("div.ui-timepicker-div").length === 0 && o.showTimepicker) { 41793 var noDisplay = ' ui_tpicker_unit_hide', 41794 html = '<div class="ui-timepicker-div' + (o.isRTL ? ' ui-timepicker-rtl' : '') + (o.oneLine && o.controlType === 'select' ? ' ui-timepicker-oneLine' : '') + '"><dl>' + '<dt class="ui_tpicker_time_label' + ((o.showTime) ? '' : noDisplay) + '">' + o.timeText + '</dt>' + 41795 '<dd class="ui_tpicker_time '+ ((o.showTime) ? '' : noDisplay) + '"><input class="ui_tpicker_time_input" ' + (o.timeInput ? '' : 'disabled') + '/></dd>'; 41796 41797 // Create the markup 41798 for (i = 0, l = this.units.length; i < l; i++) { 41799 litem = this.units[i]; 41800 uitem = litem.substr(0, 1).toUpperCase() + litem.substr(1); 41801 show = o['show' + uitem] !== null ? o['show' + uitem] : this.support[litem]; 41802 41803 // Added by Peter Medeiros: 41804 // - Figure out what the hour/minute/second max should be based on the step values. 41805 // - Example: if stepMinute is 15, then minMax is 45. 41806 max[litem] = parseInt((o[litem + 'Max'] - ((o[litem + 'Max'] - o[litem + 'Min']) % o['step' + uitem])), 10); 41807 gridSize[litem] = 0; 41808 41809 html += '<dt class="ui_tpicker_' + litem + '_label' + (show ? '' : noDisplay) + '">' + o[litem + 'Text'] + '</dt>' + 41810 '<dd class="ui_tpicker_' + litem + (show ? '' : noDisplay) + '"><div class="ui_tpicker_' + litem + '_slider' + (show ? '' : noDisplay) + '"></div>'; 41811 41812 if (show && o[litem + 'Grid'] > 0) { 41813 html += '<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>'; 41814 41815 if (litem === 'hour') { 41816 for (var h = o[litem + 'Min']; h <= max[litem]; h += parseInt(o[litem + 'Grid'], 10)) { 41817 gridSize[litem]++; 41818 var tmph = $.datepicker.formatTime(this.support.ampm ? 'hht' : 'HH', {hour: h}, o); 41819 html += '<td data-for="' + litem + '">' + tmph + '</td>'; 41820 } 41821 } 41822 else { 41823 for (var m = o[litem + 'Min']; m <= max[litem]; m += parseInt(o[litem + 'Grid'], 10)) { 41824 gridSize[litem]++; 41825 html += '<td data-for="' + litem + '">' + ((m < 10) ? '0' : '') + m + '</td>'; 41826 } 41827 } 41828 41829 html += '</tr></table></div>'; 41830 } 41831 html += '</dd>'; 41832 } 41833 41834 // Timezone 41835 var showTz = o.showTimezone !== null ? o.showTimezone : this.support.timezone; 41836 html += '<dt class="ui_tpicker_timezone_label' + (showTz ? '' : noDisplay) + '">' + o.timezoneText + '</dt>'; 41837 html += '<dd class="ui_tpicker_timezone' + (showTz ? '' : noDisplay) + '"></dd>'; 41838 41839 // Create the elements from string 41840 html += '</dl></div>'; 41841 var $tp = $(html); 41842 41843 // if we only want time picker... 41844 if (o.timeOnly === true) { 41845 $tp.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all">' + '<div class="ui-datepicker-title">' + o.timeOnlyTitle + '</div>' + '</div>'); 41846 $dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide(); 41847 } 41848 41849 // add sliders, adjust grids, add events 41850 for (i = 0, l = tp_inst.units.length; i < l; i++) { 41851 litem = tp_inst.units[i]; 41852 uitem = litem.substr(0, 1).toUpperCase() + litem.substr(1); 41853 show = o['show' + uitem] !== null ? o['show' + uitem] : this.support[litem]; 41854 41855 // add the slider 41856 tp_inst[litem + '_slider'] = tp_inst.control.create(tp_inst, $tp.find('.ui_tpicker_' + litem + '_slider'), litem, tp_inst[litem], o[litem + 'Min'], max[litem], o['step' + uitem]); 41857 41858 // adjust the grid and add click event 41859 if (show && o[litem + 'Grid'] > 0) { 41860 size = 100 * gridSize[litem] * o[litem + 'Grid'] / (max[litem] - o[litem + 'Min']); 41861 $tp.find('.ui_tpicker_' + litem + ' table').css({ 41862 width: size + "%", 41863 marginLeft: o.isRTL ? '0' : ((size / (-2 * gridSize[litem])) + "%"), 41864 marginRight: o.isRTL ? ((size / (-2 * gridSize[litem])) + "%") : '0', 41865 borderCollapse: 'collapse' 41866 }).find("td").click(function (e) { 41867 var $t = $(this), 41868 h = $t.html(), 41869 n = parseInt(h.replace(/[^0-9]/g), 10), 41870 ap = h.replace(/[^apm]/ig), 41871 f = $t.data('for'); // loses scope, so we use data-for 41872 41873 if (f === 'hour') { 41874 if (ap.indexOf('p') !== -1 && n < 12) { 41875 n += 12; 41876 } 41877 else { 41878 if (ap.indexOf('a') !== -1 && n === 12) { 41879 n = 0; 41880 } 41881 } 41882 } 41883 41884 tp_inst.control.value(tp_inst, tp_inst[f + '_slider'], litem, n); 41885 41886 tp_inst._onTimeChange(); 41887 tp_inst._onSelectHandler(); 41888 }).css({ 41889 cursor: 'pointer', 41890 width: (100 / gridSize[litem]) + '%', 41891 textAlign: 'center', 41892 overflow: 'hidden' 41893 }); 41894 } // end if grid > 0 41895 } // end for loop 41896 41897 // Add timezone options 41898 this.timezone_select = $tp.find('.ui_tpicker_timezone').append('<select></select>').find("select"); 41899 $.fn.append.apply(this.timezone_select, 41900 $.map(o.timezoneList, function (val, idx) { 41901 return $("<option />").val(typeof val === "object" ? val.value : val).text(typeof val === "object" ? val.label : val); 41902 })); 41903 if (typeof(this.timezone) !== "undefined" && this.timezone !== null && this.timezone !== "") { 41904 var local_timezone = (new Date(this.inst.selectedYear, this.inst.selectedMonth, this.inst.selectedDay, 12)).getTimezoneOffset() * -1; 41905 if (local_timezone === this.timezone) { 41906 selectLocalTimezone(tp_inst); 41907 } else { 41908 this.timezone_select.val(this.timezone); 41909 } 41910 } else { 41911 if (typeof(this.hour) !== "undefined" && this.hour !== null && this.hour !== "") { 41912 this.timezone_select.val(o.timezone); 41913 } else { 41914 selectLocalTimezone(tp_inst); 41915 } 41916 } 41917 this.timezone_select.change(function () { 41918 tp_inst._onTimeChange(); 41919 tp_inst._onSelectHandler(); 41920 tp_inst._afterInject(); 41921 }); 41922 // End timezone options 41923 41924 // inject timepicker into datepicker 41925 var $buttonPanel = $dp.find('.ui-datepicker-buttonpane'); 41926 if ($buttonPanel.length) { 41927 $buttonPanel.before($tp); 41928 } else { 41929 $dp.append($tp); 41930 } 41931 41932 this.$timeObj = $tp.find('.ui_tpicker_time_input'); 41933 this.$timeObj.change(function () { 41934 var timeFormat = tp_inst.inst.settings.timeFormat; 41935 var parsedTime = $.datepicker.parseTime(timeFormat, this.value); 41936 var update = new Date(); 41937 if (parsedTime) { 41938 update.setHours(parsedTime.hour); 41939 update.setMinutes(parsedTime.minute); 41940 update.setSeconds(parsedTime.second); 41941 $.datepicker._setTime(tp_inst.inst, update); 41942 } else { 41943 this.value = tp_inst.formattedTime; 41944 this.blur(); 41945 } 41946 }); 41947 41948 if (this.inst !== null) { 41949 var timeDefined = this.timeDefined; 41950 this._onTimeChange(); 41951 this.timeDefined = timeDefined; 41952 } 41953 41954 // slideAccess integration: http://trentrichardson.com/2011/11/11/jquery-ui-sliders-and-touch-accessibility/ 41955 if (this._defaults.addSliderAccess) { 41956 var sliderAccessArgs = this._defaults.sliderAccessArgs, 41957 rtl = this._defaults.isRTL; 41958 sliderAccessArgs.isRTL = rtl; 41959 41960 setTimeout(function () { // fix for inline mode 41961 if ($tp.find('.ui-slider-access').length === 0) { 41962 $tp.find('.ui-slider:visible').sliderAccess(sliderAccessArgs); 41963 41964 // fix any grids since sliders are shorter 41965 var sliderAccessWidth = $tp.find('.ui-slider-access:eq(0)').outerWidth(true); 41966 if (sliderAccessWidth) { 41967 $tp.find('table:visible').each(function () { 41968 var $g = $(this), 41969 oldWidth = $g.outerWidth(), 41970 oldMarginLeft = $g.css(rtl ? 'marginRight' : 'marginLeft').toString().replace('%', ''), 41971 newWidth = oldWidth - sliderAccessWidth, 41972 newMarginLeft = ((oldMarginLeft * newWidth) / oldWidth) + '%', 41973 css = { width: newWidth, marginRight: 0, marginLeft: 0 }; 41974 css[rtl ? 'marginRight' : 'marginLeft'] = newMarginLeft; 41975 $g.css(css); 41976 }); 41977 } 41978 } 41979 }, 10); 41980 } 41981 // end slideAccess integration 41982 41983 tp_inst._limitMinMaxDateTime(this.inst, true); 41984 } 41985 }, 41986 41987 /* 41988 * This function tries to limit the ability to go outside the 41989 * min/max date range 41990 */ 41991 _limitMinMaxDateTime: function (dp_inst, adjustSliders) { 41992 var o = this._defaults, 41993 dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay); 41994 41995 if (!this._defaults.showTimepicker) { 41996 return; 41997 } // No time so nothing to check here 41998 41999 if ($.datepicker._get(dp_inst, 'minDateTime') !== null && $.datepicker._get(dp_inst, 'minDateTime') !== undefined && dp_date) { 42000 var minDateTime = $.datepicker._get(dp_inst, 'minDateTime'), 42001 minDateTimeDate = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), 0, 0, 0, 0); 42002 42003 if (this.hourMinOriginal === null || this.minuteMinOriginal === null || this.secondMinOriginal === null || this.millisecMinOriginal === null || this.microsecMinOriginal === null) { 42004 this.hourMinOriginal = o.hourMin; 42005 this.minuteMinOriginal = o.minuteMin; 42006 this.secondMinOriginal = o.secondMin; 42007 this.millisecMinOriginal = o.millisecMin; 42008 this.microsecMinOriginal = o.microsecMin; 42009 } 42010 42011 if (dp_inst.settings.timeOnly || minDateTimeDate.getTime() === dp_date.getTime()) { 42012 this._defaults.hourMin = minDateTime.getHours(); 42013 if (this.hour <= this._defaults.hourMin) { 42014 this.hour = this._defaults.hourMin; 42015 this._defaults.minuteMin = minDateTime.getMinutes(); 42016 if (this.minute <= this._defaults.minuteMin) { 42017 this.minute = this._defaults.minuteMin; 42018 this._defaults.secondMin = minDateTime.getSeconds(); 42019 if (this.second <= this._defaults.secondMin) { 42020 this.second = this._defaults.secondMin; 42021 this._defaults.millisecMin = minDateTime.getMilliseconds(); 42022 if (this.millisec <= this._defaults.millisecMin) { 42023 this.millisec = this._defaults.millisecMin; 42024 this._defaults.microsecMin = minDateTime.getMicroseconds(); 42025 } else { 42026 if (this.microsec < this._defaults.microsecMin) { 42027 this.microsec = this._defaults.microsecMin; 42028 } 42029 this._defaults.microsecMin = this.microsecMinOriginal; 42030 } 42031 } else { 42032 this._defaults.millisecMin = this.millisecMinOriginal; 42033 this._defaults.microsecMin = this.microsecMinOriginal; 42034 } 42035 } else { 42036 this._defaults.secondMin = this.secondMinOriginal; 42037 this._defaults.millisecMin = this.millisecMinOriginal; 42038 this._defaults.microsecMin = this.microsecMinOriginal; 42039 } 42040 } else { 42041 this._defaults.minuteMin = this.minuteMinOriginal; 42042 this._defaults.secondMin = this.secondMinOriginal; 42043 this._defaults.millisecMin = this.millisecMinOriginal; 42044 this._defaults.microsecMin = this.microsecMinOriginal; 42045 } 42046 } else { 42047 this._defaults.hourMin = this.hourMinOriginal; 42048 this._defaults.minuteMin = this.minuteMinOriginal; 42049 this._defaults.secondMin = this.secondMinOriginal; 42050 this._defaults.millisecMin = this.millisecMinOriginal; 42051 this._defaults.microsecMin = this.microsecMinOriginal; 42052 } 42053 } 42054 42055 if ($.datepicker._get(dp_inst, 'maxDateTime') !== null && $.datepicker._get(dp_inst, 'maxDateTime') !== undefined && dp_date) { 42056 var maxDateTime = $.datepicker._get(dp_inst, 'maxDateTime'), 42057 maxDateTimeDate = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), 0, 0, 0, 0); 42058 42059 if (this.hourMaxOriginal === null || this.minuteMaxOriginal === null || this.secondMaxOriginal === null || this.millisecMaxOriginal === null) { 42060 this.hourMaxOriginal = o.hourMax; 42061 this.minuteMaxOriginal = o.minuteMax; 42062 this.secondMaxOriginal = o.secondMax; 42063 this.millisecMaxOriginal = o.millisecMax; 42064 this.microsecMaxOriginal = o.microsecMax; 42065 } 42066 42067 if (dp_inst.settings.timeOnly || maxDateTimeDate.getTime() === dp_date.getTime()) { 42068 this._defaults.hourMax = maxDateTime.getHours(); 42069 if (this.hour >= this._defaults.hourMax) { 42070 this.hour = this._defaults.hourMax; 42071 this._defaults.minuteMax = maxDateTime.getMinutes(); 42072 if (this.minute >= this._defaults.minuteMax) { 42073 this.minute = this._defaults.minuteMax; 42074 this._defaults.secondMax = maxDateTime.getSeconds(); 42075 if (this.second >= this._defaults.secondMax) { 42076 this.second = this._defaults.secondMax; 42077 this._defaults.millisecMax = maxDateTime.getMilliseconds(); 42078 if (this.millisec >= this._defaults.millisecMax) { 42079 this.millisec = this._defaults.millisecMax; 42080 this._defaults.microsecMax = maxDateTime.getMicroseconds(); 42081 } else { 42082 if (this.microsec > this._defaults.microsecMax) { 42083 this.microsec = this._defaults.microsecMax; 42084 } 42085 this._defaults.microsecMax = this.microsecMaxOriginal; 42086 } 42087 } else { 42088 this._defaults.millisecMax = this.millisecMaxOriginal; 42089 this._defaults.microsecMax = this.microsecMaxOriginal; 42090 } 42091 } else { 42092 this._defaults.secondMax = this.secondMaxOriginal; 42093 this._defaults.millisecMax = this.millisecMaxOriginal; 42094 this._defaults.microsecMax = this.microsecMaxOriginal; 42095 } 42096 } else { 42097 this._defaults.minuteMax = this.minuteMaxOriginal; 42098 this._defaults.secondMax = this.secondMaxOriginal; 42099 this._defaults.millisecMax = this.millisecMaxOriginal; 42100 this._defaults.microsecMax = this.microsecMaxOriginal; 42101 } 42102 } else { 42103 this._defaults.hourMax = this.hourMaxOriginal; 42104 this._defaults.minuteMax = this.minuteMaxOriginal; 42105 this._defaults.secondMax = this.secondMaxOriginal; 42106 this._defaults.millisecMax = this.millisecMaxOriginal; 42107 this._defaults.microsecMax = this.microsecMaxOriginal; 42108 } 42109 } 42110 42111 if (dp_inst.settings.minTime!==null) { 42112 var tempMinTime=new Date("01/01/1970 " + dp_inst.settings.minTime); 42113 if (this.hour<tempMinTime.getHours()) { 42114 this.hour=this._defaults.hourMin=tempMinTime.getHours(); 42115 this.minute=this._defaults.minuteMin=tempMinTime.getMinutes(); 42116 } else if (this.hour===tempMinTime.getHours() && this.minute<tempMinTime.getMinutes()) { 42117 this.minute=this._defaults.minuteMin=tempMinTime.getMinutes(); 42118 } else { 42119 if (this._defaults.hourMin<tempMinTime.getHours()) { 42120 this._defaults.hourMin=tempMinTime.getHours(); 42121 this._defaults.minuteMin=tempMinTime.getMinutes(); 42122 } else if (this._defaults.hourMin===tempMinTime.getHours()===this.hour && this._defaults.minuteMin<tempMinTime.getMinutes()) { 42123 this._defaults.minuteMin=tempMinTime.getMinutes(); 42124 } else { 42125 this._defaults.minuteMin=0; 42126 } 42127 } 42128 } 42129 42130 if (dp_inst.settings.maxTime!==null) { 42131 var tempMaxTime=new Date("01/01/1970 " + dp_inst.settings.maxTime); 42132 if (this.hour>tempMaxTime.getHours()) { 42133 this.hour=this._defaults.hourMax=tempMaxTime.getHours(); 42134 this.minute=this._defaults.minuteMax=tempMaxTime.getMinutes(); 42135 } else if (this.hour===tempMaxTime.getHours() && this.minute>tempMaxTime.getMinutes()) { 42136 this.minute=this._defaults.minuteMax=tempMaxTime.getMinutes(); 42137 } else { 42138 if (this._defaults.hourMax>tempMaxTime.getHours()) { 42139 this._defaults.hourMax=tempMaxTime.getHours(); 42140 this._defaults.minuteMax=tempMaxTime.getMinutes(); 42141 } else if (this._defaults.hourMax===tempMaxTime.getHours()===this.hour && this._defaults.minuteMax>tempMaxTime.getMinutes()) { 42142 this._defaults.minuteMax=tempMaxTime.getMinutes(); 42143 } else { 42144 this._defaults.minuteMax=59; 42145 } 42146 } 42147 } 42148 42149 if (adjustSliders !== undefined && adjustSliders === true) { 42150 var hourMax = parseInt((this._defaults.hourMax - ((this._defaults.hourMax - this._defaults.hourMin) % this._defaults.stepHour)), 10), 42151 minMax = parseInt((this._defaults.minuteMax - ((this._defaults.minuteMax - this._defaults.minuteMin) % this._defaults.stepMinute)), 10), 42152 secMax = parseInt((this._defaults.secondMax - ((this._defaults.secondMax - this._defaults.secondMin) % this._defaults.stepSecond)), 10), 42153 millisecMax = parseInt((this._defaults.millisecMax - ((this._defaults.millisecMax - this._defaults.millisecMin) % this._defaults.stepMillisec)), 10), 42154 microsecMax = parseInt((this._defaults.microsecMax - ((this._defaults.microsecMax - this._defaults.microsecMin) % this._defaults.stepMicrosec)), 10); 42155 42156 if (this.hour_slider) { 42157 this.control.options(this, this.hour_slider, 'hour', { min: this._defaults.hourMin, max: hourMax, step: this._defaults.stepHour }); 42158 this.control.value(this, this.hour_slider, 'hour', this.hour - (this.hour % this._defaults.stepHour)); 42159 } 42160 if (this.minute_slider) { 42161 this.control.options(this, this.minute_slider, 'minute', { min: this._defaults.minuteMin, max: minMax, step: this._defaults.stepMinute }); 42162 this.control.value(this, this.minute_slider, 'minute', this.minute - (this.minute % this._defaults.stepMinute)); 42163 } 42164 if (this.second_slider) { 42165 this.control.options(this, this.second_slider, 'second', { min: this._defaults.secondMin, max: secMax, step: this._defaults.stepSecond }); 42166 this.control.value(this, this.second_slider, 'second', this.second - (this.second % this._defaults.stepSecond)); 42167 } 42168 if (this.millisec_slider) { 42169 this.control.options(this, this.millisec_slider, 'millisec', { min: this._defaults.millisecMin, max: millisecMax, step: this._defaults.stepMillisec }); 42170 this.control.value(this, this.millisec_slider, 'millisec', this.millisec - (this.millisec % this._defaults.stepMillisec)); 42171 } 42172 if (this.microsec_slider) { 42173 this.control.options(this, this.microsec_slider, 'microsec', { min: this._defaults.microsecMin, max: microsecMax, step: this._defaults.stepMicrosec }); 42174 this.control.value(this, this.microsec_slider, 'microsec', this.microsec - (this.microsec % this._defaults.stepMicrosec)); 42175 } 42176 } 42177 42178 }, 42179 42180 /* 42181 * when a slider moves, set the internal time... 42182 * on time change is also called when the time is updated in the text field 42183 */ 42184 _onTimeChange: function () { 42185 if (!this._defaults.showTimepicker) { 42186 return; 42187 } 42188 var hour = (this.hour_slider) ? this.control.value(this, this.hour_slider, 'hour') : false, 42189 minute = (this.minute_slider) ? this.control.value(this, this.minute_slider, 'minute') : false, 42190 second = (this.second_slider) ? this.control.value(this, this.second_slider, 'second') : false, 42191 millisec = (this.millisec_slider) ? this.control.value(this, this.millisec_slider, 'millisec') : false, 42192 microsec = (this.microsec_slider) ? this.control.value(this, this.microsec_slider, 'microsec') : false, 42193 timezone = (this.timezone_select) ? this.timezone_select.val() : false, 42194 o = this._defaults, 42195 pickerTimeFormat = o.pickerTimeFormat || o.timeFormat, 42196 pickerTimeSuffix = o.pickerTimeSuffix || o.timeSuffix; 42197 42198 if (typeof(hour) === 'object') { 42199 hour = false; 42200 } 42201 if (typeof(minute) === 'object') { 42202 minute = false; 42203 } 42204 if (typeof(second) === 'object') { 42205 second = false; 42206 } 42207 if (typeof(millisec) === 'object') { 42208 millisec = false; 42209 } 42210 if (typeof(microsec) === 'object') { 42211 microsec = false; 42212 } 42213 if (typeof(timezone) === 'object') { 42214 timezone = false; 42215 } 42216 42217 if (hour !== false) { 42218 hour = parseInt(hour, 10); 42219 } 42220 if (minute !== false) { 42221 minute = parseInt(minute, 10); 42222 } 42223 if (second !== false) { 42224 second = parseInt(second, 10); 42225 } 42226 if (millisec !== false) { 42227 millisec = parseInt(millisec, 10); 42228 } 42229 if (microsec !== false) { 42230 microsec = parseInt(microsec, 10); 42231 } 42232 if (timezone !== false) { 42233 timezone = timezone.toString(); 42234 } 42235 42236 var ampm = o[hour < 12 ? 'amNames' : 'pmNames'][0]; 42237 42238 // If the update was done in the input field, the input field should not be updated. 42239 // If the update was done using the sliders, update the input field. 42240 var hasChanged = ( 42241 hour !== parseInt(this.hour,10) || // sliders should all be numeric 42242 minute !== parseInt(this.minute,10) || 42243 second !== parseInt(this.second,10) || 42244 millisec !== parseInt(this.millisec,10) || 42245 microsec !== parseInt(this.microsec,10) || 42246 (this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) || 42247 (this.timezone !== null && timezone !== this.timezone.toString()) // could be numeric or "EST" format, so use toString() 42248 ); 42249 42250 if (hasChanged) { 42251 42252 if (hour !== false) { 42253 this.hour = hour; 42254 } 42255 if (minute !== false) { 42256 this.minute = minute; 42257 } 42258 if (second !== false) { 42259 this.second = second; 42260 } 42261 if (millisec !== false) { 42262 this.millisec = millisec; 42263 } 42264 if (microsec !== false) { 42265 this.microsec = microsec; 42266 } 42267 if (timezone !== false) { 42268 this.timezone = timezone; 42269 } 42270 42271 if (!this.inst) { 42272 this.inst = $.datepicker._getInst(this.$input[0]); 42273 } 42274 42275 this._limitMinMaxDateTime(this.inst, true); 42276 } 42277 if (this.support.ampm) { 42278 this.ampm = ampm; 42279 } 42280 42281 // Updates the time within the timepicker 42282 this.formattedTime = $.datepicker.formatTime(o.timeFormat, this, o); 42283 if (this.$timeObj) { 42284 if (pickerTimeFormat === o.timeFormat) { 42285 this.$timeObj.val(this.formattedTime + pickerTimeSuffix); 42286 } 42287 else { 42288 this.$timeObj.val($.datepicker.formatTime(pickerTimeFormat, this, o) + pickerTimeSuffix); 42289 } 42290 if (this.$timeObj[0].setSelectionRange) { 42291 var sPos = this.$timeObj[0].selectionStart; 42292 var ePos = this.$timeObj[0].selectionEnd; 42293 this.$timeObj[0].setSelectionRange(sPos, ePos); 42294 } 42295 } 42296 42297 this.timeDefined = true; 42298 if (hasChanged) { 42299 this._updateDateTime(); 42300 //this.$input.focus(); // may automatically open the picker on setDate 42301 } 42302 }, 42303 42304 /* 42305 * call custom onSelect. 42306 * bind to sliders slidestop, and grid click. 42307 */ 42308 _onSelectHandler: function () { 42309 var onSelect = this._defaults.onSelect || this.inst.settings.onSelect; 42310 var inputEl = this.$input ? this.$input[0] : null; 42311 if (onSelect && inputEl) { 42312 onSelect.apply(inputEl, [this.formattedDateTime, this]); 42313 } 42314 }, 42315 42316 /* 42317 * update our input with the new date time.. 42318 */ 42319 _updateDateTime: function (dp_inst) { 42320 dp_inst = this.inst || dp_inst; 42321 var dtTmp = (dp_inst.currentYear > 0? 42322 new Date(dp_inst.currentYear, dp_inst.currentMonth, dp_inst.currentDay) : 42323 new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)), 42324 dt = $.datepicker._daylightSavingAdjust(dtTmp), 42325 //dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)), 42326 //dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.currentYear, dp_inst.currentMonth, dp_inst.currentDay)), 42327 dateFmt = $.datepicker._get(dp_inst, 'dateFormat'), 42328 formatCfg = $.datepicker._getFormatConfig(dp_inst), 42329 timeAvailable = dt !== null && this.timeDefined; 42330 this.formattedDate = $.datepicker.formatDate(dateFmt, (dt === null ? new Date() : dt), formatCfg); 42331 var formattedDateTime = this.formattedDate; 42332 42333 // if a slider was changed but datepicker doesn't have a value yet, set it 42334 if (dp_inst.lastVal === "") { 42335 dp_inst.currentYear = dp_inst.selectedYear; 42336 dp_inst.currentMonth = dp_inst.selectedMonth; 42337 dp_inst.currentDay = dp_inst.selectedDay; 42338 } 42339 42340 /* 42341 * remove following lines to force every changes in date picker to change the input value 42342 * Bug descriptions: when an input field has a default value, and click on the field to pop up the date picker. 42343 * If the user manually empty the value in the input field, the date picker will never change selected value. 42344 */ 42345 //if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0)) { 42346 // return; 42347 //} 42348 42349 if (this._defaults.timeOnly === true && this._defaults.timeOnlyShowDate === false) { 42350 formattedDateTime = this.formattedTime; 42351 } else if ((this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) || (this._defaults.timeOnly === true && this._defaults.timeOnlyShowDate === true)) { 42352 formattedDateTime += this._defaults.separator + this.formattedTime + this._defaults.timeSuffix; 42353 } 42354 42355 this.formattedDateTime = formattedDateTime; 42356 42357 if (!this._defaults.showTimepicker) { 42358 this.$input.val(this.formattedDate); 42359 } else if (this.$altInput && this._defaults.timeOnly === false && this._defaults.altFieldTimeOnly === true) { 42360 this.$altInput.val(this.formattedTime); 42361 this.$input.val(this.formattedDate); 42362 } else if (this.$altInput) { 42363 this.$input.val(formattedDateTime); 42364 var altFormattedDateTime = '', 42365 altSeparator = this._defaults.altSeparator !== null ? this._defaults.altSeparator : this._defaults.separator, 42366 altTimeSuffix = this._defaults.altTimeSuffix !== null ? this._defaults.altTimeSuffix : this._defaults.timeSuffix; 42367 42368 if (!this._defaults.timeOnly) { 42369 if (this._defaults.altFormat) { 42370 altFormattedDateTime = $.datepicker.formatDate(this._defaults.altFormat, (dt === null ? new Date() : dt), formatCfg); 42371 } 42372 else { 42373 altFormattedDateTime = this.formattedDate; 42374 } 42375 42376 if (altFormattedDateTime) { 42377 altFormattedDateTime += altSeparator; 42378 } 42379 } 42380 42381 if (this._defaults.altTimeFormat !== null) { 42382 altFormattedDateTime += $.datepicker.formatTime(this._defaults.altTimeFormat, this, this._defaults) + altTimeSuffix; 42383 } 42384 else { 42385 altFormattedDateTime += this.formattedTime + altTimeSuffix; 42386 } 42387 this.$altInput.val(altFormattedDateTime); 42388 } else { 42389 this.$input.val(formattedDateTime); 42390 } 42391 42392 this.$input.trigger("change"); 42393 }, 42394 42395 _onFocus: function () { 42396 if (!this.$input.val() && this._defaults.defaultValue) { 42397 this.$input.val(this._defaults.defaultValue); 42398 var inst = $.datepicker._getInst(this.$input.get(0)), 42399 tp_inst = $.datepicker._get(inst, 'timepicker'); 42400 if (tp_inst) { 42401 if (tp_inst._defaults.timeOnly && (inst.input.val() !== inst.lastVal)) { 42402 try { 42403 $.datepicker._updateDatepicker(inst); 42404 } catch (err) { 42405 $.timepicker.log(err); 42406 } 42407 } 42408 } 42409 } 42410 }, 42411 42412 /* 42413 * Small abstraction to control types 42414 * We can add more, just be sure to follow the pattern: create, options, value 42415 */ 42416 _controls: { 42417 // slider methods 42418 slider: { 42419 create: function (tp_inst, obj, unit, val, min, max, step) { 42420 var rtl = tp_inst._defaults.isRTL; // if rtl go -60->0 instead of 0->60 42421 return obj.prop('slide', null).slider({ 42422 orientation: "horizontal", 42423 value: rtl ? val * -1 : val, 42424 min: rtl ? max * -1 : min, 42425 max: rtl ? min * -1 : max, 42426 step: step, 42427 slide: function (event, ui) { 42428 tp_inst.control.value(tp_inst, $(this), unit, rtl ? ui.value * -1 : ui.value); 42429 tp_inst._onTimeChange(); 42430 }, 42431 stop: function (event, ui) { 42432 tp_inst._onSelectHandler(); 42433 } 42434 }); 42435 }, 42436 options: function (tp_inst, obj, unit, opts, val) { 42437 if (tp_inst._defaults.isRTL) { 42438 if (typeof(opts) === 'string') { 42439 if (opts === 'min' || opts === 'max') { 42440 if (val !== undefined) { 42441 return obj.slider(opts, val * -1); 42442 } 42443 return Math.abs(obj.slider(opts)); 42444 } 42445 return obj.slider(opts); 42446 } 42447 var min = opts.min, 42448 max = opts.max; 42449 opts.min = opts.max = null; 42450 if (min !== undefined) { 42451 opts.max = min * -1; 42452 } 42453 if (max !== undefined) { 42454 opts.min = max * -1; 42455 } 42456 return obj.slider(opts); 42457 } 42458 if (typeof(opts) === 'string' && val !== undefined) { 42459 return obj.slider(opts, val); 42460 } 42461 return obj.slider(opts); 42462 }, 42463 value: function (tp_inst, obj, unit, val) { 42464 if (tp_inst._defaults.isRTL) { 42465 if (val !== undefined) { 42466 return obj.slider('value', val * -1); 42467 } 42468 return Math.abs(obj.slider('value')); 42469 } 42470 if (val !== undefined) { 42471 return obj.slider('value', val); 42472 } 42473 return obj.slider('value'); 42474 } 42475 }, 42476 // select methods 42477 select: { 42478 create: function (tp_inst, obj, unit, val, min, max, step) { 42479 var sel = '<select class="ui-timepicker-select ui-state-default ui-corner-all" data-unit="' + unit + '" data-min="' + min + '" data-max="' + max + '" data-step="' + step + '">', 42480 format = tp_inst._defaults.pickerTimeFormat || tp_inst._defaults.timeFormat; 42481 42482 for (var i = min; i <= max; i += step) { 42483 sel += '<option value="' + i + '"' + (i === val ? ' selected' : '') + '>'; 42484 if (unit === 'hour') { 42485 sel += $.datepicker.formatTime($.trim(format.replace(/[^ht ]/ig, '')), {hour: i}, tp_inst._defaults); 42486 } 42487 else if (unit === 'millisec' || unit === 'microsec' || i >= 10) { sel += i; } 42488 else {sel += '0' + i.toString(); } 42489 sel += '</option>'; 42490 } 42491 sel += '</select>'; 42492 42493 obj.children('select').remove(); 42494 42495 $(sel).appendTo(obj).change(function (e) { 42496 tp_inst._onTimeChange(); 42497 tp_inst._onSelectHandler(); 42498 tp_inst._afterInject(); 42499 }); 42500 42501 return obj; 42502 }, 42503 options: function (tp_inst, obj, unit, opts, val) { 42504 var o = {}, 42505 $t = obj.children('select'); 42506 if (typeof(opts) === 'string') { 42507 if (val === undefined) { 42508 return $t.data(opts); 42509 } 42510 o[opts] = val; 42511 } 42512 else { o = opts; } 42513 return tp_inst.control.create(tp_inst, obj, $t.data('unit'), $t.val(), o.min>=0 ? o.min : $t.data('min'), o.max || $t.data('max'), o.step || $t.data('step')); 42514 }, 42515 value: function (tp_inst, obj, unit, val) { 42516 var $t = obj.children('select'); 42517 if (val !== undefined) { 42518 return $t.val(val); 42519 } 42520 return $t.val(); 42521 } 42522 } 42523 } // end _controls 42524 42525 }); 42526 42527 $.fn.extend({ 42528 /* 42529 * shorthand just to use timepicker. 42530 */ 42531 timepicker: function (o) { 42532 o = o || {}; 42533 var tmp_args = Array.prototype.slice.call(arguments); 42534 42535 if (typeof o === 'object') { 42536 tmp_args[0] = $.extend(o, { 42537 timeOnly: true 42538 }); 42539 } 42540 42541 return $(this).each(function () { 42542 $.fn.datetimepicker.apply($(this), tmp_args); 42543 }); 42544 }, 42545 42546 /* 42547 * extend timepicker to datepicker 42548 */ 42549 datetimepicker: function (o) { 42550 o = o || {}; 42551 var tmp_args = arguments; 42552 42553 if (typeof(o) === 'string') { 42554 if (o === 'getDate' || (o === 'option' && tmp_args.length === 2 && typeof (tmp_args[1]) === 'string')) { 42555 return $.fn.datepicker.apply($(this[0]), tmp_args); 42556 } else { 42557 return this.each(function () { 42558 var $t = $(this); 42559 $t.datepicker.apply($t, tmp_args); 42560 }); 42561 } 42562 } else { 42563 return this.each(function () { 42564 var $t = $(this); 42565 $t.datepicker($.timepicker._newInst($t, o)._defaults); 42566 }); 42567 } 42568 } 42569 }); 42570 42571 /* 42572 * Public Utility to parse date and time 42573 */ 42574 $.datepicker.parseDateTime = function (dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) { 42575 var parseRes = parseDateTimeInternal(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings); 42576 if (parseRes.timeObj) { 42577 var t = parseRes.timeObj; 42578 parseRes.date.setHours(t.hour, t.minute, t.second, t.millisec); 42579 parseRes.date.setMicroseconds(t.microsec); 42580 } 42581 42582 return parseRes.date; 42583 }; 42584 42585 /* 42586 * Public utility to parse time 42587 */ 42588 $.datepicker.parseTime = function (timeFormat, timeString, options) { 42589 var o = extendRemove(extendRemove({}, $.timepicker._defaults), options || {}), 42590 iso8601 = (timeFormat.replace(/\'.*?\'/g, '').indexOf('Z') !== -1); 42591 42592 // Strict parse requires the timeString to match the timeFormat exactly 42593 var strictParse = function (f, s, o) { 42594 42595 // pattern for standard and localized AM/PM markers 42596 var getPatternAmpm = function (amNames, pmNames) { 42597 var markers = []; 42598 if (amNames) { 42599 $.merge(markers, amNames); 42600 } 42601 if (pmNames) { 42602 $.merge(markers, pmNames); 42603 } 42604 markers = $.map(markers, function (val) { 42605 return val.replace(/[.*+?|()\[\]{}\\]/g, '\\$&'); 42606 }); 42607 return '(' + markers.join('|') + ')?'; 42608 }; 42609 42610 // figure out position of time elements.. cause js cant do named captures 42611 var getFormatPositions = function (timeFormat) { 42612 var finds = timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g), 42613 orders = { 42614 h: -1, 42615 m: -1, 42616 s: -1, 42617 l: -1, 42618 c: -1, 42619 t: -1, 42620 z: -1 42621 }; 42622 42623 if (finds) { 42624 for (var i = 0; i < finds.length; i++) { 42625 if (orders[finds[i].toString().charAt(0)] === -1) { 42626 orders[finds[i].toString().charAt(0)] = i + 1; 42627 } 42628 } 42629 } 42630 return orders; 42631 }; 42632 42633 var regstr = '^' + f.toString() 42634 .replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g, function (match) { 42635 var ml = match.length; 42636 switch (match.charAt(0).toLowerCase()) { 42637 case 'h': 42638 return ml === 1 ? '(\\d?\\d)' : '(\\d{' + ml + '})'; 42639 case 'm': 42640 return ml === 1 ? '(\\d?\\d)' : '(\\d{' + ml + '})'; 42641 case 's': 42642 return ml === 1 ? '(\\d?\\d)' : '(\\d{' + ml + '})'; 42643 case 'l': 42644 return '(\\d?\\d?\\d)'; 42645 case 'c': 42646 return '(\\d?\\d?\\d)'; 42647 case 'z': 42648 return '(z|[-+]\\d\\d:?\\d\\d|\\S+)?'; 42649 case 't': 42650 return getPatternAmpm(o.amNames, o.pmNames); 42651 default: // literal escaped in quotes 42652 return '(' + match.replace(/\'/g, "").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g, function (m) { return "\\" + m; }) + ')?'; 42653 } 42654 }) 42655 .replace(/\s/g, '\\s?') + 42656 o.timeSuffix + '$', 42657 order = getFormatPositions(f), 42658 ampm = '', 42659 treg; 42660 42661 treg = s.match(new RegExp(regstr, 'i')); 42662 42663 var resTime = { 42664 hour: 0, 42665 minute: 0, 42666 second: 0, 42667 millisec: 0, 42668 microsec: 0 42669 }; 42670 42671 if (treg) { 42672 if (order.t !== -1) { 42673 if (treg[order.t] === undefined || treg[order.t].length === 0) { 42674 ampm = ''; 42675 resTime.ampm = ''; 42676 } else { 42677 ampm = $.inArray(treg[order.t].toUpperCase(), $.map(o.amNames, function (x,i) { return x.toUpperCase(); })) !== -1 ? 'AM' : 'PM'; 42678 resTime.ampm = o[ampm === 'AM' ? 'amNames' : 'pmNames'][0]; 42679 } 42680 } 42681 42682 if (order.h !== -1) { 42683 if (ampm === 'AM' && treg[order.h] === '12') { 42684 resTime.hour = 0; // 12am = 0 hour 42685 } else { 42686 if (ampm === 'PM' && treg[order.h] !== '12') { 42687 resTime.hour = parseInt(treg[order.h], 10) + 12; // 12pm = 12 hour, any other pm = hour + 12 42688 } else { 42689 resTime.hour = Number(treg[order.h]); 42690 } 42691 } 42692 } 42693 42694 if (order.m !== -1) { 42695 resTime.minute = Number(treg[order.m]); 42696 } 42697 if (order.s !== -1) { 42698 resTime.second = Number(treg[order.s]); 42699 } 42700 if (order.l !== -1) { 42701 resTime.millisec = Number(treg[order.l]); 42702 } 42703 if (order.c !== -1) { 42704 resTime.microsec = Number(treg[order.c]); 42705 } 42706 if (order.z !== -1 && treg[order.z] !== undefined) { 42707 resTime.timezone = $.timepicker.timezoneOffsetNumber(treg[order.z]); 42708 } 42709 42710 42711 return resTime; 42712 } 42713 return false; 42714 };// end strictParse 42715 42716 // First try JS Date, if that fails, use strictParse 42717 var looseParse = function (f, s, o) { 42718 try { 42719 var d = new Date('2012-01-01 ' + s); 42720 if (isNaN(d.getTime())) { 42721 d = new Date('2012-01-01T' + s); 42722 if (isNaN(d.getTime())) { 42723 d = new Date('01/01/2012 ' + s); 42724 if (isNaN(d.getTime())) { 42725 throw "Unable to parse time with native Date: " + s; 42726 } 42727 } 42728 } 42729 42730 return { 42731 hour: d.getHours(), 42732 minute: d.getMinutes(), 42733 second: d.getSeconds(), 42734 millisec: d.getMilliseconds(), 42735 microsec: d.getMicroseconds(), 42736 timezone: d.getTimezoneOffset() * -1 42737 }; 42738 } 42739 catch (err) { 42740 try { 42741 return strictParse(f, s, o); 42742 } 42743 catch (err2) { 42744 $.timepicker.log("Unable to parse \ntimeString: " + s + "\ntimeFormat: " + f); 42745 } 42746 } 42747 return false; 42748 }; // end looseParse 42749 42750 if (typeof o.parse === "function") { 42751 return o.parse(timeFormat, timeString, o); 42752 } 42753 if (o.parse === 'loose') { 42754 return looseParse(timeFormat, timeString, o); 42755 } 42756 return strictParse(timeFormat, timeString, o); 42757 }; 42758 42759 /** 42760 * Public utility to format the time 42761 * @param {string} format format of the time 42762 * @param {Object} time Object not a Date for timezones 42763 * @param {Object} [options] essentially the regional[].. amNames, pmNames, ampm 42764 * @returns {string} the formatted time 42765 */ 42766 $.datepicker.formatTime = function (format, time, options) { 42767 options = options || {}; 42768 options = $.extend({}, $.timepicker._defaults, options); 42769 time = $.extend({ 42770 hour: 0, 42771 minute: 0, 42772 second: 0, 42773 millisec: 0, 42774 microsec: 0, 42775 timezone: null 42776 }, time); 42777 42778 var tmptime = format, 42779 ampmName = options.amNames[0], 42780 hour = parseInt(time.hour, 10); 42781 42782 if (hour > 11) { 42783 ampmName = options.pmNames[0]; 42784 } 42785 42786 tmptime = tmptime.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g, function (match) { 42787 switch (match) { 42788 case 'HH': 42789 return ('0' + hour).slice(-2); 42790 case 'H': 42791 return hour; 42792 case 'hh': 42793 return ('0' + convert24to12(hour)).slice(-2); 42794 case 'h': 42795 return convert24to12(hour); 42796 case 'mm': 42797 return ('0' + time.minute).slice(-2); 42798 case 'm': 42799 return time.minute; 42800 case 'ss': 42801 return ('0' + time.second).slice(-2); 42802 case 's': 42803 return time.second; 42804 case 'l': 42805 return ('00' + time.millisec).slice(-3); 42806 case 'c': 42807 return ('00' + time.microsec).slice(-3); 42808 case 'z': 42809 return $.timepicker.timezoneOffsetString(time.timezone === null ? options.timezone : time.timezone, false); 42810 case 'Z': 42811 return $.timepicker.timezoneOffsetString(time.timezone === null ? options.timezone : time.timezone, true); 42812 case 'T': 42813 return ampmName.charAt(0).toUpperCase(); 42814 case 'TT': 42815 return ampmName.toUpperCase(); 42816 case 't': 42817 return ampmName.charAt(0).toLowerCase(); 42818 case 'tt': 42819 return ampmName.toLowerCase(); 42820 default: 42821 return match.replace(/'/g, ""); 42822 } 42823 }); 42824 42825 return tmptime; 42826 }; 42827 42828 /* 42829 * the bad hack :/ override datepicker so it doesn't close on select 42830 // inspired: http://stackoverflow.com/questions/1252512/jquery-datepicker-prevent-closing-picker-when-clicking-a-date/1762378#1762378 42831 */ 42832 $.datepicker._base_selectDate = $.datepicker._selectDate; 42833 $.datepicker._selectDate = function (id, dateStr) { 42834 var inst = this._getInst($(id)[0]), 42835 tp_inst = this._get(inst, 'timepicker'), 42836 was_inline; 42837 42838 if (tp_inst && inst.settings.showTimepicker) { 42839 tp_inst._limitMinMaxDateTime(inst, true); 42840 was_inline = inst.inline; 42841 inst.inline = inst.stay_open = true; 42842 //This way the onSelect handler called from calendarpicker get the full dateTime 42843 this._base_selectDate(id, dateStr); 42844 inst.inline = was_inline; 42845 inst.stay_open = false; 42846 this._notifyChange(inst); 42847 this._updateDatepicker(inst); 42848 } else { 42849 this._base_selectDate(id, dateStr); 42850 } 42851 }; 42852 42853 /* 42854 * second bad hack :/ override datepicker so it triggers an event when changing the input field 42855 * and does not redraw the datepicker on every selectDate event 42856 */ 42857 $.datepicker._base_updateDatepicker = $.datepicker._updateDatepicker; 42858 $.datepicker._updateDatepicker = function (inst) { 42859 42860 // don't popup the datepicker if there is another instance already opened 42861 var input = inst.input[0]; 42862 if ($.datepicker._curInst && $.datepicker._curInst !== inst && $.datepicker._datepickerShowing && $.datepicker._lastInput !== input) { 42863 return; 42864 } 42865 42866 if (typeof(inst.stay_open) !== 'boolean' || inst.stay_open === false) { 42867 42868 this._base_updateDatepicker(inst); 42869 42870 // Reload the time control when changing something in the input text field. 42871 var tp_inst = this._get(inst, 'timepicker'); 42872 if (tp_inst) { 42873 tp_inst._addTimePicker(inst); 42874 } 42875 } 42876 }; 42877 42878 /* 42879 * third bad hack :/ override datepicker so it allows spaces and colon in the input field 42880 */ 42881 $.datepicker._base_doKeyPress = $.datepicker._doKeyPress; 42882 $.datepicker._doKeyPress = function (event) { 42883 var inst = $.datepicker._getInst(event.target), 42884 tp_inst = $.datepicker._get(inst, 'timepicker'); 42885 42886 if (tp_inst) { 42887 if ($.datepicker._get(inst, 'constrainInput')) { 42888 var ampm = tp_inst.support.ampm, 42889 tz = tp_inst._defaults.showTimezone !== null ? tp_inst._defaults.showTimezone : tp_inst.support.timezone, 42890 dateChars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat')), 42891 datetimeChars = tp_inst._defaults.timeFormat.toString() 42892 .replace(/[hms]/g, '') 42893 .replace(/TT/g, ampm ? 'APM' : '') 42894 .replace(/Tt/g, ampm ? 'AaPpMm' : '') 42895 .replace(/tT/g, ampm ? 'AaPpMm' : '') 42896 .replace(/T/g, ampm ? 'AP' : '') 42897 .replace(/tt/g, ampm ? 'apm' : '') 42898 .replace(/t/g, ampm ? 'ap' : '') + 42899 " " + tp_inst._defaults.separator + 42900 tp_inst._defaults.timeSuffix + 42901 (tz ? tp_inst._defaults.timezoneList.join('') : '') + 42902 (tp_inst._defaults.amNames.join('')) + (tp_inst._defaults.pmNames.join('')) + 42903 dateChars, 42904 chr = String.fromCharCode(event.charCode === undefined ? event.keyCode : event.charCode); 42905 return event.ctrlKey || (chr < ' ' || !dateChars || datetimeChars.indexOf(chr) > -1); 42906 } 42907 } 42908 42909 return $.datepicker._base_doKeyPress(event); 42910 }; 42911 42912 /* 42913 * Fourth bad hack :/ override _updateAlternate function used in inline mode to init altField 42914 * Update any alternate field to synchronise with the main field. 42915 */ 42916 $.datepicker._base_updateAlternate = $.datepicker._updateAlternate; 42917 $.datepicker._updateAlternate = function (inst) { 42918 var tp_inst = this._get(inst, 'timepicker'); 42919 if (tp_inst) { 42920 var altField = tp_inst._defaults.altField; 42921 if (altField) { // update alternate field too 42922 var altFormat = tp_inst._defaults.altFormat || tp_inst._defaults.dateFormat, 42923 date = this._getDate(inst), 42924 formatCfg = $.datepicker._getFormatConfig(inst), 42925 altFormattedDateTime = '', 42926 altSeparator = tp_inst._defaults.altSeparator ? tp_inst._defaults.altSeparator : tp_inst._defaults.separator, 42927 altTimeSuffix = tp_inst._defaults.altTimeSuffix ? tp_inst._defaults.altTimeSuffix : tp_inst._defaults.timeSuffix, 42928 altTimeFormat = tp_inst._defaults.altTimeFormat !== null ? tp_inst._defaults.altTimeFormat : tp_inst._defaults.timeFormat; 42929 42930 altFormattedDateTime += $.datepicker.formatTime(altTimeFormat, tp_inst, tp_inst._defaults) + altTimeSuffix; 42931 if (!tp_inst._defaults.timeOnly && !tp_inst._defaults.altFieldTimeOnly && date !== null) { 42932 if (tp_inst._defaults.altFormat) { 42933 altFormattedDateTime = $.datepicker.formatDate(tp_inst._defaults.altFormat, date, formatCfg) + altSeparator + altFormattedDateTime; 42934 } 42935 else { 42936 altFormattedDateTime = tp_inst.formattedDate + altSeparator + altFormattedDateTime; 42937 } 42938 } 42939 $(altField).val( inst.input.val() ? altFormattedDateTime : ""); 42940 } 42941 } 42942 else { 42943 $.datepicker._base_updateAlternate(inst); 42944 } 42945 }; 42946 42947 /* 42948 * Override key up event to sync manual input changes. 42949 */ 42950 $.datepicker._base_doKeyUp = $.datepicker._doKeyUp; 42951 $.datepicker._doKeyUp = function (event) { 42952 var inst = $.datepicker._getInst(event.target), 42953 tp_inst = $.datepicker._get(inst, 'timepicker'); 42954 42955 if (tp_inst) { 42956 if (tp_inst._defaults.timeOnly && (inst.input.val() !== inst.lastVal)) { 42957 try { 42958 $.datepicker._updateDatepicker(inst); 42959 } catch (err) { 42960 $.timepicker.log(err); 42961 } 42962 } 42963 } 42964 42965 return $.datepicker._base_doKeyUp(event); 42966 }; 42967 42968 /* 42969 * override "Today" button to also grab the time and set it to input field. 42970 */ 42971 $.datepicker._base_gotoToday = $.datepicker._gotoToday; 42972 $.datepicker._gotoToday = function (id) { 42973 var inst = this._getInst($(id)[0]); 42974 this._base_gotoToday(id); 42975 var tp_inst = this._get(inst, 'timepicker'); 42976 if (!tp_inst) { 42977 return; 42978 } 42979 42980 var tzoffset = $.timepicker.timezoneOffsetNumber(tp_inst.timezone); 42981 var now = new Date(); 42982 now.setMinutes(now.getMinutes() + now.getTimezoneOffset() + parseInt(tzoffset, 10)); 42983 this._setTime(inst, now); 42984 this._setDate(inst, now); 42985 tp_inst._onSelectHandler(); 42986 }; 42987 42988 /* 42989 * Disable & enable the Time in the datetimepicker 42990 */ 42991 $.datepicker._disableTimepickerDatepicker = function (target) { 42992 var inst = this._getInst(target); 42993 if (!inst) { 42994 return; 42995 } 42996 42997 var tp_inst = this._get(inst, 'timepicker'); 42998 $(target).datepicker('getDate'); // Init selected[Year|Month|Day] 42999 if (tp_inst) { 43000 inst.settings.showTimepicker = false; 43001 tp_inst._defaults.showTimepicker = false; 43002 tp_inst._updateDateTime(inst); 43003 } 43004 }; 43005 43006 $.datepicker._enableTimepickerDatepicker = function (target) { 43007 var inst = this._getInst(target); 43008 if (!inst) { 43009 return; 43010 } 43011 43012 var tp_inst = this._get(inst, 'timepicker'); 43013 $(target).datepicker('getDate'); // Init selected[Year|Month|Day] 43014 if (tp_inst) { 43015 inst.settings.showTimepicker = true; 43016 tp_inst._defaults.showTimepicker = true; 43017 tp_inst._addTimePicker(inst); // Could be disabled on page load 43018 tp_inst._updateDateTime(inst); 43019 } 43020 }; 43021 43022 /* 43023 * Create our own set time function 43024 */ 43025 $.datepicker._setTime = function (inst, date) { 43026 var tp_inst = this._get(inst, 'timepicker'); 43027 if (tp_inst) { 43028 var defaults = tp_inst._defaults; 43029 43030 // calling _setTime with no date sets time to defaults 43031 tp_inst.hour = date ? date.getHours() : defaults.hour; 43032 tp_inst.minute = date ? date.getMinutes() : defaults.minute; 43033 tp_inst.second = date ? date.getSeconds() : defaults.second; 43034 tp_inst.millisec = date ? date.getMilliseconds() : defaults.millisec; 43035 tp_inst.microsec = date ? date.getMicroseconds() : defaults.microsec; 43036 43037 //check if within min/max times.. 43038 tp_inst._limitMinMaxDateTime(inst, true); 43039 43040 tp_inst._onTimeChange(); 43041 tp_inst._updateDateTime(inst); 43042 } 43043 }; 43044 43045 /* 43046 * Create new public method to set only time, callable as $().datepicker('setTime', date) 43047 */ 43048 $.datepicker._setTimeDatepicker = function (target, date, withDate) { 43049 var inst = this._getInst(target); 43050 if (!inst) { 43051 return; 43052 } 43053 43054 var tp_inst = this._get(inst, 'timepicker'); 43055 43056 if (tp_inst) { 43057 this._setDateFromField(inst); 43058 var tp_date; 43059 if (date) { 43060 if (typeof date === "string") { 43061 tp_inst._parseTime(date, withDate); 43062 tp_date = new Date(); 43063 tp_date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec); 43064 tp_date.setMicroseconds(tp_inst.microsec); 43065 } else { 43066 tp_date = new Date(date.getTime()); 43067 tp_date.setMicroseconds(date.getMicroseconds()); 43068 } 43069 if (tp_date.toString() === 'Invalid Date') { 43070 tp_date = undefined; 43071 } 43072 this._setTime(inst, tp_date); 43073 } 43074 } 43075 43076 }; 43077 43078 /* 43079 * override setDate() to allow setting time too within Date object 43080 */ 43081 $.datepicker._base_setDateDatepicker = $.datepicker._setDateDatepicker; 43082 $.datepicker._setDateDatepicker = function (target, _date) { 43083 var inst = this._getInst(target); 43084 var date = _date; 43085 if (!inst) { 43086 return; 43087 } 43088 43089 if (typeof(_date) === 'string') { 43090 date = new Date(_date); 43091 if (!date.getTime()) { 43092 this._base_setDateDatepicker.apply(this, arguments); 43093 date = $(target).datepicker('getDate'); 43094 } 43095 } 43096 43097 var tp_inst = this._get(inst, 'timepicker'); 43098 var tp_date; 43099 if (date instanceof Date) { 43100 tp_date = new Date(date.getTime()); 43101 tp_date.setMicroseconds(date.getMicroseconds()); 43102 } else { 43103 tp_date = date; 43104 } 43105 43106 // This is important if you are using the timezone option, javascript's Date 43107 // object will only return the timezone offset for the current locale, so we 43108 // adjust it accordingly. If not using timezone option this won't matter.. 43109 // If a timezone is different in tp, keep the timezone as is 43110 if (tp_inst && tp_date) { 43111 // look out for DST if tz wasn't specified 43112 if (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) { 43113 tp_inst.timezone = tp_date.getTimezoneOffset() * -1; 43114 } 43115 date = $.timepicker.timezoneAdjust(date, $.timepicker.timezoneOffsetString(-date.getTimezoneOffset()), tp_inst.timezone); 43116 tp_date = $.timepicker.timezoneAdjust(tp_date, $.timepicker.timezoneOffsetString(-tp_date.getTimezoneOffset()), tp_inst.timezone); 43117 } 43118 43119 this._updateDatepicker(inst); 43120 this._base_setDateDatepicker.apply(this, arguments); 43121 this._setTimeDatepicker(target, tp_date, true); 43122 }; 43123 43124 /* 43125 * override getDate() to allow getting time too within Date object 43126 */ 43127 $.datepicker._base_getDateDatepicker = $.datepicker._getDateDatepicker; 43128 $.datepicker._getDateDatepicker = function (target, noDefault) { 43129 var inst = this._getInst(target); 43130 if (!inst) { 43131 return; 43132 } 43133 43134 var tp_inst = this._get(inst, 'timepicker'); 43135 43136 if (tp_inst) { 43137 // if it hasn't yet been defined, grab from field 43138 if (inst.lastVal === undefined) { 43139 this._setDateFromField(inst, noDefault); 43140 } 43141 43142 var date = this._getDate(inst); 43143 43144 var currDT = null; 43145 43146 if (tp_inst.$altInput && tp_inst._defaults.altFieldTimeOnly) { 43147 currDT = tp_inst.$input.val() + ' ' + tp_inst.$altInput.val(); 43148 } 43149 else if (tp_inst.$input.get(0).tagName !== 'INPUT' && tp_inst.$altInput) { 43150 /** 43151 * in case the datetimepicker has been applied to a non-input tag for inline UI, 43152 * and the user has not configured the plugin to display only time in altInput, 43153 * pick current date time from the altInput (and hope for the best, for now, until "ER1" is applied) 43154 * 43155 * @todo ER1. Since altInput can have a totally difference format, convert it to standard format by reading input format from "altFormat" and "altTimeFormat" option values 43156 */ 43157 currDT = tp_inst.$altInput.val(); 43158 } 43159 else { 43160 currDT = tp_inst.$input.val(); 43161 } 43162 43163 if (date && tp_inst._parseTime(currDT, !inst.settings.timeOnly)) { 43164 date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec); 43165 date.setMicroseconds(tp_inst.microsec); 43166 43167 // This is important if you are using the timezone option, javascript's Date 43168 // object will only return the timezone offset for the current locale, so we 43169 // adjust it accordingly. If not using timezone option this won't matter.. 43170 if (tp_inst.timezone != null) { 43171 // look out for DST if tz wasn't specified 43172 if (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) { 43173 tp_inst.timezone = date.getTimezoneOffset() * -1; 43174 } 43175 date = $.timepicker.timezoneAdjust(date, tp_inst.timezone, $.timepicker.timezoneOffsetString(-date.getTimezoneOffset())); 43176 } 43177 } 43178 return date; 43179 } 43180 return this._base_getDateDatepicker(target, noDefault); 43181 }; 43182 43183 /* 43184 * override parseDate() because UI 1.8.14 throws an error about "Extra characters" 43185 * An option in datapicker to ignore extra format characters would be nicer. 43186 */ 43187 $.datepicker._base_parseDate = $.datepicker.parseDate; 43188 $.datepicker.parseDate = function (format, value, settings) { 43189 var date; 43190 try { 43191 date = this._base_parseDate(format, value, settings); 43192 } catch (err) { 43193 // Hack! The error message ends with a colon, a space, and 43194 // the "extra" characters. We rely on that instead of 43195 // attempting to perfectly reproduce the parsing algorithm. 43196 if (err.indexOf(":") >= 0) { 43197 date = this._base_parseDate(format, value.substring(0, value.length - (err.length - err.indexOf(':') - 2)), settings); 43198 $.timepicker.log("Error parsing the date string: " + err + "\ndate string = " + value + "\ndate format = " + format); 43199 } else { 43200 throw err; 43201 } 43202 } 43203 return date; 43204 }; 43205 43206 /* 43207 * override formatDate to set date with time to the input 43208 */ 43209 $.datepicker._base_formatDate = $.datepicker._formatDate; 43210 $.datepicker._formatDate = function (inst, day, month, year) { 43211 var tp_inst = this._get(inst, 'timepicker'); 43212 if (tp_inst) { 43213 tp_inst._updateDateTime(inst); 43214 return tp_inst.$input.val(); 43215 } 43216 return this._base_formatDate(inst); 43217 }; 43218 43219 /* 43220 * override options setter to add time to maxDate(Time) and minDate(Time). MaxDate 43221 */ 43222 $.datepicker._base_optionDatepicker = $.datepicker._optionDatepicker; 43223 $.datepicker._optionDatepicker = function (target, name, value) { 43224 var inst = this._getInst(target), 43225 name_clone; 43226 if (!inst) { 43227 return null; 43228 } 43229 43230 var tp_inst = this._get(inst, 'timepicker'); 43231 if (tp_inst) { 43232 var min = null, 43233 max = null, 43234 onselect = null, 43235 overrides = tp_inst._defaults.evnts, 43236 fns = {}, 43237 prop, 43238 ret, 43239 oldVal, 43240 $target; 43241 if (typeof name === 'string') { // if min/max was set with the string 43242 if (name === 'minDate' || name === 'minDateTime') { 43243 min = value; 43244 } else if (name === 'maxDate' || name === 'maxDateTime') { 43245 max = value; 43246 } else if (name === 'onSelect') { 43247 onselect = value; 43248 } else if (overrides.hasOwnProperty(name)) { 43249 if (typeof (value) === 'undefined') { 43250 return overrides[name]; 43251 } 43252 fns[name] = value; 43253 name_clone = {}; //empty results in exiting function after overrides updated 43254 } 43255 } else if (typeof name === 'object') { //if min/max was set with the JSON 43256 if (name.minDate) { 43257 min = name.minDate; 43258 } else if (name.minDateTime) { 43259 min = name.minDateTime; 43260 } else if (name.maxDate) { 43261 max = name.maxDate; 43262 } else if (name.maxDateTime) { 43263 max = name.maxDateTime; 43264 } 43265 for (prop in overrides) { 43266 if (overrides.hasOwnProperty(prop) && name[prop]) { 43267 fns[prop] = name[prop]; 43268 } 43269 } 43270 } 43271 for (prop in fns) { 43272 if (fns.hasOwnProperty(prop)) { 43273 overrides[prop] = fns[prop]; 43274 if (!name_clone) { name_clone = $.extend({}, name); } 43275 delete name_clone[prop]; 43276 } 43277 } 43278 if (name_clone && isEmptyObject(name_clone)) { return; } 43279 if (min) { //if min was set 43280 if (min === 0) { 43281 min = new Date(); 43282 } else { 43283 min = new Date(min); 43284 } 43285 tp_inst._defaults.minDate = min; 43286 tp_inst._defaults.minDateTime = min; 43287 } else if (max) { //if max was set 43288 if (max === 0) { 43289 max = new Date(); 43290 } else { 43291 max = new Date(max); 43292 } 43293 tp_inst._defaults.maxDate = max; 43294 tp_inst._defaults.maxDateTime = max; 43295 } else if (onselect) { 43296 tp_inst._defaults.onSelect = onselect; 43297 } 43298 43299 // Datepicker will override our date when we call _base_optionDatepicker when 43300 // calling minDate/maxDate, so we will first grab the value, call 43301 // _base_optionDatepicker, then set our value back. 43302 if(min || max){ 43303 $target = $(target); 43304 oldVal = $target.datetimepicker('getDate'); 43305 ret = this._base_optionDatepicker.call($.datepicker, target, name_clone || name, value); 43306 $target.datetimepicker('setDate', oldVal); 43307 return ret; 43308 } 43309 } 43310 if (value === undefined) { 43311 return this._base_optionDatepicker.call($.datepicker, target, name); 43312 } 43313 return this._base_optionDatepicker.call($.datepicker, target, name_clone || name, value); 43314 }; 43315 43316 /* 43317 * jQuery isEmptyObject does not check hasOwnProperty - if someone has added to the object prototype, 43318 * it will return false for all objects 43319 */ 43320 var isEmptyObject = function (obj) { 43321 var prop; 43322 for (prop in obj) { 43323 if (obj.hasOwnProperty(prop)) { 43324 return false; 43325 } 43326 } 43327 return true; 43328 }; 43329 43330 /* 43331 * jQuery extend now ignores nulls! 43332 */ 43333 var extendRemove = function (target, props) { 43334 $.extend(target, props); 43335 for (var name in props) { 43336 if (props[name] === null || props[name] === undefined) { 43337 target[name] = props[name]; 43338 } 43339 } 43340 return target; 43341 }; 43342 43343 /* 43344 * Determine by the time format which units are supported 43345 * Returns an object of booleans for each unit 43346 */ 43347 var detectSupport = function (timeFormat) { 43348 var tf = timeFormat.replace(/'.*?'/g, '').toLowerCase(), // removes literals 43349 isIn = function (f, t) { // does the format contain the token? 43350 return f.indexOf(t) !== -1 ? true : false; 43351 }; 43352 return { 43353 hour: isIn(tf, 'h'), 43354 minute: isIn(tf, 'm'), 43355 second: isIn(tf, 's'), 43356 millisec: isIn(tf, 'l'), 43357 microsec: isIn(tf, 'c'), 43358 timezone: isIn(tf, 'z'), 43359 ampm: isIn(tf, 't') && isIn(timeFormat, 'h'), 43360 iso8601: isIn(timeFormat, 'Z') 43361 }; 43362 }; 43363 43364 /* 43365 * Converts 24 hour format into 12 hour 43366 * Returns 12 hour without leading 0 43367 */ 43368 var convert24to12 = function (hour) { 43369 hour %= 12; 43370 43371 if (hour === 0) { 43372 hour = 12; 43373 } 43374 43375 return String(hour); 43376 }; 43377 43378 var computeEffectiveSetting = function (settings, property) { 43379 return settings && settings[property] ? settings[property] : $.timepicker._defaults[property]; 43380 }; 43381 43382 /* 43383 * Splits datetime string into date and time substrings. 43384 * Throws exception when date can't be parsed 43385 * Returns {dateString: dateString, timeString: timeString} 43386 */ 43387 var splitDateTime = function (dateTimeString, timeSettings) { 43388 // The idea is to get the number separator occurrences in datetime and the time format requested (since time has 43389 // fewer unknowns, mostly numbers and am/pm). We will use the time pattern to split. 43390 var separator = computeEffectiveSetting(timeSettings, 'separator'), 43391 format = computeEffectiveSetting(timeSettings, 'timeFormat'), 43392 timeParts = format.split(separator), // how many occurrences of separator may be in our format? 43393 timePartsLen = timeParts.length, 43394 allParts = dateTimeString.split(separator), 43395 allPartsLen = allParts.length; 43396 43397 if (allPartsLen > 1) { 43398 return { 43399 dateString: allParts.splice(0, allPartsLen - timePartsLen).join(separator), 43400 timeString: allParts.splice(0, timePartsLen).join(separator) 43401 }; 43402 } 43403 43404 return { 43405 dateString: dateTimeString, 43406 timeString: '' 43407 }; 43408 }; 43409 43410 /* 43411 * Internal function to parse datetime interval 43412 * Returns: {date: Date, timeObj: Object}, where 43413 * date - parsed date without time (type Date) 43414 * timeObj = {hour: , minute: , second: , millisec: , microsec: } - parsed time. Optional 43415 */ 43416 var parseDateTimeInternal = function (dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) { 43417 var date, 43418 parts, 43419 parsedTime; 43420 43421 parts = splitDateTime(dateTimeString, timeSettings); 43422 date = $.datepicker._base_parseDate(dateFormat, parts.dateString, dateSettings); 43423 43424 if (parts.timeString === '') { 43425 return { 43426 date: date 43427 }; 43428 } 43429 43430 parsedTime = $.datepicker.parseTime(timeFormat, parts.timeString, timeSettings); 43431 43432 if (!parsedTime) { 43433 throw 'Wrong time format'; 43434 } 43435 43436 return { 43437 date: date, 43438 timeObj: parsedTime 43439 }; 43440 }; 43441 43442 /* 43443 * Internal function to set timezone_select to the local timezone 43444 */ 43445 var selectLocalTimezone = function (tp_inst, date) { 43446 if (tp_inst && tp_inst.timezone_select) { 43447 var now = date || new Date(); 43448 tp_inst.timezone_select.val(-now.getTimezoneOffset()); 43449 } 43450 }; 43451 43452 /* 43453 * Create a Singleton Instance 43454 */ 43455 $.timepicker = new Timepicker(); 43456 43457 /** 43458 * Get the timezone offset as string from a date object (eg '+0530' for UTC+5.5) 43459 * @param {number} tzMinutes if not a number, less than -720 (-1200), or greater than 840 (+1400) this value is returned 43460 * @param {boolean} iso8601 if true formats in accordance to iso8601 "+12:45" 43461 * @return {string} 43462 */ 43463 $.timepicker.timezoneOffsetString = function (tzMinutes, iso8601) { 43464 if (isNaN(tzMinutes) || tzMinutes > 840 || tzMinutes < -720) { 43465 return tzMinutes; 43466 } 43467 43468 var off = tzMinutes, 43469 minutes = off % 60, 43470 hours = (off - minutes) / 60, 43471 iso = iso8601 ? ':' : '', 43472 tz = (off >= 0 ? '+' : '-') + ('0' + Math.abs(hours)).slice(-2) + iso + ('0' + Math.abs(minutes)).slice(-2); 43473 43474 if (tz === '+00:00') { 43475 return 'Z'; 43476 } 43477 return tz; 43478 }; 43479 43480 /** 43481 * Get the number in minutes that represents a timezone string 43482 * @param {string} tzString formatted like "+0500", "-1245", "Z" 43483 * @return {number} the offset minutes or the original string if it doesn't match expectations 43484 */ 43485 $.timepicker.timezoneOffsetNumber = function (tzString) { 43486 var normalized = tzString.toString().replace(':', ''); // excuse any iso8601, end up with "+1245" 43487 43488 if (normalized.toUpperCase() === 'Z') { // if iso8601 with Z, its 0 minute offset 43489 return 0; 43490 } 43491 43492 if (!/^(\-|\+)\d{4}$/.test(normalized)) { // possibly a user defined tz, so just give it back 43493 return parseInt(tzString, 10); 43494 } 43495 43496 return ((normalized.substr(0, 1) === '-' ? -1 : 1) * // plus or minus 43497 ((parseInt(normalized.substr(1, 2), 10) * 60) + // hours (converted to minutes) 43498 parseInt(normalized.substr(3, 2), 10))); // minutes 43499 }; 43500 43501 /** 43502 * No way to set timezone in js Date, so we must adjust the minutes to compensate. (think setDate, getDate) 43503 * @param {Date} date 43504 * @param {string} fromTimezone formatted like "+0500", "-1245" 43505 * @param {string} toTimezone formatted like "+0500", "-1245" 43506 * @return {Date} 43507 */ 43508 $.timepicker.timezoneAdjust = function (date, fromTimezone, toTimezone) { 43509 var fromTz = $.timepicker.timezoneOffsetNumber(fromTimezone); 43510 var toTz = $.timepicker.timezoneOffsetNumber(toTimezone); 43511 if (!isNaN(toTz)) { 43512 date.setMinutes(date.getMinutes() + (-fromTz) - (-toTz)); 43513 } 43514 return date; 43515 }; 43516 43517 /** 43518 * Calls `timepicker()` on the `startTime` and `endTime` elements, and configures them to 43519 * enforce date range limits. 43520 * n.b. The input value must be correctly formatted (reformatting is not supported) 43521 * @param {Element} startTime 43522 * @param {Element} endTime 43523 * @param {Object} options Options for the timepicker() call 43524 * @return {jQuery} 43525 */ 43526 $.timepicker.timeRange = function (startTime, endTime, options) { 43527 return $.timepicker.handleRange('timepicker', startTime, endTime, options); 43528 }; 43529 43530 /** 43531 * Calls `datetimepicker` on the `startTime` and `endTime` elements, and configures them to 43532 * enforce date range limits. 43533 * @param {Element} startTime 43534 * @param {Element} endTime 43535 * @param {Object} options Options for the `timepicker()` call. Also supports `reformat`, 43536 * a boolean value that can be used to reformat the input values to the `dateFormat`. 43537 * @param {string} method Can be used to specify the type of picker to be added 43538 * @return {jQuery} 43539 */ 43540 $.timepicker.datetimeRange = function (startTime, endTime, options) { 43541 $.timepicker.handleRange('datetimepicker', startTime, endTime, options); 43542 }; 43543 43544 /** 43545 * Calls `datepicker` on the `startTime` and `endTime` elements, and configures them to 43546 * enforce date range limits. 43547 * @param {Element} startTime 43548 * @param {Element} endTime 43549 * @param {Object} options Options for the `timepicker()` call. Also supports `reformat`, 43550 * a boolean value that can be used to reformat the input values to the `dateFormat`. 43551 * @return {jQuery} 43552 */ 43553 $.timepicker.dateRange = function (startTime, endTime, options) { 43554 $.timepicker.handleRange('datepicker', startTime, endTime, options); 43555 }; 43556 43557 /** 43558 * Calls `method` on the `startTime` and `endTime` elements, and configures them to 43559 * enforce date range limits. 43560 * @param {string} method Can be used to specify the type of picker to be added 43561 * @param {Element} startTime 43562 * @param {Element} endTime 43563 * @param {Object} options Options for the `timepicker()` call. Also supports `reformat`, 43564 * a boolean value that can be used to reformat the input values to the `dateFormat`. 43565 * @return {jQuery} 43566 */ 43567 $.timepicker.handleRange = function (method, startTime, endTime, options) { 43568 options = $.extend({}, { 43569 minInterval: 0, // min allowed interval in milliseconds 43570 maxInterval: 0, // max allowed interval in milliseconds 43571 start: {}, // options for start picker 43572 end: {} // options for end picker 43573 }, options); 43574 43575 // for the mean time this fixes an issue with calling getDate with timepicker() 43576 var timeOnly = false; 43577 if(method === 'timepicker'){ 43578 timeOnly = true; 43579 method = 'datetimepicker'; 43580 } 43581 43582 function checkDates(changed, other) { 43583 var startdt = startTime[method]('getDate'), 43584 enddt = endTime[method]('getDate'), 43585 changeddt = changed[method]('getDate'); 43586 43587 if (startdt !== null) { 43588 var minDate = new Date(startdt.getTime()), 43589 maxDate = new Date(startdt.getTime()); 43590 43591 minDate.setMilliseconds(minDate.getMilliseconds() + options.minInterval); 43592 maxDate.setMilliseconds(maxDate.getMilliseconds() + options.maxInterval); 43593 43594 if (options.minInterval > 0 && minDate > enddt) { // minInterval check 43595 endTime[method]('setDate', minDate); 43596 } 43597 else if (options.maxInterval > 0 && maxDate < enddt) { // max interval check 43598 endTime[method]('setDate', maxDate); 43599 } 43600 else if (startdt > enddt) { 43601 other[method]('setDate', changeddt); 43602 } 43603 } 43604 } 43605 43606 function selected(changed, other, option) { 43607 if (!changed.val()) { 43608 return; 43609 } 43610 var date = changed[method].call(changed, 'getDate'); 43611 if (date !== null && options.minInterval > 0) { 43612 if (option === 'minDate') { 43613 date.setMilliseconds(date.getMilliseconds() + options.minInterval); 43614 } 43615 if (option === 'maxDate') { 43616 date.setMilliseconds(date.getMilliseconds() - options.minInterval); 43617 } 43618 } 43619 43620 if (date.getTime) { 43621 other[method].call(other, 'option', option, date); 43622 } 43623 } 43624 43625 $.fn[method].call(startTime, $.extend({ 43626 timeOnly: timeOnly, 43627 onClose: function (dateText, inst) { 43628 checkDates($(this), endTime); 43629 }, 43630 onSelect: function (selectedDateTime) { 43631 selected($(this), endTime, 'minDate'); 43632 } 43633 }, options, options.start)); 43634 $.fn[method].call(endTime, $.extend({ 43635 timeOnly: timeOnly, 43636 onClose: function (dateText, inst) { 43637 checkDates($(this), startTime); 43638 }, 43639 onSelect: function (selectedDateTime) { 43640 selected($(this), startTime, 'maxDate'); 43641 } 43642 }, options, options.end)); 43643 43644 checkDates(startTime, endTime); 43645 43646 selected(startTime, endTime, 'minDate'); 43647 selected(endTime, startTime, 'maxDate'); 43648 43649 return $([startTime.get(0), endTime.get(0)]); 43650 }; 43651 43652 /** 43653 * Log error or data to the console during error or debugging 43654 * @param {Object} err pass any type object to log to the console during error or debugging 43655 * @return {void} 43656 */ 43657 $.timepicker.log = function () { 43658 // Older IE (9, maybe 10) throw error on accessing `window.console.log.apply`, so check first. 43659 if (window.console && window.console.log && window.console.log.apply) { 43660 window.console.log.apply(window.console, Array.prototype.slice.call(arguments)); 43661 } 43662 }; 43663 43664 /* 43665 * Add util object to allow access to private methods for testability. 43666 */ 43667 $.timepicker._util = { 43668 _extendRemove: extendRemove, 43669 _isEmptyObject: isEmptyObject, 43670 _convert24to12: convert24to12, 43671 _detectSupport: detectSupport, 43672 _selectLocalTimezone: selectLocalTimezone, 43673 _computeEffectiveSetting: computeEffectiveSetting, 43674 _splitDateTime: splitDateTime, 43675 _parseDateTimeInternal: parseDateTimeInternal 43676 }; 43677 43678 /* 43679 * Microsecond support 43680 */ 43681 if (!Date.prototype.getMicroseconds) { 43682 Date.prototype.microseconds = 0; 43683 Date.prototype.getMicroseconds = function () { return this.microseconds; }; 43684 Date.prototype.setMicroseconds = function (m) { 43685 this.setMilliseconds(this.getMilliseconds() + Math.floor(m / 1000)); 43686 this.microseconds = m % 1000; 43687 return this; 43688 }; 43689 } 43690 43691 /* 43692 * Keep up with the version 43693 */ 43694 $.timepicker.version = "1.6.3"; 43695 43696}));
43697 43698 43699Samui.prototype.explorer = { 43700 list: function(fct, rootID, directory) { 43701 if (rootID === undefined) return false; 43702 if (fct === undefined || {}.toString.call(fct) !== '[object Function]') return false; 43703 $.ajax({ 43704 url: SiteConfig.basepath+"API/explorer.json?root="+rootID+((directory !== undefined) ? "&path="+directory : ""), 43705 type: "GET", 43706 dataType: "json", 43707 success: fct 43708 }); 43709 return true; 43710 }, 43711 rootURL: function() { 43712 return SiteConfig.basepath+"API/explorer.json?"; 43713 }, 43714 crop: function(fct, url, dims, destination, rootID) { 43715 if (url === undefined) return false; 43716 if (fct === undefined || {}.toString.call(fct) !== '[object Function]') return false; 43717 if (dims === undefined || dims.x === undefined || dims.y === undefined || dims.w === undefined || dims.h === undefined) return false; 43718 if (destination === undefined) { 43719 var destination = { }; 43720 } 43721 if (destination.file === undefined) destination.file = "crop-"+Math.floor(Math.random()*10000); 43722 if (destination.dir === undefined) destination.dir = ""; 43723 if (rootID === undefined) rootID = 0; 43724 $.ajax({ 43725 url: SiteConfig.basepath+"API/explorer.json?root="+rootID+"&a=crop", 43726 type: "POST", 43727 data: { 43728 source: url, 43729 crop: dims, 43730 store: destination 43731 }, 43732 success: function(d) { 43733 fct(d); 43734 }, 43735 error: function() { 43736 fct(false); 43737 } 43738 }); 43739 }, 43740 create: function(fct, rootID, folder, name) { 43741 if (rootID === undefined) return false; 43742 if (fct === undefined || {}.toString.call(fct) !== '[object Function]') return false; 43743 if (folder === false) return false; 43744 if (name === undefined) return false; 43745 $.ajax({ 43746 url: SiteConfig.basepath+"API/explorer.json?root="+rootID+((folder !== undefined) ? "&path="+folder : "")+"&a=mkdir", 43747 type: "POST", 43748 data: { 43749 file: name 43750 }, 43751 dataType: "json", 43752 success: function(d) { 43753 if (d.result && d.result.type) { 43754 if (d.result.type === "success") { 43755 fct(d); 43756 } 43757 else { 43758 fct(false); 43759 } 43760 } 43761 else fct(false); 43762 } 43763 }); 43764 }, 43765 move: function(fct, rootID, folder, oldPath, newPath) { 43766 if (rootID === undefined) return false; 43767 if (fct === undefined || {}.toString.call(fct) !== '[object Function]') return false; 43768 if (folder === undefined) return false; 43769 if (newPath === undefined) { 43770 // Deleting 43771 $.ajax({ 43772 url: SiteConfig.basepath+"API/explorer.json?root="+rootID+((folder !== undefined) ? "&path="+folder : "")+"&a=rm", 43773 type: "POST", 43774 data: { 43775 file: oldPath 43776 }, 43777 dataType: "json", 43778 success: function(d) { 43779 if (d.result && d.result.type) { 43780 if (d.result.type === "success") { 43781 fct(d); 43782 } 43783 else { 43784 fct(false); 43785 } 43786 } 43787 else fct(false); 43788 } 43789 }); 43790 } else { 43791 // Moving 43792 $.ajax({ 43793 url: SiteConfig.basepath+"API/explorer.json?root="+rootID+((folder !== undefined) ? "&path="+folder : "")+"&a=mv", 43794 type: "POST", 43795 data: { 43796 oFile: oldPath, 43797 nFile: newPath 43798 }, 43799 dataType: "json", 43800 success: function(d) { 43801 if (d.result && d.result.type) { 43802 if (d.result.type === "success") { 43803 fct(d); 43804 } 43805 else { 43806 fct(false); 43807 } 43808 } 43809 else fct(false); 43810 } 43811 }); 43812 } 43813 return true; 43814 } 43815} 43816 43817Samui.prototype.email = { 43818 form: function(cString) { 43819 var oLay = S.overlay(); 43820 var emailMSG = ""; 43821 var emailSubject = ""; 43822 var html = ""; 43823 if (cString !== undefined && typeof cString == "object") { 43824 if (cString.to !== undefined) var usersGroups = cString.to; 43825 if (cString.subject !== undefined) emailSubject = cString.subject; 43826 if (cString.message !== undefined) emailMSG = cString.message; 43827 } 43828 oLay.title("Send a message..."); 43829 html = $("<p>Using this form, you can send any user present on the CMS a message.</p>"); 43830 var oLayTable = $("<table>").addClass("ui-form ui-widget-content ui-corner-all").css({"width":"80%", "margin": "10px 10% 10px 10%"}); 43831 oLayTable 43832 .append( 43833 $("<tr>") 43834 .append($("<td>To:</td>")) 43835 .append($("<td></td>").append($("<input class='ui-form-dynamicselector' type='text' name='to'/>"))) 43836 ) 43837 .append( 43838 $("<tr>") 43839 .append($("<td>Subject:</td>")) 43840 .append($("<td></td>").append($("<input style='width: 60%' type='text' name='subject'/>").val(emailSubject))) 43841 ) 43842 .append( 43843 $("<tr>") 43844 .append($("<td style='vertical-align: top;'>Message:</td>")) 43845 .append($("<td></td>").append($("<div id='carea' class='richedit richedit-inline'></div>").html(emailMSG))) 43846 ) 43847 .append( 43848 $("<tr>") 43849 .append($("<td style='vertical-align: top;'>Attachment:</td>")) 43850 .append($("<td></td>").append($("<a href='#' class='CMS-document-exchange CMS-document-exchange-attach'>Asset Manager</a>")).append($("<div class='CMS-document-exchange-file-path'></div>"))) 43851 ) 43852 .append( 43853 $("<tr>") 43854 .append($("<td colspan='2' align='right'></td>") 43855 .append($("<button>Send</button>").button().on('click', function() { 43856 var postData = {}; 43857 postData.to = oLayTable.find("input[name='to']").val().split(", "); 43858 postData.subject = oLayTable.find("input[name='subject']").val(); 43859 postData.content = oLayTable.find("div#carea").html(); 43860 postData.attachment = oLayTable.find("div.CMS-document-exchange-file-path").html(); 43861 $("<p>Sending message...</p>").insertAfter($(this)); 43862 $(this).remove(); 43863 $.ajax({ 43864 url: SiteConfig.basepath+"API/cms.json?act=email", 43865 type: "POST", 43866 dataType: "json", 43867 data: postData, 43868 success: function(d) { 43869 if (d.result != "error") { 43870 oLay.htmlContent("<p>Your message has been sucessfully sent.</p>"); 43871 setTimeout(oLay.close, 1500); 43872 } 43873 } 43874 }); 43875 })))) 43876 .appendTo(html); 43877 oLay.htmlContent(html); 43878 S.form.run(oLay); 43879 oLay.show(); 43880 if (usersGroups !== undefined) { 43881 if (usersGroups instanceof Array) { 43882 var cL = ""; 43883 for (var i = 0; i < usersGroups.length; i++) { 43884 if (usersGroups[i][0].substr(0,1) == "u") { 43885 cL = "user"; 43886 } 43887 else cL = "group"; 43888 oLayTable.find("input[name='to']").data("autocomp").addElement(usersGroups[i][0], "<span class=\"user-icon icon-"+cL+"-small\"></span>"+usersGroups[i][1]); 43889 } 43890 } 43891 } 43892 } 43893} 43894 43895Samui.prototype.permissions = { 43896 isPopulated: 0, 43897 _autorunDone: 0, 43898 _autorun: function(callback) { 43899 var vt = this; 43900 var ts = function() { 43901 vt._autorunDone = 1; 43902 if (callback !== undefined) { 43903 callback(); 43904 } 43905 }; 43906 if (vt._autorunDone === 0) { 43907 vt.populate(ts); 43908 } 43909 }, 43910 lists: { 43911 users: [], 43912 groups: [], 43913 countries: [], 43914 interests: [] 43915 }, 43916 selectUser: function(e,selfunc) { 43917 var v = this; 43918 v._autorun(); 43919 e.autocomplete({ 43920 source: function(t1,t2) { 43921 var myObj = []; 43922 var sTerm = t1.term.toLowerCase(); 43923 if ( sTerm.length >=3 ) { 43924 for (var i = 0; i < v.lists.users.length; i++) { 43925 var kName = ((v.lists.users[i].detail_title) ? v.lists.users[i].detail_title+" " : "" )+v.lists.users[i].detail_firstname+" "+v.lists.users[i].detail_surname; 43926 var kEmail = v.lists.users[i].credential_email; 43927 if (kName.toLowerCase().indexOf(sTerm) >= 0 || kEmail.toLowerCase().indexOf(sTerm) >= 0) { 43928 var newObj = { 43929 type: "user", 43930 value: v.lists.users[i].userID, 43931 label: kName, 43932 desc: kEmail 43933 }; 43934 myObj.push(newObj); 43935 } 43936 } 43937 for (var i = 0; i < v.lists.groups.length; i++) { 43938 var kGName = v.lists.groups[i].group_name; 43939 var kGDesc = v.lists.groups[i].group_desc; 43940 if (kGName.toLowerCase().indexOf(sTerm) >= 0 || kGDesc.toLowerCase().indexOf(sTerm) >= 0) { 43941 var newObj = { 43942 type: "group", 43943 value: v.lists.groups[i].group_id, 43944 label: kGName, 43945 desc: kGDesc 43946 }; 43947 myObj.push(newObj); 43948 } 43949 } 43950 for (var i = 0; i < v.lists.countries.length; i++) { 43951 var kCName = v.lists.countries[i].printable_name; 43952 var kCDesc = v.lists.countries[i].iso; 43953 if (kCName.toLowerCase().indexOf(t1.term) >= 0 || kCDesc.toLowerCase().indexOf(t1.term) >= 0) { 43954 var newObj = { 43955 type: "country", 43956 value: v.lists.countries[i].iso, 43957 label: kCName, 43958 desc: kCDesc 43959 }; 43960 myObj.push(newObj); 43961 } 43962 } 43963 for (var i = 0; i < v.lists.interests.length; i++) { 43964 var kIName = v.lists.interests[i].label; 43965 var kIDesc = v.lists.interests[i].value; 43966 if (kIName.toLowerCase().indexOf(t1.term) >= 0 || kIDesc.toLowerCase().indexOf(t1.term) >= 0) { 43967 var newObj = { 43968 type: "interest", 43969 value: v.lists.interests[i].value, 43970 label: kIName, 43971 desc: kIDesc 43972 }; 43973 myObj.push(newObj); 43974 } 43975 } 43976 myObj.sort(function(a,b) { 43977 var obj = [a.label, b.label]; 43978 obj.sort(); 43979 if (obj[0] == a.label) return -1; 43980 else return 1; 43981 }); 43982 t2(myObj); 43983 } 43984 }, 43985 select: selfunc, 43986 focus: function(ev, ui) { 43987 ev.preventDefault(); 43988 e.val(ui.item.label) 43989 } 43990 }) 43991 .autocomplete("instance")._renderItem = function(ul, item) { 43992 var icn = $("<span>").addClass("user-icon"); 43993 if (item.type == "group") icn.addClass("icon-group-small"); 43994 else icn.addClass("icon-user-small"); 43995 return $("<li>") 43996 .data("ui-autocomplete-item",item) 43997 .append(icn) 43998 .append("<a><b>"+item.label+"</b><br/>"+item.desc+"</a>") 43999 .append("<div class='clear:both'></div>") 44000 .appendTo(ul); 44001 }; 44002 }, 44003 replaceAll: function() { 44004 // The tooltips 44005 var v = this; 44006 $(".permission-selector").each(function() { 44007 $(this).find(".perm-info-user").addClass("perm-info").addClass("ui-form ui-corner-all ui-widget-content").hide(); 44008 $(this).find(".perm-info-group").addClass("perm-info").addClass("ui-form ui-corner-all ui-widget-content").hide(); 44009 $(this).find(".perm-info-country").addClass("perm-info").addClass("ui-form ui-corner-all ui-widget-content").hide(); 44010 $(this).find(".perm-info-interests").addClass("perm-info").addClass("ui-form ui-corner-all ui-widget-content").hide(); 44011 var rt = $(this); 44012 var makeBox = function(data,gType) { 44013 var hiddenField = $("<input type='hidden' name='"+rt.attr("data-fieldname")+"'>").appendTo(rt.find(".permission-selector-fields")); 44014 hiddenField.attr("value",gType.substr(0,1)+":"+((gType == "group") ? data.group_id : (gType == "country") ? data.iso : (gType == "interest") ? data.value : data.userID)); 44015 var tooltip = rt.find(".perm-info-"+gType).eq(0).clone(); 44016 tooltip.find("h4").text(((gType == "group") ? data.group_name : (gType == "country") ? data.printable_name : (gType == "interest") ? data.label : data.detail_firstname+" "+data.detail_surname)); 44017 tooltip.find("input[type='checkbox']").each(function() { 44018 hiddenField.attr("value",hiddenField.attr("value")+";"+$(this).attr("data-settingname")+":"+(($(this).is(":checked")) ? 1 : 0)); 44019 }).on('click', function() { 44020 var fields = []; 44021 fields.push(gType.substr(0,1)+":"+((gType == "group") ? data.group_id : (gType == "country") ? data.iso : (gType == "interest") ? data.value : data.userID)); 44022 tooltip.find("input[type='checkbox']").each(function() { 44023 if ($(this).attr("data-settingname")) { 44024 fields.push($(this).attr("data-settingname")+":"+(($(this).is(":checked")) ? 1 : 0)); 44025 } 44026 }); 44027 hiddenField.attr("value", fields.join(";")); 44028 }).attr("checked",false); 44029 rt.find(".permission-"+gType+"s > ul ").append( 44030 $("<li>").text(((gType == "group") ? data.group_name : (gType == "country") ? data.printable_name : (gType == "interest") ? data.label : data.detail_firstname+" "+data.detail_surname)).attr("data-id", ((gType == "group") ? data.group_id : (gType == "country") ? data.iso : (gType == "interest") ? data.value : data.userID)).on('click', function() {
44031 rt.find(".perm-info").not($(this).next()).fadeOut(600); 44032 $(this).next().css({"display":"", opacity: (($(this).next().css("opacity")) ? 1 : 0)}).animate({opacity: 1}, {queue: false, duration: 600}); 44033 }).css("cursor","pointer").append($("<a class=\"action-icon icon-delete\" href=\"#\"></a>") 44034 .css("cursor","pointer") 44035 .on('click', function(e) { 44036 hiddenField.remove(); 44037 tooltip.remove(); 44038 $(this).parent().remove(); 44039 e.preventDefault() 44040 }))).append(tooltip); 44041 if (tooltip.find("input").length) tooltip.show(); 44042 44043 }; 44044 // Build the selectors into each tab 44045 $(this).find(".permission-selector-tabs > div:first").each(function() { 44046 var form = $("<div></div>").addClass("ui-corner-all ui-form ui-widget-content"); 44047 form.append("<span>Add a group: </span>"); 44048 var textbox = $("<select><option>--- Select one ---</option></select>"); 44049 var myObj = []; 44050 for (var i = 0; i < v.lists.groups.length; i++) { 44051 var kGName = v.lists.groups[i].group_name; 44052 var kGDesc = v.lists.groups[i].group_desc; 44053 var newObj = { 44054 type: "group", 44055 value: v.lists.groups[i].group_id, 44056 label: kGName, 44057 desc: kGDesc 44058 }; 44059 myObj.push(newObj); 44060 } 44061 myObj.sort(function(a,b) { 44062 var obj = [a.label, b.label]; 44063 obj.sort(); 44064 if (obj[0] == a.label) return -1; 44065 else return 1; 44066 }); 44067 for (var i = 0; i < myObj.length; i++) { 44068 textbox.append($("<option value='"+myObj[i].value+"'>"+myObj[i].label+"</option>")); 44069 } 44070 textbox.appendTo(form); 44071 form.append($("<button>Add</button>").button().on('click', function() { 44072 if (textbox.val()) { 44073 var val = textbox.val(); 44074 lToSearch = v.lists.groups; 44075 for (var i = 0; i < lToSearch.length; i++) { 44076 if (lToSearch[i].group_id == val) { 44077 var isFound = lToSearch[i]; 44078 break; 44079 } 44080 } 44081 if (isFound !== undefined) makeBox(isFound,"group"); 44082 } 44083 return false; 44084 })); 44085 form.appendTo($(this)); 44086 }); 44087 $(this).find(".permission-selector-tabs > div:eq(1)").each(function() { 44088 var form = $("<div></div>").addClass("ui-corner-all ui-form ui-widget-content"); 44089 form.append("<span>Add a country: </span>"); 44090 var textbox = $("<select><option>--- Select one ---</option></select>"); 44091 var myObj = []; 44092 for (var i = 0; i < v.lists.countries.length; i++) { 44093 if (v.lists.countries[i].iso != '') { 44094 var kCName = v.lists.countries[i].printable_name; 44095 var kCDesc = v.lists.countries[i].iso; 44096 var newObj = { 44097 type: "country", 44098 value: v.lists.countries[i].iso, 44099 label: kCName, 44100 desc: kCDesc, 44101 }; 44102 myObj.push(newObj); 44103 } 44104 } 44105 for (var i = 0; i < myObj.length; i++) { 44106 textbox.append($("<option value='"+myObj[i].value+"'>"+myObj[i].label+"</option>")); 44107 } 44108 textbox.appendTo(form); 44109 form.append($("<button>Add</button>").button().on('click',function() { 44110 if (textbox.val()) { 44111 var val = textbox.val(); 44112 lToSearch = v.lists.countries; 44113 for (var i = 0; i < lToSearch.length; i++) { 44114 if (lToSearch[i].iso == val) { 44115 var isFound = lToSearch[i]; 44116 break; 44117 } 44118 } 44119 if (isFound !== undefined) makeBox(isFound,"country"); 44120 } 44121 return false; 44122 })); 44123 form.appendTo($(this)); 44124 }); 44125 $(this).find(".permission-selector-tabs > div:eq(2)").each(function() { 44126 var form = $("<div></div>").addClass("ui-corner-all ui-form ui-widget-content"); 44127 form.append("<span>Add an interest: </span>"); 44128 var textbox = $("<select><option>--- Select one ---</option></select>"); 44129 var myObj = []; 44130 for (var i = 0; i < v.lists.interests.length; i++) { 44131 if (v.lists.interests[i].value != '') { 44132 var kIName = v.lists.interests[i].label; 44133 var kIDesc = v.lists.interests[i].value; 44134 var newObj = { 44135 type: "interest", 44136 value: v.lists.interests[i].value, 44137 label: kIName, 44138 desc: kIDesc, 44139 }; 44140 myObj.push(newObj); 44141 } 44142 } 44143 for (var i = 0; i < myObj.length; i++) { 44144 textbox.append($("<option value='"+myObj[i].value+"'>"+myObj[i].label+"</option>")); 44145 } 44146 textbox.appendTo(form); 44147 form.append($("<button>Add</button>").button().on('click',function() { 44148 if (textbox.val()) { 44149 var val = textbox.val(); 44150 lToSearch = v.lists.interests; 44151 for (var i = 0; i < lToSearch.length; i++) { 44152 if (lToSearch[i].value == val) { 44153 var isFound = lToSearch[i]; 44154 break; 44155 } 44156 } 44157 if (isFound !== undefined) makeBox(isFound,"interest"); 44158 } 44159 return false;
44160 })); 44161 form.appendTo($(this)); 44162 }); 44163 $(this).find(".permission-selector-tabs > div:eq(3)").each(function() { 44164 var form = $("<div></div>").addClass("ui-corner-all ui-form ui-widget-content"); 44165 form.append("<span>Add a user: </span>"); 44166 var textbox = $("<input type='text' placeholder='Type at least 3 letters to search...'>"); 44167 v.selectUser(textbox, function(event,ui) { 44168 if (ui.item.type == "user") { 44169 lToSearch = v.lists.users; 44170 for (var i = 0; i < lToSearch.length; i++) { 44171 if (lToSearch[i].userID == ui.item.value) { 44172 var isFound = lToSearch[i]; 44173 break; 44174 } 44175 } 44176 } 44177 if (ui.item.type == "group") { 44178 lToSearch = v.lists.groups; 44179 for (var i = 0; i < lToSearch.length; i++) { 44180 if (lToSearch[i].group_id == ui.item.value) { 44181 var isFound = lToSearch[i]; 44182 break; 44183 } 44184 } 44185 } 44186 if (ui.item.type == "country") { 44187 lToSearch = v.lists.countries; 44188 for (var i = 0; i < lToSearch.length; i++) { 44189 if (lToSearch[i].group_id == ui.item.value) { 44190 var isFound = lToSearch[i]; 44191 break; 44192 } 44193 } 44194 } 44195 44196 if (isFound !== undefined) { 44197 var cloneIsThere = false; 44198 var fS = ui.item.type.substr(0,1)+":"+ui.item.value+';'; 44199 rt.find(".permission-selector-fields > input[type='hidden']").each(function() { 44200 if ($(this).attr("value").substr(0,fS.length) == fS) cloneIsThere = true; 44201 }); 44202 if (cloneIsThere === false) { 44203 makeBox(isFound,ui.item.type); 44204 rt.find(".permission-selector-tabs > ul > li").each(function() { 44205 var ktr = $(this).children("a").attr("href"); 44206 ktr = ktr.substr(ktr.length - ui.item.type.length - 1); 44207 if (ktr === ui.item.type+"s") $(this).children("a").click(); 44208 }); 44209 } 44210 } 44211 this.value = ""; 44212 return false; 44213 }); 44214 44215 textbox.appendTo(form); 44216 44217 form.appendTo($(this)); 44218 }); 44219 $(this).find(".permission-selector-tabs > div:eq(4)").each(function() { 44220 var form = $("<div></div>").addClass("ui-corner-all ui-form ui-widget-content"); 44221 form.append("<span>Add an email address: </span>"); 44222 var textbox = $("<input type='text' placeholder='Type an email address here'>"); 44223 var btn = $("<button>Add</button>").button().on('click', function() { 44224 if (textbox.val().length) { 44225 makeBox({ 44226 "type": "user", 44227 "detail_title": "", 44228 "detail_firstname": textbox.val(), 44229 "detail_surname": "", 44230 "userID": textbox.val(), 44231 "desc": textbox.val()},"email"); 44232 textbox.val(""); 44233 } 44234 return false; 44235 }); 44236 form.append(textbox).append(btn).appendTo($(this)); 44237 }); 44238 $(this).find(".permission-users > ul > li, .permission-groups > ul > li").each(function() { 44239 $(this).on('click', function() { 44240 $(this).find(".perm-info").not($(this).next()).fadeOut(600); 44241 $(this).next().css({"display":"", opacity: (($(this).next().css("opacity")) ? 1 : 0)}).animate({opacity: 1}, {queue: false, duration: 600}); 44242 }); 44243 }); 44244 $(this).find(".perm-info").each(function() { 44245 var divInfo = $(this); 44246 var typeInfo = divInfo.attr("id").split("-"); 44247 var gType = typeInfo[typeInfo.length-2]; 44248 var ID = typeInfo[typeInfo.length-1]; 44249 $(this).prev().append($("<a class=\"action-icon icon-delete\" href=\"#\"></a>").on('click', function() { 44250 var hiddenField = false; 44251 rt.find(".permission-selector-fields").children("input[type='hidden']").each(function() { 44252 var gData = $(this).attr("value").split(";"); 44253 if (gData[0] !== undefined) { 44254 var gS = gData[0].split(":"); 44255 if (gS[0] !== undefined && gS[1] !== undefined && gS[0] == gType.substr(0,1) && gS[1] == ID) { 44256 hiddenField = $(this); 44257 } 44258 } 44259 }); 44260 if (hiddenField !== false) hiddenField.remove(); 44261 44262 divInfo.prev().remove(); 44263 divInfo.remove(); 44264 return false; 44265 })); 44266 // var fields = {}; 44267 var hiddenField = false; 44268 rt.find(".permission-selector-fields").children("input[type='hidden']").each(function() { 44269 var gData = $(this).attr("value").split(";"); 44270 if (gData[0] !== undefined) { 44271 var gS = gData[0].split(":"); 44272 if (gS[0] !== undefined && gS[1] !== undefined && gS[0] == gType.substr(0,1) && gS[1] == ID) { 44273 hiddenField = $(this); 44274 } 44275 } 44276 }); 44277 $(this).find("input[type='checkbox']").on('click', function() { 44278 var fields = []; 44279 fields.push(gType.substr(0,1)+":"+ID); 44280 divInfo.find("input[type='checkbox']").each(function() { 44281 if ($(this).attr("data-settingname")) { 44282 fields.push($(this).attr("data-settingname")+":"+(($(this).is(":checked")) ? 1 : 0)); 44283 } 44284 }); 44285 if (hiddenField !== false) hiddenField.attr("value", fields.join(";")); 44286 }); 44287 }); 44288 $(this).find(".permission-selector-tabs").tabs(); 44289 }); 44290 }, 44291 populate: function(cb) { 44292 var v = this; 44293 if (this.isPopulated === 1) return true;
44294 var overlay = S.overlay(); 44295 overlay.loading(); 44296 $.ajax({ 44297 url: SiteConfig.basepath+"API/cms.json?act=usergroupList", 44298 type: "GET", 44299 dataType: "json", 44300 success: function(k) { 44301 if (k.groups.length) { 44302 for(var i=0; i < k.groups.length; i++) { 44303 if (k.groups[i].group_hidden == "0") { 44304 v.lists.groups.push(k.groups[i]); 44305 } 44306 } 44307 } 44308 if (k.users.length) { 44309 for(var i=0; i < k.users.length; i++) { 44310 v.lists.users.push(k.users[i]); 44311 } 44312 } 44313 if (k.countries.length) { 44314 for(var i=0; i < k.countries.length; i++) { 44315 v.lists.countries.push(k.countries[i]); 44316 } 44317 } 44318 if (k.interests.length) { 44319 for(var i=0; i < k.interests.length; i++) { 44320 v.lists.interests.push(k.interests[i]); 44321 } 44322 } 44323 v.isPopulated = 1; 44324 if (cb !== undefined) cb(); 44325 }, 44326 complete: function() { 44327 v.replaceAll(); 44328 overlay.close(); 44329 } 44330 }); 44331 } 44332} 44333 44334Samui.prototype.cropper = function() { 44335 var cropTool = $("<div></div>"); 44336 var imageInterface = $("<div></div>").appendTo(cropTool); 44337 var imageTag = $("<img></img>").appendTo(imageInterface); 44338 var crossHair = $("<div></div>").appendTo(imageInterface); 44339 var buttonpn = $("<div class='ui-dialog-buttonpane ui-widget-content ui-helper-clearfix'></div>").appendTo(cropTool); 44340 var buttonpnst = $("<div class='ui-dialog-buttonset'></div>").appendTo(buttonpn); 44341 var buttons = $("<div></div>").appendTo(buttonpnst); 44342 var tFunction = undefined; 44343 cropTool.bind = function(fct) { 44344 if (fct === undefined || {}.toString.call(fct) !== '[object Function]') return false; 44345 tFunction = fct; 44346 return true; 44347 }; 44348 cropTool.setURL = function(imageURL, callback, options) { 44349 var ks = null; 44350 44351 imageTag.detach().appendTo("body").css({ 44352 display: "block", 44353 position: "absolute", 44354 left: -32676}).attr("src",imageURL); 44355 ks = setInterval(function() { 44356 if (imageTag.width() && imageTag.height()) { 44357 cropTool.image = { 44358 width: imageTag.width(), 44359 height: imageTag.height()}; 44360 var iScale = imageTag.width()/imageTag.height(); 44361 44362 if (imageTag.width() > 400) { 44363 imageTag.width(400); 44364 } 44365 cropTool.scale = { 44366 width: imageTag.width(), 44367 height: imageTag.height() 44368 }; 44369 imageInterface.width(imageTag.width()); 44370 imageInterface.height(imageTag.height()); 44371 imageInterface.css({"position": "relative","margin":"20px auto"}); 44372 imageTag.css({ 44373 position: "", 44374 left: 0}).prependTo(imageInterface); 44375 var nwBox = cropTool.scale.width; 44376 var nwHeight = cropTool.scale.height; 44377 if (options !== undefined && options.aspectRatio !== undefined) { 44378 var newW = nwBox; 44379 var newH = nwHeight; 44380 var CAR = newW/newH; 44381 if (CAR !== options.aspectRatio) { 44382 newW = cropTool.scale.width; 44383 newH = cropTool.scale.width / options.aspectRatio; 44384 if (newH > cropTool.scale.height) { 44385 // Scale reduction 44386 var sReduc = newW/cropTool.scale.height; 44387 newW = newW / sReduc; 44388 newH = newH / sReduc; 44389 } 44390 } 44391 nwBox = newW; 44392 nwHeight = newH; 44393 } 44394 crossHair.css({"overflow": "hidden","position":"absolute", "top": 0, "width": cropTool.scale.width, "height": cropTool.scale.height}).html(""); 44395 var crossHairRectangle1 = $("<div></div>").css({"position":"absolute","background-color":"#000","opacity":0.4}).appendTo(crossHair); 44396 var crossHairRectangle2 = $("<div></div>").css({"position":"absolute","background-color":"#000","opacity":0.4}).appendTo(crossHair); 44397 var crossHairRectangle3 = $("<div></div>").css({"position":"absolute","background-color":"#000","opacity":0.4}).appendTo(crossHair); 44398 var crossHairRectangle4 = $("<div></div>").css({"position":"absolute","background-color":"#000","opacity":0.4}).appendTo(crossHair); 44399 var crossHairBox = $("<div></div>").addClass("crosshair-selector").css({"position":"absolute", "top": 0, "left": 0, "width": nwBox, "height": nwHeight}).appendTo(crossHair); 44400 var updateCrossHair = function(ev, ui) { 44401 crossHairRectangle1.css({ 44402 top: 0, 44403 left: 0, 44404 width: crossHairBox.width() + 2 + parseInt(crossHairBox.css("left")), 44405 height: parseInt(crossHairBox.css("top")) 44406 }); 44407 crossHairRectangle2.css({ 44408 top: 0, 44409 left: crossHairBox.width() + 2 + parseInt(crossHairBox.css("left")), 44410 width: crossHairBox.parent().width() - (crossHairBox.width() + parseInt(crossHairBox.css("left"))), 44411 height: crossHairBox.height() + 2+ parseInt(crossHairBox.css("top")) 44412 }); 44413 crossHairRectangle3.css({ 44414 top: crossHairBox.height() + 2 + parseInt(crossHairBox.css("top")), 44415 left: parseInt(crossHairBox.css("left")), 44416 width: crossHairBox.parent().width() - (parseInt(crossHairBox.css("left"))), 44417 height: crossHairBox.parent().height() - (crossHairBox.height() + parseInt(crossHairBox.css("top"))) 44418 }); 44419 crossHairRectangle4.css({ 44420 top: parseInt(crossHairBox.css("top")), 44421 left: 0, 44422 width: (parseInt(crossHairBox.css("left"))), 44423 height: crossHairBox.parent().height() - (parseInt(crossHairBox.css("top"))) 44424 }); 44425 }; 44426 crossHairBox.draggable({ 44427 containment: "parent", 44428 drag: updateCrossHair 44429 }).resizable({ 44430 aspectRatio: ((options !== undefined && options.aspectRatio !== undefined) ? options.aspectRatio : false), 44431 handles: "n, ne, e, se, s, sw, w, nw", 44432 containment: "parent", 44433 resize: updateCrossHair 44434 }); 44435 updateCrossHair(); 44436 callback(); 44437 clearInterval(ks); 44438 } 44439 },200); 44440 }; 44441 buttons.append($("<button></button>").text("Save").button().click( 44442 function() { 44443 var crossHairBox = cropTool.find(".crosshair-selector"); 44444 if (tFunction !== undefined) { 44445 var imgSRC = imageTag.attr("src"); 44446 var crop = { 44447 x: (cropTool.image.width / cropTool.scale.width) * parseInt( crossHairBox.css("left")), 44448 y: (cropTool.image.height / cropTool.scale.height) *parseInt( crossHairBox.css("top")), 44449 w: (cropTool.image.width / cropTool.scale.width) *crossHairBox.width(), 44450 h: (cropTool.image.height / cropTool.scale.height) *crossHairBox.height() 44451 } 44452 tFunction(imgSRC, crop); 44453 } 44454 } 44455 )); 44456 return cropTool; 44457} 44458 44459/*! 44460 * Nestable jQuery Plugin - Copyright (c) 2012 David Bushell - http://dbushell.com/ 44461 * Dual-licensed under the BSD or MIT licenses 44462 */ 44463;(function($, window, document, undefined) 44464{ 44465 var hasTouch = 'ontouchstart' in document; 44466 44467 /** 44468 * Detect CSS pointer-events property 44469 * events are normally disabled on the dragging element to avoid conflicts 44470 * https://github.com/ausi/Feature-detection-technique-for-pointer-events/blob/master/modernizr-pointerevents.js 44471 */ 44472 var hasPointerEvents = (function() 44473 { 44474 var el = document.createElement('div'), 44475 docEl = document.documentElement; 44476 if (!('pointerEvents' in el.style)) { 44477 return false;
44478 } 44479 el.style.pointerEvents = 'auto'; 44480 el.style.pointerEvents = 'x'; 44481 docEl.appendChild(el); 44482 var supports = window.getComputedStyle && window.getComputedStyle(el, '').pointerEvents === 'auto'; 44483 docEl.removeChild(el); 44484 return !!supports; 44485 })(); 44486 44487 var defaults = { 44488 listNodeName : 'ol', 44489 itemNodeName : 'li', 44490 rootClass : 'dd', 44491 listClass : 'dd-list', 44492 itemClass : 'dd-item', 44493 dragClass : 'dd-dragel', 44494 handleClass : 'dd-handle', 44495 collapsedClass : 'dd-collapsed', 44496 placeClass : 'dd-placeholder', 44497 noDragClass : 'dd-nodrag', 44498 emptyClass : 'dd-empty', 44499 expandBtnHTML : '<button data-action="expand" type="button">Expand</button>', 44500 collapseBtnHTML : '<button data-action="collapse" type="button">Collapse</button>', 44501 group : 0, 44502 maxDepth : 5, 44503 threshold : 20 44504 }; 44505 44506 function Plugin(element, options) 44507 { 44508 this.w = $(document); 44509 this.el = $(element); 44510 this.options = $.extend({}, defaults, options); 44511 this.init(); 44512 } 44513 44514 Plugin.prototype = { 44515 44516 init: function() 44517 { 44518 var list = this; 44519 44520 list.reset(); 44521 44522 list.el.data('nestable-group', this.options.group); 44523 44524 list.placeEl = $('<div class="' + list.options.placeClass + '"/>'); 44525 44526 $.each(this.el.find(list.options.itemNodeName), function(k, el) { 44527 list.setParent($(el)); 44528 }); 44529 44530 list.el.on('click', 'button', function(e) { 44531 if (list.dragEl) { 44532 return; 44533 } 44534 var target = $(e.currentTarget), 44535 action = target.data('action'), 44536 item = target.parent(list.options.itemNodeName); 44537 if (action === 'collapse') { 44538 list.collapseItem(item); 44539 } 44540 if (action === 'expand') { 44541 list.expandItem(item); 44542 } 44543 }); 44544 44545 var onStartEvent = function(e) 44546 { 44547 var handle = $(e.target); 44548 if (!handle.hasClass(list.options.handleClass)) { 44549 if (handle.closest('.' + list.options.noDragClass).length) { 44550 return; 44551 } 44552 handle = handle.closest('.' + list.options.handleClass); 44553 } 44554 44555 if (!handle.length || list.dragEl) { 44556 return; 44557 } 44558 44559 list.isTouch = /^touch/.test(e.type); 44560 if (list.isTouch && e.touches.length !== 1) { 44561 return; 44562 } 44563 44564 e.preventDefault(); 44565 list.dragStart(e.touches ? e.touches[0] : e); 44566 }; 44567 44568 var onMoveEvent = function(e) 44569 { 44570 if (list.dragEl) { 44571 e.preventDefault(); 44572 list.dragMove(e.touches ? e.touches[0] : e); 44573 } 44574 }; 44575 44576 var onEndEvent = function(e) 44577 { 44578 if (list.dragEl) { 44579 e.preventDefault(); 44580 list.dragStop(e.touches ? e.touches[0] : e); 44581 } 44582 }; 44583 44584 if (hasTouch) { 44585 list.el[0].addEventListener('touchstart', onStartEvent, false); 44586 window.addEventListener('touchmove', onMoveEvent, false); 44587 window.addEventListener('touchend', onEndEvent, false); 44588 window.addEventListener('touchcancel', onEndEvent, false); 44589 } 44590 44591 list.el.on('mousedown', onStartEvent); 44592 list.w.on('mousemove', onMoveEvent); 44593 list.w.on('mouseup', onEndEvent); 44594 44595 }, 44596 44597 serialize: function() 44598 { 44599 var data, 44600 depth = 0, 44601 list = this; 44602 step = function(level, depth) 44603 { 44604 var array = [ ], 44605 items = level.children(list.options.itemNodeName); 44606 items.each(function() 44607 { 44608 var li = $(this), 44609 item = $.extend({}, li.data()), 44610 sub = li.children(list.options.listNodeName); 44611 if (sub.length) { 44612 item.children = step(sub, depth + 1); 44613 } 44614 array.push(item); 44615 }); 44616 return array; 44617 }; 44618 data = step(list.el.find(list.options.listNodeName).first(), depth); 44619 return data; 44620 }, 44621 44622 serialise: function() 44623 { 44624 return this.serialize(); 44625 }, 44626 44627 reset: function() 44628 { 44629 this.mouse = { 44630 offsetX : 0, 44631 offsetY : 0, 44632 startX : 0, 44633 startY : 0, 44634 lastX : 0, 44635 lastY : 0, 44636 nowX : 0, 44637 nowY : 0, 44638 distX : 0, 44639 distY : 0, 44640 dirAx : 0, 44641 dirX : 0, 44642 dirY : 0, 44643 lastDirX : 0, 44644 lastDirY : 0, 44645 distAxX : 0, 44646 distAxY : 0 44647 }; 44648 this.isTouch = false; 44649 this.moving = false; 44650 this.dragEl = null; 44651 this.dragRootEl = null; 44652 this.dragDepth = 0;
44653 this.hasNewRoot = false; 44654 this.pointEl = null; 44655 }, 44656 44657 expandItem: function(li) 44658 { 44659 li.removeClass(this.options.collapsedClass); 44660 li.children('[data-action="expand"]').hide(); 44661 li.children('[data-action="collapse"]').show(); 44662 li.children(this.options.listNodeName).show(); 44663 }, 44664 44665 collapseItem: function(li) 44666 { 44667 var lists = li.children(this.options.listNodeName); 44668 if (lists.length) { 44669 li.addClass(this.options.collapsedClass); 44670 li.children('[data-action="collapse"]').hide(); 44671 li.children('[data-action="expand"]').show(); 44672 li.children(this.options.listNodeName).hide(); 44673 } 44674 }, 44675 44676 expandAll: function() 44677 { 44678 var list = this; 44679 list.el.find(list.options.itemNodeName).each(function() { 44680 list.expandItem($(this)); 44681 }); 44682 }, 44683 44684 collapseAll: function() 44685 { 44686 var list = this; 44687 list.el.find(list.options.itemNodeName).each(function() { 44688 list.collapseItem($(this)); 44689 }); 44690 }, 44691 44692 setParent: function(li) 44693 { 44694 if (li.children(this.options.listNodeName).length) { 44695 li.prepend($(this.options.expandBtnHTML)); 44696 li.prepend($(this.options.collapseBtnHTML)); 44697 } 44698 li.children('[data-action="expand"]').hide(); 44699 }, 44700 44701 unsetParent: function(li) 44702 { 44703 li.removeClass(this.options.collapsedClass); 44704 li.children('[data-action]').remove(); 44705 li.children(this.options.listNodeName).remove(); 44706 }, 44707 44708 dragStart: function(e) 44709 { 44710 var mouse = this.mouse, 44711 target = $(e.target), 44712 dragItem = target.closest(this.options.itemNodeName); 44713 44714 this.placeEl.css('height', dragItem.height()); 44715 44716 mouse.offsetX = e.offsetX !== undefined ? e.offsetX : e.pageX - target.offset().left; 44717 mouse.offsetY = e.offsetY !== undefined ? e.offsetY : e.pageY - target.offset().top; 44718 mouse.startX = mouse.lastX = e.pageX; 44719 mouse.startY = mouse.lastY = e.pageY; 44720 44721 this.dragRootEl = this.el; 44722 44723 this.dragEl = $(document.createElement(this.options.listNodeName)).addClass(this.options.listClass + ' ' + this.options.dragClass); 44724 this.dragEl.css('width', dragItem.width()); 44725 44726 dragItem.after(this.placeEl); 44727 dragItem[0].parentNode.removeChild(dragItem[0]); 44728 dragItem.appendTo(this.dragEl); 44729 44730 $(document.body).append(this.dragEl); 44731 this.dragEl.css({ 44732 'left' : e.pageX - mouse.offsetX, 44733 'top' : e.pageY - mouse.offsetY 44734 }); 44735 // total depth of dragging item 44736 var i, depth, 44737 items = this.dragEl.find(this.options.itemNodeName); 44738 for (i = 0; i < items.length; i++) { 44739 depth = $(items[i]).parents(this.options.listNodeName).length; 44740 if (depth > this.dragDepth) { 44741 this.dragDepth = depth; 44742 } 44743 } 44744 }, 44745 44746 dragStop: function(e) 44747 { 44748 var el = this.dragEl.children(this.options.itemNodeName).first(); 44749 el[0].parentNode.removeChild(el[0]); 44750 this.placeEl.replaceWith(el); 44751 44752 this.dragEl.remove(); 44753 this.el.trigger('change'); 44754 if (this.hasNewRoot) { 44755 this.dragRootEl.trigger('change'); 44756 } 44757 this.reset(); 44758 }, 44759 44760 dragMove: function(e) 44761 { 44762 var list, parent, prev, next, depth, 44763 opt = this.options, 44764 mouse = this.mouse; 44765 44766 this.dragEl.css({ 44767 'left' : e.pageX - mouse.offsetX, 44768 'top' : e.pageY - mouse.offsetY 44769 }); 44770 44771 // mouse position last events 44772 mouse.lastX = mouse.nowX; 44773 mouse.lastY = mouse.nowY; 44774 // mouse position this events 44775 mouse.nowX = e.pageX; 44776 mouse.nowY = e.pageY; 44777 // distance mouse moved between events 44778 mouse.distX = mouse.nowX - mouse.lastX; 44779 mouse.distY = mouse.nowY - mouse.lastY; 44780 // direction mouse was moving 44781 mouse.lastDirX = mouse.dirX; 44782 mouse.lastDirY = mouse.dirY; 44783 // direction mouse is now moving (on both axis) 44784 mouse.dirX = mouse.distX === 0 ? 0 : mouse.distX > 0 ? 1 : -1; 44785 mouse.dirY = mouse.distY === 0 ? 0 : mouse.distY > 0 ? 1 : -1; 44786 // axis mouse is now moving on 44787 var newAx = Math.abs(mouse.distX) > Math.abs(mouse.distY) ? 1 : 0; 44788 44789 // do nothing on first move 44790 if (!mouse.moving) { 44791 mouse.dirAx = newAx; 44792 mouse.moving = true; 44793 return; 44794 } 44795 44796 // calc distance moved on this axis (and direction) 44797 if (mouse.dirAx !== newAx) { 44798 mouse.distAxX = 0; 44799 mouse.distAxY = 0; 44800 } else { 44801 mouse.distAxX += Math.abs(mouse.distX); 44802 if (mouse.dirX !== 0 && mouse.dirX !== mouse.lastDirX) { 44803 mouse.distAxX = 0; 44804 } 44805 mouse.distAxY += Math.abs(mouse.distY); 44806 if (mouse.dirY !== 0 && mouse.dirY !== mouse.lastDirY) { 44807 mouse.distAxY = 0; 44808 } 44809 } 44810 mouse.dirAx = newAx; 44811 44812 /** 44813 * move horizontal 44814 */ 44815 if (mouse.dirAx && mouse.distAxX >= opt.threshold) { 44816 // reset move distance on x-axis for new phase 44817 mouse.distAxX = 0; 44818 prev = this.placeEl.prev(opt.itemNodeName); 44819 // increase horizontal level if previous sibling exists and is not collapsed 44820 if (mouse.distX > 0 && prev.length && !prev.hasClass(opt.collapsedClass)) { 44821 // cannot increase level when item above is collapsed 44822 list = prev.find(opt.listNodeName).last(); 44823 // check if depth limit has reached 44824 depth = this.placeEl.parents(opt.listNodeName).length; 44825 if (depth + this.dragDepth <= opt.maxDepth) { 44826 // create new sub-level if one doesn't exist 44827 if (!list.length) { 44828 list = $('<' + opt.listNodeName + '/>').addClass(opt.listClass); 44829 list.append(this.placeEl); 44830 prev.append(list); 44831 this.setParent(prev); 44832 } else { 44833 // else append to next level up 44834 list = prev.children(opt.listNodeName).last(); 44835 list.append(this.placeEl); 44836 } 44837 } 44838 } 44839 // decrease horizontal level 44840 if (mouse.distX < 0) { 44841 // we can't decrease a level if an item preceeds the current one 44842 next = this.placeEl.next(opt.itemNodeName); 44843 if (!next.length) { 44844 parent = this.placeEl.parent(); 44845 this.placeEl.closest(opt.itemNodeName).after(this.placeEl); 44846 if (!parent.children().length) { 44847 this.unsetParent(parent.parent()); 44848 } 44849 } 44850 } 44851 } 44852 44853 var isEmpty = false;
44854 44855 // find list item under cursor 44856 if (!hasPointerEvents) { 44857 this.dragEl[0].style.visibility = 'hidden'; 44858 } 44859 this.pointEl = $(document.elementFromPoint(e.pageX - document.body.scrollLeft, e.pageY - (window.pageYOffset || document.documentElement.scrollTop))); 44860 if (!hasPointerEvents) { 44861 this.dragEl[0].style.visibility = 'visible'; 44862 } 44863 if (this.pointEl.hasClass(opt.handleClass)) { 44864 this.pointEl = this.pointEl.parent(opt.itemNodeName); 44865 } 44866 if (this.pointEl.hasClass(opt.emptyClass)) { 44867 isEmpty = true; 44868 } 44869 else if (!this.pointEl.length || !this.pointEl.hasClass(opt.itemClass)) { 44870 return; 44871 } 44872 44873 // find parent list of item under cursor 44874 var pointElRoot = this.pointEl.closest('.' + opt.rootClass), 44875 isNewRoot = this.dragRootEl.data('nestable-id') !== pointElRoot.data('nestable-id'); 44876 44877 /** 44878 * move vertical 44879 */ 44880 if (!mouse.dirAx || isNewRoot || isEmpty) { 44881 // check if groups match if dragging over new root 44882 if (isNewRoot && opt.group !== pointElRoot.data('nestable-group')) { 44883 return; 44884 } 44885 // check depth limit 44886 depth = this.dragDepth - 1 + this.pointEl.parents(opt.listNodeName).length; 44887 if (depth > opt.maxDepth) { 44888 return; 44889 } 44890 var before = e.pageY < (this.pointEl.offset().top + this.pointEl.height() / 2); 44891 parent = this.placeEl.parent(); 44892 // if empty create new list to replace empty placeholder 44893 if (isEmpty) { 44894 list = $(document.createElement(opt.listNodeName)).addClass(opt.listClass); 44895 list.append(this.placeEl); 44896 this.pointEl.replaceWith(list); 44897 } 44898 else if (before) { 44899 this.pointEl.before(this.placeEl); 44900 } 44901 else { 44902 this.pointEl.after(this.placeEl); 44903 } 44904 if (!parent.children().length) { 44905 this.unsetParent(parent.parent()); 44906 } 44907 if (!this.dragRootEl.find(opt.itemNodeName).length) { 44908 this.dragRootEl.append('<div class="' + opt.emptyClass + '"/>'); 44909 } 44910 // parent root list has changed 44911 if (isNewRoot) { 44912 this.dragRootEl = pointElRoot; 44913 this.hasNewRoot = this.el[0] !== this.dragRootEl[0]; 44914 } 44915 } 44916 } 44917 44918 }; 44919 44920 $.fn.nestable = function(params) 44921 { 44922 var lists = this, 44923 retval = this; 44924 44925 lists.each(function() 44926 { 44927 var plugin = $(this).data("nestable"); 44928 44929 if (!plugin) { 44930 $(this).data("nestable", new Plugin(this, params)); 44931 $(this).data("nestable-id", new Date().getTime()); 44932 } else { 44933 if (typeof params === 'string' && typeof plugin[params] === 'function') { 44934 retval = plugin[params](); 44935 } 44936 } 44937 }); 44938 44939 return retval || lists; 44940 }; 44941 44942})(window.jQuery || window.Zepto, window, document); 44943 44944(function($) { 44945 44946 $(".scms-page-display").each(function() { 44947 var $this = $(this); 44948 // fold 44949 $(".scms-entry:not(.scms-entry-root)").each(function(index) { 44950 var $entry = $(this); 44951 if (!$entry.attr("data-hasfold") && $entry.children("ul").children("li").length > 0) { 44952 var ULList = $entry.children("ul"); 44953 $entry.find("span").eq(0).append( 44954 $("<a class='action-icon icon-fold-down' href='javascript:void(0);'></a>").on('click', function() { 44955 var $a = $(this); 44956 if ($a.hasClass("icon-fold-up")) { 44957 ULList.slideUp(1000); 44958 $a.addClass("icon-fold-down").removeClass("icon-fold-up"); 44959 } 44960 else { 44961 ULList.slideDown(1000); 44962 $a.addClass("icon-fold-up").removeClass("icon-fold-down"); 44963 } 44964 return false; 44965 }) 44966 ); 44967 ULList.slideUp(1000); 44968 $entry.attr("data-hasfold", true); 44969 } 44970 44971 44972 }); 44973 $this.find(".send-for-review").on('click', function(e) { 44974 var data = {}, 44975 $this = $(this); 44976 data.to = $this.data("to"); 44977 data.subject = "Please Review Webpage"; 44978 data.message = "<p>I would like you to review the following draft page: <a href='"+SiteConfig.basepath + $this.data("pageid") + ".draft"+"' target='_blank'>"+$this.data("pagename")+"</a></p>"; 44979 S.email.form(data); 44980 e.preventDefault(); 44981 }); 44982 // Activate all the links 44983 $this.find("tbody > tr").each(function() { 44984 // Row. 44985 var btnRow = $(this); 44986 (function(pageID) { 44987 btnRow.find("span.icon-live-100:not(span.icon-home-100)").css("cursor", "pointer").on('click', function() { 44988 var button = $(this); 44989 $(".pub-menu").remove(); 44990 var er = $("<div></div>").addClass("pub-menu") 44991 .append($("<p>Clicking the button below will set the selected revision as draft, removing it from the live site. Are you sure you wish to continue?</p>")) 44992 .append($("<br/><button class='ui-submit'>Unpublish</button>"));
44993 var overlay = S.overlay(); 44994 overlay.htmlContent(er); 44995 overlay.title("Unpublish this version"); 44996 overlay.show(); 44997 S.form.run(er); 44998 $(".pub-menu button").on("click", function() { 44999 var d = { 45000 page_id: pageID 45001 }; 45002 $.ajax({ 45003 url: SiteConfig.basepath + "admin/pages.json?act=unpublish", 45004 data: d, 45005 type: "POST", 45006 dataType: "json", 45007 success: function(d) { 45008 window.location.reload(true); 45009 } 45010 }); 45011 }); 45012 return false; 45013 }); 45014 btnRow.find(".icon-draft-100,.icon-publishing-100").css("cursor", "pointer").on('click', function() { 45015 var button = $(this); 45016 $(".pub-menu").remove(); 45017 var er = $("<div></div>").addClass("pub-menu") 45018 .append($("<label for='pub_date'>Publication date: </label><input type='text' name='pub_date' class='datepicker'/><br /><span class='hasError'></span><br />")) 45019 .append($("<br/><button class='ui-submit' data-submit='now'>Publish Now</button><button class='ui-submit' data-submit='date'>Publish on Date</button>")); 45020 var overlay = S.overlay(); 45021 overlay.htmlContent(er); 45022 overlay.title("Publish this version"); 45023 overlay.show(); 45024 S.form.run(er); 45025 $(".pub-menu .datepicker").blur(); 45026 if (btnRow.attr("data-pdate")) { 45027 var datePub = new Date(parseInt(btnRow.attr("data-pdate")) * 1000); 45028 $(".pub-menu .datepicker").datepicker("setDate", datePub); 45029 } 45030 $(".pub-menu button").on('click', function() { 45031 $('.hasError').html(''); 45032 var d = { 45033 page_id: pageID 45034 }, 45035 btnData = $(this).data('submit'), 45036 dateVal = $(".pub-menu .datepicker"); 45037 if (btnData == "date" && dateVal.val() == "") { 45038 $('.hasError').html('Please enter a date'); 45039 return false; 45040 } else if (btnData == "date") { 45041 d["page_date"] = $(".pub-menu .datepicker").val(); 45042 } 45043 $.ajax({ 45044 url: SiteConfig.basepath + "admin/pages.json?act=publish", 45045 data: d, 45046 type: "POST", 45047 dataType: "json", 45048 success: function(d) { 45049 window.location.reload(true); 45050 } 45051 }); 45052 }); 45053 return false; 45054 }); 45055 })(btnRow.attr("data-pageid")); 45056 }); 45057 }); 45058 //Set the page file path popup 45059 $('.scms-sprite').css('cursor', 'pointer').on('click', function() { 45060 var $this_sprite = $(this); 45061 var overlay = S.overlay(); 45062 overlay.htmlContent($this_sprite.next('.scms-sprite-popup').text()); 45063 overlay.title($this_sprite.data('title') + ' Page Link'); 45064 overlay.show(); 45065 }); 45066 $(".scms-tab").tabs(); 45067 45068//Rollback 45069 var Rollback = { 45070 fire: function(config) { 45071 this.config = config; 45072 this.config.overlay = null; 45073 this.bindEvents(); 45074 }, 45075 /* 45076 * bind the click, mouseenter and mouseleave 45077 */ 45078 bindEvents: function() { 45079 var self = Rollback; 45080 /* 45081 * Create the popup, get data and execute the call 45082 */ 45083 self.config.button.on("click", function(e) { 45084 e.preventDefault; 45085 self.createOverlay(); 45086 self.execute(); 45087 }); 45088 }, 45089 /* 45090 * Create the overaly using the Samui object 45091 */ 45092 createOverlay: function() { 45093 var self = Rollback;
45094 self.config.overlay = S.overlay(); 45095 }, 45096 /* 45097 * function fired if the request is ok 45098 */ 45099 successRequest: function() { 45100 var self = Rollback; 45101 self.config.overlay.title("Success"); 45102 self.config.overlay.content("<h4>The rollback process is completed, this page will be refreshed in 2 seconds</h3>"); 45103 var buttons = new Array(); 45104 var close = $("<button/>", {text: "Close"}).on("click", function() { 45105 self.config.overlay.close(); 45106 }) 45107 buttons.push(close) 45108 self.config.overlay.buttons(buttons); 45109 self.config.overlay.show(); 45110 S.form.run(self.config.overlay); 45111 setTimeout(function() { 45112 location.reload(); 45113 }, 2000); 45114 }, 45115 /* 45116 * function fired if an error occurred during the request 45117 */ 45118 failRequest: function() { 45119 var self = Rollback; 45120 self.config.overlay.title("Error"); 45121 self.config.overlay.content("<h3>An error occurred during the rollback process</h3>"); 45122 var buttons = new Array(); 45123 var close = $("<button/>", {text: "Close"}).on("click", function() { 45124 self.config.overlay.close(); 45125 }) 45126 buttons.push(close) 45127 self.config.overlay.buttons(buttons); 45128 self.config.overlay.show(); 45129 }, 45130 /* 45131 * execute the call and display a message 45132 */ 45133 execute: function() { 45134 45135 var self = Rollback; 45136 45137 $.ajax({ 45138 type: "POST", 45139 url: SiteConfig.basepath + "admin/pages/", 45140 dataType: "json", 45141 data: { 45142 parentNode: true, 45143 data: self.config.data 45144 } 45145 }) 45146 .done(function(r) { 45147 if (r && r == "true") { 45148 self.successRequest(); 45149 } else { 45150 self.failRequest(); 45151 } 45152 45153 }) 45154 .fail(function(e) { 45155 console.log(e); 45156 }); 45157 45158 45159 } 45160 }; 45161 45162 $('.dd').nestable({ 45163 listNodeName: 'ul', 45164 expandBtnHTML: '', 45165 collapseBtnHTML: '', 45166 maxDepth: 10 45167 }); 45168 45169 $('.dd').on('change', function() { 45170 console.log( $('.dd').nestable('serialize') ); 45171 $.ajax({ 45172 url: "", 45173 type: 'POST', 45174 dataType: 'json', 45175 data: { 45176 parentNode: (($('.dd-list').data('rootid') != undefined) ? $('.dd-list').data('rootid') : 0), 45177 data: $('.dd').nestable('serialize') 45178 } 45179 }).done(function(d) { 45180 if (d == "true") { 45181 // var $this = $(ui.item).find('div'); 45182 // $this 45183 // .removeClass('ui-state-default') 45184 // .animate({backgroundColor: "#555555"}, 100) 45185 // .animate({backgroundColor: "#e6e6e6"}, 100) 45186 // .animate({backgroundColor: "#555555"}, 100) 45187 // .animate({backgroundColor: "#e6e6e6"}, 100, function() { 45188 // $this.addClass('ui-state-default'); 45189 // }); 45190 } 45191 else { 45192 overlay = S.overlay(); 45193 overlay.title("Error"); 45194 overlay.content("An error occurred during the reorder, please try again later"); 45195 overlay.show(); 45196 } 45197 }).fail(function(r) { 45198 overlay = S.overlay(); 45199 overlay.title("Error"); 45200 overlay.content("An error occurred during the reorder, please try again later"); 45201 overlay.show(); 45202 }); 45203 }); 45204 45205 // Sorting 45206// if ($(".sortable-nested").length > 0) { 45207// $('.sortable-nested').nestedSortable({ 45208// forcePlaceholderSize: true, 45209// listType: 'ul', 45210// handle: 'div', 45211// items: 'li', 45212// placeholder: 'placeholder', 45213// tolerance: 'pointer', 45214// toleranceElement: '> div', 45215// disableNesting: 'sortable-nesting-no', 45216// maxLevels: 0, 45217// opacity: .6, 45218// isTree: true, 45219// update: function(event, ui) { 45220// 45221// $.ajax({ 45222// url: "", 45223// type: 'POST', 45224// dataType: 'json', 45225// data: { 45226// parentNode: (($('.sortable-nested').data('rootid') != undefined) ? $('.sortable-nested').data('rootid') : 0), 45227// data: JSON.stringify($(this).nestedSortable('toArray')) 45228// } 45229// }).done(function(d) { 45230// if (d == "true") { 45231// var $this = $(ui.item).find('div'); 45232// $this 45233// .removeClass('ui-state-default') 45234// .animate({backgroundColor: "#555555"}, 100) 45235// .animate({backgroundColor: "#e6e6e6"}, 100) 45236// .animate({backgroundColor: "#555555"}, 100) 45237// .animate({backgroundColor: "#e6e6e6"}, 100, function() { 45238// $this.addClass('ui-state-default'); 45239// }); 45240// 45241// 45242// } 45243// else { 45244// var $this = $(ui.item).find('div'); 45245// $this 45246// .removeClass('ui-state-default') 45247// .animate({backgroundColor: "#555555"}, 100) 45248// .animate({backgroundColor: "#e6e6e6"}, 100) 45249// .animate({backgroundColor: "#555555"}, 100) 45250// .animate({backgroundColor: "#e6e6e6"}, 100, function() { 45251// $this.addClass('ui-state-default'); 45252// }); 45253// } 45254// }).fail(function(r) {
45255// overlay = S.overlay(); 45256// overlay.title("Error"); 45257// overlay.content("An error occurred during the reorder, please try again later"); 45258// overlay.show(); 45259// }); 45260// } 45261// }); 45262// 45263// /* 45264// * Init the rollback object 45265// */ 45266// setTimeout(function() { 45267// Rollback.fire({ 45268// data: JSON.stringify($('.sortable-nested').nestedSortable('toArray')), 45269// button: $("#reorder_revert") 45270// }); 45271// }, 500); 45272// } 45273})(jQuery); 45274 45275;(function($) { 45276 GlobalObj = function() { 45277 this.dropdown(); 45278 this.mobileDropdown(); 45279 }; 45280 GlobalObj.prototype = { 45281 /* 45282 * Give to the dropdown the slide effect 45283 */ 45284 dropdown: function() { 45285 var navLi = $('#nav ul li'); 45286 45287 var check = null; 45288 navLi.on({ 45289 mouseenter: function(e) { 45290 if (check != this) { 45291 $(this).children('ul').stop(true, true).slideDown('medium'); 45292 } 45293 }, 45294 mouseleave: function(e) { 45295 check = this; 45296 $(this).children('ul').stop(true, true).slideUp('medium', function() { 45297 check = null; 45298 }); 45299 } 45300 }); 45301 }, 45302 mobileDropdown: function() { 45303 var navLi = $('#mobnav ul ul li[data-id]'); 45304 45305 navLi.on('click', function() { 45306 return false; 45307 }); 45308 navLi.on('touchstart', function() { 45309 var $this = $(this), 45310 $sub = $('#mobnav ul ul li.parent'+$this.data("id")); 45311 if ($sub.is(':visible')) { 45312 $this.find('i').removeClass('fa-caret-up').addClass('fa-caret-down'); 45313 $sub.hide(); 45314 } 45315 else { 45316 $this.find('i').removeClass('fa-caret-down').addClass('fa-caret-up'); 45317 $sub.css('display', 'table'); 45318 } 45319 }); 45320/* 45321 var check = null; 45322 navLi.on({ 45323 mouseenter: function(e) { 45324 if (check != this) { 45325 $(this).children('ul').stop(true, true).slideDown('medium'); 45326 } 45327 }, 45328 mouseleave: function(e) { 45329 check = this; 45330 $(this).children('ul').stop(true, true).slideUp('medium', function() { 45331 check = null; 45332 }); 45333 } 45334 }); 45335*/ 45336 }, 45337 /* 45338 * Refresh the page, it is compatible with all the browser 45339 */ 45340 refresh: function() { 45341 window.location.href = window.location.href; 45342 }, 45343 /* 45344 * Check if a given parameter is in the querystring 45345 */ 45346 getUrlParameterByName: function(name) { 45347 name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); 45348 var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), 45349 results = regex.exec(location.search); 45350 return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); 45351 }, 45352 /* 45353 * return the URL querystring keys 45354 */ 45355 getUrlParameter: function() { 45356 var isQueryString = window.location.href.indexOf('?'); 45357 if (isQueryString === -1) { 45358 return false; 45359 } 45360 var vars = [], hash; 45361 var hashes = window.location.href.slice(isQueryString + 1).split('&'); 45362 for (var i = 0; i < hashes.length; i++) 45363 { 45364 hash = hashes[i].split('='); 45365 vars.push(hash[0].replace("#", "")); 45366 vars[hash[0]] = hash[1]; 45367 } 45368 return vars; 45369 }, 45370 }; 45371 45372 G = new GlobalObj(); 45373})(jQuery); 45374 45375(function($) { 45376 $("nav select").on('change', function() { 45377 window.location = $(this).find("option:selected").val(); 45378 }); 45379 45380 $('figure.image').each(function(i,e) { 45381 var $this = $(e), 45382 $inprogress = false; 45383 45384 $this.find('figcaption').hide(); 45385 45386 $this.on('mouseout', function() { 45387 if (!$inprogress) { 45388 $inprogress = true; 45389 $this.find('figcaption').stop().slideUp(function() { 45390 $inprogress = false;
45391 }); 45392 } 45393 }) 45394 .on('mouseover', function() { 45395 if (!$inprogress) { 45396 $inprogress = true; 45397 $this.find('figcaption').stop().slideDown(function() { 45398 $inprogress = false; 45399 }); 45400 } 45401 }); 45402 }); 45403 45404})(jQuery); 45405 45406(function($) { 45407 45408/* =Reflection Nav 45409-------------------------------------------------------------------------- */ 45410 45411 // Append span to each LI to add reflection 45412 45413 $("#nav-reflection li").append("<span></span>"); 45414 45415 // Animate buttons, move reflection and fade 45416 45417 $("#nav-reflection a").hover(function() { 45418 var $this = $(this); 45419 $this.stop().animate({ marginTop: "-10px" }, 200); 45420 $this.parent().find("span").stop().animate({ marginTop: "18px", opacity: 0.25 }, 200); 45421 },function(){ 45422 $this.stop().animate({ marginTop: "0px" }, 300); 45423 $this.parent().find("span").stop().animate({ marginTop: "1px", opacity: 1 }, 300); 45424 }); 45425 45426/* =Shadow Nav 45427-------------------------------------------------------------------------- */ 45428 45429 // Append shadow image to each LI 45430 var navShadow = $("#nav-shadow") 45431 navShadow.children('li').append('<img class="shadow" src="images/icons-shadow.jpg" width="81" height="27" alt="" />'); 45432 45433 // Animate buttons, shrink and fade shadow 45434 45435 navShadow.children('li').hover(function() { 45436 var $this = $(this); 45437 $this.find("a").stop().animate({ marginTop: "-14px" }, 250, function() { 45438 $this.find("a").animate({ marginTop: "-10px" }, 250); 45439 }); 45440 $this.find("img.shadow").stop().animate({ width: "80%", height: "20px", marginLeft: "8px", opacity: 0.25 }, 250); 45441 },function(){ 45442 var $this = $(this); 45443 $this.find("a").stop().animate({ marginTop: "4px" }, 250, function() { 45444 $this.find("a").animate({ marginTop: "0px" }, 250); 45445 }); 45446 $this.find("img.shadow").stop().animate({ width: "100%", height: "27px", marginLeft: "0", opacity: 1 }, 250); 45447 }); 45448 45449// End jQuery 45450 45451})(jQuery); 45452 45453(function($){ 45454 var $lateral_menu_trigger = $('#cd-menu-trigger'), 45455 $content_wrapper = $('.cd-main-content'), 45456 $navigation = $('header'); 45457 45458 //open-close lateral menu clicking on the menu icon 45459 $lateral_menu_trigger.on('click', function(event){ 45460 event.preventDefault(); 45461 console.log('here'); 45462 $lateral_menu_trigger.toggleClass('is-clicked'); 45463 $navigation.toggleClass('lateral-menu-is-open'); 45464 $content_wrapper.toggleClass('lateral-menu-is-open').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(){ 45465 // firefox transitions break when parent overflow is changed, so we need to wait for the end of the trasition to give the body an overflow hidden 45466 $('body').toggleClass('overflow-hidden'); 45467 }); 45468 $('#cd-lateral-nav').toggleClass('lateral-menu-is-open'); 45469 45470 //check if transitions are not supported - i.e. in IE9 45471 if($('html').hasClass('no-csstransitions')) { 45472 $('body').toggleClass('overflow-hidden'); 45473 } 45474 }); 45475 45476 //close lateral menu clicking outside the menu itself 45477 $content_wrapper.on('click', function(event){ 45478 if( !$(event.target).is('#cd-menu-trigger, #cd-menu-trigger span') ) { 45479 $lateral_menu_trigger.removeClass('is-clicked'); 45480 $navigation.removeClass('lateral-menu-is-open'); 45481 $content_wrapper.removeClass('lateral-menu-is-open').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(){ 45482 $('body').removeClass('overflow-hidden'); 45483 }); 45484 $('#cd-lateral-nav').removeClass('lateral-menu-is-open'); 45485 //check if transitions are not supported 45486 if($('html').hasClass('no-csstransitions')) { 45487 $('body').removeClass('overflow-hidden'); 45488 } 45489 45490 } 45491 }); 45492 45493 //open (or close) submenu items in the lateral menu. Close all the other open submenu items. 45494 $('.item-has-children').children('a').on('click', function(event){ 45495 event.preventDefault(); 45496 $(this).toggleClass('submenu-open').next('.sub-menu').slideToggle(200).end().parent('.item-has-children').siblings('.item-has-children').children('a').removeClass('submenu-open').next('.sub-menu').slideUp(200); 45497 }); 45498})(jQuery); 45499(function($) { 45500 if ($(".cms-slide.allow-scroll")) { 45501 $(".cms-slide.allow-scroll").each(function() { 45502 var $wrapper = $(this); 45503 if ($wrapper.children("div.list-item").eq(0).height() < $wrapper.attr("data-height")) return; 45504 var sC = $wrapper.css({ 45505 "height": $wrapper.attr("data-height"), 45506 "overflow": "hidden", 45507 "position": "relative" 45508 }); 45509 sC.children("div.list-item").eq(0).clone().insertAfter(sC.children("div.list-item:last")); 45510 var i = 0; 45511 var firstHeight = sC.children("div.list-item").eq(0).height(); 45512 sC.children("div.list-item").css({"position":"absolute", "overflow":"hidden"}).each(function() { 45513 $(this).css("top", i * firstHeight); 45514 i++; 45515 }); 45516 $wrapper.data('manual-scroll-up', false); 45517 $wrapper.data('manual-scroll-down', false); 45518 var scrollIt = function() { 45519 sC.children("div.list-item").each(function() { 45520 $(this).css("top", parseInt($(this).css("top")) - 1); 45521 }); 45522 if (parseInt(sC.children("div.list-item").eq(0).css("top")) <= (-1) * parseInt(firstHeight)) { 45523 sC.children("div.list-item").eq(0).detach().insertAfter(sC.children("div.list-item:last")); 45524 sC.children("div.list-item:last").css("top", (sC.children("div.list-item").length - 1) * firstHeight); 45525 } 45526 }; 45527 var scrollItUp = function() { 45528 if ($wrapper.data('manual-scroll-up')) { 45529 sC.children("div.list-item").each(function() { 45530 $(this).css("top", parseInt($(this).css("top")) - 1); 45531 }); 45532 if (parseInt(sC.children("div.list-item").eq(0).css("top")) <= (-1) * parseInt(firstHeight)) { 45533 sC.children("div.list-item").eq(0).detach().insertAfter(sC.children("div.list-item:last")); 45534 sC.children("div.list-item:last").css("top", (sC.children("div.list-item").length - 1) * firstHeight); 45535 } 45536 } 45537 }; 45538 var scrollItDown = function() { 45539 console.log($wrapper.data('manual-scroll-down')); 45540 if ($wrapper.data('manual-scroll-down')) { 45541 sC.children("div.list-item").each(function() { 45542 $(this).css("top", parseInt($(this).css("top")) + 1); 45543 }); 45544 if (parseInt(sC.children("div.list-item").eq(0).css("top")) >= 30) { 45545 $wrapper.data('manual-scroll-down', false); 45546 } 45547 } 45548 }; 45549 var sCE = setInterval(scrollIt, 1500 / 32); 45550 var sCEU = setInterval(scrollItUp, 1500 / 128); 45551 var sCED = setInterval(scrollItDown, 1500 / 128); 45552 sC.hover(function() { 45553 clearInterval(sCE); 45554 $wrapper.find(".arrow-down").on('mousedown', function() { 45555 $wrapper.data('manual-scroll-up', true); 45556 }).on('mouseup', function() { 45557 $wrapper.data('manual-scroll-up', false); 45558 }); 45559 $wrapper.find(".arrow-up").on('mousedown', function() { 45560 $wrapper.data('manual-scroll-down', true); 45561 }).on('mouseup', function() { 45562 $wrapper.data('manual-scroll-down', false); 45563 }); 45564 }, function() { 45565 sCE = setInterval(scrollIt, 1500 / 32); 45566 }); 45567 sC.on('touchstart', function() { 45568 clearInterval(sCE); 45569 $wrapper.find(".arrow-down").on('touchstart', function() { 45570 $wrapper.data('manual-scroll-up', true); 45571 }).on('touchend', function() { 45572 $wrapper.data('manual-scroll-up', false); 45573 }); 45574 $wrapper.find(".arrow-up").on('touchstart', function() { 45575 $wrapper.data('manual-scroll-down', true); 45576 }).on('touchend', function() { 45577 $wrapper.data('manual-scroll-down', false); 45578 }); 45579 }).on('touchend', function() { 45580 sCE = setInterval(scrollIt, 1500 / 32); 45581 }); 45582 $('.cms-slide.allow-scroll .scroll-arrows').show(); 45583 }); 45584 } 45585})(jQuery); 45586 45587(function($) {
45588 $('body').on('click', '.multicheck-chosen-icon', function() { 45589 var $this = $(this), 45590 $check = $this.data('check'), 45591 $wrapper = $this.closest('.multicheck-wrapper'); 45592 45593 $wrapper.find('input[data-check="'+$check.replace('icon-', '').replace(/ /g, '')+'"]').attr('checked', false); 45594 $this.parent().remove(); 45595 }); 45596 45597 $('body').on('click', 'input[data-check^=mc-]', function() { 45598 var $this = $(this), 45599 $value = $this.val(), 45600 $display_text = $this.data('display-text'), 45601 $wrapper = $this.closest('.multicheck-wrapper'); 45602 45603 $display = ($display_text ? $display_text : $value); 45604 45605 if ($this.is(':checked')) { 45606 $wrapper.find('.multicheck-chosen-wrapper').append("<span class='multicheck-chosen'>"+$display+" <i class='multicheck-chosen-icon fa fa-times fa-fw' data-check='icon-mc-"+$display.toLowerCase().replace(/ /g, '').replace(/"/g, '')+"'></i></span>"); 45607 } 45608 else { 45609 $wrapper.find('.multicheck-chosen-wrapper i[data-check="icon-mc-'+$display.toLowerCase().replace(/ /g, '').replace(/"/g, '')+'"]').parent().remove(); 45610 } 45611 }); 45612 45613 $('body').find('input[data-check^=mc-]:checked').each(function(i, e) { 45614 var $this = $(e), 45615 $value = $this.val(), 45616 $display_text = $this.data('display-text'), 45617 $wrapper = $this.closest('.multicheck-wrapper'); 45618 45619 $display = ($display_text ? $display_text : $value); 45620 45621 $wrapper.find('.multicheck-chosen-wrapper').append("<span class='multicheck-chosen'>"+$display+" <i class='multicheck-chosen-icon fa fa-times fa-fw' data-check='icon-mc-"+$display.toLowerCase().replace(/ /g, '').replace(/"/g, '')+"'></i></span>"); 45622 }); 45623 45624 $('.multicheck-autocomplete-wrapper .autocomplete').on('focus', function() { 45625 var $this = $(this), 45626 $wrapper = $this.closest('.multicheck-wrapper'); 45627 45628 $('.multicheck-autocomplete-options').slideUp(); 45629 $wrapper.find('.multicheck-autocomplete-options').slideDown(function() { 45630 $wrapper.find('.multicheck-autocomplete-close-wrapper').show(); 45631 }); 45632 }); 45633 45634 $('.multicheck-autocomplete-close').on('click', function() { 45635 var $this = $(this), 45636 $wrapper = $this.closest('.multicheck-wrapper'); 45637 45638 $wrapper.find('.multicheck-autocomplete-options').slideUp('fast', function() { 45639 $wrapper.find('.multicheck-autocomplete-close-wrapper').hide(); 45640 }); 45641 }); 45642 45643 $('.multicheck-autocomplete-wrapper .autocomplete').on('keyup', function() { 45644 var $this = $(this), 45645 $value = $this.val(), 45646 $wrapper = $this.closest('.multicheck-wrapper'); 45647 45648 if ($value != "") { 45649 $wrapper.find('.multicheck-autocomplete-option').hide(); 45650 $wrapper.find('.multicheck-autocomplete-option[data-filter*="'+$value.toLowerCase().replace(/ /g, '')+'"]').show(); 45651 } 45652 else { 45653 $wrapper.find('.multicheck-autocomplete-option').show(); 45654 } 45655 }); 45656})(jQuery); 45657 45658function toggleImage(imageID) { 45659 $(".slideshow img").each(function() { 45660 if ($(this).attr('id') == imageID) { 45661 $(this).fadeIn(1000); 45662 } 45663 else { 45664 $(this).fadeOut(1000); 45665 } 45666 }); 45667 $(".slideshow-dots span").each(function() { 45668 if ($(this).find("span").attr('class') == imageID) 45669 $(this).find("a").css('color', '#5781ae'); 45670 else 45671 $(this).find("a").css('color', '#ffffff'); 45672 }); 45673 vis = 0; 45674} 45675var vis = 0; 45676(function($) { 45677 $('.iahs-tabs').tabs(); 45678 $('.slideshow img:gt(0)').hide(); 45679 45680 var ssImg = $('.slideshow img'), 45681 ssImgVis = $('.slideshow img:visible'), 45682 index = ssImgVis.index(); 45683 45684 ssImg.each(function() { 45685 $("<span></span>", { 45686 html: "<span class='" + $(this).attr('id') + "'></span><a href=\"javascript:toggleImage('" + $(this).attr("id") + "');\">•</a>" 45687 }) 45688 .appendTo($('.slideshow-dots')) 45689 }); 45690 45691 $(".slideshow-dots span").each(function() { 45692 if ($(this).find("span").attr('class') == $('.slideshow img:visible').attr('id')) 45693 $(this).find("a").css('color', '#5781ae'); 45694 else 45695 $(this).find("a").css('color', '#ffffff'); 45696 }); 45697 45698 setInterval(function() { 45699 if (vis == 1) { 45700 vis = 0; 45701 } 45702 else { 45703 $('.slideshow :first-child') 45704 .fadeOut(1000) 45705 .next('img') 45706 .fadeIn(1000) 45707 .end() 45708 .appendTo('.slideshow'); 45709 45710 ssImgVis = $('.slideshow img:visible'); 45711 $(".slideshow-dots span").each(function() {
45712 if ($(this).find("span").attr('class') == $('.slideshow img:visible').attr('id')) 45713 $(this).find("a").css('color', '#5781ae'); 45714 else 45715 $(this).find("a").css('color', '#ffffff'); 45716 }); 45717 index = ssImgVis.index(); 45718 45719 } 45720 }, 6000); 45721 45722 var divDesc = $('div.jqDescription'); 45723 divDesc.slideUp(); 45724 $('a.jqDesc').on('click', function(e) { 45725 var $this = $(this), 45726 countID = $this.data('clickid'); 45727 45728 var overlay = S.overlay(); 45729 overlay.html($('<div></div>').html($('[data-id=' + countID + ']').html())); 45730 $('.iahs-dms-tabs').tabs(); 45731 overlay.show(); 45732 45733 e.preventDefault(); 45734 }); 45735 45736 $('input.addBasketbtn').on('click', function(e) { 45737 var $this = $(this), 45738 overlay = S.overlay(), 45739 quantity = $this.data('quantity'), 45740 qSpan = $('span.shop-quantity'), 45741 productID = $this.data('productid'), 45742 productName = $this.data('productname'); 45743 45744 $.ajax({ 45745 type: "POST", 45746 url: SiteConfig.basepath + 'js/ajax-requests/add-to-basket.php', 45747 data: { 45748 basketClass: "Add", 45749 'productID': productID 45750 }, 45751 success: function(d) { 45752 qSpan.html('(' + (quantity + 1) + ')'); 45753 var buttons = [] 45754 var button1 = $('<button></button>', { 45755 text: 'Continue Shopping', 45756 'class': '' 45757 }) 45758 .on("click", function() { 45759 overlay.close(); 45760 }); 45761 var button2 = $('<button></button>', { 45762 text: 'Go to Checkout', 45763 'class': '' 45764 }) 45765 .on("click", function() { 45766 overlay.close(); 45767 window.location = SiteConfig.basepath + "checkout.php"; 45768 }); 45769 buttons.push(button1); 45770 buttons.push(button2); 45771 overlay.title('Product added to basket'); //To appear in a title header div 45772 overlay.content('You have added 1 ' + productName + ' to your basket'); //To appear in the main content 45773 overlay.buttons(buttons); //To add a button row 45774 overlay.show(); 45775 }, 45776 error: function() { 45777 overlay.html('There was a problem adding this product to the cart'); 45778 overlay.show(); 45779 } 45780 }); 45781 e.preventDefault(); 45782 }); 45783 45784 $('div.product-order-details').hide(); 45785 45786 $('a.product-expand').on('click', function(e) { 45787 var $this = $(this), 45788 productID = $this.data('productid'), 45789 list = $('div[data-productid=' + productID + ']'); 45790 45791 if (list.is(':hidden')) { 45792 list.show(); 45793 $this.html('-'); 45794 } else { 45795 list.hide(); 45796 $this.html('+'); 45797 } 45798 45799 45800 e.preventDefault(); 45801 }); 45802 45803 GlobalObj = function() { 45804 this.dropdown(); 45805 this.accessibility(); 45806 }; 45807 GlobalObj.prototype = { 45808 dropdown: function() { 45809 var navLi = $('#nav ul li'); 45810 45811 var check = null; 45812 navLi.on({ 45813 mouseenter: function(e) { 45814 if (check != this) { 45815 $(this).children('ul').stop(true, true).slideDown('fast'); 45816 } 45817 }, 45818 mouseleave: function(e) { 45819 check = this; 45820 $(this).children('ul').stop(true, true).slideUp('fast', function() { 45821 check = null; 45822 }); 45823 } 45824 }); 45825 }, 45826 getFormData: function($form) { 45827 var out = {}; 45828 var a = $form.serializeArray(); 45829 $.each(a, function() { 45830 if (out[this.name] !== undefined) { 45831 if (!out[this.name].push) { 45832 out[this.name] = [out[this.name]]; 45833 } 45834 out[this.name].push(this.value || ''); 45835 } else { 45836 out[this.name] = this.value || ''; 45837 } 45838 }); 45839 return out; 45840 }, 45841 accessibility: function() { 45842 $('.T').on('click', function(e) { 45843 $html = $('html'); 45844 45845 if ($html.hasClass('larger')) { 45846 $html.removeClass('larger'); 45847 } 45848 else { 45849 $html.addClass('larger'); 45850 } 45851 e.preventDefault(); 45852 }); 45853 } 45854 }; 45855 45856 G = new GlobalObj(); 45857 45858 /*Accordion Menu*/ 45859 var icons = { 45860 header: "ui-icon-circle-arrow-e", 45861 activeHeader: "ui-icon-circle-arrow-s" 45862 }; 45863 $('body').find(".cms-accordion").accordion({ 45864 create: function(event, ui) { 45865 $(this).accordion("option", "header", $(this).data("header") === undefined ? "h3" : $(this).data("header")); 45866 $(this).accordion("option", "active", (G.getUrlParameterByName('accordion')) ? (G.getUrlParameterByName('accordion') - 1) : ($(this).data("active") !== undefined ? ($(this).data("active") === "false" ? false : $(this).data("active")) : 0)); 45867 $(this).show(); 45868 var header = $(this).accordion("option", "header"); 45869 var active = $(this).accordion("option", "active"); 45870 if (header && active) { 45871 setTimeout(function() { 45872 $('html, body').animate({ 45873 scrollTop: $(".cms-accordion > " + header).eq(active).offset().top - 50 45874 }, 2000); 45875 }, 1000); 45876 } 45877 }, 45878 heightStyle: "content", 45879 icons: icons, 45880 collapsible: true, 45881 activate: function(e, ui) { 45882 ui.newPanel.find('iframe').each(function() { 45883 var $iframe = $(this); 45884 if ($iframe.data('loaded') != true) { 45885 $iframe.get(0).src = $iframe.attr('src'); 45886 $iframe.data('loaded', true); 45887 } 45888 }); 45889 } 45890 }); 45891 45892 /*Email Mask*/ 45893 $('body').find(".cms-emailmask").each(function(i,e) { 45894 var $this = $(e); 45895 45896 $this.replaceWith("<a href='#' class='cms-emailmask-dialog' data-email='"+$this.data("email")+"'>Email Me</a>"); 45897 }); 45898 45899 if ($('body').find(".cms-emailmask-dialog").length) { 45900 $('body').find(".cms-emailmask-dialog").each(function(i, elem) { 45901 var $this = $(elem), 45902 $recipient = atob($this.data("email")); 45903 $this.button(); 45904 $this.on('click', function(e) { 45905 var oLay = S.overlay(); 45906 oLay.css("padding",8); 45907 oLay.html("<h1>Send a message...</h1>"); 45908 oLay.append("<p>Using this form, you can send the relevant person a message.</p>"); 45909 var oLayTable = $("<table>").addClass("ui-form ui-widget-content ui-corner-all email-data").css({"width":"80%", "margin": "10px 10% 10px 10%"}); 45910 oLayTable 45911 .append( 45912 $("<tr>") 45913 .append($("<td colspan='2' class='errorText'></td>")) 45914 ) 45915 .append( 45916 $("<tr>") 45917 .append($("<td>Your Email:</td>")) 45918 .append($("<td></td>").append($("<input style='width: 60%' type='text' name='from' placeholder='Your Email Address' />"))) 45919 ) 45920 .append( 45921 $("<tr>") 45922 .append($("<td>Your Name:</td>")) 45923 .append($("<td></td>").append($("<input style='width: 60%' type='text' name='name' placeholder='Your Name' />"))) 45924 ) 45925 .append( 45926 $("<tr>") 45927 .append($("<td>Message:</td>")) 45928 .append($("<td></td>").append($("<textarea name='message'></textarea>"))) 45929 ) 45930 .append( 45931 $("<tr>") 45932 .append($("<td colspan='2'></td>") 45933 .append($("<button class='g-recaptcha' data-sitekey='"+SiteConfig.recaptcha+"' data-callback='captchaEmailMeSubmit'>Send</button>").button().on('click',function() { 45934 var button = $(this); 45935 grecaptcha.ready(function() { 45936 grecaptcha.execute(SiteConfig.recaptcha, {action: 'emailMeSubmit'}).then(function(token) { 45937 45938 // Add your logic to submit to your backend server here. 45939 var $from = oLayTable.find("input[name='from']").val(), 45940 $name = oLayTable.find("input[name='name']").val(), 45941 $message = oLayTable.find("textarea[name='message']").val(); 45942 45943 if ($from != "" && $name != "" && $message != "" && token != "") { 45944 var postData = {};
45945 postData.to = $recipient; 45946 postData.subject = "Message from the IAHS website"; 45947 postData.content = "<p>From: "+oLayTable.find("input[name='from']").val()+"</p>" + "<p>Name: "+oLayTable.find("input[name='name']").val()+"</p>" + oLayTable.find("textarea[name='message']").val(); 45948 postData.token = token; 45949 $("<p>Sending message...</p>").insertAfter(button); 45950 $(this).remove(); 45951 45952 $.ajax({ 45953 url: SiteConfig.basepath+"API/cms.json?act=emailmask", 45954 type: "POST", 45955 dataType: "json", 45956 data: postData, 45957 success: function(d) { 45958 if (d.result != "error") { 45959 oLay.html("Your message has been sucessfully sent."); 45960 setTimeout(oLay.close, 1500); 45961 } 45962 } 45963 }); 45964 } 45965 else { 45966 $('.errorText').html('Please make sure all fields are complete'); 45967 } 45968 }); 45969 }); 45970 45971 })))) 45972 .appendTo(oLay); 45973 oLay.show(); 45974 45975 e.preventDefault(); 45976 }); 45977 }); 45978 } 45979 45980})(jQuery); 45981 45982/* 45983 * --------------------------SearchRating------------------------------------- 45984 */ 45985 45986var SearchRating = { 45987 fire: function(config) { 45988 this.config = config; 45989 this.config.clicked = false; 45990 this.config.overlay = null; 45991 this.config.data = {}; 45992 this.bindEvents(); 45993 }, 45994 /* 45995 * bind the click, mouseenter and mouseleave 45996 */ 45997 bindEvents: function() { 45998 var self = SearchRating; 45999 /* 46000 * Create the popup, get data and execute the call 46001 */ 46002 self.config.thumb.on("click", function() { 46003 self.config.clicked = $(this); 46004 self.createOverlay(); 46005 self.getData(); 46006 self.execute(); 46007 }); 46008 }, 46009 /* 46010 * Create the overaly using the Samui object 46011 */ 46012 createOverlay: function() { 46013 var self = SearchRating; 46014 self.config.overlay = S.overlay(); 46015 }, 46016 /* 46017 * get the data 46018 */ 46019 getData: function() { 46020 var self = SearchRating; 46021 self.config.data.search_id = self.config.clicked.data("search"); 46022 self.config.data.rating = self.config.clicked.data("rating"); 46023 }, 46024 updateScore: function() { 46025 var self = SearchRating; 46026 var previousScore = parseInt(self.config.clicked.next(".score").text()); 46027 self.config.clicked.next(".score").text(previousScore + 1); 46028 46029 }, 46030 /* 46031 * function fired if the request is ok 46032 */ 46033 successRequest: function() { 46034 var self = SearchRating; 46035 self.config.overlay.title("Thank you"); 46036 self.config.overlay.content("<h3>Your feedback is highly appreciated and will help us to improve our search system</h3>"); 46037 var buttons = new Array(); 46038 var close = $("<button/>", {text: "Close"}).on("click", function() { 46039 self.config.overlay.close(); 46040 }) 46041 buttons.push(close) 46042 self.config.overlay.buttons(buttons); 46043 self.config.overlay.show(); 46044 self.config.thumb.unbind("click"); 46045 self.config.thumb.css("cursor", "default"); 46046 self.updateScore(); 46047 }, 46048 /* 46049 * function fired if an error occurred during the request 46050 */ 46051 failRequest: function() { 46052 var self = SearchRating; 46053 self.config.overlay.content("<h3>An error occurred during the request, please try again later</h3>"); 46054 var buttons = new Array(); 46055 var close = $("<button/>", {text: "Close"}).on("click", function() { 46056 self.config.overlay.close(); 46057 }) 46058 buttons.push(close) 46059 self.config.overlay.buttons(buttons); 46060 self.config.overlay.show(); 46061 }, 46062 /* 46063 * execute the call and display a message 46064 */ 46065 execute: function() { 46066 var self = SearchRating; 46067 if (self.config.voted === true) { 46068 self.config.overlay.title("Error"); 46069 self.config.overlay.content("<h3>Sorry but you already rated this search, thank you<h3>"); 46070 var buttons = new Array(); 46071 var close = $("<button/>", {text: "Close"}).on("click", function() { 46072 self.config.overlay.close(); 46073 }) 46074 buttons.push(close) 46075 self.config.overlay.buttons(buttons); 46076 self.config.overlay.show(); 46077 } else { 46078 46079 $.ajax({ 46080 type: "POST", 46081 url: SiteConfig.basepath + "API/search?act=rating", 46082 dataType: "json", 46083 data: { 46084 search_id: self.config.data.search_id, 46085 rating: self.config.data.rating 46086 } 46087 }) 46088 .done(function(r) { 46089 if (r.status && r.status == "OK") { 46090 self.successRequest(); 46091 } else {
46092 self.failRequest(); 46093 } 46094 46095 }) 46096 .fail(self.failRequest); 46097 46098 } 46099 }, 46100}; 46101/* 46102 * Init the object! 46103 */ 46104if ($(".searchRating").length) { 46105 SearchRating.fire({ 46106 thumb: $(".searchRating") 46107 }); 46108} 46109 46110/* 46111 Add dialog popup action to a tags with a data-href attribute 46112*/ 46113$('a[data-href]').on('click', function() { 46114 var $this = $(this), 46115 overlay = S.overlay(); 46116 46117 overlay.title(($this.data('href-title') !== undefined) ? $this.data('href-title') : $this.text()); 46118/* 46119 var buttons = new Array(); 46120 var close = $("<button/>", {text: "Close"}).on("click", function() { 46121 overlay.close(); 46122 }); 46123 buttons.push(close) 46124 overlay.buttons(buttons); 46125*/ 46126 $.get( $this.data('href'), function( data ) { 46127 overlay.content(data); 46128 overlay.show(); 46129 }); 46130 46131}); 46132 46133 46134/* jshint forin:true, noarg:true, noempty:true, eqeqeq:true, boss:true, undef:true, curly:true, browser:true, jquery:true */ 46135/* 46136 * jQuery MultiSelect UI Widget 1.13 46137 * Copyright (c) 2012 Eric Hynds 46138 * 46139 * http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/ 46140 * 46141 * Depends: 46142 * - jQuery 1.4.2+ 46143 * - jQuery UI 1.8 widget factory 46144 * 46145 * Optional: 46146 * - jQuery UI effects 46147 * - jQuery UI position utility 46148 * 46149 * Dual licensed under the MIT and GPL licenses: 46150 * http://www.opensource.org/licenses/mit-license.php 46151 * http://www.gnu.org/licenses/gpl.html 46152 * 46153 */ 46154(function($, undefined) { 46155 46156 var multiselectID = 0; 46157 46158 $.widget("ech.multiselect", { 46159 // default options 46160 options: { 46161 header: true, 46162 height: 175, 46163 minWidth: 225, 46164 classes: '', 46165 checkAllText: 'Check all', 46166 uncheckAllText: 'Uncheck all', 46167 noneSelectedText: 'Select options', 46168 selectedText: '# selected', 46169 selectedList: 0, 46170 show: null, 46171 hide: null, 46172 autoOpen: false, 46173 multiple: true, 46174 position: {} 46175 }, 46176 _create: function() { 46177 var el = this.element.hide(), 46178 o = this.options; 46179 46180 this.speed = $.fx.speeds._default; // default speed for effects 46181 this._isOpen = false; // assume no 46182 46183 var 46184 button = (this.button = $('<button type="button"><span class="ui-icon ui-icon-triangle-2-n-s"></span></button>')) 46185 .addClass('ui-multiselect ui-widget ui-state-default ui-corner-all') 46186 .addClass(o.classes) 46187 .attr({'title': el.attr('title'), 'aria-haspopup': true, 'tabIndex': el.attr('tabIndex')}) 46188 .insertAfter(el), 46189 buttonlabel = (this.buttonlabel = $('<span />')) 46190 .html(o.noneSelectedText) 46191 .appendTo(button), 46192 menu = (this.menu = $('<div />')) 46193 .addClass('ui-multiselect-menu ui-widget ui-widget-content ui-corner-all') 46194 .addClass(o.classes) 46195 .appendTo(document.body), 46196 header = (this.header = $('<div />')) 46197 .addClass('ui-widget-header ui-corner-all ui-multiselect-header ui-helper-clearfix') 46198 .appendTo(menu), 46199 headerLinkContainer = (this.headerLinkContainer = $('<ul />')) 46200 .addClass('ui-helper-reset') 46201 .html(function() { 46202 if (o.header === true) { 46203 return '<li><a class="ui-multiselect-all" href="#"><span class="ui-icon ui-icon-check"></span><span>' + o.checkAllText + '</span></a></li><li><a class="ui-multiselect-none" href="#"><span class="ui-icon ui-icon-closethick"></span><span>' + o.uncheckAllText + '</span></a></li>'; 46204 } else if (typeof o.header === "string") { 46205 return '<li>' + o.header + '</li>'; 46206 } else { 46207 return ''; 46208 } 46209 }) 46210 .append('<li class="ui-multiselect-close"><a href="#" class="ui-multiselect-close"><span class="ui-icon ui-icon-circle-close"></span></a></li>') 46211 .appendTo(header), 46212 checkboxContainer = (this.checkboxContainer = $('<ul />')) 46213 .addClass('ui-multiselect-checkboxes ui-helper-reset') 46214 .appendTo(menu); 46215 46216 // perform event bindings 46217 this._bindEvents(); 46218 46219 // build menu 46220 this.refresh(true); 46221 46222 // some addl. logic for single selects 46223 if (!o.multiple) { 46224 menu.addClass('ui-multiselect-single'); 46225 } 46226 }, 46227 _init: function() { 46228 if (this.options.header === false) { 46229 this.header.hide(); 46230 } 46231 if (!this.options.multiple) { 46232 this.headerLinkContainer.find('.ui-multiselect-all, .ui-multiselect-none').hide(); 46233 } 46234 if (this.options.autoOpen) { 46235 this.open(); 46236 } 46237 if (this.element.is(':disabled')) { 46238 this.disable(); 46239 } 46240 }, 46241 refresh: function(init) { 46242 var el = this.element, 46243 o = this.options, 46244 menu = this.menu, 46245 checkboxContainer = this.checkboxContainer, 46246 optgroups = [], 46247 html = "", 46248 id = el.attr('id') || multiselectID++; // unique ID for the label & option tags 46249 46250 // build items 46251 el.find('option').each(function(i) { 46252 var $this = $(this), 46253 parent = this.parentNode, 46254 title = this.innerHTML, 46255 description = this.title, 46256 value = this.value, 46257 inputID = 'ui-multiselect-' + (this.id || id + '-option-' + i), 46258 isDisabled = this.disabled, 46259 isSelected = this.selected, 46260 labelClasses = ['ui-corner-all'], 46261 liClasses = (isDisabled ? 'ui-multiselect-disabled ' : ' ') + this.className, 46262 optLabel; 46263 46264 // is this an optgroup? 46265 if (parent.tagName === 'OPTGROUP') { 46266 optLabel = parent.getAttribute('label'); 46267 46268 // has this optgroup been added already? 46269 if ($.inArray(optLabel, optgroups) === -1) { 46270 html += '<li class="ui-multiselect-optgroup-label ' + parent.className + '"><a href="#">
46270' + optLabel + '</a></li>'; 46271 optgroups.push(optLabel); 46272 } 46273 } 46274 46275 if (isDisabled) { 46276 labelClasses.push('ui-state-disabled'); 46277 } 46278 46279 // browsers automatically select the first option 46280 // by default with single selects 46281 if (isSelected && !o.multiple) { 46282 labelClasses.push('ui-state-active'); 46283 } 46284 46285 html += '<li class="' + liClasses + '">'; 46286 46287 // create the label 46288 html += '<label for="' + inputID + '" title="' + description + '" class="' + labelClasses.join(' ') + '">'; 46289 html += '<input id="' + inputID + '" name="multiselect_' + id + '" type="' + (o.multiple ? "checkbox" : "radio") + '" value="' + value + '" title="' + title + '"'; 46290 46291 // pre-selected? 46292 if (isSelected) { 46293 html += ' checked="checked"'; 46294 html += ' aria-selected="true"'; 46295 } 46296 46297 // disabled? 46298 if (isDisabled) { 46299 html += ' disabled="disabled"'; 46300 html += ' aria-disabled="true"'; 46301 } 46302 46303 // add the title and close everything off 46304 html += ' /><span>' + title + '</span></label></li>'; 46305 }); 46306 46307 // insert into the DOM 46308 checkboxContainer.html(html); 46309 46310 // cache some moar useful elements 46311 this.labels = menu.find('label'); 46312 this.inputs = this.labels.children('input'); 46313 46314 // set widths 46315 this._setButtonWidth(); 46316 this._setMenuWidth(); 46317 46318 // remember default value 46319 this.button[0].defaultValue = this.update(); 46320 46321 // broadcast refresh event; useful for widgets 46322 if (!init) { 46323 this._trigger('refresh'); 46324 } 46325 }, 46326 // updates the button text. call refresh() to rebuild 46327 update: function() { 46328 var o = this.options, 46329 $inputs = this.inputs, 46330 $checked = $inputs.filter(':checked'), 46331 numChecked = $checked.length, 46332 value; 46333 46334 if (numChecked === 0) { 46335 value = o.noneSelectedText; 46336 } else { 46337 if ($.isFunction(o.selectedText)) { 46338 value = o.selectedText.call(this, numChecked, $inputs.length, $checked.get()); 46339 } else if (/\d/.test(o.selectedList) && o.selectedList > 0 && numChecked <= o.selectedList) { 46340 value = $checked.map(function() { 46341 return $(this).next().html(); 46342 }).get().join(', '); 46343 } else { 46344 value = o.selectedText.replace('#', numChecked).replace('#', $inputs.length); 46345 } 46346 } 46347 46348 this.buttonlabel.html(value); 46349 return value; 46350 }, 46351 // binds events 46352 _bindEvents: function() { 46353 var self = this, button = this.button; 46354 46355 function clickHandler() { 46356 self[ self._isOpen ? 'close' : 'open' ](); 46357 return false; 46358 } 46359 46360 // webkit doesn't like it when you click on the span :( 46361 button 46362 .find('span') 46363 .bind('click.multiselect', clickHandler); 46364 46365 // button events 46366 button.bind({ 46367 click: clickHandler, 46368 keypress: function(e) { 46369 switch (e.which) { 46370 case 27: // esc 46371 case 38: // up 46372 case 37: // left 46373 self.close(); 46374 break; 46375 case 39: // right 46376 case 40: // down 46377 self.open(); 46378 break; 46379 } 46380 }, 46381 mouseenter: function() { 46382 if (!button.hasClass('ui-state-disabled')) { 46383 $(this).addClass('ui-state-hover'); 46384 } 46385 }, 46386 mouseleave: function() { 46387 $(this).removeClass('ui-state-hover'); 46388 }, 46389 focus: function() { 46390 if (!button.hasClass('ui-state-disabled')) { 46391 $(this).addClass('ui-state-focus'); 46392 } 46393 }, 46394 blur: function() { 46395 $(this).removeClass('ui-state-focus'); 46396 } 46397 }); 46398 46399 // header links 46400 this.header 46401 .delegate('a', 'click.multiselect', function(e) { 46402 // close link 46403 if ($(this).hasClass('ui-multiselect-close')) { 46404 self.close(); 46405 46406 // check all / uncheck all 46407 } else { 46408 self[ $(this).hasClass('ui-multiselect-all') ? 'checkAll' : 'uncheckAll' ](); 46409 } 46410 46411 e.preventDefault(); 46412 }); 46413 46414 // optgroup label toggle support 46415 this.menu 46416 .delegate('li.ui-multiselect-optgroup-label a', 'click.multiselect', function(e) { 46417 e.preventDefault(); 46418 46419 var $this = $(this),
46420 $inputs = $this.parent().nextUntil('li.ui-multiselect-optgroup-label').find('input:visible:not(:disabled)'), 46421 nodes = $inputs.get(), 46422 label = $this.parent().text(); 46423 46424 // trigger event and bail if the return is false 46425 if (self._trigger('beforeoptgrouptoggle', e, {inputs: nodes, label: label}) === false) { 46426 return; 46427 } 46428 46429 // toggle inputs 46430 self._toggleChecked( 46431 $inputs.filter(':checked').length !== $inputs.length, 46432 $inputs 46433 ); 46434 46435 self._trigger('optgrouptoggle', e, { 46436 inputs: nodes, 46437 label: label, 46438 checked: nodes[0].checked 46439 }); 46440 }) 46441 .delegate('label', 'mouseenter.multiselect', function() { 46442 if (!$(this).hasClass('ui-state-disabled')) { 46443 self.labels.removeClass('ui-state-hover'); 46444 $(this).addClass('ui-state-hover').find('input').focus(); 46445 } 46446 }) 46447 .delegate('label', 'keydown.multiselect', function(e) { 46448 e.preventDefault(); 46449 46450 switch (e.which) { 46451 case 9: // tab 46452 case 27: // esc 46453 self.close(); 46454 break; 46455 case 38: // up 46456 case 40: // down 46457 case 37: // left 46458 case 39: // right 46459 self._traverse(e.which, this); 46460 break; 46461 case 13: // enter 46462 $(this).find('input')[0].click(); 46463 break; 46464 } 46465 }) 46466 .delegate('input[type="checkbox"], input[type="radio"]', 'click.multiselect', function(e) { 46467 var $this = $(this), 46468 val = this.value, 46469 checked = this.checked, 46470 tags = self.element.find('option'); 46471 46472 // bail if this input is disabled or the event is cancelled 46473 if (this.disabled || self._trigger('click', e, {value: val, text: this.title, checked: checked}) === false) { 46474 e.preventDefault(); 46475 return; 46476 } 46477 46478 // make sure the input has focus. otherwise, the esc key 46479 // won't close the menu after clicking an item. 46480 $this.focus(); 46481 46482 // toggle aria state 46483 $this.attr('aria-selected', checked); 46484 46485 // change state on the original option tags 46486 tags.each(function() { 46487 if (this.value === val) { 46488 this.selected = checked; 46489 } else if (!self.options.multiple) { 46490 this.selected = false; 46491 } 46492 }); 46493 46494 // some additional single select-specific logic 46495 if (!self.options.multiple) { 46496 self.labels.removeClass('ui-state-active'); 46497 $this.closest('label').toggleClass('ui-state-active', checked); 46498 46499 // close menu 46500 self.close(); 46501 } 46502 46503 // fire change on the select box 46504 self.element.trigger("change"); 46505 46506 // setTimeout is to fix multiselect issue #14 and #47. caused by jQuery issue #3827 46507 // http://bugs.jquery.com/ticket/3827 46508 setTimeout($.proxy(self.update, self), 10); 46509 }); 46510 46511 // close each widget when clicking on any other element/anywhere else on the page 46512 $(document).bind('mousedown.multiselect', function(e) { 46513 if (self._isOpen && !$.contains(self.menu[0], e.target) && !$.contains(self.button[0], e.target) && e.target !== self.button[0]) { 46514 self.close(); 46515 } 46516 }); 46517 46518 // deal with form resets. the problem here is that buttons aren't 46519 // restored to their defaultValue prop on form reset, and the reset 46520 // handler fires before the form is actually reset. delaying it a bit 46521 // gives the form inputs time to clear. 46522 $(this.element[0].form).bind('reset.multiselect', function() { 46523 setTimeout($.proxy(self.refresh, self), 10); 46524 }); 46525 }, 46526 // set button width 46527 _setButtonWidth: function() { 46528 var width = this.element.outerWidth(), 46529 o = this.options; 46530 46531 if (/\d/.test(o.minWidth) && width < o.minWidth) { 46532 width = o.minWidth; 46533 } 46534 // set widths 46535 this.button.width(width); 46536 }, 46537 // set menu width 46538 _setMenuWidth: function() { 46539 var m = this.menu, 46540 width = this.button.outerWidth() - 46541 parseInt(m.css('padding-left'), 10) - 46542 parseInt(m.css('padding-right'), 10) - 46543 parseInt(m.css('border-right-width'), 10) - 46544 parseInt(m.css('border-left-width'), 10); 46545 46546 m.width(width || this.button.outerWidth()); 46547 }, 46548 // move up or down within the menu 46549 _traverse: function(which, start) { 46550 var $start = $(start), 46551 moveToLast = which === 38 || which === 37, 46552 // select the first li that isn't an optgroup label / disabled 46553 $next = $start.parent()[moveToLast ? 'prevAll' : 'nextAll']('li:not(.ui-multiselect-disabled, .ui-multiselect-optgroup-label)')[ moveToLast ? 'last' : 'first'](); 46554 46555 // if at the first/last element 46556 if (!$next.length) { 46557 var $container = this.menu.find('ul').last(); 46558 46559 // move to the first/last 46560 this.menu.find('label')[ moveToLast ? 'last' : 'first' ]().trigger('mouseover'); 46561 46562 // set scroll position 46563 $container.scrollTop(moveToLast ? $container.height() : 0); 46564 46565 } else { 46566 $next.find('label').trigger('mouseover'); 46567 } 46568 }, 46569 // This is an internal function to toggle the checked property and 46570 // other related attributes of a checkbox. 46571 // 46572 // The context of this function should be a checkbox; do not proxy it. 46573 _toggleState: function(prop, flag) { 46574 return function() { 46575 if (!this.disabled) { 46576 this[ prop ] = flag; 46577 } 46578 46579 if (flag) { 46580 this.setAttribute('aria-selected', true); 46581 } else { 46582 this.removeAttribute('aria-selected'); 46583 } 46584 }; 46585 }, 46586 _toggleChecked: function(flag, group) {
46587 var $inputs = (group && group.length) ? group : this.inputs, 46588 self = this; 46589 46590 // toggle state on inputs 46591 $inputs.each(this._toggleState('checked', flag)); 46592 46593 // give the first input focus 46594 $inputs.eq(0).focus(); 46595 46596 // update button text 46597 this.update(); 46598 46599 // gather an array of the values that actually changed 46600 var values = $inputs.map(function() { 46601 return this.value; 46602 }).get(); 46603 46604 // toggle state on original option tags 46605 this.element 46606 .find('option') 46607 .each(function() { 46608 if (!this.disabled && $.inArray(this.value, values) > -1) { 46609 self._toggleState('selected', flag).call(this); 46610 } 46611 }); 46612 46613 // trigger the change event on the select 46614 if ($inputs.length) { 46615 this.element.trigger("change"); 46616 } 46617 }, 46618 _toggleDisabled: function(flag) { 46619 this.button 46620 .attr({'disabled': flag, 'aria-disabled': flag})[ flag ? 'addClass' : 'removeClass' ]('ui-state-disabled'); 46621 46622 var inputs = this.menu.find('input'); 46623 var key = "ech-multiselect-disabled"; 46624 46625 if (flag) { 46626 // remember which elements this widget disabled (not pre-disabled) 46627 // elements, so that they can be restored if the widget is re-enabled. 46628 inputs = inputs.filter(':enabled') 46629 .data(key, true) 46630 } else { 46631 inputs = inputs.filter(function() { 46632 return $.data(this, key) === true; 46633 }).removeData(key); 46634 } 46635 46636 inputs 46637 .attr({'disabled': flag, 'arial-disabled': flag}) 46638 .parent()[ flag ? 'addClass' : 'removeClass' ]('ui-state-disabled'); 46639 46640 this.element 46641 .attr({'disabled': flag, 'aria-disabled': flag}); 46642 }, 46643 // open the menu 46644 open: function(e) { 46645 var self = this, 46646 button = this.button, 46647 menu = this.menu, 46648 speed = this.speed, 46649 o = this.options, 46650 args = []; 46651 46652 // bail if the multiselectopen event returns false, this widget is disabled, or is already open 46653 if (this._trigger('beforeopen') === false || button.hasClass('ui-state-disabled') || this._isOpen) { 46654 return; 46655 } 46656 46657 var $container = menu.find('ul').last(), 46658 effect = o.show, 46659 pos = button.offset(); 46660 46661 // figure out opening effects/speeds 46662 if ($.isArray(o.show)) { 46663 effect = o.show[0]; 46664 speed = o.show[1] || self.speed; 46665 } 46666 46667 // if there's an effect, assume jQuery UI is in use 46668 // build the arguments to pass to show() 46669 if (effect) { 46670 args = [effect, speed]; 46671 } 46672 46673 // set the scroll of the checkbox container 46674 $container.scrollTop(0).height(o.height); 46675 46676 // position and show menu 46677 if ($.ui.position && !$.isEmptyObject(o.position)) { 46678 o.position.of = o.position.of || button; 46679 46680 menu 46681 .show() 46682 .position(o.position) 46683 .hide(); 46684 46685 // if position utility is not available... 46686 } else { 46687 menu.css({ 46688 top: pos.top + button.outerHeight(), 46689 left: pos.left 46690 }); 46691 } 46692 46693 // show the menu, maybe with a speed/effect combo 46694 $.fn.show.apply(menu, args); 46695 46696 // select the first option 46697 // triggering both mouseover and mouseover because 1.4.2+ has a bug where triggering mouseover 46698 // will actually trigger mouseenter. the mouseenter trigger is there for when it's eventually fixed 46699 this.labels.eq(0).trigger('mouseover').trigger('mouseenter').find('input').trigger('focus'); 46700 46701 button.addClass('ui-state-active'); 46702 this._isOpen = true; 46703 this._trigger('open'); 46704 }, 46705 // close the menu 46706 close: function() { 46707 if (this._trigger('beforeclose') === false) { 46708 return; 46709 } 46710 46711 var o = this.options, 46712 effect = o.hide, 46713 speed = this.speed, 46714 args = []; 46715 46716 // figure out opening effects/speeds 46717 if ($.isArray(o.hide)) { 46718 effect = o.hide[0]; 46719 speed = o.hide[1] || this.speed; 46720 } 46721 46722 if (effect) { 46723 args = [effect, speed]; 46724 } 46725 46726 $.fn.hide.apply(this.menu, args); 46727 this.button.removeClass('ui-state-active').trigger('blur').trigger('mouseleave'); 46728 this._isOpen = false;
46729 this._trigger('close'); 46730 }, 46731 enable: function() { 46732 this._toggleDisabled(false); 46733 }, 46734 disable: function() { 46735 this._toggleDisabled(true); 46736 }, 46737 checkAll: function(e) { 46738 this._toggleChecked(true); 46739 this._trigger('checkAll'); 46740 }, 46741 uncheckAll: function() { 46742 this._toggleChecked(false); 46743 this._trigger('uncheckAll'); 46744 }, 46745 getChecked: function() { 46746 return this.menu.find('input').filter(':checked'); 46747 }, 46748 destroy: function() { 46749 // remove classes + data 46750 $.Widget.prototype.destroy.call(this); 46751 46752 this.button.remove(); 46753 this.menu.remove(); 46754 this.element.show(); 46755 46756 return this; 46757 }, 46758 isOpen: function() { 46759 return this._isOpen; 46760 }, 46761 widget: function() { 46762 return this.menu; 46763 }, 46764 getButton: function() { 46765 return this.button; 46766 }, 46767 // react to option changes after initialization 46768 _setOption: function(key, value) { 46769 var menu = this.menu; 46770 46771 switch (key) { 46772 case 'header': 46773 menu.find('div.ui-multiselect-header')[ value ? 'show' : 'hide' ](); 46774 break; 46775 case 'checkAllText': 46776 menu.find('a.ui-multiselect-all span').eq(-1).text(value); 46777 break; 46778 case 'uncheckAllText': 46779 menu.find('a.ui-multiselect-none span').eq(-1).text(value); 46780 break; 46781 case 'height': 46782 menu.find('ul').last().height(parseInt(value, 10)); 46783 break; 46784 case 'minWidth': 46785 this.options[ key ] = parseInt(value, 10); 46786 this._setButtonWidth(); 46787 this._setMenuWidth(); 46788 break; 46789 case 'selectedText': 46790 case 'selectedList': 46791 case 'noneSelectedText': 46792 this.options[key] = value; // these all needs to update immediately for the update() call 46793 this.update(); 46794 break; 46795 case 'classes': 46796 menu.add(this.button).removeClass(this.options.classes).addClass(value); 46797 break; 46798 case 'multiple': 46799 menu.toggleClass('ui-multiselect-single', !value); 46800 this.options.multiple = value; 46801 this.element[0].multiple = value; 46802 this.refresh(); 46803 } 46804 46805 $.Widget.prototype._setOption.apply(this, arguments); 46806 } 46807 }); 46808 46809})(jQuery); 46810 46811 46812 46813/*! DataTables 1.10.11 46814 * ©2008-2015 SpryMedia Ltd - datatables.net/license 46815 */ 46816 46817/** 46818 * @summary DataTables 46819 * @description Paginate, search and order HTML tables 46820 * @version 1.10.11 46821 * @file jquery.dataTables.js 46822 * @author SpryMedia Ltd (www.sprymedia.co.uk) 46823 * @contact www.sprymedia.co.uk/contact 46824 * @copyright Copyright 2008-2015 SpryMedia Ltd. 46825 * 46826 * This source file is free software, available under the following license: 46827 * MIT license - http://datatables.net/license 46828 * 46829 * This source file is distributed in the hope that it will be useful, but 46830 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 46831 * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. 46832 * 46833 * For details please refer to: http://www.datatables.net 46834 */ 46835 46836/*jslint evil: true, undef: true, browser: true */ 46837/*globals $,require,jQuery,define,_selector_run,_selector_opts,_selector_first,_selector_row_indexes,_ext,_Api,_api_register,_api_registerPlural,_re_new_lines,_re_html,_re_formatted_numeric,_re_escape_regex,_empty,_intVal,_numToDecimal,_isNumber,_isHtml,_htmlNumeric,_pluck,_pluck_order,_range,_stripHtml,_unique,_fnBuildAjax,_fnAjaxUpdate,_fnAjaxParameters,_fnAjaxUpdateDraw,_fnAjaxDataSrc,_fnAddColumn,_fnColumnOptions,_fnAdjustColumnSizing,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnVisbleColumns,_fnGetColumns,_fnColumnTypes,_fnApplyColumnDefs,_fnHungarianMap,_fnCamelToHungarian,_fnLanguageCompat,_fnBrowserDetect,_fnAddData,_fnAddTr,_fnNodeToDataIndex,_fnNodeToColumnIndex,_fnGetCellData,_fnSetCellData,_fnSplitObjNotation,_fnGetObjectDataFn,_fnSetObjectDataFn,_fnGetDataMaster,_fnClearTable,_fnDeleteIndex,_fnInvalidate,_fnGetRowElements,_fnCreateTr,_fnBuildHead,_fnDrawHead,_fnDraw,_fnReDraw,_fnAddOptionsHtml,_fnDetectHeader,_fnGetUniqueThs,_fnFeatureHtmlFilter,_fnFilterComplete,_fnFilterCustom,_fnFilterColumn,_fnFilter,_fnFilterCreateSearch,_fnEscapeRegex,_fnFilterData,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnInfoMacros,_fnInitialise,_fnInitComplete,_fnLengthChange,_fnFeatureHtmlLength,_fnFeatureHtmlPaginate,_fnPageChange,_fnFeatureHtmlProcessing,_fnProcessingDisplay,_fnFeatureHtmlTable,_fnScrollDraw,_fnApplyToChildren,_fnCalculateColumnWidths,_fnThrottle,_fnConvertToWidth,_fnGetWidestNode,_fnGetMaxLenString,_fnStringToCss,_fnSortFlatten,_fnSort,_fnSortAria,_fnSortListener,_fnSortAttachListener,_fnSortingClasses,_fnSortData,_fnSaveState,_fnLoadState,_fnSettingsFromNode,_fnLog,_fnMap,_fnBindAction,_fnCallbackReg,_fnCallbackFire,_fnLengthOverflow,_fnRenderer,_fnDataSource,_fnRowAttributes*/ 46838 46839(function( factory ) { 46840 "use strict"; 46841 46842 if ( typeof define === 'function' && define.amd ) { 46843 // AMD 46844 define( ['jquery'], function ( $ ) { 46845 return factory( $, window, document ); 46846 } ); 46847 } 46848 else if ( typeof exports === 'object' ) { 46849 // CommonJS 46850 module.exports = function (root, $) { 46851 if ( ! root ) { 46852 // CommonJS environments without a window global must pass a 46853 // root. This will give an error otherwise 46854 root = window; 46855 } 46856 46857 if ( ! $ ) { 46858 $ = typeof window !== 'undefined' ? // jQuery's factory checks for a global window 46859 require('jquery') : 46860 require('jquery')( root ); 46861 } 46862 46863 return factory( $, root, root.document ); 46864 }; 46865 } 46866 else { 46867 // Browser 46868 factory( jQuery, window, document ); 46869 } 46870} 46871(function( $, window, document, undefined ) { 46872 "use strict"; 46873 46874 /** 46875 * DataTables is a plug-in for the jQuery Javascript library. It is a highly 46876 * flexible tool, based upon the foundations of progressive enhancement, 46877 * which will add advanced interaction controls to any HTML table. For a 46878 * full list of features please refer to 46879 * [DataTables.net](href="http://datatables.net). 46880 * 46881 * Note that the `DataTable` object is not a global variable but is aliased 46882 * to `jQuery.fn.DataTable` and `jQuery.fn.dataTable` through which it may 46883 * be accessed. 46884 * 46885 * @class 46886 * @param {object} [init={}] Configuration object for DataTables. Options 46887 * are defined by {@link DataTable.defaults} 46888 * @requires jQuery 1.7+ 46889 * 46890 * @example 46891 * // Basic initialisation 46892 * $(document).ready( function { 46893 * $('#example').dataTable(); 46894 * } ); 46895 * 46896 * @example 46897 * // Initialisation with configuration options - in this case, disable 46898 * // pagination and sorting. 46899 * $(document).ready( function { 46900 * $('#example').dataTable( { 46901 * "paginate": false, 46902 * "sort": false 46903 * } ); 46904 * } ); 46905 */ 46906 var DataTable; 46907 46908 46909 /*
46910 * It is useful to have variables which are scoped locally so only the 46911 * DataTables functions can access them and they don't leak into global space. 46912 * At the same time these functions are often useful over multiple files in the 46913 * core and API, so we list, or at least document, all variables which are used 46914 * by DataTables as private variables here. This also ensures that there is no 46915 * clashing of variable names and that they can easily referenced for reuse. 46916 */ 46917 46918 46919 // Defined else where 46920 // _selector_run 46921 // _selector_opts 46922 // _selector_first 46923 // _selector_row_indexes 46924 46925 var _ext; // DataTable.ext 46926 var _Api; // DataTable.Api 46927 var _api_register; // DataTable.Api.register 46928 var _api_registerPlural; // DataTable.Api.registerPlural 46929 46930 var _re_dic = {}; 46931 var _re_new_lines = /[\r\n]/g; 46932 var _re_html = /<.*?>/g; 46933 var _re_date_start = /^[\w\+\-]/; 46934 var _re_date_end = /[\w\+\-]$/; 46935 46936 // Escape regular expression special characters 46937 var _re_escape_regex = new RegExp( '(\\' + [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^', '-' ].join('|\\') + ')', 'g' ); 46938 46939 // http://en.wikipedia.org/wiki/Foreign_exchange_market 46940 // - \u20BD - Russian ruble. 46941 // - \u20a9 - South Korean Won 46942 // - \u20BA - Turkish Lira 46943 // - \u20B9 - Indian Rupee 46944 // - R - Brazil (R$) and South Africa 46945 // - fr - Swiss Franc 46946 // - kr - Swedish krona, Norwegian krone and Danish krone 46947 // - \u2009 is thin space and \u202F is narrow no-break space, both used in many 46948 // standards as thousands separators. 46949 var _re_formatted_numeric = /[',$£â¬Â¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi; 46950 46951 46952 var _empty = function ( d ) { 46953 return !d || d === true || d === '-' ? true : false; 46954 }; 46955 46956 46957 var _intVal = function ( s ) { 46958 var integer = parseInt( s, 10 ); 46959 return !isNaN(integer) && isFinite(s) ? integer : null; 46960 }; 46961 46962 // Convert from a formatted number with characters other than `.` as the 46963 // decimal place, to a Javascript number 46964 var _numToDecimal = function ( num, decimalPoint ) { 46965 // Cache created regular expressions for speed as this function is called often 46966 if ( ! _re_dic[ decimalPoint ] ) { 46967 _re_dic[ decimalPoint ] = new RegExp( _fnEscapeRegex( decimalPoint ), 'g' ); 46968 } 46969 return typeof num === 'string' && decimalPoint !== '.' ? 46970 num.replace( /\./g, '' ).replace( _re_dic[ decimalPoint ], '.' ) : 46971 num; 46972 }; 46973 46974 46975 var _isNumber = function ( d, decimalPoint, formatted ) { 46976 var strType = typeof d === 'string'; 46977 46978 // If empty return immediately so there must be a number if it is a 46979 // formatted string (this stops the string "k", or "kr", etc being detected 46980 // as a formatted number for currency 46981 if ( _empty( d ) ) { 46982 return true; 46983 } 46984 46985 if ( decimalPoint && strType ) { 46986 d = _numToDecimal( d, decimalPoint ); 46987 } 46988 46989 if ( formatted && strType ) { 46990 d = d.replace( _re_formatted_numeric, '' ); 46991 } 46992 46993 return !isNaN( parseFloat(d) ) && isFinite( d ); 46994 }; 46995 46996 46997 // A string without HTML in it can be considered to be HTML still 46998 var _isHtml = function ( d ) { 46999 return _empty( d ) || typeof d === 'string'; 47000 }; 47001 47002 47003 var _htmlNumeric = function ( d, decimalPoint, formatted ) { 47004 if ( _empty( d ) ) { 47005 return true; 47006 } 47007 47008 var html = _isHtml( d ); 47009 return ! html ? 47010 null : 47011 _isNumber( _stripHtml( d ), decimalPoint, formatted ) ? 47012 true : 47013 null; 47014 }; 47015 47016 47017 var _pluck = function ( a, prop, prop2 ) { 47018 var out = []; 47019 var i=0, ien=a.length; 47020 47021 // Could have the test in the loop for slightly smaller code, but speed 47022 // is essential here 47023 if ( prop2 !== undefined ) { 47024 for ( ; i<ien ; i++ ) { 47025 if ( a[i] && a[i][ prop ] ) { 47026 out.push( a[i][ prop ][ prop2 ] ); 47027 } 47028 } 47029 } 47030 else { 47031 for ( ; i<ien ; i++ ) { 47032 if ( a[i] ) { 47033 out.push( a[i][ prop ] ); 47034 } 47035 } 47036 } 47037 47038 return out; 47039 }; 47040 47041 47042 // Basically the same as _pluck, but rather than looping over `a` we use `order` 47043 // as the indexes to pick from `a` 47044 var _pluck_order = function ( a, order, prop, prop2 ) 47045 { 47046 var out = []; 47047 var i=0, ien=order.length; 47048 47049 // Could have the test in the loop for slightly smaller code, but speed 47050 // is essential here 47051 if ( prop2 !== undefined ) { 47052 for ( ; i<ien ; i++ ) { 47053 if ( a[ order[i] ][ prop ] ) { 47054 out.push( a[ order[i] ][ prop ][ prop2 ] ); 47055 } 47056 } 47057 } 47058 else { 47059 for ( ; i<ien ; i++ ) { 47060 out.push( a[ order[i] ][ prop ] ); 47061 } 47062 } 47063 47064 return out; 47065 }; 47066 47067 47068 var _range = function ( len, start ) 47069 { 47070 var out = []; 47071 var end; 47072 47073 if ( start === undefined ) { 47074 start = 0; 47075 end = len; 47076 } 47077 else { 47078 end = start; 47079 start = len; 47080 } 47081 47082 for ( var i=start ; i<end ; i++ ) { 47083 out.push( i ); 47084 } 47085 47086 return out; 47087 }; 47088 47089 47090 var _removeEmpty = function ( a ) 47091 { 47092 var out = []; 47093 47094 for ( var i=0, ien=a.length ; i<ien ; i++ ) { 47095 if ( a[i] ) { // careful - will remove all falsy values! 47096 out.push( a[i] ); 47097 } 47098 } 47099 47100 return out; 47101 }; 47102 47103 47104 var _stripHtml = function ( d ) { 47105 return d.replace( _re_html, '' ); 47106 }; 47107 47108 47109 /** 47110 * Find the unique elements in a source array. 47111 * 47112 * @param {array} src Source array 47113 * @return {array} Array of unique items 47114 * @ignore 47115 */ 47116 var _unique = function ( src ) 47117 {
vendor: 35,212 bytes, lines 47118-48347
47118 // A faster unique method is to use object keys to identify used values, 47119 // but this doesn't work with arrays or objects, which we must also 47120 // consider. See jsperf.com/compare-array-unique-versions/4 for more 47121 // information. 47122 var 47123 out = [], 47124 val, 47125 i, ien=src.length, 47126 j, k=0; 47127 47128 again: for ( i=0 ; i<ien ; i++ ) { 47129 val = src[i]; 47130 47131 for ( j=0 ; j<k ; j++ ) { 47132 if ( out[j] === val ) { 47133 continue again; 47134 } 47135 } 47136 47137 out.push( val ); 47138 k++; 47139 } 47140 47141 return out; 47142 }; 47143 47144 47145 47146 /** 47147 * Create a mapping object that allows camel case parameters to be looked up 47148 * for their Hungarian counterparts. The mapping is stored in a private 47149 * parameter called `_hungarianMap` which can be accessed on the source object. 47150 * @param {object} o 47151 * @memberof DataTable#oApi 47152 */ 47153 function _fnHungarianMap ( o ) 47154 { 47155 var 47156 hungarian = 'a aa ai ao as b fn i m o s ', 47157 match, 47158 newKey, 47159 map = {}; 47160 47161 $.each( o, function (key, val) { 47162 match = key.match(/^([^A-Z]+?)([A-Z])/); 47163 47164 if ( match && hungarian.indexOf(match[1]+' ') !== -1 ) 47165 { 47166 newKey = key.replace( match[0], match[2].toLowerCase() ); 47167 map[ newKey ] = key; 47168 47169 if ( match[1] === 'o' ) 47170 { 47171 _fnHungarianMap( o[key] ); 47172 } 47173 } 47174 } ); 47175 47176 o._hungarianMap = map; 47177 } 47178 47179 47180 /** 47181 * Convert from camel case parameters to Hungarian, based on a Hungarian map 47182 * created by _fnHungarianMap. 47183 * @param {object} src The model object which holds all parameters that can be 47184 * mapped. 47185 * @param {object} user The object to convert from camel case to Hungarian. 47186 * @param {boolean} force When set to `true`, properties which already have a 47187 * Hungarian value in the `user` object will be overwritten. Otherwise they 47188 * won't be. 47189 * @memberof DataTable#oApi 47190 */ 47191 function _fnCamelToHungarian ( src, user, force ) 47192 { 47193 if ( ! src._hungarianMap ) { 47194 _fnHungarianMap( src ); 47195 } 47196 47197 var hungarianKey; 47198 47199 $.each( user, function (key, val) { 47200 hungarianKey = src._hungarianMap[ key ]; 47201 47202 if ( hungarianKey !== undefined && (force || user[hungarianKey] === undefined) ) 47203 { 47204 // For objects, we need to buzz down into the object to copy parameters 47205 if ( hungarianKey.charAt(0) === 'o' ) 47206 { 47207 // Copy the camelCase options over to the hungarian 47208 if ( ! user[ hungarianKey ] ) { 47209 user[ hungarianKey ] = {}; 47210 } 47211 $.extend( true, user[hungarianKey], user[key] ); 47212 47213 _fnCamelToHungarian( src[hungarianKey], user[hungarianKey], force ); 47214 } 47215 else { 47216 user[hungarianKey] = user[ key ]; 47217 } 47218 } 47219 } ); 47220 } 47221 47222 47223 /** 47224 * Language compatibility - when certain options are given, and others aren't, we 47225 * need to duplicate the values over, in order to provide backwards compatibility 47226 * with older language files. 47227 * @param {object} oSettings dataTables settings object 47228 * @memberof DataTable#oApi 47229 */ 47230 function _fnLanguageCompat( lang ) 47231 { 47232 var defaults = DataTable.defaults.oLanguage; 47233 var zeroRecords = lang.sZeroRecords; 47234 47235 /* Backwards compatibility - if there is no sEmptyTable given, then use the same as 47236 * sZeroRecords - assuming that is given. 47237 */ 47238 if ( ! lang.sEmptyTable && zeroRecords && 47239 defaults.sEmptyTable === "No data available in table" ) 47240 { 47241 _fnMap( lang, lang, 'sZeroRecords', 'sEmptyTable' ); 47242 } 47243 47244 /* Likewise with loading records */ 47245 if ( ! lang.sLoadingRecords && zeroRecords && 47246 defaults.sLoadingRecords === "Loading..." ) 47247 { 47248 _fnMap( lang, lang, 'sZeroRecords', 'sLoadingRecords' ); 47249 } 47250 47251 // Old parameter name of the thousands separator mapped onto the new 47252 if ( lang.sInfoThousands ) { 47253 lang.sThousands = lang.sInfoThousands; 47254 } 47255 47256 var decimal = lang.sDecimal; 47257 if ( decimal ) { 47258 _addNumericSort( decimal ); 47259 } 47260 } 47261 47262 47263 /** 47264 * Map one parameter onto another 47265 * @param {object} o Object to map 47266 * @param {*} knew The new parameter name 47267 * @param {*} old The old parameter name 47268 */ 47269 var _fnCompatMap = function ( o, knew, old ) { 47270 if ( o[ knew ] !== undefined ) { 47271 o[ old ] = o[ knew ]; 47272 } 47273 }; 47274 47275 47276 /** 47277 * Provide backwards compatibility for the main DT options. Note that the new 47278 * options are mapped onto the old parameters, so this is an external interface 47279 * change only. 47280 * @param {object} init Object to map 47281 */ 47282 function _fnCompatOpts ( init ) 47283 { 47284 _fnCompatMap( init, 'ordering', 'bSort' ); 47285 _fnCompatMap( init, 'orderMulti', 'bSortMulti' ); 47286 _fnCompatMap( init, 'orderClasses', 'bSortClasses' ); 47287 _fnCompatMap( init, 'orderCellsTop', 'bSortCellsTop' ); 47288 _fnCompatMap( init, 'order', 'aaSorting' ); 47289 _fnCompatMap( init, 'orderFixed', 'aaSortingFixed' ); 47290 _fnCompatMap( init, 'paging', 'bPaginate' ); 47291 _fnCompatMap( init, 'pagingType', 'sPaginationType' ); 47292 _fnCompatMap( init, 'pageLength', 'iDisplayLength' ); 47293 _fnCompatMap( init, 'searching', 'bFilter' ); 47294 47295 // Boolean initialisation of x-scrolling 47296 if ( typeof init.sScrollX === 'boolean' ) { 47297 init.sScrollX = init.sScrollX ? '100%' : ''; 47298 } 47299 if ( typeof init.scrollX === 'boolean' ) { 47300 init.scrollX = init.scrollX ? '100%' : ''; 47301 } 47302 47303 // Column search objects are in an array, so it needs to be converted 47304 // element by element 47305 var searchCols = init.aoSearchCols; 47306 47307 if ( searchCols ) { 47308 for ( var i=0, ien=searchCols.length ; i<ien ; i++ ) { 47309 if ( searchCols[i] ) { 47310 _fnCamelToHungarian( DataTable.models.oSearch, searchCols[i] ); 47311 } 47312 } 47313 } 47314 } 47315 47316 47317 /** 47318 * Provide backwards compatibility for column options. Note that the new options 47319 * are mapped onto the old parameters, so this is an external interface change 47320 * only. 47321 * @param {object} init Object to map 47322 */ 47323 function _fnCompatCols ( init ) 47324 { 47325 _fnCompatMap( init, 'orderable', 'bSortable' ); 47326 _fnCompatMap( init, 'orderData', 'aDataSort' ); 47327 _fnCompatMap( init, 'orderSequence', 'asSorting' ); 47328 _fnCompatMap( init, 'orderDataType', 'sortDataType' ); 47329 47330 // orderData can be given as an integer 47331 var dataSort = init.aDataSort; 47332 if ( dataSort && ! $.isArray( dataSort ) ) { 47333 init.aDataSort = [ dataSort ]; 47334 } 47335 } 47336 47337 47338 /** 47339 * Browser feature detection for capabilities, quirks 47340 * @param {object} settings dataTables settings object 47341 * @memberof DataTable#oApi 47342 */ 47343 function _fnBrowserDetect( settings ) 47344 { 47345 // We don't need to do this every time DataTables is constructed, the values 47346 // calculated are specific to the browser and OS configuration which we 47347 // don't expect to change between initialisations 47348 if ( ! DataTable.__browser ) { 47349 var browser = {}; 47350 DataTable.__browser = browser; 47351 47352 // Scrolling feature / quirks detection 47353 var n = $('<div/>') 47354 .css( { 47355 position: 'fixed', 47356 top: 0, 47357 left: 0, 47358 height: 1, 47359 width: 1, 47360 overflow: 'hidden' 47361 } ) 47362 .append( 47363 $('<div/>') 47364 .css( { 47365 position: 'absolute', 47366 top: 1, 47367 left: 1, 47368 width: 100, 47369 overflow: 'scroll' 47370 } ) 47371 .append( 47372 $('<div/>') 47373 .css( { 47374 width: '100%', 47375 height: 10 47376 } ) 47377 ) 47378 ) 47379 .appendTo( 'body' ); 47380 47381 var outer = n.children(); 47382 var inner = outer.children(); 47383 47384 // Numbers below, in order, are: 47385 // inner.offsetWidth, inner.clientWidth, outer.offsetWidth, outer.clientWidth 47386 // 47387 // IE6 XP: 100 100 100 83 47388 // IE7 Vista: 100 100 100 83 47389 // IE 8+ Windows: 83 83 100 83 47390 // Evergreen Windows: 83 83 100 83 47391 // Evergreen Mac with scrollbars: 85 85 100 85 47392 // Evergreen Mac without scrollbars: 100 100 100 100 47393 47394 // Get scrollbar width 47395 browser.barWidth = outer[0].offsetWidth - outer[0].clientWidth; 47396 47397 // IE6/7 will oversize a width 100% element inside a scrolling element, to 47398 // include the width of the scrollbar, while other browsers ensure the inner 47399 // element is contained without forcing scrolling 47400 browser.bScrollOversize = inner[0].offsetWidth === 100 && outer[0].clientWidth !== 100; 47401 47402 // In rtl text layout, some browsers (most, but not all) will place the 47403 // scrollbar on the left, rather than the right. 47404 browser.bScrollbarLeft = Math.round( inner.offset().left ) !== 1; 47405 47406 // IE8- don't provide height and width for getBoundingClientRect 47407 browser.bBounding = n[0].getBoundingClientRect().width ? true : false; 47408 47409 n.remove(); 47410 } 47411 47412 $.extend( settings.oBrowser, DataTable.__browser ); 47413 settings.oScroll.iBarWidth = DataTable.__browser.barWidth; 47414 } 47415 47416 47417 /** 47418 * Array.prototype reduce[Right] method, used for browsers which don't support 47419 * JS 1.6. Done this way to reduce code size, since we iterate either way 47420 * @param {object} settings dataTables settings object 47421 * @memberof DataTable#oApi 47422 */ 47423 function _fnReduce ( that, fn, init, start, end, inc ) 47424 { 47425 var 47426 i = start, 47427 value, 47428 isSet = false; 47429 47430 if ( init !== undefined ) { 47431 value = init; 47432 isSet = true; 47433 } 47434 47435 while ( i !== end ) { 47436 if ( ! that.hasOwnProperty(i) ) { 47437 continue; 47438 } 47439 47440 value = isSet ? 47441 fn( value, that[i], i, that ) : 47442 that[i]; 47443 47444 isSet = true; 47445 i += inc; 47446 } 47447 47448 return value; 47449 } 47450 47451 /** 47452 * Add a column to the list used for the table with default values 47453 * @param {object} oSettings dataTables settings object 47454 * @param {node} nTh The th element for this column 47455 * @memberof DataTable#oApi 47456 */ 47457 function _fnAddColumn( oSettings, nTh ) 47458 { 47459 // Add column to aoColumns array 47460 var oDefaults = DataTable.defaults.column; 47461 var iCol = oSettings.aoColumns.length; 47462 var oCol = $.extend( {}, DataTable.models.oColumn, oDefaults, { 47463 "nTh": nTh ? nTh : document.createElement('th'), 47464 "sTitle": oDefaults.sTitle ? oDefaults.sTitle : nTh ? nTh.innerHTML : '', 47465 "aDataSort": oDefaults.aDataSort ? oDefaults.aDataSort : [iCol], 47466 "mData": oDefaults.mData ? oDefaults.mData : iCol, 47467 idx: iCol 47468 } ); 47469 oSettings.aoColumns.push( oCol ); 47470 47471 // Add search object for column specific search. Note that the `searchCols[ iCol ]` 47472 // passed into extend can be undefined. This allows the user to give a default 47473 // with only some of the parameters defined, and also not give a default 47474 var searchCols = oSettings.aoPreSearchCols; 47475 searchCols[ iCol ] = $.extend( {}, DataTable.models.oSearch, searchCols[ iCol ] ); 47476 47477 // Use the default column options function to initialise classes etc 47478 _fnColumnOptions( oSettings, iCol, $(nTh).data() ); 47479 } 47480 47481 47482 /** 47483 * Apply options for a column 47484 * @param {object} oSettings dataTables settings object 47485 * @param {int} iCol column index to consider 47486 * @param {object} oOptions object with sType, bVisible and bSearchable etc 47487 * @memberof DataTable#oApi 47488 */ 47489 function _fnColumnOptions( oSettings, iCol, oOptions ) 47490 { 47491 var oCol = oSettings.aoColumns[ iCol ]; 47492 var oClasses = oSettings.oClasses; 47493 var th = $(oCol.nTh); 47494 47495 // Try to get width information from the DOM. We can't get it from CSS 47496 // as we'd need to parse the CSS stylesheet. `width` option can override 47497 if ( ! oCol.sWidthOrig ) { 47498 // Width attribute 47499 oCol.sWidthOrig = th.attr('width') || null; 47500 47501 // Style attribute 47502 var t = (th.attr('style') || '').match(/width:\s*(\d+[pxem%]+)/); 47503 if ( t ) { 47504 oCol.sWidthOrig = t[1]; 47505 } 47506 } 47507 47508 /* User specified column options */ 47509 if ( oOptions !== undefined && oOptions !== null ) 47510 { 47511 // Backwards compatibility 47512 _fnCompatCols( oOptions ); 47513 47514 // Map camel case parameters to their Hungarian counterparts 47515 _fnCamelToHungarian( DataTable.defaults.column, oOptions ); 47516 47517 /* Backwards compatibility for mDataProp */ 47518 if ( oOptions.mDataProp !== undefined && !oOptions.mData ) 47519 { 47520 oOptions.mData = oOptions.mDataProp; 47521 } 47522 47523 if ( oOptions.sType ) 47524 { 47525 oCol._sManualType = oOptions.sType; 47526 } 47527 47528 // `class` is a reserved word in Javascript, so we need to provide 47529 // the ability to use a valid name for the camel case input 47530 if ( oOptions.className && ! oOptions.sClass ) 47531 { 47532 oOptions.sClass = oOptions.className; 47533 } 47534 47535 $.extend( oCol, oOptions ); 47536 _fnMap( oCol, oOptions, "sWidth", "sWidthOrig" ); 47537 47538 /* iDataSort to be applied (backwards compatibility), but aDataSort will take 47539 * priority if defined 47540 */ 47541 if ( oOptions.iDataSort !== undefined ) 47542 { 47543 oCol.aDataSort = [ oOptions.iDataSort ]; 47544 } 47545 _fnMap( oCol, oOptions, "aDataSort" ); 47546 } 47547 47548 /* Cache the data get and set functions for speed */ 47549 var mDataSrc = oCol.mData; 47550 var mData = _fnGetObjectDataFn( mDataSrc ); 47551 var mRender = oCol.mRender ? _fnGetObjectDataFn( oCol.mRender ) : null; 47552 47553 var attrTest = function( src ) { 47554 return typeof src === 'string' && src.indexOf('@') !== -1; 47555 }; 47556 oCol._bAttrSrc = $.isPlainObject( mDataSrc ) && ( 47557 attrTest(mDataSrc.sort) || attrTest(mDataSrc.type) || attrTest(mDataSrc.filter) 47558 ); 47559 oCol._setter = null; 47560 47561 oCol.fnGetData = function (rowData, type, meta) { 47562 var innerData = mData( rowData, type, undefined, meta ); 47563 47564 return mRender && type ? 47565 mRender( innerData, type, rowData, meta ) : 47566 innerData; 47567 }; 47568 oCol.fnSetData = function ( rowData, val, meta ) { 47569 return _fnSetObjectDataFn( mDataSrc )( rowData, val, meta ); 47570 }; 47571 47572 // Indicate if DataTables should read DOM data as an object or array 47573 // Used in _fnGetRowElements 47574 if ( typeof mDataSrc !== 'number' ) { 47575 oSettings._rowReadObject = true; 47576 } 47577 47578 /* Feature sorting overrides column specific when off */ 47579 if ( !oSettings.oFeatures.bSort ) 47580 { 47581 oCol.bSortable = false; 47582 th.addClass( oClasses.sSortableNone ); // Have to add class here as order event isn't called 47583 } 47584 47585 /* Check that the class assignment is correct for sorting */ 47586 var bAsc = $.inArray('asc', oCol.asSorting) !== -1; 47587 var bDesc = $.inArray('desc', oCol.asSorting) !== -1; 47588 if ( !oCol.bSortable || (!bAsc && !bDesc) ) 47589 { 47590 oCol.sSortingClass = oClasses.sSortableNone; 47591 oCol.sSortingClassJUI = ""; 47592 } 47593 else if ( bAsc && !bDesc ) 47594 { 47595 oCol.sSortingClass = oClasses.sSortableAsc; 47596 oCol.sSortingClassJUI = oClasses.sSortJUIAscAllowed; 47597 } 47598 else if ( !bAsc && bDesc ) 47599 { 47600 oCol.sSortingClass = oClasses.sSortableDesc; 47601 oCol.sSortingClassJUI = oClasses.sSortJUIDescAllowed; 47602 } 47603 else 47604 { 47605 oCol.sSortingClass = oClasses.sSortable; 47606 oCol.sSortingClassJUI = oClasses.sSortJUI; 47607 } 47608 } 47609 47610 47611 /** 47612 * Adjust the table column widths for new data. Note: you would probably want to 47613 * do a redraw after calling this function! 47614 * @param {object} settings dataTables settings object 47615 * @memberof DataTable#oApi 47616 */ 47617 function _fnAdjustColumnSizing ( settings ) 47618 { 47619 /* Not interested in doing column width calculation if auto-width is disabled */ 47620 if ( settings.oFeatures.bAutoWidth !== false ) 47621 { 47622 var columns = settings.aoColumns; 47623 47624 _fnCalculateColumnWidths( settings ); 47625 for ( var i=0 , iLen=columns.length ; i<iLen ; i++ ) 47626 { 47627 columns[i].nTh.style.width = columns[i].sWidth; 47628 } 47629 } 47630 47631 var scroll = settings.oScroll; 47632 if ( scroll.sY !== '' || scroll.sX !== '') 47633 { 47634 _fnScrollDraw( settings ); 47635 } 47636 47637 _fnCallbackFire( settings, null, 'column-sizing', [settings] ); 47638 } 47639 47640 47641 /** 47642 * Covert the index of a visible column to the index in the data array (take account 47643 * of hidden columns) 47644 * @param {object} oSettings dataTables settings object 47645 * @param {int} iMatch Visible column index to lookup 47646 * @returns {int} i the data index 47647 * @memberof DataTable#oApi 47648 */ 47649 function _fnVisibleToColumnIndex( oSettings, iMatch ) 47650 { 47651 var aiVis = _fnGetColumns( oSettings, 'bVisible' ); 47652 47653 return typeof aiVis[iMatch] === 'number' ? 47654 aiVis[iMatch] : 47655 null; 47656 } 47657 47658 47659 /** 47660 * Covert the index of an index in the data array and convert it to the visible 47661 * column index (take account of hidden columns) 47662 * @param {int} iMatch Column index to lookup 47663 * @param {object} oSettings dataTables settings object 47664 * @returns {int} i the data index 47665 * @memberof DataTable#oApi 47666 */ 47667 function _fnColumnIndexToVisible( oSettings, iMatch ) 47668 { 47669 var aiVis = _fnGetColumns( oSettings, 'bVisible' ); 47670 var iPos = $.inArray( iMatch, aiVis ); 47671 47672 return iPos !== -1 ? iPos : null; 47673 } 47674 47675 47676 /** 47677 * Get the number of visible columns 47678 * @param {object} oSettings dataTables settings object 47679 * @returns {int} i the number of visible columns 47680 * @memberof DataTable#oApi 47681 */ 47682 function _fnVisbleColumns( oSettings ) 47683 { 47684 return $( _pluck( oSettings.aoColumns, 'nTh' ) ).filter(':visible').length; 47685 } 47686 47687 47688 /** 47689 * Get an array of column indexes that match a given property 47690 * @param {object} oSettings dataTables settings object 47691 * @param {string} sParam Parameter in aoColumns to look for - typically 47692 * bVisible or bSearchable 47693 * @returns {array} Array of indexes with matched properties 47694 * @memberof DataTable#oApi 47695 */ 47696 function _fnGetColumns( oSettings, sParam ) 47697 { 47698 var a = []; 47699 47700 $.map( oSettings.aoColumns, function(val, i) { 47701 if ( val[sParam] ) { 47702 a.push( i ); 47703 } 47704 } ); 47705 47706 return a; 47707 } 47708 47709 47710 /** 47711 * Calculate the 'type' of a column 47712 * @param {object} settings dataTables settings object 47713 * @memberof DataTable#oApi 47714 */ 47715 function _fnColumnTypes ( settings ) 47716 { 47717 var columns = settings.aoColumns; 47718 var data = settings.aoData; 47719 var types = DataTable.ext.type.detect; 47720 var i, ien, j, jen, k, ken; 47721 var col, cell, detectedType, cache; 47722 47723 // For each column, spin over the 47724 for ( i=0, ien=columns.length ; i<ien ; i++ ) { 47725 col = columns[i]; 47726 cache = []; 47727 47728 if ( ! col.sType && col._sManualType ) { 47729 col.sType = col._sManualType; 47730 } 47731 else if ( ! col.sType ) { 47732 for ( j=0, jen=types.length ; j<jen ; j++ ) { 47733 for ( k=0, ken=data.length ; k<ken ; k++ ) { 47734 // Use a cache array so we only need to get the type data 47735 // from the formatter once (when using multiple detectors) 47736 if ( cache[k] === undefined ) { 47737 cache[k] = _fnGetCellData( settings, k, i, 'type' ); 47738 } 47739 47740 detectedType = types[j]( cache[k], settings ); 47741 47742 // If null, then this type can't apply to this column, so 47743 // rather than testing all cells, break out. There is an 47744 // exception for the last type which is `html`. We need to 47745 // scan all rows since it is possible to mix string and HTML 47746 // types 47747 if ( ! detectedType && j !== types.length-1 ) { 47748 break; 47749 } 47750 47751 // Only a single match is needed for html type since it is 47752 // bottom of the pile and very similar to string 47753 if ( detectedType === 'html' ) { 47754 break; 47755 } 47756 } 47757 47758 // Type is valid for all data points in the column - use this 47759 // type 47760 if ( detectedType ) { 47761 col.sType = detectedType; 47762 break; 47763 } 47764 } 47765 47766 // Fall back - if no type was detected, always use string 47767 if ( ! col.sType ) { 47768 col.sType = 'string'; 47769 } 47770 } 47771 } 47772 } 47773 47774 47775 /** 47776 * Take the column definitions and static columns arrays and calculate how 47777 * they relate to column indexes. The callback function will then apply the 47778 * definition found for a column to a suitable configuration object. 47779 * @param {object} oSettings dataTables settings object 47780 * @param {array} aoColDefs The aoColumnDefs array that is to be applied 47781 * @param {array} aoCols The aoColumns array that defines columns individually 47782 * @param {function} fn Callback function - takes two parameters, the calculated 47783 * column index and the definition for that column. 47784 * @memberof DataTable#oApi 47785 */ 47786 function _fnApplyColumnDefs( oSettings, aoColDefs, aoCols, fn ) 47787 { 47788 var i, iLen, j, jLen, k, kLen, def; 47789 var columns = oSettings.aoColumns; 47790 47791 // Column definitions with aTargets 47792 if ( aoColDefs ) 47793 { 47794 /* Loop over the definitions array - loop in reverse so first instance has priority */ 47795 for ( i=aoColDefs.length-1 ; i>=0 ; i-- ) 47796 { 47797 def = aoColDefs[i]; 47798 47799 /* Each definition can target multiple columns, as it is an array */ 47800 var aTargets = def.targets !== undefined ? 47801 def.targets : 47802 def.aTargets; 47803 47804 if ( ! $.isArray( aTargets ) ) 47805 { 47806 aTargets = [ aTargets ]; 47807 } 47808 47809 for ( j=0, jLen=aTargets.length ; j<jLen ; j++ ) 47810 { 47811 if ( typeof aTargets[j] === 'number' && aTargets[j] >= 0 ) 47812 { 47813 /* Add columns that we don't yet know about */ 47814 while( columns.length <= aTargets[j] ) 47815 { 47816 _fnAddColumn( oSettings ); 47817 } 47818 47819 /* Integer, basic index */ 47820 fn( aTargets[j], def ); 47821 } 47822 else if ( typeof aTargets[j] === 'number' && aTargets[j] < 0 ) 47823 { 47824 /* Negative integer, right to left column counting */ 47825 fn( columns.length+aTargets[j], def ); 47826 } 47827 else if ( typeof aTargets[j] === 'string' ) 47828 { 47829 /* Class name matching on TH element */ 47830 for ( k=0, kLen=columns.length ; k<kLen ; k++ ) 47831 { 47832 if ( aTargets[j] == "_all" || 47833 $(columns[k].nTh).hasClass( aTargets[j] ) ) 47834 { 47835 fn( k, def ); 47836 } 47837 } 47838 } 47839 } 47840 } 47841 } 47842 47843 // Statically defined columns array 47844 if ( aoCols ) 47845 { 47846 for ( i=0, iLen=aoCols.length ; i<iLen ; i++ ) 47847 { 47848 fn( i, aoCols[i] ); 47849 } 47850 } 47851 } 47852 47853 /** 47854 * Add a data array to the table, creating DOM node etc. This is the parallel to 47855 * _fnGatherData, but for adding rows from a Javascript source, rather than a 47856 * DOM source. 47857 * @param {object} oSettings dataTables settings object 47858 * @param {array} aData data array to be added 47859 * @param {node} [nTr] TR element to add to the table - optional. If not given, 47860 * DataTables will create a row automatically 47861 * @param {array} [anTds] Array of TD|TH elements for the row - must be given 47862 * if nTr is. 47863 * @returns {int} >=0 if successful (index of new aoData entry), -1 if failed 47864 * @memberof DataTable#oApi 47865 */ 47866 function _fnAddData ( oSettings, aDataIn, nTr, anTds ) 47867 { 47868 /* Create the object for storing information about this new row */ 47869 var iRow = oSettings.aoData.length; 47870 var oData = $.extend( true, {}, DataTable.models.oRow, { 47871 src: nTr ? 'dom' : 'data', 47872 idx: iRow 47873 } ); 47874 47875 oData._aData = aDataIn; 47876 oSettings.aoData.push( oData ); 47877 47878 /* Create the cells */ 47879 var nTd, sThisType; 47880 var columns = oSettings.aoColumns; 47881 47882 // Invalidate the column types as the new data needs to be revalidated 47883 for ( var i=0, iLen=columns.length ; i<iLen ; i++ ) 47884 { 47885 columns[i].sType = null; 47886 } 47887 47888 /* Add to the display array */ 47889 oSettings.aiDisplayMaster.push( iRow ); 47890 47891 var id = oSettings.rowIdFn( aDataIn ); 47892 if ( id !== undefined ) { 47893 oSettings.aIds[ id ] = oData; 47894 } 47895 47896 /* Create the DOM information, or register it if already present */ 47897 if ( nTr || ! oSettings.oFeatures.bDeferRender ) 47898 { 47899 _fnCreateTr( oSettings, iRow, nTr, anTds ); 47900 } 47901 47902 return iRow; 47903 } 47904 47905 47906 /** 47907 * Add one or more TR elements to the table. Generally we'd expect to 47908 * use this for reading data from a DOM sourced table, but it could be 47909 * used for an TR element. Note that if a TR is given, it is used (i.e. 47910 * it is not cloned). 47911 * @param {object} settings dataTables settings object 47912 * @param {array|node|jQuery} trs The TR element(s) to add to the table 47913 * @returns {array} Array of indexes for the added rows 47914 * @memberof DataTable#oApi 47915 */ 47916 function _fnAddTr( settings, trs ) 47917 { 47918 var row; 47919 47920 // Allow an individual node to be passed in 47921 if ( ! (trs instanceof $) ) { 47922 trs = $(trs); 47923 } 47924 47925 return trs.map( function (i, el) { 47926 row = _fnGetRowElements( settings, el ); 47927 return _fnAddData( settings, row.data, el, row.cells ); 47928 } ); 47929 } 47930 47931 47932 /** 47933 * Take a TR element and convert it to an index in aoData 47934 * @param {object} oSettings dataTables settings object 47935 * @param {node} n the TR element to find 47936 * @returns {int} index if the node is found, null if not 47937 * @memberof DataTable#oApi 47938 */ 47939 function _fnNodeToDataIndex( oSettings, n ) 47940 { 47941 return (n._DT_RowIndex!==undefined) ? n._DT_RowIndex : null; 47942 } 47943 47944 47945 /** 47946 * Take a TD element and convert it into a column data index (not the visible index) 47947 * @param {object} oSettings dataTables settings object 47948 * @param {int} iRow The row number the TD/TH can be found in 47949 * @param {node} n The TD/TH element to find 47950 * @returns {int} index if the node is found, -1 if not 47951 * @memberof DataTable#oApi 47952 */ 47953 function _fnNodeToColumnIndex( oSettings, iRow, n ) 47954 { 47955 return $.inArray( n, oSettings.aoData[ iRow ].anCells ); 47956 } 47957 47958 47959 /** 47960 * Get the data for a given cell from the internal cache, taking into account data mapping 47961 * @param {object} settings dataTables settings object 47962 * @param {int} rowIdx aoData row id 47963 * @param {int} colIdx Column index 47964 * @param {string} type data get type ('display', 'type' 'filter' 'sort') 47965 * @returns {*} Cell data 47966 * @memberof DataTable#oApi 47967 */ 47968 function _fnGetCellData( settings, rowIdx, colIdx, type ) 47969 { 47970 var draw = settings.iDraw; 47971 var col = settings.aoColumns[colIdx]; 47972 var rowData = settings.aoData[rowIdx]._aData; 47973 var defaultContent = col.sDefaultContent; 47974 var cellData = col.fnGetData( rowData, type, { 47975 settings: settings, 47976 row: rowIdx, 47977 col: colIdx 47978 } ); 47979 47980 if ( cellData === undefined ) { 47981 if ( settings.iDrawError != draw && defaultContent === null ) { 47982 _fnLog( settings, 0, "Requested unknown parameter "+ 47983 (typeof col.mData=='function' ? '{function}' : "'"+col.mData+"'")+ 47984 " for row "+rowIdx+", column "+colIdx, 4 ); 47985 settings.iDrawError = draw; 47986 } 47987 return defaultContent; 47988 } 47989 47990 // When the data source is null and a specific data type is requested (i.e. 47991 // not the original data), we can use default column data 47992 if ( (cellData === rowData || cellData === null) && defaultContent !== null && type !== undefined ) { 47993 cellData = defaultContent; 47994 } 47995 else if ( typeof cellData === 'function' ) { 47996 // If the data source is a function, then we run it and use the return, 47997 // executing in the scope of the data object (for instances) 47998 return cellData.call( rowData ); 47999 } 48000 48001 if ( cellData === null && type == 'display' ) { 48002 return ''; 48003 } 48004 return cellData; 48005 } 48006 48007 48008 /** 48009 * Set the value for a specific cell, into the internal data cache 48010 * @param {object} settings dataTables settings object 48011 * @param {int} rowIdx aoData row id 48012 * @param {int} colIdx Column index 48013 * @param {*} val Value to set 48014 * @memberof DataTable#oApi 48015 */ 48016 function _fnSetCellData( settings, rowIdx, colIdx, val ) 48017 { 48018 var col = settings.aoColumns[colIdx]; 48019 var rowData = settings.aoData[rowIdx]._aData; 48020 48021 col.fnSetData( rowData, val, { 48022 settings: settings, 48023 row: rowIdx, 48024 col: colIdx 48025 } ); 48026 } 48027 48028 48029 // Private variable that is used to match action syntax in the data property object 48030 var __reArray = /\[.*?\]$/; 48031 var __reFn = /\(\)$/; 48032 48033 /** 48034 * Split string on periods, taking into account escaped periods 48035 * @param {string} str String to split 48036 * @return {array} Split string 48037 */ 48038 function _fnSplitObjNotation( str ) 48039 { 48040 return $.map( str.match(/(\\.|[^\.])+/g) || [''], function ( s ) { 48041 return s.replace(/\\./g, '.'); 48042 } ); 48043 } 48044 48045 48046 /** 48047 * Return a function that can be used to get data from a source object, taking 48048 * into account the ability to use nested objects as a source 48049 * @param {string|int|function} mSource The data source for the object 48050 * @returns {function} Data get function 48051 * @memberof DataTable#oApi 48052 */ 48053 function _fnGetObjectDataFn( mSource ) 48054 { 48055 if ( $.isPlainObject( mSource ) ) 48056 { 48057 /* Build an object of get functions, and wrap them in a single call */ 48058 var o = {}; 48059 $.each( mSource, function (key, val) { 48060 if ( val ) { 48061 o[key] = _fnGetObjectDataFn( val ); 48062 } 48063 } ); 48064 48065 return function (data, type, row, meta) { 48066 var t = o[type] || o._; 48067 return t !== undefined ? 48068 t(data, type, row, meta) : 48069 data; 48070 }; 48071 } 48072 else if ( mSource === null ) 48073 { 48074 /* Give an empty string for rendering / sorting etc */ 48075 return function (data) { // type, row and meta also passed, but not used 48076 return data; 48077 }; 48078 } 48079 else if ( typeof mSource === 'function' ) 48080 { 48081 return function (data, type, row, meta) { 48082 return mSource( data, type, row, meta ); 48083 }; 48084 } 48085 else if ( typeof mSource === 'string' && (mSource.indexOf('.') !== -1 || 48086 mSource.indexOf('[') !== -1 || mSource.indexOf('(') !== -1) ) 48087 { 48088 /* If there is a . in the source string then the data source is in a 48089 * nested object so we loop over the data for each level to get the next 48090 * level down. On each loop we test for undefined, and if found immediately 48091 * return. This allows entire objects to be missing and sDefaultContent to 48092 * be used if defined, rather than throwing an error 48093 */ 48094 var fetchData = function (data, type, src) { 48095 var arrayNotation, funcNotation, out, innerSrc; 48096 48097 if ( src !== "" ) 48098 { 48099 var a = _fnSplitObjNotation( src ); 48100 48101 for ( var i=0, iLen=a.length ; i<iLen ; i++ ) 48102 { 48103 // Check if we are dealing with special notation 48104 arrayNotation = a[i].match(__reArray); 48105 funcNotation = a[i].match(__reFn); 48106 48107 if ( arrayNotation ) 48108 { 48109 // Array notation 48110 a[i] = a[i].replace(__reArray, ''); 48111 48112 // Condition allows simply [] to be passed in 48113 if ( a[i] !== "" ) { 48114 data = data[ a[i] ]; 48115 } 48116 out = []; 48117 48118 // Get the remainder of the nested object to get 48119 a.splice( 0, i+1 ); 48120 innerSrc = a.join('.'); 48121 48122 // Traverse each entry in the array getting the properties requested 48123 if ( $.isArray( data ) ) { 48124 for ( var j=0, jLen=data.length ; j<jLen ; j++ ) { 48125 out.push( fetchData( data[j], type, innerSrc ) ); 48126 } 48127 } 48128 48129 // If a string is given in between the array notation indicators, that 48130 // is used to join the strings together, otherwise an array is returned 48131 var join = arrayNotation[0].substring(1, arrayNotation[0].length-1); 48132 data = (join==="") ? out : out.join(join); 48133 48134 // The inner call to fetchData has already traversed through the remainder 48135 // of the source requested, so we exit from the loop 48136 break; 48137 } 48138 else if ( funcNotation ) 48139 { 48140 // Function call 48141 a[i] = a[i].replace(__reFn, ''); 48142 data = data[ a[i] ](); 48143 continue; 48144 } 48145 48146 if ( data === null || data[ a[i] ] === undefined ) 48147 { 48148 return undefined; 48149 } 48150 data = data[ a[i] ]; 48151 } 48152 } 48153 48154 return data; 48155 }; 48156 48157 return function (data, type) { // row and meta also passed, but not used 48158 return fetchData( data, type, mSource ); 48159 }; 48160 } 48161 else 48162 { 48163 /* Array or flat object mapping */ 48164 return function (data, type) { // row and meta also passed, but not used 48165 return data[mSource]; 48166 }; 48167 } 48168 } 48169 48170 48171 /** 48172 * Return a function that can be used to set data from a source object, taking 48173 * into account the ability to use nested objects as a source 48174 * @param {string|int|function} mSource The data source for the object 48175 * @returns {function} Data set function 48176 * @memberof DataTable#oApi 48177 */ 48178 function _fnSetObjectDataFn( mSource ) 48179 { 48180 if ( $.isPlainObject( mSource ) ) 48181 { 48182 /* Unlike get, only the underscore (global) option is used for for 48183 * setting data since we don't know the type here. This is why an object 48184 * option is not documented for `mData` (which is read/write), but it is 48185 * for `mRender` which is read only. 48186 */ 48187 return _fnSetObjectDataFn( mSource._ ); 48188 } 48189 else if ( mSource === null ) 48190 { 48191 /* Nothing to do when the data source is null */ 48192 return function () {}; 48193 } 48194 else if ( typeof mSource === 'function' ) 48195 { 48196 return function (data, val, meta) { 48197 mSource( data, 'set', val, meta ); 48198 }; 48199 } 48200 else if ( typeof mSource === 'string' && (mSource.indexOf('.') !== -1 || 48201 mSource.indexOf('[') !== -1 || mSource.indexOf('(') !== -1) ) 48202 { 48203 /* Like the get, we need to get data from a nested object */ 48204 var setData = function (data, val, src) { 48205 var a = _fnSplitObjNotation( src ), b; 48206 var aLast = a[a.length-1]; 48207 var arrayNotation, funcNotation, o, innerSrc; 48208 48209 for ( var i=0, iLen=a.length-1 ; i<iLen ; i++ ) 48210 { 48211 // Check if we are dealing with an array notation request 48212 arrayNotation = a[i].match(__reArray); 48213 funcNotation = a[i].match(__reFn); 48214 48215 if ( arrayNotation ) 48216 { 48217 a[i] = a[i].replace(__reArray, ''); 48218 data[ a[i] ] = []; 48219 48220 // Get the remainder of the nested object to set so we can recurse 48221 b = a.slice(); 48222 b.splice( 0, i+1 ); 48223 innerSrc = b.join('.'); 48224 48225 // Traverse each entry in the array setting the properties requested 48226 if ( $.isArray( val ) ) 48227 { 48228 for ( var j=0, jLen=val.length ; j<jLen ; j++ ) 48229 { 48230 o = {}; 48231 setData( o, val[j], innerSrc ); 48232 data[ a[i] ].push( o ); 48233 } 48234 } 48235 else 48236 { 48237 // We've been asked to save data to an array, but it 48238 // isn't array data to be saved. Best that can be done 48239 // is to just save the value. 48240 data[ a[i] ] = val; 48241 } 48242 48243 // The inner call to setData has already traversed through the remainder 48244 // of the source and has set the data, thus we can exit here 48245 return; 48246 } 48247 else if ( funcNotation ) 48248 { 48249 // Function call 48250 a[i] = a[i].replace(__reFn, ''); 48251 data = data[ a[i] ]( val ); 48252 } 48253 48254 // If the nested object doesn't currently exist - since we are 48255 // trying to set the value - create it 48256 if ( data[ a[i] ] === null || data[ a[i] ] === undefined ) 48257 { 48258 data[ a[i] ] = {}; 48259 } 48260 data = data[ a[i] ]; 48261 } 48262 48263 // Last item in the input - i.e, the actual set 48264 if ( aLast.match(__reFn ) ) 48265 { 48266 // Function call 48267 data = data[ aLast.replace(__reFn, '') ]( val ); 48268 } 48269 else 48270 { 48271 // If array notation is used, we just want to strip it and use the property name 48272 // and assign the value. If it isn't used, then we get the result we want anyway 48273 data[ aLast.replace(__reArray, '') ] = val; 48274 } 48275 }; 48276 48277 return function (data, val) { // meta is also passed in, but not used 48278 return setData( data, val, mSource ); 48279 }; 48280 } 48281 else 48282 { 48283 /* Array or flat object mapping */ 48284 return function (data, val) { // meta is also passed in, but not used 48285 data[mSource] = val; 48286 }; 48287 } 48288 } 48289 48290 48291 /** 48292 * Return an array with the full table data 48293 * @param {object} oSettings dataTables settings object 48294 * @returns array {array} aData Master data array 48295 * @memberof DataTable#oApi 48296 */ 48297 function _fnGetDataMaster ( settings ) 48298 { 48299 return _pluck( settings.aoData, '_aData' ); 48300 } 48301 48302 48303 /** 48304 * Nuke the table 48305 * @param {object} oSettings dataTables settings object 48306 * @memberof DataTable#oApi 48307 */ 48308 function _fnClearTable( settings ) 48309 { 48310 settings.aoData.length = 0; 48311 settings.aiDisplayMaster.length = 0; 48312 settings.aiDisplay.length = 0; 48313 settings.aIds = {}; 48314 } 48315 48316 48317 /** 48318 * Take an array of integers (index array) and remove a target integer (value - not 48319 * the key!) 48320 * @param {array} a Index array to target 48321 * @param {int} iTarget value to find 48322 * @memberof DataTable#oApi 48323 */ 48324 function _fnDeleteIndex( a, iTarget, splice ) 48325 { 48326 var iTargetIndex = -1; 48327 48328 for ( var i=0, iLen=a.length ; i<iLen ; i++ ) 48329 { 48330 if ( a[i] == iTarget ) 48331 { 48332 iTargetIndex = i; 48333 } 48334 else if ( a[i] > iTarget ) 48335 { 48336 a[i]--; 48337 } 48338 } 48339 48340 if ( iTargetIndex != -1 && splice === undefined ) 48341 { 48342 a.splice( iTargetIndex, 1 ); 48343 } 48344 } 48345 48346 48347 /**
48348 * Mark cached data as invalid such that a re-read of the data will occur when 48349 * the cached data is next requested. Also update from the data source object. 48350 * 48351 * @param {object} settings DataTables settings object 48352 * @param {int} rowIdx Row index to invalidate 48353 * @param {string} [src] Source to invalidate from: undefined, 'auto', 'dom' 48354 * or 'data' 48355 * @param {int} [colIdx] Column index to invalidate. If undefined the whole 48356 * row will be invalidated 48357 * @memberof DataTable#oApi 48358 * 48359 * @todo For the modularisation of v1.11 this will need to become a callback, so 48360 * the sort and filter methods can subscribe to it. That will required 48361 * initialisation options for sorting, which is why it is not already baked in 48362 */ 48363 function _fnInvalidate( settings, rowIdx, src, colIdx ) 48364 { 48365 var row = settings.aoData[ rowIdx ]; 48366 var i, ien; 48367 var cellWrite = function ( cell, col ) { 48368 // This is very frustrating, but in IE if you just write directly 48369 // to innerHTML, and elements that are overwritten are GC'ed, 48370 // even if there is a reference to them elsewhere 48371 while ( cell.childNodes.length ) { 48372 cell.removeChild( cell.firstChild ); 48373 } 48374 48375 cell.innerHTML = _fnGetCellData( settings, rowIdx, col, 'display' ); 48376 }; 48377 48378 // Are we reading last data from DOM or the data object? 48379 if ( src === 'dom' || ((! src || src === 'auto') && row.src === 'dom') ) { 48380 // Read the data from the DOM 48381 row._aData = _fnGetRowElements( 48382 settings, row, colIdx, colIdx === undefined ? undefined : row._aData 48383 ) 48384 .data; 48385 } 48386 else { 48387 // Reading from data object, update the DOM 48388 var cells = row.anCells; 48389 48390 if ( cells ) { 48391 if ( colIdx !== undefined ) { 48392 cellWrite( cells[colIdx], colIdx ); 48393 } 48394 else { 48395 for ( i=0, ien=cells.length ; i<ien ; i++ ) { 48396 cellWrite( cells[i], i ); 48397 } 48398 } 48399 } 48400 } 48401 48402 // For both row and cell invalidation, the cached data for sorting and 48403 // filtering is nulled out 48404 row._aSortData = null; 48405 row._aFilterData = null; 48406 48407 // Invalidate the type for a specific column (if given) or all columns since 48408 // the data might have changed 48409 var cols = settings.aoColumns; 48410 if ( colIdx !== undefined ) { 48411 cols[ colIdx ].sType = null; 48412 } 48413 else { 48414 for ( i=0, ien=cols.length ; i<ien ; i++ ) { 48415 cols[i].sType = null; 48416 } 48417 48418 // Update DataTables special `DT_*` attributes for the row 48419 _fnRowAttributes( settings, row ); 48420 } 48421 } 48422 48423 48424 /** 48425 * Build a data source object from an HTML row, reading the contents of the 48426 * cells that are in the row. 48427 * 48428 * @param {object} settings DataTables settings object 48429 * @param {node|object} TR element from which to read data or existing row 48430 * object from which to re-read the data from the cells 48431 * @param {int} [colIdx] Optional column index 48432 * @param {array|object} [d] Data source object. If `colIdx` is given then this 48433 * parameter should also be given and will be used to write the data into. 48434 * Only the column in question will be written 48435 * @returns {object} Object with two parameters: `data` the data read, in 48436 * document order, and `cells` and array of nodes (they can be useful to the 48437 * caller, so rather than needing a second traversal to get them, just return 48438 * them from here). 48439 * @memberof DataTable#oApi 48440 */ 48441 function _fnGetRowElements( settings, row, colIdx, d ) 48442 { 48443 var 48444 tds = [], 48445 td = row.firstChild, 48446 name, col, o, i=0, contents, 48447 columns = settings.aoColumns, 48448 objectRead = settings._rowReadObject; 48449 48450 // Allow the data object to be passed in, or construct 48451 d = d !== undefined ? 48452 d : 48453 objectRead ? 48454 {} : 48455 []; 48456 48457 var attr = function ( str, td ) { 48458 if ( typeof str === 'string' ) { 48459 var idx = str.indexOf('@'); 48460 48461 if ( idx !== -1 ) { 48462 var attr = str.substring( idx+1 ); 48463 var setter = _fnSetObjectDataFn( str ); 48464 setter( d, td.getAttribute( attr ) ); 48465 } 48466 } 48467 }; 48468 48469 // Read data from a cell and store into the data object 48470 var cellProcess = function ( cell ) { 48471 if ( colIdx === undefined || colIdx === i ) { 48472 col = columns[i]; 48473 contents = $.trim(cell.innerHTML); 48474 48475 if ( col && col._bAttrSrc ) { 48476 var setter = _fnSetObjectDataFn( col.mData._ ); 48477 setter( d, contents ); 48478 48479 attr( col.mData.sort, cell ); 48480 attr( col.mData.type, cell ); 48481 attr( col.mData.filter, cell ); 48482 } 48483 else { 48484 // Depending on the `data` option for the columns the data can 48485 // be read to either an object or an array.
vendor: 11,978 bytes, lines 48486-48943
48486 if ( objectRead ) { 48487 if ( ! col._setter ) { 48488 // Cache the setter function 48489 col._setter = _fnSetObjectDataFn( col.mData ); 48490 } 48491 col._setter( d, contents ); 48492 } 48493 else { 48494 d[i] = contents; 48495 } 48496 } 48497 } 48498 48499 i++; 48500 }; 48501 48502 if ( td ) { 48503 // `tr` element was passed in 48504 while ( td ) { 48505 name = td.nodeName.toUpperCase(); 48506 48507 if ( name == "TD" || name == "TH" ) { 48508 cellProcess( td ); 48509 tds.push( td ); 48510 } 48511 48512 td = td.nextSibling; 48513 } 48514 } 48515 else { 48516 // Existing row object passed in 48517 tds = row.anCells; 48518 48519 for ( var j=0, jen=tds.length ; j<jen ; j++ ) { 48520 cellProcess( tds[j] ); 48521 } 48522 } 48523 48524 // Read the ID from the DOM if present 48525 var rowNode = row.firstChild ? row : row.nTr; 48526 48527 if ( rowNode ) { 48528 var id = rowNode.getAttribute( 'id' ); 48529 48530 if ( id ) { 48531 _fnSetObjectDataFn( settings.rowId )( d, id ); 48532 } 48533 } 48534 48535 return { 48536 data: d, 48537 cells: tds 48538 }; 48539 } 48540 /** 48541 * Create a new TR element (and it's TD children) for a row 48542 * @param {object} oSettings dataTables settings object 48543 * @param {int} iRow Row to consider 48544 * @param {node} [nTrIn] TR element to add to the table - optional. If not given, 48545 * DataTables will create a row automatically 48546 * @param {array} [anTds] Array of TD|TH elements for the row - must be given 48547 * if nTr is. 48548 * @memberof DataTable#oApi 48549 */ 48550 function _fnCreateTr ( oSettings, iRow, nTrIn, anTds ) 48551 { 48552 var 48553 row = oSettings.aoData[iRow], 48554 rowData = row._aData, 48555 cells = [], 48556 nTr, nTd, oCol, 48557 i, iLen; 48558 48559 if ( row.nTr === null ) 48560 { 48561 nTr = nTrIn || document.createElement('tr'); 48562 48563 row.nTr = nTr; 48564 row.anCells = cells; 48565 48566 /* Use a private property on the node to allow reserve mapping from the node 48567 * to the aoData array for fast look up 48568 */ 48569 nTr._DT_RowIndex = iRow; 48570 48571 /* Special parameters can be given by the data source to be used on the row */ 48572 _fnRowAttributes( oSettings, row ); 48573 48574 /* Process each column */ 48575 for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ ) 48576 { 48577 oCol = oSettings.aoColumns[i]; 48578 48579 nTd = nTrIn ? anTds[i] : document.createElement( oCol.sCellType ); 48580 nTd._DT_CellIndex = { 48581 row: iRow, 48582 column: i 48583 }; 48584 48585 cells.push( nTd ); 48586 48587 // Need to create the HTML if new, or if a rendering function is defined 48588 if ( (!nTrIn || oCol.mRender || oCol.mData !== i) && 48589 (!$.isPlainObject(oCol.mData) || oCol.mData._ !== i+'.display') 48590 ) { 48591 nTd.innerHTML = _fnGetCellData( oSettings, iRow, i, 'display' ); 48592 } 48593 48594 /* Add user defined class */ 48595 if ( oCol.sClass ) 48596 { 48597 nTd.className += ' '+oCol.sClass; 48598 } 48599 48600 // Visibility - add or remove as required 48601 if ( oCol.bVisible && ! nTrIn ) 48602 { 48603 nTr.appendChild( nTd ); 48604 } 48605 else if ( ! oCol.bVisible && nTrIn ) 48606 { 48607 nTd.parentNode.removeChild( nTd ); 48608 } 48609 48610 if ( oCol.fnCreatedCell ) 48611 { 48612 oCol.fnCreatedCell.call( oSettings.oInstance, 48613 nTd, _fnGetCellData( oSettings, iRow, i ), rowData, iRow, i 48614 ); 48615 } 48616 } 48617 48618 _fnCallbackFire( oSettings, 'aoRowCreatedCallback', null, [nTr, rowData, iRow] ); 48619 } 48620 48621 // Remove once webkit bug 131819 and Chromium bug 365619 have been resolved 48622 // and deployed 48623 row.nTr.setAttribute( 'role', 'row' ); 48624 } 48625 48626 48627 /** 48628 * Add attributes to a row based on the special `DT_*` parameters in a data 48629 * source object. 48630 * @param {object} settings DataTables settings object 48631 * @param {object} DataTables row object for the row to be modified 48632 * @memberof DataTable#oApi 48633 */ 48634 function _fnRowAttributes( settings, row ) 48635 { 48636 var tr = row.nTr; 48637 var data = row._aData; 48638 48639 if ( tr ) { 48640 var id = settings.rowIdFn( data ); 48641 48642 if ( id ) { 48643 tr.id = id; 48644 } 48645 48646 if ( data.DT_RowClass ) { 48647 // Remove any classes added by DT_RowClass before 48648 var a = data.DT_RowClass.split(' '); 48649 row.__rowc = row.__rowc ? 48650 _unique( row.__rowc.concat( a ) ) : 48651 a; 48652 48653 $(tr) 48654 .removeClass( row.__rowc.join(' ') ) 48655 .addClass( data.DT_RowClass ); 48656 } 48657 48658 if ( data.DT_RowAttr ) { 48659 $(tr).attr( data.DT_RowAttr ); 48660 } 48661 48662 if ( data.DT_RowData ) { 48663 $(tr).data( data.DT_RowData ); 48664 } 48665 } 48666 } 48667 48668 48669 /** 48670 * Create the HTML header for the table 48671 * @param {object} oSettings dataTables settings object 48672 * @memberof DataTable#oApi 48673 */ 48674 function _fnBuildHead( oSettings ) 48675 { 48676 var i, ien, cell, row, column; 48677 var thead = oSettings.nTHead; 48678 var tfoot = oSettings.nTFoot; 48679 var createHeader = $('th, td', thead).length === 0; 48680 var classes = oSettings.oClasses; 48681 var columns = oSettings.aoColumns; 48682 48683 if ( createHeader ) { 48684 row = $('<tr/>').appendTo( thead ); 48685 } 48686 48687 for ( i=0, ien=columns.length ; i<ien ; i++ ) { 48688 column = columns[i]; 48689 cell = $( column.nTh ).addClass( column.sClass ); 48690 48691 if ( createHeader ) { 48692 cell.appendTo( row ); 48693 } 48694 48695 // 1.11 move into sorting 48696 if ( oSettings.oFeatures.bSort ) { 48697 cell.addClass( column.sSortingClass ); 48698 48699 if ( column.bSortable !== false ) { 48700 cell 48701 .attr( 'tabindex', oSettings.iTabIndex ) 48702 .attr( 'aria-controls', oSettings.sTableId ); 48703 48704 _fnSortAttachListener( oSettings, column.nTh, i ); 48705 } 48706 } 48707 48708 if ( column.sTitle != cell[0].innerHTML ) { 48709 cell.html( column.sTitle ); 48710 } 48711 48712 _fnRenderer( oSettings, 'header' )( 48713 oSettings, cell, column, classes 48714 ); 48715 } 48716 48717 if ( createHeader ) { 48718 _fnDetectHeader( oSettings.aoHeader, thead ); 48719 } 48720 48721 /* ARIA role for the rows */ 48722 $(thead).find('>tr').attr('role', 'row'); 48723 48724 /* Deal with the footer - add classes if required */ 48725 $(thead).find('>tr>th, >tr>td').addClass( classes.sHeaderTH ); 48726 $(tfoot).find('>tr>th, >tr>td').addClass( classes.sFooterTH ); 48727 48728 // Cache the footer cells. Note that we only take the cells from the first 48729 // row in the footer. If there is more than one row the user wants to 48730 // interact with, they need to use the table().foot() method. Note also this 48731 // allows cells to be used for multiple columns using colspan 48732 if ( tfoot !== null ) { 48733 var cells = oSettings.aoFooter[0]; 48734 48735 for ( i=0, ien=cells.length ; i<ien ; i++ ) { 48736 column = columns[i]; 48737 column.nTf = cells[i].cell; 48738 48739 if ( column.sClass ) { 48740 $(column.nTf).addClass( column.sClass ); 48741 } 48742 } 48743 } 48744 } 48745 48746 48747 /** 48748 * Draw the header (or footer) element based on the column visibility states. The 48749 * methodology here is to use the layout array from _fnDetectHeader, modified for 48750 * the instantaneous column visibility, to construct the new layout. The grid is 48751 * traversed over cell at a time in a rows x columns grid fashion, although each 48752 * cell insert can cover multiple elements in the grid - which is tracks using the 48753 * aApplied array. Cell inserts in the grid will only occur where there isn't 48754 * already a cell in that position. 48755 * @param {object} oSettings dataTables settings object 48756 * @param array {objects} aoSource Layout array from _fnDetectHeader 48757 * @param {boolean} [bIncludeHidden=false] If true then include the hidden columns in the calc, 48758 * @memberof DataTable#oApi 48759 */ 48760 function _fnDrawHead( oSettings, aoSource, bIncludeHidden ) 48761 { 48762 var i, iLen, j, jLen, k, kLen, n, nLocalTr; 48763 var aoLocal = []; 48764 var aApplied = []; 48765 var iColumns = oSettings.aoColumns.length; 48766 var iRowspan, iColspan; 48767 48768 if ( ! aoSource ) 48769 { 48770 return; 48771 } 48772 48773 if ( bIncludeHidden === undefined ) 48774 { 48775 bIncludeHidden = false; 48776 } 48777 48778 /* Make a copy of the master layout array, but without the visible columns in it */ 48779 for ( i=0, iLen=aoSource.length ; i<iLen ; i++ ) 48780 { 48781 aoLocal[i] = aoSource[i].slice(); 48782 aoLocal[i].nTr = aoSource[i].nTr; 48783 48784 /* Remove any columns which are currently hidden */ 48785 for ( j=iColumns-1 ; j>=0 ; j-- ) 48786 { 48787 if ( !oSettings.aoColumns[j].bVisible && !bIncludeHidden ) 48788 { 48789 aoLocal[i].splice( j, 1 ); 48790 } 48791 } 48792 48793 /* Prep the applied array - it needs an element for each row */ 48794 aApplied.push( [] ); 48795 } 48796 48797 for ( i=0, iLen=aoLocal.length ; i<iLen ; i++ ) 48798 { 48799 nLocalTr = aoLocal[i].nTr; 48800 48801 /* All cells are going to be replaced, so empty out the row */ 48802 if ( nLocalTr ) 48803 { 48804 while( (n = nLocalTr.firstChild) ) 48805 { 48806 nLocalTr.removeChild( n ); 48807 } 48808 } 48809 48810 for ( j=0, jLen=aoLocal[i].length ; j<jLen ; j++ ) 48811 { 48812 iRowspan = 1; 48813 iColspan = 1; 48814 48815 /* Check to see if there is already a cell (row/colspan) covering our target 48816 * insert point. If there is, then there is nothing to do. 48817 */ 48818 if ( aApplied[i][j] === undefined ) 48819 { 48820 nLocalTr.appendChild( aoLocal[i][j].cell ); 48821 aApplied[i][j] = 1; 48822 48823 /* Expand the cell to cover as many rows as needed */ 48824 while ( aoLocal[i+iRowspan] !== undefined && 48825 aoLocal[i][j].cell == aoLocal[i+iRowspan][j].cell ) 48826 { 48827 aApplied[i+iRowspan][j] = 1; 48828 iRowspan++; 48829 } 48830 48831 /* Expand the cell to cover as many columns as needed */ 48832 while ( aoLocal[i][j+iColspan] !== undefined && 48833 aoLocal[i][j].cell == aoLocal[i][j+iColspan].cell ) 48834 { 48835 /* Must update the applied array over the rows for the columns */ 48836 for ( k=0 ; k<iRowspan ; k++ ) 48837 { 48838 aApplied[i+k][j+iColspan] = 1; 48839 } 48840 iColspan++; 48841 } 48842 48843 /* Do the actual expansion in the DOM */ 48844 $(aoLocal[i][j].cell) 48845 .attr('rowspan', iRowspan) 48846 .attr('colspan', iColspan); 48847 } 48848 } 48849 } 48850 } 48851 48852 48853 /** 48854 * Insert the required TR nodes into the table for display 48855 * @param {object} oSettings dataTables settings object 48856 * @memberof DataTable#oApi 48857 */ 48858 function _fnDraw( oSettings ) 48859 { 48860 /* Provide a pre-callback function which can be used to cancel the draw is false is returned */ 48861 var aPreDraw = _fnCallbackFire( oSettings, 'aoPreDrawCallback', 'preDraw', [oSettings] ); 48862 if ( $.inArray( false, aPreDraw ) !== -1 ) 48863 { 48864 _fnProcessingDisplay( oSettings, false ); 48865 return; 48866 } 48867 48868 var i, iLen, n; 48869 var anRows = []; 48870 var iRowCount = 0; 48871 var asStripeClasses = oSettings.asStripeClasses; 48872 var iStripes = asStripeClasses.length; 48873 var iOpenRows = oSettings.aoOpenRows.length; 48874 var oLang = oSettings.oLanguage; 48875 var iInitDisplayStart = oSettings.iInitDisplayStart; 48876 var bServerSide = _fnDataSource( oSettings ) == 'ssp'; 48877 var aiDisplay = oSettings.aiDisplay; 48878 48879 oSettings.bDrawing = true; 48880 48881 /* Check and see if we have an initial draw position from state saving */ 48882 if ( iInitDisplayStart !== undefined && iInitDisplayStart !== -1 ) 48883 { 48884 oSettings._iDisplayStart = bServerSide ? 48885 iInitDisplayStart : 48886 iInitDisplayStart >= oSettings.fnRecordsDisplay() ? 48887 0 : 48888 iInitDisplayStart; 48889 48890 oSettings.iInitDisplayStart = -1; 48891 } 48892 48893 var iDisplayStart = oSettings._iDisplayStart; 48894 var iDisplayEnd = oSettings.fnDisplayEnd(); 48895 48896 /* Server-side processing draw intercept */ 48897 if ( oSettings.bDeferLoading ) 48898 { 48899 oSettings.bDeferLoading = false; 48900 oSettings.iDraw++; 48901 _fnProcessingDisplay( oSettings, false ); 48902 } 48903 else if ( !bServerSide ) 48904 { 48905 oSettings.iDraw++; 48906 } 48907 else if ( !oSettings.bDestroying && !_fnAjaxUpdate( oSettings ) ) 48908 { 48909 return; 48910 } 48911 48912 if ( aiDisplay.length !== 0 ) 48913 { 48914 var iStart = bServerSide ? 0 : iDisplayStart; 48915 var iEnd = bServerSide ? oSettings.aoData.length : iDisplayEnd; 48916 48917 for ( var j=iStart ; j<iEnd ; j++ ) 48918 { 48919 var iDataIndex = aiDisplay[j]; 48920 var aoData = oSettings.aoData[ iDataIndex ]; 48921 if ( aoData.nTr === null ) 48922 { 48923 _fnCreateTr( oSettings, iDataIndex ); 48924 } 48925 48926 var nRow = aoData.nTr; 48927 48928 /* Remove the old striping classes and then add the new one */ 48929 if ( iStripes !== 0 ) 48930 { 48931 var sStripe = asStripeClasses[ iRowCount % iStripes ]; 48932 if ( aoData._sRowStripe != sStripe ) 48933 { 48934 $(nRow).removeClass( aoData._sRowStripe ).addClass( sStripe ); 48935 aoData._sRowStripe = sStripe; 48936 } 48937 } 48938 48939 // Row callback functions - might want to manipulate the row 48940 // iRowCount and j are not currently documented. Are they at all 48941 // useful? 48942 _fnCallbackFire( oSettings, 'aoRowCallback', null, 48943 [nRow, aoData._aData, iRowCount, j
vendor: 9,503 bytes, lines 48943-49297
48943] ); 48944 48945 anRows.push( nRow ); 48946 iRowCount++; 48947 } 48948 } 48949 else 48950 { 48951 /* Table is empty - create a row with an empty message in it */ 48952 var sZero = oLang.sZeroRecords; 48953 if ( oSettings.iDraw == 1 && _fnDataSource( oSettings ) == 'ajax' ) 48954 { 48955 sZero = oLang.sLoadingRecords; 48956 } 48957 else if ( oLang.sEmptyTable && oSettings.fnRecordsTotal() === 0 ) 48958 { 48959 sZero = oLang.sEmptyTable; 48960 } 48961 48962 anRows[ 0 ] = $( '<tr/>', { 'class': iStripes ? asStripeClasses[0] : '' } ) 48963 .append( $('<td />', { 48964 'valign': 'top', 48965 'colSpan': _fnVisbleColumns( oSettings ), 48966 'class': oSettings.oClasses.sRowEmpty 48967 } ).html( sZero ) )[0]; 48968 } 48969 48970 /* Header and footer callbacks */ 48971 _fnCallbackFire( oSettings, 'aoHeaderCallback', 'header', [ $(oSettings.nTHead).children('tr')[0], 48972 _fnGetDataMaster( oSettings ), iDisplayStart, iDisplayEnd, aiDisplay ] ); 48973 48974 _fnCallbackFire( oSettings, 'aoFooterCallback', 'footer', [ $(oSettings.nTFoot).children('tr')[0], 48975 _fnGetDataMaster( oSettings ), iDisplayStart, iDisplayEnd, aiDisplay ] ); 48976 48977 var body = $(oSettings.nTBody); 48978 48979 body.children().detach(); 48980 body.append( $(anRows) ); 48981 48982 /* Call all required callback functions for the end of a draw */ 48983 _fnCallbackFire( oSettings, 'aoDrawCallback', 'draw', [oSettings] ); 48984 48985 /* Draw is complete, sorting and filtering must be as well */ 48986 oSettings.bSorted = false; 48987 oSettings.bFiltered = false; 48988 oSettings.bDrawing = false; 48989 } 48990 48991 48992 /** 48993 * Redraw the table - taking account of the various features which are enabled 48994 * @param {object} oSettings dataTables settings object 48995 * @param {boolean} [holdPosition] Keep the current paging position. By default 48996 * the paging is reset to the first page 48997 * @memberof DataTable#oApi 48998 */ 48999 function _fnReDraw( settings, holdPosition ) 49000 { 49001 var 49002 features = settings.oFeatures, 49003 sort = features.bSort, 49004 filter = features.bFilter; 49005 49006 if ( sort ) { 49007 _fnSort( settings ); 49008 } 49009 49010 if ( filter ) { 49011 _fnFilterComplete( settings, settings.oPreviousSearch ); 49012 } 49013 else { 49014 // No filtering, so we want to just use the display master 49015 settings.aiDisplay = settings.aiDisplayMaster.slice(); 49016 } 49017 49018 if ( holdPosition !== true ) { 49019 settings._iDisplayStart = 0; 49020 } 49021 49022 // Let any modules know about the draw hold position state (used by 49023 // scrolling internally) 49024 settings._drawHold = holdPosition; 49025 49026 _fnDraw( settings ); 49027 49028 settings._drawHold = false; 49029 } 49030 49031 49032 /** 49033 * Add the options to the page HTML for the table 49034 * @param {object} oSettings dataTables settings object 49035 * @memberof DataTable#oApi 49036 */ 49037 function _fnAddOptionsHtml ( oSettings ) 49038 { 49039 var classes = oSettings.oClasses; 49040 var table = $(oSettings.nTable); 49041 var holding = $('<div/>').insertBefore( table ); // Holding element for speed 49042 var features = oSettings.oFeatures; 49043 49044 // All DataTables are wrapped in a div 49045 var insert = $('<div/>', { 49046 id: oSettings.sTableId+'_wrapper', 49047 'class': classes.sWrapper + (oSettings.nTFoot ? '' : ' '+classes.sNoFooter) 49048 } ); 49049 49050 oSettings.nHolding = holding[0]; 49051 oSettings.nTableWrapper = insert[0]; 49052 oSettings.nTableReinsertBefore = oSettings.nTable.nextSibling; 49053 49054 /* Loop over the user set positioning and place the elements as needed */ 49055 var aDom = oSettings.sDom.split(''); 49056 var featureNode, cOption, nNewNode, cNext, sAttr, j; 49057 for ( var i=0 ; i<aDom.length ; i++ ) 49058 { 49059 featureNode = null; 49060 cOption = aDom[i]; 49061 49062 if ( cOption == '<' ) 49063 { 49064 /* New container div */ 49065 nNewNode = $('<div/>')[0]; 49066 49067 /* Check to see if we should append an id and/or a class name to the container */ 49068 cNext = aDom[i+1]; 49069 if ( cNext == "'" || cNext == '"' ) 49070 { 49071 sAttr = ""; 49072 j = 2; 49073 while ( aDom[i+j] != cNext ) 49074 { 49075 sAttr += aDom[i+j]; 49076 j++; 49077 } 49078 49079 /* Replace jQuery UI constants @todo depreciated */ 49080 if ( sAttr == "H" ) 49081 { 49082 sAttr = classes.sJUIHeader; 49083 } 49084 else if ( sAttr == "F" ) 49085 { 49086 sAttr = classes.sJUIFooter; 49087 } 49088 49089 /* The attribute can be in the format of "#id.class", "#id" or "class" This logic 49090 * breaks the string into parts and applies them as needed 49091 */ 49092 if ( sAttr.indexOf('.') != -1 ) 49093 { 49094 var aSplit = sAttr.split('.'); 49095 nNewNode.id = aSplit[0].substr(1, aSplit[0].length-1); 49096 nNewNode.className = aSplit[1]; 49097 } 49098 else if ( sAttr.charAt(0) == "#" ) 49099 { 49100 nNewNode.id = sAttr.substr(1, sAttr.length-1); 49101 } 49102 else 49103 { 49104 nNewNode.className = sAttr; 49105 } 49106 49107 i += j; /* Move along the position array */ 49108 } 49109 49110 insert.append( nNewNode ); 49111 insert = $(nNewNode); 49112 } 49113 else if ( cOption == '>' ) 49114 { 49115 /* End container div */ 49116 insert = insert.parent(); 49117 } 49118 // @todo Move options into their own plugins? 49119 else if ( cOption == 'l' && features.bPaginate && features.bLengthChange ) 49120 { 49121 /* Length */ 49122 featureNode = _fnFeatureHtmlLength( oSettings ); 49123 } 49124 else if ( cOption == 'f' && features.bFilter ) 49125 { 49126 /* Filter */ 49127 featureNode = _fnFeatureHtmlFilter( oSettings ); 49128 } 49129 else if ( cOption == 'r' && features.bProcessing ) 49130 { 49131 /* pRocessing */ 49132 featureNode = _fnFeatureHtmlProcessing( oSettings ); 49133 } 49134 else if ( cOption == 't' ) 49135 { 49136 /* Table */ 49137 featureNode = _fnFeatureHtmlTable( oSettings ); 49138 } 49139 else if ( cOption == 'i' && features.bInfo ) 49140 { 49141 /* Info */ 49142 featureNode = _fnFeatureHtmlInfo( oSettings ); 49143 } 49144 else if ( cOption == 'p' && features.bPaginate ) 49145 { 49146 /* Pagination */ 49147 featureNode = _fnFeatureHtmlPaginate( oSettings ); 49148 } 49149 else if ( DataTable.ext.feature.length !== 0 ) 49150 { 49151 /* Plug-in features */ 49152 var aoFeatures = DataTable.ext.feature; 49153 for ( var k=0, kLen=aoFeatures.length ; k<kLen ; k++ ) 49154 { 49155 if ( cOption == aoFeatures[k].cFeature ) 49156 { 49157 featureNode = aoFeatures[k].fnInit( oSettings ); 49158 break; 49159 } 49160 } 49161 } 49162 49163 /* Add to the 2D features array */ 49164 if ( featureNode ) 49165 { 49166 var aanFeatures = oSettings.aanFeatures; 49167 49168 if ( ! aanFeatures[cOption] ) 49169 { 49170 aanFeatures[cOption] = []; 49171 } 49172 49173 aanFeatures[cOption].push( featureNode ); 49174 insert.append( featureNode ); 49175 } 49176 } 49177 49178 /* Built our DOM structure - replace the holding div with what we want */ 49179 holding.replaceWith( insert ); 49180 oSettings.nHolding = null; 49181 } 49182 49183 49184 /** 49185 * Use the DOM source to create up an array of header cells. The idea here is to 49186 * create a layout grid (array) of rows x columns, which contains a reference 49187 * to the cell that that point in the grid (regardless of col/rowspan), such that 49188 * any column / row could be removed and the new grid constructed 49189 * @param array {object} aLayout Array to store the calculated layout in 49190 * @param {node} nThead The header/footer element for the table 49191 * @memberof DataTable#oApi 49192 */ 49193 function _fnDetectHeader ( aLayout, nThead ) 49194 { 49195 var nTrs = $(nThead).children('tr'); 49196 var nTr, nCell; 49197 var i, k, l, iLen, jLen, iColShifted, iColumn, iColspan, iRowspan; 49198 var bUnique; 49199 var fnShiftCol = function ( a, i, j ) { 49200 var k = a[i]; 49201 while ( k[j] ) { 49202 j++; 49203 } 49204 return j; 49205 }; 49206 49207 aLayout.splice( 0, aLayout.length ); 49208 49209 /* We know how many rows there are in the layout - so prep it */ 49210 for ( i=0, iLen=nTrs.length ; i<iLen ; i++ ) 49211 { 49212 aLayout.push( [] ); 49213 } 49214 49215 /* Calculate a layout array */ 49216 for ( i=0, iLen=nTrs.length ; i<iLen ; i++ ) 49217 { 49218 nTr = nTrs[i]; 49219 iColumn = 0; 49220 49221 /* For every cell in the row... */ 49222 nCell = nTr.firstChild; 49223 while ( nCell ) { 49224 if ( nCell.nodeName.toUpperCase() == "TD" || 49225 nCell.nodeName.toUpperCase() == "TH" ) 49226 { 49227 /* Get the col and rowspan attributes from the DOM and sanitise them */ 49228 iColspan = nCell.getAttribute('colspan') * 1; 49229 iRowspan = nCell.getAttribute('rowspan') * 1; 49230 iColspan = (!iColspan || iColspan===0 || iColspan===1) ? 1 : iColspan; 49231 iRowspan = (!iRowspan || iRowspan===0 || iRowspan===1) ? 1 : iRowspan; 49232 49233 /* There might be colspan cells already in this row, so shift our target 49234 * accordingly 49235 */ 49236 iColShifted = fnShiftCol( aLayout, i, iColumn ); 49237 49238 /* Cache calculation for unique columns */ 49239 bUnique = iColspan === 1 ? true : false; 49240 49241 /* If there is col / rowspan, copy the information into the layout grid */ 49242 for ( l=0 ; l<iColspan ; l++ ) 49243 { 49244 for ( k=0 ; k<iRowspan ; k++ ) 49245 { 49246 aLayout[i+k][iColShifted+l] = { 49247 "cell": nCell, 49248 "unique": bUnique 49249 }; 49250 aLayout[i+k].nTr = nTr; 49251 } 49252 } 49253 } 49254 nCell = nCell.nextSibling; 49255 } 49256 } 49257 } 49258 49259 49260 /** 49261 * Get an array of unique th elements, one for each column 49262 * @param {object} oSettings dataTables settings object 49263 * @param {node} nHeader automatically detect the layout from this node - optional 49264 * @param {array} aLayout thead/tfoot layout from _fnDetectHeader - optional 49265 * @returns array {node} aReturn list of unique th's 49266 * @memberof DataTable#oApi 49267 */ 49268 function _fnGetUniqueThs ( oSettings, nHeader, aLayout ) 49269 { 49270 var aReturn = []; 49271 if ( !aLayout ) 49272 { 49273 aLayout = oSettings.aoHeader; 49274 if ( nHeader ) 49275 { 49276 aLayout = []; 49277 _fnDetectHeader( aLayout, nHeader ); 49278 } 49279 } 49280 49281 for ( var i=0, iLen=aLayout.length ; i<iLen ; i++ ) 49282 { 49283 for ( var j=0, jLen=aLayout[i].length ; j<jLen ; j++ ) 49284 { 49285 if ( aLayout[i][j].unique && 49286 (!aReturn[j] || !oSettings.bSortCellsTop) ) 49287 { 49288 aReturn[j] = aLayout[i][j].cell; 49289 } 49290 } 49291 } 49292 49293 return aReturn; 49294 } 49295 49296 /** 49297 *
49297Create an Ajax call based on the table's settings, taking into account that 49298 * parameters can have multiple forms, and backwards compatibility. 49299 * 49300 * @param {object} oSettings dataTables settings object 49301 * @param {array} data Data to send to the server, required by 49302 * DataTables - may be augmented by developer callbacks 49303 * @param {function} fn Callback function to run when data is obtained 49304 */ 49305 function _fnBuildAjax( oSettings, data, fn ) 49306 { 49307 // Compatibility with 1.9-, allow fnServerData and event to manipulate 49308 _fnCallbackFire( oSettings, 'aoServerParams', 'serverParams', [data] ); 49309 49310 // Convert to object based for 1.10+ if using the old array scheme which can 49311 // come from server-side processing or serverParams 49312 if ( data && $.isArray(data) ) { 49313 var tmp = {}; 49314 var rbracket = /(.*?)\[\]$/; 49315 49316 $.each( data, function (key, val) { 49317 var match = val.name.match(rbracket); 49318 49319 if ( match ) { 49320 // Support for arrays 49321 var name = match[0]; 49322 49323 if ( ! tmp[ name ] ) { 49324 tmp[ name ] = []; 49325 } 49326 tmp[ name ].push( val.value ); 49327 } 49328 else { 49329 tmp[val.name] = val.value; 49330 } 49331 } ); 49332 data = tmp; 49333 } 49334 49335 var ajaxData; 49336 var ajax = oSettings.ajax; 49337 var instance = oSettings.oInstance; 49338 var callback = function ( json ) { 49339 _fnCallbackFire( oSettings, null, 'xhr', [oSettings, json, oSettings.jqXHR] ); 49340 fn( json ); 49341 }; 49342 49343 if ( $.isPlainObject( ajax ) && ajax.data ) 49344 { 49345 ajaxData = ajax.data; 49346 49347 var newData = $.isFunction( ajaxData ) ? 49348 ajaxData( data, oSettings ) : // fn can manipulate data or return 49349 ajaxData; // an object object or array to merge 49350 49351 // If the function returned something, use that alone 49352 data = $.isFunction( ajaxData ) && newData ? 49353 newData : 49354 $.extend( true, data, newData ); 49355 49356 // Remove the data property as we've resolved it already and don't want 49357 // jQuery to do it again (it is restored at the end of the function) 49358 delete ajax.data; 49359 } 49360 49361 var baseAjax = { 49362 "data": data, 49363 "success": function (json) { 49364 var error = json.error || json.sError; 49365 if ( error ) { 49366 _fnLog( oSettings, 0, error ); 49367 } 49368 49369 oSettings.json = json; 49370 callback( json ); 49371 }, 49372 "dataType": "json", 49373 "cache": false, 49374 "type": oSettings.sServerMethod, 49375 "error": function (xhr, error, thrown) { 49376 var ret = _fnCallbackFire( oSettings, null, 'xhr', [oSettings, null, oSettings.jqXHR] ); 49377 49378 if ( $.inArray( true, ret ) === -1 ) { 49379 if ( error == "parsererror" ) { 49380 _fnLog( oSettings, 0, 'Invalid JSON response', 1 ); 49381 } 49382 else if ( xhr.readyState === 4 ) { 49383 _fnLog( oSettings, 0, 'Ajax error', 7 ); 49384 } 49385 } 49386 49387 _fnProcessingDisplay( oSettings, false ); 49388 } 49389 }; 49390 49391 // Store the data submitted for the API 49392 oSettings.oAjaxData = data; 49393 49394 // Allow plug-ins and external processes to modify the data 49395 _fnCallbackFire( oSettings, null, 'preXhr', [oSettings, data] ); 49396 49397 if ( oSettings.fnServerData ) 49398 { 49399 // DataTables 1.9- compatibility 49400 oSettings.fnServerData.call( instance, 49401 oSettings.sAjaxSource, 49402 $.map( data, function (val, key) { // Need to convert back to 1.9 trad format 49403 return { name: key, value: val }; 49404 } ), 49405 callback, 49406 oSettings 49407 ); 49408 } 49409 else if ( oSettings.sAjaxSource || typeof ajax === 'string' ) 49410 { 49411 // DataTables 1.9- compatibility 49412 oSettings.jqXHR = $.ajax( $.extend( baseAjax, { 49413 url: ajax || oSettings.sAjaxSource 49414 } ) ); 49415 } 49416 else if ( $.isFunction( ajax ) ) 49417 { 49418 // Is a function - let the caller define what needs to be done 49419 oSettings.jqXHR = ajax.call( instance, data, callback, oSettings ); 49420 } 49421 else 49422 { 49423 // Object to extend the base settings 49424 oSettings.jqXHR = $.ajax( $.extend( baseAjax, ajax ) ); 49425 49426 // Restore for next time around 49427 ajax.data = ajaxData; 49428 } 49429 } 49430 49431 49432 /** 49433 * Update the table using an Ajax call 49434 * @param {object} settings dataTables settings object 49435 * @returns {boolean} Block the table drawing or not 49436 * @memberof DataTable#oApi 49437 */ 49438 function _fnAjaxUpdate( settings ) 49439 { 49440 if ( settings.bAjaxDataGet ) { 49441 settings.iDraw++; 49442 _fnProcessingDisplay( settings, true ); 49443 49444 _fnBuildAjax( 49445 settings, 49446 _fnAjaxParameters( settings ), 49447 function(json) { 49448 _fnAjaxUpdateDraw( settings, json ); 49449 } 49450 ); 49451 49452 return false;
vendor: 3,908 bytes, lines 49453-49579
49453 } 49454 return true; 49455 } 49456 49457 49458 /** 49459 * Build up the parameters in an object needed for a server-side processing 49460 * request. Note that this is basically done twice, is different ways - a modern 49461 * method which is used by default in DataTables 1.10 which uses objects and 49462 * arrays, or the 1.9- method with is name / value pairs. 1.9 method is used if 49463 * the sAjaxSource option is used in the initialisation, or the legacyAjax 49464 * option is set. 49465 * @param {object} oSettings dataTables settings object 49466 * @returns {bool} block the table drawing or not 49467 * @memberof DataTable#oApi 49468 */ 49469 function _fnAjaxParameters( settings ) 49470 { 49471 var 49472 columns = settings.aoColumns, 49473 columnCount = columns.length, 49474 features = settings.oFeatures, 49475 preSearch = settings.oPreviousSearch, 49476 preColSearch = settings.aoPreSearchCols, 49477 i, data = [], dataProp, column, columnSearch, 49478 sort = _fnSortFlatten( settings ), 49479 displayStart = settings._iDisplayStart, 49480 displayLength = features.bPaginate !== false ? 49481 settings._iDisplayLength : 49482 -1; 49483 49484 var param = function ( name, value ) { 49485 data.push( { 'name': name, 'value': value } ); 49486 }; 49487 49488 // DataTables 1.9- compatible method 49489 param( 'sEcho', settings.iDraw ); 49490 param( 'iColumns', columnCount ); 49491 param( 'sColumns', _pluck( columns, 'sName' ).join(',') ); 49492 param( 'iDisplayStart', displayStart ); 49493 param( 'iDisplayLength', displayLength ); 49494 49495 // DataTables 1.10+ method 49496 var d = { 49497 draw: settings.iDraw, 49498 columns: [], 49499 order: [], 49500 start: displayStart, 49501 length: displayLength, 49502 search: { 49503 value: preSearch.sSearch, 49504 regex: preSearch.bRegex 49505 } 49506 }; 49507 49508 for ( i=0 ; i<columnCount ; i++ ) { 49509 column = columns[i]; 49510 columnSearch = preColSearch[i]; 49511 dataProp = typeof column.mData=="function" ? 'function' : column.mData ; 49512 49513 d.columns.push( { 49514 data: dataProp, 49515 name: column.sName, 49516 searchable: column.bSearchable, 49517 orderable: column.bSortable, 49518 search: { 49519 value: columnSearch.sSearch, 49520 regex: columnSearch.bRegex 49521 } 49522 } ); 49523 49524 param( "mDataProp_"+i, dataProp ); 49525 49526 if ( features.bFilter ) { 49527 param( 'sSearch_'+i, columnSearch.sSearch ); 49528 param( 'bRegex_'+i, columnSearch.bRegex ); 49529 param( 'bSearchable_'+i, column.bSearchable ); 49530 } 49531 49532 if ( features.bSort ) { 49533 param( 'bSortable_'+i, column.bSortable ); 49534 } 49535 } 49536 49537 if ( features.bFilter ) { 49538 param( 'sSearch', preSearch.sSearch ); 49539 param( 'bRegex', preSearch.bRegex ); 49540 } 49541 49542 if ( features.bSort ) { 49543 $.each( sort, function ( i, val ) { 49544 d.order.push( { column: val.col, dir: val.dir } ); 49545 49546 param( 'iSortCol_'+i, val.col ); 49547 param( 'sSortDir_'+i, val.dir ); 49548 } ); 49549 49550 param( 'iSortingCols', sort.length ); 49551 } 49552 49553 // If the legacy.ajax parameter is null, then we automatically decide which 49554 // form to use, based on sAjaxSource 49555 var legacy = DataTable.ext.legacy.ajax; 49556 if ( legacy === null ) { 49557 return settings.sAjaxSource ? data : d; 49558 } 49559 49560 // Otherwise, if legacy has been specified then we use that to decide on the 49561 // form 49562 return legacy ? data : d; 49563 } 49564 49565 49566 /** 49567 * Data the data from the server (nuking the old) and redraw the table 49568 * @param {object} oSettings dataTables settings object 49569 * @param {object} json json data return from the server. 49570 * @param {string} json.sEcho Tracking flag for DataTables to match requests 49571 * @param {int} json.iTotalRecords Number of records in the data set, not accounting for filtering 49572 * @param {int} json.iTotalDisplayRecords Number of records in the data set, accounting for filtering 49573 * @param {array} json.aaData The data to display on this page 49574 * @param {string} [json.sColumns] Column ordering (sName, comma separated) 49575 * @memberof DataTable#oApi 49576 */ 49577 function _fnAjaxUpdateDraw ( settings, json ) 49578 { 49579 // v1.10 uses camelCase variables, while 1.9 uses Hungarian notation.
49580 // Support both 49581 var compat = function ( old, modern ) { 49582 return json[old] !== undefined ? json[old] : json[modern]; 49583 }; 49584 49585 var data = _fnAjaxDataSrc( settings, json ); 49586 var draw = compat( 'sEcho', 'draw' ); 49587 var recordsTotal = compat( 'iTotalRecords', 'recordsTotal' ); 49588 var recordsFiltered = compat( 'iTotalDisplayRecords', 'recordsFiltered' ); 49589 49590 if ( draw ) { 49591 // Protect against out of sequence returns 49592 if ( draw*1 < settings.iDraw ) { 49593 return; 49594 } 49595 settings.iDraw = draw * 1; 49596 } 49597 49598 _fnClearTable( settings ); 49599 settings._iRecordsTotal = parseInt(recordsTotal, 10); 49600 settings._iRecordsDisplay = parseInt(recordsFiltered, 10); 49601 49602 for ( var i=0, ien=data.length ; i<ien ; i++ ) { 49603 _fnAddData( settings, data[i] ); 49604 } 49605 settings.aiDisplay = settings.aiDisplayMaster.slice(); 49606 49607 settings.bAjaxDataGet = false; 49608 _fnDraw( settings ); 49609 49610 if ( ! settings._bInitComplete ) { 49611 _fnInitComplete( settings, json ); 49612 } 49613 49614 settings.bAjaxDataGet = true; 49615 _fnProcessingDisplay( settings, false ); 49616 } 49617 49618 49619 /** 49620 * Get the data from the JSON data source to use for drawing a table. Using 49621 * `_fnGetObjectDataFn` allows the data to be sourced from a property of the 49622 * source object, or from a processing function. 49623 * @param {object} oSettings dataTables settings object 49624 * @param {object} json Data source object / array from the server 49625 * @return {array} Array of data to use 49626 */ 49627 function _fnAjaxDataSrc ( oSettings, json ) 49628 { 49629 var dataSrc = $.isPlainObject( oSettings.ajax ) && oSettings.ajax.dataSrc !== undefined ? 49630 oSettings.ajax.dataSrc : 49631 oSettings.sAjaxDataProp; // Compatibility with 1.9-. 49632 49633 // Compatibility with 1.9-. In order to read from aaData, check if the 49634 // default has been changed, if not, check for aaData 49635 if ( dataSrc === 'data' ) { 49636 return json.aaData || json[dataSrc]; 49637 } 49638 49639 return dataSrc !== "" ? 49640 _fnGetObjectDataFn( dataSrc )( json ) : 49641 json; 49642 } 49643 49644 /** 49645 * Generate the node required for filtering text 49646 * @returns {node} Filter control element 49647 * @param {object} oSettings dataTables settings object 49648 * @memberof DataTable#oApi 49649 */ 49650 function _fnFeatureHtmlFilter ( settings ) 49651 { 49652 var classes = settings.oClasses; 49653 var tableId = settings.sTableId; 49654 var language = settings.oLanguage; 49655 var previousSearch = settings.oPreviousSearch; 49656 var features = settings.aanFeatures; 49657 var input = '<input type="search" class="'+classes.sFilterInput+'"/>'; 49658 49659 var str = language.sSearch; 49660 str = str.match(/_INPUT_/) ? 49661 str.replace('_INPUT_', input) : 49662 str+input; 49663 49664 var filter = $('<div/>', { 49665 'id': ! features.f ? tableId+'_filter' : null, 49666 'class': classes.sFilter 49667 } ) 49668 .append( $('<label/>' ).append( str ) ); 49669 49670 var searchFn = function() { 49671 /* Update all other filter input elements for the new display */ 49672 var n = features.f; 49673 var val = !this.value ? "" : this.value; // mental IE8 fix :-( 49674 49675 /* Now do the filter */ 49676 if ( val != previousSearch.sSearch ) { 49677 _fnFilterComplete( settings, { 49678 "sSearch": val, 49679 "bRegex": previousSearch.bRegex, 49680 "bSmart": previousSearch.bSmart , 49681 "bCaseInsensitive": previousSearch.bCaseInsensitive 49682 } ); 49683 49684 // Need to redraw, without resorting 49685 settings._iDisplayStart = 0; 49686 _fnDraw( settings ); 49687 } 49688 }; 49689 49690 var searchDelay = settings.searchDelay !== null ? 49691 settings.searchDelay : 49692 _fnDataSource( settings ) === 'ssp' ? 49693 400 : 49694 0; 49695 49696 var jqFilter = $('input', filter) 49697 .val( previousSearch.sSearch ) 49698 .attr( 'placeholder', language.sSearchPlaceholder ) 49699 .bind( 49700 'keyup.DT search.DT input.DT paste.DT cut.DT', 49701 searchDelay ? 49702 _fnThrottle( searchFn, searchDelay ) : 49703 searchFn 49704 ) 49705 .bind( 'keypress.DT', function(e) { 49706 /* Prevent form submission */ 49707 if ( e.keyCode == 13 ) { 49708 return false; 49709 } 49710 } ) 49711 .attr('aria-controls', tableId); 49712 49713 // Update the input elements whenever the table is filtered 49714 $(settings.nTable).on( 'search.dt.DT', function ( ev, s ) { 49715 if ( settings === s ) { 49716 // IE9 throws an 'unknown error' if document.activeElement is used 49717 // inside an iframe or frame...
vendor: 34,942 bytes, lines 49718-50926
49718 try { 49719 if ( jqFilter[0] !== document.activeElement ) { 49720 jqFilter.val( previousSearch.sSearch ); 49721 } 49722 } 49723 catch ( e ) {} 49724 } 49725 } ); 49726 49727 return filter[0]; 49728 } 49729 49730 49731 /** 49732 * Filter the table using both the global filter and column based filtering 49733 * @param {object} oSettings dataTables settings object 49734 * @param {object} oSearch search information 49735 * @param {int} [iForce] force a research of the master array (1) or not (undefined or 0) 49736 * @memberof DataTable#oApi 49737 */ 49738 function _fnFilterComplete ( oSettings, oInput, iForce ) 49739 { 49740 var oPrevSearch = oSettings.oPreviousSearch; 49741 var aoPrevSearch = oSettings.aoPreSearchCols; 49742 var fnSaveFilter = function ( oFilter ) { 49743 /* Save the filtering values */ 49744 oPrevSearch.sSearch = oFilter.sSearch; 49745 oPrevSearch.bRegex = oFilter.bRegex; 49746 oPrevSearch.bSmart = oFilter.bSmart; 49747 oPrevSearch.bCaseInsensitive = oFilter.bCaseInsensitive; 49748 }; 49749 var fnRegex = function ( o ) { 49750 // Backwards compatibility with the bEscapeRegex option 49751 return o.bEscapeRegex !== undefined ? !o.bEscapeRegex : o.bRegex; 49752 }; 49753 49754 // Resolve any column types that are unknown due to addition or invalidation 49755 // @todo As per sort - can this be moved into an event handler? 49756 _fnColumnTypes( oSettings ); 49757 49758 /* In server-side processing all filtering is done by the server, so no point hanging around here */ 49759 if ( _fnDataSource( oSettings ) != 'ssp' ) 49760 { 49761 /* Global filter */ 49762 _fnFilter( oSettings, oInput.sSearch, iForce, fnRegex(oInput), oInput.bSmart, oInput.bCaseInsensitive ); 49763 fnSaveFilter( oInput ); 49764 49765 /* Now do the individual column filter */ 49766 for ( var i=0 ; i<aoPrevSearch.length ; i++ ) 49767 { 49768 _fnFilterColumn( oSettings, aoPrevSearch[i].sSearch, i, fnRegex(aoPrevSearch[i]), 49769 aoPrevSearch[i].bSmart, aoPrevSearch[i].bCaseInsensitive ); 49770 } 49771 49772 /* Custom filtering */ 49773 _fnFilterCustom( oSettings ); 49774 } 49775 else 49776 { 49777 fnSaveFilter( oInput ); 49778 } 49779 49780 /* Tell the draw function we have been filtering */ 49781 oSettings.bFiltered = true; 49782 _fnCallbackFire( oSettings, null, 'search', [oSettings] ); 49783 } 49784 49785 49786 /** 49787 * Apply custom filtering functions 49788 * @param {object} oSettings dataTables settings object 49789 * @memberof DataTable#oApi 49790 */ 49791 function _fnFilterCustom( settings ) 49792 { 49793 var filters = DataTable.ext.search; 49794 var displayRows = settings.aiDisplay; 49795 var row, rowIdx; 49796 49797 for ( var i=0, ien=filters.length ; i<ien ; i++ ) { 49798 var rows = []; 49799 49800 // Loop over each row and see if it should be included 49801 for ( var j=0, jen=displayRows.length ; j<jen ; j++ ) { 49802 rowIdx = displayRows[ j ]; 49803 row = settings.aoData[ rowIdx ]; 49804 49805 if ( filters[i]( settings, row._aFilterData, rowIdx, row._aData, j ) ) { 49806 rows.push( rowIdx ); 49807 } 49808 } 49809 49810 // So the array reference doesn't break set the results into the 49811 // existing array 49812 displayRows.length = 0; 49813 $.merge( displayRows, rows ); 49814 } 49815 } 49816 49817 49818 /** 49819 * Filter the table on a per-column basis 49820 * @param {object} oSettings dataTables settings object 49821 * @param {string} sInput string to filter on 49822 * @param {int} iColumn column to filter 49823 * @param {bool} bRegex treat search string as a regular expression or not 49824 * @param {bool} bSmart use smart filtering or not 49825 * @param {bool} bCaseInsensitive Do case insenstive matching or not 49826 * @memberof DataTable#oApi 49827 */ 49828 function _fnFilterColumn ( settings, searchStr, colIdx, regex, smart, caseInsensitive ) 49829 { 49830 if ( searchStr === '' ) { 49831 return; 49832 } 49833 49834 var data; 49835 var display = settings.aiDisplay; 49836 var rpSearch = _fnFilterCreateSearch( searchStr, regex, smart, caseInsensitive ); 49837 49838 for ( var i=display.length-1 ; i>=0 ; i-- ) { 49839 data = settings.aoData[ display[i] ]._aFilterData[ colIdx ]; 49840 49841 if ( ! rpSearch.test( data ) ) { 49842 display.splice( i, 1 ); 49843 } 49844 } 49845 } 49846 49847 49848 /** 49849 * Filter the data table based on user input and draw the table 49850 * @param {object} settings dataTables settings object 49851 * @param {string} input string to filter on 49852 * @param {int} force optional - force a research of the master array (1) or not (undefined or 0) 49853 * @param {bool} regex treat as a regular expression or not 49854 * @param {bool} smart perform smart filtering or not 49855 * @param {bool} caseInsensitive Do case insenstive matching or not 49856 * @memberof DataTable#oApi 49857 */ 49858 function _fnFilter( settings, input, force, regex, smart, caseInsensitive ) 49859 { 49860 var rpSearch = _fnFilterCreateSearch( input, regex, smart, caseInsensitive ); 49861 var prevSearch = settings.oPreviousSearch.sSearch; 49862 var displayMaster = settings.aiDisplayMaster; 49863 var display, invalidated, i; 49864 49865 // Need to take account of custom filtering functions - always filter 49866 if ( DataTable.ext.search.length !== 0 ) { 49867 force = true; 49868 } 49869 49870 // Check if any of the rows were invalidated 49871 invalidated = _fnFilterData( settings ); 49872 49873 // If the input is blank - we just want the full data set 49874 if ( input.length <= 0 ) { 49875 settings.aiDisplay = displayMaster.slice(); 49876 } 49877 else { 49878 // New search - start from the master array 49879 if ( invalidated || 49880 force || 49881 prevSearch.length > input.length || 49882 input.indexOf(prevSearch) !== 0 || 49883 settings.bSorted // On resort, the display master needs to be 49884 // re-filtered since indexes will have changed 49885 ) { 49886 settings.aiDisplay = displayMaster.slice(); 49887 } 49888 49889 // Search the display array 49890 display = settings.aiDisplay; 49891 49892 for ( i=display.length-1 ; i>=0 ; i-- ) { 49893 if ( ! rpSearch.test( settings.aoData[ display[i] ]._sFilterRow ) ) { 49894 display.splice( i, 1 ); 49895 } 49896 } 49897 } 49898 } 49899 49900 49901 /** 49902 * Build a regular expression object suitable for searching a table 49903 * @param {string} sSearch string to search for 49904 * @param {bool} bRegex treat as a regular expression or not 49905 * @param {bool} bSmart perform smart filtering or not 49906 * @param {bool} bCaseInsensitive Do case insensitive matching or not 49907 * @returns {RegExp} constructed object 49908 * @memberof DataTable#oApi 49909 */ 49910 function _fnFilterCreateSearch( search, regex, smart, caseInsensitive ) 49911 { 49912 search = regex ? 49913 search : 49914 _fnEscapeRegex( search ); 49915 49916 if ( smart ) { 49917 /* For smart filtering we want to allow the search to work regardless of 49918 * word order. We also want double quoted text to be preserved, so word 49919 * order is important - a la google. So this is what we want to 49920 * generate: 49921 * 49922 * ^(?=.*?\bone\b)(?=.*?\btwo three\b)(?=.*?\bfour\b).*$ 49923 */ 49924 var a = $.map( search.match( /"[^"]+"|[^ ]+/g ) || [''], function ( word ) { 49925 if ( word.charAt(0) === '"' ) { 49926 var m = word.match( /^"(.*)"$/ ); 49927 word = m ? m[1] : word; 49928 } 49929 49930 return word.replace('"', ''); 49931 } ); 49932 49933 search = '^(?=.*?'+a.join( ')(?=.*?' )+').*$'; 49934 } 49935 49936 return new RegExp( search, caseInsensitive ? 'i' : '' ); 49937 } 49938 49939 49940 /** 49941 * Escape a string such that it can be used in a regular expression 49942 * @param {string} sVal string to escape 49943 * @returns {string} escaped string 49944 * @memberof DataTable#oApi 49945 */ 49946 function _fnEscapeRegex ( sVal ) 49947 { 49948 return sVal.replace( _re_escape_regex, '\\$1' ); 49949 } 49950 49951 49952 49953 var __filter_div = $('<div>')[0]; 49954 var __filter_div_textContent = __filter_div.textContent !== undefined; 49955 49956 // Update the filtering data for each row if needed (by invalidation or first run) 49957 function _fnFilterData ( settings ) 49958 { 49959 var columns = settings.aoColumns; 49960 var column; 49961 var i, j, ien, jen, filterData, cellData, row; 49962 var fomatters = DataTable.ext.type.search; 49963 var wasInvalidated = false; 49964 49965 for ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) { 49966 row = settings.aoData[i]; 49967 49968 if ( ! row._aFilterData ) { 49969 filterData = []; 49970 49971 for ( j=0, jen=columns.length ; j<jen ; j++ ) { 49972 column = columns[j]; 49973 49974 if ( column.bSearchable ) { 49975 cellData = _fnGetCellData( settings, i, j, 'filter' ); 49976 49977 if ( fomatters[ column.sType ] ) { 49978 cellData = fomatters[ column.sType ]( cellData ); 49979 } 49980 49981 // Search in DataTables 1.10 is string based. In 1.11 this 49982 // should be altered to also allow strict type checking. 49983 if ( cellData === null ) { 49984 cellData = ''; 49985 } 49986 49987 if ( typeof cellData !== 'string' && cellData.toString ) { 49988 cellData = cellData.toString(); 49989 } 49990 } 49991 else { 49992 cellData = ''; 49993 } 49994 49995 // If it looks like there is an HTML entity in the string, 49996 // attempt to decode it so sorting works as expected. Note that 49997 // we could use a single line of jQuery to do this, but the DOM 49998 // method used here is much faster http://jsperf.com/html-decode 49999 if ( cellData.indexOf && cellData.indexOf('&') !== -1 ) { 50000 __filter_div.innerHTML = cellData; 50001 cellData = __filter_div_textContent ? 50002 __filter_div.textContent : 50003 __filter_div.innerText; 50004 } 50005 50006 if ( cellData.replace ) { 50007 cellData = cellData.replace(/[\r\n]/g, ''); 50008 } 50009 50010 filterData.push( cellData ); 50011 } 50012 50013 row._aFilterData = filterData; 50014 row._sFilterRow = filterData.join(' '); 50015 wasInvalidated = true; 50016 } 50017 } 50018 50019 return wasInvalidated; 50020 } 50021 50022 50023 /** 50024 * Convert from the internal Hungarian notation to camelCase for external 50025 * interaction 50026 * @param {object} obj Object to convert 50027 * @returns {object} Inverted object 50028 * @memberof DataTable#oApi 50029 */ 50030 function _fnSearchToCamel ( obj ) 50031 { 50032 return { 50033 search: obj.sSearch, 50034 smart: obj.bSmart, 50035 regex: obj.bRegex, 50036 caseInsensitive: obj.bCaseInsensitive 50037 }; 50038 } 50039 50040 50041 50042 /** 50043 * Convert from camelCase notation to the internal Hungarian. We could use the 50044 * Hungarian convert function here, but this is cleaner 50045 * @param {object} obj Object to convert 50046 * @returns {object} Inverted object 50047 * @memberof DataTable#oApi 50048 */ 50049 function _fnSearchToHung ( obj ) 50050 { 50051 return { 50052 sSearch: obj.search, 50053 bSmart: obj.smart, 50054 bRegex: obj.regex, 50055 bCaseInsensitive: obj.caseInsensitive 50056 }; 50057 } 50058 50059 /** 50060 * Generate the node required for the info display 50061 * @param {object} oSettings dataTables settings object 50062 * @returns {node} Information element 50063 * @memberof DataTable#oApi 50064 */ 50065 function _fnFeatureHtmlInfo ( settings ) 50066 { 50067 var 50068 tid = settings.sTableId, 50069 nodes = settings.aanFeatures.i, 50070 n = $('<div/>', { 50071 'class': settings.oClasses.sInfo, 50072 'id': ! nodes ? tid+'_info' : null 50073 } ); 50074 50075 if ( ! nodes ) { 50076 // Update display on each draw 50077 settings.aoDrawCallback.push( { 50078 "fn": _fnUpdateInfo, 50079 "sName": "information" 50080 } ); 50081 50082 n 50083 .attr( 'role', 'status' ) 50084 .attr( 'aria-live', 'polite' ); 50085 50086 // Table is described by our info div 50087 $(settings.nTable).attr( 'aria-describedby', tid+'_info' ); 50088 } 50089 50090 return n[0]; 50091 } 50092 50093 50094 /** 50095 * Update the information elements in the display 50096 * @param {object} settings dataTables settings object 50097 * @memberof DataTable#oApi 50098 */ 50099 function _fnUpdateInfo ( settings ) 50100 { 50101 /* Show information about the table */ 50102 var nodes = settings.aanFeatures.i; 50103 if ( nodes.length === 0 ) { 50104 return; 50105 } 50106 50107 var 50108 lang = settings.oLanguage, 50109 start = settings._iDisplayStart+1, 50110 end = settings.fnDisplayEnd(), 50111 max = settings.fnRecordsTotal(), 50112 total = settings.fnRecordsDisplay(), 50113 out = total ? 50114 lang.sInfo : 50115 lang.sInfoEmpty; 50116 50117 if ( total !== max ) { 50118 /* Record set after filtering */ 50119 out += ' ' + lang.sInfoFiltered; 50120 } 50121 50122 // Convert the macros 50123 out += lang.sInfoPostFix; 50124 out = _fnInfoMacros( settings, out ); 50125 50126 var callback = lang.fnInfoCallback; 50127 if ( callback !== null ) { 50128 out = callback.call( settings.oInstance, 50129 settings, start, end, max, total, out 50130 ); 50131 } 50132 50133 $(nodes).html( out ); 50134 } 50135 50136 50137 function _fnInfoMacros ( settings, str ) 50138 { 50139 // When infinite scrolling, we are always starting at 1. _iDisplayStart is used only 50140 // internally 50141 var 50142 formatter = settings.fnFormatNumber, 50143 start = settings._iDisplayStart+1, 50144 len = settings._iDisplayLength, 50145 vis = settings.fnRecordsDisplay(), 50146 all = len === -1; 50147 50148 return str. 50149 replace(/_START_/g, formatter.call( settings, start ) ). 50150 replace(/_END_/g, formatter.call( settings, settings.fnDisplayEnd() ) ). 50151 replace(/_MAX_/g, formatter.call( settings, settings.fnRecordsTotal() ) ). 50152 replace(/_TOTAL_/g, formatter.call( settings, vis ) ). 50153 replace(/_PAGE_/g, formatter.call( settings, all ? 1 : Math.ceil( start / len ) ) ). 50154 replace(/_PAGES_/g, formatter.call( settings, all ? 1 : Math.ceil( vis / len ) ) ); 50155 } 50156 50157 50158 50159 /** 50160 * Draw the table for the first time, adding all required features 50161 * @param {object} settings dataTables settings object 50162 * @memberof DataTable#oApi 50163 */ 50164 function _fnInitialise ( settings ) 50165 { 50166 var i, iLen, iAjaxStart=settings.iInitDisplayStart; 50167 var columns = settings.aoColumns, column; 50168 var features = settings.oFeatures; 50169 var deferLoading = settings.bDeferLoading; // value modified by the draw 50170 50171 /* Ensure that the table data is fully initialised */ 50172 if ( ! settings.bInitialised ) { 50173 setTimeout( function(){ _fnInitialise( settings ); }, 200 ); 50174 return; 50175 } 50176 50177 /* Show the display HTML options */ 50178 _fnAddOptionsHtml( settings ); 50179 50180 /* Build and draw the header / footer for the table */ 50181 _fnBuildHead( settings ); 50182 _fnDrawHead( settings, settings.aoHeader ); 50183 _fnDrawHead( settings, settings.aoFooter ); 50184 50185 /* Okay to show that something is going on now */ 50186 _fnProcessingDisplay( settings, true ); 50187 50188 /* Calculate sizes for columns */ 50189 if ( features.bAutoWidth ) { 50190 _fnCalculateColumnWidths( settings ); 50191 } 50192 50193 for ( i=0, iLen=columns.length ; i<iLen ; i++ ) { 50194 column = columns[i]; 50195 50196 if ( column.sWidth ) { 50197 column.nTh.style.width = _fnStringToCss( column.sWidth ); 50198 } 50199 } 50200 50201 _fnCallbackFire( settings, null, 'preInit', [settings] ); 50202 50203 // If there is default sorting required - let's do it. The sort function 50204 // will do the drawing for us. Otherwise we draw the table regardless of the 50205 // Ajax source - this allows the table to look initialised for Ajax sourcing 50206 // data (show 'loading' message possibly) 50207 _fnReDraw( settings ); 50208 50209 // Server-side processing init complete is done by _fnAjaxUpdateDraw 50210 var dataSrc = _fnDataSource( settings ); 50211 if ( dataSrc != 'ssp' || deferLoading ) { 50212 // if there is an ajax source load the data 50213 if ( dataSrc == 'ajax' ) { 50214 _fnBuildAjax( settings, [], function(json) { 50215 var aData = _fnAjaxDataSrc( settings, json ); 50216 50217 // Got the data - add it to the table 50218 for ( i=0 ; i<aData.length ; i++ ) { 50219 _fnAddData( settings, aData[i] ); 50220 } 50221 50222 // Reset the init display for cookie saving. We've already done 50223 // a filter, and therefore cleared it before. So we need to make 50224 // it appear 'fresh' 50225 settings.iInitDisplayStart = iAjaxStart; 50226 50227 _fnReDraw( settings ); 50228 50229 _fnProcessingDisplay( settings, false ); 50230 _fnInitComplete( settings, json ); 50231 }, settings ); 50232 } 50233 else { 50234 _fnProcessingDisplay( settings, false ); 50235 _fnInitComplete( settings ); 50236 } 50237 } 50238 } 50239 50240 50241 /** 50242 * Draw the table for the first time, adding all required features 50243 * @param {object} oSettings dataTables settings object 50244 * @param {object} [json] JSON from the server that completed the table, if using Ajax source 50245 * with client-side processing (optional) 50246 * @memberof DataTable#oApi 50247 */ 50248 function _fnInitComplete ( settings, json ) 50249 { 50250 settings._bInitComplete = true; 50251 50252 // When data was added after the initialisation (data or Ajax) we need to 50253 // calculate the column sizing 50254 if ( json || settings.oInit.aaData ) { 50255 _fnAdjustColumnSizing( settings ); 50256 } 50257 50258 _fnCallbackFire( settings, null, 'plugin-init', [settings, json] ); 50259 _fnCallbackFire( settings, 'aoInitComplete', 'init', [settings, json] ); 50260 } 50261 50262 50263 function _fnLengthChange ( settings, val ) 50264 { 50265 var len = parseInt( val, 10 ); 50266 settings._iDisplayLength = len; 50267 50268 _fnLengthOverflow( settings ); 50269 50270 // Fire length change event 50271 _fnCallbackFire( settings, null, 'length', [settings, len] ); 50272 } 50273 50274 50275 /** 50276 * Generate the node required for user display length changing 50277 * @param {object} settings dataTables settings object 50278 * @returns {node} Display length feature node 50279 * @memberof DataTable#oApi 50280 */ 50281 function _fnFeatureHtmlLength ( settings ) 50282 { 50283 var 50284 classes = settings.oClasses, 50285 tableId = settings.sTableId, 50286 menu = settings.aLengthMenu, 50287 d2 = $.isArray( menu[0] ), 50288 lengths = d2 ? menu[0] : menu, 50289 language = d2 ? menu[1] : menu; 50290 50291 var select = $('<select/>', { 50292 'name': tableId+'_length', 50293 'aria-controls': tableId, 50294 'class': classes.sLengthSelect 50295 } ); 50296 50297 for ( var i=0, ien=lengths.length ; i<ien ; i++ ) { 50298 select[0][ i ] = new Option( language[i], lengths[i] ); 50299 } 50300 50301 var div = $('<div><label/></div>').addClass( classes.sLength ); 50302 if ( ! settings.aanFeatures.l ) { 50303 div[0].id = tableId+'_length'; 50304 } 50305 50306 div.children().append( 50307 settings.oLanguage.sLengthMenu.replace( '_MENU_', select[0].outerHTML ) 50308 ); 50309 50310 // Can't use `select` variable as user might provide their own and the 50311 // reference is broken by the use of outerHTML 50312 $('select', div) 50313 .val( settings._iDisplayLength ) 50314 .bind( 'change.DT', function(e) { 50315 _fnLengthChange( settings, $(this).val() ); 50316 _fnDraw( settings ); 50317 } ); 50318 50319 // Update node value whenever anything changes the table's length 50320 $(settings.nTable).bind( 'length.dt.DT', function (e, s, len) { 50321 if ( settings === s ) { 50322 $('select', div).val( len ); 50323 } 50324 } ); 50325 50326 return div[0]; 50327 } 50328 50329 50330 50331 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 50332 * Note that most of the paging logic is done in 50333 * DataTable.ext.pager 50334 */ 50335 50336 /** 50337 * Generate the node required for default pagination 50338 * @param {object} oSettings dataTables settings object 50339 * @returns {node} Pagination feature node 50340 * @memberof DataTable#oApi 50341 */ 50342 function _fnFeatureHtmlPaginate ( settings ) 50343 { 50344 var 50345 type = settings.sPaginationType, 50346 plugin = DataTable.ext.pager[ type ], 50347 modern = typeof plugin === 'function', 50348 redraw = function( settings ) { 50349 _fnDraw( settings ); 50350 }, 50351 node = $('<div/>').addClass( settings.oClasses.sPaging + type )[0], 50352 features = settings.aanFeatures; 50353 50354 if ( ! modern ) { 50355 plugin.fnInit( settings, node, redraw ); 50356 } 50357 50358 /* Add a draw callback for the pagination on first instance, to update the paging display */ 50359 if ( ! features.p ) 50360 { 50361 node.id = settings.sTableId+'_paginate'; 50362 50363 settings.aoDrawCallback.push( { 50364 "fn": function( settings ) { 50365 if ( modern ) { 50366 var 50367 start = settings._iDisplayStart, 50368 len = settings._iDisplayLength, 50369 visRecords = settings.fnRecordsDisplay(), 50370 all = len === -1, 50371 page = all ? 0 : Math.ceil( start / len ), 50372 pages = all ? 1 : Math.ceil( visRecords / len ), 50373 buttons = plugin(page, pages), 50374 i, ien; 50375 50376 for ( i=0, ien=features.p.length ; i<ien ; i++ ) { 50377 _fnRenderer( settings, 'pageButton' )( 50378 settings, features.p[i], i, buttons, page, pages 50379 ); 50380 } 50381 } 50382 else { 50383 plugin.fnUpdate( settings, redraw ); 50384 } 50385 }, 50386 "sName": "pagination" 50387 } ); 50388 } 50389 50390 return node; 50391 } 50392 50393 50394 /** 50395 * Alter the display settings to change the page 50396 * @param {object} settings DataTables settings object 50397 * @param {string|int} action Paging action to take: "first", "previous", 50398 * "next" or "last" or page number to jump to (integer) 50399 * @param [bool] redraw Automatically draw the update or not 50400 * @returns {bool} true page has changed, false - no change 50401 * @memberof DataTable#oApi 50402 */ 50403 function _fnPageChange ( settings, action, redraw ) 50404 { 50405 var 50406 start = settings._iDisplayStart, 50407 len = settings._iDisplayLength, 50408 records = settings.fnRecordsDisplay(); 50409 50410 if ( records === 0 || len === -1 ) 50411 { 50412 start = 0; 50413 } 50414 else if ( typeof action === "number" ) 50415 { 50416 start = action * len; 50417 50418 if ( start > records ) 50419 { 50420 start = 0; 50421 } 50422 } 50423 else if ( action == "first" ) 50424 { 50425 start = 0; 50426 } 50427 else if ( action == "previous" ) 50428 { 50429 start = len >= 0 ? 50430 start - len : 50431 0; 50432 50433 if ( start < 0 ) 50434 { 50435 start = 0; 50436 } 50437 } 50438 else if ( action == "next" ) 50439 { 50440 if ( start + len < records ) 50441 { 50442 start += len; 50443 } 50444 } 50445 else if ( action == "last" ) 50446 { 50447 start = Math.floor( (records-1) / len) * len; 50448 } 50449 else 50450 { 50451 _fnLog( settings, 0, "Unknown paging action: "+action, 5 ); 50452 } 50453 50454 var changed = settings._iDisplayStart !== start; 50455 settings._iDisplayStart = start; 50456 50457 if ( changed ) { 50458 _fnCallbackFire( settings, null, 'page', [settings] ); 50459 50460 if ( redraw ) { 50461 _fnDraw( settings ); 50462 } 50463 } 50464 50465 return changed; 50466 } 50467 50468 50469 50470 /** 50471 * Generate the node required for the processing node 50472 * @param {object} settings dataTables settings object 50473 * @returns {node} Processing element 50474 * @memberof DataTable#oApi 50475 */ 50476 function _fnFeatureHtmlProcessing ( settings ) 50477 { 50478 return $('<div/>', { 50479 'id': ! settings.aanFeatures.r ? settings.sTableId+'_processing' : null, 50480 'class': settings.oClasses.sProcessing 50481 } ) 50482 .html( settings.oLanguage.sProcessing ) 50483 .insertBefore( settings.nTable )[0]; 50484 } 50485 50486 50487 /** 50488 * Display or hide the processing indicator 50489 * @param {object} settings dataTables settings object 50490 * @param {bool} show Show the processing indicator (true) or not (false) 50491 * @memberof DataTable#oApi 50492 */ 50493 function _fnProcessingDisplay ( settings, show ) 50494 { 50495 if ( settings.oFeatures.bProcessing ) { 50496 $(settings.aanFeatures.r).css( 'display', show ? 'block' : 'none' ); 50497 } 50498 50499 _fnCallbackFire( settings, null, 'processing', [settings, show] ); 50500 } 50501 50502 /** 50503 * Add any control elements for the table - specifically scrolling 50504 * @param {object} settings dataTables settings object 50505 * @returns {node} Node to add to the DOM 50506 * @memberof DataTable#oApi 50507 */ 50508 function _fnFeatureHtmlTable ( settings ) 50509 { 50510 var table = $(settings.nTable); 50511 50512 // Add the ARIA grid role to the table 50513 table.attr( 'role', 'grid' ); 50514 50515 // Scrolling from here on in 50516 var scroll = settings.oScroll; 50517 50518 if ( scroll.sX === '' && scroll.sY === '' ) { 50519 return settings.nTable; 50520 } 50521 50522 var scrollX = scroll.sX; 50523 var scrollY = scroll.sY; 50524 var classes = settings.oClasses; 50525 var caption = table.children('caption'); 50526 var captionSide = caption.length ? caption[0]._captionSide : null; 50527 var headerClone = $( table[0].cloneNode(false) ); 50528 var footerClone = $( table[0].cloneNode(false) ); 50529 var footer = table.children('tfoot'); 50530 var _div = '<div/>'; 50531 var size = function ( s ) { 50532 return !s ? null : _fnStringToCss( s ); 50533 }; 50534 50535 if ( ! footer.length ) { 50536 footer = null; 50537 } 50538 50539 /* 50540 * The HTML structure that we want to generate in this function is: 50541 * div - scroller 50542 * div - scroll head 50543 * div - scroll head inner 50544 * table - scroll head table 50545 * thead - thead 50546 * div - scroll body 50547 * table - table (master table) 50548 * thead - thead clone for sizing 50549 * tbody - tbody 50550 * div - scroll foot 50551 * div - scroll foot inner 50552 * table - scroll foot table 50553 * tfoot - tfoot 50554 */ 50555 var scroller = $( _div, { 'class': classes.sScrollWrapper } ) 50556 .append( 50557 $(_div, { 'class': classes.sScrollHead } ) 50558 .css( { 50559 overflow: 'hidden', 50560 position: 'relative', 50561 border: 0, 50562 width: scrollX ? size(scrollX) : '100%' 50563 } ) 50564 .append( 50565 $(_div, { 'class': classes.sScrollHeadInner } ) 50566 .css( { 50567 'box-sizing': 'content-box', 50568 width: scroll.sXInner || '100%' 50569 } ) 50570 .append( 50571 headerClone 50572 .removeAttr('id') 50573 .css( 'margin-left', 0 ) 50574 .append( captionSide === 'top' ? caption : null ) 50575 .append( 50576 table.children('thead') 50577 ) 50578 ) 50579 ) 50580 ) 50581 .append( 50582 $(_div, { 'class': classes.sScrollBody } ) 50583 .css( { 50584 position: 'relative', 50585 overflow: 'auto', 50586 width: size( scrollX ) 50587 } ) 50588 .append( table ) 50589 ); 50590 50591 if ( footer ) { 50592 scroller.append( 50593 $(_div, { 'class': classes.sScrollFoot } ) 50594 .css( { 50595 overflow: 'hidden', 50596 border: 0, 50597 width: scrollX ? size(scrollX) : '100%' 50598 } ) 50599 .append( 50600 $(_div, { 'class': classes.sScrollFootInner } ) 50601 .append( 50602 footerClone 50603 .removeAttr('id') 50604 .css( 'margin-left', 0 ) 50605 .append( captionSide === 'bottom' ? caption : null ) 50606 .append( 50607 table.children('tfoot') 50608 ) 50609 ) 50610 ) 50611 ); 50612 } 50613 50614 var children = scroller.children(); 50615 var scrollHead = children[0]; 50616 var scrollBody = children[1]; 50617 var scrollFoot = footer ? children[2] : null; 50618 50619 // When the body is scrolled, then we also want to scroll the headers 50620 if ( scrollX ) { 50621 $(scrollBody).on( 'scroll.DT', function (e) { 50622 var scrollLeft = this.scrollLeft; 50623 50624 scrollHead.scrollLeft = scrollLeft; 50625 50626 if ( footer ) { 50627 scrollFoot.scrollLeft = scrollLeft; 50628 } 50629 } ); 50630 } 50631 50632 $(scrollBody).css( 50633 scrollY && scroll.bCollapse ? 'max-height' : 'height', 50634 scrollY 50635 ); 50636 50637 settings.nScrollHead = scrollHead; 50638 settings.nScrollBody = scrollBody; 50639 settings.nScrollFoot = scrollFoot; 50640 50641 // On redraw - align columns 50642 settings.aoDrawCallback.push( { 50643 "fn": _fnScrollDraw, 50644 "sName": "scrolling" 50645 } ); 50646 50647 return scroller[0]; 50648 } 50649 50650 50651 50652 /** 50653 * Update the header, footer and body tables for resizing - i.e. column 50654 * alignment. 50655 * 50656 * Welcome to the most horrible function DataTables. The process that this 50657 * function follows is basically: 50658 * 1. Re-create the table inside the scrolling div 50659 * 2. Take live measurements from the DOM 50660 * 3. Apply the measurements to align the columns 50661 * 4. Clean up 50662 * 50663 * @param {object} settings dataTables settings object 50664 * @memberof DataTable#oApi 50665 */ 50666 function _fnScrollDraw ( settings ) 50667 { 50668 // Given that this is such a monster function, a lot of variables are use 50669 // to try and keep the minimised size as small as possible 50670 var 50671 scroll = settings.oScroll, 50672 scrollX = scroll.sX, 50673 scrollXInner = scroll.sXInner, 50674 scrollY = scroll.sY, 50675 barWidth = scroll.iBarWidth, 50676 divHeader = $(settings.nScrollHead), 50677 divHeaderStyle = divHeader[0].style, 50678 divHeaderInner = divHeader.children('div'), 50679 divHeaderInnerStyle = divHeaderInner[0].style, 50680 divHeaderTable = divHeaderInner.children('table'), 50681 divBodyEl = settings.nScrollBody, 50682 divBody = $(divBodyEl), 50683 divBodyStyle = divBodyEl.style, 50684 divFooter = $(settings.nScrollFoot), 50685 divFooterInner = divFooter.children('div'), 50686 divFooterTable = divFooterInner.children('table'), 50687 header = $(settings.nTHead), 50688 table = $(settings.nTable), 50689 tableEl = table[0], 50690 tableStyle = tableEl.style, 50691 footer = settings.nTFoot ? $(settings.nTFoot) : null, 50692 browser = settings.oBrowser, 50693 ie67 = browser.bScrollOversize, 50694 dtHeaderCells = _pluck( settings.aoColumns, 'nTh' ), 50695 headerTrgEls, footerTrgEls, 50696 headerSrcEls, footerSrcEls, 50697 headerCopy, footerCopy, 50698 headerWidths=[], footerWidths=[], 50699 headerContent=[], footerContent=[], 50700 idx, correction, sanityWidth, 50701 zeroOut = function(nSizer) { 50702 var style = nSizer.style; 50703 style.paddingTop = "0"; 50704 style.paddingBottom = "0"; 50705 style.borderTopWidth = "0"; 50706 style.borderBottomWidth = "0"; 50707 style.height = 0; 50708 }; 50709 50710 // If the scrollbar visibility has changed from the last draw, we need to 50711 // adjust the column sizes as the table width will have changed to account 50712 // for the scrollbar 50713 var scrollBarVis = divBodyEl.scrollHeight > divBodyEl.clientHeight; 50714 50715 if ( settings.scrollBarVis !== scrollBarVis && settings.scrollBarVis !== undefined ) { 50716 settings.scrollBarVis = scrollBarVis; 50717 _fnAdjustColumnSizing( settings ); 50718 return; // adjust column sizing will call this function again 50719 } 50720 else { 50721 settings.scrollBarVis = scrollBarVis; 50722 } 50723 50724 /* 50725 * 1. Re-create the table inside the scrolling div 50726 */ 50727 50728 // Remove the old minimised thead and tfoot elements in the inner table 50729 table.children('thead, tfoot').remove(); 50730 50731 if ( footer ) { 50732 footerCopy = footer.clone().prependTo( table ); 50733 footerTrgEls = footer.find('tr'); // the original tfoot is in its own table and must be sized 50734 footerSrcEls = footerCopy.find('tr'); 50735 } 50736 50737 // Clone the current header and footer elements and then place it into the inner table 50738 headerCopy = header.clone().prependTo( table ); 50739 headerTrgEls = header.find('tr'); // original header is in its own table 50740 headerSrcEls = headerCopy.find('tr'); 50741 headerCopy.find('th, td').removeAttr('tabindex'); 50742 50743 50744 /* 50745 * 2. Take live measurements from the DOM - do not alter the DOM itself! 50746 */ 50747 50748 // Remove old sizing and apply the calculated column widths 50749 // Get the unique column headers in the newly created (cloned) header. We want to apply the 50750 // calculated sizes to this header 50751 if ( ! scrollX ) 50752 { 50753 divBodyStyle.width = '100%'; 50754 divHeader[0].style.width = '100%'; 50755 } 50756 50757 $.each( _fnGetUniqueThs( settings, headerCopy ), function ( i, el ) { 50758 idx = _fnVisibleToColumnIndex( settings, i ); 50759 el.style.width = settings.aoColumns[idx].sWidth; 50760 } ); 50761 50762 if ( footer ) { 50763 _fnApplyToChildren( function(n) { 50764 n.style.width = ""; 50765 }, footerSrcEls ); 50766 } 50767 50768 // Size the table as a whole 50769 sanityWidth = table.outerWidth(); 50770 if ( scrollX === "" ) { 50771 // No x scrolling 50772 tableStyle.width = "100%"; 50773 50774 // IE7 will make the width of the table when 100% include the scrollbar 50775 // - which is shouldn't. When there is a scrollbar we need to take this 50776 // into account. 50777 if ( ie67 && (table.find('tbody').height() > divBodyEl.offsetHeight || 50778 divBody.css('overflow-y') == "scroll") 50779 ) { 50780 tableStyle.width = _fnStringToCss( table.outerWidth() - barWidth); 50781 } 50782 50783 // Recalculate the sanity width 50784 sanityWidth = table.outerWidth(); 50785 } 50786 else if ( scrollXInner !== "" ) { 50787 // legacy x scroll inner has been given - use it 50788 tableStyle.width = _fnStringToCss(scrollXInner); 50789 50790 // Recalculate the sanity width 50791 sanityWidth = table.outerWidth(); 50792 } 50793 50794 // Hidden header should have zero height, so remove padding and borders. Then 50795 // set the width based on the real headers 50796 50797 // Apply all styles in one pass 50798 _fnApplyToChildren( zeroOut, headerSrcEls ); 50799 50800 // Read all widths in next pass 50801 _fnApplyToChildren( function(nSizer) { 50802 headerContent.push( nSizer.innerHTML ); 50803 headerWidths.push( _fnStringToCss( $(nSizer).css('width') ) ); 50804 }, headerSrcEls ); 50805 50806 // Apply all widths in final pass 50807 _fnApplyToChildren( function(nToSize, i) { 50808 // Only apply widths to the DataTables detected header cells - this 50809 // prevents complex headers from having contradictory sizes applied 50810 if ( $.inArray( nToSize, dtHeaderCells ) !== -1 ) { 50811 nToSize.style.width = headerWidths[i]; 50812 } 50813 }, headerTrgEls ); 50814 50815 $(headerSrcEls).height(0); 50816 50817 /* Same again with the footer if we have one */ 50818 if ( footer ) 50819 { 50820 _fnApplyToChildren( zeroOut, footerSrcEls ); 50821 50822 _fnApplyToChildren( function(nSizer) { 50823 footerContent.push( nSizer.innerHTML ); 50824 footerWidths.push( _fnStringToCss( $(nSizer).css('width') ) ); 50825 }, footerSrcEls ); 50826 50827 _fnApplyToChildren( function(nToSize, i) { 50828 nToSize.style.width = footerWidths[i]; 50829 }, footerTrgEls ); 50830 50831 $(footerSrcEls).height(0); 50832 } 50833 50834 50835 /* 50836 * 3. Apply the measurements 50837 */ 50838 50839 // "Hide" the header and footer that we used for the sizing. We need to keep 50840 // the content of the cell so that the width applied to the header and body 50841 // both match, but we want to hide it completely. We want to also fix their 50842 // width to what they currently are 50843 _fnApplyToChildren( function(nSizer, i) { 50844 nSizer.innerHTML = '<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+headerContent[i]+'</div>'; 50845 nSizer.style.width = headerWidths[i]; 50846 }, headerSrcEls ); 50847 50848 if ( footer ) 50849 { 50850 _fnApplyToChildren( function(nSizer, i) { 50851 nSizer.innerHTML = '<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+footerContent[i]+'</div>'; 50852 nSizer.style.width = footerWidths[i]; 50853 }, footerSrcEls ); 50854 } 50855 50856 // Sanity check that the table is of a sensible width. If not then we are going to get 50857 // misalignment - try to prevent this by not allowing the table to shrink below its min width 50858 if ( table.outerWidth() < sanityWidth ) 50859 { 50860 // The min width depends upon if we have a vertical scrollbar visible or not */ 50861 correction = ((divBodyEl.scrollHeight > divBodyEl.offsetHeight || 50862 divBody.css('overflow-y') == "scroll")) ? 50863 sanityWidth+barWidth : 50864 sanityWidth; 50865 50866 // IE6/7 are a law unto themselves... 50867 if ( ie67 && (divBodyEl.scrollHeight > 50868 divBodyEl.offsetHeight || divBody.css('overflow-y') == "scroll") 50869 ) { 50870 tableStyle.width = _fnStringToCss( correction-barWidth ); 50871 } 50872 50873 // And give the user a warning that we've stopped the table getting too small 50874 if ( scrollX === "" || scrollXInner !== "" ) { 50875 _fnLog( settings, 1, 'Possible column misalignment', 6 ); 50876 } 50877 } 50878 else 50879 { 50880 correction = '100%'; 50881 } 50882 50883 // Apply to the container elements 50884 divBodyStyle.width = _fnStringToCss( correction ); 50885 divHeaderStyle.width = _fnStringToCss( correction ); 50886 50887 if ( footer ) { 50888 settings.nScrollFoot.style.width = _fnStringToCss( correction ); 50889 } 50890 50891 50892 /* 50893 * 4. Clean up 50894 */ 50895 if ( ! scrollY ) { 50896 /* IE7< puts a vertical scrollbar in place (when it shouldn't be) due to subtracting 50897 * the scrollbar height from the visible display, rather than adding it on. We need to 50898 * set the height in order to sort this. Don't want to do it in any other browsers. 50899 */ 50900 if ( ie67 ) { 50901 divBodyStyle.height = _fnStringToCss( tableEl.offsetHeight+barWidth ); 50902 } 50903 } 50904 50905 /* Finally set the width's of the header and footer tables */ 50906 var iOuterWidth = table.outerWidth(); 50907 divHeaderTable[0].style.width = _fnStringToCss( iOuterWidth ); 50908 divHeaderInnerStyle.width = _fnStringToCss( iOuterWidth ); 50909 50910 // Figure out if there are scrollbar present - if so then we need a the header and footer to 50911 // provide a bit more space to allow "overflow" scrolling (i.e. past the scrollbar) 50912 var bScrolling = table.height() > divBodyEl.clientHeight || divBody.css('overflow-y') == "scroll"; 50913 var padding = 'padding' + (browser.bScrollbarLeft ? 'Left' : 'Right' ); 50914 divHeaderInnerStyle[ padding ] = bScrolling ? barWidth+"px" : "0px"; 50915 50916 if ( footer ) { 50917 divFooterTable[0].style.width = _fnStringToCss( iOuterWidth ); 50918 divFooterInner[0].style.width = _fnStringToCss( iOuterWidth ); 50919 divFooterInner[0].style[padding] = bScrolling ? barWidth+"px" : "0px"; 50920 } 50921 50922 // Correct DOM ordering for colgroup - comes before the thead 50923 table.children('colgroup').insertBefore( table.children('thead') ); 50924 50925 /* Adjust the position of the header in case we loose the y-scrollbar */ 50926 divBody.scroll(
vendor: 8,399 bytes, lines 50926-51185
50926); 50927 50928 // If sorting or filtering has occurred, jump the scrolling back to the top 50929 // only if we aren't holding the position 50930 if ( (settings.bSorted || settings.bFiltered) && ! settings._drawHold ) { 50931 divBodyEl.scrollTop = 0; 50932 } 50933 } 50934 50935 50936 50937 /** 50938 * Apply a given function to the display child nodes of an element array (typically 50939 * TD children of TR rows 50940 * @param {function} fn Method to apply to the objects 50941 * @param array {nodes} an1 List of elements to look through for display children 50942 * @param array {nodes} an2 Another list (identical structure to the first) - optional 50943 * @memberof DataTable#oApi 50944 */ 50945 function _fnApplyToChildren( fn, an1, an2 ) 50946 { 50947 var index=0, i=0, iLen=an1.length; 50948 var nNode1, nNode2; 50949 50950 while ( i < iLen ) { 50951 nNode1 = an1[i].firstChild; 50952 nNode2 = an2 ? an2[i].firstChild : null; 50953 50954 while ( nNode1 ) { 50955 if ( nNode1.nodeType === 1 ) { 50956 if ( an2 ) { 50957 fn( nNode1, nNode2, index ); 50958 } 50959 else { 50960 fn( nNode1, index ); 50961 } 50962 50963 index++; 50964 } 50965 50966 nNode1 = nNode1.nextSibling; 50967 nNode2 = an2 ? nNode2.nextSibling : null; 50968 } 50969 50970 i++; 50971 } 50972 } 50973 50974 50975 50976 var __re_html_remove = /<.*?>/g; 50977 50978 50979 /** 50980 * Calculate the width of columns for the table 50981 * @param {object} oSettings dataTables settings object 50982 * @memberof DataTable#oApi 50983 */ 50984 function _fnCalculateColumnWidths ( oSettings ) 50985 { 50986 var 50987 table = oSettings.nTable, 50988 columns = oSettings.aoColumns, 50989 scroll = oSettings.oScroll, 50990 scrollY = scroll.sY, 50991 scrollX = scroll.sX, 50992 scrollXInner = scroll.sXInner, 50993 columnCount = columns.length, 50994 visibleColumns = _fnGetColumns( oSettings, 'bVisible' ), 50995 headerCells = $('th', oSettings.nTHead), 50996 tableWidthAttr = table.getAttribute('width'), // from DOM element 50997 tableContainer = table.parentNode, 50998 userInputs = false, 50999 i, column, columnIdx, width, outerWidth, 51000 browser = oSettings.oBrowser, 51001 ie67 = browser.bScrollOversize; 51002 51003 var styleWidth = table.style.width; 51004 if ( styleWidth && styleWidth.indexOf('%') !== -1 ) { 51005 tableWidthAttr = styleWidth; 51006 } 51007 51008 /* Convert any user input sizes into pixel sizes */ 51009 for ( i=0 ; i<visibleColumns.length ; i++ ) { 51010 column = columns[ visibleColumns[i] ]; 51011 51012 if ( column.sWidth !== null ) { 51013 column.sWidth = _fnConvertToWidth( column.sWidthOrig, tableContainer ); 51014 51015 userInputs = true; 51016 } 51017 } 51018 51019 /* If the number of columns in the DOM equals the number that we have to 51020 * process in DataTables, then we can use the offsets that are created by 51021 * the web- browser. No custom sizes can be set in order for this to happen, 51022 * nor scrolling used 51023 */ 51024 if ( ie67 || ! userInputs && ! scrollX && ! scrollY && 51025 columnCount == _fnVisbleColumns( oSettings ) && 51026 columnCount == headerCells.length 51027 ) { 51028 for ( i=0 ; i<columnCount ; i++ ) { 51029 var colIdx = _fnVisibleToColumnIndex( oSettings, i ); 51030 51031 if ( colIdx !== null ) { 51032 columns[ colIdx ].sWidth = _fnStringToCss( headerCells.eq(i).width() ); 51033 } 51034 } 51035 } 51036 else 51037 { 51038 // Otherwise construct a single row, worst case, table with the widest 51039 // node in the data, assign any user defined widths, then insert it into 51040 // the DOM and allow the browser to do all the hard work of calculating 51041 // table widths 51042 var tmpTable = $(table).clone() // don't use cloneNode - IE8 will remove events on the main table 51043 .css( 'visibility', 'hidden' ) 51044 .removeAttr( 'id' ); 51045 51046 // Clean up the table body 51047 tmpTable.find('tbody tr').remove(); 51048 var tr = $('<tr/>').appendTo( tmpTable.find('tbody') ); 51049 51050 // Clone the table header and footer - we can't use the header / footer 51051 // from the cloned table, since if scrolling is active, the table's 51052 // real header and footer are contained in different table tags 51053 tmpTable.find('thead, tfoot').remove(); 51054 tmpTable 51055 .append( $(oSettings.nTHead).clone() ) 51056 .append( $(oSettings.nTFoot).clone() ); 51057 51058 // Remove any assigned widths from the footer (from scrolling) 51059 tmpTable.find('tfoot th, tfoot td').css('width', ''); 51060 51061 // Apply custom sizing to the cloned header 51062 headerCells = _fnGetUniqueThs( oSettings, tmpTable.find('thead')[0] ); 51063 51064 for ( i=0 ; i<visibleColumns.length ; i++ ) { 51065 column = columns[ visibleColumns[i] ]; 51066 51067 headerCells[i].style.width = column.sWidthOrig !== null && column.sWidthOrig !== '' ? 51068 _fnStringToCss( column.sWidthOrig ) : 51069 ''; 51070 51071 // For scrollX we need to force the column width otherwise the 51072 // browser will collapse it. If this width is smaller than the 51073 // width the column requires, then it will have no effect 51074 if ( column.sWidthOrig && scrollX ) { 51075 $( headerCells[i] ).append( $('<div/>').css( { 51076 width: column.sWidthOrig, 51077 margin: 0, 51078 padding: 0, 51079 border: 0, 51080 height: 1 51081 } ) ); 51082 } 51083 } 51084 51085 // Find the widest cell for each column and put it into the table 51086 if ( oSettings.aoData.length ) { 51087 for ( i=0 ; i<visibleColumns.length ; i++ ) { 51088 columnIdx = visibleColumns[i]; 51089 column = columns[ columnIdx ]; 51090 51091 $( _fnGetWidestNode( oSettings, columnIdx ) ) 51092 .clone( false ) 51093 .append( column.sContentPadding ) 51094 .appendTo( tr ); 51095 } 51096 } 51097 51098 // Tidy the temporary table - remove name attributes so there aren't 51099 // duplicated in the dom (radio elements for example) 51100 $('[name]', tmpTable).removeAttr('name'); 51101 51102 // Table has been built, attach to the document so we can work with it. 51103 // A holding element is used, positioned at the top of the container 51104 // with minimal height, so it has no effect on if the container scrolls 51105 // or not. Otherwise it might trigger scrolling when it actually isn't 51106 // needed 51107 var holder = $('<div/>').css( scrollX || scrollY ? 51108 { 51109 position: 'absolute', 51110 top: 0, 51111 left: 0, 51112 height: 1, 51113 right: 0, 51114 overflow: 'hidden' 51115 } : 51116 {} 51117 ) 51118 .append( tmpTable ) 51119 .appendTo( tableContainer ); 51120 51121 // When scrolling (X or Y) we want to set the width of the table as 51122 // appropriate. However, when not scrolling leave the table width as it 51123 // is. This results in slightly different, but I think correct behaviour 51124 if ( scrollX && scrollXInner ) { 51125 tmpTable.width( scrollXInner ); 51126 } 51127 else if ( scrollX ) { 51128 tmpTable.css( 'width', 'auto' ); 51129 tmpTable.removeAttr('width'); 51130 51131 // If there is no width attribute or style, then allow the table to 51132 // collapse 51133 if ( tmpTable.width() < tableContainer.clientWidth && tableWidthAttr ) { 51134 tmpTable.width( tableContainer.clientWidth ); 51135 } 51136 } 51137 else if ( scrollY ) { 51138 tmpTable.width( tableContainer.clientWidth ); 51139 } 51140 else if ( tableWidthAttr ) { 51141 tmpTable.width( tableWidthAttr ); 51142 } 51143 51144 // Get the width of each column in the constructed table - we need to 51145 // know the inner width (so it can be assigned to the other table's 51146 // cells) and the outer width so we can calculate the full width of the 51147 // table. This is safe since DataTables requires a unique cell for each 51148 // column, but if ever a header can span multiple columns, this will 51149 // need to be modified. 51150 var total = 0; 51151 for ( i=0 ; i<visibleColumns.length ; i++ ) { 51152 var cell = $(headerCells[i]); 51153 var border = cell.outerWidth() - cell.width(); 51154 51155 // Use getBounding... where possible (not IE8-) because it can give 51156 // sub-pixel accuracy, which we then want to round up! 51157 var bounding = browser.bBounding ? 51158 Math.ceil( headerCells[i].getBoundingClientRect().width ) : 51159 cell.outerWidth(); 51160 51161 // Total is tracked to remove any sub-pixel errors as the outerWidth 51162 // of the table might not equal the total given here (IE!). 51163 total += bounding; 51164 51165 // Width for each column to use 51166 columns[ visibleColumns[i] ].sWidth = _fnStringToCss( bounding - border ); 51167 } 51168 51169 table.style.width = _fnStringToCss( total ); 51170 51171 // Finished with the table - ditch it 51172 holder.remove(); 51173 } 51174 51175 // If there is a width attr, we want to attach an event listener which 51176 // allows the table sizing to automatically adjust when the window is 51177 // resized. Use the width attr rather than CSS, since we can't know if the 51178 // CSS is a relative value or absolute - DOM read is always px. 51179 if ( tableWidthAttr ) { 51180 table.style.width = _fnStringToCss( tableWidthAttr ); 51181 } 51182 51183 if ( (tableWidthAttr || scrollX) && ! oSettings._reszEvt ) { 51184 var bindResize = function () { 51185 $(window).
vendor: 57,106 bytes, lines 51185-53131
51185bind('resize.DT-'+oSettings.sInstance, _fnThrottle( function () { 51186 _fnAdjustColumnSizing( oSettings ); 51187 } ) ); 51188 }; 51189 51190 // IE6/7 will crash if we bind a resize event handler on page load. 51191 // To be removed in 1.11 which drops IE6/7 support 51192 if ( ie67 ) { 51193 setTimeout( bindResize, 1000 ); 51194 } 51195 else { 51196 bindResize(); 51197 } 51198 51199 oSettings._reszEvt = true; 51200 } 51201 } 51202 51203 51204 /** 51205 * Throttle the calls to a function. Arguments and context are maintained for 51206 * the throttled function 51207 * @param {function} fn Function to be called 51208 * @param {int} [freq=200] call frequency in mS 51209 * @returns {function} wrapped function 51210 * @memberof DataTable#oApi 51211 */ 51212 function _fnThrottle( fn, freq ) { 51213 var 51214 frequency = freq !== undefined ? freq : 200, 51215 last, 51216 timer; 51217 51218 return function () { 51219 var 51220 that = this, 51221 now = +new Date(), 51222 args = arguments; 51223 51224 if ( last && now < last + frequency ) { 51225 clearTimeout( timer ); 51226 51227 timer = setTimeout( function () { 51228 last = undefined; 51229 fn.apply( that, args ); 51230 }, frequency ); 51231 } 51232 else { 51233 last = now; 51234 fn.apply( that, args ); 51235 } 51236 }; 51237 } 51238 51239 51240 /** 51241 * Convert a CSS unit width to pixels (e.g. 2em) 51242 * @param {string} width width to be converted 51243 * @param {node} parent parent to get the with for (required for relative widths) - optional 51244 * @returns {int} width in pixels 51245 * @memberof DataTable#oApi 51246 */ 51247 function _fnConvertToWidth ( width, parent ) 51248 { 51249 if ( ! width ) { 51250 return 0; 51251 } 51252 51253 var n = $('<div/>') 51254 .css( 'width', _fnStringToCss( width ) ) 51255 .appendTo( parent || document.body ); 51256 51257 var val = n[0].offsetWidth; 51258 n.remove(); 51259 51260 return val; 51261 } 51262 51263 51264 /** 51265 * Get the widest node 51266 * @param {object} settings dataTables settings object 51267 * @param {int} colIdx column of interest 51268 * @returns {node} widest table node 51269 * @memberof DataTable#oApi 51270 */ 51271 function _fnGetWidestNode( settings, colIdx ) 51272 { 51273 var idx = _fnGetMaxLenString( settings, colIdx ); 51274 if ( idx < 0 ) { 51275 return null; 51276 } 51277 51278 var data = settings.aoData[ idx ]; 51279 return ! data.nTr ? // Might not have been created when deferred rendering 51280 $('<td/>').html( _fnGetCellData( settings, idx, colIdx, 'display' ) )[0] : 51281 data.anCells[ colIdx ]; 51282 } 51283 51284 51285 /** 51286 * Get the maximum strlen for each data column 51287 * @param {object} settings dataTables settings object 51288 * @param {int} colIdx column of interest 51289 * @returns {string} max string length for each column 51290 * @memberof DataTable#oApi 51291 */ 51292 function _fnGetMaxLenString( settings, colIdx ) 51293 { 51294 var s, max=-1, maxIdx = -1; 51295 51296 for ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) { 51297 s = _fnGetCellData( settings, i, colIdx, 'display' )+''; 51298 s = s.replace( __re_html_remove, '' ); 51299 s = s.replace( / /g, ' ' ); 51300 51301 if ( s.length > max ) { 51302 max = s.length; 51303 maxIdx = i; 51304 } 51305 } 51306 51307 return maxIdx; 51308 } 51309 51310 51311 /** 51312 * Append a CSS unit (only if required) to a string 51313 * @param {string} value to css-ify 51314 * @returns {string} value with css unit 51315 * @memberof DataTable#oApi 51316 */ 51317 function _fnStringToCss( s ) 51318 { 51319 if ( s === null ) { 51320 return '0px'; 51321 } 51322 51323 if ( typeof s == 'number' ) { 51324 return s < 0 ? 51325 '0px' : 51326 s+'px'; 51327 } 51328 51329 // Check it has a unit character already 51330 return s.match(/\d$/) ? 51331 s+'px' : 51332 s; 51333 } 51334 51335 51336 51337 function _fnSortFlatten ( settings ) 51338 { 51339 var 51340 i, iLen, k, kLen, 51341 aSort = [], 51342 aiOrig = [], 51343 aoColumns = settings.aoColumns, 51344 aDataSort, iCol, sType, srcCol, 51345 fixed = settings.aaSortingFixed, 51346 fixedObj = $.isPlainObject( fixed ), 51347 nestedSort = [], 51348 add = function ( a ) { 51349 if ( a.length && ! $.isArray( a[0] ) ) { 51350 // 1D array 51351 nestedSort.push( a ); 51352 } 51353 else { 51354 // 2D array 51355 $.merge( nestedSort, a ); 51356 } 51357 }; 51358 51359 // Build the sort array, with pre-fix and post-fix options if they have been 51360 // specified 51361 if ( $.isArray( fixed ) ) { 51362 add( fixed ); 51363 } 51364 51365 if ( fixedObj && fixed.pre ) { 51366 add( fixed.pre ); 51367 } 51368 51369 add( settings.aaSorting ); 51370 51371 if (fixedObj && fixed.post ) { 51372 add( fixed.post ); 51373 } 51374 51375 for ( i=0 ; i<nestedSort.length ; i++ ) 51376 { 51377 srcCol = nestedSort[i][0]; 51378 aDataSort = aoColumns[ srcCol ].aDataSort; 51379 51380 for ( k=0, kLen=aDataSort.length ; k<kLen ; k++ ) 51381 { 51382 iCol = aDataSort[k]; 51383 sType = aoColumns[ iCol ].sType || 'string'; 51384 51385 if ( nestedSort[i]._idx === undefined ) { 51386 nestedSort[i]._idx = $.inArray( nestedSort[i][1], aoColumns[iCol].asSorting ); 51387 } 51388 51389 aSort.push( { 51390 src: srcCol, 51391 col: iCol, 51392 dir: nestedSort[i][1], 51393 index: nestedSort[i]._idx, 51394 type: sType, 51395 formatter: DataTable.ext.type.order[ sType+"-pre" ] 51396 } ); 51397 } 51398 } 51399 51400 return aSort; 51401 } 51402 51403 /** 51404 * Change the order of the table 51405 * @param {object} oSettings dataTables settings object 51406 * @memberof DataTable#oApi 51407 * @todo This really needs split up! 51408 */ 51409 function _fnSort ( oSettings ) 51410 { 51411 var 51412 i, ien, iLen, j, jLen, k, kLen, 51413 sDataType, nTh, 51414 aiOrig = [], 51415 oExtSort = DataTable.ext.type.order, 51416 aoData = oSettings.aoData, 51417 aoColumns = oSettings.aoColumns, 51418 aDataSort, data, iCol, sType, oSort, 51419 formatters = 0, 51420 sortCol, 51421 displayMaster = oSettings.aiDisplayMaster, 51422 aSort; 51423 51424 // Resolve any column types that are unknown due to addition or invalidation 51425 // @todo Can this be moved into a 'data-ready' handler which is called when 51426 // data is going to be used in the table? 51427 _fnColumnTypes( oSettings ); 51428 51429 aSort = _fnSortFlatten( oSettings ); 51430 51431 for ( i=0, ien=aSort.length ; i<ien ; i++ ) { 51432 sortCol = aSort[i]; 51433 51434 // Track if we can use the fast sort algorithm 51435 if ( sortCol.formatter ) { 51436 formatters++; 51437 } 51438 51439 // Load the data needed for the sort, for each cell 51440 _fnSortData( oSettings, sortCol.col ); 51441 } 51442 51443 /* No sorting required if server-side or no sorting array */ 51444 if ( _fnDataSource( oSettings ) != 'ssp' && aSort.length !== 0 ) 51445 { 51446 // Create a value - key array of the current row positions such that we can use their 51447 // current position during the sort, if values match, in order to perform stable sorting 51448 for ( i=0, iLen=displayMaster.length ; i<iLen ; i++ ) { 51449 aiOrig[ displayMaster[i] ] = i; 51450 } 51451 51452 /* Do the sort - here we want multi-column sorting based on a given data source (column) 51453 * and sorting function (from oSort) in a certain direction. It's reasonably complex to 51454 * follow on it's own, but this is what we want (example two column sorting): 51455 * fnLocalSorting = function(a,b){ 51456 * var iTest; 51457 * iTest = oSort['string-asc']('data11', 'data12'); 51458 * if (iTest !== 0) 51459 * return iTest; 51460 * iTest = oSort['numeric-desc']('data21', 'data22'); 51461 * if (iTest !== 0) 51462 * return iTest; 51463 * return oSort['numeric-asc']( aiOrig[a], aiOrig[b] ); 51464 * } 51465 * Basically we have a test for each sorting column, if the data in that column is equal, 51466 * test the next column. If all columns match, then we use a numeric sort on the row 51467 * positions in the original data array to provide a stable sort. 51468 * 51469 * Note - I know it seems excessive to have two sorting methods, but the first is around 51470 * 15% faster, so the second is only maintained for backwards compatibility with sorting 51471 * methods which do not have a pre-sort formatting function. 51472 */ 51473 if ( formatters === aSort.length ) { 51474 // All sort types have formatting functions 51475 displayMaster.sort( function ( a, b ) { 51476 var 51477 x, y, k, test, sort, 51478 len=aSort.length, 51479 dataA = aoData[a]._aSortData, 51480 dataB = aoData[b]._aSortData; 51481 51482 for ( k=0 ; k<len ; k++ ) { 51483 sort = aSort[k]; 51484 51485 x = dataA[ sort.col ]; 51486 y = dataB[ sort.col ]; 51487 51488 test = x<y ? -1 : x>y ? 1 : 0; 51489 if ( test !== 0 ) { 51490 return sort.dir === 'asc' ? test : -test; 51491 } 51492 } 51493 51494 x = aiOrig[a]; 51495 y = aiOrig[b]; 51496 return x<y ? -1 : x>y ? 1 : 0; 51497 } ); 51498 } 51499 else { 51500 // Depreciated - remove in 1.11 (providing a plug-in option) 51501 // Not all sort types have formatting methods, so we have to call their sorting 51502 // methods. 51503 displayMaster.sort( function ( a, b ) { 51504 var 51505 x, y, k, l, test, sort, fn, 51506 len=aSort.length, 51507 dataA = aoData[a]._aSortData, 51508 dataB = aoData[b]._aSortData; 51509 51510 for ( k=0 ; k<len ; k++ ) { 51511 sort = aSort[k]; 51512 51513 x = dataA[ sort.col ]; 51514 y = dataB[ sort.col ]; 51515 51516 fn = oExtSort[ sort.type+"-"+sort.dir ] || oExtSort[ "string-"+sort.dir ]; 51517 test = fn( x, y ); 51518 if ( test !== 0 ) { 51519 return test; 51520 } 51521 } 51522 51523 x = aiOrig[a]; 51524 y = aiOrig[b]; 51525 return x<y ? -1 : x>y ? 1 : 0; 51526 } ); 51527 } 51528 } 51529 51530 /* Tell the draw function that we have sorted the data */ 51531 oSettings.bSorted = true; 51532 } 51533 51534 51535 function _fnSortAria ( settings ) 51536 { 51537 var label; 51538 var nextSort; 51539 var columns = settings.aoColumns; 51540 var aSort = _fnSortFlatten( settings ); 51541 var oAria = settings.oLanguage.oAria; 51542 51543 // ARIA attributes - need to loop all columns, to update all (removing old 51544 // attributes as needed) 51545 for ( var i=0, iLen=columns.length ; i<iLen ; i++ ) 51546 { 51547 var col = columns[i]; 51548 var asSorting = col.asSorting; 51549 var sTitle = col.sTitle.replace( /<.*?>/g, "" ); 51550 var th = col.nTh; 51551 51552 // IE7 is throwing an error when setting these properties with jQuery's 51553 // attr() and removeAttr() methods... 51554 th.removeAttribute('aria-sort'); 51555 51556 /* In ARIA only the first sorting column can be marked as sorting - no multi-sort option */ 51557 if ( col.bSortable ) { 51558 if ( aSort.length > 0 && aSort[0].col == i ) { 51559 th.setAttribute('aria-sort', aSort[0].dir=="asc" ? "ascending" : "descending" ); 51560 nextSort = asSorting[ aSort[0].index+1 ] || asSorting[0]; 51561 } 51562 else { 51563 nextSort = asSorting[0]; 51564 } 51565 51566 label = sTitle + ( nextSort === "asc" ? 51567 oAria.sSortAscending : 51568 oAria.sSortDescending 51569 ); 51570 } 51571 else { 51572 label = sTitle; 51573 } 51574 51575 th.setAttribute('aria-label', label); 51576 } 51577 } 51578 51579 51580 /** 51581 * Function to run on user sort request 51582 * @param {object} settings dataTables settings object 51583 * @param {node} attachTo node to attach the handler to 51584 * @param {int} colIdx column sorting index 51585 * @param {boolean} [append=false] Append the requested sort to the existing 51586 * sort if true (i.e. multi-column sort) 51587 * @param {function} [callback] callback function 51588 * @memberof DataTable#oApi 51589 */ 51590 function _fnSortListener ( settings, colIdx, append, callback ) 51591 { 51592 var col = settings.aoColumns[ colIdx ]; 51593 var sorting = settings.aaSorting; 51594 var asSorting = col.asSorting; 51595 var nextSortIdx; 51596 var next = function ( a, overflow ) { 51597 var idx = a._idx; 51598 if ( idx === undefined ) { 51599 idx = $.inArray( a[1], asSorting ); 51600 } 51601 51602 return idx+1 < asSorting.length ? 51603 idx+1 : 51604 overflow ? 51605 null : 51606 0; 51607 }; 51608 51609 // Convert to 2D array if needed 51610 if ( typeof sorting[0] === 'number' ) { 51611 sorting = settings.aaSorting = [ sorting ]; 51612 } 51613 51614 // If appending the sort then we are multi-column sorting 51615 if ( append && settings.oFeatures.bSortMulti ) { 51616 // Are we already doing some kind of sort on this column? 51617 var sortIdx = $.inArray( colIdx, _pluck(sorting, '0') ); 51618 51619 if ( sortIdx !== -1 ) { 51620 // Yes, modify the sort 51621 nextSortIdx = next( sorting[sortIdx], true ); 51622 51623 if ( nextSortIdx === null && sorting.length === 1 ) { 51624 nextSortIdx = 0; // can't remove sorting completely 51625 } 51626 51627 if ( nextSortIdx === null ) { 51628 sorting.splice( sortIdx, 1 ); 51629 } 51630 else { 51631 sorting[sortIdx][1] = asSorting[ nextSortIdx ]; 51632 sorting[sortIdx]._idx = nextSortIdx; 51633 } 51634 } 51635 else { 51636 // No sort on this column yet 51637 sorting.push( [ colIdx, asSorting[0], 0 ] ); 51638 sorting[sorting.length-1]._idx = 0; 51639 } 51640 } 51641 else if ( sorting.length && sorting[0][0] == colIdx ) { 51642 // Single column - already sorting on this column, modify the sort 51643 nextSortIdx = next( sorting[0] ); 51644 51645 sorting.length = 1; 51646 sorting[0][1] = asSorting[ nextSortIdx ]; 51647 sorting[0]._idx = nextSortIdx; 51648 } 51649 else { 51650 // Single column - sort only on this column 51651 sorting.length = 0; 51652 sorting.push( [ colIdx, asSorting[0] ] ); 51653 sorting[0]._idx = 0; 51654 } 51655 51656 // Run the sort by calling a full redraw 51657 _fnReDraw( settings ); 51658 51659 // callback used for async user interaction 51660 if ( typeof callback == 'function' ) { 51661 callback( settings ); 51662 } 51663 } 51664 51665 51666 /** 51667 * Attach a sort handler (click) to a node 51668 * @param {object} settings dataTables settings object 51669 * @param {node} attachTo node to attach the handler to 51670 * @param {int} colIdx column sorting index 51671 * @param {function} [callback] callback function 51672 * @memberof DataTable#oApi 51673 */ 51674 function _fnSortAttachListener ( settings, attachTo, colIdx, callback ) 51675 { 51676 var col = settings.aoColumns[ colIdx ]; 51677 51678 _fnBindAction( attachTo, {}, function (e) { 51679 /* If the column is not sortable - don't to anything */ 51680 if ( col.bSortable === false ) { 51681 return; 51682 } 51683 51684 // If processing is enabled use a timeout to allow the processing 51685 // display to be shown - otherwise to it synchronously 51686 if ( settings.oFeatures.bProcessing ) { 51687 _fnProcessingDisplay( settings, true ); 51688 51689 setTimeout( function() { 51690 _fnSortListener( settings, colIdx, e.shiftKey, callback ); 51691 51692 // In server-side processing, the draw callback will remove the 51693 // processing display 51694 if ( _fnDataSource( settings ) !== 'ssp' ) { 51695 _fnProcessingDisplay( settings, false ); 51696 } 51697 }, 0 ); 51698 } 51699 else { 51700 _fnSortListener( settings, colIdx, e.shiftKey, callback ); 51701 } 51702 } ); 51703 } 51704 51705 51706 /** 51707 * Set the sorting classes on table's body, Note: it is safe to call this function 51708 * when bSort and bSortClasses are false 51709 * @param {object} oSettings dataTables settings object 51710 * @memberof DataTable#oApi 51711 */ 51712 function _fnSortingClasses( settings ) 51713 { 51714 var oldSort = settings.aLastSort; 51715 var sortClass = settings.oClasses.sSortColumn; 51716 var sort = _fnSortFlatten( settings ); 51717 var features = settings.oFeatures; 51718 var i, ien, colIdx; 51719 51720 if ( features.bSort && features.bSortClasses ) { 51721 // Remove old sorting classes 51722 for ( i=0, ien=oldSort.length ; i<ien ; i++ ) { 51723 colIdx = oldSort[i].src; 51724 51725 // Remove column sorting 51726 $( _pluck( settings.aoData, 'anCells', colIdx ) ) 51727 .removeClass( sortClass + (i<2 ? i+1 : 3) ); 51728 } 51729 51730 // Add new column sorting 51731 for ( i=0, ien=sort.length ; i<ien ; i++ ) { 51732 colIdx = sort[i].src; 51733 51734 $( _pluck( settings.aoData, 'anCells', colIdx ) ) 51735 .addClass( sortClass + (i<2 ? i+1 : 3) ); 51736 } 51737 } 51738 51739 settings.aLastSort = sort; 51740 } 51741 51742 51743 // Get the data to sort a column, be it from cache, fresh (populating the 51744 // cache), or from a sort formatter 51745 function _fnSortData( settings, idx ) 51746 { 51747 // Custom sorting function - provided by the sort data type 51748 var column = settings.aoColumns[ idx ]; 51749 var customSort = DataTable.ext.order[ column.sSortDataType ]; 51750 var customData; 51751 51752 if ( customSort ) { 51753 customData = customSort.call( settings.oInstance, settings, idx, 51754 _fnColumnIndexToVisible( settings, idx ) 51755 ); 51756 } 51757 51758 // Use / populate cache 51759 var row, cellData; 51760 var formatter = DataTable.ext.type.order[ column.sType+"-pre" ]; 51761 51762 for ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) { 51763 row = settings.aoData[i]; 51764 51765 if ( ! row._aSortData ) { 51766 row._aSortData = []; 51767 } 51768 51769 if ( ! row._aSortData[idx] || customSort ) { 51770 cellData = customSort ? 51771 customData[i] : // If there was a custom sort function, use data from there 51772 _fnGetCellData( settings, i, idx, 'sort' ); 51773 51774 row._aSortData[ idx ] = formatter ? 51775 formatter( cellData ) : 51776 cellData; 51777 } 51778 } 51779 } 51780 51781 51782 51783 /** 51784 * Save the state of a table 51785 * @param {object} oSettings dataTables settings object 51786 * @memberof DataTable#oApi 51787 */ 51788 function _fnSaveState ( settings ) 51789 { 51790 if ( !settings.oFeatures.bStateSave || settings.bDestroying ) 51791 { 51792 return; 51793 } 51794 51795 /* Store the interesting variables */ 51796 var state = { 51797 time: +new Date(), 51798 start: settings._iDisplayStart, 51799 length: settings._iDisplayLength, 51800 order: $.extend( true, [], settings.aaSorting ), 51801 search: _fnSearchToCamel( settings.oPreviousSearch ), 51802 columns: $.map( settings.aoColumns, function ( col, i ) { 51803 return { 51804 visible: col.bVisible, 51805 search: _fnSearchToCamel( settings.aoPreSearchCols[i] ) 51806 }; 51807 } ) 51808 }; 51809 51810 _fnCallbackFire( settings, "aoStateSaveParams", 'stateSaveParams', [settings, state] ); 51811 51812 settings.oSavedState = state; 51813 settings.fnStateSaveCallback.call( settings.oInstance, settings, state ); 51814 } 51815 51816 51817 /** 51818 * Attempt to load a saved table state 51819 * @param {object} oSettings dataTables settings object 51820 * @param {object} oInit DataTables init object so we can override settings 51821 * @memberof DataTable#oApi 51822 */ 51823 function _fnLoadState ( settings, oInit ) 51824 { 51825 var i, ien; 51826 var columns = settings.aoColumns; 51827 51828 if ( ! settings.oFeatures.bStateSave ) { 51829 return; 51830 } 51831 51832 var state = settings.fnStateLoadCallback.call( settings.oInstance, settings ); 51833 if ( ! state || ! state.time ) { 51834 return; 51835 } 51836 51837 /* Allow custom and plug-in manipulation functions to alter the saved data set and 51838 * cancelling of loading by returning false 51839 */ 51840 var abStateLoad = _fnCallbackFire( settings, 'aoStateLoadParams', 'stateLoadParams', [settings, state] ); 51841 if ( $.inArray( false, abStateLoad ) !== -1 ) { 51842 return; 51843 } 51844 51845 /* Reject old data */ 51846 var duration = settings.iStateDuration; 51847 if ( duration > 0 && state.time < +new Date() - (duration*1000) ) { 51848 return; 51849 } 51850 51851 // Number of columns have changed - all bets are off, no restore of settings 51852 if ( columns.length !== state.columns.length ) { 51853 return; 51854 } 51855 51856 // Store the saved state so it might be accessed at any time 51857 settings.oLoadedState = $.extend( true, {}, state ); 51858 51859 // Restore key features - todo - for 1.11 this needs to be done by 51860 // subscribed events 51861 if ( state.start !== undefined ) { 51862 settings._iDisplayStart = state.start; 51863 settings.iInitDisplayStart = state.start; 51864 } 51865 if ( state.length !== undefined ) { 51866 settings._iDisplayLength = state.length; 51867 } 51868 51869 // Order 51870 if ( state.order !== undefined ) { 51871 settings.aaSorting = []; 51872 $.each( state.order, function ( i, col ) { 51873 settings.aaSorting.push( col[0] >= columns.length ? 51874 [ 0, col[1] ] : 51875 col 51876 ); 51877 } ); 51878 } 51879 51880 // Search 51881 if ( state.search !== undefined ) { 51882 $.extend( settings.oPreviousSearch, _fnSearchToHung( state.search ) ); 51883 } 51884 51885 // Columns 51886 for ( i=0, ien=state.columns.length ; i<ien ; i++ ) { 51887 var col = state.columns[i]; 51888 51889 // Visibility 51890 if ( col.visible !== undefined ) { 51891 columns[i].bVisible = col.visible; 51892 } 51893 51894 // Search 51895 if ( col.search !== undefined ) { 51896 $.extend( settings.aoPreSearchCols[i], _fnSearchToHung( col.search ) ); 51897 } 51898 } 51899 51900 _fnCallbackFire( settings, 'aoStateLoaded', 'stateLoaded', [settings, state] ); 51901 } 51902 51903 51904 /** 51905 * Return the settings object for a particular table 51906 * @param {node} table table we are using as a dataTable 51907 * @returns {object} Settings object - or null if not found 51908 * @memberof DataTable#oApi 51909 */ 51910 function _fnSettingsFromNode ( table ) 51911 { 51912 var settings = DataTable.settings; 51913 var idx = $.inArray( table, _pluck( settings, 'nTable' ) ); 51914 51915 return idx !== -1 ? 51916 settings[ idx ] : 51917 null; 51918 } 51919 51920 51921 /** 51922 * Log an error message 51923 * @param {object} settings dataTables settings object 51924 * @param {int} level log error messages, or display them to the user 51925 * @param {string} msg error message 51926 * @param {int} tn Technical note id to get more information about the error. 51927 * @memberof DataTable#oApi 51928 */ 51929 function _fnLog( settings, level, msg, tn ) 51930 { 51931 msg = 'DataTables warning: '+ 51932 (settings ? 'table id='+settings.sTableId+' - ' : '')+msg; 51933 51934 if ( tn ) { 51935 msg += '. For more information about this error, please see '+ 51936 'http://datatables.net/tn/'+tn; 51937 } 51938 51939 if ( ! level ) { 51940 // Backwards compatibility pre 1.10 51941 var ext = DataTable.ext; 51942 var type = ext.sErrMode || ext.errMode; 51943 51944 if ( settings ) { 51945 _fnCallbackFire( settings, null, 'error', [ settings, tn, msg ] ); 51946 } 51947 51948 if ( type == 'alert' ) { 51949 alert( msg ); 51950 } 51951 else if ( type == 'throw' ) { 51952 throw new Error(msg); 51953 } 51954 else if ( typeof type == 'function' ) { 51955 type( settings, tn, msg ); 51956 } 51957 } 51958 else if ( window.console && console.log ) { 51959 console.log( msg ); 51960 } 51961 } 51962 51963 51964 /** 51965 * See if a property is defined on one object, if so assign it to the other object 51966 * @param {object} ret target object 51967 * @param {object} src source object 51968 * @param {string} name property 51969 * @param {string} [mappedName] name to map too - optional, name used if not given 51970 * @memberof DataTable#oApi 51971 */ 51972 function _fnMap( ret, src, name, mappedName ) 51973 { 51974 if ( $.isArray( name ) ) { 51975 $.each( name, function (i, val) { 51976 if ( $.isArray( val ) ) { 51977 _fnMap( ret, src, val[0], val[1] ); 51978 } 51979 else { 51980 _fnMap( ret, src, val ); 51981 } 51982 } ); 51983 51984 return; 51985 } 51986 51987 if ( mappedName === undefined ) { 51988 mappedName = name; 51989 } 51990 51991 if ( src[name] !== undefined ) { 51992 ret[mappedName] = src[name]; 51993 } 51994 } 51995 51996 51997 /** 51998 * Extend objects - very similar to jQuery.extend, but deep copy objects, and 51999 * shallow copy arrays. The reason we need to do this, is that we don't want to 52000 * deep copy array init values (such as aaSorting) since the dev wouldn't be 52001 * able to override them, but we do want to deep copy arrays. 52002 * @param {object} out Object to extend 52003 * @param {object} extender Object from which the properties will be applied to 52004 * out 52005 * @param {boolean} breakRefs If true, then arrays will be sliced to take an 52006 * independent copy with the exception of the `data` or `aaData` parameters 52007 * if they are present. This is so you can pass in a collection to 52008 * DataTables and have that used as your data source without breaking the 52009 * references 52010 * @returns {object} out Reference, just for convenience - out === the return. 52011 * @memberof DataTable#oApi 52012 * @todo This doesn't take account of arrays inside the deep copied objects. 52013 */ 52014 function _fnExtend( out, extender, breakRefs ) 52015 { 52016 var val; 52017 52018 for ( var prop in extender ) { 52019 if ( extender.hasOwnProperty(prop) ) { 52020 val = extender[prop]; 52021 52022 if ( $.isPlainObject( val ) ) { 52023 if ( ! $.isPlainObject( out[prop] ) ) { 52024 out[prop] = {}; 52025 } 52026 $.extend( true, out[prop], val ); 52027 } 52028 else if ( breakRefs && prop !== 'data' && prop !== 'aaData' && $.isArray(val) ) { 52029 out[prop] = val.slice(); 52030 } 52031 else { 52032 out[prop] = val; 52033 } 52034 } 52035 } 52036 52037 return out; 52038 } 52039 52040 52041 /** 52042 * Bind an event handers to allow a click or return key to activate the callback. 52043 * This is good for accessibility since a return on the keyboard will have the 52044 * same effect as a click, if the element has focus. 52045 * @param {element} n Element to bind the action to 52046 * @param {object} oData Data object to pass to the triggered function 52047 * @param {function} fn Callback function for when the event is triggered 52048 * @memberof DataTable#oApi 52049 */ 52050 function _fnBindAction( n, oData, fn ) 52051 { 52052 $(n) 52053 .bind( 'click.DT', oData, function (e) { 52054 n.blur(); // Remove focus outline for mouse users 52055 fn(e); 52056 } ) 52057 .bind( 'keypress.DT', oData, function (e){ 52058 if ( e.which === 13 ) { 52059 e.preventDefault(); 52060 fn(e); 52061 } 52062 } ) 52063 .bind( 'selectstart.DT', function () { 52064 /* Take the brutal approach to cancelling text selection */ 52065 return false; 52066 } ); 52067 } 52068 52069 52070 /** 52071 * Register a callback function. Easily allows a callback function to be added to 52072 * an array store of callback functions that can then all be called together. 52073 * @param {object} oSettings dataTables settings object 52074 * @param {string} sStore Name of the array storage for the callbacks in oSettings 52075 * @param {function} fn Function to be called back 52076 * @param {string} sName Identifying name for the callback (i.e. a label) 52077 * @memberof DataTable#oApi 52078 */ 52079 function _fnCallbackReg( oSettings, sStore, fn, sName ) 52080 { 52081 if ( fn ) 52082 { 52083 oSettings[sStore].push( { 52084 "fn": fn, 52085 "sName": sName 52086 } ); 52087 } 52088 } 52089 52090 52091 /** 52092 * Fire callback functions and trigger events. Note that the loop over the 52093 * callback array store is done backwards! Further note that you do not want to 52094 * fire off triggers in time sensitive applications (for example cell creation) 52095 * as its slow. 52096 * @param {object} settings dataTables settings object 52097 * @param {string} callbackArr Name of the array storage for the callbacks in 52098 * oSettings 52099 * @param {string} eventName Name of the jQuery custom event to trigger. If 52100 * null no trigger is fired 52101 * @param {array} args Array of arguments to pass to the callback function / 52102 * trigger 52103 * @memberof DataTable#oApi 52104 */ 52105 function _fnCallbackFire( settings, callbackArr, eventName, args ) 52106 { 52107 var ret = []; 52108 52109 if ( callbackArr ) { 52110 ret = $.map( settings[callbackArr].slice().reverse(), function (val, i) { 52111 return val.fn.apply( settings.oInstance, args ); 52112 } ); 52113 } 52114 52115 if ( eventName !== null ) { 52116 var e = $.Event( eventName+'.dt' ); 52117 52118 $(settings.nTable).trigger( e, args ); 52119 52120 ret.push( e.result ); 52121 } 52122 52123 return ret; 52124 } 52125 52126 52127 function _fnLengthOverflow ( settings ) 52128 { 52129 var 52130 start = settings._iDisplayStart, 52131 end = settings.fnDisplayEnd(), 52132 len = settings._iDisplayLength; 52133 52134 /* If we have space to show extra rows (backing up from the end point - then do so */ 52135 if ( start >= end ) 52136 { 52137 start = end - len; 52138 } 52139 52140 // Keep the start record on the current page 52141 start -= (start % len); 52142 52143 if ( len === -1 || start < 0 ) 52144 { 52145 start = 0; 52146 } 52147 52148 settings._iDisplayStart = start; 52149 } 52150 52151 52152 function _fnRenderer( settings, type ) 52153 { 52154 var renderer = settings.renderer; 52155 var host = DataTable.ext.renderer[type]; 52156 52157 if ( $.isPlainObject( renderer ) && renderer[type] ) { 52158 // Specific renderer for this type. If available use it, otherwise use 52159 // the default. 52160 return host[renderer[type]] || host._; 52161 } 52162 else if ( typeof renderer === 'string' ) { 52163 // Common renderer - if there is one available for this type use it, 52164 // otherwise use the default 52165 return host[renderer] || host._; 52166 } 52167 52168 // Use the default 52169 return host._; 52170 } 52171 52172 52173 /** 52174 * Detect the data source being used for the table. Used to simplify the code 52175 * a little (ajax) and to make it compress a little smaller. 52176 * 52177 * @param {object} settings dataTables settings object 52178 * @returns {string} Data source 52179 * @memberof DataTable#oApi 52180 */ 52181 function _fnDataSource ( settings ) 52182 { 52183 if ( settings.oFeatures.bServerSide ) { 52184 return 'ssp'; 52185 } 52186 else if ( settings.ajax || settings.sAjaxSource ) { 52187 return 'ajax'; 52188 } 52189 return 'dom'; 52190 } 52191 52192 52193 DataTable = function( options ) 52194 { 52195 /** 52196 * Perform a jQuery selector action on the table's TR elements (from the tbody) and 52197 * return the resulting jQuery object. 52198 * @param {string|node|jQuery} sSelector jQuery selector or node collection to act on 52199 * @param {object} [oOpts] Optional parameters for modifying the rows to be included 52200 * @param {string} [oOpts.filter=none] Select TR elements that meet the current filter 52201 * criterion ("applied") or all TR elements (i.e. no filter). 52202 * @param {string} [oOpts.order=current] Order of the TR elements in the processed array. 52203 * Can be either 'current', whereby the current sorting of the table is used, or 52204 * 'original' whereby the original order the data was read into the table is used. 52205 * @param {string} [oOpts.page=all] Limit the selection to the currently displayed page 52206 * ("current") or not ("all"). If 'current' is given, then order is assumed to be 52207 * 'current' and filter is 'applied', regardless of what they might be given as. 52208 * @returns {object} jQuery object, filtered by the given selector. 52209 * @dtopt API 52210 * @deprecated Since v1.10 52211 * 52212 * @example 52213 * $(document).ready(function() { 52214 * var oTable = $('#example').dataTable(); 52215 * 52216 * // Highlight every second row 52217 * oTable.$('tr:odd').css('backgroundColor', 'blue'); 52218 * } ); 52219 * 52220 * @example 52221 * $(document).ready(function() { 52222 * var oTable = $('#example').dataTable(); 52223 * 52224 * // Filter to rows with 'Webkit' in them, add a background colour and then 52225 * // remove the filter, thus highlighting the 'Webkit' rows only. 52226 * oTable.fnFilter('Webkit'); 52227 * oTable.$('tr', {"search": "applied"}).css('backgroundColor', 'blue'); 52228 * oTable.fnFilter(''); 52229 * } ); 52230 */ 52231 this.$ = function ( sSelector, oOpts ) 52232 { 52233 return this.api(true).$( sSelector, oOpts ); 52234 }; 52235 52236 52237 /** 52238 * Almost identical to $ in operation, but in this case returns the data for the matched 52239 * rows - as such, the jQuery selector used should match TR row nodes or TD/TH cell nodes 52240 * rather than any descendants, so the data can be obtained for the row/cell. If matching 52241 * rows are found, the data returned is the original data array/object that was used to 52242 * create the row (or a generated array if from a DOM source). 52243 * 52244 * This method is often useful in-combination with $ where both functions are given the 52245 * same parameters and the array indexes will match identically. 52246 * @param {string|node|jQuery} sSelector jQuery selector or node collection to act on 52247 * @param {object} [oOpts] Optional parameters for modifying the rows to be included 52248 * @param {string} [oOpts.filter=none] Select elements that meet the current filter 52249 * criterion ("applied") or all elements (i.e. no filter). 52250 * @param {string} [oOpts.order=current] Order of the data in the processed array. 52251 * Can be either 'current', whereby the current sorting of the table is used, or 52252 * 'original' whereby the original order the data was read into the table is used. 52253 * @param {string} [oOpts.page=all] Limit the selection to the currently displayed page 52254 * ("current") or not ("all"). If 'current' is given, then order is assumed to be 52255 * 'current' and filter is 'applied', regardless of what they might be given as. 52256 * @returns {array} Data for the matched elements. If any elements, as a result of the 52257 * selector, were not TR, TD or TH elements in the DataTable, they will have a null 52258 * entry in the array. 52259 * @dtopt API 52260 * @deprecated Since v1.10 52261 * 52262 * @example 52263 * $(document).ready(function() { 52264 * var oTable = $('#example').dataTable(); 52265 * 52266 * // Get the data from the first row in the table 52267 * var data = oTable._('tr:first'); 52268 * 52269 * // Do something useful with the data 52270 * alert( "First cell is: "+data[0] ); 52271 * } ); 52272 * 52273 * @example 52274 * $(document).ready(function() { 52275 * var oTable = $('#example').dataTable(); 52276 * 52277 * // Filter to 'Webkit' and get all data for 52278 * oTable.fnFilter('Webkit'); 52279 * var data = oTable._('tr', {"search": "applied"}); 52280 * 52281 * // Do something with the data 52282 * alert( data.length+" rows matched the search" ); 52283 * } ); 52284 */ 52285 this._ = function ( sSelector, oOpts ) 52286 { 52287 return this.api(true).rows( sSelector, oOpts ).data(); 52288 }; 52289 52290 52291 /** 52292 * Create a DataTables Api instance, with the currently selected tables for 52293 * the Api's context. 52294 * @param {boolean} [traditional=false] Set the API instance's context to be 52295 * only the table referred to by the `DataTable.ext.iApiIndex` option, as was 52296 * used in the API presented by DataTables 1.9- (i.e. the traditional mode), 52297 * or if all tables captured in the jQuery object should be used. 52298 * @return {DataTables.Api} 52299 */ 52300 this.api = function ( traditional ) 52301 { 52302 return traditional ? 52303 new _Api( 52304 _fnSettingsFromNode( this[ _ext.iApiIndex ] ) 52305 ) : 52306 new _Api( this ); 52307 }; 52308 52309 52310 /** 52311 * Add a single new row or multiple rows of data to the table. Please note 52312 * that this is suitable for client-side processing only - if you are using 52313 * server-side processing (i.e. "bServerSide": true), then to add data, you 52314 * must add it to the data source, i.e. the server-side, through an Ajax call. 52315 * @param {array|object} data The data to be added to the table. This can be: 52316 * <ul> 52317 * <li>1D array of data - add a single row with the data provided</li> 52318 * <li>2D array of arrays - add multiple rows in a single call</li> 52319 * <li>object - data object when using <i>mData</i></li> 52320 * <li>array of objects - multiple data objects when using <i>mData</i></li> 52321 * </ul> 52322 * @param {bool} [redraw=true] redraw the table or not 52323 * @returns {array} An array of integers, representing the list of indexes in 52324 * <i>aoData</i> ({@link DataTable.models.oSettings}) that have been added to 52325 * the table. 52326 * @dtopt API 52327 * @deprecated Since v1.10 52328 * 52329 * @example 52330 * // Global var for counter 52331 * var giCount = 2; 52332 * 52333 * $(document).ready(function() { 52334 * $('#example').dataTable(); 52335 * } ); 52336 * 52337 * function fnClickAddRow() { 52338 * $('#example').dataTable().fnAddData( [ 52339 * giCount+".1", 52340 * giCount+".2", 52341 * giCount+".3", 52342 * giCount+".4" ] 52343 * ); 52344 * 52345 * giCount++; 52346 * } 52347 */ 52348 this.fnAddData = function( data, redraw ) 52349 { 52350 var api = this.api( true ); 52351 52352 /* Check if we want to add multiple rows or not */ 52353 var rows = $.isArray(data) && ( $.isArray(data[0]) || $.isPlainObject(data[0]) ) ? 52354 api.rows.add( data ) : 52355 api.row.add( data ); 52356 52357 if ( redraw === undefined || redraw ) { 52358 api.draw(); 52359 } 52360 52361 return rows.flatten().toArray(); 52362 }; 52363 52364 52365 /** 52366 * This function will make DataTables recalculate the column sizes, based on the data 52367 * contained in the table and the sizes applied to the columns (in the DOM, CSS or 52368 * through the sWidth parameter). This can be useful when the width of the table's 52369 * parent element changes (for example a window resize). 52370 * @param {boolean} [bRedraw=true] Redraw the table or not, you will typically want to 52371 * @dtopt API 52372 * @deprecated Since v1.10 52373 * 52374 * @example 52375 * $(document).ready(function() { 52376 * var oTable = $('#example').dataTable( { 52377 * "sScrollY": "200px", 52378 * "bPaginate": false 52379 * } ); 52380 * 52381 * $(window).bind('resize', function () { 52382 * oTable.fnAdjustColumnSizing(); 52383 * } ); 52384 * } ); 52385 */ 52386 this.fnAdjustColumnSizing = function ( bRedraw ) 52387 { 52388 var api = this.api( true ).columns.adjust(); 52389 var settings = api.settings()[0]; 52390 var scroll = settings.oScroll; 52391 52392 if ( bRedraw === undefined || bRedraw ) { 52393 api.draw( false ); 52394 } 52395 else if ( scroll.sX !== "" || scroll.sY !== "" ) { 52396 /* If not redrawing, but scrolling, we want to apply the new column sizes anyway */ 52397 _fnScrollDraw( settings ); 52398 } 52399 }; 52400 52401 52402 /** 52403 * Quickly and simply clear a table 52404 * @param {bool} [bRedraw=true] redraw the table or not 52405 * @dtopt API 52406 * @deprecated Since v1.10 52407 * 52408 * @example 52409 * $(document).ready(function() { 52410 * var oTable = $('#example').dataTable(); 52411 * 52412 * // Immediately 'nuke' the current rows (perhaps waiting for an Ajax callback...) 52413 * oTable.fnClearTable(); 52414 * } ); 52415 */ 52416 this.fnClearTable = function( bRedraw ) 52417 { 52418 var api = this.api( true ).clear(); 52419 52420 if ( bRedraw === undefined || bRedraw ) { 52421 api.draw(); 52422 } 52423 }; 52424 52425 52426 /** 52427 * The exact opposite of 'opening' a row, this function will close any rows which 52428 * are currently 'open'. 52429 * @param {node} nTr the table row to 'close' 52430 * @returns {int} 0 on success, or 1 if failed (can't find the row) 52431 * @dtopt API 52432 * @deprecated Since v1.10 52433 * 52434 * @example 52435 * $(document).ready(function() { 52436 * var oTable; 52437 * 52438 * // 'open' an information row when a row is clicked on 52439 * $('#example tbody tr').click( function () { 52440 * if ( oTable.fnIsOpen(this) ) { 52441 * oTable.fnClose( this ); 52442 * } else { 52443 * oTable.fnOpen( this, "Temporary row opened", "info_row" ); 52444 * } 52445 * } ); 52446 * 52447 * oTable = $('#example').dataTable(); 52448 * } ); 52449 */ 52450 this.fnClose = function( nTr ) 52451 { 52452 this.api( true ).row( nTr ).child.hide(); 52453 }; 52454 52455 52456 /** 52457 * Remove a row for the table 52458 * @param {mixed} target The index of the row from aoData to be deleted, or 52459 * the TR element you want to delete 52460 * @param {function|null} [callBack] Callback function 52461 * @param {bool} [redraw=true] Redraw the table or not 52462 * @returns {array} The row that was deleted 52463 * @dtopt API 52464 * @deprecated Since v1.10 52465 * 52466 * @example 52467 * $(document).ready(function() { 52468 * var oTable = $('#example').dataTable(); 52469 * 52470 * // Immediately remove the first row 52471 * oTable.fnDeleteRow( 0 ); 52472 * } ); 52473 */ 52474 this.fnDeleteRow = function( target, callback, redraw ) 52475 { 52476 var api = this.api( true ); 52477 var rows = api.rows( target ); 52478 var settings = rows.settings()[0]; 52479 var data = settings.aoData[ rows[0][0] ]; 52480 52481 rows.remove(); 52482 52483 if ( callback ) { 52484 callback.call( this, settings, data ); 52485 } 52486 52487 if ( redraw === undefined || redraw ) { 52488 api.draw(); 52489 } 52490 52491 return data; 52492 }; 52493 52494 52495 /** 52496 * Restore the table to it's original state in the DOM by removing all of DataTables 52497 * enhancements, alterations to the DOM structure of the table and event listeners. 52498 * @param {boolean} [remove=false] Completely remove the table from the DOM 52499 * @dtopt API 52500 * @deprecated Since v1.10 52501 * 52502 * @example 52503 * $(document).ready(function() { 52504 * // This example is fairly pointless in reality, but shows how fnDestroy can be used 52505 * var oTable = $('#example').dataTable(); 52506 * oTable.fnDestroy(); 52507 * } ); 52508 */ 52509 this.fnDestroy = function ( remove ) 52510 { 52511 this.api( true ).destroy( remove ); 52512 }; 52513 52514 52515 /** 52516 * Redraw the table 52517 * @param {bool} [complete=true] Re-filter and resort (if enabled) the table before the draw. 52518 * @dtopt API 52519 * @deprecated Since v1.10 52520 * 52521 * @example 52522 * $(document).ready(function() { 52523 * var oTable = $('#example').dataTable(); 52524 * 52525 * // Re-draw the table - you wouldn't want to do it here, but it's an example :-) 52526 * oTable.fnDraw(); 52527 * } ); 52528 */ 52529 this.fnDraw = function( complete ) 52530 { 52531 // Note that this isn't an exact match to the old call to _fnDraw - it takes 52532 // into account the new data, but can hold position. 52533 this.api( true ).draw( complete ); 52534 }; 52535 52536 52537 /** 52538 * Filter the input based on data 52539 * @param {string} sInput String to filter the table on 52540 * @param {int|null} [iColumn] Column to limit filtering to 52541 * @param {bool} [bRegex=false] Treat as regular expression or not 52542 * @param {bool} [bSmart=true] Perform smart filtering or not 52543 * @param {bool} [bShowGlobal=true] Show the input global filter in it's input box(es) 52544 * @param {bool} [bCaseInsensitive=true] Do case-insensitive matching (true) or not (false) 52545 * @dtopt API 52546 * @deprecated Since v1.10 52547 * 52548 * @example 52549 * $(document).ready(function() { 52550 * var oTable = $('#example').dataTable(); 52551 * 52552 * // Sometime later - filter... 52553 * oTable.fnFilter( 'test string' ); 52554 * } ); 52555 */ 52556 this.fnFilter = function( sInput, iColumn, bRegex, bSmart, bShowGlobal, bCaseInsensitive ) 52557 { 52558 var api = this.api( true ); 52559 52560 if ( iColumn === null || iColumn === undefined ) { 52561 api.search( sInput, bRegex, bSmart, bCaseInsensitive ); 52562 } 52563 else { 52564 api.column( iColumn ).search( sInput, bRegex, bSmart, bCaseInsensitive ); 52565 } 52566 52567 api.draw(); 52568 }; 52569 52570 52571 /** 52572 * Get the data for the whole table, an individual row or an individual cell based on the 52573 * provided parameters. 52574 * @param {int|node} [src] A TR row node, TD/TH cell node or an integer. If given as 52575 * a TR node then the data source for the whole row will be returned. If given as a 52576 * TD/TH cell node then iCol will be automatically calculated and the data for the 52577 * cell returned. If given as an integer, then this is treated as the aoData internal 52578 * data index for the row (see fnGetPosition) and the data for that row used. 52579 * @param {int} [col] Optional column index that you want the data of. 52580 * @returns {array|object|string} If mRow is undefined, then the data for all rows is 52581 * returned. If mRow is defined, just data for that row, and is iCol is 52582 * defined, only data for the designated cell is returned. 52583 * @dtopt API 52584 * @deprecated Since v1.10 52585 * 52586 * @example 52587 * // Row data 52588 * $(document).ready(function() { 52589 * oTable = $('#example').dataTable(); 52590 * 52591 * oTable.$('tr').click( function () { 52592 * var data = oTable.fnGetData( this ); 52593 * // ... do something with the array / object of data for the row 52594 * } ); 52595 * } ); 52596 * 52597 * @example 52598 * // Individual cell data 52599 * $(document).ready(function() { 52600 * oTable = $('#example').dataTable(); 52601 * 52602 * oTable.$('td').click( function () { 52603 * var sData = oTable.fnGetData( this ); 52604 * alert( 'The cell clicked on had the value of '+sData ); 52605 * } ); 52606 * } ); 52607 */ 52608 this.fnGetData = function( src, col ) 52609 { 52610 var api = this.api( true ); 52611 52612 if ( src !== undefined ) { 52613 var type = src.nodeName ? src.nodeName.toLowerCase() : ''; 52614 52615 return col !== undefined || type == 'td' || type == 'th' ? 52616 api.cell( src, col ).data() : 52617 api.row( src ).data() || null; 52618 } 52619 52620 return api.data().toArray(); 52621 }; 52622 52623 52624 /** 52625 * Get an array of the TR nodes that are used in the table's body. Note that you will 52626 * typically want to use the '$' API method in preference to this as it is more 52627 * flexible. 52628 * @param {int} [iRow] Optional row index for the TR element you want 52629 * @returns {array|node} If iRow is undefined, returns an array of all TR elements 52630 * in the table's body, or iRow is defined, just the TR element requested. 52631 * @dtopt API 52632 * @deprecated Since v1.10 52633 * 52634 * @example 52635 * $(document).ready(function() { 52636 * var oTable = $('#example').dataTable(); 52637 * 52638 * // Get the nodes from the table 52639 * var nNodes = oTable.fnGetNodes( ); 52640 * } ); 52641 */ 52642 this.fnGetNodes = function( iRow ) 52643 { 52644 var api = this.api( true ); 52645 52646 return iRow !== undefined ? 52647 api.row( iRow ).node() : 52648 api.rows().nodes().flatten().toArray(); 52649 }; 52650 52651 52652 /** 52653 * Get the array indexes of a particular cell from it's DOM element 52654 * and column index including hidden columns 52655 * @param {node} node this can either be a TR, TD or TH in the table's body 52656 * @returns {int} If nNode is given as a TR, then a single index is returned, or 52657 * if given as a cell, an array of [row index, column index (visible), 52658 * column index (all)] is given. 52659 * @dtopt API 52660 * @deprecated Since v1.10 52661 * 52662 * @example 52663 * $(document).ready(function() { 52664 * $('#example tbody td').click( function () { 52665 * // Get the position of the current data from the node 52666 * var aPos = oTable.fnGetPosition( this ); 52667 * 52668 * // Get the data array for this row 52669 * var aData = oTable.fnGetData( aPos[0] ); 52670 * 52671 * // Update the data array and return the value 52672 * aData[ aPos[1] ] = 'clicked'; 52673 * this.innerHTML = 'clicked'; 52674 * } ); 52675 * 52676 * // Init DataTables 52677 * oTable = $('#example').dataTable(); 52678 * } ); 52679 */ 52680 this.fnGetPosition = function( node ) 52681 { 52682 var api = this.api( true ); 52683 var nodeName = node.nodeName.toUpperCase(); 52684 52685 if ( nodeName == 'TR' ) { 52686 return api.row( node ).index(); 52687 } 52688 else if ( nodeName == 'TD' || nodeName == 'TH' ) { 52689 var cell = api.cell( node ).index(); 52690 52691 return [ 52692 cell.row, 52693 cell.columnVisible, 52694 cell.column 52695 ]; 52696 } 52697 return null; 52698 }; 52699 52700 52701 /** 52702 * Check to see if a row is 'open' or not. 52703 * @param {node} nTr the table row to check 52704 * @returns {boolean} true if the row is currently open, false otherwise 52705 * @dtopt API 52706 * @deprecated Since v1.10 52707 * 52708 * @example 52709 * $(document).ready(function() { 52710 * var oTable; 52711 * 52712 * // 'open' an information row when a row is clicked on 52713 * $('#example tbody tr').click( function () { 52714 * if ( oTable.fnIsOpen(this) ) { 52715 * oTable.fnClose( this ); 52716 * } else { 52717 * oTable.fnOpen( this, "Temporary row opened", "info_row" ); 52718 * } 52719 * } ); 52720 * 52721 * oTable = $('#example').dataTable(); 52722 * } ); 52723 */ 52724 this.fnIsOpen = function( nTr ) 52725 { 52726 return this.api( true ).row( nTr ).child.isShown(); 52727 }; 52728 52729 52730 /** 52731 * This function will place a new row directly after a row which is currently 52732 * on display on the page, with the HTML contents that is passed into the 52733 * function. This can be used, for example, to ask for confirmation that a 52734 * particular record should be deleted. 52735 * @param {node} nTr The table row to 'open' 52736 * @param {string|node|jQuery} mHtml The HTML to put into the row 52737 * @param {string} sClass Class to give the new TD cell 52738 * @returns {node} The row opened. Note that if the table row passed in as the 52739 * first parameter, is not found in the table, this method will silently 52740 * return. 52741 * @dtopt API 52742 * @deprecated Since v1.10 52743 * 52744 * @example 52745 * $(document).ready(function() { 52746 * var oTable; 52747 * 52748 * // 'open' an information row when a row is clicked on 52749 * $('#example tbody tr').click( function () { 52750 * if ( oTable.fnIsOpen(this) ) { 52751 * oTable.fnClose( this ); 52752 * } else { 52753 * oTable.fnOpen( this, "Temporary row opened", "info_row" ); 52754 * } 52755 * } ); 52756 * 52757 * oTable = $('#example').dataTable(); 52758 * } ); 52759 */ 52760 this.fnOpen = function( nTr, mHtml, sClass ) 52761 { 52762 return this.api( true ) 52763 .row( nTr ) 52764 .child( mHtml, sClass ) 52765 .show() 52766 .child()[0]; 52767 }; 52768 52769 52770 /** 52771 * Change the pagination - provides the internal logic for pagination in a simple API 52772 * function. With this function you can have a DataTables table go to the next, 52773 * previous, first or last pages. 52774 * @param {string|int} mAction Paging action to take: "first", "previous", "next" or "last" 52775 * or page number to jump to (integer), note that page 0 is the first page. 52776 * @param {bool} [bRedraw=true] Redraw the table or not 52777 * @dtopt API 52778 * @deprecated Since v1.10 52779 * 52780 * @example 52781 * $(document).ready(function() { 52782 * var oTable = $('#example').dataTable(); 52783 * oTable.fnPageChange( 'next' ); 52784 * } ); 52785 */ 52786 this.fnPageChange = function ( mAction, bRedraw ) 52787 { 52788 var api = this.api( true ).page( mAction ); 52789 52790 if ( bRedraw === undefined || bRedraw ) { 52791 api.draw(false); 52792 } 52793 }; 52794 52795 52796 /** 52797 * Show a particular column 52798 * @param {int} iCol The column whose display should be changed 52799 * @param {bool} bShow Show (true) or hide (false) the column 52800 * @param {bool} [bRedraw=true] Redraw the table or not 52801 * @dtopt API 52802 * @deprecated Since v1.10 52803 * 52804 * @example 52805 * $(document).ready(function() { 52806 * var oTable = $('#example').dataTable(); 52807 * 52808 * // Hide the second column after initialisation 52809 * oTable.fnSetColumnVis( 1, false ); 52810 * } ); 52811 */ 52812 this.fnSetColumnVis = function ( iCol, bShow, bRedraw ) 52813 { 52814 var api = this.api( true ).column( iCol ).visible( bShow ); 52815 52816 if ( bRedraw === undefined || bRedraw ) { 52817 api.columns.adjust().draw(); 52818 } 52819 }; 52820 52821 52822 /** 52823 * Get the settings for a particular table for external manipulation 52824 * @returns {object} DataTables settings object. See 52825 * {@link DataTable.models.oSettings} 52826 * @dtopt API 52827 * @deprecated Since v1.10 52828 * 52829 * @example 52830 * $(document).ready(function() { 52831 * var oTable = $('#example').dataTable(); 52832 * var oSettings = oTable.fnSettings(); 52833 * 52834 * // Show an example parameter from the settings 52835 * alert( oSettings._iDisplayStart ); 52836 * } ); 52837 */ 52838 this.fnSettings = function() 52839 { 52840 return _fnSettingsFromNode( this[_ext.iApiIndex] ); 52841 }; 52842 52843 52844 /** 52845 * Sort the table by a particular column 52846 * @param {int} iCol the data index to sort on. Note that this will not match the 52847 * 'display index' if you have hidden data entries 52848 * @dtopt API 52849 * @deprecated Since v1.10 52850 * 52851 * @example 52852 * $(document).ready(function() { 52853 * var oTable = $('#example').dataTable(); 52854 * 52855 * // Sort immediately with columns 0 and 1 52856 * oTable.fnSort( [ [0,'asc'], [1,'asc'] ] ); 52857 * } ); 52858 */ 52859 this.fnSort = function( aaSort ) 52860 { 52861 this.api( true ).order( aaSort ).draw(); 52862 }; 52863 52864 52865 /** 52866 * Attach a sort listener to an element for a given column 52867 * @param {node} nNode the element to attach the sort listener to 52868 * @param {int} iColumn the column that a click on this node will sort on 52869 * @param {function} [fnCallback] callback function when sort is run 52870 * @dtopt API 52871 * @deprecated Since v1.10 52872 * 52873 * @example 52874 * $(document).ready(function() { 52875 * var oTable = $('#example').dataTable(); 52876 * 52877 * // Sort on column 1, when 'sorter' is clicked on 52878 * oTable.fnSortListener( document.getElementById('sorter'), 1 ); 52879 * } ); 52880 */ 52881 this.fnSortListener = function( nNode, iColumn, fnCallback ) 52882 { 52883 this.api( true ).order.listener( nNode, iColumn, fnCallback ); 52884 }; 52885 52886 52887 /** 52888 * Update a table cell or row - this method will accept either a single value to 52889 * update the cell with, an array of values with one element for each column or 52890 * an object in the same format as the original data source. The function is 52891 * self-referencing in order to make the multi column updates easier. 52892 * @param {object|array|string} mData Data to update the cell/row with 52893 * @param {node|int} mRow TR element you want to update or the aoData index 52894 * @param {int} [iColumn] The column to update, give as null or undefined to 52895 * update a whole row. 52896 * @param {bool} [bRedraw=true] Redraw the table or not 52897 * @param {bool} [bAction=true] Perform pre-draw actions or not 52898 * @returns {int} 0 on success, 1 on error 52899 * @dtopt API 52900 * @deprecated Since v1.10 52901 * 52902 * @example 52903 * $(document).ready(function() { 52904 * var oTable = $('#example').dataTable(); 52905 * oTable.fnUpdate( 'Example update', 0, 0 ); // Single cell 52906 * oTable.fnUpdate( ['a', 'b', 'c', 'd', 'e'], $('tbody tr')[0] ); // Row 52907 * } ); 52908 */ 52909 this.fnUpdate = function( mData, mRow, iColumn, bRedraw, bAction ) 52910 { 52911 var api = this.api( true ); 52912 52913 if ( iColumn === undefined || iColumn === null ) { 52914 api.row( mRow ).data( mData ); 52915 } 52916 else { 52917 api.cell( mRow, iColumn ).data( mData ); 52918 } 52919 52920 if ( bAction === undefined || bAction ) { 52921 api.columns.adjust(); 52922 } 52923 52924 if ( bRedraw === undefined || bRedraw ) { 52925 api.draw(); 52926 } 52927 return 0; 52928 }; 52929 52930 52931 /** 52932 * Provide a common method for plug-ins to check the version of DataTables being used, in order 52933 * to ensure compatibility. 52934 * @param {string} sVersion Version string to check for, in the format "X.Y.Z". Note that the 52935 * formats "X" and "X.Y" are also acceptable. 52936 * @returns {boolean} true if this version of DataTables is greater or equal to the required 52937 * version, or false if this version of DataTales is not suitable 52938 * @method 52939 * @dtopt API 52940 * @deprecated Since v1.10 52941 * 52942 * @example 52943 * $(document).ready(function() { 52944 * var oTable = $('#example').dataTable(); 52945 * alert( oTable.fnVersionCheck( '1.9.0' ) ); 52946 * } ); 52947 */ 52948 this.fnVersionCheck = _ext.fnVersionCheck; 52949 52950 52951 var _that = this; 52952 var emptyInit = options === undefined; 52953 var len = this.length; 52954 52955 if ( emptyInit ) { 52956 options = {}; 52957 } 52958 52959 this.oApi = this.internal = _ext.internal; 52960 52961 // Extend with old style plug-in API methods 52962 for ( var fn in DataTable.ext.internal ) { 52963 if ( fn ) { 52964 this[fn] = _fnExternApiFunc(fn); 52965 } 52966 } 52967 52968 this.each(function() { 52969 // For each initialisation we want to give it a clean initialisation 52970 // object that can be bashed around 52971 var o = {}; 52972 var oInit = len > 1 ? // optimisation for single table case 52973 _fnExtend( o, options, true ) : 52974 options; 52975 52976 /*global oInit,_that,emptyInit*/ 52977 var i=0, iLen, j, jLen, k, kLen; 52978 var sId = this.getAttribute( 'id' ); 52979 var bInitHandedOff = false; 52980 var defaults = DataTable.defaults; 52981 var $this = $(this); 52982 52983 52984 /* Sanity check */ 52985 if ( this.nodeName.toLowerCase() != 'table' ) 52986 { 52987 _fnLog( null, 0, 'Non-table node initialisation ('+this.nodeName+')', 2 ); 52988 return; 52989 } 52990 52991 /* Backwards compatibility for the defaults */ 52992 _fnCompatOpts( defaults ); 52993 _fnCompatCols( defaults.column ); 52994 52995 /* Convert the camel-case defaults to Hungarian */ 52996 _fnCamelToHungarian( defaults, defaults, true ); 52997 _fnCamelToHungarian( defaults.column, defaults.column, true ); 52998 52999 /* Setting up the initialisation object */ 53000 _fnCamelToHungarian( defaults, $.extend( oInit, $this.data() ) ); 53001 53002 53003 53004 /* Check to see if we are re-initialising a table */ 53005 var allSettings = DataTable.settings; 53006 for ( i=0, iLen=allSettings.length ; i<iLen ; i++ ) 53007 { 53008 var s = allSettings[i]; 53009 53010 /* Base check on table node */ 53011 if ( s.nTable == this || s.nTHead.parentNode == this || (s.nTFoot && s.nTFoot.parentNode == this) ) 53012 { 53013 var bRetrieve = oInit.bRetrieve !== undefined ? oInit.bRetrieve : defaults.bRetrieve; 53014 var bDestroy = oInit.bDestroy !== undefined ? oInit.bDestroy : defaults.bDestroy; 53015 53016 if ( emptyInit || bRetrieve ) 53017 { 53018 return s.oInstance; 53019 } 53020 else if ( bDestroy ) 53021 { 53022 s.oInstance.fnDestroy(); 53023 break; 53024 } 53025 else 53026 { 53027 _fnLog( s, 0, 'Cannot reinitialise DataTable', 3 ); 53028 return; 53029 } 53030 } 53031 53032 /* If the element we are initialising has the same ID as a table which was previously 53033 * initialised, but the table nodes don't match (from before) then we destroy the old 53034 * instance by simply deleting it. This is under the assumption that the table has been 53035 * destroyed by other methods. Anyone using non-id selectors will need to do this manually 53036 */ 53037 if ( s.sTableId == this.id ) 53038 { 53039 allSettings.splice( i, 1 ); 53040 break; 53041 } 53042 } 53043 53044 /* Ensure the table has an ID - required for accessibility */ 53045 if ( sId === null || sId === "" ) 53046 { 53047 sId = "DataTables_Table_"+(DataTable.ext._unique++); 53048 this.id = sId; 53049 } 53050 53051 /* Create the settings object for this table and set some of the default parameters */ 53052 var oSettings = $.extend( true, {}, DataTable.models.oSettings, { 53053 "sDestroyWidth": $this[0].style.width, 53054 "sInstance": sId, 53055 "sTableId": sId 53056 } ); 53057 oSettings.nTable = this; 53058 oSettings.oApi = _that.internal; 53059 oSettings.oInit = oInit; 53060 53061 allSettings.push( oSettings ); 53062 53063 // Need to add the instance after the instance after the settings object has been added 53064 // to the settings array, so we can self reference the table instance if more than one 53065 oSettings.oInstance = (_that.length===1) ? _that : $this.dataTable(); 53066 53067 // Backwards compatibility, before we apply all the defaults 53068 _fnCompatOpts( oInit ); 53069 53070 if ( oInit.oLanguage ) 53071 { 53072 _fnLanguageCompat( oInit.oLanguage ); 53073 } 53074 53075 // If the length menu is given, but the init display length is not, use the length menu 53076 if ( oInit.aLengthMenu && ! oInit.iDisplayLength ) 53077 { 53078 oInit.iDisplayLength = $.isArray( oInit.aLengthMenu[0] ) ? 53079 oInit.aLengthMenu[0][0] : oInit.aLengthMenu[0]; 53080 } 53081 53082 // Apply the defaults and init options to make a single init object will all 53083 // options defined from defaults and instance options. 53084 oInit = _fnExtend( $.extend( true, {}, defaults ), oInit ); 53085 53086 53087 // Map the initialisation options onto the settings object 53088 _fnMap( oSettings.oFeatures, oInit, [ 53089 "bPaginate", 53090 "bLengthChange", 53091 "bFilter", 53092 "bSort", 53093 "bSortMulti", 53094 "bInfo", 53095 "bProcessing", 53096 "bAutoWidth", 53097 "bSortClasses", 53098 "bServerSide", 53099 "bDeferRender" 53100 ] ); 53101 _fnMap( oSettings, oInit, [ 53102 "asStripeClasses", 53103 "ajax", 53104 "fnServerData", 53105 "fnFormatNumber", 53106 "sServerMethod", 53107 "aaSorting", 53108 "aaSortingFixed", 53109 "aLengthMenu", 53110 "sPaginationType", 53111 "sAjaxSource", 53112 "sAjaxDataProp", 53113 "iStateDuration", 53114 "sDom", 53115 "bSortCellsTop", 53116 "iTabIndex", 53117 "fnStateLoadCallback", 53118 "fnStateSaveCallback", 53119 "renderer", 53120 "searchDelay", 53121 "rowId", 53122 [ "iCookieDuration", "iStateDuration" ], // backwards compat 53123 [ "oSearch", "oPreviousSearch" ], 53124 [ "aoSearchCols", "aoPreSearchCols" ], 53125 [ "iDisplayLength", "_iDisplayLength" ], 53126 [ "bJQueryUI", "bJUI" ] 53127 ] ); 53128 _fnMap( oSettings.oScroll, oInit, [ 53129 [ "sScrollX", "sX" ], 53130 [ "sScrollXInner", "sXInner" ], 53131 [ "sScrollY", "sY" ],
53132 [ "bScrollCollapse", "bCollapse" ] 53133 ] ); 53134 _fnMap( oSettings.oLanguage, oInit, "fnInfoCallback" ); 53135 53136 /* Callback functions which are array driven */ 53137 _fnCallbackReg( oSettings, 'aoDrawCallback', oInit.fnDrawCallback, 'user' ); 53138 _fnCallbackReg( oSettings, 'aoServerParams', oInit.fnServerParams, 'user' ); 53139 _fnCallbackReg( oSettings, 'aoStateSaveParams', oInit.fnStateSaveParams, 'user' ); 53140 _fnCallbackReg( oSettings, 'aoStateLoadParams', oInit.fnStateLoadParams, 'user' ); 53141 _fnCallbackReg( oSettings, 'aoStateLoaded', oInit.fnStateLoaded, 'user' ); 53142 _fnCallbackReg( oSettings, 'aoRowCallback', oInit.fnRowCallback, 'user' ); 53143 _fnCallbackReg( oSettings, 'aoRowCreatedCallback', oInit.fnCreatedRow, 'user' ); 53144 _fnCallbackReg( oSettings, 'aoHeaderCallback', oInit.fnHeaderCallback, 'user' ); 53145 _fnCallbackReg( oSettings, 'aoFooterCallback', oInit.fnFooterCallback, 'user' ); 53146 _fnCallbackReg( oSettings, 'aoInitComplete', oInit.fnInitComplete, 'user' ); 53147 _fnCallbackReg( oSettings, 'aoPreDrawCallback', oInit.fnPreDrawCallback, 'user' ); 53148 53149 oSettings.rowIdFn = _fnGetObjectDataFn( oInit.rowId ); 53150 53151 /* Browser support detection */ 53152 _fnBrowserDetect( oSettings ); 53153 53154 var oClasses = oSettings.oClasses; 53155 53156 // @todo Remove in 1.11 53157 if ( oInit.bJQueryUI ) 53158 { 53159 /* Use the JUI classes object for display. You could clone the oStdClasses object if 53160 * you want to have multiple tables with multiple independent classes 53161 */ 53162 $.extend( oClasses, DataTable.ext.oJUIClasses, oInit.oClasses ); 53163 53164 if ( oInit.sDom === defaults.sDom && defaults.sDom === "lfrtip" ) 53165 { 53166 /* Set the DOM to use a layout suitable for jQuery UI's theming */ 53167 oSettings.sDom = '<"H"lfr>t<"F"ip>'; 53168 } 53169 53170 if ( ! oSettings.renderer ) { 53171 oSettings.renderer = 'jqueryui'; 53172 } 53173 else if ( $.isPlainObject( oSettings.renderer ) && ! oSettings.renderer.header ) { 53174 oSettings.renderer.header = 'jqueryui'; 53175 } 53176 } 53177 else 53178 { 53179 $.extend( oClasses, DataTable.ext.classes, oInit.oClasses ); 53180 } 53181 $this.addClass( oClasses.sTable ); 53182 53183 53184 if ( oSettings.iInitDisplayStart === undefined ) 53185 { 53186 /* Display start point, taking into account the save saving */ 53187 oSettings.iInitDisplayStart = oInit.iDisplayStart; 53188 oSettings._iDisplayStart = oInit.iDisplayStart; 53189 } 53190 53191 if ( oInit.iDeferLoading !== null ) 53192 { 53193 oSettings.bDeferLoading = true; 53194 var tmp = $.isArray( oInit.iDeferLoading ); 53195 oSettings._iRecordsDisplay = tmp ? oInit.iDeferLoading[0] : oInit.iDeferLoading; 53196 oSettings._iRecordsTotal = tmp ? oInit.iDeferLoading[1] : oInit.iDeferLoading; 53197 } 53198 53199 /* Language definitions */ 53200 var oLanguage = oSettings.oLanguage; 53201 $.extend( true, oLanguage, oInit.oLanguage ); 53202 53203 if ( oLanguage.sUrl !== "" ) 53204 { 53205 /* Get the language definitions from a file - because this Ajax call makes the language 53206 * get async to the remainder of this function we use bInitHandedOff to indicate that 53207 * _fnInitialise will be fired by the returned Ajax handler, rather than the constructor 53208 */ 53209 $.ajax( { 53210 dataType: 'json', 53211 url: oLanguage.sUrl, 53212 success: function ( json ) { 53213 _fnLanguageCompat( json ); 53214 _fnCamelToHungarian( defaults.oLanguage, json ); 53215 $.extend( true, oLanguage, json ); 53216 _fnInitialise( oSettings ); 53217 }, 53218 error: function () { 53219 // Error occurred loading language file, continue on as best we can 53220 _fnInitialise( oSettings ); 53221 } 53222 } ); 53223 bInitHandedOff = true; 53224 } 53225 53226 /* 53227 * Stripes 53228 */ 53229 if ( oInit.asStripeClasses === null ) 53230 { 53231 oSettings.asStripeClasses =[ 53232 oClasses.sStripeOdd, 53233 oClasses.sStripeEven 53234 ]; 53235 } 53236 53237 /* Remove row stripe classes if they are already on the table row */ 53238 var stripeClasses = oSettings.asStripeClasses; 53239 var rowOne = $this.children('tbody').find('tr').eq(0); 53240 if ( $.inArray( true, $.map( stripeClasses, function(el, i) { 53241 return rowOne.hasClass(el); 53242 } ) ) !== -1 ) { 53243 $('tbody tr', this).removeClass( stripeClasses.join(' ') ); 53244 oSettings.asDestroyStripes = stripeClasses.slice(); 53245 } 53246 53247 /* 53248 * Columns 53249 * See if we should load columns automatically or use defined ones 53250 */ 53251 var anThs = []; 53252 var aoColumnsInit; 53253 var nThead = this.getElementsByTagName('thead'); 53254 if ( nThead.length !== 0 ) 53255 { 53256 _fnDetectHeader( oSettings.aoHeader, nThead[0] ); 53257 anThs = _fnGetUniqueThs( oSettings ); 53258 } 53259 53260 /* If not given a column array, generate one with nulls */ 53261 if ( oInit.aoColumns === null ) 53262 { 53263 aoColumnsInit = []; 53264 for ( i=0, iLen=anThs.length ; i<iLen ; i++ ) 53265 { 53266 aoColumnsInit.push( null ); 53267 } 53268 } 53269 else 53270 {
vendor: 9,215 bytes, lines 53271-53569
53271 aoColumnsInit = oInit.aoColumns; 53272 } 53273 53274 /* Add the columns */ 53275 for ( i=0, iLen=aoColumnsInit.length ; i<iLen ; i++ ) 53276 { 53277 _fnAddColumn( oSettings, anThs ? anThs[i] : null ); 53278 } 53279 53280 /* Apply the column definitions */ 53281 _fnApplyColumnDefs( oSettings, oInit.aoColumnDefs, aoColumnsInit, function (iCol, oDef) { 53282 _fnColumnOptions( oSettings, iCol, oDef ); 53283 } ); 53284 53285 /* HTML5 attribute detection - build an mData object automatically if the 53286 * attributes are found 53287 */ 53288 if ( rowOne.length ) { 53289 var a = function ( cell, name ) { 53290 return cell.getAttribute( 'data-'+name ) !== null ? name : null; 53291 }; 53292 53293 $( rowOne[0] ).children('th, td').each( function (i, cell) { 53294 var col = oSettings.aoColumns[i]; 53295 53296 if ( col.mData === i ) { 53297 var sort = a( cell, 'sort' ) || a( cell, 'order' ); 53298 var filter = a( cell, 'filter' ) || a( cell, 'search' ); 53299 53300 if ( sort !== null || filter !== null ) { 53301 col.mData = { 53302 _: i+'.display', 53303 sort: sort !== null ? i+'.@data-'+sort : undefined, 53304 type: sort !== null ? i+'.@data-'+sort : undefined, 53305 filter: filter !== null ? i+'.@data-'+filter : undefined 53306 }; 53307 53308 _fnColumnOptions( oSettings, i ); 53309 } 53310 } 53311 } ); 53312 } 53313 53314 var features = oSettings.oFeatures; 53315 53316 /* Must be done after everything which can be overridden by the state saving! */ 53317 if ( oInit.bStateSave ) 53318 { 53319 features.bStateSave = true; 53320 _fnLoadState( oSettings, oInit ); 53321 _fnCallbackReg( oSettings, 'aoDrawCallback', _fnSaveState, 'state_save' ); 53322 } 53323 53324 53325 /* 53326 * Sorting 53327 * @todo For modularisation (1.11) this needs to do into a sort start up handler 53328 */ 53329 53330 // If aaSorting is not defined, then we use the first indicator in asSorting 53331 // in case that has been altered, so the default sort reflects that option 53332 if ( oInit.aaSorting === undefined ) 53333 { 53334 var sorting = oSettings.aaSorting; 53335 for ( i=0, iLen=sorting.length ; i<iLen ; i++ ) 53336 { 53337 sorting[i][1] = oSettings.aoColumns[ i ].asSorting[0]; 53338 } 53339 } 53340 53341 /* Do a first pass on the sorting classes (allows any size changes to be taken into 53342 * account, and also will apply sorting disabled classes if disabled 53343 */ 53344 _fnSortingClasses( oSettings ); 53345 53346 if ( features.bSort ) 53347 { 53348 _fnCallbackReg( oSettings, 'aoDrawCallback', function () { 53349 if ( oSettings.bSorted ) { 53350 var aSort = _fnSortFlatten( oSettings ); 53351 var sortedColumns = {}; 53352 53353 $.each( aSort, function (i, val) { 53354 sortedColumns[ val.src ] = val.dir; 53355 } ); 53356 53357 _fnCallbackFire( oSettings, null, 'order', [oSettings, aSort, sortedColumns] ); 53358 _fnSortAria( oSettings ); 53359 } 53360 } ); 53361 } 53362 53363 _fnCallbackReg( oSettings, 'aoDrawCallback', function () { 53364 if ( oSettings.bSorted || _fnDataSource( oSettings ) === 'ssp' || features.bDeferRender ) { 53365 _fnSortingClasses( oSettings ); 53366 } 53367 }, 'sc' ); 53368 53369 53370 /* 53371 * Final init 53372 * Cache the header, body and footer as required, creating them if needed 53373 */ 53374 53375 // Work around for Webkit bug 83867 - store the caption-side before removing from doc 53376 var captions = $this.children('caption').each( function () { 53377 this._captionSide = $this.css('caption-side'); 53378 } ); 53379 53380 var thead = $this.children('thead'); 53381 if ( thead.length === 0 ) 53382 { 53383 thead = $('<thead/>').appendTo(this); 53384 } 53385 oSettings.nTHead = thead[0]; 53386 53387 var tbody = $this.children('tbody'); 53388 if ( tbody.length === 0 ) 53389 { 53390 tbody = $('<tbody/>').appendTo(this); 53391 } 53392 oSettings.nTBody = tbody[0]; 53393 53394 var tfoot = $this.children('tfoot'); 53395 if ( tfoot.length === 0 && captions.length > 0 && (oSettings.oScroll.sX !== "" || oSettings.oScroll.sY !== "") ) 53396 { 53397 // If we are a scrolling table, and no footer has been given, then we need to create 53398 // a tfoot element for the caption element to be appended to 53399 tfoot = $('<tfoot/>').appendTo(this); 53400 } 53401 53402 if ( tfoot.length === 0 || tfoot.children().length === 0 ) { 53403 $this.addClass( oClasses.sNoFooter ); 53404 } 53405 else if ( tfoot.length > 0 ) { 53406 oSettings.nTFoot = tfoot[0]; 53407 _fnDetectHeader( oSettings.aoFooter, oSettings.nTFoot ); 53408 } 53409 53410 /* Check if there is data passing into the constructor */ 53411 if ( oInit.aaData ) 53412 { 53413 for ( i=0 ; i<oInit.aaData.length ; i++ ) 53414 { 53415 _fnAddData( oSettings, oInit.aaData[ i ] ); 53416 } 53417 } 53418 else if ( oSettings.bDeferLoading || _fnDataSource( oSettings ) == 'dom' ) 53419 { 53420 /* Grab the data from the page - only do this when deferred loading or no Ajax 53421 * source since there is no point in reading the DOM data if we are then going 53422 * to replace it with Ajax data 53423 */ 53424 _fnAddTr( oSettings, $(oSettings.nTBody).children('tr') ); 53425 } 53426 53427 /* Copy the data index array */ 53428 oSettings.aiDisplay = oSettings.aiDisplayMaster.slice(); 53429 53430 /* Initialisation complete - table can be drawn */ 53431 oSettings.bInitialised = true; 53432 53433 /* Check if we need to initialise the table (it might not have been handed off to the 53434 * language processor) 53435 */ 53436 if ( bInitHandedOff === false ) 53437 { 53438 _fnInitialise( oSettings ); 53439 } 53440 } ); 53441 _that = null; 53442 return this; 53443 }; 53444 53445 53446 53447 /** 53448 * Computed structure of the DataTables API, defined by the options passed to 53449 * `DataTable.Api.register()` when building the API. 53450 * 53451 * The structure is built in order to speed creation and extension of the Api 53452 * objects since the extensions are effectively pre-parsed. 53453 * 53454 * The array is an array of objects with the following structure, where this 53455 * base array represents the Api prototype base: 53456 * 53457 * [ 53458 * { 53459 * name: 'data' -- string - Property name 53460 * val: function () {}, -- function - Api method (or undefined if just an object 53461 * methodExt: [ ... ], -- array - Array of Api object definitions to extend the method result 53462 * propExt: [ ... ] -- array - Array of Api object definitions to extend the property 53463 * }, 53464 * { 53465 * name: 'row' 53466 * val: {}, 53467 * methodExt: [ ... ], 53468 * propExt: [ 53469 * { 53470 * name: 'data' 53471 * val: function () {}, 53472 * methodExt: [ ... ], 53473 * propExt: [ ... ] 53474 * }, 53475 * ... 53476 * ] 53477 * } 53478 * ] 53479 * 53480 * @type {Array} 53481 * @ignore 53482 */ 53483 var __apiStruct = []; 53484 53485 53486 /** 53487 * `Array.prototype` reference. 53488 * 53489 * @type object 53490 * @ignore 53491 */ 53492 var __arrayProto = Array.prototype; 53493 53494 53495 /** 53496 * Abstraction for `context` parameter of the `Api` constructor to allow it to 53497 * take several different forms for ease of use. 53498 * 53499 * Each of the input parameter types will be converted to a DataTables settings 53500 * object where possible. 53501 * 53502 * @param {string|node|jQuery|object} mixed DataTable identifier. Can be one 53503 * of: 53504 * 53505 * * `string` - jQuery selector. Any DataTables' matching the given selector 53506 * with be found and used. 53507 * * `node` - `TABLE` node which has already been formed into a DataTable. 53508 * * `jQuery` - A jQuery object of `TABLE` nodes. 53509 * * `object` - DataTables settings object 53510 * * `DataTables.Api` - API instance 53511 * @return {array|null} Matching DataTables settings objects. `null` or 53512 * `undefined` is returned if no matching DataTable is found. 53513 * @ignore 53514 */ 53515 var _toSettings = function ( mixed ) 53516 { 53517 var idx, jq; 53518 var settings = DataTable.settings; 53519 var tables = $.map( settings, function (el, i) { 53520 return el.nTable; 53521 } ); 53522 53523 if ( ! mixed ) { 53524 return []; 53525 } 53526 else if ( mixed.nTable && mixed.oApi ) { 53527 // DataTables settings object 53528 return [ mixed ]; 53529 } 53530 else if ( mixed.nodeName && mixed.nodeName.toLowerCase() === 'table' ) { 53531 // Table node 53532 idx = $.inArray( mixed, tables ); 53533 return idx !== -1 ? [ settings[idx] ] : null; 53534 } 53535 else if ( mixed && typeof mixed.settings === 'function' ) { 53536 return mixed.settings().toArray(); 53537 } 53538 else if ( typeof mixed === 'string' ) { 53539 // jQuery selector 53540 jq = $(mixed); 53541 } 53542 else if ( mixed instanceof $ ) { 53543 // jQuery object (also DataTables instance) 53544 jq = mixed; 53545 } 53546 53547 if ( jq ) { 53548 return jq.map( function(i) { 53549 idx = $.inArray( this, tables ); 53550 return idx !== -1 ? settings[idx] : null; 53551 } ).toArray(); 53552 } 53553 }; 53554 53555 53556 /** 53557 * DataTables API class - used to control and interface with one or more 53558 * DataTables enhanced tables. 53559 * 53560 * The API class is heavily based on jQuery, presenting a chainable interface 53561 * that you can use to interact with tables. Each instance of the API class has 53562 * a "context" - i.e. the tables that it will operate on. This could be a single 53563 * table, all tables on a page or a sub-set thereof. 53564 * 53565 * Additionally the API is designed to allow you to easily work with the data in 53566 * the tables, retrieving and manipulating it as required. This is done by 53567 * presenting the API class as an array like interface. The contents of the 53568 * array depend upon the actions requested by each method (for example 53569 * `rows().nodes()` will return an array of nodes, while `rows().data()` will
53570 * return an array of objects or arrays depending upon your table's 53571 * configuration). The API object has a number of array like methods (`push`, 53572 * `pop`, `reverse` etc) as well as additional helper methods (`each`, `pluck`, 53573 * `unique` etc) to assist your working with the data held in a table. 53574 * 53575 * Most methods (those which return an Api instance) are chainable, which means 53576 * the return from a method call also has all of the methods available that the 53577 * top level object had. For example, these two calls are equivalent: 53578 * 53579 * // Not chained 53580 * api.row.add( {...} ); 53581 * api.draw(); 53582 * 53583 * // Chained 53584 * api.row.add( {...} ).draw(); 53585 * 53586 * @class DataTable.Api 53587 * @param {array|object|string|jQuery} context DataTable identifier. This is 53588 * used to define which DataTables enhanced tables this API will operate on. 53589 * Can be one of: 53590 * 53591 * * `string` - jQuery selector. Any DataTables' matching the given selector 53592 * with be found and used. 53593 * * `node` - `TABLE` node which has already been formed into a DataTable. 53594 * * `jQuery` - A jQuery object of `TABLE` nodes. 53595 * * `object` - DataTables settings object 53596 * @param {array} [data] Data to initialise the Api instance with. 53597 * 53598 * @example 53599 * // Direct initialisation during DataTables construction 53600 * var api = $('#example').DataTable(); 53601 * 53602 * @example 53603 * // Initialisation using a DataTables jQuery object 53604 * var api = $('#example').dataTable().api(); 53605 * 53606 * @example 53607 * // Initialisation as a constructor 53608 * var api = new $.fn.DataTable.Api( 'table.dataTable' ); 53609 */ 53610 _Api = function ( context, data ) 53611 { 53612 if ( ! (this instanceof _Api) ) { 53613 return new _Api( context, data ); 53614 } 53615 53616 var settings = []; 53617 var ctxSettings = function ( o ) { 53618 var a = _toSettings( o ); 53619 if ( a ) { 53620 settings = settings.concat( a ); 53621 } 53622 }; 53623 53624 if ( $.isArray( context ) ) { 53625 for ( var i=0, ien=context.length ; i<ien ; i++ ) { 53626 ctxSettings( context[i] ); 53627 } 53628 } 53629 else { 53630 ctxSettings( context ); 53631 } 53632 53633 // Remove duplicates 53634 this.context = _unique( settings ); 53635 53636 // Initial data 53637 if ( data ) { 53638 $.merge( this, data ); 53639 } 53640 53641 // selector 53642 this.selector = { 53643 rows: null, 53644 cols: null, 53645 opts: null 53646 }; 53647 53648 _Api.extend( this, this, __apiStruct ); 53649 }; 53650 53651 DataTable.Api = _Api; 53652 53653 // Don't destroy the existing prototype, just extend it. Required for jQuery 2's 53654 // isPlainObject. 53655 $.extend( _Api.prototype, { 53656 any: function () 53657 { 53658 return this.count() !== 0; 53659 }, 53660 53661 53662 concat: __arrayProto.concat, 53663 53664 53665 context: [], // array of table settings objects 53666 53667 53668 count: function () 53669 { 53670 return this.flatten().length; 53671 }, 53672 53673 53674 each: function ( fn ) 53675 { 53676 for ( var i=0, ien=this.length ; i<ien; i++ ) { 53677 fn.call( this, this[i], i, this ); 53678 } 53679 53680 return this; 53681 }, 53682 53683 53684 eq: function ( idx ) 53685 { 53686 var ctx = this.context; 53687 53688 return ctx.length > idx ? 53689 new _Api( ctx[idx], this[idx] ) : 53690 null; 53691 }, 53692 53693 53694 filter: function ( fn ) 53695 { 53696 var a = []; 53697 53698 if ( __arrayProto.filter ) { 53699 a = __arrayProto.filter.call( this, fn, this ); 53700 } 53701 else { 53702 // Compatibility for browsers without EMCA-252-5 (JS 1.6) 53703 for ( var i=0, ien=this.length ; i<ien ; i++ ) { 53704 if ( fn.call( this, this[i], i, this ) ) { 53705 a.push( this[i] ); 53706 } 53707 } 53708 } 53709 53710 return new _Api( this.context, a ); 53711 }, 53712 53713 53714 flatten: function () 53715 { 53716 var a = []; 53717 return new _Api( this.context, a.concat.apply( a, this.toArray() ) ); 53718 }, 53719 53720 53721 join: __arrayProto.join, 53722 53723 53724 indexOf: __arrayProto.indexOf || function (obj, start) 53725 { 53726 for ( var i=(start || 0), ien=this.length ; i<ien ; i++ ) { 53727 if ( this[i] === obj ) { 53728 return i; 53729 } 53730 } 53731 return -1; 53732 }, 53733 53734 iterator: function ( flatten, type, fn, alwaysNew ) { 53735 var 53736 a = [], ret, 53737 i, ien, j, jen, 53738 context = this.context, 53739 rows, items, item, 53740 selector = this.selector; 53741 53742 // Argument shifting 53743 if ( typeof flatten === 'string' ) { 53744 alwaysNew = fn; 53745 fn = type; 53746 type = flatten; 53747 flatten = false; 53748 } 53749 53750 for ( i=0, ien=context.length ; i<ien ; i++ ) { 53751 var apiInst = new _Api( context[i] ); 53752 53753 if ( type === 'table' ) { 53754 ret = fn.call( apiInst, context[i], i ); 53755 53756 if ( ret !== undefined ) { 53757 a.push( ret ); 53758 } 53759 } 53760 else if ( type === 'columns' || type === 'rows' ) { 53761 // this has same length as context - one entry for each table 53762 ret = fn.call( apiInst, context[i], this[i], i ); 53763 53764 if ( ret !== undefined ) { 53765 a.push( ret ); 53766 } 53767 } 53768 else if ( type === 'column' || type === 'column-rows' || type === 'row' || type === 'cell' ) { 53769 // columns and rows share the same structure. 53770 // 'this' is an array of column indexes for each context 53771 items = this[i]; 53772 53773 if ( type === 'column-rows' ) { 53774 rows = _selector_row_indexes( context[i], selector.opts ); 53775 } 53776 53777 for ( j=0, jen=items.length ; j<jen ; j++ ) { 53778 item = items[j]; 53779 53780 if ( type === 'cell' ) { 53781 ret = fn.call( apiInst, context[i], item.row, item.column, i, j ); 53782 } 53783 else { 53784 ret = fn.call( apiInst, context[i], item, i, j, rows ); 53785 } 53786 53787 if ( ret !== undefined ) { 53788 a.push( ret ); 53789 } 53790 } 53791 } 53792 } 53793 53794 if ( a.length || alwaysNew ) { 53795 var api = new _Api( context, flatten ? a.concat.apply( [], a ) : a ); 53796 var apiSelector = api.selector; 53797 apiSelector.rows = selector.rows; 53798 apiSelector.cols = selector.cols; 53799 apiSelector.opts = selector.opts; 53800 return api; 53801 } 53802 return this; 53803 }, 53804 53805 53806 lastIndexOf: __arrayProto.lastIndexOf || function (obj, start) 53807 { 53808 // Bit cheeky... 53809 return this.indexOf.apply( this.toArray.reverse(), arguments ); 53810 }, 53811 53812 53813 length: 0, 53814 53815 53816 map: function ( fn ) 53817 { 53818 var a = []; 53819 53820 if ( __arrayProto.map ) { 53821 a = __arrayProto.map.call( this, fn, this ); 53822 } 53823 else { 53824 // Compatibility for browsers without EMCA-252-5 (JS 1.6) 53825 for ( var i=0, ien=this.length ; i<ien ; i++ ) { 53826 a.push( fn.call( this, this[i], i ) ); 53827 } 53828 } 53829 53830 return new _Api( this.context, a ); 53831 }, 53832 53833 53834 pluck: function ( prop ) 53835 { 53836 return this.map( function ( el ) { 53837 return el[ prop ]; 53838 } ); 53839 }, 53840 53841 pop: __arrayProto.pop, 53842 53843 53844 push: __arrayProto.push, 53845 53846 53847 // Does not return an API instance 53848 reduce: __arrayProto.reduce || function ( fn, init ) 53849 { 53850 return _fnReduce( this, fn, init, 0, this.length, 1 ); 53851 }, 53852 53853 53854 reduceRight: __arrayProto.reduceRight || function ( fn, init ) 53855 { 53856 return _fnReduce( this, fn, init, this.length-1, -1, -1 ); 53857 }, 53858 53859 53860 reverse: __arrayProto.reverse, 53861 53862 53863 // Object with rows, columns and opts 53864 selector: null, 53865 53866 53867 shift: __arrayProto.shift, 53868 53869 53870 sort: __arrayProto.sort, // ? name - order? 53871 53872 53873 splice: __arrayProto.splice, 53874 53875 53876 toArray: function () 53877 { 53878 return __arrayProto.slice.call( this ); 53879 }, 53880 53881 53882 to$: function () 53883 { 53884 return $( this ); 53885 }, 53886 53887 53888 toJQuery: function () 53889 { 53890 return $( this ); 53891 }, 53892 53893 53894 unique: function () 53895 { 53896 return new _Api( this.context, _unique(this) ); 53897 }, 53898 53899 53900 unshift: __arrayProto.unshift 53901 } ); 53902 53903 53904 _Api.extend = function ( scope, obj, ext ) 53905 { 53906 // Only extend API instances and static properties of the API 53907 if ( ! ext.length || ! obj || ( ! (obj instanceof _Api) && ! obj.__dt_wrapper ) ) { 53908 return; 53909 } 53910 53911 var 53912 i, ien, 53913 j, jen, 53914 struct, inner, 53915 methodScoping = function ( scope, fn, struc ) { 53916 return function () { 53917 var ret = fn.apply( scope, arguments ); 53918 53919 // Method extension 53920 _Api.extend( ret, ret, struc.methodExt ); 53921 return ret; 53922 }; 53923 }; 53924 53925 for ( i=0, ien=ext.length ; i<ien ; i++ ) { 53926 struct = ext[i]; 53927 53928 // Value 53929 obj[ struct.name ] = typeof struct.val === 'function' ? 53930 methodScoping( scope, struct.val, struct ) : 53931 $.isPlainObject( struct.val ) ? 53932 {} : 53933 struct.val; 53934 53935 obj[ struct.name ].__dt_wrapper = true; 53936 53937 // Property extension 53938 _Api.extend( scope, obj[ struct.name ], struct.propExt ); 53939 } 53940 }; 53941 53942 53943 // @todo - Is there need for an augment function? 53944 // _Api.augment = function ( inst, name ) 53945 // { 53946 // // Find src object in the structure from the name 53947 // var parts = name.split('.'); 53948 53949 // _Api.extend( inst, obj ); 53950 // }; 53951 53952 53953 // [ 53954 // { 53955 // name: 'data' -- string - Property name 53956 // val: function () {}, -- function - Api method (or undefined if just an object 53957 // methodExt: [ ... ], -- array - Array of Api object definitions to extend the method result 53958 // propExt: [ ... ] -- array - Array of Api object definitions to extend the property 53959 // }, 53960 // { 53961 // name: 'row' 53962 // val: {}, 53963 // methodExt: [ ... ], 53964 // propExt: [ 53965 // { 53966 // name: 'data' 53967 // val: function () {}, 53968 // methodExt: [ ... ], 53969 // propExt: [ ... ] 53970 // }, 53971 // ... 53972 // ] 53973 // } 53974 // ] 53975 53976 _Api.register = _api_register = function ( name, val ) 53977 { 53978 if ( $.isArray( name ) ) { 53979 for ( var j=0, jen=name.length ; j<jen ; j++ ) { 53980 _Api.register( name[j], val ); 53981 } 53982 return; 53983 } 53984 53985 var 53986 i, ien, 53987 heir = name.split('.'), 53988 struct = __apiStruct, 53989 key, method; 53990 53991 var find = function ( src, name ) { 53992 for ( var i=0, ien=src.length ; i<ien ; i++ ) { 53993 if ( src[i].name === name ) { 53994 return src[i]; 53995 } 53996 } 53997 return null; 53998 }; 53999 54000 for ( i=0, ien=heir.length ; i<ien ; i++ ) { 54001 method = heir[i].indexOf('()') !== -1; 54002 key = method ?
vendor: 2,581 bytes, lines 54003-54101
54003 heir[i].replace('()', '') : 54004 heir[i]; 54005 54006 var src = find( struct, key ); 54007 if ( ! src ) { 54008 src = { 54009 name: key, 54010 val: {}, 54011 methodExt: [], 54012 propExt: [] 54013 }; 54014 struct.push( src ); 54015 } 54016 54017 if ( i === ien-1 ) { 54018 src.val = val; 54019 } 54020 else { 54021 struct = method ? 54022 src.methodExt : 54023 src.propExt; 54024 } 54025 } 54026 }; 54027 54028 54029 _Api.registerPlural = _api_registerPlural = function ( pluralName, singularName, val ) { 54030 _Api.register( pluralName, val ); 54031 54032 _Api.register( singularName, function () { 54033 var ret = val.apply( this, arguments ); 54034 54035 if ( ret === this ) { 54036 // Returned item is the API instance that was passed in, return it 54037 return this; 54038 } 54039 else if ( ret instanceof _Api ) { 54040 // New API instance returned, want the value from the first item 54041 // in the returned array for the singular result. 54042 return ret.length ? 54043 $.isArray( ret[0] ) ? 54044 new _Api( ret.context, ret[0] ) : // Array results are 'enhanced' 54045 ret[0] : 54046 undefined; 54047 } 54048 54049 // Non-API return - just fire it back 54050 return ret; 54051 } ); 54052 }; 54053 54054 54055 /** 54056 * Selector for HTML tables. Apply the given selector to the give array of 54057 * DataTables settings objects. 54058 * 54059 * @param {string|integer} [selector] jQuery selector string or integer 54060 * @param {array} Array of DataTables settings objects to be filtered 54061 * @return {array} 54062 * @ignore 54063 */ 54064 var __table_selector = function ( selector, a ) 54065 { 54066 // Integer is used to pick out a table by index 54067 if ( typeof selector === 'number' ) { 54068 return [ a[ selector ] ]; 54069 } 54070 54071 // Perform a jQuery selector on the table nodes 54072 var nodes = $.map( a, function (el, i) { 54073 return el.nTable; 54074 } ); 54075 54076 return $(nodes) 54077 .filter( selector ) 54078 .map( function (i) { 54079 // Need to translate back from the table node to the settings 54080 var idx = $.inArray( this, nodes ); 54081 return a[ idx ]; 54082 } ) 54083 .toArray(); 54084 }; 54085 54086 54087 54088 /** 54089 * Context selector for the API's context (i.e. the tables the API instance 54090 * refers to. 54091 * 54092 * @name DataTable.Api#tables 54093 * @param {string|integer} [selector] Selector to pick which tables the iterator 54094 * should operate on. If not given, all tables in the current context are 54095 * used. This can be given as a jQuery selector (for example `':gt(0)'`) to 54096 * select multiple tables or as an integer to select a single table. 54097 * @returns {DataTable.Api} Returns a new API instance if a selector is given. 54098 */ 54099 _api_register( 'tables()', function ( selector ) { 54100 // A new instance is created if there was a selector specified 54101 return selector
vendor: 9,333 bytes, lines 54101-54443
54101 ? 54102 new _Api( __table_selector( selector, this.context ) ) : 54103 this; 54104 } ); 54105 54106 54107 _api_register( 'table()', function ( selector ) { 54108 var tables = this.tables( selector ); 54109 var ctx = tables.context; 54110 54111 // Truncate to the first matched table 54112 return ctx.length ? 54113 new _Api( ctx[0] ) : 54114 tables; 54115 } ); 54116 54117 54118 _api_registerPlural( 'tables().nodes()', 'table().node()' , function () { 54119 return this.iterator( 'table', function ( ctx ) { 54120 return ctx.nTable; 54121 }, 1 ); 54122 } ); 54123 54124 54125 _api_registerPlural( 'tables().body()', 'table().body()' , function () { 54126 return this.iterator( 'table', function ( ctx ) { 54127 return ctx.nTBody; 54128 }, 1 ); 54129 } ); 54130 54131 54132 _api_registerPlural( 'tables().header()', 'table().header()' , function () { 54133 return this.iterator( 'table', function ( ctx ) { 54134 return ctx.nTHead; 54135 }, 1 ); 54136 } ); 54137 54138 54139 _api_registerPlural( 'tables().footer()', 'table().footer()' , function () { 54140 return this.iterator( 'table', function ( ctx ) { 54141 return ctx.nTFoot; 54142 }, 1 ); 54143 } ); 54144 54145 54146 _api_registerPlural( 'tables().containers()', 'table().container()' , function () { 54147 return this.iterator( 'table', function ( ctx ) { 54148 return ctx.nTableWrapper; 54149 }, 1 ); 54150 } ); 54151 54152 54153 54154 /** 54155 * Redraw the tables in the current context. 54156 */ 54157 _api_register( 'draw()', function ( paging ) { 54158 return this.iterator( 'table', function ( settings ) { 54159 if ( paging === 'page' ) { 54160 _fnDraw( settings ); 54161 } 54162 else { 54163 if ( typeof paging === 'string' ) { 54164 paging = paging === 'full-hold' ? 54165 false : 54166 true; 54167 } 54168 54169 _fnReDraw( settings, paging===false ); 54170 } 54171 } ); 54172 } ); 54173 54174 54175 54176 /** 54177 * Get the current page index. 54178 * 54179 * @return {integer} Current page index (zero based) 54180 *//** 54181 * Set the current page. 54182 * 54183 * Note that if you attempt to show a page which does not exist, DataTables will 54184 * not throw an error, but rather reset the paging. 54185 * 54186 * @param {integer|string} action The paging action to take. This can be one of: 54187 * * `integer` - The page index to jump to 54188 * * `string` - An action to take: 54189 * * `first` - Jump to first page. 54190 * * `next` - Jump to the next page 54191 * * `previous` - Jump to previous page 54192 * * `last` - Jump to the last page. 54193 * @returns {DataTables.Api} this 54194 */ 54195 _api_register( 'page()', function ( action ) { 54196 if ( action === undefined ) { 54197 return this.page.info().page; // not an expensive call 54198 } 54199 54200 // else, have an action to take on all tables 54201 return this.iterator( 'table', function ( settings ) { 54202 _fnPageChange( settings, action ); 54203 } ); 54204 } ); 54205 54206 54207 /** 54208 * Paging information for the first table in the current context. 54209 * 54210 * If you require paging information for another table, use the `table()` method 54211 * with a suitable selector. 54212 * 54213 * @return {object} Object with the following properties set: 54214 * * `page` - Current page index (zero based - i.e. the first page is `0`) 54215 * * `pages` - Total number of pages 54216 * * `start` - Display index for the first record shown on the current page 54217 * * `end` - Display index for the last record shown on the current page 54218 * * `length` - Display length (number of records). Note that generally `start 54219 * + length = end`, but this is not always true, for example if there are 54220 * only 2 records to show on the final page, with a length of 10. 54221 * * `recordsTotal` - Full data set length 54222 * * `recordsDisplay` - Data set length once the current filtering criterion 54223 * are applied. 54224 */ 54225 _api_register( 'page.info()', function ( action ) { 54226 if ( this.context.length === 0 ) { 54227 return undefined; 54228 } 54229 54230 var 54231 settings = this.context[0], 54232 start = settings._iDisplayStart, 54233 len = settings.oFeatures.bPaginate ? settings._iDisplayLength : -1, 54234 visRecords = settings.fnRecordsDisplay(), 54235 all = len === -1; 54236 54237 return { 54238 "page": all ? 0 : Math.floor( start / len ), 54239 "pages": all ? 1 : Math.ceil( visRecords / len ), 54240 "start": start, 54241 "end": settings.fnDisplayEnd(), 54242 "length": len, 54243 "recordsTotal": settings.fnRecordsTotal(), 54244 "recordsDisplay": visRecords, 54245 "serverSide": _fnDataSource( settings ) === 'ssp' 54246 }; 54247 } ); 54248 54249 54250 /** 54251 * Get the current page length. 54252 * 54253 * @return {integer} Current page length. Note `-1` indicates that all records 54254 * are to be shown. 54255 *//** 54256 * Set the current page length. 54257 * 54258 * @param {integer} Page length to set. Use `-1` to show all records. 54259 * @returns {DataTables.Api} this 54260 */ 54261 _api_register( 'page.len()', function ( len ) { 54262 // Note that we can't call this function 'length()' because `length` 54263 // is a Javascript property of functions which defines how many arguments 54264 // the function expects. 54265 if ( len === undefined ) { 54266 return this.context.length !== 0 ? 54267 this.context[0]._iDisplayLength : 54268 undefined; 54269 } 54270 54271 // else, set the page length 54272 return this.iterator( 'table', function ( settings ) { 54273 _fnLengthChange( settings, len ); 54274 } ); 54275 } ); 54276 54277 54278 54279 var __reload = function ( settings, holdPosition, callback ) { 54280 // Use the draw event to trigger a callback 54281 if ( callback ) { 54282 var api = new _Api( settings ); 54283 54284 api.one( 'draw', function () { 54285 callback( api.ajax.json() ); 54286 } ); 54287 } 54288 54289 if ( _fnDataSource( settings ) == 'ssp' ) { 54290 _fnReDraw( settings, holdPosition ); 54291 } 54292 else { 54293 _fnProcessingDisplay( settings, true ); 54294 54295 // Cancel an existing request 54296 var xhr = settings.jqXHR; 54297 if ( xhr && xhr.readyState !== 4 ) { 54298 xhr.abort(); 54299 } 54300 54301 // Trigger xhr 54302 _fnBuildAjax( settings, [], function( json ) { 54303 _fnClearTable( settings ); 54304 54305 var data = _fnAjaxDataSrc( settings, json ); 54306 for ( var i=0, ien=data.length ; i<ien ; i++ ) { 54307 _fnAddData( settings, data[i] ); 54308 } 54309 54310 _fnReDraw( settings, holdPosition ); 54311 _fnProcessingDisplay( settings, false ); 54312 } ); 54313 } 54314 }; 54315 54316 54317 /** 54318 * Get the JSON response from the last Ajax request that DataTables made to the 54319 * server. Note that this returns the JSON from the first table in the current 54320 * context. 54321 * 54322 * @return {object} JSON received from the server. 54323 */ 54324 _api_register( 'ajax.json()', function () { 54325 var ctx = this.context; 54326 54327 if ( ctx.length > 0 ) { 54328 return ctx[0].json; 54329 } 54330 54331 // else return undefined; 54332 } ); 54333 54334 54335 /** 54336 * Get the data submitted in the last Ajax request 54337 */ 54338 _api_register( 'ajax.params()', function () { 54339 var ctx = this.context; 54340 54341 if ( ctx.length > 0 ) { 54342 return ctx[0].oAjaxData; 54343 } 54344 54345 // else return undefined; 54346 } ); 54347 54348 54349 /** 54350 * Reload tables from the Ajax data source. Note that this function will 54351 * automatically re-draw the table when the remote data has been loaded. 54352 * 54353 * @param {boolean} [reset=true] Reset (default) or hold the current paging 54354 * position. A full re-sort and re-filter is performed when this method is 54355 * called, which is why the pagination reset is the default action. 54356 * @returns {DataTables.Api} this 54357 */ 54358 _api_register( 'ajax.reload()', function ( callback, resetPaging ) { 54359 return this.iterator( 'table', function (settings) { 54360 __reload( settings, resetPaging===false, callback ); 54361 } ); 54362 } ); 54363 54364 54365 /** 54366 * Get the current Ajax URL. Note that this returns the URL from the first 54367 * table in the current context. 54368 * 54369 * @return {string} Current Ajax source URL 54370 *//** 54371 * Set the Ajax URL. Note that this will set the URL for all tables in the 54372 * current context. 54373 * 54374 * @param {string} url URL to set. 54375 * @returns {DataTables.Api} this 54376 */ 54377 _api_register( 'ajax.url()', function ( url ) { 54378 var ctx = this.context; 54379 54380 if ( url === undefined ) { 54381 // get 54382 if ( ctx.length === 0 ) { 54383 return undefined; 54384 } 54385 ctx = ctx[0]; 54386 54387 return ctx.ajax ? 54388 $.isPlainObject( ctx.ajax ) ? 54389 ctx.ajax.url : 54390 ctx.ajax : 54391 ctx.sAjaxSource; 54392 } 54393 54394 // set 54395 return this.iterator( 'table', function ( settings ) { 54396 if ( $.isPlainObject( settings.ajax ) ) { 54397 settings.ajax.url = url; 54398 } 54399 else { 54400 settings.ajax = url; 54401 } 54402 // No need to consider sAjaxSource here since DataTables gives priority 54403 // to `ajax` over `sAjaxSource`. So setting `ajax` here, renders any 54404 // value of `sAjaxSource` redundant. 54405 } ); 54406 } ); 54407 54408 54409 /** 54410 * Load data from the newly set Ajax URL. Note that this method is only 54411 * available when `ajax.url()` is used to set a URL. Additionally, this method 54412 * has the same effect as calling `ajax.reload()` but is provided for 54413 * convenience when setting a new URL. Like `ajax.reload()` it will 54414 * automatically redraw the table once the remote data has been loaded. 54415 * 54416 * @returns {DataTables.Api} this 54417 */ 54418 _api_register( 'ajax.url().load()', function ( callback, resetPaging ) { 54419 // Same as a reload, but makes sense to present it for easy access after a 54420 // url change 54421 return this.iterator( 'table', function ( ctx ) { 54422 __reload( ctx, resetPaging===false, callback ); 54423 } ); 54424 } ); 54425 54426 54427 54428 54429 var _selector_run = function ( type, selector, selectFn, settings, opts ) 54430 { 54431 var 54432 out = [], res, 54433 a, i, ien, j, jen, 54434 selectorType = typeof selector; 54435 54436 // Can't just check for isArray here, as an API or jQuery instance might be 54437 // given with their array like look 54438 if ( ! selector || selectorType === 'string' || selectorType === 'function' || selector.length === undefined ) { 54439 selector = [ selector ]; 54440 } 54441 54442 for ( i=0, ien=selector.length ; i<ien ; i++ ) { 54443
54443a = selector[i] && selector[i].split ? 54444 selector[i].split(',') : 54445 [ selector[i] ]; 54446 54447 for ( j=0, jen=a.length ; j<jen ; j++ ) { 54448 res = selectFn( typeof a[j] === 'string' ? $.trim(a[j]) : a[j] ); 54449 54450 if ( res && res.length ) { 54451 out = out.concat( res ); 54452 } 54453 } 54454 } 54455 54456 // selector extensions 54457 var ext = _ext.selector[ type ]; 54458 if ( ext.length ) { 54459 for ( i=0, ien=ext.length ; i<ien ; i++ ) { 54460 out = ext[i]( settings, opts, out ); 54461 } 54462 } 54463 54464 return _unique( out ); 54465 }; 54466 54467 54468 var _selector_opts = function ( opts ) 54469 { 54470 if ( ! opts ) { 54471 opts = {}; 54472 } 54473 54474 // Backwards compatibility for 1.9- which used the terminology filter rather 54475 // than search 54476 if ( opts.filter && opts.search === undefined ) { 54477 opts.search = opts.filter; 54478 } 54479 54480 return $.extend( { 54481 search: 'none', 54482 order: 'current', 54483 page: 'all' 54484 }, opts ); 54485 }; 54486 54487 54488 var _selector_first = function ( inst ) 54489 { 54490 // Reduce the API instance to the first item found 54491 for ( var i=0, ien=inst.length ; i<ien ; i++ ) { 54492 if ( inst[i].length > 0 ) { 54493 // Assign the first element to the first item in the instance 54494 // and truncate the instance and context 54495 inst[0] = inst[i]; 54496 inst[0].length = 1; 54497 inst.length = 1; 54498 inst.context = [ inst.context[i] ]; 54499 54500 return inst; 54501 } 54502 } 54503 54504 // Not found - return an empty instance 54505 inst.length = 0; 54506 return inst; 54507 }; 54508 54509 54510 var _selector_row_indexes = function ( settings, opts ) 54511 { 54512 var 54513 i, ien, tmp, a=[], 54514 displayFiltered = settings.aiDisplay, 54515 displayMaster = settings.aiDisplayMaster; 54516 54517 var 54518 search = opts.search, // none, applied, removed 54519 order = opts.order, // applied, current, index (original - compatibility with 1.9) 54520 page = opts.page; // all, current 54521 54522 if ( _fnDataSource( settings ) == 'ssp' ) { 54523 // In server-side processing mode, most options are irrelevant since 54524 // rows not shown don't exist and the index order is the applied order 54525 // Removed is a special case - for consistency just return an empty 54526 // array 54527 return search === 'removed' ? 54528 [] : 54529 _range( 0, displayMaster.length ); 54530 } 54531 else if ( page == 'current' ) { 54532 // Current page implies that order=current and fitler=applied, since it is 54533 // fairly senseless otherwise, regardless of what order and search actually 54534 // are 54535 for ( i=settings._iDisplayStart, ien=settings.fnDisplayEnd() ; i<ien ; i++ ) { 54536 a.push( displayFiltered[i] ); 54537 } 54538 } 54539 else if ( order == 'current' || order == 'applied' ) { 54540 a = search == 'none' ? 54541 displayMaster.slice() : // no search 54542 search == 'applied' ? 54543 displayFiltered.slice() : // applied search 54544 $.map( displayMaster, function (el, i) { // removed search 54545 return $.inArray( el, displayFiltered ) === -1 ? el : null; 54546 } ); 54547 } 54548 else if ( order == 'index' || order == 'original' ) { 54549 for ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) { 54550 if ( search == 'none' ) { 54551 a.push( i ); 54552 } 54553 else { // applied | removed 54554 tmp = $.inArray( i, displayFiltered ); 54555 54556 if ((tmp === -1 && search == 'removed') || 54557 (tmp >= 0 && search == 'applied') ) 54558 { 54559 a.push( i ); 54560 } 54561 } 54562 } 54563 } 54564 54565 return a; 54566 }; 54567 54568 54569 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 54570 * Rows 54571 * 54572 * {} - no selector - use all available rows 54573 * {integer} - row aoData index 54574 * {node} - TR node 54575 * {string} - jQuery selector to apply to the TR elements 54576 * {array} - jQuery array of nodes, or simply an array of TR nodes 54577 * 54578 */ 54579 54580 54581 var __row_selector = function ( settings, selector, opts ) 54582 { 54583 var run = function ( sel ) { 54584 var selInt = _intVal( sel ); 54585 var i, ien; 54586 54587 // Short cut - selector is a number and no options provided (default is 54588 // all records, so no need to check if the index is in there, since it 54589 // must be - dev error if the index doesn't exist). 54590 if ( selInt !== null && ! opts ) { 54591 return [ selInt ]; 54592 } 54593 54594 var rows = _selector_row_indexes( settings, opts ); 54595 54596 if ( selInt !== null && $.inArray( selInt, rows ) !== -1 ) { 54597 // Selector - integer 54598 return [ selInt ]; 54599 } 54600 else if ( ! sel ) { 54601 // Selector - none 54602 return rows; 54603 } 54604 54605 // Selector - function 54606 if ( typeof sel === 'function' ) { 54607 return $.map( rows, function (idx) { 54608 var row = settings.aoData[ idx ]; 54609 return sel( idx, row._aData, row.nTr ) ? idx : null; 54610 } ); 54611 } 54612
vendor: 26,015 bytes, lines 54613-55607
54613 // Get nodes in the order from the `rows` array with null values removed 54614 var nodes = _removeEmpty( 54615 _pluck_order( settings.aoData, rows, 'nTr' ) 54616 ); 54617 54618 // Selector - node 54619 if ( sel.nodeName ) { 54620 if ( sel._DT_RowIndex !== undefined ) { 54621 return [ sel._DT_RowIndex ]; // Property added by DT for fast lookup 54622 } 54623 else if ( sel._DT_CellIndex ) { 54624 return [ sel._DT_CellIndex.row ]; 54625 } 54626 else { 54627 var host = $(sel).closest('*[data-dt-row]'); 54628 return host.length ? 54629 [ host.data('dt-row') ] : 54630 []; 54631 } 54632 } 54633 54634 // ID selector. Want to always be able to select rows by id, regardless 54635 // of if the tr element has been created or not, so can't rely upon 54636 // jQuery here - hence a custom implementation. This does not match 54637 // Sizzle's fast selector or HTML4 - in HTML5 the ID can be anything, 54638 // but to select it using a CSS selector engine (like Sizzle or 54639 // querySelect) it would need to need to be escaped for some characters. 54640 // DataTables simplifies this for row selectors since you can select 54641 // only a row. A # indicates an id any anything that follows is the id - 54642 // unescaped. 54643 if ( typeof sel === 'string' && sel.charAt(0) === '#' ) { 54644 // get row index from id 54645 var rowObj = settings.aIds[ sel.replace( /^#/, '' ) ]; 54646 if ( rowObj !== undefined ) { 54647 return [ rowObj.idx ]; 54648 } 54649 54650 // need to fall through to jQuery in case there is DOM id that 54651 // matches 54652 } 54653 54654 // Selector - jQuery selector string, array of nodes or jQuery object/ 54655 // As jQuery's .filter() allows jQuery objects to be passed in filter, 54656 // it also allows arrays, so this will cope with all three options 54657 return $(nodes) 54658 .filter( sel ) 54659 .map( function () { 54660 return this._DT_RowIndex; 54661 } ) 54662 .toArray(); 54663 }; 54664 54665 return _selector_run( 'row', selector, run, settings, opts ); 54666 }; 54667 54668 54669 _api_register( 'rows()', function ( selector, opts ) { 54670 // argument shifting 54671 if ( selector === undefined ) { 54672 selector = ''; 54673 } 54674 else if ( $.isPlainObject( selector ) ) { 54675 opts = selector; 54676 selector = ''; 54677 } 54678 54679 opts = _selector_opts( opts ); 54680 54681 var inst = this.iterator( 'table', function ( settings ) { 54682 return __row_selector( settings, selector, opts ); 54683 }, 1 ); 54684 54685 // Want argument shifting here and in __row_selector? 54686 inst.selector.rows = selector; 54687 inst.selector.opts = opts; 54688 54689 return inst; 54690 } ); 54691 54692 _api_register( 'rows().nodes()', function () { 54693 return this.iterator( 'row', function ( settings, row ) { 54694 return settings.aoData[ row ].nTr || undefined; 54695 }, 1 ); 54696 } ); 54697 54698 _api_register( 'rows().data()', function () { 54699 return this.iterator( true, 'rows', function ( settings, rows ) { 54700 return _pluck_order( settings.aoData, rows, '_aData' ); 54701 }, 1 ); 54702 } ); 54703 54704 _api_registerPlural( 'rows().cache()', 'row().cache()', function ( type ) { 54705 return this.iterator( 'row', function ( settings, row ) { 54706 var r = settings.aoData[ row ]; 54707 return type === 'search' ? r._aFilterData : r._aSortData; 54708 }, 1 ); 54709 } ); 54710 54711 _api_registerPlural( 'rows().invalidate()', 'row().invalidate()', function ( src ) { 54712 return this.iterator( 'row', function ( settings, row ) { 54713 _fnInvalidate( settings, row, src ); 54714 } ); 54715 } ); 54716 54717 _api_registerPlural( 'rows().indexes()', 'row().index()', function () { 54718 return this.iterator( 'row', function ( settings, row ) { 54719 return row; 54720 }, 1 ); 54721 } ); 54722 54723 _api_registerPlural( 'rows().ids()', 'row().id()', function ( hash ) { 54724 var a = []; 54725 var context = this.context; 54726 54727 // `iterator` will drop undefined values, but in this case we want them 54728 for ( var i=0, ien=context.length ; i<ien ; i++ ) { 54729 for ( var j=0, jen=this[i].length ; j<jen ; j++ ) { 54730 var id = context[i].rowIdFn( context[i].aoData[ this[i][j] ]._aData ); 54731 a.push( (hash === true ? '#' : '' )+ id ); 54732 } 54733 } 54734 54735 return new _Api( context, a ); 54736 } ); 54737 54738 _api_registerPlural( 'rows().remove()', 'row().remove()', function () { 54739 var that = this; 54740 54741 this.iterator( 'row', function ( settings, row, thatIdx ) { 54742 var data = settings.aoData; 54743 var rowData = data[ row ]; 54744 var i, ien, j, jen; 54745 var loopRow, loopCells; 54746 54747 data.splice( row, 1 ); 54748 54749 // Update the cached indexes 54750 for ( i=0, ien=data.length ; i<ien ; i++ ) { 54751 loopRow = data[i]; 54752 loopCells = loopRow.anCells; 54753 54754 // Rows 54755 if ( loopRow.nTr !== null ) { 54756 loopRow.nTr._DT_RowIndex = i; 54757 } 54758 54759 // Cells 54760 if ( loopCells !== null ) { 54761 for ( j=0, jen=loopCells.length ; j<jen ; j++ ) { 54762 loopCells[j]._DT_CellIndex.row = i; 54763 } 54764 } 54765 } 54766 54767 // Delete from the display arrays 54768 _fnDeleteIndex( settings.aiDisplayMaster, row ); 54769 _fnDeleteIndex( settings.aiDisplay, row ); 54770 _fnDeleteIndex( that[ thatIdx ], row, false ); // maintain local indexes 54771 54772 // Check for an 'overflow' they case for displaying the table 54773 _fnLengthOverflow( settings ); 54774 54775 // Remove the row's ID reference if there is one 54776 var id = settings.rowIdFn( rowData._aData ); 54777 if ( id !== undefined ) { 54778 delete settings.aIds[ id ]; 54779 } 54780 } ); 54781 54782 this.iterator( 'table', function ( settings ) { 54783 for ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) { 54784 settings.aoData[i].idx = i; 54785 } 54786 } ); 54787 54788 return this; 54789 } ); 54790 54791 54792 _api_register( 'rows.add()', function ( rows ) { 54793 var newRows = this.iterator( 'table', function ( settings ) { 54794 var row, i, ien; 54795 var out = []; 54796 54797 for ( i=0, ien=rows.length ; i<ien ; i++ ) { 54798 row = rows[i]; 54799 54800 if ( row.nodeName && row.nodeName.toUpperCase() === 'TR' ) { 54801 out.push( _fnAddTr( settings, row )[0] ); 54802 } 54803 else { 54804 out.push( _fnAddData( settings, row ) ); 54805 } 54806 } 54807 54808 return out; 54809 }, 1 ); 54810 54811 // Return an Api.rows() extended instance, so rows().nodes() etc can be used 54812 var modRows = this.rows( -1 ); 54813 modRows.pop(); 54814 $.merge( modRows, newRows ); 54815 54816 return modRows; 54817 } ); 54818 54819 54820 54821 54822 54823 /** 54824 * 54825 */ 54826 _api_register( 'row()', function ( selector, opts ) { 54827 return _selector_first( this.rows( selector, opts ) ); 54828 } ); 54829 54830 54831 _api_register( 'row().data()', function ( data ) { 54832 var ctx = this.context; 54833 54834 if ( data === undefined ) { 54835 // Get 54836 return ctx.length && this.length ? 54837 ctx[0].aoData[ this[0] ]._aData : 54838 undefined; 54839 } 54840 54841 // Set 54842 ctx[0].aoData[ this[0] ]._aData = data; 54843 54844 // Automatically invalidate 54845 _fnInvalidate( ctx[0], this[0], 'data' ); 54846 54847 return this; 54848 } ); 54849 54850 54851 _api_register( 'row().node()', function () { 54852 var ctx = this.context; 54853 54854 return ctx.length && this.length ? 54855 ctx[0].aoData[ this[0] ].nTr || null : 54856 null; 54857 } ); 54858 54859 54860 _api_register( 'row.add()', function ( row ) { 54861 // Allow a jQuery object to be passed in - only a single row is added from 54862 // it though - the first element in the set 54863 if ( row instanceof $ && row.length ) { 54864 row = row[0]; 54865 } 54866 54867 var rows = this.iterator( 'table', function ( settings ) { 54868 if ( row.nodeName && row.nodeName.toUpperCase() === 'TR' ) { 54869 return _fnAddTr( settings, row )[0]; 54870 } 54871 return _fnAddData( settings, row ); 54872 } ); 54873 54874 // Return an Api.rows() extended instance, with the newly added row selected 54875 return this.row( rows[0] ); 54876 } ); 54877 54878 54879 54880 var __details_add = function ( ctx, row, data, klass ) 54881 { 54882 // Convert to array of TR elements 54883 var rows = []; 54884 var addRow = function ( r, k ) { 54885 // Recursion to allow for arrays of jQuery objects 54886 if ( $.isArray( r ) || r instanceof $ ) { 54887 for ( var i=0, ien=r.length ; i<ien ; i++ ) { 54888 addRow( r[i], k ); 54889 } 54890 return; 54891 } 54892 54893 // If we get a TR element, then just add it directly - up to the dev 54894 // to add the correct number of columns etc 54895 if ( r.nodeName && r.nodeName.toLowerCase() === 'tr' ) { 54896 rows.push( r ); 54897 } 54898 else { 54899 // Otherwise create a row with a wrapper 54900 var created = $('<tr><td/></tr>').addClass( k ); 54901 $('td', created) 54902 .addClass( k ) 54903 .html( r ) 54904 [0].colSpan = _fnVisbleColumns( ctx ); 54905 54906 rows.push( created[0] ); 54907 } 54908 }; 54909 54910 addRow( data, klass ); 54911 54912 if ( row._details ) { 54913 row._details.remove(); 54914 } 54915 54916 row._details = $(rows); 54917 54918 // If the children were already shown, that state should be retained 54919 if ( row._detailsShow ) { 54920 row._details.insertAfter( row.nTr ); 54921 } 54922 }; 54923 54924 54925 var __details_remove = function ( api, idx ) 54926 { 54927 var ctx = api.context; 54928 54929 if ( ctx.length ) { 54930 var row = ctx[0].aoData[ idx !== undefined ? idx : api[0] ]; 54931 54932 if ( row && row._details ) { 54933 row._details.remove(); 54934 54935 row._detailsShow = undefined; 54936 row._details = undefined; 54937 } 54938 } 54939 }; 54940 54941 54942 var __details_display = function ( api, show ) { 54943 var ctx = api.context; 54944 54945 if ( ctx.length && api.length ) { 54946 var row = ctx[0].aoData[ api[0] ]; 54947 54948 if ( row._details ) { 54949 row._detailsShow = show; 54950 54951 if ( show ) { 54952 row._details.insertAfter( row.nTr ); 54953 } 54954 else { 54955 row._details.detach(); 54956 } 54957 54958 __details_events( ctx[0] ); 54959 } 54960 } 54961 }; 54962 54963 54964 var __details_events = function ( settings ) 54965 { 54966 var api = new _Api( settings ); 54967 var namespace = '.dt.DT_details'; 54968 var drawEvent = 'draw'+namespace; 54969 var colvisEvent = 'column-visibility'+namespace; 54970 var destroyEvent = 'destroy'+namespace; 54971 var data = settings.aoData; 54972 54973 api.off( drawEvent +' '+ colvisEvent +' '+ destroyEvent ); 54974 54975 if ( _pluck( data, '_details' ).length > 0 ) { 54976 // On each draw, insert the required elements into the document 54977 api.on( drawEvent, function ( e, ctx ) { 54978 if ( settings !== ctx ) { 54979 return; 54980 } 54981 54982 api.rows( {page:'current'} ).eq(0).each( function (idx) { 54983 // Internal data grab 54984 var row = data[ idx ]; 54985 54986 if ( row._detailsShow ) { 54987 row._details.insertAfter( row.nTr ); 54988 } 54989 } ); 54990 } ); 54991 54992 // Column visibility change - update the colspan 54993 api.on( colvisEvent, function ( e, ctx, idx, vis ) { 54994 if ( settings !== ctx ) { 54995 return; 54996 } 54997 54998 // Update the colspan for the details rows (note, only if it already has 54999 // a colspan) 55000 var row, visible = _fnVisbleColumns( ctx ); 55001 55002 for ( var i=0, ien=data.length ; i<ien ; i++ ) { 55003 row = data[i]; 55004 55005 if ( row._details ) { 55006 row._details.children('td[colspan]').attr('colspan', visible ); 55007 } 55008 } 55009 } ); 55010 55011 // Table destroyed - nuke any child rows 55012 api.on( destroyEvent, function ( e, ctx ) { 55013 if ( settings !== ctx ) { 55014 return; 55015 } 55016 55017 for ( var i=0, ien=data.length ; i<ien ; i++ ) { 55018 if ( data[i]._details ) { 55019 __details_remove( api, i ); 55020 } 55021 } 55022 } ); 55023 } 55024 }; 55025 55026 // Strings for the method names to help minification 55027 var _emp = ''; 55028 var _child_obj = _emp+'row().child'; 55029 var _child_mth = _child_obj+'()'; 55030 55031 // data can be: 55032 // tr 55033 // string 55034 // jQuery or array of any of the above 55035 _api_register( _child_mth, function ( data, klass ) { 55036 var ctx = this.context; 55037 55038 if ( data === undefined ) { 55039 // get 55040 return ctx.length && this.length ? 55041 ctx[0].aoData[ this[0] ]._details : 55042 undefined; 55043 } 55044 else if ( data === true ) { 55045 // show 55046 this.child.show(); 55047 } 55048 else if ( data === false ) { 55049 // remove 55050 __details_remove( this ); 55051 } 55052 else if ( ctx.length && this.length ) { 55053 // set 55054 __details_add( ctx[0], ctx[0].aoData[ this[0] ], data, klass ); 55055 } 55056 55057 return this; 55058 } ); 55059 55060 55061 _api_register( [ 55062 _child_obj+'.show()', 55063 _child_mth+'.show()' // only when `child()` was called with parameters (without 55064 ], function ( show ) { // it returns an object and this method is not executed) 55065 __details_display( this, true ); 55066 return this; 55067 } ); 55068 55069 55070 _api_register( [ 55071 _child_obj+'.hide()', 55072 _child_mth+'.hide()' // only when `child()` was called with parameters (without 55073 ], function () { // it returns an object and this method is not executed) 55074 __details_display( this, false ); 55075 return this; 55076 } ); 55077 55078 55079 _api_register( [ 55080 _child_obj+'.remove()', 55081 _child_mth+'.remove()' // only when `child()` was called with parameters (without 55082 ], function () { // it returns an object and this method is not executed) 55083 __details_remove( this ); 55084 return this; 55085 } ); 55086 55087 55088 _api_register( _child_obj+'.isShown()', function () { 55089 var ctx = this.context; 55090 55091 if ( ctx.length && this.length ) { 55092 // _detailsShown as false or undefined will fall through to return false 55093 return ctx[0].aoData[ this[0] ]._detailsShow || false; 55094 } 55095 return false; 55096 } ); 55097 55098 55099 55100 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 55101 * Columns 55102 * 55103 * {integer} - column index (>=0 count from left, <0 count from right) 55104 * "{integer}:visIdx" - visible column index (i.e. translate to column index) (>=0 count from left, <0 count from right) 55105 * "{integer}:visible" - alias for {integer}:visIdx (>=0 count from left, <0 count from right) 55106 * "{string}:name" - column name 55107 * "{string}" - jQuery selector on column header nodes 55108 * 55109 */ 55110 55111 // can be an array of these items, comma separated list, or an array of comma 55112 // separated lists 55113 55114 var __re_column_selector = /^(.+):(name|visIdx|visible)$/; 55115 55116 55117 // r1 and r2 are redundant - but it means that the parameters match for the 55118 // iterator callback in columns().data() 55119 var __columnData = function ( settings, column, r1, r2, rows ) { 55120 var a = []; 55121 for ( var row=0, ien=rows.length ; row<ien ; row++ ) { 55122 a.push( _fnGetCellData( settings, rows[row], column ) ); 55123 } 55124 return a; 55125 }; 55126 55127 55128 var __column_selector = function ( settings, selector, opts ) 55129 { 55130 var 55131 columns = settings.aoColumns, 55132 names = _pluck( columns, 'sName' ), 55133 nodes = _pluck( columns, 'nTh' ); 55134 55135 var run = function ( s ) { 55136 var selInt = _intVal( s ); 55137 55138 // Selector - all 55139 if ( s === '' ) { 55140 return _range( columns.length ); 55141 } 55142 55143 // Selector - index 55144 if ( selInt !== null ) { 55145 return [ selInt >= 0 ? 55146 selInt : // Count from left 55147 columns.length + selInt // Count from right (+ because its a negative value) 55148 ]; 55149 } 55150 55151 // Selector = function 55152 if ( typeof s === 'function' ) { 55153 var rows = _selector_row_indexes( settings, opts ); 55154 55155 return $.map( columns, function (col, idx) { 55156 return s( 55157 idx, 55158 __columnData( settings, idx, 0, 0, rows ), 55159 nodes[ idx ] 55160 ) ? idx : null; 55161 } ); 55162 } 55163 55164 // jQuery or string selector 55165 var match = typeof s === 'string' ? 55166 s.match( __re_column_selector ) : 55167 ''; 55168 55169 if ( match ) { 55170 switch( match[2] ) { 55171 case 'visIdx': 55172 case 'visible': 55173 var idx = parseInt( match[1], 10 ); 55174 // Visible index given, convert to column index 55175 if ( idx < 0 ) { 55176 // Counting from the right 55177 var visColumns = $.map( columns, function (col,i) { 55178 return col.bVisible ? i : null; 55179 } ); 55180 return [ visColumns[ visColumns.length + idx ] ]; 55181 } 55182 // Counting from the left 55183 return [ _fnVisibleToColumnIndex( settings, idx ) ]; 55184 55185 case 'name': 55186 // match by name. `names` is column index complete and in order 55187 return $.map( names, function (name, i) { 55188 return name === match[1] ? i : null; 55189 } ); 55190 55191 default: 55192 return []; 55193 } 55194 } 55195 55196 // Cell in the table body 55197 if ( s.nodeName && s._DT_CellIndex ) { 55198 return [ s._DT_CellIndex.column ]; 55199 } 55200 55201 // jQuery selector on the TH elements for the columns 55202 var jqResult = $( nodes ) 55203 .filter( s ) 55204 .map( function () { 55205 return $.inArray( this, nodes ); // `nodes` is column index complete and in order 55206 } ) 55207 .toArray(); 55208 55209 if ( jqResult.length || ! s.nodeName ) { 55210 return jqResult; 55211 } 55212 55213 // Otherwise a node which might have a `dt-column` data attribute, or be 55214 // a child or such an element 55215 var host = $(s).closest('*[data-dt-column]'); 55216 return host.length ? 55217 [ host.data('dt-column') ] : 55218 []; 55219 }; 55220 55221 return _selector_run( 'column', selector, run, settings, opts ); 55222 }; 55223 55224 55225 var __setColumnVis = function ( settings, column, vis, recalc ) { 55226 var 55227 cols = settings.aoColumns, 55228 col = cols[ column ], 55229 data = settings.aoData, 55230 row, cells, i, ien, tr; 55231 55232 // Get 55233 if ( vis === undefined ) { 55234 return col.bVisible; 55235 } 55236 55237 // Set 55238 // No change 55239 if ( col.bVisible === vis ) { 55240 return; 55241 } 55242 55243 if ( vis ) { 55244 // Insert column 55245 // Need to decide if we should use appendChild or insertBefore 55246 var insertBefore = $.inArray( true, _pluck(cols, 'bVisible'), column+1 ); 55247 55248 for ( i=0, ien=data.length ; i<ien ; i++ ) { 55249 tr = data[i].nTr; 55250 cells = data[i].anCells; 55251 55252 if ( tr ) { 55253 // insertBefore can act like appendChild if 2nd arg is null 55254 tr.insertBefore( cells[ column ], cells[ insertBefore ] || null ); 55255 } 55256 } 55257 } 55258 else { 55259 // Remove column 55260 $( _pluck( settings.aoData, 'anCells', column ) ).detach(); 55261 } 55262 55263 // Common actions 55264 col.bVisible = vis; 55265 _fnDrawHead( settings, settings.aoHeader ); 55266 _fnDrawHead( settings, settings.aoFooter ); 55267 55268 if ( recalc === undefined || recalc ) { 55269 // Automatically adjust column sizing 55270 _fnAdjustColumnSizing( settings ); 55271 } 55272 55273 _fnCallbackFire( settings, null, 'column-visibility', [settings, column, vis, recalc] ); 55274 55275 _fnSaveState( settings ); 55276 }; 55277 55278 55279 _api_register( 'columns()', function ( selector, opts ) { 55280 // argument shifting 55281 if ( selector === undefined ) { 55282 selector = ''; 55283 } 55284 else if ( $.isPlainObject( selector ) ) { 55285 opts = selector; 55286 selector = ''; 55287 } 55288 55289 opts = _selector_opts( opts ); 55290 55291 var inst = this.iterator( 'table', function ( settings ) { 55292 return __column_selector( settings, selector, opts ); 55293 }, 1 ); 55294 55295 // Want argument shifting here and in _row_selector? 55296 inst.selector.cols = selector; 55297 inst.selector.opts = opts; 55298 55299 return inst; 55300 } ); 55301 55302 _api_registerPlural( 'columns().header()', 'column().header()', function ( selector, opts ) { 55303 return this.iterator( 'column', function ( settings, column ) { 55304 return settings.aoColumns[column].nTh; 55305 }, 1 ); 55306 } ); 55307 55308 _api_registerPlural( 'columns().footer()', 'column().footer()', function ( selector, opts ) { 55309 return this.iterator( 'column', function ( settings, column ) { 55310 return settings.aoColumns[column].nTf; 55311 }, 1 ); 55312 } ); 55313 55314 _api_registerPlural( 'columns().data()', 'column().data()', function () { 55315 return this.iterator( 'column-rows', __columnData, 1 ); 55316 } ); 55317 55318 _api_registerPlural( 'columns().dataSrc()', 'column().dataSrc()', function () { 55319 return this.iterator( 'column', function ( settings, column ) { 55320 return settings.aoColumns[column].mData; 55321 }, 1 ); 55322 } ); 55323 55324 _api_registerPlural( 'columns().cache()', 'column().cache()', function ( type ) { 55325 return this.iterator( 'column-rows', function ( settings, column, i, j, rows ) { 55326 return _pluck_order( settings.aoData, rows, 55327 type === 'search' ? '_aFilterData' : '_aSortData', column 55328 ); 55329 }, 1 ); 55330 } ); 55331 55332 _api_registerPlural( 'columns().nodes()', 'column().nodes()', function () { 55333 return this.iterator( 'column-rows', function ( settings, column, i, j, rows ) { 55334 return _pluck_order( settings.aoData, rows, 'anCells', column ) ; 55335 }, 1 ); 55336 } ); 55337 55338 _api_registerPlural( 'columns().visible()', 'column().visible()', function ( vis, calc ) { 55339 return this.iterator( 'column', function ( settings, column ) { 55340 if ( vis === undefined ) { 55341 return settings.aoColumns[ column ].bVisible; 55342 } // else 55343 __setColumnVis( settings, column, vis, calc ); 55344 } ); 55345 } ); 55346 55347 _api_registerPlural( 'columns().indexes()', 'column().index()', function ( type ) { 55348 return this.iterator( 'column', function ( settings, column ) { 55349 return type === 'visible' ? 55350 _fnColumnIndexToVisible( settings, column ) : 55351 column; 55352 }, 1 ); 55353 } ); 55354 55355 _api_register( 'columns.adjust()', function () { 55356 return this.iterator( 'table', function ( settings ) { 55357 _fnAdjustColumnSizing( settings ); 55358 }, 1 ); 55359 } ); 55360 55361 _api_register( 'column.index()', function ( type, idx ) { 55362 if ( this.context.length !== 0 ) { 55363 var ctx = this.context[0]; 55364 55365 if ( type === 'fromVisible' || type === 'toData' ) { 55366 return _fnVisibleToColumnIndex( ctx, idx ); 55367 } 55368 else if ( type === 'fromData' || type === 'toVisible' ) { 55369 return _fnColumnIndexToVisible( ctx, idx ); 55370 } 55371 } 55372 } ); 55373 55374 _api_register( 'column()', function ( selector, opts ) { 55375 return _selector_first( this.columns( selector, opts ) ); 55376 } ); 55377 55378 55379 55380 55381 var __cell_selector = function ( settings, selector, opts ) 55382 { 55383 var data = settings.aoData; 55384 var rows = _selector_row_indexes( settings, opts ); 55385 var cells = _removeEmpty( _pluck_order( data, rows, 'anCells' ) ); 55386 var allCells = $( [].concat.apply([], cells) ); 55387 var row; 55388 var columns = settings.aoColumns.length; 55389 var a, i, ien, j, o, host; 55390 55391 var run = function ( s ) { 55392 var fnSelector = typeof s === 'function'; 55393 55394 if ( s === null || s === undefined || fnSelector ) { 55395 // All cells and function selectors 55396 a = []; 55397 55398 for ( i=0, ien=rows.length ; i<ien ; i++ ) { 55399 row = rows[i]; 55400 55401 for ( j=0 ; j<columns ; j++ ) { 55402 o = { 55403 row: row, 55404 column: j 55405 }; 55406 55407 if ( fnSelector ) { 55408 // Selector - function 55409 host = data[ row ]; 55410 55411 if ( s( o, _fnGetCellData(settings, row, j), host.anCells ? host.anCells[j] : null ) ) { 55412 a.push( o ); 55413 } 55414 } 55415 else { 55416 // Selector - all 55417 a.push( o ); 55418 } 55419 } 55420 } 55421 55422 return a; 55423 } 55424 55425 // Selector - index 55426 if ( $.isPlainObject( s ) ) { 55427 return [s]; 55428 } 55429 55430 // Selector - jQuery filtered cells 55431 var jqResult = allCells 55432 .filter( s ) 55433 .map( function (i, el) { 55434 return { // use a new object, in case someone changes the values 55435 row: el._DT_CellIndex.row, 55436 column: el._DT_CellIndex.column 55437 }; 55438 } ) 55439 .toArray(); 55440 55441 if ( jqResult.length || ! s.nodeName ) { 55442 return jqResult; 55443 } 55444 55445 // Otherwise the selector is a node, and there is one last option - the 55446 // element might be a child of an element which has dt-row and dt-column 55447 // data attributes 55448 host = $(s).closest('*[data-dt-row]'); 55449 return host.length ? 55450 [ { 55451 row: host.data('dt-row'), 55452 column: host.data('dt-column') 55453 } ] : 55454 []; 55455 }; 55456 55457 return _selector_run( 'cell', selector, run, settings, opts ); 55458 }; 55459 55460 55461 55462 55463 _api_register( 'cells()', function ( rowSelector, columnSelector, opts ) { 55464 // Argument shifting 55465 if ( $.isPlainObject( rowSelector ) ) { 55466 // Indexes 55467 if ( rowSelector.row === undefined ) { 55468 // Selector options in first parameter 55469 opts = rowSelector; 55470 rowSelector = null; 55471 } 55472 else { 55473 // Cell index objects in first parameter 55474 opts = columnSelector; 55475 columnSelector = null; 55476 } 55477 } 55478 if ( $.isPlainObject( columnSelector ) ) { 55479 opts = columnSelector; 55480 columnSelector = null; 55481 } 55482 55483 // Cell selector 55484 if ( columnSelector === null || columnSelector === undefined ) { 55485 return this.iterator( 'table', function ( settings ) { 55486 return __cell_selector( settings, rowSelector, _selector_opts( opts ) ); 55487 } ); 55488 } 55489 55490 // Row + column selector 55491 var columns = this.columns( columnSelector, opts ); 55492 var rows = this.rows( rowSelector, opts ); 55493 var a, i, ien, j, jen; 55494 55495 var cells = this.iterator( 'table', function ( settings, idx ) { 55496 a = []; 55497 55498 for ( i=0, ien=rows[idx].length ; i<ien ; i++ ) { 55499 for ( j=0, jen=columns[idx].length ; j<jen ; j++ ) { 55500 a.push( { 55501 row: rows[idx][i], 55502 column: columns[idx][j] 55503 } ); 55504 } 55505 } 55506 55507 return a; 55508 }, 1 ); 55509 55510 $.extend( cells.selector, { 55511 cols: columnSelector, 55512 rows: rowSelector, 55513 opts: opts 55514 } ); 55515 55516 return cells; 55517 } ); 55518 55519 55520 _api_registerPlural( 'cells().nodes()', 'cell().node()', function () { 55521 return this.iterator( 'cell', function ( settings, row, column ) { 55522 var data = settings.aoData[ row ]; 55523 55524 return data && data.anCells ? 55525 data.anCells[ column ] : 55526 undefined; 55527 }, 1 ); 55528 } ); 55529 55530 55531 _api_register( 'cells().data()', function () { 55532 return this.iterator( 'cell', function ( settings, row, column ) { 55533 return _fnGetCellData( settings, row, column ); 55534 }, 1 ); 55535 } ); 55536 55537 55538 _api_registerPlural( 'cells().cache()', 'cell().cache()', function ( type ) { 55539 type = type === 'search' ? '_aFilterData' : '_aSortData'; 55540 55541 return this.iterator( 'cell', function ( settings, row, column ) { 55542 return settings.aoData[ row ][ type ][ column ]; 55543 }, 1 ); 55544 } ); 55545 55546 55547 _api_registerPlural( 'cells().render()', 'cell().render()', function ( type ) { 55548 return this.iterator( 'cell', function ( settings, row, column ) { 55549 return _fnGetCellData( settings, row, column, type ); 55550 }, 1 ); 55551 } ); 55552 55553 55554 _api_registerPlural( 'cells().indexes()', 'cell().index()', function () { 55555 return this.iterator( 'cell', function ( settings, row, column ) { 55556 return { 55557 row: row, 55558 column: column, 55559 columnVisible: _fnColumnIndexToVisible( settings, column ) 55560 }; 55561 }, 1 ); 55562 } ); 55563 55564 55565 _api_registerPlural( 'cells().invalidate()', 'cell().invalidate()', function ( src ) { 55566 return this.iterator( 'cell', function ( settings, row, column ) { 55567 _fnInvalidate( settings, row, src, column ); 55568 } ); 55569 } ); 55570 55571 55572 55573 _api_register( 'cell()', function ( rowSelector, columnSelector, opts ) { 55574 return _selector_first( this.cells( rowSelector, columnSelector, opts ) ); 55575 } ); 55576 55577 55578 _api_register( 'cell().data()', function ( data ) { 55579 var ctx = this.context; 55580 var cell = this[0]; 55581 55582 if ( data === undefined ) { 55583 // Get 55584 return ctx.length && cell.length ? 55585 _fnGetCellData( ctx[0], cell[0].row, cell[0].column ) : 55586 undefined; 55587 } 55588 55589 // Set 55590 _fnSetCellData( ctx[0], cell[0].row, cell[0].column, data ); 55591 _fnInvalidate( ctx[0], cell[0].row, 'data', cell[0].column ); 55592 55593 return this; 55594 } ); 55595 55596 55597 55598 /** 55599 * Get current ordering (sorting) that has been applied to the table. 55600 * 55601 * @returns {array} 2D array containing the sorting information for the first 55602 * table in the current context. Each element in the parent array represents 55603 * a column being sorted upon (i.e. multi-sorting with two columns would have 55604 * 2 inner arrays). The inner arrays may have 2 or 3 elements. The first is 55605 * the column index that the sorting condition applies to, the second is the 55606 * direction of the sort (`desc` or `asc`) and, optionally, the third is the 55607 * index of the sorting order from the `column.sorting` initialisation array.
55608 *//** 55609 * Set the ordering for the table. 55610 * 55611 * @param {integer} order Column index to sort upon. 55612 * @param {string} direction Direction of the sort to be applied (`asc` or `desc`) 55613 * @returns {DataTables.Api} this 55614 *//** 55615 * Set the ordering for the table. 55616 * 55617 * @param {array} order 1D array of sorting information to be applied. 55618 * @param {array} [...] Optional additional sorting conditions 55619 * @returns {DataTables.Api} this 55620 *//** 55621 * Set the ordering for the table. 55622 * 55623 * @param {array} order 2D array of sorting information to be applied. 55624 * @returns {DataTables.Api} this 55625 */ 55626 _api_register( 'order()', function ( order, dir ) { 55627 var ctx = this.context; 55628 55629 if ( order === undefined ) { 55630 // get 55631 return ctx.length !== 0 ? 55632 ctx[0].aaSorting : 55633 undefined; 55634 } 55635 55636 // set 55637 if ( typeof order === 'number' ) { 55638 // Simple column / direction passed in 55639 order = [ [ order, dir ] ]; 55640 } 55641 else if ( ! $.isArray( order[0] ) ) { 55642 // Arguments passed in (list of 1D arrays) 55643 order = Array.prototype.slice.call( arguments ); 55644 } 55645 // otherwise a 2D array was passed in 55646 55647 return this.iterator( 'table', function ( settings ) { 55648 settings.aaSorting = order.slice(); 55649 } ); 55650 } ); 55651 55652 55653 /** 55654 * Attach a sort listener to an element for a given column 55655 * 55656 * @param {node|jQuery|string} node Identifier for the element(s) to attach the 55657 * listener to. This can take the form of a single DOM node, a jQuery 55658 * collection of nodes or a jQuery selector which will identify the node(s). 55659 * @param {integer} column the column that a click on this node will sort on 55660 * @param {function} [callback] callback function when sort is run 55661 * @returns {DataTables.Api} this 55662 */ 55663 _api_register( 'order.listener()', function ( node, column, callback ) { 55664 return this.iterator( 'table', function ( settings ) { 55665 _fnSortAttachListener( settings, node, column, callback ); 55666 } ); 55667 } ); 55668 55669 55670 _api_register( 'order.fixed()', function ( set ) { 55671 if ( ! set ) { 55672 var ctx = this.context; 55673 var fixed = ctx.length ? 55674 ctx[0].aaSortingFixed : 55675 undefined; 55676 55677 return $.isArray( fixed ) ? 55678 { pre: fixed } : 55679 fixed; 55680 } 55681 55682 return this.iterator( 'table', function ( settings ) { 55683 settings.aaSortingFixed = $.extend( true, {}, set ); 55684 } ); 55685 } ); 55686 55687 55688 // Order by the selected column(s) 55689 _api_register( [ 55690 'columns().order()', 55691 'column().order()' 55692 ], function ( dir ) { 55693 var that = this; 55694 55695 return this.iterator( 'table', function ( settings, i ) { 55696 var sort = []; 55697 55698 $.each( that[i], function (j, col) { 55699 sort.push( [ col, dir ] ); 55700 } ); 55701 55702 settings.aaSorting = sort; 55703 } ); 55704 } ); 55705 55706 55707 55708 _api_register( 'search()', function ( input, regex, smart, caseInsen ) { 55709 var ctx = this.context; 55710 55711 if ( input === undefined ) { 55712 // get 55713 return ctx.length !== 0 ? 55714 ctx[0].oPreviousSearch.sSearch : 55715 undefined; 55716 } 55717 55718 // set 55719 return this.iterator( 'table', function ( settings ) { 55720 if ( ! settings.oFeatures.bFilter ) { 55721 return; 55722 } 55723 55724 _fnFilterComplete( settings, $.extend( {}, settings.oPreviousSearch, { 55725 "sSearch": input+"", 55726 "bRegex": regex === null ? false : regex, 55727 "bSmart": smart === null ? true : smart, 55728 "bCaseInsensitive": caseInsen === null ? true : caseInsen 55729 } ), 1 ); 55730 } ); 55731 } ); 55732 55733 55734 _api_registerPlural( 55735 'columns().search()', 55736 'column().search()', 55737 function ( input, regex, smart, caseInsen ) { 55738 return this.iterator( 'column', function ( settings, column ) { 55739 var preSearch = settings.aoPreSearchCols; 55740 55741 if ( input === undefined ) { 55742 // get 55743 return preSearch[ column ].sSearch; 55744 } 55745 55746 // set 55747 if ( ! settings.oFeatures.bFilter ) { 55748 return; 55749 } 55750 55751 $.extend( preSearch[ column ], { 55752 "sSearch": input+"", 55753 "bRegex": regex === null ? false : regex, 55754 "bSmart": smart === null ? true : smart, 55755 "bCaseInsensitive": caseInsen === null ? true : caseInsen 55756 } ); 55757 55758 _fnFilterComplete( settings, settings.oPreviousSearch, 1 ); 55759 } ); 55760 } 55761 ); 55762 55763 /* 55764 * State API methods 55765 */ 55766 55767 _api_register( 'state()', function () { 55768 return this.context.length ? 55769 this.context[0].oSavedState : 55770 null; 55771 } ); 55772 55773 55774 _api_register( 'state.clear()', function () { 55775 return this.iterator( 'table', function ( settings ) { 55776 // Save an empty object 55777 settings.fnStateSaveCallback.call( settings.oInstance, settings, {} ); 55778 } ); 55779 } ); 55780 55781 55782 _api_register( 'state.loaded()', function () { 55783 return this.context.length ? 55784 this.context[0].oLoadedState : 55785 null; 55786 } ); 55787 55788 55789 _api_register( 'state.save()', function () { 55790 return this.iterator( 'table', function ( settings ) { 55791 _fnSaveState( settings ); 55792 } ); 55793 } ); 55794 55795 55796 55797 /**
55798 * Provide a common method for plug-ins to check the version of DataTables being 55799 * used, in order to ensure compatibility. 55800 * 55801 * @param {string} version Version string to check for, in the format "X.Y.Z". 55802 * Note that the formats "X" and "X.Y" are also acceptable. 55803 * @returns {boolean} true if this version of DataTables is greater or equal to 55804 * the required version, or false if this version of DataTales is not 55805 * suitable 55806 * @static 55807 * @dtopt API-Static 55808 * 55809 * @example 55810 * alert( $.fn.dataTable.versionCheck( '1.9.0' ) ); 55811 */ 55812 DataTable.versionCheck = DataTable.fnVersionCheck = function( version ) 55813 { 55814 var aThis = DataTable.version.split('.'); 55815 var aThat = version.split('.'); 55816 var iThis, iThat; 55817 55818 for ( var i=0, iLen=aThat.length ; i<iLen ; i++ ) { 55819 iThis = parseInt( aThis[i], 10 ) || 0; 55820 iThat = parseInt( aThat[i], 10 ) || 0; 55821 55822 // Parts are the same, keep comparing 55823 if (iThis === iThat) { 55824 continue; 55825 } 55826 55827 // Parts are different, return immediately 55828 return iThis > iThat; 55829 } 55830 55831 return true; 55832 }; 55833 55834 55835 /** 55836 * Check if a `<table>` node is a DataTable table already or not. 55837 * 55838 * @param {node|jquery|string} table Table node, jQuery object or jQuery 55839 * selector for the table to test. Note that if more than more than one 55840 * table is passed on, only the first will be checked 55841 * @returns {boolean} true the table given is a DataTable, or false otherwise 55842 * @static 55843 * @dtopt API-Static 55844 * 55845 * @example 55846 * if ( ! $.fn.DataTable.isDataTable( '#example' ) ) { 55847 * $('#example').dataTable(); 55848 * } 55849 */ 55850 DataTable.isDataTable = DataTable.fnIsDataTable = function ( table ) 55851 { 55852 var t = $(table).get(0); 55853 var is = false; 55854 55855 $.each( DataTable.settings, function (i, o) { 55856 var head = o.nScrollHead ? $('table', o.nScrollHead)[0] : null; 55857 var foot = o.nScrollFoot ? $('table', o.nScrollFoot)[0] : null; 55858 55859 if ( o.nTable === t || head === t || foot === t ) { 55860 is = true; 55861 } 55862 } ); 55863 55864 return is; 55865 }; 55866 55867 55868 /** 55869 * Get all DataTable tables that have been initialised - optionally you can 55870 * select to get only currently visible tables. 55871 * 55872 * @param {boolean} [visible=false] Flag to indicate if you want all (default) 55873 * or visible tables only. 55874 * @returns {array} Array of `table` nodes (not DataTable instances) which are 55875 * DataTables 55876 * @static 55877 * @dtopt API-Static 55878 * 55879 * @example 55880 * $.each( $.fn.dataTable.tables(true), function () { 55881 * $(table).DataTable().columns.adjust(); 55882 * } ); 55883 */ 55884 DataTable.tables = DataTable.fnTables = function ( visible ) 55885 { 55886 var api = false; 55887 55888 if ( $.isPlainObject( visible ) ) { 55889 api = visible.api; 55890 visible = visible.visible; 55891 } 55892 55893 var a = $.map( DataTable.settings, function (o) { 55894 if ( !visible || (visible && $(o.nTable).is(':visible')) ) { 55895 return o.nTable; 55896 } 55897 } ); 55898 55899 return api ? 55900 new _Api( a ) : 55901 a; 55902 }; 55903 55904 55905 /** 55906 * DataTables utility methods 55907 * 55908 * This namespace provides helper methods that DataTables uses internally to 55909 * create a DataTable, but which are not exclusively used only for DataTables. 55910 * These methods can be used by extension authors to save the duplication of 55911 * code. 55912 * 55913 * @namespace 55914 */ 55915 DataTable.util = { 55916 /** 55917 * Throttle the calls to a function. Arguments and context are maintained 55918 * for the throttled function. 55919 * 55920 * @param {function} fn Function to be called 55921 * @param {integer} freq Call frequency in mS 55922 * @return {function} Wrapped function 55923 */ 55924 throttle: _fnThrottle, 55925 55926 55927 /** 55928 * Escape a string such that it can be used in a regular expression 55929 * 55930 * @param {string} sVal string to escape 55931 * @returns {string} escaped string 55932 */ 55933 escapeRegex: _fnEscapeRegex 55934 }; 55935 55936 55937 /** 55938 * Convert from camel case parameters to Hungarian notation. This is made public 55939 * for the extensions to provide the same ability as DataTables core to accept 55940 * either the 1.9 style Hungarian notation, or the 1.10+ style camelCase 55941 * parameters. 55942 * 55943 * @param {object} src The model object which holds all parameters that can be 55944 * mapped. 55945 * @param {object} user The object to convert from camel case to Hungarian. 55946 * @param {boolean} force When set to `true`, properties which already have a 55947 * Hungarian value in the `user` object will be overwritten. Otherwise they 55948 * won't be. 55949 */ 55950 DataTable.camelToHungarian = _fnCamelToHungarian; 55951 55952 55953 55954 /** 55955 * 55956 */ 55957 _api_register( '$()', function ( selector, opts ) { 55958 var 55959 rows = this.rows( opts ).nodes(), // Get all rows 55960 jqRows = $(rows); 55961 55962 return $( [].concat( 55963 jqRows.filter( selector ).toArray(), 55964 jqRows.find( selector ).toArray() 55965 ) ); 55966 } ); 55967 55968 55969 // jQuery functions to operate on the tables 55970 $.each( [ 'on', 'one', 'off' ], function (i, key) { 55971 _api_register( key+'()', function ( /* event, handler */ ) { 55972 var args = Array.prototype.slice.call(arguments); 55973 55974 // Add the `dt` namespace automatically if it isn't already present 55975 if ( ! args[0].match(/\.dt\b/) ) { 55976 args[0] += '.dt'; 55977 } 55978 55979 var inst = $( this.tables().nodes() ); 55980 inst[key].apply( inst, args ); 55981 return this; 55982 } ); 55983 } ); 55984 55985 55986 _api_register( 'clear()', function () { 55987 return this.iterator( 'table', function ( settings ) { 55988 _fnClearTable( settings ); 55989 } ); 55990 } ); 55991 55992 55993 _api_register( 'settings()', function () { 55994 return new _Api( this.context, this.context ); 55995 } ); 55996 55997 55998 _api_register( 'init()', function () { 55999 var ctx = this.context; 56000 return ctx.length ? ctx[0].oInit : null; 56001 } ); 56002 56003 56004 _api_register( 'data()', function () { 56005 return this.iterator( 'table', function ( settings ) { 56006 return _pluck( settings.aoData, '_aData' ); 56007 } ).flatten(); 56008 } ); 56009 56010 56011 _api_register( 'destroy()', function ( remove ) { 56012 remove = remove || false; 56013 56014 return this.iterator( 'table', function ( settings ) { 56015 var orig = settings.nTableWrapper.parentNode; 56016 var classes = settings.oClasses; 56017 var table = settings.nTable; 56018 var tbody = settings.nTBody; 56019 var thead = settings.nTHead; 56020 var tfoot = settings.nTFoot; 56021 var jqTable = $(table); 56022 var jqTbody = $(tbody); 56023 var jqWrapper = $(settings.nTableWrapper); 56024 var rows = $.map( settings.aoData, function (r) { return r.nTr; } ); 56025 var i, ien; 56026 56027 // Flag to note that the table is currently being destroyed - no action 56028 // should be taken 56029 settings.bDestroying = true; 56030
56031 // Fire off the destroy callbacks for plug-ins etc 56032 _fnCallbackFire( settings, "aoDestroyCallback", "destroy", [settings] ); 56033 56034 // If not being removed from the document, make all columns visible 56035 if ( ! remove ) { 56036 new _Api( settings ).columns().visible( true ); 56037 } 56038 56039 // Blitz all `DT` namespaced events (these are internal events, the 56040 // lowercase, `dt` events are user subscribed and they are responsible 56041 // for removing them 56042 jqWrapper.unbind('.DT').find(':not(tbody *)').unbind('.DT'); 56043 $(window).unbind('.DT-'+settings.sInstance); 56044 56045 // When scrolling we had to break the table up - restore it 56046 if ( table != thead.parentNode ) { 56047 jqTable.children('thead').detach(); 56048 jqTable.append( thead ); 56049 } 56050 56051 if ( tfoot && table != tfoot.parentNode ) { 56052 jqTable.children('tfoot').detach(); 56053 jqTable.append( tfoot ); 56054 } 56055 56056 settings.aaSorting = []; 56057 settings.aaSortingFixed = []; 56058 _fnSortingClasses( settings ); 56059 56060 $( rows ).removeClass( settings.asStripeClasses.join(' ') ); 56061 56062 $('th, td', thead).removeClass( classes.sSortable+' '+ 56063 classes.sSortableAsc+' '+classes.sSortableDesc+' '+classes.sSortableNone 56064 ); 56065 56066 if ( settings.bJUI ) { 56067 $('th span.'+classes.sSortIcon+ ', td span.'+classes.sSortIcon, thead).detach(); 56068 $('th, td', thead).each( function () { 56069 var wrapper = $('div.'+classes.sSortJUIWrapper, this); 56070 $(this).append( wrapper.contents() ); 56071 wrapper.detach(); 56072 } ); 56073 } 56074 56075 // Add the TR elements back into the table in their original order 56076 jqTbody.children().detach(); 56077 jqTbody.append( rows ); 56078 56079 // Remove the DataTables generated nodes, events and classes 56080 var removedMethod = remove ? 'remove' : 'detach'; 56081 jqTable[ removedMethod ](); 56082 jqWrapper[ removedMethod ](); 56083 56084 // If we need to reattach the table to the document 56085 if ( ! remove && orig ) { 56086 // insertBefore acts like appendChild if !arg[1] 56087 orig.insertBefore( table, settings.nTableReinsertBefore ); 56088 56089 // Restore the width of the original table - was read from the style property, 56090 // so we can restore directly to that 56091 jqTable 56092 .css( 'width', settings.sDestroyWidth ) 56093 .removeClass( classes.sTable ); 56094 56095 // If the were originally stripe classes - then we add them back here. 56096 // Note this is not fool proof (for example if not all rows had stripe 56097 // classes - but it's a good effort without getting carried away 56098 ien = settings.asDestroyStripes.length; 56099 56100 if ( ien ) { 56101 jqTbody.children().each( function (i) { 56102 $(this).addClass( settings.asDestroyStripes[i % ien] ); 56103 } ); 56104 } 56105 } 56106 56107 /* Remove the settings object from the settings array */ 56108 var idx = $.inArray( settings, DataTable.settings ); 56109 if ( idx !== -1 ) { 56110 DataTable.settings.splice( idx, 1 ); 56111 } 56112 } ); 56113 } ); 56114 56115 56116 // Add the `every()` method for rows, columns and cells in a compact form 56117 $.each( [ 'column', 'row', 'cell' ], function ( i, type ) { 56118 _api_register( type+'s().every()', function ( fn ) { 56119 var opts = this.selector.opts; 56120 var api = this; 56121 56122 return this.iterator( type, function ( settings, arg1, arg2, arg3, arg4 ) { 56123 // Rows and columns: 56124 // arg1 - index 56125 // arg2 - table counter 56126 // arg3 - loop counter 56127 // arg4 - undefined 56128 // Cells: 56129 // arg1 - row index 56130 // arg2 - column index 56131 // arg3 - table counter 56132 // arg4 - loop counter 56133 fn.call( 56134 api[ type ]( 56135 arg1, 56136 type==='cell' ? arg2 : opts, 56137 type==='cell' ? opts : undefined 56138 ), 56139 arg1, arg2, arg3, arg4 56140 ); 56141 } ); 56142 } ); 56143 } ); 56144 56145 56146 // i18n method for extensions to be able to use the language object from the 56147 // DataTable 56148 _api_register( 'i18n()', function ( token, def, plural ) { 56149 var ctx = this.context[0]; 56150 var resolved = _fnGetObjectDataFn( token )( ctx.oLanguage ); 56151 56152 if ( resolved === undefined ) { 56153 resolved = def; 56154 } 56155 56156 if ( plural !== undefined && $.isPlainObject( resolved ) ) { 56157 resolved = resolved[ plural ] !== undefined ? 56158 resolved[ plural ] : 56159 resolved._; 56160 } 56161 56162 return resolved.replace( '%d', plural ); // nb: plural might be undefined, 56163 } ); 56164 56165 /**
56166 * Version string for plug-ins to check compatibility. Allowed format is 56167 * `a.b.c-d` where: a:int, b:int, c:int, d:string(dev|beta|alpha). `d` is used 56168 * only for non-release builds. See http://semver.org/ for more information. 56169 * @member 56170 * @type string 56171 * @default Version number 56172 */ 56173 DataTable.version = "1.10.11"; 56174 56175 /** 56176 * Private data store, containing all of the settings objects that are 56177 * created for the tables on a given page. 56178 * 56179 * Note that the `DataTable.settings` object is aliased to 56180 * `jQuery.fn.dataTableExt` through which it may be accessed and 56181 * manipulated, or `jQuery.fn.dataTable.settings`. 56182 * @member 56183 * @type array 56184 * @default [] 56185 * @private 56186 */ 56187 DataTable.settings = []; 56188 56189 /** 56190 * Object models container, for the various models that DataTables has 56191 * available to it. These models define the objects that are used to hold 56192 * the active state and configuration of the table. 56193 * @namespace 56194 */ 56195 DataTable.models = {}; 56196 56197 56198 56199 /** 56200 * Template object for the way in which DataTables holds information about 56201 * search information for the global filter and individual column filters. 56202 * @namespace 56203 */ 56204 DataTable.models.oSearch = { 56205 /** 56206 * Flag to indicate if the filtering should be case insensitive or not 56207 * @type boolean 56208 * @default true 56209 */ 56210 "bCaseInsensitive": true, 56211 56212 /** 56213 * Applied search term 56214 * @type string 56215 * @default <i>Empty string</i> 56216 */ 56217 "sSearch": "", 56218 56219 /** 56220 * Flag to indicate if the search term should be interpreted as a 56221 * regular expression (true) or not (false) and therefore and special 56222 * regex characters escaped. 56223 * @type boolean 56224 * @default false 56225 */ 56226 "bRegex": false, 56227 56228 /** 56229 * Flag to indicate if DataTables is to use its smart filtering or not. 56230 * @type boolean 56231 * @default true 56232 */ 56233 "bSmart": true 56234 }; 56235 56236 56237 56238 56239 /** 56240 * Template object for the way in which DataTables holds information about 56241 * each individual row. This is the object format used for the settings 56242 * aoData array. 56243 * @namespace 56244 */ 56245 DataTable.models.oRow = { 56246 /** 56247 * TR element for the row 56248 * @type node 56249 * @default null 56250 */ 56251 "nTr": null, 56252 56253 /** 56254 * Array of TD elements for each row. This is null until the row has been 56255 * created. 56256 * @type array nodes 56257 * @default [] 56258 */ 56259 "anCells": null, 56260 56261 /** 56262 * Data object from the original data source for the row. This is either 56263 * an array if using the traditional form of DataTables, or an object if 56264 * using mData options. The exact type will depend on the passed in 56265 * data from the data source, or will be an array if using DOM a data 56266 * source. 56267 * @type array|object 56268 * @default [] 56269 */ 56270 "_aData": [], 56271 56272 /** 56273 * Sorting data cache - this array is ostensibly the same length as the 56274 * number of columns (although each index is generated only as it is 56275 * needed), and holds the data that is used for sorting each column in the 56276 * row. We do this cache generation at the start of the sort in order that 56277 * the formatting of the sort data need be done only once for each cell 56278 * per sort. This array should not be read from or written to by anything 56279 * other than the master sorting methods. 56280 * @type array 56281 * @default null 56282 * @private 56283 */ 56284 "_aSortData": null, 56285 56286 /** 56287 * Per cell filtering data cache. As per the sort data cache, used to 56288 * increase the performance of the filtering in DataTables 56289 * @type array 56290 * @default null 56291 * @private 56292 */ 56293 "_aFilterData": null, 56294 56295 /** 56296 * Filtering data cache. This is the same as the cell filtering cache, but 56297 * in this case a string rather than an array. This is easily computed with 56298 * a join on `_aFilterData`, but is provided as a cache so the join isn't 56299 * needed on every search (memory traded for performance) 56300 * @type array 56301 * @default null 56302 * @private 56303 */ 56304 "_sFilterRow": null, 56305 56306 /** 56307 * Cache of the class name that DataTables has applied to the row, so we 56308 * can quickly look at this variable rather than needing to do a DOM check 56309 * on className for the nTr property. 56310 * @type string 56311 * @default <i>Empty string</i> 56312 * @private 56313 */ 56314 "_sRowStripe": "", 56315 56316 /** 56317 * Denote if the original data source was from the DOM, or the data source 56318 * object. This is used for invalidating data, so DataTables can 56319 * automatically read data from the original source, unless uninstructed 56320 * otherwise. 56321 * @type string 56322 * @default null 56323 * @private 56324 */ 56325 "src": null, 56326 56327 /** 56328 * Index in the aoData array. This saves an indexOf lookup when we have the 56329 * object, but want to know the index 56330 * @type integer 56331 * @default -1 56332 * @private 56333 */ 56334 "idx": -1 56335 }; 56336 56337 56338 /** 56339 * Template object for the column information object in DataTables. This object 56340 * is held in the settings aoColumns array and contains all the information that 56341 * DataTables needs about each individual column. 56342 * 56343 * Note that this object is related to {@link DataTable.defaults.column} 56344 * but this one is the internal data store for DataTables's cache of columns. 56345 * It should NOT be manipulated outside of DataTables. Any configuration should 56346 * be done through the initialisation options. 56347 * @namespace 56348 */ 56349 DataTable.models.oColumn = { 56350 /** 56351 * Column index. This could be worked out on-the-fly with $.inArray, but it 56352 * is faster to just hold it as a variable 56353 * @type integer 56354 * @default null 56355 */ 56356 "idx": null, 56357 56358 /** 56359 * A list of the columns that sorting should occur on when this column 56360 * is sorted. That this property is an array allows multi-column s
56360orting 56361 * to be defined for a column (for example first name / last name columns 56362 * would benefit from this). The values are integers pointing to the 56363 * columns to be sorted on (typically it will be a single integer pointing 56364 * at itself, but that doesn't need to be the case). 56365 * @type array 56366 */ 56367 "aDataSort": null, 56368 56369 /** 56370 * Define the sorting directions that are applied to the column, in sequence 56371 * as the column is repeatedly sorted upon - i.e. the first value is used 56372 * as the sorting direction when the column if first sorted (clicked on). 56373 * Sort it again (click again) and it will move on to the next index. 56374 * Repeat until loop. 56375 * @type array 56376 */ 56377 "asSorting": null, 56378 56379 /** 56380 * Flag to indicate if the column is searchable, and thus should be included 56381 * in the filtering or not. 56382 * @type boolean 56383 */ 56384 "bSearchable": null, 56385 56386 /** 56387 * Flag to indicate if the column is sortable or not. 56388 * @type boolean 56389 */ 56390 "bSortable": null, 56391 56392 /** 56393 * Flag to indicate if the column is currently visible in the table or not 56394 * @type boolean 56395 */ 56396 "bVisible": null, 56397 56398 /** 56399 * Store for manual type assignment using the `column.type` option. This 56400 * is held in store so we can manipulate the column's `sType` property. 56401 * @type string 56402 * @default null 56403 * @private 56404 */ 56405 "_sManualType": null, 56406 56407 /** 56408 * Flag to indicate if HTML5 data attributes should be used as the data 56409 * source for filtering or sorting. True is either are. 56410 * @type boolean 56411 * @default false 56412 * @private 56413 */ 56414 "_bAttrSrc": false, 56415 56416 /** 56417 * Developer definable function that is called whenever a cell is created (Ajax source, 56418 * etc) or processed for input (DOM source). This can be used as a compliment to mRender 56419 * allowing you to modify the DOM element (add background colour for example) when the 56420 * element is available. 56421 * @type function 56422 * @param {element} nTd The TD node that has been created 56423 * @param {*} sData The Data for the cell 56424 * @param {array|object} oData The data for the whole row 56425 * @param {int} iRow The row index for the aoData data store 56426 * @default null 56427 */ 56428 "fnCreatedCell": null, 56429 56430 /** 56431 * Function to get data from a cell in a column. You should <b>never</b> 56432 * access data directly through _aData internally in DataTables - always use 56433 * the method attached to this property. It allows mData to function as 56434 * required. This function is automatically assigned by the column 56435 * initialisation method 56436 * @type function 56437 * @param {array|object} oData The data array/object for the array 56438 * (i.e. aoData[]._aData) 56439 * @param {string} sSpecific The specific data type you want to get - 56440 * 'display', 'type' 'filter' 'sort' 56441 * @returns {*} The data for the cell from the given row's data 56442 * @default null 56443 */ 56444 "fnGetData": null, 56445 56446 /** 56447 * Function to set data for a cell in the column. You should <b>never</b> 56448 * set the data directly to _aData internally in DataTables - always use 56449 * this method. It allows mData to function as required. This function 56450 * is automatically assigned by the column initialisation method 56451 * @type function 56452 * @param {array|object} oData The data array/object for the array 56453 * (i.e. aoData[]._aData) 56454 * @param {*} sValue Value to set 56455 * @default null 56456 */ 56457 "fnSetData": null, 56458 56459 /** 56460 * Property to read the value for the cells in the column from the data 56461 * source array / object. If null, then the default content is used, if a 56462 * function is given then the return from the function is used. 56463 * @type function|int|string|null 56464 * @default null 56465 */ 56466 "mData": null, 56467 56468 /** 56469 * Partner property to mData which is used (only when defined) to get 56470 * the data - i.e. it is basically the same as mData, but without the 56471 * 'set' option, and also the data fed to it is the result from mData. 56472 * This is the rendering method to match the data method of mData. 56473 * @type function|int|string|null 56474 * @default null 56475 */ 56476 "mRender": null, 56477 56478 /** 56479 * Unique header TH/TD element for this column - this is what the sorting 56480 * listener is attached to (if sorting is enabled.) 56481 * @type node 56482 * @default null 56483 */ 56484 "nTh": null, 56485 56486 /** 56487 * Unique footer TH/TD element for this column (if there is one). Not used
56488 * in DataTables as such, but can be used for plug-ins to reference the 56489 * footer for each column. 56490 * @type node 56491 * @default null 56492 */ 56493 "nTf": null, 56494 56495 /** 56496 * The class to apply to all TD elements in the table's TBODY for the column 56497 * @type string 56498 * @default null 56499 */ 56500 "sClass": null, 56501 56502 /** 56503 * When DataTables calculates the column widths to assign to each column, 56504 * it finds the longest string in each column and then constructs a 56505 * temporary table and reads the widths from that. The problem with this 56506 * is that "mmm" is much wider then "iiii", but the latter is a longer 56507 * string - thus the calculation can go wrong (doing it properly and putting 56508 * it into an DOM object and measuring that is horribly(!) slow). Thus as 56509 * a "work around" we provide this option. It will append its value to the 56510 * text that is found to be the longest string for the column - i.e. padding. 56511 * @type string 56512 */ 56513 "sContentPadding": null, 56514 56515 /** 56516 * Allows a default value to be given for a column's data, and will be used 56517 * whenever a null data source is encountered (this can be because mData 56518 * is set to null, or because the data source itself is null). 56519 * @type string 56520 * @default null 56521 */ 56522 "sDefaultContent": null, 56523 56524 /** 56525 * Name for the column, allowing reference to the column by name as well as 56526 * by index (needs a lookup to work by name). 56527 * @type string 56528 */ 56529 "sName": null, 56530 56531 /** 56532 * Custom sorting data type - defines which of the available plug-ins in 56533 * afnSortData the custom sorting will use - if any is defined. 56534 * @type string 56535 * @default std 56536 */ 56537 "sSortDataType": 'std', 56538 56539 /** 56540 * Class to be applied to the header element when sorting on this column 56541 * @type string 56542 * @default null 56543 */ 56544 "sSortingClass": null, 56545 56546 /** 56547 * Class to be applied to the header element when sorting on this column - 56548 * when jQuery UI theming is used. 56549 * @type string 56550 * @default null 56551 */ 56552 "sSortingClassJUI": null, 56553 56554 /** 56555 * Title of the column - what is seen in the TH element (nTh). 56556 * @type string 56557 */ 56558 "sTitle": null, 56559 56560 /** 56561 * Column sorting and filtering type 56562 * @type string 56563 * @default null 56564 */ 56565 "sType": null, 56566 56567 /** 56568 * Width of the column 56569 * @type string 56570 * @default null 56571 */ 56572 "sWidth": null, 56573 56574 /** 56575 * Width of the column when it was first "encountered" 56576 * @type string 56577 * @default null 56578 */ 56579 "sWidthOrig": null 56580 }; 56581 56582 56583 /* 56584 * Developer note: The properties of the object below are given in Hungarian 56585 * notation, that was used as the interface for DataTables prior to v1.10, however 56586 * from v1.10 onwards the primary interface is camel case. In order to avoid 56587 * breaking backwards compatibility utterly with this change, the Hungarian 56588 * version is still, internally the primary interface, but is is not documented 56589 * - hence the @name tags in each doc comment. This allows a Javascript function 56590 * to create a map from Hungarian notation to camel case (going the other direction 56591 * would require each property to be listed, which would at around 3K to the size 56592 * of DataTables, while this method is about a 0.5K hit
vendor: 16,919 bytes, lines 56592-57103
56592. 56593 * 56594 * Ultimately this does pave the way for Hungarian notation to be dropped 56595 * completely, but that is a massive amount of work and will break current 56596 * installs (therefore is on-hold until v2). 56597 */ 56598 56599 /** 56600 * Initialisation options that can be given to DataTables at initialisation 56601 * time. 56602 * @namespace 56603 */ 56604 DataTable.defaults = { 56605 /** 56606 * An array of data to use for the table, passed in at initialisation which 56607 * will be used in preference to any data which is already in the DOM. This is 56608 * particularly useful for constructing tables purely in Javascript, for 56609 * example with a custom Ajax call. 56610 * @type array 56611 * @default null 56612 * 56613 * @dtopt Option 56614 * @name DataTable.defaults.data 56615 * 56616 * @example 56617 * // Using a 2D array data source 56618 * $(document).ready( function () { 56619 * $('#example').dataTable( { 56620 * "data": [ 56621 * ['Trident', 'Internet Explorer 4.0', 'Win 95+', 4, 'X'], 56622 * ['Trident', 'Internet Explorer 5.0', 'Win 95+', 5, 'C'], 56623 * ], 56624 * "columns": [ 56625 * { "title": "Engine" }, 56626 * { "title": "Browser" }, 56627 * { "title": "Platform" }, 56628 * { "title": "Version" }, 56629 * { "title": "Grade" } 56630 * ] 56631 * } ); 56632 * } ); 56633 * 56634 * @example 56635 * // Using an array of objects as a data source (`data`) 56636 * $(document).ready( function () { 56637 * $('#example').dataTable( { 56638 * "data": [ 56639 * { 56640 * "engine": "Trident", 56641 * "browser": "Internet Explorer 4.0", 56642 * "platform": "Win 95+", 56643 * "version": 4, 56644 * "grade": "X" 56645 * }, 56646 * { 56647 * "engine": "Trident", 56648 * "browser": "Internet Explorer 5.0", 56649 * "platform": "Win 95+", 56650 * "version": 5, 56651 * "grade": "C" 56652 * } 56653 * ], 56654 * "columns": [ 56655 * { "title": "Engine", "data": "engine" }, 56656 * { "title": "Browser", "data": "browser" }, 56657 * { "title": "Platform", "data": "platform" }, 56658 * { "title": "Version", "data": "version" }, 56659 * { "title": "Grade", "data": "grade" } 56660 * ] 56661 * } ); 56662 * } ); 56663 */ 56664 "aaData": null, 56665 56666 56667 /** 56668 * If ordering is enabled, then DataTables will perform a first pass sort on 56669 * initialisation. You can define which column(s) the sort is performed 56670 * upon, and the sorting direction, with this variable. The `sorting` array 56671 * should contain an array for each column to be sorted initially containing 56672 * the column's index and a direction string ('asc' or 'desc'). 56673 * @type array 56674 * @default [[0,'asc']] 56675 * 56676 * @dtopt Option 56677 * @name DataTable.defaults.order 56678 * 56679 * @example 56680 * // Sort by 3rd column first, and then 4th column 56681 * $(document).ready( function() { 56682 * $('#example').dataTable( { 56683 * "order": [[2,'asc'], [3,'desc']] 56684 * } ); 56685 * } ); 56686 * 56687 * // No initial sorting 56688 * $(document).ready( function() { 56689 * $('#example').dataTable( { 56690 * "order": [] 56691 * } ); 56692 * } ); 56693 */ 56694 "aaSorting": [[0,'asc']], 56695 56696 56697 /** 56698 * This parameter is basically identical to the `sorting` parameter, but 56699 * cannot be overridden by user interaction with the table. What this means 56700 * is that you could have a column (visible or hidden) which the sorting 56701 * will always be forced on first - any sorting after that (from the user) 56702 * will then be performed as required. This can be useful for grouping rows 56703 * together. 56704 * @type array 56705 * @default null 56706 * 56707 * @dtopt Option 56708 * @name DataTable.defaults.orderFixed 56709 * 56710 * @example 56711 * $(document).ready( function() { 56712 * $('#example').dataTable( { 56713 * "orderFixed": [[0,'asc']] 56714 * } ); 56715 * } ) 56716 */ 56717 "aaSortingFixed": [], 56718 56719 56720 /** 56721 * DataTables can be instructed to load data to display in the table from a 56722 * Ajax source. This option defines how that Ajax call is made and where to. 56723 * 56724 * The `ajax` property has three different modes of operation, depending on 56725 * how it is defined. These are: 56726 * 56727 * * `string` - Set the URL from where the data should be loaded from. 56728 * * `object` - Define properties for `jQuery.ajax`. 56729 * * `function` - Custom data get function 56730 * 56731 * `string` 56732 * -------- 56733 * 56734 * As a string, the `ajax` property simply defines the URL from which 56735 * DataTables will load data. 56736 * 56737 * `object` 56738 * -------- 56739 * 56740 * As an object, the parameters in the object are passed to 56741 * [jQuery.ajax](http://api.jquery.com/jQuery.ajax/) allowing fine control 56742 * of the Ajax request. DataTables has a number of default parameters which 56743 * you can override using this option. Please refer to the jQuery 56744 * documentation for a full description of the options available, although 56745 * the following parameters provide additional options in DataTables or 56746 * require special consideration: 56747 * 56748 * * `data` - As with jQuery, `data` can be provided as an object, but it 56749 * can also be used as a function to manipulate the data DataTables sends 56750 * to the server. The function takes a single parameter, an object of 56751 * parameters with the values that DataTables has readied for sending. An 56752 * object may be returned which will be merged into the DataTables 56753 * defaults, or you can add the items to the object that was passed in and 56754 * not return anything from the function. This supersedes `fnServerParams` 56755 * from DataTables 1.9-. 56756 * 56757 * * `dataSrc` - By default DataTables will look for the property `data` (or 56758 * `aaData` for compatibility with DataTables 1.9-) when obtaining data 56759 * from an Ajax source or for server-side processing - this parameter 56760 * allows that property to be changed. You can use Javascript dotted 56761 * object notation to get a data source for multiple levels of nesting, or 56762 * it my be used as a function. As a function it takes a single parameter, 56763 * the JSON returned from the server, which can be manipulated as 56764 * required, with the returned value being that used by DataTables as the 56765 * data source for the table. This supersedes `sAjaxDataProp` from 56766 * DataTables 1.9-. 56767 * 56768 * * `success` - Should not be overridden it is used internally in 56769 * DataTables. To manipulate / transform the data returned by the server 56770 * use `ajax.dataSrc`, or use `ajax` as a function (see below). 56771 * 56772 * `function` 56773 * ---------- 56774 * 56775 * As a function, making the Ajax call is left up to yourself allowing 56776 * complete control of the Ajax request. Indeed, if desired, a method other 56777 * than Ajax could be used to obtain the required data, such as Web storage 56778 * or an AIR database. 56779 * 56780 * The function is given four parameters and no return is required. The 56781 * parameters are: 56782 * 56783 * 1. _object_ - Data to send to the server 56784 * 2. _function_ - Callback function that must be executed when the required 56785 * data has been obtained. That data should be passed into the callback 56786 * as the only parameter 56787 * 3. _object_ - DataTables settings object for the table 56788 * 56789 * Note that this supersedes `fnServerData` from DataTables 1.9-. 56790 * 56791 * @type string|object|function 56792 * @default null 56793 * 56794 * @dtopt Option 56795 * @name DataTable.defaults.ajax 56796 * @since 1.10.0 56797 * 56798 * @example 56799 * // Get JSON data from a file via Ajax. 56800 * // Note DataTables expects data in the form `{ data: [ ...data... ] }` by default). 56801 * $('#example').dataTable( { 56802 * "ajax": "data.json" 56803 * } ); 56804 * 56805 * @example 56806 * // Get JSON data from a file via Ajax, using `dataSrc` to change 56807 * // `data` to `tableData` (i.e. `{ tableData: [ ...data... ] }`) 56808 * $('#example').dataTable( { 56809 * "ajax": { 56810 * "url": "data.json", 56811 * "dataSrc": "tableData" 56812 * } 56813 * } ); 56814 * 56815 * @example 56816 * // Get JSON data from a file via Ajax, using `dataSrc` to read data 56817 * // from a plain array rather than an array in an object 56818 * $('#example').dataTable( { 56819 * "ajax": { 56820 * "url": "data.json", 56821 * "dataSrc": "" 56822 * } 56823 * } ); 56824 * 56825 * @example 56826 * // Manipulate the data returned from the server - add a link to data 56827 * // (note this can, should, be done using `render` for the column - this 56828 * // is just a simple example of how the data can be manipulated). 56829 * $('#example').dataTable( { 56830 * "ajax": { 56831 * "url": "data.json", 56832 * "dataSrc": function ( json ) { 56833 * for ( var i=0, ien=json.length ; i<ien ; i++ ) { 56834 * json[i][0] = '<a href="/message/'+json[i][0]+'>View message</a>'; 56835 * } 56836 * return json; 56837 * } 56838 * } 56839 * } ); 56840 * 56841 * @example 56842 * // Add data to the request 56843 * $('#example').dataTable( { 56844 * "ajax": { 56845 * "url": "data.json", 56846 * "data": function ( d ) { 56847 * return { 56848 * "extra_search": $('#extra').val() 56849 * }; 56850 * } 56851 * } 56852 * } ); 56853 * 56854 * @example 56855 * // Send request as POST 56856 * $('#example').dataTable( { 56857 * "ajax": { 56858 * "url": "data.json", 56859 * "type": "POST" 56860 * } 56861 * } ); 56862 * 56863 * @example 56864 * // Get the data from localStorage (could interface with a form for 56865 * // adding, editing and removing rows). 56866 * $('#example').dataTable( { 56867 * "ajax": function (data, callback, settings) { 56868 * callback( 56869 * JSON.parse( localStorage.getItem('dataTablesData') ) 56870 * ); 56871 * } 56872 * } ); 56873 */ 56874 "ajax": null, 56875 56876 56877 /** 56878 * This parameter allows you to readily specify the entries in the length drop 56879 * down menu that DataTables shows when pagination is enabled. It can be 56880 * either a 1D array of options which will be used for both the displayed 56881 * option and the value, or a 2D array which will use the array in the first 56882 * position as the value, and the array in the second position as the 56883 * displayed options (useful for language strings such as 'All'). 56884 * 56885 * Note that the `pageLength` property will be automatically set to the 56886 * first value given in this array, unless `pageLength` is also provided. 56887 * @type array 56888 * @default [ 10, 25, 50, 100 ] 56889 * 56890 * @dtopt Option 56891 * @name DataTable.defaults.lengthMenu 56892 * 56893 * @example 56894 * $(document).ready( function() { 56895 * $('#example').dataTable( { 56896 * "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]] 56897 * } ); 56898 * } ); 56899 */ 56900 "aLengthMenu": [ 10, 25, 50, 100 ], 56901 56902 56903 /** 56904 * The `columns` option in the initialisation parameter allows you to define 56905 * details about the way individual columns behave. For a full list of 56906 * column options that can be set, please see 56907 * {@link DataTable.defaults.column}. Note that if you use `columns` to 56908 * define your columns, you must have an entry in the array for every single 56909 * column that you have in your table (these can be null if you don't which 56910 * to specify any options). 56911 * @member 56912 * 56913 * @name DataTable.defaults.column 56914 */ 56915 "aoColumns": null, 56916 56917 /** 56918 * Very similar to `columns`, `columnDefs` allows you to target a specific 56919 * column, multiple columns, or all columns, using the `targets` property of 56920 * each object in the array. This allows great flexibility when creating 56921 * tables, as the `columnDefs` arrays can be of any length, targeting the 56922 * columns you specifically want. `columnDefs` may use any of the column 56923 * options available: {@link DataTable.defaults.column}, but it _must_ 56924 * have `targets` defined in each object in the array. Values in the `targets` 56925 * array may be: 56926 * <ul> 56927 * <li>a string - class name will be matched on the TH for the column</li> 56928 * <li>0 or a positive integer - column index counting from the left</li> 56929 * <li>a negative integer - column index counting from the right</li> 56930 * <li>the string "_all" - all columns (i.e. assign a default)</li> 56931 * </ul> 56932 * @member 56933 * 56934 * @name DataTable.defaults.columnDefs 56935 */ 56936 "aoColumnDefs": null, 56937 56938 56939 /** 56940 * Basically the same as `search`, this parameter defines the individual column 56941 * filtering state at initialisation time. The array must be of the same size 56942 * as the number of columns, and each element be an object with the parameters 56943 * `search` and `escapeRegex` (the latter is optional). 'null' is also 56944 * accepted and the default will be used. 56945 * @type array 56946 * @default [] 56947 * 56948 * @dtopt Option 56949 * @name DataTable.defaults.searchCols 56950 * 56951 * @example 56952 * $(document).ready( function() { 56953 * $('#example').dataTable( { 56954 * "searchCols": [ 56955 * null, 56956 * { "search": "My filter" }, 56957 * null, 56958 * { "search": "^[0-9]", "escapeRegex": false } 56959 * ] 56960 * } ); 56961 * } ) 56962 */ 56963 "aoSearchCols": [], 56964 56965 56966 /** 56967 * An array of CSS classes that should be applied to displayed rows. This 56968 * array may be of any length, and DataTables will apply each class 56969 * sequentially, looping when required. 56970 * @type array 56971 * @default null <i>Will take the values determined by the `oClasses.stripe*` 56972 * options</i> 56973 * 56974 * @dtopt Option 56975 * @name DataTable.defaults.stripeClasses 56976 * 56977 * @example 56978 * $(document).ready( function() { 56979 * $('#example').dataTable( { 56980 * "stripeClasses": [ 'strip1', 'strip2', 'strip3' ] 56981 * } ); 56982 * } ) 56983 */ 56984 "asStripeClasses": null, 56985 56986 56987 /** 56988 * Enable or disable automatic column width calculation. This can be disabled 56989 * as an optimisation (it takes some time to calculate the widths) if the 56990 * tables widths are passed in using `columns`. 56991 * @type boolean 56992 * @default true 56993 * 56994 * @dtopt Features 56995 * @name DataTable.defaults.autoWidth 56996 * 56997 * @example 56998 * $(document).ready( function () { 56999 * $('#example').dataTable( { 57000 * "autoWidth": false 57001 * } ); 57002 * } ); 57003 */ 57004 "bAutoWidth": true, 57005 57006 57007 /** 57008 * Deferred rendering can provide DataTables with a huge speed boost when you 57009 * are using an Ajax or JS data source for the table. This option, when set to 57010 * true, will cause DataTables to defer the creation of the table elements for 57011 * each row until they are needed for a draw - saving a significant amount of 57012 * time. 57013 * @type boolean 57014 * @default false 57015 * 57016 * @dtopt Features 57017 * @name DataTable.defaults.deferRender 57018 * 57019 * @example 57020 * $(document).ready( function() { 57021 * $('#example').dataTable( { 57022 * "ajax": "sources/arrays.txt", 57023 * "deferRender": true 57024 * } ); 57025 * } ); 57026 */ 57027 "bDeferRender": false, 57028 57029 57030 /** 57031 * Replace a DataTable which matches the given selector and replace it with 57032 * one which has the properties of the new initialisation object passed. If no 57033 * table matches the selector, then the new DataTable will be constructed as 57034 * per normal. 57035 * @type boolean 57036 * @default false 57037 * 57038 * @dtopt Options 57039 * @name DataTable.defaults.destroy 57040 * 57041 * @example 57042 * $(document).ready( function() { 57043 * $('#example').dataTable( { 57044 * "srollY": "200px", 57045 * "paginate": false 57046 * } ); 57047 * 57048 * // Some time later.... 57049 * $('#example').dataTable( { 57050 * "filter": false, 57051 * "destroy": true 57052 * } ); 57053 * } ); 57054 */ 57055 "bDestroy": false, 57056 57057 57058 /** 57059 * Enable or disable filtering of data. Filtering in DataTables is "smart" in 57060 * that it allows the end user to input multiple words (space separated) and 57061 * will match a row containing those words, even if not in the order that was 57062 * specified (this allow matching across multiple columns). Note that if you 57063 * wish to use filtering in DataTables this must remain 'true' - to remove the 57064 * default filtering input box and retain filtering abilities, please use 57065 * {@link DataTable.defaults.dom}. 57066 * @type boolean 57067 * @default true 57068 * 57069 * @dtopt Features 57070 * @name DataTable.defaults.searching 57071 * 57072 * @example 57073 * $(document).ready( function () { 57074 * $('#example').dataTable( { 57075 * "searching": false 57076 * } ); 57077 * } ); 57078 */ 57079 "bFilter": true, 57080 57081 57082 /** 57083 * Enable or disable the table information display. This shows information 57084 * about the data that is currently visible on the page, including information 57085 * about filtered data if that action is being performed. 57086 * @type boolean 57087 * @default true 57088 * 57089 * @dtopt Features 57090 * @name DataTable.defaults.info 57091 * 57092 * @example 57093 * $(document).ready( function () { 57094 * $('#example').dataTable( { 57095 * "info": false 57096 * } ); 57097 * } ); 57098 */ 57099 "bInfo": true, 57100 57101 57102 /** 57103 *
57103Enable jQuery UI ThemeRoller support (required as ThemeRoller requires some 57104 * slightly different and additional mark-up from what DataTables has 57105 * traditionally used). 57106 * @type boolean 57107 * @default false 57108 * 57109 * @dtopt Features 57110 * @name DataTable.defaults.jQueryUI 57111 * 57112 * @example 57113 * $(document).ready( function() { 57114 * $('#example').dataTable( { 57115 * "jQueryUI": true 57116 * } ); 57117 * } ); 57118 */ 57119 "bJQueryUI": fals
vendor: 18,080 bytes, lines 57119-57681
57119e, 57120 57121 57122 /** 57123 * Allows the end user to select the size of a formatted page from a select 57124 * menu (sizes are 10, 25, 50 and 100). Requires pagination (`paginate`). 57125 * @type boolean 57126 * @default true 57127 * 57128 * @dtopt Features 57129 * @name DataTable.defaults.lengthChange 57130 * 57131 * @example 57132 * $(document).ready( function () { 57133 * $('#example').dataTable( { 57134 * "lengthChange": false 57135 * } ); 57136 * } ); 57137 */ 57138 "bLengthChange": true, 57139 57140 57141 /** 57142 * Enable or disable pagination. 57143 * @type boolean 57144 * @default true 57145 * 57146 * @dtopt Features 57147 * @name DataTable.defaults.paging 57148 * 57149 * @example 57150 * $(document).ready( function () { 57151 * $('#example').dataTable( { 57152 * "paging": false 57153 * } ); 57154 * } ); 57155 */ 57156 "bPaginate": true, 57157 57158 57159 /** 57160 * Enable or disable the display of a 'processing' indicator when the table is 57161 * being processed (e.g. a sort). This is particularly useful for tables with 57162 * large amounts of data where it can take a noticeable amount of time to sort 57163 * the entries. 57164 * @type boolean 57165 * @default false 57166 * 57167 * @dtopt Features 57168 * @name DataTable.defaults.processing 57169 * 57170 * @example 57171 * $(document).ready( function () { 57172 * $('#example').dataTable( { 57173 * "processing": true 57174 * } ); 57175 * } ); 57176 */ 57177 "bProcessing": false, 57178 57179 57180 /** 57181 * Retrieve the DataTables object for the given selector. Note that if the 57182 * table has already been initialised, this parameter will cause DataTables 57183 * to simply return the object that has already been set up - it will not take 57184 * account of any changes you might have made to the initialisation object 57185 * passed to DataTables (setting this parameter to true is an acknowledgement 57186 * that you understand this). `destroy` can be used to reinitialise a table if 57187 * you need. 57188 * @type boolean 57189 * @default false 57190 * 57191 * @dtopt Options 57192 * @name DataTable.defaults.retrieve 57193 * 57194 * @example 57195 * $(document).ready( function() { 57196 * initTable(); 57197 * tableActions(); 57198 * } ); 57199 * 57200 * function initTable () 57201 * { 57202 * return $('#example').dataTable( { 57203 * "scrollY": "200px", 57204 * "paginate": false, 57205 * "retrieve": true 57206 * } ); 57207 * } 57208 * 57209 * function tableActions () 57210 * { 57211 * var table = initTable(); 57212 * // perform API operations with oTable 57213 * } 57214 */ 57215 "bRetrieve": false, 57216 57217 57218 /** 57219 * When vertical (y) scrolling is enabled, DataTables will force the height of 57220 * the table's viewport to the given height at all times (useful for layout). 57221 * However, this can look odd when filtering data down to a small data set, 57222 * and the footer is left "floating" further down. This parameter (when 57223 * enabled) will cause DataTables to collapse the table's viewport down when 57224 * the result set will fit within the given Y height. 57225 * @type boolean 57226 * @default false 57227 * 57228 * @dtopt Options 57229 * @name DataTable.defaults.scrollCollapse 57230 * 57231 * @example 57232 * $(document).ready( function() { 57233 * $('#example').dataTable( { 57234 * "scrollY": "200", 57235 * "scrollCollapse": true 57236 * } ); 57237 * } ); 57238 */ 57239 "bScrollCollapse": false, 57240 57241 57242 /** 57243 * Configure DataTables to use server-side processing. Note that the 57244 * `ajax` parameter must also be given in order to give DataTables a 57245 * source to obtain the required data for each draw. 57246 * @type boolean 57247 * @default false 57248 * 57249 * @dtopt Features 57250 * @dtopt Server-side 57251 * @name DataTable.defaults.serverSide 57252 * 57253 * @example 57254 * $(document).ready( function () { 57255 * $('#example').dataTable( { 57256 * "serverSide": true, 57257 * "ajax": "xhr.php" 57258 * } ); 57259 * } ); 57260 */ 57261 "bServerSide": false, 57262 57263 57264 /** 57265 * Enable or disable sorting of columns. Sorting of individual columns can be 57266 * disabled by the `sortable` option for each column. 57267 * @type boolean 57268 * @default true 57269 * 57270 * @dtopt Features 57271 * @name DataTable.defaults.ordering 57272 * 57273 * @example 57274 * $(document).ready( function () { 57275 * $('#example').dataTable( { 57276 * "ordering": false 57277 * } ); 57278 * } ); 57279 */ 57280 "bSort": true, 57281 57282 57283 /** 57284 * Enable or display DataTables' ability to sort multiple columns at the 57285 * same time (activated by shift-click by the user). 57286 * @type boolean 57287 * @default true 57288 * 57289 * @dtopt Options 57290 * @name DataTable.defaults.orderMulti 57291 * 57292 * @example 57293 * // Disable multiple column sorting ability 57294 * $(document).ready( function () { 57295 * $('#example').dataTable( { 57296 * "orderMulti": false 57297 * } ); 57298 * } ); 57299 */ 57300 "bSortMulti": true, 57301 57302 57303 /** 57304 * Allows control over whether DataTables should use the top (true) unique 57305 * cell that is found for a single column, or the bottom (false - default). 57306 * This is useful when using complex headers. 57307 * @type boolean 57308 * @default false 57309 * 57310 * @dtopt Options 57311 * @name DataTable.defaults.orderCellsTop 57312 * 57313 * @example 57314 * $(document).ready( function() { 57315 * $('#example').dataTable( { 57316 * "orderCellsTop": true 57317 * } ); 57318 * } ); 57319 */ 57320 "bSortCellsTop": false, 57321 57322 57323 /** 57324 * Enable or disable the addition of the classes `sorting\_1`, `sorting\_2` and 57325 * `sorting\_3` to the columns which are currently being sorted on. This is 57326 * presented as a feature switch as it can increase processing time (while 57327 * classes are removed and added) so for large data sets you might want to 57328 * turn this off. 57329 * @type boolean 57330 * @default true 57331 * 57332 * @dtopt Features 57333 * @name DataTable.defaults.orderClasses 57334 * 57335 * @example 57336 * $(document).ready( function () { 57337 * $('#example').dataTable( { 57338 * "orderClasses": false 57339 * } ); 57340 * } ); 57341 */ 57342 "bSortClasses": true, 57343 57344 57345 /** 57346 * Enable or disable state saving. When enabled HTML5 `localStorage` will be 57347 * used to save table display information such as pagination information, 57348 * display length, filtering and sorting. As such when the end user reloads 57349 * the page the display display will match what thy had previously set up. 57350 * 57351 * Due to the use of `localStorage` the default state saving is not supported 57352 * in IE6 or 7. If state saving is required in those browsers, use 57353 * `stateSaveCallback` to provide a storage solution such as cookies. 57354 * @type boolean 57355 * @default false 57356 * 57357 * @dtopt Features 57358 * @name DataTable.defaults.stateSave 57359 * 57360 * @example 57361 * $(document).ready( function () { 57362 * $('#example').dataTable( { 57363 * "stateSave": true 57364 * } ); 57365 * } ); 57366 */ 57367 "bStateSave": false, 57368 57369 57370 /** 57371 * This function is called when a TR element is created (and all TD child 57372 * elements have been inserted), or registered if using a DOM source, allowing 57373 * manipulation of the TR element (adding classes etc). 57374 * @type function 57375 * @param {node} row "TR" element for the current row 57376 * @param {array} data Raw data array for this row 57377 * @param {int} dataIndex The index of this row in the internal aoData array 57378 * 57379 * @dtopt Callbacks 57380 * @name DataTable.defaults.createdRow 57381 * 57382 * @example 57383 * $(document).ready( function() { 57384 * $('#example').dataTable( { 57385 * "createdRow": function( row, data, dataIndex ) { 57386 * // Bold the grade for all 'A' grade browsers 57387 * if ( data[4] == "A" ) 57388 * { 57389 * $('td:eq(4)', row).html( '<b>A</b>' ); 57390 * } 57391 * } 57392 * } ); 57393 * } ); 57394 */ 57395 "fnCreatedRow": null, 57396 57397 57398 /** 57399 * This function is called on every 'draw' event, and allows you to 57400 * dynamically modify any aspect you want about the created DOM. 57401 * @type function 57402 * @param {object} settings DataTables settings object 57403 * 57404 * @dtopt Callbacks 57405 * @name DataTable.defaults.drawCallback 57406 * 57407 * @example 57408 * $(document).ready( function() { 57409 * $('#example').dataTable( { 57410 * "drawCallback": function( settings ) { 57411 * alert( 'DataTables has redrawn the table' ); 57412 * } 57413 * } ); 57414 * } ); 57415 */ 57416 "fnDrawCallback": null, 57417 57418 57419 /** 57420 * Identical to fnHeaderCallback() but for the table footer this function 57421 * allows you to modify the table footer on every 'draw' event. 57422 * @type function 57423 * @param {node} foot "TR" element for the footer 57424 * @param {array} data Full table data (as derived from the original HTML) 57425 * @param {int} start Index for the current display starting point in the 57426 * display array 57427 * @param {int} end Index for the current display ending point in the 57428 * display array 57429 * @param {array int} display Index array to translate the visual position 57430 * to the full data array 57431 * 57432 * @dtopt Callbacks 57433 * @name DataTable.defaults.footerCallback 57434 * 57435 * @example 57436 * $(document).ready( function() { 57437 * $('#example').dataTable( { 57438 * "footerCallback": function( tfoot, data, start, end, display ) { 57439 * tfoot.getElementsByTagName('th')[0].innerHTML = "Starting index is "+start; 57440 * } 57441 * } ); 57442 * } ) 57443 */ 57444 "fnFooterCallback": null, 57445 57446 57447 /** 57448 * When rendering large numbers in the information element for the table 57449 * (i.e. "Showing 1 to 10 of 57 entries") DataTables will render large numbers 57450 * to have a comma separator for the 'thousands' units (e.g. 1 million is 57451 * rendered as "1,000,000") to help readability for the end user. This 57452 * function will override the default method DataTables uses. 57453 * @type function 57454 * @member 57455 * @param {int} toFormat number to be formatted 57456 * @returns {string} formatted string for DataTables to show the number 57457 * 57458 * @dtopt Callbacks 57459 * @name DataTable.defaults.formatNumber 57460 * 57461 * @example 57462 * // Format a number using a single quote for the separator (note that 57463 * // this can also be done with the language.thousands option) 57464 * $(document).ready( function() { 57465 * $('#example').dataTable( { 57466 * "formatNumber": function ( toFormat ) { 57467 * return toFormat.toString().replace( 57468 * /\B(?=(\d{3})+(?!\d))/g, "'" 57469 * ); 57470 * }; 57471 * } ); 57472 * } ); 57473 */ 57474 "fnFormatNumber": function ( toFormat ) { 57475 return toFormat.toString().replace( 57476 /\B(?=(\d{3})+(?!\d))/g, 57477 this.oLanguage.sThousands 57478 ); 57479 }, 57480 57481 57482 /** 57483 * This function is called on every 'draw' event, and allows you to 57484 * dynamically modify the header row. This can be used to calculate and 57485 * display useful information about the table. 57486 * @type function 57487 * @param {node} head "TR" element for the header 57488 * @param {array} data Full table data (as derived from the original HTML) 57489 * @param {int} start Index for the current display starting point in the 57490 * display array 57491 * @param {int} end Index for the current display ending point in the 57492 * display array 57493 * @param {array int} display Index array to translate the visual position 57494 * to the full data array 57495 * 57496 * @dtopt Callbacks 57497 * @name DataTable.defaults.headerCallback 57498 * 57499 * @example 57500 * $(document).ready( function() { 57501 * $('#example').dataTable( { 57502 * "fheaderCallback": function( head, data, start, end, display ) { 57503 * head.getElementsByTagName('th')[0].innerHTML = "Displaying "+(end-start)+" records"; 57504 * } 57505 * } ); 57506 * } ) 57507 */ 57508 "fnHeaderCallback": null, 57509 57510 57511 /** 57512 * The information element can be used to convey information about the current 57513 * state of the table. Although the internationalisation options presented by 57514 * DataTables are quite capable of dealing with most customisations, there may 57515 * be times where you wish to customise the string further. This callback 57516 * allows you to do exactly that. 57517 * @type function 57518 * @param {object} oSettings DataTables settings object 57519 * @param {int} start Starting position in data for the draw 57520 * @param {int} end End position in data for the draw 57521 * @param {int} max Total number of rows in the table (regardless of 57522 * filtering) 57523 * @param {int} total Total number of rows in the data set, after filtering 57524 * @param {string} pre The string that DataTables has formatted using it's 57525 * own rules 57526 * @returns {string} The string to be displayed in the information element. 57527 * 57528 * @dtopt Callbacks 57529 * @name DataTable.defaults.infoCallback 57530 * 57531 * @example 57532 * $('#example').dataTable( { 57533 * "infoCallback": function( settings, start, end, max, total, pre ) { 57534 * return start +" to "+ end; 57535 * } 57536 * } ); 57537 */ 57538 "fnInfoCallback": null, 57539 57540 57541 /** 57542 * Called when the table has been initialised. Normally DataTables will 57543 * initialise sequentially and there will be no need for this function, 57544 * however, this does not hold true when using external language information 57545 * since that is obtained using an async XHR call. 57546 * @type function 57547 * @param {object} settings DataTables settings object 57548 * @param {object} json The JSON object request from the server - only 57549 * present if client-side Ajax sourced data is used 57550 * 57551 * @dtopt Callbacks 57552 * @name DataTable.defaults.initComplete 57553 * 57554 * @example 57555 * $(document).ready( function() { 57556 * $('#example').dataTable( { 57557 * "initComplete": function(settings, json) { 57558 * alert( 'DataTables has finished its initialisation.' ); 57559 * } 57560 * } ); 57561 * } ) 57562 */ 57563 "fnInitComplete": null, 57564 57565 57566 /** 57567 * Called at the very start of each table draw and can be used to cancel the 57568 * draw by returning false, any other return (including undefined) results in 57569 * the full draw occurring). 57570 * @type function 57571 * @param {object} settings DataTables settings object 57572 * @returns {boolean} False will cancel the draw, anything else (including no 57573 * return) will allow it to complete. 57574 * 57575 * @dtopt Callbacks 57576 * @name DataTable.defaults.preDrawCallback 57577 * 57578 * @example 57579 * $(document).ready( function() { 57580 * $('#example').dataTable( { 57581 * "preDrawCallback": function( settings ) { 57582 * if ( $('#test').val() == 1 ) { 57583 * return false; 57584 * } 57585 * } 57586 * } ); 57587 * } ); 57588 */ 57589 "fnPreDrawCallback": null, 57590 57591 57592 /** 57593 * This function allows you to 'post process' each row after it have been 57594 * generated for each table draw, but before it is rendered on screen. This 57595 * function might be used for setting the row class name etc. 57596 * @type function 57597 * @param {node} row "TR" element for the current row 57598 * @param {array} data Raw data array for this row 57599 * @param {int} displayIndex The display index for the current table draw 57600 * @param {int} displayIndexFull The index of the data in the full list of 57601 * rows (after filtering) 57602 * 57603 * @dtopt Callbacks 57604 * @name DataTable.defaults.rowCallback 57605 * 57606 * @example 57607 * $(document).ready( function() { 57608 * $('#example').dataTable( { 57609 * "rowCallback": function( row, data, displayIndex, displayIndexFull ) { 57610 * // Bold the grade for all 'A' grade browsers 57611 * if ( data[4] == "A" ) { 57612 * $('td:eq(4)', row).html( '<b>A</b>' ); 57613 * } 57614 * } 57615 * } ); 57616 * } ); 57617 */ 57618 "fnRowCallback": null, 57619 57620 57621 /** 57622 * __Deprecated__ The functionality provided by this parameter has now been 57623 * superseded by that provided through `ajax`, which should be used instead. 57624 * 57625 * This parameter allows you to override the default function which obtains 57626 * the data from the server so something more suitable for your application. 57627 * For example you could use POST data, or pull information from a Gears or 57628 * AIR database. 57629 * @type function 57630 * @member 57631 * @param {string} source HTTP source to obtain the data from (`ajax`) 57632 * @param {array} data A key/value pair object containing the data to send 57633 * to the server 57634 * @param {function} callback to be called on completion of the data get 57635 * process that will draw the data on the page. 57636 * @param {object} settings DataTables settings object 57637 * 57638 * @dtopt Callbacks 57639 * @dtopt Server-side 57640 * @name DataTable.defaults.serverData 57641 * 57642 * @deprecated 1.10. Please use `ajax` for this functionality now. 57643 */ 57644 "fnServerData": null, 57645 57646 57647 /** 57648 * __Deprecated__ The functionality provided by this parameter has now been 57649 * superseded by that provided through `ajax`, which should be used instead. 57650 * 57651 * It is often useful to send extra data to the server when making an Ajax 57652 * request - for example custom filtering information, and this callback 57653 * function makes it trivial to send extra information to the server. The 57654 * passed in parameter is the data set that has been constructed by 57655 * DataTables, and you can add to this or modify it as you require. 57656 * @type function 57657 * @param {array} data Data array (array of objects which are name/value 57658 * pairs) that has been constructed by DataTables and will be sent to the 57659 * server. In the case of Ajax sourced data with server-side processing 57660 * this will be an empty array, for server-side processing there will be a 57661 * significant number of parameters! 57662 * @returns {undefined} Ensure that you modify the data array passed in, 57663 * as this is passed by reference. 57664 * 57665 * @dtopt Callbacks 57666 * @dtopt Server-side 57667 * @name DataTable.defaults.serverParams 57668 * 57669 * @deprecated 1.10. Please use `ajax` for this functionality now. 57670 */ 57671 "fnServerParams": null, 57672 57673 57674 /** 57675 * Load the table state. With this function you can define from where, and how, the 57676 * state of a table is loaded. By default DataTables will load from `localStorage` 57677 * but you might wish to use a server-side database or cookies. 57678 * @type function 57679 * @member 57680 * @param {object} settings DataTables settings object 57681 * @
57681return {object} The DataTables state object to be loaded 57682 * 57683 * @dtopt Callbacks 57684 * @name DataTable.defaults.stateLoadCallback 57685 * 57686 * @example 57687 * $(document).ready( function() { 57688 * $('#example').dataTable( { 57689 * "stateSave": true, 57690 * "stateLoadCallback": function (settings) { 57691 * var o; 57692 * 57693 * // Send an Ajax request to the server to get the data. Note that 57694 * // this is a synchronous request. 57695 * $.ajax( { 57696 * "url": "/state_load", 57697 * "async": false, 57698 * "dataType": "json", 57699 * "success": function (json) { 57700 * o = json; 57701 * } 57702 * } ); 57703 * 57704 * return o; 57705 * } 57706 * } ); 57707 * } ); 57708 */ 57709 "fnStateLoadCallback": function ( settings ) { 57710 try { 57711 return JSON.parse( 57712 (settings.iStateDuration === -1 ? sessionStorage : localStorage).getItem( 57713 'DataTables_'+settings.sInstance+'_'+location.pathname 57714 ) 57715 ); 57716 } catch (e) {
vendor: 21,139 bytes, lines 57716-58393
57716} 57717 }, 57718 57719 57720 /** 57721 * Callback which allows modification of the saved state prior to loading that state. 57722 * This callback is called when the table is loading state from the stored data, but 57723 * prior to the settings object being modified by the saved state. Note that for 57724 * plug-in authors, you should use the `stateLoadParams` event to load parameters for 57725 * a plug-in. 57726 * @type function 57727 * @param {object} settings DataTables settings object 57728 * @param {object} data The state object that is to be loaded 57729 * 57730 * @dtopt Callbacks 57731 * @name DataTable.defaults.stateLoadParams 57732 * 57733 * @example 57734 * // Remove a saved filter, so filtering is never loaded 57735 * $(document).ready( function() { 57736 * $('#example').dataTable( { 57737 * "stateSave": true, 57738 * "stateLoadParams": function (settings, data) { 57739 * data.oSearch.sSearch = ""; 57740 * } 57741 * } ); 57742 * } ); 57743 * 57744 * @example 57745 * // Disallow state loading by returning false 57746 * $(document).ready( function() { 57747 * $('#example').dataTable( { 57748 * "stateSave": true, 57749 * "stateLoadParams": function (settings, data) { 57750 * return false; 57751 * } 57752 * } ); 57753 * } ); 57754 */ 57755 "fnStateLoadParams": null, 57756 57757 57758 /** 57759 * Callback that is called when the state has been loaded from the state saving method 57760 * and the DataTables settings object has been modified as a result of the loaded state. 57761 * @type function 57762 * @param {object} settings DataTables settings object 57763 * @param {object} data The state object that was loaded 57764 * 57765 * @dtopt Callbacks 57766 * @name DataTable.defaults.stateLoaded 57767 * 57768 * @example 57769 * // Show an alert with the filtering value that was saved 57770 * $(document).ready( function() { 57771 * $('#example').dataTable( { 57772 * "stateSave": true, 57773 * "stateLoaded": function (settings, data) { 57774 * alert( 'Saved filter was: '+data.oSearch.sSearch ); 57775 * } 57776 * } ); 57777 * } ); 57778 */ 57779 "fnStateLoaded": null, 57780 57781 57782 /** 57783 * Save the table state. This function allows you to define where and how the state 57784 * information for the table is stored By default DataTables will use `localStorage` 57785 * but you might wish to use a server-side database or cookies. 57786 * @type function 57787 * @member 57788 * @param {object} settings DataTables settings object 57789 * @param {object} data The state object to be saved 57790 * 57791 * @dtopt Callbacks 57792 * @name DataTable.defaults.stateSaveCallback 57793 * 57794 * @example 57795 * $(document).ready( function() { 57796 * $('#example').dataTable( { 57797 * "stateSave": true, 57798 * "stateSaveCallback": function (settings, data) { 57799 * // Send an Ajax request to the server with the state object 57800 * $.ajax( { 57801 * "url": "/state_save", 57802 * "data": data, 57803 * "dataType": "json", 57804 * "method": "POST" 57805 * "success": function () {} 57806 * } ); 57807 * } 57808 * } ); 57809 * } ); 57810 */ 57811 "fnStateSaveCallback": function ( settings, data ) { 57812 try { 57813 (settings.iStateDuration === -1 ? sessionStorage : localStorage).setItem( 57814 'DataTables_'+settings.sInstance+'_'+location.pathname, 57815 JSON.stringify( data ) 57816 ); 57817 } catch (e) {} 57818 }, 57819 57820 57821 /** 57822 * Callback which allows modification of the state to be saved. Called when the table 57823 * has changed state a new state save is required. This method allows modification of 57824 * the state saving object prior to actually doing the save, including addition or 57825 * other state properties or modification. Note that for plug-in authors, you should 57826 * use the `stateSaveParams` event to save parameters for a plug-in. 57827 * @type function 57828 * @param {object} settings DataTables settings object 57829 * @param {object} data The state object to be saved 57830 * 57831 * @dtopt Callbacks 57832 * @name DataTable.defaults.stateSaveParams 57833 * 57834 * @example 57835 * // Remove a saved filter, so filtering is never saved 57836 * $(document).ready( function() { 57837 * $('#example').dataTable( { 57838 * "stateSave": true, 57839 * "stateSaveParams": function (settings, data) { 57840 * data.oSearch.sSearch = ""; 57841 * } 57842 * } ); 57843 * } ); 57844 */ 57845 "fnStateSaveParams": null, 57846 57847 57848 /** 57849 * Duration for which the saved state information is considered valid. After this period 57850 * has elapsed the state will be returned to the default. 57851 * Value is given in seconds. 57852 * @type int 57853 * @default 7200 <i>(2 hours)</i> 57854 * 57855 * @dtopt Options 57856 * @name DataTable.defaults.stateDuration 57857 * 57858 * @example 57859 * $(document).ready( function() { 57860 * $('#example').dataTable( { 57861 * "stateDuration": 60*60*24; // 1 day 57862 * } ); 57863 * } ) 57864 */ 57865 "iStateDuration": 7200, 57866 57867 57868 /** 57869 * When enabled DataTables will not make a request to the server for the first 57870 * page draw - rather it will use the data already on the page (no sorting etc 57871 * will be applied to it), thus saving on an XHR at load time. `deferLoading` 57872 * is used to indicate that deferred loading is required, but it is also used 57873 * to tell DataTables how many records there are in the full table (allowing 57874 * the information element and pagination to be displayed correctly). In the case 57875 * where a filtering is applied to the table on initial load, this can be 57876 * indicated by giving the parameter as an array, where the first element is 57877 * the number of records available after filtering and the second element is the 57878 * number of records without filtering (allowing the table information element 57879 * to be shown correctly). 57880 * @type int | array 57881 * @default null 57882 * 57883 * @dtopt Options 57884 * @name DataTable.defaults.deferLoading 57885 * 57886 * @example 57887 * // 57 records available in the table, no filtering applied 57888 * $(document).ready( function() { 57889 * $('#example').dataTable( { 57890 * "serverSide": true, 57891 * "ajax": "scripts/server_processing.php", 57892 * "deferLoading": 57 57893 * } ); 57894 * } ); 57895 * 57896 * @example 57897 * // 57 records after filtering, 100 without filtering (an initial filter applied) 57898 * $(document).ready( function() { 57899 * $('#example').dataTable( { 57900 * "serverSide": true, 57901 * "ajax": "scripts/server_processing.php", 57902 * "deferLoading": [ 57, 100 ], 57903 * "search": { 57904 * "search": "my_filter" 57905 * } 57906 * } ); 57907 * } ); 57908 */ 57909 "iDeferLoading": null, 57910 57911 57912 /** 57913 * Number of rows to display on a single page when using pagination. If 57914 * feature enabled (`lengthChange`) then the end user will be able to override 57915 * this to a custom setting using a pop-up menu. 57916 * @type int 57917 * @default 10 57918 * 57919 * @dtopt Options 57920 * @name DataTable.defaults.pageLength 57921 * 57922 * @example 57923 * $(document).ready( function() { 57924 * $('#example').dataTable( { 57925 * "pageLength": 50 57926 * } ); 57927 * } ) 57928 */ 57929 "iDisplayLength": 10, 57930 57931 57932 /** 57933 * Define the starting point for data display when using DataTables with 57934 * pagination. Note that this parameter is the number of records, rather than 57935 * the page number, so if you have 10 records per page and want to start on 57936 * the third page, it should be "20". 57937 * @type int 57938 * @default 0 57939 * 57940 * @dtopt Options 57941 * @name DataTable.defaults.displayStart 57942 * 57943 * @example 57944 * $(document).ready( function() { 57945 * $('#example').dataTable( { 57946 * "displayStart": 20 57947 * } ); 57948 * } ) 57949 */ 57950 "iDisplayStart": 0, 57951 57952 57953 /** 57954 * By default DataTables allows keyboard navigation of the table (sorting, paging, 57955 * and filtering) by adding a `tabindex` attribute to the required elements. This 57956 * allows you to tab through the controls and press the enter key to activate them. 57957 * The tabindex is default 0, meaning that the tab follows the flow of the document. 57958 * You can overrule this using this parameter if you wish. Use a value of -1 to 57959 * disable built-in keyboard navigation. 57960 * @type int 57961 * @default 0 57962 * 57963 * @dtopt Options 57964 * @name DataTable.defaults.tabIndex 57965 * 57966 * @example 57967 * $(document).ready( function() { 57968 * $('#example').dataTable( { 57969 * "tabIndex": 1 57970 * } ); 57971 * } ); 57972 */ 57973 "iTabIndex": 0, 57974 57975 57976 /** 57977 * Classes that DataTables assigns to the various components and features 57978 * that it adds to the HTML table. This allows classes to be configured 57979 * during initialisation in addition to through the static 57980 * {@link DataTable.ext.oStdClasses} object). 57981 * @namespace 57982 * @name DataTable.defaults.classes 57983 */ 57984 "oClasses": {}, 57985 57986 57987 /** 57988 * All strings that DataTables uses in the user interface that it creates 57989 * are defined in this object, allowing you to modified them individually or 57990 * completely replace them all as required. 57991 * @namespace 57992 * @name DataTable.defaults.language 57993 */ 57994 "oLanguage": { 57995 /** 57996 * Strings that are used for WAI-ARIA labels and controls only (these are not 57997 * actually visible on the page, but will be read by screenreaders, and thus 57998 * must be internationalised as well). 57999 * @namespace 58000 * @name DataTable.defaults.language.aria 58001 */ 58002 "oAria": { 58003 /** 58004 * ARIA label that is added to the table headers when the column may be 58005 * sorted ascending by activing the column (click or return when focused). 58006 * Note that the column header is prefixed to this string. 58007 * @type string 58008 * @default : activate to sort column ascending 58009 * 58010 * @dtopt Language 58011 * @name DataTable.defaults.language.aria.sortAscending 58012 * 58013 * @example 58014 * $(document).ready( function() { 58015 * $('#example').dataTable( { 58016 * "language": { 58017 * "aria": { 58018 * "sortAscending": " - click/return to sort ascending" 58019 * } 58020 * } 58021 * } ); 58022 * } ); 58023 */ 58024 "sSortAscending": ": activate to sort column ascending", 58025 58026 /** 58027 * ARIA label that is added to the table headers when the column may be 58028 * sorted descending by activing the column (click or return when focused). 58029 * Note that the column header is prefixed to this string. 58030 * @type string 58031 * @default : activate to sort column ascending 58032 * 58033 * @dtopt Language 58034 * @name DataTable.defaults.language.aria.sortDescending 58035 * 58036 * @example 58037 * $(document).ready( function() { 58038 * $('#example').dataTable( { 58039 * "language": { 58040 * "aria": { 58041 * "sortDescending": " - click/return to sort descending" 58042 * } 58043 * } 58044 * } ); 58045 * } ); 58046 */ 58047 "sSortDescending": ": activate to sort column descending" 58048 }, 58049 58050 /** 58051 * Pagination string used by DataTables for the built-in pagination 58052 * control types. 58053 * @namespace 58054 * @name DataTable.defaults.language.paginate 58055 */ 58056 "oPaginate": { 58057 /** 58058 * Text to use when using the 'full_numbers' type of pagination for the 58059 * button to take the user to the first page. 58060 * @type string 58061 * @default First 58062 * 58063 * @dtopt Language 58064 * @name DataTable.defaults.language.paginate.first 58065 * 58066 * @example 58067 * $(document).ready( function() { 58068 * $('#example').dataTable( { 58069 * "language": { 58070 * "paginate": { 58071 * "first": "First page" 58072 * } 58073 * } 58074 * } ); 58075 * } ); 58076 */ 58077 "sFirst": "First", 58078 58079 58080 /** 58081 * Text to use when using the 'full_numbers' type of pagination for the 58082 * button to take the user to the last page. 58083 * @type string 58084 * @default Last 58085 * 58086 * @dtopt Language 58087 * @name DataTable.defaults.language.paginate.last 58088 * 58089 * @example 58090 * $(document).ready( function() { 58091 * $('#example').dataTable( { 58092 * "language": { 58093 * "paginate": { 58094 * "last": "Last page" 58095 * } 58096 * } 58097 * } ); 58098 * } ); 58099 */ 58100 "sLast": "Last", 58101 58102 58103 /** 58104 * Text to use for the 'next' pagination button (to take the user to the 58105 * next page). 58106 * @type string 58107 * @default Next 58108 * 58109 * @dtopt Language 58110 * @name DataTable.defaults.language.paginate.next 58111 * 58112 * @example 58113 * $(document).ready( function() { 58114 * $('#example').dataTable( { 58115 * "language": { 58116 * "paginate": { 58117 * "next": "Next page" 58118 * } 58119 * } 58120 * } ); 58121 * } ); 58122 */ 58123 "sNext": "Next", 58124 58125 58126 /** 58127 * Text to use for the 'previous' pagination button (to take the user to 58128 * the previous page). 58129 * @type string 58130 * @default Previous 58131 * 58132 * @dtopt Language 58133 * @name DataTable.defaults.language.paginate.previous 58134 * 58135 * @example 58136 * $(document).ready( function() { 58137 * $('#example').dataTable( { 58138 * "language": { 58139 * "paginate": { 58140 * "previous": "Previous page" 58141 * } 58142 * } 58143 * } ); 58144 * } ); 58145 */ 58146 "sPrevious": "Previous" 58147 }, 58148 58149 /** 58150 * This string is shown in preference to `zeroRecords` when the table is 58151 * empty of data (regardless of filtering). Note that this is an optional 58152 * parameter - if it is not given, the value of `zeroRecords` will be used 58153 * instead (either the default or given value). 58154 * @type string 58155 * @default No data available in table 58156 * 58157 * @dtopt Language 58158 * @name DataTable.defaults.language.emptyTable 58159 * 58160 * @example 58161 * $(document).ready( function() { 58162 * $('#example').dataTable( { 58163 * "language": { 58164 * "emptyTable": "No data available in table" 58165 * } 58166 * } ); 58167 * } ); 58168 */ 58169 "sEmptyTable": "No data available in table", 58170 58171 58172 /** 58173 * This string gives information to the end user about the information 58174 * that is current on display on the page. The following tokens can be 58175 * used in the string and will be dynamically replaced as the table 58176 * display updates. This tokens can be placed anywhere in the string, or 58177 * removed as needed by the language requires: 58178 * 58179 * * `\_START\_` - Display index of the first record on the current page 58180 * * `\_END\_` - Display index of the last record on the current page 58181 * * `\_TOTAL\_` - Number of records in the table after filtering 58182 * * `\_MAX\_` - Number of records in the table without filtering 58183 * * `\_PAGE\_` - Current page number 58184 * * `\_PAGES\_` - Total number of pages of data in the table 58185 * 58186 * @type string 58187 * @default Showing _START_ to _END_ of _TOTAL_ entries 58188 * 58189 * @dtopt Language 58190 * @name DataTable.defaults.language.info 58191 * 58192 * @example 58193 * $(document).ready( function() { 58194 * $('#example').dataTable( { 58195 * "language": { 58196 * "info": "Showing page _PAGE_ of _PAGES_" 58197 * } 58198 * } ); 58199 * } ); 58200 */ 58201 "sInfo": "Showing _START_ to _END_ of _TOTAL_ entries", 58202 58203 58204 /** 58205 * Display information string for when the table is empty. Typically the 58206 * format of this string should match `info`. 58207 * @type string 58208 * @default Showing 0 to 0 of 0 entries 58209 * 58210 * @dtopt Language 58211 * @name DataTable.defaults.language.infoEmpty 58212 * 58213 * @example 58214 * $(document).ready( function() { 58215 * $('#example').dataTable( { 58216 * "language": { 58217 * "infoEmpty": "No entries to show" 58218 * } 58219 * } ); 58220 * } ); 58221 */ 58222 "sInfoEmpty": "Showing 0 to 0 of 0 entries", 58223 58224 58225 /** 58226 * When a user filters the information in a table, this string is appended 58227 * to the information (`info`) to give an idea of how strong the filtering 58228 * is. The variable _MAX_ is dynamically updated. 58229 * @type string 58230 * @default (filtered from _MAX_ total entries) 58231 * 58232 * @dtopt Language 58233 * @name DataTable.defaults.language.infoFiltered 58234 * 58235 * @example 58236 * $(document).ready( function() { 58237 * $('#example').dataTable( { 58238 * "language": { 58239 * "infoFiltered": " - filtering from _MAX_ records" 58240 * } 58241 * } ); 58242 * } ); 58243 */ 58244 "sInfoFiltered": "(filtered from _MAX_ total entries)", 58245 58246 58247 /** 58248 * If can be useful to append extra information to the info string at times, 58249 * and this variable does exactly that. This information will be appended to 58250 * the `info` (`infoEmpty` and `infoFiltered` in whatever combination they are 58251 * being used) at all times. 58252 * @type string 58253 * @default <i>Empty string</i> 58254 * 58255 * @dtopt Language 58256 * @name DataTable.defaults.language.infoPostFix 58257 * 58258 * @example 58259 * $(document).ready( function() { 58260 * $('#example').dataTable( { 58261 * "language": { 58262 * "infoPostFix": "All records shown are derived from real information." 58263 * } 58264 * } ); 58265 * } ); 58266 */ 58267 "sInfoPostFix": "", 58268 58269 58270 /** 58271 * This decimal place operator is a little different from the other 58272 * language options since DataTables doesn't output floating point 58273 * numbers, so it won't ever use this for display of a number. Rather, 58274 * what this parameter does is modify the sort methods of the table so 58275 * that numbers which are in a format which has a character other than 58276 * a period (`.`) as a decimal place will be sorted numerically. 58277 * 58278 * Note that numbers with different decimal places cannot be shown in 58279 * the same table and still be sortable, the table must be consistent. 58280 * However, multiple different tables on the page can use different 58281 * decimal place characters. 58282 * @type string 58283 * @default 58284 * 58285 * @dtopt Language 58286 * @name DataTable.defaults.language.decimal 58287 * 58288 * @example 58289 * $(document).ready( function() { 58290 * $('#example').dataTable( { 58291 * "language": { 58292 * "decimal": "," 58293 * "thousands": "." 58294 * } 58295 * } ); 58296 * } ); 58297 */ 58298 "sDecimal": "", 58299 58300 58301 /** 58302 * DataTables has a build in number formatter (`formatNumber`) which is 58303 * used to format large numbers that are used in the table information. 58304 * By default a comma is used, but this can be trivially changed to any 58305 * character you wish with this parameter. 58306 * @type string 58307 * @default , 58308 * 58309 * @dtopt Language 58310 * @name DataTable.defaults.language.thousands 58311 * 58312 * @example 58313 * $(document).ready( function() { 58314 * $('#example').dataTable( { 58315 * "language": { 58316 * "thousands": "'" 58317 * } 58318 * } ); 58319 * } ); 58320 */ 58321 "sThousands": ",", 58322 58323 58324 /** 58325 * Detail the action that will be taken when the drop down menu for the 58326 * pagination length option is changed. The '_MENU_' variable is replaced 58327 * with a default select list of 10, 25, 50 and 100, and can be replaced 58328 * with a custom select box if required. 58329 * @type string 58330 * @default Show _MENU_ entries 58331 * 58332 * @dtopt Language 58333 * @name DataTable.defaults.language.lengthMenu 58334 * 58335 * @example 58336 * // Language change only 58337 * $(document).ready( function() { 58338 * $('#example').dataTable( { 58339 * "language": { 58340 * "lengthMenu": "Display _MENU_ records" 58341 * } 58342 * } ); 58343 * } ); 58344 * 58345 * @example 58346 * // Language and options change 58347 * $(document).ready( function() { 58348 * $('#example').dataTable( { 58349 * "language": { 58350 * "lengthMenu": 'Display <select>'+ 58351 * '<option value="10">10</option>'+ 58352 * '<option value="20">20</option>'+ 58353 * '<option value="30">30</option>'+ 58354 * '<option value="40">40</option>'+ 58355 * '<option value="50">50</option>'+ 58356 * '<option value="-1">All</option>'+ 58357 * '</select> records' 58358 * } 58359 * } ); 58360 * } ); 58361 */ 58362 "sLengthMenu": "Show _MENU_ entries", 58363 58364 58365 /** 58366 * When using Ajax sourced data and during the first draw when DataTables is 58367 * gathering the data, this message is shown in an empty row in the table to 58368 * indicate to the end user the the data is being loaded. Note that this 58369 * parameter is not used when loading data by server-side processing, just 58370 * Ajax sourced data with client-side processing. 58371 * @type string 58372 * @default Loading... 58373 * 58374 * @dtopt Language 58375 * @name DataTable.defaults.language.loadingRecords 58376 * 58377 * @example 58378 * $(document).ready( function() { 58379 * $('#example').dataTable( { 58380 * "language": { 58381 * "loadingRecords": "Please wait - loading..." 58382 * } 58383 * } ); 58384 * } ); 58385 */ 58386 "sLoadingRecords": "Loading...", 58387 58388 58389 /** 58390 * Text which is displayed when the table is processing a user action 58391 * (usually a sort command or similar). 58392 * @type string 58393 *
58393 @default Processing... 58394 * 58395 * @dtopt Language 58396 * @name DataTable.defaults.language.processing 58397 * 58398 * @example 58399 * $(document).ready( function() { 58400 * $('#example').dataTable( { 58401 * "language": { 58402 * "processing": "DataTables is currently busy" 58403 * } 58404 * } ); 58405 * } ); 58406 */ 58407 "sProcessing": "Processing...", 58408 58409 58410 /** 58411 * Details the actions that will be taken when the user types into the 58412 * filtering input text box. The variable "_INPUT_", if used in the string, 58413 * is replaced with the HTML text box for the filtering input allowing 58414 * control over where it appears in the string. If "_INPUT_" is not given 58415 * then the input box is appended to the string automatically. 58416 * @type string 58417 * @default Search: 58418 * 58419 * @dtopt Language 58420 * @name DataTable.defaults.language.search 58421 * 58422 * @example 58423 * // Input text box will be appended at the end automatically 58424 * $(document).ready( function() { 58425 * $('#example').dataTable( { 58426 * "language": { 58427 * "search": "Filter records:" 58428 * } 58429 * } ); 58430 * } ); 58431 * 58432 * @example 58433 * // Specify where the filter should appear 58434 * $(document).ready( function() { 58435 * $('#example').dataTable( { 58436 * "language": { 58437 * "search": "Apply filter _INPUT_ to table" 58438 * } 58439 * } ); 58440 * } ); 58441 */ 58442 "sSearch": "Search:", 58443 58444 58445 /** 58446 * Assign a `placeholder` attribute to the search `input` element 58447 * @type string 58448 * @default 58449 * 58450 * @dtopt Language 58451 * @name DataTable.defaults.language.searchPlaceholder 58452 */ 58453 "sSearchPlaceholder": "", 58454 58455 58456 /** 58457 * All of the language information can be stored in a file on the 58458 * server-side, which DataTables will look up if this parameter is passed. 58459 * It must store the URL of the language file, which is in a JSON format, 58460 * and the object has the same properties as the oLanguage object in the 58461 * initialiser object (i.e. the above parameters). Please refer to one of 58462 * the example language files to see how this works in action. 58463 * @type string 58464 * @default <i>Empty string - i.e. disabled</i> 58465 * 58466 * @dtopt Language 58467 * @name DataTable.defaults.language.url 58468 * 58469 * @example 58470 * $(document).ready( function() { 58471 * $('#example').dataTable( { 58472 * "language": { 58473 * "url": "http://www.sprymedia.co.uk/dataTables/lang.txt" 58474 * } 58475 * } ); 58476 * } ); 58477 */ 58478 "sUrl": "", 58479 58480 58481 /** 58482 * Text shown inside the table records when the is no information to be 58483 * displayed after filtering. `emptyTable` is shown when there is simply no 58484 * information in the table at all (regardless of filtering). 58485 * @type string 58486 * @default No matching records found 58487 * 58488 * @dtopt Language 58489 * @name DataTable.defaults.language.zeroRecords 58490 * 58491 * @example 58492 * $(document).ready( function() { 58493 * $('#example').dataTable( { 58494 * "language": { 58495 * "zeroRecords": "No records to display" 58496 * } 58497 * } ); 58498 * } ); 58499 */ 58500 "sZeroRecords": "No matching records found" 58501 }, 58502 58503 58504 /** 58505 * This parameter allows you to have define the global filtering state at 58506 * initialisation time. As an object the `search` parameter must be 58507 * defined, but all other parameters are optional. When `regex` is true, 58508 * the search string will be treated as a regular expression, when false 58509 * (default) it will be treated as a straight string. When `smart` 58510 * DataTables will use it's smart filtering methods (to word match at 58511 * any point in the data), when false this will not be done. 58512 * @namespace 58513 * @extends DataTable.models.oSearch 58514 * 58515 * @dtopt Options 58516 * @name DataTable.defaults.search 58517 * 58518 * @example 58519 * $(document).ready( function() { 58520 * $('#example').dataTable( { 58521 * "search": {"search": "Initial search"} 58522 * } ); 58523 * } ) 58524 */ 58525 "oSearch": $.extend( {}, DataTable.models.oSearch ), 58526 58527 58528 /** 58529 * __Deprecated__ The functionality provided by this parameter has now been 58530 * superseded by that provided through `ajax`, which should be used instead. 58531 * 58532 * By default DataTables will look for the property `data` (or `aaData` for 58533 * compatibility with DataTables 1.9-) when obtaining data from an Ajax 58534 * source or for server-side processing - this parameter allows that 58535 * property to be changed. You can use Javascript dotted object notation to 58536 * get a data source for multiple levels of nesting. 58537 * @type string 58538 * @default data 58539 * 58540 * @dtopt Options 58541 * @dtopt Server-side 58542 * @name DataTable.defaults.ajaxDataProp 58543 * 58544 * @deprecated 1.10. Please use `ajax` for this functionality now. 58545 */ 58546 "sAjaxDataProp": "data", 58547 58548 58549 /** 58550 * __Deprecated__ The functionality provided by this parameter has now been 58551 * superseded by that provided through `ajax`, which should be used instead. 58552 * 58553 * You can instruct DataTables to load data from an external 58554 * source using this parameter (use aData if you want to pass data in you 58555 * already have). Simply provide a url a JSON object can be obtained from. 58556 * @type string 58557 * @default null 58558 * 58559 * @dtopt Options 58560 * @dtopt Server-side 58561 * @name DataTable.defaults.ajaxSource 58562 * 58563 * @deprecated 1.10. Please use `ajax` for this functionality now. 58564 */ 58565 "sAjaxSource": null, 58566 58567 58568 /** 58569 * This initialisation variable allows you to specify exactly where in the 58570 * DOM you want DataTables to inject the various controls it adds to the page 58571 * (for example you might want the pagination controls at the top of the 58572 * table). DIV elements (with or without a custom class) can also be added to 58573 * aid styling. The follow syntax is used: 58574 * <ul> 58575 * <li>The following options are allowed: 58576 * <ul> 58577 * <li>'l' - Length changing</li> 58578 * <li>'f' - Filtering input</li> 58579 * <li>'t' - The table!</li> 58580 * <li>'i' - Information</li> 58581 * <li>'p' - Pagination</li> 58582 * <li>'r' - pRocessing</li> 58583 * </ul> 58584 * </li> 58585 * <li>The following constants are allowed: 58586 * <ul> 58587 * <li>'H' - jQueryUI theme "header" classes ('fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix')</li> 58588 * <li>'F' - jQueryUI theme "footer" classes ('fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix')</li> 58589 * </ul> 58590 * </li> 58591 * <li>The following syntax is expected: 58592 * <ul> 58593 * <li>'<' and '>' - div elements</li> 58594 * <li>'<"class" and '>' - div with a class</li> 58595 * <li>'<"#id" and '>' - div with an ID</li> 58596 * </ul> 58597 * </li> 58598 * <li>Examples: 58599 * <ul> 58600 * <li>'<"wrapper"flipt>'</li> 58601 * <li>'<lf<t>ip>'</li> 58602 * </ul> 58603 * </li> 58604 * </ul> 58605 * @type string 58606 * @default lfrtip <i>(when `jQueryUI` is false)</i> <b>or</b> 58607 * <"H"lfr>t<"F"ip> <i>(when `jQueryUI` is true)</i> 58608 * 58609 * @dtopt Options 58610 * @name DataTable.defaults.dom 58611 * 58612 * @example 58613 * $(document).ready( function() { 58614 * $('#example').dataTable( { 58615 * "dom": '<"top"i>rt<"bottom"flp><"clear">' 58616 * } ); 58617 * } ); 58618 */ 58619 "sDom": "lfrtip", 58620 58621 58622 /** 58623 * Search delay option. This will throttle full table searches that use the 58624 * DataTables provided search input element (it does not effect calls to 58625 * `dt-api search()`, providing a delay before the search is made. 58626 * @type integer 58627 * @default 0 58628 * 58629 * @dtopt Options 58630 * @name DataTable.defaults.searchDelay 58631 * 58632 * @example 58633 * $(document).ready( function() { 58634 * $('#example').dataTable( { 58635 * "searchDelay": 200 58636 * } ); 58637 * } ) 58638 */ 58639 "searchDelay": null, 58640 58641 58642 /** 58643 * DataTables features four different built-in options for the buttons to 58644 * display for pagination control: 58645 * 58646 * * `simple` - 'Previous' and 'Next' buttons only 58647 * * 'simple_numbers` - 'Previous' and 'Next' buttons, plus page numbers 58648 * * `full` - 'First', 'Previous', 'Next' and 'Last' buttons 58649 * * `full_numbers` - 'First', 'Previous', 'Next' and 'Last' buttons, plus 58650 *
vendor: 15,943 bytes, lines 58650-59135
58650 page numbers 58651 * 58652 * Further methods can be added using {@link DataTable.ext.oPagination}. 58653 * @type string 58654 * @default simple_numbers 58655 * 58656 * @dtopt Options 58657 * @name DataTable.defaults.pagingType 58658 * 58659 * @example 58660 * $(document).ready( function() { 58661 * $('#example').dataTable( { 58662 * "pagingType": "full_numbers" 58663 * } ); 58664 * } ) 58665 */ 58666 "sPaginationType": "simple_numbers", 58667 58668 58669 /** 58670 * Enable horizontal scrolling. When a table is too wide to fit into a 58671 * certain layout, or you have a large number of columns in the table, you 58672 * can enable x-scrolling to show the table in a viewport, which can be 58673 * scrolled. This property can be `true` which will allow the table to 58674 * scroll horizontally when needed, or any CSS unit, or a number (in which 58675 * case it will be treated as a pixel measurement). Setting as simply `true` 58676 * is recommended. 58677 * @type boolean|string 58678 * @default <i>blank string - i.e. disabled</i> 58679 * 58680 * @dtopt Features 58681 * @name DataTable.defaults.scrollX 58682 * 58683 * @example 58684 * $(document).ready( function() { 58685 * $('#example').dataTable( { 58686 * "scrollX": true, 58687 * "scrollCollapse": true 58688 * } ); 58689 * } ); 58690 */ 58691 "sScrollX": "", 58692 58693 58694 /** 58695 * This property can be used to force a DataTable to use more width than it 58696 * might otherwise do when x-scrolling is enabled. For example if you have a 58697 * table which requires to be well spaced, this parameter is useful for 58698 * "over-sizing" the table, and thus forcing scrolling. This property can by 58699 * any CSS unit, or a number (in which case it will be treated as a pixel 58700 * measurement). 58701 * @type string 58702 * @default <i>blank string - i.e. disabled</i> 58703 * 58704 * @dtopt Options 58705 * @name DataTable.defaults.scrollXInner 58706 * 58707 * @example 58708 * $(document).ready( function() { 58709 * $('#example').dataTable( { 58710 * "scrollX": "100%", 58711 * "scrollXInner": "110%" 58712 * } ); 58713 * } ); 58714 */ 58715 "sScrollXInner": "", 58716 58717 58718 /** 58719 * Enable vertical scrolling. Vertical scrolling will constrain the DataTable 58720 * to the given height, and enable scrolling for any data which overflows the 58721 * current viewport. This can be used as an alternative to paging to display 58722 * a lot of data in a small area (although paging and scrolling can both be 58723 * enabled at the same time). This property can be any CSS unit, or a number 58724 * (in which case it will be treated as a pixel measurement). 58725 * @type string 58726 * @default <i>blank string - i.e. disabled</i> 58727 * 58728 * @dtopt Features 58729 * @name DataTable.defaults.scrollY 58730 * 58731 * @example 58732 * $(document).ready( function() { 58733 * $('#example').dataTable( { 58734 * "scrollY": "200px", 58735 * "paginate": false 58736 * } ); 58737 * } ); 58738 */ 58739 "sScrollY": "", 58740 58741 58742 /** 58743 * __Deprecated__ The functionality provided by this parameter has now been 58744 * superseded by that provided through `ajax`, which should be used instead. 58745 * 58746 * Set the HTTP method that is used to make the Ajax call for server-side 58747 * processing or Ajax sourced data. 58748 * @type string 58749 * @default GET 58750 * 58751 * @dtopt Options 58752 * @dtopt Server-side 58753 * @name DataTable.defaults.serverMethod 58754 * 58755 * @deprecated 1.10. Please use `ajax` for this functionality now. 58756 */ 58757 "sServerMethod": "GET", 58758 58759 58760 /** 58761 * DataTables makes use of renderers when displaying HTML elements for 58762 * a table. These renderers can be added or modified by plug-ins to 58763 * generate suitable mark-up for a site. For example the Bootstrap 58764 * integration plug-in for DataTables uses a paging button renderer to 58765 * display pagination buttons in the mark-up required by Bootstrap. 58766 * 58767 * For further information about the renderers available see 58768 * DataTable.ext.renderer 58769 * @type string|object 58770 * @default null 58771 * 58772 * @name DataTable.defaults.renderer 58773 * 58774 */ 58775 "renderer": null, 58776 58777 58778 /** 58779 * Set the data property name that DataTables should use to get a row's id 58780 * to set as the `id` property in the node. 58781 * @type string 58782 * @default DT_RowId 58783 * 58784 * @name DataTable.defaults.rowId 58785 */ 58786 "rowId": "DT_RowId" 58787 }; 58788 58789 _fnHungarianMap( DataTable.defaults ); 58790 58791 58792 58793 /* 58794 * Developer note - See note in model.defaults.js about the use of Hungarian 58795 * notation and camel case. 58796 */ 58797 58798 /** 58799 * Column options that can be given to DataTables at initialisation time. 58800 * @namespace 58801 */ 58802 DataTable.defaults.column = { 58803 /** 58804 * Define which column(s) an order will occur on for this column. This 58805 * allows a column's ordering to take multiple columns into account when 58806 * doing a sort or use the data from a different column. For example first 58807 * name / last name columns make sense to do a multi-column sort over the 58808 * two columns. 58809 * @type array|int 58810 * @default null <i>Takes the value of the column index automatically</i> 58811 * 58812 * @name DataTable.defaults.column.orderData 58813 * @dtopt Columns 58814 * 58815 * @example 58816 * // Using `columnDefs` 58817 * $(document).ready( function() { 58818 * $('#example').dataTable( { 58819 * "columnDefs": [ 58820 * { "orderData": [ 0, 1 ], "targets": [ 0 ] }, 58821 * { "orderData": [ 1, 0 ], "targets": [ 1 ] }, 58822 * { "orderData": 2, "targets": [ 2 ] } 58823 * ] 58824 * } ); 58825 * } ); 58826 * 58827 * @example 58828 * // Using `columns` 58829 * $(document).ready( function() { 58830 * $('#example').dataTable( { 58831 * "columns": [ 58832 * { "orderData": [ 0, 1 ] }, 58833 * { "orderData": [ 1, 0 ] }, 58834 * { "orderData": 2 }, 58835 * null, 58836 * null 58837 * ] 58838 * } ); 58839 * } ); 58840 */ 58841 "aDataSort": null, 58842 "iDataSort": -1, 58843 58844 58845 /** 58846 * You can control the default ordering direction, and even alter the 58847 * behaviour of the sort handler (i.e. only allow ascending ordering etc) 58848 * using this parameter. 58849 * @type array 58850 * @default [ 'asc', 'desc' ] 58851 * 58852 * @name DataTable.defaults.column.orderSequence 58853 * @dtopt Columns 58854 * 58855 * @example 58856 * // Using `columnDefs` 58857 * $(document).ready( function() { 58858 * $('#example').dataTable( { 58859 * "columnDefs": [ 58860 * { "orderSequence": [ "asc" ], "targets": [ 1 ] }, 58861 * { "orderSequence": [ "desc", "asc", "asc" ], "targets": [ 2 ] }, 58862 * { "orderSequence": [ "desc" ], "targets": [ 3 ] } 58863 * ] 58864 * } ); 58865 * } ); 58866 * 58867 * @example 58868 * // Using `columns` 58869 * $(document).ready( function() { 58870 * $('#example').dataTable( { 58871 * "columns": [ 58872 * null, 58873 * { "orderSequence": [ "asc" ] }, 58874 * { "orderSequence": [ "desc", "asc", "asc" ] }, 58875 * { "orderSequence": [ "desc" ] }, 58876 * null 58877 * ] 58878 * } ); 58879 * } ); 58880 */ 58881 "asSorting": [ 'asc', 'desc' ], 58882 58883 58884 /** 58885 * Enable or disable filtering on the data in this column. 58886 * @type boolean 58887 * @default true 58888 * 58889 * @name DataTable.defaults.column.searchable 58890 * @dtopt Columns 58891 * 58892 * @example 58893 * // Using `columnDefs` 58894 * $(document).ready( function() { 58895 * $('#example').dataTable( { 58896 * "columnDefs": [ 58897 * { "searchable": false, "targets": [ 0 ] } 58898 * ] } ); 58899 * } ); 58900 * 58901 * @example 58902 * // Using `columns` 58903 * $(document).ready( function() { 58904 * $('#example').dataTable( { 58905 * "columns": [ 58906 * { "searchable": false }, 58907 * null, 58908 * null, 58909 * null, 58910 * null 58911 * ] } ); 58912 * } ); 58913 */ 58914 "bSearchable": true, 58915 58916 58917 /** 58918 * Enable or disable ordering on this column. 58919 * @type boolean 58920 * @default true 58921 * 58922 * @name DataTable.defaults.column.orderable 58923 * @dtopt Columns 58924 * 58925 * @example 58926 * // Using `columnDefs` 58927 * $(document).ready( function() { 58928 * $('#example').dataTable( { 58929 * "columnDefs": [ 58930 * { "orderable": false, "targets": [ 0 ] } 58931 * ] } ); 58932 * } ); 58933 * 58934 * @example 58935 * // Using `columns` 58936 * $(document).ready( function() { 58937 * $('#example').dataTable( { 58938 * "columns": [ 58939 * { "orderable": false }, 58940 * null, 58941 * null, 58942 * null, 58943 * null 58944 * ] } ); 58945 * } ); 58946 */ 58947 "bSortable": true, 58948 58949 58950 /** 58951 * Enable or disable the display of this column. 58952 * @type boolean 58953 * @default true 58954 * 58955 * @name DataTable.defaults.column.visible 58956 * @dtopt Columns 58957 * 58958 * @example 58959 * // Using `columnDefs` 58960 * $(document).ready( function() { 58961 * $('#example').dataTable( { 58962 * "columnDefs": [ 58963 * { "visible": false, "targets": [ 0 ] } 58964 * ] } ); 58965 * } ); 58966 * 58967 * @example 58968 * // Using `columns` 58969 * $(document).ready( function() { 58970 * $('#example').dataTable( { 58971 * "columns": [ 58972 * { "visible": false }, 58973 * null, 58974 * null, 58975 * null, 58976 * null 58977 * ] } ); 58978 * } ); 58979 */ 58980 "bVisible": true, 58981 58982 58983 /** 58984 * Developer definable function that is called whenever a cell is created (Ajax source, 58985 * etc) or processed for input (DOM source). This can be used as a compliment to mRender 58986 * allowing you to modify the DOM element (add background colour for example) when the 58987 * element is available. 58988 * @type function 58989 * @param {element} td The TD node that has been created 58990 * @param {*} cellData The Data for the cell 58991 * @param {array|object} rowData The data for the whole row 58992 * @param {int} row The row index for the aoData data store 58993 * @param {int} col The column index for aoColumns 58994 * 58995 * @name DataTable.defaults.column.createdCell 58996 * @dtopt Columns 58997 * 58998 * @example 58999 * $(document).ready( function() { 59000 * $('#example').dataTable( { 59001 * "columnDefs": [ { 59002 * "targets": [3], 59003 * "createdCell": function (td, cellData, rowData, row, col) { 59004 * if ( cellData == "1.7" ) { 59005 * $(td).css('color', 'blue') 59006 * } 59007 * } 59008 * } ] 59009 * }); 59010 * } ); 59011 */ 59012 "fnCreatedCell": null, 59013 59014 59015 /** 59016 * This parameter has been replaced by `data` in DataTables to ensure naming 59017 * consistency. `dataProp` can still be used, as there is backwards 59018 * compatibility in DataTables for this option, but it is strongly 59019 * recommended that you use `data` in preference to `dataProp`. 59020 * @name DataTable.defaults.column.dataProp 59021 */ 59022 59023 59024 /** 59025 * This property can be used to read data from any data source property, 59026 * including deeply nested objects / properties. `data` can be given in a 59027 * number of different ways which effect its behaviour: 59028 * 59029 * * `integer` - treated as an array index for the data source. This is the 59030 * default that DataTables uses (incrementally increased for each column). 59031 * * `string` - read an object property from the data source. There are 59032 * three 'special' options that can be used in the string to alter how 59033 * DataTables reads the data from the source object: 59034 * * `.` - Dotted Javascript notation. Just as you use a `.` in 59035 * Javascript to read from nested objects, so to can the options 59036 * specified in `data`. For example: `browser.version` or 59037 * `browser.name`. If your object parameter name contains a period, use 59038 * `\\` to escape it - i.e. `first\\.name`. 59039 * * `[]` - Array notation. DataTables can automatically combine data 59040 * from and array source, joining the data with the characters provided 59041 * between the two brackets. For example: `name[, ]` would provide a 59042 * comma-space separated list from the source array. If no characters 59043 * are provided between the brackets, the original array source is 59044 * returned. 59045 * * `()` - Function notation. Adding `()` to the end of a parameter will 59046 * execute a function of the name given. For example: `browser()` for a 59047 * simple function on the data source, `browser.version()` for a 59048 * function in a nested property or even `browser().version` to get an 59049 * object property if the function called returns an object. Note that 59050 * function notation is recommended for use in `render` rather than 59051 * `data` as it is much simpler to use as a renderer. 59052 * * `null` - use the original data source for the row rather than plucking 59053 * data directly from it. This action has effects on two other 59054 * initialisation options: 59055 * * `defaultContent` - When null is given as the `data` option and 59056 * `defaultContent` is specified for the column, the value defined by 59057 * `defaultContent` will be used for the cell. 59058 * * `render` - When null is used for the `data` option and the `render` 59059 * option is specified for the column, the whole data source for the 59060 * row is used for the renderer. 59061 * * `function` - the function given will be executed whenever DataTables 59062 * needs to set or get the data for a cell in the column. The function 59063 * takes three parameters: 59064 * * Parameters: 59065 * * `{array|object}` The data source for the row 59066 * * `{string}` The type call data requested - this will be 'set' when 59067 * setting data or 'filter', 'display', 'type', 'sort' or undefined 59068 * when gathering data. Note that when `undefined` is given for the 59069 * type DataTables expects to get the raw data for the object back< 59070 * * `{*}` Data to set when the second parameter is 'set'. 59071 * * Return: 59072 * * The return value from the function is not required when 'set' is 59073 * the type of call, but otherwise the return is what will be used 59074 * for the data requested. 59075 * 59076 * Note that `data` is a getter and setter option. If you just require 59077 * formatting of data for output, you will likely want to use `render` which 59078 * is simply a getter and thus simpler to use. 59079 * 59080 * Note that prior to DataTables 1.9.2 `data` was called `mDataProp`. The 59081 * name change reflects the flexibility of this property and is consistent 59082 * with the naming of mRender. If 'mDataProp' is given, then it will still 59083 * be used by DataTables, as it automatically maps the old name to the new 59084 * if required. 59085 * 59086 * @type string|int|function|null 59087 * @default null <i>Use automatically calculated column index</i> 59088 * 59089 * @name DataTable.defaults.column.data 59090 * @dtopt Columns 59091 * 59092 * @example 59093 * // Read table data from objects 59094 * // JSON structure for each row: 59095 * // { 59096 * // "engine": {value}, 59097 * // "browser": {value}, 59098 * // "platform": {value}, 59099 * // "version": {value}, 59100 * // "grade": {value} 59101 * // } 59102 * $(document).ready( function() { 59103 * $('#example').dataTable( { 59104 * "ajaxSource": "sources/objects.txt", 59105 * "columns": [ 59106 * { "data": "engine" }, 59107 * { "data": "browser" }, 59108 * { "data": "platform" }, 59109 * { "data": "version" }, 59110 * { "data": "grade" } 59111 * ] 59112 * } ); 59113 * } ); 59114 * 59115 * @example 59116 * // Read information from deeply nested objects 59117 * // JSON structure for each row: 59118 * // { 59119 * // "engine": {value}, 59120 * // "browser": {value}, 59121 * // "platform": { 59122 * // "inner": {value} 59123 * // }, 59124 * // "details": [ 59125 * // {value}, {value} 59126 * // ] 59127 * // } 59128 * $(document).ready( function() { 59129 * $('#example').dataTable( { 59130 * "ajaxSource": "sources/deep.txt", 59131 * "columns": [ 59132 * { "data": "engine" }, 59133 * { "data": "browser" }, 59134 * { "data": "platform.inner" }, 59135 * { "data": "
59135platform.details.0" }, 59136 * { "data": "platform.details.1" } 59137 * ] 59138 * } ); 59139 * } ); 59140 * 59141 * @example 59142 * // Using `data` as a function to provide different information for 59143 * // sorting, filtering and display. In this case, currency (price) 59144 * $(document).ready( function() { 59145 * $('#example').dataTable( { 59146 * "columnDefs": [ { 59147 * "targets": [ 0 ], 59148 * "data": function ( source, type, val ) { 59149 * if (type === 'set') { 59150 * source.price = val; 59151 * // Store the computed dis
vendor: 18,284 bytes, lines 59151-59700
59151lay and filter values for efficiency 59152 * source.price_display = val=="" ? "" : "$"+numberFormat(val); 59153 * source.price_filter = val=="" ? "" : "$"+numberFormat(val)+" "+val; 59154 * return; 59155 * } 59156 * else if (type === 'display') { 59157 * return source.price_display; 59158 * } 59159 * else if (type === 'filter') { 59160 * return source.price_filter; 59161 * } 59162 * // 'sort', 'type' and undefined all just use the integer 59163 * return source.price; 59164 * } 59165 * } ] 59166 * } ); 59167 * } ); 59168 * 59169 * @example 59170 * // Using default content 59171 * $(document).ready( function() { 59172 * $('#example').dataTable( { 59173 * "columnDefs": [ { 59174 * "targets": [ 0 ], 59175 * "data": null, 59176 * "defaultContent": "Click to edit" 59177 * } ] 59178 * } ); 59179 * } ); 59180 * 59181 * @example 59182 * // Using array notation - outputting a list from an array 59183 * $(document).ready( function() { 59184 * $('#example').dataTable( { 59185 * "columnDefs": [ { 59186 * "targets": [ 0 ], 59187 * "data": "name[, ]" 59188 * } ] 59189 * } ); 59190 * } ); 59191 * 59192 */ 59193 "mData": null, 59194 59195 59196 /** 59197 * This property is the rendering partner to `data` and it is suggested that 59198 * when you want to manipulate data for display (including filtering, 59199 * sorting etc) without altering the underlying data for the table, use this 59200 * property. `render` can be considered to be the the read only companion to 59201 * `data` which is read / write (then as such more complex). Like `data` 59202 * this option can be given in a number of different ways to effect its 59203 * behaviour: 59204 * 59205 * * `integer` - treated as an array index for the data source. This is the 59206 * default that DataTables uses (incrementally increased for each column). 59207 * * `string` - read an object property from the data source. There are 59208 * three 'special' options that can be used in the string to alter how 59209 * DataTables reads the data from the source object: 59210 * * `.` - Dotted Javascript notation. Just as you use a `.` in 59211 * Javascript to read from nested objects, so to can the options 59212 * specified in `data`. For example: `browser.version` or 59213 * `browser.name`. If your object parameter name contains a period, use 59214 * `\\` to escape it - i.e. `first\\.name`. 59215 * * `[]` - Array notation. DataTables can automatically combine data 59216 * from and array source, joining the data with the characters provided 59217 * between the two brackets. For example: `name[, ]` would provide a 59218 * comma-space separated list from the source array. If no characters 59219 * are provided between the brackets, the original array source is 59220 * returned. 59221 * * `()` - Function notation. Adding `()` to the end of a parameter will 59222 * execute a function of the name given. For example: `browser()` for a 59223 * simple function on the data source, `browser.version()` for a 59224 * function in a nested property or even `browser().version` to get an 59225 * object property if the function called returns an object. 59226 * * `object` - use different data for the different data types requested by 59227 * DataTables ('filter', 'display', 'type' or 'sort'). The property names 59228 * of the object is the data type the property refers to and the value can 59229 * defined using an integer, string or function using the same rules as 59230 * `render` normally does. Note that an `_` option _must_ be specified. 59231 * This is the default value to use if you haven't specified a value for 59232 * the data type requested by DataTables. 59233 * * `function` - the function given will be executed whenever DataTables 59234 * needs to set or get the data for a cell in the column. The function 59235 * takes three parameters: 59236 * * Parameters: 59237 * * {array|object} The data source for the row (based on `data`) 59238 * * {string} The type call data requested - this will be 'filter', 59239 * 'display', 'type' or 'sort'. 59240 * * {array|object} The full data source for the row (not based on 59241 * `data`) 59242 * * Return: 59243 * * The return value from the function is what will be used for the 59244 * data requested. 59245 * 59246 * @type string|int|function|object|null 59247 * @default null Use the data source value. 59248 * 59249 * @name DataTable.defaults.column.render 59250 * @dtopt Columns 59251 * 59252 * @example 59253 * // Create a comma separated list from an array of objects 59254 * $(document).ready( function() { 59255 * $('#example').dataTable( { 59256 * "ajaxSource": "sources/deep.txt", 59257 * "columns": [ 59258 * { "data": "engine" }, 59259 * { "data": "browser" }, 59260 * { 59261 * "data": "platform", 59262 * "render": "[, ].name" 59263 * } 59264 * ] 59265 * } ); 59266 * } ); 59267 * 59268 * @example 59269 * // Execute a function to obtain data 59270 * $(document).ready( function() { 59271 * $('#example').dataTable( { 59272 * "columnDefs": [ { 59273 * "targets": [ 0 ], 59274 * "data": null, // Use the full data source object for the renderer's source 59275 * "render": "browserName()" 59276 * } ] 59277 * } ); 59278 * } ); 59279 * 59280 * @example 59281 * // As an object, extracting different data for the different types 59282 * // This would be used with a data source such as: 59283 * // { "phone": 5552368, "phone_filter": "5552368 555-2368", "phone_display": "555-2368" } 59284 * // Here the `phone` integer is used for sorting and type detection, while `phone_filter` 59285 * // (which has both forms) is used for filtering for if a user inputs either format, while 59286 * // the formatted phone number is the one that is shown in the table. 59287 * $(document).ready( function() { 59288 * $('#example').dataTable( { 59289 * "columnDefs": [ { 59290 * "targets": [ 0 ], 59291 * "data": null, // Use the full data source object for the renderer's source 59292 * "render": { 59293 * "_": "phone", 59294 * "filter": "phone_filter", 59295 * "display": "phone_display" 59296 * } 59297 * } ] 59298 * } ); 59299 * } ); 59300 * 59301 * @example 59302 * // Use as a function to create a link from the data source 59303 * $(document).ready( function() { 59304 * $('#example').dataTable( { 59305 * "columnDefs": [ { 59306 * "targets": [ 0 ], 59307 * "data": "download_link", 59308 * "render": function ( data, type, full ) { 59309 * return '<a href="'+data+'">Download</a>'; 59310 * } 59311 * } ] 59312 * } ); 59313 * } ); 59314 */ 59315 "mRender": null, 59316 59317 59318 /** 59319 * Change the cell type created for the column - either TD cells or TH cells. This 59320 * can be useful as TH cells have semantic meaning in the table body, allowing them 59321 * to act as a header for a row (you may wish to add scope='row' to the TH elements). 59322 * @type string 59323 * @default td 59324 * 59325 * @name DataTable.defaults.column.cellType 59326 * @dtopt Columns 59327 * 59328 * @example 59329 * // Make the first column use TH cells 59330 * $(document).ready( function() { 59331 * $('#example').dataTable( { 59332 * "columnDefs": [ { 59333 * "targets": [ 0 ], 59334 * "cellType": "th" 59335 * } ] 59336 * } ); 59337 * } ); 59338 */ 59339 "sCellType": "td", 59340 59341 59342 /** 59343 * Class to give to each cell in this column. 59344 * @type string 59345 * @default <i>Empty string</i> 59346 * 59347 * @name DataTable.defaults.column.class 59348 * @dtopt Columns 59349 * 59350 * @example 59351 * // Using `columnDefs` 59352 * $(document).ready( function() { 59353 * $('#example').dataTable( { 59354 * "columnDefs": [ 59355 * { "class": "my_class", "targets": [ 0 ] } 59356 * ] 59357 * } ); 59358 * } ); 59359 * 59360 * @example 59361 * // Using `columns` 59362 * $(document).ready( function() { 59363 * $('#example').dataTable( { 59364 * "columns": [ 59365 * { "class": "my_class" }, 59366 * null, 59367 * null, 59368 * null, 59369 * null 59370 * ] 59371 * } ); 59372 * } ); 59373 */ 59374 "sClass": "", 59375 59376 /** 59377 * When DataTables calculates the column widths to assign to each column, 59378 * it finds the longest string in each column and then constructs a 59379 * temporary table and reads the widths from that. The problem with this 59380 * is that "mmm" is much wider then "iiii", but the latter is a longer 59381 * string - thus the calculation can go wrong (doing it properly and putting 59382 * it into an DOM object and measuring that is horribly(!) slow). Thus as 59383 * a "work around" we provide this option. It will append its value to the 59384 * text that is found to be the longest string for the column - i.e. padding. 59385 * Generally you shouldn't need this! 59386 * @type string 59387 * @default <i>Empty string<i> 59388 * 59389 * @name DataTable.defaults.column.contentPadding 59390 * @dtopt Columns 59391 * 59392 * @example 59393 * // Using `columns` 59394 * $(document).ready( function() { 59395 * $('#example').dataTable( { 59396 * "columns": [ 59397 * null, 59398 * null, 59399 * null, 59400 * { 59401 * "contentPadding": "mmm" 59402 * } 59403 * ] 59404 * } ); 59405 * } ); 59406 */ 59407 "sContentPadding": "", 59408 59409 59410 /** 59411 * Allows a default value to be given for a column's data, and will be used 59412 * whenever a null data source is encountered (this can be because `data` 59413 * is set to null, or because the data source itself is null). 59414 * @type string 59415 * @default null 59416 * 59417 * @name DataTable.defaults.column.defaultContent 59418 * @dtopt Columns 59419 * 59420 * @example 59421 * // Using `columnDefs` 59422 * $(document).ready( function() { 59423 * $('#example').dataTable( { 59424 * "columnDefs": [ 59425 * { 59426 * "data": null, 59427 * "defaultContent": "Edit", 59428 * "targets": [ -1 ] 59429 * } 59430 * ] 59431 * } ); 59432 * } ); 59433 * 59434 * @example 59435 * // Using `columns` 59436 * $(document).ready( function() { 59437 * $('#example').dataTable( { 59438 * "columns": [ 59439 * null, 59440 * null, 59441 * null, 59442 * { 59443 * "data": null, 59444 * "defaultContent": "Edit" 59445 * } 59446 * ] 59447 * } ); 59448 * } ); 59449 */ 59450 "sDefaultContent": null, 59451 59452 59453 /** 59454 * This parameter is only used in DataTables' server-side processing. It can 59455 * be exceptionally useful to know what columns are being displayed on the 59456 * client side, and to map these to database fields. When defined, the names 59457 * also allow DataTables to reorder information from the server if it comes 59458 * back in an unexpected order (i.e. if you switch your columns around on the 59459 * client-side, your server-side code does not also need updating). 59460 * @type string 59461 * @default <i>Empty string</i> 59462 * 59463 * @name DataTable.defaults.column.name 59464 * @dtopt Columns 59465 * 59466 * @example 59467 * // Using `columnDefs` 59468 * $(document).ready( function() { 59469 * $('#example').dataTable( { 59470 * "columnDefs": [ 59471 * { "name": "engine", "targets": [ 0 ] }, 59472 * { "name": "browser", "targets": [ 1 ] }, 59473 * { "name": "platform", "targets": [ 2 ] }, 59474 * { "name": "version", "targets": [ 3 ] }, 59475 * { "name": "grade", "targets": [ 4 ] } 59476 * ] 59477 * } ); 59478 * } ); 59479 * 59480 * @example 59481 * // Using `columns` 59482 * $(document).ready( function() { 59483 * $('#example').dataTable( { 59484 * "columns": [ 59485 * { "name": "engine" }, 59486 * { "name": "browser" }, 59487 * { "name": "platform" }, 59488 * { "name": "version" }, 59489 * { "name": "grade" } 59490 * ] 59491 * } ); 59492 * } ); 59493 */ 59494 "sName": "", 59495 59496 59497 /** 59498 * Defines a data source type for the ordering which can be used to read 59499 * real-time information from the table (updating the internally cached 59500 * version) prior to ordering. This allows ordering to occur on user 59501 * editable elements such as form inputs. 59502 * @type string 59503 * @default std 59504 * 59505 * @name DataTable.defaults.column.orderDataType 59506 * @dtopt Columns 59507 * 59508 * @example 59509 * // Using `columnDefs` 59510 * $(document).ready( function() { 59511 * $('#example').dataTable( { 59512 * "columnDefs": [ 59513 * { "orderDataType": "dom-text", "targets": [ 2, 3 ] }, 59514 * { "type": "numeric", "targets": [ 3 ] }, 59515 * { "orderDataType": "dom-select", "targets": [ 4 ] }, 59516 * { "orderDataType": "dom-checkbox", "targets": [ 5 ] } 59517 * ] 59518 * } ); 59519 * } ); 59520 * 59521 * @example 59522 * // Using `columns` 59523 * $(document).ready( function() { 59524 * $('#example').dataTable( { 59525 * "columns": [ 59526 * null, 59527 * null, 59528 * { "orderDataType": "dom-text" }, 59529 * { "orderDataType": "dom-text", "type": "numeric" }, 59530 * { "orderDataType": "dom-select" }, 59531 * { "orderDataType": "dom-checkbox" } 59532 * ] 59533 * } ); 59534 * } ); 59535 */ 59536 "sSortDataType": "std", 59537 59538 59539 /** 59540 * The title of this column. 59541 * @type string 59542 * @default null <i>Derived from the 'TH' value for this column in the 59543 * original HTML table.</i> 59544 * 59545 * @name DataTable.defaults.column.title 59546 * @dtopt Columns 59547 * 59548 * @example 59549 * // Using `columnDefs` 59550 * $(document).ready( function() { 59551 * $('#example').dataTable( { 59552 * "columnDefs": [ 59553 * { "title": "My column title", "targets": [ 0 ] } 59554 * ] 59555 * } ); 59556 * } ); 59557 * 59558 * @example 59559 * // Using `columns` 59560 * $(document).ready( function() { 59561 * $('#example').dataTable( { 59562 * "columns": [ 59563 * { "title": "My column title" }, 59564 * null, 59565 * null, 59566 * null, 59567 * null 59568 * ] 59569 * } ); 59570 * } ); 59571 */ 59572 "sTitle": null, 59573 59574 59575 /** 59576 * The type allows you to specify how the data for this column will be 59577 * ordered. Four types (string, numeric, date and html (which will strip 59578 * HTML tags before ordering)) are currently available. Note that only date 59579 * formats understood by Javascript's Date() object will be accepted as type 59580 * date. For example: "Mar 26, 2008 5:03 PM". May take the values: 'string', 59581 * 'numeric', 'date' or 'html' (by default). Further types can be adding 59582 * through plug-ins. 59583 * @type string 59584 * @default null <i>Auto-detected from raw data</i> 59585 * 59586 * @name DataTable.defaults.column.type 59587 * @dtopt Columns 59588 * 59589 * @example 59590 * // Using `columnDefs` 59591 * $(document).ready( function() { 59592 * $('#example').dataTable( { 59593 * "columnDefs": [ 59594 * { "type": "html", "targets": [ 0 ] } 59595 * ] 59596 * } ); 59597 * } ); 59598 * 59599 * @example 59600 * // Using `columns` 59601 * $(document).ready( function() { 59602 * $('#example').dataTable( { 59603 * "columns": [ 59604 * { "type": "html" }, 59605 * null, 59606 * null, 59607 * null, 59608 * null 59609 * ] 59610 * } ); 59611 * } ); 59612 */ 59613 "sType": null, 59614 59615 59616 /** 59617 * Defining the width of the column, this parameter may take any CSS value 59618 * (3em, 20px etc). DataTables applies 'smart' widths to columns which have not 59619 * been given a specific width through this interface ensuring that the table 59620 * remains readable. 59621 * @type string 59622 * @default null <i>Automatic</i> 59623 * 59624 * @name DataTable.defaults.column.width 59625 * @dtopt Columns 59626 * 59627 * @example 59628 * // Using `columnDefs` 59629 * $(document).ready( function() { 59630 * $('#example').dataTable( { 59631 * "columnDefs": [ 59632 * { "width": "20%", "targets": [ 0 ] } 59633 * ] 59634 * } ); 59635 * } ); 59636 * 59637 * @example 59638 * // Using `columns` 59639 * $(document).ready( function() { 59640 * $('#example').dataTable( { 59641 * "columns": [ 59642 * { "width": "20%" }, 59643 * null, 59644 * null, 59645 * null, 59646 * null 59647 * ] 59648 * } ); 59649 * } ); 59650 */ 59651 "sWidth": null 59652 }; 59653 59654 _fnHungarianMap( DataTable.defaults.column ); 59655 59656 59657 59658 /** 59659 * DataTables settings object - this holds all the information needed for a 59660 * given table, including configuration, data and current application of the 59661 * table options. DataTables does not have a single instance for each DataTable 59662 * with the settings attached to that instance, but rather instances of the 59663 * DataTable "class" are created on-the-fly as needed (typically by a 59664 * $().dataTable() call) and the settings object is then applied to that 59665 * instance. 59666 * 59667 * Note that this object is related to {@link DataTable.defaults} but this 59668 * one is the internal data store for DataTables's cache of columns. It should 59669 * NOT be manipulated outside of DataTables. Any configuration should be done 59670 * through the initialisation options. 59671 * @namespace 59672 * @todo Really should attach the settings object to individual instances so we 59673 * don't need to create new instances on each $().dataTable() call (if the 59674 * table already exists). It would also save passing oSettings around and 59675 * into every single function. However, this is a very significant 59676 * architecture change for DataTables and will almost certainly break 59677 * backwards compatibility with older installations. This is something that 59678 * will be done in 2.0. 59679 */ 59680 DataTable.models.oSettings = { 59681 /** 59682 * Primary features of DataTables and their enablement state. 59683 * @namespace 59684 */ 59685 "oFeatures": { 59686 59687 /** 59688 * Flag to say if DataTables should automatically try to calculate the 59689 * optimum table and columns widths (true) or not (false). 59690 * Note that this parameter will be set by the initialisation routine. To 59691 * set a default use {@link DataTable.defaults}. 59692 * @type boolean 59693 */ 59694 "bAutoWidth": null, 59695 59696 /** 59697 * Delay the creation of TR and TD elements until they are actually 59698 * needed by a driven page draw. This can give a significant speed 59699 * increase for Ajax source and Javascript source data, but makes no 59700 * difference at all f
59700ro
vendor: 14,836 bytes, lines 59700-60277
59700 DOM and server-side processing tables. 59701 * Note that this parameter will be set by the initialisation routine. To 59702 * set a default use {@link DataTable.defaults}. 59703 * @type boolean 59704 */ 59705 "bDeferRender": null, 59706 59707 /** 59708 * Enable filtering on the table or not. Note that if this is disabled 59709 * then there is no filtering at all on the table, including fnFilter. 59710 * To just remove the filtering input use sDom and remove the 'f' option. 59711 * Note that this parameter will be set by the initialisation routine. To 59712 * set a default use {@link DataTable.defaults}. 59713 * @type boolean 59714 */ 59715 "bFilter": null, 59716 59717 /** 59718 * Table information element (the 'Showing x of y records' div) enable 59719 * flag. 59720 * Note that this parameter will be set by the initialisation routine. To 59721 * set a default use {@link DataTable.defaults}. 59722 * @type boolean 59723 */ 59724 "bInfo": null, 59725 59726 /** 59727 * Present a user control allowing the end user to change the page size 59728 * when pagination is enabled. 59729 * Note that this parameter will be set by the initialisation routine. To 59730 * set a default use {@link DataTable.defaults}. 59731 * @type boolean 59732 */ 59733 "bLengthChange": null, 59734 59735 /** 59736 * Pagination enabled or not. Note that if this is disabled then length 59737 * changing must also be disabled. 59738 * Note that this parameter will be set by the initialisation routine. To 59739 * set a default use {@link DataTable.defaults}. 59740 * @type boolean 59741 */ 59742 "bPaginate": null, 59743 59744 /** 59745 * Processing indicator enable flag whenever DataTables is enacting a 59746 * user request - typically an Ajax request for server-side processing. 59747 * Note that this parameter will be set by the initialisation routine. To 59748 * set a default use {@link DataTable.defaults}. 59749 * @type boolean 59750 */ 59751 "bProcessing": null, 59752 59753 /** 59754 * Server-side processing enabled flag - when enabled DataTables will 59755 * get all data from the server for every draw - there is no filtering, 59756 * sorting or paging done on the client-side. 59757 * Note that this parameter will be set by the initialisation routine. To 59758 * set a default use {@link DataTable.defaults}. 59759 * @type boolean 59760 */ 59761 "bServerSide": null, 59762 59763 /** 59764 * Sorting enablement flag. 59765 * Note that this parameter will be set by the initialisation routine. To 59766 * set a default use {@link DataTable.defaults}. 59767 * @type boolean 59768 */ 59769 "bSort": null, 59770 59771 /** 59772 * Multi-column sorting 59773 * Note that this parameter will be set by the initialisation routine. To 59774 * set a default use {@link DataTable.defaults}. 59775 * @type boolean 59776 */ 59777 "bSortMulti": null, 59778 59779 /** 59780 * Apply a class to the columns which are being sorted to provide a 59781 * visual highlight or not. This can slow things down when enabled since 59782 * there is a lot of DOM interaction. 59783 * Note that this parameter will be set by the initialisation routine. To 59784 * set a default use {@link DataTable.defaults}. 59785 * @type boolean 59786 */ 59787 "bSortClasses": null, 59788 59789 /** 59790 * State saving enablement flag. 59791 * Note that this parameter will be set by the initialisation routine. To 59792 * set a default use {@link DataTable.defaults}. 59793 * @type boolean 59794 */ 59795 "bStateSave": null 59796 }, 59797 59798 59799 /** 59800 * Scrolling settings for a table. 59801 * @namespace 59802 */ 59803 "oScroll": { 59804 /** 59805 * When the table is shorter in height than sScrollY, collapse the 59806 * table container down to the height of the table (when true). 59807 * Note that this parameter will be set by the initialisation routine. To 59808 * set a default use {@link DataTable.defaults}. 59809 * @type boolean 59810 */ 59811 "bCollapse": null, 59812 59813 /** 59814 * Width of the scrollbar for the web-browser's platform. Calculated 59815 * during table initialisation. 59816 * @type int 59817 * @default 0 59818 */ 59819 "iBarWidth": 0, 59820 59821 /** 59822 * Viewport width for horizontal scrolling. Horizontal scrolling is 59823 * disabled if an empty string. 59824 * Note that this parameter will be set by the initialisation routine. To 59825 * set a default use {@link DataTable.defaults}. 59826 * @type string 59827 */ 59828 "sX": null, 59829 59830 /** 59831 * Width to expand the table to when using x-scrolling. Typically you 59832 * should not need to use this. 59833 * Note that this parameter will be set by the initialisation routine. To 59834 * set a default use {@link DataTable.defaults}. 59835 * @type string 59836 * @deprecated 59837 */ 59838 "sXInner": null, 59839 59840 /** 59841 * Viewport height for vertical scrolling. Vertical scrolling is disabled 59842 * if an empty string. 59843 * Note that this parameter will be set by the initialisation routine. To 59844 * set a default use {@link DataTable.defaults}. 59845 * @type string 59846 */ 59847 "sY": null 59848 }, 59849 59850 /** 59851 * Language information for the table. 59852 * @namespace 59853 * @extends DataTable.defaults.oLanguage 59854 */ 59855 "oLanguage": { 59856 /** 59857 * Information callback function. See 59858 * {@link DataTable.defaults.fnInfoCallback} 59859 * @type function 59860 * @default null 59861 */ 59862 "fnInfoCallback": null 59863 }, 59864 59865 /** 59866 * Browser support parameters 59867 * @namespace 59868 */ 59869 "oBrowser": { 59870 /** 59871 * Indicate if the browser incorrectly calculates width:100% inside a 59872 * scrolling element (IE6/7) 59873 * @type boolean 59874 * @default false 59875 */ 59876 "bScrollOversize": false, 59877 59878 /** 59879 * Determine if the vertical scrollbar is on the right or left of the 59880 * scrolling container - needed for rtl language layout, although not 59881 * all browsers move the scrollbar (Safari). 59882 * @type boolean 59883 * @default false 59884 */ 59885 "bScrollbarLeft": false, 59886 59887 /** 59888 * Flag for if `getBoundingClientRect` is fully supported or not 59889 * @type boolean 59890 * @default false 59891 */ 59892 "bBounding": false, 59893 59894 /** 59895 * Browser scrollbar width 59896 * @type integer 59897 * @default 0 59898 */ 59899 "barWidth": 0 59900 }, 59901 59902 59903 "ajax": null, 59904 59905 59906 /** 59907 * Array referencing the nodes which are used for the features. The 59908 * parameters of this object match what is allowed by sDom - i.e. 59909 * <ul> 59910 * <li>'l' - Length changing</li> 59911 * <li>'f' - Filtering input</li> 59912 * <li>'t' - The table!</li> 59913 * <li>'i' - Information</li> 59914 * <li>'p' - Pagination</li> 59915 * <li>'r' - pRocessing</li> 59916 * </ul> 59917 * @type array 59918 * @default [] 59919 */ 59920 "aanFeatures": [], 59921 59922 /** 59923 * Store data information - see {@link DataTable.models.oRow} for detailed 59924 * information. 59925 * @type array 59926 * @default [] 59927 */ 59928 "aoData": [], 59929 59930 /** 59931 * Array of indexes which are in the current display (after filtering etc) 59932 * @type array 59933 * @default [] 59934 */ 59935 "aiDisplay": [], 59936 59937 /** 59938 * Array of indexes for display - no filtering 59939 * @type array 59940 * @default [] 59941 */ 59942 "aiDisplayMaster": [], 59943 59944 /** 59945 * Map of row ids to data indexes 59946 * @type object 59947 * @default {} 59948 */ 59949 "aIds": {}, 59950 59951 /** 59952 * Store information about each column that is in use 59953 * @type array 59954 * @default [] 59955 */ 59956 "aoColumns": [], 59957 59958 /** 59959 * Store information about the table's header 59960 * @type array 59961 * @default [] 59962 */ 59963 "aoHeader": [], 59964 59965 /** 59966 * Store information about the table's footer 59967 * @type array 59968 * @default [] 59969 */ 59970 "aoFooter": [], 59971 59972 /** 59973 * Store the applied global search information in case we want to force a 59974 * research or compare the old search to a new one. 59975 * Note that this parameter will be set by the initialisation routine. To 59976 * set a default use {@link DataTable.defaults}. 59977 * @namespace 59978 * @extends DataTable.models.oSearch 59979 */ 59980 "oPreviousSearch": {}, 59981 59982 /** 59983 * Store the applied search for each column - see 59984 * {@link DataTable.models.oSearch} for the format that is used for the 59985 * filtering information for each column. 59986 * @type array 59987 * @default [] 59988 */ 59989 "aoPreSearchCols": [], 59990 59991 /** 59992 * Sorting that is applied to the table. Note that the inner arrays are 59993 * used in the following manner: 59994 * <ul> 59995 * <li>Index 0 - column number</li> 59996 * <li>Index 1 - current sorting direction</li> 59997 * </ul> 59998 * Note that this parameter will be set by the initialisation routine. To 59999 * set a default use {@link DataTable.defaults}. 60000 * @type array 60001 * @todo These inner arrays should really be objects 60002 */ 60003 "aaSorting": null, 60004 60005 /** 60006 * Sorting that is always applied to the table (i.e. prefixed in front of 60007 * aaSorting). 60008 * Note that this parameter will be set by the initialisation routine. To 60009 * set a default use {@link DataTable.defaults}. 60010 * @type array 60011 * @default [] 60012 */ 60013 "aaSortingFixed": [], 60014 60015 /** 60016 * Classes to use for the striping of a table. 60017 * Note that this parameter will be set by the initialisation routine. To 60018 * set a default use {@link DataTable.defaults}. 60019 * @type array 60020 * @default [] 60021 */ 60022 "asStripeClasses": null, 60023 60024 /** 60025 * If restoring a table - we should restore its striping classes as well 60026 * @type array 60027 * @default [] 60028 */ 60029 "asDestroyStripes": [], 60030 60031 /** 60032 * If restoring a table - we should restore its width 60033 * @type int 60034 * @default 0 60035 */ 60036 "sDestroyWidth": 0, 60037 60038 /** 60039 * Callback functions array for every time a row is inserted (i.e. on a draw). 60040 * @type array 60041 * @default [] 60042 */ 60043 "aoRowCallback": [], 60044 60045 /** 60046 * Callback functions for the header on each draw. 60047 * @type array 60048 * @default [] 60049 */ 60050 "aoHeaderCallback": [], 60051 60052 /** 60053 * Callback function for the footer on each draw. 60054 * @type array 60055 * @default [] 60056 */ 60057 "aoFooterCallback": [], 60058 60059 /** 60060 * Array of callback functions for draw callback functions 60061 * @type array 60062 * @default [] 60063 */ 60064 "aoDrawCallback": [], 60065 60066 /** 60067 * Array of callback functions for row created function 60068 * @type array 60069 * @default [] 60070 */ 60071 "aoRowCreatedCallback": [], 60072 60073 /** 60074 * Callback functions for just before the table is redrawn. A return of 60075 * false will be used to cancel the draw. 60076 * @type array 60077 * @default [] 60078 */ 60079 "aoPreDrawCallback": [], 60080 60081 /** 60082 * Callback functions for when the table has been initialised. 60083 * @type array 60084 * @default [] 60085 */ 60086 "aoInitComplete": [], 60087 60088 60089 /** 60090 * Callbacks for modifying the settings to be stored for state saving, prior to 60091 * saving state. 60092 * @type array 60093 * @default [] 60094 */ 60095 "aoStateSaveParams": [], 60096 60097 /** 60098 * Callbacks for modifying the settings that have been stored for state saving 60099 * prior to using the stored values to restore the state. 60100 * @type array 60101 * @default [] 60102 */ 60103 "aoStateLoadParams": [], 60104 60105 /** 60106 * Callbacks for operating on the settings object once the saved state has been 60107 * loaded 60108 * @type array 60109 * @default [] 60110 */ 60111 "aoStateLoaded": [], 60112 60113 /** 60114 * Cache the table ID for quick access 60115 * @type string 60116 * @default <i>Empty string</i> 60117 */ 60118 "sTableId": "", 60119 60120 /** 60121 * The TABLE node for the main table 60122 * @type node 60123 * @default null 60124 */ 60125 "nTable": null, 60126 60127 /** 60128 * Permanent ref to the thead element 60129 * @type node 60130 * @default null 60131 */ 60132 "nTHead": null, 60133 60134 /** 60135 * Permanent ref to the tfoot element - if it exists 60136 * @type node 60137 * @default null 60138 */ 60139 "nTFoot": null, 60140 60141 /** 60142 * Permanent ref to the tbody element 60143 * @type node 60144 * @default null 60145 */ 60146 "nTBody": null, 60147 60148 /** 60149 * Cache the wrapper node (contains all DataTables controlled elements) 60150 * @type node 60151 * @default null 60152 */ 60153 "nTableWrapper": null, 60154 60155 /** 60156 * Indicate if when using server-side processing the loading of data 60157 * should be deferred until the second draw. 60158 * Note that this parameter will be set by the initialisation routine. To 60159 * set a default use {@link DataTable.defaults}. 60160 * @type boolean 60161 * @default false 60162 */ 60163 "bDeferLoading": false, 60164 60165 /** 60166 * Indicate if all required information has been read in 60167 * @type boolean 60168 * @default false 60169 */ 60170 "bInitialised": false, 60171 60172 /** 60173 * Information about open rows. Each object in the array has the parameters 60174 * 'nTr' and 'nParent' 60175 * @type array 60176 * @default [] 60177 */ 60178 "aoOpenRows": [], 60179 60180 /** 60181 * Dictate the positioning of DataTables' control elements - see 60182 * {@link DataTable.model.oInit.sDom}. 60183 * Note that this parameter will be set by the initialisation routine. To 60184 * set a default use {@link DataTable.defaults}. 60185 * @type string 60186 * @default null 60187 */ 60188 "sDom": null, 60189 60190 /** 60191 * Search delay (in mS) 60192 * @type integer 60193 * @default null 60194 */ 60195 "searchDelay": null, 60196 60197 /** 60198 * Which type of pagination should be used. 60199 * Note that this parameter will be set by the initialisation routine. To 60200 * set a default use {@link DataTable.defaults}. 60201 * @type string 60202 * @default two_button 60203 */ 60204 "sPaginationType": "two_button", 60205 60206 /** 60207 * The state duration (for `stateSave`) in seconds. 60208 * Note that this parameter will be set by the initialisation routine. To 60209 * set a default use {@link DataTable.defaults}. 60210 * @type int 60211 * @default 0 60212 */ 60213 "iStateDuration": 0, 60214 60215 /** 60216 * Array of callback functions for state saving. Each array element is an 60217 * object with the following parameters: 60218 * <ul> 60219 * <li>function:fn - function to call. Takes two parameters, oSettings 60220 * and the JSON string to save that has been thus far created. Returns 60221 * a JSON string to be inserted into a json object 60222 * (i.e. '"param": [ 0, 1, 2]')</li> 60223 * <li>string:sName - name of callback</li> 60224 * </ul> 60225 * @type array 60226 * @default [] 60227 */ 60228 "aoStateSave": [], 60229 60230 /** 60231 * Array of callback functions for state loading. Each array element is an 60232 * object with the following parameters: 60233 * <ul> 60234 * <li>function:fn - function to call. Takes two parameters, oSettings 60235 * and the object stored. May return false to cancel state loading</li> 60236 * <li>string:sName - name of callback</li> 60237 * </ul> 60238 * @type array 60239 * @default [] 60240 */ 60241 "aoStateLoad": [], 60242 60243 /** 60244 * State that was saved. Useful for back reference 60245 * @type object 60246 * @default null 60247 */ 60248 "oSavedState": null, 60249 60250 /** 60251 * State that was loaded. Useful for back reference 60252 * @type object 60253 * @default null 60254 */ 60255 "oLoadedState": null, 60256 60257 /** 60258 * Source url for AJAX data for the table. 60259 * Note that this parameter will be set by the initialisation routine. To 60260 * set a default use {@link DataTable.defaults}. 60261 * @type string 60262 * @default null 60263 */ 60264 "sAjaxSource": null, 60265 60266 /** 60267 * Property from a given object from which to read the table data from. This 60268 * can be an empty string (when not server-side processing), in which case 60269 * it is assumed an an array is given directly. 60270 * Note that this parameter will be set by the initialisation routine. To 60271 * set a default use {@link DataTable.defaults}. 60272 * @type string 60273 */ 60274 "sAjaxDataProp": null, 60275 60276 /** 60277 *
60277Note if draw should be blocked while getting data 60278 * @type boolean 60279 * @default true 60280 */ 60281 "bAjaxDataGet": true, 60282 60283 /** 60284 * The last jQuery XHR object that was used for server-side data gathering. 60285 * This can be used for working with the XHR information in one of the 60286 * callbacks 60287 * @type object 60288 * @default null 60289 */ 60290 "jqXHR": null, 60291 60292 /** 60293 * JSON returned from the server in the last Ajax request 60294 * @type object 60295 * @default undefined 60296 */ 60297 "json": undefined, 60298 60299 /** 60300 * Data submitted as part of the last Ajax request 60301 * @type object 60302 * @default undefined 60303 */ 60304 "oAjaxData": undefined, 60305 60306 /** 60307 * Function to get the server-side data. 60308 * Note that this parameter will be set by the initialisation routine. To 60309 * set a default use {@link DataTable.defaults}. 60310 * @type function 60311 */ 60312 "fnServerData": null, 60313 60314 /** 60315 * Functions which are called prior to sending an Ajax request so extra 60316 * parameters can easily be sent to the server 60317 * @type array 60318 * @default [] 60319 */ 60320 "aoServerParams": [], 60321 60322 /** 60323 * Send the XHR HTTP method - GET or POST (could be PUT or DELETE if 60324 * required). 60325 * Note that this parameter will be set by the initialisation routine. To 60326 * set a default use {@link DataTable.defaults}. 60327 * @type string 60328 */ 60329 "sServerMethod": null, 60330 60331 /** 60332 * Format numbers for display. 60333 * Note that this parameter will be set by the initialisation routine. To 60334 * set a default use {@link DataTable.defaults}. 60335 * @type function 60336 */ 60337 "fnFormatNumber": null, 60338 60339 /** 60340 * List of options that can be used for the user selectable length menu. 60341 * Note that this parameter will be set by the initialisation routine. To 60342 * set a default use {@link DataTable.defaults}. 60343 * @type array 60344 * @default [] 60345 */ 60346 "aLengthMenu": null, 60347 60348 /** 60349 * Counter for the draws that the table does. Also used as a tracker for 60350 * server-side processing 60351 * @type int 60352 * @default 0 60353 */ 60354 "iDraw": 0, 60355 60356 /** 60357 * Indicate if a redraw is being done - useful for Ajax 60358 * @type boolean 60359 * @default false 60360 */ 60361 "bDrawing": false, 60362 60363 /** 60364 * Draw index (iDraw) of the last error when parsing the returned data 60365 * @type int 60366 * @default -1 60367 */ 60368 "iDrawError": -1, 60369 60370 /** 60371 * Paging display length 60372 * @type int 60373 * @default 10 60374 */ 60375 "_iDisplayLength": 10, 60376 60377 /** 60378 * Paging start point - aiDisplay index 60379 * @type int 60380 * @default 0 60381 */ 60382 "_iDisplayStart": 0, 60383 60384 /** 60385 * Server-side processing - number of records in the result set 60386 * (i.e. before filtering), Use fnRecordsTotal rather than 60387 * this property to get the value of the number of records, regardless of 60388 * the server-side processing setting. 60389 * @type int 60390 * @default 0 60391 * @private 60392 */ 60393 "_iRecordsTotal": 0, 60394 60395 /** 60396 * Server-side processing - number of records in the current display set 60397 * (i.e. after filtering). Use fnRecordsDisplay rather than 60398 * this property to get the value of the number of records, regardless of 60399 * the server-side processing setting. 60400 * @type boolean 60401 * @default 0 60402 * @private 60403 */ 60404 "_iRecordsDisplay": 0, 60405 60406 /** 60407 * Flag to indicate if jQuery UI marking and classes should be used. 60408 * Note that this parameter will be set by the initialisation routine. To 60409 * set a default use {@link DataTable.defaults}. 60410 * @type boolean 60411 */ 60412 "bJUI": null, 60413 60414 /** 60415 * The classes to use for the table 60416 * @type object 60417 * @default {} 60418 */
vendor: 3,548 bytes, lines 60419-60574
60419 "oClasses": {}, 60420 60421 /** 60422 * Flag attached to the settings object so you can check in the draw 60423 * callback if filtering has been done in the draw. Deprecated in favour of 60424 * events. 60425 * @type boolean 60426 * @default false 60427 * @deprecated 60428 */ 60429 "bFiltered": false, 60430 60431 /** 60432 * Flag attached to the settings object so you can check in the draw 60433 * callback if sorting has been done in the draw. Deprecated in favour of 60434 * events. 60435 * @type boolean 60436 * @default false 60437 * @deprecated 60438 */ 60439 "bSorted": false, 60440 60441 /** 60442 * Indicate that if multiple rows are in the header and there is more than 60443 * one unique cell per column, if the top one (true) or bottom one (false) 60444 * should be used for sorting / title by DataTables. 60445 * Note that this parameter will be set by the initialisation routine. To 60446 * set a default use {@link DataTable.defaults}. 60447 * @type boolean 60448 */ 60449 "bSortCellsTop": null, 60450 60451 /** 60452 * Initialisation object that is used for the table 60453 * @type object 60454 * @default null 60455 */ 60456 "oInit": null, 60457 60458 /** 60459 * Destroy callback functions - for plug-ins to attach themselves to the 60460 * destroy so they can clean up markup and events. 60461 * @type array 60462 * @default [] 60463 */ 60464 "aoDestroyCallback": [], 60465 60466 60467 /** 60468 * Get the number of records in the current record set, before filtering 60469 * @type function 60470 */ 60471 "fnRecordsTotal": function () 60472 { 60473 return _fnDataSource( this ) == 'ssp' ? 60474 this._iRecordsTotal * 1 : 60475 this.aiDisplayMaster.length; 60476 }, 60477 60478 /** 60479 * Get the number of records in the current record set, after filtering 60480 * @type function 60481 */ 60482 "fnRecordsDisplay": function () 60483 { 60484 return _fnDataSource( this ) == 'ssp' ? 60485 this._iRecordsDisplay * 1 : 60486 this.aiDisplay.length; 60487 }, 60488 60489 /** 60490 * Get the display end point - aiDisplay index 60491 * @type function 60492 */ 60493 "fnDisplayEnd": function () 60494 { 60495 var 60496 len = this._iDisplayLength, 60497 start = this._iDisplayStart, 60498 calc = start + len, 60499 records = this.aiDisplay.length, 60500 features = this.oFeatures, 60501 paginate = features.bPaginate; 60502 60503 if ( features.bServerSide ) { 60504 return paginate === false || len === -1 ? 60505 start + records : 60506 Math.min( start+len, this._iRecordsDisplay ); 60507 } 60508 else { 60509 return ! paginate || calc>records || len===-1 ? 60510 records : 60511 calc; 60512 } 60513 }, 60514 60515 /** 60516 * The DataTables object for this table 60517 * @type object 60518 * @default null 60519 */ 60520 "oInstance": null, 60521 60522 /** 60523 * Unique identifier for each instance of the DataTables object. If there 60524 * is an ID on the table node, then it takes that value, otherwise an 60525 * incrementing internal counter is used. 60526 * @type string 60527 * @default null 60528 */ 60529 "sInstance": null, 60530 60531 /** 60532 * tabindex attribute value that is added to DataTables control elements, allowing 60533 * keyboard navigation of the table and its controls. 60534 */ 60535 "iTabIndex": 0, 60536 60537 /** 60538 * DIV container for the footer scrolling table if scrolling 60539 */ 60540 "nScrollHead": null, 60541 60542 /** 60543 * DIV container for the footer scrolling table if scrolling 60544 */ 60545 "nScrollFoot": null, 60546 60547 /** 60548 * Last applied sort 60549 * @type array 60550 * @default [] 60551 */ 60552 "aLastSort": [], 60553 60554 /** 60555 * Stored plug-in instances 60556 * @type object 60557 * @default {} 60558 */ 60559 "oPlugins": {}, 60560 60561 /** 60562 * Function used to get a row's id from the row's data 60563 * @type function 60564 * @default null 60565 */ 60566 "rowIdFn": null, 60567 60568 /** 60569 * Data location where to store a row's id 60570 * @type string 60571 * @default null 60572 */ 60573 "rowId": null 60574 };
vendor: 11,984 bytes, lines 60575-60941
60575 60576 /** 60577 * Extension object for DataTables that is used to provide all extension 60578 * options. 60579 * 60580 * Note that the `DataTable.ext` object is available through 60581 * `jQuery.fn.dataTable.ext` where it may be accessed and manipulated. It is 60582 * also aliased to `jQuery.fn.dataTableExt` for historic reasons. 60583 * @namespace 60584 * @extends DataTable.models.ext 60585 */ 60586 60587 60588 /** 60589 * DataTables extensions 60590 * 60591 * This namespace acts as a collection area for plug-ins that can be used to 60592 * extend DataTables capabilities. Indeed many of the build in methods 60593 * use this method to provide their own capabilities (sorting methods for 60594 * example). 60595 * 60596 * Note that this namespace is aliased to `jQuery.fn.dataTableExt` for legacy 60597 * reasons 60598 * 60599 * @namespace 60600 */ 60601 DataTable.ext = _ext = { 60602 /** 60603 * Buttons. For use with the Buttons extension for DataTables. This is 60604 * defined here so other extensions can define buttons regardless of load 60605 * order. It is _not_ used by DataTables core. 60606 * 60607 * @type object 60608 * @default {} 60609 */ 60610 buttons: {}, 60611 60612 60613 /** 60614 * Element class names 60615 * 60616 * @type object 60617 * @default {} 60618 */ 60619 classes: {}, 60620 60621 60622 /** 60623 * DataTables build type (expanded by the download builder) 60624 * 60625 * @type string 60626 */ 60627 builder: "-source-", 60628 60629 60630 /** 60631 * Error reporting. 60632 * 60633 * How should DataTables report an error. Can take the value 'alert', 60634 * 'throw', 'none' or a function. 60635 * 60636 * @type string|function 60637 * @default alert 60638 */ 60639 errMode: "alert", 60640 60641 60642 /** 60643 * Feature plug-ins. 60644 * 60645 * This is an array of objects which describe the feature plug-ins that are 60646 * available to DataTables. These feature plug-ins are then available for 60647 * use through the `dom` initialisation option. 60648 * 60649 * Each feature plug-in is described by an object which must have the 60650 * following properties: 60651 * 60652 * * `fnInit` - function that is used to initialise the plug-in, 60653 * * `cFeature` - a character so the feature can be enabled by the `dom` 60654 * instillation option. This is case sensitive. 60655 * 60656 * The `fnInit` function has the following input parameters: 60657 * 60658 * 1. `{object}` DataTables settings object: see 60659 * {@link DataTable.models.oSettings} 60660 * 60661 * And the following return is expected: 60662 * 60663 * * {node|null} The element which contains your feature. Note that the 60664 * return may also be void if your plug-in does not require to inject any 60665 * DOM elements into DataTables control (`dom`) - for example this might 60666 * be useful when developing a plug-in which allows table control via 60667 * keyboard entry 60668 * 60669 * @type array 60670 * 60671 * @example 60672 * $.fn.dataTable.ext.features.push( { 60673 * "fnInit": function( oSettings ) { 60674 * return new TableTools( { "oDTSettings": oSettings } ); 60675 * }, 60676 * "cFeature": "T" 60677 * } ); 60678 */ 60679 feature: [], 60680 60681 60682 /** 60683 * Row searching. 60684 * 60685 * This method of searching is complimentary to the default type based 60686 * searching, and a lot more comprehensive as it allows you complete control 60687 * over the searching logic. Each element in this array is a function 60688 * (parameters described below) that is called for every row in the table, 60689 * and your logic decides if it should be included in the searching data set 60690 * or not. 60691 * 60692 * Searching functions have the following input parameters: 60693 * 60694 * 1. `{object}` DataTables settings object: see 60695 * {@link DataTable.models.oSettings} 60696 * 2. `{array|object}` Data for the row to be processed (same as the 60697 * original format that was passed in as the data source, or an array 60698 * from a DOM data source 60699 * 3. `{int}` Row index ({@link DataTable.models.oSettings.aoData}), which 60700 * can be useful to retrieve the `TR` element if you need DOM interaction. 60701 * 60702 * And the following return is expected: 60703 * 60704 * * {boolean} Include the row in the searched result set (true) or not 60705 * (false) 60706 * 60707 * Note that as with the main search ability in DataTables, technically this 60708 * is "filtering", since it is subtractive. However, for consistency in 60709 * naming we call it searching here. 60710 * 60711 * @type array 60712 * @default [] 60713 * 60714 * @example 60715 * // The following example shows custom search being applied to the 60716 * // fourth column (i.e. the data[3] index) based on two input values 60717 * // from the end-user, matching the data in a certain range. 60718 * $.fn.dataTable.ext.search.push( 60719 * function( settings, data, dataIndex ) { 60720 * var min = document.getElementById('min').value * 1; 60721 * var max = document.getElementById('max').value * 1; 60722 * var version = data[3] == "-" ? 0 : data[3]*1; 60723 * 60724 * if ( min == "" && max == "" ) { 60725 * return true; 60726 * } 60727 * else if ( min == "" && version < max ) { 60728 * return true; 60729 * } 60730 * else if ( min < version && "" == max ) { 60731 * return true; 60732 * } 60733 * else if ( min < version && version < max ) { 60734 * return true; 60735 * } 60736 * return false; 60737 * } 60738 * ); 60739 */ 60740 search: [], 60741 60742 60743 /** 60744 * Selector extensions 60745 * 60746 * The `selector` option can be used to extend the options available for the 60747 * selector modifier options (`selector-modifier` object data type) that 60748 * each of the three built in selector types offer (row, column and cell + 60749 * their plural counterparts). For example the Select extension uses this 60750 * mechanism to provide an option to select only rows, columns and cells 60751 * that have been marked as selected by the end user (`{selected: true}`), 60752 * which can be used in conjunction with the existing built in selector 60753 * options. 60754 * 60755 * Each property is an array to which functions can be pushed. The functions 60756 * take three attributes: 60757 * 60758 * * Settings object for the host table 60759 * * Options object (`selector-modifier` object type) 60760 * * Array of selected item indexes 60761 * 60762 * The return is an array of the resulting item indexes after the custom 60763 * selector has been applied. 60764 * 60765 * @type object 60766 */ 60767 selector: { 60768 cell: [], 60769 column: [], 60770 row: [] 60771 }, 60772 60773 60774 /** 60775 * Internal functions, exposed for used in plug-ins. 60776 * 60777 * Please note that you should not need to use the internal methods for 60778 * anything other than a plug-in (and even then, try to avoid if possible). 60779 * The internal function may change between releases. 60780 * 60781 * @type object 60782 * @default {} 60783 */ 60784 internal: {}, 60785 60786 60787 /** 60788 * Legacy configuration options. Enable and disable legacy options that 60789 * are available in DataTables. 60790 * 60791 * @type object 60792 */ 60793 legacy: { 60794 /** 60795 * Enable / disable DataTables 1.9 compatible server-side processing 60796 * requests 60797 * 60798 * @type boolean 60799 * @default null 60800 */ 60801 ajax: null 60802 }, 60803 60804 60805 /** 60806 * Pagination plug-in methods. 60807 * 60808 * Each entry in this object is a function and defines which buttons should 60809 * be shown by the pagination rendering method that is used for the table: 60810 * {@link DataTable.ext.renderer.pageButton}. The renderer addresses how the 60811 * buttons are displayed in the document, while the functions here tell it 60812 * what buttons to display. This is done by returning an array of button 60813 * descriptions (what each button will do). 60814 * 60815 * Pagination types (the four built in options and any additional plug-in 60816 * options defined here) can be used through the `paginationType` 60817 * initialisation parameter. 60818 * 60819 * The functions defined take two parameters: 60820 * 60821 * 1. `{int} page` The current page index 60822 * 2. `{int} pages` The number of pages in the table 60823 * 60824 * Each function is expected to return an array where each element of the 60825 * array can be one of: 60826 * 60827 * * `first` - Jump to first page when activated 60828 * * `last` - Jump to last page when activated 60829 * * `previous` - Show previous page when activated 60830 * * `next` - Show next page when activated 60831 * * `{int}` - Show page of the index given 60832 * * `{array}` - A nested array containing the above elements to add a 60833 * containing 'DIV' element (might be useful for styling). 60834 * 60835 * Note that DataTables v1.9- used this object slightly differently whereby 60836 * an object with two functions would be defined for each plug-in. That 60837 * ability is still supported by DataTables 1.10+ to provide backwards 60838 * compatibility, but this option of use is now decremented and no longer 60839 * documented in DataTables 1.10+. 60840 * 60841 * @type object 60842 * @default {} 60843 * 60844 * @example 60845 * // Show previous, next and current page buttons only 60846 * $.fn.dataTableExt.oPagination.current = function ( page, pages ) { 60847 * return [ 'previous', page, 'next' ]; 60848 * }; 60849 */ 60850 pager: {}, 60851 60852 60853 renderer: { 60854 pageButton: {}, 60855 header: {} 60856 }, 60857 60858 60859 /** 60860 * Ordering plug-ins - custom data source 60861 * 60862 * The extension options for ordering of data available here is complimentary 60863 * to the default type based ordering that DataTables typically uses. It 60864 * allows much greater control over the the data that is being used to 60865 * order a column, but is necessarily therefore more complex. 60866 * 60867 * This type of ordering is useful if you want to do ordering based on data 60868 * live from the DOM (for example the contents of an 'input' element) rather 60869 * than just the static string that DataTables knows of. 60870 * 60871 * The way these plug-ins work is that you create an array of the values you 60872 * wish to be ordering for the column in question and then return that 60873 * array. The data in the array much be in the index order of the rows in 60874 * the table (not the currently ordering order!). Which order data gathering 60875 * function is run here depends on the `dt-init columns.orderDataType` 60876 * parameter that is used for the column (if any). 60877 * 60878 * The functions defined take two parameters: 60879 * 60880 * 1. `{object}` DataTables settings object: see 60881 * {@link DataTable.models.oSettings} 60882 * 2. `{int}` Target column index 60883 * 60884 * Each function is expected to return an array: 60885 * 60886 * * `{array}` Data for the column to be ordering upon 60887 * 60888 * @type array 60889 * 60890 * @example 60891 * // Ordering using `input` node values 60892 * $.fn.dataTable.ext.order['dom-text'] = function ( settings, col ) 60893 * { 60894 * return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) { 60895 * return $('input', td).val(); 60896 * } ); 60897 * } 60898 */ 60899 order: {}, 60900 60901 60902 /** 60903 * Type based plug-ins. 60904 * 60905 * Each column in DataTables has a type assigned to it, either by automatic 60906 * detection or by direct assignment using the `type` option for the column. 60907 * The type of a column will effect how it is ordering and search (plug-ins 60908 * can also make use of the column type if required). 60909 * 60910 * @namespace 60911 */ 60912 type: { 60913 /** 60914 * Type detection functions. 60915 * 60916 * The functions defined in this object are used to automatically detect 60917 * a column's type, making initialisation of DataTables super easy, even 60918 * when complex data is in the table. 60919 * 60920 * The functions defined take two parameters: 60921 * 60922 * 1. `{*}` Data from the column cell to be analysed 60923 * 2. `{settings}` DataTables settings object. This can be used to 60924 * perform context specific type detection - for example detection 60925 * based on language settings such as using a comma for a decimal 60926 * place. Generally speaking the options from the settings will not 60927 * be required 60928 * 60929 * Each function is expected to return: 60930 * 60931 * * `{string|null}` Data type detected, or null if unknown (and thus 60932 * pass it on to the other type detection functions. 60933 * 60934 * @type array 60935 * 60936 * @example 60937 * // Currency type detection plug-in: 60938 * $.fn.dataTable.ext.type.detect.push( 60939 * function ( data, settings ) { 60940 * // Check the numeric part 60941 * if ( !
60941$.isNumeric( data.substring(1) ) ) { 60942 * return null; 60943 * } 60944 * 60945 * // Check prefixed by currency 60946 * if ( data.charAt(0) == '$' || data.charAt(0) == '£' ) { 60947 * return 'currency'; 60948 * } 60949 * return null; 60950 * } 60951 * ); 60952 */ 60953 detect: [], 60954 60955 60956 /** 60957 * Type based search formatting. 60958 * 60959 * The type based searching functions can be used to pre-format the 60960 * data to be search on. For example, it can be used to strip HTML 60961 * tags or to de-format telephone numbers for numeric only searching. 60962 * 60963 * Note that is a search is not defined for a column of a given type, 60964 * no search formatting will be performed. 60965 * 60966 * Pre-processing of searching data plug-ins - When you assign the sType 60967 * for a column (or have it automatically detected for you by DataTables 60968 * or a type detection plug-in), you will typically be using this for 60969 * custom sorting, but it can also be used to provide custom searching 60970 * by allowing you to pre-processing the data and returning the data in 60971 * the format that should be searched upon. This is done by adding 60972 * functions this object with a parameter name which matches the sType 60973 * for that target column. This is the corollary of <i>afnSortData</i> 60974 * for searching data. 60975 * 60976 * The functions defined take a single parameter: 60977 * 60978 * 1. `{*}` Data from the column cell to be prepared for searching 60979 * 60980 * Each function is expected to return: 60981 * 60982 * * `{string|null}` Formatted string that will be used for the searching. 60983 * 60984 * @type object 60985 * @default {} 60986 * 60987 * @example 60988 * $.fn.dataTable.ext.type.search['title-numeric'] = function ( d ) { 60989 * return d.replace(/\n/g," ").replace( /<.*?>/g, "" ); 60990 * } 60991 */ 60992 search: {}, 60993 60994 60995 /** 60996 * Type based ordering. 60997 * 60998 * The column type tells DataTables what ordering to apply to the table 60999 * when a column is sorted upon. The order for each type that is defined, 61000 * is defined by the functions available in this object. 61001 * 61002 * Each ordering option can be described by three properties added to 61003 * this object: 61004 * 61005 * * `{type}-pre` - Pre-formatting function 61006 * * `{type}-asc` - Ascending order function 61007 * * `{type}-desc` - Descending order function 61008 * 61009 * All three can be used together, only `{type}-pre` or only 61010 * `{type}-asc` and `{type}-desc` together. It is generally recommended 61011 * that only `{type}-pre` is used, as this provides the optimal 61012 * implementation in terms of speed, although the others are provided 61013 * for compatibility with existing Javascript sort functions. 61014 * 61015 * `{type}-pre`: Functions defined take a single parameter: 61016 * 61017 * 1. `{*}` Data from the column cell to be prepared for ordering 61018 * 61019 * And return: 61020 * 61021 * * `{*}` Data to be sorted upon 61022 * 61023 * `{type}-asc` and `{type}-desc`: Functions are typical Javascript sort 61024 * functions, taking two parameters: 61025 * 61026 * 1. `{*}` Data to compare to the second parameter 61027 * 2. `{*}` Data to compare to the first parameter 61028 * 61029 * And returning: 61030 * 61031 * * `{*}` Ordering match: <0 if first parameter should be sorted lower 61032 * than the second parameter, ===0 if the two parameters are equal and 61033 * >0 if the first parameter should be sorted height than the second 61034 * parameter. 61035 * 61036 * @type object 61037 * @default {} 61038 * 61039 * @example 61040 * // Numeric ordering of formatted numbers with a pre-formatter 61041 * $.extend( $.fn.dataTable.ext.type.order, { 61042 * "string-pre": function(x) { 61043 * a = (a === "-" || a === "") ? 0 : a.replace( /[^\d\-\.]/g, "" ); 61044 * return parseFloat( a ); 61045 * } 61046 * } ); 61047 * 61048 * @example 61049 * // Case-sensitive string ordering, with no pre-formatting method 61050 * $.extend( $.fn.dataTable.ext.order, { 61051 * "string-case-asc": function(x,y) { 61052 * return ((x < y) ? -1 : ((x > y) ? 1 : 0)); 61053 * }, 61054 * "string-case-desc": function(x,y) { 61055 * return ((x < y) ? 1 : ((x > y) ? -1 : 0)); 61056 * } 61057 * } ); 61058 */ 61059 order: {} 61060 }, 61061 61062 /** 61063 * Unique DataTables instance counter 61064 * 61065 * @type int 61066 * @private 61067 */ 61068 _unique: 0, 61069 61070 61071 // 61072 // Depreciated 61073 // The following properties are retained for backwards compatiblity only. 61074 // The should not be used in new projects and will be removed in a future 61075 // version 61076 // 61077 61078 /** 61079 * Version check function. 61080 * @type function 61081 * @depreciated Since 1.10 61082 */ 61083 fnVersionCheck: DataTable.fnVersionCheck, 61084 61085 61086 /** 61087 * Index for what 'this' index API functions should use 61088 * @type int 61089 * @deprecated Since v1.10 61090 */ 61091 iApiIndex: 0, 61092 61093 61094 /** 61095 * jQuery UI class container 61096 * @type object 61097 * @deprecated Since v1.10 61098 */ 61099 oJUIClasses: {}, 61100 61101 61102 /** 61103 * Software version 61104 * @type string 61105 * @deprecated Since v1.10 61106 */
61107 sVersion: DataTable.version 61108 }; 61109 61110 61111 // 61112 // Backwards compatibility. Alias to pre 1.10 Hungarian notation counter parts 61113 // 61114 $.extend( _ext, { 61115 afnFiltering: _ext.search, 61116 aTypes: _ext.type.detect, 61117 ofnSearch: _ext.type.search, 61118 oSort: _ext.type.order, 61119 afnSortData: _ext.order, 61120 aoFeatures: _ext.feature, 61121 oApi: _ext.internal, 61122 oStdClasses: _ext.classes, 61123 oPagination: _ext.pager 61124 } ); 61125 61126 61127 $.extend( DataTable.ext.classes, { 61128 "sTable": "dataTable", 61129 "sNoFooter": "no-footer", 61130 61131 /* Paging buttons */ 61132 "sPageButton": "paginate_button", 61133 "sPageButtonActive": "current", 61134 "sPageButtonDisabled": "disabled", 61135 61136 /* Striping classes */ 61137 "sStripeOdd": "odd", 61138 "sStripeEven": "even", 61139 61140 /* Empty row */ 61141 "sRowEmpty": "dataTables_empty", 61142 61143 /* Features */ 61144 "sWrapper": "dataTables_wrapper", 61145 "sFilter": "dataTables_filter", 61146 "sInfo": "dataTables_info", 61147 "sPaging": "dataTables_paginate paging_", /* Note that the type is postfixed */ 61148 "sLength": "dataTables_length", 61149 "sProcessing": "dataTables_processing", 61150 61151 /* Sorting */ 61152 "sSortAsc": "sorting_asc", 61153 "sSortDesc": "sorting_desc", 61154 "sSortable": "sorting", /* Sortable in both directions */ 61155 "sSortableAsc": "sorting_asc_disabled", 61156 "sSortableDesc": "sorting_desc_disabled", 61157 "sSortableNone": "sorting_disabled", 61158 "sSortColumn": "sorting_", /* Note that an int is postfixed for the sorting order */ 61159 61160 /* Filtering */ 61161 "sFilterInput": "", 61162 61163 /* Page length */ 61164 "sLengthSelect": "", 61165 61166 /* Scrolling */ 61167 "sScrollWrapper": "dataTables_scroll", 61168 "sScrollHead": "dataTables_scrollHead", 61169 "sScrollHeadInner": "dataTables_scrollHeadInner", 61170 "sScrollBody": "dataTables_scrollBody", 61171 "sScrollFoot": "dataTables_scrollFoot", 61172 "sScrollFootInner": "dataTables_scrollFootInner", 61173 61174 /* Misc */ 61175 "sHeaderTH": "", 61176 "sFooterTH": "", 61177 61178 // Deprecated 61179 "sSortJUIAsc": "", 61180 "sSortJUIDesc": "", 61181 "sSortJUI": "", 61182 "sSortJUIAscAllowed": "", 61183 "sSortJUIDescAllowed": "", 61184 "sSortJUIWrapper": "", 61185 "sSortIcon": "", 61186 "sJUIHeader": "", 61187 "sJUIFooter": "" 61188 } ); 61189 61190 61191 (function() { 61192 61193 // Reused strings for better compression. Closure compiler appears to have a
61194 // weird edge case where it is trying to expand strings rather than use the 61195 // variable version. This results in about 200 bytes being added, for very 61196 // little preference benefit since it this run on script load only. 61197 var _empty = ''; 61198 _empty = ''; 61199 61200 var _stateDefault = _empty + 'ui-state-default'; 61201 var _sortIcon = _empty + 'css_right ui-icon ui-icon-'; 61202 var _headerFooter = _empty + 'fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix'; 61203 61204 $.extend( DataTable.ext.oJUIClasses, DataTable.ext.classes, { 61205 /* Full numbers paging buttons */ 61206 "sPageButton": "fg-button ui-button "+_stateDefault, 61207 "sPageButtonActive": "ui-state-disabled", 61208 "sPageButtonDisabled": "ui-state-disabled", 61209 61210 /* Features */ 61211 "sPaging": "dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi "+ 61212 "ui-buttonset-multi paging_", /* Note that the type is postfixed */ 61213 61214 /* Sorting */ 61215 "sSortAsc": _stateDefault+" sorting_asc", 61216 "sSortDesc": _stateDefault+" sorting_desc", 61217 "sSortable": _stateDefault+" sorting", 61218 "sSortableAsc": _stateDefault+" sorting_asc_disabled", 61219 "sSortableDesc": _stateDefault+" sorting_desc_disabled", 61220 "sSortableNone": _stateDefault+" sorting_disabled", 61221 "sSortJUIAsc": _sortIcon+"triangle-1-n", 61222 "sSortJUIDesc": _sortIcon+"triangle-1-s", 61223 "sSortJUI": _sortIcon+"carat-2-n-s", 61224 "sSortJUIAscAllowed": _sortIcon+"carat-1-n", 61225 "sSortJUIDescAllowed": _sortIcon+"carat-1-s", 61226 "sSortJUIWrapper": "DataTables_sort_wrapper", 61227 "sSortIcon": "DataTables_sort_icon", 61228 61229 /* Scrolling */ 61230 "sScrollHead": "dataTables_scrollHead "+_stateDefault, 61231 "sScrollFoot": "dataTables_scrollFoot "+_stateDefault, 61232 61233 /* Misc */ 61234 "sHeaderTH": _stateDefault, 61235 "sFooterTH": _stateDefault, 61236 "sJUIHeader": _headerFooter+" ui-corner-tl ui-corner-tr", 61237 "sJUIFooter": _headerFooter+" ui-corner-bl ui-corner-br" 61238 } ); 61239 61240 }()); 61241 61242 61243 61244 var extPagination = DataTable.ext.pager; 61245 61246 function _numbers ( page, pages ) { 61247 var 61248 numbers = [], 61249 buttons = extPagination.numbers_length, 61250 half = Math.floor( buttons / 2 ), 61251 i = 1; 61252 61253 if ( pages <= buttons ) { 61254 numbers = _range( 0, pages ); 61255 } 61256 else if ( page <= half ) { 61257 numbers = _range( 0, buttons-2 ); 61258 numbers.push( 'ellipsis' ); 61259 numbers.push( pages-1 ); 61260 } 61261 else if ( page >= pages - 1 - half ) { 61262 numbers = _range( pages-(buttons-2), pages ); 61263 numbers.splice( 0, 0, 'ellipsis' ); // no unshift in ie6 61264 numbers.splice( 0, 0, 0 ); 61265 } 61266 else { 61267 numbers = _range( page-half+2, page+half-1 ); 61268 numbers.push( 'ellipsis' ); 61269 numbers.push( pages-1 ); 61270 numbers.splice( 0, 0, 'ellipsis' ); 61271 numbers.splice( 0, 0, 0 ); 61272 } 61273 61274 numbers.DT_el = 'span'; 61275 return numbers; 61276 } 61277 61278 61279 $.extend( extPagination, { 61280 simple: function ( page, pages ) { 61281 return [ 'previous', 'next' ]; 61282 }, 61283 61284 full: function ( page, pages ) { 61285 return [ 'first', 'previous', 'next', 'last' ]; 61286 }, 61287 61288 numbers: function ( page, pages ) { 61289 return [ _numbers(page, pages) ]; 61290 }, 61291 61292 simple_numbers: function ( page, pages ) { 61293 return [ 'previous', _numbers(page, pages), 'next' ]; 61294 }, 61295 61296 full_numbers: function ( page, pages ) { 61297 return [ 'first', 'previous', _numbers(page, pages), 'next', 'last' ]; 61298 }, 61299 61300 // For testing and plug-ins to use 61301 _numbers: _numbers, 61302 61303 // Number of number buttons (including ellipsis) to show. _Must be odd!_ 61304 numbers_length: 7 61305 } ); 61306 61307 61308 $.extend( true, DataTable.ext.renderer, { 61309 pageButton: { 61310 _: function ( settings, host, idx, buttons, page, pages ) { 61311 var classes = settings.oClasses; 61312 var lang = settings.oLanguage.oPaginate; 61313 var aria = settings.oLanguage.oAria.paginate || {}; 61314 var btnDisplay, btnClass, counter=0; 61315 61316 var attach = function( container, buttons ) { 61317 var i, ien, node, button; 61318 var clickHandler = function ( e ) { 61319 _fnPageChange( settings, e.data.action, true ); 61320 }; 61321 61322 for ( i=0, ien=buttons.length ; i<ien ; i++ ) { 61323 button = buttons[i]; 61324 61325 if ( $.isArray( button ) ) { 61326 var inner = $( '<'+(button.DT_el || 'div')+'/>' ) 61327 .appendTo( container ); 61328 attach( inner, button ); 61329 } 61330 else { 61331 btnDisplay = null; 61332 btnClass = ''; 61333 61334 switch ( button ) { 61335 case 'ellipsis': 61336 container.append('<span class="ellipsis">…
61336</span>'); 61337 break; 61338 61339 case 'first': 61340 btnDisplay = lang.sFirst; 61341 btnClass = button + (page > 0 ? 61342 '' : ' '+classes.sPageButtonDisabled); 61343 break; 61344 61345 case 'previous': 61346 btnDisplay = lang.sPrevious; 61347 btnClass = button + (page > 0 ? 61348 '' : ' '+classes.sPageButtonDisabled); 61349 break; 61350 61351 case 'next': 61352 btnDisplay = lang.sNext; 61353 btnClass = button + (page < pages-1 ? 61354 '' : ' '+classes.sPageButtonDisabled); 61355 break; 61356 61357 case 'last': 61358 btnDisplay = lang.sLast; 61359 btnClass = button + (page < pages-1 ? 61360 '' : ' '+classes.sPageButtonDisabled); 61361 break; 61362 61363 default: 61364 btnDisplay = button + 1; 61365 btnClass = page === button ? 61366 classes.sPageButtonActive : ''; 61367 break; 61368 } 61369 61370 if ( btnDisplay !== null ) { 61371 node = $('<a>', { 61372 'class': classes.sPageButton+' '+btnClass, 61373 'aria-controls': settings.sTableId, 61374 'aria-label': aria[ button ], 61375 'data-dt-idx': counter, 61376 'tabindex': settings.iTabIndex, 61377 'id': idx === 0 && typeof button === 'string' ? 61378 settings.sTableId +'_'+ button : 61379 null 61380 } ) 61381 .html( btnDisplay ) 61382 .appendTo( container ); 61383 61384 _fnBindAction( 61385 node, {action: button}, clickHandler 61386 ); 61387 61388 counter++; 61389 } 61390 } 61391 } 61392 }; 61393 61394 // IE9 throws an 'unknown error' if document.activeElement is used 61395 // inside an iframe or frame. Try / catch the error. Not good for 61396 // accessibility, but neither are frames. 61397 var activeEl; 61398 61399 try { 61400 // Because this approach is destroying and recreating the paging 61401 // elements, focus is lost on the select button which is bad for 61402 // accessibility. So we want to restore focus once the draw has 61403 // completed 61404 activeEl = $(host).find(document.activeElement).data('dt-idx'); 61405 } 61406 catch (e) {} 61407 61408 attach( $(host).empty(), buttons ); 61409 61410 if ( activeEl ) { 61411 $(host).find( '[data-dt-idx='+activeEl+']' ).focus(); 61412 } 61413 } 61414 } 61415 } ); 61416 61417 61418 61419 // Built in type detection. See model.ext.aTypes for information about 61420 // what is required from this methods. 61421 $.extend( DataTable.ext.type.detect, [ 61422 // Plain numbers - first since V8 detects some plain numbers as dates 61423 // e.g. Date.parse('55') (but not all, e.g. Date.parse('22')...). 61424 function ( d, settings ) 61425 { 61426 var decimal = settings.oLanguage.sDecimal; 61427 return _isNumber( d, decimal ) ? 'num'+decimal : null; 61428 }, 61429 61430 // Dates (only those recognised by the browser's Date.parse) 61431 function ( d, settings ) 61432 { 61433 // V8 will remove any unknown characters at the start and end of the 61434 // expression, leading to false matches such as `$245.12` or `10%` being 61435 // a valid date. See forum thread 18941 for detail. 61436 if ( d && !(d instanceof Date) && ( ! _re_date_start.test(d) || ! _re_date_end.test(d) ) ) { 61437 return null; 61438 } 61439 var parsed = Date.parse(d); 61440 return (parsed !== null && !isNaN(parsed)) || _empty(d) ? 'date' : null; 61441 }, 61442 61443 // Formatted numbers 61444 function ( d, settings ) 61445 { 61446 var decimal = settings.oLanguage.sDecimal; 61447 return _isNumber( d, decimal, true ) ? 'num-fmt'+decimal : null; 61448 }, 61449 61450 // HTML numeric 61451 function ( d, settings ) 61452 { 61453 var decimal = settings.oLanguage.sDecimal; 61454 return _htmlNumeric( d, decimal ) ? 'html-num'+decimal : null; 61455 }, 61456 61457 // HTML numeric, formatted 61458 function ( d, settings ) 61459 { 61460 var decimal = settings.oLanguage.sDecimal; 61461 return _htmlNumeric( d, decimal, true ) ? 'html-num-fmt'+decimal : null; 61462 }, 61463 61464 // HTML (this is strict checking - there must be html) 61465 function ( d, settings ) 61466 { 61467 return _empty( d ) || (typeof d === 'string' && d.indexOf('<') !== -1) ? 61468 'html' : null; 61469 } 61470 ] ); 61471 61472 61473 61474 // Filter formatting functions. See model.ext.ofnSearch for information about 61475 // what is required from these methods. 61476 // 61477 // Note that additional search methods are added for the html numbers and
vendor: 16,384 bytes, lines 61478-62014
61478 // html formatted numbers by `_addNumericSort()` when we know what the decimal 61479 // place is 61480 61481 61482 $.extend( DataTable.ext.type.search, { 61483 html: function ( data ) { 61484 return _empty(data) ? 61485 data : 61486 typeof data === 'string' ? 61487 data 61488 .replace( _re_new_lines, " " ) 61489 .replace( _re_html, "" ) : 61490 ''; 61491 }, 61492 61493 string: function ( data ) { 61494 return _empty(data) ? 61495 data : 61496 typeof data === 'string' ? 61497 data.replace( _re_new_lines, " " ) : 61498 data; 61499 } 61500 } ); 61501 61502 61503 61504 var __numericReplace = function ( d, decimalPlace, re1, re2 ) { 61505 if ( d !== 0 && (!d || d === '-') ) { 61506 return -Infinity; 61507 } 61508 61509 // If a decimal place other than `.` is used, it needs to be given to the 61510 // function so we can detect it and replace with a `.` which is the only 61511 // decimal place Javascript recognises - it is not locale aware. 61512 if ( decimalPlace ) { 61513 d = _numToDecimal( d, decimalPlace ); 61514 } 61515 61516 if ( d.replace ) { 61517 if ( re1 ) { 61518 d = d.replace( re1, '' ); 61519 } 61520 61521 if ( re2 ) { 61522 d = d.replace( re2, '' ); 61523 } 61524 } 61525 61526 return d * 1; 61527 }; 61528 61529 61530 // Add the numeric 'deformatting' functions for sorting and search. This is done 61531 // in a function to provide an easy ability for the language options to add 61532 // additional methods if a non-period decimal place is used. 61533 function _addNumericSort ( decimalPlace ) { 61534 $.each( 61535 { 61536 // Plain numbers 61537 "num": function ( d ) { 61538 return __numericReplace( d, decimalPlace ); 61539 }, 61540 61541 // Formatted numbers 61542 "num-fmt": function ( d ) { 61543 return __numericReplace( d, decimalPlace, _re_formatted_numeric ); 61544 }, 61545 61546 // HTML numeric 61547 "html-num": function ( d ) { 61548 return __numericReplace( d, decimalPlace, _re_html ); 61549 }, 61550 61551 // HTML numeric, formatted 61552 "html-num-fmt": function ( d ) { 61553 return __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric ); 61554 } 61555 }, 61556 function ( key, fn ) { 61557 // Add the ordering method 61558 _ext.type.order[ key+decimalPlace+'-pre' ] = fn; 61559 61560 // For HTML types add a search formatter that will strip the HTML 61561 if ( key.match(/^html\-/) ) { 61562 _ext.type.search[ key+decimalPlace ] = _ext.type.search.html; 61563 } 61564 } 61565 ); 61566 } 61567 61568 61569 // Default sort methods 61570 $.extend( _ext.type.order, { 61571 // Dates 61572 "date-pre": function ( d ) { 61573 return Date.parse( d ) || 0; 61574 }, 61575 61576 // html 61577 "html-pre": function ( a ) { 61578 return _empty(a) ? 61579 '' : 61580 a.replace ? 61581 a.replace( /<.*?>/g, "" ).toLowerCase() : 61582 a+''; 61583 }, 61584 61585 // string 61586 "string-pre": function ( a ) { 61587 // This is a little complex, but faster than always calling toString, 61588 // http://jsperf.com/tostring-v-check 61589 return _empty(a) ? 61590 '' : 61591 typeof a === 'string' ? 61592 a.toLowerCase() : 61593 ! a.toString ? 61594 '' : 61595 a.toString(); 61596 }, 61597 61598 // string-asc and -desc are retained only for compatibility with the old 61599 // sort methods 61600 "string-asc": function ( x, y ) { 61601 return ((x < y) ? -1 : ((x > y) ? 1 : 0)); 61602 }, 61603 61604 "string-desc": function ( x, y ) { 61605 return ((x < y) ? 1 : ((x > y) ? -1 : 0)); 61606 } 61607 } ); 61608 61609 61610 // Numeric sorting types - order doesn't matter here 61611 _addNumericSort( '' ); 61612 61613 61614 $.extend( true, DataTable.ext.renderer, { 61615 header: { 61616 _: function ( settings, cell, column, classes ) { 61617 // No additional mark-up required 61618 // Attach a sort listener to update on sort - note that using the 61619 // `DT` namespace will allow the event to be removed automatically 61620 // on destroy, while the `dt` namespaced event is the one we are 61621 // listening for 61622 $(settings.nTable).on( 'order.dt.DT', function ( e, ctx, sorting, columns ) { 61623 if ( settings !== ctx ) { // need to check this this is the host 61624 return; // table, not a nested one 61625 } 61626 61627 var colIdx = column.idx; 61628 61629 cell 61630 .removeClass( 61631 column.sSortingClass +' '+ 61632 classes.sSortAsc +' '+ 61633 classes.sSortDesc 61634 ) 61635 .addClass( columns[ colIdx ] == 'asc' ? 61636 classes.sSortAsc : columns[ colIdx ] == 'desc' ? 61637 classes.sSortDesc : 61638 column.sSortingClass 61639 ); 61640 } ); 61641 }, 61642 61643 jqueryui: function ( settings, cell, column, classes ) { 61644 $('<div/>') 61645 .addClass( classes.sSortJUIWrapper ) 61646 .append( cell.contents() ) 61647 .append( $('<span/>') 61648 .addClass( classes.sSortIcon+' '+column.sSortingClassJUI ) 61649 ) 61650 .appendTo( cell ); 61651 61652 // Attach a sort listener to update on sort 61653 $(settings.nTable).on( 'order.dt.DT', function ( e, ctx, sorting, columns ) { 61654 if ( settings !== ctx ) { 61655 return; 61656 } 61657 61658 var colIdx = column.idx; 61659 61660 cell 61661 .removeClass( classes.sSortAsc +" "+classes.sSortDesc ) 61662 .addClass( columns[ colIdx ] == 'asc' ? 61663 classes.sSortAsc : columns[ colIdx ] == 'desc' ? 61664 classes.sSortDesc : 61665 column.sSortingClass 61666 ); 61667 61668 cell 61669 .find( 'span.'+classes.sSortIcon ) 61670 .removeClass( 61671 classes.sSortJUIAsc +" "+ 61672 classes.sSortJUIDesc +" "+ 61673 classes.sSortJUI +" "+ 61674 classes.sSortJUIAscAllowed +" "+ 61675 classes.sSortJUIDescAllowed 61676 ) 61677 .addClass( columns[ colIdx ] == 'asc' ? 61678 classes.sSortJUIAsc : columns[ colIdx ] == 'desc' ? 61679 classes.sSortJUIDesc : 61680 column.sSortingClassJUI 61681 ); 61682 } ); 61683 } 61684 } 61685 } ); 61686 61687 /* 61688 * Public helper functions. These aren't used internally by DataTables, or 61689 * called by any of the options passed into DataTables, but they can be used 61690 * externally by developers working with DataTables. They are helper functions 61691 * to make working with DataTables a little bit easier. 61692 */ 61693 61694 var __htmlEscapeEntities = function ( d ) { 61695 return typeof d === 'string' ? 61696 d.replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"') : 61697 d; 61698 }; 61699 61700 /** 61701 * Helpers for `columns.render`. 61702 * 61703 * The options defined here can be used with the `columns.render` initialisation 61704 * option to provide a display renderer. The following functions are defined: 61705 * 61706 * * `number` - Will format numeric data (defined by `columns.data`) for 61707 * display, retaining the original unformatted data for sorting and filtering. 61708 * It takes 5 parameters: 61709 * * `string` - Thousands grouping separator 61710 * * `string` - Decimal point indicator 61711 * * `integer` - Number of decimal points to show 61712 * * `string` (optional) - Prefix. 61713 * * `string` (optional) - Postfix (/suffix). 61714 * * `text` - Escape HTML to help prevent XSS attacks. It has no optional 61715 * parameters. 61716 * 61717 * @example 61718 * // Column definition using the number renderer 61719 * { 61720 * data: "salary", 61721 * render: $.fn.dataTable.render.number( '\'', '.', 0, '$' ) 61722 * } 61723 * 61724 * @namespace 61725 */ 61726 DataTable.render = { 61727 number: function ( thousands, decimal, precision, prefix, postfix ) { 61728 return { 61729 display: function ( d ) { 61730 if ( typeof d !== 'number' && typeof d !== 'string' ) { 61731 return d; 61732 } 61733 61734 var negative = d < 0 ? '-' : ''; 61735 var flo = parseFloat( d ); 61736 61737 // If NaN then there isn't much formatting that we can do - just 61738 // return immediately, escaping any HTML (this was supposed to 61739 // be a number after all) 61740 if ( isNaN( flo ) ) { 61741 return __htmlEscapeEntities( d ); 61742 } 61743 61744 d = Math.abs( flo ); 61745 61746 var intPart = parseInt( d, 10 ); 61747 var floatPart = precision ? 61748 decimal+(d - intPart).toFixed( precision ).substring( 2 ): 61749 ''; 61750 61751 return negative + (prefix||'') + 61752 intPart.toString().replace( 61753 /\B(?=(\d{3})+(?!\d))/g, thousands 61754 ) + 61755 floatPart + 61756 (postfix||''); 61757 } 61758 }; 61759 }, 61760 61761 text: function () { 61762 return { 61763 display: __htmlEscapeEntities 61764 }; 61765 } 61766 }; 61767 61768 61769 /* 61770 * This is really a good bit rubbish this method of exposing the internal methods 61771 * publicly... - To be fixed in 2.0 using methods on the prototype 61772 */ 61773 61774 61775 /** 61776 * Create a wrapper function for exporting an internal functions to an external API. 61777 * @param {string} fn API function name 61778 * @returns {function} wrapped function 61779 * @memberof DataTable#internal 61780 */ 61781 function _fnExternApiFunc (fn) 61782 { 61783 return function() { 61784 var args = [_fnSettingsFromNode( this[DataTable.ext.iApiIndex] )].concat( 61785 Array.prototype.slice.call(arguments) 61786 ); 61787 return DataTable.ext.internal[fn].apply( this, args ); 61788 }; 61789 } 61790 61791 61792 /** 61793 * Reference to internal functions for use by plug-in developers. Note that 61794 * these methods are references to internal functions and are considered to be 61795 * private. If you use these methods, be aware that they are liable to change 61796 * between versions. 61797 * @namespace 61798 */ 61799 $.extend( DataTable.ext.internal, { 61800 _fnExternApiFunc: _fnExternApiFunc, 61801 _fnBuildAjax: _fnBuildAjax, 61802 _fnAjaxUpdate: _fnAjaxUpdate, 61803 _fnAjaxParameters: _fnAjaxParameters, 61804 _fnAjaxUpdateDraw: _fnAjaxUpdateDraw, 61805 _fnAjaxDataSrc: _fnAjaxDataSrc, 61806 _fnAddColumn: _fnAddColumn, 61807 _fnColumnOptions: _fnColumnOptions, 61808 _fnAdjustColumnSizing: _fnAdjustColumnSizing, 61809 _fnVisibleToColumnIndex: _fnVisibleToColumnIndex, 61810 _fnColumnIndexToVisible: _fnColumnIndexToVisible, 61811 _fnVisbleColumns: _fnVisbleColumns, 61812 _fnGetColumns: _fnGetColumns, 61813 _fnColumnTypes: _fnColumnTypes, 61814 _fnApplyColumnDefs: _fnApplyColumnDefs, 61815 _fnHungarianMap: _fnHungarianMap, 61816 _fnCamelToHungarian: _fnCamelToHungarian, 61817 _fnLanguageCompat: _fnLanguageCompat, 61818 _fnBrowserDetect: _fnBrowserDetect, 61819 _fnAddData: _fnAddData, 61820 _fnAddTr: _fnAddTr, 61821 _fnNodeToDataIndex: _fnNodeToDataIndex, 61822 _fnNodeToColumnIndex: _fnNodeToColumnIndex, 61823 _fnGetCellData: _fnGetCellData, 61824 _fnSetCellData: _fnSetCellData, 61825 _fnSplitObjNotation: _fnSplitObjNotation, 61826 _fnGetObjectDataFn: _fnGetObjectDataFn, 61827 _fnSetObjectDataFn: _fnSetObjectDataFn, 61828 _fnGetDataMaster: _fnGetDataMaster, 61829 _fnClearTable: _fnClearTable, 61830 _fnDeleteIndex: _fnDeleteIndex, 61831 _fnInvalidate: _fnInvalidate, 61832 _fnGetRowElements: _fnGetRowElements, 61833 _fnCreateTr: _fnCreateTr, 61834 _fnBuildHead: _fnBuildHead, 61835 _fnDrawHead: _fnDrawHead, 61836 _fnDraw: _fnDraw, 61837 _fnReDraw: _fnReDraw, 61838 _fnAddOptionsHtml: _fnAddOptionsHtml, 61839 _fnDetectHeader: _fnDetectHeader, 61840 _fnGetUniqueThs: _fnGetUniqueThs, 61841 _fnFeatureHtmlFilter: _fnFeatureHtmlFilter, 61842 _fnFilterComplete: _fnFilterComplete, 61843 _fnFilterCustom: _fnFilterCustom, 61844 _fnFilterColumn: _fnFilterColumn, 61845 _fnFilter: _fnFilter, 61846 _fnFilterCreateSearch: _fnFilterCreateSearch, 61847 _fnEscapeRegex: _fnEscapeRegex, 61848 _fnFilterData: _fnFilterData, 61849 _fnFeatureHtmlInfo: _fnFeatureHtmlInfo, 61850 _fnUpdateInfo: _fnUpdateInfo, 61851 _fnInfoMacros: _fnInfoMacros, 61852 _fnInitialise: _fnInitialise, 61853 _fnInitComplete: _fnInitComplete, 61854 _fnLengthChange: _fnLengthChange, 61855 _fnFeatureHtmlLength: _fnFeatureHtmlLength, 61856 _fnFeatureHtmlPaginate: _fnFeatureHtmlPaginate, 61857 _fnPageChange: _fnPageChange, 61858 _fnFeatureHtmlProcessing: _fnFeatureHtmlProcessing, 61859 _fnProcessingDisplay: _fnProcessingDisplay, 61860 _fnFeatureHtmlTable: _fnFeatureHtmlTable, 61861 _fnScrollDraw: _fnScrollDraw, 61862 _fnApplyToChildren: _fnApplyToChildren, 61863 _fnCalculateColumnWidths: _fnCalculateColumnWidths, 61864 _fnThrottle: _fnThrottle, 61865 _fnConvertToWidth: _fnConvertToWidth, 61866 _fnGetWidestNode: _fnGetWidestNode, 61867 _fnGetMaxLenString: _fnGetMaxLenString, 61868 _fnStringToCss: _fnStringToCss, 61869 _fnSortFlatten: _fnSortFlatten, 61870 _fnSort: _fnSort, 61871 _fnSortAria: _fnSortAria, 61872 _fnSortListener: _fnSortListener, 61873 _fnSortAttachListener: _fnSortAttachListener, 61874 _fnSortingClasses: _fnSortingClasses, 61875 _fnSortData: _fnSortData, 61876 _fnSaveState: _fnSaveState, 61877 _fnLoadState: _fnLoadState, 61878 _fnSettingsFromNode: _fnSettingsFromNode, 61879 _fnLog: _fnLog, 61880 _fnMap: _fnMap, 61881 _fnBindAction: _fnBindAction, 61882 _fnCallbackReg: _fnCallbackReg, 61883 _fnCallbackFire: _fnCallbackFire, 61884 _fnLengthOverflow: _fnLengthOverflow, 61885 _fnRenderer: _fnRenderer, 61886 _fnDataSource: _fnDataSource, 61887 _fnRowAttributes: _fnRowAttributes, 61888 _fnCalculateEnd: function () {} // Used by a lot of plug-ins, but redundant 61889 // in 1.10, so this dead-end function is 61890 // added to prevent errors 61891 } ); 61892 61893 61894 // jQuery access 61895 $.fn.dataTable = DataTable; 61896 61897 // Provide access to the host jQuery object (circular reference) 61898 DataTable.$ = $; 61899 61900 // Legacy aliases 61901 $.fn.dataTableSettings = DataTable.settings; 61902 $.fn.dataTableExt = DataTable.ext; 61903 61904 // With a capital `D` we return a DataTables API instance rather than a 61905 // jQuery object 61906 $.fn.DataTable = function ( opts ) { 61907 return $(this).dataTable( opts ).api(); 61908 }; 61909 61910 // All properties that are available to $.fn.dataTable should also be 61911 // available on $.fn.DataTable 61912 $.each( DataTable, function ( prop, val ) { 61913 $.fn.DataTable[ prop ] = val; 61914 } ); 61915 61916 61917 // Information about events fired by DataTables - for documentation. 61918 /** 61919 * Draw event, fired whenever the table is redrawn on the page, at the same 61920 * point as fnDrawCallback. This may be useful for binding events or 61921 * performing calculations when the table is altered at all. 61922 * @name DataTable#draw.dt 61923 * @event 61924 * @param {event} e jQuery event object 61925 * @param {object} o DataTables settings object {@link DataTable.models.oSettings} 61926 */ 61927 61928 /** 61929 * Search event, fired when the searching applied to the table (using the 61930 * built-in global search, or column filters) is altered. 61931 * @name DataTable#search.dt 61932 * @event 61933 * @param {event} e jQuery event object 61934 * @param {object} o DataTables settings object {@link DataTable.models.oSettings} 61935 */ 61936 61937 /** 61938 * Page change event, fired when the paging of the table is altered. 61939 * @name DataTable#page.dt 61940 * @event 61941 * @param {event} e jQuery event object 61942 * @param {object} o DataTables settings object {@link DataTable.models.oSettings} 61943 */ 61944 61945 /** 61946 * Order event, fired when the ordering applied to the table is altered. 61947 * @name DataTable#order.dt 61948 * @event 61949 * @param {event} e jQuery event object 61950 * @param {object} o DataTables settings object {@link DataTable.models.oSettings} 61951 */ 61952 61953 /** 61954 * DataTables initialisation complete event, fired when the table is fully 61955 * drawn, including Ajax data loaded, if Ajax data is required. 61956 * @name DataTable#init.dt 61957 * @event 61958 * @param {event} e jQuery event object 61959 * @param {object} oSettings DataTables settings object 61960 * @param {object} json The JSON object request from the server - only 61961 * present if client-side Ajax sourced data is used</li></ol> 61962 */ 61963 61964 /** 61965 * State save event, fired when the table has changed state a new state save 61966 * is required. This event allows modification of the state saving object 61967 * prior to actually doing the save, including addition or other state 61968 * properties (for plug-ins) or modification of a DataTables core property. 61969 * @name DataTable#stateSaveParams.dt 61970 * @event 61971 * @param {event} e jQuery event object 61972 * @param {object} oSettings DataTables settings object 61973 * @param {object} json The state information to be saved 61974 */ 61975 61976 /** 61977 * State load event, fired when the table is loading state from the stored 61978 * data, but prior to the settings object being modified by the saved state 61979 * - allowing modification of the saved state is required or loading of 61980 * state for a plug-in. 61981 * @name DataTable#stateLoadParams.dt 61982 * @event 61983 * @param {event} e jQuery event object 61984 * @param {object} oSettings DataTables settings object 61985 * @param {object} json The saved state information 61986 */ 61987 61988 /** 61989 * State loaded event, fired when state has been loaded from stored data and 61990 * the settings object has been modified by the loaded data. 61991 * @name DataTable#stateLoaded.dt 61992 * @event 61993 * @param {event} e jQuery event object 61994 * @param {object} oSettings DataTables settings object 61995 * @param {object} json The saved state information 61996 */ 61997 61998 /** 61999 * Processing event, fired when DataTables is doing some kind of processing 62000 * (be it, order, searcg or anything else). It can be used to indicate to 62001 * the end user that there is something happening, or that something has 62002 * finished. 62003 * @name DataTable#processing.dt 62004 * @event 62005 * @param {event} e jQuery event object 62006 * @param {object} oSettings DataTables settings object 62007 * @param {boolean} bShow Flag for if DataTables is doing processing or not 62008 */ 62009 62010 /** 62011 * Ajax (XHR) event, fired whenever an Ajax request is completed from a 62012 * request to made to the server for new data. This event is called before 62013 * DataTables processed the returned data, so it can also be used to pre- 62014 * process the data returned from th
62014e server, if needed. 62015 * 62016 * Note that this trigger is called in `fnServerData`, if you override 62017 * `fnServerData` and which to use this event, you need to trigger it in you 62018 * success function. 62019 * @name DataTable#xhr.dt 62020 * @event 62021 * @param {event} e jQuery event object 62022 * @param {object} o DataTables settings object {@link DataTable.models.oSettings} 62023 * @param {object} json JSON returned from the server 62024 * 62025 * @example 62026 * // Use a custom property returned from the server in another DOM element 62027 * $('#table').dataTable().on('xhr.dt', function (e, settings, json) { 62028 * $('#status').html( json.status ); 62029 * } ); 62030 * 62031 * @example 62032 * // Pre-process the data returned from the server 62033 * $('#table').dataTable().on('xhr.dt', function (e, settings, json) { 62034 * for ( var i=0, ien=json.aaData.length ; i<ien ; i++ ) { 62035 * json.aaData[i].sum = json.aaData[i].one + json.aaData[i].two; 62036 * } 62037 * // Note no return - manipulate the data directly in the JSON object. 62038 * } ); 62039 */ 62040 62041 /** 62042 * Destroy event, fired when the DataTable is destroyed by calling fnDestroy 62043 * or passing the bDestroy:true parameter in the initialisation object. This 62044 * can be used to remove bound events, added DOM nodes, etc. 62045 * @name DataTable#destroy.dt 62046 * @event 62047 * @param {event} e jQuery event object 62048 * @param {object} o DataTables settings object {@link DataTable.models.oSettings} 62049 */ 62050 62051 /** 62052 * Page length change event, fired when number of records to show on each 62053 * page (the length) is changed. 62054 * @name DataTable#length.dt 62055 * @event 62056 * @param {event} e jQuery event object 62057 * @param {object} o DataTables settings object {@link DataTable.models.oSettings} 62058 * @param {integer} len New length 62059 */ 62060 62061 /** 62062 * Column sizing has changed. 62063 * @name DataTable#column-sizing.dt 62064 * @event 62065 * @param {event} e jQuery event object 62066 * @param {object} o DataTables settings object {@link DataTable.models.oSettings} 62067 */ 62068 62069 /** 62070 * Column visibility has changed. 62071 * @name DataTable#column-visibility.dt 62072 * @event 62073 * @param {event} e jQuery event object 62074 * @param {object} o DataTables settings object {@link DataTable.models.oSettings} 62075 * @param {int} column Column index 62076 * @param {bool} vis `false` if column now hidden, or `true` if visible 62077 */ 62078 62079 return $.fn.dataTable; 62080})); 62081 62082 62083/*! DataTables jQuery UI integration 62084 * ©2011-2014 SpryMedia Ltd - datatables.net/license 62085 */ 62086 62087/** 62088 * DataTables integration for jQuery UI. This requires jQuery UI and 62089 * DataTables 1.10 or newer. 62090 * 62091 * This file sets the defaults and adds options to DataTables to style its 62092 * controls using jQuery UI. See http://datatables.net/manual/styling/jqueryui 62093 * for further information. 62094 */ 62095(function( factory ){ 62096 if ( typeof define === 'function' && define.amd ) { 62097 // AMD 62098 define( ['jquery', 'datatables.net'], function ( $ ) { 62099 return factory( $, window, document ); 62100 } ); 62101 } 62102 else if ( typeof exports === 'object' ) { 62103 // CommonJS 62104 module.exports = function (root, $) { 62105 if ( ! root ) { 62106 root = window; 62107 } 62108 62109 if ( ! $ || ! $.fn.dataTable ) { 62110 $ = require('datatables.net')(root, $).$; 62111 } 62112 62113 return factory( $, root, root.document ); 62114 }; 62115 } 62116 else { 62117 // Browser 62118 factory( jQuery, window, document ); 62119 } 62120}(function( $, window, document, undefined ) { 62121'use strict'; 62122var DataTable = $.fn.dataTable; 62123 62124 62125var sort_prefix = 'css_right ui-icon ui-icon-'; 62126var toolbar_prefix = 'fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix ui-corner-'; 62127 62128/* Set the defaults for DataTables initialisation */ 62129$.extend( true, DataTable.defaults, { 62130 dom: 62131 '<"'+toolbar_prefix+'tl ui-corner-tr"lfr>'+ 62132 't'+ 62133 '<"'+toolbar_prefix+'bl ui-corner-br"ip>', 62134 renderer: 'jqueryui' 62135} ); 62136 62137 62138$.extend( DataTable.ext.classes, { 62139 "sWrapper": "dataTables_wrapper dt-jqueryui", 62140 62141 /* Full numbers paging buttons */ 62142 "sPageButton": "fg-button ui-button ui-state-default", 62143 "sPageButtonActive": "ui-state-disabled", 62144 "sPageButtonDisabled": "ui-state-disabled", 62145 62146 /* Features */ 62147 "sPaging": "dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi "+ 62148 "ui-buttonset-multi paging_", /* Note that the type is postfixed */ 62149 62150 /* Sorting */ 62151 "sSortAsc": "ui-state-default sorting_asc", 62152 "sSortDesc": "ui-state-default sorting_desc", 62153 "sSortable": "ui-state-default sorting", 62154 "sSortableAsc": "ui-state-default sorting_asc_disabled", 62155 "sSortableDesc": "ui-state-default sorting_desc_disabled", 62156 "sSortableNone": "ui-state-default sorting_disabled", 62157 "sSortIcon": "DataTables_sort_icon", 62158 62159 /* Scrolling */ 62160 "sScrollHead": "dataTables_scrollHead "+"ui-state-default", 62161 "sScrollFoot": "dataTables_scrollFoot "+"ui-state-default", 62162 62163 /* Misc */ 62164 "sHeaderTH": "ui-state-default", 62165 "sFooterTH": "ui-state-default" 62166} ); 62167 62168 62169DataTable.ext.renderer.header.jqueryui = function ( settings, cell, column, classes ) { 62170 // Calculate what the unsorted class should be 62171 var noSortAppliedClass = sort_prefix+'carat-2-n-s'; 62172 var asc = $.inArray('asc', column.asSorting) !== -1; 62173 var desc = $.inArray('desc', column.asSorting) !== -1; 62174 62175 if ( !column.bSortable || (!asc && !desc) ) { 62176 noSortAppliedClass = ''; 62177 } 62178 else if ( asc && !desc ) { 62179 noSortAppliedClass = sort_prefix+'carat-1-n'; 62180 } 62181 else if ( !asc && desc ) { 62182 noSortAppliedClass = sort_prefix+'carat-1-s'; 62183 } 62184 62185 // Setup the DOM structure 62186 $('<div/>') 62187 .addClass( 'DataTables_sort_wrapper' ) 62188 .append( cell.contents() ) 62189 .append( $('<span/>') 62190 .addClass( classes.sSortIcon+' '+noSortAppliedClass ) 62191 ) 62192 .appendTo( cell ); 62193 62194 // Attach a sort listener to update on sort 62195 $(settings.nTable).on( 'order.dt', function ( e, ctx, sorting, columns ) { 62196 if ( settings !== ctx ) { 62197 return; 62198 } 62199 62200 var colIdx = column.idx; 62201 62202 cell 62203 .removeClass( classes.sSortAsc +" "+classes.sSortDesc ) 62204 .addClass( columns[ colIdx ] == 'asc' ? 62205 classes.sSortAsc : columns[ colIdx ] == 'desc' ? 62206 classes.sSortDesc : 62207 column.sSortingClass 62208 ); 62209 62210 cell 62211 .find( 'span.'+classes.sSortIcon ) 62212 .removeClass( 62213 sort_prefix+'triangle-1-n' +" "+ 62214 sort_prefix+'triangle-1-s' +" "+ 62215 sort_prefix+'carat-2-n-s' +" "+ 62216 sort_prefix+'carat-1-n' +" "+ 62217 sort_prefix+'carat-1-s' 62218 ) 62219 .addClass( columns[ colIdx ] == 'asc' ? 62220 sort_prefix+'triangle-1-n' : columns[ colIdx ] == 'desc' ? 62221 sort_prefix+'triangle-1-s' : 62222 noSortAppliedClass 62223 ); 62224 } ); 62225}; 62226 62227 62228/* 62229 * TableTools jQuery UI compatibility 62230 * Required TableTools 2.1+ 62231 */ 62232if ( DataTable.TableTools ) { 62233 $.extend( true, DataTable.TableTools.classes, { 62234 "container": "DTTT_container ui-buttonset ui-buttonset-multi", 62235 "buttons": { 62236 "normal": "DTTT_button ui-button ui-state-default" 62237 }, 62238 "collection": { 62239 "container": "DTTT_collection ui-buttonset ui-buttonset-multi" 62240 } 62241 } ); 62242} 62243 62244 62245return DataTable; 62246})); 62247 62248 62249/** 62250 * This plug-in for DataTables represents the ultimate option in extensibility 62251 * for sorting date / time strings correctly. It uses 62252 * [Moment.js](http://momentjs.com) to create automatic type detection and 62253 * sorting plug-ins for DataTables based on a given format. This way, DataTables 62254 * will automatically detect your temporal information and sort it c
62254orrectly. 62255 * 62256 * For usage instructions, please see the DataTables blog 62257 * post that [introduces it](//datatables.net/blog/2014-12-18). 62258 * 62259 * @name Ultimate Date / Time sorting 62260 * @summary Sort date and time in any format using Moment.js 62261 * @author [Allan Jardine](//datatables.net) 62262 * @depends DataTables 1.10+, Moment.js 1.7+ 62263 * 62264 * @example 62265 * $.fn.dataTable.moment( 'HH:mm MMM D, YY' ); 62266 * $.fn.dataTable.moment( 'dddd, MMMM Do, YYYY' ); 62267 * 62268 * $('#example').DataTable(); 62269 */ 62270 62271(function (factory) { 62272 if (typeof define === "function" && define.amd) { 62273 define(["jquery", "moment", "datatables.net"], factory); 62274 } else { 62275 factory(jQuery, moment); 62276 } 62277}(function ($, moment) { 62278 62279$.fn.dataTable.moment = function ( format, locale ) { 62280 var types = $.fn.dataTable.ext.type; 62281 62282 // Add type detection 62283 types.detect.unshift( function ( d ) { 62284 if ( d ) { 62285 // Strip HTML tags and newline characters if possible 62286 if ( d.replace ) { 62287 d = d.replace(/(<.*?>)|(\r?\n|\r)/g, ''); 62288 } 62289 62290 // Strip out surrounding white space 62291 d = $.trim( d ); 62292 } 62293 62294 // Null and empty values are acceptable 62295 if ( d === '' || d === null ) { 62296 return 'moment-'+format; 62297 } 62298 62299 return moment( d, format, locale, true ).isValid() ? 62300 'moment-'+format : 62301 null; 62302 } ); 62303 62304 // Add sorting method - use an integer for the sorting 62305 types.order[ 'moment-'+format+'-pre' ] = function ( d ) { 62306 if ( d ) { 62307 // Strip HTML tags and newline characters if possible 62308 if ( d.replace ) { 62309 d = d.replace(/(<.*?>)|(\r?\n|\r)/g, ''); 62310 } 62311 62312 // Strip out surrounding white space 62313 d = $.trim( d ); 62314 } 62315 62316 return d === '' || d === null ? 62317 -Infinity : 62318 parseInt( moment( d, format, locale, true ).format( 'x' ), 10 ); 62319 }; 62320}; 62321 62322})); 62323 62324(function( $ ) { 62325 Samui.prototype.form = { 62326 run: function(e, callback) { 62327 e.find(".scms-tab").tabs({ 62328 activate: function(event, ui) { 62329 if ($('.calendar').length > 0) { 62330 $('.calendar').fullCalendar('render'); 62331 } 62332 $.cookie("tabs_selected", $(".scms-tab").tabs("option", "active")); 62333 }, 62334 active: $(".scms-tab").tabs({ 62335 active: $.cookie("tabs_selected") 62336 }) 62337 }); 62338 var icons = { 62339 header: "ui-icon-circle-arrow-e", 62340 activeHeader: "ui-icon-circle-arrow-s" 62341 }; 62342 e.find(".cms-accordion").accordion({ 62343 create: function(event, ui) { 62344 $(this).accordion("option", "header", $(this).data("header") === undefined ? "h3" : $(this).data("header")); 62345 $(this).accordion("option", "active", (G.getUrlParameterByName('accordion')) ? (G.getUrlParameterByName('accordion') - 1) : ($(this).data("active") !== undefined ? ($(this).data("active") === "false" ? false : $(this).data("active")) : 0)); 62346 $(this).show(); 62347 var header = $(this).accordion("option", "header"); 62348 var active = $(this).accordion("option", "active"); 62349 if (header && active) { 62350 setTimeout(function() { 62351 $('html, body').animate({ 62352 scrollTop: $(".cms-accordion > " + header).eq(active).offset().top - 50 62353 }, 2000); 62354 }, 1000); 62355 } 62356 }, 62357 heightStyle: "content", 62358 icons: icons, 62359 collapsible: true, 62360 activate: function(e, ui) { 62361 ui.newPanel.find('iframe').each(function() { 62362 var $iframe = $(this); 62363 if ($iframe.data('loaded') != true) { 62364 $iframe.get(0).src = $iframe.attr('src'); 62365 $iframe.data('loaded', true); 62366 } 62367 }); 62368 } 62369 }); 62370 if (e.find(".datepicker").length) { 62371 var minDate = false, 62372 myminDate = false; 62373 e.find(".datepicker").each(function(i, e) { 62374 var $this = $(e); 62375 if ($this.attr('class').indexOf('datepicker-mindate-') >= 0) { 62376 var split = $this.attr('class').split(' '); 62377 $.each(split, function(ind, el) { 62378 if (el.indexOf('datepicker-mindate-') >= 0) { 62379 minDate = el.replace('datepicker-mindate-', ''); 62380 } 62381 }); 62382 } 62383 if ($this.attr('class').indexOf('datepicker-mymindate-') >= 0) { 62384 var split = $this.attr('class').split(' '); 62385 $.each(split, function(ind, el) { 62386 if (el.indexOf('datepicker-mymindate-') >= 0) { 62387 myminDate = el.replace('datepicker-mymindate-', ''); 62388 } 62389 }); 62390 } 62391 if ($this.is(".datepicker-datetime")) { 62392 if (minDate) { 62393 $this.datetimepicker({ 62394 "dateFormat": "dd/mm/yy", 62395 "onSelect": function(date) { 62396 date = date.split('/'); 62397 var selectedDate = new Date(date[2].substring(0, 4), date[1] - 1, date[0]); 62398 $("." + minDate).datetimepicker("option", "minDate", selectedDate); 62399 } 62400 }); 62401 } else { 62402 $this.datetimepicker({ 62403 "dateFormat": "dd/mm/yy" 62404 }); 62405 } 62406 } else { 62407 $this.datepicker({ 62408 "dateFormat": "dd/mm/yy" 62409 }); 62410 if (minDate) { 62411 $this.datepicker("option", "onSelect", function(date) { 62412 date = date.split('/'); 62413 var selectedDate = new Date(date[2], date[1] - 1, date[0]); 62414 $("." + minDate).datepicker("option", "minDate", selectedDate); 62415 }); 62416 } 62417 } 62418 }); 62419 if (myminDate && minDate) { 62420 $("." + minDate).datetimepicker("option", "minDate", new Date(parseInt(myminDate))); 62421 } 62422 } 62423 if (e.find(".ui-toast").length) { 62424 e.find(".ui-toast").each(function(i,e) { 62425 var $this = $(e); 62426 if (!$this.hasClass('toast-stay')) { 62427 setTimeout(function() { 62428 $this.slideUp(900); 62429 }, 5000); 62430 } 62431 else { 62432 $this.find('.toast-close').on('click', function() { 62433 $this.slideUp(900); 62434 }); 62435 } 62436 }); 62437 } 62438 $('.recaptcha_cms').each(function(i, e) { 62439 if ($(e).parent().is(":visible")) { 62440 if (typeof Recaptcha == "object") { 62441 Recaptcha.create(SiteConfig.recaptcha, e, { 62442 theme: "red", 62443 callback: Recaptcha.focus_response_field 62444 }); 62445 } 62446 } 62447 }); 62448 S.bootTextEditor = function() { 62449 if (tinymce !== undefined) { 62450 //tinymce.remove(); 62451 } 62452 if (e.find(".richedit").length) { 62453 var t = e.find(".richedit"); 62454 if (tinymce.getByJQ === undefined) { 62455 tinymce.getByJQ = function(element) { 62456 var inst;
62457 for (inst in tinymce.editors) { 62458 if (element.is(tinymce.editors[inst].getElement())) { 62459 return tinymce.editors[inst].getContent(); 62460 } 62461 } 62462 return false; 62463 }; 62464 } 62465 t.each(function(i, e) { 62466 var $this = $(e), 62467 id = $this.attr('id'); 62468 if (id === undefined) { 62469 id = "richedit-editor" + Math.floor((Math.random() * 10000) + 1); 62470 $this.attr("id", id); 62471 } 62472 var settings = { 62473 selector: "textarea#" + id, 62474 theme: "silver", 62475 extended_valid_elements: "samui[widget|class|title|config]", 62476 plugins: "advlist, anchor, autolink, lists, link, image, imagetools, charmap, print, preview, hr, searchreplace, wordcount, visualblocks, visualchars, code, fullscreen, insertdatetime, media, nonbreaking, save, table, directionality, template, paste, noneditable, -samui_emailmask_menu", 62477 external_plugins: { 62478 "moxiemanager": SiteConfig.basepath + 'js/tinymce-plugins/moxiemanager/plugin.min.js', 62479 "widgets": SiteConfig.basepath + 'js/tinymce-plugins/widgets/plugin.min.js?v1.0', 62480 "samui_emailmask_menu": SiteConfig.basepath + 'js/tinymce-plugins/email-mask/plugin.min.js' 62481 }, 62482 toolbar: "undo redo | styleselect | bold italic underline | alignleft aligncenter alignright al
62482ignjustify | bullist numlist outdent indent | link image media | preview", 62483 menu : { // this is the complete default configuration 62484 file : {title : 'File' , items : 'print'}, 62485 edit : {title : 'Edit' , items : 'undo redo | cut copy paste pastetext | selectall | searchreplace'}, 62486 insert : {title : 'Insert', items : 'media image link | hr anchor insertdatetime nonbreaking template'}, 62487 view : {title : 'View' , items : 'visualchars visualblocks visualaid | preview fullscreen'}, 62488 format : {title : 'Format', items : 'bold italic underline strikethrough superscript subscript | formats | removeformat'}, 62489 table : {title : 'Table' , items : 'inserttable tableprops deletetable | cell row column'}, 62490 tools : {title : 'Tools' , items : 'spellchecker code'}, 62491 samui_plugin_dd: {title : "Plugins" , items : ''} 62492 }, 62493 menubar: 'file edit insert view format table tools samui_plugin_dd', 62494 relative_urls: false, 62495 remove_script_host: false, 62496 document_base_url: SiteConfig.basepath, 62497 content_css: "https://cdn.jsdelivr.net/npm/[email protected]/dist/css/foundation.min.css, "+SiteConfig.basepath + "css/editor.css", 62498 width: "100%", 62499 height: 500, 62500 style_formats: [{ 62501 title: 'Headers', 62502 items: [{ 62503 title: 'Header 2', 62504 block: 'h2' 62505 }, { 62506 title: 'Header 3', 62507 block: 'h3' 62508 }, { 62509 title: 'Header 4', 62510 block: 'h4' 62511 }, { 62512 title: 'Header 5', 62513 block: 'h5' 62514 }] 62515 }, { 62516 title: 'Inlines', 62517 items: [{ 62518 title: 'Bold', 62519 block: 'b' 62520 }, { 62521 title: 'Italic', 62522 block: 'em' 62523 }, { 62524 title: 'Underline', 62525 inline: 'span', 62526 styles: { 62527 'text-decoration': 'underline' 62528 } 62529 }, { 62530 title: 'Strikethrough', 62531 inline: 'span', 62532 styles: { 62533 'text-decoration': 'line-through' 62534 } 62535 }, { 62536 title: 'Superscript', 62537 block: 'sup' 62538 }, { 62539 title: 'Subscript', 62540 block: 'sub' 62541 }] 62542 }, { 62543 title: 'Blocks', 62544 items: [{ 62545 title: 'Paragraph', 62546 block: 'p' 62547 }, { 62548 title: 'Blockquote', 62549 block: 'blockquote' 62550 }, { 62551 title: 'Div', 62552 block: 'div' 62553 }, { 62554 title: 'Clear', 62555 block: 'div', 62556 classes: 'clear' 62557 }, { 62558 title: 'Pre', 62559 block: 'pre' 62560 }, { 62561 title: 'Small', 62562 block: 'small' 62563 }] 62564 }, { 62565 title: 'Visibilty Styles', 62566 items: [{ 62567 title: 'Mobile Only', 62568 selector: '*', 62569 classes: 'mobile' 62570 }, { 62571 title: 'Mobile Up', 62572 selector: '*', 62573 classes: 'mobile-up' 62574 }, { 62575 title: 'Tablet Only', 62576 selector: '*', 62577 classes: 'tablet' 62578 }, { 62579 title: 'Tablet Up', 62580 selector: '*', 62581 classes: 'tablet-up' 62582 }, { 62583 title: 'Desktop', 62584 selector: '*', 62585 classes: 'desktop' 62586 }] 62587 }, { 62588 title: 'Bespoke Styles', 62589 items: [{ 62590 title: 'Image Left', 62591 selector: 'img', 62592 classes: 'picture-left' 62593 }, { 62594 title: 'Image Right', 62595 selector: 'img', 62596 classes: 'picture-right' 62597 }, { 62598 title: 'Image Left (No Border)', 62599 selector: 'img', 62600 classes: 'picture-left-noborder' 62601 }, { 62602 title: 'Image Right (No Border)', 62603 selector: 'img', 62604 classes: 'picture-right-noborder' 62605 }] 62606 }], 62607 image_advtab: true, 62608 body_class: '', 62609 setup: function(ed) { 62610 ed.on('change', function(ed) { 62611 $("#" + id).val(ed.level.content).trigger("change"); 62612 }); 62613 }, 62614 paste_as_text: true, 62615 keep_styles: false, 62616 templates: [ 62617 {title: 'News Break', description: 'Add a news break to an article', content: '<div class="news-break mceNonEditable">{{News Break}}</div>'}, 62618 {title: 'Grey Section', description: 'Add a grey area to the page content', content: '<section class="lightgrey grid-margin-x"><p> </p></section>'} 62619 ], 62620 entity_encoding: "named", 62621 browser_spellcheck: true 62622 }; 62623 if ($this.attr('class').indexOf('richedit-class') >= 0) { 62624 var split = $this.attr('class').split(' '); 62625 $.each(split, function(ind, el) { 62626 if (el.indexOf('richedit-class') >= 0) { 62627 settings.body_class = el; 62628 } 62629 }); 62630 } 62631 if ($this.hasClass('richedit-simple')) { 62632 settings.extended_valid_elements = ''; 62633 settings.height = 300; 62634 settings.menubar = false;
62635 if (settings.plugins.indexOf("print")) { 62636 settings.plugins = settings.plugins.replace("print", "").replace(/, , /g, ", "); 62637 } 62638 if (settings.external_plugins.widgets !== undefined) { 62639 delete settings.external_plugins.widgets; 62640 } 62641 } 62642 if ($this.hasClass("richedit-nomedia")) { 62643 if (settings.plugins.indexOf("media") > 0 || settings.plugins.indexOf("image") > 0) { 62644 settings.plugins = settings.plugins.replace("media", "").replace("image", "").replace(/, , /g, ", "); 62645 } 62646 if (settings.external_plugins.moxiemanager !== undefined) { 62647 delete settings.external_plugins.moxiemanager; 62648 } 62649 } 62650 if ($this.hasClass("richedit-nowidgets")) { 62651 if (settings.external_plugins.widgets !== undefined) { 62652 delete settings.external_plugins.widgets; 62653 } 62654 } 62655 if ($this.hasClass("richedit-inline")) { 62656 settings = { 62657 selector: "div#" + id, 62658 inline: true, 62659 menubar: false, 62660 plugins: "autolink, lists, link, autolink", 62661 toolbar: "undo redo | bold italic underline strikethrough | link", 62662 setup: function(ed) { 62663 ed.on('change', function(ed) { 62664 $("#" + id).val(ed.level.content).trigger("change"); 62665 }); 62666 } 62667 } 62668 } 62669 if ($this.hasClass("richedit-class-email-back-formbuilder")) { 62670 settings.templates = [{ 62671 title: 'First name', 62672 description: 'Adding the first name', 62673 content: '{{template-First-Name}}' 62674 }, { 62675 title: 'Last name', 62676 description: 'Adding the first name', 62677 content: '{{template-Last-Name}}' 62678 }, { 62679 title: 'Title', 62680 description: 'Adding the title', 62681 content: '{{template-Title}}' 62682 }, { 62683 title: 'Company', 62684 description: 'Adding the company', 62685 content: '{{template-Company}}' 62686 }, { 62687 title: 'Position', 62688 description: 'Adding the position', 62689 content: '{{template-Position}}' 62690 }, { 62691 title: 'Birth date', 62692 description: 'Adding the birth date', 62693 content: '{{template-Birthdate}}' 62694 }, { 62695 title: 'Phone', 62696 description: 'Adding the phone number', 62697 content: '{{template-Phone}}' 62698 }, { 62699 title: 'Mobile', 62700 description: 'Adding the mobile number', 62701 content: '{{template-Mobile}}' 62702 }, { 62703 title: 'Fax', 62704 description: 'Adding the fax', 62705 content: '{{template-Fax}}' 62706 }, { 62707 title: 'Email', 62708 description: 'Adding the email', 62709 content: '{{template-Email}}' 62710 }, { 62711 title: 'Website', 62712 description: 'Adding the website', 62713 content: '{{template-Website}}' 62714 }, { 62715 title: 'Street', 62716 description: 'Adding the first street', 62717 content: '{{template-Street}}' 62718 }, { 62719 title: 'City', 62720 description: 'Adding the city', 62721 content: '{{template-City}}' 62722 }, { 62723 title: 'State', 62724 description: 'Adding the state', 62725 content: '{{template-State}}' 62726 }, { 62727 title: 'Postal code', 62728 description: 'Adding the postal code', 62729 content: '{{template-Postal-Code}}' 62730 }, { 62731 title: 'Country', 62732 description: 'Adding the country', 62733 content: '{{template-Country}}' 62734 }, { 62735 title: 'Description', 62736 description: 'Adding the description', 62737 content: '{{template-Description}}' 62738 }, { 62739 title: 'Form fields', 62740 description: 'Adding the form fields', 62741 content: '{{form_fields}}' 62742 }, { 62743 title: 'Form name', 62744 description: 'Adding the form name', 62745 content: '{{form_name}}' 62746 }], settings.height = 100; 62747 } 62748 window.tinymce.dom.Event.domLoaded = true; 62749 tinymce.init(settings); 62750 if ( $('.ui-dialog').length ) { 62751 $('.tox-tinymce-aux').appendTo($('.ui-dialog')); 62752 } 62753 }); 62754 } 62755 } 62756 if (e.find(".richedit").length) { 62757 S.bootTextEditor(); 62758 } 62759 if (e.find(".cms-mediainput")) { 62760 e.find(".cms-mediainput").each(function() { 62761 var $inputContainer = $("<ul></ul>").prependTo($(this)); 62762 $(this).find("input[type='file']").attr("data-ext", $(this).attr("data-ext")); 62763 $(this).find("input[type='file']").each(function() { 62764 $(this).detach().appendTo($("<li></li>").appendTo($inputContainer)); 62765 }); 62766 if ($(this).attr("data-multiple")) { 62767 $inputContainer.find("input[type='file']").each(function() { 62768 $(this).attr("name", $(this).attr("name") + "[]"); 62769 }); 62770 $inputContainer.find("li").append($("<a href='#' class='rmbtn'>(Remove)</a>").click(function() { 62771 if ($inputContainer.find("li").length > 1) { 62772 $(this).parent().remove(); 62773 } 62774 return false;
62775 })); 62776 var liTag = $inputContainer.find("li").eq(0).clone(); 62777 var btn = $("<button>Add a file...</button>").button().click(function() { 62778 var nc = liTag.clone(); 62779 nc.find(".rmbtn").click(function() { 62780 if ($inputContainer.find("li").length > 1) { 62781 $(this).parent().remove(); 62782 } 62783 return false; 62784 }); 62785 $inputContainer.append(nc); 62786 S.form.run($inputContainer.find("li:last")); 62787 return false; 62788 }).appendTo($(this)); 62789 } 62790 }); 62791 } 62792 if (e.find("input[type='file']").length) { 62793 e.find("input[type='file']").each(function() { 62794 $(this).css("display", "none"); 62795 var cE = $(this); 62796 var phantom = $("<span class='select-a-file'><em>Select a file...</em> <button type='button'>Select file</button></div>"); 62797 phantom.insertAfter($(this)); 62798 phantom.find("button").button().click(function() { 62799 cE.click(); 62800 return false; 62801 }); 62802 var fctChange = function() { 62803 var st = $(this).val(); 62804 var stPos = false; 62805 if ((stPos = st.lastIndexOf("\\")) !== -1) { 62806 st = st.substr(stPos + 1); 62807 } 62808 if ((stPos = st.lastIndexOf("/")) !== -1) { 62809 st = st.substr(stPos + 1); 62810 } 62811 if (cE.attr("data-ext") && st != "") { 62812 var validExt = cE.attr("data-ext").split(","); 62813 var fileExt = st.substr(st.lastIndexOf(".") + 1); 62814 var validExtCheck = false; 62815 for (var i = 0; i < validExt.length; i++) { 62816 if (validExt[i].toLowerCase() === fileExt.toLowerCase()) validExtCheck = true; 62817 } 62818 if (validExtCheck === false) { 62819 $("<div>Please select an appropriate file.<br/><br/><b>Valid extensions:</b> " + validExt.join(", ") + "</div>").dialog({ 62820 modal: true, 62821 title: "An error has occurred" 62822 }); 62823 cE.val(""); 62824 phantom.find("em").text("Select a file..."); 62825 return false; 62826 } 62827 } 62828 phantom.find("em").text(st + ' '); 62829 }; 62830 cE.on('change', function() { 62831 setTimeout(function() { 62832 fctChange.apply(cE, null); 62833 }, 0); 62834 }); 62835 }); 62836 } 62837 if (e.find(".cms-choice").length) { 62838 e.find(".cms-choice").each(function() { 62839 var ac = $(this).css("display", "none"); 62840 var aconfig = {}; 62841 var tS = []; 62842 var acL = ac.val().split(";"); 62843 for (var i = 0; i < acL.length; i++) { 62844 tS = acL[i].split(":"); 62845 if (tS.length == 1) aconfig['layout'] = tS[0]; 62846 else { 62847 aconfig[tS[0]] = tS[1]; 62848 } 62849 } 62850 ac.parent().parent().children("td").attr("colspan", ac.parent().parent().children("td").length).eq(0).css("display", "none"); 62851 $.ajax({ 62852 url: ((ac.attr("data-url").indexOf('http') == 0 || ac.attr("data-url").indexOf('/') == 0) ? ac.attr("data-url") : SiteConfig.basepath + "API/" + ac.attr("data-url")), 62853 dataType: "json", 62854 success: function(r) { 62855 if (r.length) { 62856 var layoutSelector = $("<ul></ul>").addClass("cms-choice-selector").insertAfter(ac); 62857 var cms_choice_pChanges = function() { 62858 var acS = []; 62859 acS.push(ac.attr("data-selected")); 62860 if (layoutSelector.find("table > tbody")) { 62861 layoutSelector.find("table > tbody > tr > td > input").each(function() { 62862 if ($(this).attr("name")) { 62863 var cV = ""; 62864 if ($(this).attr("type") == "text") { 62865 cV = $(this).val(); 62866 } 62867 if ($(this).attr("type") == "checkbox") { 62868 cV = ($(this).is(":checked")) ? $(this).val() : false; 62869 } 62870 acS.push($(this).attr("name") + ":" + cV); 62871 } 62872 }); 62873 } 62874 ac.val(acS.join(";")); 62875 }; 62876 for (var i = 0; i < r.length; i++) { 62877 if (r[i].layout_config !== undefined) { 62878 var ksConfig = $("<table>").append($("<tbody>")); 62879 jQuery.each(r[i].layout_config, function(key, val) { 62880 var kt1 = $("<tr>").append($("<td>").text(val.label)); 62881 switch (val.type) { 62882 case "int": 62883 var ktL = $("<input type='text' name='config_" + key + "'/>").blur(cms_choice_pChanges).css("width", 75); 62884 if (aconfig["config_" + key] !== undefined) ktL.val(aconfig["config_" + key]);
62885 kt1.append($("<td>").append(ktL)); 62886 break; 62887 } 62888 kt1.appendTo(ksConfig.find("tbody")); 62889 }); 62890 }(function(kst) { 62891 var iS = $("<li></li>").append( 62892 $("<div>").css({ 62893 "float": "left", 62894 "margin": 10 62895 }).append($("<img/>").attr("src", SiteConfig.basepath + r[i].layout_icon))).append($("<p>").html(r[i].layout_desc)).append(ksConfig).appendTo(layoutSelector).click(function() { 62896 ac.attr("data-selected", r[kst].layout_id); 62897 cms_choice_pChanges(); 62898 }); 62899 })(i); 62900 } 62901 } 62902 } 62903 }); 62904 }); 62905 } 62906 if (e.find(".cms-autocomplete").length) { 62907 e.find(".cms-autocomplete").each(function() { 62908 var ac = $(this); 62909 if (!ac.hasClass('no-tags')) { 62910 var fDone = function(r) { 62911 var newItems = [], 62912 newSpecial = []; 62913 if (r.length) { 62914 for (var i = 0; i < r.length; i++) { 62915 if (r[i].label !== undefined && r[i].value !== undefined) { 62916 newItems.push(r[i]); 62917 if (parseInt(r[i]['mark'])) newSpecial.push(r[i]); 62918 } 62919 } 62920 } 62921 var acName = ac.attr("name"); 62922 ac.attr("name", ""); 62923 var acValue = ac.val().split(","); 62924 ac.val(""); 62925 var acTags = $("<div class='cms-autocomplete-tags'></div>").insertBefore(ac); 62926 var fc = function(ev, ui) { 62927 if (ui.item.value !== undefined) { 62928 var multiple = "[]"; 62929 if (ac.attr("data-multiple") === "false") { 62930 acTags.children("span").remove(); 62931 multiple = ""; 62932 } 62933 var newButton = $("<span><input type='hidden' name='" + acName + multiple + "' value='" + ui.item.value + "'/>" + ui.item.label + "</span>").on('click', function() { 62934 $(this).remove(); 62935 }).append($("<span></span>").addClass("ui-icon ui-icon-circle-close ui-icon-notice").css("display", "inline-block").on('click', function() { 62936 $(this).parent().remove(); 62937 }).hide()).hover(function() { 62938 $(this).find("span.ui-icon-notice").show().css("display", "inline-block"); 62939 }, function() { 62940 $(this).find("span.ui-icon-notice").hide(); 62941 }).button(); 62942 newButton.appendTo(acTags); 62943 } 62944 ac.val(""); 62945 return false; 62946 }; 62947 ac.data("addTag", function(tagID, tagLabel) { 62948 fc({}, { 62949 item: { 62950 label: tagLabel, 62951 value: tagID 62952 } 62953 }); 62954 }); 62955 ac.data("removeTag", function(tagID) { 62956 acTags.children("span").each(function() { 62957 if ($(this).find("input[type='hidden']").val() == tagID) $(this).remove(); 62958 }); 62959 }); 62960 for (var i = 0; i < acValue.length; i++) { 62961 if (acValue[i].length > 0) { 62962 if (acValue[i].indexOf(":") >= 0) { 62963 var acV1 = acValue[i].split("::"); 62964 var acV1Value = acV1.shift(); 62965 var acV1Label = acV1.join("::"); 62966 fc(false, { 62967 "item": { 62968 "label": acV1Label, 62969 "value": acV1Value 62970 } 62971 }); 62972 } else { 62973 fc(false, { 62974 "item": { 62975 "label": acValue[i], 62976 "value": acValue[i] 62977 } 62978 }); 62979 } 62980 } 62981 } 62982 ac.autocomplete({ 62983 position: { 62984 my: "left bottom", 62985 at: "left top", 62986 collision: "none" 62987 }, 62988 select: fc, 62989 source: function(t1, t2) { 62990 var myObj = []; 62991 var sTerm = t1.term.toLowerCase(); 62992 for (var i = 0; i < newItems.length; i++) { 62993 if (newItems[i].label.toLowerCase().indexOf(sTerm) >= 0) { 62994 myObj.push(newItems[i]); 62995 } 62996 } 62997 myObj.sort(function(a, b) { 62998 var obj = [a.label, b.label]; 62999 obj.sort(); 63000 if (obj[0] == a.label) return -1; 63001 }); 63002 t2(myObj); 63003 } 63004 }); 63005 if (ac.data("ui-autocomplete") !== undefined) { 63006 ac.data("ui-autocomplete")._renderItem = function(ul, item) { 63007 var icn = $("<span>").addClass("ui-icon").css({ 63008 "display": "inline-block", 63009 "position": "relative", 63010 "float": "left" 63011 }); 63012 if (item.icon !== undefined) icn.addClass(item.icon); 63013 else icn.addClass("ui-icon-triangle-1-e"); 63014 return $("<li>").data("ui-autocomplete-item", item).append(icn).append("<a><b>" + item.label + "</b>" + ((item.desc !== undefined) ? "<br/>" + item.desc : "") + "</a>").append("<div class='clear:both'></div>").appendTo(ul); 63015 }; 63016 } 63017 if (!ac.attr("data-strict")) { 63018 ac.on('keypress', function(ev) { 63019 if (ev.which == 13) { 63020 fc(false, { 63021 "item": { 63022 "label": ac.val(), 63023 "value": ac.val() 63024 } 63025 }); 63026 ev.preventDefault(); 63027 } 63028 }); 63029 } 63030 if (ac.data("autocomplete-linkedselect")) { 63031 for (var i = 0; i < newSpecial.length; i++) { 63032 var ks = $("<option>").attr("value", newSpecial[i].value).text(newSpecial[i].label).appendTo(ac.data("autocomplete-linkedselect")); 63033 } 63034 ac.data("autocomplete-linkedselect").change(function() { 63035 ac.data("addTag")($(this).val(), $(this).val()); 63036 }); 63037 } 63038 }; 63039 if (ac.attr("data-url") === undefined) { 63040 fDone([]); 63041 } else { 63042 $.ajax({ 63043 url: ((ac.attr("data-url").indexOf('http') == 0 || ac.attr("data-url").indexOf('/') == 0) ? ac.attr("data-url") : SiteConfig.basepath + "API/" + ac.attr("data-url")), 63044 dataType: "json", 63045 success: fDone 63046 }); 63047 } 63048 } else if (ac.data("url") !== undefined) { 63049 63050 ac.autocomplete({ 63051 select: function(sel) { 63052 ac.val(sel); 63053 }, 63054 source: function( request, response ) { 63055 $.getJSON( ((ac.attr("data-url").indexOf('http') == 0 || ac.attr("data-url").indexOf('/') == 0) ? ac.attr("data-url") : SiteConfig.basepath + "API/" + ac.attr("data-url")), { 63056 term: request.term 63057 }, response ); 63058 }, 63059 minLength: 3, 63060 }); 63061 63062 } 63063 }); 63064 } 63065 if (e.find(".calendar").length) { 63066 var $calendar = e.find(".calendar"); 63067 var submitEvent = function(form, div) { 63068 $.ajax({ 63069 url: form.attr('action'), 63070 dataType: "html", 63071 data: form.serialize(), 63072 type: "POST", 63073 success: function(r) { 63074 if (r === "submitted") { 63075 div.close(); 63076 location.reload(true); 63077 } 63078 else { 63079 div.html(r); 63080 S.form.run(div); 63081 div.find('form').on('submit', function(e) { 63082 var $this = $(this); 63083 submitEvent($this, div); 63084 e.preventDefault(); 63085 }); 63086 } 63087 } 63088 }); 63089 }; 63090 var openEvent = function(eID) { 63091 var newDiv = S.overlay(); 63092 $.ajax({ 63093 url: "../events.nh?act=edit" + ((eID !== undefined) ? "&act_id=" + eID : ""), 63094 method: "GET", 63095 dataType: "html", 63096 success: function(r) { 63097 newDiv.title("Event Details"); 63098 newDiv.content(r); 63099 S.form.run(newDiv); 63100 newDiv.find("input[name='eventEdit_allday']").on( 'click', function() { 63101 63102 if ($(this).is(":checked")) { 63103 newDiv.find("input[name='eventEdit_enddate']").parent().parent().hide(); 63104 } 63105 else { 63106 newDiv.find("input[name='eventEdit_enddate']").parent().parent().show(); 63107 } 63108 });
63109 if (newDiv.find("input[name='eventEdit_allday']").is(":checked")) { 63110 newDiv.find("input[name='eventEdit_enddate']").parent().parent().hide(); 63111 } 63112 else { 63113 newDiv.find("input[name='eventEdit_enddate']").parent().parent().show(); 63114 } 63115 newDiv.find("form").on('submit', function(e) { 63116 var $this = $(this); 63117 submitEvent($this, newDiv); 63118 e.preventDefault(); 63119 }); 63120 } 63121 }); 63122 newDiv.show(); 63123 }; 63124 var addEvent = function(dateString) { 63125 var newDiv = S.overlay(); 63126 $.ajax({ 63127 url: "../events.nh?act=edit" + ((dateString !== undefined) ? "&act_date=" + dateString : ""), 63128 method: "GET", 63129 dataType: "html", 63130 success: function(r) { 63131 newDiv.title("Event Details"); 63132 newDiv.content(r); 63133 S.form.run(newDiv); 63134 newDiv.find("input[name='eventEdit_allday']").on( 'click', function() { 63135 if ($(this).is(":checked")) { 63136 newDiv.find("input[name='eventEdit_enddate']").parent().parent().hide(); 63137 } 63138 else { 63139 newDiv.find("input[name='eventEdit_enddate']").parent().parent().show(); 63140 } 63141 }); 63142 if (newDiv.find("input[name='eventEdit_allday']").is(":checked")) { 63143 newDiv.find("input[name='eventEdit_enddate']").parent().parent().hide(); 63144 } 63145 else { 63146 newDiv.find("input[name='eventEdit_enddate']").parent().parent().show(); 63147 } 63148 newDiv.find("form").on('submit', function(e) { 63149 var $this = $(this); 63150 submitEvent($this, newDiv); 63151 e.preventDefault(); 63152 }); 63153 } 63154 }); 63155 newDiv.show(); 63156 }; 63157 var DeleteEvent = function(event) { 63158 var kt = $("<div></div>").html("You are about to delete the following event: <b>" + event.title + "</b><br/><br/>Are you sure you wish to do this? This cannot be undone!").dialog({ 63159 modal: true, 63160 title: "Deletion confirmation", 63161 buttons: { 63162 "Delete": function() { 63163 $.ajax({ 63164 url: SiteConfig.basepath + "json/events.json?act=delete", 63165 dataType: "json", 63166 data: { 63167 "act_id": event.eventID 63168 }, 63169 type: "POST", 63170 success: function(r) { 63171 kt.dialog("destroy").remove(); 63172 if (r.result === "success") { 63173 window.location.reload(true); 63174 } else { 63175 $("<div>An error has occurred: " + r.error + "</div>").dialog({ 63176 modal: true, 63177 title: "Error!" 63178 }); 63179 } 63180 } 63181 }); 63182 }, 63183 "Cancel": function() { 63184 $(this).dialog("destroy").remove(); 63185 } 63186 } 63187 }); 63188 }; 63189 //G.manageEvents(openEvent, addEvent, DeleteEvent); 63190 function getUrlVars() { 63191 var vars = [], 63192 hash; 63193 var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); 63194 for (var i = 0; i < hashes.length; i++) { 63195 hash = hashes[i].split('='); 63196 vars.push(hash[0]); 63197 vars[hash[0]] = hash[1]; 63198 } 63199 return vars; 63200 } 63201 var fct = function() { 63202 var date = new Date(); 63203 var d = date.getDate(); 63204 var m = date.getMonth(); 63205 var y = date.getFullYear(); 63206 var cfg = { 63207 singleTriggered: false, 63208 header: { 63209 left: 'prev,next today', 63210 center: 'title', 63211 right: 'month,basicWeek,basicDay' 63212 }, 63213 editable: false, 63214 events: SiteConfig.basepath + "json/events.json?public=1&eventsFrom="+$calendar.data('widget-config'), 63215 eventRender: function(event, element) { 63216 element.find('span.fc-event-title').html(element.find('span.fc-event-title').text()); 63217 cfg.renderOne(); 63218 }, 63219 columnFormat: { 63220 week: 'dddd dS MMMM', 63221 day: 'dddd dS MMMM', 63222 month: '' 63223 }, 63224 firstDay: 1, 63225 //defaultView: 'basicWeek' //original code, why the default was set to basicWeek? 63226 defaultView: 'month', 63227 timeFormat: 'H:mm{ - H:mm}', 63228 ignoreTimezone: true 63229 }; 63230 cfg.customDate = function() { 63231 var url = getUrlVars(); 63232 if (typeof cfg === "object" && url.time !== undefined) { 63233 var loaddate = new Date(url.time.substring(0, 10) * 1000); 63234 cfg.year = loaddate.getFullYear(); 63235 cfg.month = loaddate.getMonth(); 63236 console.log(cfg.year) 63237 console.log(cfg.month) 63238 } 63239 }; 63240 cfg.customDate(); 63241 cfg.renderOne = function() { 63242 if (this.singleTriggered === false) { 63243 var single = $(".displaySingle"); 63244 if (single.length <= 0) { 63245 return false;
63246 } 63247 var id = single.data("idrender"); 63248 setTimeout(function() { 63249 $("#" + id).trigger("mouseenter"); 63250 $("#" + id).trigger("click"); 63251 }, 100); 63252 this.singleTriggered = true; 63253 } 63254 return this; 63255 } 63256 cfg.eventClick = function(event, jsEvent, view) { 63257 if (event.clickable) { 63258 var s = S.overlay(); 63259 s.loading(); 63260 s.title(event.title); 63261 s.content(""); 63262 63263 var utcStartDate = moment.tz(event.locStart, "UTC"), 63264 locStartDate = utcStartDate.tz(event.locTimezone), 63265 utcEndDate = moment.tz(event.locEnd, "UTC"), 63266 locEndDate = utcEndDate.tz(event.locTimezone); 63267 63268 if (event.start) { 63269 var dateString = " "; 63270 63271 if (event.showLocation == "1") { 63272 var dateString = " "+locStartDate.format('Do MMMM YYYY'); 63273 if (!event.allDay) { 63274 dateString += " " + locStartDate.format('hh:mm z')+"<br />("; 63275 } 63276 } 63277 63278 if (event.start.getDate()) { 63279 dateString += event.start.getDate().toString(); 63280 if (event.start.getDate() == 1 || event.start.getDate() == 21 || event.start.getDate() == 31) 63281 dateString += "st"; 63282 else if (event.start.getDate() == 2 || event.start.getDate() == 22) 63283 dateString += "nd"; 63284 else if (event.start.getDate() == 3 || event.start.getDate() == 23) 63285 dateString += "rd"; 63286 else 63287 dateString += "th"; 63288 } 63289 if (event.start.getMonth() !== false) { 63290 var months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
63290November", "December"]; 63291 dateString += " " + months[event.start.getMonth()]; 63292 } 63293 if (event.start.getFullYear()) { 63294 dateString += " " + event.start.getFullYear(); 63295 } 63296 if (!event.allDay) { 63297 if (event.start.getHours() || event.start.getMinutes()) { 63298 var fD = function(integer) { 63299 if (integer < 10) { 63300 return "0" + integer.toString(); 63301 } 63302 else 63303 return integer.toString(); 63304 }; 63305 dateString += " " + fD(event.start.getHours()) + ":" + fD(event.start.getMinutes())+ " " + event.timezone; 63306 } 63307 } 63308 63309 if (event.showLocation == "1") { 63310 dateString += ")"; 63311 } 63312 s.appendContent("<p><b>Starts:</b><span>" + dateString + "</span></p>"); 63313 63314 } 63315 else if (event.startText) { 63316 s.appendContent("<p><b>Starts:</b><span>" + event.startText + "</span></p>"); 63317 } 63318 if (event.end) { 63319 var dateString = " "; 63320 63321 if (event.showLocation == "1") { 63322 var dateString = " "+locEndDate.format('Do MMMM YYYY'); 63323 if (!event.allDay) { 63324 dateString += " " + locEndDate.format('hh:mm z')+"<br />("; 63325 } 63326 } 63327 63328 if (event.end.getDate()) { 63329 dateString += event.end.getDate().toString(); 63330 if (event.end.getDate() == 1 || event.end.getDate() == 21 || event.end.getDate() == 31) 63331 dateString += "st"; 63332 else if (event.end.getDate() == 2 || event.end.getDate() == 22) 63333 dateString += "nd"; 63334 else if (event.end.getDate() == 3 || event.end.getDate() == 23) 63335 dateString += "rd"; 63336 else 63337 dateString += "th"; 63338 } 63339 if (event.end.getMonth() !== false) { 63340 var months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
63340November", "December"]; 63341 dateString += " " + months[event.end.getMonth()]; 63342 } 63343 if (event.end.getFullYear()) { 63344 dateString += " " + event.end.getFullYear(); 63345 } 63346 if (!event.allDay) { 63347 if (event.end.getHours() || event.end.getMinutes()) { 63348 var fD = function(integer) { 63349 if (integer < 10) { 63350 return "0" + integer.toString(); 63351 } 63352 else 63353 return integer.toString(); 63354 }; 63355 dateString += " " + fD(event.end.getHours()) + ":" + fD(event.end.getMinutes())+ " " + event.timezone; 63356 } 63357 } 63358 if (event.showLocation == "1") { 63359 dateString += ")"; 63360 } 63361 s.appendContent("<p><b>Ends:</b><span>" + dateString + "</span></p>"); 63362 } 63363 else if (event.endText) { 63364 s.appendContent("<p><b>Ends:</b><span>" + event.endText + "</span></p>"); 63365 } 63366 63367 if (event.location) { 63368 s.appendContent("<p><b>Location: </b>" + event.location + "</p>"); 63369 } 63370 if (event.type) { 63371 s.appendContent("<p><b>Type: </b>" + event.type + "</p>"); 63372 } 63373 if (event.status != "0") { 63374 s.appendContent("<p><b>Type: </b>" + event.status + "</p>"); 63375 } 63376 if (event.cancelled && event.cancelled == 1) { 63377 s.appendContent("<span style='color: red;'>Event Cancelled</span>"); 63378 63379 } 63380 if (event.desc) { 63381 s.appendContent("<br /><div>" + event.desc + "</div>"); 63382 } 63383 if (event.registration_link) { 63384 var button = $("<a/>", { 63385 html: "Register »", 63386 href: event.registration_link, 63387 "class": "event-register" 63388 }); 63389 s.appendContent(button); 63390 63391 } 63392 s.show(); 63393 } 63394 }; 63395 var cfgAdmin = jQuery.extend(true, {}, cfg); 63396 cfgAdmin.eventClick = function(event, jsEvent, view) { 63397 openEvent(event.eventID); 63398 }; 63399 cfgAdmin.eventRender = function(event, element) { 63400 var title = element.find('span.fc-event-title'); 63401 title.html(element.find('span.fc-event-title').text()); 63402 title.parent().css("cursor", "pointer").prepend($("<button></button>").addClass("ui-icon ui-icon-circle-close").button().click(function() { 63403 DeleteEvent(event); 63404 return false; 63405 })); 63406 }; 63407 cfgAdmin.dayClick = function(d, allDay, jsEvent, view) { 63408 var dString = ""; 63409 dString = dString + ((d.getDate() > 9) ? d.getDate() : "0" + d.getDate()); 63410 dString = dString + "/" + ((d.getMonth() > 8) ? (d.getMonth() + 1) : "0" + (d.getMonth() + 1)); 63411 dString = dString + "/" + d.getFullYear(); 63412 addEvent(dString); 63413 }; 63414 cfgAdmin.events = SiteConfig.basepath + "json/events.json?view=admin"; 63415 e.find(".calendar").each(function() { 63416 if ($(this).is(".calendar-admin")) { 63417 $(this).fullCalendar(cfgAdmin); 63418 $("<button>Add an event</button>").button().on('click', function() { 63419 openEvent(); 63420 }).insertAfter($(this)); 63421 } else $(this).fullCalendar(cfg); 63422 var vt = $(e); 63423 var newButtonExport = $("<span></span>").addClass("fc-button fc-button-export fc-state-default"); 63424 newButtonExport.append($("<span></span>").addClass("fc-button-inner").html("<span class='fc-button-content'>Subscribe</span><span class=\"fc-button-effect\"><span></span></span>")); 63425 newButtonExport.appendTo($(this).find(".fc-header-right")); 63426 newButtonExport.css("cursor", "pointer").hover(function() { 63427 $(this).addClass("fc-state-hover"); 63428 }, function() { 63429 $(this).removeClass("fc-state-hover"); 63430 }); 63431 newButtonExport.on('click', function() { 63432 var oLay = oLay = $("<div></div>"); 63433 oLay.append("<p>Subscribing to this calendar will allow you to be kept up to date with all events, including those that are added. You may choose to subscribe to all events or subscribe to chosen categories of events by clicking the relevant links below:</p>"); 63434 oLay.append("<p>NB: If your operating system does not automatically recognize the calendar when you click the subscribe button below, you may
63434need to copy and paste the link below into your calendar program as advised in your calendar's help and instructions."); 63435 oLay.append("<p><b>All Events:</b> <a href='" + SiteConfig.basepath.replace('http://', 'webcal://') + "calendar/subscription/all/'>" + SiteConfig.basepath.replace('http://', 'webcal://') + "calendar/subscription/all/</a></p>"); 63436 $.ajax({ 63437 url: SiteConfig.basepath + "json/events.json?act=get_categories", 63438 type: 'POST', 63439 data: {}, 63440 dataType: 'JSON', 63441 success: function(r) { 63442 $.each(r, function(key, value) { 63443 oLay.append("<p><b>" + value.category_name + ":</b> <a href='" + SiteConfig.basepath.replace('http://', 'webcal://') + "calendar/subscription/" + value.category_name.toLowerCase().replace(' ', '-') + "/'>" + SiteConfig.basepath.replace('http://', 'webcal://') + "calendar/subscription/" + value.category_name.toLowerCase().replace(' ', '-') + "/</a></p>"); 63444 }); 63445 oLay.dialog({ 63446 modal: true, 63447 width: '75%', 63448 title: "Subscribe", 63449 buttons: { 63450 "Close": function() { 63451 $(this).dialog("destroy").remove(); 63452 } 63453 } 63454 }); 63455 }, 63456 error: function() {} 63457 }); 63458 }); 63459 if ($(this).is(".calendar-admin")) { 63460 var newButtonImport = $("<span></span>").addClass("fc-button fc-button-export fc-state-default"); 63461 newButtonImport.append($("<span></span>").addClass("fc-button-inner").html("<span class='fc-button-content'>Import</span><span class=\"fc-button-effect\"><span></span></span>")); 63462 newButtonImport.appendTo($(this).find(".fc-header-right")); 63463 newButtonImport.css("cursor", "pointer").hover(function() { 63464 $(this).addClass("fc-state-hover"); 63465 }, function() { 63466 $(this).removeClass("fc-state-hover"); 63467 }); 63468 newButtonImport.click(function() { 63469 window.location.href = SiteConfig.basepath + "admin/events/?act=import"; 63470 }); 63471 } 63472 $(this).find(".fc-header-right").children("span").removeClass("fc-corner-right").filter(":last").addClass("fc-corner-right"); 63473 // fc-button fc-button-month fc-state-default fc-corner-left fc-state-active 63474 }); 63475 }; 63476 fct(); 63477 } 63478 if (e.find('.calendar-latest-click').length) { 63479 e.find('.calendar-latest-click').on('click', function(e) { 63480 var $this = $(this), 63481 $single = $('#event-details-'+$this.data('detailsid')); 63482 63483 var event = { 63484 startText: $single.data("start"), 63485 endText: $single.data("end"), 63486 title: $single.data("title"), 63487 desc: $single.data("desc"), 63488 location: $single.data("location"), 63489 type: $single.data("type"), 63490 cancelled: $single.data("cancelled"), 63491 clickable: true 63492 }; 63493 63494 var s = S.overlay(); 63495 s.loading(); 63496 s.title(event.title); 63497 s.content(""); 63498 63499 if (event.start) { 63500 63501 var dateString = " "; 63502 if (event.start.getDate()) { 63503 dateString += event.start.getDate().toString(); 63504 if (event.start.getDate() == 1 || event.start.getDate() == 21 || event.start.getDate() == 31) 63505 dateString += "st"; 63506 else if (event.start.getDate() == 2 || event.start.getDate() == 22) 63507 dateString += "nd"; 63508 else if (event.start.getDate() == 3 || event.start.getDate() == 23) 63509 dateString += "rd"; 63510 else 63511 dateString += "th"; 63512 } 63513 if (event.start.getMonth() !== false) { 63514 var months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
63514November", "December"]; 63515 dateString += " " + months[event.start.getMonth()]; 63516 } 63517 if (event.start.getFullYear()) { 63518 dateString += " " + event.start.getFullYear(); 63519 } 63520 if (!event.allDay) { 63521 if (event.start.getHours() || event.start.getMinutes()) { 63522 var fD = function(integer) { 63523 if (integer < 10) { 63524 return "0" + integer.toString(); 63525 } 63526 else 63527 return integer.toString(); 63528 }; 63529 dateString += " " + fD(event.start.getHours()) + ":" + fD(event.start.getMinutes())+ " " + event.timezone; 63530 } 63531 } 63532 s.appendContent("<p><b>Starts:</b><span>" + dateString + "</span></p>"); 63533 } 63534 else if (event.startText) { 63535 s.appendContent("<p><b>Starts:</b><span>" + event.startText + "</span></p>"); 63536 } 63537 if (event.end) { 63538 var dateString = " "; 63539 if (event.end.getDate()) { 63540 dateString += event.end.getDate().toString(); 63541 if (event.end.getDate() == 1 || event.end.getDate() == 21 || event.end.getDate() == 31) 63542 dateString += "st"; 63543 else if (event.end.getDate() == 2 || event.end.getDate() == 22) 63544 dateString += "nd"; 63545 else if (event.end.getDate() == 3 || event.end.getDate() == 23) 63546 dateString += "rd"; 63547 else 63548 dateString += "th"; 63549 } 63550 if (event.end.getMonth() !== false) { 63551 var months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
63551November", "December"]; 63552 dateString += " " + months[event.end.getMonth()]; 63553 } 63554 if (event.end.getFullYear()) { 63555 dateString += " " + event.end.getFullYear(); 63556 } 63557 if (!event.allDay) { 63558 if (event.end.getHours() || event.end.getMinutes()) { 63559 var fD = function(integer) { 63560 if (integer < 10) { 63561 return "0" + integer.toString(); 63562 } 63563 else 63564 return integer.toString(); 63565 }; 63566 dateString += " " + fD(event.end.getHours()) + ":" + fD(event.end.getMinutes())+ " " + event.timezone; 63567 } 63568 } 63569 s.appendContent("<p><b>Ends:</b><span>" + dateString + "</span></p>"); 63570 } 63571 else if (event.endText) { 63572 s.appendContent("<p><b>Ends:</b><span>" + event.endText + "</span></p>"); 63573 } 63574 63575 if (event.location) { 63576 s.appendContent("<p><b>Location: </b>" + event.location +"</p>"); 63577 } 63578 if (event.type) { 63579 s.appendContent("<p><b>Type: </b>" + event.type +"</p>"); 63580 } 63581 if (event.cancelled && event.cancelled == 1) { 63582 s.appendContent("<span style='color: red;'>Event Cancelled</span>"); 63583 } 63584 if (event.desc) { 63585 /* 63586 * lazy function to convert html-escaped charter back to html 63587 * it's short and it works! 63588 */ 63589 63590 s.appendContent("<br /><div>" + event.desc + "</div>"); 63591 } 63592 if (event.registration_link) { 63593 var button = $("<a/>", { 63594 html: "Register »", 63595 href: event.registration_link, 63596 "class": "event-register" 63597 }); 63598 s.appendContent(button); 63599 63600 } 63601 63602 s.show(); 63603 63604 e.preventDefault(); 63605 }); 63606 } 63607 (function (factory) { 63608 if (typeof define === "function" && define.amd) { 63609 define(["jquery", "moment", "datatables.net"], factory); 63610 } else { 63611 factory(jQuery, moment); 63612 } 63613 }(function ($, moment) { 63614 63615 $.fn.dataTable.moment = function ( format, locale ) { 63616 var types = $.fn.dataTable.ext.type; 63617 63618 // Add type detection 63619 types.detect.unshift( function ( d ) { 63620 if ( d ) { 63621 // Strip HTML tags and newline characters if possible 63622 if ( d.replace ) { 63623 d = d.replace(/(<.*?>)|(\r?\n|\r)/g, ''); 63624 } 63625 63626 // Strip out surrounding white space 63627 d = $.trim( d ); 63628 } 63629 63630 // Null and empty values are acceptable 63631 if ( d === '' || d === null ) { 63632 return 'moment-'+format; 63633 } 63634 63635 return moment( d, format, locale, true ).isValid() ? 63636 'moment-'+format : 63637 null; 63638 } ); 63639 63640 // Add sorting method - use an integer for the sorting 63641 types.order[ 'moment-'+format+'-pre' ] = function ( d ) { 63642 if ( d ) { 63643 // Strip HTML tags and newline characters if possible 63644 if ( d.replace ) { 63645 d = d.replace(/(<.*?>)|(\r?\n|\r)/g, ''); 63646 } 63647 63648 // Strip out surrounding white space 63649 d = $.trim( d ); 63650 } 63651 63652 return !moment(d, format, locale, true).isValid() ? 63653 Infinity : 63654 parseInt( moment( d, format, locale, true ).format( 'x' ), 10 ); 63655 }; 63656 }; 63657 $.fn.dataTable.moment( 'DD/MM/YYYY HH:mm' ); 63658 $.fn.dataTable.moment( 'DD/MM/YYYY' ); 63659 })); 63660 e.find(".cms-sorting-table").each(function() { 63661 var tbl = $(this); 63662 var options = {}; 63663 options.destroy = true; 63664 if (tbl.data('custom-sort') !== undefined) { 63665 var columns = tbl.data('custom-sort').split(' '); 63666 var sorting = []; 63667 options.columnDefs = []; 63668 $.each(columns, function(index, elem) { 63669 sorting = elem.split(":"); 63670 var obj = {} 63671 obj.type = sorting[0]; 63672 obj.targets = parseInt(sorting[1]); 63673 options.columnDefs.push(obj); 63674 }); 63675 } 63676 if (tbl.data('paging-limit') !== undefined) { 63677 options.lengthMenu = [ 63678 [tbl.data('paging-limit'), 10, 25, 50, -1], 63679 ["Default: " + tbl.data('paging-limit'), 10, 25, 50, "All"] 63680 ]; 63681 options.pageLength = tbl.data('paging-limit'); 63682 } 63683 if (tbl.data('sort-remove') !== undefined) { 63684 var sSplit = tbl.data('sort-remove').split(","); 63685 if (!$.isArray(options.columnDefs)) { 63686 options.columnDefs = []; 63687 } 63688 var obj = {}; 63689 obj.searchable = false;
63690 obj.targets = []; 63691 var obj1 = {}; 63692 obj1.orderable = false; 63693 obj1.targets = []; 63694 $.each(sSplit, function(index, elem) { 63695 obj.targets.push(parseInt(elem)); 63696 obj1.targets.push(parseInt(elem)); 63697 }); 63698 options.columnDefs.push(obj); 63699 options.columnDefs.push(obj1); 63700 } 63701 if (tbl.data('order-start') !== undefined) { 63702 var order = tbl.data('order-start').split(' '); 63703 var sorting = []; 63704 options.order = []; 63705 $.each(order, function(index, elem) { 63706 sorting = elem.split(":"); 63707 var arr = [] 63708 arr.push(parseInt(sorting[0])); 63709 arr.push(sorting[1]); 63710 options.order.push(arr); 63711 }); 63712 } 63713 if (tbl.data('empty-text') !== undefined) { 63714 options.language = {}; 63715 options.language.emptyTable = tbl.data('empty-text'); 63716 } 63717 tbl.DataTable(options); 63718 }); 63719 e.find(".cms-paging-table").each(function() { 63720 var tbl = $(this); 63721 var options = {}; 63722 options.ordering = false; 63723 options.searching = false; 63724 options.destroy = true; 63725 if (tbl.data('paging-limit') !== undefined) { 63726 options.lengthMenu = [ 63727 [tbl.data('paging-limit'), 10, 25, 50, -1], 63728 ["Default: " + tbl.data('paging-limit'), 10, 25, 50, "All"] 63729 ]; 63730 options.pageLength = tbl.data('paging-limit'); 63731 } 63732 if (tbl.data('empty-text') !== undefined) { 63733 options.language = {}; 63734 options.language.emptyTable = tbl.data('empty-text'); 63735 } 63736 tbl.DataTable(options); 63737 }); 63738 if (e.find("table.perms-list").length) { 63739 e.find("table.perms-list").each(function() { 63740 var permModules = {}; 63741 $(this).find("tbody > tr").each(function() { 63742 if ($(this).find(".permission-module")) { 63743 if (permModules[$(this).find(".permission-module").text()] === undefined) permModules[$(this).find(".permission-module").text()] = []; 63744 permModules[$(this).find(".permission-module").text()].push({ 63745 name: $(this).find(".permission-name").text(), 63746 description: $(this).find(".permission-desc").text(), 63747 checkbox: $(this).find("input[type='checkbox']").detach() 63748 }); 63749 } 63750 }); 63751 $(this).find("tbody").html(""); 63752 var tbl = $(this).find("tbody"); 63753 jQuery.each(permModules, function(modName, modPerms) { 63754 var module = $("<tr class='module-name'>").appendTo(tbl); 63755 $("<td colspan='3'></td>").text(modName).appendTo(module); 63756 for (var i = 0; i < modPerms.length; i++) { 63757 var moduleRow = $("<tr class='module-permission'></tr>").appendTo(tbl); 63758 moduleRow.append($("<td class='module-perm-icon'><span></span></td>")).append($("<td class='module-perm-data'><h3>" + modPerms[i].name + "</h3><p>" + modPerms[i].description + "</p></td>")).append($("<td class='module-perm-checkbox'></td>").append(modPerms[i].checkbox)); 63759 } 63760 }); 63761 }); 63762 } 63763 if (e.find(".ui-form-dynamicselector").length) { 63764 e.find(".ui-form-dynamicselector").each(function() { 63765 var inpt = $(this); 63766 inpt.css("display", "none"); 63767 var newInpt = $("<div></div>").addClass("ui-form ui-corner-all ui-widget-content").insertAfter(inpt); 63768 var newInptSelector = $("<ul style='list-style: none;'></ul>").appendTo(newInpt); 63769 var newInptBox = $("<input type='text' placeholder='Enter a name or email address...'/>").css({ 63770 "border": "0", 63771 width: "100%" 63772 }).appendTo(newInpt); 63773 inpt.addElement = function(value, labelValue) { 63774 var label = $("<div></div>").css("display", "inline-block").addClass("ui-form ui-corner-all ui-widget-content"); 63775 // Build the label 63776 if (labelValue !== undefined) label.html(labelValue); 63777 else label.text(value); 63778 // ...And the delete button 63779 var delBtn = $("<div></div>").css("display", "inline-block").append($("<span></span>").addClass("ui-icon ui-icon-close").click(function() { 63780 inpt.rmElement(value); 63781 })); 63782 var lContainer = $("<li style='float: left'></li>").append(label.append(delBtn)); 63783 lContainer.data("selector-value", value); 63784 lContainer.appendTo(newInptSelector); 63785 var inputvals = []; 63786 if (inpt.val().length > 0) { 63787 inputvals = inpt.val().split(", "); 63788 } 63789 inputvals.push(value); 63790 inpt.val(inputvals.join(", ")); 63791 }; 63792 inpt.rmElement = function(val) { 63793 // Cycle through all the elements 63794 var currentElems = newInptSelector.children("li"); 63795 for (var i = 0; i < currentElems.length; i++) { 63796 if ($(currentElems[i]).data("selector-value") === val) { 63797 $(currentElems[i]).remove(); 63798 } 63799 } 63800 // Remove from the hidden input 63801 var inputvals = inpt.val().split(", "); 63802 for (var i = 0; i < inputvals.length; i++) { 63803 if (inputvals[i] === val) { 63804 inputvals.splice(i, 1); 63805 } 63806 } 63807 inpt.val(inputvals.join(", ")); 63808 }; 63809 inpt.data("autocomp", inpt); 63810 S.permissions.selectUser(newInptBox, function(ev, ui) { 63811 ev.preventDefault(); 63812 inpt.addElement(ui.item.type.substr(0, 1) + ":" + ui.item.value, "<span class=\"user-icon icon-" + ui.item.type + "-small\"></span>" + ui.item.label); 63813 ui.item.value = '' 63814 }); 63815 }); 63816 } 63817 // if (e.find("span.dms-cat-id").length) { 63818 // e.find("span.dms-cat-id").each(function() { 63819 // var rt = $(this); 63820 // (function(row) { 63821 // while (!row.is("body,tr")) {
63822 // row = row.parent(); 63823 // } 63824 // var tbl = row.parent(); 63825 // var catID = parseInt(rt.text()); 63826 // var rowBefore = tbl.children("tr"); 63827 // var rowCountBefore = rowBefore.index(row); 63828 // var rowCountAfter = rowBefore.length - rowCountBefore - 1; 63829 // // We can safely keep rows now. Let's get to work 63830 // var $viewPage = function(pageNumber) { 63831 // $.ajax({ 63832 // type: "GET", 63833 // url: window.location, 63834 // dataType: "json", 63835 // data: { 63836 // act: "list", 63837 // start: pageNumber * 20, 63838 // end: 20, 63839 // category: catID 63840 // }, 63841 // success: function(d) { 63842 // var rowBefore = tbl.children("tr"); 63843 // var tblStuff = rowBefore.slice(rowCountBefore); 63844 // tblStuff = tblStuff.slice(0, tblStuff.length - rowCountAfter); 63845 // tblStuff.remove(); 63846 // var firstFooterRow = tbl.children("tr").slice(rowCountBefore); 63847 // for (var i = 0; i < d.items.length; ++i) { 63848 // (function(r) { 63849 // var k = $("<tr>"); 63850 // k.append( 63851 // $("<td>") 63852 // .append($("<input type='checkbox' name='dmsFileList_check[]' value='" + r.file_id + "'/>")) 63853 // ) 63854 // .append( 63855 // $("<td style=\"width: 50%;padding-right: 8px;\">") 63856 // .append(r.file_name) 63857 // ) 63858 // .append( 63859 // $("<td>" + r.file_publication_number + "</td>")) 63860 // .append( 63861 // $("<td>" + r.file_date + "</td>")) 63862 // .append( 63863 // $("<td>") 63864 // .append($("<button type='submit' name='dmsFileList_edit' value='" + r.file_id + "'>Edit</button>").button()) 63865 // .append($("<button type='submit' name='dmsFileList_delete' value='" + r.file_id + "'>Delete</button>").button()) 63866 // .append($("<button type='submit' name='dmsFileList_papers' value='" + r.file_id + "'>Papers</button>").button()) 63867 // ) 63868 // .insertBefore(firstFooterRow.first()); 63869 // })(d.items[i]); 63870 // } 63871 // // Paging next. 63872 // var ks = $("<select class='paging-select'>"); 63873 // var pageCount = Math.ceil(d.total / 20); 63874 // var paging = $("<tr>") 63875 // .append($("<td colspan='5'>") 63876 // .append($("<span>Page </span>")) 63877 // .append(ks) 63878 // .append($("<span> of <b>" + pageCount + "</b></span>")) 63879 // ) 63880 // .insertBefore(firstFooterRow.first()); 63881 // for (var i = 0; i < pageCount; i++) { 63882 // var opt = $("<option>") 63883 // .val(i) 63884 // .text(i + 1); 63885 // if (i == pageNumber) 63886 // opt.attr("selected", true); 63887 // opt.appendTo(ks); 63888 // } 63889 // ks.change(function() { 63890 // $viewPage($(this).val()); 63891 // }); 63892 // } 63893 // }); 63894 // }; 63895 // $viewPage(0); 63896 // })(rt); 63897 // }); 63898 // } 63899 // if (e.find("span.dms-pub-id").length) { 63900 // e.find("span.dms-pub-id").each(function() { 63901 // var rt = $(this); 63902 // (function(row) { 63903 // while (!row.is("body,tr")) { 63904 // row = row.parent(); 63905 // } 63906 // var tbl = row.parent(); 63907 // var pubID = parseInt(rt.text()); 63908 // var rowBefore = tbl.children("tr"); 63909 // var rowCountBefore = rowBefore.index(row); 63910 // var rowCountAfter = rowBefore.length - rowCountBefore - 1; 63911 // // We can safely keep rows now. Let's get to work 63912 // var $viewPage = function(pageNumber) { 63913 // $.ajax({ 63914 // type: "GET", 63915 // url: window.location, 63916 // dataType: "json", 63917 // data: { 63918 // act: "list_papers", 63919 // start: pageNumber * 20, 63920 // end: 20, 63921 // publication: pubID 63922 // }, 63923 // success: function(d) { 63924 // var rowBefore = tbl.children("tr"); 63925 // var tblStuff = rowBefore.slice(rowCountBefore); 63926 // tblStuff = tblStuff.slice(0, tblStuff.length - rowCountAfter); 63927 // tblStuff.remove(); 63928 // var firstFooterRow = tbl.children("tr").slice(rowCountBefore); 63929 // for (var i = 0; i < d.items.length; ++i) { 63930 // (function(r) { 63931 // var k = $("<tr>"); 63932 // k.append( 63933 // $("<td>") 63934 // .append($("<input type='checkbox' name='dmsPaperList_check[]' value='" + r.file_id + "'/>")) 63935 // ) 63936 // .append( 63937 // $("<td style=\"width: 70%;padding-right: 8px;\">") 63938 // .append(r.file_name) 63939 // ) 63940 // .append( 63941 // $("<td>" + r.file_date + "</td>")) 63942 // .append( 63943 // $("<td>") 63944 // .append($("<button type='submit' name='dmsPaperList_edit' value='" + r.file_id + "'>Edit</button>").button()) 63945 // .append($("<button type='submit' name='dmsPaperList_delete' value='" + r.file_id + "'>Delete</button>").button()) 63946 // ) 63947 // .insertBefore(firstFooterRow.first()); 63948 // })(d.items[i]); 63949 // } 63950 // // Paging next. 63951 // var ks = $("<select class='paging-select'>");
63952 // var pageCount = Math.ceil(d.total / 20); 63953 // var paging = $("<tr>") 63954 // .append($("<td colspan='4'>") 63955 // .append($("<span>Page </span>")) 63956 // .append(ks) 63957 // .append($("<span> of <b>" + pageCount + "</b></span>")) 63958 // ) 63959 // .insertBefore(firstFooterRow.first()); 63960 // for (var i = 0; i < pageCount; i++) { 63961 // var opt = $("<option>") 63962 // .val(i) 63963 // .text(i + 1); 63964 // if (i == pageNumber) 63965 // opt.attr("selected", true); 63966 // opt.appendTo(ks); 63967 // } 63968 // ks.change(function() { 63969 // $viewPage($(this).val()); 63970 // }); 63971 // } 63972 // }); 63973 // }; 63974 // $viewPage(0); 63975 // })(rt); 63976 // }); 63977 // } 63978 if (e.find("span.orders-list-id").length) { 63979 e.find("span.orders-list-id").each(function() { 63980 var rt = $(this); 63981 (function(row) { 63982 while (!row.is("body,tr")) { 63983 row = row.parent(); 63984 } 63985 var tbl = row.parent(), 63986 rowBefore = tbl.children("tr"), 63987 rowCountBefore = rowBefore.index(row), 63988 rowCountAfter = rowBefore.length - rowCountBefore - 1, 63989 searchData = JSON.parse(rt.html()); 63990 // We can safely keep rows now. Let's get to work 63991 var $viewPage = function(pageNumber) { 63992 searchData['act'] = "list_orders"; 63993 searchData['start'] = pageNumber * 25; 63994 searchData['end'] = 25; 63995 $.ajax({ 63996 type: "GET", 63997 url: window.location, 63998 dataType: "json", 63999 data: searchData, 64000 error: function(a, b, c) { 64001 console.log(a); 64002 }, 64003 success: function(d) { 64004 var rowBefore = tbl.children("tr"); 64005 var tblStuff = rowBefore.slice(rowCountBefore); 64006 tblStuff = tblStuff.slice(0, tblStuff.length - rowCountAfter); 64007 tblStuff.remove(); 64008 var firstFooterRow = tbl.children("tr").slice(rowCountBefore); 64009 if (d.items.length > 0) { 64010 for (var i = 0; i < d.items.length; ++i) { 64011 var imgFile = "cms_cross"; 64012 (function(r) { 64013 if (r.orderDelivered == '1') { 64014 imgFile = "cms_tick"; 64015 } 64016 var k = $("<tr>"); 64017 k.append( 64018 $("<td style=\"text-align: center;\">") 64019 .append($("<img src=\"" + SiteConfig.basepath + "images/adminStyles/" + imgFile + ".gif\" />")) 64020 ) 64021 .append( 64022 $("<td>") 64023 .append(r.fullOrderNo) 64024 ) 64025 .append( 64026 $("<td>" + r.orderDate + "</td>")) 64027 .append( 64028 $("<td style=\"text-align: center;\">" + r.givenname + " " + r.familyname + "</td>")) 64029 .append( 64030 $("<td style=\"text-align: center;\">£" + r.orderPostage + "</td>")) 64031 .append( 64032 $("<td style=\"text-align: center;\">£" + r.orderTotal + "</td>")) 64033 .append( 64034 $("<td style=\"text-align: center;\">" + r.paymentStatus + "</td>")) 64035 .append( 64036 $("<td>") 64037 .append($("<button type='submit' name='ordersList_edit' value='" + r.orderID + "'>Edit</button>").button()) 64038 ) 64039 .insertBefore(firstFooterRow.first()); 64040 })(d.items[i]); 64041 } 64042 } else { 64043 var k = $("<tr>"); 64044 k.append($("<td colspan=\"8\">No orders have been found. Please change your search criteria and try again.</td>")) 64045 .insertBefore(firstFooterRow.first()); 64046 } 64047 // Paging next. 64048 var ks = $("<select class='paging-select'>"); 64049 var pageCount = Math.ceil(d.total / 20); 64050 var paging = $("<tr>") 64051 .append($("<td colspan='8'>") 64052 .append($("<span>Page </span>")) 64053 .append(ks) 64054 .append($("<span> of <b>" + pageCount + "</b></span>")) 64055 ) 64056 .insertBefore(firstFooterRow.first()); 64057 for (var i = 0; i < pageCount; i++) { 64058 var opt = $("<option>") 64059 .val(i) 64060 .text(i + 1); 64061 if (i == pageNumber) 64062 opt.attr("selected", true); 64063 opt.appendTo(ks); 64064 } 64065 ks.change(function() { 64066 $viewPage($(this).val()); 64067 }); 64068 } 64069 }); 64070 }; 64071 $viewPage(0); 64072 })(rt); 64073 }); 64074 }
64075 if (e.find(".iahs-vatcalculator").length) { 64076 e.find(".iahs-vatcalculator").each(function() { 64077 var icn = $("<a href='#'><img src='http://png.findicons.com/files/icons/1951/iconza/32/calculator.png' style='width: 16px; height: 16px;'/></a>").insertAfter($(this)), 64078 inpt = $(this); 64079 icn.css({"position": "relative", "top": "2px", "left": "-20px"}); 64080 icn.click(function() { 64081 var calculator = $("<div></div>"); 64082 var calcInput = $("<input type='text' style='width: 115px'/>").val((isNaN(parseFloat(inpt.val()))) ? "" : (Math.ceil(100 * parseFloat(inpt.val())) / 100).toString()).appendTo($("<div>").appendTo(calculator)); 64083 var cE = false; 64084 for (var i = 0; i < 9; i++) { 64085 (function(k) { 64086 if ((k % 3) == 0) { 64087 cE = $("<div></div>").appendTo(calculator); 64088 } 64089 cE.append($("<button>" + (k + 1) + "</button>").css("font-family", "monospace").click(function() { 64090 if (calcInput.val() == "0") 64091 calcInput.val(""); 64092 calcInput.val(calcInput.val() + (k + 1).toString()); 64093 return false; 64094 }).button()); 64095 })(i); 64096 } 64097 cE = $("<div></div>").appendTo(calculator); 64098 cE 64099 .append($("<button>.</button>").css("font-family", "monospace").click(function() { 64100 calcInput.val(calcInput.val() + ".").change(); 64101 return false; 64102 }).button()) 64103 .append($("<button>0</button>").css("font-family", "monospace").click(function() { 64104 calcInput.val(calcInput.val() + "0").change(); 64105 return false; 64106 }).button()) 64107 .append($("<button>C</button>").css("font-family", "monospace").click(function() { 64108 calcInput.val(""); 64109 return false; 64110 }).change().button()); 64111 cE = $("<div></div>").appendTo(calculator); 64112 cE 64113 .append($("<button>ex. VAT</button>").css({"display": "inline-block", "width": "100%", "font-family": "monospace"}).click(function() { 64114 var newVal = parseFloat(calcInput.val()); 64115 if (isNaN(newVal)) { 64116 $("<div>The value you entered is not recognised as a number</div>").dialog({title: "Error", modal: true}); 64117 return; 64118 } 64119 var newValExVAT = newVal / 1.2; 64120 inpt.val(Math.ceil(100 * newValExVAT) / 100); 64121 calculator.dialog("close"); 64122 return false; 64123 }).button()); 64124 var maxWidth = 0; 64125 calculator.children("div").width(120); 64126 calculator.css("overflow", "hidden").dialog({ 64127 width: 10, 64128 position: { 64129 my: "left top", 64130 at: "right top", 64131 of: inpt, 64132 offset: "5px 0px" 64133 }, 64134 title: "Test" 64135 }); 64136 }); 64137 }); 64138 } 64139 if (e.find(".scms-slider").length) { 64140 e.find(".scms-slider").each(function() { 64141 var ks = $(this); 64142 if ($(this).hasClass("scms-slider-float01")) { 64143 $(this).css("display", "none"); 64144 var s = $("<div>").css("width", "150px").insertAfter($(this)).slider({ 64145 min: 0, 64146 max: 1, 64147 step: 0.1, 64148 range: "min", 64149 value: parseFloat($(this).val()), 64150 slide: function(ev, ui) { 64151 ks.val(ui.value); 64152 } 64153 }); 64154 $(this).change(function() { 64155 s.slider("value", parseFloat($(this).val())); 64156 }); 64157 } 64158 }); 64159 } 64160 e.find(".folder-selector").addClass("select-replace"); 64161 if (e.find(".select-replace").length) { 64162 e.find(".select-replace").each(function() { 64163 var ks = $(this); 64164 ks.css("display", "none"); 64165 var kSelect = $("<span>").css({ 64166 "display": "inline-block", 64167 "width": 200, 64168 "height": 16 64169 }).addClass("ui-widget-header ui-corner-all").insertAfter(ks); 64170 kSelect.append("<span style='display: inline-block' class=\"ui-icon ui-icon-carat-1-s\"></span>"); 64171 kSelect.append("<span class='text-value'></span>"); 64172 var modal = $("<div>").css({ 64173 "padding": 5 64174 }).addClass("ui-widget-content ui-corner-all").insertAfter(kSelect); 64175 modal.append($("<div>Select a value...</div>").append($("<span style='display: inline-block' class=\"ui-icon ui-icon-close\"></span>").css({ 64176 "float": "right", 64177 "cursor": "pointer" 64178 }).click(function() { 64179 modal.css("display", "none"); 64180 })).css("padding-left", 5).addClass("ui-widget-header ui-corner-all")); 64181 modal.append($("<ul>").css("list-style", "none")); 64182 modal.position({ 64183 my: "left top", 64184 at: "left bottom", 64185 of: kSelect 64186 }); 64187 ks.children("option").each(function() { 64188 var cOpt = $(this); 64189 modal.find("ul").append( 64190 $("<li></li>").append("<input type='radio' name='kselect_" + ks.attr("name") + "' value='" + $(this).attr("value") + "'/> <span>" + $(this).text() + "</span>").click(function() { 64191 ks.val(cOpt.val()); 64192 kSelect.children(".text-value").text(cOpt.text()); 64193 $(this).find("input[type='radio']").attr("checked", "checked"); 64194 event.stopPropagation(); 64195 })); 64196 if (cOpt.is(":selected")) { 64197 ks.parent().find('input[value=' + cOpt.attr("value") + ']').attr("checked", "checked"); 64198 } 64199 if (ks.val() === $(this).attr("value")) { 64200 kSelect.find(".text-value").text($(this).text()); 64201 } 64202 }); 64203 modal.css("display", "none"); 64204 kSelect.click(function() { 64205 modal.css("display", ""); 64206 $("*").bind("click", function(event) { 64207 if ($(this).closest(modal).length == 0 && $(this).closest(kSelect).length == 0) { 64208 modal.css("display", "none"); 64209 } 64210 }); 64211 event.stopPropagation(); 64212 }); 64213 }); 64214 //__________________________________________________________________ 64215 // Remove URL when new parent page is clicked 64216 var RemURL = { 64217 fire: function(config) { 64218 this.config = config; 64219 this.bindEvents(); 64220 }, 64221 bindEvents: function() { 64222 var self = this; 64223 this.config.internalPage.on('click', function() { 64224 self.reset() 64225 }); 64226 }, 64227 reset: function() { 64228 this.config.urlField.val(""); 64229 } 64230 }; 64231 if ($("*[name=kselect_editForm_link1_internalPage]").parent() != undefined) { 64232 RemURL.fire({ 64233 internalPage: $("*[name=kselect_editForm_link1_internalPage]").parent(), 64234 urlField: $("*[name=editForm_link1_url]") 64235 }); 64236 } 64237 //__________________________________________________________________ 64238 } 64239 if (e.find(".folder-selector").length) { 64240 e.find(".folder-selector").each(function() { 64241 var kt = $(this).next().next(); 64242 kt.find("ul").children("li").each(function() { 64243 var kr = $(this).find("span").text(); 64244 var notHyphen = true; 64245 var ks = ""; 64246 for (var i = 0; i < kr.length && notHyphen === true; i++) { 64247 if (kr.substr(i, 1) == "-") { 64248 ks = ks + "<span class=\"ui-icon ui-icon-arrowreturn-1-e\" style='display: inline-block'></span>"; 64249 } else { 64250 notHyphen = false;
64251 } 64252 } 64253 $(this).find("span").html(ks + kr.substr(i - 1)); 64254 }); 64255 }); 64256 } 64257 if (e.find(".hiddenInput").length) { 64258 e.find(".hiddenInput").hide(); 64259 } 64260 e.on('click', ".hiddenInputRevealer", function() { 64261 var $this = $(this); 64262 e.find(".hiddenInput").fadeToggle(1000); 64263 if ($this.hasClass('oneOffRevealer')) { 64264 $this.hide(); 64265 } 64266 return false; 64267 }); 64268 if (e.find(".hiddenInput tr.hasError").length) { 64269 e.find(".hiddenInputRevealer").click(); 64270 } 64271 if (e.find(".email-button").length) { 64272 e.find(".email-button").click(function() { 64273 var elm = jQuery.parseJSON($(this).val()); 64274 S.email.form(elm); 64275 return false; 64276 }); 64277 } 64278 if (e.find(".ui-category-binder")) { 64279 e.find(".ui-category-binder").find("option").attr("selected", false); 64280 e.find(".ui-category-binder").attr("multiple", true).multiselect().change(function() { 64281 var vt = $(this).val(); 64282 var vr = $(this); 64283 $(this).find("option").each(function() { 64284 e.find(".cms-autocomplete").data("removeTag")($(this).attr("value")); 64285 }); 64286 for (var i = 0; i < vt.length; i++) { 64287 e.find(".cms-autocomplete").data("addTag")(vt[i], vt[i]); 64288 } 64289 return false; 64290 }); 64291 } 64292 if (e.find(".cms-sortable-table")) { 64293 e.find(".cms-sortable-table").each(function() { 64294 var inpt = e.find("input[name='" + $(this).attr("data-name") + "']"), 64295 tS = $(this); 64296 var upd = function() { 64297 var k = []; 64298 tS.children("li").each(function() { 64299 if ($(this).attr("data-value")) k.push($(this).attr("data-value")); 64300 }); 64301 inpt.val(k.join(",")); 64302 target = tS.data("url"); 64303 if (target.length > 0) { 64304 $.ajax({ 64305 type: "POST", 64306 url: target, 64307 data: { 64308 order: JSON.stringify(k) 64309 } 64310 }).done(function(obj) { 64311 if (obj !== "error") { 64312 var success = tS.parents().find(".reorderSuccess").fadeIn(); 64313 if (success.is(":visible")) { 64314 setTimeout(function() { 64315 success.fadeOut(); 64316 }, 3000); 64317 } 64318 } else { 64319 var error = tS.parents().find(".reorderError").fadeIn(); 64320 if (error.is(":visible")) { 64321 setTimeout(function() { 64322 error.fadeOut(); 64323 }, 3000); 64324 } 64325 } 64326 }); 64327 } 64328 }; 64329 if (inpt) { 64330 var init = function() { 64331 var k = []; 64332 tS.children("li").each(function() { 64333 if ($(this).attr("data-value")) k.push($(this).attr("data-value")); 64334 }); 64335 inpt.val(k.join(",")); 64336 }; 64337 init(); 64338 $(this).sortable({ 64339 axis: "y", 64340 update: function(ev, ui) { 64341 upd(); 64342 } 64343 }); 64344 } 64345 }); 64346 } 64347 e.find(".tabs").tabs(); 64348 if (e.find(".cms-slide")) { 64349 e.find(".cms-slide").each(function() { 64350 if ($(this).children("div").eq(0).height() < $(this).attr("data-height")) return; 64351 var sC = $(this).css({ 64352 "height": $(this).attr("data-height"), 64353 "overflow": "hidden", 64354 "position": "relative" 64355 }); 64356 sC.children("div").eq(0).clone().appendTo(sC); 64357 var i = 0; 64358 var firstHeight = sC.children("div").eq(0).height(); 64359 sC.children("div").css("position", "absolute").each(function() { 64360 $(this).css("top", i * firstHeight); 64361 i++; 64362 }); 64363 var scrollIt = function() { 64364 sC.children("div").each(function() { 64365 $(this).css("top", parseInt($(this).css("top")) - 1); 64366 }); 64367 if (parseInt(sC.children("div").eq(0).css("top")) <= (-1) * parseInt(firstHeight)) { 64368 sC.children("div").eq(0).detach().appendTo(sC); 64369 sC.children("div:last").css("top", (sC.children("div").length - 1) * firstHeight); 64370 } 64371 }; 64372 var sCE = setInterval(scrollIt, 1500 / 32); 64373 sC.hover(function() { 64374 clearInterval(sCE); 64375 }, function() { 64376 sCE = setInterval(scrollIt, 1500 / 32); 64377 }); 64378 }); 64379 } 64380 e.find(".cms-mediaDeleteTrigger").each(function() { 64381 var cb = $(this); 64382 var cbp = $(this).parent(); 64383 var kbtn = $("<a href='#' title='Remove this'><span class='ui-icon ui-icon-circle-close' style='display: inline-block'></span></a>").insertBefore($(this).hide()); 64384 kbtn.click(function() { 64385 cbp.css("display", "none"); 64386 cb.attr("checked", true); 64387 return false;
64388 }); 64389 }); 64390 64391 e.find(".samui-toolbar").each(function() { 64392 var tb = $(this), 64393 out = false; 64394 $(this).find(".icon").css("cursor", "pointer").click(function() { 64395 if (out === true) { 64396 tb.css({ 64397 "left": -1 * (tb.width() - 36) 64398 }); 64399 out = false; 64400 } else { 64401 tb.css("left", 0); 64402 out = true; 64403 } 64404 }); 64405 $(this).css({ 64406 "left": -1 * ($(this).width() - 36) 64407 }); 64408 }); 64409 if (callback !== undefined && typeof callback == "function") { 64410 callback(); 64411 } 64412 if (e.find('.scms-search-dialog')) { 64413 e.find('.scms-search-dialog').on('click', function(ev) { 64414 var $this = $(this), 64415 overlay = S.overlay(), 64416 $data = $this.data('action'), 64417 $modal = $this.data('modal'); 64418 64419 if ($data !== undefined) { 64420 $.ajax({ 64421 type: "GET", 64422 url: SiteConfig.basepath + $data, 64423 success: function(d) { 64424 64425 var buttons = [] 64426 var button1 = $('<button></button>', { 64427 text: 'Close' 64428 }) 64429 .on("click", function() { 64430 overlay.close(); 64431 }); 64432 buttons.push(button1); 64433 overlay.title(d.title); //To appear in a title header div 64434 overlay.content(d.content); //To appear in the main content 64435 overlay.buttons(buttons); //To add a button row 64436 overlay.show(); 64437 $('.tabs').tabs(); 64438 }, 64439 error: function() { 64440 overlay.html('There was a problem loading these details'); 64441 overlay.show(); 64442 } 64443 }); 64444 } 64445 else if ($modal !== undefined) { 64446 overlay.title($this.html()); 64447 overlay.htmlContent(e.find($modal).html()); 64448 overlay.show(); 64449 S.form.run(overlay); 64450 } 64451 ev.preventDefault(); 64452 }); 64453 } 64454 var cmsDropdownDisplay = e.find(".cms-dropdown-display"); 64455 if (cmsDropdownDisplay.length) { 64456 cmsDropdownDisplay.on("change", function() { 64457 var showClass = $("option:selected", this).attr("class"); 64458 $(".cms-dropdown-hide").hide(); 64459 $("." + showClass).fadeIn(); 64460 }); 64461 cmsDropdownDisplay.trigger("change"); 64462 } 64463 /* 64464 * Add email users to the admin area 64465 */ 64466 if (document.URL.indexOf(SiteConfig.basepath + "admin") !== -1) { 64467 var email = $(".CMS-email-users"); 64468 if (email.length) { 64469 email.unbind("click").on('click', function(e) { 64470 S.email.form({ 64471 message: "Add your message here" 64472 }); 64473 e.preventDefault(); 64474 }); 64475 } 64476 } 64477 var documentExchange = $(".CMS-document-exchange-user"); 64478 if (documentExchange.length) { 64479 documentExchange.unbind("click").on("click", function(e) { 64480 overlay = S.overlay(); 64481 var subfolder = document.URL.replace(SiteConfig.basepath, ''); 64482 subfolder = subfolder.substring(0, subfolder.length - 1); 64483 moxman.browse({ 64484 view: 'thumbs', 64485 path: '/' + subfolder, 64486 rootpath: '/assets/' + subfolder, 64487 oninsert: function(args) { 64488 if (documentExchange.hasClass("CMS-document-exchange-attach")) { 64489 var file_string = ''; 64490 $.each(args.files, function(i, e) { 64491 file_string += args.files[i].url + '; '; 64492 }); 64493 $('.CMS-document-exchange-file-path').html(file_string); 64494 } else { 64495 args.preventDefault(); 64496 } 64497 } 64498 }); 64499 setTimeout(closeOverlay, 500); 64500 64501 function closeOverlay() { 64502 if ($('.moxman-container').length > 0) { 64503 overlay.close(); 64504 } else { 64505 setTimeout(closeOverlay, 500); 64506 } 64507 } 64508 e.preventDefault(); 64509 }) 64510 } 64511 /* 64512 * Add moxiemanger view in the admin area 64513 * 64514 * To avoid session checking an login in moxie manager we are allowing the 127.0.0.1 IP address 64515 * to access the moxie manager, but potentially anyone can access to the moxiemanager from the site so 64516 * only if we are in the admin area the register function is bounded and we can trigger the moxie manager 64517 */ 64518 if (document.URL.indexOf(SiteConfig.basepath + "admin") !== -1) { 64519 var documentExchange = $(".CMS-document-exchange"); 64520 if (documentExchange.length) { 64521 documentExchange.unbind("click").on("click", function(e) {
64522 overlay = S.overlay(); 64523 moxman.browse({ 64524 view: 'thumbs', 64525 oninsert: function(args) { 64526 if (documentExchange.hasClass("CMS-document-exchange-attach")) { 64527 var file_string = ''; 64528 $.each(args.files, function(i, e) { 64529 file_string += args.files[i].url + '; '; 64530 }); 64531 $('.CMS-document-exchange-file-path').html(file_string); 64532 } else { 64533 args.preventDefault(); 64534 } 64535 } 64536 }); 64537 setTimeout(closeOverlay, 500); 64538 64539 function closeOverlay() { 64540 if ($('.moxman-container').length > 0) { 64541 overlay.close(); 64542 } else { 64543 setTimeout(closeOverlay, 500); 64544 } 64545 } 64546 e.preventDefault(); 64547 }) 64548 } 64549 /** 64550 * Media Object 64551 * 64552 * this object will bind a specific set of fields to the moxie manager, 64553 * create a dialaog to ask if the user want to change or preview the value 64554 * of the fields and some extra features like make all the fields read-only 64555 * 64556 * @author Matteo Hertel 64557 * @version 0.1 64558 * @license Propery of Samui Design and Management ltd. 64559 * @copyright Copyright (C) 2014 Samui Design and Management 64560 */ 64561 var Media = { 64562 fire: function(config) { 64563 this.config = config; 64564 this.bindEvents(); 64565 //this.boot(); 64566 }, 64567 boot: function() { 64568 this.config.target.each(function(k, el) { 64569 $(el).prop("readonly", true); 64570 }); 64571 }, 64572 bindEvents: function() { 64573 var self = Media; 64574 self.config.target.on('click', self.choose); 64575 }, 64576 choose: function() { 64577 var $this = $(this); 64578 $("<div/>", { 64579 html: "<p>Please choose if you want to preview, change or delete the content</p>" 64580 }).dialog({ 64581 buttons: [{ 64582 text: "Preview", 64583 click: function() { 64584 $(this).dialog("close"); 64585 var value = $this.val(); 64586 if (!value) { 64587 return false; 64588 } 64589 overlay = S.overlay(); 64590 if (value.indexOf(".pdf") !== -1) { 64591 overlay.show(); 64592 var iframe = $("<iframe/>", { 64593 src: value, 64594 height: "600px", 64595 width: overlay.width() 64596 }); 64597 overlay.html(iframe); 64598 } else { 64599 var image = $("<img/>", { 64600 src: value, 64601 height: "100%", 64602 width: "auto", 64603 style: "margin-left: 25%" 64604 }); 64605 overlay.html(image); 64606 overlay.show(); 64607 } 64608 } 64609 }, { 64610 text: "Change", 64611 click: function() { 64612 $(this).dialog("close"); 64613 var path = null; 64614 if ($(".cms-media-input-path").length) { 64615 path = $(".cms-media-input-path").val(); 64616 } 64617 overlay = S.overlay(); 64618 var config = { 64619 view: 'thumbs', 64620 insert: true, 64621 fileds: SiteConfig.basepath, 64622 path: "/Assets/" + ( path ? path : "" ), 64623 oninsert: function(args) { 64624 $this.val(args.focusedFile.url); 64625 } 64626 } 64627 $.extend({}, config, {}); 64628 moxman.browse(config); 64629 setTimeout(closeOverlay, 500); 64630 64631 function closeOverlay() { 64632 if ($('.moxman-container').length > 0) { 64633 overlay.close(); 64634 } else { 64635 setTimeout(closeOverlay, 500); 64636 } 64637 } 64638 } 64639 }, { 64640 text: "Delete", 64641 click: function() { 64642 $(this).dialog("close"); 64643 $this.val(""); 64644 } 64645 }] 64646 }); 64647 }, 64648 other: function() {} 64649 }; 64650 var mediaField = $(".cms-media-input"); 64651 if (mediaField.length) { 64652 Media.fire({ 64653 target: mediaField 64654 }); 64655 } 64656 } 64657 if ($(".permission-selector").length) { 64658 S.permissions.populate(); 64659 } 64660 if (e.find('.simple-scroller').length) { 64661 $(".simple-scroller").simplyScroll(); 64662 } 64663 if (e.find('.smooth-div-scroll').length) { 64664 $(".smooth-div-scroll").each(function(i, e) { 64665 $(e).smoothDivScroll({ 64666 autoScrollingMode: "always", 64667 autoScrollingDirection: "backAndForth", 64668 autoScrollingStep: 1, 64669 autoScrollingInterval: 25 64670 }); 64671 $(e).on("mouseover", function() { 64672 $(this).smoothDivScroll("stopAutoScrolling"); 64673 }).on("mouseout", function() { 64674 $(this).smoothDivScroll("startAutoScrolling"); 64675 }); 64676 }); 64677 } 64678 } 64679 }; 64680 S.form.run($("body")); 64681 /* 64682 * --------------------------SearchRating------------------------------------- 64683 */ 64684 var SearchRating = { 64685 fire: function(config) { 64686 this.config = config; 64687 this.config.clicked = false;
64688 this.config.overlay = null; 64689 this.config.data = {}; 64690 this.bindEvents(); 64691 }, 64692 /* 64693 * bind the click, mouseenter and mouseleave 64694 */ 64695 bindEvents: function() { 64696 var self = SearchRating; 64697 /* 64698 * Create the popup, get data and execute the call 64699 */ 64700 self.config.thumb.on("click", function() { 64701 self.config.clicked = $(this); 64702 self.createOverlay(); 64703 self.getData(); 64704 self.execute(); 64705 }); 64706 }, 64707 /* 64708 * Create the overaly using the Samui object 64709 */ 64710 createOverlay: function() { 64711 var self = SearchRating; 64712 self.config.overlay = S.overlay(); 64713 }, 64714 /* 64715 * get the data 64716 */ 64717 getData: function() { 64718 var self = SearchRating; 64719 self.config.data.search_id = self.config.clicked.data("search"); 64720 self.config.data.rating = self.config.clicked.data("rating"); 64721 }, 64722 updateScore: function() { 64723 var self = SearchRating; 64724 var previousScore = parseInt(self.config.clicked.next(".score").text()); 64725 self.config.clicked.next(".score").text(previousScore + 1); 64726 }, 64727 /* 64728 * function fired if the request is ok 64729 */ 64730 successRequest: function() { 64731 var self = SearchRating; 64732 self.config.overlay.title("Thank you"); 64733 self.config.overlay.content("<h3>Your feedback is highly appreciated and will help us to improve our search system</h3>"); 64734 var buttons = new Array(); 64735 var close = $("<button/>", { 64736 text: "Close" 64737 }).on("click", function() { 64738 self.config.overlay.close(); 64739 }) 64740 buttons.push(close) 64741 self.config.overlay.buttons(buttons); 64742 self.config.overlay.show(); 64743 self.config.thumb.unbind("click"); 64744 self.config.thumb.css("cursor", "default"); 64745 self.updateScore(); 64746 }, 64747 /* 64748 * function fired if an error occurred during the request 64749 */ 64750 failRequest: function() { 64751 var self = SearchRating; 64752 self.config.overlay.content("<h3>An error occurred during the request, please try again later</h3>"); 64753 var buttons = new Array(); 64754 var close = $("<button/>", { 64755 text: "Close" 64756 }).on("click", function() { 64757 self.config.overlay.close(); 64758 }) 64759 buttons.push(close) 64760 self.config.overlay.buttons(buttons); 64761 self.config.overlay.show(); 64762 }, 64763 /* 64764 * execute the call and display a message 64765 */ 64766 execute: function() { 64767 var self = SearchRating; 64768 if (self.config.voted === true) { 64769 self.config.overlay.title("Error"); 64770 self.config.overlay.content("<h3>Sorry but you already rated this search, thank you<h3>"); 64771 var buttons = new Array(); 64772 var close = $("<button/>", { 64773 text: "Close" 64774 }).on("click", function() { 64775 self.config.overlay.close(); 64776 }) 64777 buttons.push(close) 64778 self.config.overlay.buttons(buttons); 64779 self.config.overlay.show(); 64780 } else { 64781 $.ajax({ 64782 type: "POST", 64783 url: SiteConfig.basepath + "API/search/?act=rating", 64784 dataType: "json", 64785 data: { 64786 search_id: self.config.data.search_id, 64787 rating: self.config.data.rating 64788 } 64789 }).done(function(r) { 64790 if (r.status && r.status == "OK") { 64791 self.successRequest(); 64792 } else { 64793 self.failRequest(); 64794 } 64795 }).fail(self.failRequest); 64796 } 64797 }, 64798 }; 64799 /* 64800 * Init the object! 64801 */ 64802 if ($(".searchRating").length) { 64803 SearchRating.fire({ 64804 thumb: $(".searchRating") 64805 }); 64806 } 64807 64808})(jQuery); 64809 64810function captchaFormSubmit(e) { 64811 grecaptcha.ready(function() { 64812 grecaptcha.execute(SiteConfig.recaptcha, {action: 'formSubmission'}).then(function(token) { 64813 64814 $('.captcha-form').submit(); 64815 // Add your logic to submit to your backend server here. 64816 }); 64817 }); 64818} 64819 64820(function($) { 64821 64822 $('.email-notifications-list').DataTable({ 64823 "ajax": $('.email-notifications-list').data("emailusers-notifications-api-url"), 64824 dataSrc: 'data', 64825 processing: true, 64826 "order": [[0,'desc']], 64827 paging: true, 64828 "lengthMenu": [ [10, 25, 50, -1], [10, 25, 50, "All"] ], 64829 "pageLength": 25, 64830 columnDefs: [ 64831 { 64832 targets: [0], 64833 data: "date" 64834 }, 64835 { 64836 targets: [1], 64837 data: "description", 64838 }, 64839 { 64840 targets: [2], 64841 data: "email", 64842 }, 64843 { 64844 targets: [3], 64845 data: "recipients", 64846 } 64847 ], 64848 "language": { 64849 "emptyTable": "No notifications are present", 64850 "zeroRecords": "No notifications are present", 64851 "infoFiltered": "", 64852 "infoEmpty": "Showing 0 entries", 64853 "info": "Showing _TOTAL_ entries", 64854 "processing": "<i class='fal fa-sync fa-spin fa-3x'></i>" 64855 }, 64856 "dom": "lfrtip" 64857 }); 64858 64859 $('.email-archive-list').DataTable({ 64860 "ajax": $('.email-archive-list').data("emailusers-archive-api-url"), 64861 dataSrc: 'data', 64862 processing: true, 64863 "order": [[0,'desc']], 64864 paging: true, 64865 "lengthMenu": [ [10, 25, 50, -1], [10, 25, 50, "All"] ], 64866 "pageLength": 25, 64867 columnDefs: [ 64868 { 64869 targets: [0], 64870 data: "date-sent" 64871 }, 64872 { 64873 targets: [1], 64874 data: "date-read", 64875 }, 64876 { 64877 targets: [2], 64878 data: "description", 64879 }, 64880 { 64881 targets: [3], 64882 data: "email", 64883 }, 64884 { 64885 targets: [4], 64886 data: "view" 64887 } 64888 ], 64889 "language": { 64890 "emptyTable": "No notifications are present", 64891 "zeroRecords": "No notifications are present", 64892 "infoFiltered": "", 64893 "infoEmpty": "Showing 0 entries", 64894 "info": "Showing _TOTAL_ entries", 64895 "processing": "<i class='fal fa-sync fa-spin fa-3x'></i>" 64896 }, 64897 "dom": "lfrtip" 64898 }); 64899 64900 $('.email_user_notification').on('click', function() { 64901 $('.email_user_notification_wrapper').toggle(); 64902 }); 64903
64904 $('.email-user-send').on('click', function(e) { 64905 var overlay = S.overlay(); 64906 64907 var $from = $('[name$=emailUserFrom]'), 64908 $to = $('[name*=emailUserTo]'), 64909 $subject = $('[name$=emailUserSubject]'), 64910 $text = $('[name$=emailUserText]'); 64911 $ignore = $('[name*=emailUserIgnore]'); 64912 $country = $('[name*=emailCountry]'); 64913 64914 if ($from.val() == "" || ($to.length == 0 || $to.val() == "") || $subject.val() == "" || $text.val() == "") { 64915 overlay.title("Errors"); 64916 overlay.htmlContent("<ul>"); 64917 64918 if ($from.val() == "") { 64919 overlay.appendContent("<li>Please select who to send from</li>"); 64920 } 64921 if ($to.length == 0 || $to.val() == "") { 64922 overlay.appendContent("<li>Please select who to send to</li>"); 64923 } 64924 if ($subject.val() == "") { 64925 overlay.appendContent("<li>Please enter a subject</li>"); 64926 } 64927 if ($text.val() == "") { 64928 overlay.appendContent("<li>Please enter email text</li>"); 64929 } 64930 overlay.appendContent("</ul>"); 64931 64932 var buttons = [], 64933 button1 = $('<button></button>', { 64934 text: 'Close', 64935 type: 'submit' 64936 }) 64937 .on("click", function() { 64938 overlay.close(); 64939 }); 64940 64941 buttons.push(button1); 64942 64943 overlay.buttons(buttons); 64944 S.form.run(overlay); 64945 overlay.show(); 64946 } 64947 else { 64948 64949 overlay.title("Confirm Action"); 64950 overlay.content("<p>Are you sure you would like to send this email?</p>"); 64951 64952 var buttons = [], 64953 button1 = $('<button></button>', { 64954 text: 'Close', 64955 type: 'submit' 64956 }) 64957 .on("click", function() { 64958 overlay.close(); 64959 }), 64960 button2 = $('<button></button>', { 64961 text: 'Send' 64962 }) 64963 .on("click", function() { 64964 64965 overlay.clearContent(); 64966 overlay.loading(); 64967 64968 var $to_arr = []; 64969 64970 $to.each(function(i,e) { 64971 $to_arr.push($(e).val()); 64972 }); 64973 var postData = {}; 64974 postData.from = $from.val(); 64975 postData.to = $to_arr; 64976 postData.ignore = $ignore.val(); 64977 postData.country = $country.val(); 64978 postData.subject = $subject.val(); 64979 postData.content = $text.val(); 64980 postData.attachment = $("div.emailUserAttach").html(); 64981 64982 $.ajax({ 64983 url: SiteConfig.basepath+'admin/email-users/?act=notifications/send_email_notification', 64984 type: 'POST', 64985 data: postData, 64986 dataType: 'JSON', 64987 success: function(data) { 64988 if (data.success == "failed") { 64989 overlay.clearContent(); 64990 overlay.content("<p class='errorText'>The following error has occurred. Please close and try again:</p><p class='errorText'>"+data.msg+"</p>"); 64991 } 64992 else if (data.success == "success") { 64993 overlay.close(); 64994 location.reload(); 64995 } 64996 }, 64997 error: function() {} 64998 }); 64999 }); 65000 65001 buttons.push(button1); 65002 buttons.push(button2); 65003 overlay.buttons(buttons); 65004 overlay.show(); 65005 S.form.run(overlay); 65006 } 65007 65008 e.preventDefault(); 65009 }); 65010 65011 $('body').on('click', '.email_user_notification_email_view, .email_user_notification_email_recipients', function(e) { 65012 var $this = $(this), 65013 modal = S.overlay(); 65014 65015 $.ajax({ 65016 url: SiteConfig.basepath+'admin/email-users/?act=archive/view_email_content', 65017 type: 'POST', 65018 data: {'data_string': $this.data("content")}, 65019 dataType: 'HTML', 65020 success: function(data) { 65021 65022 modal.resize("75%"); 65023 modal.title($this.data("title")); 65024 modal.content(data); 65025 modal.show(); 65026 S.form.run(modal); 65027 }, 65028 error: function() {} 65029 }); 65030 e.preventDefault(); 65031 }); 65032})(jQuery); 65033 65034 65035 65036(function($) { 65037 $('.fd-country-select,.hsj-country-select').on('change', function() { 65038 var $this = $(this); 65039 $this.closest('form').submit(); 65040 }); 65041 65042 $('.fd-check-all').on('click', function(e) { 65043 $('.findis-checkbox').prop('checked', true); 65044 e.preventDefault(); 65045 }); 65046 65047 $('.fd-uncheck-all').on('click', function(e) { 65048 $('.findis-checkbox').prop('checked', false); 65049 e.preventDefault(); 65050 }); 65051 65052 $('.hsj-check-all').on('click', function(e) { 65053 $('.hsj-checkbox').prop('checked', true); 65054 e.preventDefault(); 65055 }); 65056 65057 $('.hsj-uncheck-all').on('click', function(e) { 65058 $('.hsj-checkbox').prop('checked', false); 65059 e.preventDefault(); 65060 }); 65061})(jQuery); 65062 65063(function($) { 65064 e = $("body"); 65065 if (e.find(".cms-form-dialog").length) { 65066 e.find(".cms-form-dialog").each(function(i, elem) { 65067 var $this = $(elem); 65068 $this.unbind('click').on('click', function(e) { 65069 var fID = $this.data('form').replace('form::', ''), 65070 recipient = $this.data('email'), 65071 newDiv = S.overlay(); 65072 $.ajax({ 65073 url: SiteConfig.basepath + "admin/form-builder/?act=forms/display_form" + ((fID !== undefined) ? "&request_type=async&act_id=" + fID + "&email=" + recipient : ""), 65074 method: "GET", 65075 dataType: "html", 65076 success: function(r) { 65077 newDiv.html(r); 65078 S.form.run(newDiv); 65079 newDiv.show(); 65080 $('.recaptcha_cms').each(function(i, elem) { 65081 if (typeof Recaptcha == "object") {
65082 Recaptcha.create(SiteConfig.reCaptcha, elem, { 65083 theme: "red", 65084 callback: Recaptcha.focus_response_field 65085 }); 65086 } 65087 }); 65088 $inputs = newDiv.find('form').find("input"); 65089 $inputs.each(function(i, elem) { 65090 var valid_name = $(elem).attr("name").replace('-', '').toLowerCase(); 65091 if ($this.data(valid_name)) { 65092 $(elem).val($this.data(valid_name)); 65093 } 65094 }); 65095 formSubmit = function() { 65096 var form = newDiv.find('form'); 65097 form.on('submit', function(e) { 65098 $.ajax({ 65099 url: SiteConfig.basepath + "admin/form-builder/?act=forms/display_form" + ((fID !== undefined) ? "&request_type=async&act_id=" + fID + "&email=" + recipient : ""), 65100 method: "POST", 65101 data: form.serialize(), 65102 dataType: "html" 65103 }).done(function(r) { 65104 try { 65105 result = $.parseJSON(r); 65106 } catch (e) { 65107 result = false; 65108 } 65109 if (typeof result == "object" && result.status == true) { 65110 window.location.href = result.url; 65111 } else { 65112 newDiv.html(r); 65113 S.form.run(newDiv); 65114 newDiv.show(); 65115 $('.recaptcha_cms').each(function(i, elem) { 65116 if (typeof Recaptcha == "object") { 65117 Recaptcha.create(SiteConfig.reCaptcha, elem, { 65118 theme: "red", 65119 callback: Recaptcha.focus_response_field 65120 }); 65121 } 65122 }); 65123 $.each(form.serializeArray(), function(i, field) { 65124 newDiv.find('[name="' + field.name + '"]').val(field.value); 65125 }); 65126 formSubmit(); 65127 } 65128 }).fail(function(r) { 65129 console.log("failure"); 65130 console.log(r); 65131 }); 65132 e.preventDefault(); 65133 }) 65134 } 65135 formSubmit(); 65136 } 65137 }); 65138 e.preventDefault(); 65139 }); 65140 }); 65141 } 65142})(jQuery); 65143 65144/*! 65145 * Lightbox v2.9.0 65146 * by Lokesh Dhakar 65147 * 65148 * More info: 65149 * http://lokeshdhakar.com/projects/lightbox2/ 65150 * 65151 * Copyright 2007, 2015 Lokesh Dhakar 65152 * Released under the MIT license 65153 * https://github.com/lokesh/lightbox2/blob/master/LICENSE 65154 * 65155 * @preserve 65156 */ 65157 65158// Uses Node, AMD or browser globals to create a module. 65159(function (root, factory) { 65160 if (typeof define === 'function' && define.amd) { 65161 // AMD. Register as an anonymous module. 65162 define(['jquery'], factory); 65163 } else if (typeof exports === 'object') { 65164 // Node. Does not work with strict CommonJS, but 65165 // only CommonJS-like environments that support module.exports, 65166 // like Node. 65167 module.exports = factory(require('jquery')); 65168 } else { 65169 // Browser globals (root is window) 65170 root.lightbox = factory(root.jQuery); 65171 } 65172}(this, function ($) { 65173 65174 function Lightbox(options) { 65175 this.album = []; 65176 this.currentImageIndex = void 0; 65177 this.init(); 65178 65179 // options 65180 this.options = $.extend({}, this.constructor.defaults); 65181 this.option(options); 65182 } 65183 65184 // Descriptions of all options available on the demo site: 65185 // http://lokeshdhakar.com/projects/lightbox2/index.html#options 65186 Lightbox.defaults = { 65187 albumLabel: 'Image %1 of %2', 65188 alwaysShowNavOnTouchDevices: false, 65189 fadeDuration: 600, 65190 fitImagesInViewport: true, 65191 imageFadeDuration: 600, 65192 // maxWidth: 800, 65193 // maxHeight: 600, 65194 positionFromTop: 50, 65195 resizeDuration: 700, 65196 showImageNumberLabel: true, 65197 wrapAround: false, 65198 disableScrolling: false, 65199 /* 65200 Sanitize Title 65201 If the caption data is trusted, for example you are hardcoding it in, then leave this to false. 65202 This will free you to add html tags, such as links, in the caption. 65203 65204 If the caption data is user submitted or from some other untrusted source, then set this to true 65205 to prevent xss and other injection attacks. 65206 */ 65207 sanitizeTitle: false 65208 }; 65209 65210 Lightbox.prototype.option = function(options) { 65211 $.extend(this.options, options); 65212 }; 65213 65214 Lightbox.prototype.imageCountLabel = function(currentImageNum, totalImages) { 65215 return this.options.albumLabel.replace(/%1/g, currentImageNum).replace(/%2/g, totalImages); 65216 }; 65217 65218 Lightbox.prototype.init = function() { 65219 var self = this; 65220 // Both enable and build methods require the body tag to be in the DOM. 65221 $(document).ready(function() { 65222 self.enable(); 65223 self.build(); 65224 }); 65225 }; 65226 65227 // Loop through anchors and areamaps looking for either data-lightbox attributes or rel attributes 65228 // that contain 'lightbox'. When these are clicked, start lightbox. 65229 Lightbox.prototype.enable = function() { 65230 var self = this; 65231 $('body').on('click', 'a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]', function(event) { 65232 self.start($(event.currentTarget)); 65233 return false;
65234 }); 65235 }; 65236 65237 // Build html for the lightbox and the overlay. 65238 // Attach event handlers to the new DOM elements. click click click 65239 Lightbox.prototype.build = function() { 65240 var self = this; 65241 $('<div id="lightboxOverlay" class="lightboxOverlay"></div><div id="lightbox" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo($('body')); 65242 65243 // Cache jQuery objects 65244 this.$lightbox = $('#lightbox'); 65245 this.$overlay = $('#lightboxOverlay'); 65246 this.$outerContainer = this.$lightbox.find('.lb-outerContainer'); 65247 this.$container = this.$lightbox.find('.lb-container'); 65248 this.$image = this.$lightbox.find('.lb-image'); 65249 this.$nav = this.$lightbox.find('.lb-nav'); 65250 65251 // Store css values for future lookup 65252 this.containerPadding = { 65253 top: parseInt(this.$container.css('padding-top'), 10), 65254 right: parseInt(this.$container.css('padding-right'), 10), 65255 bottom: parseInt(this.$container.css('padding-bottom'), 10), 65256 left: parseInt(this.$container.css('padding-left'), 10) 65257 }; 65258 65259 this.imageBorderWidth = { 65260 top: parseInt(this.$image.css('border-top-width'), 10), 65261 right: parseInt(this.$image.css('border-right-width'), 10), 65262 bottom: parseInt(this.$image.css('border-bottom-width'), 10), 65263 left: parseInt(this.$image.css('border-left-width'), 10) 65264 }; 65265 65266 // Attach event handlers to the newly minted DOM elements 65267 this.$overlay.hide().on('click', function() { 65268 self.end(); 65269 return false; 65270 }); 65271 65272 this.$lightbox.hide().on('click', function(event) { 65273 if ($(event.target).attr('id') === 'lightbox') { 65274 self.end(); 65275 } 65276 return false; 65277 }); 65278 65279 this.$outerContainer.on('click', function(event) { 65280 if ($(event.target).attr('id') === 'lightbox') { 65281 self.end(); 65282 } 65283 return false; 65284 }); 65285 65286 this.$lightbox.find('.lb-prev').on('click', function() { 65287 if (self.currentImageIndex === 0) { 65288 self.changeImage(self.album.length - 1); 65289 } else { 65290 self.changeImage(self.currentImageIndex - 1); 65291 } 65292 return false; 65293 }); 65294 65295 this.$lightbox.find('.lb-next').on('click', function() { 65296 if (self.currentImageIndex === self.album.length - 1) { 65297 self.changeImage(0); 65298 } else { 65299 self.changeImage(self.currentImageIndex + 1); 65300 } 65301 return false; 65302 }); 65303 65304 /* 65305 Show context menu for image on right-click 65306 65307 There is a div containing the navigation that spans the entire image and lives above of it. If 65308 you right-click, you are right clicking this div and not the image. This prevents users from 65309 saving the image or using other context menu actions with the image. 65310 65311 To fix this, when we detect the right mouse button is pressed down, but not yet clicked, we 65312 set pointer-events to none on the nav div. This is so that the upcoming right-click event on 65313 the next mouseup will bubble down to the image. Once the right-click/contextmenu event occurs 65314 we set the pointer events back to auto for the nav div so it can capture hover and left-click 65315 events as usual. 65316 */ 65317 this.$nav.on('mousedown', function(event) { 65318 if (event.which === 3) { 65319 self.$nav.css('pointer-events', 'none'); 65320 65321 self.$lightbox.one('contextmenu', function() { 65322 setTimeout(function() { 65323 this.$nav.css('pointer-events', 'auto'); 65324 }.bind(self), 0); 65325 }); 65326 } 65327 }); 65328 65329 65330 this.$lightbox.find('.lb-loader, .lb-close').on('click', function() { 65331 self.end(); 65332 return false; 65333 }); 65334 }; 65335 65336 // Show overlay and lightbox. If the image is part of a set, add siblings to album array. 65337 Lightbox.prototype.start = function($link) { 65338 var self = this; 65339 var $window = $(window); 65340 65341 $window.on('resize', $.proxy(this.sizeOverlay, this)); 65342 65343 $('select, object, embed').css({ 65344 visibility: 'hidden' 65345 }); 65346 65347 this.sizeOverlay(); 65348 65349 this.album = []; 65350 var imageNumber = 0; 65351 65352 function addToAlbum($link) { 65353 self.album.push({ 65354 link: $link.attr('href'), 65355 title: $link.attr('data-title') || $link.attr('title') 65356 }); 65357 } 65358
65359 // Support both data-lightbox attribute and rel attribute implementations 65360 var dataLightboxValue = $link.attr('data-lightbox'); 65361 var $links; 65362 65363 if (dataLightboxValue) { 65364 $links = $($link.prop('tagName') + '[data-lightbox="' + dataLightboxValue + '"]'); 65365 for (var i = 0; i < $links.length; i = ++i) { 65366 addToAlbum($($links[i])); 65367 if ($links[i] === $link[0]) { 65368 imageNumber = i; 65369 } 65370 } 65371 } else { 65372 if ($link.attr('rel') === 'lightbox') { 65373 // If image is not part of a set 65374 addToAlbum($link); 65375 } else { 65376 // If image is part of a set 65377 $links = $($link.prop('tagName') + '[rel="' + $link.attr('rel') + '"]'); 65378 for (var j = 0; j < $links.length; j = ++j) { 65379 addToAlbum($($links[j])); 65380 if ($links[j] === $link[0]) { 65381 imageNumber = j; 65382 } 65383 } 65384 } 65385 } 65386 65387 // Position Lightbox 65388 var top = $window.scrollTop() + this.options.positionFromTop; 65389 var left = $window.scrollLeft(); 65390 this.$lightbox.css({ 65391 top: top + 'px', 65392 left: left + 'px' 65393 }).fadeIn(this.options.fadeDuration); 65394 65395 // Disable scrolling of the page while open 65396 if (this.options.disableScrolling) { 65397 $('body').addClass('lb-disable-scrolling'); 65398 } 65399 65400 this.changeImage(imageNumber); 65401 }; 65402 65403 // Hide most UI elements in preparation for the animated resizing of the lightbox. 65404 Lightbox.prototype.changeImage = function(imageNumber) { 65405 var self = this; 65406 65407 this.disableKeyboardNav(); 65408 var $image = this.$lightbox.find('.lb-image'); 65409 65410 this.$overlay.fadeIn(this.options.fadeDuration); 65411 65412 $('.lb-loader').fadeIn('slow'); 65413 this.$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide(); 65414 65415 this.$outerContainer.addClass('animating'); 65416 65417 // When image to show is preloaded, we send the width and height to sizeContainer() 65418 var preloader = new Image(); 65419 preloader.onload = function() { 65420 var $preloader; 65421 var imageHeight; 65422 var imageWidth; 65423 var maxImageHeight; 65424 var maxImageWidth; 65425 var windowHeight; 65426 var windowWidth; 65427 65428 $image.attr('src', self.album[imageNumber].link); 65429 65430 $preloader = $(preloader); 65431 65432 $image.width(preloader.width); 65433 $image.height(preloader.height); 65434 65435 if (self.options.fitImagesInViewport) { 65436 // Fit image inside the viewport. 65437 // Take into account the border around the image and an additional 10px gutter on each side. 65438 65439 windowWidth = $(window).width(); 65440 windowHeight = $(window).height(); 65441 maxImageWidth = windowWidth - self.containerPadding.left - self.containerPadding.right - self.imageBorderWidth.left - self.imageBorderWidth.right - 20; 65442 maxImageHeight = windowHeight - self.containerPadding.top - self.containerPadding.bottom - self.imageBorderWidth.top - self.imageBorderWidth.bottom - 120; 65443 65444 // Check if image size is larger then maxWidth|maxHeight in settings 65445 if (self.options.maxWidth && self.options.maxWidth < maxImageWidth) { 65446 maxImageWidth = self.options.maxWidth; 65447 } 65448 if (self.options.maxHeight && self.options.maxHeight < maxImageWidth) { 65449 maxImageHeight = self.options.maxHeight; 65450 } 65451 65452 // Is the current image's width or height is greater than the maxImageWidth or maxImageHeight 65453 // option than we need to size down while maintaining the aspect ratio. 65454 if ((preloader.width > maxImageWidth) || (preloader.height > maxImageHeight)) { 65455 if ((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)) { 65456 imageWidth = maxImageWidth; 65457 imageHeight = parseInt(preloader.height / (preloader.width / imageWidth), 10); 65458 $image.width(imageWidth); 65459 $image.height(imageHeight); 65460 } else { 65461 imageHeight = maxImageHeight; 65462 imageWidth = parseInt(preloader.width / (preloader.height / imageHeight), 10); 65463 $image.width(imageWidth); 65464 $image.height(imageHeight); 65465 } 65466 } 65467 } 65468 self.sizeContainer($image.width(), $image.height()); 65469 }; 65470 65471 preloader.src = this.album[imageNumber].link; 65472 this.currentImageIndex = imageNumber; 65473 }; 65474 65475 // Stretch overlay to fit the viewport 65476 Lightbox.prototype.sizeOverlay = function() { 65477 this.$overlay 65478 .width($(document).width()) 65479 .height($(document).height()); 65480 }; 65481 65482 // Animate the size of the lightbox to fit the image we are showing 65483 Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) { 65484 var self = this; 65485 65486 var oldWidth = this.$outerContainer.outerWidth(); 65487 var oldHeight = this.$outerContainer.outerHeight(); 65488 var newWidth = imageWidth + this.containerPadding.left + this.containerPadding.right + this.imageBorderWidth.left + this.imageBorderWidth.right; 65489 var newHeight = imageHeight + this.containerPadding.top + this.containerPadding.bottom + this.imageBorderWidth.top + this.imageBorderWidth.bottom; 65490 65491 function postResize() { 65492 self.$lightbox.find('.lb-dataContainer').width(newWidth); 65493 self.$lightbox.find('.lb-prevLink').height(newHeight); 65494 self.$lightbox.find('.lb-nextLink').height(newHeight); 65495 self.showImage(); 65496 } 65497 65498 if (oldWidth !== newWidth || oldHeight !== newHeight) { 65499 this.$outerContainer.animate({ 65500 width: newWidth, 65501 height: newHeight 65502 }, this.options.resizeDuration, 'swing', function() { 65503 postResize(); 65504 }); 65505 } else { 65506 postResize(); 65507 } 65508 }; 65509 65510 // Display the image and its details and begin preload neighboring images. 65511 Lightbox.prototype.showImage = function() { 65512 this.$lightbox.find('.lb-loader').stop(true).hide(); 65513 this.$lightbox.find('.lb-image').fadeIn(this.options.imageFadeDuration); 65514 65515 this.updateNav(); 65516 this.updateDetails(); 65517 this.preloadNeighboringImages(); 65518 this.enableKeyboardNav(); 65519 }; 65520 65521 // Display previous and next navigation if appropriate. 65522 Lightbox.prototype.updateNav = function() { 65523 // Check to see if the browser supports touch events. If so, we take the conservative approach 65524 // and assume that mouse hover events are not supported and always show prev/next navigation 65525 // arrows in image sets. 65526 var alwaysShowNav = false;
65527 try { 65528 document.createEvent('TouchEvent'); 65529 alwaysShowNav = (this.options.alwaysShowNavOnTouchDevices) ? true : false; 65530 } catch (e) {} 65531 65532 this.$lightbox.find('.lb-nav').show(); 65533 65534 if (this.album.length > 1) { 65535 if (this.options.wrapAround) { 65536 if (alwaysShowNav) { 65537 this.$lightbox.find('.lb-prev, .lb-next').css('opacity', '1'); 65538 } 65539 this.$lightbox.find('.lb-prev, .lb-next').show(); 65540 } else { 65541 if (this.currentImageIndex > 0) { 65542 this.$lightbox.find('.lb-prev').show(); 65543 if (alwaysShowNav) { 65544 this.$lightbox.find('.lb-prev').css('opacity', '1'); 65545 } 65546 } 65547 if (this.currentImageIndex < this.album.length - 1) { 65548 this.$lightbox.find('.lb-next').show(); 65549 if (alwaysShowNav) { 65550 this.$lightbox.find('.lb-next').css('opacity', '1'); 65551 } 65552 } 65553 } 65554 } 65555 }; 65556 65557 // Display caption, image number, and closing button. 65558 Lightbox.prototype.updateDetails = function() { 65559 var self = this; 65560 65561 // Enable anchor clicks in the injected caption html. 65562 // Thanks Nate Wright for the fix. @https://github.com/NateWr 65563 if (typeof this.album[this.currentImageIndex].title !== 'undefined' && 65564 this.album[this.currentImageIndex].title !== '') { 65565 var $caption = this.$lightbox.find('.lb-caption'); 65566 if (this.options.sanitizeTitle) { 65567 $caption.text(this.album[this.currentImageIndex].title); 65568 } else { 65569 $caption.html(this.album[this.currentImageIndex].title); 65570 } 65571 $caption.fadeIn('fast') 65572 .find('a').on('click', function(event) { 65573 if ($(this).attr('target') !== undefined) { 65574 window.open($(this).attr('href'), $(this).attr('target')); 65575 } else { 65576 location.href = $(this).attr('href'); 65577 } 65578 }); 65579 } 65580 65581 if (this.album.length > 1 && this.options.showImageNumberLabel) { 65582 var labelText = this.imageCountLabel(this.currentImageIndex + 1, this.album.length); 65583 this.$lightbox.find('.lb-number').text(labelText).fadeIn('fast'); 65584 } else { 65585 this.$lightbox.find('.lb-number').hide(); 65586 } 65587 65588 this.$outerContainer.removeClass('animating'); 65589 65590 this.$lightbox.find('.lb-dataContainer').fadeIn(this.options.resizeDuration, function() { 65591 return self.sizeOverlay(); 65592 }); 65593 }; 65594 65595 // Preload previous and next images in set. 65596 Lightbox.prototype.preloadNeighboringImages = function() { 65597 if (this.album.length > this.currentImageIndex + 1) { 65598 var preloadNext = new Image(); 65599 preloadNext.src = this.album[this.currentImageIndex + 1].link; 65600 } 65601 if (this.currentImageIndex > 0) { 65602 var preloadPrev = new Image(); 65603 preloadPrev.src = this.album[this.currentImageIndex - 1].link; 65604 } 65605 }; 65606 65607 Lightbox.prototype.enableKeyboardNav = function() { 65608 $(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this)); 65609 }; 65610 65611 Lightbox.prototype.disableKeyboardNav = function() { 65612 $(document).off('.keyboard'); 65613 }; 65614 65615 Lightbox.prototype.keyboardAction = function(event) { 65616 var KEYCODE_ESC = 27; 65617 var KEYCODE_LEFTARROW = 37; 65618 var KEYCODE_RIGHTARROW = 39; 65619 65620 var keycode = event.keyCode; 65621 var key = String.fromCharCode(keycode).toLowerCase(); 65622 if (keycode === KEYCODE_ESC || key.match(/x|o|c/)) { 65623 this.end(); 65624 } else if (key === 'p' || keycode === KEYCODE_LEFTARROW) { 65625 if (this.currentImageIndex !== 0) { 65626 this.changeImage(this.currentImageIndex - 1); 65627 } else if (this.options.wrapAround && this.album.length > 1) { 65628 this.changeImage(this.album.length - 1); 65629 } 65630 } else if (key === 'n' || keycode === KEYCODE_RIGHTARROW) { 65631 if (this.currentImageIndex !== this.album.length - 1) { 65632 this.changeImage(this.currentImageIndex + 1); 65633 } else if (this.options.wrapAround && this.album.length > 1) { 65634 this.changeImage(0); 65635 } 65636 } 65637 }; 65638 65639 // Closing time. :-( 65640 Lightbox.prototype.end = function() { 65641 this.disableKeyboardNav(); 65642 $(window).off('resize', this.sizeOverlay); 65643 this.$lightbox.fadeOut(this.options.fadeDuration); 65644 this.$overlay.fadeOut(this.options.fadeDuration); 65645 $('select, object, embed').css({ 65646 visibility: 'visible' 65647 }); 65648 if (this.options.disableScrolling) { 65649 $('body').removeClass('lb-disable-scrolling'); 65650 } 65651 }; 65652 65653 return new Lightbox(); 65654})); 65655 65656 65657/** 65658 * Copyright (c) 2012 Anders Ekdahl (http://coffeescripter.com/) 65659 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 65660 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 65661 * 65662 * Version: 1.2.7 65663 * 65664 * Demo and documentation: http://coffeescripter.com/code/ad-gallery/ 65665 */ 65666(function($){$.fn.adGallery=function(options){var defaults={loader_image:'loader.gif',start_at_index:0,update_window_hash:true,description_wrapper:false,thumb_opacity:0.7,animate_first_image:false,animation_speed:400,width:false,height:false,display_next_and_prev:true,display_back_and_forward:true,scroll_jump:0,slideshow:{enable:true,autostart:false,speed:5000,start_label:'Start',stop_label:'Stop',stop_on_scroll:true,countdown_prefix:'(',countdown_suf
65666ix:')',onStart:false,onStop:false},effect:'slide-hori',enable_keyboard_move:true,cycle:true,hooks:{displayDescription:false},callbacks:{init:false,afterImageVisible:false,beforeImageVisible:false}};var settings=$.extend(false,defaults,options);if(options&&options.slideshow){settings.slideshow=$.extend(false,defaults.slideshow,options.slideshow);};if(!settings.slideshow.enable){settings.slideshow.autostart=false;};var galleries=[];$(this).each(function(){var gallery=new AdGallery(this,settings);galleries[galleries.length]=gallery;});return galleries;};function VerticalSlideAnimation(img_container,direction,desc){var current_top=parseInt(img_container.css('top'),10);if(direction=='left'){var old_image_top='-'+this.image_wrapper_height+'px';img_container.css('top',this.image_wrapper_height+'px');}else{var old_image_top=this.image_wrapper_height+'px';img_container.css('top','-'+this.image_wrapper_height+'px');};if(desc){desc.css('bottom','-'+desc[0].offsetHeight+'px');desc.animate({bottom:0},this.settings.animation_speed*2);};if(this.current_description){this.current_description.animate({bottom:'-'+this.current_description[0].offsetHeight+'px'},this.settings.animation_speed*2);};return{old_image:{top:old_image_top},new_image:{top:current_top}};};function HorizontalSlideAnimation(img_container,direction,desc){var current_left=parseInt(img_container.css('left'),10);if(direction=='left'){var old_image_left='-'+this.image_wrapper_width+'px';img_container.css('left',this.image_wrapper_width+'px');}else{var old_image_left=this.image_wrapper_width+'px';img_container.css('left','-'+this.image_wrapper_width+'px');};if(desc){desc.css('bottom','-'+desc[0].offsetHeight+'px');desc.animate({bottom:0},this.settings.animation_speed*2);};if(this.current_description){this.current_description.animate({bottom:'-'+this.current_description[0].offsetHeight+'px'},this.settings.animation_speed*2);};return{old_image:{left:old_image_left},new_image:{left:current_left}};};function ResizeAnimation(img_container,direction,desc){var image_width=img_container.width();var image_height=img_container.height();var current_left=parseInt(img_container.css('left'),10);var current_top=parseInt(img_container.css('top'),10);img_container.css({width:0,height:0,top:this.image_wrapper_height/2,left:this.image_wrapper_width/2});return{old_image:{width:0,height:0,top:this.image_wrapper_height/2,left:this.image_wrapper_width/2},new_image:{width:image_width,height:image_height,top:current_top,left:current_left}};};function FadeAnimation(img_container,direction,desc){img_container.css('opacity',0);return{old_image:{opacity:0},new_image:{opacity:1}};};function NoneAnimation(img_container,direction,desc){img_container.css('opacity',0);return{old_image:{opacity:0},new_image:{opacity:1},speed:0};};function AdGallery(wrapper,settings){this.init(wrapper,settings);};AdGallery.prototype={wrapper:false,image_wrapper:false,gallery_info:false,nav:false,loader:false,preloads:false,thumbs_wrapper:false,thumbs_wrapper_width:0,scroll_back:false,scroll_forward:false,next_link:false,prev_link:false,slideshow:false,image_wrapper_width:0,image_wrapper_height:0,current_index:-1,current_image:false,current_description:false,nav_display_width:0,settings:false,images:false,in_transition:false,animations:false,init:function(wrapper,settings){var context=this;this.wrapper=$(wrapper);this.settings=settings;this.setupElements();this.setupAnimations();if(this.settings.width){this.image_wrapper_width=this.settings.width;this.image_wrapper.width(this.settings.width);this.wrapper.width(this.settings.width);}else{this.image_wrapper_width=this.image_wrapper.width();};if(this.settings.height){this.image_wrapper_height=this.settings.height;this.image_wrapper.height(this.settings.height);}else{this.image_wrapper_height=this.image_wrapper.height();};this.nav_display_width=this.nav.width();this.current_index=-1;this.current_image=false;this.current_description=false;this.in_transition=false;this.findImages();if(this.settings.display_next_and_prev){this.initNextAndPrev();};var nextimage_callback=function(callback){return context.nextImage(callback);};this.slideshow=new AdGallerySlideshow(nextimage_callback,this.settings.slideshow);this.controls.append(this.slideshow.create());if(this.settings.slideshow.enable){this.slideshow.enable();}else{this.slideshow.disable();};if(this.settings.display_back_and_forward){this.initBackAndForward();};if(this.settings.enable_keyboard_move){this.initKeyEvents();};this.initHashChange();var start_at=parseInt(this.settings.start_at_index,10);if(typeof this.getIndexFromHash()!="undefined"){start_at=this.getIndexFromHash();};this.loading(true);this.showImage(start_at,function(){if(context.settings.slideshow.autostart){context.preloadImage(start_at+1);context.slideshow.start();};});this.fireCallback(this.settings.callbacks.init);},setupAnimations:function(){this.animations={'slide-vert':VerticalSlideAnimation,'slide-hori':HorizontalSlideAnimation,'resize':ResizeAnimation,'fade':FadeAnimation,'none':NoneAnimation};},setupElements:function(){this.controls=this.wrapper.find('.ad-controls');this.gallery_info=$('<p class="ad-info"></p>');this.controls.append(this.gallery_info);this.image_wrapper=this.wrapper.find('.ad-image-wrapper');this.image_wrapper.empty();this.nav=this.wrapper.find('.ad-nav');this.thumbs_wrapper=this.nav.find('.ad-thumbs');this.preloads=$('<div class="ad-preloads"></div>');this.loader=$('<img class="ad-loader" src="'+this.settings.loader_image+'">');this.image_wrapper.append(this.loader);this.loader.hide();$(document.body).append(this.preloads);},loading:function(bool){if(bool){this.loader.show();}else{this.loader.hide();};},addAnimation:function(name,fn){if($.isFunction(fn)){this.animations[name]=fn;};},findImages:function(){var context=this;this.images=[];var thumbs_loaded=0;var thumbs=this.thumbs_wrapper.find('a');var thumb_count=thumbs.length;if(this.settings.thumb_opacity<1){thumbs.find('img').css('opacity',this.settings.thumb_opacity);};thumbs.each(function(i){var link=$(this);link.data("ad-i",i);var image_src=link.attr('href');var thumb=link.find('img');context.whenImageLoaded(thumb[0],function(){var width=thumb[0].parentNode.parentNode.offsetWidth;if(thumb[0].width==0){width=100;};context.thumbs_wrapper_width+=width;thumbs_loaded++;});context._initLink(link);
65666context.images[i]=context._createImageData(link,image_src);});var inter=setInterval(function(){if(thumb_count==thumbs_loaded){context._setThumbListWidth(context.thumbs_wrapper_width);clearInterval(inter);};},100);},_setThumbListWidth:function(wrapper_width){wrapper_width-=100;var list=this.nav.find('.ad-thumb-list');list.css('width',wrapper_width+'px');var i=1;var last_height=list.height();while(i<201){list.css('width',(wrapper_width+i)+'px');if(last_height!=list.height()){break;};last_height=list.height();i++;};if(list.width()<this.nav.width()){list.width(this.nav.width());};},_initLink:function(link){var context=this;link.click(function(){context.showImage(link.data("ad-i"));context.slideshow.stop();return false;}).hover(function(){if(!$(this).is('.ad-active')&&context.settings.thumb_opacity<1){$(this).find('img').fadeTo(300,1);};context.preloadImage(link.data("ad-i"));},function(){if(!$(this).is('.ad-active')&&context.settings.thumb_opacity<1){$(this).find('img').fadeTo(300,context.settings.thumb_opacity);};});},_createImageData:function(thumb_link,image_src){var link=false;var thumb_img=thumb_link.find("img");if(thumb_img.data('ad-link')){link=thumb_link.data('ad-link');}else if(thumb_img.attr('longdesc')&&thumb_img.attr('longdesc').length){link=thumb_img.attr('longdesc');};var desc=false;if(thumb_img.data('ad-desc')){desc=thumb_img.data('ad-desc');}else if(thumb_img.attr('alt')&&thumb_img.attr('alt').length){desc=thumb_img.attr('alt');};var title=false;if(thumb_img.data('ad-title')){title=thumb_img.data('ad-title');}else if(thumb_img.attr('title')&&thumb_img.attr('title').length){title=thumb_img.attr('title');};return{thumb_link:thumb_link,image:image_src,error:false,preloaded:false,desc:desc,title:title,size:false,link:link};},initKeyEvents:function(){var context=this;$(document).keydown(function(e){if(e.keyCode==39){context.nextImage();context.slideshow.stop();}else if(e.keyCode==37){context.prevImage();context.slideshow.stop();};});},getIndexFromHash:function(){if(window.location.hash&&window.location.hash.indexOf('#ad-image-')===0){var id=window.location.hash.replace(/^#ad-image-/g,'');var thumb=this.thumbs_wrapper.find("#"+id);if(thumb.length){return this.thumbs_wrapper.find("a").index(thumb);}else if(!isNaN(parseInt(id,10))){return parseInt(id,10);};};return undefined;},removeImage:function(index){if(index<0||index>=this.images.length){throw"Cannot remove image for index "+index;};var image=this.images[index];this.images.splice(index,1);var thumb_link=image.thumb_link;var thumb_width=thumb_link[0].parentNode.offsetWidth;this.thumbs_wrapper_width-=thumb_width;thumb_link.remove();this._setThumbListWidth(this.thumbs_wrapper_width);this.gallery_info.html((this.current_index+1)+' / '+this.images.length);this.thumbs_wrapper.find('a').each(function(i){$(this).data("ad-i",i);});if(index==this.current_index&&this.images.length!=0){this.showImage(0);};},removeAllImages:function(){for(var i=this.images.length-1;i>=0;i--){this.removeImage(i);};},addImage:function(thumb_url,image_url,image_id,title,description){image_id=image_id||"";title=title||"";description=description||"";var li=$('<li><a href="'+image_url+'" id="'+image_id+'">'+'<img src="'+thumb_url+'" title="'+title+'" alt="'+description+'">'+'</a></li>');var context=this;this.thumbs_wrapper.find("ul").append(li);var link=li.find("a");var thumb=link.find("img");thumb.css('opacity',this.settings.thumb_opacity);this.whenImageLoaded(thumb[0],function(){var thumb_width=thumb[0].parentNode.parentNode.offsetWidth;if(thumb[0].width==0){thumb_width=100;};context.thumbs_wrapper_width+=thumb_width;context._setThumbListWidth(context.thumbs_wrapper_width);});var i=this.images.length;link.data("ad-i",i);this._initLink(link);this.images[i]=context._createImageData(link,image_url);this.gallery_info.html((this.current_index+1)+' / '+this.images.length);},initHashChange:function(){var context=this;if("onhashchange"in window){$(window).bind("hashchange",function(){var index=context.getIndexFromHash();if(typeof index!="undefined"&&index!=context.current_index){context.showImage(index);};});}else{var current_hash=window.location.hash;setInterval(function(){if(window.location.hash!=current_hash){current_hash=window.location.hash;var index=context.getIndexFromHash();if(typeof index!="undefined"&&index!=context.current_index){context.showImage(index);};};},200);};},initNextAndPrev:function(){this.next_link=$('<div class="ad-next"><div class="ad-next-image"></div></div>');this.prev_link=$('<div class="ad-prev"><div class="ad-prev-image"></div></div>');this.image_wrapper.append(this.next_link);this.image_wrapper.append(this.prev_link);var context=this;this.prev_link.add(this.next_link).mouseover(function(e){$(this).css('height',context.
65666image_wrapper_height);$(this).find('div').show();}).mouseout(function(e){$(this).find('div').hide();}).click(function(){if($(this).is('.ad-next')){context.nextImage();context.slideshow.stop();}else{context.prevImage();context.slideshow.stop();};}).find('div').css('opacity',0.7);},initBackAndForward:function(){var context=this;this.scroll_forward=$('<div class="ad-forward"></div>');this.scroll_back=$('<div class="ad-back"></div>');this.nav.append(this.scroll_forward);this.nav.prepend(this.scroll_back);var has_scrolled=0;var thumbs_scroll_interval=false;$(this.scroll_back).add(this.scroll_forward).click(function(){var width=context.nav_display_width-50;if(context.settings.scroll_jump>0){var width=context.settings.scroll_jump;};if($(this).is('.ad-forward')){var left=context.thumbs_wrapper.scrollLeft()+width;}else{var left=context.thumbs_wrapper.scrollLeft()-width;};if(context.settings.slideshow.stop_on_scroll){context.slideshow.stop();};context.thumbs_wrapper.animate({scrollLeft:left+'px'});return false;}).css('opacity',0.6).hover(function(){var direction='left';if($(this).is('.ad-forward')){direction='right';};thumbs_scroll_interval=setInterval(function(){has_scrolled++;if(has_scrolled>30&&context.settings.slideshow.stop_on_scroll){context.slideshow.stop();};var left=context.thumbs_wrapper.scrollLeft()+1;if(direction=='left'){left=context.thumbs_wrapper.scrollLeft()-1;};context.thumbs_wrapper.scrollLeft(left);},10);$(this).css('opacity',1);},function(){has_scrolled=0;clearInterval(thumbs_scroll_interval);$(this).css('opacity',0.6);});},_afterShow:function(){this.gallery_info.html((this.current_index+1)+' / '+this.images.length);if(!this.settings.cycle){this.prev_link.show().css('height',this.image_wrapper_height);this.next_link.show().css('height',this.image_wrapper_height);if(this.current_index==(this.images.length-1)){this.next_link.hide();};if(this.current_index==0){this.prev_link.hide();};};if(this.settings.update_window_hash){var thumb_link=this.images[this.current_index].thumb_link;if(thumb_link.attr("id")){window.location.hash="#ad-image-"+thumb_link.attr("id");}else{window.location.hash="#ad-image-"+this.current_index;};};this.fireCallback(this.settings.callbacks.afterImageVisible);},_getContainedImageSize:function(image_width,image_height){if(image_height>this.image_wrapper_height){var ratio=image_width/image_height;image_height=this.image_wrapper_height;image_width=this.image_wrapper_height*ratio;};if(image_width>this.image_wrapper_width){var ratio=image_height/image_width;image_width=this.image_wrapper_width;image_height=this.image_wrapper_width*ratio;};return{width:image_width,height:image_height};},_centerImage:function(img_container,image_width,image_height){img_container.css('top','0px');if(image_height<this.image_wrapper_height){var dif=this.image_wrapper_height-image_height;img_container.css('top',(dif/2)+'px');};img_container.css('left','0px');if(image_width<this.image_wrapper_width){var dif=this.image_wrapper_width-image_width;img_container.css('left',(dif/2)+'px');};},_getDescription:function(image){var desc=false;if(image.desc.length||image.title.length){var title='';if(image.title.length){title='<strong class="ad-description-title">'+image.title+'</strong>';};var desc='';if(image.desc.length){desc='<span>'+image.desc+'</span>';};desc=$('<p class="ad-image-description">'+title+desc+'</p>');};return desc;},showImage:function(index,callback){if(this.images[index]&&!this.in_transition&&index!=this.current_index){var context=this;var image=this.images[index];this.in_transition=true;if(!image.preloaded){this.loading(true);this.preloadImage(index,function(){context.loading(false);context._showWhenLoaded(index,callback);});}else{this._showWhenLoaded(index,callback);};};},_showWhenLoaded:function(index,callback){if(this.images[index]){var context=this;var image=this.images[index];var img_container=$(document.createElement('div')).addClass('ad-image');var img=$(new Image()).attr('src',image.image);if(image.link){var link=$('<a href="'+image.link+'" target="_blank"></a>');link.append(img);img_container.append(link);}else{img_container.append(img);};this.image_wrapper.prepend(img_container);var size=this._getContainedImageSize(image.size.width,image.size.height);img.attr('width',size.width);img.attr('height',size.height);img_container.css({width:size.width+'px',height:size.height+'px'});this._centerImage(img_container,size.width,size.height);var desc=this._getDescription(image);if(desc){if(!this.settings.description_wrapper&&!this.settings.hooks.displayDescription){img_container.append(desc);var width=size.width-parseInt(desc.css('padding-left'),10)-parseInt(desc.css('padding-right'),10);desc.css('width',width+'px');}else if(this.settings.hooks.displayDescription){this.settings.hooks.displayDescription.call(this,image);}else{var wrapper=this.settings.description_wrapper;wrapper.append(desc);};};this.highLightThumb(this.images[index].thumb_link);var direction='right';if(this.current_index<index){direction='left';};this.fireCallback(this.settings.callbacks.beforeImageVisible);if(this.current_image||this.settings.animate_first_image){var animation_speed=this.settings.animation_speed;var easing='swing';var animation=this.animations[this.settings.effect].call(this,img_container,direction,desc);if(typeof animation.speed!='undefined'){animation_speed=animation.speed;};if(typeof animation.easing!='undefined'){easing=animation.easing;};
65666if(this.current_image){var old_image=this.current_image;var old_description=this.current_description;old_image.animate(animation.old_image,animation_speed,easing,function(){old_image.remove();if(old_description)old_description.remove();});};img_container.animate(animation.new_image,animation_speed,easing,function(){context.current_index=index;context.current_image=img_container;context.current_description=desc;context.in_transition=false;context._afterShow();context.fireCallback(callback);});}else{this.current_index=index;this.current_image=img_container;context.current_description=desc;this.in_transition=false;context._afterShow();this.fireCallback(callback);};};},nextIndex:function(){if(this.current_index==(this.images.length-1)){if(!this.settings.cycle){return false;};var next=0;}else{var next=this.current_index+1;};return next;},nextImage:function(callback){var next=this.nextIndex();if(next===false)return false;this.preloadImage(next+1);this.showImage(next,callback);return true;},prevIndex:function(){if(this.current_index==0){if(!this.settings.cycle){return false;};var prev=this.images.length-1;}else{var prev=this.current_index-1;};return prev;},prevImage:function(callback){var prev=this.prevIndex();if(prev===false)return false;this.preloadImage(prev-1);this.showImage(prev,callback);return true;},preloadAll:function(){var context=this;var i=0;function preloadNext(){if(i<context.images.length){i++;context.preloadImage(i,preloadNext);};};context.preloadImage(i,preloadNext);},preloadImage:function(index,callback){if(this.images[index]){var image=this.images[index];if(!this.images[index].preloaded){var img=$(new Image());img.attr('src',image.image);if(!this.isImageLoaded(img[0])){this.preloads.append(img);var context=this;img.load(function(){image.preloaded=true;image.size={width:this.width,height:this.height};context.fireCallback(callback);}).error(function(){image.error=true;image.preloaded=false;image.size=false;});}else{image.preloaded=true;image.size={width:img[0].width,height:img[0].height};this.fireCallback(callback);};}else{this.fireCallback(callback);};};},whenImageLoaded:function(img,callback){if(this.isImageLoaded(img)){callback&&callback();}else{$(img).load(callback);};},isImageLoaded:function(img){if(typeof img.complete!='undefined'&&!img.complete){return false;};if(typeof img.naturalWidth!='undefined'&&img.naturalWidth==0){return false;};return true;},highLightThumb:function(thumb){this.thumbs_wrapper.find('.ad-active').removeClass('ad-active');thumb.addClass('ad-active');if(this.settings.thumb_opacity<1){this.thumbs_wrapper.find('a:not(.ad-active) img').fadeTo(300,this.settings.thumb_opacity);thumb.find('img').fadeTo(300,1);};var left=thumb[0].parentNode.offsetLeft;left-=(this.nav_display_width/2)-(thumb[0].offsetWidth/2);this.thumbs_wrapper.animate({scrollLeft:left+'px'});},fireCallback:function(fn){if($.isFunction(fn)){fn.call(this);};}};function AdGallerySlideshow(nextimage_callback,settings){this.init(nextimage_callback,settings);};AdGallerySlideshow.prototype={start_link:false,stop_link:false,countdown:false,controls:false,settings:false,nextimage_callback:false,enabled:false,running:false,countdown_interval:false,init:function(nextimage_callback,settings){var context=this;this.nextimage_callback=nextimage_callback;this.settings=settings;},create:function(){this.start_link=$('<span class="ad-slideshow-start">'+this.settings.start_label+'</span>');this.stop_link=$('<span class="ad-slideshow-stop">'+this.settings.stop_label+'</span>');this.countdown=$('<span class="ad-slideshow-countdown"></span>');this.controls=$('<div class="ad-slideshow-controls"></div>');this.controls.append(this.start_link).append(this.stop_link).append(this.countdown);this.countdown.hide();var context=this;this.start_link.click(function(){context.start();});this.stop_link.click(function(){context.stop();});$(document).keydown(function(e){if(e.keyCode==83){if(context.running){context.stop();}else{context.start();};};});return this.controls;},disable:function(){this.enabled=false;this.stop();this.controls.hide();},enable:function(){this.enabled=true;this.controls.show();},toggle:function(){if(this.enabled){this.disable();}else{this.enable();};},start:function(){if(this.running||!this.enabled)return false;var context=this;this.running=true;this.controls.addClass('ad-slideshow-running');this._next();this.fireCallback(this.settings.onStart);return true;},stop:function(){if(!this.running)return false;this.running=false;this.countdown.hide();this.controls.removeClass('ad-slideshow-running');clearInterval(this.countdown_interval);this.fireCallback(this.settings.onStop);return true;},_next:function(){var context=this;var pre=this.settings.countdown_prefix;
65666var su=this.settings.countdown_sufix;clearInterval(context.countdown_interval);this.countdown.show().html(pre+(this.settings.speed/1000)+su);var slide_timer=0;this.countdown_interval=setInterval(function(){slide_timer+=1000;if(slide_timer>=context.settings.speed){var whenNextIsShown=function(){if(context.running){context._next();};slide_timer=0;};if(!context.nextimage_callback(whenNextIsShown)){context.stop();};slide_timer=0;};var sec=parseInt(context.countdown.text().replace(/[^0-9]/g,''),10);sec--;if(sec>0){context.countdown.html(pre+sec+su);};},1000);},fireCallback:function(fn){if($.isFunction(fn)){fn.call(this);};}};})(jQuery); 65667 65668/* 65669 * jQuery Orbit Plugin 1.2.3 65670 * www.ZURB.com/playground 65671 * Copyright 2010, ZURB 65672 * Free to use under the MIT license. 65673 * http://www.opensource.org/licenses/mit-license.php 65674*/ 65675 65676(function(d){d.fn.orbit=function(a){a=d.extend({animation:"horizontal-push",animationSpeed:600,timer:!0,advanceSpeed:4E3,pauseOnHover:!1,startClockOnMouseOut:!1,startClockOnMouseOutAfter:1E3,directionalNav:!0,captions:!0,captionAnimation:"fade",captionAnimationSpeed:600,bullets:!1,bulletThumbs:!1,bulletThumbLocation:"",afterSlideChange:function(){}},a);return this.each(function(){function q(){if(!a.timer||a.timer=="false")return!1;else r.is(":hidden")?s=setInterval(function(){l("next")},a.advanceSpeed): 65677(o=!0,x.removeClass("active"),s=setInterval(function(){var a="rotate("+m+"deg)";m+=2;t.css({"-webkit-transform":a,"-moz-transform":a,"-o-transform":a});m>180&&(t.addClass("move"),y.addClass("move"));m>360&&(t.removeClass("move"),y.removeClass("move"),m=0,l("next"))},a.advanceSpeed/180))}function n(){if(!a.timer||a.timer=="false")return!1;else o=!1,clearInterval(s),x.addClass("active")}function z(){if(!a.captions||a.captions=="false")return!1;else{var c=e.eq(b).data("caption");(_captionHTML=d(c).html())? 65678(j.attr("id",c).html(_captionHTML),a.captionAnimation=="none"&&j.show(),a.captionAnimation=="fade"&&j.fadeIn(a.captionAnimationSpeed),a.captionAnimation=="slideOpen"&&j.slideDown(a.captionAnimationSpeed)):(a.captionAnimation=="none"&&j.hide(),a.captionAnimation=="fade"&&j.fadeOut(a.captionAnimationSpeed),a.captionAnimation=="slideOpen"&&j.slideUp(a.captionAnimationSpeed))}}function A(){if(a.bullets)C.children("li").removeClass("active").eq(b).addClass("active");else return!1}function l(c){function d(){e.eq(f).css({"z-index":1}); 65679u=!1;a.afterSlideChange.call(this)}var f=b,g=c;if(f==g)return!1;if(e.length=="1")return!1;u||(u=!0,c=="next"?(b++,b==p&&(b=0)):c=="prev"?(b--,b<0&&(b=p-1)):(b=c,f<b?g="next":f>b&&(g="prev")),A(),e.eq(f).css({"z-index":2}),a.animation=="fade"&&e.eq(b).css({opacity:0,"z-index":3}).animate({opacity:1},a.animationSpeed,d),a.animation=="horizontal-slide"&&(g=="next"&&e.eq(b).css({left:h,"z-index":3}).animate({left:0},a.animationSpeed,d),g=="prev"&&e.eq(b).css({left:-h,"z-index":3}).animate({left:0},a.animationSpeed, 65680d)),a.animation=="vertical-slide"&&(g=="prev"&&e.eq(b).css({top:v,"z-index":3}).animate({top:0},a.animationSpeed,d),g=="next"&&e.eq(b).css({top:-v,"z-index":3}).animate({top:0},a.animationSpeed,d)),a.animation=="horizontal-push"&&(g=="next"&&(e.eq(b).css({left:h,"z-index":3}).animate({left:0},a.animationSpeed,d),e.eq(f).animate({left:-h},a.animationSpeed)),g=="prev"&&(e.eq(b).css({left:-h,"z-index":3}).animate({left:0},a.animationSpeed,d),e.eq(f).animate({left:h},a.animationSpeed))),z())}var b=0, 65681p=0,h,v,u,f=d(this).addClass("orbit"),c=f.wrap('<div class="orbit-wrapper" />').parent();f.add(h).width("1px").height("1px");var e=f.children("img, a, div");e.each(function(){var a=d(this),b=a.width(),a=a.height();b>f.width()&&(f.add(c).width(b),h=f.width());a>f.height()&&(f.add(c).height(a),v=f.height());p++});if(e.length==1)a.directionalNav=!1,a.timer=!1,a.bullets=!1;e.eq(b).css({"z-index":3}).fadeIn(function(){e.css({display:"block"})});if(a.timer){c.append('<div class="timer"><span class="mask"><span class="rotator"></span></span><span class="pause"></span></div>'); 65682var r=c.children("div.timer"),o;if(r.length!=0){var t=d("div.timer span.rotator"),y=d("div.timer span.mask"),x=d("div.timer span.pause"),m=0,s;q();r.click(function(){o?n():q()});if(a.startClockOnMouseOut){var B;c.mouseleave(function(){B=setTimeout(function(){o||q()},a.startClockOnMouseOutAfter)});c.mouseenter(function(){clearTimeout(B)})}}}a.pauseOnHover&&c.mouseenter(function(){n()});if(a.captions){c.append('<div class="orbit-caption"></div>');var j=c.children(".orbit-caption");z()}if(a.directionalNav){if(a.directionalNav== 65683"false")return!1;c.append('<div class="slider-nav"><span class="right">Right</span><span class="left">Left</span></div>');var k=c.children("div.slider-nav").children("span.left"),w=c.children("div.slider-nav").children("span.right");k.click(function(){n();l("prev")});w.click(function(){n();l("next")})}if(a.bullets){c.append('<ul class="orbit-bullets"></ul>');var C=c.children("ul.orbit-bullets");for(i=0;i<p;i++){k=d("<li>"+(i+1)+"</li>");if(a.bulletThumbs&&(w=e.eq(i).data("thumb")))k=d('<li class="has-thumb">'+ 65684i+"</li>"),k.css({background:"url("+a.bulletThumbLocation+w+") no-repeat"});c.children("ul.orbit-bullets").append(k);k.data("index",i);k.click(function(){n();l(d(this).data("index"))})}A()}})}})(jQuery); 65685
vendor: 23,890 bytes, lines 65686-65732
65686"function"!==typeof Object.create&&(Object.create=function(f){function g(){}g.prototype=f;return new g}); 65687(function(f,g,k){var l={init:function(a,b){this.$elem=f(b);this.options=f.extend({},f.fn.owlCarousel.options,this.$elem.data(),a);this.userOptions=a;this.loadContent()},loadContent:function(){function a(a){var d,e="";if("function"===typeof b.options.jsonSuccess)b.options.jsonSuccess.apply(this,[a]);else{for(d in a.owl)a.owl.hasOwnProperty(d)&&(e+=a.owl[d].item);b.$elem.html(e)}b.logIn()}var b=this,e;"function"===typeof b.options.beforeInit&&b.options.beforeInit.apply(this,[b.$elem]);"string"===typeof b.options.jsonPath? 65688(e=b.options.jsonPath,f.getJSON(e,a)):b.logIn()},logIn:function(){this.$elem.data("owl-originalStyles",this.$elem.attr("style"));this.$elem.data("owl-originalClasses",this.$elem.attr("class"));this.$elem.css({opacity:0});this.orignalItems=this.options.items;this.checkBrowser();this.wrapperWidth=0;this.checkVisible=null;this.setVars()},setVars:function(){if(0===this.$elem.children().length)return!1;this.baseClass();this.eventTypes();this.$userItems=this.$elem.children();this.itemsAmount=this.$userItems.length; 65689this.wrapItems();this.$owlItems=this.$elem.find(".owl-item");this.$owlWrapper=this.$elem.find(".owl-wrapper");this.playDirection="next";this.prevItem=0;this.prevArr=[0];this.currentItem=0;this.customEvents();this.onStartup()},onStartup:function(){this.updateItems();this.calculateAll();this.buildControls();this.updateControls();this.response();this.moveEvents();this.stopOnHover();this.owlStatus();!1!==this.options.transitionStyle&&this.transitionTypes(this.options.transitionStyle);!0===this.options.autoPlay&& 65690(this.options.autoPlay=5E3);this.play();this.$elem.find(".owl-wrapper").css("display","block");this.$elem.is(":visible")?this.$elem.css("opacity",1):this.watchVisibility();this.onstartup=!1;this.eachMoveUpdate();"function"===typeof this.options.afterInit&&this.options.afterInit.apply(this,[this.$elem])},eachMoveUpdate:function(){!0===this.options.lazyLoad&&this.lazyLoad();!0===this.options.autoHeight&&this.autoHeight();this.onVisibleItems();"function"===typeof this.options.afterAction&&this.options.afterAction.apply(this, 65691[this.$elem])},updateVars:function(){"function"===typeof this.options.beforeUpdate&&this.options.beforeUpdate.apply(this,[this.$elem]);this.watchVisibility();this.updateItems();this.calculateAll();this.updatePosition();this.updateControls();this.eachMoveUpdate();"function"===typeof this.options.afterUpdate&&this.options.afterUpdate.apply(this,[this.$elem])},reload:function(){var a=this;g.setTimeout(function(){a.updateVars()},0)},watchVisibility:function(){var a=this;if(!1===a.$elem.is(":visible"))a.$elem.css({opacity:0}), 65692g.clearInterval(a.autoPlayInterval),g.clearInterval(a.checkVisible);else return!1;a.checkVisible=g.setInterval(function(){a.$elem.is(":visible")&&(a.reload(),a.$elem.animate({opacity:1},200),g.clearInterval(a.checkVisible))},500)},wrapItems:function(){this.$userItems.wrapAll('<div class="owl-wrapper">').wrap('<div class="owl-item"></div>');this.$elem.find(".owl-wrapper").wrap('<div class="owl-wrapper-outer">');this.wrapperOuter=this.$elem.find(".owl-wrapper-outer");this.$elem.css("display","block")}, 65693baseClass:function(){var a=this.$elem.hasClass(this.options.baseClass),b=this.$elem.hasClass(this.options.theme);a||this.$elem.addClass(this.options.baseClass);b||this.$elem.addClass(this.options.theme)},updateItems:function(){var a,b;if(!1===this.options.responsive)return!1;if(!0===this.options.singleItem)return this.options.items=this.orignalItems=1,this.options.itemsCustom=!1,this.options.itemsDesktop=!1,this.options.itemsDesktopSmall=!1,this.options.itemsTablet=!1,this.options.itemsTabletSmall= 65694!1,this.options.itemsMobile=!1;a=f(this.options.responsiveBaseWidth).width();a>(this.options.itemsDesktop[0]||this.orignalItems)&&(this.options.items=this.orignalItems);if(!1!==this.options.itemsCustom)for(this.options.itemsCustom.sort(function(a,b){return a[0]-b[0]}),b=0;b<this.options.itemsCustom.length;b+=1)this.options.itemsCustom[b][0]<=a&&(this.options.items=this.options.itemsCustom[b][1]);else a<=this.options.itemsDesktop[0]&&!1!==this.options.itemsDesktop&&(this.options.items=this.options.itemsDesktop[1]), 65695a<=this.options.itemsDesktopSmall[0]&&!1!==this.options.itemsDesktopSmall&&(this.options.items=this.options.itemsDesktopSmall[1]),a<=this.options.itemsTablet[0]&&!1!==this.options.itemsTablet&&(this.options.items=this.options.itemsTablet[1]),a<=this.options.itemsTabletSmall[0]&&!1!==this.options.itemsTabletSmall&&(this.options.items=this.options.itemsTabletSmall[1]),a<=this.options.itemsMobile[0]&&!1!==this.options.itemsMobile&&(this.options.items=this.options.itemsMobile[1]);this.options.items>this.itemsAmount&& 65696!0===this.options.itemsScaleUp&&(this.options.items=this.itemsAmount)},response:function(){var a=this,b,e;if(!0!==a.options.responsive)return!1;e=f(g).width();a.resizer=function(){f(g).width()!==e&&(!1!==a.options.autoPlay&&g.clearInterval(a.autoPlayInterval),g.clearTimeout(b),b=g.setTimeout(function(){e=f(g).width();a.updateVars()},a.options.responsiveRefreshRate))};f(g).resize(a.resizer)},updatePosition:function(){this.jumpTo(this.currentItem);!1!==this.options.autoPlay&&this.checkAp()},appendItemsSizes:function(){var a= 65697this,b=0,e=a.itemsAmount-a.options.items;a.$owlItems.each(function(c){var d=f(this);d.css({width:a.itemWidth}).data("owl-item",Number(c));if(0===c%a.options.items||c===e)c>e||(b+=1);d.data("owl-roundPages",b)})},appendWrapperSizes:function(){this.$owlWrapper.css({width:this.$owlItems.length*this.itemWidth*2,left:0});this.appendItemsSizes()},calculateAll:function(){this.calculateWidth();this.appendWrapperSizes();this.loops();this.max()},calculateWidth:function(){this.itemWidth=Math.round(this.$elem.width()/ 65698this.options.items)},max:function(){var a=-1*(this.itemsAmount*this.itemWidth-this.options.items*this.itemWidth);this.options.items>this.itemsAmount?this.maximumPixels=a=this.maximumItem=0:(this.maximumItem=this.itemsAmount-this.options.items,this.maximumPixels=a);return a},min:function(){return 0},loops:function(){var a=0,b=0,e,c;this.positionsInArray=[0];this.pagesInArray=[];for(e=0;e<this.itemsAmount;e+=1)b+=this.itemWidth,this.positionsInArray.push(-b),!0===this.options.scrollPerPage&&(c=f(this.$owlItems[e]), 65699c=c.data("owl-roundPages"),c!==a&&(this.pagesInArray[a]=this.positionsInArray[e],a=c))},buildControls:function(){if(!0===this.options.navigation||!0===this.options.pagination)this.owlControls=f('<div class="owl-controls"/>').toggleClass("clickable",!this.browser.isTouch).appendTo(this.$elem);!0===this.options.pagination&&this.buildPagination();!0===this.options.navigation&&this.buildButtons()},buildButtons:function(){var a=this,b=f('<div class="owl-buttons"/>');a.owlControls.append(b);a.buttonPrev= 65700f("<div/>",{"class":"owl-prev",html:a.options.navigationText[0]||""});a.buttonNext=f("<div/>",{"class":"owl-next",html:a.options.navigationText[1]||""});b.append(a.buttonPrev).append(a.buttonNext);b.on("touchstart.owlControls mousedown.owlControls",'div[class^="owl"]',function(a){a.preventDefault()});b.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',function(b){b.preventDefault();f(this).hasClass("owl-next")?a.next():a.prev()})},buildPagination:function(){var a=this;a.paginationWrapper= 65701f('<div class="owl-pagination"/>');a.owlControls.append(a.paginationWrapper);a.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",function(b){b.preventDefault();Number(f(this).data("owl-page"))!==a.currentItem&&a.goTo(Number(f(this).data("owl-page")),!0)})},updatePagination:function(){var a,b,e,c,d,g;if(!1===this.options.pagination)return!1;this.paginationWrapper.html("");a=0;b=this.itemsAmount-this.itemsAmount%this.options.items;for(c=0;c<this.itemsAmount;c+=1)0===c%this.options.items&& 65702(a+=1,b===c&&(e=this.itemsAmount-this.options.items),d=f("<div/>",{"class":"owl-page"}),g=f("<span></span>",{text:!0===this.options.paginationNumbers?a:"","class":!0===this.options.paginationNumbers?"owl-numbers":""}),d.append(g),d.data("owl-page",b===c?e:c),d.data("owl-roundPages",a),this.paginationWrapper.append(d));this.checkPagination()},checkPagination:function(){var a=this;if(!1===a.options.pagination)return!1;a.paginationWrapper.find(".owl-page").each(function(){f(this).data("owl-roundPages")=== 65703f(a.$owlItems[a.currentItem]).data("owl-roundPages")&&(a.paginationWrapper.find(".owl-page").removeClass("active"),f(this).addClass("active"))})},checkNavigation:function(){if(!1===this.options.navigation)return!1;!1===this.options.rewindNav&&(0===this.currentItem&&0===this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.addClass("disabled")):0===this.currentItem&&0!==this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.removeClass("disabled")):this.currentItem=== 65704this.maximumItem?(this.buttonPrev.removeClass("disabled"),this.buttonNext.addClass("disabled")):0!==this.currentItem&&this.currentItem!==this.maximumItem&&(this.buttonPrev.removeClass("disabled"),this.buttonNext.removeClass("disabled")))},updateControls:function(){this.updatePagination();this.checkNavigation();this.owlControls&&(this.options.items>=this.itemsAmount?this.owlControls.hide():this.owlControls.show())},destroyControls:function(){this.owlControls&&this.owlControls.remove()},next:function(a){if(this.isTransition)return!1; 65705this.currentItem+=!0===this.options.scrollPerPage?this.options.items:1;if(this.currentItem>this.maximumItem+(!0===this.options.scrollPerPage?this.options.items-1:0))if(!0===this.options.rewindNav)this.currentItem=0,a="rewind";else return this.currentItem=this.maximumItem,!1;this.goTo(this.currentItem,a)},prev:function(a){if(this.isTransition)return!1;this.currentItem=!0===this.options.scrollPerPage&&0<this.currentItem&&this.currentItem<this.options.items?0:this.currentItem-(!0===this.options.scrollPerPage? 65706this.options.items:1);if(0>this.currentItem)if(!0===this.options.rewindNav)this.currentItem=this.maximumItem,a="rewind";else return this.currentItem=0,!1;this.goTo(this.currentItem,a)},goTo:function(a,b,e){var c=this;if(c.isTransition)return!1;"function"===typeof c.options.beforeMove&&c.options.beforeMove.apply(this,[c.$elem]);a>=c.maximumItem?a=c.maximumItem:0>=a&&(a=0);c.currentItem=c.owl.currentItem=a;if(!1!==c.options.transitionStyle&&"drag"!==e&&1===c.options.items&&!0===c.browser.support3d)return c.swapSpeed(0), 65707!0===c.browser.support3d?c.transition3d(c.positionsInArray[a]):c.css2slide(c.positionsInArray[a],1),c.afterGo(),c.singleItemTransition(),!1;a=c.positionsInArray[a];!0===c.browser.support3d?(c.isCss3Finish=!1,!0===b?(c.swapSpeed("paginationSpeed"),g.setTimeout(function(){c.isCss3Finish=!0},c.options.paginationSpeed)):"rewind"===b?(c.swapSpeed(c.options.rewindSpeed),g.setTimeout(function(){c.isCss3Finish=!0},c.options.rewindSpeed)):(c.swapSpeed("slideSpeed"),g.setTimeout(function(){c.isCss3Finish=!0}, 65708c.options.slideSpeed)),c.transition3d(a)):!0===b?c.css2slide(a,c.options.paginationSpeed):"rewind"===b?c.css2slide(a,c.options.rewindSpeed):c.css2slide(a,c.options.slideSpeed);c.afterGo()},jumpTo:function(a){"function"===typeof this.options.beforeMove&&this.options.beforeMove.apply(this,[this.$elem]);a>=this.maximumItem||-1===a?a=this.maximumItem:0>=a&&(a=0);this.swapSpeed(0);!0===this.browser.support3d?this.transition3d(this.positionsInArray[a]):this.css2slide(this.positionsInArray[a],1);this.currentItem= 65709this.owl.currentItem=a;this.afterGo()},afterGo:function(){this.prevArr.push(this.currentItem);this.prevItem=this.owl.prevItem=this.prevArr[this.prevArr.length-2];this.prevArr.shift(0);this.prevItem!==this.currentItem&&(this.checkPagination(),this.checkNavigation(),this.eachMoveUpdate(),!1!==this.options.autoPlay&&this.checkAp());"function"===typeof this.options.afterMove&&this.prevItem!==this.currentItem&&this.options.afterMove.apply(this,[this.$elem])},stop:function(){this.apStatus="stop";g.clearInterval(this.autoPlayInterval)}, 65710checkAp:function(){"stop"!==this.apStatus&&this.play()},play:function(){var a=this;a.apStatus="play";if(!1===a.options.autoPlay)return!1;g.clearInterval(a.autoPlayInterval);a.autoPlayInterval=g.setInterval(function(){a.next(!0)},a.options.autoPlay)},swapSpeed:function(a){"slideSpeed"===a?this.$owlWrapper.css(this.addCssSpeed(this.options.slideSpeed)):"paginationSpeed"===a?this.$owlWrapper.css(this.addCssSpeed(this.options.paginationSpeed)):"string"!==typeof a&&this.$owlWrapper.css(this.addCssSpeed(a))}, 65711addCssSpeed:function(a){return{"-webkit-transition":"all "+a+"ms ease","-moz-transition":"all "+a+"ms ease","-o-transition":"all "+a+"ms ease",transition:"all "+a+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(a){return{"-webkit-transform":"translate3d("+a+"px, 0px, 0px)","-moz-transform":"translate3d("+a+"px, 0px, 0px)","-o-transform":"translate3d("+a+"px, 0px, 0px)","-ms-transform":"translate3d("+ 65712a+"px, 0px, 0px)",transform:"translate3d("+a+"px, 0px,0px)"}},transition3d:function(a){this.$owlWrapper.css(this.doTranslate(a))},css2move:function(a){this.$owlWrapper.css({left:a})},css2slide:function(a,b){var e=this;e.isCssFinish=!1;e.$owlWrapper.stop(!0,!0).animate({left:a},{duration:b||e.options.slideSpeed,complete:function(){e.isCssFinish=!0}})},checkBrowser:function(){var a=k.createElement("div");a.style.cssText=" -moz-transform:translate3d(0px, 0px, 0px); -ms-transform:translate3d(0px, 0px, 0px); -o-transform:translate3d(0px, 0px, 0px); -webkit-transform:translate3d(0px, 0px, 0px); transform:translate3d(0px, 0px, 0px)"; 65713a=a.style.cssText.match(/translate3d\(0px, 0px, 0px\)/g);this.browser={support3d:null!==a&&1===a.length,isTouch:"ontouchstart"in g||g.navigator.msMaxTouchPoints}},moveEvents:function(){if(!1!==this.options.mouseDrag||!1!==this.options.touchDrag)this.gestures(),this.disabledEvents()},eventTypes:function(){var a=["s","e","x"];this.ev_types={};!0===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]: 65714!1===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]:!0===this.options.mouseDrag&&!1===this.options.touchDrag&&(a=["mousedown.owl","mousemove.owl","mouseup.owl"]);this.ev_types.start=a[0];this.ev_types.move=a[1];this.ev_types.end=a[2]},disabledEvents:function(){this.$elem.on("dragstart.owl",function(a){a.preventDefault()});this.$elem.on("mousedown.disableTextSelect",function(a){return f(a.target).is("input, textarea, select, option")})}, 65715gestures:function(){function a(a){if(void 0!==a.touches)return{x:a.touches[0].pageX,y:a.touches[0].pageY};if(void 0===a.touches){if(void 0!==a.pageX)return{x:a.pageX,y:a.pageY};if(void 0===a.pageX)return{x:a.clientX,y:a.clientY}}}function b(a){"on"===a?(f(k).on(d.ev_types.move,e),f(k).on(d.ev_types.end,c)):"off"===a&&(f(k).off(d.ev_types.move),f(k).off(d.ev_types.end))}function e(b){b=b.originalEvent||b||g.event;d.newPosX=a(b).x-h.offsetX;d.newPosY=a(b).y-h.offsetY;d.newRelativeX=d.newPosX-h.relativePos; 65716"function"===typeof d.options.startDragging&&!0!==h.dragging&&0!==d.newRelativeX&&(h.dragging=!0,d.options.startDragging.apply(d,[d.$elem]));(8<d.newRelativeX||-8>d.newRelativeX)&&!0===d.browser.isTouch&&(void 0!==b.preventDefault?b.preventDefault():b.returnValue=!1,h.sliding=!0);(10<d.newPosY||-10>d.newPosY)&&!1===h.sliding&&f(k).off("touchmove.owl");d.newPosX=Math.max(Math.min(d.newPosX,d.newRelativeX/5),d.maximumPixels+d.newRelativeX/5);!0===d.browser.support3d?d.transition3d(d.newPosX):d.css2move(d.newPosX)} 65717function c(a){a=a.originalEvent||a||g.event;var c;a.target=a.target||a.srcElement;h.dragging=!1;!0!==d.browser.isTouch&&d.$owlWrapper.removeClass("grabbing");d.dragDirection=0>d.newRelativeX?d.owl.dragDirection="left":d.owl.dragDirection="right";0!==d.newRelativeX&&(c=d.getNewPosition(),d.goTo(c,!1,"drag"),h.targetElement===a.target&&!0!==d.browser.isTouch&&(f(a.target).on("click.disable",function(a){a.stopImmediatePropagation();a.stopPropagation();a.preventDefault();f(a.target).off("click.disable")}), 65718a=f._data(a.target,"events").click,c=a.pop(),a.splice(0,0,c)));b("off")}var d=this,h={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};d.isCssFinish=!0;d.$elem.on(d.ev_types.start,".owl-wrapper",function(c){c=c.originalEvent||c||g.event;var e;if(3===c.which)return!1;if(!(d.itemsAmount<=d.options.items)){if(!1===d.isCssFinish&&!d.options.dragBeforeAnimFinish||!1===d.isCss3Finish&&!d.options.dragBeforeAnimFinish)return!1; 65719!1!==d.options.autoPlay&&g.clearInterval(d.autoPlayInterval);!0===d.browser.isTouch||d.$owlWrapper.hasClass("grabbing")||d.$owlWrapper.addClass("grabbing");d.newPosX=0;d.newRelativeX=0;f(this).css(d.removeTransition());e=f(this).position();h.relativePos=e.left;h.offsetX=a(c).x-e.left;h.offsetY=a(c).y-e.top;b("on");h.sliding=!1;h.targetElement=c.target||c.srcElement}})},getNewPosition:function(){var a=this.closestItem();a>this.maximumItem?a=this.currentItem=this.maximumItem:0<=this.newPosX&&(this.currentItem= 65720a=0);return a},closestItem:function(){var a=this,b=!0===a.options.scrollPerPage?a.pagesInArray:a.positionsInArray,e=a.newPosX,c=null;f.each(b,function(d,g){e-a.itemWidth/20>b[d+1]&&e-a.itemWidth/20<g&&"left"===a.moveDirection()?(c=g,a.currentItem=!0===a.options.scrollPerPage?f.inArray(c,a.positionsInArray):d):e+a.itemWidth/20<g&&e+a.itemWidth/20>(b[d+1]||b[d]-a.itemWidth)&&"right"===a.moveDirection()&&(!0===a.options.scrollPerPage?(c=b[d+1]||b[b.length-1],a.currentItem=f.inArray(c,a.positionsInArray)): 65721(c=b[d+1],a.currentItem=d+1))});return a.currentItem},moveDirection:function(){var a;0>this.newRelativeX?(a="right",this.playDirection="next"):(a="left",this.playDirection="prev");return a},customEvents:function(){var a=this;a.$elem.on("owl.next",function(){a.next()});a.$elem.on("owl.prev",function(){a.prev()});a.$elem.on("owl.play",function(b,e){a.options.autoPlay=e;a.play();a.hoverStatus="play"});a.$elem.on("owl.stop",function(){a.stop();a.hoverStatus="stop"});a.$elem.on("owl.goTo",function(b,e){a.goTo(e)}); 65722a.$elem.on("owl.jumpTo",function(b,e){a.jumpTo(e)})},stopOnHover:function(){var a=this;!0===a.options.stopOnHover&&!0!==a.browser.isTouch&&!1!==a.options.autoPlay&&(a.$elem.on("mouseover",function(){a.stop()}),a.$elem.on("mouseout",function(){"stop"!==a.hoverStatus&&a.play()}))},lazyLoad:function(){var a,b,e,c,d;if(!1===this.options.lazyLoad)return!1;for(a=0;a<this.itemsAmount;a+=1)b=f(this.$owlItems[a]),"loaded"!==b.data("owl-loaded")&&(e=b.data("owl-item"),c=b.find(".lazyOwl"),"string"!==typeof c.data("src")? 65723b.data("owl-loaded","loaded"):(void 0===b.data("owl-loaded")&&(c.hide(),b.addClass("loading").data("owl-loaded","checked")),(d=!0===this.options.lazyFollow?e>=this.currentItem:!0)&&e<this.currentItem+this.options.items&&c.length&&this.lazyPreload(b,c)))},lazyPreload:function(a,b){function e(){a.data("owl-loaded","loaded").removeClass("loading");b.removeAttr("data-src");"fade"===d.options.lazyEffect?b.fadeIn(400):b.show();"function"===typeof d.options.afterLazyLoad&&d.options.afterLazyLoad.apply(this, 65724[d.$elem])}function c(){f+=1;d.completeImg(b.get(0))||!0===k?e():100>=f?g.setTimeout(c,100):e()}var d=this,f=0,k;"DIV"===b.prop("tagName")?(b.css("background-image","url("+b.data("src")+")"),k=!0):b[0].src=b.data("src");c()},autoHeight:function(){function a(){var a=f(e.$owlItems[e.currentItem]).height();e.wrapperOuter.css("height",a+"px");e.wrapperOuter.hasClass("autoHeight")||g.setTimeout(function(){e.wrapperOuter.addClass("autoHeight")},0)}function b(){d+=1;e.completeImg(c.get(0))?a():100>=d?g.setTimeout(b, 65725100):e.wrapperOuter.css("height","")}var e=this,c=f(e.$owlItems[e.currentItem]).find("img"),d;void 0!==c.get(0)?(d=0,b()):a()},completeImg:function(a){return!a.complete||"undefined"!==typeof a.naturalWidth&&0===a.naturalWidth?!1:!0},onVisibleItems:function(){var a;!0===this.options.addClassActive&&this.$owlItems.removeClass("active");this.visibleItems=[];for(a=this.currentItem;a<this.currentItem+this.options.items;a+=1)this.visibleItems.push(a),!0===this.options.addClassActive&&f(this.$owlItems[a]).addClass("active"); 65726this.owl.visibleItems=this.visibleItems},transitionTypes:function(a){this.outClass="owl-"+a+"-out";this.inClass="owl-"+a+"-in"},singleItemTransition:function(){var a=this,b=a.outClass,e=a.inClass,c=a.$owlItems.eq(a.currentItem),d=a.$owlItems.eq(a.prevItem),f=Math.abs(a.positionsInArray[a.currentItem])+a.positionsInArray[a.prevItem],g=Math.abs(a.positionsInArray[a.currentItem])+a.itemWidth/2;a.isTransition=!0;a.$owlWrapper.addClass("owl-origin").css({"-webkit-transform-origin":g+"px","-moz-perspective-origin":g+ 65727"px","perspective-origin":g+"px"});d.css({position:"relative",left:f+"px"}).addClass(b).on("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend",function(){a.endPrev=!0;d.off("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend");a.clearTransStyle(d,b)});c.addClass(e).on("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend",function(){a.endCurrent=!0;c.off("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend");a.clearTransStyle(c,e)})},clearTransStyle:function(a, 65728b){a.css({position:"",left:""}).removeClass(b);this.endPrev&&this.endCurrent&&(this.$owlWrapper.removeClass("owl-origin"),this.isTransition=this.endCurrent=this.endPrev=!1)},owlStatus:function(){this.owl={userOptions:this.userOptions,baseElement:this.$elem,userItems:this.$userItems,owlItems:this.$owlItems,currentItem:this.currentItem,prevItem:this.prevItem,visibleItems:this.visibleItems,isTouch:this.browser.isTouch,browser:this.browser,dragDirection:this.dragDirection}},clearEvents:function(){this.$elem.off(".owl owl mousedown.disableTextSelect"); 65729f(k).off(".owl owl");f(g).off("resize",this.resizer)},unWrap:function(){0!==this.$elem.children().length&&(this.$owlWrapper.unwrap(),this.$userItems.unwrap().unwrap(),this.owlControls&&this.owlControls.remove());this.clearEvents();this.$elem.attr("style",this.$elem.data("owl-originalStyles")||"").attr("class",this.$elem.data("owl-originalClasses"))},destroy:function(){this.stop();g.clearInterval(this.checkVisible);this.unWrap();this.$elem.removeData()},reinit:function(a){a=f.extend({},this.userOptions, 65730a);this.unWrap();this.init(a,this.$elem)},addItem:function(a,b){var e;if(!a)return!1;if(0===this.$elem.children().length)return this.$elem.append(a),this.setVars(),!1;this.unWrap();e=void 0===b||-1===b?-1:b;e>=this.$userItems.length||-1===e?this.$userItems.eq(-1).after(a):this.$userItems.eq(e).before(a);this.setVars()},removeItem:function(a){if(0===this.$elem.children().length)return!1;a=void 0===a||-1===a?-1:a;this.unWrap();this.$userItems.eq(a).remove();this.setVars()}};f.fn.owlCarousel=function(a){return this.each(function(){if(!0=== 65731f(this).data("owl-init"))return!1;f(this).data("owl-init",!0);var b=Object.create(l);b.init(a,this);f.data(this,"owlCarousel",b)})};f.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1E3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["prev","next"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1, 65732responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:g,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}})(jQuery,window,document);
65732 65733 65734/** 65735 * bxSlider v4.2.12 65736 * Copyright 2013-2015 Steven Wanderski 65737 * Written while drinking Belgian ales and listening to jazz 65738 * Licensed under MIT (http://opensource.org/licenses/MIT) 65739 */ 65740!function(t){var e={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,wrapperClass:"bx-wrapper",touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,ariaLive:!0,ariaHidden:!0,keyboardEnabled:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",stopAutoOnClick:!1,autoHover:!1,autoDelay:0,autoSlideForOnePage:!1,minSli
vendor: 11,565 bytes, line 65740
65740des:1,maxSlides:1,moveSlides:0,slideWidth:0,shrinkItems:!1,onSliderLoad:function(){return!0},onSlideBefore:function(){return!0},onSlideAfter:function(){return!0},onSlideNext:function(){return!0},onSlidePrev:function(){return!0},onSliderResize:function(){return!0}};t.fn.bxSlider=function(n){if(0===this.length)return this;if(this.length>1)return this.each(function(){t(this).bxSlider(n)}),this;var s={},o=this,r=t(window).width(),a=t(window).height();if(!t(o).data("bxSlider")){var l=function(){t(o).data("bxSlider")||(s.settings=t.extend({},e,n),s.settings.slideWidth=parseInt(s.settings.slideWidth),s.children=o.children(s.settings.slideSelector),s.children.length<s.settings.minSlides&&(s.settings.minSlides=s.children.length),s.children.length<s.settings.maxSlides&&(s.settings.maxSlides=s.children.length),s.settings.randomStart&&(s.settings.startSlide=Math.floor(Math.random()*s.children.length)),s.active={index:s.settings.startSlide},s.carousel=s.settings.minSlides>1||s.settings.maxSlides>1,s.carousel&&(s.settings.preloadImages="all"),s.minThreshold=s.settings.minSlides*s.settings.slideWidth+(s.settings.minSlides-1)*s.settings.slideMargin,s.maxThreshold=s.settings.maxSlides*s.settings.slideWidth+(s.settings.maxSlides-1)*s.settings.slideMargin,s.working=!1,s.controls={},s.interval=null,s.animProp="vertical"===s.settings.mode?"top":"left",s.usingCSS=s.settings.useCSS&&"fade"!==s.settings.mode&&function(){for(var t=document.createElement("div"),e=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"],i=0;i<e.length;i++)if(void 0!==t.style[e[i]])return s.cssPrefix=e[i].replace("Perspective","").toLowerCase(),s.animProp="-"+s.cssPrefix+"-transform",!0;return!1}(),"vertical"===s.settings.mode&&(s.settings.maxSlides=s.settings.minSlides),o.data("origStyle",o.attr("style")),o.children(s.settings.slideSelector).each(function(){t(this).data("origStyle",t(this).attr("style"))}),d())},d=function(){var e=s.children.eq(s.settings.startSlide);o.wrap('<div class="'+s.settings.wrapperClass+'"><div class="bx-viewport"></div></div>'),s.viewport=o.parent(),s.settings.ariaLive&&!s.settings.ticker&&s.viewport.attr("aria-live","polite"),s.loader=t('<div class="bx-loading" />'),s.viewport.prepend(s.loader),o.css({width:"horizontal"===s.settings.mode?1e3*s.children.length+215+"%":"auto",position:"relative"}),s.usingCSS&&s.settings.easing?o.css("-"+s.cssPrefix+"-transition-timing-function",s.settings.easing):s.settings.easing||(s.settings.easing="swing"),s.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),s.viewport.parent().css({maxWidth:u()}),s.children.css({float:"horizontal"===s.settings.mode?"left":"none",listStyle:"none",position:"relative"}),s.children.css("width",h()),"horizontal"===s.settings.mode&&s.settings.slideMargin>0&&s.children.css("marginRight",s.settings.slideMargin),"vertical"===s.settings.mode&&s.settings.slideMargin>0&&s.children.css("marginBottom",s.settings.slideMargin),"fade"===s.settings.mode&&(s.children.css({position:"absolute",zIndex:0,display:"none"}),s.children.eq(s.settings.startSlide).css({zIndex:s.settings.slideZIndex,display:"block"})),s.controls.el=t('<div class="bx-controls" />'),s.settings.captions&&P(),s.active.last=s.settings.startSlide===f()-1,s.settings.video&&o.fitVids(),("all"===s.settings.preloadImages||s.settings.ticker)&&(e=s.children),s.settings.ticker?s.settings.pager=!1:(s.settings.controls&&C(),s.settings.auto&&s.settings.autoControls&&T(),s.settings.pager&&w(),(s.settings.controls||s.settings.autoControls||s.settings.pager)&&s.viewport.after(s.controls.el)),c(e,g)},c=function(e,i){var n=e.find('img:not([src=""]), iframe').length,s=0;return 0===n?void i():void e.find('img:not([src=""]), iframe').each(function(){t(this).one("load error",function(){++s===n&&i()}).each(function(){this.complete&&t(this).trigger("load")})})},g=function(){if(s.settings.infiniteLoop&&"fade"!==s.settings.mode&&!s.settings.ticker){var e="vertical"===s.settings.mode?s.settings.minSlides:s.settings.maxSlides,i=s.children.slice(0,e).clone(!0).addClass("bx-clone"),n=s.children.slice(-e).clone(!0).addClass("bx-clone");s.settings.ariaHidden&&(i.attr("aria-hidden",!0),n.attr("aria-hidden",!0)),o.append(i).prepend(n)}s.loader.remove(),m(),"vertical"===s.settings.mode&&(s.settings.adaptiveHeight=!0),s.viewport.height(p()),o.redrawSlider(),s.settings.onSliderLoad.call(o,s.active.index),s.initialized=!0,s.settings.responsive&&t(window).bind("resize",Z),s.settings.auto&&s.settings.autoStart&&(f()>1||s.settings.autoSlideForOnePage)&&H(),s.settings.ticker&&W(),s.settings.pager&&I(s.settings.startSlide),s.settings.controls&&D(),s.settings.touchEnabled&&!s.settings.ticker&&N(),s.settings.keyboardEnabled&&!s.settings.ticker&&t(document).keydown(F)},p=function(){var e=0,n=t();if("vertical"===s.settings.mode||s.settings.adaptiveHeight)if(s.carousel){var o=1===s.settings.moveSlides?s.active.index:s.active.index*x();for(n=s.children.eq(o),i=1;i<=s.settings.maxSlides-1;i++)n=o+i>=s.children.length?n.add(s.children.eq(i-1)):n.add(s.children.eq(o+i))}else n=s.children.eq(s.active.index);else n=s.children;return"vertical"===s.settings.mode?(n.each(function(i){e+=t(this).outerHeight()}),s.settings.slideMargin>0&&(e+=s.settings.slideMargin*(s.settings.minSlides-1))):e=Math.max.apply(Math,n.map(function(){return t(this).outerHeight(!1)}).get()),"border-box"===s.viewport.css("box-sizing")?e+=parseFloat(s.viewport.css("padding-top"))+parseFloat(s.viewport.css("padding-bottom"))+parseFloat(s.viewport.css("border-top-width"))+parseFloat(s.viewport.css("border-bottom-width")):"padding-box"===s.viewport.css("box-sizing")&&(e+=parseFloat(s.viewport.css("padding-top"))+parseFloat(s.viewport.css("padding-bottom"))),e},u=function(){var t="100%";return s.settings.slideWidth>0&&(t="horizontal"===s.settings.mode?s.settings.maxSlides*s.settings.slideWidth+(s.settings.maxSlides-1)*s.settings.slideMargin:s.settings.slideWidth),t},h=function(){var t=s.settings.slideWidth,e=s.viewport.width();if(0===s.settings.slideWidth||s.settings.slideWidth>e&&!s.carousel||"vertical"===s.settings.mode)t=e;else if(s.settings.maxSlides>1&&"horizontal"===s.settings.mode){if(e>s.maxThreshold)return t;e<s.minThreshold?t=(e-s.settings.slideMargin*(s.settings.minSlides-1))/s.settings.minSlides:s.settings.shrinkItems&&(t=Math.floor((e+s.settings.slideMargin)/Math.ceil((e+s.settings.slideMargin)/(t+s.settings.slideMargin))-s.settings.slideMargin))}return t},v=function(){var t=1,e=null;return"horizontal"===s.settings.mode&&s.settings.slideWidth>0?s.viewport.width()<s.minThreshold?t=s.settings.minSlides:s.viewport.width()>s.maxThreshold?t=s.settings.maxSlides:(e=s.children.first().width()+s.settings.slideMargin,t=Math.floor((s.viewport.width()+s.settings.slideMargin)/e)):"vertical"===s.settings.mode&&(t=s.settings.minSlides),t},f=function(){var t=0,e=0,i=0;if(s.settings.moveSlides>0)if(s.settings.infiniteLoop)t=Math.ceil(s.children.length/x());else for(;e<s.children.length;)++t,e=i+v(),i+=s.settings.moveSlides<=v()?s.settings.moveSlides:v();else t=Math.ceil(s.children.length/v());return t},x=function(){return s.settings.moveSlides>0&&s.settings.moveSlides<=v()?s.settings.moveSlides:v()},m=function(){var t,e,i;s.children.length>s.settings.maxSlides&&s.active.last&&!s.settings.infiniteLoop?"horizontal"===s.settings.mode?(e=s.children.last(),t=e.position(),S(-(t.left-(s.viewport.width()-e.outerWidth())),"reset",0)):"vertical"===s.settings.mode&&(i=s.children.length-s.settings.minSlides,t=s.children.eq(i).position(),S(-t.top,"reset",0)):(t=s.children.eq(s.active.index*x()).position(),s.active.index===f()-1&&(s.active.last=!0),void 0!==t&&("horizontal"===s.settings.mode?S(-t.left,"reset",0):"vertical"===s.settings.mode&&S(-t.top,"reset",0)))},S=function(e,i,n,r){var a,l;s.usingCSS?(l="vertical"===s.settings.mode?"translate3d(0, "+e+"px, 0)":"translate3d("+e+"px, 0, 0)",o.css("-"+s.cssPrefix+"-transition-duration",n/1e3+"s"),"slide"===i?(o.css(s.animProp,l),0!==n?o.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(e){t(e.target).is(o)&&(o.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),q())}):q()):"reset"===i?o.css(s.animProp,l):"ticker"===i&&(o.css("-"+s.cssPrefix+"-transition-timing-function","linear"),o.css(s.animProp,l),0!==n?o.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(e){t(e.target).is(o)&&(o.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),S(r.resetValue,"reset",0),L())}):(S(r.resetValue,"reset",0),L()))):(a={},a[s.animProp]=e,"slide"===i?o.animate(a,n,s.settings.easing,function(){q()}):"reset"===i?o.css(s.animProp,e):"ticker"===i&&o.animate(a,n,"linear",function(){S(r.resetValue,"reset",0),L()}))},b=function(){for(var e="",i="",n=f(),o=0;o<n;o++)i="",s.settings.buildPager&&t.isFunction(s.settings.buildPager)||s.settings.pagerCustom?(i=s.settings.buildPager(o),s.pagerEl.addClass("bx-custom-pager")):(i=o+1,s.pagerEl.addClass("bx-default-pager")),e+='<div class="bx-pager-item"><a href="" data-slide-index="'+o+'" class="bx-pager-link">'+i+"</a></div>";s.pagerEl.html(e)},w=function(){s.settings.pagerCustom?s.pagerEl=t(s.settings.pagerCustom):(s.pagerEl=t('<div class="bx-pager" />'),s.settings.pagerSelector?t(s.settings.pagerSelector).html(s.pagerEl):s.controls.el.addClass("bx-has-pager").append(s.pagerEl),b()),s.pagerEl.on("click touchend","a",z)},C=function(){s.controls.next=t('<a class="bx-next" href="">'+s.settings.nextText+"</a>"),s.controls.prev=t('<a class="bx-prev" href="">'+s.settings.prevText+"</a>"),s.controls.next.bind("click touchend",E),s.controls.prev.bind("click touchend",k),s.settings.nextSelector&&t(s.settings.nextSelector).append(s.controls.next),s.settings.prevSelector&&t(s.settings.prevSelector).append(s.controls.prev),s.settings.nextSelector||s.settings.prevSelector||(s.controls.directionEl=t('<div class="bx-controls-direction" />'),s.controls.directionEl.append(s.controls.prev).append(s.controls.next),s.controls.el.addClass("bx-has-controls-direction").append(s.controls.directionEl))},T=function(){s.controls.start=t('<div class="bx-controls-auto-item"><a class="bx-start" href="">'+s.settings.startText+"</a></div>"),s.controls.stop=t('<div class="bx-controls-auto-item"><a class="bx-stop" href="">'+s.settings.stopText+"</a></div>"),s.controls.autoEl=t('<div class="bx-controls-auto" />'),s.controls.autoEl.on("click",".bx-start",M),s.controls.autoEl.on("click",".bx-stop",y),s.settings.autoControlsCombine?s.controls.autoEl.append(s.controls.start):s.controls.autoEl.append(s.controls.start).append(s.controls.stop),s.settings.autoControlsSelector?t(s.settings.autoControlsSelector).html(s.controls.autoEl):s.controls.el.addClass("bx-has-controls-auto").append(s.controls.autoEl),A(s.settings.autoStart?"stop":"start")},P=function(){s.children.each(function(e){var i=t(this).find("img:first").attr("title");void 0!==i&&(""+i).length&&t(this).append('<div class="bx-caption"><span>'+i+"</span></div>")})},E=function(t){t.preventDefault(),s.controls.el.hasClass("disabled")||(s.settings.auto&&s.settings.stopAutoOnClick&&o.stopAuto(),o.goToNextSlide())},k=function(t){t.preventDefault(),s.controls.el.hasClass("disabled")||(s.settings.auto&&s.settings.stopAutoOnClick&&o.stopAuto(),o.goToPrevSlide())},M=function(t){o.startAuto(),t.preventDefault()},y=function(t){o.stopAuto(),t.preventDefault()},z=function(e){var i,n;e.preventDefault(),s.controls.el.hasClass("disabled")||(s.settings.auto&&s.settings.stopAutoOnClick&&o.stopAuto(),i=t(e.currentTarget),void 0!==i.attr("data-sli
65740de-index")&&(n=parseInt(i.attr("data-slide-index")),n!==s.active.index&&o.goToSlide(n)))},I=function(e){var i=s.children.length;return"short"===s.settings.pagerType?(s.settings.maxSlides>1&&(i=Math.ceil(s.children.length/s.settings.maxSlides)),void s.pagerEl.html(e+1+s.settings.pagerShortSeparator+i)):(s.pagerEl.find("a").removeClass("active"),void s.pagerEl.each(function(i,n){t(n).find("a").eq(e).addClass("active")}))},q=function(){if(s.settings.infiniteLoop){var t="";0===s.active.index?t=s.children.eq(0).position():s.active.index===f()-1&&s.carousel?t=s.children.eq((f()-1)*x()).position():s.active.index===s.children.length-1&&(t=s.children.eq(s.children.length-1).position()),t&&("horizontal"===s.settings.mode?S(-t.left,"reset",0):"vertical"===s.settings.mode&&S(-t.top,"reset",0))}s.working=!1,s.settings.onSlideAfter.call(o,s.children.eq(s.active.index),s.oldIndex,s.active.index)},A=function(t){s.settings.autoControlsCombine?s.controls.autoEl.html(s.controls[t]):(s.controls.autoEl.find("a").removeClass("active"),s.controls.autoEl.find("a:not(.bx-"+t+")").addClass("active"))}
vendor: 9,627 bytes, line 65740
65740,D=function(){1===f()?(s.controls.prev.addClass("disabled"),s.controls.next.addClass("disabled")):!s.settings.infiniteLoop&&s.settings.hideControlOnEnd&&(0===s.active.index?(s.controls.prev.addClass("disabled"),s.controls.next.removeClass("disabled")):s.active.index===f()-1?(s.controls.next.addClass("disabled"),s.controls.prev.removeClass("disabled")):(s.controls.prev.removeClass("disabled"),s.controls.next.removeClass("disabled")))},H=function(){if(s.settings.autoDelay>0){setTimeout(o.startAuto,s.settings.autoDelay)}else o.startAuto(),t(window).focus(function(){o.startAuto()}).blur(function(){o.stopAuto()});s.settings.autoHover&&o.hover(function(){s.interval&&(o.stopAuto(!0),s.autoPaused=!0)},function(){s.autoPaused&&(o.startAuto(!0),s.autoPaused=null)})},W=function(){var e,i,n,r,a,l,d,c,g=0;"next"===s.settings.autoDirection?o.append(s.children.clone().addClass("bx-clone")):(o.prepend(s.children.clone().addClass("bx-clone")),e=s.children.first().position(),g="horizontal"===s.settings.mode?-e.left:-e.top),S(g,"reset",0),s.settings.pager=!1,s.settings.controls=!1,s.settings.autoControls=!1,s.settings.tickerHover&&(s.usingCSS?(r="horizontal"===s.settings.mode?4:5,s.viewport.hover(function(){i=o.css("-"+s.cssPrefix+"-transform"),n=parseFloat(i.split(",")[r]),S(n,"reset",0)},function(){c=0,s.children.each(function(e){c+="horizontal"===s.settings.mode?t(this).outerWidth(!0):t(this).outerHeight(!0)}),a=s.settings.speed/c,l="horizontal"===s.settings.mode?"left":"top",d=a*(c-Math.abs(parseInt(n))),L(d)})):s.viewport.hover(function(){o.stop()},function(){c=0,s.children.each(function(e){c+="horizontal"===s.settings.mode?t(this).outerWidth(!0):t(this).outerHeight(!0)}),a=s.settings.speed/c,l="horizontal"===s.settings.mode?"left":"top",d=a*(c-Math.abs(parseInt(o.css(l)))),L(d)})),L()},L=function(t){var e,i,n,r=t?t:s.settings.speed,a={left:0,top:0},l={left:0,top:0};"next"===s.settings.autoDirection?a=o.find(".bx-clone").first().position():l=s.children.first().position(),e="horizontal"===s.settings.mode?-a.left:-a.top,i="horizontal"===s.settings.mode?-l.left:-l.top,n={resetValue:i},S(e,"ticker",r,n)},O=function(e){var i=t(window),n={top:i.scrollTop(),left:i.scrollLeft()},s=e.offset();return n.right=n.left+i.width(),n.bottom=n.top+i.height(),s.right=s.left+e.outerWidth(),s.bottom=s.top+e.outerHeight(),!(n.right<s.left||n.left>s.right||n.bottom<s.top||n.top>s.bottom)},F=function(t){var e=document.activeElement.tagName.toLowerCase(),i="input|textarea",n=new RegExp(e,["i"]),s=n.exec(i);if(null==s&&O(o)){if(39===t.keyCode)return E(t),!1;if(37===t.keyCode)return k(t),!1}},N=function(){s.touch={start:{x:0,y:0},end:{x:0,y:0}},s.viewport.bind("touchstart MSPointerDown pointerdown",X),s.viewport.on("click",".bxslider a",function(t){s.viewport.hasClass("click-disabled")&&(t.preventDefault(),s.viewport.removeClass("click-disabled"))})},X=function(t){if(s.controls.el.addClass("disabled"),s.working)t.preventDefault(),s.controls.el.removeClass("disabled");else{s.touch.originalPos=o.position();var e=t.originalEvent,i="undefined"!=typeof e.changedTouches?e.changedTouches:[e];s.touch.start.x=i[0].pageX,s.touch.start.y=i[0].pageY,s.viewport.get(0).setPointerCapture&&(s.pointerId=e.pointerId,s.viewport.get(0).setPointerCapture(s.pointerId)),s.viewport.bind("touchmove MSPointerMove pointermove",V),s.viewport.bind("touchend MSPointerUp pointerup",R),s.viewport.bind("MSPointerCancel pointercancel",Y)}},Y=function(t){S(s.touch.originalPos.left,"reset",0),s.controls.el.removeClass("disabled"),s.viewport.unbind("MSPointerCancel pointercancel",Y),s.viewport.unbind("touchmove MSPointerMove pointermove",V),s.viewport.unbind("touchend MSPointerUp pointerup",R),s.viewport.get(0).releasePointerCapture&&s.viewport.get(0).releasePointerCapture(s.pointerId)},V=function(t){var e=t.originalEvent,i="undefined"!=typeof e.changedTouches?e.changedTouches:[e],n=Math.abs(i[0].pageX-s.touch.start.x),o=Math.abs(i[0].pageY-s.touch.start.y),r=0,a=0;3*n>o&&s.settings.preventDefaultSwipeX?t.preventDefault():3*o>n&&s.settings.preventDefaultSwipeY&&t.preventDefault(),"fade"!==s.settings.mode&&s.settings.oneToOneTouch&&("horizontal"===s.settings.mode?(a=i[0].pageX-s.touch.start.x,r=s.touch.originalPos.left+a):(a=i[0].pageY-s.touch.start.y,r=s.touch.originalPos.top+a),S(r,"reset",0))},R=function(t){s.viewport.unbind("touchmove MSPointerMove pointermove",V),s.controls.el.removeClass("disabled");var e=t.originalEvent,i="undefined"!=typeof e.changedTouches?e.changedTouches:[e],n=0,r=0;s.touch.end.x=i[0].pageX,s.touch.end.y=i[0].pageY,"fade"===s.settings.mode?(r=Math.abs(s.touch.start.x-s.touch.end.x),r>=s.settings.swipeThreshold&&(s.touch.start.x>s.touch.end.x?o.goToNextSlide():o.goToPrevSlide(),o.stopAuto())):("horizontal"===s.settings.mode?(r=s.touch.end.x-s.touch.start.x,n=s.touch.originalPos.left):(r=s.touch.end.y-s.touch.start.y,n=s.touch.originalPos.top),!s.settings.infiniteLoop&&(0===s.active.index&&r>0||s.active.last&&r<0)?S(n,"reset",200):Math.abs(r)>=s.settings.swipeThreshold?(r<0?o.goToNextSlide():o.goToPrevSlide(),o.stopAuto()):S(n,"reset",200)),s.viewport.unbind("touchend MSPointerUp pointerup",R),s.viewport.get(0).releasePointerCapture&&s.viewport.get(0).releasePointerCapture(s.pointerId)},Z=function(e){if(s.initialized)if(s.working)window.setTimeout(Z,10);else{var i=t(window).width(),n=t(window).height();r===i&&a===n||(r=i,a=n,o.redrawSlider(),s.settings.onSliderResize.call(o,s.active.index))}},B=function(t){var e=v();s.settings.ariaHidden&&!s.settings.ticker&&(s.children.attr("aria-hidden","true"),s.children.slice(t,t+e).attr("aria-hidden","false"))},U=function(t){return t<0?s.settings.infiniteLoop?f()-1:s.active.index:t>=f()?s.settings.infiniteLoop?0:s.active.index:t};return o.goToSlide=function(e,i){var n,r,a,l,d=!0,c=0,g={left:0,top:0},u=null;if(s.oldIndex=s.active.index,s.active.index=U(e),!s.working&&s.active.index!==s.oldIndex){if(s.working=!0,d=s.settings.onSlideBefore.call(o,s.children.eq(s.active.index),s.oldIndex,s.active.index),"undefined"!=typeof d&&!d)return s.active.index=s.oldIndex,void(s.working=!1);"next"===i?s.settings.onSlideNext.call(o,s.children.eq(s.active.index),s.oldIndex,s.active.index)||(d=!1):"prev"===i&&(s.settings.onSlidePrev.call(o,s.children.eq(s.active.index),s.oldIndex,s.active.index)||(d=!1)),s.active.last=s.active.index>=f()-1,(s.settings.pager||s.settings.pagerCustom)&&I(s.active.index),s.settings.controls&&D(),"fade"===s.settings.mode?(s.settings.adaptiveHeight&&s.viewport.height()!==p()&&s.viewport.animate({height:p()},s.settings.adaptiveHeightSpeed),s.children.filter(":visible").fadeOut(s.settings.speed).css({zIndex:0}),s.children.eq(s.active.index).css("zIndex",s.settings.slideZIndex+1).fadeIn(s.settings.speed,function(){t(this).css("zIndex",s.settings.slideZIndex),q()})):(s.settings.adaptiveHeight&&s.viewport.height()!==p()&&s.viewport.animate({height:p()},s.settings.adaptiveHeightSpeed),!s.settings.infiniteLoop&&s.carousel&&s.active.last?"horizontal"===s.settings.mode?(u=s.children.eq(s.children.length-1),g=u.position(),c=s.viewport.width()-u.outerWidth()):(n=s.children.length-s.settings.minSlides,g=s.children.eq(n).position()):s.carousel&&s.active.last&&"prev"===i?(r=1===s.settings.moveSlides?s.settings.maxSlides-x():(f()-1)*x()-(s.children.length-s.settings.maxSlides),u=o.children(".bx-clone").eq(r),g=u.position()):"next"===i&&0===s.active.index?(g=o.find("> .bx-clone").eq(s.settings.maxSlides).position(),s.active.last=!1):e>=0&&(l=e*parseInt(x()),g=s.children.eq(l).position()),"undefined"!=typeof g?(a="horizontal"===s.settings.mode?-(g.left-c):-g.top,S(a,"slide",s.settings.speed)):s.working=!1),s.settings.ariaHidden&&B(s.active.index*x())}},o.goToNextSlide=function(){if(s.settings.infiniteLoop||!s.active.last){var t=parseInt(s.active.index)+1;o.goToSlide(t,"next")}},o.goToPrevSlide=function(){if(s.settings.infiniteLoop||0!==s.active.index){var t=parseInt(s.active.index)-1;o.goToSlide(t,"prev")}},o.startAuto=function(t){s.interval||(s.interval=setInterval(function(){"next"===s.settings.autoDirection?o.goToNextSlide():o.goToPrevSlide()},s.settings.pause),s.settings.autoControls&&t!==!0&&A("stop"))},o.stopAuto=function(t){s.interval&&(clearInterval(s.interval),s.interval=null,s.settings.autoControls&&t!==!0&&A("start"))},o.getCurrentSlide=function(){return s.active.index},o.getCurrentSlideElement=function(){return s.children.eq(s.active.index)},o.getSlideElement=function(t){return s.children.eq(t)},o.getSlideCount=function(){return s.children.length},o.isWorking=function(){return s.working},o.redrawSlider=function(){s.children.add(o.find(".bx-clone")).outerWidth(h()),s.viewport.css("height",p()),s.settings.ticker||m(),s.active.last&&(s.active.index=f()-1),s.active.index>=f()&&(s.active.last=!0),s.settings.pager&&!s.settings.pagerCustom&&(b(),I(s.active.index)),s.settings.ariaHidden&&B(s.active.index*x())},o.destroySlider=function(){s.initialized&&(s.initialized=!1,t(".bx-clone",this).remove(),s.children.each(function(){void 0!==t(this).data("origStyle")?t(this).attr("style",t(this).data("origStyle")):t(this).removeAttr("style")}),void 0!==t(this).data("origStyle")?this.attr("style",t(this).data("origStyle")):t(this).removeAttr("style"),t(this).unwrap().unwrap(),s.controls.el&&s.controls.el.remove(),s.controls.next&&s.controls.next.remove(),s.controls.prev&&s.controls.prev.remove(),s.pagerEl&&s.settings.controls&&!s.settings.pagerCustom&&s.pagerEl.remove(),t(".bx-caption",this).remove(),s.controls.autoEl&&s.controls.autoEl.remove(),clearInterval(s.interval),s.settings.responsive&&t(window).unbind("resize",Z),s.settings.keyboardEnabled&&t(document).unbind("
65740keydown",F),t(this).removeData("bxSlider"))},o.reloadSlider=function(e){void 0!==e&&(n=e),o.destroySlider(),l(),t(o).data("bxSlider",this)},l(),t(o).data("bxSlider",this),this}}}(jQuery); 65741 65742// Camera slideshow v1.3.3 - a jQuery slideshow with many effects, transitions, easy to customize, using canvas and mobile ready, based on jQuery 1.4+ 65743// Copyright (c) 2012 by Manuel Masia - www.pixedelic.com 65744// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 65745;(function(a){a.fn.camera=function(b,c){function e(){if(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i)){return true}}function H(){var b=a(s).width();a("li",s).removeClass("camera_visThumb");a("li",s).each(function(){var c=a(this).position(),d=a("ul",s).outerWidth(),e=a("ul",s).offset().left,f=a("> div",s).offset().left,g=f-e;if(g>0){a(".camera_prevThumbs",V).removeClass("hideNav")}else{a(".camera_prevThumbs",V).addClass("hideNav")}if(d-g>b){a(".camera_nextThumbs",V).removeClass("hideNav")}else{a(".camera_nextThumbs",V).addClass("hideNav")}var h=c.left,i=c.left+a(this).width();if(i-g<=b&&h-g>=0){a(this).addClass("camera_visThumb")}})}function K(){function d(){t=f.width();if(b.height.indexOf("%")!=-1){var c=Math.round(t/(100/parseFloat(b.height)));if(b.minHeight!=""&&c<parseFloat(b.minHeight)){u=parseFloat(b.minHeight)}else{u=c}f.css({height:u})}else if(b.height=="auto"){u=f.height()}else{u=parseFloat(b.height);f.css({height:u})}a(".camerarelative",k).css({width:t,height:u});a(".imgLoaded",k).each(function(){var c=a(this),d=c.attr("width"),e=c.attr("height"),f=c.index(),g,h,i=c.attr("data-alignment"),j=c.attr("data-portrait");if(typeof i==="undefined"||i===false||i===""){i=b.alignment}if(typeof j==="undefined"||j===false||j===""){j=b.portrait}if(j==false||j=="false"){if(d/e<t/u){var k=t/d;var l=Math.abs(u-e*k)*.5;switch(i){case"topLeft":g=0;break;case"topCenter":g=0;break;case"topRight":g=0;break;case"centerLeft":g="-"+l+"px";break;case"center":g="-"+l+"px";break;case"centerRight":g="-"+l+"px";break;case"bottomLeft":g="-"+l*2+"px";break;case"bottomCenter":g="-"+l*2+"px";break;case"bottomRight":g="-"+l*2+"px";break}c.css({height:e*k,"margin-left":0,"margin-top":g,position:"absolute",visibility:"visible",width:t})}else{var k=u/e;var l=Math.abs(t-d*k)*.5;switch(i){case"topLeft":h=0;break;case"topCenter":h="-"+l+"px";break;case"topRight":h="-"+l*2+"px";break;case"centerLeft":h=0;break;case"center":h="-"+l+"px";break;case"centerRight":h="-"+l*2+"px";break;case"bottomLeft":h=0;break;case"bottomCenter":h="-"+l+"px";break;case"bottomRight":h="-"+l*2+"px";break}c.css({height:u,"margin-left":h,"margin-top":0,position:"absolute",visibility:"visible",width:d*k})}}
65745else{if(d/e<t/u){var k=u/e;var l=Math.abs(t-d*k)*.5;switch(i){case"topLeft":h=0;break;case"topCenter":h=l+"px";break;case"topRight":h=l*2+"px";break;case"centerLeft":h=0;break;case"center":h=l+"px";break;case"centerRight":h=l*2+"px";break;case"bottomLeft":h=0;break;case"bottomCenter":h=l+"px";break;case"bottomRight":h=l*2+"px";break}c.css({height:u,"margin-left":h,"margin-top":0,position:"absolute",visibility:"visible",width:d*k})}else{var k=t/d;var l=Math.abs(u-e*k)*.5;switch(i){case"topLeft":g=0;break;case"topCenter":g=0;break;case"topRight":g=0;break;case"centerLeft":g=l+"px";break;case"center":g=l+"px";break;case"centerRight":g=l+"px";break;case"bottomLeft":g=l*2+"px";break;case"bottomCenter":g=l*2+"px";break;case"bottomRight":g=l*2+"px";break}c.css({height:e*k,"margin-left":0,"margin-top":g,position:"absolute",visibility:"visible",width:t})}}})}var c;if(I==true){clearTimeout(c);c=setTimeout(d,200)}else{d()}I=true}function X(a){for(var b,c,d=a.length;d;b=parseInt(Math.random()*d),c=a[--d],a[d]=a[b],a[b]=c);return a}function Y(a){return Math.ceil(a)==Math.floor(a)}function hb(){if(a(s).length&&!a(r).length){var b=a(s).outerWidth(),c=a("ul > li",s).outerWidth(),d=a("li.cameracurrent",s).length?a("li.cameracurrent",s).position():"",e=a("ul > li",s).length*a("ul > li",s).outerWidth(),g=a("ul",s).offset().left,h=a("> div",s).offset().left,i;if(g<0){i="-"+(h-g)}else{i=h-g}if(gb==true){a("ul",s).width(a("ul > li",s).length*a("ul > li",s).outerWidth());if(a(s).length&&!a(r).lenght){f.css({marginBottom:a(s).outerHeight()})}H();a("ul",s).width(a("ul > li",s).length*a("ul > li",s).outerWidth());if(a(s).length&&!a(r).lenght){f.css({marginBottom:a(s).outerHeight()})}}gb=false;var j=a("li.cameracurrent",s).length?d.left:"",k=a("li.cameracurrent",s).length?d.left+a("li.cameracurrent",s).outerWidth():"";if(j<a("li.cameracurrent",s).outerWidth()){j=0}if(k-i>b){if(j+b<e){a("ul",s).animate({"margin-left":"-"+j+"px"},500,H)}else{a("ul",s).animate({"margin-left":"-"+(a("ul",s).outerWidth()-b)+"px"},500,H)}}else if(j-i<0){a("ul",s).animate({"margin-left":"-"+j+"px"},500,H)}else{a("ul",s).css({"margin-left":"auto","margin-right":"auto"});setTimeout(H,100)}}}function ib(){bb=0;var c=a(".camera_bar_cont",V).width(),d=a(".camera_bar_cont",V).height();if(h!="pie"){switch(U){case"leftToRight":a("#"+i).css({right:c});break;case"rightToLeft":a("#"+i).css({left:c});break;case"topToBottom":a("#"+i).css({bottom:d});break;case"bottomToTop":a("#"+i).css({top:d});break}}else{db.clearRect(0,0,b.pieDiameter,b.pieDiameter)}}function jb(c){j.addClass("camerasliding");R=false;var d=parseFloat(a("div.cameraSlide.cameracurrent",k).index());if(c>0){var l=c-1}else if(d==B-1){var l=0}else{var l=d+1}var m=a(".cameraSlide:eq("+l+")",k);var n=a(".cameraSlide:eq("+(l+1)+")",k).addClass("cameranext");if(d!=l+1){n.hide()}a(".cameraContent",g).fadeOut(600);a(".camera_caption",g).show();a(".camerarelative",m).append(a("> div ",j).eq(l).find("> div.camera_effected"));a(".camera_target_content .cameraContent:eq("+l+")",f).append(a("> div ",j).eq(l).find("> div"));if(!a(".imgLoaded",m).length){var o=v[l];var p=new Image;p.src=o+"?"+(new Date).getTime();m.css("visibility","hidden");m.prepend(a(p).attr("class","imgLoaded").css("visibility","hidden"));var q,w;if(!a(p).get(0).complete||q=="0"||w=="0"||typeof q==="undefined"||q===false||typeof w==="undefined"||w===false){a(".camera_loader",f).delay(500).fadeIn(400);p.onload=function(){q=p.naturalWidth;w=p.naturalHeight;a(p).attr("data-alignment",z[l]).attr("data-portrait",y[l]);a(p).attr("width",q);a(p).attr("height",w);k.find(".cameraSlide_"+l).hide().css("visibility","visible");K();jb(l+1)}}}else{if(v.length>l+1&&!a(".imgLoaded",n).length){var x=v[l+1];var A=new Image;A.src=x+"?"+(new Date).getTime();n.prepend(a(A).attr("class","imgLoaded").css("visibility","hidden"));A.onload=function(){q=A.naturalWidth;w=A.naturalHeight;a(A).attr("data-alignment",z[l+1]).attr("data-portrait",y[l+1]);a(A).attr("width",q);a(A).attr("height",w);K()}}b.onLoaded.call(this);if(a(".camera_loader",f).is(":visible")){a(".camera_loader",f).fadeOut(400)}else{a(".camera_loader",f).css({visibility:"hidden"});a(".camera_loader",f).fadeOut(400,function(){a(".camera_loader",f).css({visibility:"visible"})})}var C=b.rows,D=b.cols,F=1,G=0,H,I,J,N,O,P=new Array("simpleFade","curtainTopLeft","curtainTopRight","curtainBottomLeft","curtainBottomRight","curtainSliceLeft","curtainSliceRight","blindCurtainTopLeft","blindCurtainTopRight","blindCurtainBottomLeft","blindCurtainBottomRight","blindCurtainSliceBottom","blindCurtainSliceTop","stampede","mosaic","mosaicReverse","mosaicRandom","mosaicSpiral","mosaicSpiralReverse","topLeftBottomRight","bottomRightTopLeft","bottomLeftTopRight","topRightBottomLeft","scrollLeft","scrollRight","scrollTop","scrollBottom","scrollHorz");marginLeft=0,marginTop=0,opacityOnGrid=0;if(b.opacityOnGrid==true){opacityOnGrid=0}else{opacityOnGrid=1}var Q=a(" > div",j).eq(l).attr("data-fx");if(e()&&b.mobileFx!=""&&b.mobileFx!="default"){N=b.mobileFx}else{if(typeof Q!=="undefined"&&Q!==false&&Q!=="default"){N=Q}else{N=b.fx}}if(N=="random"){N=X(P);N=N[0]}else{N=N;if(N.indexOf(",")>0){N=N.replace(/ /g,"");N=N.split(",");N=X(N);N=N[0]}}dataEasing=a(" > div",j).eq(l).attr("data-easing");mobileEasing=a(" > div",j).eq(l).attr("data-mobileEasing");if(e()&&b.mobileEasing!=""&&b.mobileEasing!="default"){if(typeof mobileEasing!=="undefined"&&mobileEasing!==false&&mobileEasing!=="default"){O=mobileEasing}else{O=b.mobileEasing}}else{if(typeof dataEasing!=="undefined"&&dataEasing!==false&&dataEasing!=="default"){O=dataEasing}else{O=b.easing}}H=a(" >
65745 div",j).eq(l).attr("data-slideOn");if(typeof H!=="undefined"&&H!==false){T=H}else{if(b.slideOn=="random"){var T=new Array("next","prev");T=X(T);T=T[0]}else{T=b.slideOn}}var Y=a(" > div",j).eq(l).attr("data-time");if(typeof Y!=="undefined"&&Y!==false&&Y!==""){I=parseFloat(Y)}else{I=b.time}var Z=a(" > div",j).eq(l).attr("data-transPeriod");if(typeof Z!=="undefined"&&Z!==false&&Z!==""){J=parseFloat(Z)}else{J=b.transPeriod}if(!a(j).hasClass("camerastarted")){N="simpleFade";T="next";O="";J=400;a(j).addClass("camerastarted")}switch(N){case"simpleFade":D=1;C=1;break;case"curtainTopLeft":if(b.slicedCols==0){D=b.cols}else{D=b.slicedCols}C=1;break;case"curtainTopRight":if(b.slicedCols==0){D=b.cols}else{D=b.slicedCols}C=1;break;case"curtainBottomLeft":if(b.slicedCols==0){D=b.cols}else{D=b.slicedCols}C=1;break;case"curtainBottomRight":if(b.slicedCols==0){D=b.cols}else{D=b.slicedCols}C=1;break;case"curtainSliceLeft":if(b.slicedCols==0){D=b.cols}else{D=b.slicedCols}C=1;break;case"curtainSliceRight":if(b.slicedCols==0){D=b.cols}else{D=b.slicedCols}C=1;break;case"blindCurtainTopLeft":if(b.slicedRows==0){C=b.rows}else{C=b.slicedRows}D=1;break;case"blindCurtainTopRight":if(b.slicedRows==0){C=b.rows}else{C=b.slicedRows}D=1;break;case"blindCurtainBottomLeft":if(b.slicedRows==0){C=b.rows}else{C=b.slicedRows}D=1;break;case"blindCurtainBottomRight":if(b.slicedRows==0){C=b.rows}else{C=b.slicedRows}D=1;break;case"blindCurtainSliceTop":if(b.slicedRows==0){C=b.rows}else{C=b.slicedRows}D=1;break;case"blindCurtainSliceBottom":if(b.slicedRows==0){C=b.rows}else{C=b.slicedRows}D=1;break;case"stampede":G="-"+J;break;case"mosaic":G=b.gridDifference;break;case"mosaicReverse":G=b.gridDifference;break;case"mosaicRandom":break;case"mosaicSpiral":G=b.gridDifference;F=1.7;break;case"mosaicSpiralReverse":G=b.gridDifference;F=1.7;break;case"topLeftBottomRight":G=b.gridDifference;F=6;break;case"bottomRightTopLeft":G=b.gridDifference;F=6;break;case"bottomLeftTopRight":G=b.gridDifference;F=6;break;case"topRightBottomLeft":G=b.gridDifference;F=6;break;case"scrollLeft":D=1;C=1;break;case"scrollRight":D=1;C=1;break;case"scrollTop":D=1;C=1;break;case"scrollBottom":D=1;C=1;break;case"scrollHorz":D=1;C=1;break}var _=0;var ab=C*D;var eb=t-Math.floor(t/D)*D;var fb=u-Math.floor(u/C)*C;var gb;var kb;var lb=0;var mb=0;var nb=new Array;var ob=new Array;var pb=new Array;while(_<ab){nb.push(_);ob.push(_);E.append('<div class="cameraappended" style="display:none; overflow:hidden; position:absolute; z-index:1000" />');var qb=a(".cameraappended:eq("+_+")",k);if(N=="scrollLeft"||N=="scrollRight"||N=="scrollTop"||N=="scrollBottom"||N=="scrollHorz"){S.eq(l).clone().show().appendTo(qb)}else{if(T=="next"){S.eq(l).clone().show().appendTo(qb)}else{S.eq(d).clone().show().appendTo(qb)}}if(_%D<eb){gb=1}else{gb=0}if(_%D==0){lb=0}if(Math.floor(_/D)<fb){kb=1}else{kb=0}qb.css({height:Math.floor(u/C+kb+1),left:lb,top:mb,width:Math.floor(t/D+gb+1)});a("> .cameraSlide",qb).css({height:u,"margin-left":"-"+lb+"px","margin-top":"-"+mb+"px",width:t});lb=lb+qb.width()-1;if(_%D==D-1){mb=mb+qb.height()-1}_++}switch(N){case"curtainTopLeft":break;case"curtainBottomLeft":break;case"curtainSliceLeft":break;case"curtainTopRight":nb=nb.reverse();break;case"curtainBottomRight":nb=nb.reverse();break;case"curtainSliceRight":nb=nb.reverse();break;case"blindCurtainTopLeft":break;case"blindCurtainBottomLeft":nb=nb.reverse();break;case"blindCurtainSliceTop":break;case"blindCurtainTopRight":break;case"blindCurtainBottomRight":nb=nb.reverse();break;case"blindCurtainSliceBottom":nb=nb.reverse();break;case"stampede":nb=X(nb);break;case"mosaic":break;case"mosaicReverse":nb=nb.reverse();break;case"mosaicRandom":nb=X(nb);break;case"mosaicSpiral":var rb=C/2,sb,tb,ub,vb=0;for(ub=0;ub<rb;ub++){tb=ub;for(sb=ub;sb<D-ub-1;sb++){pb[vb++]=tb*D+sb}sb=D-ub-1;for(tb=ub;tb<C-ub-1;tb++){pb[vb++]=tb*D+sb}tb=C-ub-1;for(sb=D-ub-1;sb>ub;sb--){pb[vb++]=tb*D+sb}sb=ub;for(tb=C-ub-1;tb>ub;tb--){pb[vb++]=tb*D+sb}}nb=pb;break;case"mosaicSpiralReverse":var rb=C/2,sb,tb,ub,vb=ab-1;for(ub=0;ub<rb;ub++){tb=ub;for(sb=ub;sb<D-ub-1;sb++){pb[vb--]=tb*D+sb}sb=D-ub-1;for(tb=ub;tb<C-ub-1;tb++){pb[vb--]=tb*D+sb}tb=C-ub-1;for(sb=D-ub-1;sb>ub;sb--){pb[vb--]=tb*D+sb}sb=ub;for(tb=C-ub-1;tb>ub;tb--){pb[vb--]=tb*D+sb}}nb=pb;break;case"topLeftBottomRight":for(var tb=0;tb<C;tb++)for(var sb=0;sb<D;sb++){pb.push(sb+tb)}ob=pb;break;case"bottomRightTopLeft":for(var tb=0;tb<C;tb++)for(var sb=0;sb<D;sb++){pb.push(sb+tb)}ob=pb.reverse();break;case"bottomLeftTopRight":for(var tb=C;tb>0;tb--)for(var sb=0;sb<D;sb++){pb.push(sb+tb)}ob=pb;break;case"topRightBottomLeft":for(var tb=0;tb<C;tb++)for(var sb=D;sb>0;sb--){pb.push(sb+tb)}ob=pb;break}a.each(nb,function(c,e){function o(){a(this).addClass("cameraeased");if(a(".cameraeased",k).length>=0){a(s).css({visibility:"visible"})}
65745if(a(".cameraeased",k).length==ab){hb();a(".moveFromLeft, .moveFromRight, .moveFromTop, .moveFromBottom, .fadeIn, .fadeFromLeft, .fadeFromRight, .fadeFromTop, .fadeFromBottom",g).each(function(){a(this).css("visibility","hidden")});S.eq(l).show().css("z-index","999").removeClass("cameranext").addClass("cameracurrent");S.eq(d).css("z-index","1").removeClass("cameracurrent");a(".cameraContent",g).eq(l).addClass("cameracurrent");if(d>=0){a(".cameraContent",g).eq(d).removeClass("cameracurrent")}b.onEndTransition.call(this);if(a("> div",j).eq(l).attr("data-video")!="hide"&&a(".cameraContent.cameracurrent .imgFake",g).length){a(".cameraContent.cameracurrent .imgFake",g).click()}var c=S.eq(l).find(".fadeIn").length;var e=a(".cameraContent",g).eq(l).find(".moveFromLeft, .moveFromRight, .moveFromTop, .moveFromBottom, .fadeIn, .fadeFromLeft, .fadeFromRight, .fadeFromTop, .fadeFromBottom").length;if(c!=0){a(".cameraSlide.cameracurrent .fadeIn",g).each(function(){if(a(this).attr("data-easing")!=""){var b=a(this).attr("data-easing")}else{var b=O}var d=a(this);if(typeof d.attr("data-outerWidth")==="undefined"||d.attr("data-outerWidth")===false||d.attr("data-outerWidth")===""){var e=d.outerWidth();d.attr("data-outerWidth",e)}else{var e=d.attr("data-outerWidth")}if(typeof d.attr("data-outerHeight")==="undefined"||d.attr("data-outerHeight")===false||d.attr("data-outerHeight")===""){var f=d.outerHeight();d.attr("data-outerHeight",f)}else{var f=d.attr("data-outerHeight")}var g=d.position();var h=g.left;var i=g.top;var j=d.attr("class");var k=d.index();var l=d.parents(".camerarelative").outerHeight();var m=d.parents(".camerarelative").outerWidth();if(j.indexOf("fadeIn")!=-1){d.animate({opacity:0}
65745,0).css("visibility","visible").delay(I/c*.1*(k-1)).animate({opacity:1},I/c*.15,b)}else{d.css("visibility","visible")}})}a(".cameraContent.cameracurrent",g).show();if(e!=0){a(".cameraContent.cameracurrent .moveFromLeft, .cameraContent.cameracurrent .moveFromRight, .cameraContent.cameracurrent .moveFromTop, .cameraContent.cameracurrent .moveFromBottom, .cameraContent.cameracurrent .fadeIn, .cameraContent.cameracurrent .fadeFromLeft, .cameraContent.cameracurrent .fadeFromRight, .cameraContent.cameracurrent .fadeFromTop, .cameraContent.cameracurrent .fadeFromBottom",g).each(function(){if(a(this).attr("data-easing")!=""){var b=a(this).attr("data-easing")}else{var b=O}var c=a(this);var d=c.position();var f=d.left;var g=d.top;var h=c.attr("class");var i=c.index();var j=c.outerHeight();if(h.indexOf("moveFromLeft")!=-1){c.css({left:"-"+t+"px",right:"auto"});c.css("visibility","visible").delay(I/e*.1*(i-1)).animate({left:d.left},I/e*.15,b)}else if(h.indexOf("moveFromRight")!=-1){c.css({left:t+"px",right:"auto"});c.css("visibility","visible").delay(I/e*.1*(i-1)).animate({left:d.left},I/e*.15,b)}else if(h.indexOf("moveFromTop")!=-1){c.css({top:"-"+u+"px",bottom:"auto"});c.css("visibility","visible").delay(I/e*.1*(i-1)).animate({top:d.top},I/e*.15,b,function(){c.css({top:"auto",bottom:0})})}else if(h.indexOf("moveFromBottom")!=-1){c.css({top:u+"px",bottom:"auto"});c.css("visibility","visible").delay(I/e*.1*(i-1)).animate({top:d.top},I/e*.15,b)}else if(h.indexOf("fadeFromLeft")!=-1){c.animate({opacity:0}
65745,0).css({left:"-"+t+"px",right:"auto"});c.css("visibility","visible").delay(I/e*.1*(i-1)).animate({left:d.left,opacity:1},I/e*.15,b)}else if(h.indexOf("fadeFromRight")!=-1){c.animate({opacity:0},0).css({left:t+"px",right:"auto"});c.css("visibility","visible").delay(I/e*.1*(i-1)).animate({left:d.left,opacity:1},I/e*.15,b)}else if(h.indexOf("fadeFromTop")!=-1){c.animate({opacity:0},0).css({top:"-"+u+"px",bottom:"auto"});c.css("visibility","visible").delay(I/e*.1*(i-1)).animate({top:d.top,opacity:1},I/e*.15,b,function(){c.css({top:"auto",bottom:0})})}else if(h.indexOf("fadeFromBottom")!=-1){c.animate({opacity:0},0).css({bottom:"-"+j+"px"});c.css("visibility","visible").delay(I/e*.1*(i-1)).animate({bottom:"0",opacity:1},I/e*.15,b)}else if(h.indexOf("fadeIn")!=-1){c.animate({opacity:0},0).css("visibility","visible").delay(I/e*.1*(i-1)).animate({opacity:1},I/e*.15,b)}else{c.css("visibility","visible")}})}a(".cameraappended",k).remove();j.removeClass("camerasliding");S.eq(d).hide();var f=a(".camera_bar_cont",V).width(),m=a(".camera_bar_cont",V).height(),o;if(h!="pie"){o=.05}else{o=.005}a("#"+i).animate({opacity:b.loaderOpacity},200);L=setInterval(function(){if(j.hasClass("stopped")){clearInterval(L)}if(h!="pie"){if(bb<=1.002&&!j.hasClass("stopped")&&!j.hasClass("paused")&&!j.hasClass("hovered")){bb=bb+o}else if(bb<=1&&(j.hasClass("stopped")||j.hasClass("paused")||j.hasClass("stopped")||j.hasClass("hovered"))){bb=bb}else{if(!j.hasClass("stopped")&&!j.hasClass("paused")&&!j.hasClass("hovered")){clearInterval(L);W();a("#"+i).animate({opacity:0}
65745,200,function(){clearTimeout(M);M=setTimeout(ib,n);jb();b.onStartLoading.call(this)})}}switch(U){case"leftToRight":a("#"+i).animate({right:f-f*bb},I*o,"linear");break;case"rightToLeft":a("#"+i).animate({left:f-f*bb},I*o,"linear");break;case"topToBottom":a("#"+i).animate({bottom:m-m*bb},I*o,"linear");break;case"bottomToTop":a("#"+i).animate({bottom:m-m*bb},I*o,"linear");break}}else{cb=bb;db.clearRect(0,0,b.pieDiameter,b.pieDiameter);db.globalCompositeOperation="destination-over";db.beginPath();db.arc(b.pieDiameter/2,b.pieDiameter/2,b.pieDiameter/2-b.loaderStroke,0,Math.PI*2,false);db.lineWidth=b.loaderStroke;db.strokeStyle=b.loaderBgColor;db.stroke();db.closePath();db.globalCompositeOperation="source-over";db.beginPath();db.arc(b.pieDiameter/2,b.pieDiameter/2,b.pieDiameter/2-b.loaderStroke,0,Math.PI*2*cb,false);db.lineWidth=b.loaderStroke-b.loaderPadding*2;db.strokeStyle=b.loaderColor;db.stroke();db.closePath();if(bb<=1.002&&!j.hasClass("stopped")&&!j.hasClass("paused")&&!j.hasClass("hovered")){bb=bb+o}else if(bb<=1&&(j.hasClass("stopped")||j.hasClass("paused")||j.hasClass("hovered"))){bb=bb}else{if(!j.hasClass("stopped")&&!j.hasClass("paused")&&!j.hasClass("hovered")){clearInterval(L);W();a("#"+i+", .camera_canvas_wrap",V).animate({opacity:0}
65745,200,function(){clearTimeout(M);M=setTimeout(ib,n);jb();b.onStartLoading.call(this)})}}}},I*o)}}if(e%D<eb){gb=1}else{gb=0}if(e%D==0){lb=0}if(Math.floor(e/D)<fb){kb=1}else{kb=0}switch(N){case"simpleFade":height=u;width=t;opacityOnGrid=0;break;case"curtainTopLeft":height=0,width=Math.floor(t/D+gb+1),marginTop="-"+Math.floor(u/C+kb+1)+"px";break;case"curtainTopRight":height=0,width=Math.floor(t/D+gb+1),marginTop="-"+Math.floor(u/C+kb+1)+"px";break;case"curtainBottomLeft":height=0,width=Math.floor(t/D+gb+1),marginTop=Math.floor(u/C+kb+1)+"px";break;case"curtainBottomRight":height=0,width=Math.floor(t/D+gb+1),marginTop=Math.floor(u/C+kb+1)+"px";break;case"curtainSliceLeft":height=0,width=Math.floor(t/D+gb+1);if(e%2==0){marginTop=Math.floor(u/C+kb+1)+"px"}else{marginTop="-"+Math.floor(u/C+kb+1)+"px"}break;case"curtainSliceRight":height=0,width=Math.floor(t/D+gb+1);if(e%2==0){marginTop=Math.floor(u/C+kb+1)+"px"}else{marginTop="-"+Math.floor(u/C+kb+1)+"px"}break;case"blindCurtainTopLeft":height=Math.floor(u/C+kb+1),width=0,marginLeft="-"+Math.floor(t/D+gb+1)+"px";break;case"blindCurtainTopRight":height=Math.floor(u/C+kb+1),width=0,marginLeft=Math.floor(t/D+gb+1)+"px";break;case"blindCurtainBottomLeft":height=Math.floor(u/C+kb+1),width=0,marginLeft="-"+Math.floor(t/D+gb+1)+"px";break;case"blindCurtainBottomRight":height=Math.floor(u/C+kb+1),width=0,marginLeft=Math.floor(t/D+gb+1)+"px";break;case"blindCurtainSliceBottom":height=Math.floor(u/C+kb+1),width=0;if(e%2==0){marginLeft="-"+Math.floor(t/D+gb+1)+"px"}else{marginLeft=Math.floor(t/D+gb+1)+"px"}break;case"blindCurtainSliceTop":height=Math.floor(u/C+kb+1),width=0;if(e%2==0){marginLeft="-"+Math.floor(t/D+gb+1)+"px"}else{marginLeft=Math.floor(t/D+gb+1)+"px"}break;case"stampede":height=0;width=0;marginLeft=t*.2*(c%D-(D-Math.floor(D/2)))+"px";marginTop=u*.2*(Math.floor(c/D)+1-(C-Math.floor(C/2)))+"px";break;case"mosaic":height=0;width=0;break;case"mosaicReverse":height=0;width=0;marginLeft=Math.floor(t/D+gb+1)+"px";marginTop=Math.floor(u/C+kb+1)+"px";break;case"mosaicRandom":height=0;width=0;marginLeft=Math.floor(t/D+gb+1)*.5+"px";marginTop=Math.floor(u/C+kb+1)*.5+"px";break;case"mosaicSpiral":height=0;width=0;marginLeft=Math.floor(t/D+gb+1)*.5+"px";marginTop=Math.floor(u/C+kb+1)*.5+"px";break;case"mosaicSpiralReverse":height=0;width=0;marginLeft=Math.floor(t/D+gb+1)*.5+"px";marginTop=Math.floor(u/C+kb+1)*.5+"px";break;case"topLeftBottomRight":height=0;width=0;break;case"bottomRightTopLeft":height=0;width=0;marginLeft=Math.floor(t/D+gb+1)+"px";marginTop=Math.floor(u/C+kb+1)+"px";break;case"bottomLeftTopRight":height=0;width=0;marginLeft=0;marginTop=Math.floor(u/C+kb+1)+"px";break;case"topRightBottomLeft":height=0;width=0;marginLeft=Math.floor(t/D+gb+1)+"px";marginTop=0;break;case"scrollRight":height=u;width=t;marginLeft=-t;break;case"scrollLeft":height=u;width=t;marginLeft=t;break;case"scrollTop":height=u;width=t;marginTop=u;break;case"scrollBottom":height=u;width=t;marginTop=-u;break;case"scrollHorz":height=u;width=t;if(d==0&&l==B-1){marginLeft=-t}else if(d<l||d==B-1&&l==0){marginLeft=t}else{marginLeft=-t}break}var m=a(".cameraappended:eq("+e+")",k);if(typeof L!=="undefined"){clearInterval(L);clearTimeout(M);M=setTimeout(ib,J+G)}if(a(r).length){a(".camera_pag li",f).removeClass("cameracurrent");a(".camera_pag li",f).eq(l).addClass("cameracurrent")}if(a(s).length){a("li",s).removeClass("cameracurrent");a("li",s).eq(l).addClass("cameracurrent");a("li",s).not(".cameracurrent").find("img").animate({opacity:.5},0);a("li.cameracurrent img",s).animate({opacity:1},0);a("li",s).hover(function(){a("img",this).stop(true,false).animate({opacity:1},150)},function(){if(!a(this).hasClass("cameracurrent")){a("img",this).stop(true,false).animate({opacity:.5},150)}})}var n=parseFloat(J)+parseFloat(G);if(N=="scrollLeft"||N=="scrollRight"||N=="scrollTop"||N=="scrollBottom"||N=="scrollHorz"){b.onStartTransition.call(this);n=0;m.delay((J+G)/ab*ob[c]*F*.5).css({display:"block",height:height,"margin-left":marginLeft,"margin-top":marginTop,width:width}).animate({height:Math.floor(u/C+kb+1),"margin-top":0,"margin-left":0,width:Math.floor(t/D+gb+1)},J-G,O,o);S.eq(d).delay((J+G)/ab*ob[c]*F*.5).animate({"margin-left":marginLeft*-1,"margin-top":marginTop*-1},J-G,O,function(){a(this).css({"margin-top":0,"margin-left":0})})}else{b.onStartTransition.call(this);n=parseFloat(J)+parseFloat(G);if(T=="next"){m.delay((J+G)/ab*ob[c]*F*.5).css({display:"block",height:height,"margin-left":marginLeft,"margin-top":marginTop,width:width,opacity:opacityOnGrid}).animate({height:Math.floor(u/C+kb+1),"margin-top":0,"margin-left":0,opacity:1,width:Math.floor(t/D+gb+1)},J-G,O,o)}else{S.eq(l).show().css("z-index","999").addClass("cameracurrent");S.eq(d).css("z-index","1").removeClass("cameracurrent");a(".cameraContent",g).eq(l).addClass("cameracurrent");a(".cameraContent",g).eq(d).removeClass("cameracurrent");m.delay((J+G)/ab*ob[c]*F*.5).css({display:"block",height:Math.floor(u/C+kb+1),"margin-top":0,"margin-left":0,opacity:1,width:Math.floor(t/D+gb+1)}).animate({height:height,"margin-left":marginLeft,"margin-top":marginTop,width:width,opacity:opacityOnGrid},J-G,O,o)}}})}}var d={alignment:"center",autoAdvance:true,mobileAutoAdvance:true,barDirection:"leftToRight",barPosition:"bottom",cols:6,easing:"easeInOutExpo",mobileEasing:"",fx:"random",mobileFx:"",gridDifference:250,height:"50%",imagePath:"images/",hover:true,loader:"pie",loaderColor:"#eeeeee",loaderBgColor:"#222222",loaderOpacity:.8,loaderPadding:2,loader
65745Stroke:7,minHeight:"200px",navigation:true,navigationHover:true,mobileNavHover:true,opacityOnGrid:false,overlayer:true,pagination:true,playPause:true,pauseOnClick:true,pieDiameter:38,piePosition:"rightTop",portrait:false,rows:4,slicedCols:12,slicedRows:8,slideOn:"random",thumbnails:false,time:7e3,transPeriod:1500,onEndTransition:function(){},onLoaded:function(){},onStartLoading:function(){},onStartTransition:function(){}};var b=a.extend({},d,b);var f=a(this).addClass("camera_wrap");f.wrapInner('<div class="camera_src" />').wrapInner('<div class="camera_fakehover" />');var g=a(".camera_fakehover",f);g.append('<div class="camera_target"></div>');if(b.overlayer==true){g.append('<div class="camera_overlayer"></div>')}g.append('<div class="camera_target_content"></div>');var h;if(b.loader=="pie"&&a.browser.msie&&a.browser.version<9){h="bar"}else{h=b.loader}if(h=="pie"){g.append('<div class="camera_pie"></div>')}else if(h=="bar"){g.append('<div class="camera_bar"></div>')}else{g.append('<div class="camera_bar" style="display:none"></div>')}if(b.playPause==true){g.append('<div class="camera_commands"></div>')}if(b.navigation==true){g.append('<div class="camera_prev"><span></span></div>').append('<div class="camera_next"><span></span></div>')}if(b.thumbnails==true){f.append('<div class="camera_thumbs_cont" />')}if(b.thumbnails==true&&b.pagination!=true){a(".camera_thumbs_cont",f).wrap("<div />").wrap('<div class="camera_thumbs" />').wrap("<div />").wrap('<div class="camera_command_wrap" />')}if(b.pagination==true){f.append('<div class="camera_pag"></div>')}f.append('<div class="camera_loader"></div>');a(".camera_caption",f).each(function(){a(this).wrapInner("<div />")});var i="pie_"+f.index(),j=a(".camera_src",f),k=a(".camera_target",f),l=a(".camera_target_content",f),m=a(".camera_pie",f),n=a(".camera_bar",f),o=a(".camera_prev",f),p=a(".camera_next",f),q=a(".camera_commands",f),r=a(".camera_pag",f),s=a(".camera_thumbs_cont",f);var t,u;var v=new Array;a("> div",j).each(function(){v.push(a(this).attr("data-src"))});var w=new Array;a("> div",j).each(function(){if(a(this).attr("data-link")){w.push(a(this).attr("data-link"))}else{w.push("")}});var x=new Array;a("> div",j).each(function(){if(a(this).attr("data-target")){x.push(a(this).attr("data-target"))}else{x.push("")}});var y=new Array;a("> div",j).each(function(){if(a(this).attr("data-portrait")){y.push(a(this).attr("data-portrait"))}else{y.push("")}});var z=new Array;a("> div",j).each(function(){if(a(this).attr("data-alignment")){z.push(a(this).attr("data-alignment"))}else{z.push("")}});var A=new Array;a("> div",j).each(function(){if(a(this).attr("data-thumb")){A.push(a(this).attr("data-thumb"))}else{A.push("")}});var B=v.length;a(l).append('<div class="cameraContents" />');var C;for(C=0;C<B;C++){a(".cameraContents",l).append('<div class="cameraContent" />');if(w[C]!=""){var D=a("> div ",j).eq(C).attr("data-box");if(typeof D!=="undefined"&&D!==false&&D!=""){D='data-box="'+a("> div ",j).eq(C).attr("data-box")+'"'}else{D=""}a(".camera_target_content .cameraContent:eq("+C+")",f).append('<a class="camera_link" href="'+w[C]+'" '+D+' target="'+x[C]+'"></a>')}}a(".camera_caption",f).each(function(){var b=a(this).parent().index(),c=f.find(".cameraContent").eq(b);a(this).appendTo(c)});k.append('<div class="cameraCont" />');var E=a(".cameraCont",f);var F;for(F=0;F<B;F++){E.append('<div class="cameraSlide cameraSlide_'+F+'" />');var G=a("> div:eq("+F+")",j);k.find(".cameraSlide_"+F).clone(G)}a(window).bind("load resize pageshow",function(){hb();H()});E.append('<div class="cameraSlide cameraSlide_'+F+'" />');var I;f.show();var t=k.width();var u=k.height();var J;a(window).bind("resize pageshow",function(){if(I==true){K()}a("ul",s).animate({"margin-top":0},0,hb);if(!j.hasClass("paused")){j.addClass("paused");if(a(".camera_stop",V).length){a(".camera_stop",V).hide();a(".camera_play",V).show();if(h!="none"){a("#"+i).hide()}}else{if(h!="none"){a("#"+i).hide()}}clearTimeout(J);J=setTimeout(function(){j.removeClass("paused");if(a(".camera_play",V).length){a(".camera_play",V).hide();a(".camera_stop",V).show();if(h!="none"){a("#"+i).fadeIn()}}else{if(h!="none"){a("#"+i).fadeIn()}}},1500)}});var L,M;var N,O,P,q,r;var Q,R;if(e()&&b.mobileAutoAdvance!=""){O=b.mobileAutoAdvance}else{O=b.autoAdvance}if(O==false){j.addClass("paused")}if(e()&&b.mobileNavHover!=""){P=b.mobileNavHover}else{P=b.navigationHover}if(j.length!=0){var S=a(".cameraSlide",k);S.wrapInner('<div class="camerarelative" />');var T;var U=b.barDirection;var V=f;a("iframe",g).each(function(){var b=a(this);var c=b.attr("src");b.attr("data-src",c);var d=b.parent().index(".camera_src > div");a(".camera_target_content .cameraContent:eq("+d+")",f).append(b)});function W(){a("iframe",g).each(function(){a(".camera_caption",g).show();var c=a(this);var d=c.attr("data-src");c.attr("src",d);var e=b.imagePath+"blank.gif";var h=new Image;h.src=e;if(b.height.indexOf("%")!=-1){var i=Math.round(t/(100/parseFloat(b.height)));if(b.minHeight!=""&&i<parseFloat(b.minHeight)){u=parseFloat(b.minHeight)}else{u=i}}else if(b.height=="auto"){u=f.height()}else{u=parseFloat(b.height)}c.after(a(h).attr({"class":"imgFake",width:t,height:u}));var j=c.clone();c.remove();a(h).bind("click",function(){if(a(this).css("position")=="absolute"){a(this).remove();if(d.indexOf("vimeo")!=-1||d.indexOf("youtube")!=-1){if(d.indexOf("?")!=-1){autoplay="&autoplay=1"}else{autoplay="?autoplay=1"}}else if(d.indexOf("dailymotion")!=-1){if(d.indexOf("?")!=-1){autoplay="&autoPlay=1"}else{autoplay="?autoPlay=1"}}j.attr("src",d+autoplay);R=true}else{a(this).css({position:"absolute",top:0,left:0,zIndex:10}).after(j);j.css({position:"absolute",top:0,left:0,zIndex:9})}})})}W();if(b.hover==true){if(!e()){g.hover(function(){j.addClass("hovered")},function(){j.removeClass("hovered")})}}if(P==true){a(o,f).animate({opacity:0}
65745,0);a(p,f).animate({opacity:0},0);a(q,f).animate({opacity:0},0);if(e()){g.on("vmouseover",function(){a(o,f).animate({opacity:1},200);a(p,f).animate({opacity:1},200);a(q,f).animate({opacity:1},200)});g.on("vmouseout",function(){a(o,f).delay(500).animate({opacity:0},200);a(p,f).delay(500).animate({opacity:0},200);a(q,f).delay(500).animate({opacity:0},200)})}else{g.hover(function(){a(o,f).animate({opacity:1},200);a(p,f).animate({opacity:1},200);a(q,f).animate({opacity:1},200)},function(){a(o,f).animate({opacity:0},200);a(p,f).animate({opacity:0},200);a(q,f).animate({opacity:0},200)})}}a(".camera_stop",V).on("click",function(){O=false;j.addClass("paused");if(a(".camera_stop",V).length){a(".camera_stop",V).hide();a(".camera_play",V).show();if(h!="none"){a("#"+i).hide()}}else{if(h!="none"){a("#"+i).hide()}}});a(".camera_play",V).on("click",function(){O=true;j.removeClass("paused");if(a(".camera_play",V).length){a(".camera_play",V).hide();a(".camera_stop",V).show();if(h!="none"){a("#"+i).show()}}else{if(h!="none"){a("#"+i).show()}}});if(b.pauseOnClick==true){a(".camera_target_content",g).mouseup(function(){O=false;j.addClass("paused");a(".camera_stop",V).hide();a(".camera_play",V).show();a("#"+i).hide()})}a(".cameraContent, .imgFake",g).hover(function(){Q=true},function(){Q=false});a(".cameraContent, .imgFake",g).bind("click",function(){if(R==true&&Q==true){O=false;a(".camera_caption",g).hide();j.addClass("paused");a(".camera_stop",V).hide();a(".camera_play",V).show();a("#"+i).hide()}})}if(h!="pie"){n.append('<span class="camera_bar_cont" />');a(".camera_bar_cont",n).animate({opacity:b.loaderOpacity},0).css({position:"absolute",left:0,right:0,top:0,bottom:0,"background-color":b.loaderBgColor}).append('<span id="'+i+'" />');a("#"+i).animate({opacity:0}
65745,0);var Z=a("#"+i);Z.css({position:"absolute","background-color":b.loaderColor});switch(b.barPosition){case"left":n.css({right:"auto",width:b.loaderStroke});break;case"right":n.css({left:"auto",width:b.loaderStroke});break;case"top":n.css({bottom:"auto",height:b.loaderStroke});break;case"bottom":n.css({top:"auto",height:b.loaderStroke});break}switch(U){case"leftToRight":Z.css({left:0,right:0,top:b.loaderPadding,bottom:b.loaderPadding});break;case"rightToLeft":Z.css({left:0,right:0,top:b.loaderPadding,bottom:b.loaderPadding});break;case"topToBottom":Z.css({left:b.loaderPadding,right:b.loaderPadding,top:0,bottom:0});break;case"bottomToTop":Z.css({left:b.loaderPadding,right:b.loaderPadding,top:0,bottom:0});break}}else{m.append('<canvas id="'+i+'"></canvas>');var _;var Z=document.getElementById(i);Z.setAttribute("width",b.pieDiameter);Z.setAttribute("height",b.pieDiameter);var ab;switch(b.piePosition){case"leftTop":ab="left:0; top:0;";break;case"rightTop":ab="right:0; top:0;";break;case"leftBottom":ab="left:0; bottom:0;";break;case"rightBottom":ab="right:0; bottom:0;";break}Z.setAttribute("style","position:absolute; z-index:1002; "+ab);var bb;var cb;if(Z&&Z.getContext){var db=Z.getContext("2d");db.rotate(Math.PI*(3/2));db.translate(-b.pieDiameter,0)}}if(h=="none"||O==false){a("#"+i).hide();a(".camera_canvas_wrap",V).hide()}if(a(r).length){a(r).append('<ul class="camera_pag_ul" />');var eb;for(eb=0;eb<B;eb++){a(".camera_pag_ul",f).append('<li class="pag_nav_'+eb+'" style="position:relative; z-index:1002"><span><span>'+eb+"</span></span></li>")}a(".camera_pag_ul li",f).hover(function(){a(this).addClass("camera_hover");if(a(".camera_thumb",this).length){var b=a(".camera_thumb",this).outerWidth(),c=a(".camera_thumb",this).outerHeight(),d=a(this).outerWidth();a(".camera_thumb",this).show().css({top:"-"+c+"px",left:"-"+(b-d)/2+"px"}).animate({opacity:1,"margin-top":"-3px"},200);a(".thumb_arrow",this).show().animate({opacity:1,"margin-top":"-3px"},200)}},function(){a(this).removeClass("camera_hover");a(".camera_thumb",this).animate({"margin-top":"-20px",opacity:0},200,function(){a(this).css({marginTop:"5px"}).hide()});a(".thumb_arrow",this).animate({"margin-top":"-20px",opacity:0},200,function(){a(this).css({marginTop:"5px"}).hide()})})}if(a(s).length){var fb;if(!a(r).length){a(s).append("<div />");a(s).before('<div class="camera_prevThumbs hideNav"><div></div></div>').before('<div class="camera_nextThumbs hideNav"><div></div></div>');a("> div",s).append("<ul />");a.each(A,function(b,c){if(a("> div",j).eq(b).attr("data-thumb")!=""){var d=a("> div",j).eq(b).attr("data-thumb"),e=new Image;e.src=d;a("ul",s).append('<li class="pix_thumb pix_thumb_'+b+'" />');a("li.pix_thumb_"+b,s).append(a(e).attr("class","camera_thumb"))}})}else{a.each(A,function(b,c){if(a("> div",j).eq(b).attr("data-thumb")!=""){var d=a("> div",j).eq(b).attr("data-thumb"),e=new Image;e.src=d;a("li.pag_nav_"+b,r).append(a(e).attr("class","camera_thumb").css({position:"absolute"}).animate({opacity:0}
65745,0));a("li.pag_nav_"+b+" > img",r).after('<div class="thumb_arrow" />');a("li.pag_nav_"+b+" > .thumb_arrow",r).animate({opacity:0},0)}});f.css({marginBottom:a(r).outerHeight()})}}else if(!a(s).length&&a(r).length){f.css({marginBottom:a(r).outerHeight()})}var gb=true;if(a(q).length){a(q).append('<div class="camera_play"></div>').append('<div class="camera_stop"></div>');if(O==true){a(".camera_play",V).hide();a(".camera_stop",V).show()}else{a(".camera_stop",V).hide();a(".camera_play",V).show()}}ib();a(".moveFromLeft, .moveFromRight, .moveFromTop, .moveFromBottom, .fadeIn, .fadeFromLeft, .fadeFromRight, .fadeFromTop, .fadeFromBottom",g).each(function(){a(this).css("visibility","hidden")});b.onStartLoading.call(this);jb();if(a(o).length){a(o).click(function(){if(!j.hasClass("camerasliding")){var c=parseFloat(a(".cameraSlide.cameracurrent",k).index());clearInterval(L);W();a("#"+i+", .camera_canvas_wrap",f).animate({opacity:0},0);ib();if(c!=0){jb(c)}else{jb(B)}b.onStartLoading.call(this)}})}if(a(p).length){a(p).click(function(){if(!j.hasClass("camerasliding")){var c=parseFloat(a(".cameraSlide.cameracurrent",k).index());clearInterval(L);W();a("#"+i+", .camera_canvas_wrap",V).animate({opacity:0}
65745,0);ib();if(c==B-1){jb(1)}else{jb(c+2)}b.onStartLoading.call(this)}})}if(e()){g.bind("swipeleft",function(c){if(!j.hasClass("camerasliding")){var d=parseFloat(a(".cameraSlide.cameracurrent",k).index());clearInterval(L);W();a("#"+i+", .camera_canvas_wrap",V).animate({opacity:0},0);ib();if(d==B-1){jb(1)}else{jb(d+2)}b.onStartLoading.call(this)}});g.bind("swiperight",function(c){if(!j.hasClass("camerasliding")){var d=parseFloat(a(".cameraSlide.cameracurrent",k).index());clearInterval(L);W();a("#"+i+", .camera_canvas_wrap",V).animate({opacity:0},0);ib();if(d!=0){jb(d)}else{jb(B)}b.onStartLoading.call(this)}})}if(a(r).length){a(".camera_pag li",f).click(function(){if(!j.hasClass("camerasliding")){var c=parseFloat(a(this).index());var d=parseFloat(a(".cameraSlide.cameracurrent",k).index());if(c!=d){clearInterval(L);W();a("#"+i+", .camera_canvas_wrap",V).animate({opacity:0},0);ib();jb(c+1);b.onStartLoading.call(this)}}})}if(a(s).length){a(".pix_thumb img",s).click(function(){if(!j.hasClass("camerasliding")){var c=parseFloat(a(this).parents("li").index());var d=parseFloat(a(".cameracurrent",k).index());if(c!=d){clearInterval(L);W();a("#"+i+", .camera_canvas_wrap",V).animate({opacity:0}
65745,0);a(".pix_thumb",s).removeClass("cameracurrent");a(this).parents("li").addClass("cameracurrent");ib();jb(c+1);hb();b.onStartLoading.call(this)}}});a(".camera_thumbs_cont .camera_prevThumbs",V).hover(function(){a(this).stop(true,false).animate({opacity:1},250)},function(){a(this).stop(true,false).animate({opacity:.7},250)});a(".camera_prevThumbs",V).click(function(){var b=0,c=a(s).outerWidth(),d=a("ul",s).offset().left,e=a("> div",s).offset().left,f=e-d;a(".camera_visThumb",s).each(function(){var c=a(this).outerWidth();b=b+c});if(f-b>0){a("ul",s).animate({"margin-left":"-"+(f-b)+"px"},500,H)}else{a("ul",s).animate({"margin-left":0},500,H)}});a(".camera_thumbs_cont .camera_nextThumbs",V).hover(function(){a(this).stop(true,false).animate({opacity:1},250)},function(){a(this).stop(true,false).animate({opacity:.7},250)});a(".camera_nextThumbs",V).click(function(){var b=0,c=a(s).outerWidth(),d=a("ul",s).outerWidth(),e=a("ul",s).offset().left,f=a("> div",s).offset().left,g=f-e;a(".camera_visThumb",s).each(function(){var c=a(this).outerWidth();b=b+c});if(g+b+b<d){a("ul",s).animate({"margin-left":"-"+(g+b)+"px"},500,H)}else{a("ul",s).animate({"margin-left":"-"+(d-c)+"px"},500,H)}})}}})(jQuery);(function(a){a.fn.cameraStop=function(){var b=a(this),c=a(".camera_src",b),d="pie_"+b.index();c.addClass("stopped");if(a(".camera_showcommands").length){var e=a(".camera_thumbs_wrap",b)}else{var e=b}}})(jQuery);(function(a){a.fn.cameraPause=function(){var b=a(this);var c=a(".camera_src",b);c.addClass("paused")}})(jQuery);(function(a){a.fn.cameraResume=function(){var b=a(this);var c=a(".camera_src",b);
vendor: 8,170 bytes, lines 65745-65747
65745if(typeof autoAdv==="undefined"||autoAdv!==true){c.removeClass("paused")}}})(jQuery); 65746 65747!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.o
vendor: 3,442 bytes, line 65747
65747ptions.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!=0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.
65747slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:
65747parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+s})}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"}
65747,e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||n.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0}
vendor: 5,619 bytes, line 65747
65747,100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(".slick-slide").slice(o,s),"anticipated"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?e(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};
65747!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}
65747):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":void 0!==arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+
65747o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")}
65747,e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}}); 65748 65749 65750function gallerySortableInit(container) { 65751 container.sortable({ 65752 handle: $('.gallery-image-sortable'), 65753 cursor: 'move', 65754 items: '> li', 65755 stop: function( event, ui ) { 65756 $.ajax({ 65757 url: SiteConfig.basepath + "admin/gallery-slideshow.json?act=reorder", 65758 type: 'POST', 65759 data: container.sortable('serialize'), 65760 dataType: 'JSON', 65761 success: function() {}, 65762 error: function() {} 65763 }); 65764 } 65765 }); 65766} 65767(function($) { 65768 65769 if ($('body').find(".cms-slideshow")) { 65770 $('body').find(".cms-slideshow").each(function() { 65771 // Find the max w/h 65772 var tElement = $(this); 65773 var fLoad = function() { 65774 var $w = 0, 65775 $h = 0; 65776 tElement.children("div").each(function() { 65777 if ($w < $(this).width()) $w = $(this).width(); 65778 if ($h < $(this).height()) $h = $(this).height(); 65779 }); 65780 //tElement.width(tElement.parent().width()); 65781 if ($h > 0) tElement.height($h); 65782 var images = ""; 65783 var arrowR = tElement.parent().find('.arrow-r i'), 65784 arrowL = tElement.parent().find('.arrow-l i'); 65785 tElement.data('currentlyVisible', -1); 65786 if (tElement.hasClass('cms-slideshow-images')) { 65787 images = tElement.children("div"); 65788 images.addClass("bgcontainer").css("position", "absolute"); 65789 images.eq(0).css("position", "absolute"); 65790 images.eq(0).find('div').css('background-image', 'url('+images.eq(0).find('div').data('lazyload')+')'); 65791 images.eq(0).find('div').removeClass('lazy'); 65792 images.find("div[data-url]").css("cursor", "pointer").css("zIndex", "99").on('click', function() { 65793 window.location.href = $(this).data('url'); 65794 }); 65795 if (images.length > 1) { 65796 if (arrowR.length > 0) { 65797 arrowR.show(); 65798 } 65799 if (arrowL.length > 0) { 65800 arrowL.show(); 65801 } 65802 } 65803 } else { 65804 images = tElement.children("div").hide(); 65805 images.eq(0).show(); 65806 tElement.children("div").addClass("bgcontainer") 65807 } 65808 if (images.length > 1) { 65809 var speed = (tElement.data('speed')) ? tElement.data('speed') : 4000; 65810 (function(i, ss) { 65811 var SIF = function() { 65812 if (ss.hasClass('cms-slideshow-images')) { 65813 var currentlyVisible = (ss.data('currentlyVisible') > -1) ? ss.data('currentlyVisible') : ((i.index(images.filter(function() { 65814 return $(this).css('opacity') > 0; 65815 })) + 1) % i.length); 65816 i.animate({ 65817 opacity: 0 65818 }, { 65819 duration: 1000, 65820 queue: false 65821 }); 65822 i.eq(currentlyVisible).find('div').css('background-image', 'url('+i.eq(currentlyVisible).find('div').data('lazyload')+')'); 65823 i.eq(currentlyVisible).find('div').removeClass('lazy'); 65824 i.eq(currentlyVisible).animate({ 65825 opacity: 1 65826 }, {
65827 duration: 1000, 65828 queue: false 65829 }); 65830 } else { 65831 var currentlyVisible = i.index(images.filter(":visible")); 65832 i.eq(currentlyVisible).fadeOut(300, function() { 65833 currentlyVisible = (currentlyVisible + 1) % i.length; 65834 i.eq(currentlyVisible).fadeIn(400); 65835 }); 65836 } 65837 }; 65838 var SI = setInterval(SIF, speed); 65839 ss.on('mouseover', function() { 65840 var arrowWrapper = $(this).parent(); 65841 65842 arrowWrapper.find('.arrow-l').stop().animate({ 65843 'left': '50px' 65844 }, 900, 'swing'); 65845 65846 arrowWrapper.find('.arrow-r').stop().animate({ 65847 'right': '50px' 65848 }, 900, 'swing'); 65849 }); 65850 arrowR.on('click', function() { 65851 var cimg = i.index(images.filter(function() { 65852 return $(this).css('opacity') > 0; 65853 })); 65854 ss.data('currentlyVisible', ((cimg == (i.length - 1)) ? 0 : (cimg + 1))); 65855 clearInterval(SI); 65856 SIF(); 65857 SI = setInterval(SIF, speed); 65858 setInterval(function() { 65859 ss.data('currentlyVisible', -1) 65860 }, 500); 65861 }); 65862 arrowL.on('click', function() { 65863 var cimg = i.index(images.filter(function() { 65864 return $(this).css('opacity') > 0; 65865 })); 65866 ss.data('currentlyVisible', ((cimg == 0) ? (i.length - 1) : (cimg - 1))); 65867 clearInterval(SI); 65868 SIF(); 65869 SI = setInterval(SIF, speed); 65870 setInterval(function() { 65871 ss.data('currentlyVisible', -1) 65872 }, 500); 65873 }); 65874 if (!ss.hasClass('cms-slideshow-images')) { 65875 ss.on('mouseover', function() { 65876 clearInterval(SI); 65877 }).on('mouseout', function() { 65878 SI = setInterval(SIF, speed); 65879 }); 65880 } 65881 })(images, tElement); 65882 } 65883 }; 65884 fLoad(); 65885 }); 65886 } 65887 65888 if ($('body').find(".cms-gallery-owl").length) { 65889 $('.cms-gallery-owl').each(function(i, el) { 65890 var $this = $(el); 65891 $this.owlCarousel({ 65892 65893 // Most important owl features 65894 items : ($this.data('items') == "undefined" || $this.data('items') === false) ? 5 : $this.data('items'), 65895 itemsCustom : false, 65896 itemsDesktop : [1199,($this.data('items') == "undefined" || $this.data('items') === false) ? 4 : $this.data('items')], 65897 itemsDesktopSmall : [980,($this.data('itemsdesktopsmall') == "undefined" || $this.data('itemsdesktopsmall') === false) ? 3 : $this.data('itemsdesktopsmall')], 65898 itemsTablet: [768,($this.data('itemstablet') == "undefined" || $this.data('itemstablet') === false) ? 2 : $this.data('itemstablet')], 65899 itemsTabletSmall: false, 65900 itemsMobile : [479,($this.data('itemsmobile') == "undefined" || $this.data('itemsmobile') === false) ? 1 : $this.data('itemsmobile')], 65901 singleItem : ($this.data('items') == "undefined" || $this.data('items') === false) ? false : (($this.data('items') == "1") ? true : false), 65902 itemsScaleUp : false, 65903 65904 //Basic Speeds 65905 slideSpeed : 200, 65906 paginationSpeed : 800, 65907 rewindSpeed : 1000, 65908 65909 //Autoplay 65910 autoPlay : true, 65911 stopOnHover : false, 65912 65913 // Navigation 65914 navigation : ($this.data('nav') == "undefined" || $this.data('nav') === false) ? false : true, 65915 navigationText : ["prev","next"], 65916 rewindNav : true, 65917 scrollPerPage : false, 65918 65919 //Pagination 65920 pagination : ($this.data('nav') == "undefined" || $this.data('nav') === false) ? false : true, 65921 paginationNumbers: false, 65922 65923 // Responsive 65924 responsive: true, 65925 responsiveRefreshRate : 200, 65926 responsiveBaseWidth: window, 65927 65928 // CSS Styles 65929 baseClass : "owl-carousel", 65930 theme : "owl-theme", 65931 65932 //Lazy load 65933 lazyLoad : false, 65934 lazyFollow : true, 65935 lazyEffect : "fade", 65936 65937 //Auto height 65938 autoHeight : false, 65939 65940 //JSON 65941 jsonPath : false, 65942 jsonSuccess : false, 65943 65944 //Mouse Events 65945 dragBeforeAnimFinish : true, 65946 mouseDrag : true, 65947 touchDrag : true, 65948 65949 //Transitions 65950 transitionStyle : false, 65951 65952 // Other 65953 addClassActive : false, 65954 65955 //Callbacks 65956 beforeUpdate : false, 65957 afterUpdate : false, 65958 beforeInit: false, 65959 afterInit: false, 65960 beforeMove: false, 65961 afterMove: false, 65962 afterAction: false, 65963 startDragging : false, 65964 afterLazyLoad : false 65965 65966 }); 65967 }) 65968 } 65969 if ($('body').find(".cms-gallery-orbit").length) { 65970 $('.cms-gallery-orbit').each(function(i, el) { 65971 var $this = $(el); 65972 $this.orbit({ 65973 animation: ($this.data('animation') == "undefined" || $this.data('animation') === false) ? 'fade' : $this.data('animation'), 65974 // fade, horizontal-slide, vertical-slide, horizontal-push 65975 animationSpeed: 800, 65976 // how fast animtions are 65977 timer: true, 65978 // true or false to have the timer 65979 advanceSpeed: ($this.data('speed') == "undefined" || $this.data('speed') === false) ? 4000 : $this.data('speed'), 65980 // if timer is enabled, time between transitions 65981 pauseOnHover: false, 65982 // if you hover pauses the slider 65983 startClockOnMouseOut: false, 65984 // if clock should start on MouseOut 65985 startClockOnMouseOutAfter: 1000, 65986 // how long after MouseOut should the timer start again 65987 directionalNav: ($this.data('nav') == "undefined" || $this.data('nav') === false) ? false : true, 65988 // manual advancing directional navs 65989 captions: ($this.data('caption') == "undefined" || $this.data('caption') === false) ? false : true, 65990 // do you want captions? 65991 captionAnimation: 'fade', 65992 // fade, slideOpen, none 65993 captionAnimationSpeed: 800, 65994 // if so how quickly should they animate in 65995 bullets: true, 65996 // true or false to activate the bullet navigation 65997 bulletThumbs: false, 65998 // thumbnails for the bullets 65999 bulletThumbLocation: '', 66000 // location from this file where thumbs will be 66001 afterSlideChange: function() {} // empty function 66002 }); 66003 }); 66004 } 66005 if ($('body').find(".cms-gallery-lightbox").length) { 66006 //no action required, the template file has the correct attributes 66007 } 66008 if ($('body').find(".cms-gallery-camera").length) { 66009 //store a copy of the raw html before the slideshow add his own stuff 66010 $('.cms-gallery-camera').each(function(i, el) { 66011 var $this = $(el); 66012 $this.camera({ 66013 loader: 'pie', 66014 pagination: true, 66015 fx: "random", 66016 time: ($this.data('speed') == "undefined" || $this.data('speed') === false) ? 4000 : $this.data('speed'), 66017 height: '70%', 66018 hover: false, 66019 navigation: ($this.data('nav') == "undefined" || $this.data('nav') === false) ? false : true, 66020 navigationHover: ($this.data('nav') == "undefined" || $this.data('nav') === false) ? false : true 66021 }); 66022 }); 66023 } 66024 if ($('body').find(".cms-gallery-bxslider").length) { 66025 $('.cms-gallery-bxslider').each(function(i, el) { 66026 var $this = $(el); 66027 $this.bxSlider({ 66028 minSlides: 1, 66029 maxSlides: 5, 66030 slideWidth: 170, 66031 slideMargin: 10, 66032 pager: ($this.data('nav') == "undefined" || $this.data('nav') === false) ? false : true, 66033 captions: ($this.data('caption') == "undefined" || $this.data('caption') === false) ? false : true, 66034 responsive: true, 66035 shrinkItems: true, 66036 onSliderLoad: function() { 66037 $('figure.image').each(function(i,e) { 66038 var $this = $(e), 66039 $inprogress = false;
66040 66041 $this.find('figcaption').hide(); 66042 66043 $this.on('mouseleave', function() { 66044 $this.find('figcaption').stop(true).slideUp(function() { 66045 $inprogress = false; 66046 }); 66047 }) 66048 .on('mouseenter', function() { 66049 $this.find('figcaption').stop(true).slideDown(function() { 66050 $inprogress = false; 66051 }); 66052 }); 66053 }); 66054 } 66055 }); 66056 }); 66057 } 66058 if ($('body').find(".cms-gallery-bxslider-continuous").length) { 66059 $('.cms-gallery-bxslider-continuous').each(function(i, el) { 66060 var $this = $(el); 66061 $this.bxSlider({ 66062 mode: 'horizontal', 66063 infinteLoop: true, 66064 responsive: true, 66065 minSlides: 1, 66066 maxSlides: 10, 66067 moveSlides: 1, 66068 slideWidth: 170, 66069 slideMargin: 20, 66070 pager: false, 66071 captions: false, 66072 controls: false, 66073 ticker: true, 66074 tickerHover: true, 66075 speed: ((($this.data('speed') == "undefined" || $this.data('speed') === false) ? 2000 : $this.data('speed'))*$this.data('count')) 66076 }); 66077 }); 66078 } 66079 if ($('body').find(".cms-gallery-ad-gallery").length) { 66080 $('.cms-gallery-ad-gallery').each(function(i, el) { 66081 var $this = $(el); 66082 $this.adGallery({ 66083 loader_image: '/css/ad-gallery/loader.gif', 66084 update_window_hash: false, 66085 width: false, 66086 height: false 66087 }); 66088 }); 66089 } 66090 66091 if ($('.edit-image-overlay').length) { 66092 $('body').on('click', '.edit-slideshow-image-overlay', function() { 66093 var $this = $(this), 66094 picData = $.parseJSON(atob($this.data('picture-details'))), 66095 albumData = $.parseJSON(atob($this.data('album-details'))), 66096 overlay = S.overlay(); 66097 66098 overlay.title('Picture Information'); 66099 66100 var form = $("<form action='" + SiteConfig.basepath + "admin/gallery-slideshow.json?act=upload' method='post' enctype='multipart/form-data' class='gallery_form'>") 66101 .append("<input type='hidden' name='picture_id' value='"+picData.picture_id+"' />") 66102 .append("<input type='hidden' name='album_id' value='"+albumData.album_id+"' />") 66103 .append("<input type='hidden' name='picture_visible' value='"+picData.picture_visible+"' />") 66104 .append("<input type='hidden' name='picture_weight' value='"+picData.picture_weight+"' />") 66105 .append("<table cellspacing='10'><tbody>") 66106 .append("<tr><td><label for='picture_title'>Picture title:</label></td><td><input type='text' name='picture_title' value='" + picData.picture_title + "' class='fullwidth' /></td></tr>") 66107 .append("<tr><td valign='top'><label for='picture_description'>Picture description:</label></td><td><textarea name='picture_description'>" + picData.picture_description + "</textarea></td></tr>") 66108 .append("<tr><td valign='top'><label for='picture_url'>Picture Link:</label></td><td><input type='text' name='picture_url' value='" + picData.picture_url + "' class='fullwidth'></td></tr>") 66109 .append("<tr><td><label for='picture_top_margin'>Text margin from top: (max. 130 px)</label></td><td><input type='number' name='picture_top_margin' value='" + (picData.picture_top_margin) + "'/></td></tr>") 66110 .append("<tr><td><label for='picture_left_margin'>Text margin from left: (max. 800 px)</label></td><td><input type='number' name='picture_left_margin' value='" + (picData.picture_left_margin) + "'/></td></tr>") 66111 .append("<tr><td><label for='picture_speed'>Speed: (max. 10 secs)</label></td><td><input type='number' name='picture_speed' value='" + (picData.picture_speed) + "'/></td></tr>") 66112 .append("<tr><td valign='top'><label for='picture_text'>Picture text:</label></td><td><textarea class='richedit richedit-simple richedit-class-quotes' id='picture_text' name='picture_text'>" + (picData.picture_text) + "</textarea></td></tr>") 66113 .append("<tr><td><label>Optimum dimension:</label></td><td><p>" + albumData.album_optimum_dimension + "</p></td></tr>"); 66114 if (picData.picture_file != "") { 66115 form.append("<tr><td>Current Image: </td><td><img src='"+SiteConfig.basepath + "admin/gallery-slideshow.json?act=display_thumb_image&act_id="+picData.picture_id+"' width='100' /></td></tr>") 66116 } 66117 form 66118 .append("<tr><td><label for='picture_file'>Picture file:</label></td><td><input id='moxie-picture-insert' type='hidden' name='picture_file' value='"+picData.picture_file+"'/><a href='#' class='button gallery-moxie-view'>Select File</a> <span id='moxie-file-name'></span></td></tr>") 66119 .append("<tr><td colspan='2'><button type='submit' class='gallery-slideshow-submit'>Edit picture</button></td></tr>") 66120 .append("</tbody></table>"); 66121 overlay.htmlContent(form); 66122 S.form.run(overlay); 66123 overlay.show(); 66124 66125 $('body').find('.gallery-slideshow-submit').on('click', function(e) { 66126 $this = $(this); 66127
66128 $('body').find('.richedit').each(function(i, el) { 66129 var ed = tinyMCE.get($(el).prop('name')); 66130 if (typeof ed !== "undefined") { 66131 $(el).html(ed.getContent()); 66132 $(el).val($(el).html()); 66133 } 66134 }); 66135 66136 $.ajax({ 66137 url: $this.closest('form').attr('action'), 66138 type: 'POST', 66139 data: $this.closest('form').serialize(), 66140 dataType: 'JSON', 66141 success: function(data) { 66142 if (data.success == "success") { 66143 //change / add image behind the scenes 66144 66145 if ($('.thumb-wrapper-'+data.id).length) { 66146 var $thumb_wrapper = $('.thumb-wrapper-'+data.id); 66147 66148 $thumb_wrapper 66149 .find('.picture-title span') 66150 .text(data.title); 66151 66152 $thumb_wrapper 66153 .find('.thumb-picture') 66154 .attr('src', SiteConfig.basepath + "admin/gallery-slideshow.json?act=display_thumb_image&act_id="+data.id); 66155 66156 $thumb_wrapper 66157 .find('.picture-title i.edit-slideshow-image-overlay') 66158 .attr('data-picture-details', data.details) 66159 .data('picture-details', data.details); 66160 } 66161 else { 66162 if ($('.slideshow-image-list').length) { 66163 var $ul = $('.slideshow-image-list'); 66164 66165 $ul 66166 .prepend( 66167 $("<li></li>", { 66168 'id' : 'picture_'+data.id, 66169 'class': 'draft thumb-wrapper-'+data.id, 66170 'html': '<img src="'+SiteConfig.basepath + 'admin/gallery-slideshow.json?act=display_thumb_image&act_id='+data.id+'" width="100" class="thumb-picture" /><p class="picture-title"><span>'+data.title+'</span><br /><i class="fa fa-edit edit-image-overlay edit-slideshow-image-overlay" data-picture-details=\''+data.details+'\' data-album-details=\''+btoa(JSON.stringify(albumData))+'\'></i><i class="fa fa-eye gallery-image-visibility" data-picid="'+data.id+'"></i><i class="fa fa-trash gallery-image-trash" data-picid="'+data.id+'"></i><i title="reorder image" class="fa fa-arrows gallery-image-sortable"></i></p>' 66171 }) 66172 ) 66173 } 66174 } 66175 gallerySortableInit($('.slideshow-image-list')); 66176 66177 //close overlay 66178 overlay.close(); 66179 } 66180 }, 66181 error: function() { 66182 console.log('error'); 66183 } 66184 }); 66185 66186 e.preventDefault(); 66187 }); 66188 66189 $('body').find('.gallery-moxie-view').on('click', function(e) { 66190 var moxie = S.overlay(); 66191 66192 moxman.browse({ 66193 view: 'thumbs', 66194 path: '/assets/', 66195 oninsert: function(args) { 66196 $('#moxie-picture-insert').val(args.files[0].url); 66197 $('#moxie-file-name').html(args.files[0].name); 66198 }, 66199 multiple: false, 66200 leftpanel: false 66201 }); 66202 setTimeout(closeOverlay, 500); 66203 66204 function closeOverlay() { 66205 if ($('.moxman-container').length > 0) { 66206 moxie.close(); 66207 } else { 66208 setTimeout(closeOverlay, 500); 66209 } 66210 } 66211 e.preventDefault(); 66212 }); 66213 66214 }); 66215 66216 $('body').on('click', '.edit-gallery-image-overlay', function() { 66217 var $this = $(this), 66218 picData = $.parseJSON(atob($this.data('picture-details'))), 66219 albumData = $.parseJSON(atob($this.data('album-details'))), 66220 overlay = S.overlay(); 66221 66222 overlay.title('Picture Information'); 66223 66224 var form = $("<form action='" + SiteConfig.basepath + "admin/gallery-slideshow.json?act=upload' method='post' enctype='multipart/form-data' class='gallery_form'>") 66225 .append("<input type='hidden' name='picture_id' value='"+picData.picture_id+"' />") 66226 .append("<input type='hidden' name='album_id' value='"+albumData.album_id+"' />") 66227 .append("<input type='hidden' name='picture_visible' value='"+picData.picture_visible+"' />") 66228 .append("<input type='hidden' name='picture_weight' value='"+picData.picture_weight+"' />") 66229 .append("<table cellspacing='10'><tbody>") 66230 .append("<tr><td><label for='picture_title'>Picture title:</label></td><td><input type='text' name='picture_title' value='" + picData.picture_title + "' class='fullwidth' /></td></tr>") 66231 .append("<tr><td valign='top'><label for='picture_description'>Picture caption:</label></td><td><textarea name='picture_description'>" + picData.picture_description + "</textarea></td></tr>") 66232 .append("<tr><td valign='top'><label for='picture_url'>Picture Link:</label></td><td><input type='text' name='picture_url' value='" + picData.picture_url + "' class='fullwidth'></td></tr>"); 66233 if (picData.picture_file != "") { 66234 form.append("<tr><td>Current Image: </td><td><img src='"+SiteConfig.basepath + "admin/gallery-slideshow.json?act=display_thumb_image&act_id="+picData.picture_id+"' width='100' /></td></tr>") 66235 } 66236 form 66237 .append("<tr><td><label for='picture_file'>Picture file:</label></td><td><input id='moxie-picture-insert' type='hidden' name='picture_file' value='"+picData.picture_file+"'/><a href='#' class='button gallery-moxie-view'>Select File</a> <span id='moxie-file-name'></span></td></tr>") 66238 .append("<tr><td colspan='2'><button type='submit' class='gallery-slideshow-submit'>Edit picture</button></td></tr>") 66239 .append("</tbody></table>"); 66240 overlay.htmlContent(form); 66241 S.form.run(overlay); 66242 overlay.show(); 66243 66244 $('body').find('.gallery-slideshow-submit').on('click', function(e) { 66245 $this = $(this); 66246 66247 $.ajax({ 66248 url: $this.closest('form').attr('action'), 66249 type: 'POST', 66250 data: $this.closest('form').serialize(), 66251 dataType: 'JSON', 66252 success: function(data) { 66253 if (data.success == "success") { 66254 //change / add image behind the scenes 66255 if ($('.thumb-wrapper-'+data.id).length) { 66256 var $thumb_wrapper = $('.thumb-wrapper-'+data.id); 66257 66258 $thumb_wrapper 66259 .find('.picture-title span') 66260 .text(data.title); 66261 66262 $thumb_wrapper 66263 .find('.thumb-picture') 66264 .attr('src', SiteConfig.basepath + "admin/gallery-slideshow.json?act=display_thumb_image&act_id="+data.id); 66265 66266 $thumb_wrapper 66267 .find('.picture-title i.edit-gallery-image-overlay') 66268 .attr('data-picture-details', data.details) 66269 .data('picture-details', data.details); 66270 66271 } 66272 else { 66273 if ($('.slideshow-image-list').length) { 66274 var $ul = $('.slideshow-image-list'); 66275 66276 $ul 66277 .prepend( 66278 $("<li></li>", { 66279 'id' : 'picture_'+data.id, 66280 'class': 'draft thumb-wrapper-'+data.id, 66281 'html': '<img src="'+SiteConfig.basepath + 'admin/gallery-slideshow.json?act=display_thumb_image&act_id='+data.id+'" width="100" class="thumb-picture" /><p class="picture-title"><span>'+data.title+'</span><br /><i class="fa fa-edit edit-image-overlay edit-gallery-image-overlay" data-picture-details=\''+data.details+'\' data-album-details=\''+btoa(JSON.stringify(albumData))+'\'></i><i class="fa fa-eye gallery-image-visibility" data-picid="'+data.id+'"></i>
66281<i class="fa fa-trash gallery-image-trash" data-picid="'+data.id+'"></i><i title="reorder image" class="fa fa-arrows gallery-image-sortable"></i></p>' 66282 }) 66283 ) 66284 } 66285 } 66286 gallerySortableInit($('.slideshow-image-list')); 66287 66288 //close overlay 66289 overlay.close(); 66290 } 66291 else if (data.success == "failed") { 66292 var e_overlay = new S.overlay(); 66293 e_overlay.title("Error!"); 66294 e_overlay.content(data.message); 66295 e_overlay.show(); 66296 } 66297 }, 66298 error: function() { 66299 console.log('error'); 66300 } 66301 }); 66302 $this.closest('form'); 66303 66304 e.preventDefault(); 66305 }); 66306 66307 $('body').find('.gallery-moxie-view').on('click', function(e) { 66308 var moxie = S.overlay(); 66309 66310 moxman.browse({ 66311 view: 'thumbs', 66312 path: '/assets/', 66313 oninsert: function(args) { 66314 $('#moxie-picture-insert').val(args.files[0].url); 66315 $('#moxie-file-name').html(args.files[0].name); 66316 }, 66317 multiple: false, 66318 leftpanel: false 66319 }); 66320 setTimeout(closeOverlay, 500); 66321 66322 function closeOverlay() { 66323 if ($('.moxman-container').length > 0) { 66324 moxie.close(); 66325 } else { 66326 setTimeout(closeOverlay, 500); 66327 } 66328 } 66329 e.preventDefault(); 66330 }); 66331 66332 }); 66333 66334 $('body').on('click', '.gallery-image-visibility', function() { 66335 var $this = $(this), 66336 $visibility = ($this.hasClass('fa-eye') ? 1 : 0); 66337 66338 $.ajax({ 66339 url: SiteConfig.basepath + 'admin/gallery-slideshow.json?act=picture_visibility', 66340 type: 'POST', 66341 data: {'picid': $this.data('picid'), 'visibility': $visibility}, 66342 dataType: 'JSON', 66343 success: function() { 66344 if ($this.hasClass('fa-eye')) { 66345 $this.removeClass('fa-eye'); 66346 $this.addClass('fa-eye-slash'); 66347 $this.closest('li').removeClass('draft').addClass('visible'); 66348 $this.attr('title', 'hide image'); 66349 } 66350 else { 66351 $this.removeClass('fa-eye-slash'); 66352 $this.addClass('fa-eye'); 66353 $this.closest('li').removeClass('visible').addClass('draft'); 66354 $this.attr('title', 'show image'); 66355 } 66356 }, 66357 error: function() { 66358 console.log("error"); 66359 } 66360 }); 66361 66362 }); 66363 66364 $('body').on('click', '.gallery-image-trash', function() { 66365 var $this = $(this); 66366 66367 $.ajax({ 66368 url: SiteConfig.basepath + 'admin/gallery-slideshow.json?act=picture_remove', 66369 type: 'POST', 66370 data: {'picid': $this.data('picid')}, 66371 dataType: 'JSON', 66372 success: function() { 66373 $this.closest('li').fadeOut(); 66374 }, 66375 error: function() { 66376 console.log("error"); 66377 } 66378 }); 66379 66380 }); 66381 } 66382 66383 gallerySortableInit($('.slideshow-image-list')); 66384 66385 $('body').on('click', '.gallery-album-trash', function(e) { 66386 var $this = $(this), 66387 overlay = new S.overlay(); 66388 66389 overlay.title("Delete Album"); 66390 66391 overlay.content("Are you sure you wish to delete this album?"); 66392 66393 var buttons = new Array(); 66394 66395 var canbtn = $("<button/>", { 66396 text: "Cancel" 66397 }).on("click", function() { 66398 overlay.close(); 66399 }); 66400 66401 buttons.push(canbtn); 66402 66403 var delbtn = $("<button/>", { 66404 text: "Delete" 66405 }).on("click", function() { 66406 $.ajax({ 66407 url: SiteConfig.basepath+'admin/gallery-slideshow/?act=delete_album', 66408 type: 'POST', 66409 data: {'album_id': $this.data('album_id')}, 66410 dataType: 'JSON', 66411 success: function(data) { 66412 66413 if (data === false) { 66414 overlay.content("There has been an error processing your request. Please try again."); 66415 } 66416 else if (data == "failure") { 66417 overlay.close(); 66418 66419 overlay = new S.overlay(); 66420 66421 overlay.title("Locked Album"); 66422 66423 overlay.content("The album you are trying to delete is locked and must be unlocked before proceeding. Please edit the album details, uncheck the lock option and try again."); 66424 66425 overlay.show(); 66426 } 66427 else if (data == "success") { 66428 66429 overlay.close(); 66430 66431 $this.closest('tr').remove(); 66432 66433 } 66434 else { 66435 overlay.content("There has been an error processing your request. Please try again."); 66436 } 66437 }, 66438 error: function() { 66439 overlay.buttons(new Array()); 66440 overlay.content("There has been an error processing your request. Please try again."); 66441 } 66442 }); 66443 }); 66444 66445 buttons.push(delbtn); 66446 66447 overlay.buttons(buttons); 66448 66449 overlay.show(); 66450 S.form.run(overlay); 66451 66452 e.preventDefault(); 66453 66454 }); 66455 66456})(jQuery); 66457
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.