YUI.add("align-plugin",function(g,t){var d="offsetWidth",p="offsetHeight";function A(t){t.host&&(this._host=t.host)}A.prototype={to:function(t,n,i,e){var r,o,s,c,h,u,a,f,l;return this._syncArgs=g.Array(arguments),(t=void 0===t.top?g.one(t).get("region"):t)&&(r=[t.left,t.top],o=[t.width,t.height],l=A.points,c=null,h=[0-(h=(s=this._host).getAttrs([p,d]))[d],0-h[p]],u=n?l[n.charAt(0)]:c,a=n&&"cc"!==n?l[n.charAt(1)]:c,f=i?l[i.charAt(0)]:c,l=i&&"cc"!==i?l[i.charAt(1)]:c,u&&(r=u(r,o,n)),a&&(r=a(r,o,n)),f&&(r=f(r,h,i)),(r=l?l(r,h,i):r)&&s&&s.setXY(r),this._resize(e)),this},sync:function(){return this.to.apply(this,this._syncArgs),this},_resize:function(t){var n=this._handle;t&&!n?this._handle=g.on("resize",this._onresize,window,this):!t&&n&&n.detach()},_onresize:function(){var t=this;setTimeout(function(){t.sync()})},center:function(t,n){return this.to(t,"cc","cc",n),this},destroy:function(){var t=this._handle;t&&t.detach()}},A.points={t:function(t,n){return t},r:function(t,n){return[t[0]+n[0],t[1]]},b:function(t,n){return[t[0],t[1]+n[1]]},l:function(t,n){return t},c:function(t,n,i){var e="t"===i[0]||"b"===i[0]?0:1,n="cc"===i?[t[0]+n[0]/2,t[1]+n[1]/2]:(i=t[e]+n[e]/2,e?[t[0],i]:[i,t[1]]);return n}},A.NAME="Align",A.NS="align",A.prototype.constructor=A,g.namespace("Plugin"),g.Plugin.Align=A},"patched-v3.18.3",{requires:["node-screen","node-pluginhost"]});