1 /*! jQuery UI - v1.11.4 - 2015-03-13
3 * Copyright jQuery Foundation and other contributors; Licensed MIT */
4 (function(t
){"function"==typeof define
&&define
.amd
?define(["jquery","./effect"],t
):t(jQuery
)})(function(t
){return t
.effects
.effect
.size=function(e
,i
){var s
,n
,o
,a
=t(this),r
=["position","top","bottom","left","right","width","height","overflow","opacity"],h
=["position","top","bottom","left","right","overflow","opacity"],l
=["width","height","overflow"],c
=["fontSize"],u
=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d
=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p
=t
.effects
.setMode(a
,e
.mode
||"effect"),f
=e
.restore
||"effect"!==p
,g
=e
.scale
||"both",m
=e
.origin
||["middle","center"],v
=a
.css("position"),_
=f
?r
:h
,b
={height
:0,width
:0,outerHeight
:0,outerWidth
:0};"show"===p
&&a
.show(),s
={height
:a
.height(),width
:a
.width(),outerHeight
:a
.outerHeight(),outerWidth
:a
.outerWidth()},"toggle"===e
.mode
&&"show"===p
?(a
.from=e
.to
||b
,a
.to
=e
.from||s
):(a
.from=e
.from||("show"===p
?b
:s
),a
.to
=e
.to
||("hide"===p
?b
:s
)),o
={from:{y
:a
.from.height
/s
.height
,x
:a
.from.width
/s.width},to:{y:a.to.height/s.height
,x
:a
.to
.width
/s
.width
}},("box"===g
||"both"===g
)&&(o
.from.y
!==o
.to
.y
&&(_
=_
.concat(u
),a
.from=t
.effects
.setTransition(a
,u
,o
.from.y
,a
.from),a
.to
=t
.effects
.setTransition(a
,u
,o
.to
.y
,a
.to
)),o
.from.x
!==o
.to
.x
&&(_
=_
.concat(d
),a
.from=t
.effects
.setTransition(a
,d
,o
.from.x
,a
.from),a
.to
=t
.effects
.setTransition(a
,d
,o
.to
.x
,a
.to
))),("content"===g
||"both"===g
)&&o
.from.y
!==o
.to
.y
&&(_
=_
.concat(c
).concat(l
),a
.from=t
.effects
.setTransition(a
,c
,o
.from.y
,a
.from),a
.to
=t
.effects
.setTransition(a
,c
,o
.to
.y
,a
.to
)),t
.effects
.save(a
,_
),a
.show(),t
.effects
.createWrapper(a
),a
.css("overflow","hidden").css(a
.from),m
&&(n
=t
.effects
.getBaseline(m
,s
),a
.from.top
=(s
.outerHeight
-a
.outerHeight())*n
.y
,a
.from.left
=(s
.outerWidth
-a
.outerWidth())*n
.x
,a
.to
.top
=(s
.outerHeight
-a
.to
.outerHeight
)*n
.y
,a
.to
.left
=(s
.outerWidth
-a
.to
.outerWidth
)*n
.x
),a
.css(a
.from),("content"===g
||"both"===g
)&&(u
=u
.concat(["marginTop","marginBottom"]).concat(c
),d
=d
.concat(["marginLeft","marginRight"]),l
=r
.concat(u
).concat(d
),a
.find("*[width]").each(function(){var i
=t(this),s
={height
:i
.height(),width
:i
.width(),outerHeight
:i
.outerHeight(),outerWidth
:i
.outerWidth()};f
&&t
.effects
.save(i
,l
),i
.from={height
:s
.height
*o
.from.y
,width
:s
.width
*o
.from.x
,outerHeight
:s
.outerHeight
*o
.from.y
,outerWidth
:s
.outerWidth
*o
.from.x
},i
.to
={height
:s
.height
*o
.to
.y
,width
:s
.width
*o
.to
.x
,outerHeight
:s
.height
*o
.to
.y
,outerWidth
:s
.width
*o
.to
.x
},o
.from.y
!==o
.to
.y
&&(i
.from=t
.effects
.setTransition(i
,u
,o
.from.y
,i
.from),i
.to
=t
.effects
.setTransition(i
,u
,o
.to
.y
,i
.to
)),o
.from.x
!==o
.to
.x
&&(i
.from=t
.effects
.setTransition(i
,d
,o
.from.x
,i
.from),i
.to
=t
.effects
.setTransition(i
,d
,o
.to
.x
,i
.to
)),i
.css(i
.from),i
.animate(i
.to
,e
.duration
,e
.easing
,function(){f
&&t
.effects
.restore(i
,l
)})})),a
.animate(a
.to
,{queue
:!1,duration
:e
.duration
,easing
:e
.easing
,complete:function(){0===a
.to
.opacity
&&a
.css("opacity",a
.from.opacity
),"hide"===p
&&a
.hide(),t
.effects
.restore(a
,_
),f
||("static"===v
?a
.css({position
:"relative",top
:a
.to
.top
,left
:a
.to
.left
}):t
.each(["top","left"],function(t
,e
){a
.css(e
,function(e
,i
){var s
=parseInt(i
,10),n
=t
?a
.to
.left
:a
.to
.top
;return"auto"===i
?n
+"px":s
+n
+"px"})})),t
.effects
.removeWrapper(a
),i()}})}});