1/*! jQuery UI - v1.12.1 - 2017-12-05 2* http://jqueryui.com 3* Includes: effect.js 4* Copyright 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$.ui = $.ui || {}; 19 20var version = $.ui.version = "1.12.1"
vendor: 40,553 bytes, lines 20-1647
20; 21 22 23/*! 24 * jQuery UI Effects 1.12.1 25 * http://jqueryui.com 26 * 27 * Copyright jQuery Foundation and other contributors 28 * Released under the MIT license. 29 * http://jquery.org/license 30 */ 31 32//>>label: Effects Core 33//>>group: Effects 34// jscs:disable maximumLineLength 35//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects. 36// jscs:enable maximumLineLength 37//>>docs: http://api.jqueryui.com/category/effects-core/ 38//>>demos: http://jqueryui.com/effect/ 39 40 41 42var dataSpace = "ui-effects-", 43 dataSpaceStyle = "ui-effects-style", 44 dataSpaceAnimated = "ui-effects-animated", 45 46 // Create a local jQuery because jQuery Color relies on it and the 47 // global may not exist with AMD and a custom build (#10199) 48 jQuery = $; 49 50$.effects = { 51 effect: {} 52}; 53 54/*! 55 * jQuery Color Animations v2.1.2 56 * https://github.com/jquery/jquery-color 57 * 58 * Copyright 2014 jQuery Foundation and other contributors 59 * Released under the MIT license. 60 * http://jquery.org/license 61 * 62 * Date: Wed Jan 16 08:47:09 2013 -0600 63 */ 64( function( jQuery, undefined ) { 65 66 var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " + 67 "borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", 68 69 // Plusequals test for += 100 -= 100 70 rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, 71 72 // A set of RE's that can match strings and generate color tuples. 73 stringParsers = [ { 74 re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 75 parse: function( execResult ) { 76 return [ 77 execResult[ 1 ], 78 execResult[ 2 ], 79 execResult[ 3 ], 80 execResult[ 4 ] 81 ]; 82 } 83 }, { 84 re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 85 parse: function( execResult ) { 86 return [ 87 execResult[ 1 ] * 2.55, 88 execResult[ 2 ] * 2.55, 89 execResult[ 3 ] * 2.55, 90 execResult[ 4 ] 91 ]; 92 } 93 }, { 94 95 // This regex ignores A-F because it's compared against an already lowercased string 96 re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, 97 parse: function( execResult ) { 98 return [ 99 parseInt( execResult[ 1 ], 16 ), 100 parseInt( execResult[ 2 ], 16 ), 101 parseInt( execResult[ 3 ], 16 ) 102 ]; 103 } 104 }, { 105 106 // This regex ignores A-F because it's compared against an already lowercased string 107 re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, 108 parse: function( execResult ) { 109 return [ 110 parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), 111 parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), 112 parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) 113 ]; 114 } 115 }, { 116 re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 117 space: "hsla", 118 parse: function( execResult ) { 119 return [ 120 execResult[ 1 ], 121 execResult[ 2 ] / 100, 122 execResult[ 3 ] / 100, 123 execResult[ 4 ] 124 ]; 125 } 126 } ], 127 128 // JQuery.Color( ) 129 color = jQuery.Color = function( color, green, blue, alpha ) { 130 return new jQuery.Color.fn.parse( color, green, blue, alpha ); 131 }, 132 spaces = { 133 rgba: { 134 props: { 135 red: { 136 idx: 0, 137 type: "byte" 138 }, 139 green: { 140 idx: 1, 141 type: "byte" 142 }, 143 blue: { 144 idx: 2, 145 type: "byte" 146 } 147 } 148 }, 149 150 hsla: { 151 props: { 152 hue: { 153 idx: 0, 154 type: "degrees" 155 }, 156 saturation: { 157 idx: 1, 158 type: "percent" 159 }, 160 lightness: { 161 idx: 2, 162 type: "percent" 163 } 164 } 165 } 166 }, 167 propTypes = { 168 "byte": { 169 floor: true, 170 max: 255 171 }, 172 "percent": { 173 max: 1 174 }, 175 "degrees": { 176 mod: 360, 177 floor: true 178 } 179 }, 180 support = color.support = {}, 181 182 // Element for support tests 183 supportElem = jQuery( "<p>" )[ 0 ], 184 185 // Colors = jQuery.Color.names 186 colors, 187 188 // Local aliases of functions called often 189 each = jQuery.each; 190 191// Determine rgba support immediately 192supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; 193support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; 194 195// Define cache name and alpha properties 196// for rgba and hsla spaces 197each( spaces, function( spaceName, space ) { 198 space.cache = "_" + spaceName; 199 space.props.alpha = { 200 idx: 3, 201 type: "percent", 202 def: 1 203 }; 204} ); 205 206function clamp( value, prop, allowEmpty ) { 207 var type = propTypes[ prop.type ] || {}; 208 209 if ( value == null ) { 210 return ( allowEmpty || !prop.def ) ? null : prop.def; 211 } 212 213 // ~~ is an short way of doing floor for positive numbers 214 value = type.floor ? ~~value : parseFloat( value ); 215 216 // IE will pass in empty strings as value for alpha, 217 // which will hit this case 218 if ( isNaN( value ) ) { 219 return prop.def; 220 } 221 222 if ( type.mod ) { 223 224 // We add mod before modding to make sure that negatives values 225 // get converted properly: -10 -> 350 226 return ( value + type.mod ) % type.mod; 227 } 228 229 // For now all property types without mod have min and max 230 return 0 > value ? 0 : type.max < value ? type.max : value; 231} 232 233function stringParse( string ) { 234 var inst = color(), 235 rgba = inst._rgba = []; 236 237 string = string.toLowerCase(); 238 239 each( stringParsers, function( i, parser ) { 240 var parsed, 241 match = parser.re.exec( string ), 242 values = match && parser.parse( match ), 243 spaceName = parser.space || "rgba"; 244 245 if ( values ) { 246 parsed = inst[ spaceName ]( values ); 247 248 // If this was an rgba parse the assignment might happen twice 249 // oh well.... 250 inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; 251 rgba = inst._rgba = parsed._rgba; 252 253 // Exit each( stringParsers ) here because we matched 254 return false; 255 } 256 } ); 257 258 // Found a stringParser that handled it 259 if ( rgba.length ) { 260 261 // If this came from a parsed string, force "transparent" when alpha is 0 262 // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) 263 if ( rgba.join() === "0,0,0,0" ) { 264 jQuery.extend( rgba, colors.transparent ); 265 } 266 return inst; 267 } 268 269 // Named colors 270 return colors[ string ]; 271} 272 273color.fn = jQuery.extend( color.prototype, { 274 parse: function( red, green, blue, alpha ) { 275 if ( red === undefined ) { 276 this._rgba = [ null, null, null, null ]; 277 return this; 278 } 279 if ( red.jquery || red.nodeType ) { 280 red = jQuery( red ).css( green ); 281 green = undefined; 282 } 283 284 var inst = this, 285 type = jQuery.type( red ), 286 rgba = this._rgba = []; 287 288 // More than 1 argument specified - assume ( red, green, blue, alpha ) 289 if ( green !== undefined ) { 290 red = [ red, green, blue, alpha ]; 291 type = "array"; 292 } 293 294 if ( type === "string" ) { 295 return this.parse( stringParse( red ) || colors._default ); 296 } 297 298 if ( type === "array" ) { 299 each( spaces.rgba.props, function( key, prop ) { 300 rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); 301 } ); 302 return this; 303 } 304 305 if ( type === "object" ) { 306 if ( red instanceof color ) { 307 each( spaces, function( spaceName, space ) { 308 if ( red[ space.cache ] ) { 309 inst[ space.cache ] = red[ space.cache ].slice(); 310 } 311 } ); 312 } else { 313 each( spaces, function( spaceName, space ) { 314 var cache = space.cache; 315 each( space.props, function( key, prop ) { 316 317 // If the cache doesn't exist, and we know how to convert 318 if ( !inst[ cache ] && space.to ) { 319 320 // If the value was null, we don't need to copy it 321 // if the key was alpha, we don't need to copy it either 322 if ( key === "alpha" || red[ key ] == null ) { 323 return; 324 } 325 inst[ cache ] = space.to( inst._rgba ); 326 } 327 328 // This is the only case where we allow nulls for ALL properties. 329 // call clamp with alwaysAllowEmpty 330 inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); 331 } ); 332 333 // Everything defined but alpha? 334 if ( inst[ cache ] && 335 jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { 336 337 // Use the default of 1 338 inst[ cache ][ 3 ] = 1; 339 if ( space.from ) { 340 inst._rgba = space.from( inst[ cache ] ); 341 } 342 } 343 } ); 344 } 345 return this; 346 } 347 }, 348 is: function( compare ) { 349 var is = color( compare ), 350 same = true, 351 inst = this; 352 353 each( spaces, function( _, space ) { 354 var localCache, 355 isCache = is[ space.cache ]; 356 if ( isCache ) { 357 localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; 358 each( space.props, function( _, prop ) { 359 if ( isCache[ prop.idx ] != null ) { 360 same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); 361 return same; 362 } 363 } ); 364 } 365 return same; 366 } ); 367 return same; 368 }, 369 _space: function() { 370 var used = [], 371 inst = this; 372 each( spaces, function( spaceName, space ) { 373 if ( inst[ space.cache ] ) { 374 used.push( spaceName ); 375 } 376 } ); 377 return used.pop(); 378 }, 379 transition: function( other, distance ) { 380 var end = color( other ), 381 spaceName = end._space(), 382 space = spaces[ spaceName ], 383 startColor = this.alpha() === 0 ? color( "transparent" ) : this, 384 start = startColor[ space.cache ] || space.to( startColor._rgba ), 385 result = start.slice(); 386 387 end = end[ space.cache ]; 388 each( space.props, function( key, prop ) { 389 var index = prop.idx, 390 startValue = start[ index ], 391 endValue = end[ index ], 392 type = propTypes[ prop.type ] || {}; 393 394 // If null, don't override start value 395 if ( endValue === null ) { 396 return; 397 } 398 399 // If null - use end 400 if ( startValue === null ) { 401 result[ index ] = endValue; 402 } else { 403 if ( type.mod ) { 404 if ( endValue - startValue > type.mod / 2 ) { 405 startValue += type.mod; 406 } else if ( startValue - endValue > type.mod / 2 ) { 407 startValue -= type.mod; 408 } 409 } 410 result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); 411 } 412 } ); 413 return this[ spaceName ]( result ); 414 }, 415 blend: function( opaque ) { 416 417 // If we are already opaque - return ourself 418 if ( this._rgba[ 3 ] === 1 ) { 419 return this; 420 } 421 422 var rgb = this._rgba.slice(), 423 a = rgb.pop(), 424 blend = color( opaque )._rgba; 425 426 return color( jQuery.map( rgb, function( v, i ) { 427 return ( 1 - a ) * blend[ i ] + a * v; 428 } ) ); 429 }, 430 toRgbaString: function() { 431 var prefix = "rgba(", 432 rgba = jQuery.map( this._rgba, function( v, i ) { 433 return v == null ? ( i > 2 ? 1 : 0 ) : v; 434 } ); 435 436 if ( rgba[ 3 ] === 1 ) { 437 rgba.pop(); 438 prefix = "rgb("; 439 } 440 441 return prefix + rgba.join() + ")"; 442 }, 443 toHslaString: function() { 444 var prefix = "hsla(", 445 hsla = jQuery.map( this.hsla(), function( v, i ) { 446 if ( v == null ) { 447 v = i > 2 ? 1 : 0; 448 } 449 450 // Catch 1 and 2 451 if ( i && i < 3 ) { 452 v = Math.round( v * 100 ) + "%"; 453 } 454 return v; 455 } ); 456 457 if ( hsla[ 3 ] === 1 ) { 458 hsla.pop(); 459 prefix = "hsl("; 460 } 461 return prefix + hsla.join() + ")"; 462 }, 463 toHexString: function( includeAlpha ) { 464 var rgba = this._rgba.slice(), 465 alpha = rgba.pop(); 466 467 if ( includeAlpha ) { 468 rgba.push( ~~( alpha * 255 ) ); 469 } 470 471 return "#" + jQuery.map( rgba, function( v ) { 472 473 // Default to 0 when nulls exist 474 v = ( v || 0 ).toString( 16 ); 475 return v.length === 1 ? "0" + v : v; 476 } ).join( "" ); 477 }, 478 toString: function() { 479 return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); 480 } 481} ); 482color.fn.parse.prototype = color.fn; 483 484// Hsla conversions adapted from: 485// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021 486 487function hue2rgb( p, q, h ) { 488 h = ( h + 1 ) % 1; 489 if ( h * 6 < 1 ) { 490 return p + ( q - p ) * h * 6; 491 } 492 if ( h * 2 < 1 ) { 493 return q; 494 } 495 if ( h * 3 < 2 ) { 496 return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6; 497 } 498 return p; 499} 500 501spaces.hsla.to = function( rgba ) { 502 if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { 503 return [ null, null, null, rgba[ 3 ] ]; 504 } 505 var r = rgba[ 0 ] / 255, 506 g = rgba[ 1 ] / 255, 507 b = rgba[ 2 ] / 255, 508 a = rgba[ 3 ], 509 max = Math.max( r, g, b ), 510 min = Math.min( r, g, b ), 511 diff = max - min, 512 add = max + min, 513 l = add * 0.5, 514 h, s; 515 516 if ( min === max ) { 517 h = 0; 518 } else if ( r === max ) { 519 h = ( 60 * ( g - b ) / diff ) + 360; 520 } else if ( g === max ) { 521 h = ( 60 * ( b - r ) / diff ) + 120; 522 } else { 523 h = ( 60 * ( r - g ) / diff ) + 240; 524 } 525 526 // Chroma (diff) == 0 means greyscale which, by definition, saturation = 0% 527 // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add) 528 if ( diff === 0 ) { 529 s = 0; 530 } else if ( l <= 0.5 ) { 531 s = diff / add; 532 } else { 533 s = diff / ( 2 - add ); 534 } 535 return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ]; 536}; 537 538spaces.hsla.from = function( hsla ) { 539 if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { 540 return [ null, null, null, hsla[ 3 ] ]; 541 } 542 var h = hsla[ 0 ] / 360, 543 s = hsla[ 1 ], 544 l = hsla[ 2 ], 545 a = hsla[ 3 ], 546 q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, 547 p = 2 * l - q; 548 549 return [ 550 Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), 551 Math.round( hue2rgb( p, q, h ) * 255 ), 552 Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), 553 a 554 ]; 555}; 556 557each( spaces, function( spaceName, space ) { 558 var props = space.props, 559 cache = space.cache, 560 to = space.to, 561 from = space.from; 562 563 // Makes rgba() and hsla() 564 color.fn[ spaceName ] = function( value ) { 565 566 // Generate a cache for this space if it doesn't exist 567 if ( to && !this[ cache ] ) { 568 this[ cache ] = to( this._rgba ); 569 } 570 if ( value === undefined ) { 571 return this[ cache ].slice(); 572 } 573 574 var ret, 575 type = jQuery.type( value ), 576 arr = ( type === "array" || type === "object" ) ? value : arguments, 577 local = this[ cache ].slice(); 578 579 each( props, function( key, prop ) { 580 var val = arr[ type === "object" ? key : prop.idx ]; 581 if ( val == null ) { 582 val = local[ prop.idx ]; 583 } 584 local[ prop.idx ] = clamp( val, prop ); 585 } ); 586 587 if ( from ) { 588 ret = color( from( local ) ); 589 ret[ cache ] = local; 590 return ret; 591 } else { 592 return color( local ); 593 } 594 }; 595 596 // Makes red() green() blue() alpha() hue() saturation() lightness() 597 each( props, function( key, prop ) { 598 599 // Alpha is included in more than one space 600 if ( color.fn[ key ] ) { 601 return; 602 } 603 color.fn[ key ] = function( value ) { 604 var vtype = jQuery.type( value ), 605 fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ), 606 local = this[ fn ](), 607 cur = local[ prop.idx ], 608 match; 609 610 if ( vtype === "undefined" ) { 611 return cur; 612 } 613 614 if ( vtype === "function" ) { 615 value = value.call( this, cur ); 616 vtype = jQuery.type( value ); 617 } 618 if ( value == null && prop.empty ) { 619 return this; 620 } 621 if ( vtype === "string" ) { 622 match = rplusequals.exec( value ); 623 if ( match ) { 624 value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); 625 } 626 } 627 local[ prop.idx ] = value; 628 return this[ fn ]( local ); 629 }; 630 } ); 631} ); 632 633// Add cssHook and .fx.step function for each named hook. 634// accept a space separated string of properties 635color.hook = function( hook ) { 636 var hooks = hook.split( " " ); 637 each( hooks, function( i, hook ) { 638 jQuery.cssHooks[ hook ] = { 639 set: function( elem, value ) { 640 var parsed, curElem, 641 backgroundColor = ""; 642 643 if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || 644 ( parsed = stringParse( value ) ) ) ) { 645 value = color( parsed || value ); 646 if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { 647 curElem = hook === "backgroundColor" ? elem.parentNode : elem; 648 while ( 649 ( backgroundColor === "" || backgroundColor === "transparent" ) && 650 curElem && curElem.style 651 ) { 652 try { 653 backgroundColor = jQuery.css( curElem, "backgroundColor" ); 654 curElem = curElem.parentNode; 655 } catch ( e ) { 656 } 657 } 658 659 value = value.blend( backgroundColor && backgroundColor !== "transparent" ? 660 backgroundColor : 661 "_default" ); 662 } 663 664 value = value.toRgbaString(); 665 } 666 try { 667 elem.style[ hook ] = value; 668 } catch ( e ) { 669 670 // Wrapped to prevent IE from throwing errors on "invalid" values like 671 // 'auto' or 'inherit' 672 } 673 } 674 }; 675 jQuery.fx.step[ hook ] = function( fx ) { 676 if ( !fx.colorInit ) { 677 fx.start = color( fx.elem, hook ); 678 fx.end = color( fx.end ); 679 fx.colorInit = true; 680 } 681 jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); 682 }; 683 } ); 684 685}; 686 687color.hook( stepHooks ); 688 689jQuery.cssHooks.borderColor = { 690 expand: function( value ) { 691 var expanded = {}; 692 693 each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) { 694 expanded[ "border" + part + "Color" ] = value; 695 } ); 696 return expanded; 697 } 698}; 699 700// Basic color names only. 701// Usage of any of the other color names requires adding yourself or including 702// jquery.color.svg-names.js. 703colors = jQuery.Color.names = { 704 705 // 4.1. Basic color keywords 706 aqua: "#00ffff", 707 black: "#000000", 708 blue: "#0000ff", 709 fuchsia: "#ff00ff", 710 gray: "#808080", 711 green: "#008000", 712 lime: "#00ff00", 713 maroon: "#800000", 714 navy: "#000080", 715 olive: "#808000", 716 purple: "#800080", 717 red: "#ff0000", 718 silver: "#c0c0c0", 719 teal: "#008080", 720 white: "#ffffff", 721 yellow: "#ffff00", 722 723 // 4.2.3. "transparent" color keyword 724 transparent: [ null, null, null, 0 ], 725 726 _default: "#ffffff" 727}; 728 729} )( jQuery ); 730 731/******************************************************************************/ 732/****************************** CLASS ANIMATIONS ******************************/ 733/******************************************************************************/ 734( function() { 735 736var classAnimationActions = [ "add", "remove", "toggle" ], 737 shorthandStyles = { 738 border: 1, 739 borderBottom: 1, 740 borderColor: 1, 741 borderLeft: 1, 742 borderRight: 1, 743 borderTop: 1, 744 borderWidth: 1, 745 margin: 1, 746 padding: 1 747 }; 748 749$.each( 750 [ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], 751 function( _, prop ) { 752 $.fx.step[ prop ] = function( fx ) { 753 if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { 754 jQuery.style( fx.elem, prop, fx.end ); 755 fx.setAttr = true; 756 } 757 }; 758 } 759); 760 761function getElementStyles( elem ) { 762 var key, len, 763 style = elem.ownerDocument.defaultView ? 764 elem.ownerDocument.defaultView.getComputedStyle( elem, null ) : 765 elem.currentStyle, 766 styles = {}; 767 768 if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { 769 len = style.length; 770 while ( len-- ) { 771 key = style[ len ]; 772 if ( typeof style[ key ] === "string" ) { 773 styles[ $.camelCase( key ) ] = style[ key ]; 774 } 775 } 776 777 // Support: Opera, IE <9 778 } else { 779 for ( key in style ) { 780 if ( typeof style[ key ] === "string" ) { 781 styles[ key ] = style[ key ]; 782 } 783 } 784 } 785 786 return styles; 787} 788 789function styleDifference( oldStyle, newStyle ) { 790 var diff = {}, 791 name, value; 792 793 for ( name in newStyle ) { 794 value = newStyle[ name ]; 795 if ( oldStyle[ name ] !== value ) { 796 if ( !shorthandStyles[ name ] ) { 797 if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) { 798 diff[ name ] = value; 799 } 800 } 801 } 802 } 803 804 return diff; 805} 806 807// Support: jQuery <1.8 808if ( !$.fn.addBack ) { 809 $.fn.addBack = function( selector ) { 810 return this.add( selector == null ? 811 this.prevObject : this.prevObject.filter( selector ) 812 ); 813 }; 814} 815 816$.effects.animateClass = function( value, duration, easing, callback ) { 817 var o = $.speed( duration, easing, callback ); 818 819 return this.queue( function() { 820 var animated = $( this ), 821 baseClass = animated.attr( "class" ) || "", 822 applyClassChange, 823 allAnimations = o.children ? animated.find( "*" ).addBack() : animated; 824 825 // Map the animated objects to store the original styles. 826 allAnimations = allAnimations.map( function() { 827 var el = $( this ); 828 return { 829 el: el, 830 start: getElementStyles( this ) 831 }; 832 } ); 833 834 // Apply class change 835 applyClassChange = function() { 836 $.each( classAnimationActions, function( i, action ) { 837 if ( value[ action ] ) { 838 animated[ action + "Class" ]( value[ action ] ); 839 } 840 } ); 841 }; 842 applyClassChange(); 843 844 // Map all animated objects again - calculate new styles and diff 845 allAnimations = allAnimations.map( function() { 846 this.end = getElementStyles( this.el[ 0 ] ); 847 this.diff = styleDifference( this.start, this.end ); 848 return this; 849 } ); 850 851 // Apply original class 852 animated.attr( "class", baseClass ); 853 854 // Map all animated objects again - this time collecting a promise 855 allAnimations = allAnimations.map( function() { 856 var styleInfo = this, 857 dfd = $.Deferred(), 858 opts = $.extend( {}, o, { 859 queue: false, 860 complete: function() { 861 dfd.resolve( styleInfo ); 862 } 863 } ); 864 865 this.el.animate( this.diff, opts ); 866 return dfd.promise(); 867 } ); 868 869 // Once all animations have completed: 870 $.when.apply( $, allAnimations.get() ).done( function() { 871 872 // Set the final class 873 applyClassChange(); 874 875 // For each animated element, 876 // clear all css properties that were animated 877 $.each( arguments, function() { 878 var el = this.el; 879 $.each( this.diff, function( key ) { 880 el.css( key, "" ); 881 } ); 882 } ); 883 884 // This is guarnteed to be there if you use jQuery.speed() 885 // it also handles dequeuing the next anim... 886 o.complete.call( animated[ 0 ] ); 887 } ); 888 } ); 889}; 890 891$.fn.extend( { 892 addClass: ( function( orig ) { 893 return function( classNames, speed, easing, callback ) { 894 return speed ? 895 $.effects.animateClass.call( this, 896 { add: classNames }, speed, easing, callback ) : 897 orig.apply( this, arguments ); 898 }; 899 } )( $.fn.addClass ), 900 901 removeClass: ( function( orig ) { 902 return function( classNames, speed, easing, callback ) { 903 return arguments.length > 1 ? 904 $.effects.animateClass.call( this, 905 { remove: classNames }, speed, easing, callback ) : 906 orig.apply( this, arguments ); 907 }; 908 } )( $.fn.removeClass ), 909 910 toggleClass: ( function( orig ) { 911 return function( classNames, force, speed, easing, callback ) { 912 if ( typeof force === "boolean" || force === undefined ) { 913 if ( !speed ) { 914 915 // Without speed parameter 916 return orig.apply( this, arguments ); 917 } else { 918 return $.effects.animateClass.call( this, 919 ( force ? { add: classNames } : { remove: classNames } ), 920 speed, easing, callback ); 921 } 922 } else { 923 924 // Without force parameter 925 return $.effects.animateClass.call( this, 926 { toggle: classNames }, force, speed, easing ); 927 } 928 }; 929 } )( $.fn.toggleClass ), 930 931 switchClass: function( remove, add, speed, easing, callback ) { 932 return $.effects.animateClass.call( this, { 933 add: add, 934 remove: remove 935 }, speed, easing, callback ); 936 } 937} ); 938 939} )(); 940 941/******************************************************************************/ 942/*********************************** EFFECTS **********************************/ 943/******************************************************************************/ 944 945( function() { 946 947if ( $.expr && $.expr.filters && $.expr.filters.animated ) { 948 $.expr.filters.animated = ( function( orig ) { 949 return function( elem ) { 950 return !!$( elem ).data( dataSpaceAnimated ) || orig( elem ); 951 }; 952 } )( $.expr.filters.animated ); 953} 954 955if ( $.uiBackCompat !== false ) { 956 $.extend( $.effects, { 957 958 // Saves a set of properties in a data storage 959 save: function( element, set ) { 960 var i = 0, length = set.length; 961 for ( ; i < length; i++ ) { 962 if ( set[ i ] !== null ) { 963 element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] ); 964 } 965 } 966 }, 967 968 // Restores a set of previously saved properties from a data storage 969 restore: function( element, set ) { 970 var val, i = 0, length = set.length; 971 for ( ; i < length; i++ ) { 972 if ( set[ i ] !== null ) { 973 val = element.data( dataSpace + set[ i ] ); 974 element.css( set[ i ], val ); 975 } 976 } 977 }, 978 979 setMode: function( el, mode ) { 980 if ( mode === "toggle" ) { 981 mode = el.is( ":hidden" ) ? "show" : "hide"; 982 } 983 return mode; 984 }, 985 986 // Wraps the element around a wrapper that copies position properties 987 createWrapper: function( element ) { 988 989 // If the element is already wrapped, return it 990 if ( element.parent().is( ".ui-effects-wrapper" ) ) { 991 return element.parent(); 992 } 993 994 // Wrap the element 995 var props = { 996 width: element.outerWidth( true ), 997 height: element.outerHeight( true ), 998 "float": element.css( "float" ) 999 }, 1000 wrapper = $( "<div></div>" ) 1001 .addClass( "ui-effects-wrapper" ) 1002 .css( { 1003 fontSize: "100%", 1004 background: "transparent", 1005 border: "none", 1006 margin: 0, 1007 padding: 0 1008 } ), 1009 1010 // Store the size in case width/height are defined in % - Fixes #5245 1011 size = { 1012 width: element.width(), 1013 height: element.height() 1014 }, 1015 active = document.activeElement; 1016 1017 // Support: Firefox 1018 // Firefox incorrectly exposes anonymous content 1019 // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 1020 try { 1021 active.id; 1022 } catch ( e ) { 1023 active = document.body; 1024 } 1025 1026 element.wrap( wrapper ); 1027 1028 // Fixes #7595 - Elements lose focus when wrapped. 1029 if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { 1030 $( active ).trigger( "focus" ); 1031 } 1032 1033 // Hotfix for jQuery 1.4 since some change in wrap() seems to actually 1034 // lose the reference to the wrapped element 1035 wrapper = element.parent(); 1036 1037 // Transfer positioning properties to the wrapper 1038 if ( element.css( "position" ) === "static" ) { 1039 wrapper.css( { position: "relative" } ); 1040 element.css( { position: "relative" } ); 1041 } else { 1042 $.extend( props, { 1043 position: element.css( "position" ), 1044 zIndex: element.css( "z-index" ) 1045 } ); 1046 $.each( [ "top", "left", "bottom", "right" ], function( i, pos ) { 1047 props[ pos ] = element.css( pos ); 1048 if ( isNaN( parseInt( props[ pos ], 10 ) ) ) { 1049 props[ pos ] = "auto"; 1050 } 1051 } ); 1052 element.css( { 1053 position: "relative", 1054 top: 0, 1055 left: 0, 1056 right: "auto", 1057 bottom: "auto" 1058 } ); 1059 } 1060 element.css( size ); 1061 1062 return wrapper.css( props ).show(); 1063 }, 1064 1065 removeWrapper: function( element ) { 1066 var active = document.activeElement; 1067 1068 if ( element.parent().is( ".ui-effects-wrapper" ) ) { 1069 element.parent().replaceWith( element ); 1070 1071 // Fixes #7595 - Elements lose focus when wrapped. 1072 if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { 1073 $( active ).trigger( "focus" ); 1074 } 1075 } 1076 1077 return element; 1078 } 1079 } ); 1080} 1081 1082$.extend( $.effects, { 1083 version: "1.12.1", 1084 1085 define: function( name, mode, effect ) { 1086 if ( !effect ) { 1087 effect = mode; 1088 mode = "effect"; 1089 } 1090 1091 $.effects.effect[ name ] = effect; 1092 $.effects.effect[ name ].mode = mode; 1093 1094 return effect; 1095 }, 1096 1097 scaledDimensions: function( element, percent, direction ) { 1098 if ( percent === 0 ) { 1099 return { 1100 height: 0, 1101 width: 0, 1102 outerHeight: 0, 1103 outerWidth: 0 1104 }; 1105 } 1106 1107 var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1, 1108 y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1; 1109 1110 return { 1111 height: element.height() * y, 1112 width: element.width() * x, 1113 outerHeight: element.outerHeight() * y, 1114 outerWidth: element.outerWidth() * x 1115 }; 1116 1117 }, 1118 1119 clipToBox: function( animation ) { 1120 return { 1121 width: animation.clip.right - animation.clip.left, 1122 height: animation.clip.bottom - animation.clip.top, 1123 left: animation.clip.left, 1124 top: animation.clip.top 1125 }; 1126 }, 1127 1128 // Injects recently queued functions to be first in line (after "inprogress") 1129 unshift: function( element, queueLength, count ) { 1130 var queue = element.queue(); 1131 1132 if ( queueLength > 1 ) { 1133 queue.splice.apply( queue, 1134 [ 1, 0 ].concat( queue.splice( queueLength, count ) ) ); 1135 } 1136 element.dequeue(); 1137 }, 1138 1139 saveStyle: function( element ) { 1140 element.data( dataSpaceStyle, element[ 0 ].style.cssText ); 1141 }, 1142 1143 restoreStyle: function( element ) { 1144 element[ 0 ].style.cssText = element.data( dataSpaceStyle ) || ""; 1145 element.removeData( dataSpaceStyle ); 1146 }, 1147 1148 mode: function( element, mode ) { 1149 var hidden = element.is( ":hidden" ); 1150 1151 if ( mode === "toggle" ) { 1152 mode = hidden ? "show" : "hide"; 1153 } 1154 if ( hidden ? mode === "hide" : mode === "show" ) { 1155 mode = "none"; 1156 } 1157 return mode; 1158 }, 1159 1160 // Translates a [top,left] array into a baseline value 1161 getBaseline: function( origin, original ) { 1162 var y, x; 1163 1164 switch ( origin[ 0 ] ) { 1165 case "top": 1166 y = 0; 1167 break; 1168 case "middle": 1169 y = 0.5; 1170 break; 1171 case "bottom": 1172 y = 1; 1173 break; 1174 default: 1175 y = origin[ 0 ] / original.height; 1176 } 1177 1178 switch ( origin[ 1 ] ) { 1179 case "left": 1180 x = 0; 1181 break; 1182 case "center": 1183 x = 0.5; 1184 break; 1185 case "right": 1186 x = 1; 1187 break; 1188 default: 1189 x = origin[ 1 ] / original.width; 1190 } 1191 1192 return { 1193 x: x, 1194 y: y 1195 }; 1196 }, 1197 1198 // Creates a placeholder element so that the original element can be made absolute 1199 createPlaceholder: function( element ) { 1200 var placeholder, 1201 cssPosition = element.css( "position" ), 1202 position = element.position(); 1203 1204 // Lock in margins first to account for form elements, which 1205 // will change margin if you explicitly set height 1206 // see: http://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380 1207 // Support: Safari 1208 element.css( { 1209 marginTop: element.css( "marginTop" ), 1210 marginBottom: element.css( "marginBottom" ), 1211 marginLeft: element.css( "marginLeft" ), 1212 marginRight: element.css( "marginRight" ) 1213 } ) 1214 .outerWidth( element.outerWidth() ) 1215 .outerHeight( element.outerHeight() ); 1216 1217 if ( /^(static|relative)/.test( cssPosition ) ) { 1218 cssPosition = "absolute"; 1219 1220 placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( { 1221 1222 // Convert inline to inline block to account for inline elements 1223 // that turn to inline block based on content (like img) 1224 display: /^(inline|ruby)/.test( element.css( "display" ) ) ? 1225 "inline-block" : 1226 "block", 1227 visibility: "hidden", 1228 1229 // Margins need to be set to account for margin collapse 1230 marginTop: element.css( "marginTop" ), 1231 marginBottom: element.css( "marginBottom" ), 1232 marginLeft: element.css( "marginLeft" ), 1233 marginRight: element.css( "marginRight" ), 1234 "float": element.css( "float" ) 1235 } ) 1236 .outerWidth( element.outerWidth() ) 1237 .outerHeight( element.outerHeight() ) 1238 .addClass( "ui-effects-placeholder" ); 1239 1240 element.data( dataSpace + "placeholder", placeholder ); 1241 } 1242 1243 element.css( { 1244 position: cssPosition, 1245 left: position.left, 1246 top: position.top 1247 } ); 1248 1249 return placeholder; 1250 }, 1251 1252 removePlaceholder: function( element ) { 1253 var dataKey = dataSpace + "placeholder", 1254 placeholder = element.data( dataKey ); 1255 1256 if ( placeholder ) { 1257 placeholder.remove(); 1258 element.removeData( dataKey ); 1259 } 1260 }, 1261 1262 // Removes a placeholder if it exists and restores 1263 // properties that were modified during placeholder creation 1264 cleanUp: function( element ) { 1265 $.effects.restoreStyle( element ); 1266 $.effects.removePlaceholder( element ); 1267 }, 1268 1269 setTransition: function( element, list, factor, value ) { 1270 value = value || {}; 1271 $.each( list, function( i, x ) { 1272 var unit = element.cssUnit( x ); 1273 if ( unit[ 0 ] > 0 ) { 1274 value[ x ] = unit[ 0 ] * factor + unit[ 1 ]; 1275 } 1276 } ); 1277 return value; 1278 } 1279} ); 1280 1281// Return an effect options object for the given parameters: 1282function _normalizeArguments( effect, options, speed, callback ) { 1283 1284 // Allow passing all options as the first parameter 1285 if ( $.isPlainObject( effect ) ) { 1286 options = effect; 1287 effect = effect.effect; 1288 } 1289 1290 // Convert to an object 1291 effect = { effect: effect }; 1292 1293 // Catch (effect, null, ...) 1294 if ( options == null ) { 1295 options = {}; 1296 } 1297 1298 // Catch (effect, callback) 1299 if ( $.isFunction( options ) ) { 1300 callback = options; 1301 speed = null; 1302 options = {}; 1303 } 1304 1305 // Catch (effect, speed, ?) 1306 if ( typeof options === "number" || $.fx.speeds[ options ] ) { 1307 callback = speed; 1308 speed = options; 1309 options = {}; 1310 } 1311 1312 // Catch (effect, options, callback) 1313 if ( $.isFunction( speed ) ) { 1314 callback = speed; 1315 speed = null; 1316 } 1317 1318 // Add options to effect 1319 if ( options ) { 1320 $.extend( effect, options ); 1321 } 1322 1323 speed = speed || options.duration; 1324 effect.duration = $.fx.off ? 0 : 1325 typeof speed === "number" ? speed : 1326 speed in $.fx.speeds ? $.fx.speeds[ speed ] : 1327 $.fx.speeds._default; 1328 1329 effect.complete = callback || options.complete; 1330 1331 return effect; 1332} 1333 1334function standardAnimationOption( option ) { 1335 1336 // Valid standard speeds (nothing, number, named speed) 1337 if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) { 1338 return true; 1339 } 1340 1341 // Invalid strings - treat as "normal" speed 1342 if ( typeof option === "string" && !$.effects.effect[ option ] ) { 1343 return true; 1344 } 1345 1346 // Complete callback 1347 if ( $.isFunction( option ) ) { 1348 return true; 1349 } 1350 1351 // Options hash (but not naming an effect) 1352 if ( typeof option === "object" && !option.effect ) { 1353 return true; 1354 } 1355 1356 // Didn't match any standard API 1357 return false; 1358} 1359 1360$.fn.extend( { 1361 effect: function( /* effect, options, speed, callback */ ) { 1362 var args = _normalizeArguments.apply( this, arguments ), 1363 effectMethod = $.effects.effect[ args.effect ], 1364 defaultMode = effectMethod.mode, 1365 queue = args.queue, 1366 queueName = queue || "fx", 1367 complete = args.complete, 1368 mode = args.mode, 1369 modes = [], 1370 prefilter = function( next ) { 1371 var el = $( this ), 1372 normalizedMode = $.effects.mode( el, mode ) || defaultMode; 1373 1374 // Sentinel for duck-punching the :animated psuedo-selector 1375 el.data( dataSpaceAnimated, true ); 1376 1377 // Save effect mode for later use, 1378 // we can't just call $.effects.mode again later, 1379 // as the .show() below destroys the initial state 1380 modes.push( normalizedMode ); 1381 1382 // See $.uiBackCompat inside of run() for removal of defaultMode in 1.13 1383 if ( defaultMode && ( normalizedMode === "show" || 1384 ( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) { 1385 el.show(); 1386 } 1387 1388 if ( !defaultMode || normalizedMode !== "none" ) { 1389 $.effects.saveStyle( el ); 1390 } 1391 1392 if ( $.isFunction( next ) ) { 1393 next(); 1394 } 1395 }; 1396 1397 if ( $.fx.off || !effectMethod ) { 1398 1399 // Delegate to the original method (e.g., .show()) if possible 1400 if ( mode ) { 1401 return this[ mode ]( args.duration, complete ); 1402 } else { 1403 return this.each( function() { 1404 if ( complete ) { 1405 complete.call( this ); 1406 } 1407 } ); 1408 } 1409 } 1410 1411 function run( next ) { 1412 var elem = $( this ); 1413 1414 function cleanup() { 1415 elem.removeData( dataSpaceAnimated ); 1416 1417 $.effects.cleanUp( elem ); 1418 1419 if ( args.mode === "hide" ) { 1420 elem.hide(); 1421 } 1422 1423 done(); 1424 } 1425 1426 function done() { 1427 if ( $.isFunction( complete ) ) { 1428 complete.call( elem[ 0 ] ); 1429 } 1430 1431 if ( $.isFunction( next ) ) { 1432 next(); 1433 } 1434 } 1435 1436 // Override mode option on a per element basis, 1437 // as toggle can be either show or hide depending on element state 1438 args.mode = modes.shift(); 1439 1440 if ( $.uiBackCompat !== false && !defaultMode ) { 1441 if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) { 1442 1443 // Call the core method to track "olddisplay" properly 1444 elem[ mode ](); 1445 done(); 1446 } else { 1447 effectMethod.call( elem[ 0 ], args, done ); 1448 } 1449 } else { 1450 if ( args.mode === "none" ) { 1451 1452 // Call the core method to track "olddisplay" properly 1453 elem[ mode ](); 1454 done(); 1455 } else { 1456 effectMethod.call( elem[ 0 ], args, cleanup ); 1457 } 1458 } 1459 } 1460 1461 // Run prefilter on all elements first to ensure that 1462 // any showing or hiding happens before placeholder creation, 1463 // which ensures that any layout changes are correctly captured. 1464 return queue === false ? 1465 this.each( prefilter ).each( run ) : 1466 this.queue( queueName, prefilter ).queue( queueName, run ); 1467 }, 1468 1469 show: ( function( orig ) { 1470 return function( option ) { 1471 if ( standardAnimationOption( option ) ) { 1472 return orig.apply( this, arguments ); 1473 } else { 1474 var args = _normalizeArguments.apply( this, arguments ); 1475 args.mode = "show"; 1476 return this.effect.call( this, args ); 1477 } 1478 }; 1479 } )( $.fn.show ), 1480 1481 hide: ( function( orig ) { 1482 return function( option ) { 1483 if ( standardAnimationOption( option ) ) { 1484 return orig.apply( this, arguments ); 1485 } else { 1486 var args = _normalizeArguments.apply( this, arguments ); 1487 args.mode = "hide"; 1488 return this.effect.call( this, args ); 1489 } 1490 }; 1491 } )( $.fn.hide ), 1492 1493 toggle: ( function( orig ) { 1494 return function( option ) { 1495 if ( standardAnimationOption( option ) || typeof option === "boolean" ) { 1496 return orig.apply( this, arguments ); 1497 } else { 1498 var args = _normalizeArguments.apply( this, arguments ); 1499 args.mode = "toggle"; 1500 return this.effect.call( this, args ); 1501 } 1502 }; 1503 } )( $.fn.toggle ), 1504 1505 cssUnit: function( key ) { 1506 var style = this.css( key ), 1507 val = []; 1508 1509 $.each( [ "em", "px", "%", "pt" ], function( i, unit ) { 1510 if ( style.indexOf( unit ) > 0 ) { 1511 val = [ parseFloat( style ), unit ]; 1512 } 1513 } ); 1514 return val; 1515 }, 1516 1517 cssClip: function( clipObj ) { 1518 if ( clipObj ) { 1519 return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " + 1520 clipObj.bottom + "px " + clipObj.left + "px)" ); 1521 } 1522 return parseClip( this.css( "clip" ), this ); 1523 }, 1524 1525 transfer: function( options, done ) { 1526 var element = $( this ), 1527 target = $( options.to ), 1528 targetFixed = target.css( "position" ) === "fixed", 1529 body = $( "body" ), 1530 fixTop = targetFixed ? body.scrollTop() : 0, 1531 fixLeft = targetFixed ? body.scrollLeft() : 0, 1532 endPosition = target.offset(), 1533 animation = { 1534 top: endPosition.top - fixTop, 1535 left: endPosition.left - fixLeft, 1536 height: target.innerHeight(), 1537 width: target.innerWidth() 1538 }, 1539 startPosition = element.offset(), 1540 transfer = $( "<div class='ui-effects-transfer'></div>" ) 1541 .appendTo( "body" ) 1542 .addClass( options.className ) 1543 .css( { 1544 top: startPosition.top - fixTop, 1545 left: startPosition.left - fixLeft, 1546 height: element.innerHeight(), 1547 width: element.innerWidth(), 1548 position: targetFixed ? "fixed" : "absolute" 1549 } ) 1550 .animate( animation, options.duration, options.easing, function() { 1551 transfer.remove(); 1552 if ( $.isFunction( done ) ) { 1553 done(); 1554 } 1555 } ); 1556 } 1557} ); 1558 1559function parseClip( str, element ) { 1560 var outerWidth = element.outerWidth(), 1561 outerHeight = element.outerHeight(), 1562 clipRegex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/, 1563 values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ]; 1564 1565 return { 1566 top: parseFloat( values[ 1 ] ) || 0, 1567 right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ), 1568 bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ), 1569 left: parseFloat( values[ 4 ] ) || 0 1570 }; 1571} 1572 1573$.fx.step.clip = function( fx ) { 1574 if ( !fx.clipInit ) { 1575 fx.start = $( fx.elem ).cssClip(); 1576 if ( typeof fx.end === "string" ) { 1577 fx.end = parseClip( fx.end, fx.elem ); 1578 } 1579 fx.clipInit = true; 1580 } 1581 1582 $( fx.elem ).cssClip( { 1583 top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top, 1584 right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right, 1585 bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom, 1586 left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left 1587 } ); 1588}; 1589 1590} )(); 1591 1592/******************************************************************************/ 1593/*********************************** EASING ***********************************/ 1594/******************************************************************************/ 1595 1596( function() { 1597 1598// Based on easing equations from Robert Penner (http://www.robertpenner.com/easing) 1599 1600var baseEasings = {}; 1601 1602$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) { 1603 baseEasings[ name ] = function( p ) { 1604 return Math.pow( p, i + 2 ); 1605 }; 1606} ); 1607 1608$.extend( baseEasings, { 1609 Sine: function( p ) { 1610 return 1 - Math.cos( p * Math.PI / 2 ); 1611 }, 1612 Circ: function( p ) { 1613 return 1 - Math.sqrt( 1 - p * p ); 1614 }, 1615 Elastic: function( p ) { 1616 return p === 0 || p === 1 ? p : 1617 -Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 ); 1618 }, 1619 Back: function( p ) { 1620 return p * p * ( 3 * p - 2 ); 1621 }, 1622 Bounce: function( p ) { 1623 var pow2, 1624 bounce = 4; 1625 1626 while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} 1627 return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); 1628 } 1629} ); 1630 1631$.each( baseEasings, function( name, easeIn ) { 1632 $.easing[ "easeIn" + name ] = easeIn; 1633 $.easing[ "easeOut" + name ] = function( p ) { 1634 return 1 - easeIn( 1 - p ); 1635 }; 1636 $.easing[ "easeInOut" + name ] = function( p ) { 1637 return p < 0.5 ? 1638 easeIn( p * 2 ) / 2 : 1639 1 - easeIn( p * -2 + 2 ) / 2; 1640 }; 1641} ); 1642 1643} )(); 1644 1645var effect = $.effects; 1646 1647
1648 1649 1650}));
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.