this.Mediasite=this.Mediasite||{},Mediasite.Geometry=Mediasite.Geometry||{},Mediasite.Geometry.Rect=function(n,t,i,r){this.left=function(){return n},this.top=function(){return t},this.width=function(){return i},this.height=function(){return r},this.bottom=function(){return t+r},this.right=function(){return n+i},this.equals=function(n){return this===n?!0:this.left()===n.left()&&this.top()===n.top()&&this.width()===n.width()&&this.height()===n.height()},this.area=function(){return i*r}},Mediasite.Geometry.Size=function(n,t){this.width=function(){return n},this.height=function(){return t},this.equals=function(n){return n?this===n?!0:this.width()===n.width()&&this.height()===n.height():!1},this.toString=function(){return"[Size "+n+"x"+t+"]"},this.area=function(){return n*t}},Mediasite.Geometry.Size._zero=new Mediasite.Geometry.Size(0,0),Mediasite.Geometry.Size.Zero=function(){return Mediasite.Geometry.Size._zero},Mediasite.Geometry.Point=function(n,t){this.x=function(){return n},this.y=function(){return t},this.equals=function(n){return n?this===n?!0:this.x()===n.x()&&this.y()===n.y():!1},this.toString=function(){return"[Point x:"+n+", y:"+t+"]"}},Mediasite.Geometry.ScaleToFit=function(n,t){var e=t.width()/t.height(),u=n.width()/n.height();if(Math.abs(e-u)<.05)return t;if(e>u){var i=t.height(),o=0,r=i*u,f=(t.width()-r)/2;return new Mediasite.Geometry.Rect(f,o,r,i)}var r=t.width(),f=0,i=r/u,o=(t.height()-i)/2;return new Mediasite.Geometry.Rect(f,o,r,i)}