1/*! jQuery UI - v1.11.4 - 2016-01-06 2* http://jqueryui.com 3* Includes: core.js, widget.js, mouse.js, position.js, tabs.js, effect.js, effect-fade.js, effect-slide.js 4* Copyright
vendor: 32,932 bytes, lines 4-1203
4 jQuery Foundation and other contributors; Licensed MIT */ 5 6(function( factory ) { 7 if ( typeof define === "function" && define.amd ) { 8 9 // AMD. Register as an anonymous module. 10 define([ "jquery" ], factory ); 11 } else { 12 13 // Browser globals 14 factory( jQuery ); 15 } 16}(function( $ ) { 17/*! 18 * jQuery UI Core 1.11.4 19 * http://jqueryui.com 20 * 21 * Copyright jQuery Foundation and other contributors 22 * Released under the MIT license. 23 * http://jquery.org/license 24 * 25 * http://api.jqueryui.com/category/ui-core/ 26 */ 27 28 29// $.ui might exist from components with no dependencies, e.g., $.ui.position 30$.ui = $.ui || {}; 31 32$.extend( $.ui, { 33 version: "1.11.4", 34 35 keyCode: { 36 BACKSPACE: 8, 37 COMMA: 188, 38 DELETE: 46, 39 DOWN: 40, 40 END: 35, 41 ENTER: 13, 42 ESCAPE: 27, 43 HOME: 36, 44 LEFT: 37, 45 PAGE_DOWN: 34, 46 PAGE_UP: 33, 47 PERIOD: 190, 48 RIGHT: 39, 49 SPACE: 32, 50 TAB: 9, 51 UP: 38 52 } 53}); 54 55// plugins 56$.fn.extend({ 57 scrollParent: function( includeHidden ) { 58 var position = this.css( "position" ), 59 excludeStaticParent = position === "absolute", 60 overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, 61 scrollParent = this.parents().filter( function() { 62 var parent = $( this ); 63 if ( excludeStaticParent && parent.css( "position" ) === "static" ) { 64 return false; 65 } 66 return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) ); 67 }).eq( 0 ); 68 69 return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent; 70 }, 71 72 uniqueId: (function() { 73 var uuid = 0; 74 75 return function() { 76 return this.each(function() { 77 if ( !this.id ) { 78 this.id = "ui-id-" + ( ++uuid ); 79 } 80 }); 81 }; 82 })(), 83 84 removeUniqueId: function() { 85 return this.each(function() { 86 if ( /^ui-id-\d+$/.test( this.id ) ) { 87 $( this ).removeAttr( "id" ); 88 } 89 }); 90 } 91}); 92 93// selectors 94function focusable( element, isTabIndexNotNaN ) { 95 var map, mapName, img, 96 nodeName = element.nodeName.toLowerCase(); 97 if ( "area" === nodeName ) { 98 map = element.parentNode; 99 mapName = map.name; 100 if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { 101 return false; 102 } 103 img = $( "img[usemap='#" + mapName + "']" )[ 0 ]; 104 return !!img && visible( img ); 105 } 106 return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ? 107 !element.disabled : 108 "a" === nodeName ? 109 element.href || isTabIndexNotNaN : 110 isTabIndexNotNaN) && 111 // the element and all of its ancestors must be visible 112 visible( element ); 113} 114 115function visible( element ) { 116 return $.expr.filters.visible( element ) && 117 !$( element ).parents().addBack().filter(function() { 118 return $.css( this, "visibility" ) === "hidden"; 119 }).length; 120} 121 122$.extend( $.expr[ ":" ], { 123 data: $.expr.createPseudo ? 124 $.expr.createPseudo(function( dataName ) { 125 return function( elem ) { 126 return !!$.data( elem, dataName ); 127 }; 128 }) : 129 // support: jQuery <1.8 130 function( elem, i, match ) { 131 return !!$.data( elem, match[ 3 ] ); 132 }, 133 134 focusable: function( element ) { 135 return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); 136 }, 137 138 tabbable: function( element ) { 139 var tabIndex = $.attr( element, "tabindex" ), 140 isTabIndexNaN = isNaN( tabIndex ); 141 return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); 142 } 143}); 144 145// support: jQuery <1.8 146if ( !$( "<a>" ).outerWidth( 1 ).jquery ) { 147 $.each( [ "Width", "Height" ], function( i, name ) { 148 var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], 149 type = name.toLowerCase(), 150 orig = { 151 innerWidth: $.fn.innerWidth, 152 innerHeight: $.fn.innerHeight, 153 outerWidth: $.fn.outerWidth, 154 outerHeight: $.fn.outerHeight 155 }; 156 157 function reduce( elem, size, border, margin ) { 158 $.each( side, function() { 159 size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; 160 if ( border ) { 161 size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; 162 } 163 if ( margin ) { 164 size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; 165 } 166 }); 167 return size; 168 } 169 170 $.fn[ "inner" + name ] = function( size ) { 171 if ( size === undefined ) { 172 return orig[ "inner" + name ].call( this ); 173 } 174 175 return this.each(function() { 176 $( this ).css( type, reduce( this, size ) + "px" ); 177 }); 178 }; 179 180 $.fn[ "outer" + name] = function( size, margin ) { 181 if ( typeof size !== "number" ) { 182 return orig[ "outer" + name ].call( this, size ); 183 } 184 185 return this.each(function() { 186 $( this).css( type, reduce( this, size, true, margin ) + "px" ); 187 }); 188 }; 189 }); 190} 191 192// support: jQuery <1.8 193if ( !$.fn.addBack ) { 194 $.fn.addBack = function( selector ) { 195 return this.add( selector == null ? 196 this.prevObject : this.prevObject.filter( selector ) 197 ); 198 }; 199} 200 201// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) 202if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { 203 $.fn.removeData = (function( removeData ) { 204 return function( key ) { 205 if ( arguments.length ) { 206 return removeData.call( this, $.camelCase( key ) ); 207 } else { 208 return removeData.call( this ); 209 } 210 }; 211 })( $.fn.removeData ); 212} 213 214// deprecated 215$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); 216 217$.fn.extend({ 218 focus: (function( orig ) { 219 return function( delay, fn ) { 220 return typeof delay === "number" ? 221 this.each(function() { 222 var elem = this; 223 setTimeout(function() { 224 $( elem ).focus(); 225 if ( fn ) { 226 fn.call( elem ); 227 } 228 }, delay ); 229 }) : 230 orig.apply( this, arguments ); 231 }; 232 })( $.fn.focus ), 233 234 disableSelection: (function() { 235 var eventType = "onselectstart" in document.createElement( "div" ) ? 236 "selectstart" : 237 "mousedown"; 238 239 return function() { 240 return this.bind( eventType + ".ui-disableSelection", function( event ) { 241 event.preventDefault(); 242 }); 243 }; 244 })(), 245 246 enableSelection: function() { 247 return this.unbind( ".ui-disableSelection" ); 248 }, 249 250 zIndex: function( zIndex ) { 251 if ( zIndex !== undefined ) { 252 return this.css( "zIndex", zIndex ); 253 } 254 255 if ( this.length ) { 256 var elem = $( this[ 0 ] ), position, value; 257 while ( elem.length && elem[ 0 ] !== document ) { 258 // Ignore z-index if position is set to a value where z-index is ignored by the browser 259 // This makes behavior of this function consistent across browsers 260 // WebKit always returns auto if the element is positioned 261 position = elem.css( "position" ); 262 if ( position === "absolute" || position === "relative" || position === "fixed" ) { 263 // IE returns 0 when zIndex is not specified 264 // other browsers return a string 265 // we ignore the case of nested elements with an explicit value of 0 266 // <div style="z-index: -10;"><div style="z-index: 0;"></div></div> 267 value = parseInt( elem.css( "zIndex" ), 10 ); 268 if ( !isNaN( value ) && value !== 0 ) { 269 return value; 270 } 271 } 272 elem = elem.parent(); 273 } 274 } 275 276 return 0; 277 } 278}); 279 280// $.ui.plugin is deprecated. Use $.widget() extensions instead. 281$.ui.plugin = { 282 add: function( module, option, set ) { 283 var i, 284 proto = $.ui[ module ].prototype; 285 for ( i in set ) { 286 proto.plugins[ i ] = proto.plugins[ i ] || []; 287 proto.plugins[ i ].push( [ option, set[ i ] ] ); 288 } 289 }, 290 call: function( instance, name, args, allowDisconnected ) { 291 var i, 292 set = instance.plugins[ name ]; 293 294 if ( !set ) { 295 return; 296 } 297 298 if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) { 299 return; 300 } 301 302 for ( i = 0; i < set.length; i++ ) { 303 if ( instance.options[ set[ i ][ 0 ] ] ) { 304 set[ i ][ 1 ].apply( instance.element, args ); 305 } 306 } 307 } 308}; 309 310 311/*! 312 * jQuery UI Widget 1.11.4 313 * http://jqueryui.com 314 * 315 * Copyright jQuery Foundation and other contributors 316 * Released under the MIT license. 317 * http://jquery.org/license 318 * 319 * http://api.jqueryui.com/jQuery.widget/ 320 */ 321 322 323var widget_uuid = 0, 324 widget_slice = Array.prototype.slice; 325 326$.cleanData = (function( orig ) { 327 return function( elems ) { 328 var events, elem, i; 329 for ( i = 0; (elem = elems[i]) != null; i++ ) { 330 try { 331 332 // Only trigger remove when necessary to save time 333 events = $._data( elem, "events" ); 334 if ( events && events.remove ) { 335 $( elem ).triggerHandler( "remove" ); 336 } 337 338 // http://bugs.jquery.com/ticket/8235 339 } catch ( e ) {} 340 } 341 orig( elems ); 342 }; 343})( $.cleanData ); 344 345$.widget = function( name, base, prototype ) { 346 var fullName, existingConstructor, constructor, basePrototype, 347 // proxiedPrototype allows the provided prototype to remain unmodified 348 // so that it can be used as a mixin for multiple widgets (#8876) 349 proxiedPrototype = {}, 350 namespace = name.split( "." )[ 0 ]; 351 352 name = name.split( "." )[ 1 ]; 353 fullName = namespace + "-" + name; 354 355 if ( !prototype ) { 356 prototype = base; 357 base = $.Widget; 358 } 359 360 // create selector for plugin 361 $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { 362 return !!$.data( elem, fullName ); 363 }; 364 365 $[ namespace ] = $[ namespace ] || {}; 366 existingConstructor = $[ namespace ][ name ]; 367 constructor = $[ namespace ][ name ] = function( options, element ) { 368 // allow instantiation without "new" keyword 369 if ( !this._createWidget ) { 370 return new constructor( options, element ); 371 } 372 373 // allow instantiation without initializing for simple inheritance 374 // must use "new" keyword (the code above always passes args) 375 if ( arguments.length ) { 376 this._createWidget( options, element ); 377 } 378 }; 379 // extend with the existing constructor to carry over any static properties 380 $.extend( constructor, existingConstructor, { 381 version: prototype.version, 382 // copy the object used to create the prototype in case we need to 383 // redefine the widget later 384 _proto: $.extend( {}, prototype ), 385 // track widgets that inherit from this widget in case this widget is 386 // redefined after a widget inherits from it 387 _childConstructors: [] 388 }); 389 390 basePrototype = new base(); 391 // we need to make the options hash a property directly on the new instance 392 // otherwise we'll modify the options hash on the prototype that we're 393 // inheriting from 394 basePrototype.options = $.widget.extend( {}, basePrototype.options ); 395 $.each( prototype, function( prop, value ) { 396 if ( !$.isFunction( value ) ) { 397 proxiedPrototype[ prop ] = value; 398 return; 399 } 400 proxiedPrototype[ prop ] = (function() { 401 var _super = function() { 402 return base.prototype[ prop ].apply( this, arguments ); 403 }, 404 _superApply = function( args ) { 405 return base.prototype[ prop ].apply( this, args ); 406 }; 407 return function() { 408 var __super = this._super, 409 __superApply = this._superApply, 410 returnValue; 411 412 this._super = _super; 413 this._superApply = _superApply; 414 415 returnValue = value.apply( this, arguments ); 416 417 this._super = __super; 418 this._superApply = __superApply; 419 420 return returnValue; 421 }; 422 })(); 423 }); 424 constructor.prototype = $.widget.extend( basePrototype, { 425 // TODO: remove support for widgetEventPrefix 426 // always use the name + a colon as the prefix, e.g., draggable:start 427 // don't prefix for widgets that aren't DOM-based 428 widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name 429 }, proxiedPrototype, { 430 constructor: constructor, 431 namespace: namespace, 432 widgetName: name, 433 widgetFullName: fullName 434 }); 435 436 // If this widget is being redefined then we need to find all widgets that 437 // are inheriting from it and redefine all of them so that they inherit from 438 // the new version of this widget. We're essentially trying to replace one 439 // level in the prototype chain. 440 if ( existingConstructor ) { 441 $.each( existingConstructor._childConstructors, function( i, child ) { 442 var childPrototype = child.prototype; 443 444 // redefine the child widget using the same prototype that was 445 // originally used, but inherit from the new version of the base 446 $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); 447 }); 448 // remove the list of existing child constructors from the old constructor 449 // so the old child constructors can be garbage collected 450 delete existingConstructor._childConstructors; 451 } else { 452 base._childConstructors.push( constructor ); 453 } 454 455 $.widget.bridge( name, constructor ); 456 457 return constructor; 458}; 459 460$.widget.extend = function( target ) { 461 var input = widget_slice.call( arguments, 1 ), 462 inputIndex = 0, 463 inputLength = input.length, 464 key, 465 value; 466 for ( ; inputIndex < inputLength; inputIndex++ ) { 467 for ( key in input[ inputIndex ] ) { 468 value = input[ inputIndex ][ key ]; 469 if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { 470 // Clone objects 471 if ( $.isPlainObject( value ) ) { 472 target[ key ] = $.isPlainObject( target[ key ] ) ? 473 $.widget.extend( {}, target[ key ], value ) : 474 // Don't extend strings, arrays, etc. with objects 475 $.widget.extend( {}, value ); 476 // Copy everything else by reference 477 } else { 478 target[ key ] = value; 479 } 480 } 481 } 482 } 483 return target; 484}; 485 486$.widget.bridge = function( name, object ) { 487 var fullName = object.prototype.widgetFullName || name; 488 $.fn[ name ] = function( options ) { 489 var isMethodCall = typeof options === "string", 490 args = widget_slice.call( arguments, 1 ), 491 returnValue = this; 492 493 if ( isMethodCall ) { 494 this.each(function() { 495 var methodValue, 496 instance = $.data( this, fullName ); 497 if ( options === "instance" ) { 498 returnValue = instance; 499 return false; 500 } 501 if ( !instance ) { 502 return $.error( "cannot call methods on " + name + " prior to initialization; " + 503 "attempted to call method '" + options + "'" ); 504 } 505 if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { 506 return $.error( "no such method '" + options + "' for " + name + " widget instance" ); 507 } 508 methodValue = instance[ options ].apply( instance, args ); 509 if ( methodValue !== instance && methodValue !== undefined ) { 510 returnValue = methodValue && methodValue.jquery ? 511 returnValue.pushStack( methodValue.get() ) : 512 methodValue; 513 return false; 514 } 515 }); 516 } else { 517 518 // Allow multiple hashes to be passed on init 519 if ( args.length ) { 520 options = $.widget.extend.apply( null, [ options ].concat(args) ); 521 } 522 523 this.each(function() { 524 var instance = $.data( this, fullName ); 525 if ( instance ) { 526 instance.option( options || {} ); 527 if ( instance._init ) { 528 instance._init(); 529 } 530 } else { 531 $.data( this, fullName, new object( options, this ) ); 532 } 533 }); 534 } 535 536 return returnValue; 537 }; 538}; 539 540$.Widget = function( /* options, element */ ) {}; 541$.Widget._childConstructors = []; 542 543$.Widget.prototype = { 544 widgetName: "widget", 545 widgetEventPrefix: "", 546 defaultElement: "<div>", 547 options: { 548 disabled: false, 549 550 // callbacks 551 create: null 552 }, 553 _createWidget: function( options, element ) { 554 element = $( element || this.defaultElement || this )[ 0 ]; 555 this.element = $( element ); 556 this.uuid = widget_uuid++; 557 this.eventNamespace = "." + this.widgetName + this.uuid; 558 559 this.bindings = $(); 560 this.hoverable = $(); 561 this.focusable = $(); 562 563 if ( element !== this ) { 564 $.data( element, this.widgetFullName, this ); 565 this._on( true, this.element, { 566 remove: function( event ) { 567 if ( event.target === element ) { 568 this.destroy(); 569 } 570 } 571 }); 572 this.document = $( element.style ? 573 // element within the document 574 element.ownerDocument : 575 // element is window or document 576 element.document || element ); 577 this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); 578 } 579 580 this.options = $.widget.extend( {}, 581 this.options, 582 this._getCreateOptions(), 583 options ); 584 585 this._create(); 586 this._trigger( "create", null, this._getCreateEventData() ); 587 this._init(); 588 }, 589 _getCreateOptions: $.noop, 590 _getCreateEventData: $.noop, 591 _create: $.noop, 592 _init: $.noop, 593 594 destroy: function() { 595 this._destroy(); 596 // we can probably remove the unbind calls in 2.0 597 // all event bindings should go through this._on() 598 this.element 599 .unbind( this.eventNamespace ) 600 .removeData( this.widgetFullName ) 601 // support: jquery <1.6.3 602 // http://bugs.jquery.com/ticket/9413 603 .removeData( $.camelCase( this.widgetFullName ) ); 604 this.widget() 605 .unbind( this.eventNamespace ) 606 .removeAttr( "aria-disabled" ) 607 .removeClass( 608 this.widgetFullName + "-disabled " + 609 "ui-state-disabled" ); 610 611 // clean up events and states 612 this.bindings.unbind( this.eventNamespace ); 613 this.hoverable.removeClass( "ui-state-hover" ); 614 this.focusable.removeClass( "ui-state-focus" ); 615 }, 616 _destroy: $.noop, 617 618 widget: function() { 619 return this.element; 620 }, 621 622 option: function( key, value ) { 623 var options = key, 624 parts, 625 curOption, 626 i; 627 628 if ( arguments.length === 0 ) { 629 // don't return a reference to the internal hash 630 return $.widget.extend( {}, this.options ); 631 } 632 633 if ( typeof key === "string" ) { 634 // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } 635 options = {}; 636 parts = key.split( "." ); 637 key = parts.shift(); 638 if ( parts.length ) { 639 curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); 640 for ( i = 0; i < parts.length - 1; i++ ) { 641 curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; 642 curOption = curOption[ parts[ i ] ]; 643 } 644 key = parts.pop(); 645 if ( arguments.length === 1 ) { 646 return curOption[ key ] === undefined ? null : curOption[ key ]; 647 } 648 curOption[ key ] = value; 649 } else { 650 if ( arguments.length === 1 ) { 651 return this.options[ key ] === undefined ? null : this.options[ key ]; 652 } 653 options[ key ] = value; 654 } 655 } 656 657 this._setOptions( options ); 658 659 return this; 660 }, 661 _setOptions: function( options ) { 662 var key; 663 664 for ( key in options ) { 665 this._setOption( key, options[ key ] ); 666 } 667 668 return this; 669 }, 670 _setOption: function( key, value ) { 671 this.options[ key ] = value; 672 673 if ( key === "disabled" ) { 674 this.widget() 675 .toggleClass( this.widgetFullName + "-disabled", !!value ); 676 677 // If the widget is becoming disabled, then nothing is interactive 678 if ( value ) { 679 this.hoverable.removeClass( "ui-state-hover" ); 680 this.focusable.removeClass( "ui-state-focus" ); 681 } 682 } 683 684 return this; 685 }, 686 687 enable: function() { 688 return this._setOptions({ disabled: false }); 689 }, 690 disable: function() { 691 return this._setOptions({ disabled: true }); 692 }, 693 694 _on: function( suppressDisabledCheck, element, handlers ) { 695 var delegateElement, 696 instance = this; 697 698 // no suppressDisabledCheck flag, shuffle arguments 699 if ( typeof suppressDisabledCheck !== "boolean" ) { 700 handlers = element; 701 element = suppressDisabledCheck; 702 suppressDisabledCheck = false; 703 } 704 705 // no element argument, shuffle and use this.element 706 if ( !handlers ) { 707 handlers = element; 708 element = this.element; 709 delegateElement = this.widget(); 710 } else { 711 element = delegateElement = $( element ); 712 this.bindings = this.bindings.add( element ); 713 } 714 715 $.each( handlers, function( event, handler ) { 716 function handlerProxy() { 717 // allow widgets to customize the disabled handling 718 // - disabled as an array instead of boolean 719 // - disabled class as method for disabling individual parts 720 if ( !suppressDisabledCheck && 721 ( instance.options.disabled === true || 722 $( this ).hasClass( "ui-state-disabled" ) ) ) { 723 return; 724 } 725 return ( typeof handler === "string" ? instance[ handler ] : handler ) 726 .apply( instance, arguments ); 727 } 728 729 // copy the guid so direct unbinding works 730 if ( typeof handler !== "string" ) { 731 handlerProxy.guid = handler.guid = 732 handler.guid || handlerProxy.guid || $.guid++; 733 } 734 735 var match = event.match( /^([\w:-]*)\s*(.*)$/ ), 736 eventName = match[1] + instance.eventNamespace, 737 selector = match[2]; 738 if ( selector ) { 739 delegateElement.delegate( selector, eventName, handlerProxy ); 740 } else { 741 element.bind( eventName, handlerProxy ); 742 } 743 }); 744 }, 745 746 _off: function( element, eventName ) { 747 eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + 748 this.eventNamespace; 749 element.unbind( eventName ).undelegate( eventName ); 750 751 // Clear the stack to avoid memory leaks (#10056) 752 this.bindings = $( this.bindings.not( element ).get() ); 753 this.focusable = $( this.focusable.not( element ).get() ); 754 this.hoverable = $( this.hoverable.not( element ).get() ); 755 }, 756 757 _delay: function( handler, delay ) { 758 function handlerProxy() { 759 return ( typeof handler === "string" ? instance[ handler ] : handler ) 760 .apply( instance, arguments ); 761 } 762 var instance = this; 763 return setTimeout( handlerProxy, delay || 0 ); 764 }, 765 766 _hoverable: function( element ) { 767 this.hoverable = this.hoverable.add( element ); 768 this._on( element, { 769 mouseenter: function( event ) { 770 $( event.currentTarget ).addClass( "ui-state-hover" ); 771 }, 772 mouseleave: function( event ) { 773 $( event.currentTarget ).removeClass( "ui-state-hover" ); 774 } 775 }); 776 }, 777 778 _focusable: function( element ) { 779 this.focusable = this.focusable.add( element ); 780 this._on( element, { 781 focusin: function( event ) { 782 $( event.currentTarget ).addClass( "ui-state-focus" ); 783 }, 784 focusout: function( event ) { 785 $( event.currentTarget ).removeClass( "ui-state-focus" ); 786 } 787 }); 788 }, 789 790 _trigger: function( type, event, data ) { 791 var prop, orig, 792 callback = this.options[ type ]; 793 794 data = data || {}; 795 event = $.Event( event ); 796 event.type = ( type === this.widgetEventPrefix ? 797 type : 798 this.widgetEventPrefix + type ).toLowerCase(); 799 // the original event may come from any element 800 // so we need to reset the target on the new event 801 event.target = this.element[ 0 ]; 802 803 // copy original event properties over to the new event 804 orig = event.originalEvent; 805 if ( orig ) { 806 for ( prop in orig ) { 807 if ( !( prop in event ) ) { 808 event[ prop ] = orig[ prop ]; 809 } 810 } 811 } 812 813 this.element.trigger( event, data ); 814 return !( $.isFunction( callback ) && 815 callback.apply( this.element[0], [ event ].concat( data ) ) === false || 816 event.isDefaultPrevented() ); 817 } 818}; 819 820$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { 821 $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { 822 if ( typeof options === "string" ) { 823 options = { effect: options }; 824 } 825 var hasOptions, 826 effectName = !options ? 827 method : 828 options === true || typeof options === "number" ? 829 defaultEffect : 830 options.effect || defaultEffect; 831 options = options || {}; 832 if ( typeof options === "number" ) { 833 options = { duration: options }; 834 } 835 hasOptions = !$.isEmptyObject( options ); 836 options.complete = callback; 837 if ( options.delay ) { 838 element.delay( options.delay ); 839 } 840 if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { 841 element[ method ]( options ); 842 } else if ( effectName !== method && element[ effectName ] ) { 843 element[ effectName ]( options.duration, options.easing, callback ); 844 } else { 845 element.queue(function( next ) { 846 $( this )[ method ](); 847 if ( callback ) { 848 callback.call( element[ 0 ] ); 849 } 850 next(); 851 }); 852 } 853 }; 854}); 855 856var widget = $.widget; 857 858 859/*! 860 * jQuery UI Mouse 1.11.4 861 * http://jqueryui.com 862 * 863 * Copyright jQuery Foundation and other contributors 864 * Released under the MIT license. 865 * http://jquery.org/license 866 * 867 * http://api.jqueryui.com/mouse/ 868 */ 869 870 871var mouseHandled = false; 872$( document ).mouseup( function() { 873 mouseHandled = false; 874}); 875 876var mouse = $.widget("ui.mouse", { 877 version: "1.11.4", 878 options: { 879 cancel: "input,textarea,button,select,option", 880 distance: 1, 881 delay: 0 882 }, 883 _mouseInit: function() { 884 var that = this; 885 886 this.element 887 .bind("mousedown." + this.widgetName, function(event) { 888 return that._mouseDown(event); 889 }) 890 .bind("click." + this.widgetName, function(event) { 891 if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { 892 $.removeData(event.target, that.widgetName + ".preventClickEvent"); 893 event.stopImmediatePropagation(); 894 return false; 895 } 896 }); 897 898 this.started = false; 899 }, 900 901 // TODO: make sure destroying one instance of mouse doesn't mess with 902 // other instances of mouse 903 _mouseDestroy: function() { 904 this.element.unbind("." + this.widgetName); 905 if ( this._mouseMoveDelegate ) { 906 this.document 907 .unbind("mousemove." + this.widgetName, this._mouseMoveDelegate) 908 .unbind("mouseup." + this.widgetName, this._mouseUpDelegate); 909 } 910 }, 911 912 _mouseDown: function(event) { 913 // don't let more than one widget handle mouseStart 914 if ( mouseHandled ) { 915 return; 916 } 917 918 this._mouseMoved = false; 919 920 // we may have missed mouseup (out of window) 921 (this._mouseStarted && this._mouseUp(event)); 922 923 this._mouseDownEvent = event; 924 925 var that = this, 926 btnIsLeft = (event.which === 1), 927 // event.target.nodeName works around a bug in IE 8 with 928 // disabled inputs (#7620) 929 elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); 930 if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { 931 return true; 932 } 933 934 this.mouseDelayMet = !this.options.delay; 935 if (!this.mouseDelayMet) { 936 this._mouseDelayTimer = setTimeout(function() { 937 that.mouseDelayMet = true; 938 }, this.options.delay); 939 } 940 941 if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { 942 this._mouseStarted = (this._mouseStart(event) !== false); 943 if (!this._mouseStarted) { 944 event.preventDefault(); 945 return true; 946 } 947 } 948 949 // Click event may never have fired (Gecko & Opera) 950 if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { 951 $.removeData(event.target, this.widgetName + ".preventClickEvent"); 952 } 953 954 // these delegates are required to keep context 955 this._mouseMoveDelegate = function(event) { 956 return that._mouseMove(event); 957 }; 958 this._mouseUpDelegate = function(event) { 959 return that._mouseUp(event); 960 }; 961 962 this.document 963 .bind( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 964 .bind( "mouseup." + this.widgetName, this._mouseUpDelegate ); 965 966 event.preventDefault(); 967 968 mouseHandled = true; 969 return true; 970 }, 971 972 _mouseMove: function(event) { 973 // Only check for mouseups outside the document if you've moved inside the document 974 // at least once. This prevents the firing of mouseup in the case of IE<9, which will 975 // fire a mousemove event if content is placed under the cursor. See #7778 976 // Support: IE <9 977 if ( this._mouseMoved ) { 978 // IE mouseup check - mouseup happened when mouse was out of window 979 if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { 980 return this._mouseUp(event); 981 982 // Iframe mouseup check - mouseup occurred in another document 983 } else if ( !event.which ) { 984 return this._mouseUp( event ); 985 } 986 } 987 988 if ( event.which || event.button ) { 989 this._mouseMoved = true; 990 } 991 992 if (this._mouseStarted) { 993 this._mouseDrag(event); 994 return event.preventDefault(); 995 } 996 997 if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { 998 this._mouseStarted = 999 (this._mouseStart(this._mouseDownEvent, event) !== false); 1000 (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); 1001 } 1002 1003 return !this._mouseStarted; 1004 }, 1005 1006 _mouseUp: function(event) { 1007 this.document 1008 .unbind( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 1009 .unbind( "mouseup." + this.widgetName, this._mouseUpDelegate ); 1010 1011 if (this._mouseStarted) { 1012 this._mouseStarted = false; 1013 1014 if (event.target === this._mouseDownEvent.target) { 1015 $.data(event.target, this.widgetName + ".preventClickEvent", true); 1016 } 1017 1018 this._mouseStop(event); 1019 } 1020 1021 mouseHandled = false; 1022 return false; 1023 }, 1024 1025 _mouseDistanceMet: function(event) { 1026 return (Math.max( 1027 Math.abs(this._mouseDownEvent.pageX - event.pageX), 1028 Math.abs(this._mouseDownEvent.pageY - event.pageY) 1029 ) >= this.options.distance 1030 ); 1031 }, 1032 1033 _mouseDelayMet: function(/* event */) { 1034 return this.mouseDelayMet; 1035 }, 1036 1037 // These are placeholder methods, to be overriden by extending plugin 1038 _mouseStart: function(/* event */) {}, 1039 _mouseDrag: function(/* event */) {}, 1040 _mouseStop: function(/* event */) {}, 1041 _mouseCapture: function(/* event */) { return true; } 1042}); 1043 1044 1045/*! 1046 * jQuery UI Position 1.11.4 1047 * http://jqueryui.com 1048 * 1049 * Copyright jQuery Foundation and other contributors 1050 * Released under the MIT license. 1051 * http://jquery.org/license 1052 * 1053 * http://api.jqueryui.com/position/ 1054 */ 1055 1056(function() { 1057 1058$.ui = $.ui || {}; 1059 1060var cachedScrollbarWidth, supportsOffsetFractions, 1061 max = Math.max, 1062 abs = Math.abs, 1063 round = Math.round, 1064 rhorizontal = /left|center|right/, 1065 rvertical = /top|center|bottom/, 1066 roffset = /[\+\-]\d+(\.[\d]+)?%?/, 1067 rposition = /^\w+/, 1068 rpercent = /%$/, 1069 _position = $.fn.position; 1070 1071function getOffsets( offsets, width, height ) { 1072 return [ 1073 parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), 1074 parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) 1075 ]; 1076} 1077 1078function parseCss( element, property ) { 1079 return parseInt( $.css( element, property ), 10 ) || 0; 1080} 1081 1082function getDimensions( elem ) { 1083 var raw = elem[0]; 1084 if ( raw.nodeType === 9 ) { 1085 return { 1086 width: elem.width(), 1087 height: elem.height(), 1088 offset: { top: 0, left: 0 } 1089 }; 1090 } 1091 if ( $.isWindow( raw ) ) { 1092 return { 1093 width: elem.width(), 1094 height: elem.height(), 1095 offset: { top: elem.scrollTop(), left: elem.scrollLeft() } 1096 }; 1097 } 1098 if ( raw.preventDefault ) { 1099 return { 1100 width: 0, 1101 height: 0, 1102 offset: { top: raw.pageY, left: raw.pageX } 1103 }; 1104 } 1105 return { 1106 width: elem.outerWidth(), 1107 height: elem.outerHeight(), 1108 offset: elem.offset() 1109 }; 1110} 1111 1112$.position = { 1113 scrollbarWidth: function() { 1114 if ( cachedScrollbarWidth !== undefined ) { 1115 return cachedScrollbarWidth; 1116 } 1117 var w1, w2, 1118 div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ), 1119 innerDiv = div.children()[0]; 1120 1121 $( "body" ).append( div ); 1122 w1 = innerDiv.offsetWidth; 1123 div.css( "overflow", "scroll" ); 1124 1125 w2 = innerDiv.offsetWidth; 1126 1127 if ( w1 === w2 ) { 1128 w2 = div[0].clientWidth; 1129 } 1130 1131 div.remove(); 1132 1133 return (cachedScrollbarWidth = w1 - w2); 1134 }, 1135 getScrollInfo: function( within ) { 1136 var overflowX = within.isWindow || within.isDocument ? "" : 1137 within.element.css( "overflow-x" ), 1138 overflowY = within.isWindow || within.isDocument ? "" : 1139 within.element.css( "overflow-y" ), 1140 hasOverflowX = overflowX === "scroll" || 1141 ( overflowX === "auto" && within.width < within.element[0].scrollWidth ), 1142 hasOverflowY = overflowY === "scroll" || 1143 ( overflowY === "auto" && within.height < within.element[0].scrollHeight ); 1144 return { 1145 width: hasOverflowY ? $.position.scrollbarWidth() : 0, 1146 height: hasOverflowX ? $.position.scrollbarWidth() : 0 1147 }; 1148 }, 1149 getWithinInfo: function( element ) { 1150 var withinElement = $( element || window ), 1151 isWindow = $.isWindow( withinElement[0] ), 1152 isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9; 1153 return { 1154 element: withinElement, 1155 isWindow: isWindow, 1156 isDocument: isDocument, 1157 offset: withinElement.offset() || { left: 0, top: 0 }, 1158 scrollLeft: withinElement.scrollLeft(), 1159 scrollTop: withinElement.scrollTop(), 1160 1161 // support: jQuery 1.6.x 1162 // jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows 1163 width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(), 1164 height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight() 1165 }; 1166 } 1167}; 1168 1169$.fn.position = function( options ) { 1170 if ( !options || !options.of ) { 1171 return _position.apply( this, arguments ); 1172 } 1173 1174 // make a copy, we don't want to modify arguments 1175 options = $.extend( {}, options ); 1176 1177 var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, 1178 target = $( options.of ), 1179 within = $.position.getWithinInfo( options.within ), 1180 scrollInfo = $.position.getScrollInfo( within ), 1181 collision = ( options.collision || "flip" ).split( " " ), 1182 offsets = {}; 1183 1184 dimensions = getDimensions( target ); 1185 if ( target[0].preventDefault ) { 1186 // force left top to allow flipping 1187 options.at = "left top"; 1188 } 1189 targetWidth = dimensions.width; 1190 targetHeight = dimensions.height; 1191 targetOffset = dimensions.offset; 1192 // clone to reuse original targetOffset later 1193 basePosition = $.extend( {}, targetOffset ); 1194 1195 // force my and at to have valid horizontal and vertical positions 1196 // if a value is missing or invalid, it will be converted to center 1197 $.each( [ "my", "at" ], function() { 1198 var pos = ( options[ this ] || "" ).split( " " ), 1199 horizontalOffset, 1200 verticalOffset; 1201 1202 if ( pos.length === 1) { 1203 pos = rhorizontal.test( pos[ 0 ] ) ?
vendor: 9,546 bytes, lines 1204-1485
1204 pos.concat( [ "center" ] ) : 1205 rvertical.test( pos[ 0 ] ) ? 1206 [ "center" ].concat( pos ) : 1207 [ "center", "center" ]; 1208 } 1209 pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; 1210 pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; 1211 1212 // calculate offsets 1213 horizontalOffset = roffset.exec( pos[ 0 ] ); 1214 verticalOffset = roffset.exec( pos[ 1 ] ); 1215 offsets[ this ] = [ 1216 horizontalOffset ? horizontalOffset[ 0 ] : 0, 1217 verticalOffset ? verticalOffset[ 0 ] : 0 1218 ]; 1219 1220 // reduce to just the positions without the offsets 1221 options[ this ] = [ 1222 rposition.exec( pos[ 0 ] )[ 0 ], 1223 rposition.exec( pos[ 1 ] )[ 0 ] 1224 ]; 1225 }); 1226 1227 // normalize collision option 1228 if ( collision.length === 1 ) { 1229 collision[ 1 ] = collision[ 0 ]; 1230 } 1231 1232 if ( options.at[ 0 ] === "right" ) { 1233 basePosition.left += targetWidth; 1234 } else if ( options.at[ 0 ] === "center" ) { 1235 basePosition.left += targetWidth / 2; 1236 } 1237 1238 if ( options.at[ 1 ] === "bottom" ) { 1239 basePosition.top += targetHeight; 1240 } else if ( options.at[ 1 ] === "center" ) { 1241 basePosition.top += targetHeight / 2; 1242 } 1243 1244 atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); 1245 basePosition.left += atOffset[ 0 ]; 1246 basePosition.top += atOffset[ 1 ]; 1247 1248 return this.each(function() { 1249 var collisionPosition, using, 1250 elem = $( this ), 1251 elemWidth = elem.outerWidth(), 1252 elemHeight = elem.outerHeight(), 1253 marginLeft = parseCss( this, "marginLeft" ), 1254 marginTop = parseCss( this, "marginTop" ), 1255 collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width, 1256 collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height, 1257 position = $.extend( {}, basePosition ), 1258 myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); 1259 1260 if ( options.my[ 0 ] === "right" ) { 1261 position.left -= elemWidth; 1262 } else if ( options.my[ 0 ] === "center" ) { 1263 position.left -= elemWidth / 2; 1264 } 1265 1266 if ( options.my[ 1 ] === "bottom" ) { 1267 position.top -= elemHeight; 1268 } else if ( options.my[ 1 ] === "center" ) { 1269 position.top -= elemHeight / 2; 1270 } 1271 1272 position.left += myOffset[ 0 ]; 1273 position.top += myOffset[ 1 ]; 1274 1275 // if the browser doesn't support fractions, then round for consistent results 1276 if ( !supportsOffsetFractions ) { 1277 position.left = round( position.left ); 1278 position.top = round( position.top ); 1279 } 1280 1281 collisionPosition = { 1282 marginLeft: marginLeft, 1283 marginTop: marginTop 1284 }; 1285 1286 $.each( [ "left", "top" ], function( i, dir ) { 1287 if ( $.ui.position[ collision[ i ] ] ) { 1288 $.ui.position[ collision[ i ] ][ dir ]( position, { 1289 targetWidth: targetWidth, 1290 targetHeight: targetHeight, 1291 elemWidth: elemWidth, 1292 elemHeight: elemHeight, 1293 collisionPosition: collisionPosition, 1294 collisionWidth: collisionWidth, 1295 collisionHeight: collisionHeight, 1296 offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], 1297 my: options.my, 1298 at: options.at, 1299 within: within, 1300 elem: elem 1301 }); 1302 } 1303 }); 1304 1305 if ( options.using ) { 1306 // adds feedback as second argument to using callback, if present 1307 using = function( props ) { 1308 var left = targetOffset.left - position.left, 1309 right = left + targetWidth - elemWidth, 1310 top = targetOffset.top - position.top, 1311 bottom = top + targetHeight - elemHeight, 1312 feedback = { 1313 target: { 1314 element: target, 1315 left: targetOffset.left, 1316 top: targetOffset.top, 1317 width: targetWidth, 1318 height: targetHeight 1319 }, 1320 element: { 1321 element: elem, 1322 left: position.left, 1323 top: position.top, 1324 width: elemWidth, 1325 height: elemHeight 1326 }, 1327 horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", 1328 vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" 1329 }; 1330 if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { 1331 feedback.horizontal = "center"; 1332 } 1333 if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { 1334 feedback.vertical = "middle"; 1335 } 1336 if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { 1337 feedback.important = "horizontal"; 1338 } else { 1339 feedback.important = "vertical"; 1340 } 1341 options.using.call( this, props, feedback ); 1342 }; 1343 } 1344 1345 elem.offset( $.extend( position, { using: using } ) ); 1346 }); 1347}; 1348 1349$.ui.position = { 1350 fit: { 1351 left: function( position, data ) { 1352 var within = data.within, 1353 withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, 1354 outerWidth = within.width, 1355 collisionPosLeft = position.left - data.collisionPosition.marginLeft, 1356 overLeft = withinOffset - collisionPosLeft, 1357 overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, 1358 newOverRight; 1359 1360 // element is wider than within 1361 if ( data.collisionWidth > outerWidth ) { 1362 // element is initially over the left side of within 1363 if ( overLeft > 0 && overRight <= 0 ) { 1364 newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset; 1365 position.left += overLeft - newOverRight; 1366 // element is initially over right side of within 1367 } else if ( overRight > 0 && overLeft <= 0 ) { 1368 position.left = withinOffset; 1369 // element is initially over both left and right sides of within 1370 } else { 1371 if ( overLeft > overRight ) { 1372 position.left = withinOffset + outerWidth - data.collisionWidth; 1373 } else { 1374 position.left = withinOffset; 1375 } 1376 } 1377 // too far left -> align with left edge 1378 } else if ( overLeft > 0 ) { 1379 position.left += overLeft; 1380 // too far right -> align with right edge 1381 } else if ( overRight > 0 ) { 1382 position.left -= overRight; 1383 // adjust based on position and margin 1384 } else { 1385 position.left = max( position.left - collisionPosLeft, position.left ); 1386 } 1387 }, 1388 top: function( position, data ) { 1389 var within = data.within, 1390 withinOffset = within.isWindow ? within.scrollTop : within.offset.top, 1391 outerHeight = data.within.height, 1392 collisionPosTop = position.top - data.collisionPosition.marginTop, 1393 overTop = withinOffset - collisionPosTop, 1394 overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, 1395 newOverBottom; 1396 1397 // element is taller than within 1398 if ( data.collisionHeight > outerHeight ) { 1399 // element is initially over the top of within 1400 if ( overTop > 0 && overBottom <= 0 ) { 1401 newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset; 1402 position.top += overTop - newOverBottom; 1403 // element is initially over bottom of within 1404 } else if ( overBottom > 0 && overTop <= 0 ) { 1405 position.top = withinOffset; 1406 // element is initially over both top and bottom of within 1407 } else { 1408 if ( overTop > overBottom ) { 1409 position.top = withinOffset + outerHeight - data.collisionHeight; 1410 } else { 1411 position.top = withinOffset; 1412 } 1413 } 1414 // too far up -> align with top 1415 } else if ( overTop > 0 ) { 1416 position.top += overTop; 1417 // too far down -> align with bottom edge 1418 } else if ( overBottom > 0 ) { 1419 position.top -= overBottom; 1420 // adjust based on position and margin 1421 } else { 1422 position.top = max( position.top - collisionPosTop, position.top ); 1423 } 1424 } 1425 }, 1426 flip: { 1427 left: function( position, data ) { 1428 var within = data.within, 1429 withinOffset = within.offset.left + within.scrollLeft, 1430 outerWidth = within.width, 1431 offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, 1432 collisionPosLeft = position.left - data.collisionPosition.marginLeft, 1433 overLeft = collisionPosLeft - offsetLeft, 1434 overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, 1435 myOffset = data.my[ 0 ] === "left" ? 1436 -data.elemWidth : 1437 data.my[ 0 ] === "right" ? 1438 data.elemWidth : 1439 0, 1440 atOffset = data.at[ 0 ] === "left" ? 1441 data.targetWidth : 1442 data.at[ 0 ] === "right" ? 1443 -data.targetWidth : 1444 0, 1445 offset = -2 * data.offset[ 0 ], 1446 newOverRight, 1447 newOverLeft; 1448 1449 if ( overLeft < 0 ) { 1450 newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset; 1451 if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { 1452 position.left += myOffset + atOffset + offset; 1453 } 1454 } else if ( overRight > 0 ) { 1455 newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft; 1456 if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { 1457 position.left += myOffset + atOffset + offset; 1458 } 1459 } 1460 }, 1461 top: function( position, data ) { 1462 var within = data.within, 1463 withinOffset = within.offset.top + within.scrollTop, 1464 outerHeight = within.height, 1465 offsetTop = within.isWindow ? within.scrollTop : within.offset.top, 1466 collisionPosTop = position.top - data.collisionPosition.marginTop, 1467 overTop = collisionPosTop - offsetTop, 1468 overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, 1469 top = data.my[ 1 ] === "top", 1470 myOffset = top ? 1471 -data.elemHeight : 1472 data.my[ 1 ] === "bottom" ? 1473 data.elemHeight : 1474 0, 1475 atOffset = data.at[ 1 ] === "top" ? 1476 data.targetHeight : 1477 data.at[ 1 ] === "bottom" ? 1478 -data.targetHeight : 1479 0, 1480 offset = -2 * data.offset[ 1 ], 1481 newOverTop, 1482 newOverBottom; 1483 if ( overTop < 0 ) { 1484 newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; 1485 if (
vendor: 2,338 bytes, lines 1485-1583
1485newOverBottom < 0 || newOverBottom < abs( overTop ) ) { 1486 position.top += myOffset + atOffset + offset; 1487 } 1488 } else if ( overBottom > 0 ) { 1489 newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; 1490 if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) { 1491 position.top += myOffset + atOffset + offset; 1492 } 1493 } 1494 } 1495 }, 1496 flipfit: { 1497 left: function() { 1498 $.ui.position.flip.left.apply( this, arguments ); 1499 $.ui.position.fit.left.apply( this, arguments ); 1500 }, 1501 top: function() { 1502 $.ui.position.flip.top.apply( this, arguments ); 1503 $.ui.position.fit.top.apply( this, arguments ); 1504 } 1505 } 1506}; 1507 1508// fraction support test 1509(function() { 1510 var testElement, testElementParent, testElementStyle, offsetLeft, i, 1511 body = document.getElementsByTagName( "body" )[ 0 ], 1512 div = document.createElement( "div" ); 1513 1514 //Create a "fake body" for testing based on method used in jQuery.support 1515 testElement = document.createElement( body ? "div" : "body" ); 1516 testElementStyle = { 1517 visibility: "hidden", 1518 width: 0, 1519 height: 0, 1520 border: 0, 1521 margin: 0, 1522 background: "none" 1523 }; 1524 if ( body ) { 1525 $.extend( testElementStyle, { 1526 position: "absolute", 1527 left: "-1000px", 1528 top: "-1000px" 1529 }); 1530 } 1531 for ( i in testElementStyle ) { 1532 testElement.style[ i ] = testElementStyle[ i ]; 1533 } 1534 testElement.appendChild( div ); 1535 testElementParent = body || document.documentElement; 1536 testElementParent.insertBefore( testElement, testElementParent.firstChild ); 1537 1538 div.style.cssText = "position: absolute; left: 10.7432222px;"; 1539 1540 offsetLeft = $( div ).offset().left; 1541 supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11; 1542 1543 testElement.innerHTML = ""; 1544 testElementParent.removeChild( testElement ); 1545})(); 1546 1547})(); 1548 1549var position = $.ui.position; 1550 1551 1552/*! 1553 * jQuery UI Tabs 1.11.4 1554 * http://jqueryui.com 1555 * 1556 * Copyright jQuery Foundation and other contributors 1557 * Released under the MIT license. 1558 * http://jquery.org/license 1559 * 1560 * http://api.jqueryui.com/tabs/ 1561 */ 1562 1563 1564var tabs = $.widget( "ui.tabs", { 1565 version: "1.11.4", 1566 delay: 300, 1567 options: { 1568 active: null, 1569 collapsible: false, 1570 event: "click", 1571 heightStyle: "content", 1572 hide: null, 1573 show: null, 1574 1575 // callbacks 1576 activate: null, 1577 beforeActivate: null, 1578 beforeLoad: null, 1579 load: null 1580 }, 1581 1582 _isLocal: (function() { 1583 var rhash = /\?.*|
vendor: 12,040 bytes, lines 1583-2024
1583#.*$/; 1584 1585 return function( anchor ) { 1586 var anchorUrl, locationUrl; 1587 1588 // support: IE7 1589 // IE7 doesn't normalize the href property when set via script (#9317) 1590 anchor = anchor.cloneNode( false ); 1591 1592 anchorUrl = anchor.href.replace( rhash, "" ); 1593 locationUrl = location.href.replace( rhash, "" ); 1594 1595 // decoding may throw an error if the URL isn't UTF-8 (#9518) 1596 try { 1597 anchorUrl = decodeURIComponent( anchorUrl ); 1598 } catch ( error ) {} 1599 try { 1600 locationUrl = decodeURIComponent( locationUrl ); 1601 } catch ( error ) {} 1602 1603 return anchor.hash.length > 1 && anchorUrl === locationUrl; 1604 }; 1605 })(), 1606 1607 _create: function() { 1608 var that = this, 1609 options = this.options; 1610 1611 this.running = false; 1612 1613 this.element 1614 .addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" ) 1615 .toggleClass( "ui-tabs-collapsible", options.collapsible ); 1616 1617 this._processTabs(); 1618 options.active = this._initialActive(); 1619 1620 // Take disabling tabs via class attribute from HTML 1621 // into account and update option properly. 1622 if ( $.isArray( options.disabled ) ) { 1623 options.disabled = $.unique( options.disabled.concat( 1624 $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) { 1625 return that.tabs.index( li ); 1626 }) 1627 ) ).sort(); 1628 } 1629 1630 // check for length avoids error when initializing empty list 1631 if ( this.options.active !== false && this.anchors.length ) { 1632 this.active = this._findActive( options.active ); 1633 } else { 1634 this.active = $(); 1635 } 1636 1637 this._refresh(); 1638 1639 if ( this.active.length ) { 1640 this.load( options.active ); 1641 } 1642 }, 1643 1644 _initialActive: function() { 1645 var active = this.options.active, 1646 collapsible = this.options.collapsible, 1647 locationHash = location.hash.substring( 1 ); 1648 1649 if ( active === null ) { 1650 // check the fragment identifier in the URL 1651 if ( locationHash ) { 1652 this.tabs.each(function( i, tab ) { 1653 if ( $( tab ).attr( "aria-controls" ) === locationHash ) { 1654 active = i; 1655 return false; 1656 } 1657 }); 1658 } 1659 1660 // check for a tab marked active via a class 1661 if ( active === null ) { 1662 active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) ); 1663 } 1664 1665 // no active tab, set to false 1666 if ( active === null || active === -1 ) { 1667 active = this.tabs.length ? 0 : false; 1668 } 1669 } 1670 1671 // handle numbers: negative, out of range 1672 if ( active !== false ) { 1673 active = this.tabs.index( this.tabs.eq( active ) ); 1674 if ( active === -1 ) { 1675 active = collapsible ? false : 0; 1676 } 1677 } 1678 1679 // don't allow collapsible: false and active: false 1680 if ( !collapsible && active === false && this.anchors.length ) { 1681 active = 0; 1682 } 1683 1684 return active; 1685 }, 1686 1687 _getCreateEventData: function() { 1688 return { 1689 tab: this.active, 1690 panel: !this.active.length ? $() : this._getPanelForTab( this.active ) 1691 }; 1692 }, 1693 1694 _tabKeydown: function( event ) { 1695 var focusedTab = $( this.document[0].activeElement ).closest( "li" ), 1696 selectedIndex = this.tabs.index( focusedTab ), 1697 goingForward = true; 1698 1699 if ( this._handlePageNav( event ) ) { 1700 return; 1701 } 1702 1703 switch ( event.keyCode ) { 1704 case $.ui.keyCode.RIGHT: 1705 case $.ui.keyCode.DOWN: 1706 selectedIndex++; 1707 break; 1708 case $.ui.keyCode.UP: 1709 case $.ui.keyCode.LEFT: 1710 goingForward = false; 1711 selectedIndex--; 1712 break; 1713 case $.ui.keyCode.END: 1714 selectedIndex = this.anchors.length - 1; 1715 break; 1716 case $.ui.keyCode.HOME: 1717 selectedIndex = 0; 1718 break; 1719 case $.ui.keyCode.SPACE: 1720 // Activate only, no collapsing 1721 event.preventDefault(); 1722 clearTimeout( this.activating ); 1723 this._activate( selectedIndex ); 1724 return; 1725 case $.ui.keyCode.ENTER: 1726 // Toggle (cancel delayed activation, allow collapsing) 1727 event.preventDefault(); 1728 clearTimeout( this.activating ); 1729 // Determine if we should collapse or activate 1730 this._activate( selectedIndex === this.options.active ? false : selectedIndex ); 1731 return; 1732 default: 1733 return; 1734 } 1735 1736 // Focus the appropriate tab, based on which key was pressed 1737 event.preventDefault(); 1738 clearTimeout( this.activating ); 1739 selectedIndex = this._focusNextTab( selectedIndex, goingForward ); 1740 1741 // Navigating with control/command key will prevent automatic activation 1742 if ( !event.ctrlKey && !event.metaKey ) { 1743 1744 // Update aria-selected immediately so that AT think the tab is already selected. 1745 // Otherwise AT may confuse the user by stating that they need to activate the tab, 1746 // but the tab will already be activated by the time the announcement finishes. 1747 focusedTab.attr( "aria-selected", "false" ); 1748 this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" ); 1749 1750 this.activating = this._delay(function() { 1751 this.option( "active", selectedIndex ); 1752 }, this.delay ); 1753 } 1754 }, 1755 1756 _panelKeydown: function( event ) { 1757 if ( this._handlePageNav( event ) ) { 1758 return; 1759 } 1760 1761 // Ctrl+up moves focus to the current tab 1762 if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) { 1763 event.preventDefault(); 1764 this.active.focus(); 1765 } 1766 }, 1767 1768 // Alt+page up/down moves focus to the previous/next tab (and activates) 1769 _handlePageNav: function( event ) { 1770 if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) { 1771 this._activate( this._focusNextTab( this.options.active - 1, false ) ); 1772 return true; 1773 } 1774 if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) { 1775 this._activate( this._focusNextTab( this.options.active + 1, true ) ); 1776 return true; 1777 } 1778 }, 1779 1780 _findNextTab: function( index, goingForward ) { 1781 var lastTabIndex = this.tabs.length - 1; 1782 1783 function constrain() { 1784 if ( index > lastTabIndex ) { 1785 index = 0; 1786 } 1787 if ( index < 0 ) { 1788 index = lastTabIndex; 1789 } 1790 return index; 1791 } 1792 1793 while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) { 1794 index = goingForward ? index + 1 : index - 1; 1795 } 1796 1797 return index; 1798 }, 1799 1800 _focusNextTab: function( index, goingForward ) { 1801 index = this._findNextTab( index, goingForward ); 1802 this.tabs.eq( index ).focus(); 1803 return index; 1804 }, 1805 1806 _setOption: function( key, value ) { 1807 if ( key === "active" ) { 1808 // _activate() will handle invalid values and update this.options 1809 this._activate( value ); 1810 return; 1811 } 1812 1813 if ( key === "disabled" ) { 1814 // don't use the widget factory's disabled handling 1815 this._setupDisabled( value ); 1816 return; 1817 } 1818 1819 this._super( key, value); 1820 1821 if ( key === "collapsible" ) { 1822 this.element.toggleClass( "ui-tabs-collapsible", value ); 1823 // Setting collapsible: false while collapsed; open first panel 1824 if ( !value && this.options.active === false ) { 1825 this._activate( 0 ); 1826 } 1827 } 1828 1829 if ( key === "event" ) { 1830 this._setupEvents( value ); 1831 } 1832 1833 if ( key === "heightStyle" ) { 1834 this._setupHeightStyle( value ); 1835 } 1836 }, 1837 1838 _sanitizeSelector: function( hash ) { 1839 return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : ""; 1840 }, 1841 1842 refresh: function() { 1843 var options = this.options, 1844 lis = this.tablist.children( ":has(a[href])" ); 1845 1846 // get disabled tabs from class attribute from HTML 1847 // this will get converted to a boolean if needed in _refresh() 1848 options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) { 1849 return lis.index( tab ); 1850 }); 1851 1852 this._processTabs(); 1853 1854 // was collapsed or no tabs 1855 if ( options.active === false || !this.anchors.length ) { 1856 options.active = false; 1857 this.active = $(); 1858 // was active, but active tab is gone 1859 } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) { 1860 // all remaining tabs are disabled 1861 if ( this.tabs.length === options.disabled.length ) { 1862 options.active = false; 1863 this.active = $(); 1864 // activate previous tab 1865 } else { 1866 this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) ); 1867 } 1868 // was active, active tab still exists 1869 } else { 1870 // make sure active index is correct 1871 options.active = this.tabs.index( this.active ); 1872 } 1873 1874 this._refresh(); 1875 }, 1876 1877 _refresh: function() { 1878 this._setupDisabled( this.options.disabled ); 1879 this._setupEvents( this.options.event ); 1880 this._setupHeightStyle( this.options.heightStyle ); 1881 1882 this.tabs.not( this.active ).attr({ 1883 "aria-selected": "false", 1884 "aria-expanded": "false", 1885 tabIndex: -1 1886 }); 1887 this.panels.not( this._getPanelForTab( this.active ) ) 1888 .hide() 1889 .attr({ 1890 "aria-hidden": "true" 1891 }); 1892 1893 // Make sure one tab is in the tab order 1894 if ( !this.active.length ) { 1895 this.tabs.eq( 0 ).attr( "tabIndex", 0 ); 1896 } else { 1897 this.active 1898 .addClass( "ui-tabs-active ui-state-active" ) 1899 .attr({ 1900 "aria-selected": "true", 1901 "aria-expanded": "true", 1902 tabIndex: 0 1903 }); 1904 this._getPanelForTab( this.active ) 1905 .show() 1906 .attr({ 1907 "aria-hidden": "false" 1908 }); 1909 } 1910 }, 1911 1912 _processTabs: function() { 1913 var that = this, 1914 prevTabs = this.tabs, 1915 prevAnchors = this.anchors, 1916 prevPanels = this.panels; 1917 1918 this.tablist = this._getList() 1919 .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ) 1920 .attr( "role", "tablist" ) 1921 1922 // Prevent users from focusing disabled tabs via click 1923 .delegate( "> li", "mousedown" + this.eventNamespace, function( event ) { 1924 if ( $( this ).is( ".ui-state-disabled" ) ) { 1925 event.preventDefault(); 1926 } 1927 }) 1928 1929 // support: IE <9 1930 // Preventing the default action in mousedown doesn't prevent IE 1931 // from focusing the element, so if the anchor gets focused, blur. 1932 // We don't have to worry about focusing the previously focused 1933 // element since clicking on a non-focusable element should focus 1934 // the body anyway. 1935 .delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() { 1936 if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) { 1937 this.blur(); 1938 } 1939 }); 1940 1941 this.tabs = this.tablist.find( "> li:has(a[href])" ) 1942 .addClass( "ui-state-default ui-corner-top" ) 1943 .attr({ 1944 role: "tab", 1945 tabIndex: -1 1946 }); 1947 1948 this.anchors = this.tabs.map(function() { 1949 return $( "a", this )[ 0 ]; 1950 }) 1951 .addClass( "ui-tabs-anchor" ) 1952 .attr({ 1953 role: "presentation", 1954 tabIndex: -1 1955 }); 1956 1957 this.panels = $(); 1958 1959 this.anchors.each(function( i, anchor ) { 1960 var selector, panel, panelId, 1961 anchorId = $( anchor ).uniqueId().attr( "id" ), 1962 tab = $( anchor ).closest( "li" ), 1963 originalAriaControls = tab.attr( "aria-controls" ); 1964 1965 // inline tab 1966 if ( that._isLocal( anchor ) ) { 1967 selector = anchor.hash; 1968 panelId = selector.substring( 1 ); 1969 panel = that.element.find( that._sanitizeSelector( selector ) ); 1970 // remote tab 1971 } else { 1972 // If the tab doesn't already have aria-controls, 1973 // generate an id by using a throw-away element 1974 panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id; 1975 selector = "#" + panelId; 1976 panel = that.element.find( selector ); 1977 if ( !panel.length ) { 1978 panel = that._createPanel( panelId ); 1979 panel.insertAfter( that.panels[ i - 1 ] || that.tablist ); 1980 } 1981 panel.attr( "aria-live", "polite" ); 1982 } 1983 1984 if ( panel.length) { 1985 that.panels = that.panels.add( panel ); 1986 } 1987 if ( originalAriaControls ) { 1988 tab.data( "ui-tabs-aria-controls", originalAriaControls ); 1989 } 1990 tab.attr({ 1991 "aria-controls": panelId, 1992 "aria-labelledby": anchorId 1993 }); 1994 panel.attr( "aria-labelledby", anchorId ); 1995 }); 1996 1997 this.panels 1998 .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) 1999 .attr( "role", "tabpanel" ); 2000 2001 // Avoid memory leaks (#10056) 2002 if ( prevTabs ) { 2003 this._off( prevTabs.not( this.tabs ) ); 2004 this._off( prevAnchors.not( this.anchors ) ); 2005 this._off( prevPanels.not( this.panels ) ); 2006 } 2007 }, 2008 2009 // allow overriding how to find the list for rare usage scenarios (#7715) 2010 _getList: function() { 2011 return this.tablist || this.element.find( "ol,ul" ).eq( 0 ); 2012 }, 2013 2014 _createPanel: function( id ) { 2015 return $( "<div>" ) 2016 .attr( "id", id ) 2017 .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) 2018 .data( "ui-tabs-destroy", true ); 2019 }, 2020 2021 _setupDisabled: function( disabled ) { 2022 if ( $.isArray( disabled ) ) { 2023 if ( !disabled.length ) { 2024 disabled = false;
vendor: 8,633 bytes, lines 2025-2357
2025 } else if ( disabled.length === this.anchors.length ) { 2026 disabled = true; 2027 } 2028 } 2029 2030 // disable tabs 2031 for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) { 2032 if ( disabled === true || $.inArray( i, disabled ) !== -1 ) { 2033 $( li ) 2034 .addClass( "ui-state-disabled" ) 2035 .attr( "aria-disabled", "true" ); 2036 } else { 2037 $( li ) 2038 .removeClass( "ui-state-disabled" ) 2039 .removeAttr( "aria-disabled" ); 2040 } 2041 } 2042 2043 this.options.disabled = disabled; 2044 }, 2045 2046 _setupEvents: function( event ) { 2047 var events = {}; 2048 if ( event ) { 2049 $.each( event.split(" "), function( index, eventName ) { 2050 events[ eventName ] = "_eventHandler"; 2051 }); 2052 } 2053 2054 this._off( this.anchors.add( this.tabs ).add( this.panels ) ); 2055 // Always prevent the default action, even when disabled 2056 this._on( true, this.anchors, { 2057 click: function( event ) { 2058 event.preventDefault(); 2059 } 2060 }); 2061 this._on( this.anchors, events ); 2062 this._on( this.tabs, { keydown: "_tabKeydown" } ); 2063 this._on( this.panels, { keydown: "_panelKeydown" } ); 2064 2065 this._focusable( this.tabs ); 2066 this._hoverable( this.tabs ); 2067 }, 2068 2069 _setupHeightStyle: function( heightStyle ) { 2070 var maxHeight, 2071 parent = this.element.parent(); 2072 2073 if ( heightStyle === "fill" ) { 2074 maxHeight = parent.height(); 2075 maxHeight -= this.element.outerHeight() - this.element.height(); 2076 2077 this.element.siblings( ":visible" ).each(function() { 2078 var elem = $( this ), 2079 position = elem.css( "position" ); 2080 2081 if ( position === "absolute" || position === "fixed" ) { 2082 return; 2083 } 2084 maxHeight -= elem.outerHeight( true ); 2085 }); 2086 2087 this.element.children().not( this.panels ).each(function() { 2088 maxHeight -= $( this ).outerHeight( true ); 2089 }); 2090 2091 this.panels.each(function() { 2092 $( this ).height( Math.max( 0, maxHeight - 2093 $( this ).innerHeight() + $( this ).height() ) ); 2094 }) 2095 .css( "overflow", "auto" ); 2096 } else if ( heightStyle === "auto" ) { 2097 maxHeight = 0; 2098 this.panels.each(function() { 2099 maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() ); 2100 }).height( maxHeight ); 2101 } 2102 }, 2103 2104 _eventHandler: function( event ) { 2105 var options = this.options, 2106 active = this.active, 2107 anchor = $( event.currentTarget ), 2108 tab = anchor.closest( "li" ), 2109 clickedIsActive = tab[ 0 ] === active[ 0 ], 2110 collapsing = clickedIsActive && options.collapsible, 2111 toShow = collapsing ? $() : this._getPanelForTab( tab ), 2112 toHide = !active.length ? $() : this._getPanelForTab( active ), 2113 eventData = { 2114 oldTab: active, 2115 oldPanel: toHide, 2116 newTab: collapsing ? $() : tab, 2117 newPanel: toShow 2118 }; 2119 2120 event.preventDefault(); 2121 2122 if ( tab.hasClass( "ui-state-disabled" ) || 2123 // tab is already loading 2124 tab.hasClass( "ui-tabs-loading" ) || 2125 // can't switch durning an animation 2126 this.running || 2127 // click on active header, but not collapsible 2128 ( clickedIsActive && !options.collapsible ) || 2129 // allow canceling activation 2130 ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { 2131 return; 2132 } 2133 2134 options.active = collapsing ? false : this.tabs.index( tab ); 2135 2136 this.active = clickedIsActive ? $() : tab; 2137 if ( this.xhr ) { 2138 this.xhr.abort(); 2139 } 2140 2141 if ( !toHide.length && !toShow.length ) { 2142 $.error( "jQuery UI Tabs: Mismatching fragment identifier." ); 2143 } 2144 2145 if ( toShow.length ) { 2146 this.load( this.tabs.index( tab ), event ); 2147 } 2148 this._toggle( event, eventData ); 2149 }, 2150 2151 // handles show/hide for selecting tabs 2152 _toggle: function( event, eventData ) { 2153 var that = this, 2154 toShow = eventData.newPanel, 2155 toHide = eventData.oldPanel; 2156 2157 this.running = true; 2158 2159 function complete() { 2160 that.running = false; 2161 that._trigger( "activate", event, eventData ); 2162 } 2163 2164 function show() { 2165 eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" ); 2166 2167 if ( toShow.length && that.options.show ) { 2168 that._show( toShow, that.options.show, complete ); 2169 } else { 2170 toShow.show(); 2171 complete(); 2172 } 2173 } 2174 2175 // start out by hiding, then showing, then completing 2176 if ( toHide.length && this.options.hide ) { 2177 this._hide( toHide, this.options.hide, function() { 2178 eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); 2179 show(); 2180 }); 2181 } else { 2182 eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); 2183 toHide.hide(); 2184 show(); 2185 } 2186 2187 toHide.attr( "aria-hidden", "true" ); 2188 eventData.oldTab.attr({ 2189 "aria-selected": "false", 2190 "aria-expanded": "false" 2191 }); 2192 // If we're switching tabs, remove the old tab from the tab order. 2193 // If we're opening from collapsed state, remove the previous tab from the tab order. 2194 // If we're collapsing, then keep the collapsing tab in the tab order. 2195 if ( toShow.length && toHide.length ) { 2196 eventData.oldTab.attr( "tabIndex", -1 ); 2197 } else if ( toShow.length ) { 2198 this.tabs.filter(function() { 2199 return $( this ).attr( "tabIndex" ) === 0; 2200 }) 2201 .attr( "tabIndex", -1 ); 2202 } 2203 2204 toShow.attr( "aria-hidden", "false" ); 2205 eventData.newTab.attr({ 2206 "aria-selected": "true", 2207 "aria-expanded": "true", 2208 tabIndex: 0 2209 }); 2210 }, 2211 2212 _activate: function( index ) { 2213 var anchor, 2214 active = this._findActive( index ); 2215 2216 // trying to activate the already active panel 2217 if ( active[ 0 ] === this.active[ 0 ] ) { 2218 return; 2219 } 2220 2221 // trying to collapse, simulate a click on the current active header 2222 if ( !active.length ) { 2223 active = this.active; 2224 } 2225 2226 anchor = active.find( ".ui-tabs-anchor" )[ 0 ]; 2227 this._eventHandler({ 2228 target: anchor, 2229 currentTarget: anchor, 2230 preventDefault: $.noop 2231 }); 2232 }, 2233 2234 _findActive: function( index ) { 2235 return index === false ? $() : this.tabs.eq( index ); 2236 }, 2237 2238 _getIndex: function( index ) { 2239 // meta-function to give users option to provide a href string instead of a numerical index. 2240 if ( typeof index === "string" ) { 2241 index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) ); 2242 } 2243 2244 return index; 2245 }, 2246 2247 _destroy: function() { 2248 if ( this.xhr ) { 2249 this.xhr.abort(); 2250 } 2251 2252 this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" ); 2253 2254 this.tablist 2255 .removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ) 2256 .removeAttr( "role" ); 2257 2258 this.anchors 2259 .removeClass( "ui-tabs-anchor" ) 2260 .removeAttr( "role" ) 2261 .removeAttr( "tabIndex" ) 2262 .removeUniqueId(); 2263 2264 this.tablist.unbind( this.eventNamespace ); 2265 2266 this.tabs.add( this.panels ).each(function() { 2267 if ( $.data( this, "ui-tabs-destroy" ) ) { 2268 $( this ).remove(); 2269 } else { 2270 $( this ) 2271 .removeClass( "ui-state-default ui-state-active ui-state-disabled " + 2272 "ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" ) 2273 .removeAttr( "tabIndex" ) 2274 .removeAttr( "aria-live" ) 2275 .removeAttr( "aria-busy" ) 2276 .removeAttr( "aria-selected" ) 2277 .removeAttr( "aria-labelledby" ) 2278 .removeAttr( "aria-hidden" ) 2279 .removeAttr( "aria-expanded" ) 2280 .removeAttr( "role" ); 2281 } 2282 }); 2283 2284 this.tabs.each(function() { 2285 var li = $( this ), 2286 prev = li.data( "ui-tabs-aria-controls" ); 2287 if ( prev ) { 2288 li 2289 .attr( "aria-controls", prev ) 2290 .removeData( "ui-tabs-aria-controls" ); 2291 } else { 2292 li.removeAttr( "aria-controls" ); 2293 } 2294 }); 2295 2296 this.panels.show(); 2297 2298 if ( this.options.heightStyle !== "content" ) { 2299 this.panels.css( "height", "" ); 2300 } 2301 }, 2302 2303 enable: function( index ) { 2304 var disabled = this.options.disabled; 2305 if ( disabled === false ) { 2306 return; 2307 } 2308 2309 if ( index === undefined ) { 2310 disabled = false; 2311 } else { 2312 index = this._getIndex( index ); 2313 if ( $.isArray( disabled ) ) { 2314 disabled = $.map( disabled, function( num ) { 2315 return num !== index ? num : null; 2316 }); 2317 } else { 2318 disabled = $.map( this.tabs, function( li, num ) { 2319 return num !== index ? num : null; 2320 }); 2321 } 2322 } 2323 this._setupDisabled( disabled ); 2324 }, 2325 2326 disable: function( index ) { 2327 var disabled = this.options.disabled; 2328 if ( disabled === true ) { 2329 return; 2330 } 2331 2332 if ( index === undefined ) { 2333 disabled = true; 2334 } else { 2335 index = this._getIndex( index ); 2336 if ( $.inArray( index, disabled ) !== -1 ) { 2337 return; 2338 } 2339 if ( $.isArray( disabled ) ) { 2340 disabled = $.merge( [ index ], disabled ).sort(); 2341 } else { 2342 disabled = [ index ]; 2343 } 2344 } 2345 this._setupDisabled( disabled ); 2346 }, 2347 2348 load: function( index, event ) { 2349 index = this._getIndex( index ); 2350 var that = this, 2351 tab = this.tabs.eq( index ), 2352 anchor = tab.find( ".ui-tabs-anchor" ), 2353 panel = this._getPanelForTab( tab ), 2354 eventData = { 2355 tab: tab, 2356 panel: panel 2357 }
vendor: 1,725 bytes, lines 2357-2428
2357, 2358 complete = function( jqXHR, status ) { 2359 if ( status === "abort" ) { 2360 that.panels.stop( false, true ); 2361 } 2362 2363 tab.removeClass( "ui-tabs-loading" ); 2364 panel.removeAttr( "aria-busy" ); 2365 2366 if ( jqXHR === that.xhr ) { 2367 delete that.xhr; 2368 } 2369 }; 2370 2371 // not remote 2372 if ( this._isLocal( anchor[ 0 ] ) ) { 2373 return; 2374 } 2375 2376 this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) ); 2377 2378 // support: jQuery <1.8 2379 // jQuery <1.8 returns false if the request is canceled in beforeSend, 2380 // but as of 1.8, $.ajax() always returns a jqXHR object. 2381 if ( this.xhr && this.xhr.statusText !== "canceled" ) { 2382 tab.addClass( "ui-tabs-loading" ); 2383 panel.attr( "aria-busy", "true" ); 2384 2385 this.xhr 2386 .done(function( response, status, jqXHR ) { 2387 // support: jQuery <1.8 2388 // http://bugs.jquery.com/ticket/11778 2389 setTimeout(function() { 2390 panel.html( response ); 2391 that._trigger( "load", event, eventData ); 2392 2393 complete( jqXHR, status ); 2394 }, 1 ); 2395 }) 2396 .fail(function( jqXHR, status ) { 2397 // support: jQuery <1.8 2398 // http://bugs.jquery.com/ticket/11778 2399 setTimeout(function() { 2400 complete( jqXHR, status ); 2401 }, 1 ); 2402 }); 2403 } 2404 }, 2405 2406 _ajaxSettings: function( anchor, event, eventData ) { 2407 var that = this; 2408 return { 2409 url: anchor.attr( "href" ), 2410 beforeSend: function( jqXHR, settings ) { 2411 return that._trigger( "beforeLoad", event, 2412 $.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) ); 2413 } 2414 }; 2415 }, 2416 2417 _getPanelForTab: function( tab ) { 2418 var id = $( tab ).attr( "aria-controls" ); 2419 return this.element.find( this._sanitizeSelector( "#" + id ) ); 2420 } 2421}); 2422 2423 2424/*! 2425 * jQuery UI Effects 1.11.4 2426 * http://jqueryui.com 2427 * 2428 * Copyright
vendor: 13,076 bytes, lines 2428-2962
2428 jQuery Foundation and other contributors 2429 * Released under the MIT license. 2430 * http://jquery.org/license 2431 * 2432 * http://api.jqueryui.com/category/effects-core/ 2433 */ 2434 2435 2436var dataSpace = "ui-effects-", 2437 2438 // Create a local jQuery because jQuery Color relies on it and the 2439 // global may not exist with AMD and a custom build (#10199) 2440 jQuery = $; 2441 2442$.effects = { 2443 effect: {} 2444}; 2445 2446/*! 2447 * jQuery Color Animations v2.1.2 2448 * https://github.com/jquery/jquery-color 2449 * 2450 * Copyright 2014 jQuery Foundation and other contributors 2451 * Released under the MIT license. 2452 * http://jquery.org/license 2453 * 2454 * Date: Wed Jan 16 08:47:09 2013 -0600 2455 */ 2456(function( jQuery, undefined ) { 2457 2458 var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", 2459 2460 // plusequals test for += 100 -= 100 2461 rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, 2462 // a set of RE's that can match strings and generate color tuples. 2463 stringParsers = [ { 2464 re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 2465 parse: function( execResult ) { 2466 return [ 2467 execResult[ 1 ], 2468 execResult[ 2 ], 2469 execResult[ 3 ], 2470 execResult[ 4 ] 2471 ]; 2472 } 2473 }, { 2474 re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 2475 parse: function( execResult ) { 2476 return [ 2477 execResult[ 1 ] * 2.55, 2478 execResult[ 2 ] * 2.55, 2479 execResult[ 3 ] * 2.55, 2480 execResult[ 4 ] 2481 ]; 2482 } 2483 }, { 2484 // this regex ignores A-F because it's compared against an already lowercased string 2485 re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, 2486 parse: function( execResult ) { 2487 return [ 2488 parseInt( execResult[ 1 ], 16 ), 2489 parseInt( execResult[ 2 ], 16 ), 2490 parseInt( execResult[ 3 ], 16 ) 2491 ]; 2492 } 2493 }, { 2494 // this regex ignores A-F because it's compared against an already lowercased string 2495 re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, 2496 parse: function( execResult ) { 2497 return [ 2498 parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), 2499 parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), 2500 parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) 2501 ]; 2502 } 2503 }, { 2504 re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 2505 space: "hsla", 2506 parse: function( execResult ) { 2507 return [ 2508 execResult[ 1 ], 2509 execResult[ 2 ] / 100, 2510 execResult[ 3 ] / 100, 2511 execResult[ 4 ] 2512 ]; 2513 } 2514 } ], 2515 2516 // jQuery.Color( ) 2517 color = jQuery.Color = function( color, green, blue, alpha ) { 2518 return new jQuery.Color.fn.parse( color, green, blue, alpha ); 2519 }, 2520 spaces = { 2521 rgba: { 2522 props: { 2523 red: { 2524 idx: 0, 2525 type: "byte" 2526 }, 2527 green: { 2528 idx: 1, 2529 type: "byte" 2530 }, 2531 blue: { 2532 idx: 2, 2533 type: "byte" 2534 } 2535 } 2536 }, 2537 2538 hsla: { 2539 props: { 2540 hue: { 2541 idx: 0, 2542 type: "degrees" 2543 }, 2544 saturation: { 2545 idx: 1, 2546 type: "percent" 2547 }, 2548 lightness: { 2549 idx: 2, 2550 type: "percent" 2551 } 2552 } 2553 } 2554 }, 2555 propTypes = { 2556 "byte": { 2557 floor: true, 2558 max: 255 2559 }, 2560 "percent": { 2561 max: 1 2562 }, 2563 "degrees": { 2564 mod: 360, 2565 floor: true 2566 } 2567 }, 2568 support = color.support = {}, 2569 2570 // element for support tests 2571 supportElem = jQuery( "<p>" )[ 0 ], 2572 2573 // colors = jQuery.Color.names 2574 colors, 2575 2576 // local aliases of functions called often 2577 each = jQuery.each; 2578 2579// determine rgba support immediately 2580supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; 2581support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; 2582 2583// define cache name and alpha properties 2584// for rgba and hsla spaces 2585each( spaces, function( spaceName, space ) { 2586 space.cache = "_" + spaceName; 2587 space.props.alpha = { 2588 idx: 3, 2589 type: "percent", 2590 def: 1 2591 }; 2592}); 2593 2594function clamp( value, prop, allowEmpty ) { 2595 var type = propTypes[ prop.type ] || {}; 2596 2597 if ( value == null ) { 2598 return (allowEmpty || !prop.def) ? null : prop.def; 2599 } 2600 2601 // ~~ is an short way of doing floor for positive numbers 2602 value = type.floor ? ~~value : parseFloat( value ); 2603 2604 // IE will pass in empty strings as value for alpha, 2605 // which will hit this case 2606 if ( isNaN( value ) ) { 2607 return prop.def; 2608 } 2609 2610 if ( type.mod ) { 2611 // we add mod before modding to make sure that negatives values 2612 // get converted properly: -10 -> 350 2613 return (value + type.mod) % type.mod; 2614 } 2615 2616 // for now all property types without mod have min and max 2617 return 0 > value ? 0 : type.max < value ? type.max : value; 2618} 2619 2620function stringParse( string ) { 2621 var inst = color(), 2622 rgba = inst._rgba = []; 2623 2624 string = string.toLowerCase(); 2625 2626 each( stringParsers, function( i, parser ) { 2627 var parsed, 2628 match = parser.re.exec( string ), 2629 values = match && parser.parse( match ), 2630 spaceName = parser.space || "rgba"; 2631 2632 if ( values ) { 2633 parsed = inst[ spaceName ]( values ); 2634 2635 // if this was an rgba parse the assignment might happen twice 2636 // oh well.... 2637 inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; 2638 rgba = inst._rgba = parsed._rgba; 2639 2640 // exit each( stringParsers ) here because we matched 2641 return false; 2642 } 2643 }); 2644 2645 // Found a stringParser that handled it 2646 if ( rgba.length ) { 2647 2648 // if this came from a parsed string, force "transparent" when alpha is 0 2649 // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) 2650 if ( rgba.join() === "0,0,0,0" ) { 2651 jQuery.extend( rgba, colors.transparent ); 2652 } 2653 return inst; 2654 } 2655 2656 // named colors 2657 return colors[ string ]; 2658} 2659 2660color.fn = jQuery.extend( color.prototype, { 2661 parse: function( red, green, blue, alpha ) { 2662 if ( red === undefined ) { 2663 this._rgba = [ null, null, null, null ]; 2664 return this; 2665 } 2666 if ( red.jquery || red.nodeType ) { 2667 red = jQuery( red ).css( green ); 2668 green = undefined; 2669 } 2670 2671 var inst = this, 2672 type = jQuery.type( red ), 2673 rgba = this._rgba = []; 2674 2675 // more than 1 argument specified - assume ( red, green, blue, alpha ) 2676 if ( green !== undefined ) { 2677 red = [ red, green, blue, alpha ]; 2678 type = "array"; 2679 } 2680 2681 if ( type === "string" ) { 2682 return this.parse( stringParse( red ) || colors._default ); 2683 } 2684 2685 if ( type === "array" ) { 2686 each( spaces.rgba.props, function( key, prop ) { 2687 rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); 2688 }); 2689 return this; 2690 } 2691 2692 if ( type === "object" ) { 2693 if ( red instanceof color ) { 2694 each( spaces, function( spaceName, space ) { 2695 if ( red[ space.cache ] ) { 2696 inst[ space.cache ] = red[ space.cache ].slice(); 2697 } 2698 }); 2699 } else { 2700 each( spaces, function( spaceName, space ) { 2701 var cache = space.cache; 2702 each( space.props, function( key, prop ) { 2703 2704 // if the cache doesn't exist, and we know how to convert 2705 if ( !inst[ cache ] && space.to ) { 2706 2707 // if the value was null, we don't need to copy it 2708 // if the key was alpha, we don't need to copy it either 2709 if ( key === "alpha" || red[ key ] == null ) { 2710 return; 2711 } 2712 inst[ cache ] = space.to( inst._rgba ); 2713 } 2714 2715 // this is the only case where we allow nulls for ALL properties. 2716 // call clamp with alwaysAllowEmpty 2717 inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); 2718 }); 2719 2720 // everything defined but alpha? 2721 if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { 2722 // use the default of 1 2723 inst[ cache ][ 3 ] = 1; 2724 if ( space.from ) { 2725 inst._rgba = space.from( inst[ cache ] ); 2726 } 2727 } 2728 }); 2729 } 2730 return this; 2731 } 2732 }, 2733 is: function( compare ) { 2734 var is = color( compare ), 2735 same = true, 2736 inst = this; 2737 2738 each( spaces, function( _, space ) { 2739 var localCache, 2740 isCache = is[ space.cache ]; 2741 if (isCache) { 2742 localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; 2743 each( space.props, function( _, prop ) { 2744 if ( isCache[ prop.idx ] != null ) { 2745 same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); 2746 return same; 2747 } 2748 }); 2749 } 2750 return same; 2751 }); 2752 return same; 2753 }, 2754 _space: function() { 2755 var used = [], 2756 inst = this; 2757 each( spaces, function( spaceName, space ) { 2758 if ( inst[ space.cache ] ) { 2759 used.push( spaceName ); 2760 } 2761 }); 2762 return used.pop(); 2763 }, 2764 transition: function( other, distance ) { 2765 var end = color( other ), 2766 spaceName = end._space(), 2767 space = spaces[ spaceName ], 2768 startColor = this.alpha() === 0 ? color( "transparent" ) : this, 2769 start = startColor[ space.cache ] || space.to( startColor._rgba ), 2770 result = start.slice(); 2771 2772 end = end[ space.cache ]; 2773 each( space.props, function( key, prop ) { 2774 var index = prop.idx, 2775 startValue = start[ index ], 2776 endValue = end[ index ], 2777 type = propTypes[ prop.type ] || {}; 2778 2779 // if null, don't override start value 2780 if ( endValue === null ) { 2781 return; 2782 } 2783 // if null - use end 2784 if ( startValue === null ) { 2785 result[ index ] = endValue; 2786 } else { 2787 if ( type.mod ) { 2788 if ( endValue - startValue > type.mod / 2 ) { 2789 startValue += type.mod; 2790 } else if ( startValue - endValue > type.mod / 2 ) { 2791 startValue -= type.mod; 2792 } 2793 } 2794 result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); 2795 } 2796 }); 2797 return this[ spaceName ]( result ); 2798 }, 2799 blend: function( opaque ) { 2800 // if we are already opaque - return ourself 2801 if ( this._rgba[ 3 ] === 1 ) { 2802 return this; 2803 } 2804 2805 var rgb = this._rgba.slice(), 2806 a = rgb.pop(), 2807 blend = color( opaque )._rgba; 2808 2809 return color( jQuery.map( rgb, function( v, i ) { 2810 return ( 1 - a ) * blend[ i ] + a * v; 2811 })); 2812 }, 2813 toRgbaString: function() { 2814 var prefix = "rgba(", 2815 rgba = jQuery.map( this._rgba, function( v, i ) { 2816 return v == null ? ( i > 2 ? 1 : 0 ) : v; 2817 }); 2818 2819 if ( rgba[ 3 ] === 1 ) { 2820 rgba.pop(); 2821 prefix = "rgb("; 2822 } 2823 2824 return prefix + rgba.join() + ")"; 2825 }, 2826 toHslaString: function() { 2827 var prefix = "hsla(", 2828 hsla = jQuery.map( this.hsla(), function( v, i ) { 2829 if ( v == null ) { 2830 v = i > 2 ? 1 : 0; 2831 } 2832 2833 // catch 1 and 2 2834 if ( i && i < 3 ) { 2835 v = Math.round( v * 100 ) + "%"; 2836 } 2837 return v; 2838 }); 2839 2840 if ( hsla[ 3 ] === 1 ) { 2841 hsla.pop(); 2842 prefix = "hsl("; 2843 } 2844 return prefix + hsla.join() + ")"; 2845 }, 2846 toHexString: function( includeAlpha ) { 2847 var rgba = this._rgba.slice(), 2848 alpha = rgba.pop(); 2849 2850 if ( includeAlpha ) { 2851 rgba.push( ~~( alpha * 255 ) ); 2852 } 2853 2854 return "#" + jQuery.map( rgba, function( v ) { 2855 2856 // default to 0 when nulls exist 2857 v = ( v || 0 ).toString( 16 ); 2858 return v.length === 1 ? "0" + v : v; 2859 }).join(""); 2860 }, 2861 toString: function() { 2862 return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); 2863 } 2864}); 2865color.fn.parse.prototype = color.fn; 2866 2867// hsla conversions adapted from: 2868// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021 2869 2870function hue2rgb( p, q, h ) { 2871 h = ( h + 1 ) % 1; 2872 if ( h * 6 < 1 ) { 2873 return p + ( q - p ) * h * 6; 2874 } 2875 if ( h * 2 < 1) { 2876 return q; 2877 } 2878 if ( h * 3 < 2 ) { 2879 return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6; 2880 } 2881 return p; 2882} 2883 2884spaces.hsla.to = function( rgba ) { 2885 if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { 2886 return [ null, null, null, rgba[ 3 ] ]; 2887 } 2888 var r = rgba[ 0 ] / 255, 2889 g = rgba[ 1 ] / 255, 2890 b = rgba[ 2 ] / 255, 2891 a = rgba[ 3 ], 2892 max = Math.max( r, g, b ), 2893 min = Math.min( r, g, b ), 2894 diff = max - min, 2895 add = max + min, 2896 l = add * 0.5, 2897 h, s; 2898 2899 if ( min === max ) { 2900 h = 0; 2901 } else if ( r === max ) { 2902 h = ( 60 * ( g - b ) / diff ) + 360; 2903 } else if ( g === max ) { 2904 h = ( 60 * ( b - r ) / diff ) + 120; 2905 } else { 2906 h = ( 60 * ( r - g ) / diff ) + 240; 2907 } 2908 2909 // chroma (diff) == 0 means greyscale which, by definition, saturation = 0% 2910 // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add) 2911 if ( diff === 0 ) { 2912 s = 0; 2913 } else if ( l <= 0.5 ) { 2914 s = diff / add; 2915 } else { 2916 s = diff / ( 2 - add ); 2917 } 2918 return [ Math.round(h) % 360, s, l, a == null ? 1 : a ]; 2919}; 2920 2921spaces.hsla.from = function( hsla ) { 2922 if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { 2923 return [ null, null, null, hsla[ 3 ] ]; 2924 } 2925 var h = hsla[ 0 ] / 360, 2926 s = hsla[ 1 ], 2927 l = hsla[ 2 ], 2928 a = hsla[ 3 ], 2929 q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, 2930 p = 2 * l - q; 2931 2932 return [ 2933 Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), 2934 Math.round( hue2rgb( p, q, h ) * 255 ), 2935 Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), 2936 a 2937 ]; 2938}; 2939 2940each( spaces, function( spaceName, space ) { 2941 var props = space.props, 2942 cache = space.cache, 2943 to = space.to, 2944 from = space.from; 2945 2946 // makes rgba() and hsla() 2947 color.fn[ spaceName ] = function( value ) { 2948 2949 // generate a cache for this space if it doesn't exist 2950 if ( to && !this[ cache ] ) { 2951 this[ cache ] = to( this._rgba ); 2952 } 2953 if ( value === undefined ) { 2954 return this[ cache ].slice(); 2955 } 2956 2957 var ret, 2958 type = jQuery.type( value ), 2959 arr = ( type === "array" || type === "object" ) ? value : arguments, 2960 local = this[ cache ].slice(); 2961 2962 each( props, function( key, prop ) {
vendor: 18,936 bytes, lines 2963-3716
2963 var val = arr[ type === "object" ? key : prop.idx ]; 2964 if ( val == null ) { 2965 val = local[ prop.idx ]; 2966 } 2967 local[ prop.idx ] = clamp( val, prop ); 2968 }); 2969 2970 if ( from ) { 2971 ret = color( from( local ) ); 2972 ret[ cache ] = local; 2973 return ret; 2974 } else { 2975 return color( local ); 2976 } 2977 }; 2978 2979 // makes red() green() blue() alpha() hue() saturation() lightness() 2980 each( props, function( key, prop ) { 2981 // alpha is included in more than one space 2982 if ( color.fn[ key ] ) { 2983 return; 2984 } 2985 color.fn[ key ] = function( value ) { 2986 var vtype = jQuery.type( value ), 2987 fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ), 2988 local = this[ fn ](), 2989 cur = local[ prop.idx ], 2990 match; 2991 2992 if ( vtype === "undefined" ) { 2993 return cur; 2994 } 2995 2996 if ( vtype === "function" ) { 2997 value = value.call( this, cur ); 2998 vtype = jQuery.type( value ); 2999 } 3000 if ( value == null && prop.empty ) { 3001 return this; 3002 } 3003 if ( vtype === "string" ) { 3004 match = rplusequals.exec( value ); 3005 if ( match ) { 3006 value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); 3007 } 3008 } 3009 local[ prop.idx ] = value; 3010 return this[ fn ]( local ); 3011 }; 3012 }); 3013}); 3014 3015// add cssHook and .fx.step function for each named hook. 3016// accept a space separated string of properties 3017color.hook = function( hook ) { 3018 var hooks = hook.split( " " ); 3019 each( hooks, function( i, hook ) { 3020 jQuery.cssHooks[ hook ] = { 3021 set: function( elem, value ) { 3022 var parsed, curElem, 3023 backgroundColor = ""; 3024 3025 if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) { 3026 value = color( parsed || value ); 3027 if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { 3028 curElem = hook === "backgroundColor" ? elem.parentNode : elem; 3029 while ( 3030 (backgroundColor === "" || backgroundColor === "transparent") && 3031 curElem && curElem.style 3032 ) { 3033 try { 3034 backgroundColor = jQuery.css( curElem, "backgroundColor" ); 3035 curElem = curElem.parentNode; 3036 } catch ( e ) { 3037 } 3038 } 3039 3040 value = value.blend( backgroundColor && backgroundColor !== "transparent" ? 3041 backgroundColor : 3042 "_default" ); 3043 } 3044 3045 value = value.toRgbaString(); 3046 } 3047 try { 3048 elem.style[ hook ] = value; 3049 } catch ( e ) { 3050 // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit' 3051 } 3052 } 3053 }; 3054 jQuery.fx.step[ hook ] = function( fx ) { 3055 if ( !fx.colorInit ) { 3056 fx.start = color( fx.elem, hook ); 3057 fx.end = color( fx.end ); 3058 fx.colorInit = true; 3059 } 3060 jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); 3061 }; 3062 }); 3063 3064}; 3065 3066color.hook( stepHooks ); 3067 3068jQuery.cssHooks.borderColor = { 3069 expand: function( value ) { 3070 var expanded = {}; 3071 3072 each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) { 3073 expanded[ "border" + part + "Color" ] = value; 3074 }); 3075 return expanded; 3076 } 3077}; 3078 3079// Basic color names only. 3080// Usage of any of the other color names requires adding yourself or including 3081// jquery.color.svg-names.js. 3082colors = jQuery.Color.names = { 3083 // 4.1. Basic color keywords 3084 aqua: "#00ffff", 3085 black: "#000000", 3086 blue: "#0000ff", 3087 fuchsia: "#ff00ff", 3088 gray: "#808080", 3089 green: "#008000", 3090 lime: "#00ff00", 3091 maroon: "#800000", 3092 navy: "#000080", 3093 olive: "#808000", 3094 purple: "#800080", 3095 red: "#ff0000", 3096 silver: "#c0c0c0", 3097 teal: "#008080", 3098 white: "#ffffff", 3099 yellow: "#ffff00", 3100 3101 // 4.2.3. "transparent" color keyword 3102 transparent: [ null, null, null, 0 ], 3103 3104 _default: "#ffffff" 3105}; 3106 3107})( jQuery ); 3108 3109/******************************************************************************/ 3110/****************************** CLASS ANIMATIONS ******************************/ 3111/******************************************************************************/ 3112(function() { 3113 3114var classAnimationActions = [ "add", "remove", "toggle" ], 3115 shorthandStyles = { 3116 border: 1, 3117 borderBottom: 1, 3118 borderColor: 1, 3119 borderLeft: 1, 3120 borderRight: 1, 3121 borderTop: 1, 3122 borderWidth: 1, 3123 margin: 1, 3124 padding: 1 3125 }; 3126 3127$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) { 3128 $.fx.step[ prop ] = function( fx ) { 3129 if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { 3130 jQuery.style( fx.elem, prop, fx.end ); 3131 fx.setAttr = true; 3132 } 3133 }; 3134}); 3135 3136function getElementStyles( elem ) { 3137 var key, len, 3138 style = elem.ownerDocument.defaultView ? 3139 elem.ownerDocument.defaultView.getComputedStyle( elem, null ) : 3140 elem.currentStyle, 3141 styles = {}; 3142 3143 if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { 3144 len = style.length; 3145 while ( len-- ) { 3146 key = style[ len ]; 3147 if ( typeof style[ key ] === "string" ) { 3148 styles[ $.camelCase( key ) ] = style[ key ]; 3149 } 3150 } 3151 // support: Opera, IE <9 3152 } else { 3153 for ( key in style ) { 3154 if ( typeof style[ key ] === "string" ) { 3155 styles[ key ] = style[ key ]; 3156 } 3157 } 3158 } 3159 3160 return styles; 3161} 3162 3163function styleDifference( oldStyle, newStyle ) { 3164 var diff = {}, 3165 name, value; 3166 3167 for ( name in newStyle ) { 3168 value = newStyle[ name ]; 3169 if ( oldStyle[ name ] !== value ) { 3170 if ( !shorthandStyles[ name ] ) { 3171 if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) { 3172 diff[ name ] = value; 3173 } 3174 } 3175 } 3176 } 3177 3178 return diff; 3179} 3180 3181// support: jQuery <1.8 3182if ( !$.fn.addBack ) { 3183 $.fn.addBack = function( selector ) { 3184 return this.add( selector == null ? 3185 this.prevObject : this.prevObject.filter( selector ) 3186 ); 3187 }; 3188} 3189 3190$.effects.animateClass = function( value, duration, easing, callback ) { 3191 var o = $.speed( duration, easing, callback ); 3192 3193 return this.queue( function() { 3194 var animated = $( this ), 3195 baseClass = animated.attr( "class" ) || "", 3196 applyClassChange, 3197 allAnimations = o.children ? animated.find( "*" ).addBack() : animated; 3198 3199 // map the animated objects to store the original styles. 3200 allAnimations = allAnimations.map(function() { 3201 var el = $( this ); 3202 return { 3203 el: el, 3204 start: getElementStyles( this ) 3205 }; 3206 }); 3207 3208 // apply class change 3209 applyClassChange = function() { 3210 $.each( classAnimationActions, function(i, action) { 3211 if ( value[ action ] ) { 3212 animated[ action + "Class" ]( value[ action ] ); 3213 } 3214 }); 3215 }; 3216 applyClassChange(); 3217 3218 // map all animated objects again - calculate new styles and diff 3219 allAnimations = allAnimations.map(function() { 3220 this.end = getElementStyles( this.el[ 0 ] ); 3221 this.diff = styleDifference( this.start, this.end ); 3222 return this; 3223 }); 3224 3225 // apply original class 3226 animated.attr( "class", baseClass ); 3227 3228 // map all animated objects again - this time collecting a promise 3229 allAnimations = allAnimations.map(function() { 3230 var styleInfo = this, 3231 dfd = $.Deferred(), 3232 opts = $.extend({}, o, { 3233 queue: false, 3234 complete: function() { 3235 dfd.resolve( styleInfo ); 3236 } 3237 }); 3238 3239 this.el.animate( this.diff, opts ); 3240 return dfd.promise(); 3241 }); 3242 3243 // once all animations have completed: 3244 $.when.apply( $, allAnimations.get() ).done(function() { 3245 3246 // set the final class 3247 applyClassChange(); 3248 3249 // for each animated element, 3250 // clear all css properties that were animated 3251 $.each( arguments, function() { 3252 var el = this.el; 3253 $.each( this.diff, function(key) { 3254 el.css( key, "" ); 3255 }); 3256 }); 3257 3258 // this is guarnteed to be there if you use jQuery.speed() 3259 // it also handles dequeuing the next anim... 3260 o.complete.call( animated[ 0 ] ); 3261 }); 3262 }); 3263}; 3264 3265$.fn.extend({ 3266 addClass: (function( orig ) { 3267 return function( classNames, speed, easing, callback ) { 3268 return speed ? 3269 $.effects.animateClass.call( this, 3270 { add: classNames }, speed, easing, callback ) : 3271 orig.apply( this, arguments ); 3272 }; 3273 })( $.fn.addClass ), 3274 3275 removeClass: (function( orig ) { 3276 return function( classNames, speed, easing, callback ) { 3277 return arguments.length > 1 ? 3278 $.effects.animateClass.call( this, 3279 { remove: classNames }, speed, easing, callback ) : 3280 orig.apply( this, arguments ); 3281 }; 3282 })( $.fn.removeClass ), 3283 3284 toggleClass: (function( orig ) { 3285 return function( classNames, force, speed, easing, callback ) { 3286 if ( typeof force === "boolean" || force === undefined ) { 3287 if ( !speed ) { 3288 // without speed parameter 3289 return orig.apply( this, arguments ); 3290 } else { 3291 return $.effects.animateClass.call( this, 3292 (force ? { add: classNames } : { remove: classNames }), 3293 speed, easing, callback ); 3294 } 3295 } else { 3296 // without force parameter 3297 return $.effects.animateClass.call( this, 3298 { toggle: classNames }, force, speed, easing ); 3299 } 3300 }; 3301 })( $.fn.toggleClass ), 3302 3303 switchClass: function( remove, add, speed, easing, callback) { 3304 return $.effects.animateClass.call( this, { 3305 add: add, 3306 remove: remove 3307 }, speed, easing, callback ); 3308 } 3309}); 3310 3311})(); 3312 3313/******************************************************************************/ 3314/*********************************** EFFECTS **********************************/ 3315/******************************************************************************/ 3316 3317(function() { 3318 3319$.extend( $.effects, { 3320 version: "1.11.4", 3321 3322 // Saves a set of properties in a data storage 3323 save: function( element, set ) { 3324 for ( var i = 0; i < set.length; i++ ) { 3325 if ( set[ i ] !== null ) { 3326 element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] ); 3327 } 3328 } 3329 }, 3330 3331 // Restores a set of previously saved properties from a data storage 3332 restore: function( element, set ) { 3333 var val, i; 3334 for ( i = 0; i < set.length; i++ ) { 3335 if ( set[ i ] !== null ) { 3336 val = element.data( dataSpace + set[ i ] ); 3337 // support: jQuery 1.6.2 3338 // http://bugs.jquery.com/ticket/9917 3339 // jQuery 1.6.2 incorrectly returns undefined for any falsy value. 3340 // We can't differentiate between "" and 0 here, so we just assume 3341 // empty string since it's likely to be a more common value... 3342 if ( val === undefined ) { 3343 val = ""; 3344 } 3345 element.css( set[ i ], val ); 3346 } 3347 } 3348 }, 3349 3350 setMode: function( el, mode ) { 3351 if (mode === "toggle") { 3352 mode = el.is( ":hidden" ) ? "show" : "hide"; 3353 } 3354 return mode; 3355 }, 3356 3357 // Translates a [top,left] array into a baseline value 3358 // this should be a little more flexible in the future to handle a string & hash 3359 getBaseline: function( origin, original ) { 3360 var y, x; 3361 switch ( origin[ 0 ] ) { 3362 case "top": y = 0; break; 3363 case "middle": y = 0.5; break; 3364 case "bottom": y = 1; break; 3365 default: y = origin[ 0 ] / original.height; 3366 } 3367 switch ( origin[ 1 ] ) { 3368 case "left": x = 0; break; 3369 case "center": x = 0.5; break; 3370 case "right": x = 1; break; 3371 default: x = origin[ 1 ] / original.width; 3372 } 3373 return { 3374 x: x, 3375 y: y 3376 }; 3377 }, 3378 3379 // Wraps the element around a wrapper that copies position properties 3380 createWrapper: function( element ) { 3381 3382 // if the element is already wrapped, return it 3383 if ( element.parent().is( ".ui-effects-wrapper" )) { 3384 return element.parent(); 3385 } 3386 3387 // wrap the element 3388 var props = { 3389 width: element.outerWidth(true), 3390 height: element.outerHeight(true), 3391 "float": element.css( "float" ) 3392 }, 3393 wrapper = $( "<div></div>" ) 3394 .addClass( "ui-effects-wrapper" ) 3395 .css({ 3396 fontSize: "100%", 3397 background: "transparent", 3398 border: "none", 3399 margin: 0, 3400 padding: 0 3401 }), 3402 // Store the size in case width/height are defined in % - Fixes #5245 3403 size = { 3404 width: element.width(), 3405 height: element.height() 3406 }, 3407 active = document.activeElement; 3408 3409 // support: Firefox 3410 // Firefox incorrectly exposes anonymous content 3411 // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 3412 try { 3413 active.id; 3414 } catch ( e ) { 3415 active = document.body; 3416 } 3417 3418 element.wrap( wrapper ); 3419 3420 // Fixes #7595 - Elements lose focus when wrapped. 3421 if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { 3422 $( active ).focus(); 3423 } 3424 3425 wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element 3426 3427 // transfer positioning properties to the wrapper 3428 if ( element.css( "position" ) === "static" ) { 3429 wrapper.css({ position: "relative" }); 3430 element.css({ position: "relative" }); 3431 } else { 3432 $.extend( props, { 3433 position: element.css( "position" ), 3434 zIndex: element.css( "z-index" ) 3435 }); 3436 $.each([ "top", "left", "bottom", "right" ], function(i, pos) { 3437 props[ pos ] = element.css( pos ); 3438 if ( isNaN( parseInt( props[ pos ], 10 ) ) ) { 3439 props[ pos ] = "auto"; 3440 } 3441 }); 3442 element.css({ 3443 position: "relative", 3444 top: 0, 3445 left: 0, 3446 right: "auto", 3447 bottom: "auto" 3448 }); 3449 } 3450 element.css(size); 3451 3452 return wrapper.css( props ).show(); 3453 }, 3454 3455 removeWrapper: function( element ) { 3456 var active = document.activeElement; 3457 3458 if ( element.parent().is( ".ui-effects-wrapper" ) ) { 3459 element.parent().replaceWith( element ); 3460 3461 // Fixes #7595 - Elements lose focus when wrapped. 3462 if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { 3463 $( active ).focus(); 3464 } 3465 } 3466 3467 return element; 3468 }, 3469 3470 setTransition: function( element, list, factor, value ) { 3471 value = value || {}; 3472 $.each( list, function( i, x ) { 3473 var unit = element.cssUnit( x ); 3474 if ( unit[ 0 ] > 0 ) { 3475 value[ x ] = unit[ 0 ] * factor + unit[ 1 ]; 3476 } 3477 }); 3478 return value; 3479 } 3480}); 3481 3482// return an effect options object for the given parameters: 3483function _normalizeArguments( effect, options, speed, callback ) { 3484 3485 // allow passing all options as the first parameter 3486 if ( $.isPlainObject( effect ) ) { 3487 options = effect; 3488 effect = effect.effect; 3489 } 3490 3491 // convert to an object 3492 effect = { effect: effect }; 3493 3494 // catch (effect, null, ...) 3495 if ( options == null ) { 3496 options = {}; 3497 } 3498 3499 // catch (effect, callback) 3500 if ( $.isFunction( options ) ) { 3501 callback = options; 3502 speed = null; 3503 options = {}; 3504 } 3505 3506 // catch (effect, speed, ?) 3507 if ( typeof options === "number" || $.fx.speeds[ options ] ) { 3508 callback = speed; 3509 speed = options; 3510 options = {}; 3511 } 3512 3513 // catch (effect, options, callback) 3514 if ( $.isFunction( speed ) ) { 3515 callback = speed; 3516 speed = null; 3517 } 3518 3519 // add options to effect 3520 if ( options ) { 3521 $.extend( effect, options ); 3522 } 3523 3524 speed = speed || options.duration; 3525 effect.duration = $.fx.off ? 0 : 3526 typeof speed === "number" ? speed : 3527 speed in $.fx.speeds ? $.fx.speeds[ speed ] : 3528 $.fx.speeds._default; 3529 3530 effect.complete = callback || options.complete; 3531 3532 return effect; 3533} 3534 3535function standardAnimationOption( option ) { 3536 // Valid standard speeds (nothing, number, named speed) 3537 if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) { 3538 return true; 3539 } 3540 3541 // Invalid strings - treat as "normal" speed 3542 if ( typeof option === "string" && !$.effects.effect[ option ] ) { 3543 return true; 3544 } 3545 3546 // Complete callback 3547 if ( $.isFunction( option ) ) { 3548 return true; 3549 } 3550 3551 // Options hash (but not naming an effect) 3552 if ( typeof option === "object" && !option.effect ) { 3553 return true; 3554 } 3555 3556 // Didn't match any standard API 3557 return false; 3558} 3559 3560$.fn.extend({ 3561 effect: function( /* effect, options, speed, callback */ ) { 3562 var args = _normalizeArguments.apply( this, arguments ), 3563 mode = args.mode, 3564 queue = args.queue, 3565 effectMethod = $.effects.effect[ args.effect ]; 3566 3567 if ( $.fx.off || !effectMethod ) { 3568 // delegate to the original method (e.g., .show()) if possible 3569 if ( mode ) { 3570 return this[ mode ]( args.duration, args.complete ); 3571 } else { 3572 return this.each( function() { 3573 if ( args.complete ) { 3574 args.complete.call( this ); 3575 } 3576 }); 3577 } 3578 } 3579 3580 function run( next ) { 3581 var elem = $( this ), 3582 complete = args.complete, 3583 mode = args.mode; 3584 3585 function done() { 3586 if ( $.isFunction( complete ) ) { 3587 complete.call( elem[0] ); 3588 } 3589 if ( $.isFunction( next ) ) { 3590 next(); 3591 } 3592 } 3593 3594 // If the element already has the correct final state, delegate to 3595 // the core methods so the internal tracking of "olddisplay" works. 3596 if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) { 3597 elem[ mode ](); 3598 done(); 3599 } else { 3600 effectMethod.call( elem[0], args, done ); 3601 } 3602 } 3603 3604 return queue === false ? this.each( run ) : this.queue( queue || "fx", run ); 3605 }, 3606 3607 show: (function( orig ) { 3608 return function( option ) { 3609 if ( standardAnimationOption( option ) ) { 3610 return orig.apply( this, arguments ); 3611 } else { 3612 var args = _normalizeArguments.apply( this, arguments ); 3613 args.mode = "show"; 3614 return this.effect.call( this, args ); 3615 } 3616 }; 3617 })( $.fn.show ), 3618 3619 hide: (function( orig ) { 3620 return function( option ) { 3621 if ( standardAnimationOption( option ) ) { 3622 return orig.apply( this, arguments ); 3623 } else { 3624 var args = _normalizeArguments.apply( this, arguments ); 3625 args.mode = "hide"; 3626 return this.effect.call( this, args ); 3627 } 3628 }; 3629 })( $.fn.hide ), 3630 3631 toggle: (function( orig ) { 3632 return function( option ) { 3633 if ( standardAnimationOption( option ) || typeof option === "boolean" ) { 3634 return orig.apply( this, arguments ); 3635 } else { 3636 var args = _normalizeArguments.apply( this, arguments ); 3637 args.mode = "toggle"; 3638 return this.effect.call( this, args ); 3639 } 3640 }; 3641 })( $.fn.toggle ), 3642 3643 // helper functions 3644 cssUnit: function(key) { 3645 var style = this.css( key ), 3646 val = []; 3647 3648 $.each( [ "em", "px", "%", "pt" ], function( i, unit ) { 3649 if ( style.indexOf( unit ) > 0 ) { 3650 val = [ parseFloat( style ), unit ]; 3651 } 3652 }); 3653 return val; 3654 } 3655}); 3656 3657})(); 3658 3659/******************************************************************************/ 3660/*********************************** EASING ***********************************/ 3661/******************************************************************************/ 3662 3663(function() { 3664 3665// based on easing equations from Robert Penner (http://www.robertpenner.com/easing) 3666 3667var baseEasings = {}; 3668 3669$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) { 3670 baseEasings[ name ] = function( p ) { 3671 return Math.pow( p, i + 2 ); 3672 }; 3673}); 3674 3675$.extend( baseEasings, { 3676 Sine: function( p ) { 3677 return 1 - Math.cos( p * Math.PI / 2 ); 3678 }, 3679 Circ: function( p ) { 3680 return 1 - Math.sqrt( 1 - p * p ); 3681 }, 3682 Elastic: function( p ) { 3683 return p === 0 || p === 1 ? p : 3684 -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 ); 3685 }, 3686 Back: function( p ) { 3687 return p * p * ( 3 * p - 2 ); 3688 }, 3689 Bounce: function( p ) { 3690 var pow2, 3691 bounce = 4; 3692 3693 while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} 3694 return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); 3695 } 3696}); 3697 3698$.each( baseEasings, function( name, easeIn ) { 3699 $.easing[ "easeIn" + name ] = easeIn; 3700 $.easing[ "easeOut" + name ] = function( p ) { 3701 return 1 - easeIn( 1 - p ); 3702 }; 3703 $.easing[ "easeInOut" + name ] = function( p ) { 3704 return p < 0.5 ? 3705 easeIn( p * 2 ) / 2 : 3706 1 - easeIn( p * -2 + 2 ) / 2; 3707 }; 3708}); 3709 3710})(); 3711 3712var effect = $.effects; 3713 3714 3715/*! 3716 * jQuery UI Effects
3716Fade 1.11.4 3717 * http://jqueryui.com 3718 * 3719 * Copyright jQuery Foundation and other contributors 3720 * Released under the MIT license. 3721 * http://jquery.org/license 3722 * 3723 * http://api.jqueryui.com/fade-effect/ 3724 */ 3725 3726 3727var effectFade = $.effects.effect.fade = function( o, done ) { 3728 var el = $( this ), 3729 mode = $.effects.setMode( el, o.mode || "toggle" ); 3730 3731 el.animate({ 3732 opacity: mode 3733 }, { 3734 queue: false, 3735 duration: o.duration, 3736 easing: o.easing,
vendor: 1,441 bytes, lines 3737-3804
3737 complete: done 3738 }); 3739}; 3740 3741 3742/*! 3743 * jQuery UI Effects Slide 1.11.4 3744 * http://jqueryui.com 3745 * 3746 * Copyright jQuery Foundation and other contributors 3747 * Released under the MIT license. 3748 * http://jquery.org/license 3749 * 3750 * http://api.jqueryui.com/slide-effect/ 3751 */ 3752 3753 3754var effectSlide = $.effects.effect.slide = function( o, done ) { 3755 3756 // Create element 3757 var el = $( this ), 3758 props = [ "position", "top", "bottom", "left", "right", "width", "height" ], 3759 mode = $.effects.setMode( el, o.mode || "show" ), 3760 show = mode === "show", 3761 direction = o.direction || "left", 3762 ref = (direction === "up" || direction === "down") ? "top" : "left", 3763 positiveMotion = (direction === "up" || direction === "left"), 3764 distance, 3765 animation = {}; 3766 3767 // Adjust 3768 $.effects.save( el, props ); 3769 el.show(); 3770 distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ); 3771 3772 $.effects.createWrapper( el ).css({ 3773 overflow: "hidden" 3774 }); 3775 3776 if ( show ) { 3777 el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance ); 3778 } 3779 3780 // Animation 3781 animation[ ref ] = ( show ? 3782 ( positiveMotion ? "+=" : "-=") : 3783 ( positiveMotion ? "-=" : "+=")) + 3784 distance; 3785 3786 // Animate 3787 el.animate( animation, { 3788 queue: false, 3789 duration: o.duration, 3790 easing: o.easing, 3791 complete: function() { 3792 if ( mode === "hide" ) { 3793 el.hide(); 3794 } 3795 $.effects.restore( el, props ); 3796 $.effects.removeWrapper( el ); 3797 done(); 3798 } 3799 }); 3800}; 3801 3802 3803 3804}));
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.