define(["./defaultValue-81eec7ed","./Cartesian2-bd414876","./Rectangle-cf3e0e3e","./GeometryOffsetAttribute-ed56ff58","./BoundingSphere-9a3b5656","./Cartesian3-e0307675","./Check-741c5f3c","./ComponentDatatype-aaeec80f","./GeometryAttribute-2b42a913","./GeometryAttributes-32b29525","./GeometryInstance-1b39c9e8","./GeometryPipeline-e7083fea","./IndexDatatype-3f3c99e8","./Math-e73894ab","./Matrix2-dc0c61cc","./Matrix4-4c545f70","./PolygonPipeline-04baeb41","./Transforms-5b829630","./RectangleGeometryLibrary-5373dad7","./VertexFormat-d50a69ba","./GeographicProjection-c931c7fb","./WebGLConstants-508b9636","./AttributeCompression-8f752c03","./EncodedCartesian3-aafcc30f","./IntersectionTests-80510c7b","./Plane-bc8b6777","./RuntimeError-26acdd3b","./EllipsoidRhumbLine-592e8885","./when-422ea0ae","./Resource-8ae1a924","./combine-3c023bda"],(function(t,e,n,a,o,r,i,s,l,c,u,m,p,d,g,y,f,h,b,_,A,x,w,C,v,R,E,F,G,P,V){"use strict";const L=new r.Cartesian3,D=new r.Cartesian3,M=new r.Cartesian3,T=new r.Cartesian3,O=new n.Rectangle,N=new e.Cartesian2,S=new o.BoundingSphere,I=new o.BoundingSphere;function k(t,e){const n=new l.Geometry({attributes:new c.GeometryAttributes,primitiveType:l.PrimitiveType.TRIANGLES});return n.attributes.position=new l.GeometryAttribute({componentDatatype:s.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new l.GeometryAttribute({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new l.GeometryAttribute({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new l.GeometryAttribute({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}const H=new r.Cartesian3,z=new r.Cartesian3;function B(t,e){const n=t._vertexFormat,a=t._ellipsoid,o=e.height,i=e.width,c=e.northCap,u=e.southCap;let m=0,d=o,g=o,f=0;c&&(m=1,g-=1,f+=1),u&&(d-=1,g-=1,f+=1),f+=i*g;const h=n.position?new Float64Array(3*f):void 0,_=n.st?new Float32Array(2*f):void 0;let A=0,x=0;const w=L,C=N;let v=Number.MAX_VALUE,R=Number.MAX_VALUE,E=-Number.MAX_VALUE,F=-Number.MAX_VALUE;for(let t=m;t1||F>1))for(let t=0;t<_.length;t+=2)_[t]=(_[t]-v)/(E-v),_[t+1]=(_[t+1]-R)/(F-R);const G=function(t,e,n,a){const o=t.length,i=e.normal?new Float32Array(o):void 0,s=e.tangent?new Float32Array(o):void 0,l=e.bitangent?new Float32Array(o):void 0;let c=0;const u=T,m=M;let p=D;if(e.normal||e.tangent||e.bitangent)for(let d=0;d0;x-=A)yt=3*x,rt=U(rt,ut,yt,C,F),ut+=6,c.st&&(lt=Y(lt,mt,2*x,N),mt+=4),o&&(pt+=3,it[pt++]=S[yt],it[pt++]=S[yt+1],it[pt++]=S[yt+2]),ct&&(st[dt++]=1,dt+=1);if(Z){const t=gt;for(yt=3*t,x=0;x<2;x++)rt=U(rt,ut,yt,C,F),ut+=6,c.st&&(lt=Y(lt,mt,2*t,N),mt+=4),o&&(pt+=3,it[pt++]=S[yt],it[pt++]=S[yt+1],it[pt++]=S[yt+2]),ct&&(st[dt++]=1,dt+=1)}else for(x=A-1;x>=0;x--)yt=3*x,rt=U(rt,ut,yt,C,F),ut+=6,c.st&&(lt=Y(lt,mt,2*x,N),mt+=4),o&&(pt+=3,it[pt++]=S[yt],it[pt++]=S[yt+1],it[pt++]=S[yt+2]),ct&&(st[dt++]=1,dt+=1);let ft=function(t,e,n){const a=t.length,o=e.normal?new Float32Array(a):void 0,i=e.tangent?new Float32Array(a):void 0,s=e.bitangent?new Float32Array(a):void 0;let l=0,c=0,u=0,m=!0,p=T,g=M,y=D;if(e.normal||e.tangent||e.bitangent)for(let f=0;f