NONGYESHUZIDIZUO/public/Cesium/Workers/buildModuleUrl-dba4ec07.js

27 lines
43 KiB
JavaScript
Raw Normal View History

2025-01-21 08:36:33 +08:00
define(["exports","./Cartographic-1bbcab04","./Check-3aa71481","./when-515d5295","./Rectangle-e170be8b","./Intersect-53434a77","./Math-5e38123d","./PrimitiveType-b38a4004","./Event-9821f5d9","./RuntimeError-350acae3"],(function(e,t,r,n,a,i,o,s,u,c){"use strict";function p(e,t){this.start=n.e(e,0),this.stop=n.e(t,0)}function f(e,r){this.center=t.a.clone(n.e(e,t.a.ZERO)),this.radius=n.e(r,0)}var l=new t.a,h=new t.a,d=new t.a,m=new t.a,y=new t.a,v=new t.a,g=new t.a,q=new t.a,b=new t.a,w=new t.a,R=new t.a,O=new t.a,A=4/3*o.n.PI;f.fromPoints=function(e,r){if(n.t(r)||(r=new f),!n.t(e)||0===e.length)return r.center=t.a.clone(t.a.ZERO,r.center),r.radius=0,r;var a,i=t.a.clone(e[0],g),o=t.a.clone(i,l),s=t.a.clone(i,h),u=t.a.clone(i,d),c=t.a.clone(i,m),p=t.a.clone(i,y),A=t.a.clone(i,v),x=e.length;for(a=1;a<x;a++){t.a.clone(e[a],i);var S=i.x,E=i.y,_=i.z;S<o.x&&t.a.clone(i,o),S>c.x&&t.a.clone(i,c),E<s.y&&t.a.clone(i,s),E>p.y&&t.a.clone(i,p),_<u.z&&t.a.clone(i,u),_>A.z&&t.a.clone(i,A)}var C=t.a.magnitudeSquared(t.a.subtract(c,o,q)),I=t.a.magnitudeSquared(t.a.subtract(p,s,q)),T=t.a.magnitudeSquared(t.a.subtract(A,u,q)),P=o,U=c,B=C;I>B&&(B=I,P=s,U=p),T>B&&(B=T,P=u,U=A);var k=b;k.x=.5*(P.x+U.x),k.y=.5*(P.y+U.y),k.z=.5*(P.z+U.z);var j=t.a.magnitudeSquared(t.a.subtract(U,k,q)),D=Math.sqrt(j),z=w;z.x=o.x,z.y=s.y,z.z=u.z;var L=R;L.x=c.x,L.y=p.y,L.z=A.z;var K=t.a.midpoint(z,L,O),M=0;for(a=0;a<x;a++){t.a.clone(e[a],i);var F=t.a.magnitude(t.a.subtract(i,K,q));F>M&&(M=F);var N=t.a.magnitudeSquared(t.a.subtract(i,k,q));if(N>j){var H=Math.sqrt(N);j=(D=.5*(D+H))*D;var V=H-D;k.x=(D*k.x+V*i.x)/H,k.y=(D*k.y+V*i.y)/H,k.z=(D*k.z+V*i.z)/H}}return D<M?(t.a.clone(k,r.center),r.radius=D):(t.a.clone(K,r.center),r.radius=M),r};var x=new i.s,S=new t.a,E=new t.a,_=new t.i,C=new t.i;f.fromRectangle2D=function(e,t,r){return f.fromRectangleWithHeights2D(e,t,0,0,r)},f.fromRectangleWithHeights2D=function(e,r,i,o,s){if(n.t(s)||(s=new f),!n.t(e))return s.center=t.a.clone(t.a.ZERO,s.center),s.radius=0,s;r=n.e(r,x),a.s.southwest(e,_),_.height=i,a.s.northeast(e,C),C.height=o;var u=r.project(_,S),c=r.project(C,E),p=c.x-u.x,l=c.y-u.y,h=c.z-u.z;s.radius=.5*Math.sqrt(p*p+l*l+h*h);var d=s.center;return d.x=u.x+.5*p,d.y=u.y+.5*l,d.z=u.z+.5*h,s};var I=[];f.fromRectangle3D=function(e,r,i,o){if(r=n.e(r,a.n.WGS84),i=n.e(i,0),n.t(o)||(o=new f),!n.t(e))return o.center=t.a.clone(t.a.ZERO,o.center),o.radius=0,o;var s=a.s.subsample(e,r,i,I);return f.fromPoints(s,o)},f.fromVertices=function(e,a,i,o){if(n.t(o)||(o=new f),!n.t(e)||0===e.length)return o.center=t.a.clone(t.a.ZERO,o.center),o.radius=0,o;a=n.e(a,t.a.ZERO),i=n.e(i,3),r.n.typeOf.number.greaterThanOrEquals("stride",i,3);var s=g;s.x=e[0]+a.x,s.y=e[1]+a.y,s.z=e[2]+a.z;var u,c=t.a.clone(s,l),p=t.a.clone(s,h),A=t.a.clone(s,d),x=t.a.clone(s,m),S=t.a.clone(s,y),E=t.a.clone(s,v),_=e.length;for(u=0;u<_;u+=i){var C=e[u]+a.x,I=e[u+1]+a.y,T=e[u+2]+a.z;s.x=C,s.y=I,s.z=T,C<c.x&&t.a.clone(s,c),C>x.x&&t.a.clone(s,x),I<p.y&&t.a.clone(s,p),I>S.y&&t.a.clone(s,S),T<A.z&&t.a.clone(s,A),T>E.z&&t.a.clone(s,E)}var P=t.a.magnitudeSquared(t.a.subtract(x,c,q)),U=t.a.magnitudeSquared(t.a.subtract(S,p,q)),B=t.a.magnitudeSquared(t.a.subtract(E,A,q)),k=c,j=x,D=P;U>D&&(D=U,k=p,j=S),B>D&&(D=B,k=A,j=E);var z=b;z.x=.5*(k.x+j.x),z.y=.5*(k.y+j.y),z.z=.5*(k.z+j.z);var L=t.a.magnitudeSquared(t.a.subtract(j,z,q)),K=Math.sqrt(L),M=w;M.x=c.x,M.y=p.y,M.z=A.z;var F=R;F.x=x.x,F.y=S.y,F.z=E.z;var N=t.a.midpoint(M,F,O),H=0;for(u=0;u<_;u+=i){s.x=e[u]+a.x,s.y=e[u+1]+a.y,s.z=e[u+2]+a.z;var V=t.a.magnitude(t.a.subtract(s,N,q));V>H&&(H=V);var Y=t.a.magnitudeSquared(t.a.subtract(s,z,q));if(Y>L){var J=Math.sqrt(Y);L=(K=.5*(K+J))*K;var X=J-K;z.x=(K*z.x+X*s.x)/J,z.y=(K*z.y+X*s.y)/J,z.z=(K*z.z+X*s.z)/J}}return K<H?(t.a.clone(z,o.center),o.radius=K):(t.a.clone(N,o.center),o.radius=H),o},f.fromEncodedCartesianVertices=function(e,r,a){if(n.t(a)||(a=new f),!n.t(e)||!n.t(r)||e.length!==r.length||0===e.length)return a.center=t.a.clone(t.a.ZERO,a.center),a.radius=0,a;var i=g;i.x=e[0]+r[0],i.y=e[1]+r[1],i.z=e[2]+r[2];var o,s=t.a.clone(i,l),u=t.a.clone(i,h),c=t.a.clone(i,d),p=t.a.clone(i,m),
/**
* @license
*
* Grauw URI utilities
*
* See: http://hg.grauw.nl/grauw-lib/file/tip/src/uri.js
*
* @author Laurens Holst (http://www.grauw.nl/)
*
* Copyright 2012 Laurens Holst
*
* 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.
*
*/
function G(e){if(e instanceof G)this.scheme=e.scheme,this.authority=e.authority,this.path=e.path,this.query=e.query,this.fragment=e.fragment;else if(e){var t=Q.exec(e);this.scheme=t[1],this.authority=t[2],this.path=t[3],this.query=t[4],this.fragment=t[5]}}f.projectTo2D=function(e,a,i){r.n.typeOf.object("sphere",e);var o,s=(a=n.e(a,X)).ellipsoid,u=e.center,c=e.radius;o=t.a.equals(u,t.a.ZERO)?t.a.clone(t.a.UNIT_X,K):s.geodeticSurfaceNormal(u,K);var p=t.a.cross(t.a.UNIT_Z,o,M);t.a.normalize(p,p);var l=t.a.cross(o,p,F);t.a.normalize(l,l),t.a.multiplyByScalar(o,c,o),t.a.multiplyByScalar(l,c,l),t.a.multiplyByScalar(p,c,p);var h=t.a.negate(l,H),d=t.a.negate(p,N),m=Y,y=m[0];t.a.add(o,l,y),t.a.add(y,p,y),y=m[1],t.a.add(o,l,y),t.a.add(y,d,y),y=m[2],t.a.add(o,h,y),t.a.add(y,d,y),y=m[3],t.a.add(o,h,y),t.a.add(y,p,y),t.a.negate(o,o),y=m[4],t.a.add(o,l,y),t.a.add(y,p,y),y=m[5],t.a.add(o,l,y),t.a.add(y,d,y),y=m[6],t.a.add(o,h,y),t.a.add(y,d,y),y=m[7],t.a.add(o,h,y),t.a.add(y,p,y);for(var v=m.length,g=0;g<v;++g){var q=m[g];t.a.add(u,q,q);var b=s.cartesianToCartographic(q,V);a.project(b,q)}var w=(u=(i=f.fromPoints(m,i)).center).x,R=u.y,O=u.z;return u.x=O,u.y=w,u.z=R,i},f.isOccluded=function(e,t){return r.n.typeOf.object("sphere",e),r.n.typeOf.object("occluder",t),!t.isBoundingSphereVisible(e)},f.equals=function(e,r){return e===r||n.t(e)&&n.t(r)&&t.a.equals(e.center,r.center)&&e.radius===r.radius},f.prototype.intersectPlane=function(e){return f.intersectPlane(this,e)},f.prototype.distanceSquaredTo=function(e){return f.distanceSquaredTo(this,e)},f.prototype.computePlaneDistances=function(e,t,r){return f.computePlaneDistances(this,e,t,r)},f.prototype.isOccluded=function(e){return f.isOccluded(this,e)},f.prototype.equals=function(e){return f.equals(this,e)},f.prototype.clone=function(e){return f.clone(this,e)},f.prototype.volume=function(){var e=this.radius;return A*e*e*e},G.prototype.scheme=null,G.prototype.authority=null,G.prototype.path="",G.prototype.query=null,G.prototype.fragment=null;var Q=new RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$");G.prototype.getScheme=function(){return this.scheme},G.prototype.getAuthority=function(){return this.authority},G.prototype.getPath=function(){return this.path},G.prototype.getQuery=function(){return this.query},G.prototype.getFragment=function(){return this.fragment},G.prototype.isAbsolute=function(){return!!this.scheme&&!this.fragment},G.prototype.isSameDocumentAs=function(e){return e.scheme==this.scheme&&e.authority==this.authority&&e.path==this.path&&e.query==this.query},G.prototype.equals=function(e){return this.isSameDocumentAs(e)&&e.fragment==this.fragment},G.prototype.normalize=function(){this.removeDotSegments(),this.scheme&&(this.scheme=this.scheme.toLowerCase()),this.authority&&(this.authority=this.authority.replace($,te).replace(Z,ee)),this.path&&(this.path=this.path.replace(Z,ee)),this.query&&(this.query=this.query.replace(Z,ee)),this.fragment&&(this.fragment=this.fragment.replace(Z,ee))};var Z=/%[0-9a-z]{2}/gi,W=/[a-zA-Z0-9\-\._~]/,$=/(.*@)?([^@:]*)(:.*)?/;function ee(e){var t=unescape(e);return W.test(t)?t:e.toUpperCase()}function te(e,t,r,n){return(t||"")+r.toLowerCase()+(n||"")}function re(e,t){if(null===e||"object"!=typeof e)return e;t=n.e(t,!1);var r=new e.constructor;for(var a in e)if(e.hasOwnProperty(a)){var i=e[a];t&&(i=re(i,t)),r[a]=i}return r}function ne(e,t,r){r=n.e(r,!1);var a,i,o,s={},u=n.t(e),c=n.t(t);if(u)for(a in e)e.hasOwnProperty(a)&&(i=e[a],c&&r&&"object"==typeof i&&t.hasOwnProperty(a)?(o=t[a],s[a]="object"==typeof o?ne(i,o,r):i):s[a]=i);if(c)for(a in t)t.hasOwnProperty(a)&&!s.hasOwnProperty(a)&&(o=t[a],s[a]=o);return s}function ae(e,t){var r;return typeof document<"u"&&(r=document),ae._implementation(e,t,r)}G.prototype.resolve=function(e){var t=new G;return this.scheme?(t.scheme=this.scheme,t.authority=this.authority,t.path=this.path,t.query=this.query):(t.scheme=e.scheme,this.authority?(t.authority=this.authority,t.path=this.path,t.query=this.query):(t.authority=e.authority,""==this.path?(t.path=e.path,t.query=this.query||e.query):("