wp/wp-includes/js/jquery/ui/effect.js
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
     1 /*!
     1 /*!
     2  * jQuery UI Effects 1.13.1
     2  * jQuery UI Effects 1.13.3
     3  * http://jqueryui.com
     3  * https://jqueryui.com
     4  *
     4  *
     5  * Copyright jQuery Foundation and other contributors
     5  * Copyright OpenJS Foundation and other contributors
     6  * Released under the MIT license.
     6  * Released under the MIT license.
     7  * http://jquery.org/license
     7  * https://jquery.org/license
     8  */
     8  */
     9 
     9 
    10 //>>label: Effects Core
    10 //>>label: Effects Core
    11 //>>group: Effects
    11 //>>group: Effects
    12 /* eslint-disable max-len */
    12 /* eslint-disable max-len */
    13 //>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects.
    13 //>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects.
    14 /* eslint-enable max-len */
    14 /* eslint-enable max-len */
    15 //>>docs: http://api.jqueryui.com/category/effects-core/
    15 //>>docs: https://api.jqueryui.com/category/effects-core/
    16 //>>demos: http://jqueryui.com/effect/
    16 //>>demos: https://jqueryui.com/effect/
    17 
    17 
    18 ( function( factory ) {
    18 ( function( factory ) {
    19 	"use strict";
    19 	"use strict";
    20 
    20 
    21 	if ( typeof define === "function" && define.amd ) {
    21 	if ( typeof define === "function" && define.amd ) {
    22 
    22 
    23 		// AMD. Register as an anonymous module.
    23 		// AMD. Register as an anonymous module.
    24 		define( [ "jquery" ], factory );
    24 		define( [
       
    25 			"jquery",
       
    26 			"./jquery-var-for-color",
       
    27 			"./vendor/jquery-color/jquery.color",
       
    28 			"./version"
       
    29 		], factory );
    25 	} else {
    30 	} else {
    26 
    31 
    27 		// Browser globals
    32 		// Browser globals
    28 		factory( jQuery );
    33 		factory( jQuery );
    29 	}
    34 	}
    30 } )( function( $ ) {
    35 } )( function( $ ) {
    31 "use strict";
    36 "use strict";
    32 
       
    33 // Include version.js
       
    34 $.ui = $.ui || {};
       
    35 $.ui.version = "1.13.1";
       
    36 
       
    37 // Source: jquery-var-for-color.js
       
    38 // Create a local jQuery because jQuery Color relies on it and the
       
    39 // global may not exist with AMD and a custom build (#10199).
       
    40 // This module is a noop if used as a regular AMD module.
       
    41 // eslint-disable-next-line no-unused-vars
       
    42 var jQuery = $;
       
    43 
       
    44 
       
    45 /*!
       
    46  * jQuery Color Animations v2.2.0
       
    47  * https://github.com/jquery/jquery-color
       
    48  *
       
    49  * Copyright OpenJS Foundation and other contributors
       
    50  * Released under the MIT license.
       
    51  * http://jquery.org/license
       
    52  *
       
    53  * Date: Sun May 10 09:02:36 2020 +0200
       
    54  */
       
    55 
       
    56 	var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " +
       
    57 		"borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
       
    58 
       
    59 	class2type = {},
       
    60 	toString = class2type.toString,
       
    61 
       
    62 	// plusequals test for += 100 -= 100
       
    63 	rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
       
    64 
       
    65 	// a set of RE's that can match strings and generate color tuples.
       
    66 	stringParsers = [ {
       
    67 			re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
       
    68 			parse: function( execResult ) {
       
    69 				return [
       
    70 					execResult[ 1 ],
       
    71 					execResult[ 2 ],
       
    72 					execResult[ 3 ],
       
    73 					execResult[ 4 ]
       
    74 				];
       
    75 			}
       
    76 		}, {
       
    77 			re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
       
    78 			parse: function( execResult ) {
       
    79 				return [
       
    80 					execResult[ 1 ] * 2.55,
       
    81 					execResult[ 2 ] * 2.55,
       
    82 					execResult[ 3 ] * 2.55,
       
    83 					execResult[ 4 ]
       
    84 				];
       
    85 			}
       
    86 		}, {
       
    87 
       
    88 			// this regex ignores A-F because it's compared against an already lowercased string
       
    89 			re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,
       
    90 			parse: function( execResult ) {
       
    91 				return [
       
    92 					parseInt( execResult[ 1 ], 16 ),
       
    93 					parseInt( execResult[ 2 ], 16 ),
       
    94 					parseInt( execResult[ 3 ], 16 ),
       
    95 					execResult[ 4 ] ?
       
    96 						( parseInt( execResult[ 4 ], 16 ) / 255 ).toFixed( 2 ) :
       
    97 						1
       
    98 				];
       
    99 			}
       
   100 		}, {
       
   101 
       
   102 			// this regex ignores A-F because it's compared against an already lowercased string
       
   103 			re: /#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,
       
   104 			parse: function( execResult ) {
       
   105 				return [
       
   106 					parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
       
   107 					parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
       
   108 					parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ),
       
   109 					execResult[ 4 ] ?
       
   110 						( parseInt( execResult[ 4 ] + execResult[ 4 ], 16 ) / 255 )
       
   111 							.toFixed( 2 ) :
       
   112 						1
       
   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
       
   192 supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
       
   193 support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
       
   194 
       
   195 // define cache name and alpha properties
       
   196 // for rgba and hsla spaces
       
   197 each( spaces, function( spaceName, space ) {
       
   198 	space.cache = "_" + spaceName;
       
   199 	space.props.alpha = {
       
   200 		idx: 3,
       
   201 		type: "percent",
       
   202 		def: 1
       
   203 	};
       
   204 } );
       
   205 
       
   206 // Populate the class2type map
       
   207 jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
       
   208 	function( _i, name ) {
       
   209 		class2type[ "[object " + name + "]" ] = name.toLowerCase();
       
   210 	} );
       
   211 
       
   212 function getType( obj ) {
       
   213 	if ( obj == null ) {
       
   214 		return obj + "";
       
   215 	}
       
   216 
       
   217 	return typeof obj === "object" ?
       
   218 		class2type[ toString.call( obj ) ] || "object" :
       
   219 		typeof obj;
       
   220 }
       
   221 
       
   222 function clamp( value, prop, allowEmpty ) {
       
   223 	var type = propTypes[ prop.type ] || {};
       
   224 
       
   225 	if ( value == null ) {
       
   226 		return ( allowEmpty || !prop.def ) ? null : prop.def;
       
   227 	}
       
   228 
       
   229 	// ~~ is an short way of doing floor for positive numbers
       
   230 	value = type.floor ? ~~value : parseFloat( value );
       
   231 
       
   232 	// IE will pass in empty strings as value for alpha,
       
   233 	// which will hit this case
       
   234 	if ( isNaN( value ) ) {
       
   235 		return prop.def;
       
   236 	}
       
   237 
       
   238 	if ( type.mod ) {
       
   239 
       
   240 		// we add mod before modding to make sure that negatives values
       
   241 		// get converted properly: -10 -> 350
       
   242 		return ( value + type.mod ) % type.mod;
       
   243 	}
       
   244 
       
   245 	// for now all property types without mod have min and max
       
   246 	return Math.min( type.max, Math.max( 0, value ) );
       
   247 }
       
   248 
       
   249 function stringParse( string ) {
       
   250 	var inst = color(),
       
   251 		rgba = inst._rgba = [];
       
   252 
       
   253 	string = string.toLowerCase();
       
   254 
       
   255 	each( stringParsers, function( _i, parser ) {
       
   256 		var parsed,
       
   257 			match = parser.re.exec( string ),
       
   258 			values = match && parser.parse( match ),
       
   259 			spaceName = parser.space || "rgba";
       
   260 
       
   261 		if ( values ) {
       
   262 			parsed = inst[ spaceName ]( values );
       
   263 
       
   264 			// if this was an rgba parse the assignment might happen twice
       
   265 			// oh well....
       
   266 			inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
       
   267 			rgba = inst._rgba = parsed._rgba;
       
   268 
       
   269 			// exit each( stringParsers ) here because we matched
       
   270 			return false;
       
   271 		}
       
   272 	} );
       
   273 
       
   274 	// Found a stringParser that handled it
       
   275 	if ( rgba.length ) {
       
   276 
       
   277 		// if this came from a parsed string, force "transparent" when alpha is 0
       
   278 		// chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
       
   279 		if ( rgba.join() === "0,0,0,0" ) {
       
   280 			jQuery.extend( rgba, colors.transparent );
       
   281 		}
       
   282 		return inst;
       
   283 	}
       
   284 
       
   285 	// named colors
       
   286 	return colors[ string ];
       
   287 }
       
   288 
       
   289 color.fn = jQuery.extend( color.prototype, {
       
   290 	parse: function( red, green, blue, alpha ) {
       
   291 		if ( red === undefined ) {
       
   292 			this._rgba = [ null, null, null, null ];
       
   293 			return this;
       
   294 		}
       
   295 		if ( red.jquery || red.nodeType ) {
       
   296 			red = jQuery( red ).css( green );
       
   297 			green = undefined;
       
   298 		}
       
   299 
       
   300 		var inst = this,
       
   301 			type = getType( red ),
       
   302 			rgba = this._rgba = [];
       
   303 
       
   304 		// more than 1 argument specified - assume ( red, green, blue, alpha )
       
   305 		if ( green !== undefined ) {
       
   306 			red = [ red, green, blue, alpha ];
       
   307 			type = "array";
       
   308 		}
       
   309 
       
   310 		if ( type === "string" ) {
       
   311 			return this.parse( stringParse( red ) || colors._default );
       
   312 		}
       
   313 
       
   314 		if ( type === "array" ) {
       
   315 			each( spaces.rgba.props, function( _key, prop ) {
       
   316 				rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
       
   317 			} );
       
   318 			return this;
       
   319 		}
       
   320 
       
   321 		if ( type === "object" ) {
       
   322 			if ( red instanceof color ) {
       
   323 				each( spaces, function( _spaceName, space ) {
       
   324 					if ( red[ space.cache ] ) {
       
   325 						inst[ space.cache ] = red[ space.cache ].slice();
       
   326 					}
       
   327 				} );
       
   328 			} else {
       
   329 				each( spaces, function( _spaceName, space ) {
       
   330 					var cache = space.cache;
       
   331 					each( space.props, function( key, prop ) {
       
   332 
       
   333 						// if the cache doesn't exist, and we know how to convert
       
   334 						if ( !inst[ cache ] && space.to ) {
       
   335 
       
   336 							// if the value was null, we don't need to copy it
       
   337 							// if the key was alpha, we don't need to copy it either
       
   338 							if ( key === "alpha" || red[ key ] == null ) {
       
   339 								return;
       
   340 							}
       
   341 							inst[ cache ] = space.to( inst._rgba );
       
   342 						}
       
   343 
       
   344 						// this is the only case where we allow nulls for ALL properties.
       
   345 						// call clamp with alwaysAllowEmpty
       
   346 						inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
       
   347 					} );
       
   348 
       
   349 					// everything defined but alpha?
       
   350 					if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
       
   351 
       
   352 						// use the default of 1
       
   353 						if ( inst[ cache ][ 3 ] == null ) {
       
   354 							inst[ cache ][ 3 ] = 1;
       
   355 						}
       
   356 
       
   357 						if ( space.from ) {
       
   358 							inst._rgba = space.from( inst[ cache ] );
       
   359 						}
       
   360 					}
       
   361 				} );
       
   362 			}
       
   363 			return this;
       
   364 		}
       
   365 	},
       
   366 	is: function( compare ) {
       
   367 		var is = color( compare ),
       
   368 			same = true,
       
   369 			inst = this;
       
   370 
       
   371 		each( spaces, function( _, space ) {
       
   372 			var localCache,
       
   373 				isCache = is[ space.cache ];
       
   374 			if ( isCache ) {
       
   375 				localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
       
   376 				each( space.props, function( _, prop ) {
       
   377 					if ( isCache[ prop.idx ] != null ) {
       
   378 						same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
       
   379 						return same;
       
   380 					}
       
   381 				} );
       
   382 			}
       
   383 			return same;
       
   384 		} );
       
   385 		return same;
       
   386 	},
       
   387 	_space: function() {
       
   388 		var used = [],
       
   389 			inst = this;
       
   390 		each( spaces, function( spaceName, space ) {
       
   391 			if ( inst[ space.cache ] ) {
       
   392 				used.push( spaceName );
       
   393 			}
       
   394 		} );
       
   395 		return used.pop();
       
   396 	},
       
   397 	transition: function( other, distance ) {
       
   398 		var end = color( other ),
       
   399 			spaceName = end._space(),
       
   400 			space = spaces[ spaceName ],
       
   401 			startColor = this.alpha() === 0 ? color( "transparent" ) : this,
       
   402 			start = startColor[ space.cache ] || space.to( startColor._rgba ),
       
   403 			result = start.slice();
       
   404 
       
   405 		end = end[ space.cache ];
       
   406 		each( space.props, function( _key, prop ) {
       
   407 			var index = prop.idx,
       
   408 				startValue = start[ index ],
       
   409 				endValue = end[ index ],
       
   410 				type = propTypes[ prop.type ] || {};
       
   411 
       
   412 			// if null, don't override start value
       
   413 			if ( endValue === null ) {
       
   414 				return;
       
   415 			}
       
   416 
       
   417 			// if null - use end
       
   418 			if ( startValue === null ) {
       
   419 				result[ index ] = endValue;
       
   420 			} else {
       
   421 				if ( type.mod ) {
       
   422 					if ( endValue - startValue > type.mod / 2 ) {
       
   423 						startValue += type.mod;
       
   424 					} else if ( startValue - endValue > type.mod / 2 ) {
       
   425 						startValue -= type.mod;
       
   426 					}
       
   427 				}
       
   428 				result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
       
   429 			}
       
   430 		} );
       
   431 		return this[ spaceName ]( result );
       
   432 	},
       
   433 	blend: function( opaque ) {
       
   434 
       
   435 		// if we are already opaque - return ourself
       
   436 		if ( this._rgba[ 3 ] === 1 ) {
       
   437 			return this;
       
   438 		}
       
   439 
       
   440 		var rgb = this._rgba.slice(),
       
   441 			a = rgb.pop(),
       
   442 			blend = color( opaque )._rgba;
       
   443 
       
   444 		return color( jQuery.map( rgb, function( v, i ) {
       
   445 			return ( 1 - a ) * blend[ i ] + a * v;
       
   446 		} ) );
       
   447 	},
       
   448 	toRgbaString: function() {
       
   449 		var prefix = "rgba(",
       
   450 			rgba = jQuery.map( this._rgba, function( v, i ) {
       
   451 				if ( v != null ) {
       
   452 					return v;
       
   453 				}
       
   454 				return i > 2 ? 1 : 0;
       
   455 			} );
       
   456 
       
   457 		if ( rgba[ 3 ] === 1 ) {
       
   458 			rgba.pop();
       
   459 			prefix = "rgb(";
       
   460 		}
       
   461 
       
   462 		return prefix + rgba.join() + ")";
       
   463 	},
       
   464 	toHslaString: function() {
       
   465 		var prefix = "hsla(",
       
   466 			hsla = jQuery.map( this.hsla(), function( v, i ) {
       
   467 				if ( v == null ) {
       
   468 					v = i > 2 ? 1 : 0;
       
   469 				}
       
   470 
       
   471 				// catch 1 and 2
       
   472 				if ( i && i < 3 ) {
       
   473 					v = Math.round( v * 100 ) + "%";
       
   474 				}
       
   475 				return v;
       
   476 			} );
       
   477 
       
   478 		if ( hsla[ 3 ] === 1 ) {
       
   479 			hsla.pop();
       
   480 			prefix = "hsl(";
       
   481 		}
       
   482 		return prefix + hsla.join() + ")";
       
   483 	},
       
   484 	toHexString: function( includeAlpha ) {
       
   485 		var rgba = this._rgba.slice(),
       
   486 			alpha = rgba.pop();
       
   487 
       
   488 		if ( includeAlpha ) {
       
   489 			rgba.push( ~~( alpha * 255 ) );
       
   490 		}
       
   491 
       
   492 		return "#" + jQuery.map( rgba, function( v ) {
       
   493 
       
   494 			// default to 0 when nulls exist
       
   495 			v = ( v || 0 ).toString( 16 );
       
   496 			return v.length === 1 ? "0" + v : v;
       
   497 		} ).join( "" );
       
   498 	},
       
   499 	toString: function() {
       
   500 		return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
       
   501 	}
       
   502 } );
       
   503 color.fn.parse.prototype = color.fn;
       
   504 
       
   505 // hsla conversions adapted from:
       
   506 // https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
       
   507 
       
   508 function hue2rgb( p, q, h ) {
       
   509 	h = ( h + 1 ) % 1;
       
   510 	if ( h * 6 < 1 ) {
       
   511 		return p + ( q - p ) * h * 6;
       
   512 	}
       
   513 	if ( h * 2 < 1 ) {
       
   514 		return q;
       
   515 	}
       
   516 	if ( h * 3 < 2 ) {
       
   517 		return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6;
       
   518 	}
       
   519 	return p;
       
   520 }
       
   521 
       
   522 spaces.hsla.to = function( rgba ) {
       
   523 	if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
       
   524 		return [ null, null, null, rgba[ 3 ] ];
       
   525 	}
       
   526 	var r = rgba[ 0 ] / 255,
       
   527 		g = rgba[ 1 ] / 255,
       
   528 		b = rgba[ 2 ] / 255,
       
   529 		a = rgba[ 3 ],
       
   530 		max = Math.max( r, g, b ),
       
   531 		min = Math.min( r, g, b ),
       
   532 		diff = max - min,
       
   533 		add = max + min,
       
   534 		l = add * 0.5,
       
   535 		h, s;
       
   536 
       
   537 	if ( min === max ) {
       
   538 		h = 0;
       
   539 	} else if ( r === max ) {
       
   540 		h = ( 60 * ( g - b ) / diff ) + 360;
       
   541 	} else if ( g === max ) {
       
   542 		h = ( 60 * ( b - r ) / diff ) + 120;
       
   543 	} else {
       
   544 		h = ( 60 * ( r - g ) / diff ) + 240;
       
   545 	}
       
   546 
       
   547 	// chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
       
   548 	// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
       
   549 	if ( diff === 0 ) {
       
   550 		s = 0;
       
   551 	} else if ( l <= 0.5 ) {
       
   552 		s = diff / add;
       
   553 	} else {
       
   554 		s = diff / ( 2 - add );
       
   555 	}
       
   556 	return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ];
       
   557 };
       
   558 
       
   559 spaces.hsla.from = function( hsla ) {
       
   560 	if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
       
   561 		return [ null, null, null, hsla[ 3 ] ];
       
   562 	}
       
   563 	var h = hsla[ 0 ] / 360,
       
   564 		s = hsla[ 1 ],
       
   565 		l = hsla[ 2 ],
       
   566 		a = hsla[ 3 ],
       
   567 		q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
       
   568 		p = 2 * l - q;
       
   569 
       
   570 	return [
       
   571 		Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
       
   572 		Math.round( hue2rgb( p, q, h ) * 255 ),
       
   573 		Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
       
   574 		a
       
   575 	];
       
   576 };
       
   577 
       
   578 
       
   579 each( spaces, function( spaceName, space ) {
       
   580 	var props = space.props,
       
   581 		cache = space.cache,
       
   582 		to = space.to,
       
   583 		from = space.from;
       
   584 
       
   585 	// makes rgba() and hsla()
       
   586 	color.fn[ spaceName ] = function( value ) {
       
   587 
       
   588 		// generate a cache for this space if it doesn't exist
       
   589 		if ( to && !this[ cache ] ) {
       
   590 			this[ cache ] = to( this._rgba );
       
   591 		}
       
   592 		if ( value === undefined ) {
       
   593 			return this[ cache ].slice();
       
   594 		}
       
   595 
       
   596 		var ret,
       
   597 			type = getType( value ),
       
   598 			arr = ( type === "array" || type === "object" ) ? value : arguments,
       
   599 			local = this[ cache ].slice();
       
   600 
       
   601 		each( props, function( key, prop ) {
       
   602 			var val = arr[ type === "object" ? key : prop.idx ];
       
   603 			if ( val == null ) {
       
   604 				val = local[ prop.idx ];
       
   605 			}
       
   606 			local[ prop.idx ] = clamp( val, prop );
       
   607 		} );
       
   608 
       
   609 		if ( from ) {
       
   610 			ret = color( from( local ) );
       
   611 			ret[ cache ] = local;
       
   612 			return ret;
       
   613 		} else {
       
   614 			return color( local );
       
   615 		}
       
   616 	};
       
   617 
       
   618 	// makes red() green() blue() alpha() hue() saturation() lightness()
       
   619 	each( props, function( key, prop ) {
       
   620 
       
   621 		// alpha is included in more than one space
       
   622 		if ( color.fn[ key ] ) {
       
   623 			return;
       
   624 		}
       
   625 		color.fn[ key ] = function( value ) {
       
   626 			var local, cur, match, fn,
       
   627 				vtype = getType( value );
       
   628 
       
   629 			if ( key === "alpha" ) {
       
   630 				fn = this._hsla ? "hsla" : "rgba";
       
   631 			} else {
       
   632 				fn = spaceName;
       
   633 			}
       
   634 			local = this[ fn ]();
       
   635 			cur = local[ prop.idx ];
       
   636 
       
   637 			if ( vtype === "undefined" ) {
       
   638 				return cur;
       
   639 			}
       
   640 
       
   641 			if ( vtype === "function" ) {
       
   642 				value = value.call( this, cur );
       
   643 				vtype = getType( value );
       
   644 			}
       
   645 			if ( value == null && prop.empty ) {
       
   646 				return this;
       
   647 			}
       
   648 			if ( vtype === "string" ) {
       
   649 				match = rplusequals.exec( value );
       
   650 				if ( match ) {
       
   651 					value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
       
   652 				}
       
   653 			}
       
   654 			local[ prop.idx ] = value;
       
   655 			return this[ fn ]( local );
       
   656 		};
       
   657 	} );
       
   658 } );
       
   659 
       
   660 // add cssHook and .fx.step function for each named hook.
       
   661 // accept a space separated string of properties
       
   662 color.hook = function( hook ) {
       
   663 	var hooks = hook.split( " " );
       
   664 	each( hooks, function( _i, hook ) {
       
   665 		jQuery.cssHooks[ hook ] = {
       
   666 			set: function( elem, value ) {
       
   667 				var parsed, curElem,
       
   668 					backgroundColor = "";
       
   669 
       
   670 				if ( value !== "transparent" && ( getType( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
       
   671 					value = color( parsed || value );
       
   672 					if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
       
   673 						curElem = hook === "backgroundColor" ? elem.parentNode : elem;
       
   674 						while (
       
   675 							( backgroundColor === "" || backgroundColor === "transparent" ) &&
       
   676 							curElem && curElem.style
       
   677 						) {
       
   678 							try {
       
   679 								backgroundColor = jQuery.css( curElem, "backgroundColor" );
       
   680 								curElem = curElem.parentNode;
       
   681 							} catch ( e ) {
       
   682 							}
       
   683 						}
       
   684 
       
   685 						value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
       
   686 							backgroundColor :
       
   687 							"_default" );
       
   688 					}
       
   689 
       
   690 					value = value.toRgbaString();
       
   691 				}
       
   692 				try {
       
   693 					elem.style[ hook ] = value;
       
   694 				} catch ( e ) {
       
   695 
       
   696 					// wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
       
   697 				}
       
   698 			}
       
   699 		};
       
   700 		jQuery.fx.step[ hook ] = function( fx ) {
       
   701 			if ( !fx.colorInit ) {
       
   702 				fx.start = color( fx.elem, hook );
       
   703 				fx.end = color( fx.end );
       
   704 				fx.colorInit = true;
       
   705 			}
       
   706 			jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
       
   707 		};
       
   708 	} );
       
   709 
       
   710 };
       
   711 
       
   712 color.hook( stepHooks );
       
   713 
       
   714 jQuery.cssHooks.borderColor = {
       
   715 	expand: function( value ) {
       
   716 		var expanded = {};
       
   717 
       
   718 		each( [ "Top", "Right", "Bottom", "Left" ], function( _i, part ) {
       
   719 			expanded[ "border" + part + "Color" ] = value;
       
   720 		} );
       
   721 		return expanded;
       
   722 	}
       
   723 };
       
   724 
       
   725 // Basic color names only.
       
   726 // Usage of any of the other color names requires adding yourself or including
       
   727 // jquery.color.svg-names.js.
       
   728 colors = jQuery.Color.names = {
       
   729 
       
   730 	// 4.1. Basic color keywords
       
   731 	aqua: "#00ffff",
       
   732 	black: "#000000",
       
   733 	blue: "#0000ff",
       
   734 	fuchsia: "#ff00ff",
       
   735 	gray: "#808080",
       
   736 	green: "#008000",
       
   737 	lime: "#00ff00",
       
   738 	maroon: "#800000",
       
   739 	navy: "#000080",
       
   740 	olive: "#808000",
       
   741 	purple: "#800080",
       
   742 	red: "#ff0000",
       
   743 	silver: "#c0c0c0",
       
   744 	teal: "#008080",
       
   745 	white: "#ffffff",
       
   746 	yellow: "#ffff00",
       
   747 
       
   748 	// 4.2.3. "transparent" color keyword
       
   749 	transparent: [ null, null, null, 0 ],
       
   750 
       
   751 	_default: "#ffffff"
       
   752 };
       
   753 
       
   754 
    37 
   755 var dataSpace = "ui-effects-",
    38 var dataSpace = "ui-effects-",
   756 	dataSpaceStyle = "ui-effects-style",
    39 	dataSpaceStyle = "ui-effects-style",
   757 	dataSpaceAnimated = "ui-effects-animated";
    40 	dataSpaceAnimated = "ui-effects-animated";
   758 
    41 
   810 			if ( typeof style[ key ] === "string" ) {
    93 			if ( typeof style[ key ] === "string" ) {
   811 				styles[ camelCase( key ) ] = style[ key ];
    94 				styles[ camelCase( key ) ] = style[ key ];
   812 			}
    95 			}
   813 		}
    96 		}
   814 
    97 
   815 		// Support: Opera, IE <9
    98 	// Support: Opera, IE <9
   816 	} else {
    99 	} else {
   817 		for ( key in style ) {
   100 		for ( key in style ) {
   818 			if ( typeof style[ key ] === "string" ) {
   101 			if ( typeof style[ key ] === "string" ) {
   819 				styles[ key ] = style[ key ];
   102 				styles[ key ] = style[ key ];
   820 			}
   103 			}
  1117 		}
   400 		}
  1118 	} );
   401 	} );
  1119 }
   402 }
  1120 
   403 
  1121 $.extend( $.effects, {
   404 $.extend( $.effects, {
  1122 	version: "1.13.1",
   405 	version: "1.13.3",
  1123 
   406 
  1124 	define: function( name, mode, effect ) {
   407 	define: function( name, mode, effect ) {
  1125 		if ( !effect ) {
   408 		if ( !effect ) {
  1126 			effect = mode;
   409 			effect = mode;
  1127 			mode = "effect";
   410 			mode = "effect";
  1199 	// Translates a [top,left] array into a baseline value
   482 	// Translates a [top,left] array into a baseline value
  1200 	getBaseline: function( origin, original ) {
   483 	getBaseline: function( origin, original ) {
  1201 		var y, x;
   484 		var y, x;
  1202 
   485 
  1203 		switch ( origin[ 0 ] ) {
   486 		switch ( origin[ 0 ] ) {
  1204 			case "top":
   487 		case "top":
  1205 				y = 0;
   488 			y = 0;
  1206 				break;
   489 			break;
  1207 			case "middle":
   490 		case "middle":
  1208 				y = 0.5;
   491 			y = 0.5;
  1209 				break;
   492 			break;
  1210 			case "bottom":
   493 		case "bottom":
  1211 				y = 1;
   494 			y = 1;
  1212 				break;
   495 			break;
  1213 			default:
   496 		default:
  1214 				y = origin[ 0 ] / original.height;
   497 			y = origin[ 0 ] / original.height;
  1215 		}
   498 		}
  1216 
   499 
  1217 		switch ( origin[ 1 ] ) {
   500 		switch ( origin[ 1 ] ) {
  1218 			case "left":
   501 		case "left":
  1219 				x = 0;
   502 			x = 0;
  1220 				break;
   503 			break;
  1221 			case "center":
   504 		case "center":
  1222 				x = 0.5;
   505 			x = 0.5;
  1223 				break;
   506 			break;
  1224 			case "right":
   507 		case "right":
  1225 				x = 1;
   508 			x = 1;
  1226 				break;
   509 			break;
  1227 			default:
   510 		default:
  1228 				x = origin[ 1 ] / original.width;
   511 			x = origin[ 1 ] / original.width;
  1229 		}
   512 		}
  1230 
   513 
  1231 		return {
   514 		return {
  1232 			x: x,
   515 			x: x,
  1233 			y: y
   516 			y: y
  1240 			cssPosition = element.css( "position" ),
   523 			cssPosition = element.css( "position" ),
  1241 			position = element.position();
   524 			position = element.position();
  1242 
   525 
  1243 		// Lock in margins first to account for form elements, which
   526 		// Lock in margins first to account for form elements, which
  1244 		// will change margin if you explicitly set height
   527 		// will change margin if you explicitly set height
  1245 		// see: http://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380
   528 		// see: https://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380
  1246 		// Support: Safari
   529 		// Support: Safari
  1247 		element.css( {
   530 		element.css( {
  1248 			marginTop: element.css( "marginTop" ),
   531 			marginTop: element.css( "marginTop" ),
  1249 			marginBottom: element.css( "marginBottom" ),
   532 			marginBottom: element.css( "marginBottom" ),
  1250 			marginLeft: element.css( "marginLeft" ),
   533 			marginLeft: element.css( "marginLeft" ),
  1251 			marginRight: element.css( "marginRight" )
   534 			marginRight: element.css( "marginRight" )
  1252 		} )
   535 		} )
  1253 			.outerWidth( element.outerWidth() )
   536 		.outerWidth( element.outerWidth() )
  1254 			.outerHeight( element.outerHeight() );
   537 		.outerHeight( element.outerHeight() );
  1255 
   538 
  1256 		if ( /^(static|relative)/.test( cssPosition ) ) {
   539 		if ( /^(static|relative)/.test( cssPosition ) ) {
  1257 			cssPosition = "absolute";
   540 			cssPosition = "absolute";
  1258 
   541 
  1259 			placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( {
   542 			placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( {
  1270 				marginBottom: element.css( "marginBottom" ),
   553 				marginBottom: element.css( "marginBottom" ),
  1271 				marginLeft: element.css( "marginLeft" ),
   554 				marginLeft: element.css( "marginLeft" ),
  1272 				marginRight: element.css( "marginRight" ),
   555 				marginRight: element.css( "marginRight" ),
  1273 				"float": element.css( "float" )
   556 				"float": element.css( "float" )
  1274 			} )
   557 			} )
  1275 				.outerWidth( element.outerWidth() )
   558 			.outerWidth( element.outerWidth() )
  1276 				.outerHeight( element.outerHeight() )
   559 			.outerHeight( element.outerHeight() )
  1277 				.addClass( "ui-effects-placeholder" );
   560 			.addClass( "ui-effects-placeholder" );
  1278 
   561 
  1279 			element.data( dataSpace + "placeholder", placeholder );
   562 			element.data( dataSpace + "placeholder", placeholder );
  1280 		}
   563 		}
  1281 
   564 
  1282 		element.css( {
   565 		element.css( {
  1288 		return placeholder;
   571 		return placeholder;
  1289 	},
   572 	},
  1290 
   573 
  1291 	removePlaceholder: function( element ) {
   574 	removePlaceholder: function( element ) {
  1292 		var dataKey = dataSpace + "placeholder",
   575 		var dataKey = dataSpace + "placeholder",
  1293 			placeholder = element.data( dataKey );
   576 				placeholder = element.data( dataKey );
  1294 
   577 
  1295 		if ( placeholder ) {
   578 		if ( placeholder ) {
  1296 			placeholder.remove();
   579 			placeholder.remove();
  1297 			element.removeData( dataKey );
   580 			element.removeData( dataKey );
  1298 		}
   581 		}
  1360 	}
   643 	}
  1361 
   644 
  1362 	speed = speed || options.duration;
   645 	speed = speed || options.duration;
  1363 	effect.duration = $.fx.off ? 0 :
   646 	effect.duration = $.fx.off ? 0 :
  1364 		typeof speed === "number" ? speed :
   647 		typeof speed === "number" ? speed :
  1365 			speed in $.fx.speeds ? $.fx.speeds[ speed ] :
   648 		speed in $.fx.speeds ? $.fx.speeds[ speed ] :
  1366 				$.fx.speeds._default;
   649 		$.fx.speeds._default;
  1367 
   650 
  1368 	effect.complete = callback || options.complete;
   651 	effect.complete = callback || options.complete;
  1369 
   652 
  1370 	return effect;
   653 	return effect;
  1371 }
   654 }
  1418 				// as the .show() below destroys the initial state
   701 				// as the .show() below destroys the initial state
  1419 				modes.push( normalizedMode );
   702 				modes.push( normalizedMode );
  1420 
   703 
  1421 				// See $.uiBackCompat inside of run() for removal of defaultMode in 1.14
   704 				// See $.uiBackCompat inside of run() for removal of defaultMode in 1.14
  1422 				if ( defaultMode && ( normalizedMode === "show" ||
   705 				if ( defaultMode && ( normalizedMode === "show" ||
  1423 					( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) {
   706 						( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) {
  1424 					el.show();
   707 					el.show();
  1425 				}
   708 				}
  1426 
   709 
  1427 				if ( !defaultMode || normalizedMode !== "none" ) {
   710 				if ( !defaultMode || normalizedMode !== "none" ) {
  1428 					$.effects.saveStyle( el );
   711 					$.effects.saveStyle( el );
  1596 			} );
   879 			} );
  1597 	}
   880 	}
  1598 } );
   881 } );
  1599 
   882 
  1600 function parseClip( str, element ) {
   883 function parseClip( str, element ) {
  1601 	var outerWidth = element.outerWidth(),
   884 		var outerWidth = element.outerWidth(),
  1602 		outerHeight = element.outerHeight(),
   885 			outerHeight = element.outerHeight(),
  1603 		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)\)$/,
   886 			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)\)$/,
  1604 		values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ];
   887 			values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ];
  1605 
   888 
  1606 	return {
   889 		return {
  1607 		top: parseFloat( values[ 1 ] ) || 0,
   890 			top: parseFloat( values[ 1 ] ) || 0,
  1608 		right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ),
   891 			right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ),
  1609 		bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ),
   892 			bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ),
  1610 		left: parseFloat( values[ 4 ] ) || 0
   893 			left: parseFloat( values[ 4 ] ) || 0
  1611 	};
   894 		};
  1612 }
   895 }
  1613 
   896 
  1614 $.fx.step.clip = function( fx ) {
   897 $.fx.step.clip = function( fx ) {
  1615 	if ( !fx.clipInit ) {
   898 	if ( !fx.clipInit ) {
  1616 		fx.start = $( fx.elem ).cssClip();
   899 		fx.start = $( fx.elem ).cssClip();
  1634 /*********************************** EASING ***********************************/
   917 /*********************************** EASING ***********************************/
  1635 /******************************************************************************/
   918 /******************************************************************************/
  1636 
   919 
  1637 ( function() {
   920 ( function() {
  1638 
   921 
  1639 // Based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
   922 // Based on easing equations from Robert Penner (http://robertpenner.com/easing)
  1640 
   923 
  1641 var baseEasings = {};
   924 var baseEasings = {};
  1642 
   925 
  1643 $.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
   926 $.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
  1644 	baseEasings[ name ] = function( p ) {
   927 	baseEasings[ name ] = function( p ) {