/** * @license * Cesium - https://github.com/CesiumGS/cesium * Version 1.97 * * Copyright 2011-2022 Cesium Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Columbus View (Pat. Pend.) * * Portions licensed separately. * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ define(["exports","./Matrix2-276d97d2","./defaultValue-a6eb9f34","./Transforms-0c3fa360"],(function(t,e,n,i){"use strict";function h(t,e,i,h){this.x=n.defaultValue(t,0),this.y=n.defaultValue(e,0),this.width=n.defaultValue(i,0),this.height=n.defaultValue(h,0)}h.packedLength=4,h.pack=function(t,e,i){return i=n.defaultValue(i,0),e[i++]=t.x,e[i++]=t.y,e[i++]=t.width,e[i]=t.height,e},h.unpack=function(t,e,i){return e=n.defaultValue(e,0),n.defined(i)||(i=new h),i.x=t[e++],i.y=t[e++],i.width=t[e++],i.height=t[e],i},h.fromPoints=function(t,e){if(n.defined(e)||(e=new h),!n.defined(t)||0===t.length)return e.x=0,e.y=0,e.width=0,e.height=0,e;const i=t.length;let r=t[0].x,d=t[0].y,u=t[0].x,a=t[0].y;for(let e=1;en.width?n.width=i:i<0&&(n.width-=i,n.x=e.x),r>n.height?n.height=r:r<0&&(n.height-=r,n.y=e.y),n},h.intersect=function(t,e){const n=t.x,h=t.y,r=e.x,d=e.y;return n>r+e.width||n+t.widthd+e.height?i.Intersect.OUTSIDE:i.Intersect.INTERSECTING},h.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height},h.prototype.clone=function(t){return h.clone(this,t)},h.prototype.intersect=function(t){return h.intersect(this,t)},h.prototype.equals=function(t){return h.equals(this,t)},t.BoundingRectangle=h}));