Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mars3d-cesium

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mars3d-cesium - npm Package Compare versions

Comparing version 1.101.1 to 1.102.0

Build/Cesium/Workers/AxisAlignedBoundingBox-680337b6.js

2

Build/Cesium/Workers/cesiumWorkerBootstrapper.js
/**
* @license
* Cesium - https://github.com/CesiumGS/cesium
* Version 1.101
* Version 1.102
*

@@ -6,0 +6,0 @@ * Copyright 2011-2022 Cesium Contributors

@@ -1,1 +0,1 @@

define(["./PrimitivePipeline-6dcd9231","./createTaskProcessorWorker","./Transforms-b1441a66","./Matrix3-d6f3913c","./defaultValue-040c41f9","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryPipeline-fafdd6b1","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b","./IndexDatatype-eddea9c9","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc","./WebMercatorProjection-53aa47d9"],(function(e,t,i,r,n,a,o,c,d,s,m,b,f,u,P,p,l,y,G,C){"use strict";return t((function(t,i){const r=e.PrimitivePipeline.unpackCombineGeometryParameters(t),n=e.PrimitivePipeline.combineGeometry(r);return e.PrimitivePipeline.packCombineGeometryResults(n,i)}))}));
define(["./PrimitivePipeline-736b1b51","./createTaskProcessorWorker","./Transforms-b7f686a8","./Matrix3-d6f3913c","./defaultValue-040c41f9","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryPipeline-c180ffdb","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b","./IndexDatatype-eddea9c9","./IntersectionTests-7d927f09","./Plane-6aee7ffc","./WebMercatorProjection-53aa47d9"],(function(e,t,i,r,n,a,o,c,s,m,b,d,f,u,P,p,l,y,G,C){"use strict";return t((function(t,i){const r=e.PrimitivePipeline.unpackCombineGeometryParameters(t),n=e.PrimitivePipeline.combineGeometry(r);return e.PrimitivePipeline.packCombineGeometryResults(n,i)}))}));

@@ -1,1 +0,1 @@

define(["./BoxGeometry-dd38aa6b","./defaultValue-040c41f9","./Transforms-b1441a66","./Matrix3-d6f3913c","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./VertexFormat-848ec33d"],(function(e,t,r,o,a,n,d,b,c,f,i,m,u,s){"use strict";return function(r,o){return t.defined(o)&&(r=e.BoxGeometry.unpack(r,o)),e.BoxGeometry.createGeometry(r)}}));
define(["./BoxGeometry-fb4b6b60","./defaultValue-040c41f9","./Transforms-b7f686a8","./Matrix3-d6f3913c","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./VertexFormat-848ec33d"],(function(e,t,r,o,n,b,a,d,f,c,i,m,u,s){"use strict";return function(r,o){return t.defined(o)&&(r=e.BoxGeometry.unpack(r,o)),e.BoxGeometry.createGeometry(r)}}));

@@ -1,1 +0,1 @@

define(["./Transforms-b1441a66","./Matrix3-d6f3913c","./ComponentDatatype-dd0b58d1","./defaultValue-040c41f9","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced"],(function(t,e,n,a,i,r,u,o,s,m,f,c){"use strict";const d=new e.Cartesian3;function p(t){const n=(t=a.defaultValue(t,a.defaultValue.EMPTY_OBJECT)).minimum,i=t.maximum;this._min=e.Cartesian3.clone(n),this._max=e.Cartesian3.clone(i),this._offsetAttribute=t.offsetAttribute,this._workerName="createBoxOutlineGeometry"}p.fromDimensions=function(t){const n=(t=a.defaultValue(t,a.defaultValue.EMPTY_OBJECT)).dimensions,i=e.Cartesian3.multiplyByScalar(n,.5,new e.Cartesian3);return new p({minimum:e.Cartesian3.negate(i,new e.Cartesian3),maximum:i,offsetAttribute:t.offsetAttribute})},p.fromAxisAlignedBoundingBox=function(t){return new p({minimum:t.minimum,maximum:t.maximum})},p.packedLength=2*e.Cartesian3.packedLength+1,p.pack=function(t,n,i){return i=a.defaultValue(i,0),e.Cartesian3.pack(t._min,n,i),e.Cartesian3.pack(t._max,n,i+e.Cartesian3.packedLength),n[i+2*e.Cartesian3.packedLength]=a.defaultValue(t._offsetAttribute,-1),n};const b=new e.Cartesian3,l=new e.Cartesian3,y={minimum:b,maximum:l,offsetAttribute:void 0};return p.unpack=function(t,n,i){n=a.defaultValue(n,0);const r=e.Cartesian3.unpack(t,n,b),u=e.Cartesian3.unpack(t,n+e.Cartesian3.packedLength,l),o=t[n+2*e.Cartesian3.packedLength];return a.defined(i)?(i._min=e.Cartesian3.clone(r,i._min),i._max=e.Cartesian3.clone(u,i._max),i._offsetAttribute=-1===o?void 0:o,i):(y.offsetAttribute=-1===o?void 0:o,new p(y))},p.createGeometry=function(o){const s=o._min,m=o._max;if(e.Cartesian3.equals(s,m))return;const f=new r.GeometryAttributes,c=new Uint16Array(24),p=new Float64Array(24);p[0]=s.x,p[1]=s.y,p[2]=s.z,p[3]=m.x,p[4]=s.y,p[5]=s.z,p[6]=m.x,p[7]=m.y,p[8]=s.z,p[9]=s.x,p[10]=m.y,p[11]=s.z,p[12]=s.x,p[13]=s.y,p[14]=m.z,p[15]=m.x,p[16]=s.y,p[17]=m.z,p[18]=m.x,p[19]=m.y,p[20]=m.z,p[21]=s.x,p[22]=m.y,p[23]=m.z,f.position=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p}),c[0]=4,c[1]=5,c[2]=5,c[3]=6,c[4]=6,c[5]=7,c[6]=7,c[7]=4,c[8]=0,c[9]=1,c[10]=1,c[11]=2,c[12]=2,c[13]=3,c[14]=3,c[15]=0,c[16]=0,c[17]=4,c[18]=1,c[19]=5,c[20]=2,c[21]=6,c[22]=3,c[23]=7;const b=e.Cartesian3.subtract(m,s,d),l=.5*e.Cartesian3.magnitude(b);if(a.defined(o._offsetAttribute)){const t=p.length,e=o._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,a=new Uint8Array(t/3).fill(e);f.applyOffset=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}return new i.Geometry({attributes:f,indices:c,primitiveType:i.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere(e.Cartesian3.ZERO,l),offsetAttribute:o._offsetAttribute})},function(t,e){return a.defined(e)&&(t=p.unpack(t,e)),p.createGeometry(t)}}));
define(["./Transforms-b7f686a8","./Matrix3-d6f3913c","./ComponentDatatype-dd0b58d1","./defaultValue-040c41f9","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced"],(function(t,e,n,a,i,r,u,o,s,m,f,c){"use strict";const d=new e.Cartesian3;function p(t){const n=(t=a.defaultValue(t,a.defaultValue.EMPTY_OBJECT)).minimum,i=t.maximum;this._min=e.Cartesian3.clone(n),this._max=e.Cartesian3.clone(i),this._offsetAttribute=t.offsetAttribute,this._workerName="createBoxOutlineGeometry"}p.fromDimensions=function(t){const n=(t=a.defaultValue(t,a.defaultValue.EMPTY_OBJECT)).dimensions,i=e.Cartesian3.multiplyByScalar(n,.5,new e.Cartesian3);return new p({minimum:e.Cartesian3.negate(i,new e.Cartesian3),maximum:i,offsetAttribute:t.offsetAttribute})},p.fromAxisAlignedBoundingBox=function(t){return new p({minimum:t.minimum,maximum:t.maximum})},p.packedLength=2*e.Cartesian3.packedLength+1,p.pack=function(t,n,i){return i=a.defaultValue(i,0),e.Cartesian3.pack(t._min,n,i),e.Cartesian3.pack(t._max,n,i+e.Cartesian3.packedLength),n[i+2*e.Cartesian3.packedLength]=a.defaultValue(t._offsetAttribute,-1),n};const l=new e.Cartesian3,b=new e.Cartesian3,y={minimum:l,maximum:b,offsetAttribute:void 0};return p.unpack=function(t,n,i){n=a.defaultValue(n,0);const r=e.Cartesian3.unpack(t,n,l),u=e.Cartesian3.unpack(t,n+e.Cartesian3.packedLength,b),o=t[n+2*e.Cartesian3.packedLength];return a.defined(i)?(i._min=e.Cartesian3.clone(r,i._min),i._max=e.Cartesian3.clone(u,i._max),i._offsetAttribute=-1===o?void 0:o,i):(y.offsetAttribute=-1===o?void 0:o,new p(y))},p.createGeometry=function(o){const s=o._min,m=o._max;if(e.Cartesian3.equals(s,m))return;const f=new r.GeometryAttributes,c=new Uint16Array(24),p=new Float64Array(24);p[0]=s.x,p[1]=s.y,p[2]=s.z,p[3]=m.x,p[4]=s.y,p[5]=s.z,p[6]=m.x,p[7]=m.y,p[8]=s.z,p[9]=s.x,p[10]=m.y,p[11]=s.z,p[12]=s.x,p[13]=s.y,p[14]=m.z,p[15]=m.x,p[16]=s.y,p[17]=m.z,p[18]=m.x,p[19]=m.y,p[20]=m.z,p[21]=s.x,p[22]=m.y,p[23]=m.z,f.position=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p}),c[0]=4,c[1]=5,c[2]=5,c[3]=6,c[4]=6,c[5]=7,c[6]=7,c[7]=4,c[8]=0,c[9]=1,c[10]=1,c[11]=2,c[12]=2,c[13]=3,c[14]=3,c[15]=0,c[16]=0,c[17]=4,c[18]=1,c[19]=5,c[20]=2,c[21]=6,c[22]=3,c[23]=7;const l=e.Cartesian3.subtract(m,s,d),b=.5*e.Cartesian3.magnitude(l);if(a.defined(o._offsetAttribute)){const t=p.length,e=o._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,a=new Uint8Array(t/3).fill(e);f.applyOffset=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}return new i.Geometry({attributes:f,indices:c,primitiveType:i.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere(e.Cartesian3.ZERO,b),offsetAttribute:o._offsetAttribute})},function(t,e){return a.defined(e)&&(t=p.unpack(t,e)),p.createGeometry(t)}}));

@@ -1,1 +0,1 @@

define(["./Matrix3-d6f3913c","./defaultValue-040c41f9","./EllipseGeometry-cf52e05b","./VertexFormat-848ec33d","./Math-8e567554","./Transforms-b1441a66","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./EllipseGeometryLibrary-574e5a91","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryInstance-c620c48b","./GeometryOffsetAttribute-b6810db4","./GeometryPipeline-fafdd6b1","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b","./IndexDatatype-eddea9c9","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc"],(function(e,t,i,r,o,n,s,l,a,d,m,c,u,p,y,_,x,G,h,f,g,b){"use strict";function E(e){const r=(e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT)).radius,o={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new i.EllipseGeometry(o),this._workerName="createCircleGeometry"}E.packedLength=i.EllipseGeometry.packedLength,E.pack=function(e,t,r){return i.EllipseGeometry.pack(e._ellipseGeometry,t,r)};const w=new i.EllipseGeometry({center:new e.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),A={center:new e.Cartesian3,radius:void 0,ellipsoid:e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new r.VertexFormat,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};return E.unpack=function(o,n,s){const l=i.EllipseGeometry.unpack(o,n,w);return A.center=e.Cartesian3.clone(l._center,A.center),A.ellipsoid=e.Ellipsoid.clone(l._ellipsoid,A.ellipsoid),A.height=l._height,A.extrudedHeight=l._extrudedHeight,A.granularity=l._granularity,A.vertexFormat=r.VertexFormat.clone(l._vertexFormat,A.vertexFormat),A.stRotation=l._stRotation,A.shadowVolume=l._shadowVolume,t.defined(s)?(A.semiMajorAxis=l._semiMajorAxis,A.semiMinorAxis=l._semiMinorAxis,s._ellipseGeometry=new i.EllipseGeometry(A),s):(A.radius=l._semiMajorAxis,new E(A))},E.createGeometry=function(e){return i.EllipseGeometry.createGeometry(e._ellipseGeometry)},E.createShadowVolume=function(e,t,i){const o=e._ellipseGeometry._granularity,n=e._ellipseGeometry._ellipsoid,s=t(o,n),l=i(o,n);return new E({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:n,stRotation:e._ellipseGeometry._stRotation,granularity:o,extrudedHeight:s,height:l,vertexFormat:r.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(E.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}}),function(i,r){return t.defined(r)&&(i=E.unpack(i,r)),i._ellipseGeometry._center=e.Cartesian3.clone(i._ellipseGeometry._center),i._ellipseGeometry._ellipsoid=e.Ellipsoid.clone(i._ellipseGeometry._ellipsoid),E.createGeometry(i)}}));
define(["./Matrix3-d6f3913c","./defaultValue-040c41f9","./EllipseGeometry-7a90d5bc","./VertexFormat-848ec33d","./Math-8e567554","./Transforms-b7f686a8","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./EllipseGeometryLibrary-27e68ef4","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryInstance-c620c48b","./GeometryOffsetAttribute-b6810db4","./GeometryPipeline-c180ffdb","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b","./IndexDatatype-eddea9c9","./IntersectionTests-7d927f09","./Plane-6aee7ffc"],(function(e,t,i,r,o,n,s,l,a,d,m,c,u,p,y,_,x,G,h,f,g,E){"use strict";function b(e){const r=(e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT)).radius,o={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new i.EllipseGeometry(o),this._workerName="createCircleGeometry"}b.packedLength=i.EllipseGeometry.packedLength,b.pack=function(e,t,r){return i.EllipseGeometry.pack(e._ellipseGeometry,t,r)};const w=new i.EllipseGeometry({center:new e.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),A={center:new e.Cartesian3,radius:void 0,ellipsoid:e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new r.VertexFormat,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};return b.unpack=function(o,n,s){const l=i.EllipseGeometry.unpack(o,n,w);return A.center=e.Cartesian3.clone(l._center,A.center),A.ellipsoid=e.Ellipsoid.clone(l._ellipsoid,A.ellipsoid),A.height=l._height,A.extrudedHeight=l._extrudedHeight,A.granularity=l._granularity,A.vertexFormat=r.VertexFormat.clone(l._vertexFormat,A.vertexFormat),A.stRotation=l._stRotation,A.shadowVolume=l._shadowVolume,t.defined(s)?(A.semiMajorAxis=l._semiMajorAxis,A.semiMinorAxis=l._semiMinorAxis,s._ellipseGeometry=new i.EllipseGeometry(A),s):(A.radius=l._semiMajorAxis,new b(A))},b.createGeometry=function(e){return i.EllipseGeometry.createGeometry(e._ellipseGeometry)},b.createShadowVolume=function(e,t,i){const o=e._ellipseGeometry._granularity,n=e._ellipseGeometry._ellipsoid,s=t(o,n),l=i(o,n);return new b({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:n,stRotation:e._ellipseGeometry._stRotation,granularity:o,extrudedHeight:s,height:l,vertexFormat:r.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(b.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}}),function(i,r){return t.defined(r)&&(i=b.unpack(i,r)),i._ellipseGeometry._center=e.Cartesian3.clone(i._ellipseGeometry._center),i._ellipseGeometry._ellipsoid=e.Ellipsoid.clone(i._ellipseGeometry._ellipsoid),b.createGeometry(i)}}));

@@ -1,1 +0,1 @@

define(["./Matrix3-d6f3913c","./defaultValue-040c41f9","./EllipseOutlineGeometry-50ba7912","./Math-8e567554","./Transforms-b1441a66","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./EllipseGeometryLibrary-574e5a91","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9"],(function(e,i,t,r,l,n,s,o,a,d,u,c,m,p,y){"use strict";function G(e){const r=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).radius,l={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new t.EllipseOutlineGeometry(l),this._workerName="createCircleOutlineGeometry"}G.packedLength=t.EllipseOutlineGeometry.packedLength,G.pack=function(e,i,r){return t.EllipseOutlineGeometry.pack(e._ellipseGeometry,i,r)};const f=new t.EllipseOutlineGeometry({center:new e.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),_={center:new e.Cartesian3,radius:void 0,ellipsoid:e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};return G.unpack=function(r,l,n){const s=t.EllipseOutlineGeometry.unpack(r,l,f);return _.center=e.Cartesian3.clone(s._center,_.center),_.ellipsoid=e.Ellipsoid.clone(s._ellipsoid,_.ellipsoid),_.height=s._height,_.extrudedHeight=s._extrudedHeight,_.granularity=s._granularity,_.numberOfVerticalLines=s._numberOfVerticalLines,i.defined(n)?(_.semiMajorAxis=s._semiMajorAxis,_.semiMinorAxis=s._semiMinorAxis,n._ellipseGeometry=new t.EllipseOutlineGeometry(_),n):(_.radius=s._semiMajorAxis,new G(_))},G.createGeometry=function(e){return t.EllipseOutlineGeometry.createGeometry(e._ellipseGeometry)},function(t,r){return i.defined(r)&&(t=G.unpack(t,r)),t._ellipseGeometry._center=e.Cartesian3.clone(t._ellipseGeometry._center),t._ellipseGeometry._ellipsoid=e.Ellipsoid.clone(t._ellipseGeometry._ellipsoid),G.createGeometry(t)}}));
define(["./Matrix3-d6f3913c","./defaultValue-040c41f9","./EllipseOutlineGeometry-557afe07","./Math-8e567554","./Transforms-b7f686a8","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./EllipseGeometryLibrary-27e68ef4","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9"],(function(e,i,t,r,l,n,s,o,a,d,u,c,m,p,y){"use strict";function f(e){const r=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).radius,l={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new t.EllipseOutlineGeometry(l),this._workerName="createCircleOutlineGeometry"}f.packedLength=t.EllipseOutlineGeometry.packedLength,f.pack=function(e,i,r){return t.EllipseOutlineGeometry.pack(e._ellipseGeometry,i,r)};const G=new t.EllipseOutlineGeometry({center:new e.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),_={center:new e.Cartesian3,radius:void 0,ellipsoid:e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};return f.unpack=function(r,l,n){const s=t.EllipseOutlineGeometry.unpack(r,l,G);return _.center=e.Cartesian3.clone(s._center,_.center),_.ellipsoid=e.Ellipsoid.clone(s._ellipsoid,_.ellipsoid),_.height=s._height,_.extrudedHeight=s._extrudedHeight,_.granularity=s._granularity,_.numberOfVerticalLines=s._numberOfVerticalLines,i.defined(n)?(_.semiMajorAxis=s._semiMajorAxis,_.semiMinorAxis=s._semiMinorAxis,n._ellipseGeometry=new t.EllipseOutlineGeometry(_),n):(_.radius=s._semiMajorAxis,new f(_))},f.createGeometry=function(e){return t.EllipseOutlineGeometry.createGeometry(e._ellipseGeometry)},function(t,r){return i.defined(r)&&(t=f.unpack(t,r)),t._ellipseGeometry._center=e.Cartesian3.clone(t._ellipseGeometry._center),t._ellipseGeometry._ellipsoid=e.Ellipsoid.clone(t._ellipseGeometry._ellipsoid),f.createGeometry(t)}}));

@@ -1,1 +0,1 @@

define(["./arrayRemoveDuplicates-bb49591c","./BoundingRectangle-d5562dff","./Transforms-b1441a66","./Matrix2-66622085","./Matrix3-d6f3913c","./ComponentDatatype-dd0b58d1","./CoplanarPolygonGeometryLibrary-2fb2715b","./defaultValue-040c41f9","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryInstance-c620c48b","./GeometryPipeline-fafdd6b1","./IndexDatatype-eddea9c9","./Math-8e567554","./PolygonGeometryLibrary-528d15dd","./PolygonPipeline-7de38ba5","./VertexFormat-848ec33d","./combine-6eb6e848","./RuntimeError-3c5db370","./WebGLConstants-f7267ced","./OrientedBoundingBox-ac323c64","./EllipsoidTangentPlane-fc1becbb","./AxisAlignedBoundingBox-ba8ff526","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b","./ArcType-3d26c7db","./EllipsoidRhumbLine-1dd98535"],(function(e,t,n,o,a,r,i,s,l,c,y,p,d,u,m,g,b,f,C,h,x,P,A,L,w,G,F,v,E){"use strict";const _=new a.Cartesian3,T=new t.BoundingRectangle,k=new o.Cartesian2,D=new o.Cartesian2,V=new a.Cartesian3,R=new a.Cartesian3,H=new a.Cartesian3,I=new a.Cartesian3,M=new a.Cartesian3,B=new a.Cartesian3,O=new n.Quaternion,z=new a.Matrix3,S=new a.Matrix3,N=new a.Cartesian3;function Q(e,t,i,y,p,m,b,f,C){const h=e.positions;let x=g.PolygonPipeline.triangulate(e.positions2D,e.holes);x.length<3&&(x=[0,1,2]);const P=d.IndexDatatype.createTypedArray(h.length,x.length);P.set(x);let A=z;if(0!==y){let e=n.Quaternion.fromAxisAngle(b,y,O);if(A=a.Matrix3.fromQuaternion(e,A),t.tangent||t.bitangent){e=n.Quaternion.fromAxisAngle(b,-y,O);const o=a.Matrix3.fromQuaternion(e,S);f=a.Cartesian3.normalize(a.Matrix3.multiplyByVector(o,f,f),f),t.bitangent&&(C=a.Cartesian3.normalize(a.Cartesian3.cross(b,f,C),C))}}else A=a.Matrix3.clone(a.Matrix3.IDENTITY,A);const L=D;t.st&&(L.x=i.x,L.y=i.y);const w=h.length,G=3*w,F=new Float64Array(G),v=t.normal?new Float32Array(G):void 0,E=t.tangent?new Float32Array(G):void 0,T=t.bitangent?new Float32Array(G):void 0,V=t.st?new Float32Array(2*w):void 0;let R=0,H=0,I=0,M=0,B=0;for(let e=0;e<w;e++){const n=h[e];if(F[R++]=n.x,F[R++]=n.y,F[R++]=n.z,t.st)if(s.defined(p)&&p.positions.length===w)V[B++]=p.positions[e].x,V[B++]=p.positions[e].y;else{const e=m(a.Matrix3.multiplyByVector(A,n,_),k);o.Cartesian2.subtract(e,L,e);const t=u.CesiumMath.clamp(e.x/i.width,0,1),r=u.CesiumMath.clamp(e.y/i.height,0,1);V[B++]=t,V[B++]=r}t.normal&&(v[H++]=b.x,v[H++]=b.y,v[H++]=b.z),t.tangent&&(E[M++]=f.x,E[M++]=f.y,E[M++]=f.z),t.bitangent&&(T[I++]=C.x,T[I++]=C.y,T[I++]=C.z)}const N=new c.GeometryAttributes;return t.position&&(N.position=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:F})),t.normal&&(N.normal=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v})),t.tangent&&(N.tangent=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:E})),t.bitangent&&(N.bitangent=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:T})),t.st&&(N.st=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:V})),new l.Geometry({attributes:N,indices:P,primitiveType:l.PrimitiveType.TRIANGLES})}function j(e){const t=(e=s.defaultValue(e,s.defaultValue.EMPTY_OBJECT)).polygonHierarchy,n=e.textureCoordinates,r=s.defaultValue(e.vertexFormat,b.VertexFormat.DEFAULT);this._vertexFormat=b.VertexFormat.clone(r),this._polygonHierarchy=t,this._stRotation=s.defaultValue(e.stRotation,0),this._ellipsoid=a.Ellipsoid.clone(s.defaultValue(e.ellipsoid,a.Ellipsoid.WGS84)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=n,this.packedLength=m.PolygonGeometryLibrary.computeHierarchyPackedLength(t,a.Cartesian3)+b.VertexFormat.packedLength+a.Ellipsoid.packedLength+(s.defined(n)?m.PolygonGeometryLibrary.computeHierarchyPackedLength(n,o.Cartesian2):1)+2}j.fromPositions=function(e){return new j({polygonHierarchy:{positions:(e=s.defaultValue(e,s.defaultValue.EMPTY_OBJECT)).positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates})},j.pack=function(e,t,n){return n=s.defaultValue(n,0),n=m.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,n,a.Cartesian3),a.Ellipsoid.pack(e._ellipsoid,t,n),n+=a.Ellipsoid.packedLength,b.VertexFormat.pack(e._vertexFormat,t,n),n+=b.VertexFormat.packedLength,t[n++]=e._stRotation,s.defined(e._textureCoordinates)?n=m.PolygonGeometryLibrary.packPolygonHierarchy(e._textureCoordinates,t,n,o.Cartesian2):t[n++]=-1,t[n++]=e.packedLength,t};const U=a.Ellipsoid.clone(a.Ellipsoid.UNIT_SPHERE),Y=new b.VertexFormat,q={polygonHierarchy:{}};return j.unpack=function(e,t,n){t=s.defaultValue(t,0);const r=m.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t,a.Cartesian3);t=r.startingIndex,delete r.startingIndex;const i=a.Ellipsoid.unpack(e,t,U);t+=a.Ellipsoid.packedLength;const l=b.VertexFormat.unpack(e,t,Y);t+=b.VertexFormat.packedLength;const c=e[t++],y=-1===e[t]?void 0:m.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t,o.Cartesian2);s.defined(y)?(t=y.startingIndex,delete y.startingIndex):t++;const p=e[t++];return s.defined(n)||(n=new j(q)),n._polygonHierarchy=r,n._ellipsoid=a.Ellipsoid.clone(i,n._ellipsoid),n._vertexFormat=b.VertexFormat.clone(l,n._vertexFormat),n._stRotation=c,n._textureCoordinates=y,n.packedLength=p,n},j.createGeometry=function(t){const o=t._vertexFormat,r=t._polygonHierarchy,c=t._stRotation,g=t._textureCoordinates,b=s.defined(g);let f=r.positions;if(f=e.arrayRemoveDuplicates(f,a.Cartesian3.equalsEpsilon,!0),f.length<3)return;let C=V,h=R,x=H,P=M;const A=B;if(!i.CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments(f,I,P,A))return;if(C=a.Cartesian3.cross(P,A,C),C=a.Cartesian3.normalize(C,C),!a.Cartesian3.equalsEpsilon(I,a.Cartesian3.ZERO,u.CesiumMath.EPSILON6)){const e=t._ellipsoid.geodeticSurfaceNormal(I,N);a.Cartesian3.dot(C,e)<0&&(C=a.Cartesian3.negate(C,C),P=a.Cartesian3.negate(P,P))}const L=i.CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction(I,P,A),w=i.CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction(I,P,A);o.tangent&&(h=a.Cartesian3.clone(P,h)),o.bitangent&&(x=a.Cartesian3.clone(A,x));const G=m.PolygonGeometryLibrary.polygonsFromHierarchy(r,b,L,!1),F=G.hierarchy,v=G.polygons,E=b?m.PolygonGeometryLibrary.polygonsFromHierarchy(g,!0,(function(e){return e}),!1).polygons:void 0;if(0===F.length)return;f=F[0].outerRing;const _=n.BoundingSphere.fromPoints(f),k=m.PolygonGeometryLibrary.computeBoundingRectangle(C,w,f,c,T),D=[];for(let e=0;e<v.length;e++){const t=new y.GeometryInstance({geometry:Q(v[e],o,k,c,b?E[e]:void 0,w,C,h,x)});D.push(t)}const O=p.GeometryPipeline.combineInstances(D)[0];O.attributes.position.values=new Float64Array(O.attributes.position.values),O.indices=d.IndexDatatype.createTypedArray(O.attributes.position.values.length/3,O.indices);const z=O.attributes;return o.position||delete z.position,new l.Geometry({attributes:z,indices:O.indices,primitiveType:O.primitiveType,boundingSphere:_})},function(e,t){return s.defined(t)&&(e=j.unpack(e,t)),j.createGeometry(e)}}));
define(["./arrayRemoveDuplicates-bb49591c","./BoundingRectangle-58f64349","./Transforms-b7f686a8","./Matrix2-66622085","./Matrix3-d6f3913c","./ComponentDatatype-dd0b58d1","./CoplanarPolygonGeometryLibrary-1b418734","./defaultValue-040c41f9","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryInstance-c620c48b","./GeometryPipeline-c180ffdb","./IndexDatatype-eddea9c9","./Math-8e567554","./PolygonGeometryLibrary-227b23c8","./PolygonPipeline-f56a8ec5","./VertexFormat-848ec33d","./combine-6eb6e848","./RuntimeError-3c5db370","./WebGLConstants-f7267ced","./OrientedBoundingBox-60a5c9a1","./EllipsoidTangentPlane-ae5d3d65","./AxisAlignedBoundingBox-680337b6","./IntersectionTests-7d927f09","./Plane-6aee7ffc","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b","./ArcType-3d26c7db","./EllipsoidRhumbLine-1dd98535"],(function(e,t,n,o,a,r,i,s,l,c,y,p,d,u,m,g,b,f,C,h,x,P,A,L,w,G,F,v,E){"use strict";const _=new a.Cartesian3,T=new t.BoundingRectangle,k=new o.Cartesian2,D=new o.Cartesian2,V=new a.Cartesian3,R=new a.Cartesian3,H=new a.Cartesian3,I=new a.Cartesian3,M=new a.Cartesian3,B=new a.Cartesian3,O=new n.Quaternion,z=new a.Matrix3,S=new a.Matrix3,N=new a.Cartesian3;function Q(e,t,i,y,p,m,b,f,C){const h=e.positions;let x=g.PolygonPipeline.triangulate(e.positions2D,e.holes);x.length<3&&(x=[0,1,2]);const P=d.IndexDatatype.createTypedArray(h.length,x.length);P.set(x);let A=z;if(0!==y){let e=n.Quaternion.fromAxisAngle(b,y,O);if(A=a.Matrix3.fromQuaternion(e,A),t.tangent||t.bitangent){e=n.Quaternion.fromAxisAngle(b,-y,O);const o=a.Matrix3.fromQuaternion(e,S);f=a.Cartesian3.normalize(a.Matrix3.multiplyByVector(o,f,f),f),t.bitangent&&(C=a.Cartesian3.normalize(a.Cartesian3.cross(b,f,C),C))}}else A=a.Matrix3.clone(a.Matrix3.IDENTITY,A);const L=D;t.st&&(L.x=i.x,L.y=i.y);const w=h.length,G=3*w,F=new Float64Array(G),v=t.normal?new Float32Array(G):void 0,E=t.tangent?new Float32Array(G):void 0,T=t.bitangent?new Float32Array(G):void 0,V=t.st?new Float32Array(2*w):void 0;let R=0,H=0,I=0,M=0,B=0;for(let e=0;e<w;e++){const n=h[e];if(F[R++]=n.x,F[R++]=n.y,F[R++]=n.z,t.st)if(s.defined(p)&&p.positions.length===w)V[B++]=p.positions[e].x,V[B++]=p.positions[e].y;else{const e=m(a.Matrix3.multiplyByVector(A,n,_),k);o.Cartesian2.subtract(e,L,e);const t=u.CesiumMath.clamp(e.x/i.width,0,1),r=u.CesiumMath.clamp(e.y/i.height,0,1);V[B++]=t,V[B++]=r}t.normal&&(v[H++]=b.x,v[H++]=b.y,v[H++]=b.z),t.tangent&&(E[M++]=f.x,E[M++]=f.y,E[M++]=f.z),t.bitangent&&(T[I++]=C.x,T[I++]=C.y,T[I++]=C.z)}const N=new c.GeometryAttributes;return t.position&&(N.position=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:F})),t.normal&&(N.normal=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v})),t.tangent&&(N.tangent=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:E})),t.bitangent&&(N.bitangent=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:T})),t.st&&(N.st=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:V})),new l.Geometry({attributes:N,indices:P,primitiveType:l.PrimitiveType.TRIANGLES})}function j(e){const t=(e=s.defaultValue(e,s.defaultValue.EMPTY_OBJECT)).polygonHierarchy,n=e.textureCoordinates,r=s.defaultValue(e.vertexFormat,b.VertexFormat.DEFAULT);this._vertexFormat=b.VertexFormat.clone(r),this._polygonHierarchy=t,this._stRotation=s.defaultValue(e.stRotation,0),this._ellipsoid=a.Ellipsoid.clone(s.defaultValue(e.ellipsoid,a.Ellipsoid.WGS84)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=n,this.packedLength=m.PolygonGeometryLibrary.computeHierarchyPackedLength(t,a.Cartesian3)+b.VertexFormat.packedLength+a.Ellipsoid.packedLength+(s.defined(n)?m.PolygonGeometryLibrary.computeHierarchyPackedLength(n,o.Cartesian2):1)+2}j.fromPositions=function(e){return new j({polygonHierarchy:{positions:(e=s.defaultValue(e,s.defaultValue.EMPTY_OBJECT)).positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates})},j.pack=function(e,t,n){return n=s.defaultValue(n,0),n=m.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,n,a.Cartesian3),a.Ellipsoid.pack(e._ellipsoid,t,n),n+=a.Ellipsoid.packedLength,b.VertexFormat.pack(e._vertexFormat,t,n),n+=b.VertexFormat.packedLength,t[n++]=e._stRotation,s.defined(e._textureCoordinates)?n=m.PolygonGeometryLibrary.packPolygonHierarchy(e._textureCoordinates,t,n,o.Cartesian2):t[n++]=-1,t[n++]=e.packedLength,t};const U=a.Ellipsoid.clone(a.Ellipsoid.UNIT_SPHERE),Y=new b.VertexFormat,q={polygonHierarchy:{}};return j.unpack=function(e,t,n){t=s.defaultValue(t,0);const r=m.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t,a.Cartesian3);t=r.startingIndex,delete r.startingIndex;const i=a.Ellipsoid.unpack(e,t,U);t+=a.Ellipsoid.packedLength;const l=b.VertexFormat.unpack(e,t,Y);t+=b.VertexFormat.packedLength;const c=e[t++],y=-1===e[t]?void 0:m.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t,o.Cartesian2);s.defined(y)?(t=y.startingIndex,delete y.startingIndex):t++;const p=e[t++];return s.defined(n)||(n=new j(q)),n._polygonHierarchy=r,n._ellipsoid=a.Ellipsoid.clone(i,n._ellipsoid),n._vertexFormat=b.VertexFormat.clone(l,n._vertexFormat),n._stRotation=c,n._textureCoordinates=y,n.packedLength=p,n},j.createGeometry=function(t){const o=t._vertexFormat,r=t._polygonHierarchy,c=t._stRotation,g=t._textureCoordinates,b=s.defined(g);let f=r.positions;if(f=e.arrayRemoveDuplicates(f,a.Cartesian3.equalsEpsilon,!0),f.length<3)return;let C=V,h=R,x=H,P=M;const A=B;if(!i.CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments(f,I,P,A))return;if(C=a.Cartesian3.cross(P,A,C),C=a.Cartesian3.normalize(C,C),!a.Cartesian3.equalsEpsilon(I,a.Cartesian3.ZERO,u.CesiumMath.EPSILON6)){const e=t._ellipsoid.geodeticSurfaceNormal(I,N);a.Cartesian3.dot(C,e)<0&&(C=a.Cartesian3.negate(C,C),P=a.Cartesian3.negate(P,P))}const L=i.CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction(I,P,A),w=i.CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction(I,P,A);o.tangent&&(h=a.Cartesian3.clone(P,h)),o.bitangent&&(x=a.Cartesian3.clone(A,x));const G=m.PolygonGeometryLibrary.polygonsFromHierarchy(r,b,L,!1),F=G.hierarchy,v=G.polygons,E=b?m.PolygonGeometryLibrary.polygonsFromHierarchy(g,!0,(function(e){return e}),!1).polygons:void 0;if(0===F.length)return;f=F[0].outerRing;const _=n.BoundingSphere.fromPoints(f),k=m.PolygonGeometryLibrary.computeBoundingRectangle(C,w,f,c,T),D=[];for(let e=0;e<v.length;e++){const t=new y.GeometryInstance({geometry:Q(v[e],o,k,c,b?E[e]:void 0,w,C,h,x)});D.push(t)}const O=p.GeometryPipeline.combineInstances(D)[0];O.attributes.position.values=new Float64Array(O.attributes.position.values),O.indices=d.IndexDatatype.createTypedArray(O.attributes.position.values.length/3,O.indices);const z=O.attributes;return o.position||delete z.position,new l.Geometry({attributes:z,indices:O.indices,primitiveType:O.primitiveType,boundingSphere:_})},function(e,t){return s.defined(t)&&(e=j.unpack(e,t)),j.createGeometry(e)}}));

@@ -1,1 +0,1 @@

define(["./arrayRemoveDuplicates-bb49591c","./Transforms-b1441a66","./Matrix3-d6f3913c","./ComponentDatatype-dd0b58d1","./CoplanarPolygonGeometryLibrary-2fb2715b","./defaultValue-040c41f9","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryInstance-c620c48b","./GeometryPipeline-fafdd6b1","./IndexDatatype-eddea9c9","./PolygonGeometryLibrary-528d15dd","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./OrientedBoundingBox-ac323c64","./EllipsoidTangentPlane-fc1becbb","./AxisAlignedBoundingBox-ba8ff526","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b","./ArcType-3d26c7db","./EllipsoidRhumbLine-1dd98535","./PolygonPipeline-7de38ba5"],(function(e,t,n,o,r,i,a,c,y,l,s,u,d,p,m,f,b,g,h,P,G,L,C,T,E,A,H){"use strict";function k(e){const t=e.length,n=new Float64Array(3*t),r=s.IndexDatatype.createTypedArray(t,2*t);let i=0,y=0;for(let o=0;o<t;o++){const a=e[o];n[i++]=a.x,n[i++]=a.y,n[i++]=a.z,r[y++]=o,r[y++]=(o+1)%t}const l=new c.GeometryAttributes({position:new a.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n})});return new a.Geometry({attributes:l,indices:r,primitiveType:a.PrimitiveType.LINES})}function x(e){const t=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=u.PolygonGeometryLibrary.computeHierarchyPackedLength(t,n.Cartesian3)+1}x.fromPositions=function(e){return new x({polygonHierarchy:{positions:(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).positions}})},x.pack=function(e,t,o){return o=i.defaultValue(o,0),t[o=u.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,o,n.Cartesian3)]=e.packedLength,t};const w={polygonHierarchy:{}};return x.unpack=function(e,t,o){t=i.defaultValue(t,0);const r=u.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t,n.Cartesian3);t=r.startingIndex,delete r.startingIndex;const a=e[t];return i.defined(o)||(o=new x(w)),o._polygonHierarchy=r,o.packedLength=a,o},x.createGeometry=function(o){const i=o._polygonHierarchy;let c=i.positions;if(c=e.arrayRemoveDuplicates(c,n.Cartesian3.equalsEpsilon,!0),c.length<3)return;if(!r.CoplanarPolygonGeometryLibrary.validOutline(c))return;const s=u.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(i,!1);if(0===s.length)return;const d=[];for(let e=0;e<s.length;e++){const t=new y.GeometryInstance({geometry:k(s[e])});d.push(t)}const p=l.GeometryPipeline.combineInstances(d)[0],m=t.BoundingSphere.fromPoints(i.positions);return new a.Geometry({attributes:p.attributes,indices:p.indices,primitiveType:p.primitiveType,boundingSphere:m})},function(e,t){return i.defined(t)&&(e=x.unpack(e,t)),e._ellipsoid=n.Ellipsoid.clone(e._ellipsoid),x.createGeometry(e)}}));
define(["./arrayRemoveDuplicates-bb49591c","./Transforms-b7f686a8","./Matrix3-d6f3913c","./ComponentDatatype-dd0b58d1","./CoplanarPolygonGeometryLibrary-1b418734","./defaultValue-040c41f9","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryInstance-c620c48b","./GeometryPipeline-c180ffdb","./IndexDatatype-eddea9c9","./PolygonGeometryLibrary-227b23c8","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./OrientedBoundingBox-60a5c9a1","./EllipsoidTangentPlane-ae5d3d65","./AxisAlignedBoundingBox-680337b6","./IntersectionTests-7d927f09","./Plane-6aee7ffc","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b","./ArcType-3d26c7db","./EllipsoidRhumbLine-1dd98535","./PolygonPipeline-f56a8ec5"],(function(e,t,n,o,r,i,a,c,y,l,s,u,p,d,m,f,g,b,h,P,G,L,C,T,E,A,H){"use strict";function k(e){const t=e.length,n=new Float64Array(3*t),r=s.IndexDatatype.createTypedArray(t,2*t);let i=0,y=0;for(let o=0;o<t;o++){const a=e[o];n[i++]=a.x,n[i++]=a.y,n[i++]=a.z,r[y++]=o,r[y++]=(o+1)%t}const l=new c.GeometryAttributes({position:new a.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n})});return new a.Geometry({attributes:l,indices:r,primitiveType:a.PrimitiveType.LINES})}function x(e){const t=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=u.PolygonGeometryLibrary.computeHierarchyPackedLength(t,n.Cartesian3)+1}x.fromPositions=function(e){return new x({polygonHierarchy:{positions:(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).positions}})},x.pack=function(e,t,o){return o=i.defaultValue(o,0),t[o=u.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,o,n.Cartesian3)]=e.packedLength,t};const w={polygonHierarchy:{}};return x.unpack=function(e,t,o){t=i.defaultValue(t,0);const r=u.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t,n.Cartesian3);t=r.startingIndex,delete r.startingIndex;const a=e[t];return i.defined(o)||(o=new x(w)),o._polygonHierarchy=r,o.packedLength=a,o},x.createGeometry=function(o){const i=o._polygonHierarchy;let c=i.positions;if(c=e.arrayRemoveDuplicates(c,n.Cartesian3.equalsEpsilon,!0),c.length<3)return;if(!r.CoplanarPolygonGeometryLibrary.validOutline(c))return;const s=u.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(i,!1);if(0===s.length)return;const p=[];for(let e=0;e<s.length;e++){const t=new y.GeometryInstance({geometry:k(s[e])});p.push(t)}const d=l.GeometryPipeline.combineInstances(p)[0],m=t.BoundingSphere.fromPoints(i.positions);return new a.Geometry({attributes:d.attributes,indices:d.indices,primitiveType:d.primitiveType,boundingSphere:m})},function(e,t){return i.defined(t)&&(e=x.unpack(e,t)),e._ellipsoid=n.Ellipsoid.clone(e._ellipsoid),x.createGeometry(e)}}));

@@ -1,1 +0,1 @@

define(["./arrayRemoveDuplicates-bb49591c","./Transforms-b1441a66","./Matrix3-d6f3913c","./ComponentDatatype-dd0b58d1","./PolylineVolumeGeometryLibrary-bf1fd89f","./CorridorGeometryLibrary-c5b09da3","./defaultValue-040c41f9","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9","./Math-8e567554","./PolygonPipeline-7de38ba5","./Matrix2-66622085","./VertexFormat-848ec33d","./combine-6eb6e848","./RuntimeError-3c5db370","./WebGLConstants-f7267ced","./EllipsoidTangentPlane-fc1becbb","./AxisAlignedBoundingBox-ba8ff526","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc","./PolylinePipeline-576cc29e","./EllipsoidGeodesic-9484ceff","./EllipsoidRhumbLine-1dd98535"],(function(t,e,r,a,i,o,n,s,l,d,u,c,m,f,y,p,g,h,b,C,A,_,w,v,T){"use strict";const G=new r.Cartesian3,E=new r.Cartesian3,V=new r.Cartesian3,x=new r.Cartesian3,L=new r.Cartesian3,P=new r.Cartesian3,F=new r.Cartesian3,N=new r.Cartesian3;function M(t,e){for(let r=0;r<t.length;r++)t[r]=e.scaleToGeodeticSurface(t[r],t[r]);return t}function D(t,e,a,i,n,s){const l=t.normals,d=t.tangents,u=t.bitangents,c=r.Cartesian3.normalize(r.Cartesian3.cross(a,e,F),F);s.normal&&o.CorridorGeometryLibrary.addAttribute(l,e,i,n),s.tangent&&o.CorridorGeometryLibrary.addAttribute(d,c,i,n),s.bitangent&&o.CorridorGeometryLibrary.addAttribute(u,a,i,n)}function O(t,e,i){const d=t.positions,m=t.corners,f=t.endPositions,y=t.lefts,p=t.normals,g=new l.GeometryAttributes;let h,b,C,A=0,_=0,w=0;for(b=0;b<d.length;b+=2)C=d[b].length-3,A+=C,w+=2*C,_+=d[b+1].length-3;for(A+=3,_+=3,b=0;b<m.length;b++){h=m[b];const t=m[b].leftPositions;n.defined(t)?(C=t.length,A+=C,w+=C):(C=m[b].rightPositions.length,_+=C,w+=C)}const v=n.defined(f);let T;v&&(T=f[0].length-3,A+=T,_+=T,T/=3,w+=6*T);const L=A+_,M=new Float64Array(L),O={normals:e.normal?new Float32Array(L):void 0,tangents:e.tangent?new Float32Array(L):void 0,bitangents:e.bitangent?new Float32Array(L):void 0};let I,S,R,k,H,z,B=0,U=L-1,Y=G,W=E;const q=T/2,J=u.IndexDatatype.createTypedArray(L/3,w);let j=0;if(v){z=V,H=x;const t=f[0];for(Y=r.Cartesian3.fromArray(p,0,Y),W=r.Cartesian3.fromArray(y,0,W),b=0;b<q;b++)z=r.Cartesian3.fromArray(t,3*(q-1-b),z),H=r.Cartesian3.fromArray(t,3*(q+b),H),o.CorridorGeometryLibrary.addAttribute(M,H,B),o.CorridorGeometryLibrary.addAttribute(M,z,void 0,U),D(O,Y,W,B,U,e),S=B/3,k=S+1,I=(U-2)/3,R=I-1,J[j++]=I,J[j++]=S,J[j++]=R,J[j++]=R,J[j++]=S,J[j++]=k,B+=3,U-=3}let K,Q,X=0,Z=0,$=d[X++],tt=d[X++];for(M.set($,B),M.set(tt,U-tt.length+1),W=r.Cartesian3.fromArray(y,Z,W),C=tt.length-3,b=0;b<C;b+=3)K=i.geodeticSurfaceNormal(r.Cartesian3.fromArray($,b,F),F),Q=i.geodeticSurfaceNormal(r.Cartesian3.fromArray(tt,C-b,N),N),Y=r.Cartesian3.normalize(r.Cartesian3.add(K,Q,Y),Y),D(O,Y,W,B,U,e),S=B/3,k=S+1,I=(U-2)/3,R=I-1,J[j++]=I,J[j++]=S,J[j++]=R,J[j++]=R,J[j++]=S,J[j++]=k,B+=3,U-=3;for(K=i.geodeticSurfaceNormal(r.Cartesian3.fromArray($,C,F),F),Q=i.geodeticSurfaceNormal(r.Cartesian3.fromArray(tt,C,N),N),Y=r.Cartesian3.normalize(r.Cartesian3.add(K,Q,Y),Y),Z+=3,b=0;b<m.length;b++){let t;h=m[b];const a=h.leftPositions,s=h.rightPositions;let l,u,c=P,f=V,g=x;if(Y=r.Cartesian3.fromArray(p,Z,Y),n.defined(a)){for(D(O,Y,W,void 0,U,e),U-=3,l=k,u=R,t=0;t<a.length/3;t++)c=r.Cartesian3.fromArray(a,3*t,c),J[j++]=l,J[j++]=u-t-1,J[j++]=u-t,o.CorridorGeometryLibrary.addAttribute(M,c,void 0,U),f=r.Cartesian3.fromArray(M,3*(u-t-1),f),g=r.Cartesian3.fromArray(M,3*l,g),W=r.Cartesian3.normalize(r.Cartesian3.subtract(f,g,W),W),D(O,Y,W,void 0,U,e),U-=3;c=r.Cartesian3.fromArray(M,3*l,c),f=r.Cartesian3.subtract(r.Cartesian3.fromArray(M,3*u,f),c,f),g=r.Cartesian3.subtract(r.Cartesian3.fromArray(M,3*(u-t),g),c,g),W=r.Cartesian3.normalize(r.Cartesian3.add(f,g,W),W),D(O,Y,W,B,void 0,e),B+=3}else{for(D(O,Y,W,B,void 0,e),B+=3,l=R,u=k,t=0;t<s.length/3;t++)c=r.Cartesian3.fromArray(s,3*t,c),J[j++]=l,J[j++]=u+t,J[j++]=u+t+1,o.CorridorGeometryLibrary.addAttribute(M,c,B),f=r.Cartesian3.fromArray(M,3*l,f),g=r.Cartesian3.fromArray(M,3*(u+t),g),W=r.Cartesian3.normalize(r.Cartesian3.subtract(f,g,W),W),D(O,Y,W,B,void 0,e),B+=3;c=r.Cartesian3.fromArray(M,3*l,c),f=r.Cartesian3.subtract(r.Cartesian3.fromArray(M,3*(u+t),f),c,f),g=r.Cartesian3.subtract(r.Cartesian3.fromArray(M,3*u,g),c,g),W=r.Cartesian3.normalize(r.Cartesian3.negate(r.Cartesian3.add(g,f,W),W),W),D(O,Y,W,void 0,U,e),U-=3}for($=d[X++],tt=d[X++],$.splice(0,3),tt.splice(tt.length-3,3),M.set($,B),M.set(tt,U-tt.length+1),C=tt.length-3,Z+=3,W=r.Cartesian3.fromArray(y,Z,W),t=0;t<tt.length;t+=3)K=i.geodeticSurfaceNormal(r.Cartesian3.fromArray($,t,F),F),Q=i.geodeticSurfaceNormal(r.Cartesian3.fromArray(tt,C-t,N),N),Y=r.Cartesian3.normalize(r.Cartesian3.add(K,Q,Y),Y),D(O,Y,W,B,U,e),k=B/3,S=k-1,R=(U-2)/3,I=R+1,J[j++]=I,J[j++]=S,J[j++]=R,J[j++]=R,J[j++]=S,J[j++]=k,B+=3,U-=3;B-=3,U+=3}if(Y=r.Cartesian3.fromArray(p,p.length-3,Y),D(O,Y,W,B,U,e),v){B+=3,U-=3,z=V,H=x;const t=f[1];for(b=0;b<q;b++)z=r.Cartesian3.fromArray(t,3*(T-b-1),z),H=r.Cartesian3.fromArray(t,3*b,H),o.CorridorGeometryLibrary.addAttribute(M,z,void 0,U),o.CorridorGeometryLibrary.addAttribute(M,H,B),D(O,Y,W,B,U,e),k=B/3,S=k-1,R=(U-2)/3,I=R+1,J[j++]=I,J[j++]=S,J[j++]=R,J[j++]=R,J[j++]=S,J[j++]=k,B+=3,U-=3}if(g.position=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:M}),e.st){const t=new Float32Array(L/3*2);let e,r,i=0;if(v){A/=3,_/=3;const a=Math.PI/(T+1);let o;r=1/(A-T+1),e=1/(_-T+1);const n=T/2;for(b=n+1;b<T+1;b++)o=c.CesiumMath.PI_OVER_TWO+a*b,t[i++]=e*(1+Math.cos(o)),t[i++]=.5*(1+Math.sin(o));for(b=1;b<_-T+1;b++)t[i++]=b*e,t[i++]=0;for(b=T;b>n;b--)o=c.CesiumMath.PI_OVER_TWO-b*a,t[i++]=1-e*(1+Math.cos(o)),t[i++]=.5*(1+Math.sin(o));for(b=n;b>0;b--)o=c.CesiumMath.PI_OVER_TWO-a*b,t[i++]=1-r*(1+Math.cos(o)),t[i++]=.5*(1+Math.sin(o));for(b=A-T;b>0;b--)t[i++]=b*r,t[i++]=1;for(b=1;b<n+1;b++)o=c.CesiumMath.PI_OVER_TWO+a*b,t[i++]=r*(1+Math.cos(o)),t[i++]=.5*(1+Math.sin(o))}else{for(A/=3,_/=3,r=1/(A-1),e=1/(_-1),b=0;b<_;b++)t[i++]=b*e,t[i++]=0;for(b=A;b>0;b--)t[i++]=(b-1)*r,t[i++]=1}g.st=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:t})}return e.normal&&(g.normal=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O.normals})),e.tangent&&(g.tangent=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O.tangents})),e.bitangent&&(g.bitangent=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O.bitangents})),{attributes:g,indices:J}}function I(t,e,r){r[e++]=t[0],r[e++]=t[1],r[e++]=t[2];for(let a=3;a<t.length;a+=3){const i=t[a],o=t[a+1],n=t[a+2];r[e++]=i,r[e++]=o,r[e++]=n,r[e++]=i,r[e++]=o,r[e++]=n}return r[e++]=t[0],r[e++]=t[1],r[e++]=t[2],r}function S(t,e){const i=new y.VertexFormat({position:e.position,normal:e.normal||e.bitangent||t.shadowVolume,tangent:e.tangent,bitangent:e.normal||e.bitangent,st:e.st}),l=t.ellipsoid,c=O(o.CorridorGeometryLibrary.computePositions(t),i,l),f=t.height,p=t.extrudedHeight;let g=c.attributes;const h=c.indices;let b=g.position.values,C=b.length;const A=new Float64Array(6*C);let _=new Float64Array(C);_.set(b);let w,v=new Float64Array(4*C);b=m.PolygonPipeline.scaleToGeodeticHeight(b,f,l),v=I(b,0,v),_=m.PolygonPipeline.scaleToGeodeticHeight(_,p,l),v=I(_,2*C,v),A.set(b),A.set(_,C),A.set(v,2*C),g.position.values=A,g=function(t,e){if(!(e.normal||e.tangent||e.bitangent||e.st))return t;const a=t.position.values;let i,n;(e.normal||e.bitangent)&&(i=t.normal.values,n=t.bitangent.values);const s=t.position.values.length/18,l=3*s,d=2*s,u=2*l;let c;if(e.normal||e.bitangent||e.tangent){const s=e.normal?new Float32Array(6*l):void 0,d=e.tangent?new Float32Array(6*l):void 0,m=e.bitangent?new Float32Array(6*l):void 0;let f=G,y=E,p=V,g=x,h=L,b=P,C=u;for(c=0;c<l;c+=3){const t=C+u;f=r.Cartesian3.fromArray(a,c,f),y=r.Cartesian3.fromArray(a,c+l,y),p=r.Cartesian3.fromArray(a,(c+3)%l,p),y=r.Cartesian3.subtract(y,f,y),p=r.Cartesian3.subtract(p,f,p),g=r.Cartesian3.normalize(r.Cartesian3.cross(y,p,g),g),e.normal&&(o.CorridorGeometryLibrary.addAttribute(s,g,t),o.CorridorGeometryLibrary.addAttribute(s,g,t+3),o.CorridorGeometryLibrary.addAttribute(s,g,C),o.CorridorGeometryLibrary.addAttribute(s,g,C+3)),(e.tangent||e.bitangent)&&(b=r.Cartesian3.fromArray(i,c,b),e.bitangent&&(o.CorridorGeometryLibrary.addAttribute(m,b,t),o.CorridorGeometryLibrary.addAttribute(m,b,t+3),o.CorridorGeometryLibrary.addAttribute(m,b,C),o.CorridorGeometryLibrary.addAttribute(m,b,C+3)),e.tangent&&(h=r.Cartesian3.normalize(r.Cartesian3.cross(b,g,h),h),o.CorridorGeometryLibrary.addAttribute(d,h,t),o.CorridorGeometryLibrary.addAttribute(d,h,t+3),o.CorridorGeometryLibrary.addAttribute(d,h,C),o.CorridorGeometryLibrary.addAttribute(d,h,C+3))),C+=6}if(e.normal){for(s.set(i),c=0;c<l;c+=3)s[c+l]=-i[c],s[c+l+1]=-i[c+1],s[c+l+2]=-i[c+2];t.normal.values=s}else t.normal=void 0;if(e.bitangent?(m.set(n),m.set(n,l),t.bitangent.values=m):t.bitangent=void 0,e.tangent){const e=t.tangent.values;d.set(e),d.set(e,l),t.tangent.values=d}}if(e.st){const e=t.st.values,r=new Float32Array(6*d);r.set(e),r.set(e,d);let a=2*d;for(let t=0;t<2;t++){for(r[a++]=e[0],r[a++]=e[1],c=2;c<d;c+=2){const t=e[c],i=e[c+1];r[a++]=t,r[a++]=i,r[a++]=t,r[a++]=i}r[a++]=e[0],r[a++]=e[1]}t.st.values=r}return t}(g,e);const T=C/3;if(t.shadowVolume){const t=g.normal.values;C=t.length;let r=new Float32Array(6*C);for(w=0;w<C;w++)t[w]=-t[w];r.set(t,C),r=I(t,4*C,r),g.extrudeDirection=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:r}),e.normal||(g.normal=void 0)}if(n.defined(t.offsetAttribute)){let e=new Uint8Array(6*T);if(t.offsetAttribute===d.GeometryOffsetAttribute.TOP)e=e.fill(1,0,T).fill(1,2*T,4*T);else{const r=t.offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1;e=e.fill(r)}g.applyOffset=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}const F=h.length,N=T+T,M=u.IndexDatatype.createTypedArray(A.length/3,2*F+3*N);M.set(h);let D,S,R,k,H=F;for(w=0;w<F;w+=3){const t=h[w],e=h[w+1],r=h[w+2];M[H++]=r+T,M[H++]=e+T,M[H++]=t+T}for(w=0;w<N;w+=2)D=w+N,S=D+N,R=D+1,k=S+1,M[H++]=D,M[H++]=S,M[H++]=R,M[H++]=R,M[H++]=S,M[H++]=k;return{attributes:g,indices:M}}const R=new r.Cartesian3,k=new r.Cartesian3,H=new r.Cartographic;function z(t,e,a,i,o,n){const s=r.Cartesian3.subtract(e,t,R);r.Cartesian3.normalize(s,s);const l=a.geodeticSurfaceNormal(t,k),d=r.Cartesian3.cross(s,l,R);r.Cartesian3.multiplyByScalar(d,i,d);let u=o.latitude,c=o.longitude,m=n.latitude,f=n.longitude;r.Cartesian3.add(t,d,k),a.cartesianToCartographic(k,H);let y=H.latitude,p=H.longitude;u=Math.min(u,y),c=Math.min(c,p),m=Math.max(m,y),f=Math.max(f,p),r.Cartesian3.subtract(t,d,k),a.cartesianToCartographic(k,H),y=H.latitude,p=H.longitude,u=Math.min(u,y),c=Math.min(c,p),m=Math.max(m,y),f=Math.max(f,p),o.latitude=u,o.longitude=c,n.latitude=m,n.longitude=f}const B=new r.Cartesian3,U=new r.Cartesian3,Y=new r.Cartographic,W=new r.Cartographic;function q(e,a,o,s,l){e=M(e,a);const d=t.arrayRemoveDuplicates(e,r.Cartesian3.equalsEpsilon),u=d.length;if(u<2||o<=0)return new f.Rectangle;const c=.5*o;let m,y;if(Y.latitude=Number.POSITIVE_INFINITY,Y.longitude=Number.POSITIVE_INFINITY,W.latitude=Number.NEGATIVE_INFINITY,W.longitude=Number.NEGATIVE_INFINITY,s===i.CornerType.ROUNDED){const t=d[0];r.Cartesian3.subtract(t,d[1],B),r.Cartesian3.normalize(B,B),r.Cartesian3.multiplyByScalar(B,c,B),r.Cartesian3.add(t,B,U),a.cartesianToCartographic(U,H),m=H.latitude,y=H.longitude,Y.latitude=Math.min(Y.latitude,m),Y.longitude=Math.min(Y.longitude,y),W.latitude=Math.max(W.latitude,m),W.longitude=Math.max(W.longitude,y)}for(let t=0;t<u-1;++t)z(d[t],d[t+1],a,c,Y,W);const p=d[u-1];r.Cartesian3.subtract(p,d[u-2],B),r.Cartesian3.normalize(B,B),r.Cartesian3.multiplyByScalar(B,c,B),r.Cartesian3.add(p,B,U),z(p,U,a,c,Y,W),s===i.CornerType.ROUNDED&&(a.cartesianToCartographic(U,H),m=H.latitude,y=H.longitude,Y.latitude=Math.min(Y.latitude,m),Y.longitude=Math.min(Y.longitude,y),W.latitude=Math.max(W.latitude,m),W.longitude=Math.max(W.longitude,y));const g=n.defined(l)?l:new f.Rectangle;return g.north=W.latitude,g.south=Y.latitude,g.east=W.longitude,g.west=Y.longitude,g}function J(t){const e=(t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT)).positions,a=t.width,o=n.defaultValue(t.height,0),s=n.defaultValue(t.extrudedHeight,o);this._positions=e,this._ellipsoid=r.Ellipsoid.clone(n.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84)),this._vertexFormat=y.VertexFormat.clone(n.defaultValue(t.vertexFormat,y.VertexFormat.DEFAULT)),this._width=a,this._height=Math.max(o,s),this._extrudedHeight=Math.min(o,s),this._cornerType=n.defaultValue(t.cornerType,i.CornerType.ROUNDED),this._granularity=n.defaultValue(t.granularity,c.CesiumMath.RADIANS_PER_DEGREE),this._shadowVolume=n.defaultValue(t.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this.packedLength=1+e.length*r.Cartesian3.packedLength+r.Ellipsoid.packedLength+y.VertexFormat.packedLength+7}J.pack=function(t,e,a){a=n.defaultValue(a,0);const i=t._positions,o=i.length;e[a++]=o;for(let t=0;t<o;++t,a+=r.Cartesian3.packedLength)r.Cartesian3.pack(i[t],e,a);return r.Ellipsoid.pack(t._ellipsoid,e,a),a+=r.Ellipsoid.packedLength,y.VertexFormat.pack(t._vertexFormat,e,a),a+=y.VertexFormat.packedLength,e[a++]=t._width,e[a++]=t._height,e[a++]=t._extrudedHeight,e[a++]=t._cornerType,e[a++]=t._granularity,e[a++]=t._shadowVolume?1:0,e[a]=n.defaultValue(t._offsetAttribute,-1),e};const j=r.Ellipsoid.clone(r.Ellipsoid.UNIT_SPHERE),K=new y.VertexFormat,Q={positions:void 0,ellipsoid:j,vertexFormat:K,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};return J.unpack=function(t,e,a){e=n.defaultValue(e,0);const i=t[e++],o=new Array(i);for(let a=0;a<i;++a,e+=r.Cartesian3.packedLength)o[a]=r.Cartesian3.unpack(t,e);const s=r.Ellipsoid.unpack(t,e,j);e+=r.Ellipsoid.packedLength;const l=y.VertexFormat.unpack(t,e,K);e+=y.VertexFormat.packedLength;const d=t[e++],u=t[e++],c=t[e++],m=t[e++],f=t[e++],p=1===t[e++],g=t[e];return n.defined(a)?(a._positions=o,a._ellipsoid=r.Ellipsoid.clone(s,a._ellipsoid),a._vertexFormat=y.VertexFormat.clone(l,a._vertexFormat),a._width=d,a._height=u,a._extrudedHeight=c,a._cornerType=m,a._granularity=f,a._shadowVolume=p,a._offsetAttribute=-1===g?void 0:g,a):(Q.positions=o,Q.width=d,Q.height=u,Q.extrudedHeight=c,Q.cornerType=m,Q.granularity=f,Q.shadowVolume=p,Q.offsetAttribute=-1===g?void 0:g,new J(Q))},J.computeRectangle=function(t,e){const a=(t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT)).positions,o=t.width;return q(a,n.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84),o,n.defaultValue(t.cornerType,i.CornerType.ROUNDED),e)},J.createGeometry=function(i){let l=i._positions;const u=i._width,f=i._ellipsoid;l=M(l,f);const y=t.arrayRemoveDuplicates(l,r.Cartesian3.equalsEpsilon);if(y.length<2||u<=0)return;const p=i._height,g=i._extrudedHeight,h=!c.CesiumMath.equalsEpsilon(p,g,0,c.CesiumMath.EPSILON2),b=i._vertexFormat,C={ellipsoid:f,positions:y,width:u,cornerType:i._cornerType,granularity:i._granularity,saveAttributes:!0};let A;if(h)C.height=p,C.extrudedHeight=g,C.shadowVolume=i._shadowVolume,C.offsetAttribute=i._offsetAttribute,A=S(C,b);else{if(A=O(o.CorridorGeometryLibrary.computePositions(C),b,f),A.attributes.position.values=m.PolygonPipeline.scaleToGeodeticHeight(A.attributes.position.values,p,f),n.defined(i._offsetAttribute)){const t=i._offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1,e=A.attributes.position.values.length,r=new Uint8Array(e/3).fill(t);A.attributes.applyOffset=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}}const _=A.attributes,w=e.BoundingSphere.fromVertices(_.position.values,void 0,3);return b.position||(A.attributes.position.values=void 0),new s.Geometry({attributes:_,indices:A.indices,primitiveType:s.PrimitiveType.TRIANGLES,boundingSphere:w,offsetAttribute:i._offsetAttribute})},J.createShadowVolume=function(t,e,r){const a=t._granularity,i=t._ellipsoid,o=e(a,i),n=r(a,i);return new J({positions:t._positions,width:t._width,cornerType:t._cornerType,ellipsoid:i,granularity:a,extrudedHeight:o,height:n,vertexFormat:y.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(J.prototype,{rectangle:{get:function(){return n.defined(this._rectangle)||(this._rectangle=q(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}}),function(t,e){return n.defined(e)&&(t=J.unpack(t,e)),t._ellipsoid=r.Ellipsoid.clone(t._ellipsoid),J.createGeometry(t)}}));
define(["./arrayRemoveDuplicates-bb49591c","./Transforms-b7f686a8","./Matrix3-d6f3913c","./ComponentDatatype-dd0b58d1","./PolylineVolumeGeometryLibrary-1f624b8b","./CorridorGeometryLibrary-8e93b16a","./defaultValue-040c41f9","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9","./Math-8e567554","./PolygonPipeline-f56a8ec5","./Matrix2-66622085","./VertexFormat-848ec33d","./combine-6eb6e848","./RuntimeError-3c5db370","./WebGLConstants-f7267ced","./EllipsoidTangentPlane-ae5d3d65","./AxisAlignedBoundingBox-680337b6","./IntersectionTests-7d927f09","./Plane-6aee7ffc","./PolylinePipeline-eba1803b","./EllipsoidGeodesic-9484ceff","./EllipsoidRhumbLine-1dd98535"],(function(t,e,r,a,i,o,n,s,l,d,u,c,m,f,y,p,g,h,b,C,A,_,w,v,T){"use strict";const G=new r.Cartesian3,E=new r.Cartesian3,V=new r.Cartesian3,x=new r.Cartesian3,L=new r.Cartesian3,P=new r.Cartesian3,F=new r.Cartesian3,N=new r.Cartesian3;function M(t,e){for(let r=0;r<t.length;r++)t[r]=e.scaleToGeodeticSurface(t[r],t[r]);return t}function D(t,e,a,i,n,s){const l=t.normals,d=t.tangents,u=t.bitangents,c=r.Cartesian3.normalize(r.Cartesian3.cross(a,e,F),F);s.normal&&o.CorridorGeometryLibrary.addAttribute(l,e,i,n),s.tangent&&o.CorridorGeometryLibrary.addAttribute(d,c,i,n),s.bitangent&&o.CorridorGeometryLibrary.addAttribute(u,a,i,n)}function O(t,e,i){const d=t.positions,m=t.corners,f=t.endPositions,y=t.lefts,p=t.normals,g=new l.GeometryAttributes;let h,b,C,A=0,_=0,w=0;for(b=0;b<d.length;b+=2)C=d[b].length-3,A+=C,w+=2*C,_+=d[b+1].length-3;for(A+=3,_+=3,b=0;b<m.length;b++){h=m[b];const t=m[b].leftPositions;n.defined(t)?(C=t.length,A+=C,w+=C):(C=m[b].rightPositions.length,_+=C,w+=C)}const v=n.defined(f);let T;v&&(T=f[0].length-3,A+=T,_+=T,T/=3,w+=6*T);const L=A+_,M=new Float64Array(L),O={normals:e.normal?new Float32Array(L):void 0,tangents:e.tangent?new Float32Array(L):void 0,bitangents:e.bitangent?new Float32Array(L):void 0};let I,S,R,k,H,z,B=0,U=L-1,Y=G,W=E;const q=T/2,J=u.IndexDatatype.createTypedArray(L/3,w);let j=0;if(v){z=V,H=x;const t=f[0];for(Y=r.Cartesian3.fromArray(p,0,Y),W=r.Cartesian3.fromArray(y,0,W),b=0;b<q;b++)z=r.Cartesian3.fromArray(t,3*(q-1-b),z),H=r.Cartesian3.fromArray(t,3*(q+b),H),o.CorridorGeometryLibrary.addAttribute(M,H,B),o.CorridorGeometryLibrary.addAttribute(M,z,void 0,U),D(O,Y,W,B,U,e),S=B/3,k=S+1,I=(U-2)/3,R=I-1,J[j++]=I,J[j++]=S,J[j++]=R,J[j++]=R,J[j++]=S,J[j++]=k,B+=3,U-=3}let K,Q,X=0,Z=0,$=d[X++],tt=d[X++];for(M.set($,B),M.set(tt,U-tt.length+1),W=r.Cartesian3.fromArray(y,Z,W),C=tt.length-3,b=0;b<C;b+=3)K=i.geodeticSurfaceNormal(r.Cartesian3.fromArray($,b,F),F),Q=i.geodeticSurfaceNormal(r.Cartesian3.fromArray(tt,C-b,N),N),Y=r.Cartesian3.normalize(r.Cartesian3.add(K,Q,Y),Y),D(O,Y,W,B,U,e),S=B/3,k=S+1,I=(U-2)/3,R=I-1,J[j++]=I,J[j++]=S,J[j++]=R,J[j++]=R,J[j++]=S,J[j++]=k,B+=3,U-=3;for(K=i.geodeticSurfaceNormal(r.Cartesian3.fromArray($,C,F),F),Q=i.geodeticSurfaceNormal(r.Cartesian3.fromArray(tt,C,N),N),Y=r.Cartesian3.normalize(r.Cartesian3.add(K,Q,Y),Y),Z+=3,b=0;b<m.length;b++){let t;h=m[b];const a=h.leftPositions,s=h.rightPositions;let l,u,c=P,f=V,g=x;if(Y=r.Cartesian3.fromArray(p,Z,Y),n.defined(a)){for(D(O,Y,W,void 0,U,e),U-=3,l=k,u=R,t=0;t<a.length/3;t++)c=r.Cartesian3.fromArray(a,3*t,c),J[j++]=l,J[j++]=u-t-1,J[j++]=u-t,o.CorridorGeometryLibrary.addAttribute(M,c,void 0,U),f=r.Cartesian3.fromArray(M,3*(u-t-1),f),g=r.Cartesian3.fromArray(M,3*l,g),W=r.Cartesian3.normalize(r.Cartesian3.subtract(f,g,W),W),D(O,Y,W,void 0,U,e),U-=3;c=r.Cartesian3.fromArray(M,3*l,c),f=r.Cartesian3.subtract(r.Cartesian3.fromArray(M,3*u,f),c,f),g=r.Cartesian3.subtract(r.Cartesian3.fromArray(M,3*(u-t),g),c,g),W=r.Cartesian3.normalize(r.Cartesian3.add(f,g,W),W),D(O,Y,W,B,void 0,e),B+=3}else{for(D(O,Y,W,B,void 0,e),B+=3,l=R,u=k,t=0;t<s.length/3;t++)c=r.Cartesian3.fromArray(s,3*t,c),J[j++]=l,J[j++]=u+t,J[j++]=u+t+1,o.CorridorGeometryLibrary.addAttribute(M,c,B),f=r.Cartesian3.fromArray(M,3*l,f),g=r.Cartesian3.fromArray(M,3*(u+t),g),W=r.Cartesian3.normalize(r.Cartesian3.subtract(f,g,W),W),D(O,Y,W,B,void 0,e),B+=3;c=r.Cartesian3.fromArray(M,3*l,c),f=r.Cartesian3.subtract(r.Cartesian3.fromArray(M,3*(u+t),f),c,f),g=r.Cartesian3.subtract(r.Cartesian3.fromArray(M,3*u,g),c,g),W=r.Cartesian3.normalize(r.Cartesian3.negate(r.Cartesian3.add(g,f,W),W),W),D(O,Y,W,void 0,U,e),U-=3}for($=d[X++],tt=d[X++],$.splice(0,3),tt.splice(tt.length-3,3),M.set($,B),M.set(tt,U-tt.length+1),C=tt.length-3,Z+=3,W=r.Cartesian3.fromArray(y,Z,W),t=0;t<tt.length;t+=3)K=i.geodeticSurfaceNormal(r.Cartesian3.fromArray($,t,F),F),Q=i.geodeticSurfaceNormal(r.Cartesian3.fromArray(tt,C-t,N),N),Y=r.Cartesian3.normalize(r.Cartesian3.add(K,Q,Y),Y),D(O,Y,W,B,U,e),k=B/3,S=k-1,R=(U-2)/3,I=R+1,J[j++]=I,J[j++]=S,J[j++]=R,J[j++]=R,J[j++]=S,J[j++]=k,B+=3,U-=3;B-=3,U+=3}if(Y=r.Cartesian3.fromArray(p,p.length-3,Y),D(O,Y,W,B,U,e),v){B+=3,U-=3,z=V,H=x;const t=f[1];for(b=0;b<q;b++)z=r.Cartesian3.fromArray(t,3*(T-b-1),z),H=r.Cartesian3.fromArray(t,3*b,H),o.CorridorGeometryLibrary.addAttribute(M,z,void 0,U),o.CorridorGeometryLibrary.addAttribute(M,H,B),D(O,Y,W,B,U,e),k=B/3,S=k-1,R=(U-2)/3,I=R+1,J[j++]=I,J[j++]=S,J[j++]=R,J[j++]=R,J[j++]=S,J[j++]=k,B+=3,U-=3}if(g.position=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:M}),e.st){const t=new Float32Array(L/3*2);let e,r,i=0;if(v){A/=3,_/=3;const a=Math.PI/(T+1);let o;r=1/(A-T+1),e=1/(_-T+1);const n=T/2;for(b=n+1;b<T+1;b++)o=c.CesiumMath.PI_OVER_TWO+a*b,t[i++]=e*(1+Math.cos(o)),t[i++]=.5*(1+Math.sin(o));for(b=1;b<_-T+1;b++)t[i++]=b*e,t[i++]=0;for(b=T;b>n;b--)o=c.CesiumMath.PI_OVER_TWO-b*a,t[i++]=1-e*(1+Math.cos(o)),t[i++]=.5*(1+Math.sin(o));for(b=n;b>0;b--)o=c.CesiumMath.PI_OVER_TWO-a*b,t[i++]=1-r*(1+Math.cos(o)),t[i++]=.5*(1+Math.sin(o));for(b=A-T;b>0;b--)t[i++]=b*r,t[i++]=1;for(b=1;b<n+1;b++)o=c.CesiumMath.PI_OVER_TWO+a*b,t[i++]=r*(1+Math.cos(o)),t[i++]=.5*(1+Math.sin(o))}else{for(A/=3,_/=3,r=1/(A-1),e=1/(_-1),b=0;b<_;b++)t[i++]=b*e,t[i++]=0;for(b=A;b>0;b--)t[i++]=(b-1)*r,t[i++]=1}g.st=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:t})}return e.normal&&(g.normal=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O.normals})),e.tangent&&(g.tangent=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O.tangents})),e.bitangent&&(g.bitangent=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O.bitangents})),{attributes:g,indices:J}}function I(t,e,r){r[e++]=t[0],r[e++]=t[1],r[e++]=t[2];for(let a=3;a<t.length;a+=3){const i=t[a],o=t[a+1],n=t[a+2];r[e++]=i,r[e++]=o,r[e++]=n,r[e++]=i,r[e++]=o,r[e++]=n}return r[e++]=t[0],r[e++]=t[1],r[e++]=t[2],r}function S(t,e){const i=new y.VertexFormat({position:e.position,normal:e.normal||e.bitangent||t.shadowVolume,tangent:e.tangent,bitangent:e.normal||e.bitangent,st:e.st}),l=t.ellipsoid,c=O(o.CorridorGeometryLibrary.computePositions(t),i,l),f=t.height,p=t.extrudedHeight;let g=c.attributes;const h=c.indices;let b=g.position.values,C=b.length;const A=new Float64Array(6*C);let _=new Float64Array(C);_.set(b);let w,v=new Float64Array(4*C);b=m.PolygonPipeline.scaleToGeodeticHeight(b,f,l),v=I(b,0,v),_=m.PolygonPipeline.scaleToGeodeticHeight(_,p,l),v=I(_,2*C,v),A.set(b),A.set(_,C),A.set(v,2*C),g.position.values=A,g=function(t,e){if(!(e.normal||e.tangent||e.bitangent||e.st))return t;const a=t.position.values;let i,n;(e.normal||e.bitangent)&&(i=t.normal.values,n=t.bitangent.values);const s=t.position.values.length/18,l=3*s,d=2*s,u=2*l;let c;if(e.normal||e.bitangent||e.tangent){const s=e.normal?new Float32Array(6*l):void 0,d=e.tangent?new Float32Array(6*l):void 0,m=e.bitangent?new Float32Array(6*l):void 0;let f=G,y=E,p=V,g=x,h=L,b=P,C=u;for(c=0;c<l;c+=3){const t=C+u;f=r.Cartesian3.fromArray(a,c,f),y=r.Cartesian3.fromArray(a,c+l,y),p=r.Cartesian3.fromArray(a,(c+3)%l,p),y=r.Cartesian3.subtract(y,f,y),p=r.Cartesian3.subtract(p,f,p),g=r.Cartesian3.normalize(r.Cartesian3.cross(y,p,g),g),e.normal&&(o.CorridorGeometryLibrary.addAttribute(s,g,t),o.CorridorGeometryLibrary.addAttribute(s,g,t+3),o.CorridorGeometryLibrary.addAttribute(s,g,C),o.CorridorGeometryLibrary.addAttribute(s,g,C+3)),(e.tangent||e.bitangent)&&(b=r.Cartesian3.fromArray(i,c,b),e.bitangent&&(o.CorridorGeometryLibrary.addAttribute(m,b,t),o.CorridorGeometryLibrary.addAttribute(m,b,t+3),o.CorridorGeometryLibrary.addAttribute(m,b,C),o.CorridorGeometryLibrary.addAttribute(m,b,C+3)),e.tangent&&(h=r.Cartesian3.normalize(r.Cartesian3.cross(b,g,h),h),o.CorridorGeometryLibrary.addAttribute(d,h,t),o.CorridorGeometryLibrary.addAttribute(d,h,t+3),o.CorridorGeometryLibrary.addAttribute(d,h,C),o.CorridorGeometryLibrary.addAttribute(d,h,C+3))),C+=6}if(e.normal){for(s.set(i),c=0;c<l;c+=3)s[c+l]=-i[c],s[c+l+1]=-i[c+1],s[c+l+2]=-i[c+2];t.normal.values=s}else t.normal=void 0;if(e.bitangent?(m.set(n),m.set(n,l),t.bitangent.values=m):t.bitangent=void 0,e.tangent){const e=t.tangent.values;d.set(e),d.set(e,l),t.tangent.values=d}}if(e.st){const e=t.st.values,r=new Float32Array(6*d);r.set(e),r.set(e,d);let a=2*d;for(let t=0;t<2;t++){for(r[a++]=e[0],r[a++]=e[1],c=2;c<d;c+=2){const t=e[c],i=e[c+1];r[a++]=t,r[a++]=i,r[a++]=t,r[a++]=i}r[a++]=e[0],r[a++]=e[1]}t.st.values=r}return t}(g,e);const T=C/3;if(t.shadowVolume){const t=g.normal.values;C=t.length;let r=new Float32Array(6*C);for(w=0;w<C;w++)t[w]=-t[w];r.set(t,C),r=I(t,4*C,r),g.extrudeDirection=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:r}),e.normal||(g.normal=void 0)}if(n.defined(t.offsetAttribute)){let e=new Uint8Array(6*T);if(t.offsetAttribute===d.GeometryOffsetAttribute.TOP)e=e.fill(1,0,T).fill(1,2*T,4*T);else{const r=t.offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1;e=e.fill(r)}g.applyOffset=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}const F=h.length,N=T+T,M=u.IndexDatatype.createTypedArray(A.length/3,2*F+3*N);M.set(h);let D,S,R,k,H=F;for(w=0;w<F;w+=3){const t=h[w],e=h[w+1],r=h[w+2];M[H++]=r+T,M[H++]=e+T,M[H++]=t+T}for(w=0;w<N;w+=2)D=w+N,S=D+N,R=D+1,k=S+1,M[H++]=D,M[H++]=S,M[H++]=R,M[H++]=R,M[H++]=S,M[H++]=k;return{attributes:g,indices:M}}const R=new r.Cartesian3,k=new r.Cartesian3,H=new r.Cartographic;function z(t,e,a,i,o,n){const s=r.Cartesian3.subtract(e,t,R);r.Cartesian3.normalize(s,s);const l=a.geodeticSurfaceNormal(t,k),d=r.Cartesian3.cross(s,l,R);r.Cartesian3.multiplyByScalar(d,i,d);let u=o.latitude,c=o.longitude,m=n.latitude,f=n.longitude;r.Cartesian3.add(t,d,k),a.cartesianToCartographic(k,H);let y=H.latitude,p=H.longitude;u=Math.min(u,y),c=Math.min(c,p),m=Math.max(m,y),f=Math.max(f,p),r.Cartesian3.subtract(t,d,k),a.cartesianToCartographic(k,H),y=H.latitude,p=H.longitude,u=Math.min(u,y),c=Math.min(c,p),m=Math.max(m,y),f=Math.max(f,p),o.latitude=u,o.longitude=c,n.latitude=m,n.longitude=f}const B=new r.Cartesian3,U=new r.Cartesian3,Y=new r.Cartographic,W=new r.Cartographic;function q(e,a,o,s,l){e=M(e,a);const d=t.arrayRemoveDuplicates(e,r.Cartesian3.equalsEpsilon),u=d.length;if(u<2||o<=0)return new f.Rectangle;const c=.5*o;let m,y;if(Y.latitude=Number.POSITIVE_INFINITY,Y.longitude=Number.POSITIVE_INFINITY,W.latitude=Number.NEGATIVE_INFINITY,W.longitude=Number.NEGATIVE_INFINITY,s===i.CornerType.ROUNDED){const t=d[0];r.Cartesian3.subtract(t,d[1],B),r.Cartesian3.normalize(B,B),r.Cartesian3.multiplyByScalar(B,c,B),r.Cartesian3.add(t,B,U),a.cartesianToCartographic(U,H),m=H.latitude,y=H.longitude,Y.latitude=Math.min(Y.latitude,m),Y.longitude=Math.min(Y.longitude,y),W.latitude=Math.max(W.latitude,m),W.longitude=Math.max(W.longitude,y)}for(let t=0;t<u-1;++t)z(d[t],d[t+1],a,c,Y,W);const p=d[u-1];r.Cartesian3.subtract(p,d[u-2],B),r.Cartesian3.normalize(B,B),r.Cartesian3.multiplyByScalar(B,c,B),r.Cartesian3.add(p,B,U),z(p,U,a,c,Y,W),s===i.CornerType.ROUNDED&&(a.cartesianToCartographic(U,H),m=H.latitude,y=H.longitude,Y.latitude=Math.min(Y.latitude,m),Y.longitude=Math.min(Y.longitude,y),W.latitude=Math.max(W.latitude,m),W.longitude=Math.max(W.longitude,y));const g=n.defined(l)?l:new f.Rectangle;return g.north=W.latitude,g.south=Y.latitude,g.east=W.longitude,g.west=Y.longitude,g}function J(t){const e=(t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT)).positions,a=t.width,o=n.defaultValue(t.height,0),s=n.defaultValue(t.extrudedHeight,o);this._positions=e,this._ellipsoid=r.Ellipsoid.clone(n.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84)),this._vertexFormat=y.VertexFormat.clone(n.defaultValue(t.vertexFormat,y.VertexFormat.DEFAULT)),this._width=a,this._height=Math.max(o,s),this._extrudedHeight=Math.min(o,s),this._cornerType=n.defaultValue(t.cornerType,i.CornerType.ROUNDED),this._granularity=n.defaultValue(t.granularity,c.CesiumMath.RADIANS_PER_DEGREE),this._shadowVolume=n.defaultValue(t.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this.packedLength=1+e.length*r.Cartesian3.packedLength+r.Ellipsoid.packedLength+y.VertexFormat.packedLength+7}J.pack=function(t,e,a){a=n.defaultValue(a,0);const i=t._positions,o=i.length;e[a++]=o;for(let t=0;t<o;++t,a+=r.Cartesian3.packedLength)r.Cartesian3.pack(i[t],e,a);return r.Ellipsoid.pack(t._ellipsoid,e,a),a+=r.Ellipsoid.packedLength,y.VertexFormat.pack(t._vertexFormat,e,a),a+=y.VertexFormat.packedLength,e[a++]=t._width,e[a++]=t._height,e[a++]=t._extrudedHeight,e[a++]=t._cornerType,e[a++]=t._granularity,e[a++]=t._shadowVolume?1:0,e[a]=n.defaultValue(t._offsetAttribute,-1),e};const j=r.Ellipsoid.clone(r.Ellipsoid.UNIT_SPHERE),K=new y.VertexFormat,Q={positions:void 0,ellipsoid:j,vertexFormat:K,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};return J.unpack=function(t,e,a){e=n.defaultValue(e,0);const i=t[e++],o=new Array(i);for(let a=0;a<i;++a,e+=r.Cartesian3.packedLength)o[a]=r.Cartesian3.unpack(t,e);const s=r.Ellipsoid.unpack(t,e,j);e+=r.Ellipsoid.packedLength;const l=y.VertexFormat.unpack(t,e,K);e+=y.VertexFormat.packedLength;const d=t[e++],u=t[e++],c=t[e++],m=t[e++],f=t[e++],p=1===t[e++],g=t[e];return n.defined(a)?(a._positions=o,a._ellipsoid=r.Ellipsoid.clone(s,a._ellipsoid),a._vertexFormat=y.VertexFormat.clone(l,a._vertexFormat),a._width=d,a._height=u,a._extrudedHeight=c,a._cornerType=m,a._granularity=f,a._shadowVolume=p,a._offsetAttribute=-1===g?void 0:g,a):(Q.positions=o,Q.width=d,Q.height=u,Q.extrudedHeight=c,Q.cornerType=m,Q.granularity=f,Q.shadowVolume=p,Q.offsetAttribute=-1===g?void 0:g,new J(Q))},J.computeRectangle=function(t,e){const a=(t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT)).positions,o=t.width;return q(a,n.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84),o,n.defaultValue(t.cornerType,i.CornerType.ROUNDED),e)},J.createGeometry=function(i){let l=i._positions;const u=i._width,f=i._ellipsoid;l=M(l,f);const y=t.arrayRemoveDuplicates(l,r.Cartesian3.equalsEpsilon);if(y.length<2||u<=0)return;const p=i._height,g=i._extrudedHeight,h=!c.CesiumMath.equalsEpsilon(p,g,0,c.CesiumMath.EPSILON2),b=i._vertexFormat,C={ellipsoid:f,positions:y,width:u,cornerType:i._cornerType,granularity:i._granularity,saveAttributes:!0};let A;if(h)C.height=p,C.extrudedHeight=g,C.shadowVolume=i._shadowVolume,C.offsetAttribute=i._offsetAttribute,A=S(C,b);else{if(A=O(o.CorridorGeometryLibrary.computePositions(C),b,f),A.attributes.position.values=m.PolygonPipeline.scaleToGeodeticHeight(A.attributes.position.values,p,f),n.defined(i._offsetAttribute)){const t=i._offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1,e=A.attributes.position.values.length,r=new Uint8Array(e/3).fill(t);A.attributes.applyOffset=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}}const _=A.attributes,w=e.BoundingSphere.fromVertices(_.position.values,void 0,3);return b.position||(A.attributes.position.values=void 0),new s.Geometry({attributes:_,indices:A.indices,primitiveType:s.PrimitiveType.TRIANGLES,boundingSphere:w,offsetAttribute:i._offsetAttribute})},J.createShadowVolume=function(t,e,r){const a=t._granularity,i=t._ellipsoid,o=e(a,i),n=r(a,i);return new J({positions:t._positions,width:t._width,cornerType:t._cornerType,ellipsoid:i,granularity:a,extrudedHeight:o,height:n,vertexFormat:y.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(J.prototype,{rectangle:{get:function(){return n.defined(this._rectangle)||(this._rectangle=q(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}}),function(t,e){return n.defined(e)&&(t=J.unpack(t,e)),t._ellipsoid=r.Ellipsoid.clone(t._ellipsoid),J.createGeometry(t)}}));

@@ -1,1 +0,1 @@

define(["./arrayRemoveDuplicates-bb49591c","./Transforms-b1441a66","./Matrix3-d6f3913c","./ComponentDatatype-dd0b58d1","./PolylineVolumeGeometryLibrary-bf1fd89f","./CorridorGeometryLibrary-c5b09da3","./defaultValue-040c41f9","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9","./Math-8e567554","./PolygonPipeline-7de38ba5","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./EllipsoidTangentPlane-fc1becbb","./AxisAlignedBoundingBox-ba8ff526","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc","./PolylinePipeline-576cc29e","./EllipsoidGeodesic-9484ceff","./EllipsoidRhumbLine-1dd98535"],(function(e,t,i,r,o,n,s,a,l,d,u,f,p,c,h,y,b,g,m,A,_,E,C,G){"use strict";const T=new i.Cartesian3,P=new i.Cartesian3,v=new i.Cartesian3;function w(e,t){const d=[],f=e.positions,p=e.corners,c=e.endPositions,h=new l.GeometryAttributes;let y,b,g,m=0,A=0,_=0;for(b=0;b<f.length;b+=2)g=f[b].length-3,m+=g,_+=g/3*4,A+=f[b+1].length-3;for(m+=3,A+=3,b=0;b<p.length;b++){y=p[b];const e=p[b].leftPositions;s.defined(e)?(g=e.length,m+=g,_+=g/3*2):(g=p[b].rightPositions.length,A+=g,_+=g/3*2)}const E=s.defined(c);let C;E&&(C=c[0].length-3,m+=C,A+=C,C/=3,_+=4*C);const G=m+A,w=new Float64Array(G);let L,D,x,k,V,N,O=0,H=G-1;const I=C/2,M=u.IndexDatatype.createTypedArray(G/3,_+4);let S=0;if(M[S++]=O/3,M[S++]=(H-2)/3,E){d.push(O/3),N=T,V=P;const e=c[0];for(b=0;b<I;b++)N=i.Cartesian3.fromArray(e,3*(I-1-b),N),V=i.Cartesian3.fromArray(e,3*(I+b),V),n.CorridorGeometryLibrary.addAttribute(w,V,O),n.CorridorGeometryLibrary.addAttribute(w,N,void 0,H),D=O/3,k=D+1,L=(H-2)/3,x=L-1,M[S++]=L,M[S++]=x,M[S++]=D,M[S++]=k,O+=3,H-=3}let B=0,R=f[B++],U=f[B++];for(w.set(R,O),w.set(U,H-U.length+1),g=U.length-3,d.push(O/3,(H-2)/3),b=0;b<g;b+=3)D=O/3,k=D+1,L=(H-2)/3,x=L-1,M[S++]=L,M[S++]=x,M[S++]=D,M[S++]=k,O+=3,H-=3;for(b=0;b<p.length;b++){let e;y=p[b];const r=y.leftPositions,a=y.rightPositions;let l,u=v;if(s.defined(r)){for(H-=3,l=x,d.push(k),e=0;e<r.length/3;e++)u=i.Cartesian3.fromArray(r,3*e,u),M[S++]=l-e-1,M[S++]=l-e,n.CorridorGeometryLibrary.addAttribute(w,u,void 0,H),H-=3;d.push(l-Math.floor(r.length/6)),t===o.CornerType.BEVELED&&d.push((H-2)/3+1),O+=3}else{for(O+=3,l=k,d.push(x),e=0;e<a.length/3;e++)u=i.Cartesian3.fromArray(a,3*e,u),M[S++]=l+e,M[S++]=l+e+1,n.CorridorGeometryLibrary.addAttribute(w,u,O),O+=3;d.push(l+Math.floor(a.length/6)),t===o.CornerType.BEVELED&&d.push(O/3-1),H-=3}for(R=f[B++],U=f[B++],R.splice(0,3),U.splice(U.length-3,3),w.set(R,O),w.set(U,H-U.length+1),g=U.length-3,e=0;e<U.length;e+=3)k=O/3,D=k-1,x=(H-2)/3,L=x+1,M[S++]=L,M[S++]=x,M[S++]=D,M[S++]=k,O+=3,H-=3;O-=3,H+=3,d.push(O/3,(H-2)/3)}if(E){O+=3,H-=3,N=T,V=P;const e=c[1];for(b=0;b<I;b++)N=i.Cartesian3.fromArray(e,3*(C-b-1),N),V=i.Cartesian3.fromArray(e,3*b,V),n.CorridorGeometryLibrary.addAttribute(w,N,void 0,H),n.CorridorGeometryLibrary.addAttribute(w,V,O),k=O/3,D=k-1,x=(H-2)/3,L=x+1,M[S++]=L,M[S++]=x,M[S++]=D,M[S++]=k,O+=3,H-=3;d.push(O/3)}else d.push(O/3,(H-2)/3);return M[S++]=O/3,M[S++]=(H-2)/3,h.position=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:w}),{attributes:h,indices:M,wallIndices:d}}function L(e){const t=(e=s.defaultValue(e,s.defaultValue.EMPTY_OBJECT)).positions,r=e.width,n=s.defaultValue(e.height,0),a=s.defaultValue(e.extrudedHeight,n);this._positions=t,this._ellipsoid=i.Ellipsoid.clone(s.defaultValue(e.ellipsoid,i.Ellipsoid.WGS84)),this._width=r,this._height=Math.max(n,a),this._extrudedHeight=Math.min(n,a),this._cornerType=s.defaultValue(e.cornerType,o.CornerType.ROUNDED),this._granularity=s.defaultValue(e.granularity,f.CesiumMath.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*i.Cartesian3.packedLength+i.Ellipsoid.packedLength+6}L.pack=function(e,t,r){r=s.defaultValue(r,0);const o=e._positions,n=o.length;t[r++]=n;for(let e=0;e<n;++e,r+=i.Cartesian3.packedLength)i.Cartesian3.pack(o[e],t,r);return i.Ellipsoid.pack(e._ellipsoid,t,r),r+=i.Ellipsoid.packedLength,t[r++]=e._width,t[r++]=e._height,t[r++]=e._extrudedHeight,t[r++]=e._cornerType,t[r++]=e._granularity,t[r]=s.defaultValue(e._offsetAttribute,-1),t};const D=i.Ellipsoid.clone(i.Ellipsoid.UNIT_SPHERE),x={positions:void 0,ellipsoid:D,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};return L.unpack=function(e,t,r){t=s.defaultValue(t,0);const o=e[t++],n=new Array(o);for(let r=0;r<o;++r,t+=i.Cartesian3.packedLength)n[r]=i.Cartesian3.unpack(e,t);const a=i.Ellipsoid.unpack(e,t,D);t+=i.Ellipsoid.packedLength;const l=e[t++],d=e[t++],u=e[t++],f=e[t++],p=e[t++],c=e[t];return s.defined(r)?(r._positions=n,r._ellipsoid=i.Ellipsoid.clone(a,r._ellipsoid),r._width=l,r._height=d,r._extrudedHeight=u,r._cornerType=f,r._granularity=p,r._offsetAttribute=-1===c?void 0:c,r):(x.positions=n,x.width=l,x.height=d,x.extrudedHeight=u,x.cornerType=f,x.granularity=p,x.offsetAttribute=-1===c?void 0:c,new L(x))},L.createGeometry=function(o){let l=o._positions;const c=o._width,h=o._ellipsoid;l=function(e,t){for(let i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}(l,h);const y=e.arrayRemoveDuplicates(l,i.Cartesian3.equalsEpsilon);if(y.length<2||c<=0)return;const b=o._height,g=o._extrudedHeight,m=!f.CesiumMath.equalsEpsilon(b,g,0,f.CesiumMath.EPSILON2),A={ellipsoid:h,positions:y,width:c,cornerType:o._cornerType,granularity:o._granularity,saveAttributes:!1};let _;if(m)A.height=b,A.extrudedHeight=g,A.offsetAttribute=o._offsetAttribute,_=function(e){const t=e.ellipsoid,i=w(n.CorridorGeometryLibrary.computePositions(e),e.cornerType),o=i.wallIndices,l=e.height,f=e.extrudedHeight,c=i.attributes,h=i.indices;let y=c.position.values,b=y.length,g=new Float64Array(b);g.set(y);const m=new Float64Array(2*b);if(y=p.PolygonPipeline.scaleToGeodeticHeight(y,l,t),g=p.PolygonPipeline.scaleToGeodeticHeight(g,f,t),m.set(y),m.set(g,b),c.position.values=m,b/=3,s.defined(e.offsetAttribute)){let t=new Uint8Array(2*b);if(e.offsetAttribute===d.GeometryOffsetAttribute.TOP)t=t.fill(1,0,b);else{const i=e.offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1;t=t.fill(i)}c.applyOffset=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}let A;const _=h.length,E=u.IndexDatatype.createTypedArray(m.length/3,2*(_+o.length));E.set(h);let C,G,T=_;for(A=0;A<_;A+=2){const e=h[A],t=h[A+1];E[T++]=e+b,E[T++]=t+b}for(A=0;A<o.length;A++)C=o[A],G=C+b,E[T++]=C,E[T++]=G;return{attributes:c,indices:E}}(A);else{if(_=w(n.CorridorGeometryLibrary.computePositions(A),A.cornerType),_.attributes.position.values=p.PolygonPipeline.scaleToGeodeticHeight(_.attributes.position.values,b,h),s.defined(o._offsetAttribute)){const e=_.attributes.position.values.length,t=o._offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1,i=new Uint8Array(e/3).fill(t);_.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}}const E=_.attributes,C=t.BoundingSphere.fromVertices(E.position.values,void 0,3);return new a.Geometry({attributes:E,indices:_.indices,primitiveType:a.PrimitiveType.LINES,boundingSphere:C,offsetAttribute:o._offsetAttribute})},function(e,t){return s.defined(t)&&(e=L.unpack(e,t)),e._ellipsoid=i.Ellipsoid.clone(e._ellipsoid),L.createGeometry(e)}}));
define(["./arrayRemoveDuplicates-bb49591c","./Transforms-b7f686a8","./Matrix3-d6f3913c","./ComponentDatatype-dd0b58d1","./PolylineVolumeGeometryLibrary-1f624b8b","./CorridorGeometryLibrary-8e93b16a","./defaultValue-040c41f9","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9","./Math-8e567554","./PolygonPipeline-f56a8ec5","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./EllipsoidTangentPlane-ae5d3d65","./AxisAlignedBoundingBox-680337b6","./IntersectionTests-7d927f09","./Plane-6aee7ffc","./PolylinePipeline-eba1803b","./EllipsoidGeodesic-9484ceff","./EllipsoidRhumbLine-1dd98535"],(function(e,t,i,r,o,n,s,a,l,d,u,p,f,c,h,y,g,b,m,A,_,E,C,G){"use strict";const T=new i.Cartesian3,P=new i.Cartesian3,v=new i.Cartesian3;function w(e,t){const d=[],p=e.positions,f=e.corners,c=e.endPositions,h=new l.GeometryAttributes;let y,g,b,m=0,A=0,_=0;for(g=0;g<p.length;g+=2)b=p[g].length-3,m+=b,_+=b/3*4,A+=p[g+1].length-3;for(m+=3,A+=3,g=0;g<f.length;g++){y=f[g];const e=f[g].leftPositions;s.defined(e)?(b=e.length,m+=b,_+=b/3*2):(b=f[g].rightPositions.length,A+=b,_+=b/3*2)}const E=s.defined(c);let C;E&&(C=c[0].length-3,m+=C,A+=C,C/=3,_+=4*C);const G=m+A,w=new Float64Array(G);let L,D,x,k,V,N,O=0,H=G-1;const I=C/2,M=u.IndexDatatype.createTypedArray(G/3,_+4);let S=0;if(M[S++]=O/3,M[S++]=(H-2)/3,E){d.push(O/3),N=T,V=P;const e=c[0];for(g=0;g<I;g++)N=i.Cartesian3.fromArray(e,3*(I-1-g),N),V=i.Cartesian3.fromArray(e,3*(I+g),V),n.CorridorGeometryLibrary.addAttribute(w,V,O),n.CorridorGeometryLibrary.addAttribute(w,N,void 0,H),D=O/3,k=D+1,L=(H-2)/3,x=L-1,M[S++]=L,M[S++]=x,M[S++]=D,M[S++]=k,O+=3,H-=3}let B=0,R=p[B++],U=p[B++];for(w.set(R,O),w.set(U,H-U.length+1),b=U.length-3,d.push(O/3,(H-2)/3),g=0;g<b;g+=3)D=O/3,k=D+1,L=(H-2)/3,x=L-1,M[S++]=L,M[S++]=x,M[S++]=D,M[S++]=k,O+=3,H-=3;for(g=0;g<f.length;g++){let e;y=f[g];const r=y.leftPositions,a=y.rightPositions;let l,u=v;if(s.defined(r)){for(H-=3,l=x,d.push(k),e=0;e<r.length/3;e++)u=i.Cartesian3.fromArray(r,3*e,u),M[S++]=l-e-1,M[S++]=l-e,n.CorridorGeometryLibrary.addAttribute(w,u,void 0,H),H-=3;d.push(l-Math.floor(r.length/6)),t===o.CornerType.BEVELED&&d.push((H-2)/3+1),O+=3}else{for(O+=3,l=k,d.push(x),e=0;e<a.length/3;e++)u=i.Cartesian3.fromArray(a,3*e,u),M[S++]=l+e,M[S++]=l+e+1,n.CorridorGeometryLibrary.addAttribute(w,u,O),O+=3;d.push(l+Math.floor(a.length/6)),t===o.CornerType.BEVELED&&d.push(O/3-1),H-=3}for(R=p[B++],U=p[B++],R.splice(0,3),U.splice(U.length-3,3),w.set(R,O),w.set(U,H-U.length+1),b=U.length-3,e=0;e<U.length;e+=3)k=O/3,D=k-1,x=(H-2)/3,L=x+1,M[S++]=L,M[S++]=x,M[S++]=D,M[S++]=k,O+=3,H-=3;O-=3,H+=3,d.push(O/3,(H-2)/3)}if(E){O+=3,H-=3,N=T,V=P;const e=c[1];for(g=0;g<I;g++)N=i.Cartesian3.fromArray(e,3*(C-g-1),N),V=i.Cartesian3.fromArray(e,3*g,V),n.CorridorGeometryLibrary.addAttribute(w,N,void 0,H),n.CorridorGeometryLibrary.addAttribute(w,V,O),k=O/3,D=k-1,x=(H-2)/3,L=x+1,M[S++]=L,M[S++]=x,M[S++]=D,M[S++]=k,O+=3,H-=3;d.push(O/3)}else d.push(O/3,(H-2)/3);return M[S++]=O/3,M[S++]=(H-2)/3,h.position=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:w}),{attributes:h,indices:M,wallIndices:d}}function L(e){const t=(e=s.defaultValue(e,s.defaultValue.EMPTY_OBJECT)).positions,r=e.width,n=s.defaultValue(e.height,0),a=s.defaultValue(e.extrudedHeight,n);this._positions=t,this._ellipsoid=i.Ellipsoid.clone(s.defaultValue(e.ellipsoid,i.Ellipsoid.WGS84)),this._width=r,this._height=Math.max(n,a),this._extrudedHeight=Math.min(n,a),this._cornerType=s.defaultValue(e.cornerType,o.CornerType.ROUNDED),this._granularity=s.defaultValue(e.granularity,p.CesiumMath.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*i.Cartesian3.packedLength+i.Ellipsoid.packedLength+6}L.pack=function(e,t,r){r=s.defaultValue(r,0);const o=e._positions,n=o.length;t[r++]=n;for(let e=0;e<n;++e,r+=i.Cartesian3.packedLength)i.Cartesian3.pack(o[e],t,r);return i.Ellipsoid.pack(e._ellipsoid,t,r),r+=i.Ellipsoid.packedLength,t[r++]=e._width,t[r++]=e._height,t[r++]=e._extrudedHeight,t[r++]=e._cornerType,t[r++]=e._granularity,t[r]=s.defaultValue(e._offsetAttribute,-1),t};const D=i.Ellipsoid.clone(i.Ellipsoid.UNIT_SPHERE),x={positions:void 0,ellipsoid:D,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};return L.unpack=function(e,t,r){t=s.defaultValue(t,0);const o=e[t++],n=new Array(o);for(let r=0;r<o;++r,t+=i.Cartesian3.packedLength)n[r]=i.Cartesian3.unpack(e,t);const a=i.Ellipsoid.unpack(e,t,D);t+=i.Ellipsoid.packedLength;const l=e[t++],d=e[t++],u=e[t++],p=e[t++],f=e[t++],c=e[t];return s.defined(r)?(r._positions=n,r._ellipsoid=i.Ellipsoid.clone(a,r._ellipsoid),r._width=l,r._height=d,r._extrudedHeight=u,r._cornerType=p,r._granularity=f,r._offsetAttribute=-1===c?void 0:c,r):(x.positions=n,x.width=l,x.height=d,x.extrudedHeight=u,x.cornerType=p,x.granularity=f,x.offsetAttribute=-1===c?void 0:c,new L(x))},L.createGeometry=function(o){let l=o._positions;const c=o._width,h=o._ellipsoid;l=function(e,t){for(let i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}(l,h);const y=e.arrayRemoveDuplicates(l,i.Cartesian3.equalsEpsilon);if(y.length<2||c<=0)return;const g=o._height,b=o._extrudedHeight,m=!p.CesiumMath.equalsEpsilon(g,b,0,p.CesiumMath.EPSILON2),A={ellipsoid:h,positions:y,width:c,cornerType:o._cornerType,granularity:o._granularity,saveAttributes:!1};let _;if(m)A.height=g,A.extrudedHeight=b,A.offsetAttribute=o._offsetAttribute,_=function(e){const t=e.ellipsoid,i=w(n.CorridorGeometryLibrary.computePositions(e),e.cornerType),o=i.wallIndices,l=e.height,p=e.extrudedHeight,c=i.attributes,h=i.indices;let y=c.position.values,g=y.length,b=new Float64Array(g);b.set(y);const m=new Float64Array(2*g);if(y=f.PolygonPipeline.scaleToGeodeticHeight(y,l,t),b=f.PolygonPipeline.scaleToGeodeticHeight(b,p,t),m.set(y),m.set(b,g),c.position.values=m,g/=3,s.defined(e.offsetAttribute)){let t=new Uint8Array(2*g);if(e.offsetAttribute===d.GeometryOffsetAttribute.TOP)t=t.fill(1,0,g);else{const i=e.offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1;t=t.fill(i)}c.applyOffset=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}let A;const _=h.length,E=u.IndexDatatype.createTypedArray(m.length/3,2*(_+o.length));E.set(h);let C,G,T=_;for(A=0;A<_;A+=2){const e=h[A],t=h[A+1];E[T++]=e+g,E[T++]=t+g}for(A=0;A<o.length;A++)C=o[A],G=C+g,E[T++]=C,E[T++]=G;return{attributes:c,indices:E}}(A);else{if(_=w(n.CorridorGeometryLibrary.computePositions(A),A.cornerType),_.attributes.position.values=f.PolygonPipeline.scaleToGeodeticHeight(_.attributes.position.values,g,h),s.defined(o._offsetAttribute)){const e=_.attributes.position.values.length,t=o._offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1,i=new Uint8Array(e/3).fill(t);_.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}}const E=_.attributes,C=t.BoundingSphere.fromVertices(E.position.values,void 0,3);return new a.Geometry({attributes:E,indices:_.indices,primitiveType:a.PrimitiveType.LINES,boundingSphere:C,offsetAttribute:o._offsetAttribute})},function(e,t){return s.defined(t)&&(e=L.unpack(e,t)),e._ellipsoid=i.Ellipsoid.clone(e._ellipsoid),L.createGeometry(e)}}));

@@ -1,1 +0,1 @@

define(["./CylinderGeometry-f7520869","./defaultValue-040c41f9","./Transforms-b1441a66","./Matrix3-d6f3913c","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./CylinderGeometryLibrary-db7678f5","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9","./VertexFormat-848ec33d"],(function(e,t,r,n,d,a,i,o,y,b,f,c,m,u,G,s){"use strict";return function(r,n){return t.defined(n)&&(r=e.CylinderGeometry.unpack(r,n)),e.CylinderGeometry.createGeometry(r)}}));
define(["./CylinderGeometry-9c8f8c77","./defaultValue-040c41f9","./Transforms-b7f686a8","./Matrix3-d6f3913c","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./CylinderGeometryLibrary-db7678f5","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9","./VertexFormat-848ec33d"],(function(e,t,r,d,n,a,i,o,c,y,f,b,m,u,G,s){"use strict";return function(r,d){return t.defined(d)&&(r=e.CylinderGeometry.unpack(r,d)),e.CylinderGeometry.createGeometry(r)}}));

@@ -1,1 +0,1 @@

define(["./Transforms-b1441a66","./Matrix2-66622085","./Matrix3-d6f3913c","./ComponentDatatype-dd0b58d1","./CylinderGeometryLibrary-db7678f5","./defaultValue-040c41f9","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9","./Math-8e567554","./combine-6eb6e848","./RuntimeError-3c5db370","./WebGLConstants-f7267ced"],(function(t,e,i,n,o,r,a,s,u,f,d,c,l,b){"use strict";const m=new e.Cartesian2;function p(t){const e=(t=r.defaultValue(t,r.defaultValue.EMPTY_OBJECT)).length,i=t.topRadius,n=t.bottomRadius,o=r.defaultValue(t.slices,128),a=Math.max(r.defaultValue(t.numberOfVerticalLines,16),0);this._length=e,this._topRadius=i,this._bottomRadius=n,this._slices=o,this._numberOfVerticalLines=a,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}p.packedLength=6,p.pack=function(t,e,i){return i=r.defaultValue(i,0),e[i++]=t._length,e[i++]=t._topRadius,e[i++]=t._bottomRadius,e[i++]=t._slices,e[i++]=t._numberOfVerticalLines,e[i]=r.defaultValue(t._offsetAttribute,-1),e};const y={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};return p.unpack=function(t,e,i){e=r.defaultValue(e,0);const n=t[e++],o=t[e++],a=t[e++],s=t[e++],u=t[e++],f=t[e];return r.defined(i)?(i._length=n,i._topRadius=o,i._bottomRadius=a,i._slices=s,i._numberOfVerticalLines=u,i._offsetAttribute=-1===f?void 0:f,i):(y.length=n,y.topRadius=o,y.bottomRadius=a,y.slices=s,y.numberOfVerticalLines=u,y.offsetAttribute=-1===f?void 0:f,new p(y))},p.createGeometry=function(d){let c=d._length;const l=d._topRadius,b=d._bottomRadius,p=d._slices,y=d._numberOfVerticalLines;if(c<=0||l<0||b<0||0===l&&0===b)return;const _=2*p,h=o.CylinderGeometryLibrary.computePositions(c,l,b,p,!1);let A,R=2*p;if(y>0){const t=Math.min(y,p);A=Math.round(p/t),R+=t}const G=f.IndexDatatype.createTypedArray(_,2*R);let O,V=0;for(O=0;O<p-1;O++)G[V++]=O,G[V++]=O+1,G[V++]=O+p,G[V++]=O+1+p;if(G[V++]=p-1,G[V++]=0,G[V++]=p+p-1,G[V++]=p,y>0)for(O=0;O<p;O+=A)G[V++]=O,G[V++]=O+p;const L=new s.GeometryAttributes;L.position=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:h}),m.x=.5*c,m.y=Math.max(b,l);const g=new t.BoundingSphere(i.Cartesian3.ZERO,e.Cartesian2.magnitude(m));if(r.defined(d._offsetAttribute)){c=h.length;const t=d._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,e=new Uint8Array(c/3).fill(t);L.applyOffset=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}return new a.Geometry({attributes:L,indices:G,primitiveType:a.PrimitiveType.LINES,boundingSphere:g,offsetAttribute:d._offsetAttribute})},function(t,e){return r.defined(e)&&(t=p.unpack(t,e)),p.createGeometry(t)}}));
define(["./Transforms-b7f686a8","./Matrix2-66622085","./Matrix3-d6f3913c","./ComponentDatatype-dd0b58d1","./CylinderGeometryLibrary-db7678f5","./defaultValue-040c41f9","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9","./Math-8e567554","./combine-6eb6e848","./RuntimeError-3c5db370","./WebGLConstants-f7267ced"],(function(t,e,i,n,o,r,a,s,u,f,d,c,l,b){"use strict";const m=new e.Cartesian2;function p(t){const e=(t=r.defaultValue(t,r.defaultValue.EMPTY_OBJECT)).length,i=t.topRadius,n=t.bottomRadius,o=r.defaultValue(t.slices,128),a=Math.max(r.defaultValue(t.numberOfVerticalLines,16),0);this._length=e,this._topRadius=i,this._bottomRadius=n,this._slices=o,this._numberOfVerticalLines=a,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}p.packedLength=6,p.pack=function(t,e,i){return i=r.defaultValue(i,0),e[i++]=t._length,e[i++]=t._topRadius,e[i++]=t._bottomRadius,e[i++]=t._slices,e[i++]=t._numberOfVerticalLines,e[i]=r.defaultValue(t._offsetAttribute,-1),e};const y={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};return p.unpack=function(t,e,i){e=r.defaultValue(e,0);const n=t[e++],o=t[e++],a=t[e++],s=t[e++],u=t[e++],f=t[e];return r.defined(i)?(i._length=n,i._topRadius=o,i._bottomRadius=a,i._slices=s,i._numberOfVerticalLines=u,i._offsetAttribute=-1===f?void 0:f,i):(y.length=n,y.topRadius=o,y.bottomRadius=a,y.slices=s,y.numberOfVerticalLines=u,y.offsetAttribute=-1===f?void 0:f,new p(y))},p.createGeometry=function(d){let c=d._length;const l=d._topRadius,b=d._bottomRadius,p=d._slices,y=d._numberOfVerticalLines;if(c<=0||l<0||b<0||0===l&&0===b)return;const _=2*p,h=o.CylinderGeometryLibrary.computePositions(c,l,b,p,!1);let A,R=2*p;if(y>0){const t=Math.min(y,p);A=Math.round(p/t),R+=t}const G=f.IndexDatatype.createTypedArray(_,2*R);let O,V=0;for(O=0;O<p-1;O++)G[V++]=O,G[V++]=O+1,G[V++]=O+p,G[V++]=O+1+p;if(G[V++]=p-1,G[V++]=0,G[V++]=p+p-1,G[V++]=p,y>0)for(O=0;O<p;O+=A)G[V++]=O,G[V++]=O+p;const L=new s.GeometryAttributes;L.position=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:h}),m.x=.5*c,m.y=Math.max(b,l);const g=new t.BoundingSphere(i.Cartesian3.ZERO,e.Cartesian2.magnitude(m));if(r.defined(d._offsetAttribute)){c=h.length;const t=d._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,e=new Uint8Array(c/3).fill(t);L.applyOffset=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}return new a.Geometry({attributes:L,indices:G,primitiveType:a.PrimitiveType.LINES,boundingSphere:g,offsetAttribute:d._offsetAttribute})},function(t,e){return r.defined(e)&&(t=p.unpack(t,e)),p.createGeometry(t)}}));

@@ -1,1 +0,1 @@

define(["./Matrix3-d6f3913c","./defaultValue-040c41f9","./EllipseGeometry-cf52e05b","./Math-8e567554","./Transforms-b1441a66","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./EllipseGeometryLibrary-574e5a91","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryInstance-c620c48b","./GeometryOffsetAttribute-b6810db4","./GeometryPipeline-fafdd6b1","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b","./IndexDatatype-eddea9c9","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc","./VertexFormat-848ec33d"],(function(e,t,r,n,a,i,o,c,d,s,f,l,b,m,p,u,y,G,E,C,x,A){"use strict";return function(n,a){return t.defined(a)&&(n=r.EllipseGeometry.unpack(n,a)),n._center=e.Cartesian3.clone(n._center),n._ellipsoid=e.Ellipsoid.clone(n._ellipsoid),r.EllipseGeometry.createGeometry(n)}}));
define(["./Matrix3-d6f3913c","./defaultValue-040c41f9","./EllipseGeometry-7a90d5bc","./Math-8e567554","./Transforms-b7f686a8","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./EllipseGeometryLibrary-27e68ef4","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryInstance-c620c48b","./GeometryOffsetAttribute-b6810db4","./GeometryPipeline-c180ffdb","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b","./IndexDatatype-eddea9c9","./IntersectionTests-7d927f09","./Plane-6aee7ffc","./VertexFormat-848ec33d"],(function(e,t,r,n,i,o,a,c,d,s,f,l,b,m,p,u,y,G,E,C,x,A){"use strict";return function(n,i){return t.defined(i)&&(n=r.EllipseGeometry.unpack(n,i)),n._center=e.Cartesian3.clone(n._center),n._ellipsoid=e.Ellipsoid.clone(n._ellipsoid),r.EllipseGeometry.createGeometry(n)}}));

@@ -1,1 +0,1 @@

define(["./Matrix3-d6f3913c","./defaultValue-040c41f9","./EllipseOutlineGeometry-50ba7912","./Math-8e567554","./Transforms-b1441a66","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./EllipseGeometryLibrary-574e5a91","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9"],(function(e,t,r,i,n,a,l,o,d,c,s,u,b,f,m){"use strict";return function(i,n){return t.defined(n)&&(i=r.EllipseOutlineGeometry.unpack(i,n)),i._center=e.Cartesian3.clone(i._center),i._ellipsoid=e.Ellipsoid.clone(i._ellipsoid),r.EllipseOutlineGeometry.createGeometry(i)}}));
define(["./Matrix3-d6f3913c","./defaultValue-040c41f9","./EllipseOutlineGeometry-557afe07","./Math-8e567554","./Transforms-b7f686a8","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./EllipseGeometryLibrary-27e68ef4","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9"],(function(e,t,r,i,n,l,o,a,d,c,s,u,f,b,m){"use strict";return function(i,n){return t.defined(n)&&(i=r.EllipseOutlineGeometry.unpack(i,n)),i._center=e.Cartesian3.clone(i._center),i._ellipsoid=e.Ellipsoid.clone(i._ellipsoid),r.EllipseOutlineGeometry.createGeometry(i)}}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./EllipsoidGeometry-756342f9","./Transforms-b1441a66","./Matrix3-d6f3913c","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9","./VertexFormat-848ec33d"],(function(e,t,r,o,d,i,a,n,c,f,b,m,u,s,y){"use strict";return function(r,o){return e.defined(o)&&(r=t.EllipsoidGeometry.unpack(r,o)),t.EllipsoidGeometry.createGeometry(r)}}));
define(["./defaultValue-040c41f9","./EllipsoidGeometry-bcf775bb","./Transforms-b7f686a8","./Matrix3-d6f3913c","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9","./VertexFormat-848ec33d"],(function(e,t,r,d,o,i,n,a,b,c,f,m,u,s,y){"use strict";return function(r,d){return e.defined(d)&&(r=t.EllipsoidGeometry.unpack(r,d)),t.EllipsoidGeometry.createGeometry(r)}}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./EllipsoidOutlineGeometry-783b26cc","./Transforms-b1441a66","./Matrix3-d6f3913c","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9"],(function(e,t,r,i,n,o,d,a,u,b,c,f,l,m){"use strict";return function(r,i){return e.defined(r.buffer)&&(r=t.EllipsoidOutlineGeometry.unpack(r,i)),t.EllipsoidOutlineGeometry.createGeometry(r)}}));
define(["./defaultValue-040c41f9","./EllipsoidOutlineGeometry-97f1f7c7","./Transforms-b7f686a8","./Matrix3-d6f3913c","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9"],(function(e,t,r,i,n,d,o,f,u,a,c,b,l,m){"use strict";return function(r,i){return e.defined(r.buffer)&&(r=t.EllipsoidOutlineGeometry.unpack(r,i)),t.EllipsoidOutlineGeometry.createGeometry(r)}}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./FrustumGeometry-66dd29e8","./Transforms-b1441a66","./Matrix3-d6f3913c","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./Plane-6aee7ffc","./VertexFormat-848ec33d"],(function(e,t,r,n,u,a,o,m,c,d,f,i,s,b){"use strict";return function(r,n){return e.defined(n)&&(r=t.FrustumGeometry.unpack(r,n)),t.FrustumGeometry.createGeometry(r)}}));
define(["./defaultValue-040c41f9","./FrustumGeometry-f54f215c","./Transforms-b7f686a8","./Matrix3-d6f3913c","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./Plane-6aee7ffc","./VertexFormat-848ec33d"],(function(e,t,r,n,u,a,o,c,f,m,d,i,s,b){"use strict";return function(r,n){return e.defined(n)&&(r=t.FrustumGeometry.unpack(r,n)),t.FrustumGeometry.createGeometry(r)}}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./Transforms-b1441a66","./Matrix3-d6f3913c","./ComponentDatatype-dd0b58d1","./FrustumGeometry-66dd29e8","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./Plane-6aee7ffc","./VertexFormat-848ec33d"],(function(e,t,r,n,a,u,i,o,c,s,p,m,d,f){"use strict";function h(n){const u=n.frustum,i=n.orientation,o=n.origin,c=e.defaultValue(n._drawNearPlane,!0);let s,p;u instanceof a.PerspectiveFrustum?(s=0,p=a.PerspectiveFrustum.packedLength):u instanceof a.OrthographicFrustum&&(s=1,p=a.OrthographicFrustum.packedLength),this._frustumType=s,this._frustum=u.clone(),this._origin=r.Cartesian3.clone(o),this._orientation=t.Quaternion.clone(i),this._drawNearPlane=c,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+p+r.Cartesian3.packedLength+t.Quaternion.packedLength}h.pack=function(n,u,i){i=e.defaultValue(i,0);const o=n._frustumType,c=n._frustum;return u[i++]=o,0===o?(a.PerspectiveFrustum.pack(c,u,i),i+=a.PerspectiveFrustum.packedLength):(a.OrthographicFrustum.pack(c,u,i),i+=a.OrthographicFrustum.packedLength),r.Cartesian3.pack(n._origin,u,i),i+=r.Cartesian3.packedLength,t.Quaternion.pack(n._orientation,u,i),u[i+=t.Quaternion.packedLength]=n._drawNearPlane?1:0,u};const g=new a.PerspectiveFrustum,l=new a.OrthographicFrustum,_=new t.Quaternion,k=new r.Cartesian3;return h.unpack=function(n,u,i){u=e.defaultValue(u,0);const o=n[u++];let c;0===o?(c=a.PerspectiveFrustum.unpack(n,u,g),u+=a.PerspectiveFrustum.packedLength):(c=a.OrthographicFrustum.unpack(n,u,l),u+=a.OrthographicFrustum.packedLength);const s=r.Cartesian3.unpack(n,u,k);u+=r.Cartesian3.packedLength;const p=t.Quaternion.unpack(n,u,_),m=1===n[u+=t.Quaternion.packedLength];if(!e.defined(i))return new h({frustum:c,origin:s,orientation:p,_drawNearPlane:m});const d=o===i._frustumType?i._frustum:void 0;return i._frustum=c.clone(d),i._frustumType=o,i._origin=r.Cartesian3.clone(s,i._origin),i._orientation=t.Quaternion.clone(p,i._orientation),i._drawNearPlane=m,i},h.createGeometry=function(e){const r=e._frustumType,o=e._frustum,c=e._origin,s=e._orientation,p=e._drawNearPlane,m=new Float64Array(24);a.FrustumGeometry._computeNearFarPlanes(c,s,r,o,m);const d=new i.GeometryAttributes({position:new u.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:m})});let f,h;const g=p?2:1,l=new Uint16Array(8*(g+1));let _=p?0:1;for(;_<2;++_)f=p?8*_:0,h=4*_,l[f]=h,l[f+1]=h+1,l[f+2]=h+1,l[f+3]=h+2,l[f+4]=h+2,l[f+5]=h+3,l[f+6]=h+3,l[f+7]=h;for(_=0;_<2;++_)f=8*(g+_),h=4*_,l[f]=h,l[f+1]=h+4,l[f+2]=h+1,l[f+3]=h+5,l[f+4]=h+2,l[f+5]=h+6,l[f+6]=h+3,l[f+7]=h+7;return new u.Geometry({attributes:d,indices:l,primitiveType:u.PrimitiveType.LINES,boundingSphere:t.BoundingSphere.fromVertices(m)})},function(t,r){return e.defined(r)&&(t=h.unpack(t,r)),h.createGeometry(t)}}));
define(["./defaultValue-040c41f9","./Transforms-b7f686a8","./Matrix3-d6f3913c","./ComponentDatatype-dd0b58d1","./FrustumGeometry-f54f215c","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./Plane-6aee7ffc","./VertexFormat-848ec33d"],(function(e,t,r,n,a,u,i,o,c,s,p,m,d,f){"use strict";function h(n){const u=n.frustum,i=n.orientation,o=n.origin,c=e.defaultValue(n._drawNearPlane,!0);let s,p;u instanceof a.PerspectiveFrustum?(s=0,p=a.PerspectiveFrustum.packedLength):u instanceof a.OrthographicFrustum&&(s=1,p=a.OrthographicFrustum.packedLength),this._frustumType=s,this._frustum=u.clone(),this._origin=r.Cartesian3.clone(o),this._orientation=t.Quaternion.clone(i),this._drawNearPlane=c,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+p+r.Cartesian3.packedLength+t.Quaternion.packedLength}h.pack=function(n,u,i){i=e.defaultValue(i,0);const o=n._frustumType,c=n._frustum;return u[i++]=o,0===o?(a.PerspectiveFrustum.pack(c,u,i),i+=a.PerspectiveFrustum.packedLength):(a.OrthographicFrustum.pack(c,u,i),i+=a.OrthographicFrustum.packedLength),r.Cartesian3.pack(n._origin,u,i),i+=r.Cartesian3.packedLength,t.Quaternion.pack(n._orientation,u,i),u[i+=t.Quaternion.packedLength]=n._drawNearPlane?1:0,u};const g=new a.PerspectiveFrustum,l=new a.OrthographicFrustum,_=new t.Quaternion,k=new r.Cartesian3;return h.unpack=function(n,u,i){u=e.defaultValue(u,0);const o=n[u++];let c;0===o?(c=a.PerspectiveFrustum.unpack(n,u,g),u+=a.PerspectiveFrustum.packedLength):(c=a.OrthographicFrustum.unpack(n,u,l),u+=a.OrthographicFrustum.packedLength);const s=r.Cartesian3.unpack(n,u,k);u+=r.Cartesian3.packedLength;const p=t.Quaternion.unpack(n,u,_),m=1===n[u+=t.Quaternion.packedLength];if(!e.defined(i))return new h({frustum:c,origin:s,orientation:p,_drawNearPlane:m});const d=o===i._frustumType?i._frustum:void 0;return i._frustum=c.clone(d),i._frustumType=o,i._origin=r.Cartesian3.clone(s,i._origin),i._orientation=t.Quaternion.clone(p,i._orientation),i._drawNearPlane=m,i},h.createGeometry=function(e){const r=e._frustumType,o=e._frustum,c=e._origin,s=e._orientation,p=e._drawNearPlane,m=new Float64Array(24);a.FrustumGeometry._computeNearFarPlanes(c,s,r,o,m);const d=new i.GeometryAttributes({position:new u.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:m})});let f,h;const g=p?2:1,l=new Uint16Array(8*(g+1));let _=p?0:1;for(;_<2;++_)f=p?8*_:0,h=4*_,l[f]=h,l[f+1]=h+1,l[f+2]=h+1,l[f+3]=h+2,l[f+4]=h+2,l[f+5]=h+3,l[f+6]=h+3,l[f+7]=h;for(_=0;_<2;++_)f=8*(g+_),h=4*_,l[f]=h,l[f+1]=h+4,l[f+2]=h+1,l[f+3]=h+5,l[f+4]=h+2,l[f+5]=h+6,l[f+6]=h+3,l[f+7]=h+7;return new u.Geometry({attributes:d,indices:l,primitiveType:u.PrimitiveType.LINES,boundingSphere:t.BoundingSphere.fromVertices(m)})},function(t,r){return e.defined(r)&&(t=h.unpack(t,r)),h.createGeometry(t)}}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./PrimitivePipeline-6dcd9231","./createTaskProcessorWorker","./Transforms-b1441a66","./Matrix3-d6f3913c","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryPipeline-fafdd6b1","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b","./IndexDatatype-eddea9c9","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc","./WebMercatorProjection-53aa47d9"],(function(e,t,r,n,o,i,a,s,c,f,d,u,b,m,l,p,y,P,k,C){"use strict";const G={};function W(t){let r=G[t];return e.defined(r)||("object"==typeof exports?G[r]=r=require(`Workers/${t}`):require([`Workers/${t}`],(function(e){r=e,G[r]=e}))),r}return r((function(r,n){const o=r.subTasks,i=o.length,a=new Array(i);for(let t=0;t<i;t++){const r=o[t],n=r.geometry,i=r.moduleName;if(e.defined(i)){const e=W(i);a[t]=e(n,r.offset)}else a[t]=n}return Promise.all(a).then((function(e){return t.PrimitivePipeline.packCreateGeometryResults(e,n)}))}))}));
define(["./defaultValue-040c41f9","./PrimitivePipeline-736b1b51","./createTaskProcessorWorker","./Transforms-b7f686a8","./Matrix3-d6f3913c","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryPipeline-c180ffdb","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b","./IndexDatatype-eddea9c9","./IntersectionTests-7d927f09","./Plane-6aee7ffc","./WebMercatorProjection-53aa47d9"],(function(e,t,r,n,o,i,s,a,c,f,d,u,b,m,l,p,y,P,k,C){"use strict";const G={};function W(t){let r=G[t];return e.defined(r)||("object"==typeof exports?G[r]=r=require(`Workers/${t}`):require([`Workers/${t}`],(function(e){r=e,G[r]=e}))),r}return r((function(r,n){const o=r.subTasks,i=o.length,s=new Array(i);for(let t=0;t<i;t++){const r=o[t],n=r.geometry,i=r.moduleName;if(e.defined(i)){const e=W(i);s[t]=e(n,r.offset)}else s[t]=n}return Promise.all(s).then((function(e){return t.PrimitivePipeline.packCreateGeometryResults(e,n)}))}))}));

@@ -1,1 +0,1 @@

define(["./Transforms-b1441a66","./Matrix2-66622085","./Matrix3-d6f3913c","./defaultValue-040c41f9","./Math-8e567554","./ArcType-3d26c7db","./arrayRemoveDuplicates-bb49591c","./ComponentDatatype-dd0b58d1","./EllipsoidGeodesic-9484ceff","./EllipsoidRhumbLine-1dd98535","./EncodedCartesian3-f2554a3b","./GeometryAttribute-944b7aef","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc","./WebMercatorProjection-53aa47d9","./combine-6eb6e848","./RuntimeError-3c5db370","./WebGLConstants-f7267ced"],(function(e,t,a,n,i,r,s,o,l,c,u,C,d,p,h,g,f,m){"use strict";function w(i){i=n.defaultValue(i,n.defaultValue.EMPTY_OBJECT),this._ellipsoid=n.defaultValue(i.ellipsoid,a.Ellipsoid.WGS84),this._rectangle=n.defaultValue(i.rectangle,t.Rectangle.MAX_VALUE),this._projection=new e.GeographicProjection(this._ellipsoid),this._numberOfLevelZeroTilesX=n.defaultValue(i.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=n.defaultValue(i.numberOfLevelZeroTilesY,1)}Object.defineProperties(w.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),w.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e},w.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e},w.prototype.rectangleToNativeRectangle=function(e,a){const r=i.CesiumMath.toDegrees(e.west),s=i.CesiumMath.toDegrees(e.south),o=i.CesiumMath.toDegrees(e.east),l=i.CesiumMath.toDegrees(e.north);return n.defined(a)?(a.west=r,a.south=s,a.east=o,a.north=l,a):new t.Rectangle(r,s,o,l)},w.prototype.tileXYToNativeRectangle=function(e,t,a,n){const r=this.tileXYToRectangle(e,t,a,n);return r.west=i.CesiumMath.toDegrees(r.west),r.south=i.CesiumMath.toDegrees(r.south),r.east=i.CesiumMath.toDegrees(r.east),r.north=i.CesiumMath.toDegrees(r.north),r},w.prototype.tileXYToRectangle=function(e,a,i,r){const s=this._rectangle,o=this.getNumberOfXTilesAtLevel(i),l=this.getNumberOfYTilesAtLevel(i),c=s.width/o,u=e*c+s.west,C=(e+1)*c+s.west,d=s.height/l,p=s.north-a*d,h=s.north-(a+1)*d;return n.defined(r)||(r=new t.Rectangle(u,h,C,p)),r.west=u,r.south=h,r.east=C,r.north=p,r},w.prototype.positionToTileXY=function(e,a,r){const s=this._rectangle;if(!t.Rectangle.contains(s,e))return;const o=this.getNumberOfXTilesAtLevel(a),l=this.getNumberOfYTilesAtLevel(a),c=s.width/o,u=s.height/l;let C=e.longitude;s.east<s.west&&(C+=i.CesiumMath.TWO_PI);let d=(C-s.west)/c|0;d>=o&&(d=o-1);let p=(s.north-e.latitude)/u|0;return p>=l&&(p=l-1),n.defined(r)?(r.x=d,r.y=p,r):new t.Cartesian2(d,p)};const y=new a.Cartesian3,M=new a.Cartesian3,T=new a.Cartographic,E=new a.Cartesian3,_=new a.Cartesian3,O=new e.BoundingSphere,b=new w,P=[new a.Cartographic,new a.Cartographic,new a.Cartographic,new a.Cartographic],A=new t.Cartesian2,k={};function L(e){a.Cartographic.fromRadians(e.east,e.north,0,P[0]),a.Cartographic.fromRadians(e.west,e.north,0,P[1]),a.Cartographic.fromRadians(e.east,e.south,0,P[2]),a.Cartographic.fromRadians(e.west,e.south,0,P[3]);let t=0,n=0,i=0,r=0;const s=k._terrainHeightsMaxLevel;let o;for(o=0;o<=s;++o){let e=!1;for(let t=0;t<4;++t){const a=P[t];if(b.positionToTileXY(a,o,A),0===t)i=A.x,r=A.y;else if(i!==A.x||r!==A.y){e=!0;break}}if(e)break;t=i,n=r}if(0!==o)return{x:t,y:n,level:o>s?s:o-1}}k.initialize=function(){let t=k._initPromise;return n.defined(t)||(t=e.Resource.fetchJson(e.buildModuleUrl("Assets/approximateTerrainHeights.json")).then((function(e){k._terrainHeights=e})),k._initPromise=t),t},k.getMinimumMaximumHeights=function(e,i){i=n.defaultValue(i,a.Ellipsoid.WGS84);const r=L(e);let s=k._defaultMinTerrainHeight,o=k._defaultMaxTerrainHeight;if(n.defined(r)){const l=`${r.level}-${r.x}-${r.y}`,c=k._terrainHeights[l];n.defined(c)&&(s=c[0],o=c[1]),i.cartographicToCartesian(t.Rectangle.northeast(e,T),y),i.cartographicToCartesian(t.Rectangle.southwest(e,T),M),a.Cartesian3.midpoint(M,y,E);const u=i.scaleToGeodeticSurface(E,_);if(n.defined(u)){const e=a.Cartesian3.distance(E,u);s=Math.min(s,-e)}else s=k._defaultMinTerrainHeight}return s=Math.max(k._defaultMinTerrainHeight,s),{minimumTerrainHeight:s,maximumTerrainHeight:o}},k.getBoundingSphere=function(t,i){i=n.defaultValue(i,a.Ellipsoid.WGS84);const r=L(t);let s=k._defaultMaxTerrainHeight;if(n.defined(r)){const e=`${r.level}-${r.x}-${r.y}`,t=k._terrainHeights[e];n.defined(t)&&(s=t[1])}const o=e.BoundingSphere.fromRectangle3D(t,i,0);return e.BoundingSphere.fromRectangle3D(t,i,s,O),e.BoundingSphere.union(o,O,o)},k._terrainHeightsMaxLevel=6,k._defaultMaxTerrainHeight=9e3,k._defaultMinTerrainHeight=-1e5,k._terrainHeights=void 0,k._initPromise=void 0,Object.defineProperties(k,{initialized:{get:function(){return n.defined(k._terrainHeights)}}});var S=k;const x=[e.GeographicProjection,h.WebMercatorProjection],I=x.length,N=Math.cos(i.CesiumMath.toRadians(30)),R=Math.cos(i.CesiumMath.toRadians(150));function D(e){const t=(e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT)).positions;this.width=n.defaultValue(e.width,1),this._positions=t,this.granularity=n.defaultValue(e.granularity,9999),this.loop=n.defaultValue(e.loop,!1),this.arcType=n.defaultValue(e.arcType,r.ArcType.GEODESIC),this._ellipsoid=a.Ellipsoid.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(D.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+a.Ellipsoid.packedLength+1+1}}}),D.setProjectionAndEllipsoid=function(e,t){let a=0;for(let e=0;e<I;e++)if(t instanceof x[e]){a=e;break}e._projectionIndex=a,e._ellipsoid=t.ellipsoid};const v=new a.Cartesian3,z=new a.Cartesian3,H=new a.Cartesian3;function B(e,t,n,i,r){const s=X(i,e,0,v),o=X(i,e,n,z),l=X(i,t,0,H),c=W(o,s,z),u=W(l,s,H);return a.Cartesian3.cross(u,c,r),a.Cartesian3.normalize(r,r)}const V=new a.Cartographic,j=new a.Cartesian3,G=new a.Cartesian3,Y=new a.Cartesian3;function F(e,t,n,i,s,o,u,C,d,p,h){if(0===s)return;let g;o===r.ArcType.GEODESIC?g=new l.EllipsoidGeodesic(e,t,u):o===r.ArcType.RHUMB&&(g=new c.EllipsoidRhumbLine(e,t,u));const f=g.surfaceDistance;if(f<s)return;const m=B(e,t,i,u,Y),w=Math.ceil(f/s),y=f/w;let M=y;const T=w-1;let E=C.length;for(let e=0;e<T;e++){const e=g.interpolateUsingSurfaceDistance(M,V),t=X(u,e,n,j),r=X(u,e,i,G);a.Cartesian3.pack(m,C,E),a.Cartesian3.pack(t,d,E),a.Cartesian3.pack(r,p,E),h.push(e.latitude),h.push(e.longitude),E+=3,M+=y}}const q=new a.Cartographic;function X(e,t,n,i){return a.Cartographic.clone(t,q),q.height=n,a.Cartographic.toCartesian(q,e,i)}function W(e,t,n){return a.Cartesian3.subtract(e,t,n),a.Cartesian3.normalize(n,n),n}function U(e,t,n,i){return i=W(e,t,i),i=a.Cartesian3.cross(i,n,i),i=a.Cartesian3.normalize(i,i),i=a.Cartesian3.cross(n,i,i)}D.pack=function(e,t,i){let r=n.defaultValue(i,0);const s=e._positions,o=s.length;t[r++]=o;for(let e=0;e<o;++e){const n=s[e];a.Cartesian3.pack(n,t,r),r+=3}return t[r++]=e.granularity,t[r++]=e.loop?1:0,t[r++]=e.arcType,a.Ellipsoid.pack(e._ellipsoid,t,r),r+=a.Ellipsoid.packedLength,t[r++]=e._projectionIndex,t[r++]=e._scene3DOnly?1:0,t},D.unpack=function(e,t,i){let r=n.defaultValue(t,0);const s=e[r++],o=new Array(s);for(let t=0;t<s;t++)o[t]=a.Cartesian3.unpack(e,r),r+=3;const l=e[r++],c=1===e[r++],u=e[r++],C=a.Ellipsoid.unpack(e,r);r+=a.Ellipsoid.packedLength;const d=e[r++],p=1===e[r++];return n.defined(i)||(i=new D({positions:o})),i._positions=o,i.granularity=l,i.loop=c,i.arcType=u,i._ellipsoid=C,i._projectionIndex=d,i._scene3DOnly=p,i};const Z=new a.Cartesian3,$=new a.Cartesian3,J=new a.Cartesian3,Q=new a.Cartesian3;function K(e,t,n,r,s){const o=W(n,t,Q),l=U(e,t,o,Z),c=U(r,t,o,$);if(i.CesiumMath.equalsEpsilon(a.Cartesian3.dot(l,c),-1,i.CesiumMath.EPSILON5))return s=a.Cartesian3.cross(o,l,s),s=a.Cartesian3.normalize(s,s);s=a.Cartesian3.add(c,l,s),s=a.Cartesian3.normalize(s,s);const u=a.Cartesian3.cross(o,s,J);return a.Cartesian3.dot(c,u)<0&&(s=a.Cartesian3.negate(s,s)),s}const ee=p.Plane.fromPointNormal(a.Cartesian3.ZERO,a.Cartesian3.UNIT_Y),te=new a.Cartesian3,ae=new a.Cartesian3,ne=new a.Cartesian3,ie=new a.Cartesian3,re=new a.Cartesian3,se=new a.Cartesian3,oe=new a.Cartographic,le=new a.Cartographic,ce=new a.Cartographic;D.createGeometry=function(l){const p=!l._scene3DOnly;let h=l.loop;const g=l._ellipsoid,f=l.granularity,m=l.arcType,w=new x[l._projectionIndex](g),y=1e3;let M,T;const E=l._positions,_=E.length;let O,b,P,A;2===_&&(h=!1);const k=new c.EllipsoidRhumbLine(void 0,void 0,g);let L,I,R;const D=[E[0]];for(T=0;T<_-1;T++)O=E[T],b=E[T+1],L=d.IntersectionTests.lineSegmentPlane(O,b,ee,se),!n.defined(L)||a.Cartesian3.equalsEpsilon(L,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(L,b,i.CesiumMath.EPSILON7)||(l.arcType===r.ArcType.GEODESIC?D.push(a.Cartesian3.clone(L)):l.arcType===r.ArcType.RHUMB&&(R=g.cartesianToCartographic(L,oe).longitude,P=g.cartesianToCartographic(O,oe),A=g.cartesianToCartographic(b,le),k.setEndPoints(P,A),I=k.findIntersectionWithLongitude(R,ce),L=g.cartographicToCartesian(I,se),!n.defined(L)||a.Cartesian3.equalsEpsilon(L,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(L,b,i.CesiumMath.EPSILON7)||D.push(a.Cartesian3.clone(L)))),D.push(b);h&&(O=E[_-1],b=E[0],L=d.IntersectionTests.lineSegmentPlane(O,b,ee,se),!n.defined(L)||a.Cartesian3.equalsEpsilon(L,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(L,b,i.CesiumMath.EPSILON7)||(l.arcType===r.ArcType.GEODESIC?D.push(a.Cartesian3.clone(L)):l.arcType===r.ArcType.RHUMB&&(R=g.cartesianToCartographic(L,oe).longitude,P=g.cartesianToCartographic(O,oe),A=g.cartesianToCartographic(b,le),k.setEndPoints(P,A),I=k.findIntersectionWithLongitude(R,ce),L=g.cartographicToCartesian(I,se),!n.defined(L)||a.Cartesian3.equalsEpsilon(L,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(L,b,i.CesiumMath.EPSILON7)||D.push(a.Cartesian3.clone(L)))));let v=D.length,z=new Array(v);for(T=0;T<v;T++){const e=a.Cartographic.fromCartesian(D[T],g);e.height=0,z[T]=e}if(z=s.arrayRemoveDuplicates(z,a.Cartographic.equalsEpsilon),v=z.length,v<2)return;const H=[],V=[],j=[],G=[];let Y=te,q=ae,U=ne,Z=ie,$=re;const J=z[0],Q=z[1];for(Y=X(g,z[v-1],0,Y),Z=X(g,Q,0,Z),q=X(g,J,0,q),U=X(g,J,y,U),$=h?K(Y,q,U,Z,$):B(J,Q,y,g,$),a.Cartesian3.pack($,V,0),a.Cartesian3.pack(q,j,0),a.Cartesian3.pack(U,G,0),H.push(J.latitude),H.push(J.longitude),F(J,Q,0,y,f,m,g,V,j,G,H),T=1;T<v-1;++T){Y=a.Cartesian3.clone(q,Y),q=a.Cartesian3.clone(Z,q);const e=z[T];X(g,e,y,U),X(g,z[T+1],0,Z),K(Y,q,U,Z,$),M=V.length,a.Cartesian3.pack($,V,M),a.Cartesian3.pack(q,j,M),a.Cartesian3.pack(U,G,M),H.push(e.latitude),H.push(e.longitude),F(z[T],z[T+1],0,y,f,m,g,V,j,G,H)}const ue=z[v-1],Ce=z[v-2];if(q=X(g,ue,0,q),U=X(g,ue,y,U),h){const e=z[0];Y=X(g,Ce,0,Y),Z=X(g,e,0,Z),$=K(Y,q,U,Z,$)}else $=B(Ce,ue,y,g,$);if(M=V.length,a.Cartesian3.pack($,V,M),a.Cartesian3.pack(q,j,M),a.Cartesian3.pack(U,G,M),H.push(ue.latitude),H.push(ue.longitude),h){for(F(ue,J,0,y,f,m,g,V,j,G,H),M=V.length,T=0;T<3;++T)V[M+T]=V[T],j[M+T]=j[T],G[M+T]=G[T];H.push(J.latitude),H.push(J.longitude)}return function(n,r,s,l,c,d,p){let h,g;const f=r._ellipsoid,m=s.length/3-1,w=8*m,y=4*w,M=36*m,T=w>65535?new Uint32Array(M):new Uint16Array(M),E=new Float64Array(3*w),_=new Float32Array(y),O=new Float32Array(y),b=new Float32Array(y),P=new Float32Array(y),A=new Float32Array(y);let k,L,x,I;p&&(k=new Float32Array(y),L=new Float32Array(y),x=new Float32Array(y),I=new Float32Array(2*w));const R=d.length/2;let D=0;const v=Oe;v.height=0;const z=be;z.height=0;let H=Pe,B=Ae;if(p)for(g=0,h=1;h<R;h++)v.latitude=d[g],v.longitude=d[g+1],z.latitude=d[g+2],z.longitude=d[g+3],H=r.project(v,H),B=r.project(z,B),D+=a.Cartesian3.distance(H,B),g+=2;const V=l.length/3;B=a.Cartesian3.unpack(l,0,B);let j,G=0;for(g=3,h=1;h<V;h++)H=a.Cartesian3.clone(B,H),B=a.Cartesian3.unpack(l,g,B),G+=a.Cartesian3.distance(H,B),g+=3;g=3;let Y=0,F=0,q=0,X=0,U=!1,Z=a.Cartesian3.unpack(s,0,Le),$=a.Cartesian3.unpack(l,0,Ae),J=a.Cartesian3.unpack(c,0,xe);if(n){pe(J,a.Cartesian3.unpack(s,s.length-6,ke),Z,$)&&(J=a.Cartesian3.negate(J,J))}let Q=0,K=0,ee=0;for(h=0;h<m;h++){const e=a.Cartesian3.clone(Z,ke),n=a.Cartesian3.clone($,Pe);let o,C,h,m,w=a.Cartesian3.clone(J,Se);if(U&&(w=a.Cartesian3.negate(w,w)),Z=a.Cartesian3.unpack(s,g,Le),$=a.Cartesian3.unpack(l,g,Ae),J=a.Cartesian3.unpack(c,g,xe),U=pe(J,e,Z,$),v.latitude=d[Y],v.longitude=d[Y+1],z.latitude=d[Y+2],z.longitude=d[Y+3],p){const e=_e(v,z);o=r.project(v,He),C=r.project(z,Be);const t=W(C,o,$e);t.y=Math.abs(t.y),h=Ve,m=je,0===e||a.Cartesian3.dot(t,a.Cartesian3.UNIT_Y)>N?(h=me(r,v,w,o,Ve),m=me(r,z,J,C,je)):1===e?(m=me(r,z,J,C,je),h.x=0,h.y=i.CesiumMath.sign(v.longitude-Math.abs(z.longitude)),h.z=0):(h=me(r,v,w,o,Ve),m.x=0,m.y=i.CesiumMath.sign(v.longitude-z.longitude),m.z=0)}const y=a.Cartesian3.distance(n,$),M=u.EncodedCartesian3.fromCartesian(e,Ue),T=a.Cartesian3.subtract(Z,e,Ge),R=a.Cartesian3.normalize(T,qe);let H=a.Cartesian3.subtract(n,e,Ye);H=a.Cartesian3.normalize(H,H);let B=a.Cartesian3.cross(R,H,qe);B=a.Cartesian3.normalize(B,B);let V=a.Cartesian3.cross(H,w,Xe);V=a.Cartesian3.normalize(V,V);let te=a.Cartesian3.subtract($,Z,Fe);te=a.Cartesian3.normalize(te,te);let ae=a.Cartesian3.cross(J,te,We);ae=a.Cartesian3.normalize(ae,ae);const ne=y/G,ie=Q/G;let re,se,oe,le=0,ce=0,ue=0;if(p){le=a.Cartesian3.distance(o,C),re=u.EncodedCartesian3.fromCartesian(o,Ze),se=a.Cartesian3.subtract(C,o,$e),oe=a.Cartesian3.normalize(se,Je);const e=oe.x;oe.x=oe.y,oe.y=-e,ce=le/D,ue=K/D}for(j=0;j<8;j++){const e=X+4*j,t=F+2*j,n=e+3,i=j<4?1:-1,r=2===j||3===j||6===j||7===j?1:-1;a.Cartesian3.pack(M.high,_,e),_[n]=T.x,a.Cartesian3.pack(M.low,O,e),O[n]=T.y,a.Cartesian3.pack(V,b,e),b[n]=T.z,a.Cartesian3.pack(ae,P,e),P[n]=ne*i,a.Cartesian3.pack(B,A,e);let s=ie*r;0===s&&r<0&&(s=9),A[n]=s,p&&(k[e]=re.high.x,k[e+1]=re.high.y,k[e+2]=re.low.x,k[e+3]=re.low.y,x[e]=-h.y,x[e+1]=h.x,x[e+2]=m.y,x[e+3]=-m.x,L[e]=se.x,L[e+1]=se.y,L[e+2]=oe.x,L[e+3]=oe.y,I[t]=ce*i,s=ue*r,0===s&&r<0&&(s=9),I[t+1]=s)}const Ce=ve,de=ze,he=Re,ge=De,fe=t.Rectangle.fromCartographicArray(Ie,Ne),we=S.getMinimumMaximumHeights(fe,f),ye=we.minimumTerrainHeight,Te=we.maximumTerrainHeight;ee+=ye,ee+=Te,Me(e,n,ye,Te,Ce,he),Me(Z,$,ye,Te,de,ge);let Oe=a.Cartesian3.multiplyByScalar(B,i.CesiumMath.EPSILON5,Qe);a.Cartesian3.add(Ce,Oe,Ce),a.Cartesian3.add(de,Oe,de),a.Cartesian3.add(he,Oe,he),a.Cartesian3.add(ge,Oe,ge),Ee(Ce,de),Ee(he,ge),a.Cartesian3.pack(Ce,E,q),a.Cartesian3.pack(de,E,q+3),a.Cartesian3.pack(ge,E,q+6),a.Cartesian3.pack(he,E,q+9),Oe=a.Cartesian3.multiplyByScalar(B,-2*i.CesiumMath.EPSILON5,Qe),a.Cartesian3.add(Ce,Oe,Ce),a.Cartesian3.add(de,Oe,de),a.Cartesian3.add(he,Oe,he),a.Cartesian3.add(ge,Oe,ge),Ee(Ce,de),Ee(he,ge),a.Cartesian3.pack(Ce,E,q+12),a.Cartesian3.pack(de,E,q+15),a.Cartesian3.pack(ge,E,q+18),a.Cartesian3.pack(he,E,q+21),Y+=2,g+=3,F+=16,q+=24,X+=32,Q+=y,K+=le}g=0;let te=0;for(h=0;h<m;h++){for(j=0;j<tt;j++)T[g+j]=et[j]+te;te+=8,g+=tt}const ae=Ke;e.BoundingSphere.fromVertices(s,a.Cartesian3.ZERO,3,ae[0]),e.BoundingSphere.fromVertices(l,a.Cartesian3.ZERO,3,ae[1]);const ne=e.BoundingSphere.fromBoundingSpheres(ae);ne.radius+=ee/(2*m);const ie={position:new C.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,normalize:!1,values:E}),startHiAndForwardOffsetX:at(_),startLoAndForwardOffsetY:at(O),startNormalAndForwardOffsetZ:at(b),endNormalAndTextureCoordinateNormalizationX:at(P),rightNormalAndTextureCoordinateNormalizationY:at(A)};p&&(ie.startHiLo2D=at(k),ie.offsetAndRight2D=at(L),ie.startEndNormals2D=at(x),ie.texcoordNormalization2D=new C.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,normalize:!1,values:I}));return new C.Geometry({attributes:ie,indices:T,boundingSphere:ne})}(h,w,j,G,V,H,p)};const ue=new a.Cartesian3,Ce=new a.Matrix3,de=new e.Quaternion;function pe(t,n,r,s){const o=W(r,n,ue),l=a.Cartesian3.dot(o,t);if(l>N||l<R){const n=W(s,r,Q),o=l<R?i.CesiumMath.PI_OVER_TWO:-i.CesiumMath.PI_OVER_TWO,c=e.Quaternion.fromAxisAngle(n,o,de),u=a.Matrix3.fromQuaternion(c,Ce);return a.Matrix3.multiplyByVector(u,t,t),!0}return!1}const he=new a.Cartographic,ge=new a.Cartesian3,fe=new a.Cartesian3;function me(e,t,n,r,s){const o=a.Cartographic.toCartesian(t,e._ellipsoid,ge);let l=a.Cartesian3.add(o,n,fe),c=!1;const u=e._ellipsoid;let C=u.cartesianToCartographic(l,he);Math.abs(t.longitude-C.longitude)>i.CesiumMath.PI_OVER_TWO&&(c=!0,l=a.Cartesian3.subtract(o,n,fe),C=u.cartesianToCartographic(l,he)),C.height=0;const d=e.project(C,s);return(s=a.Cartesian3.subtract(d,r,s)).z=0,s=a.Cartesian3.normalize(s,s),c&&a.Cartesian3.negate(s,s),s}const we=new a.Cartesian3,ye=new a.Cartesian3;function Me(e,t,n,i,r,s){const o=a.Cartesian3.subtract(t,e,we);a.Cartesian3.normalize(o,o);const l=n-0;let c=a.Cartesian3.multiplyByScalar(o,l,ye);a.Cartesian3.add(e,c,r);const u=i-1e3;c=a.Cartesian3.multiplyByScalar(o,u,ye),a.Cartesian3.add(t,c,s)}const Te=new a.Cartesian3;function Ee(e,t){const n=p.Plane.getPointDistance(ee,e),r=p.Plane.getPointDistance(ee,t);let s=Te;i.CesiumMath.equalsEpsilon(n,0,i.CesiumMath.EPSILON2)?(s=W(t,e,s),a.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),a.Cartesian3.add(e,s,e)):i.CesiumMath.equalsEpsilon(r,0,i.CesiumMath.EPSILON2)&&(s=W(e,t,s),a.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),a.Cartesian3.add(t,s,t))}function _e(e,t){const a=Math.abs(e.longitude),n=Math.abs(t.longitude);if(i.CesiumMath.equalsEpsilon(a,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){const n=i.CesiumMath.sign(t.longitude);return e.longitude=n*(a-i.CesiumMath.EPSILON11),1}if(i.CesiumMath.equalsEpsilon(n,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){const a=i.CesiumMath.sign(e.longitude);return t.longitude=a*(n-i.CesiumMath.EPSILON11),2}return 0}const Oe=new a.Cartographic,be=new a.Cartographic,Pe=new a.Cartesian3,Ae=new a.Cartesian3,ke=new a.Cartesian3,Le=new a.Cartesian3,Se=new a.Cartesian3,xe=new a.Cartesian3,Ie=[Oe,be],Ne=new t.Rectangle,Re=new a.Cartesian3,De=new a.Cartesian3,ve=new a.Cartesian3,ze=new a.Cartesian3,He=new a.Cartesian3,Be=new a.Cartesian3,Ve=new a.Cartesian3,je=new a.Cartesian3,Ge=new a.Cartesian3,Ye=new a.Cartesian3,Fe=new a.Cartesian3,qe=new a.Cartesian3,Xe=new a.Cartesian3,We=new a.Cartesian3,Ue=new u.EncodedCartesian3,Ze=new u.EncodedCartesian3,$e=new a.Cartesian3,Je=new a.Cartesian3,Qe=new a.Cartesian3,Ke=[new e.BoundingSphere,new e.BoundingSphere],et=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],tt=et.length;function at(e){return new C.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}return D._projectNormal=me,function(e,t){return S.initialize().then((function(){return n.defined(t)&&(e=D.unpack(e,t)),D.createGeometry(e)}))}}));
define(["./Transforms-b7f686a8","./Matrix2-66622085","./Matrix3-d6f3913c","./defaultValue-040c41f9","./Math-8e567554","./ArcType-3d26c7db","./arrayRemoveDuplicates-bb49591c","./ComponentDatatype-dd0b58d1","./EllipsoidGeodesic-9484ceff","./EllipsoidRhumbLine-1dd98535","./EncodedCartesian3-f2554a3b","./GeometryAttribute-6ed30287","./IntersectionTests-7d927f09","./Plane-6aee7ffc","./WebMercatorProjection-53aa47d9","./combine-6eb6e848","./RuntimeError-3c5db370","./WebGLConstants-f7267ced"],(function(e,t,a,n,i,r,s,o,l,c,u,C,d,p,h,g,f,m){"use strict";function w(i){i=n.defaultValue(i,n.defaultValue.EMPTY_OBJECT),this._ellipsoid=n.defaultValue(i.ellipsoid,a.Ellipsoid.WGS84),this._rectangle=n.defaultValue(i.rectangle,t.Rectangle.MAX_VALUE),this._projection=new e.GeographicProjection(this._ellipsoid),this._numberOfLevelZeroTilesX=n.defaultValue(i.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=n.defaultValue(i.numberOfLevelZeroTilesY,1)}Object.defineProperties(w.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),w.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e},w.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e},w.prototype.rectangleToNativeRectangle=function(e,a){const r=i.CesiumMath.toDegrees(e.west),s=i.CesiumMath.toDegrees(e.south),o=i.CesiumMath.toDegrees(e.east),l=i.CesiumMath.toDegrees(e.north);return n.defined(a)?(a.west=r,a.south=s,a.east=o,a.north=l,a):new t.Rectangle(r,s,o,l)},w.prototype.tileXYToNativeRectangle=function(e,t,a,n){const r=this.tileXYToRectangle(e,t,a,n);return r.west=i.CesiumMath.toDegrees(r.west),r.south=i.CesiumMath.toDegrees(r.south),r.east=i.CesiumMath.toDegrees(r.east),r.north=i.CesiumMath.toDegrees(r.north),r},w.prototype.tileXYToRectangle=function(e,a,i,r){const s=this._rectangle,o=this.getNumberOfXTilesAtLevel(i),l=this.getNumberOfYTilesAtLevel(i),c=s.width/o,u=e*c+s.west,C=(e+1)*c+s.west,d=s.height/l,p=s.north-a*d,h=s.north-(a+1)*d;return n.defined(r)||(r=new t.Rectangle(u,h,C,p)),r.west=u,r.south=h,r.east=C,r.north=p,r},w.prototype.positionToTileXY=function(e,a,r){const s=this._rectangle;if(!t.Rectangle.contains(s,e))return;const o=this.getNumberOfXTilesAtLevel(a),l=this.getNumberOfYTilesAtLevel(a),c=s.width/o,u=s.height/l;let C=e.longitude;s.east<s.west&&(C+=i.CesiumMath.TWO_PI);let d=(C-s.west)/c|0;d>=o&&(d=o-1);let p=(s.north-e.latitude)/u|0;return p>=l&&(p=l-1),n.defined(r)?(r.x=d,r.y=p,r):new t.Cartesian2(d,p)};const y=new a.Cartesian3,M=new a.Cartesian3,T=new a.Cartographic,E=new a.Cartesian3,_=new a.Cartesian3,O=new e.BoundingSphere,b=new w,P=[new a.Cartographic,new a.Cartographic,new a.Cartographic,new a.Cartographic],A=new t.Cartesian2,k={};function L(e){a.Cartographic.fromRadians(e.east,e.north,0,P[0]),a.Cartographic.fromRadians(e.west,e.north,0,P[1]),a.Cartographic.fromRadians(e.east,e.south,0,P[2]),a.Cartographic.fromRadians(e.west,e.south,0,P[3]);let t=0,n=0,i=0,r=0;const s=k._terrainHeightsMaxLevel;let o;for(o=0;o<=s;++o){let e=!1;for(let t=0;t<4;++t){const a=P[t];if(b.positionToTileXY(a,o,A),0===t)i=A.x,r=A.y;else if(i!==A.x||r!==A.y){e=!0;break}}if(e)break;t=i,n=r}if(0!==o)return{x:t,y:n,level:o>s?s:o-1}}k.initialize=function(){let t=k._initPromise;return n.defined(t)||(t=e.Resource.fetchJson(e.buildModuleUrl("Assets/approximateTerrainHeights.json")).then((function(e){k._terrainHeights=e})),k._initPromise=t),t},k.getMinimumMaximumHeights=function(e,i){i=n.defaultValue(i,a.Ellipsoid.WGS84);const r=L(e);let s=k._defaultMinTerrainHeight,o=k._defaultMaxTerrainHeight;if(n.defined(r)){const l=`${r.level}-${r.x}-${r.y}`,c=k._terrainHeights[l];n.defined(c)&&(s=c[0],o=c[1]),i.cartographicToCartesian(t.Rectangle.northeast(e,T),y),i.cartographicToCartesian(t.Rectangle.southwest(e,T),M),a.Cartesian3.midpoint(M,y,E);const u=i.scaleToGeodeticSurface(E,_);if(n.defined(u)){const e=a.Cartesian3.distance(E,u);s=Math.min(s,-e)}else s=k._defaultMinTerrainHeight}return s=Math.max(k._defaultMinTerrainHeight,s),{minimumTerrainHeight:s,maximumTerrainHeight:o}},k.getBoundingSphere=function(t,i){i=n.defaultValue(i,a.Ellipsoid.WGS84);const r=L(t);let s=k._defaultMaxTerrainHeight;if(n.defined(r)){const e=`${r.level}-${r.x}-${r.y}`,t=k._terrainHeights[e];n.defined(t)&&(s=t[1])}const o=e.BoundingSphere.fromRectangle3D(t,i,0);return e.BoundingSphere.fromRectangle3D(t,i,s,O),e.BoundingSphere.union(o,O,o)},k._terrainHeightsMaxLevel=6,k._defaultMaxTerrainHeight=9e3,k._defaultMinTerrainHeight=-1e5,k._terrainHeights=void 0,k._initPromise=void 0,Object.defineProperties(k,{initialized:{get:function(){return n.defined(k._terrainHeights)}}});var S=k;const x=[e.GeographicProjection,h.WebMercatorProjection],I=x.length,N=Math.cos(i.CesiumMath.toRadians(30)),R=Math.cos(i.CesiumMath.toRadians(150));function D(e){const t=(e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT)).positions;this.width=n.defaultValue(e.width,1),this._positions=t,this.granularity=n.defaultValue(e.granularity,9999),this.loop=n.defaultValue(e.loop,!1),this.arcType=n.defaultValue(e.arcType,r.ArcType.GEODESIC),this._ellipsoid=a.Ellipsoid.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(D.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+a.Ellipsoid.packedLength+1+1}}}),D.setProjectionAndEllipsoid=function(e,t){let a=0;for(let e=0;e<I;e++)if(t instanceof x[e]){a=e;break}e._projectionIndex=a,e._ellipsoid=t.ellipsoid};const v=new a.Cartesian3,z=new a.Cartesian3,H=new a.Cartesian3;function B(e,t,n,i,r){const s=X(i,e,0,v),o=X(i,e,n,z),l=X(i,t,0,H),c=W(o,s,z),u=W(l,s,H);return a.Cartesian3.cross(u,c,r),a.Cartesian3.normalize(r,r)}const V=new a.Cartographic,j=new a.Cartesian3,G=new a.Cartesian3,Y=new a.Cartesian3;function F(e,t,n,i,s,o,u,C,d,p,h){if(0===s)return;let g;o===r.ArcType.GEODESIC?g=new l.EllipsoidGeodesic(e,t,u):o===r.ArcType.RHUMB&&(g=new c.EllipsoidRhumbLine(e,t,u));const f=g.surfaceDistance;if(f<s)return;const m=B(e,t,i,u,Y),w=Math.ceil(f/s),y=f/w;let M=y;const T=w-1;let E=C.length;for(let e=0;e<T;e++){const e=g.interpolateUsingSurfaceDistance(M,V),t=X(u,e,n,j),r=X(u,e,i,G);a.Cartesian3.pack(m,C,E),a.Cartesian3.pack(t,d,E),a.Cartesian3.pack(r,p,E),h.push(e.latitude),h.push(e.longitude),E+=3,M+=y}}const q=new a.Cartographic;function X(e,t,n,i){return a.Cartographic.clone(t,q),q.height=n,a.Cartographic.toCartesian(q,e,i)}function W(e,t,n){return a.Cartesian3.subtract(e,t,n),a.Cartesian3.normalize(n,n),n}function U(e,t,n,i){return i=W(e,t,i),i=a.Cartesian3.cross(i,n,i),i=a.Cartesian3.normalize(i,i),i=a.Cartesian3.cross(n,i,i)}D.pack=function(e,t,i){let r=n.defaultValue(i,0);const s=e._positions,o=s.length;t[r++]=o;for(let e=0;e<o;++e){const n=s[e];a.Cartesian3.pack(n,t,r),r+=3}return t[r++]=e.granularity,t[r++]=e.loop?1:0,t[r++]=e.arcType,a.Ellipsoid.pack(e._ellipsoid,t,r),r+=a.Ellipsoid.packedLength,t[r++]=e._projectionIndex,t[r++]=e._scene3DOnly?1:0,t},D.unpack=function(e,t,i){let r=n.defaultValue(t,0);const s=e[r++],o=new Array(s);for(let t=0;t<s;t++)o[t]=a.Cartesian3.unpack(e,r),r+=3;const l=e[r++],c=1===e[r++],u=e[r++],C=a.Ellipsoid.unpack(e,r);r+=a.Ellipsoid.packedLength;const d=e[r++],p=1===e[r++];return n.defined(i)||(i=new D({positions:o})),i._positions=o,i.granularity=l,i.loop=c,i.arcType=u,i._ellipsoid=C,i._projectionIndex=d,i._scene3DOnly=p,i};const Z=new a.Cartesian3,$=new a.Cartesian3,J=new a.Cartesian3,Q=new a.Cartesian3;function K(e,t,n,r,s){const o=W(n,t,Q),l=U(e,t,o,Z),c=U(r,t,o,$);if(i.CesiumMath.equalsEpsilon(a.Cartesian3.dot(l,c),-1,i.CesiumMath.EPSILON5))return s=a.Cartesian3.cross(o,l,s),s=a.Cartesian3.normalize(s,s);s=a.Cartesian3.add(c,l,s),s=a.Cartesian3.normalize(s,s);const u=a.Cartesian3.cross(o,s,J);return a.Cartesian3.dot(c,u)<0&&(s=a.Cartesian3.negate(s,s)),s}const ee=p.Plane.fromPointNormal(a.Cartesian3.ZERO,a.Cartesian3.UNIT_Y),te=new a.Cartesian3,ae=new a.Cartesian3,ne=new a.Cartesian3,ie=new a.Cartesian3,re=new a.Cartesian3,se=new a.Cartesian3,oe=new a.Cartographic,le=new a.Cartographic,ce=new a.Cartographic;D.createGeometry=function(l){const p=!l._scene3DOnly;let h=l.loop;const g=l._ellipsoid,f=l.granularity,m=l.arcType,w=new x[l._projectionIndex](g),y=1e3;let M,T;const E=l._positions,_=E.length;let O,b,P,A;2===_&&(h=!1);const k=new c.EllipsoidRhumbLine(void 0,void 0,g);let L,I,R;const D=[E[0]];for(T=0;T<_-1;T++)O=E[T],b=E[T+1],L=d.IntersectionTests.lineSegmentPlane(O,b,ee,se),!n.defined(L)||a.Cartesian3.equalsEpsilon(L,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(L,b,i.CesiumMath.EPSILON7)||(l.arcType===r.ArcType.GEODESIC?D.push(a.Cartesian3.clone(L)):l.arcType===r.ArcType.RHUMB&&(R=g.cartesianToCartographic(L,oe).longitude,P=g.cartesianToCartographic(O,oe),A=g.cartesianToCartographic(b,le),k.setEndPoints(P,A),I=k.findIntersectionWithLongitude(R,ce),L=g.cartographicToCartesian(I,se),!n.defined(L)||a.Cartesian3.equalsEpsilon(L,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(L,b,i.CesiumMath.EPSILON7)||D.push(a.Cartesian3.clone(L)))),D.push(b);h&&(O=E[_-1],b=E[0],L=d.IntersectionTests.lineSegmentPlane(O,b,ee,se),!n.defined(L)||a.Cartesian3.equalsEpsilon(L,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(L,b,i.CesiumMath.EPSILON7)||(l.arcType===r.ArcType.GEODESIC?D.push(a.Cartesian3.clone(L)):l.arcType===r.ArcType.RHUMB&&(R=g.cartesianToCartographic(L,oe).longitude,P=g.cartesianToCartographic(O,oe),A=g.cartesianToCartographic(b,le),k.setEndPoints(P,A),I=k.findIntersectionWithLongitude(R,ce),L=g.cartographicToCartesian(I,se),!n.defined(L)||a.Cartesian3.equalsEpsilon(L,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(L,b,i.CesiumMath.EPSILON7)||D.push(a.Cartesian3.clone(L)))));let v=D.length,z=new Array(v);for(T=0;T<v;T++){const e=a.Cartographic.fromCartesian(D[T],g);e.height=0,z[T]=e}if(z=s.arrayRemoveDuplicates(z,a.Cartographic.equalsEpsilon),v=z.length,v<2)return;const H=[],V=[],j=[],G=[];let Y=te,q=ae,U=ne,Z=ie,$=re;const J=z[0],Q=z[1];for(Y=X(g,z[v-1],0,Y),Z=X(g,Q,0,Z),q=X(g,J,0,q),U=X(g,J,y,U),$=h?K(Y,q,U,Z,$):B(J,Q,y,g,$),a.Cartesian3.pack($,V,0),a.Cartesian3.pack(q,j,0),a.Cartesian3.pack(U,G,0),H.push(J.latitude),H.push(J.longitude),F(J,Q,0,y,f,m,g,V,j,G,H),T=1;T<v-1;++T){Y=a.Cartesian3.clone(q,Y),q=a.Cartesian3.clone(Z,q);const e=z[T];X(g,e,y,U),X(g,z[T+1],0,Z),K(Y,q,U,Z,$),M=V.length,a.Cartesian3.pack($,V,M),a.Cartesian3.pack(q,j,M),a.Cartesian3.pack(U,G,M),H.push(e.latitude),H.push(e.longitude),F(z[T],z[T+1],0,y,f,m,g,V,j,G,H)}const ue=z[v-1],Ce=z[v-2];if(q=X(g,ue,0,q),U=X(g,ue,y,U),h){const e=z[0];Y=X(g,Ce,0,Y),Z=X(g,e,0,Z),$=K(Y,q,U,Z,$)}else $=B(Ce,ue,y,g,$);if(M=V.length,a.Cartesian3.pack($,V,M),a.Cartesian3.pack(q,j,M),a.Cartesian3.pack(U,G,M),H.push(ue.latitude),H.push(ue.longitude),h){for(F(ue,J,0,y,f,m,g,V,j,G,H),M=V.length,T=0;T<3;++T)V[M+T]=V[T],j[M+T]=j[T],G[M+T]=G[T];H.push(J.latitude),H.push(J.longitude)}return function(n,r,s,l,c,d,p){let h,g;const f=r._ellipsoid,m=s.length/3-1,w=8*m,y=4*w,M=36*m,T=w>65535?new Uint32Array(M):new Uint16Array(M),E=new Float64Array(3*w),_=new Float32Array(y),O=new Float32Array(y),b=new Float32Array(y),P=new Float32Array(y),A=new Float32Array(y);let k,L,x,I;p&&(k=new Float32Array(y),L=new Float32Array(y),x=new Float32Array(y),I=new Float32Array(2*w));const R=d.length/2;let D=0;const v=Oe;v.height=0;const z=be;z.height=0;let H=Pe,B=Ae;if(p)for(g=0,h=1;h<R;h++)v.latitude=d[g],v.longitude=d[g+1],z.latitude=d[g+2],z.longitude=d[g+3],H=r.project(v,H),B=r.project(z,B),D+=a.Cartesian3.distance(H,B),g+=2;const V=l.length/3;B=a.Cartesian3.unpack(l,0,B);let j,G=0;for(g=3,h=1;h<V;h++)H=a.Cartesian3.clone(B,H),B=a.Cartesian3.unpack(l,g,B),G+=a.Cartesian3.distance(H,B),g+=3;g=3;let Y=0,F=0,q=0,X=0,U=!1,Z=a.Cartesian3.unpack(s,0,Le),$=a.Cartesian3.unpack(l,0,Ae),J=a.Cartesian3.unpack(c,0,xe);if(n){pe(J,a.Cartesian3.unpack(s,s.length-6,ke),Z,$)&&(J=a.Cartesian3.negate(J,J))}let Q=0,K=0,ee=0;for(h=0;h<m;h++){const e=a.Cartesian3.clone(Z,ke),n=a.Cartesian3.clone($,Pe);let o,C,h,m,w=a.Cartesian3.clone(J,Se);if(U&&(w=a.Cartesian3.negate(w,w)),Z=a.Cartesian3.unpack(s,g,Le),$=a.Cartesian3.unpack(l,g,Ae),J=a.Cartesian3.unpack(c,g,xe),U=pe(J,e,Z,$),v.latitude=d[Y],v.longitude=d[Y+1],z.latitude=d[Y+2],z.longitude=d[Y+3],p){const e=_e(v,z);o=r.project(v,He),C=r.project(z,Be);const t=W(C,o,$e);t.y=Math.abs(t.y),h=Ve,m=je,0===e||a.Cartesian3.dot(t,a.Cartesian3.UNIT_Y)>N?(h=me(r,v,w,o,Ve),m=me(r,z,J,C,je)):1===e?(m=me(r,z,J,C,je),h.x=0,h.y=i.CesiumMath.sign(v.longitude-Math.abs(z.longitude)),h.z=0):(h=me(r,v,w,o,Ve),m.x=0,m.y=i.CesiumMath.sign(v.longitude-z.longitude),m.z=0)}const y=a.Cartesian3.distance(n,$),M=u.EncodedCartesian3.fromCartesian(e,Ue),T=a.Cartesian3.subtract(Z,e,Ge),R=a.Cartesian3.normalize(T,qe);let H=a.Cartesian3.subtract(n,e,Ye);H=a.Cartesian3.normalize(H,H);let B=a.Cartesian3.cross(R,H,qe);B=a.Cartesian3.normalize(B,B);let V=a.Cartesian3.cross(H,w,Xe);V=a.Cartesian3.normalize(V,V);let te=a.Cartesian3.subtract($,Z,Fe);te=a.Cartesian3.normalize(te,te);let ae=a.Cartesian3.cross(J,te,We);ae=a.Cartesian3.normalize(ae,ae);const ne=y/G,ie=Q/G;let re,se,oe,le=0,ce=0,ue=0;if(p){le=a.Cartesian3.distance(o,C),re=u.EncodedCartesian3.fromCartesian(o,Ze),se=a.Cartesian3.subtract(C,o,$e),oe=a.Cartesian3.normalize(se,Je);const e=oe.x;oe.x=oe.y,oe.y=-e,ce=le/D,ue=K/D}for(j=0;j<8;j++){const e=X+4*j,t=F+2*j,n=e+3,i=j<4?1:-1,r=2===j||3===j||6===j||7===j?1:-1;a.Cartesian3.pack(M.high,_,e),_[n]=T.x,a.Cartesian3.pack(M.low,O,e),O[n]=T.y,a.Cartesian3.pack(V,b,e),b[n]=T.z,a.Cartesian3.pack(ae,P,e),P[n]=ne*i,a.Cartesian3.pack(B,A,e);let s=ie*r;0===s&&r<0&&(s=9),A[n]=s,p&&(k[e]=re.high.x,k[e+1]=re.high.y,k[e+2]=re.low.x,k[e+3]=re.low.y,x[e]=-h.y,x[e+1]=h.x,x[e+2]=m.y,x[e+3]=-m.x,L[e]=se.x,L[e+1]=se.y,L[e+2]=oe.x,L[e+3]=oe.y,I[t]=ce*i,s=ue*r,0===s&&r<0&&(s=9),I[t+1]=s)}const Ce=ve,de=ze,he=Re,ge=De,fe=t.Rectangle.fromCartographicArray(Ie,Ne),we=S.getMinimumMaximumHeights(fe,f),ye=we.minimumTerrainHeight,Te=we.maximumTerrainHeight;ee+=ye,ee+=Te,Me(e,n,ye,Te,Ce,he),Me(Z,$,ye,Te,de,ge);let Oe=a.Cartesian3.multiplyByScalar(B,i.CesiumMath.EPSILON5,Qe);a.Cartesian3.add(Ce,Oe,Ce),a.Cartesian3.add(de,Oe,de),a.Cartesian3.add(he,Oe,he),a.Cartesian3.add(ge,Oe,ge),Ee(Ce,de),Ee(he,ge),a.Cartesian3.pack(Ce,E,q),a.Cartesian3.pack(de,E,q+3),a.Cartesian3.pack(ge,E,q+6),a.Cartesian3.pack(he,E,q+9),Oe=a.Cartesian3.multiplyByScalar(B,-2*i.CesiumMath.EPSILON5,Qe),a.Cartesian3.add(Ce,Oe,Ce),a.Cartesian3.add(de,Oe,de),a.Cartesian3.add(he,Oe,he),a.Cartesian3.add(ge,Oe,ge),Ee(Ce,de),Ee(he,ge),a.Cartesian3.pack(Ce,E,q+12),a.Cartesian3.pack(de,E,q+15),a.Cartesian3.pack(ge,E,q+18),a.Cartesian3.pack(he,E,q+21),Y+=2,g+=3,F+=16,q+=24,X+=32,Q+=y,K+=le}g=0;let te=0;for(h=0;h<m;h++){for(j=0;j<tt;j++)T[g+j]=et[j]+te;te+=8,g+=tt}const ae=Ke;e.BoundingSphere.fromVertices(s,a.Cartesian3.ZERO,3,ae[0]),e.BoundingSphere.fromVertices(l,a.Cartesian3.ZERO,3,ae[1]);const ne=e.BoundingSphere.fromBoundingSpheres(ae);ne.radius+=ee/(2*m);const ie={position:new C.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,normalize:!1,values:E}),startHiAndForwardOffsetX:at(_),startLoAndForwardOffsetY:at(O),startNormalAndForwardOffsetZ:at(b),endNormalAndTextureCoordinateNormalizationX:at(P),rightNormalAndTextureCoordinateNormalizationY:at(A)};p&&(ie.startHiLo2D=at(k),ie.offsetAndRight2D=at(L),ie.startEndNormals2D=at(x),ie.texcoordNormalization2D=new C.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,normalize:!1,values:I}));return new C.Geometry({attributes:ie,indices:T,boundingSphere:ne})}(h,w,j,G,V,H,p)};const ue=new a.Cartesian3,Ce=new a.Matrix3,de=new e.Quaternion;function pe(t,n,r,s){const o=W(r,n,ue),l=a.Cartesian3.dot(o,t);if(l>N||l<R){const n=W(s,r,Q),o=l<R?i.CesiumMath.PI_OVER_TWO:-i.CesiumMath.PI_OVER_TWO,c=e.Quaternion.fromAxisAngle(n,o,de),u=a.Matrix3.fromQuaternion(c,Ce);return a.Matrix3.multiplyByVector(u,t,t),!0}return!1}const he=new a.Cartographic,ge=new a.Cartesian3,fe=new a.Cartesian3;function me(e,t,n,r,s){const o=a.Cartographic.toCartesian(t,e._ellipsoid,ge);let l=a.Cartesian3.add(o,n,fe),c=!1;const u=e._ellipsoid;let C=u.cartesianToCartographic(l,he);Math.abs(t.longitude-C.longitude)>i.CesiumMath.PI_OVER_TWO&&(c=!0,l=a.Cartesian3.subtract(o,n,fe),C=u.cartesianToCartographic(l,he)),C.height=0;const d=e.project(C,s);return(s=a.Cartesian3.subtract(d,r,s)).z=0,s=a.Cartesian3.normalize(s,s),c&&a.Cartesian3.negate(s,s),s}const we=new a.Cartesian3,ye=new a.Cartesian3;function Me(e,t,n,i,r,s){const o=a.Cartesian3.subtract(t,e,we);a.Cartesian3.normalize(o,o);const l=n-0;let c=a.Cartesian3.multiplyByScalar(o,l,ye);a.Cartesian3.add(e,c,r);const u=i-1e3;c=a.Cartesian3.multiplyByScalar(o,u,ye),a.Cartesian3.add(t,c,s)}const Te=new a.Cartesian3;function Ee(e,t){const n=p.Plane.getPointDistance(ee,e),r=p.Plane.getPointDistance(ee,t);let s=Te;i.CesiumMath.equalsEpsilon(n,0,i.CesiumMath.EPSILON2)?(s=W(t,e,s),a.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),a.Cartesian3.add(e,s,e)):i.CesiumMath.equalsEpsilon(r,0,i.CesiumMath.EPSILON2)&&(s=W(e,t,s),a.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),a.Cartesian3.add(t,s,t))}function _e(e,t){const a=Math.abs(e.longitude),n=Math.abs(t.longitude);if(i.CesiumMath.equalsEpsilon(a,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){const n=i.CesiumMath.sign(t.longitude);return e.longitude=n*(a-i.CesiumMath.EPSILON11),1}if(i.CesiumMath.equalsEpsilon(n,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){const a=i.CesiumMath.sign(e.longitude);return t.longitude=a*(n-i.CesiumMath.EPSILON11),2}return 0}const Oe=new a.Cartographic,be=new a.Cartographic,Pe=new a.Cartesian3,Ae=new a.Cartesian3,ke=new a.Cartesian3,Le=new a.Cartesian3,Se=new a.Cartesian3,xe=new a.Cartesian3,Ie=[Oe,be],Ne=new t.Rectangle,Re=new a.Cartesian3,De=new a.Cartesian3,ve=new a.Cartesian3,ze=new a.Cartesian3,He=new a.Cartesian3,Be=new a.Cartesian3,Ve=new a.Cartesian3,je=new a.Cartesian3,Ge=new a.Cartesian3,Ye=new a.Cartesian3,Fe=new a.Cartesian3,qe=new a.Cartesian3,Xe=new a.Cartesian3,We=new a.Cartesian3,Ue=new u.EncodedCartesian3,Ze=new u.EncodedCartesian3,$e=new a.Cartesian3,Je=new a.Cartesian3,Qe=new a.Cartesian3,Ke=[new e.BoundingSphere,new e.BoundingSphere],et=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],tt=et.length;function at(e){return new C.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}return D._projectNormal=me,function(e,t){return S.initialize().then((function(){return n.defined(t)&&(e=D.unpack(e,t)),D.createGeometry(e)}))}}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./Transforms-b1441a66","./Matrix3-d6f3913c","./ComponentDatatype-dd0b58d1","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./VertexFormat-848ec33d","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced"],(function(t,e,n,r,a,o,i,m,u,c,p,s){"use strict";function y(e){e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT);const n=t.defaultValue(e.vertexFormat,i.VertexFormat.DEFAULT);this._vertexFormat=n,this._workerName="createPlaneGeometry"}y.packedLength=i.VertexFormat.packedLength,y.pack=function(e,n,r){return r=t.defaultValue(r,0),i.VertexFormat.pack(e._vertexFormat,n,r),n};const l=new i.VertexFormat,f={vertexFormat:l};y.unpack=function(e,n,r){n=t.defaultValue(n,0);const a=i.VertexFormat.unpack(e,n,l);return t.defined(r)?(r._vertexFormat=i.VertexFormat.clone(a,r._vertexFormat),r):new y(f)};const A=new n.Cartesian3(-.5,-.5,0),b=new n.Cartesian3(.5,.5,0);return y.createGeometry=function(t){const i=t._vertexFormat,m=new o.GeometryAttributes;let u,c;if(i.position){if(c=new Float64Array(12),c[0]=A.x,c[1]=A.y,c[2]=0,c[3]=b.x,c[4]=A.y,c[5]=0,c[6]=b.x,c[7]=b.y,c[8]=0,c[9]=A.x,c[10]=b.y,c[11]=0,m.position=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:c}),i.normal){const t=new Float32Array(12);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=1,m.normal=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}if(i.st){const t=new Float32Array(8);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,m.st=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:t})}if(i.tangent){const t=new Float32Array(12);t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,m.tangent=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}if(i.bitangent){const t=new Float32Array(12);t[0]=0,t[1]=1,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=1,t[8]=0,t[9]=0,t[10]=1,t[11]=0,m.bitangent=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}u=new Uint16Array(6),u[0]=0,u[1]=1,u[2]=2,u[3]=0,u[4]=2,u[5]=3}return new a.Geometry({attributes:m,indices:u,primitiveType:a.PrimitiveType.TRIANGLES,boundingSphere:new e.BoundingSphere(n.Cartesian3.ZERO,Math.sqrt(2))})},function(e,n){return t.defined(n)&&(e=y.unpack(e,n)),y.createGeometry(e)}}));
define(["./defaultValue-040c41f9","./Transforms-b7f686a8","./Matrix3-d6f3913c","./ComponentDatatype-dd0b58d1","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./VertexFormat-848ec33d","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced"],(function(t,e,n,r,a,o,i,m,u,c,p,s){"use strict";function y(e){e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT);const n=t.defaultValue(e.vertexFormat,i.VertexFormat.DEFAULT);this._vertexFormat=n,this._workerName="createPlaneGeometry"}y.packedLength=i.VertexFormat.packedLength,y.pack=function(e,n,r){return r=t.defaultValue(r,0),i.VertexFormat.pack(e._vertexFormat,n,r),n};const l=new i.VertexFormat,f={vertexFormat:l};y.unpack=function(e,n,r){n=t.defaultValue(n,0);const a=i.VertexFormat.unpack(e,n,l);return t.defined(r)?(r._vertexFormat=i.VertexFormat.clone(a,r._vertexFormat),r):new y(f)};const A=new n.Cartesian3(-.5,-.5,0),d=new n.Cartesian3(.5,.5,0);return y.createGeometry=function(t){const i=t._vertexFormat,m=new o.GeometryAttributes;let u,c;if(i.position){if(c=new Float64Array(12),c[0]=A.x,c[1]=A.y,c[2]=0,c[3]=d.x,c[4]=A.y,c[5]=0,c[6]=d.x,c[7]=d.y,c[8]=0,c[9]=A.x,c[10]=d.y,c[11]=0,m.position=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:c}),i.normal){const t=new Float32Array(12);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=1,m.normal=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}if(i.st){const t=new Float32Array(8);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,m.st=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:t})}if(i.tangent){const t=new Float32Array(12);t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,m.tangent=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}if(i.bitangent){const t=new Float32Array(12);t[0]=0,t[1]=1,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=1,t[8]=0,t[9]=0,t[10]=1,t[11]=0,m.bitangent=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}u=new Uint16Array(6),u[0]=0,u[1]=1,u[2]=2,u[3]=0,u[4]=2,u[5]=3}return new a.Geometry({attributes:m,indices:u,primitiveType:a.PrimitiveType.TRIANGLES,boundingSphere:new e.BoundingSphere(n.Cartesian3.ZERO,Math.sqrt(2))})},function(e,n){return t.defined(n)&&(e=y.unpack(e,n)),y.createGeometry(e)}}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./Transforms-b1441a66","./Matrix3-d6f3913c","./ComponentDatatype-dd0b58d1","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced"],(function(e,t,n,r,i,a,o,u,c,s,y){"use strict";function m(){this._workerName="createPlaneOutlineGeometry"}m.packedLength=0,m.pack=function(e,t){return t},m.unpack=function(t,n,r){return e.defined(r)?r:new m};const p=new n.Cartesian3(-.5,-.5,0),d=new n.Cartesian3(.5,.5,0);return m.createGeometry=function(){const e=new a.GeometryAttributes,o=new Uint16Array(8),u=new Float64Array(12);return u[0]=p.x,u[1]=p.y,u[2]=p.z,u[3]=d.x,u[4]=p.y,u[5]=p.z,u[6]=d.x,u[7]=d.y,u[8]=p.z,u[9]=p.x,u[10]=d.y,u[11]=p.z,e.position=new i.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u}),o[0]=0,o[1]=1,o[2]=1,o[3]=2,o[4]=2,o[5]=3,o[6]=3,o[7]=0,new i.Geometry({attributes:e,indices:o,primitiveType:i.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere(n.Cartesian3.ZERO,Math.sqrt(2))})},function(t,n){return e.defined(n)&&(t=m.unpack(t,n)),m.createGeometry(t)}}));
define(["./defaultValue-040c41f9","./Transforms-b7f686a8","./Matrix3-d6f3913c","./ComponentDatatype-dd0b58d1","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./Math-8e567554","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced"],(function(e,t,n,r,i,a,o,u,c,s,y){"use strict";function m(){this._workerName="createPlaneOutlineGeometry"}m.packedLength=0,m.pack=function(e,t){return t},m.unpack=function(t,n,r){return e.defined(r)?r:new m};const d=new n.Cartesian3(-.5,-.5,0),p=new n.Cartesian3(.5,.5,0);return m.createGeometry=function(){const e=new a.GeometryAttributes,o=new Uint16Array(8),u=new Float64Array(12);return u[0]=d.x,u[1]=d.y,u[2]=d.z,u[3]=p.x,u[4]=d.y,u[5]=d.z,u[6]=p.x,u[7]=p.y,u[8]=d.z,u[9]=d.x,u[10]=p.y,u[11]=d.z,e.position=new i.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u}),o[0]=0,o[1]=1,o[2]=1,o[3]=2,o[4]=2,o[5]=3,o[6]=3,o[7]=0,new i.Geometry({attributes:e,indices:o,primitiveType:i.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere(n.Cartesian3.ZERO,Math.sqrt(2))})},function(t,n){return e.defined(n)&&(t=m.unpack(t,n)),m.createGeometry(t)}}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./ArcType-3d26c7db","./BoundingRectangle-d5562dff","./Transforms-b1441a66","./Matrix2-66622085","./ComponentDatatype-dd0b58d1","./EllipsoidGeodesic-9484ceff","./EllipsoidTangentPlane-fc1becbb","./GeometryAttribute-944b7aef","./GeometryInstance-c620c48b","./GeometryOffsetAttribute-b6810db4","./GeometryPipeline-fafdd6b1","./IndexDatatype-eddea9c9","./Math-8e567554","./PolygonGeometryLibrary-528d15dd","./PolygonPipeline-7de38ba5","./VertexFormat-848ec33d","./combine-6eb6e848","./RuntimeError-3c5db370","./WebGLConstants-f7267ced","./AxisAlignedBoundingBox-ba8ff526","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b","./arrayRemoveDuplicates-bb49591c","./EllipsoidRhumbLine-1dd98535","./GeometryAttributes-52134c76"],(function(e,t,o,i,r,n,a,s,l,c,u,d,p,y,m,g,h,f,b,_,P,C,x,w,T,I,A,v,E){"use strict";const G=new t.Cartographic,O=new t.Cartographic;function L(e,t,o,i){const r=i.cartesianToCartographic(e,G).height,n=i.cartesianToCartographic(t,O);n.height=r,i.cartographicToCartesian(n,t);const a=i.cartesianToCartographic(o,O);a.height=r-100,i.cartographicToCartesian(a,o)}const V=new i.BoundingRectangle,H=new t.Cartesian3,D=new t.Cartesian3,N=new t.Cartesian3,F=new t.Cartesian3,R=new t.Cartesian3,M=new t.Cartesian3;let S=new t.Cartesian3,B=new t.Cartesian3,k=new t.Cartesian3;const z=new n.Cartesian2,W=new n.Cartesian2,Y=new t.Cartesian3,U=new r.Quaternion,j=new t.Matrix3,Q=new t.Matrix3;function q(o){const i=o.vertexFormat,s=o.geometry,l=o.shadowVolume,u=s.attributes.position.values,p=e.defined(s.attributes.st)?s.attributes.st.values:void 0;let y=u.length;const g=o.wall,h=o.top||g,f=o.bottom||g;if(i.st||i.normal||i.tangent||i.bitangent||l){const d=o.boundingRectangle,b=o.tangentPlane,_=o.ellipsoid,P=o.stRotation,C=o.perPositionHeight,x=z;x.x=d.x,x.y=d.y;const w=i.st?new Float32Array(y/3*2):void 0;let T;i.normal&&(T=C&&h&&!g?s.attributes.normal.values:new Float32Array(y));const I=i.tangent?new Float32Array(y):void 0,A=i.bitangent?new Float32Array(y):void 0,v=l?new Float32Array(y):void 0;let E=0,G=0,O=D,V=N,q=F,K=!0,Z=j,J=Q;if(0!==P){let e=r.Quaternion.fromAxisAngle(b._plane.normal,P,U);Z=t.Matrix3.fromQuaternion(e,Z),e=r.Quaternion.fromAxisAngle(b._plane.normal,-P,U),J=t.Matrix3.fromQuaternion(e,J)}else Z=t.Matrix3.clone(t.Matrix3.IDENTITY,Z),J=t.Matrix3.clone(t.Matrix3.IDENTITY,J);let X=0,$=0;h&&f&&(X=y/2,$=y/3,y/=2);for(let r=0;r<y;r+=3){const a=t.Cartesian3.fromArray(u,r,Y);if(i.st&&!e.defined(p)){let e=t.Matrix3.multiplyByVector(Z,a,H);e=_.scaleToGeodeticSurface(e,e);const o=b.projectPointOntoPlane(e,W);n.Cartesian2.subtract(o,x,o);const i=m.CesiumMath.clamp(o.x/d.width,0,1),r=m.CesiumMath.clamp(o.y/d.height,0,1);f&&(w[E+$]=i,w[E+1+$]=r),h&&(w[E]=i,w[E+1]=r),E+=2}if(i.normal||i.tangent||i.bitangent||l){const e=G+1,n=G+2;if(g){if(r+3<y){const e=t.Cartesian3.fromArray(u,r+3,R);if(K){const o=t.Cartesian3.fromArray(u,r+y,M);C&&L(a,e,o,_),t.Cartesian3.subtract(e,a,e),t.Cartesian3.subtract(o,a,o),O=t.Cartesian3.normalize(t.Cartesian3.cross(o,e,O),O),K=!1}t.Cartesian3.equalsEpsilon(e,a,m.CesiumMath.EPSILON10)&&(K=!0)}(i.tangent||i.bitangent)&&(q=_.geodeticSurfaceNormal(a,q),i.tangent&&(V=t.Cartesian3.normalize(t.Cartesian3.cross(q,O,V),V)))}else O=_.geodeticSurfaceNormal(a,O),(i.tangent||i.bitangent)&&(C&&(S=t.Cartesian3.fromArray(T,G,S),B=t.Cartesian3.cross(t.Cartesian3.UNIT_Z,S,B),B=t.Cartesian3.normalize(t.Matrix3.multiplyByVector(J,B,B),B),i.bitangent&&(k=t.Cartesian3.normalize(t.Cartesian3.cross(S,B,k),k))),V=t.Cartesian3.cross(t.Cartesian3.UNIT_Z,O,V),V=t.Cartesian3.normalize(t.Matrix3.multiplyByVector(J,V,V),V),i.bitangent&&(q=t.Cartesian3.normalize(t.Cartesian3.cross(O,V,q),q)));i.normal&&(o.wall?(T[G+X]=O.x,T[e+X]=O.y,T[n+X]=O.z):f&&(T[G+X]=-O.x,T[e+X]=-O.y,T[n+X]=-O.z),(h&&!C||g)&&(T[G]=O.x,T[e]=O.y,T[n]=O.z)),l&&(g&&(O=_.geodeticSurfaceNormal(a,O)),v[G+X]=-O.x,v[e+X]=-O.y,v[n+X]=-O.z),i.tangent&&(o.wall?(I[G+X]=V.x,I[e+X]=V.y,I[n+X]=V.z):f&&(I[G+X]=-V.x,I[e+X]=-V.y,I[n+X]=-V.z),h&&(C?(I[G]=B.x,I[e]=B.y,I[n]=B.z):(I[G]=V.x,I[e]=V.y,I[n]=V.z))),i.bitangent&&(f&&(A[G+X]=q.x,A[e+X]=q.y,A[n+X]=q.z),h&&(C?(A[G]=k.x,A[e]=k.y,A[n]=k.z):(A[G]=q.x,A[e]=q.y,A[n]=q.z))),G+=3}}i.st&&!e.defined(p)&&(s.attributes.st=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:w})),i.normal&&(s.attributes.normal=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:T})),i.tangent&&(s.attributes.tangent=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:I})),i.bitangent&&(s.attributes.bitangent=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),l&&(s.attributes.extrudeDirection=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v}))}if(o.extrude&&e.defined(o.offsetAttribute)){const e=u.length/3;let t=new Uint8Array(e);if(o.offsetAttribute===d.GeometryOffsetAttribute.TOP)h&&f||g?t=t.fill(1,0,e/2):h&&(t=t.fill(1));else{const e=o.offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1;t=t.fill(e)}s.attributes.applyOffset=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}return s}const K=new t.Cartographic,Z=new t.Cartographic,J={westOverIDL:0,eastOverIDL:0};let X=new s.EllipsoidGeodesic;function $(t,i,r,a,l){if(l=e.defaultValue(l,new n.Rectangle),!e.defined(t)||t.length<3)return l.west=0,l.north=0,l.south=0,l.east=0,l;if(r===o.ArcType.RHUMB)return n.Rectangle.fromCartesianArray(t,i,l);X.ellipsoid.equals(i)||(X=new s.EllipsoidGeodesic(void 0,void 0,i)),l.west=Number.POSITIVE_INFINITY,l.east=Number.NEGATIVE_INFINITY,l.south=Number.POSITIVE_INFINITY,l.north=Number.NEGATIVE_INFINITY,J.westOverIDL=Number.POSITIVE_INFINITY,J.eastOverIDL=Number.NEGATIVE_INFINITY;const c=1/m.CesiumMath.chordLength(a,i.maximumRadius),u=t.length;let d,p=i.cartesianToCartographic(t[0],Z),y=K;for(let e=1;e<u;e++)d=y,y=p,p=i.cartesianToCartographic(t[e],d),X.setEndPoints(y,p),te(X,c,l,J);return d=y,y=p,p=i.cartesianToCartographic(t[0],d),X.setEndPoints(y,p),te(X,c,l,J),l.east-l.west>J.eastOverIDL-J.westOverIDL&&(l.west=J.westOverIDL,l.east=J.eastOverIDL,l.east>m.CesiumMath.PI&&(l.east=l.east-m.CesiumMath.TWO_PI),l.west>m.CesiumMath.PI&&(l.west=l.west-m.CesiumMath.TWO_PI)),l}const ee=new t.Cartographic;function te(e,t,o,i){const r=e.surfaceDistance,n=Math.ceil(r*t),a=n>0?r/(n-1):Number.POSITIVE_INFINITY;let s=0;for(let t=0;t<n;t++){const t=e.interpolateUsingSurfaceDistance(s,ee);s+=a;const r=t.longitude,n=t.latitude;o.west=Math.min(o.west,r),o.east=Math.max(o.east,r),o.south=Math.min(o.south,n),o.north=Math.max(o.north,n);const l=r>=0?r:r+m.CesiumMath.TWO_PI;i.westOverIDL=Math.min(i.westOverIDL,l),i.eastOverIDL=Math.max(i.eastOverIDL,l)}}const oe=[];function ie(t,o,i,r,n,a,s,c,d,p){const m={walls:[]};let f;if(s||c){const n=g.PolygonGeometryLibrary.createGeometryFromPositions(t,o,i,r,a,d,p),l=n.attributes.position.values,h=n.indices;let b,_;if(s&&c){const t=l.concat(l);b=t.length/3,_=y.IndexDatatype.createTypedArray(b,2*h.length),_.set(h);const o=h.length,r=b/2;for(f=0;f<o;f+=3){const e=_[f]+r,t=_[f+1]+r,i=_[f+2]+r;_[f+o]=i,_[f+1+o]=t,_[f+2+o]=e}if(n.attributes.position.values=t,a&&d.normal){const e=n.attributes.normal.values;n.attributes.normal.values=new Float32Array(t.length),n.attributes.normal.values.set(e)}if(d.st&&e.defined(i)){const e=n.attributes.st.values;n.attributes.st.values=new Float32Array(2*b),n.attributes.st.values=e.concat(e)}n.indices=_}else if(c){for(b=l.length/3,_=y.IndexDatatype.createTypedArray(b,h.length),f=0;f<h.length;f+=3)_[f]=h[f+2],_[f+1]=h[f+1],_[f+2]=h[f];n.indices=_}m.topAndBottom=new u.GeometryInstance({geometry:n})}let b=n.outerRing,_=l.EllipsoidTangentPlane.fromPoints(b,t),P=_.projectPointsOntoPlane(b,oe),C=h.PolygonPipeline.computeWindingOrder2D(P);C===h.WindingOrder.CLOCKWISE&&(b=b.slice().reverse());let x=g.PolygonGeometryLibrary.computeWallGeometry(b,i,t,r,a,p);m.walls.push(new u.GeometryInstance({geometry:x}));const w=n.holes;for(f=0;f<w.length;f++){let e=w[f];_=l.EllipsoidTangentPlane.fromPoints(e,t),P=_.projectPointsOntoPlane(e,oe),C=h.PolygonPipeline.computeWindingOrder2D(P),C===h.WindingOrder.COUNTER_CLOCKWISE&&(e=e.slice().reverse()),x=g.PolygonGeometryLibrary.computeWallGeometry(e,i,t,r,a,p),m.walls.push(new u.GeometryInstance({geometry:x}))}return m}function re(i){const r=i.polygonHierarchy,a=e.defaultValue(i.vertexFormat,f.VertexFormat.DEFAULT),s=e.defaultValue(i.ellipsoid,t.Ellipsoid.WGS84),l=e.defaultValue(i.granularity,m.CesiumMath.RADIANS_PER_DEGREE),c=e.defaultValue(i.stRotation,0),u=i.textureCoordinates,d=e.defaultValue(i.perPositionHeight,!1),p=d&&e.defined(i.extrudedHeight);let y=e.defaultValue(i.height,0),h=e.defaultValue(i.extrudedHeight,y);if(!p){const e=Math.max(y,h);h=Math.min(y,h),y=e}this._vertexFormat=f.VertexFormat.clone(a),this._ellipsoid=t.Ellipsoid.clone(s),this._granularity=l,this._stRotation=c,this._height=y,this._extrudedHeight=h,this._closeTop=e.defaultValue(i.closeTop,!0),this._closeBottom=e.defaultValue(i.closeBottom,!0),this._polygonHierarchy=r,this._perPositionHeight=d,this._perPositionHeightExtrude=p,this._shadowVolume=e.defaultValue(i.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=i.offsetAttribute,this._arcType=e.defaultValue(i.arcType,o.ArcType.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=u,this.packedLength=g.PolygonGeometryLibrary.computeHierarchyPackedLength(r,t.Cartesian3)+t.Ellipsoid.packedLength+f.VertexFormat.packedLength+(u?g.PolygonGeometryLibrary.computeHierarchyPackedLength(u,n.Cartesian2):1)+12}re.fromPositions=function(t){return new re({polygonHierarchy:{positions:(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions},height:t.height,extrudedHeight:t.extrudedHeight,vertexFormat:t.vertexFormat,stRotation:t.stRotation,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,closeTop:t.closeTop,closeBottom:t.closeBottom,offsetAttribute:t.offsetAttribute,arcType:t.arcType,textureCoordinates:t.textureCoordinates})},re.pack=function(o,i,r){return r=e.defaultValue(r,0),r=g.PolygonGeometryLibrary.packPolygonHierarchy(o._polygonHierarchy,i,r,t.Cartesian3),t.Ellipsoid.pack(o._ellipsoid,i,r),r+=t.Ellipsoid.packedLength,f.VertexFormat.pack(o._vertexFormat,i,r),r+=f.VertexFormat.packedLength,i[r++]=o._height,i[r++]=o._extrudedHeight,i[r++]=o._granularity,i[r++]=o._stRotation,i[r++]=o._perPositionHeightExtrude?1:0,i[r++]=o._perPositionHeight?1:0,i[r++]=o._closeTop?1:0,i[r++]=o._closeBottom?1:0,i[r++]=o._shadowVolume?1:0,i[r++]=e.defaultValue(o._offsetAttribute,-1),i[r++]=o._arcType,e.defined(o._textureCoordinates)?r=g.PolygonGeometryLibrary.packPolygonHierarchy(o._textureCoordinates,i,r,n.Cartesian2):i[r++]=-1,i[r++]=o.packedLength,i};const ne=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),ae=new f.VertexFormat,se={polygonHierarchy:{}};return re.unpack=function(o,i,r){i=e.defaultValue(i,0);const a=g.PolygonGeometryLibrary.unpackPolygonHierarchy(o,i,t.Cartesian3);i=a.startingIndex,delete a.startingIndex;const s=t.Ellipsoid.unpack(o,i,ne);i+=t.Ellipsoid.packedLength;const l=f.VertexFormat.unpack(o,i,ae);i+=f.VertexFormat.packedLength;const c=o[i++],u=o[i++],d=o[i++],p=o[i++],y=1===o[i++],m=1===o[i++],h=1===o[i++],b=1===o[i++],_=1===o[i++],P=o[i++],C=o[i++],x=-1===o[i]?void 0:g.PolygonGeometryLibrary.unpackPolygonHierarchy(o,i,n.Cartesian2);e.defined(x)?(i=x.startingIndex,delete x.startingIndex):i++;const w=o[i++];return e.defined(r)||(r=new re(se)),r._polygonHierarchy=a,r._ellipsoid=t.Ellipsoid.clone(s,r._ellipsoid),r._vertexFormat=f.VertexFormat.clone(l,r._vertexFormat),r._height=c,r._extrudedHeight=u,r._granularity=d,r._stRotation=p,r._perPositionHeightExtrude=y,r._perPositionHeight=m,r._closeTop=h,r._closeBottom=b,r._shadowVolume=_,r._offsetAttribute=-1===P?void 0:P,r._arcType=C,r._textureCoordinates=x,r.packedLength=w,r},re.computeRectangle=function(i,r){const n=e.defaultValue(i.granularity,m.CesiumMath.RADIANS_PER_DEGREE),a=e.defaultValue(i.arcType,o.ArcType.GEODESIC),s=i.polygonHierarchy,l=e.defaultValue(i.ellipsoid,t.Ellipsoid.WGS84);return $(s.positions,l,a,n,r)},re.createGeometry=function(t){const o=t._vertexFormat,i=t._ellipsoid,n=t._granularity,s=t._stRotation,f=t._polygonHierarchy,b=t._perPositionHeight,_=t._closeTop,P=t._closeBottom,C=t._arcType,x=t._textureCoordinates,w=e.defined(x);let T=f.positions;if(T.length<3)return;const I=l.EllipsoidTangentPlane.fromPoints(T,i),A=g.PolygonGeometryLibrary.polygonsFromHierarchy(f,w,I.projectPointsOntoPlane.bind(I),!b,i),v=A.hierarchy,E=A.polygons,G=w?g.PolygonGeometryLibrary.polygonsFromHierarchy(x,!0,(function(e){return e}),!1).polygons:void 0;if(0===v.length)return;T=v[0].outerRing;const O=g.PolygonGeometryLibrary.computeBoundingRectangle(I.plane.normal,I.projectPointOntoPlane.bind(I),T,s,V),L=[],H=t._height,D=t._extrudedHeight,N={perPositionHeight:b,vertexFormat:o,geometry:void 0,tangentPlane:I,boundingRectangle:O,ellipsoid:i,stRotation:s,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:C};let F;if(t._perPositionHeightExtrude||!m.CesiumMath.equalsEpsilon(H,D,0,m.CesiumMath.EPSILON2))for(N.extrude=!0,N.top=_,N.bottom=P,N.shadowVolume=t._shadowVolume,N.offsetAttribute=t._offsetAttribute,F=0;F<E.length;F++){const e=ie(i,E[F],w?G[F]:void 0,n,v[F],b,_,P,o,C);let t;_&&P?(t=e.topAndBottom,N.geometry=g.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(t.geometry,H,D,i,b)):_?(t=e.topAndBottom,t.geometry.attributes.position.values=h.PolygonPipeline.scaleToGeodeticHeight(t.geometry.attributes.position.values,H,i,!b),N.geometry=t.geometry):P&&(t=e.topAndBottom,t.geometry.attributes.position.values=h.PolygonPipeline.scaleToGeodeticHeight(t.geometry.attributes.position.values,D,i,!0),N.geometry=t.geometry),(_||P)&&(N.wall=!1,t.geometry=q(N),L.push(t));const r=e.walls;N.wall=!0;for(let e=0;e<r.length;e++){const t=r[e];N.geometry=g.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(t.geometry,H,D,i,b),t.geometry=q(N),L.push(t)}}else for(F=0;F<E.length;F++){const r=new u.GeometryInstance({geometry:g.PolygonGeometryLibrary.createGeometryFromPositions(i,E[F],w?G[F]:void 0,n,b,o,C)});if(r.geometry.attributes.position.values=h.PolygonPipeline.scaleToGeodeticHeight(r.geometry.attributes.position.values,H,i,!b),N.geometry=r.geometry,r.geometry=q(N),e.defined(t._offsetAttribute)){const e=r.geometry.attributes.position.values.length,o=t._offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1,i=new Uint8Array(e/3).fill(o);r.geometry.attributes.applyOffset=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}L.push(r)}const R=p.GeometryPipeline.combineInstances(L)[0];R.attributes.position.values=new Float64Array(R.attributes.position.values),R.indices=y.IndexDatatype.createTypedArray(R.attributes.position.values.length/3,R.indices);const M=R.attributes,S=r.BoundingSphere.fromVertices(M.position.values);return o.position||delete M.position,new c.Geometry({attributes:M,indices:R.indices,primitiveType:R.primitiveType,boundingSphere:S,offsetAttribute:t._offsetAttribute})},re.createShadowVolume=function(e,t,o){const i=e._granularity,r=e._ellipsoid,n=t(i,r),a=o(i,r);return new re({polygonHierarchy:e._polygonHierarchy,ellipsoid:r,stRotation:e._stRotation,granularity:i,perPositionHeight:!1,extrudedHeight:n,height:a,vertexFormat:f.VertexFormat.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})},Object.defineProperties(re.prototype,{rectangle:{get:function(){if(!e.defined(this._rectangle)){const e=this._polygonHierarchy.positions;this._rectangle=$(e,this._ellipsoid,this._arcType,this._granularity)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return e.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(e){const t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];const o=e._ellipsoid,i=e._polygonHierarchy.positions,r=e.rectangle;return c.Geometry._textureCoordinateRotationPoints(i,t,o,r)}(this)),this._textureCoordinateRotationPoints}}}),function(o,i){return e.defined(i)&&(o=re.unpack(o,i)),o._ellipsoid=t.Ellipsoid.clone(o._ellipsoid),re.createGeometry(o)}}));
define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./ArcType-3d26c7db","./BoundingRectangle-58f64349","./Transforms-b7f686a8","./Matrix2-66622085","./ComponentDatatype-dd0b58d1","./EllipsoidGeodesic-9484ceff","./EllipsoidTangentPlane-ae5d3d65","./GeometryAttribute-6ed30287","./GeometryInstance-c620c48b","./GeometryOffsetAttribute-b6810db4","./GeometryPipeline-c180ffdb","./IndexDatatype-eddea9c9","./Math-8e567554","./PolygonGeometryLibrary-227b23c8","./PolygonPipeline-f56a8ec5","./VertexFormat-848ec33d","./combine-6eb6e848","./RuntimeError-3c5db370","./WebGLConstants-f7267ced","./AxisAlignedBoundingBox-680337b6","./IntersectionTests-7d927f09","./Plane-6aee7ffc","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b","./arrayRemoveDuplicates-bb49591c","./EllipsoidRhumbLine-1dd98535","./GeometryAttributes-52134c76"],(function(e,t,o,i,r,n,a,s,l,c,u,d,p,y,m,g,h,f,b,_,P,C,x,w,T,I,A,v,E){"use strict";const G=new t.Cartographic,O=new t.Cartographic;function L(e,t,o,i){const r=i.cartesianToCartographic(e,G).height,n=i.cartesianToCartographic(t,O);n.height=r,i.cartographicToCartesian(n,t);const a=i.cartesianToCartographic(o,O);a.height=r-100,i.cartographicToCartesian(a,o)}const V=new i.BoundingRectangle,H=new t.Cartesian3,D=new t.Cartesian3,N=new t.Cartesian3,F=new t.Cartesian3,R=new t.Cartesian3,M=new t.Cartesian3;let S=new t.Cartesian3,B=new t.Cartesian3,k=new t.Cartesian3;const z=new n.Cartesian2,W=new n.Cartesian2,Y=new t.Cartesian3,U=new r.Quaternion,j=new t.Matrix3,Q=new t.Matrix3;function q(o){const i=o.vertexFormat,s=o.geometry,l=o.shadowVolume,u=s.attributes.position.values,p=e.defined(s.attributes.st)?s.attributes.st.values:void 0;let y=u.length;const g=o.wall,h=o.top||g,f=o.bottom||g;if(i.st||i.normal||i.tangent||i.bitangent||l){const d=o.boundingRectangle,b=o.tangentPlane,_=o.ellipsoid,P=o.stRotation,C=o.perPositionHeight,x=z;x.x=d.x,x.y=d.y;const w=i.st?new Float32Array(y/3*2):void 0;let T;i.normal&&(T=C&&h&&!g?s.attributes.normal.values:new Float32Array(y));const I=i.tangent?new Float32Array(y):void 0,A=i.bitangent?new Float32Array(y):void 0,v=l?new Float32Array(y):void 0;let E=0,G=0,O=D,V=N,q=F,K=!0,Z=j,J=Q;if(0!==P){let e=r.Quaternion.fromAxisAngle(b._plane.normal,P,U);Z=t.Matrix3.fromQuaternion(e,Z),e=r.Quaternion.fromAxisAngle(b._plane.normal,-P,U),J=t.Matrix3.fromQuaternion(e,J)}else Z=t.Matrix3.clone(t.Matrix3.IDENTITY,Z),J=t.Matrix3.clone(t.Matrix3.IDENTITY,J);let X=0,$=0;h&&f&&(X=y/2,$=y/3,y/=2);for(let r=0;r<y;r+=3){const a=t.Cartesian3.fromArray(u,r,Y);if(i.st&&!e.defined(p)){let e=t.Matrix3.multiplyByVector(Z,a,H);e=_.scaleToGeodeticSurface(e,e);const o=b.projectPointOntoPlane(e,W);n.Cartesian2.subtract(o,x,o);const i=m.CesiumMath.clamp(o.x/d.width,0,1),r=m.CesiumMath.clamp(o.y/d.height,0,1);f&&(w[E+$]=i,w[E+1+$]=r),h&&(w[E]=i,w[E+1]=r),E+=2}if(i.normal||i.tangent||i.bitangent||l){const e=G+1,n=G+2;if(g){if(r+3<y){const e=t.Cartesian3.fromArray(u,r+3,R);if(K){const o=t.Cartesian3.fromArray(u,r+y,M);C&&L(a,e,o,_),t.Cartesian3.subtract(e,a,e),t.Cartesian3.subtract(o,a,o),O=t.Cartesian3.normalize(t.Cartesian3.cross(o,e,O),O),K=!1}t.Cartesian3.equalsEpsilon(e,a,m.CesiumMath.EPSILON10)&&(K=!0)}(i.tangent||i.bitangent)&&(q=_.geodeticSurfaceNormal(a,q),i.tangent&&(V=t.Cartesian3.normalize(t.Cartesian3.cross(q,O,V),V)))}else O=_.geodeticSurfaceNormal(a,O),(i.tangent||i.bitangent)&&(C&&(S=t.Cartesian3.fromArray(T,G,S),B=t.Cartesian3.cross(t.Cartesian3.UNIT_Z,S,B),B=t.Cartesian3.normalize(t.Matrix3.multiplyByVector(J,B,B),B),i.bitangent&&(k=t.Cartesian3.normalize(t.Cartesian3.cross(S,B,k),k))),V=t.Cartesian3.cross(t.Cartesian3.UNIT_Z,O,V),V=t.Cartesian3.normalize(t.Matrix3.multiplyByVector(J,V,V),V),i.bitangent&&(q=t.Cartesian3.normalize(t.Cartesian3.cross(O,V,q),q)));i.normal&&(o.wall?(T[G+X]=O.x,T[e+X]=O.y,T[n+X]=O.z):f&&(T[G+X]=-O.x,T[e+X]=-O.y,T[n+X]=-O.z),(h&&!C||g)&&(T[G]=O.x,T[e]=O.y,T[n]=O.z)),l&&(g&&(O=_.geodeticSurfaceNormal(a,O)),v[G+X]=-O.x,v[e+X]=-O.y,v[n+X]=-O.z),i.tangent&&(o.wall?(I[G+X]=V.x,I[e+X]=V.y,I[n+X]=V.z):f&&(I[G+X]=-V.x,I[e+X]=-V.y,I[n+X]=-V.z),h&&(C?(I[G]=B.x,I[e]=B.y,I[n]=B.z):(I[G]=V.x,I[e]=V.y,I[n]=V.z))),i.bitangent&&(f&&(A[G+X]=q.x,A[e+X]=q.y,A[n+X]=q.z),h&&(C?(A[G]=k.x,A[e]=k.y,A[n]=k.z):(A[G]=q.x,A[e]=q.y,A[n]=q.z))),G+=3}}i.st&&!e.defined(p)&&(s.attributes.st=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:w})),i.normal&&(s.attributes.normal=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:T})),i.tangent&&(s.attributes.tangent=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:I})),i.bitangent&&(s.attributes.bitangent=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),l&&(s.attributes.extrudeDirection=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v}))}if(o.extrude&&e.defined(o.offsetAttribute)){const e=u.length/3;let t=new Uint8Array(e);if(o.offsetAttribute===d.GeometryOffsetAttribute.TOP)h&&f||g?t=t.fill(1,0,e/2):h&&(t=t.fill(1));else{const e=o.offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1;t=t.fill(e)}s.attributes.applyOffset=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}return s}const K=new t.Cartographic,Z=new t.Cartographic,J={westOverIDL:0,eastOverIDL:0};let X=new s.EllipsoidGeodesic;function $(t,i,r,a,l){if(l=e.defaultValue(l,new n.Rectangle),!e.defined(t)||t.length<3)return l.west=0,l.north=0,l.south=0,l.east=0,l;if(r===o.ArcType.RHUMB)return n.Rectangle.fromCartesianArray(t,i,l);X.ellipsoid.equals(i)||(X=new s.EllipsoidGeodesic(void 0,void 0,i)),l.west=Number.POSITIVE_INFINITY,l.east=Number.NEGATIVE_INFINITY,l.south=Number.POSITIVE_INFINITY,l.north=Number.NEGATIVE_INFINITY,J.westOverIDL=Number.POSITIVE_INFINITY,J.eastOverIDL=Number.NEGATIVE_INFINITY;const c=1/m.CesiumMath.chordLength(a,i.maximumRadius),u=t.length;let d,p=i.cartesianToCartographic(t[0],Z),y=K;for(let e=1;e<u;e++)d=y,y=p,p=i.cartesianToCartographic(t[e],d),X.setEndPoints(y,p),te(X,c,l,J);return d=y,y=p,p=i.cartesianToCartographic(t[0],d),X.setEndPoints(y,p),te(X,c,l,J),l.east-l.west>J.eastOverIDL-J.westOverIDL&&(l.west=J.westOverIDL,l.east=J.eastOverIDL,l.east>m.CesiumMath.PI&&(l.east=l.east-m.CesiumMath.TWO_PI),l.west>m.CesiumMath.PI&&(l.west=l.west-m.CesiumMath.TWO_PI)),l}const ee=new t.Cartographic;function te(e,t,o,i){const r=e.surfaceDistance,n=Math.ceil(r*t),a=n>0?r/(n-1):Number.POSITIVE_INFINITY;let s=0;for(let t=0;t<n;t++){const t=e.interpolateUsingSurfaceDistance(s,ee);s+=a;const r=t.longitude,n=t.latitude;o.west=Math.min(o.west,r),o.east=Math.max(o.east,r),o.south=Math.min(o.south,n),o.north=Math.max(o.north,n);const l=r>=0?r:r+m.CesiumMath.TWO_PI;i.westOverIDL=Math.min(i.westOverIDL,l),i.eastOverIDL=Math.max(i.eastOverIDL,l)}}const oe=[];function ie(t,o,i,r,n,a,s,c,d,p){const m={walls:[]};let f;if(s||c){const n=g.PolygonGeometryLibrary.createGeometryFromPositions(t,o,i,r,a,d,p),l=n.attributes.position.values,h=n.indices;let b,_;if(s&&c){const t=l.concat(l);b=t.length/3,_=y.IndexDatatype.createTypedArray(b,2*h.length),_.set(h);const o=h.length,r=b/2;for(f=0;f<o;f+=3){const e=_[f]+r,t=_[f+1]+r,i=_[f+2]+r;_[f+o]=i,_[f+1+o]=t,_[f+2+o]=e}if(n.attributes.position.values=t,a&&d.normal){const e=n.attributes.normal.values;n.attributes.normal.values=new Float32Array(t.length),n.attributes.normal.values.set(e)}if(d.st&&e.defined(i)){const e=n.attributes.st.values;n.attributes.st.values=new Float32Array(2*b),n.attributes.st.values=e.concat(e)}n.indices=_}else if(c){for(b=l.length/3,_=y.IndexDatatype.createTypedArray(b,h.length),f=0;f<h.length;f+=3)_[f]=h[f+2],_[f+1]=h[f+1],_[f+2]=h[f];n.indices=_}m.topAndBottom=new u.GeometryInstance({geometry:n})}let b=n.outerRing,_=l.EllipsoidTangentPlane.fromPoints(b,t),P=_.projectPointsOntoPlane(b,oe),C=h.PolygonPipeline.computeWindingOrder2D(P);C===h.WindingOrder.CLOCKWISE&&(b=b.slice().reverse());let x=g.PolygonGeometryLibrary.computeWallGeometry(b,i,t,r,a,p);m.walls.push(new u.GeometryInstance({geometry:x}));const w=n.holes;for(f=0;f<w.length;f++){let e=w[f];_=l.EllipsoidTangentPlane.fromPoints(e,t),P=_.projectPointsOntoPlane(e,oe),C=h.PolygonPipeline.computeWindingOrder2D(P),C===h.WindingOrder.COUNTER_CLOCKWISE&&(e=e.slice().reverse()),x=g.PolygonGeometryLibrary.computeWallGeometry(e,i,t,r,a,p),m.walls.push(new u.GeometryInstance({geometry:x}))}return m}function re(i){const r=i.polygonHierarchy,a=e.defaultValue(i.vertexFormat,f.VertexFormat.DEFAULT),s=e.defaultValue(i.ellipsoid,t.Ellipsoid.WGS84),l=e.defaultValue(i.granularity,m.CesiumMath.RADIANS_PER_DEGREE),c=e.defaultValue(i.stRotation,0),u=i.textureCoordinates,d=e.defaultValue(i.perPositionHeight,!1),p=d&&e.defined(i.extrudedHeight);let y=e.defaultValue(i.height,0),h=e.defaultValue(i.extrudedHeight,y);if(!p){const e=Math.max(y,h);h=Math.min(y,h),y=e}this._vertexFormat=f.VertexFormat.clone(a),this._ellipsoid=t.Ellipsoid.clone(s),this._granularity=l,this._stRotation=c,this._height=y,this._extrudedHeight=h,this._closeTop=e.defaultValue(i.closeTop,!0),this._closeBottom=e.defaultValue(i.closeBottom,!0),this._polygonHierarchy=r,this._perPositionHeight=d,this._perPositionHeightExtrude=p,this._shadowVolume=e.defaultValue(i.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=i.offsetAttribute,this._arcType=e.defaultValue(i.arcType,o.ArcType.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=u,this.packedLength=g.PolygonGeometryLibrary.computeHierarchyPackedLength(r,t.Cartesian3)+t.Ellipsoid.packedLength+f.VertexFormat.packedLength+(u?g.PolygonGeometryLibrary.computeHierarchyPackedLength(u,n.Cartesian2):1)+12}re.fromPositions=function(t){return new re({polygonHierarchy:{positions:(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions},height:t.height,extrudedHeight:t.extrudedHeight,vertexFormat:t.vertexFormat,stRotation:t.stRotation,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,closeTop:t.closeTop,closeBottom:t.closeBottom,offsetAttribute:t.offsetAttribute,arcType:t.arcType,textureCoordinates:t.textureCoordinates})},re.pack=function(o,i,r){return r=e.defaultValue(r,0),r=g.PolygonGeometryLibrary.packPolygonHierarchy(o._polygonHierarchy,i,r,t.Cartesian3),t.Ellipsoid.pack(o._ellipsoid,i,r),r+=t.Ellipsoid.packedLength,f.VertexFormat.pack(o._vertexFormat,i,r),r+=f.VertexFormat.packedLength,i[r++]=o._height,i[r++]=o._extrudedHeight,i[r++]=o._granularity,i[r++]=o._stRotation,i[r++]=o._perPositionHeightExtrude?1:0,i[r++]=o._perPositionHeight?1:0,i[r++]=o._closeTop?1:0,i[r++]=o._closeBottom?1:0,i[r++]=o._shadowVolume?1:0,i[r++]=e.defaultValue(o._offsetAttribute,-1),i[r++]=o._arcType,e.defined(o._textureCoordinates)?r=g.PolygonGeometryLibrary.packPolygonHierarchy(o._textureCoordinates,i,r,n.Cartesian2):i[r++]=-1,i[r++]=o.packedLength,i};const ne=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),ae=new f.VertexFormat,se={polygonHierarchy:{}};return re.unpack=function(o,i,r){i=e.defaultValue(i,0);const a=g.PolygonGeometryLibrary.unpackPolygonHierarchy(o,i,t.Cartesian3);i=a.startingIndex,delete a.startingIndex;const s=t.Ellipsoid.unpack(o,i,ne);i+=t.Ellipsoid.packedLength;const l=f.VertexFormat.unpack(o,i,ae);i+=f.VertexFormat.packedLength;const c=o[i++],u=o[i++],d=o[i++],p=o[i++],y=1===o[i++],m=1===o[i++],h=1===o[i++],b=1===o[i++],_=1===o[i++],P=o[i++],C=o[i++],x=-1===o[i]?void 0:g.PolygonGeometryLibrary.unpackPolygonHierarchy(o,i,n.Cartesian2);e.defined(x)?(i=x.startingIndex,delete x.startingIndex):i++;const w=o[i++];return e.defined(r)||(r=new re(se)),r._polygonHierarchy=a,r._ellipsoid=t.Ellipsoid.clone(s,r._ellipsoid),r._vertexFormat=f.VertexFormat.clone(l,r._vertexFormat),r._height=c,r._extrudedHeight=u,r._granularity=d,r._stRotation=p,r._perPositionHeightExtrude=y,r._perPositionHeight=m,r._closeTop=h,r._closeBottom=b,r._shadowVolume=_,r._offsetAttribute=-1===P?void 0:P,r._arcType=C,r._textureCoordinates=x,r.packedLength=w,r},re.computeRectangle=function(i,r){const n=e.defaultValue(i.granularity,m.CesiumMath.RADIANS_PER_DEGREE),a=e.defaultValue(i.arcType,o.ArcType.GEODESIC),s=i.polygonHierarchy,l=e.defaultValue(i.ellipsoid,t.Ellipsoid.WGS84);return $(s.positions,l,a,n,r)},re.createGeometry=function(t){const o=t._vertexFormat,i=t._ellipsoid,n=t._granularity,s=t._stRotation,f=t._polygonHierarchy,b=t._perPositionHeight,_=t._closeTop,P=t._closeBottom,C=t._arcType,x=t._textureCoordinates,w=e.defined(x);let T=f.positions;if(T.length<3)return;const I=l.EllipsoidTangentPlane.fromPoints(T,i),A=g.PolygonGeometryLibrary.polygonsFromHierarchy(f,w,I.projectPointsOntoPlane.bind(I),!b,i),v=A.hierarchy,E=A.polygons,G=w?g.PolygonGeometryLibrary.polygonsFromHierarchy(x,!0,(function(e){return e}),!1).polygons:void 0;if(0===v.length)return;T=v[0].outerRing;const O=g.PolygonGeometryLibrary.computeBoundingRectangle(I.plane.normal,I.projectPointOntoPlane.bind(I),T,s,V),L=[],H=t._height,D=t._extrudedHeight,N={perPositionHeight:b,vertexFormat:o,geometry:void 0,tangentPlane:I,boundingRectangle:O,ellipsoid:i,stRotation:s,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:C};let F;if(t._perPositionHeightExtrude||!m.CesiumMath.equalsEpsilon(H,D,0,m.CesiumMath.EPSILON2))for(N.extrude=!0,N.top=_,N.bottom=P,N.shadowVolume=t._shadowVolume,N.offsetAttribute=t._offsetAttribute,F=0;F<E.length;F++){const e=ie(i,E[F],w?G[F]:void 0,n,v[F],b,_,P,o,C);let t;_&&P?(t=e.topAndBottom,N.geometry=g.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(t.geometry,H,D,i,b)):_?(t=e.topAndBottom,t.geometry.attributes.position.values=h.PolygonPipeline.scaleToGeodeticHeight(t.geometry.attributes.position.values,H,i,!b),N.geometry=t.geometry):P&&(t=e.topAndBottom,t.geometry.attributes.position.values=h.PolygonPipeline.scaleToGeodeticHeight(t.geometry.attributes.position.values,D,i,!0),N.geometry=t.geometry),(_||P)&&(N.wall=!1,t.geometry=q(N),L.push(t));const r=e.walls;N.wall=!0;for(let e=0;e<r.length;e++){const t=r[e];N.geometry=g.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(t.geometry,H,D,i,b),t.geometry=q(N),L.push(t)}}else for(F=0;F<E.length;F++){const r=new u.GeometryInstance({geometry:g.PolygonGeometryLibrary.createGeometryFromPositions(i,E[F],w?G[F]:void 0,n,b,o,C)});if(r.geometry.attributes.position.values=h.PolygonPipeline.scaleToGeodeticHeight(r.geometry.attributes.position.values,H,i,!b),N.geometry=r.geometry,r.geometry=q(N),e.defined(t._offsetAttribute)){const e=r.geometry.attributes.position.values.length,o=t._offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1,i=new Uint8Array(e/3).fill(o);r.geometry.attributes.applyOffset=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}L.push(r)}const R=p.GeometryPipeline.combineInstances(L)[0];R.attributes.position.values=new Float64Array(R.attributes.position.values),R.indices=y.IndexDatatype.createTypedArray(R.attributes.position.values.length/3,R.indices);const M=R.attributes,S=r.BoundingSphere.fromVertices(M.position.values);return o.position||delete M.position,new c.Geometry({attributes:M,indices:R.indices,primitiveType:R.primitiveType,boundingSphere:S,offsetAttribute:t._offsetAttribute})},re.createShadowVolume=function(e,t,o){const i=e._granularity,r=e._ellipsoid,n=t(i,r),a=o(i,r);return new re({polygonHierarchy:e._polygonHierarchy,ellipsoid:r,stRotation:e._stRotation,granularity:i,perPositionHeight:!1,extrudedHeight:n,height:a,vertexFormat:f.VertexFormat.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})},Object.defineProperties(re.prototype,{rectangle:{get:function(){if(!e.defined(this._rectangle)){const e=this._polygonHierarchy.positions;this._rectangle=$(e,this._ellipsoid,this._arcType,this._granularity)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return e.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(e){const t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];const o=e._ellipsoid,i=e._polygonHierarchy.positions,r=e.rectangle;return c.Geometry._textureCoordinateRotationPoints(i,t,o,r)}(this)),this._textureCoordinateRotationPoints}}}),function(o,i){return e.defined(i)&&(o=re.unpack(o,i)),o._ellipsoid=t.Ellipsoid.clone(o._ellipsoid),re.createGeometry(o)}}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./ArcType-3d26c7db","./Transforms-b1441a66","./ComponentDatatype-dd0b58d1","./EllipsoidTangentPlane-fc1becbb","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryInstance-c620c48b","./GeometryOffsetAttribute-b6810db4","./GeometryPipeline-fafdd6b1","./IndexDatatype-eddea9c9","./Math-8e567554","./PolygonGeometryLibrary-528d15dd","./PolygonPipeline-7de38ba5","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./AxisAlignedBoundingBox-ba8ff526","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b","./arrayRemoveDuplicates-bb49591c","./EllipsoidRhumbLine-1dd98535"],(function(e,t,i,o,r,n,a,s,l,y,u,d,p,c,f,g,m,h,b,P,E,A,_,G,L,T){"use strict";const H=[],v=[];function C(e,t,o,y,u){const p=n.EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,H);let g,m;f.PolygonPipeline.computeWindingOrder2D(p)===f.WindingOrder.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let h=t.length,b=0;if(y)for(g=new Float64Array(2*h*3),m=0;m<h;m++){const e=t[m],i=t[(m+1)%h];g[b++]=e.x,g[b++]=e.y,g[b++]=e.z,g[b++]=i.x,g[b++]=i.y,g[b++]=i.z}else{let r=0;if(u===i.ArcType.GEODESIC)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideLineCount(t[m],t[(m+1)%h],o);else if(u===i.ArcType.RHUMB)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[m],t[(m+1)%h],o);for(g=new Float64Array(3*r),m=0;m<h;m++){let r;u===i.ArcType.GEODESIC?r=c.PolygonGeometryLibrary.subdivideLine(t[m],t[(m+1)%h],o,v):u===i.ArcType.RHUMB&&(r=c.PolygonGeometryLibrary.subdivideRhumbLine(e,t[m],t[(m+1)%h],o,v));const n=r.length;for(let e=0;e<n;++e)g[b++]=r[e]}}h=g.length/3;const P=2*h,E=d.IndexDatatype.createTypedArray(h,P);for(b=0,m=0;m<h-1;m++)E[b++]=m,E[b++]=m+1;return E[b++]=h-1,E[b++]=0,new l.GeometryInstance({geometry:new a.Geometry({attributes:new s.GeometryAttributes({position:new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:g})}),indices:E,primitiveType:a.PrimitiveType.LINES})})}function x(e,t,o,y,u){const p=n.EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,H);let g,m;f.PolygonPipeline.computeWindingOrder2D(p)===f.WindingOrder.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let h=t.length;const b=new Array(h);let P=0;if(y)for(g=new Float64Array(2*h*3*2),m=0;m<h;++m){b[m]=P/3;const e=t[m],i=t[(m+1)%h];g[P++]=e.x,g[P++]=e.y,g[P++]=e.z,g[P++]=i.x,g[P++]=i.y,g[P++]=i.z}else{let r=0;if(u===i.ArcType.GEODESIC)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideLineCount(t[m],t[(m+1)%h],o);else if(u===i.ArcType.RHUMB)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[m],t[(m+1)%h],o);for(g=new Float64Array(3*r*2),m=0;m<h;++m){let r;b[m]=P/3,u===i.ArcType.GEODESIC?r=c.PolygonGeometryLibrary.subdivideLine(t[m],t[(m+1)%h],o,v):u===i.ArcType.RHUMB&&(r=c.PolygonGeometryLibrary.subdivideRhumbLine(e,t[m],t[(m+1)%h],o,v));const n=r.length;for(let e=0;e<n;++e)g[P++]=r[e]}}h=g.length/6;const E=b.length,A=2*(2*h+E),_=d.IndexDatatype.createTypedArray(h+E,A);for(P=0,m=0;m<h;++m)_[P++]=m,_[P++]=(m+1)%h,_[P++]=m+h,_[P++]=(m+1)%h+h;for(m=0;m<E;m++){const e=b[m];_[P++]=e,_[P++]=e+h}return new l.GeometryInstance({geometry:new a.Geometry({attributes:new s.GeometryAttributes({position:new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:g})}),indices:_,primitiveType:a.PrimitiveType.LINES})})}function O(o){const r=o.polygonHierarchy,n=e.defaultValue(o.ellipsoid,t.Ellipsoid.WGS84),a=e.defaultValue(o.granularity,p.CesiumMath.RADIANS_PER_DEGREE),s=e.defaultValue(o.perPositionHeight,!1),l=s&&e.defined(o.extrudedHeight),y=e.defaultValue(o.arcType,i.ArcType.GEODESIC);let u=e.defaultValue(o.height,0),d=e.defaultValue(o.extrudedHeight,u);if(!l){const e=Math.max(u,d);d=Math.min(u,d),u=e}this._ellipsoid=t.Ellipsoid.clone(n),this._granularity=a,this._height=u,this._extrudedHeight=d,this._arcType=y,this._polygonHierarchy=r,this._perPositionHeight=s,this._perPositionHeightExtrude=l,this._offsetAttribute=o.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=c.PolygonGeometryLibrary.computeHierarchyPackedLength(r,t.Cartesian3)+t.Ellipsoid.packedLength+8}O.pack=function(i,o,r){return r=e.defaultValue(r,0),r=c.PolygonGeometryLibrary.packPolygonHierarchy(i._polygonHierarchy,o,r,t.Cartesian3),t.Ellipsoid.pack(i._ellipsoid,o,r),r+=t.Ellipsoid.packedLength,o[r++]=i._height,o[r++]=i._extrudedHeight,o[r++]=i._granularity,o[r++]=i._perPositionHeightExtrude?1:0,o[r++]=i._perPositionHeight?1:0,o[r++]=i._arcType,o[r++]=e.defaultValue(i._offsetAttribute,-1),o[r]=i.packedLength,o};const D=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),I={polygonHierarchy:{}};return O.unpack=function(i,o,r){o=e.defaultValue(o,0);const n=c.PolygonGeometryLibrary.unpackPolygonHierarchy(i,o,t.Cartesian3);o=n.startingIndex,delete n.startingIndex;const a=t.Ellipsoid.unpack(i,o,D);o+=t.Ellipsoid.packedLength;const s=i[o++],l=i[o++],y=i[o++],u=1===i[o++],d=1===i[o++],p=i[o++],f=i[o++],g=i[o];return e.defined(r)||(r=new O(I)),r._polygonHierarchy=n,r._ellipsoid=t.Ellipsoid.clone(a,r._ellipsoid),r._height=s,r._extrudedHeight=l,r._granularity=y,r._perPositionHeight=d,r._perPositionHeightExtrude=u,r._arcType=p,r._offsetAttribute=-1===f?void 0:f,r.packedLength=g,r},O.fromPositions=function(t){return new O({polygonHierarchy:{positions:(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions},height:t.height,extrudedHeight:t.extrudedHeight,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,arcType:t.arcType,offsetAttribute:t.offsetAttribute})},O.createGeometry=function(t){const i=t._ellipsoid,n=t._granularity,s=t._polygonHierarchy,l=t._perPositionHeight,d=t._arcType,g=c.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(s,!l,i);if(0===g.length)return;let m;const h=[],b=p.CesiumMath.chordLength(n,i.maximumRadius),P=t._height,E=t._extrudedHeight;let A,_;if(t._perPositionHeightExtrude||!p.CesiumMath.equalsEpsilon(P,E,0,p.CesiumMath.EPSILON2))for(_=0;_<g.length;_++){if(m=x(i,g[_],b,l,d),m.geometry=c.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(m.geometry,P,E,i,l),e.defined(t._offsetAttribute)){const e=m.geometry.attributes.position.values.length/3;let i=new Uint8Array(e);t._offsetAttribute===y.GeometryOffsetAttribute.TOP?i=i.fill(1,0,e/2):(A=t._offsetAttribute===y.GeometryOffsetAttribute.NONE?0:1,i=i.fill(A)),m.geometry.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}h.push(m)}else for(_=0;_<g.length;_++){if(m=C(i,g[_],b,l,d),m.geometry.attributes.position.values=f.PolygonPipeline.scaleToGeodeticHeight(m.geometry.attributes.position.values,P,i,!l),e.defined(t._offsetAttribute)){const e=m.geometry.attributes.position.values.length;A=t._offsetAttribute===y.GeometryOffsetAttribute.NONE?0:1;const i=new Uint8Array(e/3).fill(A);m.geometry.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}h.push(m)}const G=u.GeometryPipeline.combineInstances(h)[0],L=o.BoundingSphere.fromVertices(G.attributes.position.values);return new a.Geometry({attributes:G.attributes,indices:G.indices,primitiveType:G.primitiveType,boundingSphere:L,offsetAttribute:t._offsetAttribute})},function(i,o){return e.defined(o)&&(i=O.unpack(i,o)),i._ellipsoid=t.Ellipsoid.clone(i._ellipsoid),O.createGeometry(i)}}));
define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./ArcType-3d26c7db","./Transforms-b7f686a8","./ComponentDatatype-dd0b58d1","./EllipsoidTangentPlane-ae5d3d65","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryInstance-c620c48b","./GeometryOffsetAttribute-b6810db4","./GeometryPipeline-c180ffdb","./IndexDatatype-eddea9c9","./Math-8e567554","./PolygonGeometryLibrary-227b23c8","./PolygonPipeline-f56a8ec5","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./AxisAlignedBoundingBox-680337b6","./IntersectionTests-7d927f09","./Plane-6aee7ffc","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b","./arrayRemoveDuplicates-bb49591c","./EllipsoidRhumbLine-1dd98535"],(function(e,t,i,o,r,n,a,s,l,y,u,d,p,c,f,g,m,h,b,P,E,A,_,G,L,T){"use strict";const H=[],v=[];function C(e,t,o,y,u){const p=n.EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,H);let g,m;f.PolygonPipeline.computeWindingOrder2D(p)===f.WindingOrder.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let h=t.length,b=0;if(y)for(g=new Float64Array(2*h*3),m=0;m<h;m++){const e=t[m],i=t[(m+1)%h];g[b++]=e.x,g[b++]=e.y,g[b++]=e.z,g[b++]=i.x,g[b++]=i.y,g[b++]=i.z}else{let r=0;if(u===i.ArcType.GEODESIC)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideLineCount(t[m],t[(m+1)%h],o);else if(u===i.ArcType.RHUMB)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[m],t[(m+1)%h],o);for(g=new Float64Array(3*r),m=0;m<h;m++){let r;u===i.ArcType.GEODESIC?r=c.PolygonGeometryLibrary.subdivideLine(t[m],t[(m+1)%h],o,v):u===i.ArcType.RHUMB&&(r=c.PolygonGeometryLibrary.subdivideRhumbLine(e,t[m],t[(m+1)%h],o,v));const n=r.length;for(let e=0;e<n;++e)g[b++]=r[e]}}h=g.length/3;const P=2*h,E=d.IndexDatatype.createTypedArray(h,P);for(b=0,m=0;m<h-1;m++)E[b++]=m,E[b++]=m+1;return E[b++]=h-1,E[b++]=0,new l.GeometryInstance({geometry:new a.Geometry({attributes:new s.GeometryAttributes({position:new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:g})}),indices:E,primitiveType:a.PrimitiveType.LINES})})}function x(e,t,o,y,u){const p=n.EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,H);let g,m;f.PolygonPipeline.computeWindingOrder2D(p)===f.WindingOrder.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let h=t.length;const b=new Array(h);let P=0;if(y)for(g=new Float64Array(2*h*3*2),m=0;m<h;++m){b[m]=P/3;const e=t[m],i=t[(m+1)%h];g[P++]=e.x,g[P++]=e.y,g[P++]=e.z,g[P++]=i.x,g[P++]=i.y,g[P++]=i.z}else{let r=0;if(u===i.ArcType.GEODESIC)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideLineCount(t[m],t[(m+1)%h],o);else if(u===i.ArcType.RHUMB)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[m],t[(m+1)%h],o);for(g=new Float64Array(3*r*2),m=0;m<h;++m){let r;b[m]=P/3,u===i.ArcType.GEODESIC?r=c.PolygonGeometryLibrary.subdivideLine(t[m],t[(m+1)%h],o,v):u===i.ArcType.RHUMB&&(r=c.PolygonGeometryLibrary.subdivideRhumbLine(e,t[m],t[(m+1)%h],o,v));const n=r.length;for(let e=0;e<n;++e)g[P++]=r[e]}}h=g.length/6;const E=b.length,A=2*(2*h+E),_=d.IndexDatatype.createTypedArray(h+E,A);for(P=0,m=0;m<h;++m)_[P++]=m,_[P++]=(m+1)%h,_[P++]=m+h,_[P++]=(m+1)%h+h;for(m=0;m<E;m++){const e=b[m];_[P++]=e,_[P++]=e+h}return new l.GeometryInstance({geometry:new a.Geometry({attributes:new s.GeometryAttributes({position:new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:g})}),indices:_,primitiveType:a.PrimitiveType.LINES})})}function O(o){const r=o.polygonHierarchy,n=e.defaultValue(o.ellipsoid,t.Ellipsoid.WGS84),a=e.defaultValue(o.granularity,p.CesiumMath.RADIANS_PER_DEGREE),s=e.defaultValue(o.perPositionHeight,!1),l=s&&e.defined(o.extrudedHeight),y=e.defaultValue(o.arcType,i.ArcType.GEODESIC);let u=e.defaultValue(o.height,0),d=e.defaultValue(o.extrudedHeight,u);if(!l){const e=Math.max(u,d);d=Math.min(u,d),u=e}this._ellipsoid=t.Ellipsoid.clone(n),this._granularity=a,this._height=u,this._extrudedHeight=d,this._arcType=y,this._polygonHierarchy=r,this._perPositionHeight=s,this._perPositionHeightExtrude=l,this._offsetAttribute=o.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=c.PolygonGeometryLibrary.computeHierarchyPackedLength(r,t.Cartesian3)+t.Ellipsoid.packedLength+8}O.pack=function(i,o,r){return r=e.defaultValue(r,0),r=c.PolygonGeometryLibrary.packPolygonHierarchy(i._polygonHierarchy,o,r,t.Cartesian3),t.Ellipsoid.pack(i._ellipsoid,o,r),r+=t.Ellipsoid.packedLength,o[r++]=i._height,o[r++]=i._extrudedHeight,o[r++]=i._granularity,o[r++]=i._perPositionHeightExtrude?1:0,o[r++]=i._perPositionHeight?1:0,o[r++]=i._arcType,o[r++]=e.defaultValue(i._offsetAttribute,-1),o[r]=i.packedLength,o};const D=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),I={polygonHierarchy:{}};return O.unpack=function(i,o,r){o=e.defaultValue(o,0);const n=c.PolygonGeometryLibrary.unpackPolygonHierarchy(i,o,t.Cartesian3);o=n.startingIndex,delete n.startingIndex;const a=t.Ellipsoid.unpack(i,o,D);o+=t.Ellipsoid.packedLength;const s=i[o++],l=i[o++],y=i[o++],u=1===i[o++],d=1===i[o++],p=i[o++],f=i[o++],g=i[o];return e.defined(r)||(r=new O(I)),r._polygonHierarchy=n,r._ellipsoid=t.Ellipsoid.clone(a,r._ellipsoid),r._height=s,r._extrudedHeight=l,r._granularity=y,r._perPositionHeight=d,r._perPositionHeightExtrude=u,r._arcType=p,r._offsetAttribute=-1===f?void 0:f,r.packedLength=g,r},O.fromPositions=function(t){return new O({polygonHierarchy:{positions:(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions},height:t.height,extrudedHeight:t.extrudedHeight,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,arcType:t.arcType,offsetAttribute:t.offsetAttribute})},O.createGeometry=function(t){const i=t._ellipsoid,n=t._granularity,s=t._polygonHierarchy,l=t._perPositionHeight,d=t._arcType,g=c.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(s,!l,i);if(0===g.length)return;let m;const h=[],b=p.CesiumMath.chordLength(n,i.maximumRadius),P=t._height,E=t._extrudedHeight;let A,_;if(t._perPositionHeightExtrude||!p.CesiumMath.equalsEpsilon(P,E,0,p.CesiumMath.EPSILON2))for(_=0;_<g.length;_++){if(m=x(i,g[_],b,l,d),m.geometry=c.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(m.geometry,P,E,i,l),e.defined(t._offsetAttribute)){const e=m.geometry.attributes.position.values.length/3;let i=new Uint8Array(e);t._offsetAttribute===y.GeometryOffsetAttribute.TOP?i=i.fill(1,0,e/2):(A=t._offsetAttribute===y.GeometryOffsetAttribute.NONE?0:1,i=i.fill(A)),m.geometry.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}h.push(m)}else for(_=0;_<g.length;_++){if(m=C(i,g[_],b,l,d),m.geometry.attributes.position.values=f.PolygonPipeline.scaleToGeodeticHeight(m.geometry.attributes.position.values,P,i,!l),e.defined(t._offsetAttribute)){const e=m.geometry.attributes.position.values.length;A=t._offsetAttribute===y.GeometryOffsetAttribute.NONE?0:1;const i=new Uint8Array(e/3).fill(A);m.geometry.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}h.push(m)}const G=u.GeometryPipeline.combineInstances(h)[0],L=o.BoundingSphere.fromVertices(G.attributes.position.values);return new a.Geometry({attributes:G.attributes,indices:G.indices,primitiveType:G.primitiveType,boundingSphere:L,offsetAttribute:t._offsetAttribute})},function(i,o){return e.defined(o)&&(i=O.unpack(i,o)),i._ellipsoid=t.Ellipsoid.clone(i._ellipsoid),O.createGeometry(i)}}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./ArcType-3d26c7db","./arrayRemoveDuplicates-bb49591c","./Transforms-b1441a66","./Color-0023019e","./ComponentDatatype-dd0b58d1","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./IndexDatatype-eddea9c9","./Math-8e567554","./PolylinePipeline-576cc29e","./VertexFormat-848ec33d","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./EllipsoidGeodesic-9484ceff","./EllipsoidRhumbLine-1dd98535","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc"],(function(e,t,o,r,n,a,i,l,s,c,p,d,u,y,m,f,h,C,g,_,A){"use strict";const E=[];function b(e,t,o,r,n){const i=E;let l;i.length=n;const s=o.red,c=o.green,p=o.blue,d=o.alpha,u=r.red,y=r.green,m=r.blue,f=r.alpha;if(a.Color.equals(o,r)){for(l=0;l<n;l++)i[l]=a.Color.clone(o);return i}const h=(u-s)/n,C=(y-c)/n,g=(m-p)/n,_=(f-d)/n;for(l=0;l<n;l++)i[l]=new a.Color(s+l*h,c+l*C,p+l*g,d+l*_);return i}function P(r){const n=(r=e.defaultValue(r,e.defaultValue.EMPTY_OBJECT)).positions,i=r.colors,l=e.defaultValue(r.width,1),s=e.defaultValue(r.colorsPerVertex,!1);this._positions=n,this._colors=i,this._width=l,this._colorsPerVertex=s,this._vertexFormat=u.VertexFormat.clone(e.defaultValue(r.vertexFormat,u.VertexFormat.DEFAULT)),this._arcType=e.defaultValue(r.arcType,o.ArcType.GEODESIC),this._granularity=e.defaultValue(r.granularity,p.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(r.ellipsoid,t.Ellipsoid.WGS84)),this._workerName="createPolylineGeometry";let c=1+n.length*t.Cartesian3.packedLength;c+=e.defined(i)?1+i.length*a.Color.packedLength:1,this.packedLength=c+t.Ellipsoid.packedLength+u.VertexFormat.packedLength+4}P.pack=function(o,r,n){let i;n=e.defaultValue(n,0);const l=o._positions;let s=l.length;for(r[n++]=s,i=0;i<s;++i,n+=t.Cartesian3.packedLength)t.Cartesian3.pack(l[i],r,n);const c=o._colors;for(s=e.defined(c)?c.length:0,r[n++]=s,i=0;i<s;++i,n+=a.Color.packedLength)a.Color.pack(c[i],r,n);return t.Ellipsoid.pack(o._ellipsoid,r,n),n+=t.Ellipsoid.packedLength,u.VertexFormat.pack(o._vertexFormat,r,n),n+=u.VertexFormat.packedLength,r[n++]=o._width,r[n++]=o._colorsPerVertex?1:0,r[n++]=o._arcType,r[n]=o._granularity,r};const x=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),w=new u.VertexFormat,T={positions:void 0,colors:void 0,ellipsoid:x,vertexFormat:w,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};P.unpack=function(o,r,n){let i;r=e.defaultValue(r,0);let l=o[r++];const s=new Array(l);for(i=0;i<l;++i,r+=t.Cartesian3.packedLength)s[i]=t.Cartesian3.unpack(o,r);l=o[r++];const c=l>0?new Array(l):void 0;for(i=0;i<l;++i,r+=a.Color.packedLength)c[i]=a.Color.unpack(o,r);const p=t.Ellipsoid.unpack(o,r,x);r+=t.Ellipsoid.packedLength;const d=u.VertexFormat.unpack(o,r,w);r+=u.VertexFormat.packedLength;const y=o[r++],m=1===o[r++],f=o[r++],h=o[r];return e.defined(n)?(n._positions=s,n._colors=c,n._ellipsoid=t.Ellipsoid.clone(p,n._ellipsoid),n._vertexFormat=u.VertexFormat.clone(d,n._vertexFormat),n._width=y,n._colorsPerVertex=m,n._arcType=f,n._granularity=h,n):(T.positions=s,T.colors=c,T.width=y,T.colorsPerVertex=m,T.arcType=f,T.granularity=h,new P(T))};const D=new t.Cartesian3,k=new t.Cartesian3,V=new t.Cartesian3,v=new t.Cartesian3;return P.createGeometry=function(u){const y=u._width,m=u._vertexFormat;let f=u._colors;const h=u._colorsPerVertex,C=u._arcType,g=u._granularity,_=u._ellipsoid;let A,P,x;const w=[];let T=r.arrayRemoveDuplicates(u._positions,t.Cartesian3.equalsEpsilon,!1,w);if(e.defined(f)&&w.length>0){let e=0,t=w[0];f=f.filter((function(o,r){let n=!1;return n=h?r===t||0===r&&1===t:r+1===t,!n||(e++,t=w[e],!1)}))}let L=T.length;if(L<2||y<=0)return;if(C===o.ArcType.GEODESIC||C===o.ArcType.RHUMB){let t,r;C===o.ArcType.GEODESIC?(t=p.CesiumMath.chordLength(g,_.maximumRadius),r=d.PolylinePipeline.numberOfPoints):(t=g,r=d.PolylinePipeline.numberOfPointsRhumbLine);const n=d.PolylinePipeline.extractHeights(T,_);if(e.defined(f)){let e=1;for(A=0;A<L-1;++A)e+=r(T[A],T[A+1],t);const o=new Array(e);let n=0;for(A=0;A<L-1;++A){const i=T[A],l=T[A+1],s=f[A],c=r(i,l,t);if(h&&A<e){const e=b(0,0,s,f[A+1],c),t=e.length;for(P=0;P<t;++P)o[n++]=e[P]}else for(P=0;P<c;++P)o[n++]=a.Color.clone(s)}o[n]=a.Color.clone(f[f.length-1]),f=o,E.length=0}T=C===o.ArcType.GEODESIC?d.PolylinePipeline.generateCartesianArc({positions:T,minDistance:t,ellipsoid:_,height:n}):d.PolylinePipeline.generateCartesianRhumbArc({positions:T,granularity:t,ellipsoid:_,height:n})}L=T.length;const F=4*L-4,G=new Float64Array(3*F),O=new Float64Array(3*F),R=new Float64Array(3*F),I=new Float32Array(2*F),S=m.st?new Float32Array(2*F):void 0,B=e.defined(f)?new Uint8Array(4*F):void 0;let M,U=0,N=0,H=0,W=0;for(P=0;P<L;++P){let o,r;0===P?(M=D,t.Cartesian3.subtract(T[0],T[1],M),t.Cartesian3.add(T[0],M,M)):M=T[P-1],t.Cartesian3.clone(M,V),t.Cartesian3.clone(T[P],k),P===L-1?(M=D,t.Cartesian3.subtract(T[L-1],T[L-2],M),t.Cartesian3.add(T[L-1],M,M)):M=T[P+1],t.Cartesian3.clone(M,v),e.defined(B)&&(o=0===P||h?f[P]:f[P-1],P!==L-1&&(r=f[P]));const n=P===L-1?2:4;for(x=0===P?2:0;x<n;++x){t.Cartesian3.pack(k,G,U),t.Cartesian3.pack(V,O,U),t.Cartesian3.pack(v,R,U),U+=3;const n=x-2<0?-1:1;if(I[N++]=x%2*2-1,I[N++]=n*y,m.st&&(S[H++]=P/(L-1),S[H++]=Math.max(I[N-2],0)),e.defined(B)){const e=x<2?o:r;B[W++]=a.Color.floatToByte(e.red),B[W++]=a.Color.floatToByte(e.green),B[W++]=a.Color.floatToByte(e.blue),B[W++]=a.Color.floatToByte(e.alpha)}}}const Y=new s.GeometryAttributes;Y.position=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:G}),Y.prevPosition=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:O}),Y.nextPosition=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:R}),Y.expandAndWidth=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:I}),m.st&&(Y.st=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:S})),e.defined(B)&&(Y.color=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:B,normalize:!0}));const q=c.IndexDatatype.createTypedArray(F,6*L-6);let z=0,J=0;const j=L-1;for(P=0;P<j;++P)q[J++]=z,q[J++]=z+2,q[J++]=z+1,q[J++]=z+1,q[J++]=z+2,q[J++]=z+3,z+=4;return new l.Geometry({attributes:Y,indices:q,primitiveType:l.PrimitiveType.TRIANGLES,boundingSphere:n.BoundingSphere.fromPoints(T),geometryType:l.GeometryType.POLYLINES})},function(o,r){return e.defined(r)&&(o=P.unpack(o,r)),o._ellipsoid=t.Ellipsoid.clone(o._ellipsoid),P.createGeometry(o)}}));
define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./ArcType-3d26c7db","./arrayRemoveDuplicates-bb49591c","./Transforms-b7f686a8","./Color-6b751834","./ComponentDatatype-dd0b58d1","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./IndexDatatype-eddea9c9","./Math-8e567554","./PolylinePipeline-eba1803b","./VertexFormat-848ec33d","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./EllipsoidGeodesic-9484ceff","./EllipsoidRhumbLine-1dd98535","./IntersectionTests-7d927f09","./Plane-6aee7ffc"],(function(e,t,o,r,n,a,i,l,s,c,p,d,u,y,m,f,h,C,g,_,A){"use strict";const b=[];function E(e,t,o,r,n){const i=b;let l;i.length=n;const s=o.red,c=o.green,p=o.blue,d=o.alpha,u=r.red,y=r.green,m=r.blue,f=r.alpha;if(a.Color.equals(o,r)){for(l=0;l<n;l++)i[l]=a.Color.clone(o);return i}const h=(u-s)/n,C=(y-c)/n,g=(m-p)/n,_=(f-d)/n;for(l=0;l<n;l++)i[l]=new a.Color(s+l*h,c+l*C,p+l*g,d+l*_);return i}function P(r){const n=(r=e.defaultValue(r,e.defaultValue.EMPTY_OBJECT)).positions,i=r.colors,l=e.defaultValue(r.width,1),s=e.defaultValue(r.colorsPerVertex,!1);this._positions=n,this._colors=i,this._width=l,this._colorsPerVertex=s,this._vertexFormat=u.VertexFormat.clone(e.defaultValue(r.vertexFormat,u.VertexFormat.DEFAULT)),this._arcType=e.defaultValue(r.arcType,o.ArcType.GEODESIC),this._granularity=e.defaultValue(r.granularity,p.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(r.ellipsoid,t.Ellipsoid.WGS84)),this._workerName="createPolylineGeometry";let c=1+n.length*t.Cartesian3.packedLength;c+=e.defined(i)?1+i.length*a.Color.packedLength:1,this.packedLength=c+t.Ellipsoid.packedLength+u.VertexFormat.packedLength+4}P.pack=function(o,r,n){let i;n=e.defaultValue(n,0);const l=o._positions;let s=l.length;for(r[n++]=s,i=0;i<s;++i,n+=t.Cartesian3.packedLength)t.Cartesian3.pack(l[i],r,n);const c=o._colors;for(s=e.defined(c)?c.length:0,r[n++]=s,i=0;i<s;++i,n+=a.Color.packedLength)a.Color.pack(c[i],r,n);return t.Ellipsoid.pack(o._ellipsoid,r,n),n+=t.Ellipsoid.packedLength,u.VertexFormat.pack(o._vertexFormat,r,n),n+=u.VertexFormat.packedLength,r[n++]=o._width,r[n++]=o._colorsPerVertex?1:0,r[n++]=o._arcType,r[n]=o._granularity,r};const x=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),w=new u.VertexFormat,T={positions:void 0,colors:void 0,ellipsoid:x,vertexFormat:w,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};P.unpack=function(o,r,n){let i;r=e.defaultValue(r,0);let l=o[r++];const s=new Array(l);for(i=0;i<l;++i,r+=t.Cartesian3.packedLength)s[i]=t.Cartesian3.unpack(o,r);l=o[r++];const c=l>0?new Array(l):void 0;for(i=0;i<l;++i,r+=a.Color.packedLength)c[i]=a.Color.unpack(o,r);const p=t.Ellipsoid.unpack(o,r,x);r+=t.Ellipsoid.packedLength;const d=u.VertexFormat.unpack(o,r,w);r+=u.VertexFormat.packedLength;const y=o[r++],m=1===o[r++],f=o[r++],h=o[r];return e.defined(n)?(n._positions=s,n._colors=c,n._ellipsoid=t.Ellipsoid.clone(p,n._ellipsoid),n._vertexFormat=u.VertexFormat.clone(d,n._vertexFormat),n._width=y,n._colorsPerVertex=m,n._arcType=f,n._granularity=h,n):(T.positions=s,T.colors=c,T.width=y,T.colorsPerVertex=m,T.arcType=f,T.granularity=h,new P(T))};const D=new t.Cartesian3,k=new t.Cartesian3,V=new t.Cartesian3,v=new t.Cartesian3;return P.createGeometry=function(u){const y=u._width,m=u._vertexFormat;let f=u._colors;const h=u._colorsPerVertex,C=u._arcType,g=u._granularity,_=u._ellipsoid;let A,P,x;const w=[];let T=r.arrayRemoveDuplicates(u._positions,t.Cartesian3.equalsEpsilon,!1,w);if(e.defined(f)&&w.length>0){let e=0,t=w[0];f=f.filter((function(o,r){let n=!1;return n=h?r===t||0===r&&1===t:r+1===t,!n||(e++,t=w[e],!1)}))}let L=T.length;if(L<2||y<=0)return;if(C===o.ArcType.GEODESIC||C===o.ArcType.RHUMB){let t,r;C===o.ArcType.GEODESIC?(t=p.CesiumMath.chordLength(g,_.maximumRadius),r=d.PolylinePipeline.numberOfPoints):(t=g,r=d.PolylinePipeline.numberOfPointsRhumbLine);const n=d.PolylinePipeline.extractHeights(T,_);if(e.defined(f)){let e=1;for(A=0;A<L-1;++A)e+=r(T[A],T[A+1],t);const o=new Array(e);let n=0;for(A=0;A<L-1;++A){const i=T[A],l=T[A+1],s=f[A],c=r(i,l,t);if(h&&A<e){const e=E(0,0,s,f[A+1],c),t=e.length;for(P=0;P<t;++P)o[n++]=e[P]}else for(P=0;P<c;++P)o[n++]=a.Color.clone(s)}o[n]=a.Color.clone(f[f.length-1]),f=o,b.length=0}T=C===o.ArcType.GEODESIC?d.PolylinePipeline.generateCartesianArc({positions:T,minDistance:t,ellipsoid:_,height:n}):d.PolylinePipeline.generateCartesianRhumbArc({positions:T,granularity:t,ellipsoid:_,height:n})}L=T.length;const F=4*L-4,G=new Float64Array(3*F),O=new Float64Array(3*F),R=new Float64Array(3*F),I=new Float32Array(2*F),S=m.st?new Float32Array(2*F):void 0,B=e.defined(f)?new Uint8Array(4*F):void 0;let M,U=0,N=0,H=0,W=0;for(P=0;P<L;++P){let o,r;0===P?(M=D,t.Cartesian3.subtract(T[0],T[1],M),t.Cartesian3.add(T[0],M,M)):M=T[P-1],t.Cartesian3.clone(M,V),t.Cartesian3.clone(T[P],k),P===L-1?(M=D,t.Cartesian3.subtract(T[L-1],T[L-2],M),t.Cartesian3.add(T[L-1],M,M)):M=T[P+1],t.Cartesian3.clone(M,v),e.defined(B)&&(o=0===P||h?f[P]:f[P-1],P!==L-1&&(r=f[P]));const n=P===L-1?2:4;for(x=0===P?2:0;x<n;++x){t.Cartesian3.pack(k,G,U),t.Cartesian3.pack(V,O,U),t.Cartesian3.pack(v,R,U),U+=3;const n=x-2<0?-1:1;if(I[N++]=x%2*2-1,I[N++]=n*y,m.st&&(S[H++]=P/(L-1),S[H++]=Math.max(I[N-2],0)),e.defined(B)){const e=x<2?o:r;B[W++]=a.Color.floatToByte(e.red),B[W++]=a.Color.floatToByte(e.green),B[W++]=a.Color.floatToByte(e.blue),B[W++]=a.Color.floatToByte(e.alpha)}}}const Y=new s.GeometryAttributes;Y.position=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:G}),Y.prevPosition=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:O}),Y.nextPosition=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:R}),Y.expandAndWidth=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:I}),m.st&&(Y.st=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:S})),e.defined(B)&&(Y.color=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:B,normalize:!0}));const q=c.IndexDatatype.createTypedArray(F,6*L-6);let z=0,J=0;const j=L-1;for(P=0;P<j;++P)q[J++]=z,q[J++]=z+2,q[J++]=z+1,q[J++]=z+1,q[J++]=z+2,q[J++]=z+3,z+=4;return new l.Geometry({attributes:Y,indices:q,primitiveType:l.PrimitiveType.TRIANGLES,boundingSphere:n.BoundingSphere.fromPoints(T),geometryType:l.GeometryType.POLYLINES})},function(o,r){return e.defined(r)&&(o=P.unpack(o,r)),o._ellipsoid=t.Ellipsoid.clone(o._ellipsoid),P.createGeometry(o)}}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./arrayRemoveDuplicates-bb49591c","./BoundingRectangle-d5562dff","./Transforms-b1441a66","./Matrix2-66622085","./ComponentDatatype-dd0b58d1","./PolylineVolumeGeometryLibrary-bf1fd89f","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryPipeline-fafdd6b1","./IndexDatatype-eddea9c9","./Math-8e567554","./PolygonPipeline-7de38ba5","./VertexFormat-848ec33d","./combine-6eb6e848","./RuntimeError-3c5db370","./WebGLConstants-f7267ced","./EllipsoidTangentPlane-fc1becbb","./AxisAlignedBoundingBox-ba8ff526","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc","./PolylinePipeline-576cc29e","./EllipsoidGeodesic-9484ceff","./EllipsoidRhumbLine-1dd98535","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b"],(function(e,t,n,o,i,a,r,l,s,p,c,d,u,m,y,g,f,h,b,P,E,_,k,v,V,x,L){"use strict";function C(n){const o=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).polylinePositions,i=n.shapePositions;this._positions=o,this._shape=i,this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84)),this._cornerType=e.defaultValue(n.cornerType,l.CornerType.ROUNDED),this._vertexFormat=y.VertexFormat.clone(e.defaultValue(n.vertexFormat,y.VertexFormat.DEFAULT)),this._granularity=e.defaultValue(n.granularity,u.CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";let r=1+o.length*t.Cartesian3.packedLength;r+=1+i.length*a.Cartesian2.packedLength,this.packedLength=r+t.Ellipsoid.packedLength+y.VertexFormat.packedLength+2}C.pack=function(n,o,i){let r;i=e.defaultValue(i,0);const l=n._positions;let s=l.length;for(o[i++]=s,r=0;r<s;++r,i+=t.Cartesian3.packedLength)t.Cartesian3.pack(l[r],o,i);const p=n._shape;for(s=p.length,o[i++]=s,r=0;r<s;++r,i+=a.Cartesian2.packedLength)a.Cartesian2.pack(p[r],o,i);return t.Ellipsoid.pack(n._ellipsoid,o,i),i+=t.Ellipsoid.packedLength,y.VertexFormat.pack(n._vertexFormat,o,i),i+=y.VertexFormat.packedLength,o[i++]=n._cornerType,o[i]=n._granularity,o};const F=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),A=new y.VertexFormat,T={polylinePositions:void 0,shapePositions:void 0,ellipsoid:F,vertexFormat:A,cornerType:void 0,granularity:void 0};C.unpack=function(n,o,i){let r;o=e.defaultValue(o,0);let l=n[o++];const s=new Array(l);for(r=0;r<l;++r,o+=t.Cartesian3.packedLength)s[r]=t.Cartesian3.unpack(n,o);l=n[o++];const p=new Array(l);for(r=0;r<l;++r,o+=a.Cartesian2.packedLength)p[r]=a.Cartesian2.unpack(n,o);const c=t.Ellipsoid.unpack(n,o,F);o+=t.Ellipsoid.packedLength;const d=y.VertexFormat.unpack(n,o,A);o+=y.VertexFormat.packedLength;const u=n[o++],m=n[o];return e.defined(i)?(i._positions=s,i._shape=p,i._ellipsoid=t.Ellipsoid.clone(c,i._ellipsoid),i._vertexFormat=y.VertexFormat.clone(d,i._vertexFormat),i._cornerType=u,i._granularity=m,i):(T.polylinePositions=s,T.shapePositions=p,T.cornerType=u,T.granularity=m,new C(T))};const G=new o.BoundingRectangle;return C.createGeometry=function(e){const a=e._positions,u=n.arrayRemoveDuplicates(a,t.Cartesian3.equalsEpsilon);let y=e._shape;if(y=l.PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(y),u.length<2||y.length<3)return;m.PolygonPipeline.computeWindingOrder2D(y)===m.WindingOrder.CLOCKWISE&&y.reverse();const g=o.BoundingRectangle.fromPoints(y,G);return function(e,t,n,o){const a=new p.GeometryAttributes;o.position&&(a.position=new s.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e}));const u=t.length,y=e.length/3,g=(y-2*u)/(2*u),f=m.PolygonPipeline.triangulate(t),h=(g-1)*u*6+2*f.length,b=d.IndexDatatype.createTypedArray(y,h);let P,E,_,k,v,V;const x=2*u;let L=0;for(P=0;P<g-1;P++){for(E=0;E<u-1;E++)_=2*E+P*u*2,V=_+x,k=_+1,v=k+x,b[L++]=k,b[L++]=_,b[L++]=v,b[L++]=v,b[L++]=_,b[L++]=V;_=2*u-2+P*u*2,k=_+1,v=k+x,V=_+x,b[L++]=k,b[L++]=_,b[L++]=v,b[L++]=v,b[L++]=_,b[L++]=V}if(o.st||o.tangent||o.bitangent){const e=new Float32Array(2*y),o=1/(g-1),i=1/n.height,l=n.height/2;let p,c,d=0;for(P=0;P<g;P++){for(p=P*o,c=i*(t[0].y+l),e[d++]=p,e[d++]=c,E=1;E<u;E++)c=i*(t[E].y+l),e[d++]=p,e[d++]=c,e[d++]=p,e[d++]=c;c=i*(t[0].y+l),e[d++]=p,e[d++]=c}for(E=0;E<u;E++)p=0,c=i*(t[E].y+l),e[d++]=p,e[d++]=c;for(E=0;E<u;E++)p=(g-1)*o,c=i*(t[E].y+l),e[d++]=p,e[d++]=c;a.st=new s.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(e)})}const C=y-2*u;for(P=0;P<f.length;P+=3){const e=f[P]+C,t=f[P+1]+C,n=f[P+2]+C;b[L++]=e,b[L++]=t,b[L++]=n,b[L++]=n+u,b[L++]=t+u,b[L++]=e+u}let F=new s.Geometry({attributes:a,indices:b,boundingSphere:i.BoundingSphere.fromVertices(e),primitiveType:s.PrimitiveType.TRIANGLES});if(o.normal&&(F=c.GeometryPipeline.computeNormal(F)),o.tangent||o.bitangent){try{F=c.GeometryPipeline.computeTangentAndBitangent(F)}catch(e){l.oneTimeWarning("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}o.tangent||(F.attributes.tangent=void 0),o.bitangent||(F.attributes.bitangent=void 0),o.st||(F.attributes.st=void 0)}return F}(l.PolylineVolumeGeometryLibrary.computePositions(u,y,g,e,!0),y,g,e._vertexFormat)},function(n,o){return e.defined(o)&&(n=C.unpack(n,o)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),C.createGeometry(n)}}));
define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./arrayRemoveDuplicates-bb49591c","./BoundingRectangle-58f64349","./Transforms-b7f686a8","./Matrix2-66622085","./ComponentDatatype-dd0b58d1","./PolylineVolumeGeometryLibrary-1f624b8b","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryPipeline-c180ffdb","./IndexDatatype-eddea9c9","./Math-8e567554","./PolygonPipeline-f56a8ec5","./VertexFormat-848ec33d","./combine-6eb6e848","./RuntimeError-3c5db370","./WebGLConstants-f7267ced","./EllipsoidTangentPlane-ae5d3d65","./AxisAlignedBoundingBox-680337b6","./IntersectionTests-7d927f09","./Plane-6aee7ffc","./PolylinePipeline-eba1803b","./EllipsoidGeodesic-9484ceff","./EllipsoidRhumbLine-1dd98535","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b"],(function(e,t,n,o,i,a,r,l,s,p,c,d,u,m,y,g,f,h,b,P,E,_,k,v,V,x,L){"use strict";function C(n){const o=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).polylinePositions,i=n.shapePositions;this._positions=o,this._shape=i,this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84)),this._cornerType=e.defaultValue(n.cornerType,l.CornerType.ROUNDED),this._vertexFormat=y.VertexFormat.clone(e.defaultValue(n.vertexFormat,y.VertexFormat.DEFAULT)),this._granularity=e.defaultValue(n.granularity,u.CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";let r=1+o.length*t.Cartesian3.packedLength;r+=1+i.length*a.Cartesian2.packedLength,this.packedLength=r+t.Ellipsoid.packedLength+y.VertexFormat.packedLength+2}C.pack=function(n,o,i){let r;i=e.defaultValue(i,0);const l=n._positions;let s=l.length;for(o[i++]=s,r=0;r<s;++r,i+=t.Cartesian3.packedLength)t.Cartesian3.pack(l[r],o,i);const p=n._shape;for(s=p.length,o[i++]=s,r=0;r<s;++r,i+=a.Cartesian2.packedLength)a.Cartesian2.pack(p[r],o,i);return t.Ellipsoid.pack(n._ellipsoid,o,i),i+=t.Ellipsoid.packedLength,y.VertexFormat.pack(n._vertexFormat,o,i),i+=y.VertexFormat.packedLength,o[i++]=n._cornerType,o[i]=n._granularity,o};const F=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),A=new y.VertexFormat,T={polylinePositions:void 0,shapePositions:void 0,ellipsoid:F,vertexFormat:A,cornerType:void 0,granularity:void 0};C.unpack=function(n,o,i){let r;o=e.defaultValue(o,0);let l=n[o++];const s=new Array(l);for(r=0;r<l;++r,o+=t.Cartesian3.packedLength)s[r]=t.Cartesian3.unpack(n,o);l=n[o++];const p=new Array(l);for(r=0;r<l;++r,o+=a.Cartesian2.packedLength)p[r]=a.Cartesian2.unpack(n,o);const c=t.Ellipsoid.unpack(n,o,F);o+=t.Ellipsoid.packedLength;const d=y.VertexFormat.unpack(n,o,A);o+=y.VertexFormat.packedLength;const u=n[o++],m=n[o];return e.defined(i)?(i._positions=s,i._shape=p,i._ellipsoid=t.Ellipsoid.clone(c,i._ellipsoid),i._vertexFormat=y.VertexFormat.clone(d,i._vertexFormat),i._cornerType=u,i._granularity=m,i):(T.polylinePositions=s,T.shapePositions=p,T.cornerType=u,T.granularity=m,new C(T))};const G=new o.BoundingRectangle;return C.createGeometry=function(e){const a=e._positions,u=n.arrayRemoveDuplicates(a,t.Cartesian3.equalsEpsilon);let y=e._shape;if(y=l.PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(y),u.length<2||y.length<3)return;m.PolygonPipeline.computeWindingOrder2D(y)===m.WindingOrder.CLOCKWISE&&y.reverse();const g=o.BoundingRectangle.fromPoints(y,G);return function(e,t,n,o){const a=new p.GeometryAttributes;o.position&&(a.position=new s.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e}));const u=t.length,y=e.length/3,g=(y-2*u)/(2*u),f=m.PolygonPipeline.triangulate(t),h=(g-1)*u*6+2*f.length,b=d.IndexDatatype.createTypedArray(y,h);let P,E,_,k,v,V;const x=2*u;let L=0;for(P=0;P<g-1;P++){for(E=0;E<u-1;E++)_=2*E+P*u*2,V=_+x,k=_+1,v=k+x,b[L++]=k,b[L++]=_,b[L++]=v,b[L++]=v,b[L++]=_,b[L++]=V;_=2*u-2+P*u*2,k=_+1,v=k+x,V=_+x,b[L++]=k,b[L++]=_,b[L++]=v,b[L++]=v,b[L++]=_,b[L++]=V}if(o.st||o.tangent||o.bitangent){const e=new Float32Array(2*y),o=1/(g-1),i=1/n.height,l=n.height/2;let p,c,d=0;for(P=0;P<g;P++){for(p=P*o,c=i*(t[0].y+l),e[d++]=p,e[d++]=c,E=1;E<u;E++)c=i*(t[E].y+l),e[d++]=p,e[d++]=c,e[d++]=p,e[d++]=c;c=i*(t[0].y+l),e[d++]=p,e[d++]=c}for(E=0;E<u;E++)p=0,c=i*(t[E].y+l),e[d++]=p,e[d++]=c;for(E=0;E<u;E++)p=(g-1)*o,c=i*(t[E].y+l),e[d++]=p,e[d++]=c;a.st=new s.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(e)})}const C=y-2*u;for(P=0;P<f.length;P+=3){const e=f[P]+C,t=f[P+1]+C,n=f[P+2]+C;b[L++]=e,b[L++]=t,b[L++]=n,b[L++]=n+u,b[L++]=t+u,b[L++]=e+u}let F=new s.Geometry({attributes:a,indices:b,boundingSphere:i.BoundingSphere.fromVertices(e),primitiveType:s.PrimitiveType.TRIANGLES});if(o.normal&&(F=c.GeometryPipeline.computeNormal(F)),o.tangent||o.bitangent){try{F=c.GeometryPipeline.computeTangentAndBitangent(F)}catch(e){l.oneTimeWarning("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}o.tangent||(F.attributes.tangent=void 0),o.bitangent||(F.attributes.bitangent=void 0),o.st||(F.attributes.st=void 0)}return F}(l.PolylineVolumeGeometryLibrary.computePositions(u,y,g,e,!0),y,g,e._vertexFormat)},function(n,o){return e.defined(o)&&(n=C.unpack(n,o)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),C.createGeometry(n)}}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./arrayRemoveDuplicates-bb49591c","./BoundingRectangle-d5562dff","./Transforms-b1441a66","./Matrix2-66622085","./ComponentDatatype-dd0b58d1","./PolylineVolumeGeometryLibrary-bf1fd89f","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./IndexDatatype-eddea9c9","./Math-8e567554","./PolygonPipeline-7de38ba5","./combine-6eb6e848","./RuntimeError-3c5db370","./WebGLConstants-f7267ced","./EllipsoidTangentPlane-fc1becbb","./AxisAlignedBoundingBox-ba8ff526","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc","./PolylinePipeline-576cc29e","./EllipsoidGeodesic-9484ceff","./EllipsoidRhumbLine-1dd98535"],(function(e,t,i,n,o,a,l,r,s,p,c,d,u,y,f,g,h,m,E,b,P,_,k){"use strict";function C(i){const n=(i=e.defaultValue(i,e.defaultValue.EMPTY_OBJECT)).polylinePositions,o=i.shapePositions;this._positions=n,this._shape=o,this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(i.ellipsoid,t.Ellipsoid.WGS84)),this._cornerType=e.defaultValue(i.cornerType,r.CornerType.ROUNDED),this._granularity=e.defaultValue(i.granularity,d.CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";let l=1+n.length*t.Cartesian3.packedLength;l+=1+o.length*a.Cartesian2.packedLength,this.packedLength=l+t.Ellipsoid.packedLength+2}C.pack=function(i,n,o){let l;o=e.defaultValue(o,0);const r=i._positions;let s=r.length;for(n[o++]=s,l=0;l<s;++l,o+=t.Cartesian3.packedLength)t.Cartesian3.pack(r[l],n,o);const p=i._shape;for(s=p.length,n[o++]=s,l=0;l<s;++l,o+=a.Cartesian2.packedLength)a.Cartesian2.pack(p[l],n,o);return t.Ellipsoid.pack(i._ellipsoid,n,o),o+=t.Ellipsoid.packedLength,n[o++]=i._cornerType,n[o]=i._granularity,n};const L=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),T={polylinePositions:void 0,shapePositions:void 0,ellipsoid:L,height:void 0,cornerType:void 0,granularity:void 0};C.unpack=function(i,n,o){let l;n=e.defaultValue(n,0);let r=i[n++];const s=new Array(r);for(l=0;l<r;++l,n+=t.Cartesian3.packedLength)s[l]=t.Cartesian3.unpack(i,n);r=i[n++];const p=new Array(r);for(l=0;l<r;++l,n+=a.Cartesian2.packedLength)p[l]=a.Cartesian2.unpack(i,n);const c=t.Ellipsoid.unpack(i,n,L);n+=t.Ellipsoid.packedLength;const d=i[n++],u=i[n];return e.defined(o)?(o._positions=s,o._shape=p,o._ellipsoid=t.Ellipsoid.clone(c,o._ellipsoid),o._cornerType=d,o._granularity=u,o):(T.polylinePositions=s,T.shapePositions=p,T.cornerType=d,T.granularity=u,new C(T))};const D=new n.BoundingRectangle;return C.createGeometry=function(e){const a=e._positions,d=i.arrayRemoveDuplicates(a,t.Cartesian3.equalsEpsilon);let y=e._shape;if(y=r.PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(y),d.length<2||y.length<3)return;u.PolygonPipeline.computeWindingOrder2D(y)===u.WindingOrder.CLOCKWISE&&y.reverse();const f=n.BoundingRectangle.fromPoints(y,D);return function(e,t){const i=new p.GeometryAttributes;i.position=new s.GeometryAttribute({componentDatatype:l.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e});const n=t.length,a=i.position.values.length/3,r=e.length/3/n,d=c.IndexDatatype.createTypedArray(a,2*n*(r+1));let u,y,f=0;u=0;let g=u*n;for(y=0;y<n-1;y++)d[f++]=y+g,d[f++]=y+g+1;for(d[f++]=n-1+g,d[f++]=g,u=r-1,g=u*n,y=0;y<n-1;y++)d[f++]=y+g,d[f++]=y+g+1;for(d[f++]=n-1+g,d[f++]=g,u=0;u<r-1;u++){const e=n*u,t=e+n;for(y=0;y<n;y++)d[f++]=y+e,d[f++]=y+t}return new s.Geometry({attributes:i,indices:c.IndexDatatype.createTypedArray(a,d),boundingSphere:o.BoundingSphere.fromVertices(e),primitiveType:s.PrimitiveType.LINES})}(r.PolylineVolumeGeometryLibrary.computePositions(d,y,f,e,!1),y)},function(i,n){return e.defined(n)&&(i=C.unpack(i,n)),i._ellipsoid=t.Ellipsoid.clone(i._ellipsoid),C.createGeometry(i)}}));
define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./arrayRemoveDuplicates-bb49591c","./BoundingRectangle-58f64349","./Transforms-b7f686a8","./Matrix2-66622085","./ComponentDatatype-dd0b58d1","./PolylineVolumeGeometryLibrary-1f624b8b","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./IndexDatatype-eddea9c9","./Math-8e567554","./PolygonPipeline-f56a8ec5","./combine-6eb6e848","./RuntimeError-3c5db370","./WebGLConstants-f7267ced","./EllipsoidTangentPlane-ae5d3d65","./AxisAlignedBoundingBox-680337b6","./IntersectionTests-7d927f09","./Plane-6aee7ffc","./PolylinePipeline-eba1803b","./EllipsoidGeodesic-9484ceff","./EllipsoidRhumbLine-1dd98535"],(function(e,t,i,n,o,a,l,r,s,p,d,c,u,y,f,g,h,m,E,P,_,b,k){"use strict";function C(i){const n=(i=e.defaultValue(i,e.defaultValue.EMPTY_OBJECT)).polylinePositions,o=i.shapePositions;this._positions=n,this._shape=o,this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(i.ellipsoid,t.Ellipsoid.WGS84)),this._cornerType=e.defaultValue(i.cornerType,r.CornerType.ROUNDED),this._granularity=e.defaultValue(i.granularity,c.CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";let l=1+n.length*t.Cartesian3.packedLength;l+=1+o.length*a.Cartesian2.packedLength,this.packedLength=l+t.Ellipsoid.packedLength+2}C.pack=function(i,n,o){let l;o=e.defaultValue(o,0);const r=i._positions;let s=r.length;for(n[o++]=s,l=0;l<s;++l,o+=t.Cartesian3.packedLength)t.Cartesian3.pack(r[l],n,o);const p=i._shape;for(s=p.length,n[o++]=s,l=0;l<s;++l,o+=a.Cartesian2.packedLength)a.Cartesian2.pack(p[l],n,o);return t.Ellipsoid.pack(i._ellipsoid,n,o),o+=t.Ellipsoid.packedLength,n[o++]=i._cornerType,n[o]=i._granularity,n};const L=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),T={polylinePositions:void 0,shapePositions:void 0,ellipsoid:L,height:void 0,cornerType:void 0,granularity:void 0};C.unpack=function(i,n,o){let l;n=e.defaultValue(n,0);let r=i[n++];const s=new Array(r);for(l=0;l<r;++l,n+=t.Cartesian3.packedLength)s[l]=t.Cartesian3.unpack(i,n);r=i[n++];const p=new Array(r);for(l=0;l<r;++l,n+=a.Cartesian2.packedLength)p[l]=a.Cartesian2.unpack(i,n);const d=t.Ellipsoid.unpack(i,n,L);n+=t.Ellipsoid.packedLength;const c=i[n++],u=i[n];return e.defined(o)?(o._positions=s,o._shape=p,o._ellipsoid=t.Ellipsoid.clone(d,o._ellipsoid),o._cornerType=c,o._granularity=u,o):(T.polylinePositions=s,T.shapePositions=p,T.cornerType=c,T.granularity=u,new C(T))};const D=new n.BoundingRectangle;return C.createGeometry=function(e){const a=e._positions,c=i.arrayRemoveDuplicates(a,t.Cartesian3.equalsEpsilon);let y=e._shape;if(y=r.PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(y),c.length<2||y.length<3)return;u.PolygonPipeline.computeWindingOrder2D(y)===u.WindingOrder.CLOCKWISE&&y.reverse();const f=n.BoundingRectangle.fromPoints(y,D);return function(e,t){const i=new p.GeometryAttributes;i.position=new s.GeometryAttribute({componentDatatype:l.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e});const n=t.length,a=i.position.values.length/3,r=e.length/3/n,c=d.IndexDatatype.createTypedArray(a,2*n*(r+1));let u,y,f=0;u=0;let g=u*n;for(y=0;y<n-1;y++)c[f++]=y+g,c[f++]=y+g+1;for(c[f++]=n-1+g,c[f++]=g,u=r-1,g=u*n,y=0;y<n-1;y++)c[f++]=y+g,c[f++]=y+g+1;for(c[f++]=n-1+g,c[f++]=g,u=0;u<r-1;u++){const e=n*u,t=e+n;for(y=0;y<n;y++)c[f++]=y+e,c[f++]=y+t}return new s.Geometry({attributes:i,indices:d.IndexDatatype.createTypedArray(a,c),boundingSphere:o.BoundingSphere.fromVertices(e),primitiveType:s.PrimitiveType.LINES})}(r.PolylineVolumeGeometryLibrary.computePositions(c,y,f,e,!1),y)},function(i,n){return e.defined(n)&&(i=C.unpack(i,n)),i._ellipsoid=t.Ellipsoid.clone(i._ellipsoid),C.createGeometry(i)}}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./Matrix2-66622085","./Transforms-b1441a66","./ComponentDatatype-dd0b58d1","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryInstance-c620c48b","./GeometryOffsetAttribute-b6810db4","./GeometryPipeline-fafdd6b1","./IndexDatatype-eddea9c9","./Math-8e567554","./PolygonPipeline-7de38ba5","./RectangleGeometryLibrary-d62cc89b","./VertexFormat-848ec33d","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc","./EllipsoidRhumbLine-1dd98535"],(function(t,e,n,a,o,r,i,s,l,u,c,m,d,p,g,y,f,h,b,_,A,x,w){"use strict";const C=new e.Cartesian3,v=new e.Cartesian3,R=new e.Cartesian3,E=new e.Cartesian3,G=new n.Rectangle,F=new n.Cartesian2,P=new a.BoundingSphere,V=new a.BoundingSphere;function L(t,e){const n=new r.Geometry({attributes:new i.GeometryAttributes,primitiveType:r.PrimitiveType.TRIANGLES});return n.attributes.position=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}const D=new e.Cartesian3,M=new e.Cartesian3;function T(t,n){const a=t._vertexFormat,i=t._ellipsoid,s=n.height,l=n.width,u=n.northCap,m=n.southCap;let d=0,g=s,y=s,f=0;u&&(d=1,y-=1,f+=1),m&&(g-=1,y-=1,f+=1),f+=l*y;const h=a.position?new Float64Array(3*f):void 0,b=a.st?new Float32Array(2*f):void 0;let _=0,A=0;const x=C,w=F;let G=Number.MAX_VALUE,P=Number.MAX_VALUE,V=-Number.MAX_VALUE,D=-Number.MAX_VALUE;for(let t=d;t<g;++t)for(let e=0;e<l;++e)p.RectangleGeometryLibrary.computePosition(n,i,a.st,t,e,x,w),h[_++]=x.x,h[_++]=x.y,h[_++]=x.z,a.st&&(b[A++]=w.x,b[A++]=w.y,G=Math.min(G,w.x),P=Math.min(P,w.y),V=Math.max(V,w.x),D=Math.max(D,w.y));if(u&&(p.RectangleGeometryLibrary.computePosition(n,i,a.st,0,0,x,w),h[_++]=x.x,h[_++]=x.y,h[_++]=x.z,a.st&&(b[A++]=w.x,b[A++]=w.y,G=w.x,P=w.y,V=w.x,D=w.y)),m&&(p.RectangleGeometryLibrary.computePosition(n,i,a.st,s-1,0,x,w),h[_++]=x.x,h[_++]=x.y,h[_]=x.z,a.st&&(b[A++]=w.x,b[A]=w.y,G=Math.min(G,w.x),P=Math.min(P,w.y),V=Math.max(V,w.x),D=Math.max(D,w.y))),a.st&&(G<0||P<0||V>1||D>1))for(let t=0;t<b.length;t+=2)b[t]=(b[t]-G)/(V-G),b[t+1]=(b[t+1]-P)/(D-P);const M=function(t,n,a,o){const r=t.length,i=n.normal?new Float32Array(r):void 0,s=n.tangent?new Float32Array(r):void 0,l=n.bitangent?new Float32Array(r):void 0;let u=0;const c=E,m=R;let d=v;if(n.normal||n.tangent||n.bitangent)for(let p=0;p<r;p+=3){const r=e.Cartesian3.fromArray(t,p,C),g=u+1,y=u+2;d=a.geodeticSurfaceNormal(r,d),(n.tangent||n.bitangent)&&(e.Cartesian3.cross(e.Cartesian3.UNIT_Z,d,m),e.Matrix3.multiplyByVector(o,m,m),e.Cartesian3.normalize(m,m),n.bitangent&&e.Cartesian3.normalize(e.Cartesian3.cross(d,m,c),c)),n.normal&&(i[u]=d.x,i[g]=d.y,i[y]=d.z),n.tangent&&(s[u]=m.x,s[g]=m.y,s[y]=m.z),n.bitangent&&(l[u]=c.x,l[g]=c.y,l[y]=c.z),u+=3}return L(n,{positions:t,normals:i,tangents:s,bitangents:l})}(h,a,i,n.tangentRotationMatrix);let T=6*(l-1)*(y-1);u&&(T+=3*(l-1)),m&&(T+=3*(l-1));const O=c.IndexDatatype.createTypedArray(f,T);let N,S=0,I=0;for(N=0;N<y-1;++N){for(let t=0;t<l-1;++t){const t=S,e=t+l,n=e+1,a=t+1;O[I++]=t,O[I++]=e,O[I++]=a,O[I++]=a,O[I++]=e,O[I++]=n,++S}++S}if(u||m){let t=f-1;const e=f-1;let n,a;if(u&&m&&(t=f-2),S=0,u)for(N=0;N<l-1;N++)n=S,a=n+1,O[I++]=t,O[I++]=n,O[I++]=a,++S;if(m)for(S=(y-1)*l,N=0;N<l-1;N++)n=S,a=n+1,O[I++]=n,O[I++]=e,O[I++]=a,++S}return M.indices=O,a.st&&(M.attributes.st=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:b})),M}function O(t,e,n,a,o){return t[e++]=a[n],t[e++]=a[n+1],t[e++]=a[n+2],t[e++]=o[n],t[e++]=o[n+1],t[e]=o[n+2],t}function N(t,e,n,a){return t[e++]=a[n],t[e++]=a[n+1],t[e++]=a[n],t[e]=a[n+1],t}const S=new g.VertexFormat;function I(n,a){const i=n._shadowVolume,p=n._offsetAttribute,y=n._vertexFormat,f=n._extrudedHeight,h=n._surfaceHeight,b=n._ellipsoid,_=a.height,A=a.width;let x;if(i){const t=g.VertexFormat.clone(y,S);t.normal=!0,n._vertexFormat=t}const w=T(n,a);i&&(n._vertexFormat=y);let G=d.PolygonPipeline.scaleToGeodeticHeight(w.attributes.position.values,h,b,!1);G=new Float64Array(G);let F=G.length;const P=2*F,V=new Float64Array(P);V.set(G);const I=d.PolygonPipeline.scaleToGeodeticHeight(w.attributes.position.values,f,b);V.set(I,F),w.attributes.position.values=V;const k=y.normal?new Float32Array(P):void 0,H=y.tangent?new Float32Array(P):void 0,z=y.bitangent?new Float32Array(P):void 0,B=y.st?new Float32Array(P/3*2):void 0;let U,Y,q;if(y.normal){for(Y=w.attributes.normal.values,k.set(Y),x=0;x<F;x++)Y[x]=-Y[x];k.set(Y,F),w.attributes.normal.values=k}if(i){Y=w.attributes.normal.values,y.normal||(w.attributes.normal=void 0);const t=new Float32Array(P);for(x=0;x<F;x++)Y[x]=-Y[x];t.set(Y,F),w.attributes.extrudeDirection=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}const X=t.defined(p);if(X){const t=F/3*2;let e=new Uint8Array(t);p===l.GeometryOffsetAttribute.TOP?e=e.fill(1,0,t/2):(q=p===l.GeometryOffsetAttribute.NONE?0:1,e=e.fill(q)),w.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}if(y.tangent){const t=w.attributes.tangent.values;for(H.set(t),x=0;x<F;x++)t[x]=-t[x];H.set(t,F),w.attributes.tangent.values=H}if(y.bitangent){const t=w.attributes.bitangent.values;z.set(t),z.set(t,F),w.attributes.bitangent.values=z}y.st&&(U=w.attributes.st.values,B.set(U),B.set(U,F/3*2),w.attributes.st.values=B);const Q=w.indices,W=Q.length,J=F/3,j=c.IndexDatatype.createTypedArray(P/3,2*W);for(j.set(Q),x=0;x<W;x+=3)j[x+W]=Q[x+2]+J,j[x+1+W]=Q[x+1]+J,j[x+2+W]=Q[x]+J;w.indices=j;const Z=a.northCap,K=a.southCap;let $=_,tt=2,et=0,nt=4,at=4;Z&&(tt-=1,$-=1,et+=1,nt-=2,at-=1),K&&(tt-=1,$-=1,et+=1,nt-=2,at-=1),et+=tt*A+2*$-nt;const ot=2*(et+at);let rt=new Float64Array(3*ot);const it=i?new Float32Array(3*ot):void 0;let st=X?new Uint8Array(ot):void 0,lt=y.st?new Float32Array(2*ot):void 0;const ut=p===l.GeometryOffsetAttribute.TOP;X&&!ut&&(q=p===l.GeometryOffsetAttribute.ALL?1:0,st=st.fill(q));let ct=0,mt=0,dt=0,pt=0;const gt=A*$;let yt;for(x=0;x<gt;x+=A)yt=3*x,rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*x,U),mt+=4),i&&(dt+=3,it[dt++]=Y[yt],it[dt++]=Y[yt+1],it[dt++]=Y[yt+2]),ut&&(st[pt++]=1,pt+=1);if(K){const t=Z?gt+1:gt;for(yt=3*t,x=0;x<2;x++)rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*t,U),mt+=4),i&&(dt+=3,it[dt++]=Y[yt],it[dt++]=Y[yt+1],it[dt++]=Y[yt+2]),ut&&(st[pt++]=1,pt+=1)}else for(x=gt-A;x<gt;x++)yt=3*x,rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*x,U),mt+=4),i&&(dt+=3,it[dt++]=Y[yt],it[dt++]=Y[yt+1],it[dt++]=Y[yt+2]),ut&&(st[pt++]=1,pt+=1);for(x=gt-1;x>0;x-=A)yt=3*x,rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*x,U),mt+=4),i&&(dt+=3,it[dt++]=Y[yt],it[dt++]=Y[yt+1],it[dt++]=Y[yt+2]),ut&&(st[pt++]=1,pt+=1);if(Z){const t=gt;for(yt=3*t,x=0;x<2;x++)rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*t,U),mt+=4),i&&(dt+=3,it[dt++]=Y[yt],it[dt++]=Y[yt+1],it[dt++]=Y[yt+2]),ut&&(st[pt++]=1,pt+=1)}else for(x=A-1;x>=0;x--)yt=3*x,rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*x,U),mt+=4),i&&(dt+=3,it[dt++]=Y[yt],it[dt++]=Y[yt+1],it[dt++]=Y[yt+2]),ut&&(st[pt++]=1,pt+=1);let ft=function(t,n,a){const o=t.length,r=n.normal?new Float32Array(o):void 0,i=n.tangent?new Float32Array(o):void 0,s=n.bitangent?new Float32Array(o):void 0;let l=0,u=0,c=0,d=!0,p=E,g=R,y=v;if(n.normal||n.tangent||n.bitangent)for(let f=0;f<o;f+=6){const h=e.Cartesian3.fromArray(t,f,C),b=e.Cartesian3.fromArray(t,(f+6)%o,D);if(d){const n=e.Cartesian3.fromArray(t,(f+3)%o,M);e.Cartesian3.subtract(b,h,b),e.Cartesian3.subtract(n,h,n),y=e.Cartesian3.normalize(e.Cartesian3.cross(n,b,y),y),d=!1}e.Cartesian3.equalsEpsilon(b,h,m.CesiumMath.EPSILON10)&&(d=!0),(n.tangent||n.bitangent)&&(p=a.geodeticSurfaceNormal(h,p),n.tangent&&(g=e.Cartesian3.normalize(e.Cartesian3.cross(p,y,g),g))),n.normal&&(r[l++]=y.x,r[l++]=y.y,r[l++]=y.z,r[l++]=y.x,r[l++]=y.y,r[l++]=y.z),n.tangent&&(i[u++]=g.x,i[u++]=g.y,i[u++]=g.z,i[u++]=g.x,i[u++]=g.y,i[u++]=g.z),n.bitangent&&(s[c++]=p.x,s[c++]=p.y,s[c++]=p.z,s[c++]=p.x,s[c++]=p.y,s[c++]=p.z)}return L(n,{positions:t,normals:r,tangents:i,bitangents:s})}(rt,y,b);y.st&&(ft.attributes.st=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:lt})),i&&(ft.attributes.extrudeDirection=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:it})),X&&(ft.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:st}));const ht=c.IndexDatatype.createTypedArray(ot,6*et);let bt,_t,At,xt;F=rt.length/3;let wt=0;for(x=0;x<F-1;x+=2){bt=x,xt=(bt+2)%F;const t=e.Cartesian3.fromArray(rt,3*bt,D),n=e.Cartesian3.fromArray(rt,3*xt,M);e.Cartesian3.equalsEpsilon(t,n,m.CesiumMath.EPSILON10)||(_t=(bt+1)%F,At=(_t+2)%F,ht[wt++]=bt,ht[wt++]=_t,ht[wt++]=xt,ht[wt++]=xt,ht[wt++]=_t,ht[wt++]=At)}return ft.indices=ht,ft=u.GeometryPipeline.combineInstances([new s.GeometryInstance({geometry:w}),new s.GeometryInstance({geometry:ft})]),ft[0]}const k=[new e.Cartesian3,new e.Cartesian3,new e.Cartesian3,new e.Cartesian3],H=new e.Cartographic,z=new e.Cartographic;function B(t,e,a,o,r){if(0===a)return n.Rectangle.clone(t,r);const i=p.RectangleGeometryLibrary.computeOptions(t,e,a,0,G,H),s=i.height,l=i.width,u=k;return p.RectangleGeometryLibrary.computePosition(i,o,!1,0,0,u[0]),p.RectangleGeometryLibrary.computePosition(i,o,!1,0,l-1,u[1]),p.RectangleGeometryLibrary.computePosition(i,o,!1,s-1,0,u[2]),p.RectangleGeometryLibrary.computePosition(i,o,!1,s-1,l-1,u[3]),n.Rectangle.fromCartesianArray(u,o,r)}function U(a){const o=(a=t.defaultValue(a,t.defaultValue.EMPTY_OBJECT)).rectangle,r=t.defaultValue(a.height,0),i=t.defaultValue(a.extrudedHeight,r);this._rectangle=n.Rectangle.clone(o),this._granularity=t.defaultValue(a.granularity,m.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=e.Ellipsoid.clone(t.defaultValue(a.ellipsoid,e.Ellipsoid.WGS84)),this._surfaceHeight=Math.max(r,i),this._rotation=t.defaultValue(a.rotation,0),this._stRotation=t.defaultValue(a.stRotation,0),this._vertexFormat=g.VertexFormat.clone(t.defaultValue(a.vertexFormat,g.VertexFormat.DEFAULT)),this._extrudedHeight=Math.min(r,i),this._shadowVolume=t.defaultValue(a.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=a.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}U.packedLength=n.Rectangle.packedLength+e.Ellipsoid.packedLength+g.VertexFormat.packedLength+7,U.pack=function(a,o,r){return r=t.defaultValue(r,0),n.Rectangle.pack(a._rectangle,o,r),r+=n.Rectangle.packedLength,e.Ellipsoid.pack(a._ellipsoid,o,r),r+=e.Ellipsoid.packedLength,g.VertexFormat.pack(a._vertexFormat,o,r),r+=g.VertexFormat.packedLength,o[r++]=a._granularity,o[r++]=a._surfaceHeight,o[r++]=a._rotation,o[r++]=a._stRotation,o[r++]=a._extrudedHeight,o[r++]=a._shadowVolume?1:0,o[r]=t.defaultValue(a._offsetAttribute,-1),o};const Y=new n.Rectangle,q=e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),X={rectangle:Y,ellipsoid:q,vertexFormat:S,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};U.unpack=function(a,o,r){o=t.defaultValue(o,0);const i=n.Rectangle.unpack(a,o,Y);o+=n.Rectangle.packedLength;const s=e.Ellipsoid.unpack(a,o,q);o+=e.Ellipsoid.packedLength;const l=g.VertexFormat.unpack(a,o,S);o+=g.VertexFormat.packedLength;const u=a[o++],c=a[o++],m=a[o++],d=a[o++],p=a[o++],y=1===a[o++],f=a[o];return t.defined(r)?(r._rectangle=n.Rectangle.clone(i,r._rectangle),r._ellipsoid=e.Ellipsoid.clone(s,r._ellipsoid),r._vertexFormat=g.VertexFormat.clone(l,r._vertexFormat),r._granularity=u,r._surfaceHeight=c,r._rotation=m,r._stRotation=d,r._extrudedHeight=p,r._shadowVolume=y,r._offsetAttribute=-1===f?void 0:f,r):(X.granularity=u,X.height=c,X.rotation=m,X.stRotation=d,X.extrudedHeight=p,X.shadowVolume=y,X.offsetAttribute=-1===f?void 0:f,new U(X))},U.computeRectangle=function(n,a){const o=(n=t.defaultValue(n,t.defaultValue.EMPTY_OBJECT)).rectangle,r=t.defaultValue(n.granularity,m.CesiumMath.RADIANS_PER_DEGREE),i=t.defaultValue(n.ellipsoid,e.Ellipsoid.WGS84);return B(o,r,t.defaultValue(n.rotation,0),i,a)};const Q=new e.Matrix3,W=new a.Quaternion,J=new e.Cartographic;U.createGeometry=function(i){if(m.CesiumMath.equalsEpsilon(i._rectangle.north,i._rectangle.south,m.CesiumMath.EPSILON10)||m.CesiumMath.equalsEpsilon(i._rectangle.east,i._rectangle.west,m.CesiumMath.EPSILON10))return;let s=i._rectangle;const u=i._ellipsoid,c=i._rotation,g=i._stRotation,y=i._vertexFormat,f=p.RectangleGeometryLibrary.computeOptions(s,i._granularity,c,g,G,H,z),h=Q;if(0!==g||0!==c){const t=n.Rectangle.center(s,J),o=u.geodeticSurfaceNormalCartographic(t,D);a.Quaternion.fromAxisAngle(o,-g,W),e.Matrix3.fromQuaternion(W,h)}else e.Matrix3.clone(e.Matrix3.IDENTITY,h);const b=i._surfaceHeight,_=i._extrudedHeight,A=!m.CesiumMath.equalsEpsilon(b,_,0,m.CesiumMath.EPSILON2);let x,w;if(f.lonScalar=1/i._rectangle.width,f.latScalar=1/i._rectangle.height,f.tangentRotationMatrix=h,s=i._rectangle,A){x=I(i,f);const t=a.BoundingSphere.fromRectangle3D(s,u,b,V),e=a.BoundingSphere.fromRectangle3D(s,u,_,P);w=a.BoundingSphere.union(t,e)}else{if(x=T(i,f),x.attributes.position.values=d.PolygonPipeline.scaleToGeodeticHeight(x.attributes.position.values,b,u,!1),t.defined(i._offsetAttribute)){const t=x.attributes.position.values.length,e=i._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1,n=new Uint8Array(t/3).fill(e);x.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}w=a.BoundingSphere.fromRectangle3D(s,u,b)}return y.position||delete x.attributes.position,new r.Geometry({attributes:x.attributes,indices:x.indices,primitiveType:x.primitiveType,boundingSphere:w,offsetAttribute:i._offsetAttribute})},U.createShadowVolume=function(t,e,n){const a=t._granularity,o=t._ellipsoid,r=e(a,o),i=n(a,o);return new U({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:o,stRotation:t._stRotation,granularity:a,extrudedHeight:i,height:r,vertexFormat:g.VertexFormat.POSITION_ONLY,shadowVolume:!0})};const j=new n.Rectangle,Z=[new n.Cartesian2,new n.Cartesian2,new n.Cartesian2],K=new n.Matrix2,$=new e.Cartographic;return Object.defineProperties(U.prototype,{rectangle:{get:function(){return t.defined(this._rotatedRectangle)||(this._rotatedRectangle=B(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return t.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){if(0===t._stRotation)return[0,0,0,1,1,0];const e=n.Rectangle.clone(t._rectangle,j),a=t._granularity,o=t._ellipsoid,r=B(e,a,t._rotation-t._stRotation,o,j),i=Z;i[0].x=r.west,i[0].y=r.south,i[1].x=r.west,i[1].y=r.north,i[2].x=r.east,i[2].y=r.south;const s=t.rectangle,l=n.Matrix2.fromRotation(t._stRotation,K),u=n.Rectangle.center(s,$);for(let t=0;t<3;++t){const e=i[t];e.x-=u.longitude,e.y-=u.latitude,n.Matrix2.multiplyByVector(l,e,e),e.x+=u.longitude,e.y+=u.latitude,e.x=(e.x-s.west)/s.width,e.y=(e.y-s.south)/s.height}const c=i[0],m=i[1],d=i[2],p=new Array(6);return n.Cartesian2.pack(c,p),n.Cartesian2.pack(m,p,2),n.Cartesian2.pack(d,p,4),p}(this)),this._textureCoordinateRotationPoints}}}),function(a,o){return t.defined(o)&&(a=U.unpack(a,o)),a._ellipsoid=e.Ellipsoid.clone(a._ellipsoid),a._rectangle=n.Rectangle.clone(a._rectangle),U.createGeometry(a)}}));
define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./Matrix2-66622085","./Transforms-b7f686a8","./ComponentDatatype-dd0b58d1","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryInstance-c620c48b","./GeometryOffsetAttribute-b6810db4","./GeometryPipeline-c180ffdb","./IndexDatatype-eddea9c9","./Math-8e567554","./PolygonPipeline-f56a8ec5","./RectangleGeometryLibrary-f1f036f8","./VertexFormat-848ec33d","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./AttributeCompression-5fa81749","./EncodedCartesian3-f2554a3b","./IntersectionTests-7d927f09","./Plane-6aee7ffc","./EllipsoidRhumbLine-1dd98535"],(function(t,e,n,a,o,r,i,s,l,u,c,m,d,p,g,y,f,h,b,_,A,x,w){"use strict";const C=new e.Cartesian3,v=new e.Cartesian3,R=new e.Cartesian3,E=new e.Cartesian3,G=new n.Rectangle,F=new n.Cartesian2,P=new a.BoundingSphere,V=new a.BoundingSphere;function L(t,e){const n=new r.Geometry({attributes:new i.GeometryAttributes,primitiveType:r.PrimitiveType.TRIANGLES});return n.attributes.position=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}const D=new e.Cartesian3,M=new e.Cartesian3;function T(t,n){const a=t._vertexFormat,i=t._ellipsoid,s=n.height,l=n.width,u=n.northCap,m=n.southCap;let d=0,g=s,y=s,f=0;u&&(d=1,y-=1,f+=1),m&&(g-=1,y-=1,f+=1),f+=l*y;const h=a.position?new Float64Array(3*f):void 0,b=a.st?new Float32Array(2*f):void 0;let _=0,A=0;const x=C,w=F;let G=Number.MAX_VALUE,P=Number.MAX_VALUE,V=-Number.MAX_VALUE,D=-Number.MAX_VALUE;for(let t=d;t<g;++t)for(let e=0;e<l;++e)p.RectangleGeometryLibrary.computePosition(n,i,a.st,t,e,x,w),h[_++]=x.x,h[_++]=x.y,h[_++]=x.z,a.st&&(b[A++]=w.x,b[A++]=w.y,G=Math.min(G,w.x),P=Math.min(P,w.y),V=Math.max(V,w.x),D=Math.max(D,w.y));if(u&&(p.RectangleGeometryLibrary.computePosition(n,i,a.st,0,0,x,w),h[_++]=x.x,h[_++]=x.y,h[_++]=x.z,a.st&&(b[A++]=w.x,b[A++]=w.y,G=w.x,P=w.y,V=w.x,D=w.y)),m&&(p.RectangleGeometryLibrary.computePosition(n,i,a.st,s-1,0,x,w),h[_++]=x.x,h[_++]=x.y,h[_]=x.z,a.st&&(b[A++]=w.x,b[A]=w.y,G=Math.min(G,w.x),P=Math.min(P,w.y),V=Math.max(V,w.x),D=Math.max(D,w.y))),a.st&&(G<0||P<0||V>1||D>1))for(let t=0;t<b.length;t+=2)b[t]=(b[t]-G)/(V-G),b[t+1]=(b[t+1]-P)/(D-P);const M=function(t,n,a,o){const r=t.length,i=n.normal?new Float32Array(r):void 0,s=n.tangent?new Float32Array(r):void 0,l=n.bitangent?new Float32Array(r):void 0;let u=0;const c=E,m=R;let d=v;if(n.normal||n.tangent||n.bitangent)for(let p=0;p<r;p+=3){const r=e.Cartesian3.fromArray(t,p,C),g=u+1,y=u+2;d=a.geodeticSurfaceNormal(r,d),(n.tangent||n.bitangent)&&(e.Cartesian3.cross(e.Cartesian3.UNIT_Z,d,m),e.Matrix3.multiplyByVector(o,m,m),e.Cartesian3.normalize(m,m),n.bitangent&&e.Cartesian3.normalize(e.Cartesian3.cross(d,m,c),c)),n.normal&&(i[u]=d.x,i[g]=d.y,i[y]=d.z),n.tangent&&(s[u]=m.x,s[g]=m.y,s[y]=m.z),n.bitangent&&(l[u]=c.x,l[g]=c.y,l[y]=c.z),u+=3}return L(n,{positions:t,normals:i,tangents:s,bitangents:l})}(h,a,i,n.tangentRotationMatrix);let T=6*(l-1)*(y-1);u&&(T+=3*(l-1)),m&&(T+=3*(l-1));const O=c.IndexDatatype.createTypedArray(f,T);let N,S=0,I=0;for(N=0;N<y-1;++N){for(let t=0;t<l-1;++t){const t=S,e=t+l,n=e+1,a=t+1;O[I++]=t,O[I++]=e,O[I++]=a,O[I++]=a,O[I++]=e,O[I++]=n,++S}++S}if(u||m){let t=f-1;const e=f-1;let n,a;if(u&&m&&(t=f-2),S=0,u)for(N=0;N<l-1;N++)n=S,a=n+1,O[I++]=t,O[I++]=n,O[I++]=a,++S;if(m)for(S=(y-1)*l,N=0;N<l-1;N++)n=S,a=n+1,O[I++]=n,O[I++]=e,O[I++]=a,++S}return M.indices=O,a.st&&(M.attributes.st=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:b})),M}function O(t,e,n,a,o){return t[e++]=a[n],t[e++]=a[n+1],t[e++]=a[n+2],t[e++]=o[n],t[e++]=o[n+1],t[e]=o[n+2],t}function N(t,e,n,a){return t[e++]=a[n],t[e++]=a[n+1],t[e++]=a[n],t[e]=a[n+1],t}const S=new g.VertexFormat;function I(n,a){const i=n._shadowVolume,p=n._offsetAttribute,y=n._vertexFormat,f=n._extrudedHeight,h=n._surfaceHeight,b=n._ellipsoid,_=a.height,A=a.width;let x;if(i){const t=g.VertexFormat.clone(y,S);t.normal=!0,n._vertexFormat=t}const w=T(n,a);i&&(n._vertexFormat=y);let G=d.PolygonPipeline.scaleToGeodeticHeight(w.attributes.position.values,h,b,!1);G=new Float64Array(G);let F=G.length;const P=2*F,V=new Float64Array(P);V.set(G);const I=d.PolygonPipeline.scaleToGeodeticHeight(w.attributes.position.values,f,b);V.set(I,F),w.attributes.position.values=V;const k=y.normal?new Float32Array(P):void 0,H=y.tangent?new Float32Array(P):void 0,z=y.bitangent?new Float32Array(P):void 0,B=y.st?new Float32Array(P/3*2):void 0;let U,Y,q;if(y.normal){for(Y=w.attributes.normal.values,k.set(Y),x=0;x<F;x++)Y[x]=-Y[x];k.set(Y,F),w.attributes.normal.values=k}if(i){Y=w.attributes.normal.values,y.normal||(w.attributes.normal=void 0);const t=new Float32Array(P);for(x=0;x<F;x++)Y[x]=-Y[x];t.set(Y,F),w.attributes.extrudeDirection=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}const X=t.defined(p);if(X){const t=F/3*2;let e=new Uint8Array(t);p===l.GeometryOffsetAttribute.TOP?e=e.fill(1,0,t/2):(q=p===l.GeometryOffsetAttribute.NONE?0:1,e=e.fill(q)),w.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}if(y.tangent){const t=w.attributes.tangent.values;for(H.set(t),x=0;x<F;x++)t[x]=-t[x];H.set(t,F),w.attributes.tangent.values=H}if(y.bitangent){const t=w.attributes.bitangent.values;z.set(t),z.set(t,F),w.attributes.bitangent.values=z}y.st&&(U=w.attributes.st.values,B.set(U),B.set(U,F/3*2),w.attributes.st.values=B);const Q=w.indices,W=Q.length,J=F/3,j=c.IndexDatatype.createTypedArray(P/3,2*W);for(j.set(Q),x=0;x<W;x+=3)j[x+W]=Q[x+2]+J,j[x+1+W]=Q[x+1]+J,j[x+2+W]=Q[x]+J;w.indices=j;const Z=a.northCap,K=a.southCap;let $=_,tt=2,et=0,nt=4,at=4;Z&&(tt-=1,$-=1,et+=1,nt-=2,at-=1),K&&(tt-=1,$-=1,et+=1,nt-=2,at-=1),et+=tt*A+2*$-nt;const ot=2*(et+at);let rt=new Float64Array(3*ot);const it=i?new Float32Array(3*ot):void 0;let st=X?new Uint8Array(ot):void 0,lt=y.st?new Float32Array(2*ot):void 0;const ut=p===l.GeometryOffsetAttribute.TOP;X&&!ut&&(q=p===l.GeometryOffsetAttribute.ALL?1:0,st=st.fill(q));let ct=0,mt=0,dt=0,pt=0;const gt=A*$;let yt;for(x=0;x<gt;x+=A)yt=3*x,rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*x,U),mt+=4),i&&(dt+=3,it[dt++]=Y[yt],it[dt++]=Y[yt+1],it[dt++]=Y[yt+2]),ut&&(st[pt++]=1,pt+=1);if(K){const t=Z?gt+1:gt;for(yt=3*t,x=0;x<2;x++)rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*t,U),mt+=4),i&&(dt+=3,it[dt++]=Y[yt],it[dt++]=Y[yt+1],it[dt++]=Y[yt+2]),ut&&(st[pt++]=1,pt+=1)}else for(x=gt-A;x<gt;x++)yt=3*x,rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*x,U),mt+=4),i&&(dt+=3,it[dt++]=Y[yt],it[dt++]=Y[yt+1],it[dt++]=Y[yt+2]),ut&&(st[pt++]=1,pt+=1);for(x=gt-1;x>0;x-=A)yt=3*x,rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*x,U),mt+=4),i&&(dt+=3,it[dt++]=Y[yt],it[dt++]=Y[yt+1],it[dt++]=Y[yt+2]),ut&&(st[pt++]=1,pt+=1);if(Z){const t=gt;for(yt=3*t,x=0;x<2;x++)rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*t,U),mt+=4),i&&(dt+=3,it[dt++]=Y[yt],it[dt++]=Y[yt+1],it[dt++]=Y[yt+2]),ut&&(st[pt++]=1,pt+=1)}else for(x=A-1;x>=0;x--)yt=3*x,rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*x,U),mt+=4),i&&(dt+=3,it[dt++]=Y[yt],it[dt++]=Y[yt+1],it[dt++]=Y[yt+2]),ut&&(st[pt++]=1,pt+=1);let ft=function(t,n,a){const o=t.length,r=n.normal?new Float32Array(o):void 0,i=n.tangent?new Float32Array(o):void 0,s=n.bitangent?new Float32Array(o):void 0;let l=0,u=0,c=0,d=!0,p=E,g=R,y=v;if(n.normal||n.tangent||n.bitangent)for(let f=0;f<o;f+=6){const h=e.Cartesian3.fromArray(t,f,C),b=e.Cartesian3.fromArray(t,(f+6)%o,D);if(d){const n=e.Cartesian3.fromArray(t,(f+3)%o,M);e.Cartesian3.subtract(b,h,b),e.Cartesian3.subtract(n,h,n),y=e.Cartesian3.normalize(e.Cartesian3.cross(n,b,y),y),d=!1}e.Cartesian3.equalsEpsilon(b,h,m.CesiumMath.EPSILON10)&&(d=!0),(n.tangent||n.bitangent)&&(p=a.geodeticSurfaceNormal(h,p),n.tangent&&(g=e.Cartesian3.normalize(e.Cartesian3.cross(p,y,g),g))),n.normal&&(r[l++]=y.x,r[l++]=y.y,r[l++]=y.z,r[l++]=y.x,r[l++]=y.y,r[l++]=y.z),n.tangent&&(i[u++]=g.x,i[u++]=g.y,i[u++]=g.z,i[u++]=g.x,i[u++]=g.y,i[u++]=g.z),n.bitangent&&(s[c++]=p.x,s[c++]=p.y,s[c++]=p.z,s[c++]=p.x,s[c++]=p.y,s[c++]=p.z)}return L(n,{positions:t,normals:r,tangents:i,bitangents:s})}(rt,y,b);y.st&&(ft.attributes.st=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:lt})),i&&(ft.attributes.extrudeDirection=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:it})),X&&(ft.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:st}));const ht=c.IndexDatatype.createTypedArray(ot,6*et);let bt,_t,At,xt;F=rt.length/3;let wt=0;for(x=0;x<F-1;x+=2){bt=x,xt=(bt+2)%F;const t=e.Cartesian3.fromArray(rt,3*bt,D),n=e.Cartesian3.fromArray(rt,3*xt,M);e.Cartesian3.equalsEpsilon(t,n,m.CesiumMath.EPSILON10)||(_t=(bt+1)%F,At=(_t+2)%F,ht[wt++]=bt,ht[wt++]=_t,ht[wt++]=xt,ht[wt++]=xt,ht[wt++]=_t,ht[wt++]=At)}return ft.indices=ht,ft=u.GeometryPipeline.combineInstances([new s.GeometryInstance({geometry:w}),new s.GeometryInstance({geometry:ft})]),ft[0]}const k=[new e.Cartesian3,new e.Cartesian3,new e.Cartesian3,new e.Cartesian3],H=new e.Cartographic,z=new e.Cartographic;function B(t,e,a,o,r){if(0===a)return n.Rectangle.clone(t,r);const i=p.RectangleGeometryLibrary.computeOptions(t,e,a,0,G,H),s=i.height,l=i.width,u=k;return p.RectangleGeometryLibrary.computePosition(i,o,!1,0,0,u[0]),p.RectangleGeometryLibrary.computePosition(i,o,!1,0,l-1,u[1]),p.RectangleGeometryLibrary.computePosition(i,o,!1,s-1,0,u[2]),p.RectangleGeometryLibrary.computePosition(i,o,!1,s-1,l-1,u[3]),n.Rectangle.fromCartesianArray(u,o,r)}function U(a){const o=(a=t.defaultValue(a,t.defaultValue.EMPTY_OBJECT)).rectangle,r=t.defaultValue(a.height,0),i=t.defaultValue(a.extrudedHeight,r);this._rectangle=n.Rectangle.clone(o),this._granularity=t.defaultValue(a.granularity,m.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=e.Ellipsoid.clone(t.defaultValue(a.ellipsoid,e.Ellipsoid.WGS84)),this._surfaceHeight=Math.max(r,i),this._rotation=t.defaultValue(a.rotation,0),this._stRotation=t.defaultValue(a.stRotation,0),this._vertexFormat=g.VertexFormat.clone(t.defaultValue(a.vertexFormat,g.VertexFormat.DEFAULT)),this._extrudedHeight=Math.min(r,i),this._shadowVolume=t.defaultValue(a.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=a.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}U.packedLength=n.Rectangle.packedLength+e.Ellipsoid.packedLength+g.VertexFormat.packedLength+7,U.pack=function(a,o,r){return r=t.defaultValue(r,0),n.Rectangle.pack(a._rectangle,o,r),r+=n.Rectangle.packedLength,e.Ellipsoid.pack(a._ellipsoid,o,r),r+=e.Ellipsoid.packedLength,g.VertexFormat.pack(a._vertexFormat,o,r),r+=g.VertexFormat.packedLength,o[r++]=a._granularity,o[r++]=a._surfaceHeight,o[r++]=a._rotation,o[r++]=a._stRotation,o[r++]=a._extrudedHeight,o[r++]=a._shadowVolume?1:0,o[r]=t.defaultValue(a._offsetAttribute,-1),o};const Y=new n.Rectangle,q=e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),X={rectangle:Y,ellipsoid:q,vertexFormat:S,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};U.unpack=function(a,o,r){o=t.defaultValue(o,0);const i=n.Rectangle.unpack(a,o,Y);o+=n.Rectangle.packedLength;const s=e.Ellipsoid.unpack(a,o,q);o+=e.Ellipsoid.packedLength;const l=g.VertexFormat.unpack(a,o,S);o+=g.VertexFormat.packedLength;const u=a[o++],c=a[o++],m=a[o++],d=a[o++],p=a[o++],y=1===a[o++],f=a[o];return t.defined(r)?(r._rectangle=n.Rectangle.clone(i,r._rectangle),r._ellipsoid=e.Ellipsoid.clone(s,r._ellipsoid),r._vertexFormat=g.VertexFormat.clone(l,r._vertexFormat),r._granularity=u,r._surfaceHeight=c,r._rotation=m,r._stRotation=d,r._extrudedHeight=p,r._shadowVolume=y,r._offsetAttribute=-1===f?void 0:f,r):(X.granularity=u,X.height=c,X.rotation=m,X.stRotation=d,X.extrudedHeight=p,X.shadowVolume=y,X.offsetAttribute=-1===f?void 0:f,new U(X))},U.computeRectangle=function(n,a){const o=(n=t.defaultValue(n,t.defaultValue.EMPTY_OBJECT)).rectangle,r=t.defaultValue(n.granularity,m.CesiumMath.RADIANS_PER_DEGREE),i=t.defaultValue(n.ellipsoid,e.Ellipsoid.WGS84);return B(o,r,t.defaultValue(n.rotation,0),i,a)};const Q=new e.Matrix3,W=new a.Quaternion,J=new e.Cartographic;U.createGeometry=function(i){if(m.CesiumMath.equalsEpsilon(i._rectangle.north,i._rectangle.south,m.CesiumMath.EPSILON10)||m.CesiumMath.equalsEpsilon(i._rectangle.east,i._rectangle.west,m.CesiumMath.EPSILON10))return;let s=i._rectangle;const u=i._ellipsoid,c=i._rotation,g=i._stRotation,y=i._vertexFormat,f=p.RectangleGeometryLibrary.computeOptions(s,i._granularity,c,g,G,H,z),h=Q;if(0!==g||0!==c){const t=n.Rectangle.center(s,J),o=u.geodeticSurfaceNormalCartographic(t,D);a.Quaternion.fromAxisAngle(o,-g,W),e.Matrix3.fromQuaternion(W,h)}else e.Matrix3.clone(e.Matrix3.IDENTITY,h);const b=i._surfaceHeight,_=i._extrudedHeight,A=!m.CesiumMath.equalsEpsilon(b,_,0,m.CesiumMath.EPSILON2);let x,w;if(f.lonScalar=1/i._rectangle.width,f.latScalar=1/i._rectangle.height,f.tangentRotationMatrix=h,s=i._rectangle,A){x=I(i,f);const t=a.BoundingSphere.fromRectangle3D(s,u,b,V),e=a.BoundingSphere.fromRectangle3D(s,u,_,P);w=a.BoundingSphere.union(t,e)}else{if(x=T(i,f),x.attributes.position.values=d.PolygonPipeline.scaleToGeodeticHeight(x.attributes.position.values,b,u,!1),t.defined(i._offsetAttribute)){const t=x.attributes.position.values.length,e=i._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1,n=new Uint8Array(t/3).fill(e);x.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}w=a.BoundingSphere.fromRectangle3D(s,u,b)}return y.position||delete x.attributes.position,new r.Geometry({attributes:x.attributes,indices:x.indices,primitiveType:x.primitiveType,boundingSphere:w,offsetAttribute:i._offsetAttribute})},U.createShadowVolume=function(t,e,n){const a=t._granularity,o=t._ellipsoid,r=e(a,o),i=n(a,o);return new U({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:o,stRotation:t._stRotation,granularity:a,extrudedHeight:i,height:r,vertexFormat:g.VertexFormat.POSITION_ONLY,shadowVolume:!0})};const j=new n.Rectangle,Z=[new n.Cartesian2,new n.Cartesian2,new n.Cartesian2],K=new n.Matrix2,$=new e.Cartographic;return Object.defineProperties(U.prototype,{rectangle:{get:function(){return t.defined(this._rotatedRectangle)||(this._rotatedRectangle=B(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return t.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){if(0===t._stRotation)return[0,0,0,1,1,0];const e=n.Rectangle.clone(t._rectangle,j),a=t._granularity,o=t._ellipsoid,r=B(e,a,t._rotation-t._stRotation,o,j),i=Z;i[0].x=r.west,i[0].y=r.south,i[1].x=r.west,i[1].y=r.north,i[2].x=r.east,i[2].y=r.south;const s=t.rectangle,l=n.Matrix2.fromRotation(t._stRotation,K),u=n.Rectangle.center(s,$);for(let t=0;t<3;++t){const e=i[t];e.x-=u.longitude,e.y-=u.latitude,n.Matrix2.multiplyByVector(l,e,e),e.x+=u.longitude,e.y+=u.latitude,e.x=(e.x-s.west)/s.width,e.y=(e.y-s.south)/s.height}const c=i[0],m=i[1],d=i[2],p=new Array(6);return n.Cartesian2.pack(c,p),n.Cartesian2.pack(m,p,2),n.Cartesian2.pack(d,p,4),p}(this)),this._textureCoordinateRotationPoints}}}),function(a,o){return t.defined(o)&&(a=U.unpack(a,o)),a._ellipsoid=e.Ellipsoid.clone(a._ellipsoid),a._rectangle=n.Rectangle.clone(a._rectangle),U.createGeometry(a)}}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./Matrix2-66622085","./Transforms-b1441a66","./ComponentDatatype-dd0b58d1","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9","./Math-8e567554","./PolygonPipeline-7de38ba5","./RectangleGeometryLibrary-d62cc89b","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./EllipsoidRhumbLine-1dd98535"],(function(e,t,i,n,o,a,r,l,s,u,c,d,p,f,g,h){"use strict";const y=new n.BoundingSphere,b=new n.BoundingSphere,m=new t.Cartesian3,_=new i.Rectangle;function E(e,t){const i=e._ellipsoid,n=t.height,l=t.width,u=t.northCap,c=t.southCap;let p=n,f=2,g=0,h=4;u&&(f-=1,p-=1,g+=1,h-=2),c&&(f-=1,p-=1,g+=1,h-=2),g+=f*l+2*p-h;const y=new Float64Array(3*g);let b,_=0,E=0;const A=m;if(u)d.RectangleGeometryLibrary.computePosition(t,i,!1,E,0,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;else for(b=0;b<l;b++)d.RectangleGeometryLibrary.computePosition(t,i,!1,E,b,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;for(b=l-1,E=1;E<n;E++)d.RectangleGeometryLibrary.computePosition(t,i,!1,E,b,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;if(E=n-1,!c)for(b=l-2;b>=0;b--)d.RectangleGeometryLibrary.computePosition(t,i,!1,E,b,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;for(b=0,E=n-2;E>0;E--)d.RectangleGeometryLibrary.computePosition(t,i,!1,E,b,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;const G=y.length/3*2,R=s.IndexDatatype.createTypedArray(y.length/3,G);let P=0;for(let e=0;e<y.length/3-1;e++)R[P++]=e,R[P++]=e+1;R[P++]=y.length/3-1,R[P++]=0;const L=new a.Geometry({attributes:new r.GeometryAttributes,primitiveType:a.PrimitiveType.LINES});return L.attributes.position=new a.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:y}),L.indices=R,L}function A(n){const o=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).rectangle,a=e.defaultValue(n.granularity,u.CesiumMath.RADIANS_PER_DEGREE),r=e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84),l=e.defaultValue(n.rotation,0),s=e.defaultValue(n.height,0),c=e.defaultValue(n.extrudedHeight,s);this._rectangle=i.Rectangle.clone(o),this._granularity=a,this._ellipsoid=r,this._surfaceHeight=Math.max(s,c),this._rotation=l,this._extrudedHeight=Math.min(s,c),this._offsetAttribute=n.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}A.packedLength=i.Rectangle.packedLength+t.Ellipsoid.packedLength+5,A.pack=function(n,o,a){return a=e.defaultValue(a,0),i.Rectangle.pack(n._rectangle,o,a),a+=i.Rectangle.packedLength,t.Ellipsoid.pack(n._ellipsoid,o,a),a+=t.Ellipsoid.packedLength,o[a++]=n._granularity,o[a++]=n._surfaceHeight,o[a++]=n._rotation,o[a++]=n._extrudedHeight,o[a]=e.defaultValue(n._offsetAttribute,-1),o};const G=new i.Rectangle,R=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),P={rectangle:G,ellipsoid:R,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};A.unpack=function(n,o,a){o=e.defaultValue(o,0);const r=i.Rectangle.unpack(n,o,G);o+=i.Rectangle.packedLength;const l=t.Ellipsoid.unpack(n,o,R);o+=t.Ellipsoid.packedLength;const s=n[o++],u=n[o++],c=n[o++],d=n[o++],p=n[o];return e.defined(a)?(a._rectangle=i.Rectangle.clone(r,a._rectangle),a._ellipsoid=t.Ellipsoid.clone(l,a._ellipsoid),a._surfaceHeight=u,a._rotation=c,a._extrudedHeight=d,a._offsetAttribute=-1===p?void 0:p,a):(P.granularity=s,P.height=u,P.rotation=c,P.extrudedHeight=d,P.offsetAttribute=-1===p?void 0:p,new A(P))};const L=new t.Cartographic;return A.createGeometry=function(t){const i=t._rectangle,r=t._ellipsoid,p=d.RectangleGeometryLibrary.computeOptions(i,t._granularity,t._rotation,0,_,L);let f,g;if(u.CesiumMath.equalsEpsilon(i.north,i.south,u.CesiumMath.EPSILON10)||u.CesiumMath.equalsEpsilon(i.east,i.west,u.CesiumMath.EPSILON10))return;const h=t._surfaceHeight,m=t._extrudedHeight;let A;if(!u.CesiumMath.equalsEpsilon(h,m,0,u.CesiumMath.EPSILON2)){if(f=function(e,t){const i=e._surfaceHeight,n=e._extrudedHeight,o=e._ellipsoid,a=n,r=i,l=E(e,t),u=t.height,d=t.width,p=c.PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,r,o,!1);let f=p.length;const g=new Float64Array(2*f);g.set(p);const h=c.PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,a,o);g.set(h,f),l.attributes.position.values=g;const y=t.northCap,b=t.southCap;let m=4;y&&(m-=1),b&&(m-=1);const _=2*(g.length/3+m),A=s.IndexDatatype.createTypedArray(g.length/3,_);f=g.length/6;let G,R=0;for(let e=0;e<f-1;e++)A[R++]=e,A[R++]=e+1,A[R++]=e+f,A[R++]=e+f+1;if(A[R++]=f-1,A[R++]=0,A[R++]=f+f-1,A[R++]=f,A[R++]=0,A[R++]=f,y)G=u-1;else{const e=d-1;A[R++]=e,A[R++]=e+f,G=d+u-2}if(A[R++]=G,A[R++]=G+f,!b){const e=d+G-1;A[R++]=e,A[R]=e+f}return l.indices=A,l}(t,p),e.defined(t._offsetAttribute)){const e=f.attributes.position.values.length/3;let i=new Uint8Array(e);t._offsetAttribute===l.GeometryOffsetAttribute.TOP?i=i.fill(1,0,e/2):(A=t._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1,i=i.fill(A)),f.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}const u=n.BoundingSphere.fromRectangle3D(i,r,h,b),d=n.BoundingSphere.fromRectangle3D(i,r,m,y);g=n.BoundingSphere.union(u,d)}else{if(f=E(t,p),f.attributes.position.values=c.PolygonPipeline.scaleToGeodeticHeight(f.attributes.position.values,h,r,!1),e.defined(t._offsetAttribute)){const e=f.attributes.position.values.length;A=t._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1;const i=new Uint8Array(e/3).fill(A);f.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}g=n.BoundingSphere.fromRectangle3D(i,r,h)}return new a.Geometry({attributes:f.attributes,indices:f.indices,primitiveType:a.PrimitiveType.LINES,boundingSphere:g,offsetAttribute:t._offsetAttribute})},function(n,o){return e.defined(o)&&(n=A.unpack(n,o)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),n._rectangle=i.Rectangle.clone(n._rectangle),A.createGeometry(n)}}));
define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./Matrix2-66622085","./Transforms-b7f686a8","./ComponentDatatype-dd0b58d1","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9","./Math-8e567554","./PolygonPipeline-f56a8ec5","./RectangleGeometryLibrary-f1f036f8","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./EllipsoidRhumbLine-1dd98535"],(function(e,t,i,n,o,a,r,l,s,u,c,d,p,f,g,h){"use strict";const y=new n.BoundingSphere,m=new n.BoundingSphere,b=new t.Cartesian3,_=new i.Rectangle;function E(e,t){const i=e._ellipsoid,n=t.height,l=t.width,u=t.northCap,c=t.southCap;let p=n,f=2,g=0,h=4;u&&(f-=1,p-=1,g+=1,h-=2),c&&(f-=1,p-=1,g+=1,h-=2),g+=f*l+2*p-h;const y=new Float64Array(3*g);let m,_=0,E=0;const A=b;if(u)d.RectangleGeometryLibrary.computePosition(t,i,!1,E,0,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;else for(m=0;m<l;m++)d.RectangleGeometryLibrary.computePosition(t,i,!1,E,m,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;for(m=l-1,E=1;E<n;E++)d.RectangleGeometryLibrary.computePosition(t,i,!1,E,m,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;if(E=n-1,!c)for(m=l-2;m>=0;m--)d.RectangleGeometryLibrary.computePosition(t,i,!1,E,m,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;for(m=0,E=n-2;E>0;E--)d.RectangleGeometryLibrary.computePosition(t,i,!1,E,m,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;const G=y.length/3*2,R=s.IndexDatatype.createTypedArray(y.length/3,G);let P=0;for(let e=0;e<y.length/3-1;e++)R[P++]=e,R[P++]=e+1;R[P++]=y.length/3-1,R[P++]=0;const L=new a.Geometry({attributes:new r.GeometryAttributes,primitiveType:a.PrimitiveType.LINES});return L.attributes.position=new a.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:y}),L.indices=R,L}function A(n){const o=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).rectangle,a=e.defaultValue(n.granularity,u.CesiumMath.RADIANS_PER_DEGREE),r=e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84),l=e.defaultValue(n.rotation,0),s=e.defaultValue(n.height,0),c=e.defaultValue(n.extrudedHeight,s);this._rectangle=i.Rectangle.clone(o),this._granularity=a,this._ellipsoid=r,this._surfaceHeight=Math.max(s,c),this._rotation=l,this._extrudedHeight=Math.min(s,c),this._offsetAttribute=n.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}A.packedLength=i.Rectangle.packedLength+t.Ellipsoid.packedLength+5,A.pack=function(n,o,a){return a=e.defaultValue(a,0),i.Rectangle.pack(n._rectangle,o,a),a+=i.Rectangle.packedLength,t.Ellipsoid.pack(n._ellipsoid,o,a),a+=t.Ellipsoid.packedLength,o[a++]=n._granularity,o[a++]=n._surfaceHeight,o[a++]=n._rotation,o[a++]=n._extrudedHeight,o[a]=e.defaultValue(n._offsetAttribute,-1),o};const G=new i.Rectangle,R=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),P={rectangle:G,ellipsoid:R,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};A.unpack=function(n,o,a){o=e.defaultValue(o,0);const r=i.Rectangle.unpack(n,o,G);o+=i.Rectangle.packedLength;const l=t.Ellipsoid.unpack(n,o,R);o+=t.Ellipsoid.packedLength;const s=n[o++],u=n[o++],c=n[o++],d=n[o++],p=n[o];return e.defined(a)?(a._rectangle=i.Rectangle.clone(r,a._rectangle),a._ellipsoid=t.Ellipsoid.clone(l,a._ellipsoid),a._surfaceHeight=u,a._rotation=c,a._extrudedHeight=d,a._offsetAttribute=-1===p?void 0:p,a):(P.granularity=s,P.height=u,P.rotation=c,P.extrudedHeight=d,P.offsetAttribute=-1===p?void 0:p,new A(P))};const L=new t.Cartographic;return A.createGeometry=function(t){const i=t._rectangle,r=t._ellipsoid,p=d.RectangleGeometryLibrary.computeOptions(i,t._granularity,t._rotation,0,_,L);let f,g;if(u.CesiumMath.equalsEpsilon(i.north,i.south,u.CesiumMath.EPSILON10)||u.CesiumMath.equalsEpsilon(i.east,i.west,u.CesiumMath.EPSILON10))return;const h=t._surfaceHeight,b=t._extrudedHeight;let A;if(!u.CesiumMath.equalsEpsilon(h,b,0,u.CesiumMath.EPSILON2)){if(f=function(e,t){const i=e._surfaceHeight,n=e._extrudedHeight,o=e._ellipsoid,a=n,r=i,l=E(e,t),u=t.height,d=t.width,p=c.PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,r,o,!1);let f=p.length;const g=new Float64Array(2*f);g.set(p);const h=c.PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,a,o);g.set(h,f),l.attributes.position.values=g;const y=t.northCap,m=t.southCap;let b=4;y&&(b-=1),m&&(b-=1);const _=2*(g.length/3+b),A=s.IndexDatatype.createTypedArray(g.length/3,_);f=g.length/6;let G,R=0;for(let e=0;e<f-1;e++)A[R++]=e,A[R++]=e+1,A[R++]=e+f,A[R++]=e+f+1;if(A[R++]=f-1,A[R++]=0,A[R++]=f+f-1,A[R++]=f,A[R++]=0,A[R++]=f,y)G=u-1;else{const e=d-1;A[R++]=e,A[R++]=e+f,G=d+u-2}if(A[R++]=G,A[R++]=G+f,!m){const e=d+G-1;A[R++]=e,A[R]=e+f}return l.indices=A,l}(t,p),e.defined(t._offsetAttribute)){const e=f.attributes.position.values.length/3;let i=new Uint8Array(e);t._offsetAttribute===l.GeometryOffsetAttribute.TOP?i=i.fill(1,0,e/2):(A=t._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1,i=i.fill(A)),f.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}const u=n.BoundingSphere.fromRectangle3D(i,r,h,m),d=n.BoundingSphere.fromRectangle3D(i,r,b,y);g=n.BoundingSphere.union(u,d)}else{if(f=E(t,p),f.attributes.position.values=c.PolygonPipeline.scaleToGeodeticHeight(f.attributes.position.values,h,r,!1),e.defined(t._offsetAttribute)){const e=f.attributes.position.values.length;A=t._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1;const i=new Uint8Array(e/3).fill(A);f.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}g=n.BoundingSphere.fromRectangle3D(i,r,h)}return new a.Geometry({attributes:f.attributes,indices:f.indices,primitiveType:a.PrimitiveType.LINES,boundingSphere:g,offsetAttribute:t._offsetAttribute})},function(n,o){return e.defined(o)&&(n=A.unpack(n,o)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),n._rectangle=i.Rectangle.clone(n._rectangle),A.createGeometry(n)}}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./ArcType-3d26c7db","./Transforms-b1441a66","./Color-0023019e","./ComponentDatatype-dd0b58d1","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./IndexDatatype-eddea9c9","./Math-8e567554","./PolylinePipeline-576cc29e","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./EllipsoidGeodesic-9484ceff","./EllipsoidRhumbLine-1dd98535","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc"],(function(e,o,t,l,r,n,i,a,s,c,p,d,f,y,u,h,C,T,g){"use strict";function m(e,o,t,l,n,i,a){const s=p.PolylinePipeline.numberOfPoints(e,o,n);let c;const d=t.red,f=t.green,y=t.blue,u=t.alpha,h=l.red,C=l.green,T=l.blue,g=l.alpha;if(r.Color.equals(t,l)){for(c=0;c<s;c++)i[a++]=r.Color.floatToByte(d),i[a++]=r.Color.floatToByte(f),i[a++]=r.Color.floatToByte(y),i[a++]=r.Color.floatToByte(u);return a}const m=(h-d)/s,b=(C-f)/s,P=(T-y)/s,_=(g-u)/s;let B=a;for(c=0;c<s;c++)i[B++]=r.Color.floatToByte(d+c*m),i[B++]=r.Color.floatToByte(f+c*b),i[B++]=r.Color.floatToByte(y+c*P),i[B++]=r.Color.floatToByte(u+c*_);return B}function b(l){const n=(l=e.defaultValue(l,e.defaultValue.EMPTY_OBJECT)).positions,i=l.colors,a=e.defaultValue(l.colorsPerVertex,!1);this._positions=n,this._colors=i,this._colorsPerVertex=a,this._arcType=e.defaultValue(l.arcType,t.ArcType.GEODESIC),this._granularity=e.defaultValue(l.granularity,c.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=e.defaultValue(l.ellipsoid,o.Ellipsoid.WGS84),this._workerName="createSimplePolylineGeometry";let s=1+n.length*o.Cartesian3.packedLength;s+=e.defined(i)?1+i.length*r.Color.packedLength:1,this.packedLength=s+o.Ellipsoid.packedLength+3}b.pack=function(t,l,n){let i;n=e.defaultValue(n,0);const a=t._positions;let s=a.length;for(l[n++]=s,i=0;i<s;++i,n+=o.Cartesian3.packedLength)o.Cartesian3.pack(a[i],l,n);const c=t._colors;for(s=e.defined(c)?c.length:0,l[n++]=s,i=0;i<s;++i,n+=r.Color.packedLength)r.Color.pack(c[i],l,n);return o.Ellipsoid.pack(t._ellipsoid,l,n),n+=o.Ellipsoid.packedLength,l[n++]=t._colorsPerVertex?1:0,l[n++]=t._arcType,l[n]=t._granularity,l},b.unpack=function(t,l,n){let i;l=e.defaultValue(l,0);let a=t[l++];const s=new Array(a);for(i=0;i<a;++i,l+=o.Cartesian3.packedLength)s[i]=o.Cartesian3.unpack(t,l);a=t[l++];const c=a>0?new Array(a):void 0;for(i=0;i<a;++i,l+=r.Color.packedLength)c[i]=r.Color.unpack(t,l);const p=o.Ellipsoid.unpack(t,l);l+=o.Ellipsoid.packedLength;const d=1===t[l++],f=t[l++],y=t[l];return e.defined(n)?(n._positions=s,n._colors=c,n._ellipsoid=p,n._colorsPerVertex=d,n._arcType=f,n._granularity=y,n):new b({positions:s,colors:c,ellipsoid:p,colorsPerVertex:d,arcType:f,granularity:y})};const P=new Array(2),_=new Array(2),B={positions:P,height:_,ellipsoid:void 0,minDistance:void 0,granularity:void 0};return b.createGeometry=function(d){const f=d._positions,y=d._colors,u=d._colorsPerVertex,h=d._arcType,C=d._granularity,T=d._ellipsoid,g=c.CesiumMath.chordLength(C,T.maximumRadius),b=e.defined(y)&&!u;let A;const E=f.length;let k,G,D,L,w=0;if(h===t.ArcType.GEODESIC||h===t.ArcType.RHUMB){let o,l,n;h===t.ArcType.GEODESIC?(o=c.CesiumMath.chordLength(C,T.maximumRadius),l=p.PolylinePipeline.numberOfPoints,n=p.PolylinePipeline.generateArc):(o=C,l=p.PolylinePipeline.numberOfPointsRhumbLine,n=p.PolylinePipeline.generateRhumbArc);const i=p.PolylinePipeline.extractHeights(f,T),a=B;if(h===t.ArcType.GEODESIC?a.minDistance=g:a.granularity=C,a.ellipsoid=T,b){let t=0;for(A=0;A<E-1;A++)t+=l(f[A],f[A+1],o)+1;k=new Float64Array(3*t),D=new Uint8Array(4*t),a.positions=P,a.height=_;let s=0;for(A=0;A<E-1;++A){P[0]=f[A],P[1]=f[A+1],_[0]=i[A],_[1]=i[A+1];const o=n(a);if(e.defined(y)){const e=o.length/3;L=y[A];for(let o=0;o<e;++o)D[s++]=r.Color.floatToByte(L.red),D[s++]=r.Color.floatToByte(L.green),D[s++]=r.Color.floatToByte(L.blue),D[s++]=r.Color.floatToByte(L.alpha)}k.set(o,w),w+=o.length}}else if(a.positions=f,a.height=i,k=new Float64Array(n(a)),e.defined(y)){for(D=new Uint8Array(k.length/3*4),A=0;A<E-1;++A){w=m(f[A],f[A+1],y[A],y[A+1],g,D,w)}const e=y[E-1];D[w++]=r.Color.floatToByte(e.red),D[w++]=r.Color.floatToByte(e.green),D[w++]=r.Color.floatToByte(e.blue),D[w++]=r.Color.floatToByte(e.alpha)}}else{G=b?2*E-2:E,k=new Float64Array(3*G),D=e.defined(y)?new Uint8Array(4*G):void 0;let t=0,l=0;for(A=0;A<E;++A){const n=f[A];if(b&&A>0&&(o.Cartesian3.pack(n,k,t),t+=3,L=y[A-1],D[l++]=r.Color.floatToByte(L.red),D[l++]=r.Color.floatToByte(L.green),D[l++]=r.Color.floatToByte(L.blue),D[l++]=r.Color.floatToByte(L.alpha)),b&&A===E-1)break;o.Cartesian3.pack(n,k,t),t+=3,e.defined(y)&&(L=y[A],D[l++]=r.Color.floatToByte(L.red),D[l++]=r.Color.floatToByte(L.green),D[l++]=r.Color.floatToByte(L.blue),D[l++]=r.Color.floatToByte(L.alpha))}}const V=new a.GeometryAttributes;V.position=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:k}),e.defined(y)&&(V.color=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:D,normalize:!0})),G=k.length/3;const x=2*(G-1),S=s.IndexDatatype.createTypedArray(G,x);let I=0;for(A=0;A<G-1;++A)S[I++]=A,S[I++]=A+1;return new i.Geometry({attributes:V,indices:S,primitiveType:i.PrimitiveType.LINES,boundingSphere:l.BoundingSphere.fromPoints(f)})},function(t,l){return e.defined(l)&&(t=b.unpack(t,l)),t._ellipsoid=o.Ellipsoid.clone(t._ellipsoid),b.createGeometry(t)}}));
define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./ArcType-3d26c7db","./Transforms-b7f686a8","./Color-6b751834","./ComponentDatatype-dd0b58d1","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./IndexDatatype-eddea9c9","./Math-8e567554","./PolylinePipeline-eba1803b","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./EllipsoidGeodesic-9484ceff","./EllipsoidRhumbLine-1dd98535","./IntersectionTests-7d927f09","./Plane-6aee7ffc"],(function(e,o,t,l,r,n,i,a,s,c,p,d,f,y,u,h,C,T,g){"use strict";function m(e,o,t,l,n,i,a){const s=p.PolylinePipeline.numberOfPoints(e,o,n);let c;const d=t.red,f=t.green,y=t.blue,u=t.alpha,h=l.red,C=l.green,T=l.blue,g=l.alpha;if(r.Color.equals(t,l)){for(c=0;c<s;c++)i[a++]=r.Color.floatToByte(d),i[a++]=r.Color.floatToByte(f),i[a++]=r.Color.floatToByte(y),i[a++]=r.Color.floatToByte(u);return a}const m=(h-d)/s,b=(C-f)/s,P=(T-y)/s,_=(g-u)/s;let B=a;for(c=0;c<s;c++)i[B++]=r.Color.floatToByte(d+c*m),i[B++]=r.Color.floatToByte(f+c*b),i[B++]=r.Color.floatToByte(y+c*P),i[B++]=r.Color.floatToByte(u+c*_);return B}function b(l){const n=(l=e.defaultValue(l,e.defaultValue.EMPTY_OBJECT)).positions,i=l.colors,a=e.defaultValue(l.colorsPerVertex,!1);this._positions=n,this._colors=i,this._colorsPerVertex=a,this._arcType=e.defaultValue(l.arcType,t.ArcType.GEODESIC),this._granularity=e.defaultValue(l.granularity,c.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=e.defaultValue(l.ellipsoid,o.Ellipsoid.WGS84),this._workerName="createSimplePolylineGeometry";let s=1+n.length*o.Cartesian3.packedLength;s+=e.defined(i)?1+i.length*r.Color.packedLength:1,this.packedLength=s+o.Ellipsoid.packedLength+3}b.pack=function(t,l,n){let i;n=e.defaultValue(n,0);const a=t._positions;let s=a.length;for(l[n++]=s,i=0;i<s;++i,n+=o.Cartesian3.packedLength)o.Cartesian3.pack(a[i],l,n);const c=t._colors;for(s=e.defined(c)?c.length:0,l[n++]=s,i=0;i<s;++i,n+=r.Color.packedLength)r.Color.pack(c[i],l,n);return o.Ellipsoid.pack(t._ellipsoid,l,n),n+=o.Ellipsoid.packedLength,l[n++]=t._colorsPerVertex?1:0,l[n++]=t._arcType,l[n]=t._granularity,l},b.unpack=function(t,l,n){let i;l=e.defaultValue(l,0);let a=t[l++];const s=new Array(a);for(i=0;i<a;++i,l+=o.Cartesian3.packedLength)s[i]=o.Cartesian3.unpack(t,l);a=t[l++];const c=a>0?new Array(a):void 0;for(i=0;i<a;++i,l+=r.Color.packedLength)c[i]=r.Color.unpack(t,l);const p=o.Ellipsoid.unpack(t,l);l+=o.Ellipsoid.packedLength;const d=1===t[l++],f=t[l++],y=t[l];return e.defined(n)?(n._positions=s,n._colors=c,n._ellipsoid=p,n._colorsPerVertex=d,n._arcType=f,n._granularity=y,n):new b({positions:s,colors:c,ellipsoid:p,colorsPerVertex:d,arcType:f,granularity:y})};const P=new Array(2),_=new Array(2),B={positions:P,height:_,ellipsoid:void 0,minDistance:void 0,granularity:void 0};return b.createGeometry=function(d){const f=d._positions,y=d._colors,u=d._colorsPerVertex,h=d._arcType,C=d._granularity,T=d._ellipsoid,g=c.CesiumMath.chordLength(C,T.maximumRadius),b=e.defined(y)&&!u;let A;const E=f.length;let k,G,D,L,w=0;if(h===t.ArcType.GEODESIC||h===t.ArcType.RHUMB){let o,l,n;h===t.ArcType.GEODESIC?(o=c.CesiumMath.chordLength(C,T.maximumRadius),l=p.PolylinePipeline.numberOfPoints,n=p.PolylinePipeline.generateArc):(o=C,l=p.PolylinePipeline.numberOfPointsRhumbLine,n=p.PolylinePipeline.generateRhumbArc);const i=p.PolylinePipeline.extractHeights(f,T),a=B;if(h===t.ArcType.GEODESIC?a.minDistance=g:a.granularity=C,a.ellipsoid=T,b){let t=0;for(A=0;A<E-1;A++)t+=l(f[A],f[A+1],o)+1;k=new Float64Array(3*t),D=new Uint8Array(4*t),a.positions=P,a.height=_;let s=0;for(A=0;A<E-1;++A){P[0]=f[A],P[1]=f[A+1],_[0]=i[A],_[1]=i[A+1];const o=n(a);if(e.defined(y)){const e=o.length/3;L=y[A];for(let o=0;o<e;++o)D[s++]=r.Color.floatToByte(L.red),D[s++]=r.Color.floatToByte(L.green),D[s++]=r.Color.floatToByte(L.blue),D[s++]=r.Color.floatToByte(L.alpha)}k.set(o,w),w+=o.length}}else if(a.positions=f,a.height=i,k=new Float64Array(n(a)),e.defined(y)){for(D=new Uint8Array(k.length/3*4),A=0;A<E-1;++A){w=m(f[A],f[A+1],y[A],y[A+1],g,D,w)}const e=y[E-1];D[w++]=r.Color.floatToByte(e.red),D[w++]=r.Color.floatToByte(e.green),D[w++]=r.Color.floatToByte(e.blue),D[w++]=r.Color.floatToByte(e.alpha)}}else{G=b?2*E-2:E,k=new Float64Array(3*G),D=e.defined(y)?new Uint8Array(4*G):void 0;let t=0,l=0;for(A=0;A<E;++A){const n=f[A];if(b&&A>0&&(o.Cartesian3.pack(n,k,t),t+=3,L=y[A-1],D[l++]=r.Color.floatToByte(L.red),D[l++]=r.Color.floatToByte(L.green),D[l++]=r.Color.floatToByte(L.blue),D[l++]=r.Color.floatToByte(L.alpha)),b&&A===E-1)break;o.Cartesian3.pack(n,k,t),t+=3,e.defined(y)&&(L=y[A],D[l++]=r.Color.floatToByte(L.red),D[l++]=r.Color.floatToByte(L.green),D[l++]=r.Color.floatToByte(L.blue),D[l++]=r.Color.floatToByte(L.alpha))}}const V=new a.GeometryAttributes;V.position=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:k}),e.defined(y)&&(V.color=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:D,normalize:!0})),G=k.length/3;const x=2*(G-1),S=s.IndexDatatype.createTypedArray(G,x);let I=0;for(A=0;A<G-1;++A)S[I++]=A,S[I++]=A+1;return new i.Geometry({attributes:V,indices:S,primitiveType:i.PrimitiveType.LINES,boundingSphere:l.BoundingSphere.fromPoints(f)})},function(t,l){return e.defined(l)&&(t=b.unpack(t,l)),t._ellipsoid=o.Ellipsoid.clone(t._ellipsoid),b.createGeometry(t)}}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./EllipsoidGeometry-756342f9","./VertexFormat-848ec33d","./Math-8e567554","./Transforms-b1441a66","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9"],(function(e,t,i,r,o,a,n,s,d,c,l,m,u,p,y){"use strict";function G(r){const o=e.defaultValue(r.radius,1),a={radii:new t.Cartesian3(o,o,o),stackPartitions:r.stackPartitions,slicePartitions:r.slicePartitions,vertexFormat:r.vertexFormat};this._ellipsoidGeometry=new i.EllipsoidGeometry(a),this._workerName="createSphereGeometry"}G.packedLength=i.EllipsoidGeometry.packedLength,G.pack=function(e,t,r){return i.EllipsoidGeometry.pack(e._ellipsoidGeometry,t,r)};const f=new i.EllipsoidGeometry,k={radius:void 0,radii:new t.Cartesian3,vertexFormat:new r.VertexFormat,stackPartitions:void 0,slicePartitions:void 0};return G.unpack=function(o,a,n){const s=i.EllipsoidGeometry.unpack(o,a,f);return k.vertexFormat=r.VertexFormat.clone(s._vertexFormat,k.vertexFormat),k.stackPartitions=s._stackPartitions,k.slicePartitions=s._slicePartitions,e.defined(n)?(t.Cartesian3.clone(s._radii,k.radii),n._ellipsoidGeometry=new i.EllipsoidGeometry(k),n):(k.radius=s._radii.x,new G(k))},G.createGeometry=function(e){return i.EllipsoidGeometry.createGeometry(e._ellipsoidGeometry)},function(t,i){return e.defined(i)&&(t=G.unpack(t,i)),G.createGeometry(t)}}));
define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./EllipsoidGeometry-bcf775bb","./VertexFormat-848ec33d","./Math-8e567554","./Transforms-b7f686a8","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9"],(function(e,t,i,r,o,a,n,s,d,c,l,m,u,p,y){"use strict";function G(r){const o=e.defaultValue(r.radius,1),a={radii:new t.Cartesian3(o,o,o),stackPartitions:r.stackPartitions,slicePartitions:r.slicePartitions,vertexFormat:r.vertexFormat};this._ellipsoidGeometry=new i.EllipsoidGeometry(a),this._workerName="createSphereGeometry"}G.packedLength=i.EllipsoidGeometry.packedLength,G.pack=function(e,t,r){return i.EllipsoidGeometry.pack(e._ellipsoidGeometry,t,r)};const f=new i.EllipsoidGeometry,b={radius:void 0,radii:new t.Cartesian3,vertexFormat:new r.VertexFormat,stackPartitions:void 0,slicePartitions:void 0};return G.unpack=function(o,a,n){const s=i.EllipsoidGeometry.unpack(o,a,f);return b.vertexFormat=r.VertexFormat.clone(s._vertexFormat,b.vertexFormat),b.stackPartitions=s._stackPartitions,b.slicePartitions=s._slicePartitions,e.defined(n)?(t.Cartesian3.clone(s._radii,b.radii),n._ellipsoidGeometry=new i.EllipsoidGeometry(b),n):(b.radius=s._radii.x,new G(b))},G.createGeometry=function(e){return i.EllipsoidGeometry.createGeometry(e._ellipsoidGeometry)},function(t,i){return e.defined(i)&&(t=G.unpack(t,i)),G.createGeometry(t)}}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./EllipsoidOutlineGeometry-783b26cc","./Math-8e567554","./Transforms-b1441a66","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9"],(function(e,i,t,n,r,o,s,a,d,l,c,u,m,p){"use strict";function y(n){const r=e.defaultValue(n.radius,1),o={radii:new i.Cartesian3(r,r,r),stackPartitions:n.stackPartitions,slicePartitions:n.slicePartitions,subdivisions:n.subdivisions};this._ellipsoidGeometry=new t.EllipsoidOutlineGeometry(o),this._workerName="createSphereOutlineGeometry"}y.packedLength=t.EllipsoidOutlineGeometry.packedLength,y.pack=function(e,i,n){return t.EllipsoidOutlineGeometry.pack(e._ellipsoidGeometry,i,n)};const G=new t.EllipsoidOutlineGeometry,b={radius:void 0,radii:new i.Cartesian3,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};return y.unpack=function(n,r,o){const s=t.EllipsoidOutlineGeometry.unpack(n,r,G);return b.stackPartitions=s._stackPartitions,b.slicePartitions=s._slicePartitions,b.subdivisions=s._subdivisions,e.defined(o)?(i.Cartesian3.clone(s._radii,b.radii),o._ellipsoidGeometry=new t.EllipsoidOutlineGeometry(b),o):(b.radius=s._radii.x,new y(b))},y.createGeometry=function(e){return t.EllipsoidOutlineGeometry.createGeometry(e._ellipsoidGeometry)},function(i,t){return e.defined(t)&&(i=y.unpack(i,t)),y.createGeometry(i)}}));
define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./EllipsoidOutlineGeometry-97f1f7c7","./Math-8e567554","./Transforms-b7f686a8","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./IndexDatatype-eddea9c9"],(function(e,i,t,n,r,o,s,a,d,l,c,u,m,p){"use strict";function y(n){const r=e.defaultValue(n.radius,1),o={radii:new i.Cartesian3(r,r,r),stackPartitions:n.stackPartitions,slicePartitions:n.slicePartitions,subdivisions:n.subdivisions};this._ellipsoidGeometry=new t.EllipsoidOutlineGeometry(o),this._workerName="createSphereOutlineGeometry"}y.packedLength=t.EllipsoidOutlineGeometry.packedLength,y.pack=function(e,i,n){return t.EllipsoidOutlineGeometry.pack(e._ellipsoidGeometry,i,n)};const f=new t.EllipsoidOutlineGeometry,G={radius:void 0,radii:new i.Cartesian3,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};return y.unpack=function(n,r,o){const s=t.EllipsoidOutlineGeometry.unpack(n,r,f);return G.stackPartitions=s._stackPartitions,G.slicePartitions=s._slicePartitions,G.subdivisions=s._subdivisions,e.defined(o)?(i.Cartesian3.clone(s._radii,G.radii),o._ellipsoidGeometry=new t.EllipsoidOutlineGeometry(G),o):(G.radius=s._radii.x,new y(G))},y.createGeometry=function(e){return t.EllipsoidOutlineGeometry.createGeometry(e._ellipsoidGeometry)},function(i,t){return e.defined(t)&&(i=y.unpack(i,t)),y.createGeometry(i)}}));

@@ -1,1 +0,1 @@

define(["./Transforms-b1441a66","./BoxGeometry-dd38aa6b","./Matrix3-d6f3913c","./Color-0023019e","./CylinderGeometry-f7520869","./defaultValue-040c41f9","./EllipsoidGeometry-756342f9","./IndexDatatype-eddea9c9","./Matrix2-66622085","./createTaskProcessorWorker","./Math-8e567554","./combine-6eb6e848","./RuntimeError-3c5db370","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./VertexFormat-848ec33d","./CylinderGeometryLibrary-db7678f5"],(function(e,t,n,r,i,a,o,s,d,c,l,f,u,h,b,p,y,x,g,m){"use strict";function C(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}const I=new n.Cartesian3,M=d.Matrix4.packedLength+n.Cartesian3.packedLength,k=d.Matrix4.packedLength+2,B=d.Matrix4.packedLength+n.Cartesian3.packedLength,w=n.Cartesian3.packedLength+1,A={modelMatrix:new d.Matrix4,boundingVolume:new e.BoundingSphere};function O(e,t){let r=t*M;const i=n.Cartesian3.unpack(e,r,I);r+=n.Cartesian3.packedLength;const a=d.Matrix4.unpack(e,r,A.modelMatrix);d.Matrix4.multiplyByScale(a,i,a);const o=A.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,o.center),o.radius=Math.sqrt(3),A}function L(e,t){let r=t*k;const i=e[r++],a=e[r++],o=n.Cartesian3.fromElements(i,i,a,I),s=d.Matrix4.unpack(e,r,A.modelMatrix);d.Matrix4.multiplyByScale(s,o,s);const c=A.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,c.center),c.radius=Math.sqrt(2),A}function v(e,t){let r=t*B;const i=n.Cartesian3.unpack(e,r,I);r+=n.Cartesian3.packedLength;const a=d.Matrix4.unpack(e,r,A.modelMatrix);d.Matrix4.multiplyByScale(a,i,a);const o=A.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,o.center),o.radius=1,A}function E(e,t){let r=t*w;const i=e[r++],a=n.Cartesian3.unpack(e,r,I),o=d.Matrix4.fromTranslation(a,A.modelMatrix);d.Matrix4.multiplyByUniformScale(o,i,o);const s=A.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,s.center),s.radius=1,A}const U=new n.Cartesian3;function G(t,i,o,s,c){if(!a.defined(i))return;const l=o.length,f=s.attributes.position.values,u=s.indices,h=t.positions,b=t.vertexBatchIds,p=t.indices,y=t.batchIds,x=t.batchTableColors,g=t.batchedIndices,m=t.indexOffsets,I=t.indexCounts,M=t.boundingVolumes,k=t.modelMatrix,B=t.center;let w=t.positionOffset,A=t.batchIdIndex,O=t.indexOffset;const L=t.batchedIndicesOffset;for(let t=0;t<l;++t){const a=c(i,t),s=a.modelMatrix;d.Matrix4.multiply(k,s,s);const l=o[t],v=f.length;for(let e=0;e<v;e+=3){const t=n.Cartesian3.unpack(f,e,U);d.Matrix4.multiplyByPoint(s,t,t),n.Cartesian3.subtract(t,B,t),n.Cartesian3.pack(t,h,3*w+e),b[A++]=l}const E=u.length;for(let e=0;e<E;++e)p[O+e]=u[e]+w;const G=t+L;g[G]=new C({offset:O,count:E,color:r.Color.fromRgba(x[l]),batchIds:[l]}),y[G]=l,m[G]=O,I[G]=E,M[G]=e.BoundingSphere.transform(a.boundingVolume,s),w+=v/3,O+=E}t.positionOffset=w,t.batchIdIndex=A,t.indexOffset=O,t.batchedIndicesOffset+=l}const S=new n.Cartesian3,V=new d.Matrix4;function T(t,n,i){const a=i.length,o=2+a*e.BoundingSphere.packedLength+1+function(e){const t=e.length;let n=0;for(let i=0;i<t;++i)n+=r.Color.packedLength+3+e[i].batchIds.length;return n}(n),s=new Float64Array(o);let d=0;s[d++]=t,s[d++]=a;for(let t=0;t<a;++t)e.BoundingSphere.pack(i[t],s,d),d+=e.BoundingSphere.packedLength;const c=n.length;s[d++]=c;for(let e=0;e<c;++e){const t=n[e];r.Color.pack(t.color,s,d),d+=r.Color.packedLength,s[d++]=t.offset,s[d++]=t.count;const i=t.batchIds,a=i.length;s[d++]=a;for(let e=0;e<a;++e)s[d++]=i[e]}return s}return c((function(e,r){const c=a.defined(e.boxes)?new Float32Array(e.boxes):void 0,l=a.defined(e.boxBatchIds)?new Uint16Array(e.boxBatchIds):void 0,f=a.defined(e.cylinders)?new Float32Array(e.cylinders):void 0,u=a.defined(e.cylinderBatchIds)?new Uint16Array(e.cylinderBatchIds):void 0,h=a.defined(e.ellipsoids)?new Float32Array(e.ellipsoids):void 0,b=a.defined(e.ellipsoidBatchIds)?new Uint16Array(e.ellipsoidBatchIds):void 0,p=a.defined(e.spheres)?new Float32Array(e.spheres):void 0,y=a.defined(e.sphereBatchIds)?new Uint16Array(e.sphereBatchIds):void 0,x=a.defined(c)?l.length:0,g=a.defined(f)?u.length:0,m=a.defined(h)?b.length:0,C=a.defined(p)?y.length:0,I=t.BoxGeometry.getUnitBox(),M=i.CylinderGeometry.getUnitCylinder(),k=o.EllipsoidGeometry.getUnitEllipsoid(),B=I.attributes.position.values,w=M.attributes.position.values,A=k.attributes.position.values;let U=B.length*x;U+=w.length*g,U+=A.length*(m+C);const F=I.indices,R=M.indices,Z=k.indices;let D=F.length*x;D+=R.length*g,D+=Z.length*(m+C);const P=new Float32Array(U),q=new Uint16Array(U/3),W=s.IndexDatatype.createTypedArray(U/3,D),_=x+g+m+C,N=new Uint16Array(_),Y=new Array(_),j=new Uint32Array(_),z=new Uint32Array(_),H=new Array(_);!function(e){const t=new Float64Array(e);let r=0;n.Cartesian3.unpack(t,r,S),r+=n.Cartesian3.packedLength,d.Matrix4.unpack(t,r,V)}(e.packedBuffer);const J={batchTableColors:new Uint32Array(e.batchTableColors),positions:P,vertexBatchIds:q,indices:W,batchIds:N,batchedIndices:Y,indexOffsets:j,indexCounts:z,boundingVolumes:H,positionOffset:0,batchIdIndex:0,indexOffset:0,batchedIndicesOffset:0,modelMatrix:V,center:S};G(J,c,l,I,O),G(J,f,u,M,L),G(J,h,b,k,v),G(J,p,y,k,E);const K=T(W.BYTES_PER_ELEMENT,Y,H);return r.push(P.buffer,q.buffer,W.buffer),r.push(N.buffer,j.buffer,z.buffer),r.push(K.buffer),{positions:P.buffer,vertexBatchIds:q.buffer,indices:W.buffer,indexOffsets:j.buffer,indexCounts:z.buffer,batchIds:N.buffer,packedBuffer:K.buffer}}))}));
define(["./Transforms-b7f686a8","./BoxGeometry-fb4b6b60","./Matrix3-d6f3913c","./Color-6b751834","./CylinderGeometry-9c8f8c77","./defaultValue-040c41f9","./EllipsoidGeometry-bcf775bb","./IndexDatatype-eddea9c9","./Matrix2-66622085","./createTaskProcessorWorker","./Math-8e567554","./combine-6eb6e848","./RuntimeError-3c5db370","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./GeometryOffsetAttribute-b6810db4","./VertexFormat-848ec33d","./CylinderGeometryLibrary-db7678f5"],(function(e,t,n,r,i,a,o,s,d,c,l,f,u,h,b,p,y,x,g,m){"use strict";function C(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}const I=new n.Cartesian3,M=d.Matrix4.packedLength+n.Cartesian3.packedLength,k=d.Matrix4.packedLength+2,B=d.Matrix4.packedLength+n.Cartesian3.packedLength,w=n.Cartesian3.packedLength+1,A={modelMatrix:new d.Matrix4,boundingVolume:new e.BoundingSphere};function O(e,t){let r=t*M;const i=n.Cartesian3.unpack(e,r,I);r+=n.Cartesian3.packedLength;const a=d.Matrix4.unpack(e,r,A.modelMatrix);d.Matrix4.multiplyByScale(a,i,a);const o=A.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,o.center),o.radius=Math.sqrt(3),A}function L(e,t){let r=t*k;const i=e[r++],a=e[r++],o=n.Cartesian3.fromElements(i,i,a,I),s=d.Matrix4.unpack(e,r,A.modelMatrix);d.Matrix4.multiplyByScale(s,o,s);const c=A.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,c.center),c.radius=Math.sqrt(2),A}function v(e,t){let r=t*B;const i=n.Cartesian3.unpack(e,r,I);r+=n.Cartesian3.packedLength;const a=d.Matrix4.unpack(e,r,A.modelMatrix);d.Matrix4.multiplyByScale(a,i,a);const o=A.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,o.center),o.radius=1,A}function E(e,t){let r=t*w;const i=e[r++],a=n.Cartesian3.unpack(e,r,I),o=d.Matrix4.fromTranslation(a,A.modelMatrix);d.Matrix4.multiplyByUniformScale(o,i,o);const s=A.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,s.center),s.radius=1,A}const U=new n.Cartesian3;function G(t,i,o,s,c){if(!a.defined(i))return;const l=o.length,f=s.attributes.position.values,u=s.indices,h=t.positions,b=t.vertexBatchIds,p=t.indices,y=t.batchIds,x=t.batchTableColors,g=t.batchedIndices,m=t.indexOffsets,I=t.indexCounts,M=t.boundingVolumes,k=t.modelMatrix,B=t.center;let w=t.positionOffset,A=t.batchIdIndex,O=t.indexOffset;const L=t.batchedIndicesOffset;for(let t=0;t<l;++t){const a=c(i,t),s=a.modelMatrix;d.Matrix4.multiply(k,s,s);const l=o[t],v=f.length;for(let e=0;e<v;e+=3){const t=n.Cartesian3.unpack(f,e,U);d.Matrix4.multiplyByPoint(s,t,t),n.Cartesian3.subtract(t,B,t),n.Cartesian3.pack(t,h,3*w+e),b[A++]=l}const E=u.length;for(let e=0;e<E;++e)p[O+e]=u[e]+w;const G=t+L;g[G]=new C({offset:O,count:E,color:r.Color.fromRgba(x[l]),batchIds:[l]}),y[G]=l,m[G]=O,I[G]=E,M[G]=e.BoundingSphere.transform(a.boundingVolume,s),w+=v/3,O+=E}t.positionOffset=w,t.batchIdIndex=A,t.indexOffset=O,t.batchedIndicesOffset+=l}const S=new n.Cartesian3,V=new d.Matrix4;function T(t,n,i){const a=i.length,o=2+a*e.BoundingSphere.packedLength+1+function(e){const t=e.length;let n=0;for(let i=0;i<t;++i)n+=r.Color.packedLength+3+e[i].batchIds.length;return n}(n),s=new Float64Array(o);let d=0;s[d++]=t,s[d++]=a;for(let t=0;t<a;++t)e.BoundingSphere.pack(i[t],s,d),d+=e.BoundingSphere.packedLength;const c=n.length;s[d++]=c;for(let e=0;e<c;++e){const t=n[e];r.Color.pack(t.color,s,d),d+=r.Color.packedLength,s[d++]=t.offset,s[d++]=t.count;const i=t.batchIds,a=i.length;s[d++]=a;for(let e=0;e<a;++e)s[d++]=i[e]}return s}return c((function(e,r){const c=a.defined(e.boxes)?new Float32Array(e.boxes):void 0,l=a.defined(e.boxBatchIds)?new Uint16Array(e.boxBatchIds):void 0,f=a.defined(e.cylinders)?new Float32Array(e.cylinders):void 0,u=a.defined(e.cylinderBatchIds)?new Uint16Array(e.cylinderBatchIds):void 0,h=a.defined(e.ellipsoids)?new Float32Array(e.ellipsoids):void 0,b=a.defined(e.ellipsoidBatchIds)?new Uint16Array(e.ellipsoidBatchIds):void 0,p=a.defined(e.spheres)?new Float32Array(e.spheres):void 0,y=a.defined(e.sphereBatchIds)?new Uint16Array(e.sphereBatchIds):void 0,x=a.defined(c)?l.length:0,g=a.defined(f)?u.length:0,m=a.defined(h)?b.length:0,C=a.defined(p)?y.length:0,I=t.BoxGeometry.getUnitBox(),M=i.CylinderGeometry.getUnitCylinder(),k=o.EllipsoidGeometry.getUnitEllipsoid(),B=I.attributes.position.values,w=M.attributes.position.values,A=k.attributes.position.values;let U=B.length*x;U+=w.length*g,U+=A.length*(m+C);const F=I.indices,R=M.indices,Z=k.indices;let D=F.length*x;D+=R.length*g,D+=Z.length*(m+C);const P=new Float32Array(U),q=new Uint16Array(U/3),W=s.IndexDatatype.createTypedArray(U/3,D),_=x+g+m+C,N=new Uint16Array(_),Y=new Array(_),j=new Uint32Array(_),z=new Uint32Array(_),H=new Array(_);!function(e){const t=new Float64Array(e);let r=0;n.Cartesian3.unpack(t,r,S),r+=n.Cartesian3.packedLength,d.Matrix4.unpack(t,r,V)}(e.packedBuffer);const J={batchTableColors:new Uint32Array(e.batchTableColors),positions:P,vertexBatchIds:q,indices:W,batchIds:N,batchedIndices:Y,indexOffsets:j,indexCounts:z,boundingVolumes:H,positionOffset:0,batchIdIndex:0,indexOffset:0,batchedIndicesOffset:0,modelMatrix:V,center:S};G(J,c,l,I,O),G(J,f,u,M,L),G(J,h,b,k,v),G(J,p,y,k,E);const K=T(W.BYTES_PER_ELEMENT,Y,H);return r.push(P.buffer,q.buffer,W.buffer),r.push(N.buffer,j.buffer,z.buffer),r.push(K.buffer),{positions:P.buffer,vertexBatchIds:q.buffer,indices:W.buffer,indexOffsets:j.buffer,indexCounts:z.buffer,batchIds:N.buffer,packedBuffer:K.buffer}}))}));

@@ -1,1 +0,1 @@

define(["./AttributeCompression-5fa81749","./Matrix3-d6f3913c","./Color-0023019e","./defaultValue-040c41f9","./IndexDatatype-eddea9c9","./Math-8e567554","./OrientedBoundingBox-ac323c64","./Matrix2-66622085","./createTaskProcessorWorker","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./Transforms-b1441a66","./combine-6eb6e848","./RuntimeError-3c5db370","./EllipsoidTangentPlane-fc1becbb","./AxisAlignedBoundingBox-ba8ff526","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc"],(function(e,t,n,a,r,o,i,s,c,f,d,l,u,h,g,p,b,m){"use strict";const y=new t.Cartesian3,C=new t.Ellipsoid,I=new s.Rectangle,x={min:void 0,max:void 0,indexBytesPerElement:void 0};function w(e,t,a){const r=t.length,o=2+r*i.OrientedBoundingBox.packedLength+1+function(e){const t=e.length;let a=0;for(let r=0;r<t;++r)a+=n.Color.packedLength+3+e[r].batchIds.length;return a}(a),s=new Float64Array(o);let c=0;s[c++]=e,s[c++]=r;for(let e=0;e<r;++e)i.OrientedBoundingBox.pack(t[e],s,c),c+=i.OrientedBoundingBox.packedLength;const f=a.length;s[c++]=f;for(let e=0;e<f;++e){const t=a[e];n.Color.pack(t.color,s,c),c+=n.Color.packedLength,s[c++]=t.offset,s[c++]=t.count;const r=t.batchIds,o=r.length;s[c++]=o;for(let e=0;e<o;++e)s[c++]=r[e]}return s}const A=new t.Cartesian3,E=new t.Cartesian3,N=new t.Cartesian3,T=new t.Cartesian3,B=new t.Cartesian3,k=new t.Cartographic,L=new s.Rectangle;return c((function(c,f){let d;!function(e){const n=new Float64Array(e);let a=0;x.indexBytesPerElement=n[a++],x.min=n[a++],x.max=n[a++],t.Cartesian3.unpack(n,a,y),a+=t.Cartesian3.packedLength,t.Ellipsoid.unpack(n,a,C),a+=t.Ellipsoid.packedLength,s.Rectangle.unpack(n,a,I)}(c.packedBuffer),d=2===x.indexBytesPerElement?new Uint16Array(c.indices):new Uint32Array(c.indices);const l=new Uint16Array(c.positions),u=new Uint32Array(c.counts),h=new Uint32Array(c.indexCounts),g=new Uint32Array(c.batchIds),p=new Uint32Array(c.batchTableColors),b=new Array(u.length),m=y,O=C;let U=I;const P=x.min,F=x.max;let M,S,D,R=c.minimumHeights,_=c.maximumHeights;a.defined(R)&&a.defined(_)&&(R=new Float32Array(R),_=new Float32Array(_));const G=l.length/2,V=l.subarray(0,G),Y=l.subarray(G,2*G);e.AttributeCompression.zigZagDeltaDecode(V,Y);const v=new Float64Array(3*G);for(M=0;M<G;++M){const e=V[M],n=Y[M],a=o.CesiumMath.lerp(U.west,U.east,e/32767),r=o.CesiumMath.lerp(U.south,U.north,n/32767),i=t.Cartographic.fromRadians(a,r,0,k),s=O.cartographicToCartesian(i,A);t.Cartesian3.pack(s,v,3*M)}const H=u.length,W=new Array(H),z=new Array(H);let Z=0,j=0;for(M=0;M<H;++M)W[M]=Z,z[M]=j,Z+=u[M],j+=h[M];const q=new Float32Array(3*G*2),J=new Uint16Array(2*G),K=new Uint32Array(z.length),Q=new Uint32Array(h.length);let X=[];const $={};for(M=0;M<H;++M)D=p[M],a.defined($[D])?($[D].positionLength+=u[M],$[D].indexLength+=h[M],$[D].batchIds.push(M)):$[D]={positionLength:u[M],indexLength:h[M],offset:0,indexOffset:0,batchIds:[M]};let ee,te=0,ne=0;for(D in $)if($.hasOwnProperty(D)){ee=$[D],ee.offset=te,ee.indexOffset=ne;const e=2*ee.positionLength,t=2*ee.indexLength+6*ee.positionLength;te+=e,ne+=t,ee.indexLength=t}const ae=[];for(D in $)$.hasOwnProperty(D)&&(ee=$[D],ae.push({color:n.Color.fromRgba(parseInt(D)),offset:ee.indexOffset,count:ee.indexLength,batchIds:ee.batchIds}));for(M=0;M<H;++M){D=p[M],ee=$[D];const e=ee.offset;let n=3*e,r=e;const o=W[M],s=u[M],c=g[M];let f=P,l=F;a.defined(R)&&a.defined(_)&&(f=R[M],l=_[M]);let y=Number.POSITIVE_INFINITY,C=Number.NEGATIVE_INFINITY,I=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;for(S=0;S<s;++S){const e=t.Cartesian3.unpack(v,3*o+3*S,A);O.scaleToGeodeticSurface(e,e);const a=O.cartesianToCartographic(e,k),i=a.latitude,s=a.longitude;y=Math.min(i,y),C=Math.max(i,C),I=Math.min(s,I),x=Math.max(s,x);const d=O.geodeticSurfaceNormal(e,E);let u=t.Cartesian3.multiplyByScalar(d,f,N);const h=t.Cartesian3.add(e,u,T);u=t.Cartesian3.multiplyByScalar(d,l,u);const g=t.Cartesian3.add(e,u,B);t.Cartesian3.subtract(g,m,g),t.Cartesian3.subtract(h,m,h),t.Cartesian3.pack(g,q,n),t.Cartesian3.pack(h,q,n+3),J[r]=c,J[r+1]=c,n+=6,r+=2}U=L,U.west=I,U.east=x,U.south=y,U.north=C,b[M]=i.OrientedBoundingBox.fromRectangle(U,P,F,O);let w=ee.indexOffset;const G=z[M],V=h[M];for(K[M]=w,S=0;S<V;S+=3){const t=d[G+S]-o,n=d[G+S+1]-o,a=d[G+S+2]-o;X[w++]=2*t+e,X[w++]=2*n+e,X[w++]=2*a+e,X[w++]=2*a+1+e,X[w++]=2*n+1+e,X[w++]=2*t+1+e}for(S=0;S<s;++S){const t=S,n=(S+1)%s;X[w++]=2*t+1+e,X[w++]=2*n+e,X[w++]=2*t+e,X[w++]=2*t+1+e,X[w++]=2*n+1+e,X[w++]=2*n+e}ee.offset+=2*s,ee.indexOffset=w,Q[M]=w-K[M]}X=r.IndexDatatype.createTypedArray(q.length/3,X);const re=ae.length;for(let e=0;e<re;++e){const t=ae[e].batchIds;let n=0;const a=t.length;for(let e=0;e<a;++e)n+=Q[t[e]];ae[e].count=n}const oe=w(2===X.BYTES_PER_ELEMENT?r.IndexDatatype.UNSIGNED_SHORT:r.IndexDatatype.UNSIGNED_INT,b,ae);return f.push(q.buffer,X.buffer,K.buffer,Q.buffer,J.buffer,oe.buffer),{positions:q.buffer,indices:X.buffer,indexOffsets:K.buffer,indexCounts:Q.buffer,batchIds:J.buffer,packedBuffer:oe.buffer}}))}));
define(["./AttributeCompression-5fa81749","./Matrix3-d6f3913c","./Color-6b751834","./defaultValue-040c41f9","./IndexDatatype-eddea9c9","./Math-8e567554","./OrientedBoundingBox-60a5c9a1","./Matrix2-66622085","./createTaskProcessorWorker","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./Transforms-b7f686a8","./combine-6eb6e848","./RuntimeError-3c5db370","./EllipsoidTangentPlane-ae5d3d65","./AxisAlignedBoundingBox-680337b6","./IntersectionTests-7d927f09","./Plane-6aee7ffc"],(function(e,t,n,a,r,o,i,s,c,f,d,l,u,h,g,p,b,m){"use strict";const y=new t.Cartesian3,C=new t.Ellipsoid,I=new s.Rectangle,x={min:void 0,max:void 0,indexBytesPerElement:void 0};function w(e,t,a){const r=t.length,o=2+r*i.OrientedBoundingBox.packedLength+1+function(e){const t=e.length;let a=0;for(let r=0;r<t;++r)a+=n.Color.packedLength+3+e[r].batchIds.length;return a}(a),s=new Float64Array(o);let c=0;s[c++]=e,s[c++]=r;for(let e=0;e<r;++e)i.OrientedBoundingBox.pack(t[e],s,c),c+=i.OrientedBoundingBox.packedLength;const f=a.length;s[c++]=f;for(let e=0;e<f;++e){const t=a[e];n.Color.pack(t.color,s,c),c+=n.Color.packedLength,s[c++]=t.offset,s[c++]=t.count;const r=t.batchIds,o=r.length;s[c++]=o;for(let e=0;e<o;++e)s[c++]=r[e]}return s}const A=new t.Cartesian3,E=new t.Cartesian3,N=new t.Cartesian3,T=new t.Cartesian3,B=new t.Cartesian3,k=new t.Cartographic,L=new s.Rectangle;return c((function(c,f){let d;!function(e){const n=new Float64Array(e);let a=0;x.indexBytesPerElement=n[a++],x.min=n[a++],x.max=n[a++],t.Cartesian3.unpack(n,a,y),a+=t.Cartesian3.packedLength,t.Ellipsoid.unpack(n,a,C),a+=t.Ellipsoid.packedLength,s.Rectangle.unpack(n,a,I)}(c.packedBuffer),d=2===x.indexBytesPerElement?new Uint16Array(c.indices):new Uint32Array(c.indices);const l=new Uint16Array(c.positions),u=new Uint32Array(c.counts),h=new Uint32Array(c.indexCounts),g=new Uint32Array(c.batchIds),p=new Uint32Array(c.batchTableColors),b=new Array(u.length),m=y,O=C;let U=I;const P=x.min,F=x.max;let M,S,D,R=c.minimumHeights,_=c.maximumHeights;a.defined(R)&&a.defined(_)&&(R=new Float32Array(R),_=new Float32Array(_));const G=l.length/2,V=l.subarray(0,G),Y=l.subarray(G,2*G);e.AttributeCompression.zigZagDeltaDecode(V,Y);const v=new Float64Array(3*G);for(M=0;M<G;++M){const e=V[M],n=Y[M],a=o.CesiumMath.lerp(U.west,U.east,e/32767),r=o.CesiumMath.lerp(U.south,U.north,n/32767),i=t.Cartographic.fromRadians(a,r,0,k),s=O.cartographicToCartesian(i,A);t.Cartesian3.pack(s,v,3*M)}const H=u.length,W=new Array(H),z=new Array(H);let Z=0,j=0;for(M=0;M<H;++M)W[M]=Z,z[M]=j,Z+=u[M],j+=h[M];const q=new Float32Array(3*G*2),J=new Uint16Array(2*G),K=new Uint32Array(z.length),Q=new Uint32Array(h.length);let X=[];const $={};for(M=0;M<H;++M)D=p[M],a.defined($[D])?($[D].positionLength+=u[M],$[D].indexLength+=h[M],$[D].batchIds.push(M)):$[D]={positionLength:u[M],indexLength:h[M],offset:0,indexOffset:0,batchIds:[M]};let ee,te=0,ne=0;for(D in $)if($.hasOwnProperty(D)){ee=$[D],ee.offset=te,ee.indexOffset=ne;const e=2*ee.positionLength,t=2*ee.indexLength+6*ee.positionLength;te+=e,ne+=t,ee.indexLength=t}const ae=[];for(D in $)$.hasOwnProperty(D)&&(ee=$[D],ae.push({color:n.Color.fromRgba(parseInt(D)),offset:ee.indexOffset,count:ee.indexLength,batchIds:ee.batchIds}));for(M=0;M<H;++M){D=p[M],ee=$[D];const e=ee.offset;let n=3*e,r=e;const o=W[M],s=u[M],c=g[M];let f=P,l=F;a.defined(R)&&a.defined(_)&&(f=R[M],l=_[M]);let y=Number.POSITIVE_INFINITY,C=Number.NEGATIVE_INFINITY,I=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;for(S=0;S<s;++S){const e=t.Cartesian3.unpack(v,3*o+3*S,A);O.scaleToGeodeticSurface(e,e);const a=O.cartesianToCartographic(e,k),i=a.latitude,s=a.longitude;y=Math.min(i,y),C=Math.max(i,C),I=Math.min(s,I),x=Math.max(s,x);const d=O.geodeticSurfaceNormal(e,E);let u=t.Cartesian3.multiplyByScalar(d,f,N);const h=t.Cartesian3.add(e,u,T);u=t.Cartesian3.multiplyByScalar(d,l,u);const g=t.Cartesian3.add(e,u,B);t.Cartesian3.subtract(g,m,g),t.Cartesian3.subtract(h,m,h),t.Cartesian3.pack(g,q,n),t.Cartesian3.pack(h,q,n+3),J[r]=c,J[r+1]=c,n+=6,r+=2}U=L,U.west=I,U.east=x,U.south=y,U.north=C,b[M]=i.OrientedBoundingBox.fromRectangle(U,P,F,O);let w=ee.indexOffset;const G=z[M],V=h[M];for(K[M]=w,S=0;S<V;S+=3){const t=d[G+S]-o,n=d[G+S+1]-o,a=d[G+S+2]-o;X[w++]=2*t+e,X[w++]=2*n+e,X[w++]=2*a+e,X[w++]=2*a+1+e,X[w++]=2*n+1+e,X[w++]=2*t+1+e}for(S=0;S<s;++S){const t=S,n=(S+1)%s;X[w++]=2*t+1+e,X[w++]=2*n+e,X[w++]=2*t+e,X[w++]=2*t+1+e,X[w++]=2*n+1+e,X[w++]=2*n+e}ee.offset+=2*s,ee.indexOffset=w,Q[M]=w-K[M]}X=r.IndexDatatype.createTypedArray(q.length/3,X);const re=ae.length;for(let e=0;e<re;++e){const t=ae[e].batchIds;let n=0;const a=t.length;for(let e=0;e<a;++e)n+=Q[t[e]];ae[e].count=n}const oe=w(2===X.BYTES_PER_ELEMENT?r.IndexDatatype.UNSIGNED_SHORT:r.IndexDatatype.UNSIGNED_INT,b,ae);return f.push(q.buffer,X.buffer,K.buffer,Q.buffer,J.buffer,oe.buffer),{positions:q.buffer,indices:X.buffer,indexOffsets:K.buffer,indexCounts:Q.buffer,batchIds:J.buffer,packedBuffer:oe.buffer}}))}));

@@ -1,1 +0,1 @@

define(["./AxisAlignedBoundingBox-ba8ff526","./Transforms-b1441a66","./Matrix2-66622085","./Matrix3-d6f3913c","./defaultValue-040c41f9","./TerrainEncoding-99f48506","./Math-8e567554","./OrientedBoundingBox-ac323c64","./RuntimeError-3c5db370","./WebMercatorProjection-53aa47d9","./createTaskProcessorWorker","./combine-6eb6e848","./AttributeCompression-5fa81749","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./EllipsoidTangentPlane-fc1becbb","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc"],(function(t,e,n,i,o,a,r,s,c,u,h,d,l,g,m,p,f,I){"use strict";const E=Uint16Array.BYTES_PER_ELEMENT,T=Int32Array.BYTES_PER_ELEMENT,C=Uint32Array.BYTES_PER_ELEMENT,M=Float32Array.BYTES_PER_ELEMENT,x=Float64Array.BYTES_PER_ELEMENT;function N(t,e,n){n=o.defaultValue(n,r.CesiumMath);const i=t.length;for(let o=0;o<i;++o)if(n.equalsEpsilon(t[o],e,r.CesiumMath.EPSILON12))return o;return-1}const b=new i.Cartographic,S=new i.Cartesian3,w=new i.Cartesian3,B=new i.Cartesian3,P=new n.Matrix4;function A(t,e,a,s,c,u,h,d,l,g,m){const p=d.length;for(let f=0;f<p;++f){const I=d[f],E=I.cartographic,T=I.index,C=t.length,M=E.longitude;let x=E.latitude;x=r.CesiumMath.clamp(x,-r.CesiumMath.PI_OVER_TWO,r.CesiumMath.PI_OVER_TWO);const N=E.height-h.skirtHeight;h.hMin=Math.min(h.hMin,N),i.Cartographic.fromRadians(M,x,N,b),g&&(b.longitude+=l),g?f===p-1?b.latitude+=m:0===f&&(b.latitude-=m):b.latitude+=l;const w=h.ellipsoid.cartographicToCartesian(b);t.push(w),e.push(N),a.push(n.Cartesian2.clone(a[T])),s.length>0&&s.push(s[T]),c.length>0&&c.push(c[T]),n.Matrix4.multiplyByPoint(h.toENU,w,S);const B=h.minimum,P=h.maximum;i.Cartesian3.minimumByComponent(S,B,B),i.Cartesian3.maximumByComponent(S,P,P);const A=h.lastBorderPoint;if(o.defined(A)){const t=A.index;u.push(t,C-1,C,C,T,t)}h.lastBorderPoint=I}}return h((function(h,d){h.ellipsoid=i.Ellipsoid.clone(h.ellipsoid),h.rectangle=n.Rectangle.clone(h.rectangle);const l=function(h,d,l,g,m,p,f,I,y,R,_){let W,v,F,O,V,Y;o.defined(g)?(W=g.west,v=g.south,F=g.east,O=g.north,V=g.width,Y=g.height):(W=r.CesiumMath.toRadians(m.west),v=r.CesiumMath.toRadians(m.south),F=r.CesiumMath.toRadians(m.east),O=r.CesiumMath.toRadians(m.north),V=r.CesiumMath.toRadians(g.width),Y=r.CesiumMath.toRadians(g.height));const U=[v,O],k=[W,F],H=e.Transforms.eastNorthUpToFixedFrame(d,l),L=n.Matrix4.inverseTransformation(H,P);let D,G;y&&(D=u.WebMercatorProjection.geodeticLatitudeToMercatorAngle(v),G=1/(u.WebMercatorProjection.geodeticLatitudeToMercatorAngle(O)-D));const j=1!==p,z=new DataView(h);let q=Number.POSITIVE_INFINITY,J=Number.NEGATIVE_INFINITY;const K=w;K.x=Number.POSITIVE_INFINITY,K.y=Number.POSITIVE_INFINITY,K.z=Number.POSITIVE_INFINITY;const Q=B;Q.x=Number.NEGATIVE_INFINITY,Q.y=Number.NEGATIVE_INFINITY,Q.z=Number.NEGATIVE_INFINITY;let X,Z,$=0,tt=0,et=0;for(Z=0;Z<4;++Z){let t=$;X=z.getUint32(t,!0),t+=C;const e=r.CesiumMath.toRadians(180*z.getFloat64(t,!0));t+=x,-1===N(k,e)&&k.push(e);const n=r.CesiumMath.toRadians(180*z.getFloat64(t,!0));t+=x,-1===N(U,n)&&U.push(n),t+=2*x;let i=z.getInt32(t,!0);t+=T,tt+=i,i=z.getInt32(t,!0),et+=3*i,$+=X+C}const nt=[],it=[],ot=new Array(tt),at=new Array(tt),rt=new Array(tt),st=y?new Array(tt):[],ct=j?new Array(tt):[],ut=new Array(et),ht=[],dt=[],lt=[],gt=[];let mt=0,pt=0;for($=0,Z=0;Z<4;++Z){X=z.getUint32($,!0),$+=C;const t=$,e=r.CesiumMath.toRadians(180*z.getFloat64($,!0));$+=x;const o=r.CesiumMath.toRadians(180*z.getFloat64($,!0));$+=x;const a=r.CesiumMath.toRadians(180*z.getFloat64($,!0)),s=.5*a;$+=x;const h=r.CesiumMath.toRadians(180*z.getFloat64($,!0)),d=.5*h;$+=x;const g=z.getInt32($,!0);$+=T;const m=z.getInt32($,!0);$+=T,$+=T;const p=new Array(g);for(let t=0;t<g;++t){const c=e+z.getUint8($++)*a;b.longitude=c;const g=o+z.getUint8($++)*h;b.latitude=g;let m=z.getFloat32($,!0);if($+=M,0!==m&&m<_&&(m*=-Math.pow(2,R)),m*=6371010,b.height=m,-1!==N(k,c)||-1!==N(U,g)){const e=N(nt,b,i.Cartographic);if(-1!==e){p[t]=it[e];continue}nt.push(i.Cartographic.clone(b)),it.push(mt)}p[t]=mt,Math.abs(c-W)<s?ht.push({index:mt,cartographic:i.Cartographic.clone(b)}):Math.abs(c-F)<s?lt.push({index:mt,cartographic:i.Cartographic.clone(b)}):Math.abs(g-v)<d?dt.push({index:mt,cartographic:i.Cartographic.clone(b)}):Math.abs(g-O)<d&&gt.push({index:mt,cartographic:i.Cartographic.clone(b)}),q=Math.min(m,q),J=Math.max(m,J),rt[mt]=m;const f=l.cartographicToCartesian(b);if(ot[mt]=f,y&&(st[mt]=(u.WebMercatorProjection.geodeticLatitudeToMercatorAngle(g)-D)*G),j){const t=l.geodeticSurfaceNormal(f);ct[mt]=t}n.Matrix4.multiplyByPoint(L,f,S),i.Cartesian3.minimumByComponent(S,K,K),i.Cartesian3.maximumByComponent(S,Q,Q);let I=(c-W)/(F-W);I=r.CesiumMath.clamp(I,0,1);let E=(g-v)/(O-v);E=r.CesiumMath.clamp(E,0,1),at[mt]=new n.Cartesian2(I,E),++mt}const f=3*m;for(let t=0;t<f;++t,++pt)ut[pt]=p[z.getUint16($,!0)],$+=E;if(X!==$-t)throw new c.RuntimeError("Invalid terrain tile.")}ot.length=mt,at.length=mt,rt.length=mt,y&&(st.length=mt);j&&(ct.length=mt);const ft=mt,It=pt,Et={hMin:q,lastBorderPoint:void 0,skirtHeight:I,toENU:L,ellipsoid:l,minimum:K,maximum:Q};ht.sort((function(t,e){return e.cartographic.latitude-t.cartographic.latitude})),dt.sort((function(t,e){return t.cartographic.longitude-e.cartographic.longitude})),lt.sort((function(t,e){return t.cartographic.latitude-e.cartographic.latitude})),gt.sort((function(t,e){return e.cartographic.longitude-t.cartographic.longitude}));const Tt=1e-5;if(A(ot,rt,at,st,ct,ut,Et,ht,-Tt*V,!0,-Tt*Y),A(ot,rt,at,st,ct,ut,Et,dt,-Tt*Y,!1),A(ot,rt,at,st,ct,ut,Et,lt,Tt*V,!0,Tt*Y),A(ot,rt,at,st,ct,ut,Et,gt,Tt*Y,!1),ht.length>0&&gt.length>0){const t=ht[0].index,e=ft,n=gt[gt.length-1].index,i=ot.length-1;ut.push(n,i,e,e,t,n)}tt=ot.length;const Ct=e.BoundingSphere.fromPoints(ot);let Mt;o.defined(g)&&(Mt=s.OrientedBoundingBox.fromRectangle(g,q,J,l));const xt=new a.EllipsoidalOccluder(l).computeHorizonCullingPointPossiblyUnderEllipsoid(d,ot,q),Nt=new t.AxisAlignedBoundingBox(K,Q,d),bt=new a.TerrainEncoding(d,Nt,Et.hMin,J,H,!1,y,j,p,f),St=new Float32Array(tt*bt.stride);let wt=0;for(let t=0;t<tt;++t)wt=bt.encode(St,wt,ot[t],at[t],rt[t],void 0,st[t],ct[t]);const Bt=ht.map((function(t){return t.index})).reverse(),Pt=dt.map((function(t){return t.index})).reverse(),At=lt.map((function(t){return t.index})).reverse(),yt=gt.map((function(t){return t.index})).reverse();return Pt.unshift(At[At.length-1]),Pt.push(Bt[0]),yt.unshift(Bt[Bt.length-1]),yt.push(At[0]),{vertices:St,indices:new Uint16Array(ut),maximumHeight:J,minimumHeight:q,encoding:bt,boundingSphere3D:Ct,orientedBoundingBox:Mt,occludeePointInScaledSpace:xt,vertexCountWithoutSkirts:ft,indexCountWithoutSkirts:It,westIndicesSouthToNorth:Bt,southIndicesEastToWest:Pt,eastIndicesNorthToSouth:At,northIndicesWestToEast:yt}}(h.buffer,h.relativeToCenter,h.ellipsoid,h.rectangle,h.nativeRectangle,h.exaggeration,h.exaggerationRelativeHeight,h.skirtHeight,h.includeWebMercatorT,h.negativeAltitudeExponentBias,h.negativeElevationThreshold),g=l.vertices;d.push(g.buffer);const m=l.indices;return d.push(m.buffer),{vertices:g.buffer,indices:m.buffer,numberOfAttributes:l.encoding.stride,minimumHeight:l.minimumHeight,maximumHeight:l.maximumHeight,boundingSphere3D:l.boundingSphere3D,orientedBoundingBox:l.orientedBoundingBox,occludeePointInScaledSpace:l.occludeePointInScaledSpace,encoding:l.encoding,vertexCountWithoutSkirts:l.vertexCountWithoutSkirts,indexCountWithoutSkirts:l.indexCountWithoutSkirts,westIndicesSouthToNorth:l.westIndicesSouthToNorth,southIndicesEastToWest:l.southIndicesEastToWest,eastIndicesNorthToSouth:l.eastIndicesNorthToSouth,northIndicesWestToEast:l.northIndicesWestToEast}}))}));
define(["./AxisAlignedBoundingBox-680337b6","./Transforms-b7f686a8","./Matrix2-66622085","./Matrix3-d6f3913c","./defaultValue-040c41f9","./TerrainEncoding-ce59c054","./Math-8e567554","./OrientedBoundingBox-60a5c9a1","./RuntimeError-3c5db370","./WebMercatorProjection-53aa47d9","./createTaskProcessorWorker","./combine-6eb6e848","./AttributeCompression-5fa81749","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./EllipsoidTangentPlane-ae5d3d65","./IntersectionTests-7d927f09","./Plane-6aee7ffc"],(function(t,e,n,i,o,a,r,s,c,u,h,d,l,g,m,p,f,I){"use strict";const E=Uint16Array.BYTES_PER_ELEMENT,T=Int32Array.BYTES_PER_ELEMENT,C=Uint32Array.BYTES_PER_ELEMENT,M=Float32Array.BYTES_PER_ELEMENT,x=Float64Array.BYTES_PER_ELEMENT;function N(t,e,n){n=o.defaultValue(n,r.CesiumMath);const i=t.length;for(let o=0;o<i;++o)if(n.equalsEpsilon(t[o],e,r.CesiumMath.EPSILON12))return o;return-1}const b=new i.Cartographic,S=new i.Cartesian3,w=new i.Cartesian3,B=new i.Cartesian3,P=new n.Matrix4;function A(t,e,a,s,c,u,h,d,l,g,m){const p=d.length;for(let f=0;f<p;++f){const I=d[f],E=I.cartographic,T=I.index,C=t.length,M=E.longitude;let x=E.latitude;x=r.CesiumMath.clamp(x,-r.CesiumMath.PI_OVER_TWO,r.CesiumMath.PI_OVER_TWO);const N=E.height-h.skirtHeight;h.hMin=Math.min(h.hMin,N),i.Cartographic.fromRadians(M,x,N,b),g&&(b.longitude+=l),g?f===p-1?b.latitude+=m:0===f&&(b.latitude-=m):b.latitude+=l;const w=h.ellipsoid.cartographicToCartesian(b);t.push(w),e.push(N),a.push(n.Cartesian2.clone(a[T])),s.length>0&&s.push(s[T]),c.length>0&&c.push(c[T]),n.Matrix4.multiplyByPoint(h.toENU,w,S);const B=h.minimum,P=h.maximum;i.Cartesian3.minimumByComponent(S,B,B),i.Cartesian3.maximumByComponent(S,P,P);const A=h.lastBorderPoint;if(o.defined(A)){const t=A.index;u.push(t,C-1,C,C,T,t)}h.lastBorderPoint=I}}return h((function(h,d){h.ellipsoid=i.Ellipsoid.clone(h.ellipsoid),h.rectangle=n.Rectangle.clone(h.rectangle);const l=function(h,d,l,g,m,p,f,I,y,R,_){let W,v,F,O,V,Y;o.defined(g)?(W=g.west,v=g.south,F=g.east,O=g.north,V=g.width,Y=g.height):(W=r.CesiumMath.toRadians(m.west),v=r.CesiumMath.toRadians(m.south),F=r.CesiumMath.toRadians(m.east),O=r.CesiumMath.toRadians(m.north),V=r.CesiumMath.toRadians(g.width),Y=r.CesiumMath.toRadians(g.height));const U=[v,O],k=[W,F],H=e.Transforms.eastNorthUpToFixedFrame(d,l),L=n.Matrix4.inverseTransformation(H,P);let D,G;y&&(D=u.WebMercatorProjection.geodeticLatitudeToMercatorAngle(v),G=1/(u.WebMercatorProjection.geodeticLatitudeToMercatorAngle(O)-D));const j=1!==p,z=new DataView(h);let q=Number.POSITIVE_INFINITY,J=Number.NEGATIVE_INFINITY;const K=w;K.x=Number.POSITIVE_INFINITY,K.y=Number.POSITIVE_INFINITY,K.z=Number.POSITIVE_INFINITY;const Q=B;Q.x=Number.NEGATIVE_INFINITY,Q.y=Number.NEGATIVE_INFINITY,Q.z=Number.NEGATIVE_INFINITY;let X,Z,$=0,tt=0,et=0;for(Z=0;Z<4;++Z){let t=$;X=z.getUint32(t,!0),t+=C;const e=r.CesiumMath.toRadians(180*z.getFloat64(t,!0));t+=x,-1===N(k,e)&&k.push(e);const n=r.CesiumMath.toRadians(180*z.getFloat64(t,!0));t+=x,-1===N(U,n)&&U.push(n),t+=2*x;let i=z.getInt32(t,!0);t+=T,tt+=i,i=z.getInt32(t,!0),et+=3*i,$+=X+C}const nt=[],it=[],ot=new Array(tt),at=new Array(tt),rt=new Array(tt),st=y?new Array(tt):[],ct=j?new Array(tt):[],ut=new Array(et),ht=[],dt=[],lt=[],gt=[];let mt=0,pt=0;for($=0,Z=0;Z<4;++Z){X=z.getUint32($,!0),$+=C;const t=$,e=r.CesiumMath.toRadians(180*z.getFloat64($,!0));$+=x;const o=r.CesiumMath.toRadians(180*z.getFloat64($,!0));$+=x;const a=r.CesiumMath.toRadians(180*z.getFloat64($,!0)),s=.5*a;$+=x;const h=r.CesiumMath.toRadians(180*z.getFloat64($,!0)),d=.5*h;$+=x;const g=z.getInt32($,!0);$+=T;const m=z.getInt32($,!0);$+=T,$+=T;const p=new Array(g);for(let t=0;t<g;++t){const c=e+z.getUint8($++)*a;b.longitude=c;const g=o+z.getUint8($++)*h;b.latitude=g;let m=z.getFloat32($,!0);if($+=M,0!==m&&m<_&&(m*=-Math.pow(2,R)),m*=6371010,b.height=m,-1!==N(k,c)||-1!==N(U,g)){const e=N(nt,b,i.Cartographic);if(-1!==e){p[t]=it[e];continue}nt.push(i.Cartographic.clone(b)),it.push(mt)}p[t]=mt,Math.abs(c-W)<s?ht.push({index:mt,cartographic:i.Cartographic.clone(b)}):Math.abs(c-F)<s?lt.push({index:mt,cartographic:i.Cartographic.clone(b)}):Math.abs(g-v)<d?dt.push({index:mt,cartographic:i.Cartographic.clone(b)}):Math.abs(g-O)<d&&gt.push({index:mt,cartographic:i.Cartographic.clone(b)}),q=Math.min(m,q),J=Math.max(m,J),rt[mt]=m;const f=l.cartographicToCartesian(b);if(ot[mt]=f,y&&(st[mt]=(u.WebMercatorProjection.geodeticLatitudeToMercatorAngle(g)-D)*G),j){const t=l.geodeticSurfaceNormal(f);ct[mt]=t}n.Matrix4.multiplyByPoint(L,f,S),i.Cartesian3.minimumByComponent(S,K,K),i.Cartesian3.maximumByComponent(S,Q,Q);let I=(c-W)/(F-W);I=r.CesiumMath.clamp(I,0,1);let E=(g-v)/(O-v);E=r.CesiumMath.clamp(E,0,1),at[mt]=new n.Cartesian2(I,E),++mt}const f=3*m;for(let t=0;t<f;++t,++pt)ut[pt]=p[z.getUint16($,!0)],$+=E;if(X!==$-t)throw new c.RuntimeError("Invalid terrain tile.")}ot.length=mt,at.length=mt,rt.length=mt,y&&(st.length=mt);j&&(ct.length=mt);const ft=mt,It=pt,Et={hMin:q,lastBorderPoint:void 0,skirtHeight:I,toENU:L,ellipsoid:l,minimum:K,maximum:Q};ht.sort((function(t,e){return e.cartographic.latitude-t.cartographic.latitude})),dt.sort((function(t,e){return t.cartographic.longitude-e.cartographic.longitude})),lt.sort((function(t,e){return t.cartographic.latitude-e.cartographic.latitude})),gt.sort((function(t,e){return e.cartographic.longitude-t.cartographic.longitude}));const Tt=1e-5;if(A(ot,rt,at,st,ct,ut,Et,ht,-Tt*V,!0,-Tt*Y),A(ot,rt,at,st,ct,ut,Et,dt,-Tt*Y,!1),A(ot,rt,at,st,ct,ut,Et,lt,Tt*V,!0,Tt*Y),A(ot,rt,at,st,ct,ut,Et,gt,Tt*Y,!1),ht.length>0&&gt.length>0){const t=ht[0].index,e=ft,n=gt[gt.length-1].index,i=ot.length-1;ut.push(n,i,e,e,t,n)}tt=ot.length;const Ct=e.BoundingSphere.fromPoints(ot);let Mt;o.defined(g)&&(Mt=s.OrientedBoundingBox.fromRectangle(g,q,J,l));const xt=new a.EllipsoidalOccluder(l).computeHorizonCullingPointPossiblyUnderEllipsoid(d,ot,q),Nt=new t.AxisAlignedBoundingBox(K,Q,d),bt=new a.TerrainEncoding(d,Nt,Et.hMin,J,H,!1,y,j,p,f),St=new Float32Array(tt*bt.stride);let wt=0;for(let t=0;t<tt;++t)wt=bt.encode(St,wt,ot[t],at[t],rt[t],void 0,st[t],ct[t]);const Bt=ht.map((function(t){return t.index})).reverse(),Pt=dt.map((function(t){return t.index})).reverse(),At=lt.map((function(t){return t.index})).reverse(),yt=gt.map((function(t){return t.index})).reverse();return Pt.unshift(At[At.length-1]),Pt.push(Bt[0]),yt.unshift(Bt[Bt.length-1]),yt.push(At[0]),{vertices:St,indices:new Uint16Array(ut),maximumHeight:J,minimumHeight:q,encoding:bt,boundingSphere3D:Ct,orientedBoundingBox:Mt,occludeePointInScaledSpace:xt,vertexCountWithoutSkirts:ft,indexCountWithoutSkirts:It,westIndicesSouthToNorth:Bt,southIndicesEastToWest:Pt,eastIndicesNorthToSouth:At,northIndicesWestToEast:yt}}(h.buffer,h.relativeToCenter,h.ellipsoid,h.rectangle,h.nativeRectangle,h.exaggeration,h.exaggerationRelativeHeight,h.skirtHeight,h.includeWebMercatorT,h.negativeAltitudeExponentBias,h.negativeElevationThreshold),g=l.vertices;d.push(g.buffer);const m=l.indices;return d.push(m.buffer),{vertices:g.buffer,indices:m.buffer,numberOfAttributes:l.encoding.stride,minimumHeight:l.minimumHeight,maximumHeight:l.maximumHeight,boundingSphere3D:l.boundingSphere3D,orientedBoundingBox:l.orientedBoundingBox,occludeePointInScaledSpace:l.occludeePointInScaledSpace,encoding:l.encoding,vertexCountWithoutSkirts:l.vertexCountWithoutSkirts,indexCountWithoutSkirts:l.indexCountWithoutSkirts,westIndicesSouthToNorth:l.westIndicesSouthToNorth,southIndicesEastToWest:l.southIndicesEastToWest,eastIndicesNorthToSouth:l.eastIndicesNorthToSouth,northIndicesWestToEast:l.northIndicesWestToEast}}))}));

@@ -1,3 +0,3 @@

define(["./Matrix3-d6f3913c","./AxisAlignedBoundingBox-ba8ff526","./Transforms-b1441a66","./Matrix2-66622085","./defaultValue-040c41f9","./TerrainEncoding-99f48506","./Math-8e567554","./OrientedBoundingBox-ac323c64","./WebMercatorProjection-53aa47d9","./RuntimeError-3c5db370","./createTaskProcessorWorker","./combine-6eb6e848","./AttributeCompression-5fa81749","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./EllipsoidTangentPlane-fc1becbb","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc"],(function(e,t,i,a,n,r,s,l,o,f,u,c,d,h,m,g,p,x){"use strict";var w=Object.freeze({NONE:0,LERC:1});const k={};k.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});const y=new e.Cartesian3,I=new a.Matrix4,b=new e.Cartesian3,U=new e.Cartesian3;k.computeVertices=function(f){const u=Math.cos,c=Math.sin,d=Math.sqrt,h=Math.atan,m=Math.exp,g=s.CesiumMath.PI_OVER_TWO,p=s.CesiumMath.toRadians,x=f.heightmap,w=f.width,M=f.height,T=f.skirtHeight,V=T>0,v=n.defaultValue(f.isGeographic,!0),A=n.defaultValue(f.ellipsoid,e.Ellipsoid.WGS84),B=1/A.maximumRadius,D=a.Rectangle.clone(f.nativeRectangle),S=a.Rectangle.clone(f.rectangle);let P,E,C,F;n.defined(S)?(P=S.west,E=S.south,C=S.east,F=S.north):v?(P=p(D.west),E=p(D.south),C=p(D.east),F=p(D.north)):(P=D.west*B,E=g-2*h(m(-D.south*B)),C=D.east*B,F=g-2*h(m(-D.north*B)));let N=f.relativeToCenter;const O=n.defined(N);N=O?N:e.Cartesian3.ZERO;const R=n.defaultValue(f.includeWebMercatorT,!1),L=n.defaultValue(f.exaggeration,1),z=n.defaultValue(f.exaggerationRelativeHeight,0),H=1!==L,_=n.defaultValue(f.structure,k.DEFAULT_STRUCTURE),Y=n.defaultValue(_.heightScale,k.DEFAULT_STRUCTURE.heightScale),W=n.defaultValue(_.heightOffset,k.DEFAULT_STRUCTURE.heightOffset),X=n.defaultValue(_.elementsPerHeight,k.DEFAULT_STRUCTURE.elementsPerHeight),Z=n.defaultValue(_.stride,k.DEFAULT_STRUCTURE.stride),j=n.defaultValue(_.elementMultiplier,k.DEFAULT_STRUCTURE.elementMultiplier),G=n.defaultValue(_.isBigEndian,k.DEFAULT_STRUCTURE.isBigEndian);let q=a.Rectangle.computeWidth(D),Q=a.Rectangle.computeHeight(D);const J=q/(w-1),K=Q/(M-1);v||(q*=B,Q*=B);const $=A.radiiSquared,ee=$.x,te=$.y,ie=$.z;let ae=65536,ne=-65536;const re=i.Transforms.eastNorthUpToFixedFrame(N,A),se=a.Matrix4.inverseTransformation(re,I);let le,oe;R&&(le=o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(E),oe=1/(o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(F)-le));const fe=b;fe.x=Number.POSITIVE_INFINITY,fe.y=Number.POSITIVE_INFINITY,fe.z=Number.POSITIVE_INFINITY;const ue=U;ue.x=Number.NEGATIVE_INFINITY,ue.y=Number.NEGATIVE_INFINITY,ue.z=Number.NEGATIVE_INFINITY;let ce=Number.POSITIVE_INFINITY;const de=w*M,he=de+(T>0?2*w+2*M:0),me=new Array(he),ge=new Array(he),pe=new Array(he),xe=R?new Array(he):[],we=H?new Array(he):[];let ke=0,ye=M,Ie=0,be=w;V&&(--ke,++ye,--Ie,++be);const Ue=1e-5;for(let t=ke;t<ye;++t){let i=t;i<0&&(i=0),i>=M&&(i=M-1);let n=D.north-K*i;n=v?p(n):g-2*h(m(-n*B));let r=(n-E)/(F-E);r=s.CesiumMath.clamp(r,0,1);const l=t===ke,f=t===ye-1;T>0&&(l?n+=Ue*Q:f&&(n-=Ue*Q));const k=u(n),I=c(n),b=ie*I;let U;R&&(U=(o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(n)-le)*oe);for(let t=Ie;t<be;++t){let n=t;n<0&&(n=0),n>=w&&(n=w-1);const o=i*(w*Z)+n*Z;let h;if(1===X)h=x[o];else{let e;if(h=0,G)for(e=0;e<X;++e)h=h*j+x[o+e];else for(e=X-1;e>=0;--e)h=h*j+x[o+e]}h=h*Y+W,ne=Math.max(ne,h),ae=Math.min(ae,h);let m=D.west+J*n;v?m=p(m):m*=B;let g=(m-P)/(C-P);g=s.CesiumMath.clamp(g,0,1);let V=i*w+n;if(T>0){const e=t===Ie,a=t===be-1,r=l||f||e||a;if((l||f)&&(e||a))continue;r&&(h-=T,e?(V=de+(M-i-1),m-=Ue*q):f?V=de+M+(w-n-1):a?(V=de+M+w+i,m+=Ue*q):l&&(V=de+M+w+M+n))}const S=k*u(m),E=k*c(m),F=ee*S,N=te*E,O=1/d(F*S+N*E+b*I),L=F*O,z=N*O,_=b*O,Q=new e.Cartesian3;Q.x=L+S*h,Q.y=z+E*h,Q.z=_+I*h,a.Matrix4.multiplyByPoint(se,Q,y),e.Cartesian3.minimumByComponent(y,fe,fe),e.Cartesian3.maximumByComponent(y,ue,ue),ce=Math.min(ce,h),me[V]=Q,pe[V]=new a.Cartesian2(g,r),ge[V]=h,R&&(xe[V]=U),H&&(we[V]=A.geodeticSurfaceNormal(Q))}}const Me=i.BoundingSphere.fromPoints(me);let Te,Ve;if(n.defined(S)&&(Te=l.OrientedBoundingBox.fromRectangle(S,ae,ne,A)),O){Ve=new r.EllipsoidalOccluder(A).computeHorizonCullingPointPossiblyUnderEllipsoid(N,me,ae)}const ve=new t.AxisAlignedBoundingBox(fe,ue,N),Ae=new r.TerrainEncoding(N,ve,ce,ne,re,!1,R,H,L,z),Be=new Float32Array(he*Ae.stride);let De=0;for(let e=0;e<he;++e)De=Ae.encode(Be,De,me[e],pe[e],ge[e],void 0,xe[e],we[e]);return{vertices:Be,maximumHeight:ne,minimumHeight:ae,encoding:Ae,boundingSphere3D:Me,orientedBoundingBox:Te,occludeePointInScaledSpace:Ve}};var M,T=k,V={};M={get exports(){return V},set exports(e){V=e}},
define(["./Matrix3-d6f3913c","./AxisAlignedBoundingBox-680337b6","./Transforms-b7f686a8","./Matrix2-66622085","./defaultValue-040c41f9","./TerrainEncoding-ce59c054","./Math-8e567554","./OrientedBoundingBox-60a5c9a1","./WebMercatorProjection-53aa47d9","./RuntimeError-3c5db370","./createTaskProcessorWorker","./combine-6eb6e848","./AttributeCompression-5fa81749","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./EllipsoidTangentPlane-ae5d3d65","./IntersectionTests-7d927f09","./Plane-6aee7ffc"],(function(e,t,i,a,n,r,s,l,o,f,u,c,d,h,m,g,p,x){"use strict";var w=Object.freeze({NONE:0,LERC:1});const k={};k.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});const y=new e.Cartesian3,I=new a.Matrix4,b=new e.Cartesian3,U=new e.Cartesian3;k.computeVertices=function(f){const u=Math.cos,c=Math.sin,d=Math.sqrt,h=Math.atan,m=Math.exp,g=s.CesiumMath.PI_OVER_TWO,p=s.CesiumMath.toRadians,x=f.heightmap,w=f.width,M=f.height,T=f.skirtHeight,V=T>0,v=n.defaultValue(f.isGeographic,!0),A=n.defaultValue(f.ellipsoid,e.Ellipsoid.WGS84),B=1/A.maximumRadius,D=a.Rectangle.clone(f.nativeRectangle),S=a.Rectangle.clone(f.rectangle);let P,E,C,F;n.defined(S)?(P=S.west,E=S.south,C=S.east,F=S.north):v?(P=p(D.west),E=p(D.south),C=p(D.east),F=p(D.north)):(P=D.west*B,E=g-2*h(m(-D.south*B)),C=D.east*B,F=g-2*h(m(-D.north*B)));let N=f.relativeToCenter;const O=n.defined(N);N=O?N:e.Cartesian3.ZERO;const R=n.defaultValue(f.includeWebMercatorT,!1),L=n.defaultValue(f.exaggeration,1),z=n.defaultValue(f.exaggerationRelativeHeight,0),H=1!==L,_=n.defaultValue(f.structure,k.DEFAULT_STRUCTURE),Y=n.defaultValue(_.heightScale,k.DEFAULT_STRUCTURE.heightScale),W=n.defaultValue(_.heightOffset,k.DEFAULT_STRUCTURE.heightOffset),X=n.defaultValue(_.elementsPerHeight,k.DEFAULT_STRUCTURE.elementsPerHeight),Z=n.defaultValue(_.stride,k.DEFAULT_STRUCTURE.stride),j=n.defaultValue(_.elementMultiplier,k.DEFAULT_STRUCTURE.elementMultiplier),G=n.defaultValue(_.isBigEndian,k.DEFAULT_STRUCTURE.isBigEndian);let q=a.Rectangle.computeWidth(D),Q=a.Rectangle.computeHeight(D);const J=q/(w-1),K=Q/(M-1);v||(q*=B,Q*=B);const $=A.radiiSquared,ee=$.x,te=$.y,ie=$.z;let ae=65536,ne=-65536;const re=i.Transforms.eastNorthUpToFixedFrame(N,A),se=a.Matrix4.inverseTransformation(re,I);let le,oe;R&&(le=o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(E),oe=1/(o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(F)-le));const fe=b;fe.x=Number.POSITIVE_INFINITY,fe.y=Number.POSITIVE_INFINITY,fe.z=Number.POSITIVE_INFINITY;const ue=U;ue.x=Number.NEGATIVE_INFINITY,ue.y=Number.NEGATIVE_INFINITY,ue.z=Number.NEGATIVE_INFINITY;let ce=Number.POSITIVE_INFINITY;const de=w*M,he=de+(T>0?2*w+2*M:0),me=new Array(he),ge=new Array(he),pe=new Array(he),xe=R?new Array(he):[],we=H?new Array(he):[];let ke=0,ye=M,Ie=0,be=w;V&&(--ke,++ye,--Ie,++be);const Ue=1e-5;for(let t=ke;t<ye;++t){let i=t;i<0&&(i=0),i>=M&&(i=M-1);let n=D.north-K*i;n=v?p(n):g-2*h(m(-n*B));let r=(n-E)/(F-E);r=s.CesiumMath.clamp(r,0,1);const l=t===ke,f=t===ye-1;T>0&&(l?n+=Ue*Q:f&&(n-=Ue*Q));const k=u(n),I=c(n),b=ie*I;let U;R&&(U=(o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(n)-le)*oe);for(let t=Ie;t<be;++t){let n=t;n<0&&(n=0),n>=w&&(n=w-1);const o=i*(w*Z)+n*Z;let h;if(1===X)h=x[o];else{let e;if(h=0,G)for(e=0;e<X;++e)h=h*j+x[o+e];else for(e=X-1;e>=0;--e)h=h*j+x[o+e]}h=h*Y+W,ne=Math.max(ne,h),ae=Math.min(ae,h);let m=D.west+J*n;v?m=p(m):m*=B;let g=(m-P)/(C-P);g=s.CesiumMath.clamp(g,0,1);let V=i*w+n;if(T>0){const e=t===Ie,a=t===be-1,r=l||f||e||a;if((l||f)&&(e||a))continue;r&&(h-=T,e?(V=de+(M-i-1),m-=Ue*q):f?V=de+M+(w-n-1):a?(V=de+M+w+i,m+=Ue*q):l&&(V=de+M+w+M+n))}const S=k*u(m),E=k*c(m),F=ee*S,N=te*E,O=1/d(F*S+N*E+b*I),L=F*O,z=N*O,_=b*O,Q=new e.Cartesian3;Q.x=L+S*h,Q.y=z+E*h,Q.z=_+I*h,a.Matrix4.multiplyByPoint(se,Q,y),e.Cartesian3.minimumByComponent(y,fe,fe),e.Cartesian3.maximumByComponent(y,ue,ue),ce=Math.min(ce,h),me[V]=Q,pe[V]=new a.Cartesian2(g,r),ge[V]=h,R&&(xe[V]=U),H&&(we[V]=A.geodeticSurfaceNormal(Q))}}const Me=i.BoundingSphere.fromPoints(me);let Te,Ve;if(n.defined(S)&&(Te=l.OrientedBoundingBox.fromRectangle(S,ae,ne,A)),O){Ve=new r.EllipsoidalOccluder(A).computeHorizonCullingPointPossiblyUnderEllipsoid(N,me,ae)}const ve=new t.AxisAlignedBoundingBox(fe,ue,N),Ae=new r.TerrainEncoding(N,ve,ce,ne,re,!1,R,H,L,z),Be=new Float32Array(he*Ae.stride);let De=0;for(let e=0;e<he;++e)De=Ae.encode(Be,De,me[e],pe[e],ge[e],void 0,xe[e],we[e]);return{vertices:Be,maximumHeight:ne,minimumHeight:ae,encoding:Ae,boundingSphere3D:Me,orientedBoundingBox:Te,occludeePointInScaledSpace:Ve}};var M,T=k,V={};M={get exports(){return V},set exports(e){V=e}},
/* Copyright 2015-2018 Esri. 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 @preserve */
function(){var e,t,i,a,n,r,s,l,o,f,u,c,d,h,m,g,p=(e={defaultNoDataValue:-34027999387901484e22,decode:function(r,s){var l=(s=s||{}).encodedMaskData||null===s.encodedMaskData,o=n(r,s.inputOffset||0,l),f=null!==s.noDataValue?s.noDataValue:e.defaultNoDataValue,u=t(o,s.pixelType||Float32Array,s.encodedMaskData,f,s.returnMask),c={width:o.width,height:o.height,pixelData:u.resultPixels,minValue:u.minValue,maxValue:o.pixels.maxValue,noDataValue:f};return u.resultMask&&(c.maskData=u.resultMask),s.returnEncodedMask&&o.mask&&(c.encodedMaskData=o.mask.bitset?o.mask.bitset:null),s.returnFileInfo&&(c.fileInfo=i(o),s.computeUsedBitDepths&&(c.fileInfo.bitDepths=a(o))),c}},t=function(e,t,i,a,n){var s,l,o,f=0,u=e.pixels.numBlocksX,c=e.pixels.numBlocksY,d=Math.floor(e.width/u),h=Math.floor(e.height/c),m=2*e.maxZError,g=Number.MAX_VALUE;i=i||(e.mask?e.mask.bitset:null),l=new t(e.width*e.height),n&&i&&(o=new Uint8Array(e.width*e.height));for(var p,x,w=new Float32Array(d*h),k=0;k<=c;k++){var y=k!==c?h:e.height%c;if(0!==y)for(var I=0;I<=u;I++){var b=I!==u?d:e.width%u;if(0!==b){var U,M,T,V,v=k*e.width*h+I*d,A=e.width-b,B=e.pixels.blocks[f];if(B.encoding<2?(0===B.encoding?U=B.rawData:(r(B.stuffedData,B.bitsPerPixel,B.numValidPixels,B.offset,m,w,e.pixels.maxValue),U=w),M=0):T=2===B.encoding?0:B.offset,i)for(x=0;x<y;x++){for(7&v&&(V=i[v>>3],V<<=7&v),p=0;p<b;p++)7&v||(V=i[v>>3]),128&V?(o&&(o[v]=1),g=g>(s=B.encoding<2?U[M++]:T)?s:g,l[v++]=s):(o&&(o[v]=0),l[v++]=a),V<<=1;v+=A}else if(B.encoding<2)for(x=0;x<y;x++){for(p=0;p<b;p++)g=g>(s=U[M++])?s:g,l[v++]=s;v+=A}else for(g=g>T?T:g,x=0;x<y;x++){for(p=0;p<b;p++)l[v++]=T;v+=A}if(1===B.encoding&&M!==B.numValidPixels)throw"Block and Mask do not match";f++}}}return{resultPixels:l,resultMask:o,minValue:g}},i=function(e){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,noDataValue:e.noDataValue}}},a=function(e){for(var t=e.pixels.numBlocksX*e.pixels.numBlocksY,i={},a=0;a<t;a++){var n=e.pixels.blocks[a];0===n.encoding?i.float32=!0:1===n.encoding?i[n.bitsPerPixel]=!0:i[0]=!0}return Object.keys(i)},n=function(e,t,i){var a={},n=new Uint8Array(e,t,10);if(a.fileIdentifierString=String.fromCharCode.apply(null,n),"CntZImage"!==a.fileIdentifierString.trim())throw"Unexpected file identifier string: "+a.fileIdentifierString;t+=10;var r=new DataView(e,t,24);if(a.fileVersion=r.getInt32(0,!0),a.imageType=r.getInt32(4,!0),a.height=r.getUint32(8,!0),a.width=r.getUint32(12,!0),a.maxZError=r.getFloat64(16,!0),t+=24,!i)if(r=new DataView(e,t,16),a.mask={},a.mask.numBlocksY=r.getUint32(0,!0),a.mask.numBlocksX=r.getUint32(4,!0),a.mask.numBytes=r.getUint32(8,!0),a.mask.maxValue=r.getFloat32(12,!0),t+=16,a.mask.numBytes>0){var s=new Uint8Array(Math.ceil(a.width*a.height/8)),l=(r=new DataView(e,t,a.mask.numBytes)).getInt16(0,!0),o=2,f=0;do{if(l>0)for(;l--;)s[f++]=r.getUint8(o++);else{var u=r.getUint8(o++);for(l=-l;l--;)s[f++]=u}l=r.getInt16(o,!0),o+=2}while(o<a.mask.numBytes);if(-32768!==l||f<s.length)throw"Unexpected end of mask RLE encoding";a.mask.bitset=s,t+=a.mask.numBytes}else 0==(a.mask.numBytes|a.mask.numBlocksY|a.mask.maxValue)&&(a.mask.bitset=new Uint8Array(Math.ceil(a.width*a.height/8)));r=new DataView(e,t,16),a.pixels={},a.pixels.numBlocksY=r.getUint32(0,!0),a.pixels.numBlocksX=r.getUint32(4,!0),a.pixels.numBytes=r.getUint32(8,!0),a.pixels.maxValue=r.getFloat32(12,!0),t+=16;var c=a.pixels.numBlocksX,d=a.pixels.numBlocksY,h=c+(a.width%c>0?1:0),m=d+(a.height%d>0?1:0);a.pixels.blocks=new Array(h*m);for(var g=0,p=0;p<m;p++)for(var x=0;x<h;x++){var w=0,k=e.byteLength-t;r=new DataView(e,t,Math.min(10,k));var y={};a.pixels.blocks[g++]=y;var I=r.getUint8(0);if(w++,y.encoding=63&I,y.encoding>3)throw"Invalid block encoding ("+y.encoding+")";if(2!==y.encoding){if(0!==I&&2!==I){if(I>>=6,y.offsetType=I,2===I)y.offset=r.getInt8(1),w++;else if(1===I)y.offset=r.getInt16(1,!0),w+=2;else{if(0!==I)throw"Invalid block offset type";y.offset=r.getFloat32(1,!0),w+=4}if(1===y.encoding)if(I=r.getUint8(w),w++,y.bitsPerPixel=63&I,I>>=6,y.numValidPixelsType=I,2===I)y.numValidPixels=r.getUint8(w),w++;else if(1===I)y.numValidPixels=r.getUint16(w,!0),w+=2;else{if(0!==I)throw"Invalid valid pixel count type";y.numValidPixels=r.getUint32(w,!0),w+=4}}var b;if(t+=w,3!==y.encoding)if(0===y.encoding){var U=(a.pixels.numBytes-1)/4;if(U!==Math.floor(U))throw"uncompressed block has invalid length";b=new ArrayBuffer(4*U),new Uint8Array(b).set(new Uint8Array(e,t,4*U));var M=new Float32Array(b);y.rawData=M,t+=4*U}else if(1===y.encoding){var T=Math.ceil(y.numValidPixels*y.bitsPerPixel/8),V=Math.ceil(T/4);b=new ArrayBuffer(4*V),new Uint8Array(b).set(new Uint8Array(e,t,T)),y.stuffedData=new Uint32Array(b),t+=T}}else t++}return a.eofOffset=t,a},r=function(e,t,i,a,n,r,s){var l,o,f,u=(1<<t)-1,c=0,d=0,h=Math.ceil((s-a)/n),m=4*e.length-Math.ceil(t*i/8);for(e[e.length-1]<<=8*m,l=0;l<i;l++){if(0===d&&(f=e[c++],d=32),d>=t)o=f>>>d-t&u,d-=t;else{var g=t-d;o=(f&u)<<g&u,o+=(f=e[c++])>>>(d=32-g)}r[l]=o<h?a+o*n:s}return r},e),x=(s=function(e,t,i,a,n,r,s,l){var o,f,u,c,d,h=(1<<i)-1,m=0,g=0,p=4*e.length-Math.ceil(i*a/8);if(e[e.length-1]<<=8*p,n)for(o=0;o<a;o++)0===g&&(u=e[m++],g=32),g>=i?(f=u>>>g-i&h,g-=i):(f=(u&h)<<(c=i-g)&h,f+=(u=e[m++])>>>(g=32-c)),t[o]=n[f];else for(d=Math.ceil((l-r)/s),o=0;o<a;o++)0===g&&(u=e[m++],g=32),g>=i?(f=u>>>g-i&h,g-=i):(f=(u&h)<<(c=i-g)&h,f+=(u=e[m++])>>>(g=32-c)),t[o]=f<d?r+f*s:l},l=function(e,t,i,a,n,r){var s,l=(1<<t)-1,o=0,f=0,u=0,c=0,d=0,h=[],m=4*e.length-Math.ceil(t*i/8);e[e.length-1]<<=8*m;var g=Math.ceil((r-a)/n);for(f=0;f<i;f++)0===c&&(s=e[o++],c=32),c>=t?(d=s>>>c-t&l,c-=t):(d=(s&l)<<(u=t-c)&l,d+=(s=e[o++])>>>(c=32-u)),h[f]=d<g?a+d*n:r;return h.unshift(a),h},o=function(e,t,i,a,n,r,s,l){var o,f,u,c,d=(1<<i)-1,h=0,m=0,g=0;if(n)for(o=0;o<a;o++)0===m&&(u=e[h++],m=32,g=0),m>=i?(f=u>>>g&d,m-=i,g+=i):(f=u>>>g&d,m=32-(c=i-m),f|=((u=e[h++])&(1<<c)-1)<<i-c,g=c),t[o]=n[f];else{var p=Math.ceil((l-r)/s);for(o=0;o<a;o++)0===m&&(u=e[h++],m=32,g=0),m>=i?(f=u>>>g&d,m-=i,g+=i):(f=u>>>g&d,m=32-(c=i-m),f|=((u=e[h++])&(1<<c)-1)<<i-c,g=c),t[o]=f<p?r+f*s:l}return t},f=function(e,t,i,a,n,r){var s,l=(1<<t)-1,o=0,f=0,u=0,c=0,d=0,h=0,m=[],g=Math.ceil((r-a)/n);for(f=0;f<i;f++)0===c&&(s=e[o++],c=32,h=0),c>=t?(d=s>>>h&l,c-=t,h+=t):(d=s>>>h&l,c=32-(u=t-c),d|=((s=e[o++])&(1<<u)-1)<<t-u,h=u),m[f]=d<g?a+d*n:r;return m.unshift(a),m},u=function(e,t,i,a){var n,r,s,l,o=(1<<i)-1,f=0,u=0,c=4*e.length-Math.ceil(i*a/8);for(e[e.length-1]<<=8*c,n=0;n<a;n++)0===u&&(s=e[f++],u=32),u>=i?(r=s>>>u-i&o,u-=i):(r=(s&o)<<(l=i-u)&o,r+=(s=e[f++])>>>(u=32-l)),t[n]=r;return t},c=function(e,t,i,a){var n,r,s,l,o=(1<<i)-1,f=0,u=0,c=0;for(n=0;n<a;n++)0===u&&(s=e[f++],u=32,c=0),u>=i?(r=s>>>c&o,u-=i,c+=i):(r=s>>>c&o,u=32-(l=i-u),r|=((s=e[f++])&(1<<l)-1)<<i-l,c=l),t[n]=r;return t},d={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(e){for(var t=65535,i=65535,a=e.length,n=Math.floor(a/2),r=0;n;){var s=n>=359?359:n;n-=s;do{t+=e[r++]<<8,i+=t+=e[r++]}while(--s);t=(65535&t)+(t>>>16),i=(65535&i)+(i>>>16)}return 1&a&&(i+=t+=e[r]<<8),((i=(65535&i)+(i>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var i=t.ptr,a=new Uint8Array(e,i,6),n={};if(n.fileIdentifierString=String.fromCharCode.apply(null,a),0!==n.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+n.fileIdentifierString;i+=6;var r,s=new DataView(e,i,8),l=s.getInt32(0,!0);if(n.fileVersion=l,i+=4,l>=3&&(n.checksum=s.getUint32(4,!0),i+=4),s=new DataView(e,i,12),n.height=s.getUint32(0,!0),n.width=s.getUint32(4,!0),i+=8,l>=4?(n.numDims=s.getUint32(8,!0),i+=4):n.numDims=1,s=new DataView(e,i,40),n.numValidPixel=s.getUint32(0,!0),n.microBlockSize=s.getInt32(4,!0),n.blobSize=s.getInt32(8,!0),n.imageType=s.getInt32(12,!0),n.maxZError=s.getFloat64(16,!0),n.zMin=s.getFloat64(24,!0),n.zMax=s.getFloat64(32,!0),i+=40,t.headerInfo=n,t.ptr=i,l>=3&&(r=l>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,i-r,n.blobSize-14))!==n.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var i=t.headerInfo,a=this.getDataTypeArray(i.imageType),n=i.numDims*this.getDataTypeSize(i.imageType),r=this.readSubArray(e,t.ptr,a,n),s=this.readSubArray(e,t.ptr+n,a,n);t.ptr+=2*n;var l,o=!0;for(l=0;l<i.numDims;l++)if(r[l]!==s[l]){o=!1;break}return i.minValues=r,i.maxValues=s,o},readSubArray:function(e,t,i,a){var n;if(i===Uint8Array)n=new Uint8Array(e,t,a);else{var r=new ArrayBuffer(a);new Uint8Array(r).set(new Uint8Array(e,t,a)),n=new i(r)}return n},readMask:function(e,t){var i,a,n=t.ptr,r=t.headerInfo,s=r.width*r.height,l=r.numValidPixel,o=new DataView(e,n,4),f={};if(f.numBytes=o.getUint32(0,!0),n+=4,(0===l||s===l)&&0!==f.numBytes)throw"invalid mask";if(0===l)i=new Uint8Array(Math.ceil(s/8)),f.bitset=i,a=new Uint8Array(s),t.pixels.resultMask=a,n+=f.numBytes;else if(f.numBytes>0){i=new Uint8Array(Math.ceil(s/8));var u=(o=new DataView(e,n,f.numBytes)).getInt16(0,!0),c=2,d=0,h=0;do{if(u>0)for(;u--;)i[d++]=o.getUint8(c++);else for(h=o.getUint8(c++),u=-u;u--;)i[d++]=h;u=o.getInt16(c,!0),c+=2}while(c<f.numBytes);if(-32768!==u||d<i.length)throw"Unexpected end of mask RLE encoding";a=new Uint8Array(s);var m=0,g=0;for(g=0;g<s;g++)7&g?(m=i[g>>3],m<<=7&g):m=i[g>>3],128&m&&(a[g]=1);t.pixels.resultMask=a,f.bitset=i,n+=f.numBytes}return t.ptr=n,t.mask=f,!0},readDataOneSweep:function(e,t,i){var a,n=t.ptr,r=t.headerInfo,s=r.numDims,l=r.width*r.height,o=r.imageType,f=r.numValidPixel*d.getDataTypeSize(o)*s,u=t.pixels.resultMask;if(i===Uint8Array)a=new Uint8Array(e,n,f);else{var c=new ArrayBuffer(f);new Uint8Array(c).set(new Uint8Array(e,n,f)),a=new i(c)}if(a.length===l*s)t.pixels.resultPixels=a;else{t.pixels.resultPixels=new i(l*s);var h=0,m=0,g=0,p=0;if(s>1)for(g=0;g<s;g++)for(p=g*l,m=0;m<l;m++)u[m]&&(t.pixels.resultPixels[p+m]=a[h++]);else for(m=0;m<l;m++)u[m]&&(t.pixels.resultPixels[m]=a[h++])}return n+=f,t.ptr=n,!0},readHuffmanTree:function(e,t){var i=this.HUFFMAN_LUT_BITS_MAX,a=new DataView(e,t.ptr,16);if(t.ptr+=16,a.getInt32(0,!0)<2)throw"unsupported Huffman version";var n=a.getInt32(4,!0),r=a.getInt32(8,!0),s=a.getInt32(12,!0);if(r>=s)return!1;var l=new Uint32Array(s-r);d.decodeBits(e,t,l);var o,f,u,c,m=[];for(o=r;o<s;o++)m[f=o-(o<n?0:n)]={first:l[o-r],second:null};var g=e.byteLength-t.ptr,p=Math.ceil(g/4),x=new ArrayBuffer(4*p);new Uint8Array(x).set(new Uint8Array(e,t.ptr,g));var w,k=new Uint32Array(x),y=0,I=0;for(w=k[0],o=r;o<s;o++)(c=m[f=o-(o<n?0:n)].first)>0&&(m[f].second=w<<y>>>32-c,32-y>=c?32===(y+=c)&&(y=0,w=k[++I]):(y+=c-32,w=k[++I],m[f].second|=w>>>32-y));var b=0,U=0,M=new h;for(o=0;o<m.length;o++)void 0!==m[o]&&(b=Math.max(b,m[o].first));U=b>=i?i:b,b>=30&&console.log("WARning, large NUM LUT BITS IS "+b);var T,V,v,A,B,D=[];for(o=r;o<s;o++)if((c=m[f=o-(o<n?0:n)].first)>0)if(T=[c,f],c<=U)for(V=m[f].second<<U-c,v=1<<U-c,u=0;u<v;u++)D[V|u]=T;else for(V=m[f].second,B=M,A=c-1;A>=0;A--)V>>>A&1?(B.right||(B.right=new h),B=B.right):(B.left||(B.left=new h),B=B.left),0!==A||B.val||(B.val=T[1]);return{decodeLut:D,numBitsLUTQick:U,numBitsLUT:b,tree:M,stuffedData:k,srcPtr:I,bitPos:y}},readHuffman:function(e,t,i){var a,n,r,s,l,o,f,u,c,d=t.headerInfo,h=d.numDims,m=t.headerInfo.height,g=t.headerInfo.width,p=g*m,x=this.readHuffmanTree(e,t),w=x.decodeLut,k=x.tree,y=x.stuffedData,I=x.srcPtr,b=x.bitPos,U=x.numBitsLUTQick,M=x.numBitsLUT,T=0===t.headerInfo.imageType?128:0,V=t.pixels.resultMask,v=0;b>0&&(I++,b=0);var A,B=y[I],D=1===t.encodeMode,S=new i(p*h),P=S;for(A=0;A<d.numDims;A++){if(h>1&&(P=new i(S.buffer,p*A,p),v=0),t.headerInfo.numValidPixel===g*m)for(u=0,o=0;o<m;o++)for(f=0;f<g;f++,u++){if(n=0,l=s=B<<b>>>32-U,32-b<U&&(l=s|=y[I+1]>>>64-b-U),w[l])n=w[l][1],b+=w[l][0];else for(l=s=B<<b>>>32-M,32-b<M&&(l=s|=y[I+1]>>>64-b-M),a=k,c=0;c<M;c++)if(!(a=s>>>M-c-1&1?a.right:a.left).left&&!a.right){n=a.val,b=b+c+1;break}b>=32&&(b-=32,B=y[++I]),r=n-T,D?(r+=f>0?v:o>0?P[u-g]:v,r&=255,P[u]=r,v=r):P[u]=r}else for(u=0,o=0;o<m;o++)for(f=0;f<g;f++,u++)if(V[u]){if(n=0,l=s=B<<b>>>32-U,32-b<U&&(l=s|=y[I+1]>>>64-b-U),w[l])n=w[l][1],b+=w[l][0];else for(l=s=B<<b>>>32-M,32-b<M&&(l=s|=y[I+1]>>>64-b-M),a=k,c=0;c<M;c++)if(!(a=s>>>M-c-1&1?a.right:a.left).left&&!a.right){n=a.val,b=b+c+1;break}b>=32&&(b-=32,B=y[++I]),r=n-T,D?(f>0&&V[u-1]?r+=v:o>0&&V[u-g]?r+=P[u-g]:r+=v,r&=255,P[u]=r,v=r):P[u]=r}t.ptr=t.ptr+4*(I+1)+(b>0?4:0)}t.pixels.resultPixels=S},decodeBits:function(e,t,i,a,n){var r=t.headerInfo,d=r.fileVersion,h=0,m=new DataView(e,t.ptr,5),g=m.getUint8(0);h++;var p=g>>6,x=0===p?4:3-p,w=(32&g)>0,k=31&g,y=0;if(1===x)y=m.getUint8(h),h++;else if(2===x)y=m.getUint16(h,!0),h+=2;else{if(4!==x)throw"Invalid valid pixel count type";y=m.getUint32(h,!0),h+=4}var I,b,U,M,T,V,v,A,B,D=2*r.maxZError,S=r.numDims>1?r.maxValues[n]:r.zMax;if(w){for(t.counter.lut++,A=m.getUint8(h),h++,M=Math.ceil((A-1)*k/8),T=Math.ceil(M/4),b=new ArrayBuffer(4*T),U=new Uint8Array(b),t.ptr+=h,U.set(new Uint8Array(e,t.ptr,M)),v=new Uint32Array(b),t.ptr+=M,B=0;A-1>>>B;)B++;M=Math.ceil(y*B/8),T=Math.ceil(M/4),b=new ArrayBuffer(4*T),(U=new Uint8Array(b)).set(new Uint8Array(e,t.ptr,M)),I=new Uint32Array(b),t.ptr+=M,V=d>=3?f(v,k,A-1,a,D,S):l(v,k,A-1,a,D,S),d>=3?o(I,i,B,y,V):s(I,i,B,y,V)}else t.counter.bitstuffer++,B=k,t.ptr+=h,B>0&&(M=Math.ceil(y*B/8),T=Math.ceil(M/4),b=new ArrayBuffer(4*T),(U=new Uint8Array(b)).set(new Uint8Array(e,t.ptr,M)),I=new Uint32Array(b),t.ptr+=M,d>=3?null==a?c(I,i,B,y):o(I,i,B,y,!1,a,D,S):null==a?u(I,i,B,y):s(I,i,B,y,!1,a,D,S))},readTiles:function(e,t,i){var a=t.headerInfo,n=a.width,r=a.height,s=a.microBlockSize,l=a.imageType,o=d.getDataTypeSize(l),f=Math.ceil(n/s),u=Math.ceil(r/s);t.pixels.numBlocksY=u,t.pixels.numBlocksX=f,t.pixels.ptr=0;var c,h,m,g,p,x,w,k,y=0,I=0,b=0,U=0,M=0,T=0,V=0,v=0,A=0,B=0,D=0,S=0,P=0,E=0,C=0,F=new i(s*s),N=r%s||s,O=n%s||s,R=a.numDims,L=t.pixels.resultMask,z=t.pixels.resultPixels;for(b=0;b<u;b++)for(M=b!==u-1?s:N,U=0;U<f;U++)for(B=b*n*s+U*s,D=n-(T=U!==f-1?s:O),k=0;k<R;k++){if(R>1&&(z=new i(t.pixels.resultPixels.buffer,n*r*k*o,n*r)),V=e.byteLength-t.ptr,h={},C=0,C++,A=(v=(c=new DataView(e,t.ptr,Math.min(10,V))).getUint8(0))>>6&255,(v>>2&15)!=(U*s>>3&15))throw"integrity issue";if((p=3&v)>3)throw t.ptr+=C,"Invalid block encoding ("+p+")";if(2!==p)if(0===p){if(t.counter.uncompressed++,t.ptr+=C,S=(S=M*T*o)<(P=e.byteLength-t.ptr)?S:P,m=new ArrayBuffer(S%o==0?S:S+o-S%o),new Uint8Array(m).set(new Uint8Array(e,t.ptr,S)),g=new i(m),E=0,L)for(y=0;y<M;y++){for(I=0;I<T;I++)L[B]&&(z[B]=g[E++]),B++;B+=D}else for(y=0;y<M;y++){for(I=0;I<T;I++)z[B++]=g[E++];B+=D}t.ptr+=E*o}else if(x=d.getDataTypeUsed(l,A),w=d.getOnePixel(h,C,x,c),C+=d.getDataTypeSize(x),3===p)if(t.ptr+=C,t.counter.constantoffset++,L)for(y=0;y<M;y++){for(I=0;I<T;I++)L[B]&&(z[B]=w),B++;B+=D}else for(y=0;y<M;y++){for(I=0;I<T;I++)z[B++]=w;B+=D}else if(t.ptr+=C,d.decodeBits(e,t,F,w,k),C=0,L)for(y=0;y<M;y++){for(I=0;I<T;I++)L[B]&&(z[B]=F[C++]),B++;B+=D}else for(y=0;y<M;y++){for(I=0;I<T;I++)z[B++]=F[C++];B+=D}else t.counter.constant++,t.ptr+=C}},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:d.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e){var t=e.headerInfo.zMax,i=e.headerInfo.numDims,a=e.headerInfo.height*e.headerInfo.width,n=a*i,r=0,s=0,l=0,o=e.pixels.resultMask;if(o)if(i>1)for(r=0;r<i;r++)for(l=r*a,s=0;s<a;s++)o[s]&&(e.pixels.resultPixels[l+s]=t);else for(s=0;s<a;s++)o[s]&&(e.pixels.resultPixels[s]=t);else if(e.pixels.resultPixels.fill)e.pixels.resultPixels.fill(t);else for(s=0;s<n;s++)e.pixels.resultPixels[s]=t},getDataTypeArray:function(e){var t;switch(e){case 0:t=Int8Array;break;case 1:t=Uint8Array;break;case 2:t=Int16Array;break;case 3:t=Uint16Array;break;case 4:t=Int32Array;break;case 5:t=Uint32Array;break;case 6:default:t=Float32Array;break;case 7:t=Float64Array}return t},getPixelType:function(e){var t;switch(e){case 0:t="S8";break;case 1:t="U8";break;case 2:t="S16";break;case 3:t="U16";break;case 4:t="S32";break;case 5:t="U32";break;case 6:default:t="F32";break;case 7:t="F64"}return t},isValidPixelValue:function(e,t){if(null==t)return!1;var i;switch(e){case 0:i=t>=-128&&t<=127;break;case 1:i=t>=0&&t<=255;break;case 2:i=t>=-32768&&t<=32767;break;case 3:i=t>=0&&t<=65536;break;case 4:i=t>=-2147483648&&t<=2147483647;break;case 5:i=t>=0&&t<=4294967296;break;case 6:i=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:i=t>=5e-324&&t<=17976931348623157e292;break;default:i=!1}return i},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var i=e;switch(e){case 2:case 4:i=e-t;break;case 3:case 5:i=e-2*t;break;case 6:i=0===t?e:1===t?2:1;break;case 7:i=0===t?e:e-2*t+1;break;default:i=e}return i},getOnePixel:function(e,t,i,a){var n=0;switch(i){case 0:n=a.getInt8(t);break;case 1:n=a.getUint8(t);break;case 2:n=a.getInt16(t,!0);break;case 3:n=a.getUint16(t,!0);break;case 4:n=a.getInt32(t,!0);break;case 5:n=a.getUInt32(t,!0);break;case 6:n=a.getFloat32(t,!0);break;case 7:n=a.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return n}},h=function(e,t,i){this.val=e,this.left=t,this.right=i},{decode:function(e,t){var i=(t=t||{}).noDataValue,a=0,n={};n.ptr=t.inputOffset||0,n.pixels={},d.readHeaderInfo(e,n);var r=n.headerInfo,s=r.fileVersion,l=d.getDataTypeArray(r.imageType);d.readMask(e,n),r.numValidPixel===r.width*r.height||n.pixels.resultMask||(n.pixels.resultMask=t.maskData);var o,f=r.width*r.height;if(n.pixels.resultPixels=new l(f*r.numDims),n.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==r.numValidPixel)if(r.zMax===r.zMin)d.constructConstantSurface(n);else if(s>=4&&d.checkMinMaxRanges(e,n))d.constructConstantSurface(n);else{var u=new DataView(e,n.ptr,2),c=u.getUint8(0);if(n.ptr++,c)d.readDataOneSweep(e,n,l);else if(s>1&&r.imageType<=1&&Math.abs(r.maxZError-.5)<1e-5){var h=u.getUint8(1);if(n.ptr++,n.encodeMode=h,h>2||s<4&&h>1)throw"Invalid Huffman flag "+h;h?d.readHuffman(e,n,l):d.readTiles(e,n,l)}else d.readTiles(e,n,l)}n.eofOffset=n.ptr,t.inputOffset?(o=n.headerInfo.blobSize+t.inputOffset-n.ptr,Math.abs(o)>=1&&(n.eofOffset=t.inputOffset+n.headerInfo.blobSize)):(o=n.headerInfo.blobSize-n.ptr,Math.abs(o)>=1&&(n.eofOffset=n.headerInfo.blobSize));var m={width:r.width,height:r.height,pixelData:n.pixels.resultPixels,minValue:r.zMin,maxValue:r.zMax,validPixelCount:r.numValidPixel,dimCount:r.numDims,dimStats:{minValues:r.minValues,maxValues:r.maxValues},maskData:n.pixels.resultMask};if(n.pixels.resultMask&&d.isValidPixelValue(r.imageType,i)){var g=n.pixels.resultMask;for(a=0;a<f;a++)g[a]||(m.pixelData[a]=i);m.noDataValue=i}return n.noDataValue=i,t.returnFileInfo&&(m.fileInfo=d.formatFileInfo(n)),m},getBandCount:function(e){for(var t=0,i=0,a={ptr:0,pixels:{}};i<e.byteLength-58;)d.readHeaderInfo(e,a),i+=a.headerInfo.blobSize,t++,a.ptr=i;return t}}),w=(m=new ArrayBuffer(4),g=new Uint8Array(m),new Uint32Array(m)[0]=1,1===g[0]),k={decode:function(e,t){if(!w)throw"Big endian system is not supported.";var i,a,n=(t=t||{}).inputOffset||0,r=new Uint8Array(e,n,10),s=String.fromCharCode.apply(null,r);if("CntZImage"===s.trim())i=p,a=1;else{if("Lerc2"!==s.substring(0,5))throw"Unexpected file identifier string: "+s;i=x,a=2}for(var l,o,f,u,c,d,h=0,m=e.byteLength-10,g=[],k={width:0,height:0,pixels:[],pixelType:t.pixelType,mask:null,statistics:[]};n<m;){var y=i.decode(e,{inputOffset:n,encodedMaskData:l,maskData:f,returnMask:0===h,returnEncodedMask:0===h,returnFileInfo:!0,pixelType:t.pixelType||null,noDataValue:t.noDataValue||null});n=y.fileInfo.eofOffset,0===h&&(l=y.encodedMaskData,f=y.maskData,k.width=y.width,k.height=y.height,k.dimCount=y.dimCount||1,k.pixelType=y.pixelType||y.fileInfo.pixelType,k.mask=y.maskData),a>1&&y.fileInfo.mask&&y.fileInfo.mask.numBytes>0&&g.push(y.maskData),h++,k.pixels.push(y.pixelData),k.statistics.push({minValue:y.minValue,maxValue:y.maxValue,noDataValue:y.noDataValue,dimStats:y.dimStats})}if(a>1&&g.length>1){for(d=k.width*k.height,k.bandMasks=g,(f=new Uint8Array(d)).set(g[0]),u=1;u<g.length;u++)for(o=g[u],c=0;c<d;c++)f[c]=f[c]&o[c];k.maskData=f}return k}};M.exports?M.exports=k:this.Lerc=k}();var v=V;return u((function(t,i){if(t.encoding===w.LERC){let e;try{e=v.decode(t.heightmap)}catch(e){throw new f.RuntimeError(e)}if(e.statistics[0].minValue===Number.MAX_VALUE)throw new f.RuntimeError("Invalid tile data");t.heightmap=e.pixels[0],t.width=e.width,t.height=e.height}t.ellipsoid=e.Ellipsoid.clone(t.ellipsoid),t.rectangle=a.Rectangle.clone(t.rectangle);const n=T.computeVertices(t),r=n.vertices;return i.push(r.buffer),{vertices:r.buffer,numberOfAttributes:n.encoding.stride,minimumHeight:n.minimumHeight,maximumHeight:n.maximumHeight,gridWidth:t.width,gridHeight:t.height,boundingSphere3D:n.boundingSphere3D,orientedBoundingBox:n.orientedBoundingBox,occludeePointInScaledSpace:n.occludeePointInScaledSpace,encoding:n.encoding,westIndicesSouthToNorth:n.westIndicesSouthToNorth,southIndicesEastToWest:n.southIndicesEastToWest,eastIndicesNorthToSouth:n.eastIndicesNorthToSouth,northIndicesWestToEast:n.northIndicesWestToEast}}))}));

@@ -1,1 +0,1 @@

define(["./AxisAlignedBoundingBox-ba8ff526","./Matrix2-66622085","./Matrix3-d6f3913c","./defaultValue-040c41f9","./TerrainEncoding-99f48506","./IndexDatatype-eddea9c9","./Math-8e567554","./Transforms-b1441a66","./WebMercatorProjection-53aa47d9","./createTaskProcessorWorker","./RuntimeError-3c5db370","./AttributeCompression-5fa81749","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./combine-6eb6e848"],(function(e,t,r,n,o,i,a,s,c,d,h,u,l,I,g){"use strict";function m(){s.DeveloperError.throwInstantiationError()}Object.defineProperties(m.prototype,{errorEvent:{get:s.DeveloperError.throwInstantiationError},credit:{get:s.DeveloperError.throwInstantiationError},tilingScheme:{get:s.DeveloperError.throwInstantiationError},ready:{get:s.DeveloperError.throwInstantiationError},readyPromise:{get:s.DeveloperError.throwInstantiationError},hasWaterMask:{get:s.DeveloperError.throwInstantiationError},hasVertexNormals:{get:s.DeveloperError.throwInstantiationError},availability:{get:s.DeveloperError.throwInstantiationError}});const T=[];m.getRegularGridIndices=function(e,t){let r=T[e];n.defined(r)||(T[e]=r=[]);let o=r[t];return n.defined(o)||(o=e*t<a.CesiumMath.SIXTY_FOUR_KILOBYTES?r[t]=new Uint16Array((e-1)*(t-1)*6):r[t]=new Uint32Array((e-1)*(t-1)*6),y(e,t,o,0)),o};const f=[];m.getRegularGridIndicesAndEdgeIndices=function(e,t){let r=f[e];n.defined(r)||(f[e]=r=[]);let o=r[t];if(!n.defined(o)){const n=m.getRegularGridIndices(e,t),i=p(e,t),a=i.westIndicesSouthToNorth,s=i.southIndicesEastToWest,c=i.eastIndicesNorthToSouth,d=i.northIndicesWestToEast;o=r[t]={indices:n,westIndicesSouthToNorth:a,southIndicesEastToWest:s,eastIndicesNorthToSouth:c,northIndicesWestToEast:d}}return o};const E=[];function p(e,t){const r=new Array(t),n=new Array(e),o=new Array(t),i=new Array(e);let a;for(a=0;a<e;++a)i[a]=a,n[a]=e*t-1-a;for(a=0;a<t;++a)o[a]=(a+1)*e-1,r[a]=(t-a-1)*e;return{westIndicesSouthToNorth:r,southIndicesEastToWest:n,eastIndicesNorthToSouth:o,northIndicesWestToEast:i}}function y(e,t,r,n){let o=0;for(let i=0;i<t-1;++i){for(let t=0;t<e-1;++t){const t=o,i=t+e,a=i+1,s=t+1;r[n++]=t,r[n++]=i,r[n++]=s,r[n++]=s,r[n++]=i,r[n++]=a,++o}++o}}function N(e,t,r,n){let o=e[0];const i=e.length;for(let a=1;a<i;++a){const i=e[a];r[n++]=o,r[n++]=i,r[n++]=t,r[n++]=t,r[n++]=i,r[n++]=t+1,o=i,++t}return n}m.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){let r=E[e];n.defined(r)||(E[e]=r=[]);let o=r[t];if(!n.defined(o)){const n=e*t,a=(e-1)*(t-1)*6,s=2*e+2*t,c=n+s,d=a+6*Math.max(0,s-4),h=p(e,t),u=h.westIndicesSouthToNorth,l=h.southIndicesEastToWest,I=h.eastIndicesNorthToSouth,g=h.northIndicesWestToEast,T=i.IndexDatatype.createTypedArray(c,d);y(e,t,T,0),m.addSkirtIndices(u,l,I,g,n,T,a),o=r[t]={indices:T,westIndicesSouthToNorth:u,southIndicesEastToWest:l,eastIndicesNorthToSouth:I,northIndicesWestToEast:g,indexCountWithoutSkirts:a}}return o},m.addSkirtIndices=function(e,t,r,n,o,i,a){let s=o;a=N(e,s,i,a),s+=e.length,a=N(t,s,i,a),s+=t.length,a=N(r,s,i,a),s+=r.length,N(n,s,i,a)},m.heightmapTerrainQuality=.25,m.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,r){return 2*e.maximumRadius*Math.PI*m.heightmapTerrainQuality/(t*r)},m.prototype.requestTileGeometry=s.DeveloperError.throwInstantiationError,m.prototype.getLevelMaximumGeometricError=s.DeveloperError.throwInstantiationError,m.prototype.getTileDataAvailable=s.DeveloperError.throwInstantiationError,m.prototype.loadTileDataAvailability=s.DeveloperError.throwInstantiationError;const w=32767,M=new r.Cartesian3,S=new r.Cartesian3,x=new r.Cartesian3,b=new r.Cartographic,A=new t.Cartesian2;function C(e,n,o,i,s,c,d,h,u){let l=Number.POSITIVE_INFINITY;const I=s.north,g=s.south;let m=s.east;const T=s.west;m<T&&(m+=a.CesiumMath.TWO_PI);const f=e.length;for(let s=0;s<f;++s){const f=e[s],E=o[f],p=i[f];b.longitude=a.CesiumMath.lerp(T,m,p.x),b.latitude=a.CesiumMath.lerp(g,I,p.y),b.height=E-n;const y=c.cartographicToCartesian(b,M);t.Matrix4.multiplyByPoint(d,y,y),r.Cartesian3.minimumByComponent(y,h,h),r.Cartesian3.maximumByComponent(y,u,u),l=Math.min(l,b.height)}return l}function W(e,t,r,o,i,s,d,h,u,l,I,g,m,T){const f=n.defined(d),E=u.north,p=u.south;let y=u.east;const N=u.west;y<N&&(y+=a.CesiumMath.TWO_PI);const w=r.length;for(let n=0;n<w;++n){const u=r[n],w=i[u],S=s[u];b.longitude=a.CesiumMath.lerp(N,y,S.x)+m,b.latitude=a.CesiumMath.lerp(p,E,S.y)+T,b.height=w-l;const x=h.cartographicToCartesian(b,M);if(f){const e=2*u;A.x=d[e],A.y=d[e+1]}let C,W;o.hasWebMercatorT&&(C=(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(b.latitude)-I)*g),o.hasGeodeticSurfaceNormals&&(W=h.geodeticSurfaceNormal(x)),t=o.encode(e,t,x,S,b.height,A,C,W)}}function v(e,t){let r;return"function"==typeof e.slice&&(r=e.slice(),"function"!=typeof r.sort&&(r=void 0)),n.defined(r)||(r=Array.prototype.slice.call(e)),r.sort(t),r}return d((function(d,h){const u=d.quantizedVertices,l=u.length/3,I=d.octEncodedNormals,g=d.westIndices.length+d.eastIndices.length+d.southIndices.length+d.northIndices.length,T=d.includeWebMercatorT,f=d.exaggeration,E=d.exaggerationRelativeHeight,p=1!==f,y=t.Rectangle.clone(d.rectangle),N=y.west,P=y.south,D=y.east,k=y.north,F=r.Ellipsoid.clone(d.ellipsoid),H=d.minimumHeight,_=d.maximumHeight,G=d.relativeToCenter,V=s.Transforms.eastNorthUpToFixedFrame(G,F),Y=t.Matrix4.inverseTransformation(V,new t.Matrix4);let O,B;T&&(O=c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(P),B=1/(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(k)-O));const R=u.subarray(0,l),L=u.subarray(l,2*l),j=u.subarray(2*l,3*l),U=n.defined(I),z=new Array(l),q=new Array(l),Q=new Array(l),K=T?new Array(l):[],X=p?new Array(l):[],Z=S;Z.x=Number.POSITIVE_INFINITY,Z.y=Number.POSITIVE_INFINITY,Z.z=Number.POSITIVE_INFINITY;const J=x;J.x=Number.NEGATIVE_INFINITY,J.y=Number.NEGATIVE_INFINITY,J.z=Number.NEGATIVE_INFINITY;let $=Number.POSITIVE_INFINITY,ee=Number.NEGATIVE_INFINITY,te=Number.POSITIVE_INFINITY,re=Number.NEGATIVE_INFINITY;for(let e=0;e<l;++e){const n=R[e],o=L[e],i=n/w,s=o/w,d=a.CesiumMath.lerp(H,_,j[e]/w);b.longitude=a.CesiumMath.lerp(N,D,i),b.latitude=a.CesiumMath.lerp(P,k,s),b.height=d,$=Math.min(b.longitude,$),ee=Math.max(b.longitude,ee),te=Math.min(b.latitude,te),re=Math.max(b.latitude,re);const h=F.cartographicToCartesian(b);z[e]=new t.Cartesian2(i,s),q[e]=d,Q[e]=h,T&&(K[e]=(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(b.latitude)-O)*B),p&&(X[e]=F.geodeticSurfaceNormal(h)),t.Matrix4.multiplyByPoint(Y,h,M),r.Cartesian3.minimumByComponent(M,Z,Z),r.Cartesian3.maximumByComponent(M,J,J)}const ne=v(d.westIndices,(function(e,t){return z[e].y-z[t].y})),oe=v(d.eastIndices,(function(e,t){return z[t].y-z[e].y})),ie=v(d.southIndices,(function(e,t){return z[t].x-z[e].x})),ae=v(d.northIndices,(function(e,t){return z[e].x-z[t].x}));let se;if(H<0){se=new o.EllipsoidalOccluder(F).computeHorizonCullingPointPossiblyUnderEllipsoid(G,Q,H)}let ce=H;ce=Math.min(ce,C(d.westIndices,d.westSkirtHeight,q,z,y,F,Y,Z,J)),ce=Math.min(ce,C(d.southIndices,d.southSkirtHeight,q,z,y,F,Y,Z,J)),ce=Math.min(ce,C(d.eastIndices,d.eastSkirtHeight,q,z,y,F,Y,Z,J)),ce=Math.min(ce,C(d.northIndices,d.northSkirtHeight,q,z,y,F,Y,Z,J));const de=new e.AxisAlignedBoundingBox(Z,J,G),he=new o.TerrainEncoding(G,de,ce,_,V,U,T,p,f,E),ue=he.stride,le=new Float32Array(l*ue+g*ue);let Ie=0;for(let e=0;e<l;++e){if(U){const t=2*e;A.x=I[t],A.y=I[t+1]}Ie=he.encode(le,Ie,Q[e],z[e],q[e],A,K[e],X[e])}const ge=Math.max(0,2*(g-4)),me=d.indices.length+3*ge,Te=i.IndexDatatype.createTypedArray(l+g,me);Te.set(d.indices,0);const fe=1e-4,Ee=(ee-$)*fe,pe=(re-te)*fe,ye=-Ee,Ne=Ee,we=pe,Me=-pe;let Se=l*ue;return W(le,Se,ne,he,q,z,I,F,y,d.westSkirtHeight,O,B,ye,0),Se+=d.westIndices.length*ue,W(le,Se,ie,he,q,z,I,F,y,d.southSkirtHeight,O,B,0,Me),Se+=d.southIndices.length*ue,W(le,Se,oe,he,q,z,I,F,y,d.eastSkirtHeight,O,B,Ne,0),Se+=d.eastIndices.length*ue,W(le,Se,ae,he,q,z,I,F,y,d.northSkirtHeight,O,B,0,we),m.addSkirtIndices(ne,ie,oe,ae,l,Te,d.indices.length),h.push(le.buffer,Te.buffer),{vertices:le.buffer,indices:Te.buffer,westIndicesSouthToNorth:ne,southIndicesEastToWest:ie,eastIndicesNorthToSouth:oe,northIndicesWestToEast:ae,vertexStride:ue,center:G,minimumHeight:H,maximumHeight:_,occludeePointInScaledSpace:se,encoding:he,indexCountWithoutSkirts:d.indices.length}}))}));
define(["./AxisAlignedBoundingBox-680337b6","./Matrix2-66622085","./Matrix3-d6f3913c","./defaultValue-040c41f9","./TerrainEncoding-ce59c054","./IndexDatatype-eddea9c9","./Math-8e567554","./Transforms-b7f686a8","./WebMercatorProjection-53aa47d9","./createTaskProcessorWorker","./RuntimeError-3c5db370","./AttributeCompression-5fa81749","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./combine-6eb6e848"],(function(e,t,r,n,o,i,a,s,c,d,h,u,l,I,g){"use strict";function m(){s.DeveloperError.throwInstantiationError()}Object.defineProperties(m.prototype,{errorEvent:{get:s.DeveloperError.throwInstantiationError},credit:{get:s.DeveloperError.throwInstantiationError},tilingScheme:{get:s.DeveloperError.throwInstantiationError},ready:{get:s.DeveloperError.throwInstantiationError},readyPromise:{get:s.DeveloperError.throwInstantiationError},hasWaterMask:{get:s.DeveloperError.throwInstantiationError},hasVertexNormals:{get:s.DeveloperError.throwInstantiationError},availability:{get:s.DeveloperError.throwInstantiationError}});const T=[];m.getRegularGridIndices=function(e,t){let r=T[e];n.defined(r)||(T[e]=r=[]);let o=r[t];return n.defined(o)||(o=e*t<a.CesiumMath.SIXTY_FOUR_KILOBYTES?r[t]=new Uint16Array((e-1)*(t-1)*6):r[t]=new Uint32Array((e-1)*(t-1)*6),y(e,t,o,0)),o};const E=[];m.getRegularGridIndicesAndEdgeIndices=function(e,t){let r=E[e];n.defined(r)||(E[e]=r=[]);let o=r[t];if(!n.defined(o)){const n=m.getRegularGridIndices(e,t),i=p(e,t),a=i.westIndicesSouthToNorth,s=i.southIndicesEastToWest,c=i.eastIndicesNorthToSouth,d=i.northIndicesWestToEast;o=r[t]={indices:n,westIndicesSouthToNorth:a,southIndicesEastToWest:s,eastIndicesNorthToSouth:c,northIndicesWestToEast:d}}return o};const f=[];function p(e,t){const r=new Array(t),n=new Array(e),o=new Array(t),i=new Array(e);let a;for(a=0;a<e;++a)i[a]=a,n[a]=e*t-1-a;for(a=0;a<t;++a)o[a]=(a+1)*e-1,r[a]=(t-a-1)*e;return{westIndicesSouthToNorth:r,southIndicesEastToWest:n,eastIndicesNorthToSouth:o,northIndicesWestToEast:i}}function y(e,t,r,n){let o=0;for(let i=0;i<t-1;++i){for(let t=0;t<e-1;++t){const t=o,i=t+e,a=i+1,s=t+1;r[n++]=t,r[n++]=i,r[n++]=s,r[n++]=s,r[n++]=i,r[n++]=a,++o}++o}}function N(e,t,r,n){let o=e[0];const i=e.length;for(let a=1;a<i;++a){const i=e[a];r[n++]=o,r[n++]=i,r[n++]=t,r[n++]=t,r[n++]=i,r[n++]=t+1,o=i,++t}return n}m.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){let r=f[e];n.defined(r)||(f[e]=r=[]);let o=r[t];if(!n.defined(o)){const n=e*t,a=(e-1)*(t-1)*6,s=2*e+2*t,c=n+s,d=a+6*Math.max(0,s-4),h=p(e,t),u=h.westIndicesSouthToNorth,l=h.southIndicesEastToWest,I=h.eastIndicesNorthToSouth,g=h.northIndicesWestToEast,T=i.IndexDatatype.createTypedArray(c,d);y(e,t,T,0),m.addSkirtIndices(u,l,I,g,n,T,a),o=r[t]={indices:T,westIndicesSouthToNorth:u,southIndicesEastToWest:l,eastIndicesNorthToSouth:I,northIndicesWestToEast:g,indexCountWithoutSkirts:a}}return o},m.addSkirtIndices=function(e,t,r,n,o,i,a){let s=o;a=N(e,s,i,a),s+=e.length,a=N(t,s,i,a),s+=t.length,a=N(r,s,i,a),s+=r.length,N(n,s,i,a)},m.heightmapTerrainQuality=.25,m.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,r){return 2*e.maximumRadius*Math.PI*m.heightmapTerrainQuality/(t*r)},m.prototype.requestTileGeometry=s.DeveloperError.throwInstantiationError,m.prototype.getLevelMaximumGeometricError=s.DeveloperError.throwInstantiationError,m.prototype.getTileDataAvailable=s.DeveloperError.throwInstantiationError,m.prototype.loadTileDataAvailability=s.DeveloperError.throwInstantiationError;const w=32767,M=new r.Cartesian3,S=new r.Cartesian3,x=new r.Cartesian3,b=new r.Cartographic,A=new t.Cartesian2;function C(e,n,o,i,s,c,d,h,u){let l=Number.POSITIVE_INFINITY;const I=s.north,g=s.south;let m=s.east;const T=s.west;m<T&&(m+=a.CesiumMath.TWO_PI);const E=e.length;for(let s=0;s<E;++s){const E=e[s],f=o[E],p=i[E];b.longitude=a.CesiumMath.lerp(T,m,p.x),b.latitude=a.CesiumMath.lerp(g,I,p.y),b.height=f-n;const y=c.cartographicToCartesian(b,M);t.Matrix4.multiplyByPoint(d,y,y),r.Cartesian3.minimumByComponent(y,h,h),r.Cartesian3.maximumByComponent(y,u,u),l=Math.min(l,b.height)}return l}function W(e,t,r,o,i,s,d,h,u,l,I,g,m,T){const E=n.defined(d),f=u.north,p=u.south;let y=u.east;const N=u.west;y<N&&(y+=a.CesiumMath.TWO_PI);const w=r.length;for(let n=0;n<w;++n){const u=r[n],w=i[u],S=s[u];b.longitude=a.CesiumMath.lerp(N,y,S.x)+m,b.latitude=a.CesiumMath.lerp(p,f,S.y)+T,b.height=w-l;const x=h.cartographicToCartesian(b,M);if(E){const e=2*u;A.x=d[e],A.y=d[e+1]}let C,W;o.hasWebMercatorT&&(C=(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(b.latitude)-I)*g),o.hasGeodeticSurfaceNormals&&(W=h.geodeticSurfaceNormal(x)),t=o.encode(e,t,x,S,b.height,A,C,W)}}function v(e,t){let r;return"function"==typeof e.slice&&(r=e.slice(),"function"!=typeof r.sort&&(r=void 0)),n.defined(r)||(r=Array.prototype.slice.call(e)),r.sort(t),r}return d((function(d,h){const u=d.quantizedVertices,l=u.length/3,I=d.octEncodedNormals,g=d.westIndices.length+d.eastIndices.length+d.southIndices.length+d.northIndices.length,T=d.includeWebMercatorT,E=d.exaggeration,f=d.exaggerationRelativeHeight,p=1!==E,y=t.Rectangle.clone(d.rectangle),N=y.west,P=y.south,D=y.east,k=y.north,F=r.Ellipsoid.clone(d.ellipsoid),H=d.minimumHeight,_=d.maximumHeight,G=d.relativeToCenter,V=s.Transforms.eastNorthUpToFixedFrame(G,F),Y=t.Matrix4.inverseTransformation(V,new t.Matrix4);let O,B;T&&(O=c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(P),B=1/(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(k)-O));const R=u.subarray(0,l),L=u.subarray(l,2*l),j=u.subarray(2*l,3*l),U=n.defined(I),z=new Array(l),q=new Array(l),Q=new Array(l),K=T?new Array(l):[],X=p?new Array(l):[],Z=S;Z.x=Number.POSITIVE_INFINITY,Z.y=Number.POSITIVE_INFINITY,Z.z=Number.POSITIVE_INFINITY;const J=x;J.x=Number.NEGATIVE_INFINITY,J.y=Number.NEGATIVE_INFINITY,J.z=Number.NEGATIVE_INFINITY;let $=Number.POSITIVE_INFINITY,ee=Number.NEGATIVE_INFINITY,te=Number.POSITIVE_INFINITY,re=Number.NEGATIVE_INFINITY;for(let e=0;e<l;++e){const n=R[e],o=L[e],i=n/w,s=o/w,d=a.CesiumMath.lerp(H,_,j[e]/w);b.longitude=a.CesiumMath.lerp(N,D,i),b.latitude=a.CesiumMath.lerp(P,k,s),b.height=d,$=Math.min(b.longitude,$),ee=Math.max(b.longitude,ee),te=Math.min(b.latitude,te),re=Math.max(b.latitude,re);const h=F.cartographicToCartesian(b);z[e]=new t.Cartesian2(i,s),q[e]=d,Q[e]=h,T&&(K[e]=(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(b.latitude)-O)*B),p&&(X[e]=F.geodeticSurfaceNormal(h)),t.Matrix4.multiplyByPoint(Y,h,M),r.Cartesian3.minimumByComponent(M,Z,Z),r.Cartesian3.maximumByComponent(M,J,J)}const ne=v(d.westIndices,(function(e,t){return z[e].y-z[t].y})),oe=v(d.eastIndices,(function(e,t){return z[t].y-z[e].y})),ie=v(d.southIndices,(function(e,t){return z[t].x-z[e].x})),ae=v(d.northIndices,(function(e,t){return z[e].x-z[t].x}));let se;if(H<0){se=new o.EllipsoidalOccluder(F).computeHorizonCullingPointPossiblyUnderEllipsoid(G,Q,H)}let ce=H;ce=Math.min(ce,C(d.westIndices,d.westSkirtHeight,q,z,y,F,Y,Z,J)),ce=Math.min(ce,C(d.southIndices,d.southSkirtHeight,q,z,y,F,Y,Z,J)),ce=Math.min(ce,C(d.eastIndices,d.eastSkirtHeight,q,z,y,F,Y,Z,J)),ce=Math.min(ce,C(d.northIndices,d.northSkirtHeight,q,z,y,F,Y,Z,J));const de=new e.AxisAlignedBoundingBox(Z,J,G),he=new o.TerrainEncoding(G,de,ce,_,V,U,T,p,E,f),ue=he.stride,le=new Float32Array(l*ue+g*ue);let Ie=0;for(let e=0;e<l;++e){if(U){const t=2*e;A.x=I[t],A.y=I[t+1]}Ie=he.encode(le,Ie,Q[e],z[e],q[e],A,K[e],X[e])}const ge=Math.max(0,2*(g-4)),me=d.indices.length+3*ge,Te=i.IndexDatatype.createTypedArray(l+g,me);Te.set(d.indices,0);const Ee=1e-4,fe=(ee-$)*Ee,pe=(re-te)*Ee,ye=-fe,Ne=fe,we=pe,Me=-pe;let Se=l*ue;return W(le,Se,ne,he,q,z,I,F,y,d.westSkirtHeight,O,B,ye,0),Se+=d.westIndices.length*ue,W(le,Se,ie,he,q,z,I,F,y,d.southSkirtHeight,O,B,0,Me),Se+=d.southIndices.length*ue,W(le,Se,oe,he,q,z,I,F,y,d.eastSkirtHeight,O,B,Ne,0),Se+=d.eastIndices.length*ue,W(le,Se,ae,he,q,z,I,F,y,d.northSkirtHeight,O,B,0,we),m.addSkirtIndices(ne,ie,oe,ae,l,Te,d.indices.length),h.push(le.buffer,Te.buffer),{vertices:le.buffer,indices:Te.buffer,westIndicesSouthToNorth:ne,southIndicesEastToWest:ie,eastIndicesNorthToSouth:oe,northIndicesWestToEast:ae,vertexStride:ue,center:G,minimumHeight:H,maximumHeight:_,occludeePointInScaledSpace:se,encoding:he,indexCountWithoutSkirts:d.indices.length}}))}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./Transforms-b1441a66","./ComponentDatatype-dd0b58d1","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./IndexDatatype-eddea9c9","./Math-8e567554","./VertexFormat-848ec33d","./WallGeometryLibrary-1f160087","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./arrayRemoveDuplicates-bb49591c","./PolylinePipeline-576cc29e","./EllipsoidGeodesic-9484ceff","./EllipsoidRhumbLine-1dd98535","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc"],(function(e,t,n,i,a,o,r,s,l,m,u,c,d,p,f,y,g,h,C,x){"use strict";const b=new t.Cartesian3,A=new t.Cartesian3,_=new t.Cartesian3,E=new t.Cartesian3,w=new t.Cartesian3,F=new t.Cartesian3,v=new t.Cartesian3;function L(n){const i=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).positions,a=n.maximumHeights,o=n.minimumHeights,r=e.defaultValue(n.vertexFormat,l.VertexFormat.DEFAULT),m=e.defaultValue(n.granularity,s.CesiumMath.RADIANS_PER_DEGREE),u=e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84);this._positions=i,this._minimumHeights=o,this._maximumHeights=a,this._vertexFormat=l.VertexFormat.clone(r),this._granularity=m,this._ellipsoid=t.Ellipsoid.clone(u),this._workerName="createWallGeometry";let c=1+i.length*t.Cartesian3.packedLength+2;e.defined(o)&&(c+=o.length),e.defined(a)&&(c+=a.length),this.packedLength=c+t.Ellipsoid.packedLength+l.VertexFormat.packedLength+1}L.pack=function(n,i,a){let o;a=e.defaultValue(a,0);const r=n._positions;let s=r.length;for(i[a++]=s,o=0;o<s;++o,a+=t.Cartesian3.packedLength)t.Cartesian3.pack(r[o],i,a);const m=n._minimumHeights;if(s=e.defined(m)?m.length:0,i[a++]=s,e.defined(m))for(o=0;o<s;++o)i[a++]=m[o];const u=n._maximumHeights;if(s=e.defined(u)?u.length:0,i[a++]=s,e.defined(u))for(o=0;o<s;++o)i[a++]=u[o];return t.Ellipsoid.pack(n._ellipsoid,i,a),a+=t.Ellipsoid.packedLength,l.VertexFormat.pack(n._vertexFormat,i,a),i[a+=l.VertexFormat.packedLength]=n._granularity,i};const V=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),k=new l.VertexFormat,H={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:V,vertexFormat:k,granularity:void 0};return L.unpack=function(n,i,a){let o;i=e.defaultValue(i,0);let r=n[i++];const s=new Array(r);for(o=0;o<r;++o,i+=t.Cartesian3.packedLength)s[o]=t.Cartesian3.unpack(n,i);let m,u;if(r=n[i++],r>0)for(m=new Array(r),o=0;o<r;++o)m[o]=n[i++];if(r=n[i++],r>0)for(u=new Array(r),o=0;o<r;++o)u[o]=n[i++];const c=t.Ellipsoid.unpack(n,i,V);i+=t.Ellipsoid.packedLength;const d=l.VertexFormat.unpack(n,i,k),p=n[i+=l.VertexFormat.packedLength];return e.defined(a)?(a._positions=s,a._minimumHeights=m,a._maximumHeights=u,a._ellipsoid=t.Ellipsoid.clone(c,a._ellipsoid),a._vertexFormat=l.VertexFormat.clone(d,a._vertexFormat),a._granularity=p,a):(H.positions=s,H.minimumHeights=m,H.maximumHeights=u,H.granularity=p,new L(H))},L.fromConstantHeights=function(t){const n=(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions;let i,a;const o=t.minimumHeight,r=t.maximumHeight,s=e.defined(o),l=e.defined(r);if(s||l){const e=n.length;i=s?new Array(e):void 0,a=l?new Array(e):void 0;for(let t=0;t<e;++t)s&&(i[t]=o),l&&(a[t]=r)}return new L({positions:n,maximumHeights:a,minimumHeights:i,ellipsoid:t.ellipsoid,vertexFormat:t.vertexFormat})},L.createGeometry=function(l){const u=l._positions,c=l._minimumHeights,d=l._maximumHeights,p=l._vertexFormat,f=l._granularity,y=l._ellipsoid,g=m.WallGeometryLibrary.computePositions(y,u,d,c,f,!0);if(!e.defined(g))return;const h=g.bottomPositions,C=g.topPositions,x=g.numCorners;let L=C.length,V=2*L;const k=p.position?new Float64Array(V):void 0,H=p.normal?new Float32Array(V):void 0,G=p.tangent?new Float32Array(V):void 0,D=p.bitangent?new Float32Array(V):void 0,P=p.st?new Float32Array(V/3*2):void 0;let T,z=0,O=0,R=0,S=0,I=0,M=v,N=F,W=w,B=!0;L/=3;let U=0;const q=1/(L-x-1);for(T=0;T<L;++T){const e=3*T,n=t.Cartesian3.fromArray(C,e,b),i=t.Cartesian3.fromArray(h,e,A);if(p.position&&(k[z++]=i.x,k[z++]=i.y,k[z++]=i.z,k[z++]=n.x,k[z++]=n.y,k[z++]=n.z),p.st&&(P[I++]=U,P[I++]=0,P[I++]=U,P[I++]=1),p.normal||p.tangent||p.bitangent){let i=t.Cartesian3.clone(t.Cartesian3.ZERO,E);const a=t.Cartesian3.subtract(n,y.geodeticSurfaceNormal(n,A),A);if(T+1<L&&(i=t.Cartesian3.fromArray(C,e+3,E)),B){const e=t.Cartesian3.subtract(i,n,_),o=t.Cartesian3.subtract(a,n,b);M=t.Cartesian3.normalize(t.Cartesian3.cross(o,e,M),M),B=!1}t.Cartesian3.equalsEpsilon(n,i,s.CesiumMath.EPSILON10)?B=!0:(U+=q,p.tangent&&(N=t.Cartesian3.normalize(t.Cartesian3.subtract(i,n,N),N)),p.bitangent&&(W=t.Cartesian3.normalize(t.Cartesian3.cross(M,N,W),W))),p.normal&&(H[O++]=M.x,H[O++]=M.y,H[O++]=M.z,H[O++]=M.x,H[O++]=M.y,H[O++]=M.z),p.tangent&&(G[S++]=N.x,G[S++]=N.y,G[S++]=N.z,G[S++]=N.x,G[S++]=N.y,G[S++]=N.z),p.bitangent&&(D[R++]=W.x,D[R++]=W.y,D[R++]=W.z,D[R++]=W.x,D[R++]=W.y,D[R++]=W.z)}}const J=new o.GeometryAttributes;p.position&&(J.position=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:k})),p.normal&&(J.normal=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:H})),p.tangent&&(J.tangent=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G})),p.bitangent&&(J.bitangent=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:D})),p.st&&(J.st=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:P}));const Y=V/3;V-=6*(x+1);const Z=r.IndexDatatype.createTypedArray(Y,V);let j=0;for(T=0;T<Y-2;T+=2){const e=T,n=T+2,i=t.Cartesian3.fromArray(k,3*e,b),a=t.Cartesian3.fromArray(k,3*n,A);if(t.Cartesian3.equalsEpsilon(i,a,s.CesiumMath.EPSILON10))continue;const o=T+1,r=T+3;Z[j++]=o,Z[j++]=e,Z[j++]=r,Z[j++]=r,Z[j++]=e,Z[j++]=n}return new a.Geometry({attributes:J,indices:Z,primitiveType:a.PrimitiveType.TRIANGLES,boundingSphere:new n.BoundingSphere.fromVertices(k)})},function(n,i){return e.defined(i)&&(n=L.unpack(n,i)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),L.createGeometry(n)}}));
define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./Transforms-b7f686a8","./ComponentDatatype-dd0b58d1","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./IndexDatatype-eddea9c9","./Math-8e567554","./VertexFormat-848ec33d","./WallGeometryLibrary-d2baa4b3","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./arrayRemoveDuplicates-bb49591c","./PolylinePipeline-eba1803b","./EllipsoidGeodesic-9484ceff","./EllipsoidRhumbLine-1dd98535","./IntersectionTests-7d927f09","./Plane-6aee7ffc"],(function(e,t,n,i,a,o,r,s,l,m,u,d,c,p,f,y,g,h,C,b){"use strict";const x=new t.Cartesian3,A=new t.Cartesian3,_=new t.Cartesian3,E=new t.Cartesian3,w=new t.Cartesian3,F=new t.Cartesian3,v=new t.Cartesian3;function L(n){const i=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).positions,a=n.maximumHeights,o=n.minimumHeights,r=e.defaultValue(n.vertexFormat,l.VertexFormat.DEFAULT),m=e.defaultValue(n.granularity,s.CesiumMath.RADIANS_PER_DEGREE),u=e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84);this._positions=i,this._minimumHeights=o,this._maximumHeights=a,this._vertexFormat=l.VertexFormat.clone(r),this._granularity=m,this._ellipsoid=t.Ellipsoid.clone(u),this._workerName="createWallGeometry";let d=1+i.length*t.Cartesian3.packedLength+2;e.defined(o)&&(d+=o.length),e.defined(a)&&(d+=a.length),this.packedLength=d+t.Ellipsoid.packedLength+l.VertexFormat.packedLength+1}L.pack=function(n,i,a){let o;a=e.defaultValue(a,0);const r=n._positions;let s=r.length;for(i[a++]=s,o=0;o<s;++o,a+=t.Cartesian3.packedLength)t.Cartesian3.pack(r[o],i,a);const m=n._minimumHeights;if(s=e.defined(m)?m.length:0,i[a++]=s,e.defined(m))for(o=0;o<s;++o)i[a++]=m[o];const u=n._maximumHeights;if(s=e.defined(u)?u.length:0,i[a++]=s,e.defined(u))for(o=0;o<s;++o)i[a++]=u[o];return t.Ellipsoid.pack(n._ellipsoid,i,a),a+=t.Ellipsoid.packedLength,l.VertexFormat.pack(n._vertexFormat,i,a),i[a+=l.VertexFormat.packedLength]=n._granularity,i};const V=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),k=new l.VertexFormat,H={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:V,vertexFormat:k,granularity:void 0};return L.unpack=function(n,i,a){let o;i=e.defaultValue(i,0);let r=n[i++];const s=new Array(r);for(o=0;o<r;++o,i+=t.Cartesian3.packedLength)s[o]=t.Cartesian3.unpack(n,i);let m,u;if(r=n[i++],r>0)for(m=new Array(r),o=0;o<r;++o)m[o]=n[i++];if(r=n[i++],r>0)for(u=new Array(r),o=0;o<r;++o)u[o]=n[i++];const d=t.Ellipsoid.unpack(n,i,V);i+=t.Ellipsoid.packedLength;const c=l.VertexFormat.unpack(n,i,k),p=n[i+=l.VertexFormat.packedLength];return e.defined(a)?(a._positions=s,a._minimumHeights=m,a._maximumHeights=u,a._ellipsoid=t.Ellipsoid.clone(d,a._ellipsoid),a._vertexFormat=l.VertexFormat.clone(c,a._vertexFormat),a._granularity=p,a):(H.positions=s,H.minimumHeights=m,H.maximumHeights=u,H.granularity=p,new L(H))},L.fromConstantHeights=function(t){const n=(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions;let i,a;const o=t.minimumHeight,r=t.maximumHeight,s=e.defined(o),l=e.defined(r);if(s||l){const e=n.length;i=s?new Array(e):void 0,a=l?new Array(e):void 0;for(let t=0;t<e;++t)s&&(i[t]=o),l&&(a[t]=r)}return new L({positions:n,maximumHeights:a,minimumHeights:i,ellipsoid:t.ellipsoid,vertexFormat:t.vertexFormat})},L.createGeometry=function(l){const u=l._positions,d=l._minimumHeights,c=l._maximumHeights,p=l._vertexFormat,f=l._granularity,y=l._ellipsoid,g=m.WallGeometryLibrary.computePositions(y,u,c,d,f,!0);if(!e.defined(g))return;const h=g.bottomPositions,C=g.topPositions,b=g.numCorners;let L=C.length,V=2*L;const k=p.position?new Float64Array(V):void 0,H=p.normal?new Float32Array(V):void 0,G=p.tangent?new Float32Array(V):void 0,D=p.bitangent?new Float32Array(V):void 0,P=p.st?new Float32Array(V/3*2):void 0;let T,z=0,O=0,R=0,S=0,I=0,M=v,N=F,W=w,B=!0;L/=3;let U=0;const q=1/(L-b-1);for(T=0;T<L;++T){const e=3*T,n=t.Cartesian3.fromArray(C,e,x),i=t.Cartesian3.fromArray(h,e,A);if(p.position&&(k[z++]=i.x,k[z++]=i.y,k[z++]=i.z,k[z++]=n.x,k[z++]=n.y,k[z++]=n.z),p.st&&(P[I++]=U,P[I++]=0,P[I++]=U,P[I++]=1),p.normal||p.tangent||p.bitangent){let i=t.Cartesian3.clone(t.Cartesian3.ZERO,E);const a=t.Cartesian3.subtract(n,y.geodeticSurfaceNormal(n,A),A);if(T+1<L&&(i=t.Cartesian3.fromArray(C,e+3,E)),B){const e=t.Cartesian3.subtract(i,n,_),o=t.Cartesian3.subtract(a,n,x);M=t.Cartesian3.normalize(t.Cartesian3.cross(o,e,M),M),B=!1}t.Cartesian3.equalsEpsilon(n,i,s.CesiumMath.EPSILON10)?B=!0:(U+=q,p.tangent&&(N=t.Cartesian3.normalize(t.Cartesian3.subtract(i,n,N),N)),p.bitangent&&(W=t.Cartesian3.normalize(t.Cartesian3.cross(M,N,W),W))),p.normal&&(H[O++]=M.x,H[O++]=M.y,H[O++]=M.z,H[O++]=M.x,H[O++]=M.y,H[O++]=M.z),p.tangent&&(G[S++]=N.x,G[S++]=N.y,G[S++]=N.z,G[S++]=N.x,G[S++]=N.y,G[S++]=N.z),p.bitangent&&(D[R++]=W.x,D[R++]=W.y,D[R++]=W.z,D[R++]=W.x,D[R++]=W.y,D[R++]=W.z)}}const J=new o.GeometryAttributes;p.position&&(J.position=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:k})),p.normal&&(J.normal=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:H})),p.tangent&&(J.tangent=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G})),p.bitangent&&(J.bitangent=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:D})),p.st&&(J.st=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:P}));const Y=V/3;V-=6*(b+1);const Z=r.IndexDatatype.createTypedArray(Y,V);let j=0;for(T=0;T<Y-2;T+=2){const e=T,n=T+2,i=t.Cartesian3.fromArray(k,3*e,x),a=t.Cartesian3.fromArray(k,3*n,A);if(t.Cartesian3.equalsEpsilon(i,a,s.CesiumMath.EPSILON10))continue;const o=T+1,r=T+3;Z[j++]=o,Z[j++]=e,Z[j++]=r,Z[j++]=r,Z[j++]=e,Z[j++]=n}return new a.Geometry({attributes:J,indices:Z,primitiveType:a.PrimitiveType.TRIANGLES,boundingSphere:new n.BoundingSphere.fromVertices(k)})},function(n,i){return e.defined(i)&&(n=L.unpack(n,i)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),L.createGeometry(n)}}));

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./Transforms-b1441a66","./ComponentDatatype-dd0b58d1","./GeometryAttribute-944b7aef","./GeometryAttributes-52134c76","./IndexDatatype-eddea9c9","./Math-8e567554","./WallGeometryLibrary-1f160087","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./arrayRemoveDuplicates-bb49591c","./PolylinePipeline-576cc29e","./EllipsoidGeodesic-9484ceff","./EllipsoidRhumbLine-1dd98535","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc"],(function(e,i,t,n,o,a,s,r,l,d,m,u,c,p,f,h,g,y,_){"use strict";const E=new i.Cartesian3,b=new i.Cartesian3;function C(t){const n=(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions,o=t.maximumHeights,a=t.minimumHeights,s=e.defaultValue(t.granularity,r.CesiumMath.RADIANS_PER_DEGREE),l=e.defaultValue(t.ellipsoid,i.Ellipsoid.WGS84);this._positions=n,this._minimumHeights=a,this._maximumHeights=o,this._granularity=s,this._ellipsoid=i.Ellipsoid.clone(l),this._workerName="createWallOutlineGeometry";let d=1+n.length*i.Cartesian3.packedLength+2;e.defined(a)&&(d+=a.length),e.defined(o)&&(d+=o.length),this.packedLength=d+i.Ellipsoid.packedLength+1}C.pack=function(t,n,o){let a;o=e.defaultValue(o,0);const s=t._positions;let r=s.length;for(n[o++]=r,a=0;a<r;++a,o+=i.Cartesian3.packedLength)i.Cartesian3.pack(s[a],n,o);const l=t._minimumHeights;if(r=e.defined(l)?l.length:0,n[o++]=r,e.defined(l))for(a=0;a<r;++a)n[o++]=l[a];const d=t._maximumHeights;if(r=e.defined(d)?d.length:0,n[o++]=r,e.defined(d))for(a=0;a<r;++a)n[o++]=d[a];return i.Ellipsoid.pack(t._ellipsoid,n,o),n[o+=i.Ellipsoid.packedLength]=t._granularity,n};const H=i.Ellipsoid.clone(i.Ellipsoid.UNIT_SPHERE),A={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:H,granularity:void 0};return C.unpack=function(t,n,o){let a;n=e.defaultValue(n,0);let s=t[n++];const r=new Array(s);for(a=0;a<s;++a,n+=i.Cartesian3.packedLength)r[a]=i.Cartesian3.unpack(t,n);let l,d;if(s=t[n++],s>0)for(l=new Array(s),a=0;a<s;++a)l[a]=t[n++];if(s=t[n++],s>0)for(d=new Array(s),a=0;a<s;++a)d[a]=t[n++];const m=i.Ellipsoid.unpack(t,n,H),u=t[n+=i.Ellipsoid.packedLength];return e.defined(o)?(o._positions=r,o._minimumHeights=l,o._maximumHeights=d,o._ellipsoid=i.Ellipsoid.clone(m,o._ellipsoid),o._granularity=u,o):(A.positions=r,A.minimumHeights=l,A.maximumHeights=d,A.granularity=u,new C(A))},C.fromConstantHeights=function(i){const t=(i=e.defaultValue(i,e.defaultValue.EMPTY_OBJECT)).positions;let n,o;const a=i.minimumHeight,s=i.maximumHeight,r=e.defined(a),l=e.defined(s);if(r||l){const e=t.length;n=r?new Array(e):void 0,o=l?new Array(e):void 0;for(let i=0;i<e;++i)r&&(n[i]=a),l&&(o[i]=s)}return new C({positions:t,maximumHeights:o,minimumHeights:n,ellipsoid:i.ellipsoid})},C.createGeometry=function(d){const m=d._positions,u=d._minimumHeights,c=d._maximumHeights,p=d._granularity,f=d._ellipsoid,h=l.WallGeometryLibrary.computePositions(f,m,c,u,p,!1);if(!e.defined(h))return;const g=h.bottomPositions,y=h.topPositions;let _=y.length,C=2*_;const H=new Float64Array(C);let A,k=0;for(_/=3,A=0;A<_;++A){const e=3*A,t=i.Cartesian3.fromArray(y,e,E),n=i.Cartesian3.fromArray(g,e,b);H[k++]=n.x,H[k++]=n.y,H[k++]=n.z,H[k++]=t.x,H[k++]=t.y,H[k++]=t.z}const w=new a.GeometryAttributes({position:new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:H})}),x=C/3;C=2*x-4+x;const G=s.IndexDatatype.createTypedArray(x,C);let L=0;for(A=0;A<x-2;A+=2){const e=A,t=A+2,n=i.Cartesian3.fromArray(H,3*e,E),o=i.Cartesian3.fromArray(H,3*t,b);if(i.Cartesian3.equalsEpsilon(n,o,r.CesiumMath.EPSILON10))continue;const a=A+1,s=A+3;G[L++]=a,G[L++]=e,G[L++]=a,G[L++]=s,G[L++]=e,G[L++]=t}return G[L++]=x-2,G[L++]=x-1,new o.Geometry({attributes:w,indices:G,primitiveType:o.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere.fromVertices(H)})},function(t,n){return e.defined(n)&&(t=C.unpack(t,n)),t._ellipsoid=i.Ellipsoid.clone(t._ellipsoid),C.createGeometry(t)}}));
define(["./defaultValue-040c41f9","./Matrix3-d6f3913c","./Transforms-b7f686a8","./ComponentDatatype-dd0b58d1","./GeometryAttribute-6ed30287","./GeometryAttributes-52134c76","./IndexDatatype-eddea9c9","./Math-8e567554","./WallGeometryLibrary-d2baa4b3","./Matrix2-66622085","./RuntimeError-3c5db370","./combine-6eb6e848","./WebGLConstants-f7267ced","./arrayRemoveDuplicates-bb49591c","./PolylinePipeline-eba1803b","./EllipsoidGeodesic-9484ceff","./EllipsoidRhumbLine-1dd98535","./IntersectionTests-7d927f09","./Plane-6aee7ffc"],(function(e,i,t,n,o,a,s,r,l,d,m,u,c,p,f,h,g,y,_){"use strict";const E=new i.Cartesian3,b=new i.Cartesian3;function C(t){const n=(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions,o=t.maximumHeights,a=t.minimumHeights,s=e.defaultValue(t.granularity,r.CesiumMath.RADIANS_PER_DEGREE),l=e.defaultValue(t.ellipsoid,i.Ellipsoid.WGS84);this._positions=n,this._minimumHeights=a,this._maximumHeights=o,this._granularity=s,this._ellipsoid=i.Ellipsoid.clone(l),this._workerName="createWallOutlineGeometry";let d=1+n.length*i.Cartesian3.packedLength+2;e.defined(a)&&(d+=a.length),e.defined(o)&&(d+=o.length),this.packedLength=d+i.Ellipsoid.packedLength+1}C.pack=function(t,n,o){let a;o=e.defaultValue(o,0);const s=t._positions;let r=s.length;for(n[o++]=r,a=0;a<r;++a,o+=i.Cartesian3.packedLength)i.Cartesian3.pack(s[a],n,o);const l=t._minimumHeights;if(r=e.defined(l)?l.length:0,n[o++]=r,e.defined(l))for(a=0;a<r;++a)n[o++]=l[a];const d=t._maximumHeights;if(r=e.defined(d)?d.length:0,n[o++]=r,e.defined(d))for(a=0;a<r;++a)n[o++]=d[a];return i.Ellipsoid.pack(t._ellipsoid,n,o),n[o+=i.Ellipsoid.packedLength]=t._granularity,n};const H=i.Ellipsoid.clone(i.Ellipsoid.UNIT_SPHERE),A={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:H,granularity:void 0};return C.unpack=function(t,n,o){let a;n=e.defaultValue(n,0);let s=t[n++];const r=new Array(s);for(a=0;a<s;++a,n+=i.Cartesian3.packedLength)r[a]=i.Cartesian3.unpack(t,n);let l,d;if(s=t[n++],s>0)for(l=new Array(s),a=0;a<s;++a)l[a]=t[n++];if(s=t[n++],s>0)for(d=new Array(s),a=0;a<s;++a)d[a]=t[n++];const m=i.Ellipsoid.unpack(t,n,H),u=t[n+=i.Ellipsoid.packedLength];return e.defined(o)?(o._positions=r,o._minimumHeights=l,o._maximumHeights=d,o._ellipsoid=i.Ellipsoid.clone(m,o._ellipsoid),o._granularity=u,o):(A.positions=r,A.minimumHeights=l,A.maximumHeights=d,A.granularity=u,new C(A))},C.fromConstantHeights=function(i){const t=(i=e.defaultValue(i,e.defaultValue.EMPTY_OBJECT)).positions;let n,o;const a=i.minimumHeight,s=i.maximumHeight,r=e.defined(a),l=e.defined(s);if(r||l){const e=t.length;n=r?new Array(e):void 0,o=l?new Array(e):void 0;for(let i=0;i<e;++i)r&&(n[i]=a),l&&(o[i]=s)}return new C({positions:t,maximumHeights:o,minimumHeights:n,ellipsoid:i.ellipsoid})},C.createGeometry=function(d){const m=d._positions,u=d._minimumHeights,c=d._maximumHeights,p=d._granularity,f=d._ellipsoid,h=l.WallGeometryLibrary.computePositions(f,m,c,u,p,!1);if(!e.defined(h))return;const g=h.bottomPositions,y=h.topPositions;let _=y.length,C=2*_;const H=new Float64Array(C);let A,k=0;for(_/=3,A=0;A<_;++A){const e=3*A,t=i.Cartesian3.fromArray(y,e,E),n=i.Cartesian3.fromArray(g,e,b);H[k++]=n.x,H[k++]=n.y,H[k++]=n.z,H[k++]=t.x,H[k++]=t.y,H[k++]=t.z}const w=new a.GeometryAttributes({position:new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:H})}),x=C/3;C=2*x-4+x;const G=s.IndexDatatype.createTypedArray(x,C);let L=0;for(A=0;A<x-2;A+=2){const e=A,t=A+2,n=i.Cartesian3.fromArray(H,3*e,E),o=i.Cartesian3.fromArray(H,3*t,b);if(i.Cartesian3.equalsEpsilon(n,o,r.CesiumMath.EPSILON10))continue;const a=A+1,s=A+3;G[L++]=a,G[L++]=e,G[L++]=a,G[L++]=s,G[L++]=e,G[L++]=t}return G[L++]=x-2,G[L++]=x-1,new o.Geometry({attributes:w,indices:G,primitiveType:o.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere.fromVertices(H)})},function(t,n){return e.defined(n)&&(t=C.unpack(t,n)),t._ellipsoid=i.Ellipsoid.clone(t._ellipsoid),C.createGeometry(t)}}));
/**
* @license
* Cesium - https://github.com/CesiumGS/cesium
* Version 1.101
* Version 1.102
*

@@ -6,0 +6,0 @@ * Copyright 2011-2022 Cesium Contributors

@@ -1,1 +0,1 @@

define(["./defaultValue-040c41f9","./WebGLConstants-f7267ced","./RuntimeError-3c5db370","./createTaskProcessorWorker"],(function(_,R,t,e){"use strict";const A={UNSIGNED_BYTE:R.WebGLConstants.UNSIGNED_BYTE,UNSIGNED_SHORT:R.WebGLConstants.UNSIGNED_SHORT,UNSIGNED_INT:R.WebGLConstants.UNSIGNED_INT,FLOAT:R.WebGLConstants.FLOAT,HALF_FLOAT:R.WebGLConstants.HALF_FLOAT_OES,UNSIGNED_INT_24_8:R.WebGLConstants.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:R.WebGLConstants.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:R.WebGLConstants.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:R.WebGLConstants.UNSIGNED_SHORT_5_6_5,toWebGLConstant:function(_,t){switch(_){case A.UNSIGNED_BYTE:return R.WebGLConstants.UNSIGNED_BYTE;case A.UNSIGNED_SHORT:return R.WebGLConstants.UNSIGNED_SHORT;case A.UNSIGNED_INT:return R.WebGLConstants.UNSIGNED_INT;case A.FLOAT:return R.WebGLConstants.FLOAT;case A.HALF_FLOAT:return t.webgl2?R.WebGLConstants.HALF_FLOAT:R.WebGLConstants.HALF_FLOAT_OES;case A.UNSIGNED_INT_24_8:return R.WebGLConstants.UNSIGNED_INT_24_8;case A.UNSIGNED_SHORT_4_4_4_4:return R.WebGLConstants.UNSIGNED_SHORT_4_4_4_4;case A.UNSIGNED_SHORT_5_5_5_1:return R.WebGLConstants.UNSIGNED_SHORT_5_5_5_1;case A.UNSIGNED_SHORT_5_6_5:return A.UNSIGNED_SHORT_5_6_5}},isPacked:function(_){return _===A.UNSIGNED_INT_24_8||_===A.UNSIGNED_SHORT_4_4_4_4||_===A.UNSIGNED_SHORT_5_5_5_1||_===A.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(_){switch(_){case A.UNSIGNED_BYTE:return 1;case A.UNSIGNED_SHORT:case A.UNSIGNED_SHORT_4_4_4_4:case A.UNSIGNED_SHORT_5_5_5_1:case A.UNSIGNED_SHORT_5_6_5:case A.HALF_FLOAT:return 2;case A.UNSIGNED_INT:case A.FLOAT:case A.UNSIGNED_INT_24_8:return 4}},validate:function(_){return _===A.UNSIGNED_BYTE||_===A.UNSIGNED_SHORT||_===A.UNSIGNED_INT||_===A.FLOAT||_===A.HALF_FLOAT||_===A.UNSIGNED_INT_24_8||_===A.UNSIGNED_SHORT_4_4_4_4||_===A.UNSIGNED_SHORT_5_5_5_1||_===A.UNSIGNED_SHORT_5_6_5}};var T=Object.freeze(A);const O={DEPTH_COMPONENT:R.WebGLConstants.DEPTH_COMPONENT,DEPTH_STENCIL:R.WebGLConstants.DEPTH_STENCIL,ALPHA:R.WebGLConstants.ALPHA,RGB:R.WebGLConstants.RGB,RGBA:R.WebGLConstants.RGBA,LUMINANCE:R.WebGLConstants.LUMINANCE,LUMINANCE_ALPHA:R.WebGLConstants.LUMINANCE_ALPHA,RGB_DXT1:R.WebGLConstants.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:R.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:R.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:R.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:R.WebGLConstants.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:R.WebGLConstants.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:R.WebGLConstants.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:R.WebGLConstants.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:R.WebGLConstants.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:R.WebGLConstants.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:R.WebGLConstants.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:R.WebGLConstants.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:R.WebGLConstants.COMPRESSED_RGBA_BPTC_UNORM,componentsLength:function(_){switch(_){case O.RGB:return 3;case O.RGBA:return 4;case O.LUMINANCE_ALPHA:return 2;case O.ALPHA:case O.LUMINANCE:default:return 1}},validate:function(_){return _===O.DEPTH_COMPONENT||_===O.DEPTH_STENCIL||_===O.ALPHA||_===O.RGB||_===O.RGBA||_===O.LUMINANCE||_===O.LUMINANCE_ALPHA||_===O.RGB_DXT1||_===O.RGBA_DXT1||_===O.RGBA_DXT3||_===O.RGBA_DXT5||_===O.RGB_PVRTC_4BPPV1||_===O.RGB_PVRTC_2BPPV1||_===O.RGBA_PVRTC_4BPPV1||_===O.RGBA_PVRTC_2BPPV1||_===O.RGBA_ASTC||_===O.RGB_ETC1||_===O.RGB8_ETC2||_===O.RGBA8_ETC2_EAC||_===O.RGBA_BC7},isColorFormat:function(_){return _===O.ALPHA||_===O.RGB||_===O.RGBA||_===O.LUMINANCE||_===O.LUMINANCE_ALPHA},isDepthFormat:function(_){return _===O.DEPTH_COMPONENT||_===O.DEPTH_STENCIL},isCompressedFormat:function(_){return _===O.RGB_DXT1||_===O.RGBA_DXT1||_===O.RGBA_DXT3||_===O.RGBA_DXT5||_===O.RGB_PVRTC_4BPPV1||_===O.RGB_PVRTC_2BPPV1||_===O.RGBA_PVRTC_4BPPV1||_===O.RGBA_PVRTC_2BPPV1||_===O.RGBA_ASTC||_===O.RGB_ETC1||_===O.RGB8_ETC2||_===O.RGBA8_ETC2_EAC||_===O.RGBA_BC7},isDXTFormat:function(_){return _===O.RGB_DXT1||_===O.RGBA_DXT1||_===O.RGBA_DXT3||_===O.RGBA_DXT5},isPVRTCFormat:function(_){return _===O.RGB_PVRTC_4BPPV1||_===O.RGB_PVRTC_2BPPV1||_===O.RGBA_PVRTC_4BPPV1||_===O.RGBA_PVRTC_2BPPV1},isASTCFormat:function(_){return _===O.RGBA_ASTC},isETC1Format:function(_){return _===O.RGB_ETC1},isETC2Format:function(_){return _===O.RGB8_ETC2||_===O.RGBA8_ETC2_EAC},isBC7Format:function(_){return _===O.RGBA_BC7},compressedTextureSizeInBytes:function(_,R,t){switch(_){case O.RGB_DXT1:case O.RGBA_DXT1:case O.RGB_ETC1:case O.RGB8_ETC2:return Math.floor((R+3)/4)*Math.floor((t+3)/4)*8;case O.RGBA_DXT3:case O.RGBA_DXT5:case O.RGBA_ASTC:case O.RGBA8_ETC2_EAC:return Math.floor((R+3)/4)*Math.floor((t+3)/4)*16;case O.RGB_PVRTC_4BPPV1:case O.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(R,8)*Math.max(t,8)*4+7)/8);case O.RGB_PVRTC_2BPPV1:case O.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(R,16)*Math.max(t,8)*2+7)/8);case O.RGBA_BC7:return Math.ceil(R/4)*Math.ceil(t/4)*16;default:return 0}},textureSizeInBytes:function(_,R,t,e){let A=O.componentsLength(_);return T.isPacked(R)&&(A=1),A*T.sizeInBytes(R)*t*e},alignmentInBytes:function(_,R,t){const e=O.textureSizeInBytes(_,R,t,1)%4;return 0===e?4:2===e?2:1},createTypedArray:function(_,R,t,e){let A;const n=T.sizeInBytes(R);A=n===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:n===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:n===Float32Array.BYTES_PER_ELEMENT&&R===T.FLOAT?Float32Array:Uint32Array;return new A(O.componentsLength(_)*t*e)},flipY:function(_,R,t,e,A){if(1===A)return _;const T=O.createTypedArray(R,t,e,A),n=O.componentsLength(R),B=e*n;for(let R=0;R<A;++R){const t=R*e*n,O=(A-R-1)*e*n;for(let R=0;R<B;++R)T[O+R]=_[t+R]}return T},toInternalFormat:function(_,t,e){if(!e.webgl2)return _;if(_===O.DEPTH_STENCIL)return R.WebGLConstants.DEPTH24_STENCIL8;if(_===O.DEPTH_COMPONENT){if(t===T.UNSIGNED_SHORT)return R.WebGLConstants.DEPTH_COMPONENT16;if(t===T.UNSIGNED_INT)return R.WebGLConstants.DEPTH_COMPONENT24}if(t===T.FLOAT)switch(_){case O.RGBA:return R.WebGLConstants.RGBA32F;case O.RGB:return R.WebGLConstants.RGB32F;case O.RG:return R.WebGLConstants.RG32F;case O.R:return R.WebGLConstants.R32F}if(t===T.HALF_FLOAT)switch(_){case O.RGBA:return R.WebGLConstants.RGBA16F;case O.RGB:return R.WebGLConstants.RGB16F;case O.RG:return R.WebGLConstants.RG16F;case O.R:return R.WebGLConstants.R16F}return _}};var n=Object.freeze(O);var B=Object.freeze({VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033});class M{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class G{constructor(_,R,t,e){this._dataView=void 0,this._littleEndian=void 0,this._offset=void 0,this._dataView=new DataView(_.buffer,_.byteOffset+R,t),this._littleEndian=e,this._offset=0}_nextUint8(){const _=this._dataView.getUint8(this._offset);return this._offset+=1,_}_nextUint16(){const _=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,_}_nextUint32(){const _=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,_}_nextUint64(){const _=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,_}_nextInt32(){const _=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,_}_skip(_){return this._offset+=_,this}_scan(_,R=0){const t=this._offset;let e=0;for(;this._dataView.getUint8(this._offset)!==R&&e<_;)e++,this._offset++;return e<_&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+t,e)}}const K=[171,75,84,88,32,50,48,187,13,10,26,10];function C(_){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(_):Buffer.from(_).toString("utf8")}const s=["positiveX","negativeX","positiveY","negativeY","positiveZ","negativeZ"];let r;function F(R,e){const A=R.ktx2Buffer,O=R.supportedTargetFormats;let F;try{F=function(_){const R=new Uint8Array(_.buffer,_.byteOffset,K.length);if(R[0]!==K[0]||R[1]!==K[1]||R[2]!==K[2]||R[3]!==K[3]||R[4]!==K[4]||R[5]!==K[5]||R[6]!==K[6]||R[7]!==K[7]||R[8]!==K[8]||R[9]!==K[9]||R[10]!==K[10]||R[11]!==K[11])throw new Error("Missing KTX 2.0 identifier.");const t=new M,e=17*Uint32Array.BYTES_PER_ELEMENT,A=new G(_,K.length,e,!0);t.vkFormat=A._nextUint32(),t.typeSize=A._nextUint32(),t.pixelWidth=A._nextUint32(),t.pixelHeight=A._nextUint32(),t.pixelDepth=A._nextUint32(),t.layerCount=A._nextUint32(),t.faceCount=A._nextUint32();const T=A._nextUint32();t.supercompressionScheme=A._nextUint32();const O=A._nextUint32(),n=A._nextUint32(),B=A._nextUint32(),s=A._nextUint32(),r=A._nextUint64(),F=A._nextUint64(),N=new G(_,K.length+e,3*T*8,!0);for(let R=0;R<T;R++)t.levels.push({levelData:new Uint8Array(_.buffer,_.byteOffset+N._nextUint64(),N._nextUint64()),uncompressedByteLength:N._nextUint64()});const i=new G(_,O,n,!0),V={vendorId:i._skip(4)._nextUint16(),descriptorType:i._nextUint16(),versionNumber:i._nextUint16(),descriptorBlockSize:i._nextUint16(),colorModel:i._nextUint8(),colorPrimaries:i._nextUint8(),transferFunction:i._nextUint8(),flags:i._nextUint8(),texelBlockDimension:[i._nextUint8(),i._nextUint8(),i._nextUint8(),i._nextUint8()],bytesPlane:[i._nextUint8(),i._nextUint8(),i._nextUint8(),i._nextUint8(),i._nextUint8(),i._nextUint8(),i._nextUint8(),i._nextUint8()],samples:[]},o=(V.descriptorBlockSize/4-6)/4;for(let _=0;_<o;_++){const R={bitOffset:i._nextUint16(),bitLength:i._nextUint8(),channelType:i._nextUint8(),samplePosition:[i._nextUint8(),i._nextUint8(),i._nextUint8(),i._nextUint8()],sampleLower:-1/0,sampleUpper:1/0};64&R.channelType?(R.sampleLower=i._nextInt32(),R.sampleUpper=i._nextInt32()):(R.sampleLower=i._nextUint32(),R.sampleUpper=i._nextUint32()),V.samples[_]=R}t.dataFormatDescriptor.length=0,t.dataFormatDescriptor.push(V);const S=new G(_,B,s,!0);for(;S._offset<s;){const _=S._nextUint32(),R=S._scan(_),e=C(R),A=S._scan(_-R.byteLength);t.keyValue[e]=e.match(/^ktx/i)?C(A):A,S._offset%4&&S._skip(4-S._offset%4)}if(F<=0)return t;const a=new G(_,r,F,!0),U=a._nextUint16(),L=a._nextUint16(),E=a._nextUint32(),P=a._nextUint32(),c=a._nextUint32(),f=a._nextUint32(),l=[];for(let _=0;_<T;_++)l.push({imageFlags:a._nextUint32(),rgbSliceByteOffset:a._nextUint32(),rgbSliceByteLength:a._nextUint32(),alphaSliceByteOffset:a._nextUint32(),alphaSliceByteLength:a._nextUint32()});const X=r+a._offset,u=X+E,D=u+P,I=D+c,x=new Uint8Array(_.buffer,_.byteOffset+X,E),h=new Uint8Array(_.buffer,_.byteOffset+u,P),d=new Uint8Array(_.buffer,_.byteOffset+D,c),H=new Uint8Array(_.buffer,_.byteOffset+I,f);return t.globalData={endpointCount:U,selectorCount:L,imageDescs:l,endpointsData:x,selectorsData:h,tablesData:d,extendedData:H},t}(A)}catch(_){throw new t.RuntimeError("Invalid KTX2 file.")}if(0!==F.layerCount)throw new t.RuntimeError("KTX2 texture arrays are not supported.");if(0!==F.pixelDepth)throw new t.RuntimeError("KTX2 3D textures are unsupported.");const N=F.dataFormatDescriptor[0],i=new Array(F.levelCount);return 0!==F.vkFormat||163!==N.colorModel&&166!==N.colorModel?(e.push(A.buffer),function(R,t){const e=R.vkFormat===B.VK_FORMAT_R8G8B8_SRGB?n.RGB:n.RGBA;let A;R.vkFormat===B.VK_FORMAT_R8G8B8A8_UNORM?A=T.UNSIGNED_BYTE:R.vkFormat===B.VK_FORMAT_R16G16B16A16_SFLOAT?A=T.HALF_FLOAT:R.vkFormat===B.VK_FORMAT_R32G32B32A32_SFLOAT&&(A=T.FLOAT);for(let O=0;O<R.levels.length;++O){const B={};t[O]=B;const M=R.levels[O].levelData,G=R.pixelWidth>>O,K=R.pixelHeight>>O,C=G*K*n.componentsLength(e);for(let t=0;t<R.faceCount;++t){const O=M.byteOffset+C*R.typeSize*t;let n;n=_.defined(A)&&1!==T.sizeInBytes(A)?2===T.sizeInBytes(A)?new Uint16Array(M.buffer,O,C):new Float32Array(M.buffer,O,C):new Uint8Array(M.buffer,O,C),B[s[t]]={internalFormat:e,datatype:A,width:G,height:K,levelBuffer:n}}}}(F,i)):function(R,e,A,T,O,B){const M=new T.KTX2File(R);let G=M.getWidth(),K=M.getHeight();const C=M.getLevels(),r=M.getHasAlpha();if(!(G>0&&K>0&&C>0))throw M.close(),M.delete(),new t.RuntimeError("Invalid KTX2 file");let F,N;const i=e.dataFormatDescriptor[0],V=T.transcoder_texture_format;if(163===i.colorModel)if(A.etc)F=r?n.RGBA8_ETC2_EAC:n.RGB8_ETC2,N=r?V.cTFETC2_RGBA:V.cTFETC1_RGB;else if(A.etc1&&!r)F=n.RGB_ETC1,N=V.cTFETC1_RGB;else if(A.s3tc)F=r?n.RGBA_DXT5:n.RGB_DXT1,N=r?V.cTFBC3_RGBA:V.cTFBC1_RGB;else if(A.pvrtc)F=r?n.RGBA_PVRTC_4BPPV1:n.RGB_PVRTC_4BPPV1,N=r?V.cTFPVRTC1_4_RGBA:V.cTFPVRTC1_4_RGB;else if(A.astc)F=n.RGBA_ASTC,N=V.cTFASTC_4x4_RGBA;else{if(!A.bc7)throw new t.RuntimeError("No transcoding format target available for ETC1S compressed ktx2.");F=n.RGBA_BC7,N=V.cTFBC7_RGBA}else if(166===i.colorModel)if(A.astc)F=n.RGBA_ASTC,N=V.cTFASTC_4x4_RGBA;else if(A.bc7)F=n.RGBA_BC7,N=V.cTFBC7_RGBA;else if(A.s3tc)F=r?n.RGBA_DXT5:n.RGB_DXT1,N=r?V.cTFBC3_RGBA:V.cTFBC1_RGB;else if(A.etc)F=r?n.RGBA8_ETC2_EAC:n.RGB8_ETC2,N=r?V.cTFETC2_RGBA:V.cTFETC1_RGB;else if(A.etc1&&!r)F=n.RGB_ETC1,N=V.cTFETC1_RGB;else{if(!A.pvrtc)throw new t.RuntimeError("No transcoding format target available for UASTC compressed ktx2.");F=r?n.RGBA_PVRTC_4BPPV1:n.RGB_PVRTC_4BPPV1,N=r?V.cTFPVRTC1_4_RGBA:V.cTFPVRTC1_4_RGB}if(!M.startTranscoding())throw M.close(),M.delete(),new t.RuntimeError("startTranscoding() failed");for(let R=0;R<e.levels.length;++R){const A={};B[R]=A,G=e.pixelWidth>>R,K=e.pixelHeight>>R;const T=M.getImageTranscodedSizeInBytes(R,0,0,N.value),n=new Uint8Array(T),C=M.transcodeImage(n,R,0,0,N.value,0,-1,-1);if(!_.defined(C))throw new t.RuntimeError("transcodeImage() failed.");O.push(n.buffer),A[s[0]]={internalFormat:F,width:G,height:K,levelBuffer:n}}M.close(),M.delete()}(A,F,O,r,e,i),i}function N(_){r=_,r.initializeBasis(),self.onmessage=e(F),self.postMessage(!0)}return function(R){const t=R.data.webAssemblyConfig;if(_.defined(t))return require([t.modulePath],(function(R){if(!_.defined(t.wasmBinaryFile))return R().then((function(_){N(_)}));_.defined(R)||(R=self.MSC_TRANSCODER),R(t).then((function(_){N(_)}))}))}}));
define(["./defaultValue-040c41f9","./WebGLConstants-f7267ced","./RuntimeError-3c5db370","./createTaskProcessorWorker"],(function(_,R,t,e){"use strict";const A={UNSIGNED_BYTE:R.WebGLConstants.UNSIGNED_BYTE,UNSIGNED_SHORT:R.WebGLConstants.UNSIGNED_SHORT,UNSIGNED_INT:R.WebGLConstants.UNSIGNED_INT,FLOAT:R.WebGLConstants.FLOAT,HALF_FLOAT:R.WebGLConstants.HALF_FLOAT_OES,UNSIGNED_INT_24_8:R.WebGLConstants.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:R.WebGLConstants.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:R.WebGLConstants.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:R.WebGLConstants.UNSIGNED_SHORT_5_6_5,toWebGLConstant:function(_,t){switch(_){case A.UNSIGNED_BYTE:return R.WebGLConstants.UNSIGNED_BYTE;case A.UNSIGNED_SHORT:return R.WebGLConstants.UNSIGNED_SHORT;case A.UNSIGNED_INT:return R.WebGLConstants.UNSIGNED_INT;case A.FLOAT:return R.WebGLConstants.FLOAT;case A.HALF_FLOAT:return t.webgl2?R.WebGLConstants.HALF_FLOAT:R.WebGLConstants.HALF_FLOAT_OES;case A.UNSIGNED_INT_24_8:return R.WebGLConstants.UNSIGNED_INT_24_8;case A.UNSIGNED_SHORT_4_4_4_4:return R.WebGLConstants.UNSIGNED_SHORT_4_4_4_4;case A.UNSIGNED_SHORT_5_5_5_1:return R.WebGLConstants.UNSIGNED_SHORT_5_5_5_1;case A.UNSIGNED_SHORT_5_6_5:return A.UNSIGNED_SHORT_5_6_5}},isPacked:function(_){return _===A.UNSIGNED_INT_24_8||_===A.UNSIGNED_SHORT_4_4_4_4||_===A.UNSIGNED_SHORT_5_5_5_1||_===A.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(_){switch(_){case A.UNSIGNED_BYTE:return 1;case A.UNSIGNED_SHORT:case A.UNSIGNED_SHORT_4_4_4_4:case A.UNSIGNED_SHORT_5_5_5_1:case A.UNSIGNED_SHORT_5_6_5:case A.HALF_FLOAT:return 2;case A.UNSIGNED_INT:case A.FLOAT:case A.UNSIGNED_INT_24_8:return 4}},validate:function(_){return _===A.UNSIGNED_BYTE||_===A.UNSIGNED_SHORT||_===A.UNSIGNED_INT||_===A.FLOAT||_===A.HALF_FLOAT||_===A.UNSIGNED_INT_24_8||_===A.UNSIGNED_SHORT_4_4_4_4||_===A.UNSIGNED_SHORT_5_5_5_1||_===A.UNSIGNED_SHORT_5_6_5}};var T=Object.freeze(A);const O={DEPTH_COMPONENT:R.WebGLConstants.DEPTH_COMPONENT,DEPTH_STENCIL:R.WebGLConstants.DEPTH_STENCIL,ALPHA:R.WebGLConstants.ALPHA,RED:R.WebGLConstants.RED,RG:R.WebGLConstants.RG,RGB:R.WebGLConstants.RGB,RGBA:R.WebGLConstants.RGBA,LUMINANCE:R.WebGLConstants.LUMINANCE,LUMINANCE_ALPHA:R.WebGLConstants.LUMINANCE_ALPHA,RGB_DXT1:R.WebGLConstants.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:R.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:R.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:R.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:R.WebGLConstants.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:R.WebGLConstants.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:R.WebGLConstants.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:R.WebGLConstants.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:R.WebGLConstants.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:R.WebGLConstants.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:R.WebGLConstants.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:R.WebGLConstants.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:R.WebGLConstants.COMPRESSED_RGBA_BPTC_UNORM,componentsLength:function(_){switch(_){case O.RGB:return 3;case O.RGBA:return 4;case O.LUMINANCE_ALPHA:case O.RG:return 2;case O.ALPHA:case O.RED:case O.LUMINANCE:default:return 1}},validate:function(_){return _===O.DEPTH_COMPONENT||_===O.DEPTH_STENCIL||_===O.ALPHA||_===O.RED||_===O.RG||_===O.RGB||_===O.RGBA||_===O.LUMINANCE||_===O.LUMINANCE_ALPHA||_===O.RGB_DXT1||_===O.RGBA_DXT1||_===O.RGBA_DXT3||_===O.RGBA_DXT5||_===O.RGB_PVRTC_4BPPV1||_===O.RGB_PVRTC_2BPPV1||_===O.RGBA_PVRTC_4BPPV1||_===O.RGBA_PVRTC_2BPPV1||_===O.RGBA_ASTC||_===O.RGB_ETC1||_===O.RGB8_ETC2||_===O.RGBA8_ETC2_EAC||_===O.RGBA_BC7},isColorFormat:function(_){return _===O.ALPHA||_===O.RGB||_===O.RGBA||_===O.LUMINANCE||_===O.LUMINANCE_ALPHA},isDepthFormat:function(_){return _===O.DEPTH_COMPONENT||_===O.DEPTH_STENCIL},isCompressedFormat:function(_){return _===O.RGB_DXT1||_===O.RGBA_DXT1||_===O.RGBA_DXT3||_===O.RGBA_DXT5||_===O.RGB_PVRTC_4BPPV1||_===O.RGB_PVRTC_2BPPV1||_===O.RGBA_PVRTC_4BPPV1||_===O.RGBA_PVRTC_2BPPV1||_===O.RGBA_ASTC||_===O.RGB_ETC1||_===O.RGB8_ETC2||_===O.RGBA8_ETC2_EAC||_===O.RGBA_BC7},isDXTFormat:function(_){return _===O.RGB_DXT1||_===O.RGBA_DXT1||_===O.RGBA_DXT3||_===O.RGBA_DXT5},isPVRTCFormat:function(_){return _===O.RGB_PVRTC_4BPPV1||_===O.RGB_PVRTC_2BPPV1||_===O.RGBA_PVRTC_4BPPV1||_===O.RGBA_PVRTC_2BPPV1},isASTCFormat:function(_){return _===O.RGBA_ASTC},isETC1Format:function(_){return _===O.RGB_ETC1},isETC2Format:function(_){return _===O.RGB8_ETC2||_===O.RGBA8_ETC2_EAC},isBC7Format:function(_){return _===O.RGBA_BC7},compressedTextureSizeInBytes:function(_,R,t){switch(_){case O.RGB_DXT1:case O.RGBA_DXT1:case O.RGB_ETC1:case O.RGB8_ETC2:return Math.floor((R+3)/4)*Math.floor((t+3)/4)*8;case O.RGBA_DXT3:case O.RGBA_DXT5:case O.RGBA_ASTC:case O.RGBA8_ETC2_EAC:return Math.floor((R+3)/4)*Math.floor((t+3)/4)*16;case O.RGB_PVRTC_4BPPV1:case O.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(R,8)*Math.max(t,8)*4+7)/8);case O.RGB_PVRTC_2BPPV1:case O.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(R,16)*Math.max(t,8)*2+7)/8);case O.RGBA_BC7:return Math.ceil(R/4)*Math.ceil(t/4)*16;default:return 0}},textureSizeInBytes:function(_,R,t,e){let A=O.componentsLength(_);return T.isPacked(R)&&(A=1),A*T.sizeInBytes(R)*t*e},alignmentInBytes:function(_,R,t){const e=O.textureSizeInBytes(_,R,t,1)%4;return 0===e?4:2===e?2:1},createTypedArray:function(_,R,t,e){let A;const n=T.sizeInBytes(R);A=n===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:n===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:n===Float32Array.BYTES_PER_ELEMENT&&R===T.FLOAT?Float32Array:Uint32Array;return new A(O.componentsLength(_)*t*e)},flipY:function(_,R,t,e,A){if(1===A)return _;const T=O.createTypedArray(R,t,e,A),n=O.componentsLength(R),B=e*n;for(let R=0;R<A;++R){const t=R*e*n,O=(A-R-1)*e*n;for(let R=0;R<B;++R)T[O+R]=_[t+R]}return T},toInternalFormat:function(_,t,e){if(!e.webgl2)return _;if(_===O.DEPTH_STENCIL)return R.WebGLConstants.DEPTH24_STENCIL8;if(_===O.DEPTH_COMPONENT){if(t===T.UNSIGNED_SHORT)return R.WebGLConstants.DEPTH_COMPONENT16;if(t===T.UNSIGNED_INT)return R.WebGLConstants.DEPTH_COMPONENT24}if(t===T.FLOAT)switch(_){case O.RGBA:return R.WebGLConstants.RGBA32F;case O.RGB:return R.WebGLConstants.RGB32F;case O.RG:return R.WebGLConstants.RG32F;case O.RED:return R.WebGLConstants.R32F}if(t===T.HALF_FLOAT)switch(_){case O.RGBA:return R.WebGLConstants.RGBA16F;case O.RGB:return R.WebGLConstants.RGB16F;case O.RG:return R.WebGLConstants.RG16F;case O.RED:return R.WebGLConstants.R16F}return _}};var n=Object.freeze(O);var B=Object.freeze({VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033});class G{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class M{constructor(_,R,t,e){this._dataView=void 0,this._littleEndian=void 0,this._offset=void 0,this._dataView=new DataView(_.buffer,_.byteOffset+R,t),this._littleEndian=e,this._offset=0}_nextUint8(){const _=this._dataView.getUint8(this._offset);return this._offset+=1,_}_nextUint16(){const _=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,_}_nextUint32(){const _=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,_}_nextUint64(){const _=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,_}_nextInt32(){const _=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,_}_skip(_){return this._offset+=_,this}_scan(_,R=0){const t=this._offset;let e=0;for(;this._dataView.getUint8(this._offset)!==R&&e<_;)e++,this._offset++;return e<_&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+t,e)}}const K=[171,75,84,88,32,50,48,187,13,10,26,10];function C(_){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(_):Buffer.from(_).toString("utf8")}const s=["positiveX","negativeX","positiveY","negativeY","positiveZ","negativeZ"];let r;function F(R,e){const A=R.ktx2Buffer,O=R.supportedTargetFormats;let F;try{F=function(_){const R=new Uint8Array(_.buffer,_.byteOffset,K.length);if(R[0]!==K[0]||R[1]!==K[1]||R[2]!==K[2]||R[3]!==K[3]||R[4]!==K[4]||R[5]!==K[5]||R[6]!==K[6]||R[7]!==K[7]||R[8]!==K[8]||R[9]!==K[9]||R[10]!==K[10]||R[11]!==K[11])throw new Error("Missing KTX 2.0 identifier.");const t=new G,e=17*Uint32Array.BYTES_PER_ELEMENT,A=new M(_,K.length,e,!0);t.vkFormat=A._nextUint32(),t.typeSize=A._nextUint32(),t.pixelWidth=A._nextUint32(),t.pixelHeight=A._nextUint32(),t.pixelDepth=A._nextUint32(),t.layerCount=A._nextUint32(),t.faceCount=A._nextUint32();const T=A._nextUint32();t.supercompressionScheme=A._nextUint32();const O=A._nextUint32(),n=A._nextUint32(),B=A._nextUint32(),s=A._nextUint32(),r=A._nextUint64(),F=A._nextUint64(),N=new M(_,K.length+e,3*T*8,!0);for(let R=0;R<T;R++)t.levels.push({levelData:new Uint8Array(_.buffer,_.byteOffset+N._nextUint64(),N._nextUint64()),uncompressedByteLength:N._nextUint64()});const i=new M(_,O,n,!0),V={vendorId:i._skip(4)._nextUint16(),descriptorType:i._nextUint16(),versionNumber:i._nextUint16(),descriptorBlockSize:i._nextUint16(),colorModel:i._nextUint8(),colorPrimaries:i._nextUint8(),transferFunction:i._nextUint8(),flags:i._nextUint8(),texelBlockDimension:[i._nextUint8(),i._nextUint8(),i._nextUint8(),i._nextUint8()],bytesPlane:[i._nextUint8(),i._nextUint8(),i._nextUint8(),i._nextUint8(),i._nextUint8(),i._nextUint8(),i._nextUint8(),i._nextUint8()],samples:[]},o=(V.descriptorBlockSize/4-6)/4;for(let _=0;_<o;_++){const R={bitOffset:i._nextUint16(),bitLength:i._nextUint8(),channelType:i._nextUint8(),samplePosition:[i._nextUint8(),i._nextUint8(),i._nextUint8(),i._nextUint8()],sampleLower:-1/0,sampleUpper:1/0};64&R.channelType?(R.sampleLower=i._nextInt32(),R.sampleUpper=i._nextInt32()):(R.sampleLower=i._nextUint32(),R.sampleUpper=i._nextUint32()),V.samples[_]=R}t.dataFormatDescriptor.length=0,t.dataFormatDescriptor.push(V);const a=new M(_,B,s,!0);for(;a._offset<s;){const _=a._nextUint32(),R=a._scan(_),e=C(R),A=a._scan(_-R.byteLength);t.keyValue[e]=e.match(/^ktx/i)?C(A):A,a._offset%4&&a._skip(4-a._offset%4)}if(F<=0)return t;const S=new M(_,r,F,!0),U=S._nextUint16(),E=S._nextUint16(),L=S._nextUint32(),P=S._nextUint32(),c=S._nextUint32(),f=S._nextUint32(),l=[];for(let _=0;_<T;_++)l.push({imageFlags:S._nextUint32(),rgbSliceByteOffset:S._nextUint32(),rgbSliceByteLength:S._nextUint32(),alphaSliceByteOffset:S._nextUint32(),alphaSliceByteLength:S._nextUint32()});const X=r+S._offset,u=X+L,D=u+P,I=D+c,x=new Uint8Array(_.buffer,_.byteOffset+X,L),h=new Uint8Array(_.buffer,_.byteOffset+u,P),d=new Uint8Array(_.buffer,_.byteOffset+D,c),H=new Uint8Array(_.buffer,_.byteOffset+I,f);return t.globalData={endpointCount:U,selectorCount:E,imageDescs:l,endpointsData:x,selectorsData:h,tablesData:d,extendedData:H},t}(A)}catch(_){throw new t.RuntimeError("Invalid KTX2 file.")}if(0!==F.layerCount)throw new t.RuntimeError("KTX2 texture arrays are not supported.");if(0!==F.pixelDepth)throw new t.RuntimeError("KTX2 3D textures are unsupported.");const N=F.dataFormatDescriptor[0],i=new Array(F.levelCount);return 0!==F.vkFormat||163!==N.colorModel&&166!==N.colorModel?(e.push(A.buffer),function(R,t){const e=R.vkFormat===B.VK_FORMAT_R8G8B8_SRGB?n.RGB:n.RGBA;let A;R.vkFormat===B.VK_FORMAT_R8G8B8A8_UNORM?A=T.UNSIGNED_BYTE:R.vkFormat===B.VK_FORMAT_R16G16B16A16_SFLOAT?A=T.HALF_FLOAT:R.vkFormat===B.VK_FORMAT_R32G32B32A32_SFLOAT&&(A=T.FLOAT);for(let O=0;O<R.levels.length;++O){const B={};t[O]=B;const G=R.levels[O].levelData,M=R.pixelWidth>>O,K=R.pixelHeight>>O,C=M*K*n.componentsLength(e);for(let t=0;t<R.faceCount;++t){const O=G.byteOffset+C*R.typeSize*t;let n;n=_.defined(A)&&1!==T.sizeInBytes(A)?2===T.sizeInBytes(A)?new Uint16Array(G.buffer,O,C):new Float32Array(G.buffer,O,C):new Uint8Array(G.buffer,O,C),B[s[t]]={internalFormat:e,datatype:A,width:M,height:K,levelBuffer:n}}}}(F,i)):function(R,e,A,T,O,B){const G=new T.KTX2File(R);let M=G.getWidth(),K=G.getHeight();const C=G.getLevels(),r=G.getHasAlpha();if(!(M>0&&K>0&&C>0))throw G.close(),G.delete(),new t.RuntimeError("Invalid KTX2 file");let F,N;const i=e.dataFormatDescriptor[0],V=T.transcoder_texture_format;if(163===i.colorModel)if(A.etc)F=r?n.RGBA8_ETC2_EAC:n.RGB8_ETC2,N=r?V.cTFETC2_RGBA:V.cTFETC1_RGB;else if(A.etc1&&!r)F=n.RGB_ETC1,N=V.cTFETC1_RGB;else if(A.s3tc)F=r?n.RGBA_DXT5:n.RGB_DXT1,N=r?V.cTFBC3_RGBA:V.cTFBC1_RGB;else if(A.pvrtc)F=r?n.RGBA_PVRTC_4BPPV1:n.RGB_PVRTC_4BPPV1,N=r?V.cTFPVRTC1_4_RGBA:V.cTFPVRTC1_4_RGB;else if(A.astc)F=n.RGBA_ASTC,N=V.cTFASTC_4x4_RGBA;else{if(!A.bc7)throw new t.RuntimeError("No transcoding format target available for ETC1S compressed ktx2.");F=n.RGBA_BC7,N=V.cTFBC7_RGBA}else if(166===i.colorModel)if(A.astc)F=n.RGBA_ASTC,N=V.cTFASTC_4x4_RGBA;else if(A.bc7)F=n.RGBA_BC7,N=V.cTFBC7_RGBA;else if(A.s3tc)F=r?n.RGBA_DXT5:n.RGB_DXT1,N=r?V.cTFBC3_RGBA:V.cTFBC1_RGB;else if(A.etc)F=r?n.RGBA8_ETC2_EAC:n.RGB8_ETC2,N=r?V.cTFETC2_RGBA:V.cTFETC1_RGB;else if(A.etc1&&!r)F=n.RGB_ETC1,N=V.cTFETC1_RGB;else{if(!A.pvrtc)throw new t.RuntimeError("No transcoding format target available for UASTC compressed ktx2.");F=r?n.RGBA_PVRTC_4BPPV1:n.RGB_PVRTC_4BPPV1,N=r?V.cTFPVRTC1_4_RGBA:V.cTFPVRTC1_4_RGB}if(!G.startTranscoding())throw G.close(),G.delete(),new t.RuntimeError("startTranscoding() failed");for(let R=0;R<e.levels.length;++R){const A={};B[R]=A,M=e.pixelWidth>>R,K=e.pixelHeight>>R;const T=G.getImageTranscodedSizeInBytes(R,0,0,N.value),n=new Uint8Array(T),C=G.transcodeImage(n,R,0,0,N.value,0,-1,-1);if(!_.defined(C))throw new t.RuntimeError("transcodeImage() failed.");O.push(n.buffer),A[s[0]]={internalFormat:F,width:M,height:K,levelBuffer:n}}G.close(),G.delete()}(A,F,O,r,e,i),i}function N(_){r=_,r.initializeBasis(),self.onmessage=e(F),self.postMessage(!0)}return function(R){const t=R.data.webAssemblyConfig;if(_.defined(t))return require([t.modulePath],(function(R){if(!_.defined(t.wasmBinaryFile))return R().then((function(_){N(_)}));_.defined(R)||(R=self.MSC_TRANSCODER),R(t).then((function(_){N(_)}))}))}}));
/**
* @license
* Cesium - https://github.com/CesiumGS/cesium
* Version 1.101
* Version 1.102
*

@@ -6,0 +6,0 @@ * Copyright 2011-2022 Cesium Contributors

@@ -1,1 +0,1 @@

define(["./AttributeCompression-5fa81749","./Transforms-b1441a66","./Matrix2-66622085","./Matrix3-d6f3913c","./defaultValue-040c41f9","./TerrainEncoding-99f48506","./IndexDatatype-eddea9c9","./Math-8e567554","./OrientedBoundingBox-ac323c64","./createTaskProcessorWorker","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./combine-6eb6e848","./RuntimeError-3c5db370","./EllipsoidTangentPlane-fc1becbb","./AxisAlignedBoundingBox-ba8ff526","./IntersectionTests-da3e2bdf","./Plane-6aee7ffc"],(function(e,t,n,i,s,r,h,o,u,d,p,l,a,f,c,g,m,x){"use strict";const w={clipTriangleAtAxisAlignedThreshold:function(e,t,n,i,r,h){let o,u,d;s.defined(h)?h.length=0:h=[],t?(o=n<e,u=i<e,d=r<e):(o=n>e,u=i>e,d=r>e);const p=o+u+d;let l,a,f,c,g,m;return 1===p?o?(l=(e-n)/(i-n),a=(e-n)/(r-n),h.push(1),h.push(2),1!==a&&(h.push(-1),h.push(0),h.push(2),h.push(a)),1!==l&&(h.push(-1),h.push(0),h.push(1),h.push(l))):u?(f=(e-i)/(r-i),c=(e-i)/(n-i),h.push(2),h.push(0),1!==c&&(h.push(-1),h.push(1),h.push(0),h.push(c)),1!==f&&(h.push(-1),h.push(1),h.push(2),h.push(f))):d&&(g=(e-r)/(n-r),m=(e-r)/(i-r),h.push(0),h.push(1),1!==m&&(h.push(-1),h.push(2),h.push(1),h.push(m)),1!==g&&(h.push(-1),h.push(2),h.push(0),h.push(g))):2===p?o||n===e?u||i===e?d||r===e||(a=(e-n)/(r-n),f=(e-i)/(r-i),h.push(2),h.push(-1),h.push(0),h.push(2),h.push(a),h.push(-1),h.push(1),h.push(2),h.push(f)):(m=(e-r)/(i-r),l=(e-n)/(i-n),h.push(1),h.push(-1),h.push(2),h.push(1),h.push(m),h.push(-1),h.push(0),h.push(1),h.push(l)):(c=(e-i)/(n-i),g=(e-r)/(n-r),h.push(0),h.push(-1),h.push(1),h.push(0),h.push(c),h.push(-1),h.push(2),h.push(0),h.push(g)):3!==p&&(h.push(0),h.push(1),h.push(2)),h},computeBarycentricCoordinates:function(e,t,n,r,h,o,u,d,p){const l=n-u,a=u-h,f=o-d,c=r-d,g=1/(f*l+a*c),m=t-d,x=e-u,w=(f*x+a*m)*g,C=(-c*x+l*m)*g,B=1-w-C;return s.defined(p)?(p.x=w,p.y=C,p.z=B,p):new i.Cartesian3(w,C,B)},computeLineSegmentLineSegmentIntersection:function(e,t,i,r,h,o,u,d,p){const l=(d-o)*(i-e)-(u-h)*(r-t);if(0===l)return;const a=((u-h)*(t-o)-(d-o)*(e-h))/l,f=((i-e)*(t-o)-(r-t)*(e-h))/l;return a>=0&&a<=1&&f>=0&&f<=1?(s.defined(p)||(p=new n.Cartesian2),p.x=e+a*(i-e),p.y=t+a*(r-t),p):void 0}};var C=w;const B=32767,y=16383,I=[],b=[],A=[],v=new i.Cartographic;let T=new i.Cartesian3;const M=[],z=[],V=[],N=[],E=[],R=new i.Cartesian3,H=new t.BoundingSphere,O=new u.OrientedBoundingBox,S=new n.Cartesian2,U=new i.Cartesian3;function F(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}F.prototype.clone=function(e){return s.defined(e)||(e=new F),e.uBuffer=this.uBuffer,e.vBuffer=this.vBuffer,e.heightBuffer=this.heightBuffer,e.normalBuffer=this.normalBuffer,e.index=this.index,e.first=this.first,e.second=this.second,e.ratio=this.ratio,e},F.prototype.initializeIndexed=function(e,t,n,i,s){this.uBuffer=e,this.vBuffer=t,this.heightBuffer=n,this.normalBuffer=i,this.index=s,this.first=void 0,this.second=void 0,this.ratio=void 0},F.prototype.initializeFromClipResult=function(e,t,n){let i=t+1;return-1!==e[t]?n[e[t]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=n[e[i]],++i,this.second=n[e[i]],++i,this.ratio=e[i],++i),i},F.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})},F.prototype.isIndexed=function(){return s.defined(this.index)},F.prototype.getH=function(){return s.defined(this.index)?this.heightBuffer[this.index]:o.CesiumMath.lerp(this.first.getH(),this.second.getH(),this.ratio)},F.prototype.getU=function(){return s.defined(this.index)?this.uBuffer[this.index]:o.CesiumMath.lerp(this.first.getU(),this.second.getU(),this.ratio)},F.prototype.getV=function(){return s.defined(this.index)?this.vBuffer[this.index]:o.CesiumMath.lerp(this.first.getV(),this.second.getV(),this.ratio)};let P=new n.Cartesian2,D=-1;const W=[new i.Cartesian3,new i.Cartesian3],X=[new i.Cartesian3,new i.Cartesian3];function k(t,n){++D;let s=W[D],r=X[D];return s=e.AttributeCompression.octDecode(t.first.getNormalX(),t.first.getNormalY(),s),r=e.AttributeCompression.octDecode(t.second.getNormalX(),t.second.getNormalY(),r),T=i.Cartesian3.lerp(s,r,t.ratio,T),i.Cartesian3.normalize(T,T),e.AttributeCompression.octEncode(T,n),--D,n}F.prototype.getNormalX=function(){return s.defined(this.index)?this.normalBuffer[2*this.index]:(P=k(this,P),P.x)},F.prototype.getNormalY=function(){return s.defined(this.index)?this.normalBuffer[2*this.index+1]:(P=k(this,P),P.y)};const K=[];function L(e,t,n,i,r,h,o,u,d){if(0===o.length)return;let p=0,l=0;for(;l<o.length;)l=K[p++].initializeFromClipResult(o,l,u);for(let r=0;r<p;++r){const o=K[r];if(o.isIndexed())o.newIndex=h[o.index],o.uBuffer=e,o.vBuffer=t,o.heightBuffer=n,d&&(o.normalBuffer=i);else{const r=o.getKey();if(s.defined(h[r]))o.newIndex=h[r];else{const s=e.length;e.push(o.getU()),t.push(o.getV()),n.push(o.getH()),d&&(i.push(o.getNormalX()),i.push(o.getNormalY())),o.newIndex=s,h[r]=s}}}3===p?(r.push(K[0].newIndex),r.push(K[1].newIndex),r.push(K[2].newIndex)):4===p&&(r.push(K[0].newIndex),r.push(K[1].newIndex),r.push(K[2].newIndex),r.push(K[0].newIndex),r.push(K[2].newIndex),r.push(K[3].newIndex))}return K.push(new F),K.push(new F),K.push(new F),K.push(new F),d((function(e,s){const d=e.isEastChild,p=e.isNorthChild,l=d?y:0,a=d?B:y,f=p?y:0,c=p?B:y,g=M,m=z,x=V,w=E;g.length=0,m.length=0,x.length=0,w.length=0;const P=N;P.length=0;const D={},W=e.vertices;let X=e.indices;X=X.subarray(0,e.indexCountWithoutSkirts);const k=r.TerrainEncoding.clone(e.encoding),K=k.hasVertexNormals;let Y=0;const _=e.vertexCountWithoutSkirts,G=e.minimumHeight,J=e.maximumHeight,Z=new Array(_),j=new Array(_),q=new Array(_),Q=K?new Array(2*_):void 0;let $,ee,te,ne,ie;for(ee=0,te=0;ee<_;++ee,te+=2){const e=k.decodeTextureCoordinates(W,ee,S);if($=k.decodeHeight(W,ee),ne=o.CesiumMath.clamp(e.x*B|0,0,B),ie=o.CesiumMath.clamp(e.y*B|0,0,B),q[ee]=o.CesiumMath.clamp(($-G)/(J-G)*B|0,0,B),ne<20&&(ne=0),ie<20&&(ie=0),B-ne<20&&(ne=B),B-ie<20&&(ie=B),Z[ee]=ne,j[ee]=ie,K){const e=k.getOctEncodedNormal(W,ee,U);Q[te]=e.x,Q[te+1]=e.y}(d&&ne>=y||!d&&ne<=y)&&(p&&ie>=y||!p&&ie<=y)&&(D[ee]=Y,g.push(ne),m.push(ie),x.push(q[ee]),K&&(w.push(Q[te]),w.push(Q[te+1])),++Y)}const se=[];se.push(new F),se.push(new F),se.push(new F);const re=[];let he,oe;for(re.push(new F),re.push(new F),re.push(new F),ee=0;ee<X.length;ee+=3){const e=X[ee],t=X[ee+1],n=X[ee+2],i=Z[e],s=Z[t],r=Z[n];se[0].initializeIndexed(Z,j,q,Q,e),se[1].initializeIndexed(Z,j,q,Q,t),se[2].initializeIndexed(Z,j,q,Q,n);const h=C.clipTriangleAtAxisAlignedThreshold(y,d,i,s,r,I);he=0,he>=h.length||(he=re[0].initializeFromClipResult(h,he,se),he>=h.length||(he=re[1].initializeFromClipResult(h,he,se),he>=h.length||(he=re[2].initializeFromClipResult(h,he,se),oe=C.clipTriangleAtAxisAlignedThreshold(y,p,re[0].getV(),re[1].getV(),re[2].getV(),b),L(g,m,x,w,P,D,oe,re,K),he<h.length&&(re[2].clone(re[1]),re[2].initializeFromClipResult(h,he,se),oe=C.clipTriangleAtAxisAlignedThreshold(y,p,re[0].getV(),re[1].getV(),re[2].getV(),b),L(g,m,x,w,P,D,oe,re,K)))))}const ue=d?-32767:0,de=p?-32767:0,pe=[],le=[],ae=[],fe=[];let ce=Number.MAX_VALUE,ge=-ce;const me=A;me.length=0;const xe=i.Ellipsoid.clone(e.ellipsoid),we=n.Rectangle.clone(e.childRectangle),Ce=we.north,Be=we.south;let ye=we.east;const Ie=we.west;for(ye<Ie&&(ye+=o.CesiumMath.TWO_PI),ee=0;ee<g.length;++ee)ne=Math.round(g[ee]),ne<=l?(pe.push(ee),ne=0):ne>=a?(ae.push(ee),ne=B):ne=2*ne+ue,g[ee]=ne,ie=Math.round(m[ee]),ie<=f?(le.push(ee),ie=0):ie>=c?(fe.push(ee),ie=B):ie=2*ie+de,m[ee]=ie,$=o.CesiumMath.lerp(G,J,x[ee]/B),$<ce&&(ce=$),$>ge&&(ge=$),x[ee]=$,v.longitude=o.CesiumMath.lerp(Ie,ye,ne/B),v.latitude=o.CesiumMath.lerp(Be,Ce,ie/B),v.height=$,xe.cartographicToCartesian(v,T),me.push(T.x),me.push(T.y),me.push(T.z);const be=t.BoundingSphere.fromVertices(me,i.Cartesian3.ZERO,3,H),Ae=u.OrientedBoundingBox.fromRectangle(we,ce,ge,xe,O),ve=new r.EllipsoidalOccluder(xe).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(be.center,me,3,be.center,ce,R),Te=ge-ce,Me=new Uint16Array(g.length+m.length+x.length);for(ee=0;ee<g.length;++ee)Me[ee]=g[ee];let ze=g.length;for(ee=0;ee<m.length;++ee)Me[ze+ee]=m[ee];for(ze+=m.length,ee=0;ee<x.length;++ee)Me[ze+ee]=B*(x[ee]-ce)/Te;const Ve=h.IndexDatatype.createTypedArray(g.length,P);let Ne;if(K){const e=new Uint8Array(w);s.push(Me.buffer,Ve.buffer,e.buffer),Ne=e.buffer}else s.push(Me.buffer,Ve.buffer);return{vertices:Me.buffer,encodedNormals:Ne,indices:Ve.buffer,minimumHeight:ce,maximumHeight:ge,westIndices:pe,southIndices:le,eastIndices:ae,northIndices:fe,boundingSphere:be,orientedBoundingBox:Ae,horizonOcclusionPoint:ve}}))}));
define(["./AttributeCompression-5fa81749","./Transforms-b7f686a8","./Matrix2-66622085","./Matrix3-d6f3913c","./defaultValue-040c41f9","./TerrainEncoding-ce59c054","./IndexDatatype-eddea9c9","./Math-8e567554","./OrientedBoundingBox-60a5c9a1","./createTaskProcessorWorker","./ComponentDatatype-dd0b58d1","./WebGLConstants-f7267ced","./combine-6eb6e848","./RuntimeError-3c5db370","./EllipsoidTangentPlane-ae5d3d65","./AxisAlignedBoundingBox-680337b6","./IntersectionTests-7d927f09","./Plane-6aee7ffc"],(function(e,t,n,i,s,r,h,o,u,d,p,l,a,c,f,g,m,x){"use strict";const w={clipTriangleAtAxisAlignedThreshold:function(e,t,n,i,r,h){let o,u,d;s.defined(h)?h.length=0:h=[],t?(o=n<e,u=i<e,d=r<e):(o=n>e,u=i>e,d=r>e);const p=o+u+d;let l,a,c,f,g,m;return 1===p?o?(l=(e-n)/(i-n),a=(e-n)/(r-n),h.push(1),h.push(2),1!==a&&(h.push(-1),h.push(0),h.push(2),h.push(a)),1!==l&&(h.push(-1),h.push(0),h.push(1),h.push(l))):u?(c=(e-i)/(r-i),f=(e-i)/(n-i),h.push(2),h.push(0),1!==f&&(h.push(-1),h.push(1),h.push(0),h.push(f)),1!==c&&(h.push(-1),h.push(1),h.push(2),h.push(c))):d&&(g=(e-r)/(n-r),m=(e-r)/(i-r),h.push(0),h.push(1),1!==m&&(h.push(-1),h.push(2),h.push(1),h.push(m)),1!==g&&(h.push(-1),h.push(2),h.push(0),h.push(g))):2===p?o||n===e?u||i===e?d||r===e||(a=(e-n)/(r-n),c=(e-i)/(r-i),h.push(2),h.push(-1),h.push(0),h.push(2),h.push(a),h.push(-1),h.push(1),h.push(2),h.push(c)):(m=(e-r)/(i-r),l=(e-n)/(i-n),h.push(1),h.push(-1),h.push(2),h.push(1),h.push(m),h.push(-1),h.push(0),h.push(1),h.push(l)):(f=(e-i)/(n-i),g=(e-r)/(n-r),h.push(0),h.push(-1),h.push(1),h.push(0),h.push(f),h.push(-1),h.push(2),h.push(0),h.push(g)):3!==p&&(h.push(0),h.push(1),h.push(2)),h},computeBarycentricCoordinates:function(e,t,n,r,h,o,u,d,p){const l=n-u,a=u-h,c=o-d,f=r-d,g=1/(c*l+a*f),m=t-d,x=e-u,w=(c*x+a*m)*g,C=(-f*x+l*m)*g,B=1-w-C;return s.defined(p)?(p.x=w,p.y=C,p.z=B,p):new i.Cartesian3(w,C,B)},computeLineSegmentLineSegmentIntersection:function(e,t,i,r,h,o,u,d,p){const l=(d-o)*(i-e)-(u-h)*(r-t);if(0===l)return;const a=((u-h)*(t-o)-(d-o)*(e-h))/l,c=((i-e)*(t-o)-(r-t)*(e-h))/l;return a>=0&&a<=1&&c>=0&&c<=1?(s.defined(p)||(p=new n.Cartesian2),p.x=e+a*(i-e),p.y=t+a*(r-t),p):void 0}};var C=w;const B=32767,y=16383,I=[],A=[],b=[],v=new i.Cartographic;let T=new i.Cartesian3;const M=[],z=[],V=[],N=[],E=[],R=new i.Cartesian3,H=new t.BoundingSphere,O=new u.OrientedBoundingBox,S=new n.Cartesian2,U=new i.Cartesian3;function F(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}F.prototype.clone=function(e){return s.defined(e)||(e=new F),e.uBuffer=this.uBuffer,e.vBuffer=this.vBuffer,e.heightBuffer=this.heightBuffer,e.normalBuffer=this.normalBuffer,e.index=this.index,e.first=this.first,e.second=this.second,e.ratio=this.ratio,e},F.prototype.initializeIndexed=function(e,t,n,i,s){this.uBuffer=e,this.vBuffer=t,this.heightBuffer=n,this.normalBuffer=i,this.index=s,this.first=void 0,this.second=void 0,this.ratio=void 0},F.prototype.initializeFromClipResult=function(e,t,n){let i=t+1;return-1!==e[t]?n[e[t]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=n[e[i]],++i,this.second=n[e[i]],++i,this.ratio=e[i],++i),i},F.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})},F.prototype.isIndexed=function(){return s.defined(this.index)},F.prototype.getH=function(){return s.defined(this.index)?this.heightBuffer[this.index]:o.CesiumMath.lerp(this.first.getH(),this.second.getH(),this.ratio)},F.prototype.getU=function(){return s.defined(this.index)?this.uBuffer[this.index]:o.CesiumMath.lerp(this.first.getU(),this.second.getU(),this.ratio)},F.prototype.getV=function(){return s.defined(this.index)?this.vBuffer[this.index]:o.CesiumMath.lerp(this.first.getV(),this.second.getV(),this.ratio)};let P=new n.Cartesian2,D=-1;const W=[new i.Cartesian3,new i.Cartesian3],X=[new i.Cartesian3,new i.Cartesian3];function k(t,n){++D;let s=W[D],r=X[D];return s=e.AttributeCompression.octDecode(t.first.getNormalX(),t.first.getNormalY(),s),r=e.AttributeCompression.octDecode(t.second.getNormalX(),t.second.getNormalY(),r),T=i.Cartesian3.lerp(s,r,t.ratio,T),i.Cartesian3.normalize(T,T),e.AttributeCompression.octEncode(T,n),--D,n}F.prototype.getNormalX=function(){return s.defined(this.index)?this.normalBuffer[2*this.index]:(P=k(this,P),P.x)},F.prototype.getNormalY=function(){return s.defined(this.index)?this.normalBuffer[2*this.index+1]:(P=k(this,P),P.y)};const K=[];function L(e,t,n,i,r,h,o,u,d){if(0===o.length)return;let p=0,l=0;for(;l<o.length;)l=K[p++].initializeFromClipResult(o,l,u);for(let r=0;r<p;++r){const o=K[r];if(o.isIndexed())o.newIndex=h[o.index],o.uBuffer=e,o.vBuffer=t,o.heightBuffer=n,d&&(o.normalBuffer=i);else{const r=o.getKey();if(s.defined(h[r]))o.newIndex=h[r];else{const s=e.length;e.push(o.getU()),t.push(o.getV()),n.push(o.getH()),d&&(i.push(o.getNormalX()),i.push(o.getNormalY())),o.newIndex=s,h[r]=s}}}3===p?(r.push(K[0].newIndex),r.push(K[1].newIndex),r.push(K[2].newIndex)):4===p&&(r.push(K[0].newIndex),r.push(K[1].newIndex),r.push(K[2].newIndex),r.push(K[0].newIndex),r.push(K[2].newIndex),r.push(K[3].newIndex))}return K.push(new F),K.push(new F),K.push(new F),K.push(new F),d((function(e,s){const d=e.isEastChild,p=e.isNorthChild,l=d?y:0,a=d?B:y,c=p?y:0,f=p?B:y,g=M,m=z,x=V,w=E;g.length=0,m.length=0,x.length=0,w.length=0;const P=N;P.length=0;const D={},W=e.vertices;let X=e.indices;X=X.subarray(0,e.indexCountWithoutSkirts);const k=r.TerrainEncoding.clone(e.encoding),K=k.hasVertexNormals;let Y=0;const _=e.vertexCountWithoutSkirts,G=e.minimumHeight,J=e.maximumHeight,Z=new Array(_),j=new Array(_),q=new Array(_),Q=K?new Array(2*_):void 0;let $,ee,te,ne,ie;for(ee=0,te=0;ee<_;++ee,te+=2){const e=k.decodeTextureCoordinates(W,ee,S);if($=k.decodeHeight(W,ee),ne=o.CesiumMath.clamp(e.x*B|0,0,B),ie=o.CesiumMath.clamp(e.y*B|0,0,B),q[ee]=o.CesiumMath.clamp(($-G)/(J-G)*B|0,0,B),ne<20&&(ne=0),ie<20&&(ie=0),B-ne<20&&(ne=B),B-ie<20&&(ie=B),Z[ee]=ne,j[ee]=ie,K){const e=k.getOctEncodedNormal(W,ee,U);Q[te]=e.x,Q[te+1]=e.y}(d&&ne>=y||!d&&ne<=y)&&(p&&ie>=y||!p&&ie<=y)&&(D[ee]=Y,g.push(ne),m.push(ie),x.push(q[ee]),K&&(w.push(Q[te]),w.push(Q[te+1])),++Y)}const se=[];se.push(new F),se.push(new F),se.push(new F);const re=[];let he,oe;for(re.push(new F),re.push(new F),re.push(new F),ee=0;ee<X.length;ee+=3){const e=X[ee],t=X[ee+1],n=X[ee+2],i=Z[e],s=Z[t],r=Z[n];se[0].initializeIndexed(Z,j,q,Q,e),se[1].initializeIndexed(Z,j,q,Q,t),se[2].initializeIndexed(Z,j,q,Q,n);const h=C.clipTriangleAtAxisAlignedThreshold(y,d,i,s,r,I);he=0,he>=h.length||(he=re[0].initializeFromClipResult(h,he,se),he>=h.length||(he=re[1].initializeFromClipResult(h,he,se),he>=h.length||(he=re[2].initializeFromClipResult(h,he,se),oe=C.clipTriangleAtAxisAlignedThreshold(y,p,re[0].getV(),re[1].getV(),re[2].getV(),A),L(g,m,x,w,P,D,oe,re,K),he<h.length&&(re[2].clone(re[1]),re[2].initializeFromClipResult(h,he,se),oe=C.clipTriangleAtAxisAlignedThreshold(y,p,re[0].getV(),re[1].getV(),re[2].getV(),A),L(g,m,x,w,P,D,oe,re,K)))))}const ue=d?-32767:0,de=p?-32767:0,pe=[],le=[],ae=[],ce=[];let fe=Number.MAX_VALUE,ge=-fe;const me=b;me.length=0;const xe=i.Ellipsoid.clone(e.ellipsoid),we=n.Rectangle.clone(e.childRectangle),Ce=we.north,Be=we.south;let ye=we.east;const Ie=we.west;for(ye<Ie&&(ye+=o.CesiumMath.TWO_PI),ee=0;ee<g.length;++ee)ne=Math.round(g[ee]),ne<=l?(pe.push(ee),ne=0):ne>=a?(ae.push(ee),ne=B):ne=2*ne+ue,g[ee]=ne,ie=Math.round(m[ee]),ie<=c?(le.push(ee),ie=0):ie>=f?(ce.push(ee),ie=B):ie=2*ie+de,m[ee]=ie,$=o.CesiumMath.lerp(G,J,x[ee]/B),$<fe&&(fe=$),$>ge&&(ge=$),x[ee]=$,v.longitude=o.CesiumMath.lerp(Ie,ye,ne/B),v.latitude=o.CesiumMath.lerp(Be,Ce,ie/B),v.height=$,xe.cartographicToCartesian(v,T),me.push(T.x),me.push(T.y),me.push(T.z);const Ae=t.BoundingSphere.fromVertices(me,i.Cartesian3.ZERO,3,H),be=u.OrientedBoundingBox.fromRectangle(we,fe,ge,xe,O),ve=new r.EllipsoidalOccluder(xe).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(Ae.center,me,3,Ae.center,fe,R),Te=ge-fe,Me=new Uint16Array(g.length+m.length+x.length);for(ee=0;ee<g.length;++ee)Me[ee]=g[ee];let ze=g.length;for(ee=0;ee<m.length;++ee)Me[ze+ee]=m[ee];for(ze+=m.length,ee=0;ee<x.length;++ee)Me[ze+ee]=B*(x[ee]-fe)/Te;const Ve=h.IndexDatatype.createTypedArray(g.length,P);let Ne;if(K){const e=new Uint8Array(w);s.push(Me.buffer,Ve.buffer,e.buffer),Ne=e.buffer}else s.push(Me.buffer,Ve.buffer);return{vertices:Me.buffer,encodedNormals:Ne,indices:Ve.buffer,minimumHeight:fe,maximumHeight:ge,westIndices:pe,southIndices:le,eastIndices:ae,northIndices:ce,boundingSphere:Ae,orientedBoundingBox:be,horizonOcclusionPoint:ve}}))}));
{
"name": "mars3d-cesium",
"version": "1.101.1",
"version": "1.102.0",
"description": "CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin.",

@@ -45,4 +45,4 @@ "homepage": "http://mars3d.cn/",

"dependencies": {
"@cesium/engine": "1.1.0",
"@cesium/widgets": "1.1.0"
"@cesium/engine": "2.0.0",
"@cesium/widgets": "2.0.0"
},

@@ -92,6 +92,6 @@ "devDependencies": {

"karma-spec-reporter": "^0.0.36",
"markdownlint-cli": "^0.32.2",
"markdownlint-cli": "^0.33.0",
"merge-stream": "^2.0.0",
"mime": "^3.0.0",
"mkdirp": "^1.0.4",
"mkdirp": "^2.1.3",
"node-fetch": "^3.2.10",

@@ -103,3 +103,3 @@ "open": "^8.2.1",

"request": "^2.79.0",
"rimraf": "^3.0.2",
"rimraf": "^4.1.2",
"rollup": "^2.79.1",

@@ -131,3 +131,3 @@ "rollup-plugin-strip-pragma": "^1.0.0",

"make-zip": "gulp makeZip",
"markdownlint": "markdownlint \"*.md\" \"Documentation/**/*.md\" --ignore CHANGES.md --ignore README.md --ignore LICENSE.md --ignore packages/engine/LICENSE.md --ignore packages/widgets/LICENSE.md",
"markdownlint": "markdownlint \"*.md\" \"Documentation/**/*.md\" \"packages/**/*.md\" --ignore CHANGES.md --ignore \"./**/LICENSE.md\"",
"release": "gulp release",

@@ -148,3 +148,3 @@ "website-release": "gulp websiteRelease",

"build-all": "npm run clean-cache &&npm run release && npm run copy",
"build-all": "npm run clean-cache &&npm run release &&npm run build-ts && npm run copy",
"clean-cache": "rimraf Build/Cesium && rimraf Build/CesiumUnminified",

@@ -163,3 +163,3 @@ "copy": "node 说明/copy-sdk.cjs --trace-warnings",

"*.md": [
"markdownlint --ignore CHANGES.md --ignore README.md --ignore LICENSE.md --ignore packages/engine/LICENSE.md --ignore packages/widgets/LICENSE.md",
"markdownlint --ignore CHANGES.md --ignore \"./**/LICENSE.md\"",
"prettier --write"

@@ -166,0 +166,0 @@ ]

# Mars3D修改版Cesium
[Mars3D Homepage](http://mars3d.cn)
<p align="center">
<img src="https://github.com/CesiumGS/cesium/wiki/logos/Cesium_Logo_Color.jpg" width="50%" />
</p>
# CesiumJS

@@ -12,57 +10,67 @@ [![Build Status](https://travis-ci.com/CesiumGS/cesium.svg?branch=main)](https://travis-ci.com/CesiumGS/cesium)

![Cesium](https://github.com/CesiumGS/cesium/wiki/logos/Cesium_Logo_Color.jpg)
CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin. It uses WebGL for hardware-accelerated graphics, and is cross-platform, cross-browser, and tuned for dynamic-data visualization.
[CesiumJS Homepage](https://cesium.com/cesiumjs)
Built on open formats, CesiumJS is designed for robust interoperability and scaling for massive datasets.
[CesiumJS Features Checklist](https://github.com/CesiumGS/cesium/wiki/CesiumJS-Features-Checklist)
---
### :rocket: Get Started
[**Examples**](https://sandcastle.cesium.com/) :earth_asia: [**Docs**](https://cesium.com/learn/cesiumjs-learn/) :earth_americas: [**Website**](https://cesium.com/cesiumjs) :earth_africa: [**Forum**](https://community.cesium.com/) :earth_asia: [**User Stories**](https://cesium.com/user-stories/)
Visit the [Downloads page](https://cesium.com/downloads/) or install the [npm package](https://www.npmjs.com/package/cesium):
---
## :rocket: Get started
Visit the [Downloads page](https://cesium.com/downloads/) to download a pre-built copy of CesiumJS.
### npm & yarn
If you’re building your application using a module bundler such as Webpack, Parcel, or Rollup, you can install CesiumJS via the [`cesium` npm package](https://www.npmjs.com/package/cesium):
```sh
npm install cesium
npm install cesium --save
```
Have questions? Ask them on the [community forum](https://community.cesium.com/).
Then, import CesiumJS in your app code. Import individual modules to benefit from tree shaking optimizations through most build tools:
Interested in contributing? See [CONTRIBUTING.md](CONTRIBUTING.md). :heart:
```js
import { Viewer } from "cesium";
import "cesium/Build/Cesium/Widgets/widgets.css";
### :snowflake: Mission
const viewer = new Viewer("cesiumContainer");
```
Our mission is to create the leading 3D globe and map for static and time-dynamic content, with the best possible performance, precision, visual quality, platform support, community, and ease of use.
In addition to the `cesium` package, CesiumJS is also [distributed as scoped npm packages for better dependency management](https://cesium.com/blog/2022/12/07/modular-structure-in-cesiumjs/):
### :green_book: License
- [`@cesium/engine`](./packages/engine/README.md) - CesiumJS's core, rendering, and data APIs
- [`@cesium/widgets`](./packages/widgets/README.md) - A widgets library for use with CesiumJS
### What next?
See our [Quickstart Guide](https://cesium.com/learn/cesiumjs-learn/cesiumjs-quickstart/) for more information on getting a CesiumJS app up and running.
Instructions for serving local data are in the CesiumJS
[Offline Guide](./Documentation/OfflineGuide/README.md).
Interested in contributing? See [CONTRIBUTING.md](CONTRIBUTING.md). :heart:
## :green_book: License
[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). CesiumJS is free for both commercial and non-commercial use.
### :earth_americas: Where Does the 3D Content Come From?
## :earth_americas: Where does the Global 3D Content come from?
CesiumJS can stream 3D content such as terrain, imagery, and 3D Tiles from the commercial [Cesium ion](https://cesium.com/blog/2018/03/01/hello-cesium-ion/)
platform and other content sources. You are free to use any combination of content sources with CesiumJS that you please.
Using Cesium ion helps support CesiumJS development. :heart:
The Cesium platform follows an [open-core business model](https://cesium.com/why-cesium/open-ecosystem/cesium-business-model/) with open source runtime engines such as CesiumJS and optional commercial subscription to Cesium ion.
### :clap: Featured Demos
CesiumJS can stream [3D content such as terrain, imagery, and 3D Tiles from the commercial Cesium ion platform](https://cesium.com/platform/cesium-ion/content/) alongside open standards from other offline or online services. We provide Cesium ion as the quickest option for all users to get up and running, but you are free to use any combination of content sources with CesiumJS that you please.
<p>
<a href="https://cesium.com/blog/2018/08/21/cybercity/"><img src="https://images.prismic.io/cesium/2018-08-21-cover.jpg" width="30%" /></a>&nbsp;
<a href="https://apps.agi.com/SatelliteViewer/?Status=Operational"><img src="https://images.prismic.io/cesium/2018-03-29-comspoc-cover.jpg" width="30%" /></a>&nbsp;
<a href="https://cesium.com/blog/2018/02/05/historic-pharsalia-cabin-point-cloud/"><img src="https://images.prismic.io/cesium/2018-02-05-cover.jpg" width="30%" /></a>&nbsp;
<a href="https://cesium.com/blog/2017/12/12/onesky/"><img src="https://images.prismic.io/cesium/2017-12-12-cover.jpg" width="30%" /></a>&nbsp;
<a href="https://cesium.com/blog/2017/11/20/nasa-storm-virtual-globe/"><img src="https://images.prismic.io/cesium/2017-11-20-cover.jpg" width="30%" /></a>&nbsp;
<a href="https://cesium.com/blog/2017/11/16/gefs/"><img src="https://images.prismic.io/cesium/2017-11-16-cover.jpg" width="30%" /></a>&nbsp;
<a href="https://cesium.com/blog/2019/01/04/norad-tracks-santa/"><img src="https://images.prismic.io/cesium/2019-01-04-cover.jpg" width="30%" /></a>&nbsp;
<a href="https://cesium.com/blog/2017/07/23/drcog/"><img src="https://images.prismic.io/cesium/2017-07-23-cover.jpg" width="30%" /></a>&nbsp;
<a href="https://demos.cesium.com/NewYork/"><img src="https://images.prismic.io/cesium/2017-05-05-nyc-cover.jpg" width="30%" /></a>&nbsp;
<a href="https://cesium.com/blog/2018/09/27/swisstopo-live/"><img src="https://images.prismic.io/cesium/2018-09-27-cover.jpg" width="30%" /></a>&nbsp;
<a href="https://cesium.com/blog/2016/12/12/stk-czml/"><img src="https://images.prismic.io/cesium/2016-12-12-cover.jpg" width="30%" /></a>&nbsp;
<a href="https://cesium.com/blog/2016/09/29/contextcapture/"><img src="https://images.prismic.io/cesium/2016-09-29-cover.jpg" width="30%" /></a>&nbsp;
<a href="https://cesium.com/blog/2016/04/20/flightradar24/"><img src="https://images.prismic.io/cesium/2016-04-20-cover.jpg" width="30%" /></a>&nbsp;
<a href="https://cesium.com/blog/2016/02/03/fodarearth/"><img src="https://images.prismic.io/cesium/2016-02-03-cover.jpg" width="30%" /></a>&nbsp;
<a href="https://cesium.com/blog/2015/08/19/mars-trek/"><img src="https://images.prismic.io/cesium/2015-08-19-cover.jpg" width="30%" /></a>&nbsp;
<a href="https://cesium.com/blog/2015/07/16/hiroshima-archive/"><img src="https://images.prismic.io/cesium/2015-07-16-cover.jpg" width="30%" /></a>&nbsp;
<a href="https://cesium.com/blog/2019/06/13/red-bull-x-alps-in-cesium/"><img src="https://images.prismic.io/cesium/2015-10-02-cover.jpg" width="30%" /></a>&nbsp;
<br/>
<br/>
</p>
<h4><a href="https://cesium.com/blog/categories/userstories">See all demos</a></h4>
Bring your own data for tiling, hosting, and streaming from Cesium ion. [Using Cesium ion](https://cesium.com/ion/signup/) helps support CesiumJS development.
## :white_check_mark: Features
- Stream in 3D Tiles and other standard formats from Cesium ion or another source
- Visualize and analyze on a high-precision WGS84 globe
- Share with users on desktop or mobile
See more in the [CesiumJS Features Checklist](https://github.com/CesiumGS/cesium/wiki/CesiumJS-Features-Checklist).

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc