lg_frontend/static/libs/mars3d-cesium/Workers/chunk-CAREXCTE.js

31 lines
42 KiB
JavaScript
Raw Permalink Normal View History

/**
* @license
* Cesium - https://github.com/CesiumGS/cesium
* Version 1.114
*
* 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.
*/
import{a as L,b as u,c as H,d as jn,e as on}from"./chunk-6A72MMRO.js";import{a as d}from"./chunk-4BEFMW7D.js";import{a as Rn}from"./chunk-72JWF3LF.js";import{a as T}from"./chunk-2F4MHS2T.js";import{a as J,b as y}from"./chunk-3Z2AZRQC.js";import{e as z}from"./chunk-A5XXOFX2.js";function h(n,o,c,f){this.x=T(n,0),this.y=T(o,0),this.z=T(c,0),this.w=T(f,0)}h.fromElements=function(n,o,c,f,O){return z(O)?(O.x=n,O.y=o,O.z=c,O.w=f,O):new h(n,o,c,f)};h.fromColor=function(n,o){return y.typeOf.object("color",n),z(o)?(o.x=n.red,o.y=n.green,o.z=n.blue,o.w=n.alpha,o):new h(n.red,n.green,n.blue,n.alpha)};h.clone=function(n,o){if(z(n))return z(o)?(o.x=n.x,o.y=n.y,o.z=n.z,o.w=n.w,o):new h(n.x,n.y,n.z,n.w)};h.packedLength=4;h.pack=function(n,o,c){return y.typeOf.object("value",n),y.defined("array",o),c=T(c,0),o[c++]=n.x,o[c++]=n.y,o[c++]=n.z,o[c]=n.w,o};h.unpack=function(n,o,c){return y.defined("array",n),o=T(o,0),z(c)||(c=new h),c.x=n[o++],c.y=n[o++],c.z=n[o++],c.w=n[o],c};h.packArray=function(n,o){y.defined("array",n);let c=n.length,f=c*4;if(!z(o))o=new Array(f);else{if(!Array.isArray(o)&&o.length!==f)throw new J("If result is a typed array, it must have exactly array.length * 4 elements");o.length!==f&&(o.length=f)}for(let O=0;O<c;++O)h.pack(n[O],o,O*4);return o};h.unpackArray=function(n,o){if(y.defined("array",n),y.typeOf.number.greaterThanOrEquals("array.length",n.length,4),n.length%4!==0)throw new J("array length must be a multiple of 4.");let c=n.length;z(o)?o.length=c/4:o=new Array(c/4);for(let f=0;f<c;f+=4){let O=f/4;o[O]=h.unpack(n,f,o[O])}return o};h.fromArray=h.unpack;h.maximumComponent=function(n){return y.typeOf.object("cartesian",n),Math.max(n.x,n.y,n.z,n.w)};h.minimumComponent=function(n){return y.typeOf.object("cartesian",n),Math.min(n.x,n.y,n.z,n.w)};h.minimumByComponent=function(n,o,c){return y.typeOf.object("first",n),y.typeOf.object("second",o),y.typeOf.object("result",c),c.x=Math.min(n.x,o.x),c.y=Math.min(n.y,o.y),c.z=Math.min(n.z,o.z),c.w=Math.min(n.w,o.w),c};h.maximumByComponent=function(n,o,c){return y.typeOf.object("first",n),y.typeOf.object("second",o),y.typeOf.object("result",c),c.x=Math.max(n.x,o.x),c.y=Math.max(n.y,o.y),c.z=Math.max(n.z,o.z),c.w=Math.max(n.w,o.w),c};h.clamp=function(n,o,c,f){y.typeOf.object("value",n),y.typeOf.object("min",o),y.typeOf.object("max",c),y.typeOf.object("result",f);let O=d.clamp(n.x,o.x,c.x),p=d.clamp(n.y,o.y,c.y),b=d.clamp(n.z,o.z,c.z),e=d.clamp(n.w,o.w,c.w);return f.x=O,f.y=p,f.z=b,f.w=e,f};h.magnitudeSquared=function(n){return y.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y+n.z*n.z+n.w*n.w};h.magnitude=function(n){return Math.sqrt(h.magnitudeSquared(n))};var fn=new h;h.distance=function(n,o){return y.typeOf.object("left",n),y.typeOf.object("right",o),h.subtract(n,o,fn),h.magnitude(fn)};h.distanceSquared=function(n,o){return y.typeOf.object("left",n),y.typeOf.object("right",o),h.subtract(n,o,fn),h.magnitudeSquared(fn)};h.normalize=function(n,o){y.typeOf.object("cartesian",n),y.typeOf.object("result",o);let c=h.magnitude(n);if(o.x=n.x/c,o.y=n.y/c,o.z=n.z/c,o.w=n.w/c,isNaN(o.x)||isNaN(o.y)||isNaN(o.z)||isNaN(o.w))throw new J("normalized result is not a number");return o};h.dot=function(n,o){return y.typeOf.object("left",n),y.typeOf.object("right",o),n.x*o.x+n.y*o.y+n.z*o.z+n.w*o.w};h.multiplyComponents=function(n,o,c){return y.typeOf.object("left",n),y.typeOf.object("right",o),y.typeOf.object("result",c),c.x=n.x*o.x,c.y=n.y*o.y,c.z=n.z*o.z,c.w=n.w*o.w,c};h.divideComponents=function(n,o,c){return y.typeOf.object("left",n),y.typeOf.object("right",o),y.typeOf.object("result",c),c.x=n.x/o.x,c.y=n.y/o.y,c.z=n.z/o.z,c.w=n.w/o.w,c};h.add=function(n,o,c){return y.typeOf.object("left",n),y.typeOf.object("right",o),y.typeOf.object("result",c),c.x=n.x+o.x,c.y=n.y+o.y,c.z=n.z+o.z,c.w=n.w+o.w,c};h.subtract=function(n,o,c){return y.typeOf.object("left",n),y.typeOf.object("right",o),y.typeOf.object("result",c),c.x=n.x-o.x,c.y=n.y-o.y,c.z=n.z-o.z,c.w=n.w-o.w,c};h.multiplyByScalar=function(n,o,c){return y.typeOf.object("cartesian",n),y.typeOf.number("scalar",o),y.typeOf.object("result",c),c.x=n.x*
(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})
(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})
(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`};var yo=w;function q(n,o,c,f){this.west=T(n,0),this.south=T(o,0),this.east=T(c,0),this.north=T(f,0)}Object.defineProperties(q.prototype,{width:{get:function(){return q.computeWidth(this)}},height:{get:function(){return q.computeHeight(this)}}});q.packedLength=4;q.pack=function(n,o,c){return y.typeOf.object("value",n),y.defined("array",o),c=T(c,0),o[c++]=n.west,o[c++]=n.south,o[c++]=n.east,o[c]=n.north,o};q.unpack=function(n,o,c){return y.defined("array",n),o=T(o,0),z(c)||(c=new q),c.west=n[o++],c.south=n[o++],c.east=n[o++],c.north=n[o],c};q.computeWidth=function(n){y.typeOf.object("rectangle",n);let o=n.east,c=n.west;return o<c&&(o+=d.TWO_PI),o-c};q.computeHeight=function(n){return y.typeOf.object("rectangle",n),n.north-n.south};q.fromDegrees=function(n,o,c,f,O){return n=d.toRadians(T(n,0)),o=d.toRadians(T(o,0)),c=d.toRadians(T(c,0)),f=d.toRadians(T(f,0)),z(O)?(O.west=n,O.south=o,O.east=c,O.north=f,O):new q(n,o,c,f)};q.fromRadians=function(n,o,c,f,O){return z(O)?(O.west=T(n,0),O.south=T(o,0),O.east=T(c,0),O.north=T(f,0),O):new q(n,o,c,f)};q.fromCartographicArray=function(n,o){y.defined("cartographics",n);let c=Number.MAX_VALUE,f=-Number.MAX_VALUE,O=Number.MAX_VALUE,p=-Number.MAX_VALUE,b=Number.MAX_VALUE,e=-Number.MAX_VALUE;for(let j=0,t=n.length;j<t;j++){let R=n[j];c=Math.min(c,R.longitude),f=Math.max(f,R.longitude),b=Math.min(b,R.latitude),e=Math.max(e,R.latitude);let E=R.longitude>=0?R.longitude:R.longitude+d.TWO_PI;O=Math.min(O,E),p=Math.max(p,E)}return f-c>p-O&&(c=O,f=p,f>d.PI&&(f=f-d.TWO_PI),c>d.PI&&(c=c-d.TWO_PI)),z(o)?(o.west=c,o.south=b,o.east=f,o.north=e,o):new q(c,b,f,e)};q.fromCartesianArray=function(n,o,c){y.defined("cartesians",n),o=T(o,jn.WGS84);let f=Number.MAX_VALUE,O=-Number.MAX_VALUE,p=Number.MAX_VALUE,b=-Number.MAX_VALUE,e=Number.MAX_VALUE,j=-Number.MAX_VALUE;for(let t=0,R=n.length;t<R;t++){let E=o.cartesianToCartographic(n[t]);f=Math.min(f,E.longitude),O=Math.max(O,E.longitude),e=Math.min(e,E.latitude),j=Math.max(j,E.latitude);let A=E.longitude>=0?E.longitude:E.longitude+d.TWO_PI;p=Math.min(p,A),b=Math.max(b,A)}return O-f>b-p&&(f=p,O=b,O>d.PI&&(O=O-d.TWO_PI),f>d.PI&&(f=f-d.TWO_PI)),z(c)?(c.west=f,c.south=e,c.east=O,c.north=j,c):new q(f,e,O,j)};q.clone=function(n,o){if(z(n))return z(o)?(o.west=n.west,o.south=n.south,o.east=n.east,o.north=n.north,o):new q(n.west,n.south,n.east,n.north)};q.equalsEpsilon=function(n,o,c){return c=T(c,0),n===o||z(n)&&z(o)&&Math.abs(n.west-o.west)<=c&&Math.abs(n.south-o.south)<=c&&Math.abs(n.east-o.east)<=c&&Math.abs(n.north-o.north)<=c};q.prototype.clone=function(n){return q.clone(this,n)};q.prototype.equals=function(n){return q.equals(this,n)};q.equals=function(n,o){return n===o||z(n)&&z(o)&&n.west===o.west&&n.south===o.south&&n.east===o.east&&n.north===o.north};q.prototype.equalsEpsilon=function(n,o){return q.equalsEpsilon(this,n,o)};q.validate=function(n){y.typeOf.object("rectangle",n);let o=n.north;y.typeOf.number.greaterThanOrEquals("north",o,-d.PI_OVER_TWO),y.typeOf.number.lessThanOrEquals("north",o,d.PI_OVER_TWO);let c=n.south;y.typeOf.number.greaterThanOrEquals("south",c,-d.PI_OVER_TWO),y.typeOf.number.lessThanOrEquals("south",c,d.PI_OVER_TWO);let f=n.west;y.typeOf.number.greaterThanOrEquals("west",f,-Math.PI),y.typeOf.number.lessThanOrEquals("west",f,Math.PI);let O=n.east;y.typeOf.number.greaterThanOrEquals("east",O,-Math.PI),y.typeOf.number.lessThanOrEquals("east",O,Math.PI)};q.southwest=function(n,o){return y.typeOf.object("rectangle",n),z(o)?(o.longitude=n.west,o.latitude=n.south,o.height=0,o):new u(n.west,n.south)};q.northwest=function(n,o){return y.typeOf.object("rectangle",n),z(o)?(o.longitude=n.west,o.latitude=n.north,o.height=0,o):new u(n.west,n.north)};q.northeast=function(n,o){return y.typeOf.object("rectangle",n),z(o)?(o.longitude=n.east,o.latitude=n.north,o.height=0,o):new u(n.east,n.north)};q.southeast=function(n,o){return y.typeOf.object("rectangle",n),z(o)?(o.longitude=n.east,o.latitude=n.south,o.height=0,o):new u(n.east,n.south)};q.center=function(n,o){y.typeOf.object("rectangle",n);let c=n.east,f
(${this[1]}, ${this[3]})`};var Ao=M;export{yn as a,yo as b,jo as c,Ao as d};