@reearth/core 0.0.7-alpha.5 → 0.0.7-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cesium/ThirdParty/Workers/z-worker-pako.js +1 -1
- package/dist/cesium/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +8 -8
- package/dist/cesium/Widgets/widgets.css +8 -8
- package/dist/cesium/Workers/{chunk-SUQM3OSW.js → chunk-2YD5QWGR.js} +2 -2
- package/dist/cesium/Workers/{chunk-74N6MC2V.js → chunk-3T4KR75X.js} +2 -2
- package/dist/cesium/Workers/chunk-46KFVW24.js +26 -0
- package/dist/cesium/Workers/chunk-4EI6PP43.js +28 -0
- package/dist/cesium/Workers/{chunk-YEJWCH6C.js → chunk-4RS52VIY.js} +2 -2
- package/dist/cesium/Workers/{chunk-NPBZI5YA.js → chunk-4YLYA3DC.js} +1 -1
- package/dist/cesium/Workers/{chunk-JEWHFDAA.js → chunk-5ENAGXBI.js} +2 -2
- package/dist/cesium/Workers/{chunk-MRR3RGFO.js → chunk-5VIB3TI5.js} +2 -2
- package/dist/cesium/Workers/{chunk-JCJ24DHF.js → chunk-6NGZLDFZ.js} +2 -2
- package/dist/cesium/Workers/{chunk-7X2YQ6I4.js → chunk-6RGNWVZ2.js} +2 -2
- package/dist/cesium/Workers/{chunk-BK3HCS7I.js → chunk-7AZZVJ52.js} +2 -2
- package/dist/cesium/Workers/{chunk-UBIRX2SP.js → chunk-AMXAQQEL.js} +2 -2
- package/dist/cesium/Workers/{chunk-LDCAXLGS.js → chunk-AQW44ZPC.js} +2 -2
- package/dist/cesium/Workers/{chunk-B6TRTFAA.js → chunk-CPCMDW6Z.js} +2 -2
- package/dist/cesium/Workers/{chunk-3C74MLG3.js → chunk-DNL2WDRL.js} +1 -1
- package/dist/cesium/Workers/{chunk-FK5KFB6H.js → chunk-ERW7V247.js} +1 -1
- package/dist/cesium/Workers/{chunk-5AG2MVRM.js → chunk-EYRIA4TP.js} +2 -2
- package/dist/cesium/Workers/{chunk-6AUUBDOF.js → chunk-F7RQIJML.js} +2 -2
- package/dist/cesium/Workers/{chunk-JZLZJJQD.js → chunk-FPZMU6QP.js} +2 -2
- package/dist/cesium/Workers/{chunk-YBI55DLZ.js → chunk-FZDVQW7A.js} +2 -2
- package/dist/cesium/Workers/{chunk-2MBPFWCP.js → chunk-GAZ2U4FO.js} +2 -2
- package/dist/cesium/Workers/{chunk-CSISXEG7.js → chunk-I44IOOT4.js} +1 -1
- package/dist/cesium/Workers/{chunk-R2AN7EKC.js → chunk-IALXUAD4.js} +1 -1
- package/dist/cesium/Workers/{chunk-MDLPQIMP.js → chunk-IXBUEUZL.js} +2 -2
- package/dist/cesium/Workers/{chunk-HPBHKP5S.js → chunk-J3GCYV5K.js} +2 -2
- package/dist/cesium/Workers/{chunk-KRZBI2MU.js → chunk-KGSZTFHZ.js} +2 -2
- package/dist/cesium/Workers/{chunk-B2SKQ7LU.js → chunk-KKKPU2CI.js} +2 -2
- package/dist/cesium/Workers/{chunk-QPOPEH3M.js → chunk-KTEJE5KE.js} +2 -2
- package/dist/cesium/Workers/chunk-KYZ3DYY6.js +26 -0
- package/dist/cesium/Workers/{chunk-LOPN5R3I.js → chunk-L2QG4MRI.js} +2 -2
- package/dist/cesium/Workers/{chunk-EXBFEYPQ.js → chunk-MCE3KFYN.js} +2 -2
- package/dist/cesium/Workers/{chunk-C6DMEJQ7.js → chunk-MMLDGXML.js} +2 -2
- package/dist/cesium/Workers/{chunk-KTTUANTJ.js → chunk-MTBRPBDQ.js} +2 -2
- package/dist/cesium/Workers/{chunk-7VZHIB6P.js → chunk-OKT6VBRK.js} +2 -2
- package/dist/cesium/Workers/chunk-PHYDKLSY.js +26 -0
- package/dist/cesium/Workers/chunk-PWPX3224.js +26 -0
- package/dist/cesium/Workers/{chunk-VQZSIOZW.js → chunk-QHOVE6WG.js} +2 -2
- package/dist/cesium/Workers/{chunk-CN7UN2OZ.js → chunk-QJ6MBL22.js} +2 -2
- package/dist/cesium/Workers/{chunk-NUSW5B6A.js → chunk-QKO6VIG2.js} +2 -2
- package/dist/cesium/Workers/{chunk-4N7SRDH5.js → chunk-QVEE4QL2.js} +2 -2
- package/dist/cesium/Workers/{chunk-4T6AS6BZ.js → chunk-RXQOQZ7S.js} +2 -2
- package/dist/cesium/Workers/{chunk-RURL6ZX2.js → chunk-S3ZKQKMM.js} +2 -2
- package/dist/cesium/Workers/{chunk-ZYWD6OQH.js → chunk-SFEUMZSK.js} +2 -2
- package/dist/cesium/Workers/{chunk-BOPB43LN.js → chunk-T75MW4X3.js} +2 -2
- package/dist/cesium/Workers/chunk-TVO2A75R.js +66 -0
- package/dist/cesium/Workers/{chunk-VHNZBQTR.js → chunk-UHR36K45.js} +2 -2
- package/dist/cesium/Workers/{chunk-WZUWQMI7.js → chunk-UKJCDZOR.js} +2 -2
- package/dist/cesium/Workers/{chunk-B4TQDFIE.js → chunk-VKVIYER6.js} +2 -2
- package/dist/cesium/Workers/{chunk-OUXRUXNB.js → chunk-VPIQWTRZ.js} +2 -2
- package/dist/cesium/Workers/{chunk-2ED5WI77.js → chunk-XSX5HRFC.js} +2 -2
- package/dist/cesium/Workers/{chunk-5Z6L2FHX.js → chunk-Z5WQQHSL.js} +2 -2
- package/dist/cesium/Workers/{chunk-YPDO7SPO.js → chunk-Z7B2VEL5.js} +2 -2
- package/dist/cesium/Workers/combineGeometry.js +2 -2
- package/dist/cesium/Workers/createBoxGeometry.js +2 -2
- package/dist/cesium/Workers/createBoxOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createCircleGeometry.js +2 -2
- package/dist/cesium/Workers/createCircleOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createCoplanarPolygonGeometry.js +2 -2
- package/dist/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createCorridorGeometry.js +2 -2
- package/dist/cesium/Workers/createCorridorOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createCylinderGeometry.js +2 -2
- package/dist/cesium/Workers/createCylinderOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createEllipseGeometry.js +2 -2
- package/dist/cesium/Workers/createEllipseOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createEllipsoidGeometry.js +2 -2
- package/dist/cesium/Workers/createEllipsoidOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createFrustumGeometry.js +2 -2
- package/dist/cesium/Workers/createFrustumOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createGeometry.js +2 -2
- package/dist/cesium/Workers/createGroundPolylineGeometry.js +2 -2
- package/dist/cesium/Workers/createPlaneGeometry.js +2 -2
- package/dist/cesium/Workers/createPlaneOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createPolygonGeometry.js +2 -2
- package/dist/cesium/Workers/createPolygonOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createPolylineGeometry.js +2 -2
- package/dist/cesium/Workers/createPolylineVolumeGeometry.js +2 -2
- package/dist/cesium/Workers/createPolylineVolumeOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createRectangleGeometry.js +2 -2
- package/dist/cesium/Workers/createRectangleOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createSimplePolylineGeometry.js +2 -2
- package/dist/cesium/Workers/createSphereGeometry.js +2 -2
- package/dist/cesium/Workers/createSphereOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createTaskProcessorWorker.js +2 -2
- package/dist/cesium/Workers/createVectorTileClampedPolylines.js +2 -2
- package/dist/cesium/Workers/createVectorTileGeometries.js +2 -2
- package/dist/cesium/Workers/createVectorTilePoints.js +2 -2
- package/dist/cesium/Workers/createVectorTilePolygons.js +2 -2
- package/dist/cesium/Workers/createVectorTilePolylines.js +2 -2
- package/dist/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -2
- package/dist/cesium/Workers/createVerticesFromHeightmap.js +2 -2
- package/dist/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -2
- package/dist/cesium/Workers/createWallGeometry.js +2 -2
- package/dist/cesium/Workers/createWallOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/decodeDraco.js +2 -2
- package/dist/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
- package/dist/cesium/Workers/decodeI3S.js +2 -2
- package/dist/cesium/Workers/transcodeKTX2.js +10 -10
- package/dist/cesium/Workers/transferTypedArrayTest.js +1 -1
- package/dist/cesium/Workers/upsampleQuantizedTerrainMesh.js +2 -2
- package/dist/core.js +30141 -30192
- package/dist/core.umd.cjs +3864 -3822
- package/package.json +4 -4
- package/src/engines/Cesium/Shaders/OverriddenShaders/GlobeFS/IBL.glsl +6 -10
- package/src/engines/Cesium/hooks/useOverrideGlobeShader/useOverrideGlobeShader.ts +1 -1
- package/dist/cesium/Workers/chunk-45U7TTT3.js +0 -26
- package/dist/cesium/Workers/chunk-7VJK3KHI.js +0 -26
- package/dist/cesium/Workers/chunk-CUOR5F7T.js +0 -28
- package/dist/cesium/Workers/chunk-DGCK3LD2.js +0 -30
- package/dist/cesium/Workers/chunk-DXEZYE3K.js +0 -62
- package/dist/cesium/Workers/chunk-VAKC5J5C.js +0 -26
- package/dist/cesium/Workers/chunk-VKV642QV.js +0 -26
- package/dist/cesium/Workers/chunk-VMSXG4OA.js +0 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";const{Array:te,Object:m,Number:ne,Math:A,Error:v,Uint8Array:w,Uint16Array:nt,Uint32Array:se,Int32Array:st,Map:re,DataView:W,Promise:M,TextEncoder:ae,crypto:B,postMessage:K,TransformStream:b,ReadableStream:Ve,WritableStream:xe,CompressionStream:rt,DecompressionStream:at}=self,j=void 0,N="undefined",O="function";class oe{constructor(e){return class extends b{constructor(n,s){const r=new e(s);super({transform(a,o){o.enqueue(r.append(a))},flush(a){const o=r.flush();o&&a.enqueue(o)}})}}}}const ie=[];for(let t=0;256>t;t++){let e=t;for(let n=0;8>n;n++)1&e?e=e>>>1^3988292384:e>>>=1;ie[t]=e}class G{constructor(e){this.crc=e||-1}append(e){let n=0|this.crc;for(let s=0,r=0|e.length;r>s;s++)n=n>>>8^ie[255&(n^e[s])];this.crc=n}get(){return~this.crc}}class ce extends b{constructor(){let e;const n=new G;super({transform(s,r){n.append(s),r.enqueue(s)},flush(){const s=new w(4);new W(s.buffer).setUint32(0,n.get()),e.value=s}}),e=this}}const _={concat(t,e){if(t.length===0||e.length===0)return t.concat(e);const n=t[t.length-1],s=_.getPartial(n);return s===32?t.concat(e):_._shiftRight(e,s,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(e===0)return 0;const n=t[e-1];return 32*(e-1)+_.getPartial(n)},clamp(t,e){if(32*t.length<e)return t;const n=(t=t.slice(0,A.ceil(e/32))).length;return e&=31,n>0&&e&&(t[n-1]=_.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>t===32?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>A.round(t/1099511627776)||32,_shiftRight(t,e,n,s){for(s===void 0&&(s=[]);e>=32;e-=32)s.push(n),n=0;if(e===0)return s.concat(t);for(let o=0;o<t.length;o++)s.push(n|t[o]>>>e),n=t[o]<<32-e;const r=t.length?t[t.length-1]:0,a=_.getPartial(r);return s.push(_.partial(e+a&31,e+a>32?n:s.pop(),1)),s}},L={bytes:{fromBits(t){const e=_.bitLength(t)/8,n=new w(e);let s;for(let r=0;e>r;r++)!(3&r)&&(s=t[r/4]),n[r]=s>>>24,s<<=8;return n},toBits(t){const e=[];let n,s=0;for(n=0;n<t.length;n++)s=s<<8|t[n],(3&n)==3&&(e.push(s),s=0);return 3&n&&e.push(_.partial(8*(3&n),s)),e}}},Ee=class{constructor(t){const e=this;e.blockSize=512,e._init=[1732584193,4023233417,2562383102,271733878,3285377520],e._key=[1518500249,1859775393,2400959708,3395469782],t?(e._h=t._h.slice(0),e._buffer=t._buffer.slice(0),e._length=t._length):e.reset()}reset(){const t=this;return t._h=t._init.slice(0),t._buffer=[],t._length=0,t}update(t){const e=this;typeof t=="string"&&(t=L.utf8String.toBits(t));const n=e._buffer=_.concat(e._buffer,t),s=e._length,r=e._length=s+_.bitLength(t);if(r>9007199254740991)throw new v("Cannot hash more than 2^53 - 1 bits");const a=new se(n);let o=0;for(let l=e.blockSize+s-(e.blockSize+s&e.blockSize-1);r>=l;l+=e.blockSize)e._block(a.subarray(16*o,16*(o+1))),o+=1;return n.splice(0,16*o),e}finalize(){const t=this;let e=t._buffer;const n=t._h;e=_.concat(e,[_.partial(1,1)]);for(let s=e.length+2;15&s;s++)e.push(0);for(e.push(A.floor(t._length/4294967296)),e.push(0|t._length);e.length;)t._block(e.splice(0,16));return t.reset(),n}_f(t,e,n,s){return t>19?t>39?t>59?t>79?void 0:e^n^s:e&n|e&s|n&s:e^n^s:e&n|~e&s}_S(t,e){return e<<t|e>>>32-t}_block(t){const e=this,n=e._h,s=te(80);for(let c=0;16>c;c++)s[c]=t[c];let r=n[0],a=n[1],o=n[2],l=n[3],u=n[4];for(let c=0;79>=c;c++){16>c||(s[c]=e._S(1,s[c-3]^s[c-8]^s[c-14]^s[c-16]));const i=e._S(5,r)+e._f(c,a,o,l)+u+s[c]+e._key[A.floor(c/20)]|0;u=l,l=o,o=e._S(30,a),a=r,r=i}n[0]=n[0]+r|0,n[1]=n[1]+a|0,n[2]=n[2]+o|0,n[3]=n[3]+l|0,n[4]=n[4]+u|0}},Ue={getRandomValues(t){const e=new se(t.buffer),n=s=>{let r=987654321;const a=4294967295;return()=>(r=36969*(65535&r)+(r>>16)&a,(((r<<16)+(s=18e3*(65535&s)+(s>>16)&a)&a)/4294967296+.5)*(A.random()>.5?1:-1))};for(let s,r=0;r<t.length;r+=4){const a=n(4294967296*(s||A.random()));s=987654071*a(),e[r/4]=4294967296*a()|0}return t}},H={importKey:t=>new H.hmacSha1(L.bytes.toBits(t)),pbkdf2(t,e,n,s){if(n=n||1e4,0>s||0>n)throw new v("invalid params to pbkdf2");const r=1+(s>>5)<<2;let a,o,l,u,c;const i=new ArrayBuffer(r),f=new W(i);let h=0;const p=_;for(e=L.bytes.toBits(e),c=1;(r||1)>h;c++){for(a=o=t.encrypt(p.concat(e,[c])),l=1;n>l;l++)for(o=t.encrypt(o),u=0;u<o.length;u++)a[u]^=o[u];for(l=0;(r||1)>h&&l<a.length;l++)f.setInt32(h,a[l]),h+=4}return i.slice(0,s/8)},hmacSha1:class{constructor(t){const e=this,n=e._hash=Ee,s=[[],[]];e._baseHash=[new n,new n];const r=e._baseHash[0].blockSize/32;t.length>r&&(t=new n().update(t).finalize());for(let a=0;r>a;a++)s[0][a]=909522486^t[a],s[1][a]=1549556828^t[a];e._baseHash[0].update(s[0]),e._baseHash[1].update(s[1]),e._resultHash=new n(e._baseHash[0])}reset(){const t=this;t._resultHash=new t._hash(t._baseHash[0]),t._updated=!1}update(t){this._updated=!0,this._resultHash.update(t)}digest(){const t=this,e=t._resultHash.finalize(),n=new t._hash(t._baseHash[1]).update(e).finalize();return t.reset(),n}encrypt(t){if(this._updated)throw new v("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},We=typeof B!=N&&typeof B.getRandomValues==O,le="Invalid password",ue="Invalid signature",he="zipjs-abort-check-password";function fe(t){return We?B.getRandomValues(t):Ue.getRandomValues(t)}const P=16,pe={name:"PBKDF2"},Me=m.assign({hash:{name:"HMAC"}},pe),X=m.assign({iterations:1e3,hash:{name:"SHA-1"}},pe),Ne=["deriveBits"],T=[8,12,16],V=[16,24,32],q=10,Oe=[0,0,0,0],F=typeof B!=N,x=F&&B.subtle,de=F&&typeof x!=N,z=L.bytes,Le=class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],s=e._tables[1],r=t.length;let a,o,l,u=1;if(r!==4&&r!==6&&r!==8)throw new v("invalid aes key size");for(e._key=[o=t.slice(0),l=[]],a=r;4*r+28>a;a++){let c=o[a-1];(a%r==0||r===8&&a%r==4)&&(c=n[c>>>24]<<24^n[c>>16&255]<<16^n[c>>8&255]<<8^n[255&c],a%r==0&&(c=c<<8^c>>>24^u<<24,u=u<<1^283*(u>>7))),o[a]=o[a-r]^c}for(let c=0;a;c++,a--){const i=o[3&c?a:a-4];l[c]=4>=a||4>c?i:s[0][n[i>>>24]]^s[1][n[i>>16&255]]^s[2][n[i>>8&255]]^s[3][n[255&i]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],s=e[4],r=[],a=[];let o,l,u,c;for(let i=0;256>i;i++)a[(r[i]=i<<1^283*(i>>7))^i]=i;for(let i=o=0;!n[i];i^=l||1,o=a[o]||1){let f=o^o<<1^o<<2^o<<3^o<<4;f=f>>8^255&f^99,n[i]=f,s[f]=i,c=r[u=r[l=r[i]]];let h=16843009*c^65537*u^257*l^16843008*i,p=257*r[f]^16843008*f;for(let d=0;4>d;d++)t[d][i]=p=p<<24^p>>>8,e[d][f]=h=h<<24^h>>>8}for(let i=0;5>i;i++)t[i]=t[i].slice(0),e[i]=e[i].slice(0)}_crypt(t,e){if(t.length!==4)throw new v("invalid aes block size");const n=this._key[e],s=n.length/4-2,r=[0,0,0,0],a=this._tables[e],o=a[0],l=a[1],u=a[2],c=a[3],i=a[4];let f,h,p,d=t[0]^n[0],g=t[e?3:1]^n[1],y=t[2]^n[2],S=t[e?1:3]^n[3],I=4;for(let C=0;s>C;C++)f=o[d>>>24]^l[g>>16&255]^u[y>>8&255]^c[255&S]^n[I],h=o[g>>>24]^l[y>>16&255]^u[S>>8&255]^c[255&d]^n[I+1],p=o[y>>>24]^l[S>>16&255]^u[d>>8&255]^c[255&g]^n[I+2],S=o[S>>>24]^l[d>>16&255]^u[g>>8&255]^c[255&y]^n[I+3],I+=4,d=f,g=h,y=p;for(let C=0;4>C;C++)r[e?3&-C:C]=i[d>>>24]<<24^i[g>>16&255]<<16^i[y>>8&255]<<8^i[255&S]^n[I++],f=d,d=g,g=y,y=S,S=f;return r}},Fe=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if((t>>24&255)==255){let e=t>>16&255,n=t>>8&255,s=255&t;e===255?(e=0,n===255?(n=0,s===255?s=0:++s):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=s}else t+=1<<24;return t}incCounter(t){(t[0]=this.incWord(t[0]))===0&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let s;if(!(s=e.length))return[];const r=_.bitLength(e);for(let a=0;s>a;a+=4){this.incCounter(n);const o=t.encrypt(n);e[a]^=o[0],e[a+1]^=o[1],e[a+2]^=o[2],e[a+3]^=o[3]}return _.clamp(e,r)}},je=H.hmacSha1;let ge=F&&de&&typeof x.importKey==O,we=F&&de&&typeof x.deriveBits==O;class Ge extends b{constructor({password:e,rawPassword:n,signed:s,encryptionStrength:r,checkPasswordOnly:a}){super({start(){m.assign(this,{ready:new M(o=>this.resolveReady=o),password:_e(e,n),signed:s,strength:r-1,pending:new w})},async transform(o,l){const u=this,{password:c,strength:i,resolveReady:f,ready:h}=u;c?(await(async(d,g,y,S)=>{const I=await me(d,g,y,k(S,0,T[g])),C=k(S,T[g]);if(I[0]!=C[0]||I[1]!=C[1])throw new v(le)})(u,i,c,k(o,0,T[i]+2)),o=k(o,T[i]+2),a?l.error(new v(he)):f()):await h;const p=new w(o.length-q-(o.length-q)%P);l.enqueue(ye(u,o,p,0,q,!0))},async flush(o){const{signed:l,ctr:u,hmac:c,pending:i,ready:f}=this;if(c&&u){await f;const h=k(i,0,i.length-q),p=k(i,i.length-q);let d=new w;if(h.length){const g=U(z,h);c.update(g);const y=u.update(g);d=E(z,y)}if(l){const g=k(E(z,c.digest()),0,q);for(let y=0;q>y;y++)if(g[y]!=p[y])throw new v(ue)}o.enqueue(d)}}})}}class Xe extends b{constructor({password:e,rawPassword:n,encryptionStrength:s}){let r;super({start(){m.assign(this,{ready:new M(a=>this.resolveReady=a),password:_e(e,n),strength:s-1,pending:new w})},async transform(a,o){const l=this,{password:u,strength:c,resolveReady:i,ready:f}=l;let h=new w;u?(h=await(async(d,g,y)=>{const S=fe(new w(T[g]));return J(S,await me(d,g,y,S))})(l,c,u),i()):await f;const p=new w(h.length+a.length-a.length%P);p.set(h,0),o.enqueue(ye(l,a,p,h.length,0))},async flush(a){const{ctr:o,hmac:l,pending:u,ready:c}=this;if(l&&o){await c;let i=new w;if(u.length){const f=o.update(U(z,u));l.update(f),i=E(z,f)}r.signature=E(z,l.digest()).slice(0,q),a.enqueue(J(i,r.signature))}}}),r=this}}function ye(t,e,n,s,r,a){const{ctr:o,hmac:l,pending:u}=t,c=e.length-r;let i;for(u.length&&(e=J(u,e),n=((f,h)=>{if(h&&h>f.length){const p=f;(f=new w(h)).set(p,0)}return f})(n,c-c%P)),i=0;c-P>=i;i+=P){const f=U(z,k(e,i,i+P));a&&l.update(f);const h=o.update(f);a||l.update(h),n.set(E(z,h),i+s)}return t.pending=k(e,i),n}async function me(t,e,n,s){t.password=null;const r=await(async(i,f,h,p,d)=>{if(!ge)return H.importKey(f);try{return await x.importKey("raw",f,h,!1,d)}catch{return ge=!1,H.importKey(f)}})(0,n,Me,0,Ne),a=await(async(i,f,h)=>{if(!we)return H.pbkdf2(f,i.salt,X.iterations,h);try{return await x.deriveBits(i,f,h)}catch{return we=!1,H.pbkdf2(f,i.salt,X.iterations,h)}})(m.assign({salt:s},X),r,8*(2*V[e]+2)),o=new w(a),l=U(z,k(o,0,V[e])),u=U(z,k(o,V[e],2*V[e])),c=k(o,2*V[e]);return m.assign(t,{keys:{key:l,authentication:u,passwordVerification:c},ctr:new Fe(new Le(l),te.from(Oe)),hmac:new je(u)}),c}function _e(t,e){return e===j?(n=>{if(typeof ae==N){const s=new w((n=unescape(encodeURIComponent(n))).length);for(let r=0;r<s.length;r++)s[r]=n.charCodeAt(r);return s}return new ae().encode(n)})(t):e}function J(t,e){let n=t;return t.length+e.length&&(n=new w(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function k(t,e,n){return t.subarray(e,n)}function E(t,e){return t.fromBits(e)}function U(t,e){return t.toBits(e)}class Je extends b{constructor({password:e,passwordVerification:n,checkPasswordOnly:s}){super({start(){m.assign(this,{password:e,passwordVerification:n}),ve(this,e)},transform(r,a){const o=this;if(o.password){const l=be(o,r.subarray(0,12));if(o.password=null,l[11]!=o.passwordVerification)throw new v(le);r=r.subarray(12)}s?a.error(new v(he)):a.enqueue(be(o,r))}})}}class Qe extends b{constructor({password:e,passwordVerification:n}){super({start(){m.assign(this,{password:e,passwordVerification:n}),ve(this,e)},transform(s,r){const a=this;let o,l;if(a.password){a.password=null;const u=fe(new w(12));u[11]=a.passwordVerification,o=new w(s.length+u.length),o.set(Se(a,u),0),l=12}else o=new w(s.length),l=0;o.set(Se(a,s),l),r.enqueue(o)}})}}function be(t,e){const n=new w(e.length);for(let s=0;s<e.length;s++)n[s]=ke(t)^e[s],Q(t,n[s]);return n}function Se(t,e){const n=new w(e.length);for(let s=0;s<e.length;s++)n[s]=ke(t)^e[s],Q(t,e[s]);return n}function ve(t,e){const n=[305419896,591751049,878082192];m.assign(t,{keys:n,crcKey0:new G(n[0]),crcKey2:new G(n[2])});for(let s=0;s<e.length;s++)Q(t,e.charCodeAt(s))}function Q(t,e){let[n,s,r]=t.keys;t.crcKey0.append([e]),n=~t.crcKey0.get(),s=De(A.imul(De(s+ze(n)),134775813)+1),t.crcKey2.append([s>>>24]),r=~t.crcKey2.get(),t.keys=[n,s,r]}function ke(t){const e=2|t.keys[2];return ze(A.imul(e,1^e)>>>8)}function ze(t){return 255&t}function De(t){return 4294967295&t}const Ce="deflate-raw";class Ye extends b{constructor(e,{chunkSize:n,CompressionStream:s,CompressionStreamNative:r}){super({});const{compressed:a,encrypted:o,useCompressionStream:l,zipCrypto:u,signed:c,level:i}=e,f=this;let h,p,d=Ie(super.readable);o&&!u||!c||(h=new ce,d=D(d,h)),a&&(d=qe(d,l,{level:i,chunkSize:n},r,s)),o&&(u?d=D(d,new Qe(e)):(p=new Xe(e),d=D(d,p))),Ae(f,d,()=>{let g;o&&!u&&(g=p.signature),o&&!u||!c||(g=new W(h.value.buffer).getUint32(0)),f.signature=g})}}class Ze extends b{constructor(e,{chunkSize:n,DecompressionStream:s,DecompressionStreamNative:r}){super({});const{zipCrypto:a,encrypted:o,signed:l,signature:u,compressed:c,useCompressionStream:i}=e;let f,h,p=Ie(super.readable);o&&(a?p=D(p,new Je(e)):(h=new Ge(e),p=D(p,h))),c&&(p=qe(p,i,{chunkSize:n},r,s)),o&&!a||!l||(f=new ce,p=D(p,f)),Ae(this,p,()=>{if((!o||a)&&l){const d=new W(f.value.buffer);if(u!=d.getUint32(0,!1))throw new v(ue)}})}}function Ie(t){return D(t,new b({transform(e,n){e&&e.length&&n.enqueue(e)}}))}function Ae(t,e,n){e=D(e,new b({flush:n})),m.defineProperty(t,"readable",{get:()=>e})}function qe(t,e,n,s,r){try{t=D(t,new(e&&s?s:r)(Ce,n))}catch{if(!e)return t;try{t=D(t,new r(Ce,n))}catch{return t}}return t}function D(t,e){return t.pipeThrough(e)}const Re="data",He="close";class $e extends b{constructor(e,n){super({});const s=this,{codecType:r}=e;let a;r.startsWith("deflate")?a=Ye:r.startsWith("inflate")&&(a=Ze);let o=0,l=0;const u=new a(e,n),c=super.readable,i=new b({transform(h,p){h&&h.length&&(l+=h.length,p.enqueue(h))},flush(){m.assign(s,{inputSize:l})}}),f=new b({transform(h,p){h&&h.length&&(o+=h.length,p.enqueue(h))},flush(){const{signature:h}=u;m.assign(s,{signature:h,outputSize:o,inputSize:l})}});m.defineProperty(s,"readable",{get:()=>c.pipeThrough(i).pipeThrough(u).pipeThrough(f)})}}class et extends b{constructor(e){let n;super({transform:function s(r,a){if(n){const o=new w(n.length+r.length);o.set(n),o.set(r,n.length),r=o,n=null}r.length>e?(a.enqueue(r.slice(0,e)),s(r.slice(e),a)):n=r},flush(s){n&&n.length&&s.enqueue(n)}})}}const Y=new re,Z=new re;let $,R=0,Pe=!0;async function tt(t){try{const{options:e,scripts:n,config:s}=t;if(n&&n.length)try{Pe?importScripts.apply(j,n):await Be(n)}catch{Pe=!1,await Be(n)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new oe(self.Deflate)),self.Inflate&&(s.DecompressionStream=new oe(self.Inflate));const r={highWaterMark:1},a=t.readable||new Ve({async pull(h){const p=new M(y=>Y.set(R,y));ee({type:"pull",messageId:R}),R=(R+1)%ne.MAX_SAFE_INTEGER;const{value:d,done:g}=await p;h.enqueue(d),g&&h.close()}},r),o=t.writable||new xe({async write(h){let p;const d=new M(g=>p=g);Z.set(R,p),ee({type:Re,value:h,messageId:R}),R=(R+1)%ne.MAX_SAFE_INTEGER,await d}},r),l=new $e(e,s);$=new AbortController;const{signal:u}=$;await a.pipeThrough(l).pipeThrough(new et(s.chunkSize)).pipeTo(o,{signal:u,preventClose:!0,preventAbort:!0}),await o.getWriter().close();const{signature:c,inputSize:i,outputSize:f}=l;ee({type:He,result:{signature:c,inputSize:i,outputSize:f}})}catch(e){Ke(e)}}async function Be(t){for(const e of t)await import(e)}function ee(t){let{value:e}=t;if(e)if(e.length)try{e=new w(e),t.value=e.buffer,K(t,[t.value])}catch{K(t)}else K(t);else K(t)}function Ke(t=new v("Unknown error")){const{message:e,stack:n,code:s,name:r}=t;K({error:{message:e,stack:n,code:s,name:r}})}function Te(t,e,n){return class{constructor(r){const a=this;var o,l;o=r,l="level",(typeof m.hasOwn===O?m.hasOwn(o,l):o.hasOwnProperty(l))&&r.level===j&&delete r.level,a.codec=new t(m.assign({},e,r)),n(a.codec,u=>{if(a.pendingData){const c=a.pendingData;a.pendingData=new w(c.length+u.length);const{pendingData:i}=a;i.set(c,0),i.set(u,c.length)}else a.pendingData=new w(u)})}append(r){return this.codec.push(r),s(this)}flush(){return this.codec.push(new w,!0),s(this)}};function s(r){if(r.pendingData){const a=r.pendingData;return r.pendingData=null,a}return new w}}addEventListener("message",({data:t})=>{const{type:e,messageId:n,value:s,done:r}=t;try{if(e=="start"&&tt(t),e==Re){const a=Y.get(n);Y.delete(n),a({value:new w(s),done:r})}if(e=="ack"){const a=Z.get(n);Z.delete(n),a()}e==He&&$.abort()}catch(a){Ke(a)}}),self.initCodec=()=>{const{Deflate:t,Inflate:e}=((n,s={},r)=>({Deflate:Te(n.Deflate,s.deflate,r),Inflate:Te(n.Inflate,s.inflate,r)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},(n,s)=>n.onData=s);self.Deflate=t,self.Inflate=e}})();
|
|
1
|
+
(function(){"use strict";const{Array:te,Object:m,Number:ne,Math:A,Error:v,Uint8Array:w,Uint16Array:nt,Uint32Array:se,Int32Array:st,Map:re,DataView:W,Promise:M,TextEncoder:ae,crypto:B,postMessage:K,TransformStream:b,ReadableStream:Ve,WritableStream:xe,CompressionStream:rt,DecompressionStream:at}=self,j=void 0,N="undefined",O="function";class oe{constructor(e){return class extends b{constructor(n,s){const r=new e(s);super({transform(a,o){o.enqueue(r.append(a))},flush(a){const o=r.flush();o&&a.enqueue(o)}})}}}}const ie=[];for(let t=0;256>t;t++){let e=t;for(let n=0;8>n;n++)1&e?e=e>>>1^3988292384:e>>>=1;ie[t]=e}class G{constructor(e){this.crc=e||-1}append(e){let n=0|this.crc;for(let s=0,r=0|e.length;r>s;s++)n=n>>>8^ie[255&(n^e[s])];this.crc=n}get(){return~this.crc}}class ce extends b{constructor(){let e;const n=new G;super({transform(s,r){n.append(s),r.enqueue(s)},flush(){const s=new w(4);new W(s.buffer).setUint32(0,n.get()),e.value=s}}),e=this}}const _={concat(t,e){if(t.length===0||e.length===0)return t.concat(e);const n=t[t.length-1],s=_.getPartial(n);return s===32?t.concat(e):_._shiftRight(e,s,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(e===0)return 0;const n=t[e-1];return 32*(e-1)+_.getPartial(n)},clamp(t,e){if(32*t.length<e)return t;const n=(t=t.slice(0,A.ceil(e/32))).length;return e&=31,n>0&&e&&(t[n-1]=_.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>t===32?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>A.round(t/1099511627776)||32,_shiftRight(t,e,n,s){for(s===void 0&&(s=[]);e>=32;e-=32)s.push(n),n=0;if(e===0)return s.concat(t);for(let o=0;o<t.length;o++)s.push(n|t[o]>>>e),n=t[o]<<32-e;const r=t.length?t[t.length-1]:0,a=_.getPartial(r);return s.push(_.partial(e+a&31,e+a>32?n:s.pop(),1)),s}},L={bytes:{fromBits(t){const e=_.bitLength(t)/8,n=new w(e);let s;for(let r=0;e>r;r++)3&r||(s=t[r/4]),n[r]=s>>>24,s<<=8;return n},toBits(t){const e=[];let n,s=0;for(n=0;n<t.length;n++)s=s<<8|t[n],3&~n||(e.push(s),s=0);return 3&n&&e.push(_.partial(8*(3&n),s)),e}}},Ee=class{constructor(t){const e=this;e.blockSize=512,e._init=[1732584193,4023233417,2562383102,271733878,3285377520],e._key=[1518500249,1859775393,2400959708,3395469782],t?(e._h=t._h.slice(0),e._buffer=t._buffer.slice(0),e._length=t._length):e.reset()}reset(){const t=this;return t._h=t._init.slice(0),t._buffer=[],t._length=0,t}update(t){const e=this;typeof t=="string"&&(t=L.utf8String.toBits(t));const n=e._buffer=_.concat(e._buffer,t),s=e._length,r=e._length=s+_.bitLength(t);if(r>9007199254740991)throw new v("Cannot hash more than 2^53 - 1 bits");const a=new se(n);let o=0;for(let l=e.blockSize+s-(e.blockSize+s&e.blockSize-1);r>=l;l+=e.blockSize)e._block(a.subarray(16*o,16*(o+1))),o+=1;return n.splice(0,16*o),e}finalize(){const t=this;let e=t._buffer;const n=t._h;e=_.concat(e,[_.partial(1,1)]);for(let s=e.length+2;15&s;s++)e.push(0);for(e.push(A.floor(t._length/4294967296)),e.push(0|t._length);e.length;)t._block(e.splice(0,16));return t.reset(),n}_f(t,e,n,s){return t>19?t>39?t>59?t>79?void 0:e^n^s:e&n|e&s|n&s:e^n^s:e&n|~e&s}_S(t,e){return e<<t|e>>>32-t}_block(t){const e=this,n=e._h,s=te(80);for(let c=0;16>c;c++)s[c]=t[c];let r=n[0],a=n[1],o=n[2],l=n[3],u=n[4];for(let c=0;79>=c;c++){16>c||(s[c]=e._S(1,s[c-3]^s[c-8]^s[c-14]^s[c-16]));const i=e._S(5,r)+e._f(c,a,o,l)+u+s[c]+e._key[A.floor(c/20)]|0;u=l,l=o,o=e._S(30,a),a=r,r=i}n[0]=n[0]+r|0,n[1]=n[1]+a|0,n[2]=n[2]+o|0,n[3]=n[3]+l|0,n[4]=n[4]+u|0}},Ue={getRandomValues(t){const e=new se(t.buffer),n=s=>{let r=987654321;const a=4294967295;return()=>(r=36969*(65535&r)+(r>>16)&a,(((r<<16)+(s=18e3*(65535&s)+(s>>16)&a)&a)/4294967296+.5)*(A.random()>.5?1:-1))};for(let s,r=0;r<t.length;r+=4){const a=n(4294967296*(s||A.random()));s=987654071*a(),e[r/4]=4294967296*a()|0}return t}},H={importKey:t=>new H.hmacSha1(L.bytes.toBits(t)),pbkdf2(t,e,n,s){if(n=n||1e4,0>s||0>n)throw new v("invalid params to pbkdf2");const r=1+(s>>5)<<2;let a,o,l,u,c;const i=new ArrayBuffer(r),f=new W(i);let h=0;const p=_;for(e=L.bytes.toBits(e),c=1;(r||1)>h;c++){for(a=o=t.encrypt(p.concat(e,[c])),l=1;n>l;l++)for(o=t.encrypt(o),u=0;u<o.length;u++)a[u]^=o[u];for(l=0;(r||1)>h&&l<a.length;l++)f.setInt32(h,a[l]),h+=4}return i.slice(0,s/8)},hmacSha1:class{constructor(t){const e=this,n=e._hash=Ee,s=[[],[]];e._baseHash=[new n,new n];const r=e._baseHash[0].blockSize/32;t.length>r&&(t=new n().update(t).finalize());for(let a=0;r>a;a++)s[0][a]=909522486^t[a],s[1][a]=1549556828^t[a];e._baseHash[0].update(s[0]),e._baseHash[1].update(s[1]),e._resultHash=new n(e._baseHash[0])}reset(){const t=this;t._resultHash=new t._hash(t._baseHash[0]),t._updated=!1}update(t){this._updated=!0,this._resultHash.update(t)}digest(){const t=this,e=t._resultHash.finalize(),n=new t._hash(t._baseHash[1]).update(e).finalize();return t.reset(),n}encrypt(t){if(this._updated)throw new v("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},We=typeof B!=N&&typeof B.getRandomValues==O,le="Invalid password",ue="Invalid signature",he="zipjs-abort-check-password";function fe(t){return We?B.getRandomValues(t):Ue.getRandomValues(t)}const P=16,pe={name:"PBKDF2"},Me=m.assign({hash:{name:"HMAC"}},pe),X=m.assign({iterations:1e3,hash:{name:"SHA-1"}},pe),Ne=["deriveBits"],T=[8,12,16],V=[16,24,32],q=10,Oe=[0,0,0,0],F=typeof B!=N,x=F&&B.subtle,de=F&&typeof x!=N,z=L.bytes,Le=class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],s=e._tables[1],r=t.length;let a,o,l,u=1;if(r!==4&&r!==6&&r!==8)throw new v("invalid aes key size");for(e._key=[o=t.slice(0),l=[]],a=r;4*r+28>a;a++){let c=o[a-1];(a%r==0||r===8&&a%r==4)&&(c=n[c>>>24]<<24^n[c>>16&255]<<16^n[c>>8&255]<<8^n[255&c],a%r==0&&(c=c<<8^c>>>24^u<<24,u=u<<1^283*(u>>7))),o[a]=o[a-r]^c}for(let c=0;a;c++,a--){const i=o[3&c?a:a-4];l[c]=4>=a||4>c?i:s[0][n[i>>>24]]^s[1][n[i>>16&255]]^s[2][n[i>>8&255]]^s[3][n[255&i]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],s=e[4],r=[],a=[];let o,l,u,c;for(let i=0;256>i;i++)a[(r[i]=i<<1^283*(i>>7))^i]=i;for(let i=o=0;!n[i];i^=l||1,o=a[o]||1){let f=o^o<<1^o<<2^o<<3^o<<4;f=f>>8^255&f^99,n[i]=f,s[f]=i,c=r[u=r[l=r[i]]];let h=16843009*c^65537*u^257*l^16843008*i,p=257*r[f]^16843008*f;for(let d=0;4>d;d++)t[d][i]=p=p<<24^p>>>8,e[d][f]=h=h<<24^h>>>8}for(let i=0;5>i;i++)t[i]=t[i].slice(0),e[i]=e[i].slice(0)}_crypt(t,e){if(t.length!==4)throw new v("invalid aes block size");const n=this._key[e],s=n.length/4-2,r=[0,0,0,0],a=this._tables[e],o=a[0],l=a[1],u=a[2],c=a[3],i=a[4];let f,h,p,d=t[0]^n[0],g=t[e?3:1]^n[1],y=t[2]^n[2],S=t[e?1:3]^n[3],I=4;for(let C=0;s>C;C++)f=o[d>>>24]^l[g>>16&255]^u[y>>8&255]^c[255&S]^n[I],h=o[g>>>24]^l[y>>16&255]^u[S>>8&255]^c[255&d]^n[I+1],p=o[y>>>24]^l[S>>16&255]^u[d>>8&255]^c[255&g]^n[I+2],S=o[S>>>24]^l[d>>16&255]^u[g>>8&255]^c[255&y]^n[I+3],I+=4,d=f,g=h,y=p;for(let C=0;4>C;C++)r[e?3&-C:C]=i[d>>>24]<<24^i[g>>16&255]<<16^i[y>>8&255]<<8^i[255&S]^n[I++],f=d,d=g,g=y,y=S,S=f;return r}},Fe=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255&~(t>>24))t+=1<<24;else{let e=t>>16&255,n=t>>8&255,s=255&t;e===255?(e=0,n===255?(n=0,s===255?s=0:++s):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=s}return t}incCounter(t){(t[0]=this.incWord(t[0]))===0&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let s;if(!(s=e.length))return[];const r=_.bitLength(e);for(let a=0;s>a;a+=4){this.incCounter(n);const o=t.encrypt(n);e[a]^=o[0],e[a+1]^=o[1],e[a+2]^=o[2],e[a+3]^=o[3]}return _.clamp(e,r)}},je=H.hmacSha1;let ge=F&&de&&typeof x.importKey==O,we=F&&de&&typeof x.deriveBits==O;class Ge extends b{constructor({password:e,rawPassword:n,signed:s,encryptionStrength:r,checkPasswordOnly:a}){super({start(){m.assign(this,{ready:new M(o=>this.resolveReady=o),password:_e(e,n),signed:s,strength:r-1,pending:new w})},async transform(o,l){const u=this,{password:c,strength:i,resolveReady:f,ready:h}=u;c?(await(async(d,g,y,S)=>{const I=await me(d,g,y,k(S,0,T[g])),C=k(S,T[g]);if(I[0]!=C[0]||I[1]!=C[1])throw new v(le)})(u,i,c,k(o,0,T[i]+2)),o=k(o,T[i]+2),a?l.error(new v(he)):f()):await h;const p=new w(o.length-q-(o.length-q)%P);l.enqueue(ye(u,o,p,0,q,!0))},async flush(o){const{signed:l,ctr:u,hmac:c,pending:i,ready:f}=this;if(c&&u){await f;const h=k(i,0,i.length-q),p=k(i,i.length-q);let d=new w;if(h.length){const g=U(z,h);c.update(g);const y=u.update(g);d=E(z,y)}if(l){const g=k(E(z,c.digest()),0,q);for(let y=0;q>y;y++)if(g[y]!=p[y])throw new v(ue)}o.enqueue(d)}}})}}class Xe extends b{constructor({password:e,rawPassword:n,encryptionStrength:s}){let r;super({start(){m.assign(this,{ready:new M(a=>this.resolveReady=a),password:_e(e,n),strength:s-1,pending:new w})},async transform(a,o){const l=this,{password:u,strength:c,resolveReady:i,ready:f}=l;let h=new w;u?(h=await(async(d,g,y)=>{const S=fe(new w(T[g]));return J(S,await me(d,g,y,S))})(l,c,u),i()):await f;const p=new w(h.length+a.length-a.length%P);p.set(h,0),o.enqueue(ye(l,a,p,h.length,0))},async flush(a){const{ctr:o,hmac:l,pending:u,ready:c}=this;if(l&&o){await c;let i=new w;if(u.length){const f=o.update(U(z,u));l.update(f),i=E(z,f)}r.signature=E(z,l.digest()).slice(0,q),a.enqueue(J(i,r.signature))}}}),r=this}}function ye(t,e,n,s,r,a){const{ctr:o,hmac:l,pending:u}=t,c=e.length-r;let i;for(u.length&&(e=J(u,e),n=((f,h)=>{if(h&&h>f.length){const p=f;(f=new w(h)).set(p,0)}return f})(n,c-c%P)),i=0;c-P>=i;i+=P){const f=U(z,k(e,i,i+P));a&&l.update(f);const h=o.update(f);a||l.update(h),n.set(E(z,h),i+s)}return t.pending=k(e,i),n}async function me(t,e,n,s){t.password=null;const r=await(async(i,f,h,p,d)=>{if(!ge)return H.importKey(f);try{return await x.importKey("raw",f,h,!1,d)}catch{return ge=!1,H.importKey(f)}})(0,n,Me,0,Ne),a=await(async(i,f,h)=>{if(!we)return H.pbkdf2(f,i.salt,X.iterations,h);try{return await x.deriveBits(i,f,h)}catch{return we=!1,H.pbkdf2(f,i.salt,X.iterations,h)}})(m.assign({salt:s},X),r,8*(2*V[e]+2)),o=new w(a),l=U(z,k(o,0,V[e])),u=U(z,k(o,V[e],2*V[e])),c=k(o,2*V[e]);return m.assign(t,{keys:{key:l,authentication:u,passwordVerification:c},ctr:new Fe(new Le(l),te.from(Oe)),hmac:new je(u)}),c}function _e(t,e){return e===j?(n=>{if(typeof ae==N){const s=new w((n=unescape(encodeURIComponent(n))).length);for(let r=0;r<s.length;r++)s[r]=n.charCodeAt(r);return s}return new ae().encode(n)})(t):e}function J(t,e){let n=t;return t.length+e.length&&(n=new w(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function k(t,e,n){return t.subarray(e,n)}function E(t,e){return t.fromBits(e)}function U(t,e){return t.toBits(e)}class Je extends b{constructor({password:e,passwordVerification:n,checkPasswordOnly:s}){super({start(){m.assign(this,{password:e,passwordVerification:n}),ve(this,e)},transform(r,a){const o=this;if(o.password){const l=be(o,r.subarray(0,12));if(o.password=null,l[11]!=o.passwordVerification)throw new v(le);r=r.subarray(12)}s?a.error(new v(he)):a.enqueue(be(o,r))}})}}class Qe extends b{constructor({password:e,passwordVerification:n}){super({start(){m.assign(this,{password:e,passwordVerification:n}),ve(this,e)},transform(s,r){const a=this;let o,l;if(a.password){a.password=null;const u=fe(new w(12));u[11]=a.passwordVerification,o=new w(s.length+u.length),o.set(Se(a,u),0),l=12}else o=new w(s.length),l=0;o.set(Se(a,s),l),r.enqueue(o)}})}}function be(t,e){const n=new w(e.length);for(let s=0;s<e.length;s++)n[s]=ke(t)^e[s],Q(t,n[s]);return n}function Se(t,e){const n=new w(e.length);for(let s=0;s<e.length;s++)n[s]=ke(t)^e[s],Q(t,e[s]);return n}function ve(t,e){const n=[305419896,591751049,878082192];m.assign(t,{keys:n,crcKey0:new G(n[0]),crcKey2:new G(n[2])});for(let s=0;s<e.length;s++)Q(t,e.charCodeAt(s))}function Q(t,e){let[n,s,r]=t.keys;t.crcKey0.append([e]),n=~t.crcKey0.get(),s=De(A.imul(De(s+ze(n)),134775813)+1),t.crcKey2.append([s>>>24]),r=~t.crcKey2.get(),t.keys=[n,s,r]}function ke(t){const e=2|t.keys[2];return ze(A.imul(e,1^e)>>>8)}function ze(t){return 255&t}function De(t){return 4294967295&t}const Ce="deflate-raw";class Ye extends b{constructor(e,{chunkSize:n,CompressionStream:s,CompressionStreamNative:r}){super({});const{compressed:a,encrypted:o,useCompressionStream:l,zipCrypto:u,signed:c,level:i}=e,f=this;let h,p,d=Ie(super.readable);o&&!u||!c||(h=new ce,d=D(d,h)),a&&(d=qe(d,l,{level:i,chunkSize:n},r,s)),o&&(u?d=D(d,new Qe(e)):(p=new Xe(e),d=D(d,p))),Ae(f,d,()=>{let g;o&&!u&&(g=p.signature),o&&!u||!c||(g=new W(h.value.buffer).getUint32(0)),f.signature=g})}}class Ze extends b{constructor(e,{chunkSize:n,DecompressionStream:s,DecompressionStreamNative:r}){super({});const{zipCrypto:a,encrypted:o,signed:l,signature:u,compressed:c,useCompressionStream:i}=e;let f,h,p=Ie(super.readable);o&&(a?p=D(p,new Je(e)):(h=new Ge(e),p=D(p,h))),c&&(p=qe(p,i,{chunkSize:n},r,s)),o&&!a||!l||(f=new ce,p=D(p,f)),Ae(this,p,()=>{if((!o||a)&&l){const d=new W(f.value.buffer);if(u!=d.getUint32(0,!1))throw new v(ue)}})}}function Ie(t){return D(t,new b({transform(e,n){e&&e.length&&n.enqueue(e)}}))}function Ae(t,e,n){e=D(e,new b({flush:n})),m.defineProperty(t,"readable",{get:()=>e})}function qe(t,e,n,s,r){try{t=D(t,new(e&&s?s:r)(Ce,n))}catch{if(!e)return t;try{t=D(t,new r(Ce,n))}catch{return t}}return t}function D(t,e){return t.pipeThrough(e)}const Re="data",He="close";class $e extends b{constructor(e,n){super({});const s=this,{codecType:r}=e;let a;r.startsWith("deflate")?a=Ye:r.startsWith("inflate")&&(a=Ze);let o=0,l=0;const u=new a(e,n),c=super.readable,i=new b({transform(h,p){h&&h.length&&(l+=h.length,p.enqueue(h))},flush(){m.assign(s,{inputSize:l})}}),f=new b({transform(h,p){h&&h.length&&(o+=h.length,p.enqueue(h))},flush(){const{signature:h}=u;m.assign(s,{signature:h,outputSize:o,inputSize:l})}});m.defineProperty(s,"readable",{get:()=>c.pipeThrough(i).pipeThrough(u).pipeThrough(f)})}}class et extends b{constructor(e){let n;super({transform:function s(r,a){if(n){const o=new w(n.length+r.length);o.set(n),o.set(r,n.length),r=o,n=null}r.length>e?(a.enqueue(r.slice(0,e)),s(r.slice(e),a)):n=r},flush(s){n&&n.length&&s.enqueue(n)}})}}const Y=new re,Z=new re;let $,R=0,Pe=!0;async function tt(t){try{const{options:e,scripts:n,config:s}=t;if(n&&n.length)try{Pe?importScripts.apply(j,n):await Be(n)}catch{Pe=!1,await Be(n)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new oe(self.Deflate)),self.Inflate&&(s.DecompressionStream=new oe(self.Inflate));const r={highWaterMark:1},a=t.readable||new Ve({async pull(h){const p=new M(y=>Y.set(R,y));ee({type:"pull",messageId:R}),R=(R+1)%ne.MAX_SAFE_INTEGER;const{value:d,done:g}=await p;h.enqueue(d),g&&h.close()}},r),o=t.writable||new xe({async write(h){let p;const d=new M(g=>p=g);Z.set(R,p),ee({type:Re,value:h,messageId:R}),R=(R+1)%ne.MAX_SAFE_INTEGER,await d}},r),l=new $e(e,s);$=new AbortController;const{signal:u}=$;await a.pipeThrough(l).pipeThrough(new et(s.chunkSize)).pipeTo(o,{signal:u,preventClose:!0,preventAbort:!0}),await o.getWriter().close();const{signature:c,inputSize:i,outputSize:f}=l;ee({type:He,result:{signature:c,inputSize:i,outputSize:f}})}catch(e){Ke(e)}}async function Be(t){for(const e of t)await import(e)}function ee(t){let{value:e}=t;if(e)if(e.length)try{e=new w(e),t.value=e.buffer,K(t,[t.value])}catch{K(t)}else K(t);else K(t)}function Ke(t=new v("Unknown error")){const{message:e,stack:n,code:s,name:r}=t;K({error:{message:e,stack:n,code:s,name:r}})}function Te(t,e,n){return class{constructor(r){const a=this;var o,l;o=r,l="level",(typeof m.hasOwn===O?m.hasOwn(o,l):o.hasOwnProperty(l))&&r.level===j&&delete r.level,a.codec=new t(m.assign({},e,r)),n(a.codec,u=>{if(a.pendingData){const c=a.pendingData;a.pendingData=new w(c.length+u.length);const{pendingData:i}=a;i.set(c,0),i.set(u,c.length)}else a.pendingData=new w(u)})}append(r){return this.codec.push(r),s(this)}flush(){return this.codec.push(new w,!0),s(this)}};function s(r){if(r.pendingData){const a=r.pendingData;return r.pendingData=null,a}return new w}}addEventListener("message",({data:t})=>{const{type:e,messageId:n,value:s,done:r}=t;try{if(e=="start"&&tt(t),e==Re){const a=Y.get(n);Y.delete(n),a({value:new w(s),done:r})}if(e=="ack"){const a=Z.get(n);Z.delete(n),a()}e==He&&$.abort()}catch(a){Ke(a)}}),self.initCodec=()=>{const{Deflate:t,Inflate:e}=((n,s={},r)=>({Deflate:Te(n.Deflate,s.deflate,r),Inflate:Te(n.Inflate,s.inflate,r)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},(n,s)=>n.onData=s);self.Deflate=t,self.Inflate=e}})();
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
/* packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css */
|
|
2
|
-
ul {
|
|
2
|
+
.cesium-viewer-i3s-explorer ul {
|
|
3
3
|
list-style-type: none;
|
|
4
4
|
}
|
|
5
|
-
.layersList {
|
|
5
|
+
.cesium-viewer-i3s-explorer .layersList {
|
|
6
6
|
padding: 0;
|
|
7
7
|
}
|
|
8
|
-
input {
|
|
8
|
+
.cesium-viewer-i3s-explorer input {
|
|
9
9
|
margin: 0 3px 0 0;
|
|
10
10
|
}
|
|
11
|
-
.expandItem {
|
|
11
|
+
.cesium-viewer-i3s-explorer .expandItem {
|
|
12
12
|
cursor: pointer;
|
|
13
13
|
user-select: none;
|
|
14
14
|
width: 20px;
|
|
15
15
|
}
|
|
16
|
-
.nested,
|
|
17
|
-
#bsl-wrapper {
|
|
16
|
+
.cesium-viewer-i3s-explorer .nested,
|
|
17
|
+
.cesium-viewer-i3s-explorer #bsl-wrapper {
|
|
18
18
|
display: none;
|
|
19
19
|
}
|
|
20
|
-
.active {
|
|
20
|
+
.cesium-viewer-i3s-explorer .active {
|
|
21
21
|
display: block;
|
|
22
22
|
}
|
|
23
|
-
.li-wrapper {
|
|
23
|
+
.cesium-viewer-i3s-explorer .li-wrapper {
|
|
24
24
|
display: flex;
|
|
25
25
|
flex-direction: row;
|
|
26
26
|
align-content: center;
|
|
@@ -1316,28 +1316,28 @@ span.cesium-projectionPicker-wrapper {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
|
|
1318
1318
|
/* packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css */
|
|
1319
|
-
ul {
|
|
1319
|
+
.cesium-viewer-i3s-explorer ul {
|
|
1320
1320
|
list-style-type: none;
|
|
1321
1321
|
}
|
|
1322
|
-
.layersList {
|
|
1322
|
+
.cesium-viewer-i3s-explorer .layersList {
|
|
1323
1323
|
padding: 0;
|
|
1324
1324
|
}
|
|
1325
|
-
input {
|
|
1325
|
+
.cesium-viewer-i3s-explorer input {
|
|
1326
1326
|
margin: 0 3px 0 0;
|
|
1327
1327
|
}
|
|
1328
|
-
.expandItem {
|
|
1328
|
+
.cesium-viewer-i3s-explorer .expandItem {
|
|
1329
1329
|
cursor: pointer;
|
|
1330
1330
|
user-select: none;
|
|
1331
1331
|
width: 20px;
|
|
1332
1332
|
}
|
|
1333
|
-
.nested,
|
|
1334
|
-
#bsl-wrapper {
|
|
1333
|
+
.cesium-viewer-i3s-explorer .nested,
|
|
1334
|
+
.cesium-viewer-i3s-explorer #bsl-wrapper {
|
|
1335
1335
|
display: none;
|
|
1336
1336
|
}
|
|
1337
|
-
.active {
|
|
1337
|
+
.cesium-viewer-i3s-explorer .active {
|
|
1338
1338
|
display: block;
|
|
1339
1339
|
}
|
|
1340
|
-
.li-wrapper {
|
|
1340
|
+
.cesium-viewer-i3s-explorer .li-wrapper {
|
|
1341
1341
|
display: flex;
|
|
1342
1342
|
flex-direction: row;
|
|
1343
1343
|
align-content: center;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.118
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,6 +23,6 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{e as f}from"./chunk-
|
|
26
|
+
import{e as f}from"./chunk-IALXUAD4.js";function c(t){let n,a=t.name,e=t.message;f(a)&&f(e)?n=`${a}: ${e}`:n=t.toString();let o=t.stack;return f(o)&&(n+=`
|
|
27
27
|
${o}`),n}var i=c;function l(t){async function n({data:e}){let o=[],s={id:e.id,result:void 0,error:void 0};self.CESIUM_BASE_URL=e.baseUrl;try{let r=await t(e.parameters,o);s.result=r}catch(r){r instanceof Error?s.error={name:r.name,message:r.message,stack:r.stack}:s.error=r}e.canTransferArrayBuffer||(o.length=0);try{postMessage(s,o)}catch(r){s.result=void 0,s.error=`postMessage failed with error: ${i(r)}
|
|
28
28
|
with responseMessage: ${JSON.stringify(s)}`,postMessage(s)}}function a(e){postMessage({id:e.data?.id,error:`postMessage failed with error: ${JSON.stringify(e)}`})}return self.onmessage=n,self.onmessageerror=a,self}var d=l;export{d as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.118
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a as f}from"./chunk-
|
|
26
|
+
import{a as f}from"./chunk-4YLYA3DC.js";import{a as n,b as c}from"./chunk-6RGNWVZ2.js";import{c as I,d as _,e as o}from"./chunk-IALXUAD4.js";var P=I((O,d)=>{var u=function(t){t==null&&(t=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,t.constructor==Array?this.init_by_array(t,t.length):this.init_seed(t)};u.prototype.init_seed=function(t){for(this.mt[0]=t>>>0,this.mti=1;this.mti<this.N;this.mti++){var t=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((t&4294901760)>>>16)*1812433253<<16)+(t&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};u.prototype.init_by_array=function(t,i){var e,s,h;for(this.init_seed(19650218),e=1,s=0,h=this.N>i?this.N:i;h;h--){var a=this.mt[e-1]^this.mt[e-1]>>>30;this.mt[e]=(this.mt[e]^(((a&4294901760)>>>16)*1664525<<16)+(a&65535)*1664525)+t[s]+s,this.mt[e]>>>=0,e++,s++,e>=this.N&&(this.mt[0]=this.mt[this.N-1],e=1),s>=i&&(s=0)}for(h=this.N-1;h;h--){var a=this.mt[e-1]^this.mt[e-1]>>>30;this.mt[e]=(this.mt[e]^(((a&4294901760)>>>16)*1566083941<<16)+(a&65535)*1566083941)-e,this.mt[e]>>>=0,e++,e>=this.N&&(this.mt[0]=this.mt[this.N-1],e=1)}this.mt[0]=2147483648};u.prototype.random_int=function(){var t,i=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var e;for(this.mti==this.N+1&&this.init_seed(5489),e=0;e<this.N-this.M;e++)t=this.mt[e]&this.UPPER_MASK|this.mt[e+1]&this.LOWER_MASK,this.mt[e]=this.mt[e+this.M]^t>>>1^i[t&1];for(;e<this.N-1;e++)t=this.mt[e]&this.UPPER_MASK|this.mt[e+1]&this.LOWER_MASK,this.mt[e]=this.mt[e+(this.M-this.N)]^t>>>1^i[t&1];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^i[t&1],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,t^=t>>>18,t>>>0};u.prototype.random_int31=function(){return this.random_int()>>>1};u.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};u.prototype.random=function(){return this.random_int()*(1/4294967296)};u.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};u.prototype.random_long=function(){var t=this.random_int()>>>5,i=this.random_int()>>>6;return(t*67108864+i)*(1/9007199254740992)};d.exports=u});var m=_(P(),1);var r={};r.EPSILON1=.1;r.EPSILON2=.01;r.EPSILON3=.001;r.EPSILON4=1e-4;r.EPSILON5=1e-5;r.EPSILON6=1e-6;r.EPSILON7=1e-7;r.EPSILON8=1e-8;r.EPSILON9=1e-9;r.EPSILON10=1e-10;r.EPSILON11=1e-11;r.EPSILON12=1e-12;r.EPSILON13=1e-13;r.EPSILON14=1e-14;r.EPSILON15=1e-15;r.EPSILON16=1e-16;r.EPSILON17=1e-17;r.EPSILON18=1e-18;r.EPSILON19=1e-19;r.EPSILON20=1e-20;r.EPSILON21=1e-21;r.GRAVITATIONALPARAMETER=3986004418e5;r.SOLAR_RADIUS=6955e5;r.LUNAR_RADIUS=1737400;r.SIXTY_FOUR_KILOBYTES=64*1024;r.FOUR_GIGABYTES=4*1024*1024*1024;r.sign=f(Math.sign,function(i){return i=+i,i===0||i!==i?i:i>0?1:-1});r.signNotZero=function(t){return t<0?-1:1};r.toSNorm=function(t,i){return i=f(i,255),Math.round((r.clamp(t,-1,1)*.5+.5)*i)};r.fromSNorm=function(t,i){return i=f(i,255),r.clamp(t,0,i)/i*2-1};r.normalize=function(t,i,e){return e=Math.max(e-i,0),e===0?0:r.clamp((t-i)/e,0,1)};r.sinh=f(Math.sinh,function(i){return(Math.exp(i)-Math.exp(-i))/2});r.cosh=f(Math.cosh,function(i){return(Math.exp(i)+Math.exp(-i))/2});r.lerp=function(t,i,e){return(1-e)*t+e*i};r.PI=Math.PI;r.ONE_OVER_PI=1/Math.PI;r.PI_OVER_TWO=Math.PI/2;r.PI_OVER_THREE=Math.PI/3;r.PI_OVER_FOUR=Math.PI/4;r.PI_OVER_SIX=Math.PI/6;r.THREE_PI_OVER_TWO=3*Math.PI/2;r.TWO_PI=2*Math.PI;r.ONE_OVER_TWO_PI=1/(2*Math.PI);r.RADIANS_PER_DEGREE=Math.PI/180;r.DEGREES_PER_RADIAN=180/Math.PI;r.RADIANS_PER_ARCSECOND=r.RADIANS_PER_DEGREE/3600;r.toRadians=function(t){if(!o(t))throw new n("degrees is required.");return t*r.RADIANS_PER_DEGREE};r.toDegrees=function(t){if(!o(t))throw new n("radians is required.");return t*r.DEGREES_PER_RADIAN};r.convertLongitudeRange=function(t){if(!o(t))throw new n("angle is required.");let i=r.TWO_PI,e=t-Math.floor(t/i)*i;return e<-Math.PI?e+i:e>=Math.PI?e-i:e};r.clampToLatitudeRange=function(t){if(!o(t))throw new n("angle is required.");return r.clamp(t,-1*r.PI_OVER_TWO,r.PI_OVER_TWO)};r.negativePiToPi=function(t){if(!o(t))throw new n("angle is required.");return t>=-r.PI&&t<=r.PI?t:r.zeroToTwoPi(t+r.PI)-r.PI};r.zeroToTwoPi=function(t){if(!o(t))throw new n("angle is required.");if(t>=0&&t<=r.TWO_PI)return t;let i=r.mod(t,r.TWO_PI);return Math.abs(i)<r.EPSILON14&&Math.abs(t)>r.EPSILON14?r.TWO_PI:i};r.mod=function(t,i){if(!o(t))throw new n("m is required.");if(!o(i))throw new n("n is required.");if(i===0)throw new n("divisor cannot be 0.");return r.sign(t)===r.sign(i)&&Math.abs(t)<Math.abs(i)?t:(t%i+i)%i};r.equalsEpsilon=function(t,i,e,s){if(!o(t))throw new n("left is required.");if(!o(i))throw new n("right is required.");e=f(e,0),s=f(s,e);let h=Math.abs(t-i);return h<=s||h<=e*Math.max(Math.abs(t),Math.abs(i))};r.lessThan=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i<-e};r.lessThanOrEquals=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i<e};r.greaterThan=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i>e};r.greaterThanOrEquals=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i>-e};var w=[1];r.factorial=function(t){if(typeof t!="number"||t<0)throw new n("A number greater than or equal to 0 is required.");let i=w.length;if(t>=i){let e=w[i-1];for(let s=i;s<=t;s++){let h=e*s;w.push(h),e=h}}return w[t]};r.incrementWrap=function(t,i,e){if(e=f(e,0),!o(t))throw new n("n is required.");if(i<=e)throw new n("maximumValue must be greater than minimumValue.");return++t,t>i&&(t=e),t};r.isPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>4294967295)throw new n("A number between 0 and (2^32)-1 is required.");return t!==0&&(t&t-1)===0};r.nextPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>2147483648)throw new n("A number between 0 and 2^31 is required.");return--t,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t,t};r.previousPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>4294967295)throw new n("A number between 0 and (2^32)-1 is required.");return t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t|=t>>32,t=(t>>>0)-(t>>>1),t};r.clamp=function(t,i,e){return c.typeOf.number("value",t),c.typeOf.number("min",i),c.typeOf.number("max",e),t<i?i:t>e?e:t};var E=new m.default;r.setRandomNumberSeed=function(t){if(!o(t))throw new n("seed is required.");E=new m.default(t)};r.nextRandomNumber=function(){return E.random()};r.randomBetween=function(t,i){return r.nextRandomNumber()*(i-t)+t};r.acosClamped=function(t){if(!o(t))throw new n("value is required.");return Math.acos(r.clamp(t,-1,1))};r.asinClamped=function(t){if(!o(t))throw new n("value is required.");return Math.asin(r.clamp(t,-1,1))};r.chordLength=function(t,i){if(!o(t))throw new n("angle is required.");if(!o(i))throw new n("radius is required.");return 2*i*Math.sin(t*.5)};r.logBase=function(t,i){if(!o(t))throw new n("number is required.");if(!o(i))throw new n("base is required.");return Math.log(t)/Math.log(i)};r.cbrt=f(Math.cbrt,function(i){let e=Math.pow(Math.abs(i),.3333333333333333);return i<0?-e:e});r.log2=f(Math.log2,function(i){return Math.log(i)*Math.LOG2E});r.fog=function(t,i){let e=t*i;return 1-Math.exp(-(e*e))};r.fastApproximateAtan=function(t){return c.typeOf.number("x",t),t*(-.1784*Math.abs(t)-.0663*t*t+1.0301)};r.fastApproximateAtan2=function(t,i){c.typeOf.number("x",t),c.typeOf.number("y",i);let e,s=Math.abs(t);e=Math.abs(i);let h=Math.max(s,e);e=Math.min(s,e);let a=e/h;if(isNaN(a))throw new n("either x or y must be nonzero");return s=r.fastApproximateAtan(a),s=Math.abs(i)>Math.abs(t)?r.PI_OVER_TWO-s:s,s=t<0?r.PI-s:s,s=i<0?-s:s,s};var A=r;export{A as a};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.118
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import{b as Z,h as I}from"./chunk-TVO2A75R.js";import{a as n,b as N,d as A,e as _}from"./chunk-4EI6PP43.js";import{a as cn}from"./chunk-3T4KR75X.js";import{a as T}from"./chunk-4YLYA3DC.js";import{a as on,b as S}from"./chunk-6RGNWVZ2.js";import{e as x}from"./chunk-IALXUAD4.js";function V(e){this._ellipsoid=T(e,A.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(V.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});V.prototype.project=function(e,t){let o=this._semimajorAxis,c=e.longitude*o,r=e.latitude*o,d=e.height;return x(t)?(t.x=c,t.y=r,t.z=d,t):new n(c,r,d)};V.prototype.unproject=function(e,t){if(!x(e))throw new on("cartesian is required");let o=this._oneOverSemimajorAxis,c=e.x*o,r=e.y*o,d=e.z;return x(t)?(t.longitude=c,t.latitude=r,t.height=d,t):new N(c,r,d)};var U=V;var fn={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},W=Object.freeze(fn);function sn(e,t){this.start=T(e,0),this.stop=T(t,0)}var rn=sn;function a(e,t){this.center=n.clone(T(e,n.ZERO)),this.radius=T(t,0)}var F=new n,Y=new n,J=new n,K=new n,Q=new n,$=new n,L=new n,b=new n,H=new n,nn=new n,tn=new n,en=new n,mn=4/3*cn.PI;a.fromPoints=function(e,t){if(x(t)||(t=new a),!x(e)||e.length===0)return t.center=n.clone(n.ZERO,t.center),t.radius=0,t;let o=n.clone(e[0],L),c=n.clone(o,F),r=n.clone(o,Y),d=n.clone(o,J),f=n.clone(o,K),s=n.clone(o,Q),m=n.clone(o,$),h=e.length,y;for(y=1;y<h;y++){n.clone(e[y],o);let R=o.x,M=o.y,w=o.z;R<c.x&&n.clone(o,c),R>f.x&&n.clone(o,f),M<r.y&&n.clone(o,r),M>s.y&&n.clone(o,s),w<d.z&&n.clone(o,d),w>m.z&&n.clone(o,m)}let u=n.magnitudeSquared(n.subtract(f,c,b)),i=n.magnitudeSquared(n.subtract(s,r,b)),v=n.magnitudeSquared(n.subtract(m,d,b)),C=c,q=f,O=u;i>O&&(O=i,C=r,q=s),v>O&&(O=v,C=d,q=m);let p=H;p.x=(C.x+q.x)*.5,p.y=(C.y+q.y)*.5,p.z=(C.z+q.z)*.5;let z=n.magnitudeSquared(n.subtract(q,p,b)),l=Math.sqrt(z),j=nn;j.x=c.x,j.y=r.y,j.z=d.z;let P=tn;P.x=f.x,P.y=s.y,P.z=m.z;let D=n.midpoint(j,P,en),B=0;for(y=0;y<h;y++){n.clone(e[y],o);let R=n.magnitude(n.subtract(o,D,b));R>B&&(B=R);let M=n.magnitudeSquared(n.subtract(o,p,b));if(M>z){let w=Math.sqrt(M);l=(l+w)*.5,z=l*l;let g=w-l;p.x=(l*p.x+g*o.x)/w,p.y=(l*p.y+g*o.y)/w,p.z=(l*p.z+g*o.z)/w}}return l<B?(n.clone(p,t.center),t.radius=l):(n.clone(D,t.center),t.radius=B),t};var un=new U,xn=new n,yn=new n,k=new N,X=new N;a.fromRectangle2D=function(e,t,o){return a.fromRectangleWithHeights2D(e,t,0,0,o)};a.fromRectangleWithHeights2D=function(e,t,o,c,r){if(x(r)||(r=new a),!x(e))return r.center=n.clone(n.ZERO,r.center),r.radius=0,r;t=T(t,un),I.southwest(e,k),k.height=o,I.northeast(e,X),X.height=c;let d=t.project(k,xn),f=t.project(X,yn),s=f.x-d.x,m=f.y-d.y,h=f.z-d.z;r.radius=Math.sqrt(s*s+m*m+h*h)*.5;let y=r.center;return y.x=d.x+s*.5,y.y=d.y+m*.5,y.z=d.z+h*.5,r};var ln=[];a.fromRectangle3D=function(e,t,o,c){if(t=T(t,A.WGS84),o=T(o,0),x(c)||(c=new a),!x(e))return c.center=n.clone(n.ZERO,c.center),c.radius=0,c;let r=I.subsample(e,t,o,ln);return a.fromPoints(r,c)};a.fromVertices=function(e,t,o,c){if(x(c)||(c=new a),!x(e)||e.length===0)return c.center=n.clone(n.ZERO,c.center),c.radius=0,c;t=T(t,n.ZERO),o=T(o,3),S.typeOf.number.greaterThanOrEquals("stride",o,3);let r=L;r.x=e[0]+t.x,r.y=e[1]+t.y,r.z=e[2]+t.z;let d=n.clone(r,F),f=n.clone(r,Y),s=n.clone(r,J),m=n.clone(r,K),h=n.clone(r,Q),y=n.clone(r,$),u=e.length,i;for(i=0;i<u;i+=o){let w=e[i]+t.x,g=e[i+1]+t.y,E=e[i+2]+t.z;r.x=w,r.y=g,r.z=E,w<d.x&&n.clone(r,d),w>m.x&&n.clone(r,m),g<f.y&&n.clone(r,f),g>h.y&&n.clone(r,h),E<s.z&&n.clone(r,s),E>y.z&&n.clone(r,y)}let v=n.magnitudeSquared(n.subtract(m,d,b)),C=n.magnitudeSquared(n.subtract(h,f,b)),q=n.magnitudeSquared(n.subtract(y,s,b)),O=d,p=m,z=v;C>z&&(z=C,O=f,p=h),q>z&&(z=q,O=s,p=y);let l=H;l.x=(O.x+p.x)*.5,l.y=(O.y+p.y)*.5,l.z=(O.z+p.z)*.5;let j=n.magnitudeSquared(n.subtract(p,l,b)),P=Math.sqrt(j),D=nn;D.x=d.x,D.y=f.y,D.z=s.z;let B=tn;B.x=m.x,B.y=h.y,B.z=y.z;let R=n.midpoint(D,B,en),M=0;for(i=0;i<u;i+=o){r.x=e[i]+t.x,r.y=e[i+1]+t.y,r.z=e[i+2]+t.z;let w=n.magnitude(n.subtract(r,R,b));w>M&&(M=w);let g=n.magnitudeSquared(n.subtract(r,l,b));if(g>j){let E=Math.sqrt(g);P=(P+E)*.5,j=P*P;let G=E-P;l.x=(P*l.x+G*r.x)/E,l.y=(P*l.y+G*r.y)/E,l.z=(P*l.z+G*r.z)/E}}return P<M?(n.clone(l,c.center),c.radius=P):(n.clone(R,c.center),c.radius=M),c};a.fromEncodedCartesianVertices=function(e,t,o){if(x(o)||(o=new a),!x(e)||!x(t)||e.length!==t.length||e.length===0)return o.center=n.clone(n.ZERO,o.center),o.radius=0,o;let c=L;c.x=e[0]+t[0],c.y=e[1]+t[1],c.z=e[2]+t[2];let r=n.clone(c,F),d=n.clone(c,Y),f=n.clone(c,J),s=n.clone(c,K),m=n.clone(c,Q),h=n.clone(c,$),y=e.length,u;for(u=0;u<y;u+=3){let M=e[u]+t[u],w=e[u+1]+t[u+1],g=e[u+2]+t[u+2];c.x=M,c.y=w,c.z=g,M<r.x&&n.clone(c,r),M>s.x&&n.clone(c,s),w<d.y&&n.clone(c,d),w>m.y&&n.clone(c,m),g<f.z&&n.clone(c,f),g>h.z&&n.clone(c,h)}let i=n.magnitudeSquared(n.subtract(s,r,b)),v=n.magnitudeSquared(n.subtract(m,d,b)),C=n.magnitudeSquared(n.subtract(h,f,b)),q=r,O=s,p=i;v>p&&(p=v,q=d,O=m),C>p&&(p=C,q=f,O=h);let z=H;z.x=(q.x+O.x)*.5,z.y=(q.y+O.y)*.5,z.z=(q.z+O.z)*.5;let l=n.magnitudeSquared(n.subtract(O,z,b)),j=Math.sqrt(l),P=nn;P.x=r.x,P.y=d.y,P.z=f.z;let D=tn;D.x=s.x,D.y=m.y,D.z=h.z;let B=n.midpoint(P,D,en),R=0;for(u=0;u<y;u+=3){c.x=e[u]+t[u],c.y=e[u+1]+t[u+1],c.z=e[u+2]+t[u+2];let M=n.magnitude(n.subtract(c,B,b));M>R&&(R=M);let w=n.magnitudeSquared(n.subtract(c,z,b));if(w>l){let g=Math.sqrt(w);j=(j+g)*.5,l=j*j;let E=g-j;z.x=(j*z.x+E*c.x)/g,z.y=(j*z.y+E*c.y)/g,z.z=(j*z.z+E*c.z)/g}}return j<R?(n.clone(z,o.center),o.radius=j):(n.clone(B,o.center),o.radius=R),o};a.fromCornerPoints=function(e,t,o){S.typeOf.object("corner",e),S.typeOf.object("oppositeCorner",t),x(o)||(o=new a);let c=n.midpoint(e,t,o.center);return o.radius=n.distance(c,t),o};a.fromEllipsoid=function(e,t){return S.typeOf.object("ellipsoid",e),x(t)||(t=new a),n.clone(n.ZERO,t.center),t.radius=e.maximumRadius,t};var pn=new n;a.fromBoundingSpheres=function(e,t){if(x(t)||(t=new a),!x(e)||e.length===0)return t.center=n.clone(n.ZERO,t.center),t.radius=0,t;let o=e.length;if(o===1)return a.clone(e[0],t);if(o===2)return a.union(e[0],e[1],t);let c=[],r;for(r=0;r<o;r++)c.push(e[r].center);t=a.fromPoints(c,t);let d=t.center,f=t.radius;for(r=0;r<o;r++){let s=e[r];f=Math.max(f,n.distance(d,s.center,pn)+s.radius)}return t.radius=f,t};var Sn=new n,hn=new n,zn=new n;a.fromOrientedBoundingBox=function(e,t){S.defined("orientedBoundingBox",e),x(t)||(t=new a);let o=e.halfAxes,c=_.getColumn(o,0,Sn),r=_.getColumn(o,1,hn),d=_.getColumn(o,2,zn);return n.add(c,r,c),n.add(c,d,c),t.center=n.clone(e.center,t.center),t.radius=n.magnitude(c),t};var wn=new n,Pn=new n;a.fromTransformation=function(e,t){S.typeOf.object("transformation",e),x(t)||(t=new a);let o=Z.getTranslation(e,wn),c=Z.getScale(e,Pn),r=.5*n.magnitude(c);return t.center=n.clone(o,t.center),t.radius=r,t};a.clone=function(e,t){if(x(e))return x(t)?(t.center=n.clone(e.center,t.center),t.radius=e.radius,t):new a(e.center,e.radius)};a.packedLength=4;a.pack=function(e,t,o){S.typeOf.object("value",e),S.defined("array",t),o=T(o,0);let c=e.center;return t[o++]=c.x,t[o++]=c.y,t[o++]=c.z,t[o]=e.radius,t};a.unpack=function(e,t,o){S.defined("array",e),t=T(t,0),x(o)||(o=new a);let c=o.center;return c.x=e[t++],c.y=e[t++],c.z=e[t++],o.radius=e[t],o};var gn=new n,On=new n;a.union=function(e,t,o){S.typeOf.object("left",e),S.typeOf.object("right",t),x(o)||(o=new a);let c=e.center,r=e.radius,d=t.center,f=t.radius,s=n.subtract(d,c,gn),m=n.magnitude(s);if(r>=m+f)return e.clone(o),o;if(f>=m+r)return t.clone(o),o;let h=(r+m+f)*.5,y=n.multiplyByScalar(s,(-r+h)/m,On);return n.add(y,c,y),n.clone(y,o.center),o.radius=h,o};var jn=new n;a.expand=function(e,t,o){S.typeOf.object("sphere",e),S.typeOf.object("point",t),o=a.clone(e,o);let c=n.magnitude(n.subtract(t,o.center,jn));return c>o.radius&&(o.radius=c),o};a.intersectPlane=function(e,t){S.typeOf.object("sphere",e),S.typeOf.object("plane",t);let o=e.center,c=e.radius,r=t.normal,d=n.dot(r,o)+t.distance;return d<-c?W.OUTSIDE:d<c?W.INTERSECTING:W.INSIDE};a.transform=function(e,t,o){return S.typeOf.object("sphere",e),S.typeOf.object("transform",t),x(o)||(o=new a),o.center=Z.multiplyByPoint(t,e.center,o.center),o.radius=Z.getMaximumScale(t)*e.radius,o};var bn=new n;a.distanceSquaredTo=function(e,t){S.typeOf.object("sphere",e),S.typeOf.object("cartesian",t);let o=n.subtract(e.center,t,bn),c=n.magnitude(o)-e.radius;return c<=0?0:c*c};a.transformWithoutScale=function(e,t,o){return S.typeOf.object("sphere",e),S.typeOf.object("transform",t),x(o)||(o=new a),o.center=Z.multiplyByPoint(t,e.center,o.center),o.radius=e.radius,o};var qn=new n;a.computePlaneDistances=function(e,t,o,c){S.typeOf.object("sphere",e),S.typeOf.object("position",t),S.typeOf.object("direction",o),x(c)||(c=new rn);let r=n.subtract(e.center,t,qn),d=n.dot(o,r);return c.start=d-e.radius,c.stop=d+e.radius,c};var an=new n,Mn=new n,Tn=new n,Cn=new n,Rn=new n,En=new N,dn=new Array(8);for(let e=0;e<8;++e)dn[e]=new n;var Dn=new U;a.projectTo2D=function(e,t,o){S.typeOf.object("sphere",e),t=T(t,Dn);let c=t.ellipsoid,r=e.center,d=e.radius,f;n.equals(r,n.ZERO)?f=n.clone(n.UNIT_X,an):f=c.geodeticSurfaceNormal(r,an);let s=n.cross(n.UNIT_Z,f,Mn);n.normalize(s,s);let m=n.cross(f,s,Tn);n.normalize(m,m),n.multiplyByScalar(f,d,f),n.multiplyByScalar(m,d,m),n.multiplyByScalar(s,d,s);let h=n.negate(m,Rn),y=n.negate(s,Cn),u=dn,i=u[0];n.add(f,m,i),n.add(i,s,i),i=u[1],n.add(f,m,i),n.add(i,y,i),i=u[2],n.add(f,h,i),n.add(i,y,i),i=u[3],n.add(f,h,i),n.add(i,s,i),n.negate(f,f),i=u[4],n.add(f,m,i),n.add(i,s,i),i=u[5],n.add(f,m,i),n.add(i,y,i),i=u[6],n.add(f,h,i),n.add(i,y,i),i=u[7],n.add(f,h,i),n.add(i,s,i);let v=u.length;for(let p=0;p<v;++p){let z=u[p];n.add(r,z,z);let l=c.cartesianToCartographic(z,En);t.project(l,z)}o=a.fromPoints(u,o),r=o.center;let C=r.x,q=r.y,O=r.z;return r.x=O,r.y=C,r.z=q,o};a.isOccluded=function(e,t){return S.typeOf.object("sphere",e),S.typeOf.object("occluder",t),!t.isBoundingSphereVisible(e)};a.equals=function(e,t){return e===t||x(e)&&x(t)&&n.equals(e.center,t.center)&&e.radius===t.radius};a.prototype.intersectPlane=function(e){return a.intersectPlane(this,e)};a.prototype.distanceSquaredTo=function(e){return a.distanceSquaredTo(this,e)};a.prototype.computePlaneDistances=function(e,t,o){return a.computePlaneDistances(this,e,t,o)};a.prototype.isOccluded=function(e){return a.isOccluded(this,e)};a.prototype.equals=function(e){return a.equals(this,e)};a.prototype.clone=function(e){return a.clone(this,e)};a.prototype.volume=function(){let e=this.radius;return mn*e*e*e};var et=a;export{U as a,W as b,rn as c,et as d};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.118
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import{a as O}from"./chunk-3T4KR75X.js";import{a as b}from"./chunk-4YLYA3DC.js";import{a as g,b as c}from"./chunk-6RGNWVZ2.js";import{e as u}from"./chunk-IALXUAD4.js";function f(n,e,o){this.x=b(n,0),this.y=b(e,0),this.z=b(o,0)}f.fromSpherical=function(n,e){c.typeOf.object("spherical",n),u(e)||(e=new f);let o=n.clock,t=n.cone,i=b(n.magnitude,1),p=i*Math.sin(t);return e.x=p*Math.cos(o),e.y=p*Math.sin(o),e.z=i*Math.cos(t),e};f.fromElements=function(n,e,o,t){return u(t)?(t.x=n,t.y=e,t.z=o,t):new f(n,e,o)};f.clone=function(n,e){if(u(n))return u(e)?(e.x=n.x,e.y=n.y,e.z=n.z,e):new f(n.x,n.y,n.z)};f.fromCartesian4=f.clone;f.packedLength=3;f.pack=function(n,e,o){return c.typeOf.object("value",n),c.defined("array",e),o=b(o,0),e[o++]=n.x,e[o++]=n.y,e[o]=n.z,e};f.unpack=function(n,e,o){return c.defined("array",n),e=b(e,0),u(o)||(o=new f),o.x=n[e++],o.y=n[e++],o.z=n[e],o};f.packArray=function(n,e){c.defined("array",n);let o=n.length,t=o*3;if(!u(e))e=new Array(t);else{if(!Array.isArray(e)&&e.length!==t)throw new g("If result is a typed array, it must have exactly array.length * 3 elements");e.length!==t&&(e.length=t)}for(let i=0;i<o;++i)f.pack(n[i],e,i*3);return e};f.unpackArray=function(n,e){if(c.defined("array",n),c.typeOf.number.greaterThanOrEquals("array.length",n.length,3),n.length%3!==0)throw new g("array length must be a multiple of 3.");let o=n.length;u(e)?e.length=o/3:e=new Array(o/3);for(let t=0;t<o;t+=3){let i=t/3;e[i]=f.unpack(n,t,e[i])}return e};f.fromArray=f.unpack;f.maximumComponent=function(n){return c.typeOf.object("cartesian",n),Math.max(n.x,n.y,n.z)};f.minimumComponent=function(n){return c.typeOf.object("cartesian",n),Math.min(n.x,n.y,n.z)};f.minimumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.min(n.x,e.x),o.y=Math.min(n.y,e.y),o.z=Math.min(n.z,e.z),o};f.maximumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.max(n.x,e.x),o.y=Math.max(n.y,e.y),o.z=Math.max(n.z,e.z),o};f.clamp=function(n,e,o,t){c.typeOf.object("value",n),c.typeOf.object("min",e),c.typeOf.object("max",o),c.typeOf.object("result",t);let i=O.clamp(n.x,e.x,o.x),p=O.clamp(n.y,e.y,o.y),y=O.clamp(n.z,e.z,o.z);return t.x=i,t.y=p,t.z=y,t};f.magnitudeSquared=function(n){return c.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y+n.z*n.z};f.magnitude=function(n){return Math.sqrt(f.magnitudeSquared(n))};var Y=new f;f.distance=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),f.subtract(n,e,Y),f.magnitude(Y)};f.distanceSquared=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),f.subtract(n,e,Y),f.magnitudeSquared(Y)};f.normalize=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=f.magnitude(n);if(e.x=n.x/o,e.y=n.y/o,e.z=n.z/o,isNaN(e.x)||isNaN(e.y)||isNaN(e.z))throw new g("normalized result is not a number");return e};f.dot=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),n.x*e.x+n.y*e.y+n.z*e.z};f.multiplyComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x*e.x,o.y=n.y*e.y,o.z=n.z*e.z,o};f.divideComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x/e.x,o.y=n.y/e.y,o.z=n.z/e.z,o};f.add=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x+e.x,o.y=n.y+e.y,o.z=n.z+e.z,o};f.subtract=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x-e.x,o.y=n.y-e.y,o.z=n.z-e.z,o};f.multiplyByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x*e,o.y=n.y*e,o.z=n.z*e,o};f.divideByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x/e,o.y=n.y/e,o.z=n.z/e,o};f.negate=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=-n.x,e.y=-n.y,e.z=-n.z,e};f.abs=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=Math.abs(n.x),e.y=Math.abs(n.y),e.z=Math.abs(n.z),e};var _n=new f;f.lerp=function(n,e,o,t){return c.typeOf.object("start",n),c.typeOf.object("end",e),c.typeOf.number("t",o),c.typeOf.object("result",t),f.multiplyByScalar(e,o,_n),t=f.multiplyByScalar(n,1-o,t),f.add(_n,t,t)};var X=new f,yn=new f;f.angleBetween=function(n,e){c.typeOf.object("left",n),c.typeOf.object("right",e),f.normalize(n,X),f.normalize(e,yn);let o=f.dot(X,yn),t=f.magnitude(f.cross(X,yn,X));return Math.atan2(t,o)};var Xn=new f;f.mostOrthogonalAxis=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=f.normalize(n,Xn);return f.abs(o,o),o.x<=o.y?o.x<=o.z?e=f.clone(f.UNIT_X,e):e=f.clone(f.UNIT_Z,e):o.y<=o.z?e=f.clone(f.UNIT_Y,e):e=f.clone(f.UNIT_Z,e),e};f.projectVector=function(n,e,o){c.defined("a",n),c.defined("b",e),c.defined("result",o);let t=f.dot(n,e)/f.dot(e,e);return f.multiplyByScalar(e,t,o)};f.equals=function(n,e){return n===e||u(n)&&u(e)&&n.x===e.x&&n.y===e.y&&n.z===e.z};f.equalsArray=function(n,e,o){return n.x===e[o]&&n.y===e[o+1]&&n.z===e[o+2]};f.equalsEpsilon=function(n,e,o,t){return n===e||u(n)&&u(e)&&O.equalsEpsilon(n.x,e.x,o,t)&&O.equalsEpsilon(n.y,e.y,o,t)&&O.equalsEpsilon(n.z,e.z,o,t)};f.cross=function(n,e,o){c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o);let t=n.x,i=n.y,p=n.z,y=e.x,m=e.y,s=e.z,h=i*s-p*m,j=p*y-t*s,S=t*m-i*y;return o.x=h,o.y=j,o.z=S,o};f.midpoint=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=(n.x+e.x)*.5,o.y=(n.y+e.y)*.5,o.z=(n.z+e.z)*.5,o};f.fromDegrees=function(n,e,o,t,i){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),n=O.toRadians(n),e=O.toRadians(e),f.fromRadians(n,e,o,t,i)};var T=new f,$=new f,Yn=new f(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);f.fromRadians=function(n,e,o,t,i){c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),o=b(o,0);let p=u(t)?t.radiiSquared:Yn,y=Math.cos(e);T.x=y*Math.cos(n),T.y=y*Math.sin(n),T.z=Math.sin(e),T=f.normalize(T,T),f.multiplyComponents(p,T,$);let m=Math.sqrt(f.dot(T,$));return $=f.divideByScalar($,m,$),T=f.multiplyByScalar(T,o,T),u(i)||(i=new f),f.add($,T,i)};f.fromDegreesArray=function(n,e,o){if(c.defined("coordinates",n),n.length<2||n.length%2!==0)throw new g("the number of coordinates must be a multiple of 2 and at least 2");let t=n.length;u(o)?o.length=t/2:o=new Array(t/2);for(let i=0;i<t;i+=2){let p=n[i],y=n[i+1],m=i/2;o[m]=f.fromDegrees(p,y,0,e,o[m])}return o};f.fromRadiansArray=function(n,e,o){if(c.defined("coordinates",n),n.length<2||n.length%2!==0)throw new g("the number of coordinates must be a multiple of 2 and at least 2");let t=n.length;u(o)?o.length=t/2:o=new Array(t/2);for(let i=0;i<t;i+=2){let p=n[i],y=n[i+1],m=i/2;o[m]=f.fromRadians(p,y,0,e,o[m])}return o};f.fromDegreesArrayHeights=function(n,e,o){if(c.defined("coordinates",n),n.length<3||n.length%3!==0)throw new g("the number of coordinates must be a multiple of 3 and at least 3");let t=n.length;u(o)?o.length=t/3:o=new Array(t/3);for(let i=0;i<t;i+=3){let p=n[i],y=n[i+1],m=n[i+2],s=i/3;o[s]=f.fromDegrees(p,y,m,e,o[s])}return o};f.fromRadiansArrayHeights=function(n,e,o){if(c.defined("coordinates",n),n.length<3||n.length%3!==0)throw new g("the number of coordinates must be a multiple of 3 and at least 3");let t=n.length;u(o)?o.length=t/3:o=new Array(t/3);for(let i=0;i<t;i+=3){let p=n[i],y=n[i+1],m=n[i+2],s=i/3;o[s]=f.fromRadians(p,y,m,e,o[s])}return o};f.ZERO=Object.freeze(new f(0,0,0));f.ONE=Object.freeze(new f(1,1,1));f.UNIT_X=Object.freeze(new f(1,0,0));f.UNIT_Y=Object.freeze(new f(0,1,0));f.UNIT_Z=Object.freeze(new f(0,0,1));f.prototype.clone=function(n){return f.clone(this,n)};f.prototype.equals=function(n){return f.equals(this,n)};f.prototype.equalsEpsilon=function(n,e,o){return f.equalsEpsilon(this,n,e,o)};f.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};var d=f;var Gn=new d,Hn=new d;function Qn(n,e,o,t,i){if(!u(n))throw new g("cartesian is required.");if(!u(e))throw new g("oneOverRadii is required.");if(!u(o))throw new g("oneOverRadiiSquared is required.");if(!u(t))throw new g("centerToleranceSquared is required.");let p=n.x,y=n.y,m=n.z,s=e.x,h=e.y,j=e.z,S=p*p*s*s,R=y*y*h*h,E=m*m*j*j,N=S+R+E,C=Math.sqrt(1/N),x=d.multiplyByScalar(n,C,Gn);if(N<t)return isFinite(C)?d.clone(x,i):void 0;let U=o.x,I=o.y,P=o.z,k=Hn;k.x=x.x*U*2,k.y=x.y*I*2,k.z=x.z*P*2;let Z=(1-C)*d.magnitude(n)/(.5*d.magnitude(k)),Rn=0,rn,Mn,L,V,W,pn,un,an,En,An,qn;do{Z-=Rn,L=1/(1+Z*U),V=1/(1+Z*I),W=1/(1+Z*P),pn=L*L,un=V*V,an=W*W,En=pn*L,An=un*V,qn=an*W,rn=S*pn+R*un+E*an-1,Mn=S*En*U+R*An*I+E*qn*P;let Zn=-2*Mn;Rn=rn/Zn}while(Math.abs(rn)>O.EPSILON12);return u(i)?(i.x=p*L,i.y=y*V,i.z=m*W,i):new d(p*L,y*V,m*W)}var G=Qn;function M(n,e,o){this.longitude=b(n,0),this.latitude=b(e,0),this.height=b(o,0)}M.fromRadians=function(n,e,o,t){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),o=b(o,0),u(t)?(t.longitude=n,t.latitude=e,t.height=o,t):new M(n,e,o)};M.fromDegrees=function(n,e,o,t){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),n=O.toRadians(n),e=O.toRadians(e),M.fromRadians(n,e,o,t)};var Kn=new d,Jn=new d,ne=new d,ee=new d(1/6378137,1/6378137,1/6356752314245179e-9),oe=new d(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9)),te=O.EPSILON1;M.fromCartesian=function(n,e,o){let t=u(e)?e.oneOverRadii:ee,i=u(e)?e.oneOverRadiiSquared:oe,p=u(e)?e._centerToleranceSquared:te,y=G(n,t,i,p,Jn);if(!u(y))return;let m=d.multiplyComponents(y,i,Kn);m=d.normalize(m,m);let s=d.subtract(n,y,ne),h=Math.atan2(m.y,m.x),j=Math.asin(m.z),S=O.sign(d.dot(s,n))*d.magnitude(s);return u(o)?(o.longitude=h,o.latitude=j,o.height=S,o):new M(h,j,S)};M.toCartesian=function(n,e,o){return c.defined("cartographic",n),d.fromRadians(n.longitude,n.latitude,n.height,e,o)};M.clone=function(n,e){if(u(n))return u(e)?(e.longitude=n.longitude,e.latitude=n.latitude,e.height=n.height,e):new M(n.longitude,n.latitude,n.height)};M.equals=function(n,e){return n===e||u(n)&&u(e)&&n.longitude===e.longitude&&n.latitude===e.latitude&&n.height===e.height};M.equalsEpsilon=function(n,e,o){return o=b(o,0),n===e||u(n)&&u(e)&&Math.abs(n.longitude-e.longitude)<=o&&Math.abs(n.latitude-e.latitude)<=o&&Math.abs(n.height-e.height)<=o};M.ZERO=Object.freeze(new M(0,0,0));M.prototype.clone=function(n){return M.clone(this,n)};M.prototype.equals=function(n){return M.equals(this,n)};M.prototype.equalsEpsilon=function(n,e){return M.equalsEpsilon(this,n,e)};M.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var Cn=M;function a(n,e){this.x=b(n,0),this.y=b(e,0)}a.fromElements=function(n,e,o){return u(o)?(o.x=n,o.y=e,o):new a(n,e)};a.clone=function(n,e){if(u(n))return u(e)?(e.x=n.x,e.y=n.y,e):new a(n.x,n.y)};a.fromCartesian3=a.clone;a.fromCartesian4=a.clone;a.packedLength=2;a.pack=function(n,e,o){return c.typeOf.object("value",n),c.defined("array",e),o=b(o,0),e[o++]=n.x,e[o]=n.y,e};a.unpack=function(n,e,o){return c.defined("array",n),e=b(e,0),u(o)||(o=new a),o.x=n[e++],o.y=n[e],o};a.packArray=function(n,e){c.defined("array",n);let o=n.length,t=o*2;if(!u(e))e=new Array(t);else{if(!Array.isArray(e)&&e.length!==t)throw new g("If result is a typed array, it must have exactly array.length * 2 elements");e.length!==t&&(e.length=t)}for(let i=0;i<o;++i)a.pack(n[i],e,i*2);return e};a.unpackArray=function(n,e){if(c.defined("array",n),c.typeOf.number.greaterThanOrEquals("array.length",n.length,2),n.length%2!==0)throw new g("array length must be a multiple of 2.");let o=n.length;u(e)?e.length=o/2:e=new Array(o/2);for(let t=0;t<o;t+=2){let i=t/2;e[i]=a.unpack(n,t,e[i])}return e};a.fromArray=a.unpack;a.maximumComponent=function(n){return c.typeOf.object("cartesian",n),Math.max(n.x,n.y)};a.minimumComponent=function(n){return c.typeOf.object("cartesian",n),Math.min(n.x,n.y)};a.minimumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.min(n.x,e.x),o.y=Math.min(n.y,e.y),o};a.maximumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.max(n.x,e.x),o.y=Math.max(n.y,e.y),o};a.clamp=function(n,e,o,t){c.typeOf.object("value",n),c.typeOf.object("min",e),c.typeOf.object("max",o),c.typeOf.object("result",t);let i=O.clamp(n.x,e.x,o.x),p=O.clamp(n.y,e.y,o.y);return t.x=i,t.y=p,t};a.magnitudeSquared=function(n){return c.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y};a.magnitude=function(n){return Math.sqrt(a.magnitudeSquared(n))};var H=new a;a.distance=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),a.subtract(n,e,H),a.magnitude(H)};a.distanceSquared=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),a.subtract(n,e,H),a.magnitudeSquared(H)};a.normalize=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=a.magnitude(n);if(e.x=n.x/o,e.y=n.y/o,isNaN(e.x)||isNaN(e.y))throw new g("normalized result is not a number");return e};a.dot=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),n.x*e.x+n.y*e.y};a.cross=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),n.x*e.y-n.y*e.x};a.multiplyComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x*e.x,o.y=n.y*e.y,o};a.divideComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x/e.x,o.y=n.y/e.y,o};a.add=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x+e.x,o.y=n.y+e.y,o};a.subtract=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x-e.x,o.y=n.y-e.y,o};a.multiplyByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x*e,o.y=n.y*e,o};a.divideByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x/e,o.y=n.y/e,o};a.negate=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=-n.x,e.y=-n.y,e};a.abs=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=Math.abs(n.x),e.y=Math.abs(n.y),e};var Tn=new a;a.lerp=function(n,e,o,t){return c.typeOf.object("start",n),c.typeOf.object("end",e),c.typeOf.number("t",o),c.typeOf.object("result",t),a.multiplyByScalar(e,o,Tn),t=a.multiplyByScalar(n,1-o,t),a.add(Tn,t,t)};var ln=new a,Nn=new a;a.angleBetween=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),a.normalize(n,ln),a.normalize(e,Nn),O.acosClamped(a.dot(ln,Nn))};var ce=new a;a.mostOrthogonalAxis=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=a.normalize(n,ce);return a.abs(o,o),o.x<=o.y?e=a.clone(a.UNIT_X,e):e=a.clone(a.UNIT_Y,e),e};a.equals=function(n,e){return n===e||u(n)&&u(e)&&n.x===e.x&&n.y===e.y};a.equalsArray=function(n,e,o){return n.x===e[o]&&n.y===e[o+1]};a.equalsEpsilon=function(n,e,o,t){return n===e||u(n)&&u(e)&&O.equalsEpsilon(n.x,e.x,o,t)&&O.equalsEpsilon(n.y,e.y,o,t)};a.ZERO=Object.freeze(new a(0,0));a.ONE=Object.freeze(new a(1,1));a.UNIT_X=Object.freeze(new a(1,0));a.UNIT_Y=Object.freeze(new a(0,1));a.prototype.clone=function(n){return a.clone(this,n)};a.prototype.equals=function(n){return a.equals(this,n)};a.prototype.equalsEpsilon=function(n,e,o){return a.equalsEpsilon(this,n,e,o)};a.prototype.toString=function(){return`(${this.x}, ${this.y})`};var dn=a;function Fn(n,e,o,t){e=b(e,0),o=b(o,0),t=b(t,0),c.typeOf.number.greaterThanOrEquals("x",e,0),c.typeOf.number.greaterThanOrEquals("y",o,0),c.typeOf.number.greaterThanOrEquals("z",t,0),n._radii=new d(e,o,t),n._radiiSquared=new d(e*e,o*o,t*t),n._radiiToTheFourth=new d(e*e*e*e,o*o*o*o,t*t*t*t),n._oneOverRadii=new d(e===0?0:1/e,o===0?0:1/o,t===0?0:1/t),n._oneOverRadiiSquared=new d(e===0?0:1/(e*e),o===0?0:1/(o*o),t===0?0:1/(t*t)),n._minimumRadius=Math.min(e,o,t),n._maximumRadius=Math.max(e,o,t),n._centerToleranceSquared=O.EPSILON1,n._radiiSquared.z!==0&&(n._squaredXOverSquaredZ=n._radiiSquared.x/n._radiiSquared.z)}function w(n,e,o){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,Fn(this,n,e,o)}Object.defineProperties(w.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}});w.clone=function(n,e){if(!u(n))return;let o=n._radii;return u(e)?(d.clone(o,e._radii),d.clone(n._radiiSquared,e._radiiSquared),d.clone(n._radiiToTheFourth,e._radiiToTheFourth),d.clone(n._oneOverRadii,e._oneOverRadii),d.clone(n._oneOverRadiiSquared,e._oneOverRadiiSquared),e._minimumRadius=n._minimumRadius,e._maximumRadius=n._maximumRadius,e._centerToleranceSquared=n._centerToleranceSquared,e):new w(o.x,o.y,o.z)};w.fromCartesian3=function(n,e){return u(e)||(e=new w),u(n)&&Fn(e,n.x,n.y,n.z),e};w.WGS84=Object.freeze(new w(6378137,6378137,6356752314245179e-9));w.UNIT_SPHERE=Object.freeze(new w(1,1,1));w.MOON=Object.freeze(new w(O.LUNAR_RADIUS,O.LUNAR_RADIUS,O.LUNAR_RADIUS));w.prototype.clone=function(n){return w.clone(this,n)};w.packedLength=d.packedLength;w.pack=function(n,e,o){return c.typeOf.object("value",n),c.defined("array",e),o=b(o,0),d.pack(n._radii,e,o),e};w.unpack=function(n,e,o){c.defined("array",n),e=b(e,0);let t=d.unpack(n,e);return w.fromCartesian3(t,o)};w.prototype.geocentricSurfaceNormal=d.normalize;w.prototype.geodeticSurfaceNormalCartographic=function(n,e){c.typeOf.object("cartographic",n);let o=n.longitude,t=n.latitude,i=Math.cos(t),p=i*Math.cos(o),y=i*Math.sin(o),m=Math.sin(t);return u(e)||(e=new d),e.x=p,e.y=y,e.z=m,d.normalize(e,e)};w.prototype.geodeticSurfaceNormal=function(n,e){if(c.typeOf.object("cartesian",n),isNaN(n.x)||isNaN(n.y)||isNaN(n.z))throw new g("cartesian has a NaN component");if(!d.equalsEpsilon(n,d.ZERO,O.EPSILON14))return u(e)||(e=new d),e=d.multiplyComponents(n,this._oneOverRadiiSquared,e),d.normalize(e,e)};var ie=new d,fe=new d;w.prototype.cartographicToCartesian=function(n,e){let o=ie,t=fe;this.geodeticSurfaceNormalCartographic(n,o),d.multiplyComponents(this._radiiSquared,o,t);let i=Math.sqrt(d.dot(o,t));return d.divideByScalar(t,i,t),d.multiplyByScalar(o,n.height,o),u(e)||(e=new d),d.add(t,o,e)};w.prototype.cartographicArrayToCartesianArray=function(n,e){c.defined("cartographics",n);let o=n.length;u(e)?e.length=o:e=new Array(o);for(let t=0;t<o;t++)e[t]=this.cartographicToCartesian(n[t],e[t]);return e};var re=new d,pe=new d,ue=new d;w.prototype.cartesianToCartographic=function(n,e){let o=this.scaleToGeodeticSurface(n,pe);if(!u(o))return;let t=this.geodeticSurfaceNormal(o,re),i=d.subtract(n,o,ue),p=Math.atan2(t.y,t.x),y=Math.asin(t.z),m=O.sign(d.dot(i,n))*d.magnitude(i);return u(e)?(e.longitude=p,e.latitude=y,e.height=m,e):new Cn(p,y,m)};w.prototype.cartesianArrayToCartographicArray=function(n,e){c.defined("cartesians",n);let o=n.length;u(e)?e.length=o:e=new Array(o);for(let t=0;t<o;++t)e[t]=this.cartesianToCartographic(n[t],e[t]);return e};w.prototype.scaleToGeodeticSurface=function(n,e){return G(n,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,e)};w.prototype.scaleToGeocentricSurface=function(n,e){c.typeOf.object("cartesian",n),u(e)||(e=new d);let o=n.x,t=n.y,i=n.z,p=this._oneOverRadiiSquared,y=1/Math.sqrt(o*o*p.x+t*t*p.y+i*i*p.z);return d.multiplyByScalar(n,y,e)};w.prototype.transformPositionToScaledSpace=function(n,e){return u(e)||(e=new d),d.multiplyComponents(n,this._oneOverRadii,e)};w.prototype.transformPositionFromScaledSpace=function(n,e){return u(e)||(e=new d),d.multiplyComponents(n,this._radii,e)};w.prototype.equals=function(n){return this===n||u(n)&&d.equals(this._radii,n._radii)};w.prototype.toString=function(){return this._radii.toString()};w.prototype.getSurfaceNormalIntersectionWithZAxis=function(n,e,o){if(c.typeOf.object("position",n),!O.equalsEpsilon(this._radii.x,this._radii.y,O.EPSILON15))throw new g("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");c.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),e=b(e,0);let t=this._squaredXOverSquaredZ;if(u(o)||(o=new d),o.x=0,o.y=0,o.z=n.z*(1-t),!(Math.abs(o.z)>=this._radii.z-e))return o};var ae=new d;w.prototype.getLocalCurvature=function(n,e){c.typeOf.object("surfacePosition",n),u(e)||(e=new dn);let o=this.getSurfaceNormalIntersectionWithZAxis(n,0,ae),t=d.distance(n,o),i=this.minimumRadius*t/this.maximumRadius**2,p=t*i**2;return dn.fromElements(1/t,1/p,e)};var ye=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],de=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function xn(n,e,o){c.typeOf.number("a",n),c.typeOf.number("b",e),c.typeOf.func("func",o);let t=.5*(e+n),i=.5*(e-n),p=0;for(let y=0;y<5;y++){let m=i*ye[y];p+=de[y]*(o(t+m)+o(t-m))}return p*=i,p}w.prototype.surfaceArea=function(n){c.typeOf.object("rectangle",n);let e=n.west,o=n.east,t=n.south,i=n.north;for(;o<e;)o+=O.TWO_PI;let p=this._radiiSquared,y=p.x,m=p.y,s=p.z,h=y*m;return xn(t,i,function(j){let S=Math.cos(j),R=Math.sin(j);return Math.cos(j)*xn(e,o,function(E){let N=Math.cos(E),C=Math.sin(E);return Math.sqrt(h*R*R+s*(m*N*N+y*C*C)*S*S)})})};var ao=w;function r(n,e,o,t,i,p,y,m,s){this[0]=b(n,0),this[1]=b(t,0),this[2]=b(y,0),this[3]=b(e,0),this[4]=b(i,0),this[5]=b(m,0),this[6]=b(o,0),this[7]=b(p,0),this[8]=b(s,0)}r.packedLength=9;r.pack=function(n,e,o){return c.typeOf.object("value",n),c.defined("array",e),o=b(o,0),e[o++]=n[0],e[o++]=n[1],e[o++]=n[2],e[o++]=n[3],e[o++]=n[4],e[o++]=n[5],e[o++]=n[6],e[o++]=n[7],e[o++]=n[8],e};r.unpack=function(n,e,o){return c.defined("array",n),e=b(e,0),u(o)||(o=new r),o[0]=n[e++],o[1]=n[e++],o[2]=n[e++],o[3]=n[e++],o[4]=n[e++],o[5]=n[e++],o[6]=n[e++],o[7]=n[e++],o[8]=n[e++],o};r.packArray=function(n,e){c.defined("array",n);let o=n.length,t=o*9;if(!u(e))e=new Array(t);else{if(!Array.isArray(e)&&e.length!==t)throw new g("If result is a typed array, it must have exactly array.length * 9 elements");e.length!==t&&(e.length=t)}for(let i=0;i<o;++i)r.pack(n[i],e,i*9);return e};r.unpackArray=function(n,e){if(c.defined("array",n),c.typeOf.number.greaterThanOrEquals("array.length",n.length,9),n.length%9!==0)throw new g("array length must be a multiple of 9.");let o=n.length;u(e)?e.length=o/9:e=new Array(o/9);for(let t=0;t<o;t+=9){let i=t/9;e[i]=r.unpack(n,t,e[i])}return e};r.clone=function(n,e){if(u(n))return u(e)?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e):new r(n[0],n[3],n[6],n[1],n[4],n[7],n[2],n[5],n[8])};r.fromArray=r.unpack;r.fromColumnMajorArray=function(n,e){return c.defined("values",n),r.clone(n,e)};r.fromRowMajorArray=function(n,e){return c.defined("values",n),u(e)?(e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],e):new r(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8])};r.fromQuaternion=function(n,e){c.typeOf.object("quaternion",n);let o=n.x*n.x,t=n.x*n.y,i=n.x*n.z,p=n.x*n.w,y=n.y*n.y,m=n.y*n.z,s=n.y*n.w,h=n.z*n.z,j=n.z*n.w,S=n.w*n.w,R=o-y-h+S,E=2*(t-j),N=2*(i+s),C=2*(t+j),x=-o+y-h+S,U=2*(m-p),I=2*(i-s),P=2*(m+p),k=-o-y+h+S;return u(e)?(e[0]=R,e[1]=C,e[2]=I,e[3]=E,e[4]=x,e[5]=P,e[6]=N,e[7]=U,e[8]=k,e):new r(R,E,N,C,x,U,I,P,k)};r.fromHeadingPitchRoll=function(n,e){c.typeOf.object("headingPitchRoll",n);let o=Math.cos(-n.pitch),t=Math.cos(-n.heading),i=Math.cos(n.roll),p=Math.sin(-n.pitch),y=Math.sin(-n.heading),m=Math.sin(n.roll),s=o*t,h=-i*y+m*p*t,j=m*y+i*p*t,S=o*y,R=i*t+m*p*y,E=-m*t+i*p*y,N=-p,C=m*o,x=i*o;return u(e)?(e[0]=s,e[1]=S,e[2]=N,e[3]=h,e[4]=R,e[5]=C,e[6]=j,e[7]=E,e[8]=x,e):new r(s,h,j,S,R,E,N,C,x)};r.fromScale=function(n,e){return c.typeOf.object("scale",n),u(e)?(e[0]=n.x,e[1]=0,e[2]=0,e[3]=0,e[4]=n.y,e[5]=0,e[6]=0,e[7]=0,e[8]=n.z,e):new r(n.x,0,0,0,n.y,0,0,0,n.z)};r.fromUniformScale=function(n,e){return c.typeOf.number("scale",n),u(e)?(e[0]=n,e[1]=0,e[2]=0,e[3]=0,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=n,e):new r(n,0,0,0,n,0,0,0,n)};r.fromCrossProduct=function(n,e){return c.typeOf.object("vector",n),u(e)?(e[0]=0,e[1]=n.z,e[2]=-n.y,e[3]=-n.z,e[4]=0,e[5]=n.x,e[6]=n.y,e[7]=-n.x,e[8]=0,e):new r(0,-n.z,n.y,n.z,0,-n.x,-n.y,n.x,0)};r.fromRotationX=function(n,e){c.typeOf.number("angle",n);let o=Math.cos(n),t=Math.sin(n);return u(e)?(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=o,e[5]=t,e[6]=0,e[7]=-t,e[8]=o,e):new r(1,0,0,0,o,-t,0,t,o)};r.fromRotationY=function(n,e){c.typeOf.number("angle",n);let o=Math.cos(n),t=Math.sin(n);return u(e)?(e[0]=o,e[1]=0,e[2]=-t,e[3]=0,e[4]=1,e[5]=0,e[6]=t,e[7]=0,e[8]=o,e):new r(o,0,t,0,1,0,-t,0,o)};r.fromRotationZ=function(n,e){c.typeOf.number("angle",n);let o=Math.cos(n),t=Math.sin(n);return u(e)?(e[0]=o,e[1]=t,e[2]=0,e[3]=-t,e[4]=o,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e):new r(o,-t,0,t,o,0,0,0,1)};r.toArray=function(n,e){return c.typeOf.object("matrix",n),u(e)?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e):[n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8]]};r.getElementIndex=function(n,e){return c.typeOf.number.greaterThanOrEquals("row",e,0),c.typeOf.number.lessThanOrEquals("row",e,2),c.typeOf.number.greaterThanOrEquals("column",n,0),c.typeOf.number.lessThanOrEquals("column",n,2),n*3+e};r.getColumn=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("result",o);let t=e*3,i=n[t],p=n[t+1],y=n[t+2];return o.x=i,o.y=p,o.z=y,o};r.setColumn=function(n,e,o,t){c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("cartesian",o),c.typeOf.object("result",t),t=r.clone(n,t);let i=e*3;return t[i]=o.x,t[i+1]=o.y,t[i+2]=o.z,t};r.getRow=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("result",o);let t=n[e],i=n[e+3],p=n[e+6];return o.x=t,o.y=i,o.z=p,o};r.setRow=function(n,e,o,t){return c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("cartesian",o),c.typeOf.object("result",t),t=r.clone(n,t),t[e]=o.x,t[e+3]=o.y,t[e+6]=o.z,t};var me=new d;r.setScale=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.object("scale",e),c.typeOf.object("result",o);let t=r.getScale(n,me),i=e.x/t.x,p=e.y/t.y,y=e.z/t.z;return o[0]=n[0]*i,o[1]=n[1]*i,o[2]=n[2]*i,o[3]=n[3]*p,o[4]=n[4]*p,o[5]=n[5]*p,o[6]=n[6]*y,o[7]=n[7]*y,o[8]=n[8]*y,o};var se=new d;r.setUniformScale=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.number("scale",e),c.typeOf.object("result",o);let t=r.getScale(n,se),i=e/t.x,p=e/t.y,y=e/t.z;return o[0]=n[0]*i,o[1]=n[1]*i,o[2]=n[2]*i,o[3]=n[3]*p,o[4]=n[4]*p,o[5]=n[5]*p,o[6]=n[6]*y,o[7]=n[7]*y,o[8]=n[8]*y,o};var mn=new d;r.getScale=function(n,e){return c.typeOf.object("matrix",n),c.typeOf.object("result",e),e.x=d.magnitude(d.fromElements(n[0],n[1],n[2],mn)),e.y=d.magnitude(d.fromElements(n[3],n[4],n[5],mn)),e.z=d.magnitude(d.fromElements(n[6],n[7],n[8],mn)),e};var kn=new d;r.getMaximumScale=function(n){return r.getScale(n,kn),d.maximumComponent(kn)};var be=new d;r.setRotation=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.object("result",o);let t=r.getScale(n,be);return o[0]=e[0]*t.x,o[1]=e[1]*t.x,o[2]=e[2]*t.x,o[3]=e[3]*t.y,o[4]=e[4]*t.y,o[5]=e[5]*t.y,o[6]=e[6]*t.z,o[7]=e[7]*t.z,o[8]=e[8]*t.z,o};var he=new d;r.getRotation=function(n,e){c.typeOf.object("matrix",n),c.typeOf.object("result",e);let o=r.getScale(n,he);return e[0]=n[0]/o.x,e[1]=n[1]/o.x,e[2]=n[2]/o.x,e[3]=n[3]/o.y,e[4]=n[4]/o.y,e[5]=n[5]/o.y,e[6]=n[6]/o.z,e[7]=n[7]/o.z,e[8]=n[8]/o.z,e};r.multiply=function(n,e,o){c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o);let t=n[0]*e[0]+n[3]*e[1]+n[6]*e[2],i=n[1]*e[0]+n[4]*e[1]+n[7]*e[2],p=n[2]*e[0]+n[5]*e[1]+n[8]*e[2],y=n[0]*e[3]+n[3]*e[4]+n[6]*e[5],m=n[1]*e[3]+n[4]*e[4]+n[7]*e[5],s=n[2]*e[3]+n[5]*e[4]+n[8]*e[5],h=n[0]*e[6]+n[3]*e[7]+n[6]*e[8],j=n[1]*e[6]+n[4]*e[7]+n[7]*e[8],S=n[2]*e[6]+n[5]*e[7]+n[8]*e[8];return o[0]=t,o[1]=i,o[2]=p,o[3]=y,o[4]=m,o[5]=s,o[6]=h,o[7]=j,o[8]=S,o};r.add=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o[0]=n[0]+e[0],o[1]=n[1]+e[1],o[2]=n[2]+e[2],o[3]=n[3]+e[3],o[4]=n[4]+e[4],o[5]=n[5]+e[5],o[6]=n[6]+e[6],o[7]=n[7]+e[7],o[8]=n[8]+e[8],o};r.subtract=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],o[3]=n[3]-e[3],o[4]=n[4]-e[4],o[5]=n[5]-e[5],o[6]=n[6]-e[6],o[7]=n[7]-e[7],o[8]=n[8]-e[8],o};r.multiplyByVector=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.object("cartesian",e),c.typeOf.object("result",o);let t=e.x,i=e.y,p=e.z,y=n[0]*t+n[3]*i+n[6]*p,m=n[1]*t+n[4]*i+n[7]*p,s=n[2]*t+n[5]*i+n[8]*p;return o.x=y,o.y=m,o.z=s,o};r.multiplyByScalar=function(n,e,o){return c.typeOf.object("matrix",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o[0]=n[0]*e,o[1]=n[1]*e,o[2]=n[2]*e,o[3]=n[3]*e,o[4]=n[4]*e,o[5]=n[5]*e,o[6]=n[6]*e,o[7]=n[7]*e,o[8]=n[8]*e,o};r.multiplyByScale=function(n,e,o){return c.typeOf.object("matrix",n),c.typeOf.object("scale",e),c.typeOf.object("result",o),o[0]=n[0]*e.x,o[1]=n[1]*e.x,o[2]=n[2]*e.x,o[3]=n[3]*e.y,o[4]=n[4]*e.y,o[5]=n[5]*e.y,o[6]=n[6]*e.z,o[7]=n[7]*e.z,o[8]=n[8]*e.z,o};r.multiplyByUniformScale=function(n,e,o){return c.typeOf.object("matrix",n),c.typeOf.number("scale",e),c.typeOf.object("result",o),o[0]=n[0]*e,o[1]=n[1]*e,o[2]=n[2]*e,o[3]=n[3]*e,o[4]=n[4]*e,o[5]=n[5]*e,o[6]=n[6]*e,o[7]=n[7]*e,o[8]=n[8]*e,o};r.negate=function(n,e){return c.typeOf.object("matrix",n),c.typeOf.object("result",e),e[0]=-n[0],e[1]=-n[1],e[2]=-n[2],e[3]=-n[3],e[4]=-n[4],e[5]=-n[5],e[6]=-n[6],e[7]=-n[7],e[8]=-n[8],e};r.transpose=function(n,e){c.typeOf.object("matrix",n),c.typeOf.object("result",e);let o=n[0],t=n[3],i=n[6],p=n[1],y=n[4],m=n[7],s=n[2],h=n[5],j=n[8];return e[0]=o,e[1]=t,e[2]=i,e[3]=p,e[4]=y,e[5]=m,e[6]=s,e[7]=h,e[8]=j,e};function Oe(n){let e=0;for(let o=0;o<9;++o){let t=n[o];e+=t*t}return Math.sqrt(e)}var sn=[1,0,0],bn=[2,2,1];function we(n){let e=0;for(let o=0;o<3;++o){let t=n[r.getElementIndex(bn[o],sn[o])];e+=2*t*t}return Math.sqrt(e)}function je(n,e){let o=O.EPSILON15,t=0,i=1;for(let h=0;h<3;++h){let j=Math.abs(n[r.getElementIndex(bn[h],sn[h])]);j>t&&(i=h,t=j)}let p=1,y=0,m=sn[i],s=bn[i];if(Math.abs(n[r.getElementIndex(s,m)])>o){let h=n[r.getElementIndex(s,s)],j=n[r.getElementIndex(m,m)],S=n[r.getElementIndex(s,m)],R=(h-j)/2/S,E;R<0?E=-1/(-R+Math.sqrt(1+R*R)):E=1/(R+Math.sqrt(1+R*R)),p=1/Math.sqrt(1+E*E),y=E*p}return e=r.clone(r.IDENTITY,e),e[r.getElementIndex(m,m)]=e[r.getElementIndex(s,s)]=p,e[r.getElementIndex(s,m)]=y,e[r.getElementIndex(m,s)]=-y,e}var Q=new r,Bn=new r;r.computeEigenDecomposition=function(n,e){c.typeOf.object("matrix",n);let o=O.EPSILON20,t=10,i=0,p=0;u(e)||(e={});let y=e.unitary=r.clone(r.IDENTITY,e.unitary),m=e.diagonal=r.clone(n,e.diagonal),s=o*Oe(m);for(;p<t&&we(m)>s;)je(m,Q),r.transpose(Q,Bn),r.multiply(m,Q,m),r.multiply(Bn,m,m),r.multiply(y,Q,y),++i>2&&(++p,i=0);return e};r.abs=function(n,e){return c.typeOf.object("matrix",n),c.typeOf.object("result",e),e[0]=Math.abs(n[0]),e[1]=Math.abs(n[1]),e[2]=Math.abs(n[2]),e[3]=Math.abs(n[3]),e[4]=Math.abs(n[4]),e[5]=Math.abs(n[5]),e[6]=Math.abs(n[6]),e[7]=Math.abs(n[7]),e[8]=Math.abs(n[8]),e};r.determinant=function(n){c.typeOf.object("matrix",n);let e=n[0],o=n[3],t=n[6],i=n[1],p=n[4],y=n[7],m=n[2],s=n[5],h=n[8];return e*(p*h-s*y)+i*(s*t-o*h)+m*(o*y-p*t)};r.inverse=function(n,e){c.typeOf.object("matrix",n),c.typeOf.object("result",e);let o=n[0],t=n[1],i=n[2],p=n[3],y=n[4],m=n[5],s=n[6],h=n[7],j=n[8],S=r.determinant(n);if(Math.abs(S)<=O.EPSILON15)throw new g("matrix is not invertible");e[0]=y*j-h*m,e[1]=h*i-t*j,e[2]=t*m-y*i,e[3]=s*m-p*j,e[4]=o*j-s*i,e[5]=p*i-o*m,e[6]=p*h-s*y,e[7]=s*t-o*h,e[8]=o*y-p*t;let R=1/S;return r.multiplyByScalar(e,R,e)};var ge=new r;r.inverseTranspose=function(n,e){return c.typeOf.object("matrix",n),c.typeOf.object("result",e),r.inverse(r.transpose(n,ge),e)};r.equals=function(n,e){return n===e||u(n)&&u(e)&&n[0]===e[0]&&n[1]===e[1]&&n[2]===e[2]&&n[3]===e[3]&&n[4]===e[4]&&n[5]===e[5]&&n[6]===e[6]&&n[7]===e[7]&&n[8]===e[8]};r.equalsEpsilon=function(n,e,o){return o=b(o,0),n===e||u(n)&&u(e)&&Math.abs(n[0]-e[0])<=o&&Math.abs(n[1]-e[1])<=o&&Math.abs(n[2]-e[2])<=o&&Math.abs(n[3]-e[3])<=o&&Math.abs(n[4]-e[4])<=o&&Math.abs(n[5]-e[5])<=o&&Math.abs(n[6]-e[6])<=o&&Math.abs(n[7]-e[7])<=o&&Math.abs(n[8]-e[8])<=o};r.IDENTITY=Object.freeze(new r(1,0,0,0,1,0,0,0,1));r.ZERO=Object.freeze(new r(0,0,0,0,0,0,0,0,0));r.COLUMN0ROW0=0;r.COLUMN0ROW1=1;r.COLUMN0ROW2=2;r.COLUMN1ROW0=3;r.COLUMN1ROW1=4;r.COLUMN1ROW2=5;r.COLUMN2ROW0=6;r.COLUMN2ROW1=7;r.COLUMN2ROW2=8;Object.defineProperties(r.prototype,{length:{get:function(){return r.packedLength}}});r.prototype.clone=function(n){return r.clone(this,n)};r.prototype.equals=function(n){return r.equals(this,n)};r.equalsArray=function(n,e,o){return n[0]===e[o]&&n[1]===e[o+1]&&n[2]===e[o+2]&&n[3]===e[o+3]&&n[4]===e[o+4]&&n[5]===e[o+5]&&n[6]===e[o+6]&&n[7]===e[o+7]&&n[8]===e[o+8]};r.prototype.equalsEpsilon=function(n,e){return r.equalsEpsilon(this,n,e)};r.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})
|
|
27
|
+
(${this[1]}, ${this[4]}, ${this[7]})
|
|
28
|
+
(${this[2]}, ${this[5]}, ${this[8]})`};var jo=r;var F,z={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},_={};Object.defineProperties(_,{element:{get:function(){if(_.supportsFullscreen())return document[z.fullscreenElement]}},changeEventName:{get:function(){if(_.supportsFullscreen())return z.fullscreenchange}},errorEventName:{get:function(){if(_.supportsFullscreen())return z.fullscreenerror}},enabled:{get:function(){if(_.supportsFullscreen())return document[z.fullscreenEnabled]}},fullscreen:{get:function(){if(_.supportsFullscreen())return _.element!==null}}});_.supportsFullscreen=function(){if(u(F))return F;F=!1;let n=document.body;if(typeof n.requestFullscreen=="function")return z.requestFullscreen="requestFullscreen",z.exitFullscreen="exitFullscreen",z.fullscreenEnabled="fullscreenEnabled",z.fullscreenElement="fullscreenElement",z.fullscreenchange="fullscreenchange",z.fullscreenerror="fullscreenerror",F=!0,F;let e=["webkit","moz","o","ms","khtml"],o;for(let t=0,i=e.length;t<i;++t){let p=e[t];o=`${p}RequestFullscreen`,typeof n[o]=="function"?(z.requestFullscreen=o,F=!0):(o=`${p}RequestFullScreen`,typeof n[o]=="function"&&(z.requestFullscreen=o,F=!0)),o=`${p}ExitFullscreen`,typeof document[o]=="function"?z.exitFullscreen=o:(o=`${p}CancelFullScreen`,typeof document[o]=="function"&&(z.exitFullscreen=o)),o=`${p}FullscreenEnabled`,document[o]!==void 0?z.fullscreenEnabled=o:(o=`${p}FullScreenEnabled`,document[o]!==void 0&&(z.fullscreenEnabled=o)),o=`${p}FullscreenElement`,document[o]!==void 0?z.fullscreenElement=o:(o=`${p}FullScreenElement`,document[o]!==void 0&&(z.fullscreenElement=o)),o=`${p}fullscreenchange`,document[`on${o}`]!==void 0&&(p==="ms"&&(o="MSFullscreenChange"),z.fullscreenchange=o),o=`${p}fullscreenerror`,document[`on${o}`]!==void 0&&(p==="ms"&&(o="MSFullscreenError"),z.fullscreenerror=o)}return F};_.requestFullscreen=function(n,e){_.supportsFullscreen()&&n[z.requestFullscreen]({vrDisplay:e})};_.exitFullscreen=function(){_.supportsFullscreen()&&document[z.exitFullscreen]()};_._names=z;var Un=_;var q;typeof navigator<"u"?q=navigator:q={};function B(n){let e=n.split(".");for(let o=0,t=e.length;o<t;++o)e[o]=parseInt(e[o],10);return e}var K,In;function Sn(){if(!u(K)&&(K=!1,!cn())){let n=/ Chrome\/([\.0-9]+)/.exec(q.userAgent);n!==null&&(K=!0,In=B(n[1]))}return K}function Se(){return Sn()&&In}var J,Pn;function Ln(){if(!u(J)&&(J=!1,!Sn()&&!cn()&&/ Safari\/[\.0-9]+/.test(q.userAgent))){let n=/ Version\/([\.0-9]+)/.exec(q.userAgent);n!==null&&(J=!0,Pn=B(n[1]))}return J}function ze(){return Ln()&&Pn}var nn,jn;function Vn(){if(!u(nn)){nn=!1;let n=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(q.userAgent);n!==null&&(nn=!0,jn=B(n[1]),jn.isNightly=!!n[2])}return nn}function Re(){return Vn()&&jn}var v,gn;function Wn(){if(!u(v)){v=!1;let n;q.appName==="Microsoft Internet Explorer"?(n=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(q.userAgent),n!==null&&(v=!0,gn=B(n[1]))):q.appName==="Netscape"&&(n=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(q.userAgent),n!==null&&(v=!0,gn=B(n[1])))}return v}function Me(){return Wn()&&gn}var en,$n;function cn(){if(!u(en)){en=!1;let n=/ Edg\/([\.0-9]+)/.exec(q.userAgent);n!==null&&(en=!0,$n=B(n[1]))}return en}function Ee(){return cn()&&$n}var on,zn;function fn(){if(!u(on)){on=!1;let n=/Firefox\/([\.0-9]+)/.exec(q.userAgent);n!==null&&(on=!0,zn=B(n[1]))}return on}var hn;function Ae(){return u(hn)||(hn=/Windows/i.test(q.appVersion)),hn}var On;function qe(){return u(On)||(On=navigator.platform==="iPhone"||navigator.platform==="iPod"||navigator.platform==="iPad"),On}function _e(){return fn()&&zn}var wn;function Ce(){return u(wn)||(wn=!fn()&&typeof PointerEvent<"u"&&(!u(q.pointerEnabled)||q.pointerEnabled)),wn}var Dn,tn;function vn(){if(!u(tn)){let n=document.createElement("canvas");n.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");let e=n.style.imageRendering;tn=u(e)&&e!=="",tn&&(Dn=e)}return tn}function Te(){return vn()?Dn:void 0}function A(){if(!A.initialized)throw new g("You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP");return A._result}A._promise=void 0;A._result=void 0;A.initialize=function(){return u(A._promise)||(A._promise=new Promise(n=>{let e=new Image;e.onload=function(){A._result=e.width>0&&e.height>0,n(A._result)},e.onerror=function(){A._result=!1,n(A._result)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),A._promise};Object.defineProperties(A,{initialized:{get:function(){return u(A._result)}}});var D=[];typeof ArrayBuffer<"u"&&(D.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&D.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&D.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&D.push(BigInt64Array),typeof BigUint64Array<"u"&&D.push(BigUint64Array));var l={isChrome:Sn,chromeVersion:Se,isSafari:Ln,safariVersion:ze,isWebkit:Vn,webkitVersion:Re,isInternetExplorer:Wn,internetExplorerVersion:Me,isEdge:cn,edgeVersion:Ee,isFirefox:fn,firefoxVersion:_e,isWindows:Ae,isIPadOrIOS:qe,hardwareConcurrency:b(q.hardwareConcurrency,3),supportsPointerEvents:Ce,supportsImageRenderingPixelated:vn,supportsWebP:A,imageRenderingValue:Te,typedArrayTypes:D};l.supportsBasis=function(n){return l.supportsWebAssembly()&&n.context.supportsBasis};l.supportsFullscreen=function(){return Un.supportsFullscreen()};l.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};l.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};l.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};l.supportsBigInt=function(){return typeof BigInt<"u"};l.supportsWebWorkers=function(){return typeof Worker<"u"};l.supportsWebAssembly=function(){return typeof WebAssembly<"u"};l.supportsWebgl2=function(n){return c.defined("scene",n),n.context.webgl2};l.supportsEsmWebWorkers=function(){return!fn()||parseInt(zn)>=114};var _o=l;export{d as a,Cn as b,dn as c,ao as d,jo as e,_o as f};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.118
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{b as t}from"./chunk-
|
|
26
|
+
import{b as t}from"./chunk-TVO2A75R.js";import{a as r}from"./chunk-4YLYA3DC.js";import{a as m}from"./chunk-6RGNWVZ2.js";import{e as i}from"./chunk-IALXUAD4.js";function d(e){if(e=r(e,r.EMPTY_OBJECT),!i(e.geometry))throw new m("options.geometry is required.");this.geometry=e.geometry,this.modelMatrix=t.clone(r(e.modelMatrix,t.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=r(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}var s=d;export{s as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.118
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a}from"./chunk-
|
|
26
|
+
import{a}from"./chunk-3T4KR75X.js";import{a as N}from"./chunk-I44IOOT4.js";import{a as t}from"./chunk-6RGNWVZ2.js";import{e as i}from"./chunk-IALXUAD4.js";var r={UNSIGNED_BYTE:N.UNSIGNED_BYTE,UNSIGNED_SHORT:N.UNSIGNED_SHORT,UNSIGNED_INT:N.UNSIGNED_INT};r.getSizeInBytes=function(e){switch(e){case r.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new t("indexDatatype is required and must be a valid IndexDatatype constant.")};r.fromSizeInBytes=function(e){switch(e){case 2:return r.UNSIGNED_SHORT;case 4:return r.UNSIGNED_INT;case 1:return r.UNSIGNED_BYTE;default:throw new t("Size in bytes cannot be mapped to an IndexDatatype")}};r.validate=function(e){return i(e)&&(e===r.UNSIGNED_BYTE||e===r.UNSIGNED_SHORT||e===r.UNSIGNED_INT)};r.createTypedArray=function(e,n){if(!i(e))throw new t("numberOfVertices is required.");return e>=a.SIXTY_FOUR_KILOBYTES?new Uint32Array(n):new Uint16Array(n)};r.createTypedArrayFromArrayBuffer=function(e,n,E,o){if(!i(e))throw new t("numberOfVertices is required.");if(!i(n))throw new t("sourceArray is required.");if(!i(E))throw new t("byteOffset is required.");return e>=a.SIXTY_FOUR_KILOBYTES?new Uint32Array(n,E,o):new Uint16Array(n,E,o)};r.fromTypedArray=function(e){if(e instanceof Uint8Array)return r.UNSIGNED_BYTE;if(e instanceof Uint16Array)return r.UNSIGNED_SHORT;if(e instanceof Uint32Array)return r.UNSIGNED_INT;throw new t("array must be a Uint8Array, Uint16Array, or Uint32Array.")};var u=Object.freeze(r);export{u as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.118
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a as $}from"./chunk-
|
|
26
|
+
import{a as $}from"./chunk-MCE3KFYN.js";import{a as b}from"./chunk-KGSZTFHZ.js";import{a as U}from"./chunk-5ENAGXBI.js";import{a as E}from"./chunk-Z7B2VEL5.js";import{c as z,d as L}from"./chunk-PWPX3224.js";import{a as D,d as y}from"./chunk-46KFVW24.js";import{b as G}from"./chunk-TVO2A75R.js";import{a as k}from"./chunk-KKKPU2CI.js";import{d as B}from"./chunk-4EI6PP43.js";import{a as v}from"./chunk-4YLYA3DC.js";import{a as F,b as I}from"./chunk-6RGNWVZ2.js";import{e as a}from"./chunk-IALXUAD4.js";function w(e,n,t){e=v(e,0),n=v(n,0),t=v(t,0),this.value=new Float32Array([e,n,t])}Object.defineProperties(w.prototype,{componentDatatype:{get:function(){return k.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}});w.fromCartesian3=function(e){return I.defined("offset",e),new w(e.x,e.y,e.z)};w.toValue=function(e,n){return I.defined("offset",e),a(n)||(n=new Float32Array([e.x,e.y,e.z])),n[0]=e.x,n[1]=e.y,n[2]=e.z,n};var j=w;function K(e,n,t){let i=!t,r=e.length,c;if(!i&&r>1){let o=e[0].modelMatrix;for(c=1;c<r;++c)if(!G.equals(o,e[c].modelMatrix)){i=!0;break}}if(i)for(c=0;c<r;++c)a(e[c].geometry)&&b.transformToWorldCoordinates(e[c]);else G.multiplyTransformation(n,e[0].modelMatrix,n)}function P(e,n){let t=e.attributes,i=t.position,r=i.values.length/i.componentsPerAttribute;t.batchId=new L({componentDatatype:k.FLOAT,componentsPerAttribute:1,values:new Float32Array(r)});let c=t.batchId.values;for(let o=0;o<r;++o)c[o]=n}function N(e){let n=e.length;for(let t=0;t<n;++t){let i=e[t];a(i.geometry)?P(i.geometry,t):a(i.westHemisphereGeometry)&&a(i.eastHemisphereGeometry)&&(P(i.westHemisphereGeometry,t),P(i.eastHemisphereGeometry,t))}}function Q(e){let n=e.instances,t=e.projection,i=e.elementIndexUintSupported,r=e.scene3DOnly,c=e.vertexCacheOptimize,o=e.compressVertices,g=e.modelMatrix,s,u,m,p=n.length;for(s=0;s<p;++s)if(a(n[s].geometry)){m=n[s].geometry.primitiveType;break}for(s=1;s<p;++s)if(a(n[s].geometry)&&n[s].geometry.primitiveType!==m)throw new F("All instance geometries must have the same primitiveType.");if(K(n,g,r),!r)for(s=0;s<p;++s)a(n[s].geometry)&&b.splitLongitude(n[s]);if(N(n),c)for(s=0;s<p;++s){let f=n[s];a(f.geometry)?(b.reorderForPostVertexCache(f.geometry),b.reorderForPreVertexCache(f.geometry)):a(f.westHemisphereGeometry)&&a(f.eastHemisphereGeometry)&&(b.reorderForPostVertexCache(f.westHemisphereGeometry),b.reorderForPreVertexCache(f.westHemisphereGeometry),b.reorderForPostVertexCache(f.eastHemisphereGeometry),b.reorderForPreVertexCache(f.eastHemisphereGeometry))}let l=b.combineInstances(n);for(p=l.length,s=0;s<p;++s){u=l[s];let f=u.attributes;if(r)for(let d in f)f.hasOwnProperty(d)&&f[d].componentDatatype===k.DOUBLE&&b.encodeAttribute(u,d,`${d}3DHigh`,`${d}3DLow`);else for(let d in f)if(f.hasOwnProperty(d)&&f[d].componentDatatype===k.DOUBLE){let h=`${d}3D`,x=`${d}2D`;b.projectTo2D(u,d,h,x,t),a(u.boundingSphere)&&d==="position"&&(u.boundingSphereCV=y.fromVertices(u.attributes.position2D.values)),b.encodeAttribute(u,h,`${h}High`,`${h}Low`),b.encodeAttribute(u,x,`${x}High`,`${x}Low`)}o&&b.compressVertices(u)}if(!i){let f=[];for(p=l.length,s=0;s<p;++s)u=l[s],f=f.concat(b.fitToUnsignedShortIndices(u));l=f}return l}function T(e,n,t,i){let r,c,o,g=i.length-1;if(g>=0){let u=i[g];r=u.offset+u.count,o=u.index,c=t[o].indices.length}else r=0,o=0,c=t[o].indices.length;let s=e.length;for(let u=0;u<s;++u){let p=e[u][n];if(!a(p))continue;let l=p.indices.length;r+l>c&&(r=0,c=t[++o].indices.length),i.push({index:o,offset:r,count:l}),r+=l}}function X(e,n){let t=[];return T(e,"geometry",n,t),T(e,"westHemisphereGeometry",n,t),T(e,"eastHemisphereGeometry",n,t),t}var S={};S.combineGeometry=function(e){let n,t,i=e.instances,r=i.length,c,o,g=!1;r>0&&(n=Q(e),n.length>0&&(t=b.createAttributeLocations(n[0]),e.createPickOffsets&&(c=X(i,n))),a(i[0].attributes)&&a(i[0].attributes.offset)&&(o=new Array(r),g=!0));let s=new Array(r),u=new Array(r);for(let m=0;m<r;++m){let p=i[m],l=p.geometry;a(l)&&(s[m]=l.boundingSphere,u[m]=l.boundingSphereCV,g&&(o[m]=p.geometry.offsetAttribute));let f=p.eastHemisphereGeometry,d=p.westHemisphereGeometry;a(f)&&a(d)&&(a(f.boundingSphere)&&a(d.boundingSphere)&&(s[m]=y.union(f.boundingSphere,d.boundingSphere)),a(f.boundingSphereCV)&&a(d.boundingSphereCV)&&(u[m]=y.union(f.boundingSphereCV,d.boundingSphereCV)))}return{geometries:n,modelMatrix:e.modelMatrix,attributeLocations:t,pickOffsets:c,offsetInstanceExtend:o,boundingSpheres:s,boundingSpheresCV:u}};function Y(e,n){let t=e.attributes;for(let i in t)if(t.hasOwnProperty(i)){let r=t[i];a(r)&&a(r.values)&&n.push(r.values.buffer)}a(e.indices)&&n.push(e.indices.buffer)}function Z(e,n){let t=e.length;for(let i=0;i<t;++i)Y(e[i],n)}function _(e){let n=1,t=e.length;for(let i=0;i<t;i++){let r=e[i];if(++n,!a(r))continue;let c=r.attributes;n+=7+2*y.packedLength+(a(r.indices)?r.indices.length:0);for(let o in c)if(c.hasOwnProperty(o)&&a(c[o])){let g=c[o];n+=5+g.values.length}}return n}S.packCreateGeometryResults=function(e,n){let t=new Float64Array(_(e)),i=[],r={},c=e.length,o=0;t[o++]=c;for(let g=0;g<c;g++){let s=e[g],u=a(s);if(t[o++]=u?1:0,!u)continue;t[o++]=s.primitiveType,t[o++]=s.geometryType,t[o++]=v(s.offsetAttribute,-1);let m=a(s.boundingSphere)?1:0;t[o++]=m,m&&y.pack(s.boundingSphere,t,o),o+=y.packedLength;let p=a(s.boundingSphereCV)?1:0;t[o++]=p,p&&y.pack(s.boundingSphereCV,t,o),o+=y.packedLength;let l=s.attributes,f=[];for(let h in l)l.hasOwnProperty(h)&&a(l[h])&&(f.push(h),a(r[h])||(r[h]=i.length,i.push(h)));t[o++]=f.length;for(let h=0;h<f.length;h++){let x=f[h],C=l[x];t[o++]=r[x],t[o++]=C.componentDatatype,t[o++]=C.componentsPerAttribute,t[o++]=C.normalize?1:0,t[o++]=C.values.length,t.set(C.values,o),o+=C.values.length}let d=a(s.indices)?s.indices.length:0;t[o++]=d,d>0&&(t.set(s.indices,o),o+=d)}return n.push(t.buffer),{stringTable:i,packedData:t}};S.unpackCreateGeometryResults=function(e){let n=e.stringTable,t=e.packedData,i,r=new Array(t[0]),c=0,o=1;for(;o<t.length;){if(!(t[o++]===1)){r[c++]=void 0;continue}let s=t[o++],u=t[o++],m=t[o++];m===-1&&(m=void 0);let p,l;t[o++]===1&&(p=y.unpack(t,o)),o+=y.packedLength,t[o++]===1&&(l=y.unpack(t,o)),o+=y.packedLength;let h,x,C,H=new E,q=t[o++];for(i=0;i<q;i++){let A=n[t[o++]],M=t[o++];C=t[o++];let J=t[o++]!==0;h=t[o++],x=k.createTypedArray(M,h);for(let O=0;O<h;O++)x[O]=t[o++];H[A]=new L({componentDatatype:M,componentsPerAttribute:C,normalize:J,values:x})}let V;if(h=t[o++],h>0){let A=x.length/C;for(V=U.createTypedArray(A,h),i=0;i<h;i++)V[i]=t[o++]}r[c++]=new z({primitiveType:s,geometryType:u,boundingSphere:p,boundingSphereCV:l,indices:V,attributes:H,offsetAttribute:m})}return r};function ee(e,n){let t=e.length,i=new Float64Array(1+t*19),r=0;i[r++]=t;for(let c=0;c<t;c++){let o=e[c];if(G.pack(o.modelMatrix,i,r),r+=G.packedLength,a(o.attributes)&&a(o.attributes.offset)){let g=o.attributes.offset.value;i[r]=g[0],i[r+1]=g[1],i[r+2]=g[2]}r+=3}return n.push(i.buffer),i}function te(e){let n=e,t=new Array(n[0]),i=0,r=1;for(;r<n.length;){let c=G.unpack(n,r),o;r+=G.packedLength,a(n[r])&&(o={offset:new j(n[r],n[r+1],n[r+2])}),r+=3,t[i++]={modelMatrix:c,attributes:o}}return t}S.packCombineGeometryParameters=function(e,n){let t=e.createGeometryResults,i=t.length;for(let r=0;r<i;r++)n.push(t[r].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:ee(e.instances,n),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof D,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}};S.unpackCombineGeometryParameters=function(e){let n=te(e.packedInstances),t=e.createGeometryResults,i=t.length,r=0;for(let g=0;g<i;g++){let s=S.unpackCreateGeometryResults(t[g]),u=s.length;for(let m=0;m<u;m++){let p=s[m],l=n[r];l.geometry=p,++r}}let c=B.clone(e.ellipsoid),o=e.isGeographic?new D(c):new $(c);return{instances:n,ellipsoid:c,projection:o,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:G.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}};function R(e){let n=e.length,t=1+(y.packedLength+1)*n,i=new Float32Array(t),r=0;i[r++]=n;for(let c=0;c<n;++c){let o=e[c];a(o)?(i[r++]=1,y.pack(e[c],i,r)):i[r++]=0,r+=y.packedLength}return i}function W(e){let n=new Array(e[0]),t=0,i=1;for(;i<e.length;)e[i++]===1&&(n[t]=y.unpack(e,i)),++t,i+=y.packedLength;return n}S.packCombineGeometryResults=function(e,n){a(e.geometries)&&Z(e.geometries,n);let t=R(e.boundingSpheres),i=R(e.boundingSpheresCV);return n.push(t.buffer,i.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:t,boundingSpheresCV:i}};S.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:W(e.boundingSpheres),boundingSpheresCV:W(e.boundingSpheresCV)}};var Ge=S;export{Ge as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.118
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a as y}from"./chunk-C6DMEJQ7.js";import{d as j}from"./chunk-DXEZYE3K.js";import{b as d,c as L}from"./chunk-DGCK3LD2.js";import{a as R}from"./chunk-B2SKQ7LU.js";import{a as s,b as W,c as T,d as q}from"./chunk-CUOR5F7T.js";import{a as w}from"./chunk-74N6MC2V.js";import{a as P}from"./chunk-NPBZI5YA.js";import{a as A,b as z}from"./chunk-7X2YQ6I4.js";import{e as l}from"./chunk-R2AN7EKC.js";function x(o,t){z.typeOf.object("ellipsoid",o),this._ellipsoid=o,this._cameraPosition=new s,this._cameraPositionInScaledSpace=new s,this._distanceToLimbInScaledSpaceSquared=0,l(t)&&(this.cameraPosition=t)}Object.defineProperties(x.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(o){let e=this._ellipsoid.transformPositionToScaledSpace(o,this._cameraPositionInScaledSpace),a=s.magnitudeSquared(e)-1;s.clone(o,this._cameraPosition),this._cameraPositionInScaledSpace=e,this._distanceToLimbInScaledSpaceSquared=a}}});var U=new s;x.prototype.isPointVisible=function(o){let e=this._ellipsoid.transformPositionToScaledSpace(o,U);return F(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};x.prototype.isScaledSpacePointVisible=function(o){return F(o,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var at=new s;x.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(o,t){let e=this._ellipsoid,a,i;return l(t)&&t<0&&e.minimumRadius>-t?(i=at,i.x=this._cameraPosition.x/(e.radii.x+t),i.y=this._cameraPosition.y/(e.radii.y+t),i.z=this._cameraPosition.z/(e.radii.z+t),a=i.x*i.x+i.y*i.y+i.z*i.z-1):(i=this._cameraPositionInScaledSpace,a=this._distanceToLimbInScaledSpaceSquared),F(o,i,a)};x.prototype.computeHorizonCullingPoint=function(o,t,e){return Q(this._ellipsoid,o,t,e)};var v=q.clone(q.UNIT_SPHERE);x.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(o,t,e,a){let i=Z(this._ellipsoid,e,v);return Q(i,o,t,a)};x.prototype.computeHorizonCullingPointFromVertices=function(o,t,e,a,i){return J(this._ellipsoid,o,t,e,a,i)};x.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(o,t,e,a,i,c){let n=Z(this._ellipsoid,i,v);return J(n,o,t,e,a,c)};var nt=[];x.prototype.computeHorizonCullingPointFromRectangle=function(o,t,e){z.typeOf.object("rectangle",o);let a=L.subsample(o,t,0,nt),i=j.fromPoints(a);if(!(s.magnitude(i.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(i.center,a,e)};var st=new s;function Z(o,t,e){if(l(t)&&t<0&&o.minimumRadius>-t){let a=s.fromElements(o.radii.x+t,o.radii.y+t,o.radii.z+t,st);o=q.fromCartesian3(a,e)}return o}function Q(o,t,e,a){z.typeOf.object("directionToPoint",t),z.defined("positions",e),l(a)||(a=new s);let i=Y(o,t),c=0;for(let n=0,r=e.length;n<r;++n){let m=e[n],h=K(o,m,i);if(h<0)return;c=Math.max(c,h)}return X(i,c,a)}var M=new s;function J(o,t,e,a,i,c){z.typeOf.object("directionToPoint",t),z.defined("vertices",e),z.typeOf.number("stride",a),l(c)||(c=new s),a=P(a,3),i=P(i,s.ZERO);let n=Y(o,t),r=0;for(let m=0,h=e.length;m<h;m+=a){M.x=e[m]+i.x,M.y=e[m+1]+i.y,M.z=e[m+2]+i.z;let u=K(o,M,n);if(u<0)return;r=Math.max(r,u)}return X(n,r,c)}function F(o,t,e){let a=t,i=e,c=s.subtract(o,a,U),n=-s.dot(c,a);return!(i<0?n>0:n>i&&n*n/s.magnitudeSquared(c)>i)}var ct=new s,rt=new s;function K(o,t,e){let a=o.transformPositionToScaledSpace(t,ct),i=s.magnitudeSquared(a),c=Math.sqrt(i),n=s.divideByScalar(a,c,rt);i=Math.max(1,i),c=Math.max(1,c);let r=s.dot(n,e),m=s.magnitude(s.cross(n,e,n)),h=1/c,u=Math.sqrt(i-1)*h;return 1/(r*h-m*u)}function X(o,t,e){if(!(t<=0||t===1/0||t!==t))return s.multiplyByScalar(o,t,e)}var D=new s;function Y(o,t){return s.equals(t,s.ZERO)?t:(o.transformPositionToScaledSpace(t,D),s.normalize(D,D))}var Pt=x;var O={};O.getHeight=function(o,t,e){if(!Number.isFinite(t))throw new A("scale must be a finite number.");if(!Number.isFinite(e))throw new A("relativeHeight must be a finite number.");return(o-e)*t+e};var mt=new W;O.getPosition=function(o,t,e,a,i){let c=t.cartesianToCartographic(o,mt);if(!l(c))return s.clone(o,i);let n=O.getHeight(c.height,e,a);return s.fromRadians(c.longitude,c.latitude,n,t,i)};var $=O;var dt={NONE:0,BITS12:1},S=Object.freeze(dt);var C=new s,lt=new s,f=new T,V=new d,ht=new d,pt=Math.pow(2,12);function p(o,t,e,a,i,c,n,r,m,h){let u=S.NONE,g,N;if(l(t)&&l(e)&&l(a)&&l(i)){let E=t.minimum,I=t.maximum,_=s.subtract(I,E,lt),tt=a-e;Math.max(s.maximumComponent(_),tt)<pt-1?u=S.BITS12:u=S.NONE,g=d.inverseTransformation(i,new d);let ot=s.negate(E,C);d.multiply(d.fromTranslation(ot,V),g,g);let b=C;b.x=1/_.x,b.y=1/_.y,b.z=1/_.z,d.multiply(d.fromScale(b,V),g,g),N=d.clone(i),d.setTranslation(N,s.ZERO,N),i=d.clone(i,new d);let et=d.fromTranslation(E,V),it=d.fromScale(_,ht),k=d.multiply(et,it,V);d.multiply(i,k,i),d.multiply(N,k,N)}this.quantization=u,this.minimumHeight=e,this.maximumHeight=a,this.center=s.clone(o),this.toScaledENU=g,this.fromScaledENU=i,this.matrix=N,this.hasVertexNormals=c,this.hasWebMercatorT=P(n,!1),this.hasGeodeticSurfaceNormals=P(r,!1),this.exaggeration=P(m,1),this.exaggerationRelativeHeight=P(h,0),this.stride=0,this._offsetGeodeticSurfaceNormal=0,this._offsetVertexNormal=0,this._calculateStrideAndOffsets()}p.prototype.encode=function(o,t,e,a,i,c,n,r){let m=a.x,h=a.y;if(this.quantization===S.BITS12){e=d.multiplyByPoint(this.toScaledENU,e,C),e.x=w.clamp(e.x,0,1),e.y=w.clamp(e.y,0,1),e.z=w.clamp(e.z,0,1);let u=this.maximumHeight-this.minimumHeight,g=w.clamp((i-this.minimumHeight)/u,0,1);T.fromElements(e.x,e.y,f);let N=y.compressTextureCoordinates(f);T.fromElements(e.z,g,f);let E=y.compressTextureCoordinates(f);T.fromElements(m,h,f);let I=y.compressTextureCoordinates(f);if(o[t++]=N,o[t++]=E,o[t++]=I,this.hasWebMercatorT){T.fromElements(n,0,f);let _=y.compressTextureCoordinates(f);o[t++]=_}}else s.subtract(e,this.center,C),o[t++]=C.x,o[t++]=C.y,o[t++]=C.z,o[t++]=i,o[t++]=m,o[t++]=h,this.hasWebMercatorT&&(o[t++]=n);return this.hasVertexNormals&&(o[t++]=y.octPackFloat(c)),this.hasGeodeticSurfaceNormals&&(o[t++]=r.x,o[t++]=r.y,o[t++]=r.z),t};var ut=new s,B=new s;p.prototype.addGeodeticSurfaceNormals=function(o,t,e){if(this.hasGeodeticSurfaceNormals)return;let a=this.stride,i=o.length/a;this.hasGeodeticSurfaceNormals=!0,this._calculateStrideAndOffsets();let c=this.stride;for(let n=0;n<i;n++){for(let u=0;u<a;u++){let g=n*a+u,N=n*c+u;t[N]=o[g]}let r=this.decodePosition(t,n,ut),m=e.geodeticSurfaceNormal(r,B),h=n*c+this._offsetGeodeticSurfaceNormal;t[h]=m.x,t[h+1]=m.y,t[h+2]=m.z}};p.prototype.removeGeodeticSurfaceNormals=function(o,t){if(!this.hasGeodeticSurfaceNormals)return;let e=this.stride,a=o.length/e;this.hasGeodeticSurfaceNormals=!1,this._calculateStrideAndOffsets();let i=this.stride;for(let c=0;c<a;c++)for(let n=0;n<i;n++){let r=c*e+n,m=c*i+n;t[m]=o[r]}};p.prototype.decodePosition=function(o,t,e){if(l(e)||(e=new s),t*=this.stride,this.quantization===S.BITS12){let a=y.decompressTextureCoordinates(o[t],f);e.x=a.x,e.y=a.y;let i=y.decompressTextureCoordinates(o[t+1],f);return e.z=i.x,d.multiplyByPoint(this.fromScaledENU,e,e)}return e.x=o[t],e.y=o[t+1],e.z=o[t+2],s.add(e,this.center,e)};p.prototype.getExaggeratedPosition=function(o,t,e){e=this.decodePosition(o,t,e);let a=this.exaggeration,i=this.exaggerationRelativeHeight;if(a!==1&&this.hasGeodeticSurfaceNormals){let n=this.decodeGeodeticSurfaceNormal(o,t,B),r=this.decodeHeight(o,t),m=$.getHeight(r,a,i)-r;e.x+=n.x*m,e.y+=n.y*m,e.z+=n.z*m}return e};p.prototype.decodeTextureCoordinates=function(o,t,e){return l(e)||(e=new T),t*=this.stride,this.quantization===S.BITS12?y.decompressTextureCoordinates(o[t+2],e):T.fromElements(o[t+4],o[t+5],e)};p.prototype.decodeHeight=function(o,t){return t*=this.stride,this.quantization===S.BITS12?y.decompressTextureCoordinates(o[t+1],f).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:o[t+3]};p.prototype.decodeWebMercatorT=function(o,t){return t*=this.stride,this.quantization===S.BITS12?y.decompressTextureCoordinates(o[t+3],f).x:o[t+6]};p.prototype.getOctEncodedNormal=function(o,t,e){t=t*this.stride+this._offsetVertexNormal;let a=o[t]/256,i=Math.floor(a),c=(a-i)*256;return T.fromElements(i,c,e)};p.prototype.decodeGeodeticSurfaceNormal=function(o,t,e){return t=t*this.stride+this._offsetGeodeticSurfaceNormal,e.x=o[t],e.y=o[t+1],e.z=o[t+2],e};p.prototype._calculateStrideAndOffsets=function(){let o=0;switch(this.quantization){case S.BITS12:o+=3;break;default:o+=6}this.hasWebMercatorT&&(o+=1),this.hasVertexNormals&&(this._offsetVertexNormal=o,o+=1),this.hasGeodeticSurfaceNormals&&(this._offsetGeodeticSurfaceNormal=o,o+=3),this.stride=o};var G={position3DAndHeight:0,textureCoordAndEncodedNormals:1,geodeticSurfaceNormal:2},H={compressed0:0,compressed1:1,geodeticSurfaceNormal:2};p.prototype.getAttributes=function(o){let t=R.FLOAT,e=R.getSizeInBytes(t),a=this.stride*e,i=0,c=[];function n(r,m){c.push({index:r,vertexBuffer:o,componentDatatype:t,componentsPerAttribute:m,offsetInBytes:i,strideInBytes:a}),i+=m*e}if(this.quantization===S.NONE){n(G.position3DAndHeight,4);let r=2;r+=this.hasWebMercatorT?1:0,r+=this.hasVertexNormals?1:0,n(G.textureCoordAndEncodedNormals,r),this.hasGeodeticSurfaceNormals&&n(G.geodeticSurfaceNormal,3)}else{let r=this.hasWebMercatorT||this.hasVertexNormals,m=this.hasWebMercatorT&&this.hasVertexNormals;n(H.compressed0,r?4:3),m&&n(H.compressed1,1),this.hasGeodeticSurfaceNormals&&n(H.geodeticSurfaceNormal,3)}return c};p.prototype.getAttributeLocations=function(){return this.quantization===S.NONE?G:H};p.clone=function(o,t){if(l(o))return l(t)||(t=new p),t.quantization=o.quantization,t.minimumHeight=o.minimumHeight,t.maximumHeight=o.maximumHeight,t.center=s.clone(o.center),t.toScaledENU=d.clone(o.toScaledENU),t.fromScaledENU=d.clone(o.fromScaledENU),t.matrix=d.clone(o.matrix),t.hasVertexNormals=o.hasVertexNormals,t.hasWebMercatorT=o.hasWebMercatorT,t.hasGeodeticSurfaceNormals=o.hasGeodeticSurfaceNormals,t.exaggeration=o.exaggeration,t.exaggerationRelativeHeight=o.exaggerationRelativeHeight,t._calculateStrideAndOffsets(),t};var Wt=p;export{Pt as a,Wt as b};
|
|
26
|
+
import{a as y}from"./chunk-MMLDGXML.js";import{d as j}from"./chunk-46KFVW24.js";import{b as d,h as L}from"./chunk-TVO2A75R.js";import{a as R}from"./chunk-KKKPU2CI.js";import{a as s,b as W,c as T,d as q}from"./chunk-4EI6PP43.js";import{a as w}from"./chunk-3T4KR75X.js";import{a as P}from"./chunk-4YLYA3DC.js";import{a as A,b as z}from"./chunk-6RGNWVZ2.js";import{e as l}from"./chunk-IALXUAD4.js";function x(o,t){z.typeOf.object("ellipsoid",o),this._ellipsoid=o,this._cameraPosition=new s,this._cameraPositionInScaledSpace=new s,this._distanceToLimbInScaledSpaceSquared=0,l(t)&&(this.cameraPosition=t)}Object.defineProperties(x.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(o){let e=this._ellipsoid.transformPositionToScaledSpace(o,this._cameraPositionInScaledSpace),a=s.magnitudeSquared(e)-1;s.clone(o,this._cameraPosition),this._cameraPositionInScaledSpace=e,this._distanceToLimbInScaledSpaceSquared=a}}});var U=new s;x.prototype.isPointVisible=function(o){let e=this._ellipsoid.transformPositionToScaledSpace(o,U);return F(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};x.prototype.isScaledSpacePointVisible=function(o){return F(o,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var at=new s;x.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(o,t){let e=this._ellipsoid,a,i;return l(t)&&t<0&&e.minimumRadius>-t?(i=at,i.x=this._cameraPosition.x/(e.radii.x+t),i.y=this._cameraPosition.y/(e.radii.y+t),i.z=this._cameraPosition.z/(e.radii.z+t),a=i.x*i.x+i.y*i.y+i.z*i.z-1):(i=this._cameraPositionInScaledSpace,a=this._distanceToLimbInScaledSpaceSquared),F(o,i,a)};x.prototype.computeHorizonCullingPoint=function(o,t,e){return Q(this._ellipsoid,o,t,e)};var v=q.clone(q.UNIT_SPHERE);x.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(o,t,e,a){let i=Z(this._ellipsoid,e,v);return Q(i,o,t,a)};x.prototype.computeHorizonCullingPointFromVertices=function(o,t,e,a,i){return J(this._ellipsoid,o,t,e,a,i)};x.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(o,t,e,a,i,c){let n=Z(this._ellipsoid,i,v);return J(n,o,t,e,a,c)};var nt=[];x.prototype.computeHorizonCullingPointFromRectangle=function(o,t,e){z.typeOf.object("rectangle",o);let a=L.subsample(o,t,0,nt),i=j.fromPoints(a);if(!(s.magnitude(i.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(i.center,a,e)};var st=new s;function Z(o,t,e){if(l(t)&&t<0&&o.minimumRadius>-t){let a=s.fromElements(o.radii.x+t,o.radii.y+t,o.radii.z+t,st);o=q.fromCartesian3(a,e)}return o}function Q(o,t,e,a){z.typeOf.object("directionToPoint",t),z.defined("positions",e),l(a)||(a=new s);let i=Y(o,t),c=0;for(let n=0,r=e.length;n<r;++n){let m=e[n],h=K(o,m,i);if(h<0)return;c=Math.max(c,h)}return X(i,c,a)}var M=new s;function J(o,t,e,a,i,c){z.typeOf.object("directionToPoint",t),z.defined("vertices",e),z.typeOf.number("stride",a),l(c)||(c=new s),a=P(a,3),i=P(i,s.ZERO);let n=Y(o,t),r=0;for(let m=0,h=e.length;m<h;m+=a){M.x=e[m]+i.x,M.y=e[m+1]+i.y,M.z=e[m+2]+i.z;let u=K(o,M,n);if(u<0)return;r=Math.max(r,u)}return X(n,r,c)}function F(o,t,e){let a=t,i=e,c=s.subtract(o,a,U),n=-s.dot(c,a);return!(i<0?n>0:n>i&&n*n/s.magnitudeSquared(c)>i)}var ct=new s,rt=new s;function K(o,t,e){let a=o.transformPositionToScaledSpace(t,ct),i=s.magnitudeSquared(a),c=Math.sqrt(i),n=s.divideByScalar(a,c,rt);i=Math.max(1,i),c=Math.max(1,c);let r=s.dot(n,e),m=s.magnitude(s.cross(n,e,n)),h=1/c,u=Math.sqrt(i-1)*h;return 1/(r*h-m*u)}function X(o,t,e){if(!(t<=0||t===1/0||t!==t))return s.multiplyByScalar(o,t,e)}var D=new s;function Y(o,t){return s.equals(t,s.ZERO)?t:(o.transformPositionToScaledSpace(t,D),s.normalize(D,D))}var Pt=x;var O={};O.getHeight=function(o,t,e){if(!Number.isFinite(t))throw new A("scale must be a finite number.");if(!Number.isFinite(e))throw new A("relativeHeight must be a finite number.");return(o-e)*t+e};var mt=new W;O.getPosition=function(o,t,e,a,i){let c=t.cartesianToCartographic(o,mt);if(!l(c))return s.clone(o,i);let n=O.getHeight(c.height,e,a);return s.fromRadians(c.longitude,c.latitude,n,t,i)};var $=O;var dt={NONE:0,BITS12:1},S=Object.freeze(dt);var C=new s,lt=new s,f=new T,V=new d,ht=new d,pt=Math.pow(2,12);function p(o,t,e,a,i,c,n,r,m,h){let u=S.NONE,g,N;if(l(t)&&l(e)&&l(a)&&l(i)){let E=t.minimum,I=t.maximum,_=s.subtract(I,E,lt),tt=a-e;Math.max(s.maximumComponent(_),tt)<pt-1?u=S.BITS12:u=S.NONE,g=d.inverseTransformation(i,new d);let ot=s.negate(E,C);d.multiply(d.fromTranslation(ot,V),g,g);let b=C;b.x=1/_.x,b.y=1/_.y,b.z=1/_.z,d.multiply(d.fromScale(b,V),g,g),N=d.clone(i),d.setTranslation(N,s.ZERO,N),i=d.clone(i,new d);let et=d.fromTranslation(E,V),it=d.fromScale(_,ht),k=d.multiply(et,it,V);d.multiply(i,k,i),d.multiply(N,k,N)}this.quantization=u,this.minimumHeight=e,this.maximumHeight=a,this.center=s.clone(o),this.toScaledENU=g,this.fromScaledENU=i,this.matrix=N,this.hasVertexNormals=c,this.hasWebMercatorT=P(n,!1),this.hasGeodeticSurfaceNormals=P(r,!1),this.exaggeration=P(m,1),this.exaggerationRelativeHeight=P(h,0),this.stride=0,this._offsetGeodeticSurfaceNormal=0,this._offsetVertexNormal=0,this._calculateStrideAndOffsets()}p.prototype.encode=function(o,t,e,a,i,c,n,r){let m=a.x,h=a.y;if(this.quantization===S.BITS12){e=d.multiplyByPoint(this.toScaledENU,e,C),e.x=w.clamp(e.x,0,1),e.y=w.clamp(e.y,0,1),e.z=w.clamp(e.z,0,1);let u=this.maximumHeight-this.minimumHeight,g=w.clamp((i-this.minimumHeight)/u,0,1);T.fromElements(e.x,e.y,f);let N=y.compressTextureCoordinates(f);T.fromElements(e.z,g,f);let E=y.compressTextureCoordinates(f);T.fromElements(m,h,f);let I=y.compressTextureCoordinates(f);if(o[t++]=N,o[t++]=E,o[t++]=I,this.hasWebMercatorT){T.fromElements(n,0,f);let _=y.compressTextureCoordinates(f);o[t++]=_}}else s.subtract(e,this.center,C),o[t++]=C.x,o[t++]=C.y,o[t++]=C.z,o[t++]=i,o[t++]=m,o[t++]=h,this.hasWebMercatorT&&(o[t++]=n);return this.hasVertexNormals&&(o[t++]=y.octPackFloat(c)),this.hasGeodeticSurfaceNormals&&(o[t++]=r.x,o[t++]=r.y,o[t++]=r.z),t};var ut=new s,B=new s;p.prototype.addGeodeticSurfaceNormals=function(o,t,e){if(this.hasGeodeticSurfaceNormals)return;let a=this.stride,i=o.length/a;this.hasGeodeticSurfaceNormals=!0,this._calculateStrideAndOffsets();let c=this.stride;for(let n=0;n<i;n++){for(let u=0;u<a;u++){let g=n*a+u,N=n*c+u;t[N]=o[g]}let r=this.decodePosition(t,n,ut),m=e.geodeticSurfaceNormal(r,B),h=n*c+this._offsetGeodeticSurfaceNormal;t[h]=m.x,t[h+1]=m.y,t[h+2]=m.z}};p.prototype.removeGeodeticSurfaceNormals=function(o,t){if(!this.hasGeodeticSurfaceNormals)return;let e=this.stride,a=o.length/e;this.hasGeodeticSurfaceNormals=!1,this._calculateStrideAndOffsets();let i=this.stride;for(let c=0;c<a;c++)for(let n=0;n<i;n++){let r=c*e+n,m=c*i+n;t[m]=o[r]}};p.prototype.decodePosition=function(o,t,e){if(l(e)||(e=new s),t*=this.stride,this.quantization===S.BITS12){let a=y.decompressTextureCoordinates(o[t],f);e.x=a.x,e.y=a.y;let i=y.decompressTextureCoordinates(o[t+1],f);return e.z=i.x,d.multiplyByPoint(this.fromScaledENU,e,e)}return e.x=o[t],e.y=o[t+1],e.z=o[t+2],s.add(e,this.center,e)};p.prototype.getExaggeratedPosition=function(o,t,e){e=this.decodePosition(o,t,e);let a=this.exaggeration,i=this.exaggerationRelativeHeight;if(a!==1&&this.hasGeodeticSurfaceNormals){let n=this.decodeGeodeticSurfaceNormal(o,t,B),r=this.decodeHeight(o,t),m=$.getHeight(r,a,i)-r;e.x+=n.x*m,e.y+=n.y*m,e.z+=n.z*m}return e};p.prototype.decodeTextureCoordinates=function(o,t,e){return l(e)||(e=new T),t*=this.stride,this.quantization===S.BITS12?y.decompressTextureCoordinates(o[t+2],e):T.fromElements(o[t+4],o[t+5],e)};p.prototype.decodeHeight=function(o,t){return t*=this.stride,this.quantization===S.BITS12?y.decompressTextureCoordinates(o[t+1],f).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:o[t+3]};p.prototype.decodeWebMercatorT=function(o,t){return t*=this.stride,this.quantization===S.BITS12?y.decompressTextureCoordinates(o[t+3],f).x:o[t+6]};p.prototype.getOctEncodedNormal=function(o,t,e){t=t*this.stride+this._offsetVertexNormal;let a=o[t]/256,i=Math.floor(a),c=(a-i)*256;return T.fromElements(i,c,e)};p.prototype.decodeGeodeticSurfaceNormal=function(o,t,e){return t=t*this.stride+this._offsetGeodeticSurfaceNormal,e.x=o[t],e.y=o[t+1],e.z=o[t+2],e};p.prototype._calculateStrideAndOffsets=function(){let o=0;switch(this.quantization){case S.BITS12:o+=3;break;default:o+=6}this.hasWebMercatorT&&(o+=1),this.hasVertexNormals&&(this._offsetVertexNormal=o,o+=1),this.hasGeodeticSurfaceNormals&&(this._offsetGeodeticSurfaceNormal=o,o+=3),this.stride=o};var G={position3DAndHeight:0,textureCoordAndEncodedNormals:1,geodeticSurfaceNormal:2},H={compressed0:0,compressed1:1,geodeticSurfaceNormal:2};p.prototype.getAttributes=function(o){let t=R.FLOAT,e=R.getSizeInBytes(t),a=this.stride*e,i=0,c=[];function n(r,m){c.push({index:r,vertexBuffer:o,componentDatatype:t,componentsPerAttribute:m,offsetInBytes:i,strideInBytes:a}),i+=m*e}if(this.quantization===S.NONE){n(G.position3DAndHeight,4);let r=2;r+=this.hasWebMercatorT?1:0,r+=this.hasVertexNormals?1:0,n(G.textureCoordAndEncodedNormals,r),this.hasGeodeticSurfaceNormals&&n(G.geodeticSurfaceNormal,3)}else{let r=this.hasWebMercatorT||this.hasVertexNormals,m=this.hasWebMercatorT&&this.hasVertexNormals;n(H.compressed0,r?4:3),m&&n(H.compressed1,1),this.hasGeodeticSurfaceNormals&&n(H.geodeticSurfaceNormal,3)}return c};p.prototype.getAttributeLocations=function(){return this.quantization===S.NONE?G:H};p.clone=function(o,t){if(l(o))return l(t)||(t=new p),t.quantization=o.quantization,t.minimumHeight=o.minimumHeight,t.maximumHeight=o.maximumHeight,t.center=s.clone(o.center),t.toScaledENU=d.clone(o.toScaledENU),t.fromScaledENU=d.clone(o.fromScaledENU),t.matrix=d.clone(o.matrix),t.hasVertexNormals=o.hasVertexNormals,t.hasWebMercatorT=o.hasWebMercatorT,t.hasGeodeticSurfaceNormals=o.hasGeodeticSurfaceNormals,t.exaggeration=o.exaggeration,t.exaggerationRelativeHeight=o.exaggerationRelativeHeight,t._calculateStrideAndOffsets(),t};var Wt=p;export{Pt as a,Wt as b};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.118
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{e as u}from"./chunk-
|
|
26
|
+
import{e as u}from"./chunk-IALXUAD4.js";function f(t){this.name="DeveloperError",this.message=t;let e;try{throw new Error}catch(o){e=o.stack}this.stack=e}u(Object.create)&&(f.prototype=Object.create(Error.prototype),f.prototype.constructor=f);f.prototype.toString=function(){let t=`${this.name}: ${this.message}`;return u(this.stack)&&(t+=`
|
|
27
27
|
${this.stack.toString()}`),t};f.throwInstantiationError=function(){throw new f("This function defines an interface and should not be called directly.")};var r=f;var n={};n.typeOf={};function c(t){return`${t} is required, actual value was undefined`}function a(t,e,o){return`Expected ${o} to be typeof ${e}, actual typeof was ${t}`}n.defined=function(t,e){if(!u(e))throw new r(c(t))};n.typeOf.func=function(t,e){if(typeof e!="function")throw new r(a(typeof e,"function",t))};n.typeOf.string=function(t,e){if(typeof e!="string")throw new r(a(typeof e,"string",t))};n.typeOf.number=function(t,e){if(typeof e!="number")throw new r(a(typeof e,"number",t))};n.typeOf.number.lessThan=function(t,e,o){if(n.typeOf.number(t,e),e>=o)throw new r(`Expected ${t} to be less than ${o}, actual value was ${e}`)};n.typeOf.number.lessThanOrEquals=function(t,e,o){if(n.typeOf.number(t,e),e>o)throw new r(`Expected ${t} to be less than or equal to ${o}, actual value was ${e}`)};n.typeOf.number.greaterThan=function(t,e,o){if(n.typeOf.number(t,e),e<=o)throw new r(`Expected ${t} to be greater than ${o}, actual value was ${e}`)};n.typeOf.number.greaterThanOrEquals=function(t,e,o){if(n.typeOf.number(t,e),e<o)throw new r(`Expected ${t} to be greater than or equal to ${o}, actual value was ${e}`)};n.typeOf.object=function(t,e){if(typeof e!="object")throw new r(a(typeof e,"object",t))};n.typeOf.bool=function(t,e){if(typeof e!="boolean")throw new r(a(typeof e,"boolean",t))};n.typeOf.bigint=function(t,e){if(typeof e!="bigint")throw new r(a(typeof e,"bigint",t))};n.typeOf.number.equals=function(t,e,o,i){if(n.typeOf.number(t,o),n.typeOf.number(e,i),o!==i)throw new r(`${t} must be equal to ${e}, the actual values are ${o} and ${i}`)};var l=n;export{r as a,l as b};
|