1"use strict";(globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]).push([[1918],{3174:(e,t,r)=>{r.d(t,{AK:()=>a,Wz:()=>o,oe:()=>n,p_:()=>s}) 2var i=r(81109) 3function n(e,t=!1){return e<=i.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}function s(e){return Array.isArray(e)?e.length<i.y9?e:new Float32Array(e):e.length<i.y9?Array.from(e):e}function o(e){return(Array.isArray(e)?e.length:e.byteLength/8)<=i.y9?Array.from(e):new Float32Array(e)}function a(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}},86412:(e,t,r)=>{r.d(t,{BF:()=>p,Dg:()=>n,EH:()=>h,JH:()=>o,my:()=>s,tM:()=>c}) 4var i=r(81109) 5function n(e){if(Array.isArray(e)){if(e.length<i.y9)return e}else if(e.length<i.y9)return Array.from(e) 6let t=!0,r=!0 7return e.some(((e,i)=>(t=t&&0===e,r=r&&e===i,!t&&!r))),t?h(e.length):r?c(e.length):(0,i.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e){let t=!0 8for(const r of e){if(r>=65536)return(0,i.iu)(e)?e:new Uint32Array(e) 9r>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e)}function s(e){return e<=i.y9?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}function o(e){return e<=i.y9?new Array(e):new Uint32Array(e)}let a=f(131072) 10const l=[0],u=(()=>{const e=new Uint16Array(65536) 11for(let t=0;t<e.length;++t)e[t]=t 12return e})() 13function c(e){return 1===e?l:e<i.y9?Array.from(new Uint16Array(u.buffer,0,e)):e<u.length?new Uint16Array(u.buffer,0,e):(e>a.length&&(a=f(Math.max(2*a.length,e))),new Uint32Array(a.buffer,0,e))}function f(e){const t=new Uint32Array(e) 14for(let r=0;r<t.length;r++)t[r]=r 15return t}let d=new Uint8Array(65536) 16function h(e){if(1===e)return l 17if(e<i.y9)return new Array(e).fill(0) 18if(e>d.length){const t=Math.max(2*d.length,e) 19d=new Uint8Array(t)}return new Uint8Array(d.buffer,0,e)}function p(){a=f(131072),d=new Uint8Array(65536)}},14061:(e,t,r)=>{r.d(t,{Y$:()=>d,qB:()=>T,Qt:()=>H,My:()=>W,bf:()=>D,jZ:()=>g,j0:()=>_,Sx:()=>y,E$:()=>v,h:()=>B,P:()=>P,SL:()=>x,gH:()=>h,si:()=>A,mJ:()=>V,UL:()=>k,D6:()=>U,Yi:()=>O,An:()=>M,LC:()=>S,xs:()=>p,Xm:()=>E,Vp:()=>G,zD:()=>Y,m8:()=>z,nS:()=>I,H$:()=>R,eI:()=>w,Eq:()=>m,Aj:()=>b,E7:()=>$,Y4:()=>j,TX:()=>F,Uz:()=>L,ml:()=>N,XP:()=>C}) 20class i{constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=9 21const s=this.TypedArrayConstructor 22void 0===i&&(i=9*s.BYTES_PER_ELEMENT) 23const o=0===t.byteLength?0:r 24this.typedBuffer=null==n?new s(t,o):new s(t,o,(n-r)/s.BYTES_PER_ELEMENT),this.typedBufferStride=i/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride 25return new e(this.buffer,i,this.stride,i+r*this.stride)}getMat(e,t){let r=e*this.typedBufferStride 26for(let i=0;i<9;i++)t[i]=this.typedBuffer[r++] 27return t}setMat(e,t){let r=e*this.typedBufferStride 28for(let i=0;i<9;i++)this.typedBuffer[r++]=t[i]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}copyFrom(e,t,r){const i=this.typedBuffer,n=t.typedBuffer 29let s=e*this.typedBufferStride,o=r*t.typedBufferStride 30for(let a=0;a<9;++a)i[s++]=n[o++]}get buffer(){return this.typedBuffer.buffer}}i.ElementCount=9 31class n{constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=16 32const s=this.TypedArrayConstructor 33void 0===i&&(i=16*s.BYTES_PER_ELEMENT) 34const o=0===t.byteLength?0:r 35this.typedBuffer=null==n?new s(t,o):new s(t,o,(n-r)/s.BYTES_PER_ELEMENT),this.typedBufferStride=i/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride 36return new e(this.buffer,i,this.stride,i+r*this.stride)}getMat(e,t){let r=e*this.typedBufferStride 37for(let i=0;i<16;i++)t[i]=this.typedBuffer[r++] 38return t}setMat(e,t){let r=e*this.typedBufferStride 39for(let i=0;i<16;i++)this.typedBuffer[r++]=t[i]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}copyFrom(e,t,r){this.copyFromTypedBuffer(e,t.typedBuffer,r*t.typedBufferStride)}copyFromTypedBuffer(e,t,r){const i=this.typedBuffer 40let n=e*this.typedBufferStride 41for(let s=0;s<16;++s)i[n++]=t[r++]}get buffer(){return this.typedBuffer.buffer}}n.ElementCount=16 42class s{constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=1 43const s=this.TypedArrayConstructor 44void 0===i&&(i=s.BYTES_PER_ELEMENT) 45const o=0===t.byteLength?0:r
46this.typedBuffer=null==n?new s(t,o):new s(t,o,(n-r)/s.BYTES_PER_ELEMENT),this.stride=i,this.typedBufferStride=i/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride)}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride 47return new e(this.buffer,i,this.stride,i+r*this.stride)}get(e){return this.typedBuffer[e*this.typedBufferStride]}set(e,t){this.typedBuffer[e*this.typedBufferStride]=t}get buffer(){return this.typedBuffer.buffer}}s.ElementCount=1 48var o=r(13775) 49class a{constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=2 50const s=this.TypedArrayConstructor 51void 0===i&&(i=2*s.BYTES_PER_ELEMENT) 52const o=0===t.byteLength?0:r 53this.typedBuffer=null==n?new s(t,o):new s(t,o,(n-r)/s.BYTES_PER_ELEMENT),this.typedBufferStride=i/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride 54return new e(this.buffer,i,this.stride,i+r*this.stride)}getVec(e,t){return e*=this.typedBufferStride,(0,o.set)(t,this.typedBuffer[e],this.typedBuffer[e+1])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e]=t[1]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}setValues(e,t,r){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e]=r}copyFrom(e,t,r){const i=this.typedBuffer,n=t.typedBuffer 55let s=e*this.typedBufferStride,o=r*t.typedBufferStride 56i[s++]=n[o++],i[s]=n[o]}get buffer(){return this.typedBuffer.buffer}}a.ElementCount=2 57var l=r(95612) 58class u{constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=3 59const s=this.TypedArrayConstructor 60void 0===i&&(i=3*s.BYTES_PER_ELEMENT) 61const o=0===t.byteLength?0:r 62this.typedBuffer=null==n?new s(t,o):new s(t,o,(n-r)/s.BYTES_PER_ELEMENT),this.typedBufferStride=i/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride 63return new e(this.buffer,i,this.stride,i+r*this.stride)}getVec(e,t){return e*=this.typedBufferStride,(0,l.i)(t,this.typedBuffer[e],this.typedBuffer[e+1],this.typedBuffer[e+2])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e++]=t[1],this.typedBuffer[e]=t[2]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}setValues(e,t,r,i){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e++]=r,this.typedBuffer[e]=i}copyFrom(e,t,r){const i=this.typedBuffer,n=t.typedBuffer 64let s=e*this.typedBufferStride,o=r*t.typedBufferStride 65i[s++]=n[o++],i[s++]=n[o++],i[s]=n[o]}get buffer(){return this.typedBuffer.buffer}}u.ElementCount=3 66var c=r(80483) 67class f{constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.start=r,this.elementCount=4 68const s=this.TypedArrayConstructor 69void 0===i&&(i=4*s.BYTES_PER_ELEMENT) 70const o=0===t.byteLength?0:r 71this.typedBuffer=null==n?new s(t,o):new s(t,o,(n-r)/s.BYTES_PER_ELEMENT),this.typedBufferStride=i/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride 72return new e(this.buffer,i,this.stride,i+r*this.stride)}getVec(e,t){return e*=this.typedBufferStride,(0,c.s)(t,this.typedBuffer[e++],this.typedBuffer[e++],this.typedBuffer[e++],this.typedBuffer[e])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e++]=t[1],this.typedBuffer[e++]=t[2],this.typedBuffer[e]=t[3]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}setValues(e,t,r,i,n){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e++]=r,this.typedBuffer[e++]=i,this.typedBuffer[e]=n}copyFrom(e,t,r){const i=this.typedBuffer,n=t.typedBuffer 73let s=e*this.typedBufferStride,o=r*t.typedBufferStride 74i[s++]=n[o++],i[s++]=n[o++],i[s++]=n[o++],i[s]=n[o]}get buffer(){return this.typedBuffer.buffer}}f.ElementCount=4 75class d extends s{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}static fromTypedArray(e,t){return new d(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}d.ElementType="f32" 76class h extends a{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(h,e,t)}static fromTypedArray(e,t){return new h(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}h.ElementType="f32" 77class p extends u{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(p,e,t)}static fromTypedArray(e,t){return new p(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}p.ElementType="f32" 78class m extends f{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(m,e,t)}static fromTypedArray(e,t){return new m(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}m.ElementType="f32" 79class g extends i{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(g,e,t)}static fromTypedArray(e,t){return new g(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}g.ElementType="f32" 80class _ extends i{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(_,e,t)}static fromTypedArray(e,t){return new _(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}_.ElementType="f64" 81class y extends n{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(y,e,t)}static fromTypedArray(e,t){return new y(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}y.ElementType="f32" 82class v extends n{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(v,e,t)}static fromTypedArray(e,t){return new v(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}v.ElementType="f64" 83class T extends s{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(T,e,t)}static fromTypedArray(e,t){return new T(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}T.ElementType="f64" 84class A extends a{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(A,e,t)}static fromTypedArray(e,t){return new A(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}A.ElementType="f64" 85class E extends u{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(E,e,t)}static fromTypedArray(e,t){return new E(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}E.ElementType="f64" 86class b extends f{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(b,e,t)}static fromTypedArray(e,t){return new b(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}b.ElementType="f64" 87class x extends s{constructor(e,t=0,r,i){super(Uint8Array,e,t,r,i),this.elementType="u8"}slice(e,t){return this.sliceBuffer(x,e,t)}static fromTypedArray(e,t){return new x(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}x.ElementType="u8" 88class S extends a{constructor(e,t=0,r,i){super(Uint8Array,e,t,r,i),this.elementType="u8"}slice(e,t){return this.sliceBuffer(S,e,t)}static fromTypedArray(e,t){return new S(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}S.ElementType="u8" 89class w extends u{constructor(e,t=0,r,i){super(Uint8Array,e,t,r,i),this.elementType="u8"}slice(e,t){return this.sliceBuffer(w,e,t)}static fromTypedArray(e,t){return new w(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}w.ElementType="u8" 90class C extends f{constructor(e,t=0,r,i){super(Uint8Array,e,t,r,i),this.elementType="u8"}slice(e,t){return this.sliceBuffer(C,e,t)}static fromTypedArray(e,t){return new C(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}C.ElementType="u8" 91class B extends s{constructor(e,t=0,r,i){super(Uint16Array,e,t,r,i),this.elementType="u16"}slice(e,t){return this.sliceBuffer(B,e,t)}static fromTypedArray(e,t){return new B(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}B.ElementType="u16" 92class O extends a{constructor(e,t=0,r,i){super(Uint16Array,e,t,r,i),this.elementType="u16"}slice(e,t){return this.sliceBuffer(O,e,t)}static fromTypedArray(e,t){return new O(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}O.ElementType="u16" 93class I extends u{constructor(e,t=0,r,i){super(Uint16Array,e,t,r,i),this.elementType="u16"}
93slice(e,t){return this.sliceBuffer(I,e,t)}static fromTypedArray(e,t){return new I(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}I.ElementType="u16" 94class L extends f{constructor(e,t=0,r,i){super(Uint16Array,e,t,r,i),this.elementType="u16"}slice(e,t){return this.sliceBuffer(L,e,t)}static fromTypedArray(e,t){return new L(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}L.ElementType="u16" 95class P extends s{constructor(e,t=0,r,i){super(Uint32Array,e,t,r,i),this.elementType="u32"}slice(e,t){return this.sliceBuffer(P,e,t)}static fromTypedArray(e,t){return new P(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}P.ElementType="u32" 96class M extends a{constructor(e,t=0,r,i){super(Uint32Array,e,t,r,i),this.elementType="u32"}slice(e,t){return this.sliceBuffer(M,e,t)}static fromTypedArray(e,t){return new M(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}M.ElementType="u32" 97class R extends u{constructor(e,t=0,r,i){super(Uint32Array,e,t,r,i),this.elementType="u32"}slice(e,t){return this.sliceBuffer(R,e,t)}static fromTypedArray(e,t){return new R(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}R.ElementType="u32" 98class N extends f{constructor(e,t=0,r,i){super(Uint32Array,e,t,r,i),this.elementType="u32"}slice(e,t){return this.sliceBuffer(N,e,t)}static fromTypedArray(e,t){return new N(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}N.ElementType="u32" 99class D extends s{constructor(e,t=0,r,i){super(Int8Array,e,t,r,i),this.elementType="i8"}slice(e,t){return this.sliceBuffer(D,e,t)}static fromTypedArray(e,t){return new D(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}D.ElementType="i8" 100class U extends a{constructor(e,t=0,r,i){super(Int8Array,e,t,r,i),this.elementType="i8"}slice(e,t){return this.sliceBuffer(U,e,t)}static fromTypedArray(e,t){return new U(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}U.ElementType="i8" 101class z extends u{constructor(e,t=0,r,i){super(Int8Array,e,t,r,i),this.elementType="i8"}slice(e,t){return this.sliceBuffer(z,e,t)}static fromTypedArray(e,t){return new z(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}z.ElementType="i8" 102class F extends f{constructor(e,t=0,r,i){super(Int8Array,e,t,r,i),this.elementType="i8"}slice(e,t){return this.sliceBuffer(F,e,t)}static fromTypedArray(e,t){return new F(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}F.ElementType="i8" 103class H extends s{constructor(e,t=0,r,i){super(Int16Array,e,t,r,i),this.elementType="i16"}slice(e,t){return this.sliceBuffer(H,e,t)}static fromTypedArray(e,t){return new H(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}H.ElementType="i16" 104class V extends a{constructor(e,t=0,r,i){super(Int16Array,e,t,r,i),this.elementType="i16"}slice(e,t){return this.sliceBuffer(V,e,t)}static fromTypedArray(e,t){return new V(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}V.ElementType="i16" 105class G extends u{constructor(e,t=0,r,i){super(Int16Array,e,t,r,i),this.elementType="i16"}slice(e,t){return this.sliceBuffer(G,e,t)}static fromTypedArray(e,t){return new G(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}G.ElementType="i16" 106class $ extends f{constructor(e,t=0,r,i){super(Int16Array,e,t,r,i),this.elementType="i16"}slice(e,t){return this.sliceBuffer($,e,t)}static fromTypedArray(e,t){return new $(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}$.ElementType="i16" 107class W extends s{constructor(e,t=0,r,i){super(Int32Array,e,t,r,i),this.elementType="i32"}slice(e,t){return this.sliceBuffer(W,e,t)}static fromTypedArray(e,t){return new W(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}W.ElementType="i32" 108class k extends a{constructor(e,t=0,r,i){super(Int32Array,e,t,r,i),this.elementType="i32"}slice(e,t){return this.sliceBuffer(k,e,t)}static fromTypedArray(e,t){return new k(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}k.ElementType="i32" 109class Y extends u{constructor(e,t=0,r,i){super(Int32Array,e,t,r,i),this.elementType="i32"}slice(e,t){return this.sliceBuffer(Y,e,t)}static fromTypedArray(e,t){return new Y(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}Y.ElementType="i32" 110class j extends f{constructor(e,t=0,r,i){super(Int32Array,e,t,r,i),this.elementType="i32"}slice(e,t){return this.sliceBuffer(j,e,t)}static fromTypedArray(e,t){return new j(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}j.ElementType="i32"},89489:(e,t,r)=>{function i(e){switch(e){case"u8":case"i8":return 1 111case"u16":case"i16":return 2 112case"u32":case"i32":case"f32":return 4 113case"f64":return 8}}r.d(t,{GJ:()=>i})},31597:(e,t,r)=>{r.d(t,{Fm:()=>l,Q7:()=>u,Ui:()=>a}) 114var i=r(63951),n=r(95612),s=r(69460),o=r(90901) 115function a(e,t,r){const{direction:i,origin:s}=t,{p0:o,p1:a,p2:l}=e,u=a[0]-o[0],c=a[1]-o[1],f=a[2]-o[2],d=l[0]-o[0],h=l[1]-o[1],p=l[2]-o[2],m=i[1]*p-h*i[2],g=i[2]*d-p*i[0],_=i[0]*h-d*i[1],y=u*m+c*g+f*_ 116if(y>-1e-5&&y<1e-5)return!1 117const v=1/y,T=s[0]-o[0],A=s[1]-o[1],E=s[2]-o[2],b=v*(T*m+A*g+E*_) 118if(b<0||b>1)return!1 119const x=A*f-c*E,S=E*u-f*T,w=T*c-u*A,C=v*(i[0]*x+i[1]*S+i[2]*w) 120return!(C<0||b+C>1||(r&&((0,n.h)(r,i,v*(d*x+h*S+p*w)),(0,n.g)(r,s,r)),0))}function l(e,t,r){const i=t[0]-e[0],n=t[1]-e[1],s=r[0]-e[0],o=r[1]-e[1] 121return.5*Math.abs(i*o-n*s)}function u(e,t,r){return(0,n.d)(c,t,e),(0,n.d)(f,r,e),.5*(0,n.l)((0,n.e)(c,c,f))}r(73888),new i.I(o.vt),new i.I((()=>({p0:(0,s.vt)(),p1:(0,s.vt)(),p2:(0,s.vt)()}))) 122const c=(0,s.vt)(),f=(0,s.vt)()},85839:(e,t,r)=>{var i 123r.d(t,{n:()=>i}),function(e){e[e.ETC1_RGB=0]="ETC1_RGB",e[e.ETC2_RGBA=1]="ETC2_RGBA",e[e.BC1_RGB=2]="BC1_RGB",e[e.BC3_RGBA=3]="BC3_RGBA",e[e.BC4_R=4]="BC4_R",e[e.BC5_RG=5]="BC5_RG",e[e.BC7_M6_RGB=6]="BC7_M6_RGB",e[e.BC7_M5_RGBA=7]="BC7_M5_RGBA",e[e.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",e[e.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",e[e.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",e[e.ATC_RGB=11]="ATC_RGB",e[e.ATC_RGBA=12]="ATC_RGBA",e[e.FXT1_RGB=17]="FXT1_RGB",e[e.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",e[e.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",e[e.ETC2_EAC_R11=20]="ETC2_EAC_R11",e[e.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",e[e.RGBA32=13]="RGBA32",e[e.RGB565=14]="RGB565",e[e.BGR565=15]="BGR565",e[e.RGBA4444=16]="RGBA4444"}(i||(i={}))},70623:(e,t,r)=>{r.d(t,{D:()=>n}) 124var i=r(33333) 125async function n(e,t){const{data:r}=await(0,i.default)(e,{responseType:"image",...t}) 126return r}},51324:(e,t,r)=>{r.d(t,{Gd:()=>R,J_:()=>P,VC:()=>U,b3:()=>D,s_:()=>L,ul:()=>
126z,wI:()=>B}),r(57250) 127var i,n,s,o=r(41889),a=r(94600),l=r(25548),u=r(25341),c=r(63811),f=r(95612),d=r(69460),h=r(97906),p=r(9476),m=r(34935),g=r(67484);(s=i||(i={}))[s.Undefined=0]="Undefined",s[s.DefinedSize=1]="DefinedSize",s[s.DefinedScale=2]="DefinedScale",function(e){e[e.Undefined=0]="Undefined",e[e.DefinedAngle=1]="DefinedAngle"}(n||(n={})) 128class _{constructor(e){this.field=e}}class y extends _{constructor(e){super(e),this.minSize=[0,0,0],this.maxSize=[0,0,0],this.offset=[0,0,0],this.factor=[0,0,0],this.type=[i.Undefined,i.Undefined,i.Undefined]}}class v extends _{constructor(e){super(e),this.colors=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.values=[0,0,0,0,0,0,0,0]}}class T extends _{constructor(e){super(e),this.values=[0,0,0,0,0,0,0,0],this.opacityValues=[0,0,0,0,0,0,0,0]}}class A{}function E(e){return null!=e}function b(e,t){e&&e.push(t)}function x(e,t,r,n,s){const o=e.minSize,a=e.maxSize 129if(e.useSymbolValue){const e=n.symbolSize[r] 130return t.minSize[r]=e,t.maxSize[r]=e,t.offset[r]=t.minSize[r],t.factor[r]=0,t.type[r]=i.DefinedSize,!0}if(E(e.field))return E(e.stops)?2===e.stops.length&&(0,p.Et)(e.stops[0].size)&&(0,p.Et)(e.stops[1].size)?(S(e.stops[0].size,e.stops[1].size,e.stops[0].value,e.stops[1].value,t,r),t.type[r]=i.DefinedSize,!0):(b(s,"Could not convert size info: stops only supported with 2 elements"),!1):(0,p.Et)(o)&&(0,p.Et)(a)&&E(e.minDataValue)&&E(e.maxDataValue)?(S(o,a,e.minDataValue,e.maxDataValue,t,r),t.type[r]=i.DefinedSize,!0):"unknown"===e.valueUnit?(b(s,"Could not convert size info: proportional size not supported"),!1):null!=h.j[e.valueUnit]?(t.minSize[r]=-1/0,t.maxSize[r]=1/0,t.offset[r]=0,t.factor[r]=1/h.j[e.valueUnit],t.type[r]=i.DefinedSize,!0):(b(s,"Could not convert size info: scale-dependent size not supported"),!1) 131if(!E(e.field)){if(e.stops?.[0]&&(0,p.Et)(e.stops[0].size))return t.minSize[r]=e.stops[0].size,t.maxSize[r]=e.stops[0].size,t.offset[r]=t.minSize[r],t.factor[r]=0,t.type[r]=i.DefinedSize,!0 132if((0,p.Et)(o))return t.minSize[r]=o,t.maxSize[r]=o,t.offset[r]=o,t.factor[r]=0,t.type[r]=i.DefinedSize,!0}return b(s,"Could not convert size info: unsupported variant of sizeInfo"),!1}function S(e,t,r,i,n,s){const o=Math.abs(i-r)>0?(t-e)/(i-r):0 133n.minSize[s]=o>0?e:t,n.maxSize[s]=o>0?t:e,n.offset[s]=e-r*o,n.factor[s]=o}function w(e,t,r){e[4*t]=r.r/255,e[4*t+1]=r.g/255,e[4*t+2]=r.b/255,e[4*t+3]=r.a}function C(e,t,r){const i=2===r&&"arithmetic"===e.rotationType 134t.offset[r]=i?90:0,t.factor[r]=i?-1:1,t.type[r]=1}class B{constructor(e,t=[1,1,1],r=[1,1,1],i=1,n=[0,0,0],s=[1,1,1],o=[0,0,0]){this.supports=e,this.modelSize=t,this.symbolSize=r,this.unitInMeters=i,this.anchor=n,this.scale=s,this.rotation=o}}function O(e,t,r){if(!e)return null 135const n=e.reduce(((e,i)=>{if(!e)return e 136if(i.valueExpression)return b(r,"Could not convert visual variables: arcade expressions not supported"),null 137switch(i.type){case"size":return t.supports.size?function(e,t,r,i){if(e.normalizationField||e.valueRepresentation)return b(i,"Could not convert size info: unsupported property"),null 138if(!(0,p.CO)(e.field))return b(i,"Could not convert size info: field is not a string"),null 139if(t.size){if(e.field)if(t.size.field){if(e.field!==t.size.field)return b(i,"Could not convert size info: multiple fields in use"),null}else t.size.field=e.field}else t.size=new y(e.field) 140let n 141switch(e.axis){case"width":return n=x(e,t.size,0,r,i),n?t:null 142case"height":return n=x(e,t.size,2,r,i),n?t:null 143case"depth":return n=x(e,t.size,1,r,i),n?t:null 144case"width-and-depth":return n=x(e,t.size,0,r,i),n&&x(e,t.size,1,r,i),n?t:null 145case null:case void 0:case"all":return n=x(e,t.size,0,r,i),n=n&&x(e,t.size,1,r,i),n=n&&x(e,t.size,2,r,i),n?t:null 146default:return b(i,`Could not convert size info: unknown axis "${e.axis}""`),null}}(i,e,t,r):e 147case"color":return t.supports.color?function(e,t,r){if(e.normalizationField)return b(r,"Could not convert color info: unsupported property"),null 148if((0,p.Kg)(e.field)){if(!e.stops)return b(r,"Could not convert color info: missing stops or colors"),null 149{if(e.stops.length>8)return b(r,"Could not convert color info: too many color stops"),null 150t.color=new v(e.field) 151const i=e.stops 152for(let e=0;e<8;++e){const r=i[Math.min(e,i.length-1)] 153t.color.values[e]=r.value,w(t.color.colors,e,r.color)}}}else{if(!(e.stops&&e.stops.length>=0))return b(r,"Could not convert color info: no field and no colors/stops"),null 154{const r=e.stops&&e.stops.length>=0&&e.stops[0].color 155t.color={field:null,values:[0,0,0,0,0,0,0,0],colors:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]} 156for(let e=0;e<8;e++)t.color.values[e]=1/0,w(t.color.colors,e,r)}}return t}(i,e,r):e 157case"opacity":return t.supports.opacity?function(e,t,r){if(e.normalizationField)return b(r,"Could not convert opacity info: unsupported property"),null
158if((0,p.Kg)(e.field)){if(!e.stops)return b(r,"Could not convert opacity info: missing stops or opacities"),null 159{if(e.stops.length>8)return b(r,"Could not convert opacity info: too many opacity stops"),null 160t.opacity=new T(e.field) 161const i=e.stops 162for(let e=0;e<8;++e){const r=i[Math.min(e,i.length-1)] 163t.opacity.values[e]=r.value,t.opacity.opacityValues[e]=r.opacity}}}else{if(!(e.stops&&e.stops.length>=0))return b(r,"Could not convert opacity info: no field and no opacities/stops"),null 164{const r=e.stops&&e.stops.length>=0?e.stops[0].opacity:0 165t.opacity={field:null,values:[0,0,0,0,0,0,0,0],opacityValues:[0,0,0,0,0,0,0,0]} 166for(let e=0;e<8;e++)t.opacity.values[e]=1/0,t.opacity.opacityValues[e]=r}}return t}(i,e,r):null 167case"rotation":return t.supports.rotation?function(e,t,r){if(!(0,p.Kg)(e.field))return b(r,"Could not convert rotation info: field is not a string"),null 168if(t.rotation){if(e.field)if(t.rotation.field){if(e.field!==t.rotation.field)return b(r,"Could not convert rotation info: multiple fields in use"),null}else t.rotation.field=e.field}else t.rotation={field:e.field,offset:[0,0,0],factor:[1,1,1],type:[0,0,0]} 169switch(e.axis){case"tilt":return C(e,t.rotation,0),t 170case"roll":return C(e,t.rotation,1),t 171case null:case void 0:case"heading":return C(e,t.rotation,2),t 172default:return b(r,`Could not convert rotation info: unknown axis "${e.axis}""`),null}}(i,e,r):e 173default:return null}}),new A) 174return!(e.length>0&&n)||n.size||n.color||n.opacity||n.rotation?n?.size&&!function(e,t,r){for(let s=0;s<3;++s){let r=t.unitInMeters 175e.type[s]===i.DefinedSize&&(r*=t.modelSize[s],e.type[s]=i.DefinedScale),e.minSize[s]=e.minSize[s]/r,e.maxSize[s]=e.maxSize[s]/r,e.offset[s]=e.offset[s]/r,e.factor[s]=e.factor[s]/r}let n 176if(e.type[0]!==i.Undefined)n=0 177else if(e.type[1]!==i.Undefined)n=1 178else{if(e.type[2]===i.Undefined)return b(r,"No size axis contains a valid size or scale"),!1 179n=2}for(let s=0;s<3;++s)e.type[s]===i.Undefined&&(e.minSize[s]=e.minSize[n],e.maxSize[s]=e.maxSize[n],e.offset[s]=e.offset[n],e.factor[s]=e.factor[n],e.type[s]=e.type[n]) 180return!0}(n.size,t,r)?null:n:null}class I{constructor(e,t,r){this.visualVariables=e,this.materialParameters=t,this.requiresShaderTransformation=r}}function L(e,t){if(!e)return null 181if(m.b.TESTS_DISABLE_FAST_UPDATES)return null 182const r=O(e.visualVariables,t) 183return r?new I(r,N(r,t),!!r.size):null}function P(e,t,r){if(!t||!e)return!1 184const i=e.visualVariables,n=O(t.visualVariables,r) 185return!!n&&!!(M(i.size,n.size,"size")&&M(i.color,n.color,"color")&&M(i.rotation,n.rotation,"rotation")&&M(i.opacity,n.opacity,"opacity"))&&(e.visualVariables=n,e.materialParameters=N(n,r),e.requiresShaderTransformation=!!n.size,!0)}function M(e,t,r){if(!!e!=!!t)return!1 186if(e&&e.field!==t?.field)return!1 187if(e&&"rotation"===r){const r=e,i=t 188for(let e=0;e<3;e++)if(r.type[e]!==i.type[e]||r.offset[e]!==i.offset[e]||r.factor[e]!==i.factor[e])return!1}return!0}class R extends g.Y{constructor(e){super(),this.vvSize=e?.size??null,this.vvColor=e?.color??null,this.vvOpacity=e?.opacity??null}}function N(e,t){const r=new R(e) 189return r.vvSize&&(r.vvSymbolAnchor=t.anchor,(0,u.D_)(V),function(e,t,r,i=(0,c.vt)()){const n=e||0,s=t||0,o=r||0 1900!==n&&(0,u.Qr)(i,i,-n/180*Math.PI),0!==s&&(0,u.eL)(i,i,s/180*Math.PI),0!==o&&(0,u.Z8)(i,i,o/180*Math.PI)}(t.rotation[2],t.rotation[0],t.rotation[1],V),r.vvSymbolRotationMatrix=r.vvSymbolRotationMatrix||(0,l.vt)(),(0,a.fromMat4)(r.vvSymbolRotationMatrix,V)),r}function D(e,t,r){if(!e.vvSize)return r;(0,u.C)(F,r) 191const i=e.vvSymbolRotationMatrix;(0,u.hZ)(V,i[0],i[1],i[2],0,i[3],i[4],i[5],0,i[6],i[7],i[8],0,0,0,0,1),(0,u.lw)(F,F,V) 192for(let n=0;n<3;++n){const r=e.vvSize.offset[n]+t[0]*e.vvSize.factor[n] 193H[n]=(0,o.qE)(r,e.vvSize.minSize[n],e.vvSize.maxSize[n])}return(0,u.hs)(F,F,H),(0,u.Tl)(F,F,e.vvSymbolAnchor),F}function U(e,t,r){if(!t.vvSize)return(0,f.i)(e,1,1,1),e 194for(let i=0;i<3;++i){const n=t.vvSize.offset[i]+r[0]*t.vvSize.factor[i] 195e[i]=(0,o.qE)(n,t.vvSize.minSize[i],t.vvSize.maxSize[i])}return e}function z(e,t){const r=null==e?0:t.attributes[e] 196return"number"==typeof r&&isFinite(r)?r:0}const F=(0,c.vt)(),H=(0,d.vt)(),V=(0,c.vt)()},19393:(e,t,r)=>{r.d(t,{BP:()=>l,l5:()=>u,q3:()=>a}) 197var i=r(14061),n=r(89489),s=r(830) 198class o{constructor(e,t){this.layout=e,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t 199for(const r of e.fields.keys()){const t=e.fields.get(r) 200this[r]=new t.constructor(this.buffer,t.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(e,t){const r=this[e]
201return r&&r.elementCount===t.ElementCount&&r.elementType===t.ElementType?r:null}slice(e,t){return new o(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,r=0,i=e.count){const n=this.stride 202if(n%4==0){const s=new Uint32Array(e.buffer,t*n,i*n/4) 203new Uint32Array(this.buffer,r*n,i*n/4).set(s)}else{const s=new Uint8Array(e.buffer,t*n,i*n) 204new Uint8Array(this.buffer,r*n,i*n).set(s)}return this}get cachedMemory(){return this.byteLength}dispose(){}}class a{constructor(e){this._stride=0,this._lastAligned=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach((e=>this._fields.set(e[0],{...e[1],constructor:d(e[1].constructor)}))))}freeze(){return this}vec2f(e,t){return this._appendField(e,i.gH,t),this}vec2f64(e,t){return this._appendField(e,i.si,t),this}vec3f(e,t){return this._appendField(e,i.xs,t),this}vec3f64(e,t){return this._appendField(e,i.Xm,t),this}vec4f(e,t){return this._appendField(e,i.Eq,t),this}vec4f64(e,t){return this._appendField(e,i.Aj,t),this}mat3f(e,t){return this._appendField(e,i.jZ,t),this}mat3f64(e,t){return this._appendField(e,i.j0,t),this}mat4f(e,t){return this._appendField(e,i.Sx,t),this}mat4f64(e,t){return this._appendField(e,i.E$,t),this}
204vec4u8(e,t){return this._appendField(e,i.XP,t),this}f32(e,t){return this._appendField(e,i.Y$,t),this}f64(e,t){return this._appendField(e,i.qB,t),this}u8(e,t){return this._appendField(e,i.SL,t),this}u16(e,t){return this._appendField(e,i.h,t),this}i8(e,t){return this._appendField(e,i.bf,t),this}vec2i8(e,t){return this._appendField(e,i.D6,t),this}vec2i16(e,t){return this._appendField(e,i.mJ,t),this}vec2u8(e,t){return this._appendField(e,i.LC,t),this}vec4u16(e,t){return this._appendField(e,i.Uz,t),this}u32(e,t){return this._appendField(e,i.P,t),this}_appendField(e,t,r){if(this._fields.has(e))return void(0,s.vA)(!1,`${e} already added to vertex buffer layout`) 205const i=t.ElementCount*(0,n.GJ)(t.ElementType),o=this._stride 206this._stride+=i,this._fields.set(e,{size:i,constructor:t,offset:o,optional:r})}createBuffer(e){return new o(this,e)}createView(e){return new o(this,e)}clone(){const e=new a 207return e._stride=this._stride,e._fields=new Map,this._fields.forEach(((t,r)=>e._fields.set(r,t))),e.BufferType=this.BufferType,e}get stride(){if(this._lastAligned!==this._fields.size){let e=1 208this._fields.forEach((t=>e=Math.max(e,(0,n.GJ)(t.constructor.ElementType)))),this._stride=Math.floor((this._stride+e-1)/e)*e,this._lastAligned=this._fields.size}return this._stride}get fields(){return this._fields}}function l(){return new a}class u{constructor(e){this.fields=new Array,e.fields.forEach(((e,t)=>{const r={...e,constructor:f(e.constructor)} 209this.fields.push([t,r])})),this.stride=e.stride}}const c=[i.Y$,i.gH,i.xs,i.Eq,i.jZ,i.Sx,i.qB,i.si,i.Xm,i.Aj,i.j0,i.E$,i.SL,i.LC,i.eI,i.XP,i.h,i.Yi,i.nS,i.Uz,i.P,i.An,i.H$,i.ml,i.bf,i.D6,i.m8,i.TX,i.Qt,i.mJ,i.Vp,i.E7,i.My,i.UL,i.zD,i.Y4] 210function f(e){return`${e.ElementType}_${e.ElementCount}`}function d(e){return h.get(e)}const h=new Map 211c.forEach((e=>h.set(f(e),e)))},25286:(e,t,r)=>{r.d(t,{y:()=>n}) 212var i=r(58719) 213function n(e){const{fragment:t}=e 214t.code.add(i.H`uint readChannelBits(uint channel, int highlightLevel) { 215int llc = (highlightLevel & 3) << 1; 216return (channel >> llc) & 3u; 217} 218uint readChannel(vec2 texel, int highlightLevel) { 219int lic = (highlightLevel >> 2) & 1; 220return uint(texel[lic] * 255.0); 221} 222uint readLevelBits(vec2 texel, int highlightLevel) { 223return readChannelBits(readChannel(texel, highlightLevel), highlightLevel); 224}`)}},72481:(e,t,r)=>{var i 225function n(e){return e===i.Shadow||e===i.ShadowHighlight||e===i.ShadowExcludeHighlight||e===i.ViewshedShadow}function s(e){return function(e){return p(e)||_(e)}(e)||e===i.Normal}function o(e){return g(e)||e===i.Normal}function a(e){return e===i.Highlight||e===i.ObjectAndLayerIdColor}function l(e){return u(e)||a(e)}function u(e){return e===i.Color}function c(e){return u(e)||y(e)}function f(e){return u(e)||e===i.ObjectAndLayerIdColor}function d(e){return c(e)||e===i.ObjectAndLayerIdColor}function h(e){return function(e){return u(e)||e===i.Highlight}(e)||_(e)}function p(e){return u(e)||a(e)}function m(e){return c(e)||a(e)}function g(e){return m(e)||_(e)}function _(e){return e===i.Depth}function y(e){return e===i.ColorEmission}r.d(t,{CL:()=>a,LG:()=>y,Mb:()=>m,PJ:()=>n,QG:()=>d,RN:()=>c,T2:()=>g,V:()=>i,XY:()=>s,_o:()=>u,aD:()=>h,dX:()=>p,eh:()=>_,i3:()=>l,iq:()=>o,zW:()=>f}),function(e){e[e.Color=0]="Color",e[e.ColorEmission=1]="ColorEmission",e[e.Depth=2]="Depth",e[e.Normal=3]="Normal",e[e.Shadow=4]="Shadow",e[e.ShadowHighlight=5]="ShadowHighlight",e[e.ShadowExcludeHighlight=6]="ShadowExcludeHighlight",e[e.ViewshedShadow=7]="ViewshedShadow",e[e.Highlight=8]="Highlight",e[e.ObjectAndLayerIdColor=9]="Ob
225jectAndLayerIdColor",e[e.COUNT=10]="COUNT"}(i||(i={}))},24921:(e,t,r)=>{r.d(t,{HQ:()=>h,S4:()=>d,dk:()=>f,rA:()=>p}) 226var i=r(25341),n=r(63811),s=r(95612),o=r(69460),a=r(2848),l=r(76105),u=r(58719),c=r(67484) 227class f extends c.Y{constructor(e){super(),this.slicePlaneLocalOrigin=e}}function d(e,t){_(e,t,new l.t("slicePlaneOrigin",((e,r)=>A(t,e,r))),new l.t("slicePlaneBasis1",((e,r)=>E(t,e,r,r.slicePlane?.basis1))),new l.t("slicePlaneBasis2",((e,r)=>E(t,e,r,r.slicePlane?.basis2))))}function h(e,t){_(e,t,new a.W("slicePlaneOrigin",((e,r)=>A(t,e,r))),new a.W("slicePlaneBasis1",((e,r)=>E(t,e,r,r.slicePlane?.basis1))),new a.W("slicePlaneBasis2",((e,r)=>E(t,e,r,r.slicePlane?.basis2))))}function p(e,t){g(e,t,new a.W("slicePlaneOrigin",((e,r)=>A(t,e,r))),new a.W("slicePlaneBasis1",((e,r)=>E(t,e,r,r.slicePlane?.basis1))),new a.W("slicePlaneBasis2",((e,r)=>E(t,e,r,r.slicePlane?.basis2))))}const m=u.H`struct SliceFactors { 228float front; 229float side0; 230float side1; 231float side2; 232float side3; 233}; 234SliceFactors calculateSliceFactors(vec3 pos) { 235vec3 rel = pos - slicePlaneOrigin; 236vec3 slicePlaneNormal = -cross(slicePlaneBasis1, slicePlaneBasis2); 237float slicePlaneW = -dot(slicePlaneNormal, slicePlaneOrigin); 238float basis1Len2 = dot(slicePlaneBasis1, slicePlaneBasis1); 239float basis2Len2 = dot(slicePlaneBasis2, slicePlaneBasis2); 240float basis1Dot = dot(slicePlaneBasis1, rel); 241float basis2Dot = dot(slicePlaneBasis2, rel); 242return SliceFactors( 243dot(slicePlaneNormal, pos) + slicePlaneW, 244-basis1Dot - basis1Len2, 245basis1Dot - basis1Len2, 246-basis2Dot - basis2Len2, 247basis2Dot - basis2Len2 248); 249} 250bool sliceByFactors(SliceFactors factors) { 251return factors.front < 0.0 252&& factors.side0 < 0.0 253&& factors.side1 < 0.0 254&& factors.side2 < 0.0 255&& factors.side3 < 0.0; 256} 257bool sliceEnabled() { 258return dot(slicePlaneBasis1, slicePlaneBasis1) != 0.0; 259} 260bool sliceByPlane(vec3 pos) { 261return sliceEnabled() && sliceByFactors(calculateSliceFactors(pos)); 262} 263bool rejectBySlice(vec3 pos) { 264return sliceByPlane(pos); 265}` 266function g(e,t,...r){t.hasSlicePlane?(e.uniforms.add(...r),e.code.add(m)):e.code.add("bool rejectBySlice(vec3 pos) { return false; }")}function _(e,t,...r){g(e,t,...r),t.hasSlicePlane?e.code.add("\n void discardBySlice(vec3 pos) {\n if (sliceByPlane(pos)) {\n discard;\n }\n }\n\n vec4 applySliceOutline(vec4 color, vec3 pos) {\n SliceFactors factors = calculateSliceFactors(pos);\n\n factors.front /= 2.0 * fwidth(factors.front);\n factors.side0 /= 2.0 * fwidth(factors.side0);\n factors.side1 /= 2.0 * fwidth(factors.side1);\n factors.side2 /= 2.0 * fwidth(factors.side2);\n factors.side3 /= 2.0 * fwidth(factors.side3);\n\n // return after calling fwidth, to avoid aliasing caused by discontinuities in the input to fwidth\n if (sliceByFactors(factors)) {\n return color;\n }\n\n float outlineFactor = (1.0 - step(0.5, factors.front))\n * (1.0 - step(0.5, factors.side0))\n * (1.0 - step(0.5, factors.side1))\n * (1.0 - step(0.5, factors.side2))\n * (1.0 - step(0.5, factors.side3));\n\n return mix(color, vec4(vec3(0.0), color.a), outlineFactor * 0.3);\n }\n\n vec4 applySlice(vec4 color, vec3 pos) {\n return sliceEnabled() ? applySliceOutline(color, pos) : color;\n }\n "):e.code.add(u.H`void discardBySlice(vec3 pos) { } 267vec4 applySlice(vec4 color, vec3 pos) { return color; }`)}function y(e,t,r){return e.instancedDoublePrecision?(0,s.i)(b,r.camera.viewInverseTransposeMatrix[3],r.camera.viewInverseTransposeMatrix[7],r.camera.viewInverseTransposeMatrix[11]):t.slicePlaneLocalOrigin}function v(e,t){return null!=e?(0,s.d)(x,t.origin,e):t.origin}function T(e,t,r){return e.hasSliceTranslatedView?null!=t?(0,i.Tl)(w,r.camera.viewMatrix,t):r.camera.viewMatrix:null}function A(e,t,r){if(null==r.slicePlane)return o.uY 268const i=y(e,t,r),n=v(i,r.slicePlane),a=T(e,i,r) 269return null!=a?(0,s.t)(x,n,a):n}function E(e,t,r,i){if(null==i||null==r.slicePlane)return o.uY 270const n=y(e,t,r),a=v(n,r.slicePlane),l=T(e,n,r) 271return null!=l?((0,s.g)(S,i,a),(0,s.t)(x,a,l),(0,s.t)(S,S,l),(0,s.d)(S,S,x)):i}const b=(0,o.vt)(),x=(0,o.vt)(),S=(0,o.vt)(),w=(0,n.vt)()},9620:(e,t,r)=>{r.d(t,{g:()=>o}) 272var i=r(72481),n=r(58719),s=r(60026) 273function o(e,t){if(t.output!==i.V.ObjectAndLayerIdColor)return e.vertex.code.add(n.H`void forwardObjectAndLayerIdColor() {}`),void e.fragment.code.add(n.H`void outputObjectAndLayerIdColor() {}`) 274const r=t.objectAndLayerIdColorInstanced 275e.varyings.add("objectAndLayerIdColorVarying","vec4"),e.attributes.add(r?s.r.INSTANCEOBJECTANDLAYERIDCOLOR:s.r.OBJECTANDLAYERIDCOLOR,"vec4"),e.vertex.code.add(n.H` 276 void forwardObjectAndLayerIdColor() { 277 objectAndLayerIdColorVarying = ${r?"instanceObjectAndLayerIdColor":"objectAndLayerIdColor"} * 0.003921568627451; 278 }`),e.fragment.code.add(n.H`void outputObjectAndLayerIdColor() { 279fragColor = objectAndLayerIdColorVarying; 280}`)}},82292:(e,t,r)=>{r.d(t,{I:()=>i,U:()=>l}) 281var i,n,s=r(58960),o=r(58719),a=r(60026) 282function l(e,t){switch(t.textureCoordinateType){case i.Default:return e.attributes.add(a.r.UV0,"vec2"),e.varyings.add("vuv0","vec2"),void e.vertex.code.add(o.H`void forwardTextureCoordinates() { 283vuv0 = uv0; 284}`) 285case i.Compressed:return e.attributes.add(a.r.UV0,"vec2"),e.varyings.add("vuv0","vec2"),void e.vertex.code.add(o.H`vec2 getUV0() { 286return uv0 / 16384.0; 287} 288void forwardTextureCoordinates() { 289vuv0 = getUV0(); 290}`) 291case i.Atlas:return e.attributes.add(a.r.UV0,"vec2"),e.varyings.add("vuv0","vec2"),e.attributes.add(a.r.UVREGION,"vec4"),e.varyings.add("vuvRegion","vec4"),void e.vertex.code.add(o.H`void forwardTextureCoordinates() { 292vuv0 = uv0; 293vuvRegion = uvRegion; 294}`) 295default:(0,s.Xb)(t.textureCoordinateType) 296case i.None:return void e.vertex.code.add(o.H`void forwardTextureCoordinates() {}`) 297case i.COUNT:return}}(n=i||(i={}))[n.None=0]="None",n[n.Default=1]="Default",n[n.Atlas=2]="Atlas",n[n.Compressed=3]="Compressed",n[n.COUNT=4]="COUNT"},13069:(e,t,r)=>{r.d(t,{r:()=>o}) 298var i=r(82292),n=r(65668),s=r(58719) 299function o(e,t){const{textureCoordinateType:r}=t 300if(r===i.I.None||r===i.I.COUNT)return 301e.include(i.U,t) 302const o=r===i.I.Atlas 303o&&e.include(n.r),e.fragment.code.add(s.H` 304 vec4 textureLookup(sampler2D tex, vec2 uv) { 305 return ${o?"textureAtlasLookup(tex, uv, vuvRegion)":"texture(tex, uv)"}; 306 } 307 `)}},86329:(e,t,r)=>{r.d(t,{NL:()=>h,ZX:()=>i}) 308var i,n,s=r(72481),o=r(13069),a=r(2848),l=r(76105),u=r(58719),c=r(642),f=r(13955),d=(r(5167),r(95332)) 309function h(e,t){if(!(0,s.RN)(t.output))return 310const{emissionSource:r,hasEmissiveTextureTransform:n,bindType:h}=t,p=r===i.Texture 311p&&(e.include(o.r,t),e.fragment.uniforms.add(h===d.c.Pass?new f.N("texEmission",(e=>e.textureEmissive)):new c.o("texEmission",(e=>e.textureEmissive)))) 312const m=r===i.Value||p 313m&&e.fragment.uniforms.add(h===d.c.Pass?new l.t("emissionFactor",(e=>e.emissiveFactor)):new a.W("emissionFactor",(e=>e.emissiveFactor))),e.fragment.code.add(u.H` 314 vec4 getEmissions() { 315 vec4 emissions = ${m?"vec4(emissionFactor, 1.0)":"vec4(0.0)"}; 316 ${(0,u.If)(p,`emissions *= textureLookup(texEmission, ${n?"emissiveUV":"vuv0"});\n emissions.w = emissions.rgb == vec3(0.0) ? 0.0: emissions.w;`)} 317 return emissions; 318 } 319 `)}(n=i||(i={}))[n.None=0]="None",n[n.Value=1]="Value",n[n.Texture=2]="Texture",n[n.COUNT=3]="COUNT"},40180:(e,t,r)=>{r.d(t,{Q:()=>f}) 320var i=r(25286),n=r(72481),s=r(58719),o=r(95332),a=r(85919) 321class l extends a.n{constructor(e,t){super(e,"ivec2",o.c.Bind,((r,i)=>r.setUniform2iv(e,t(i))))}}var u=r(8032),c=r(75793) 322function f(e,t){const{fragment:r}=e 323t.output===n.V.Highlight?(r.uniforms.add(new c.x("depthTexture",(e=>e.mainDepth)),new c.x("highlightTexture",(e=>e.highlightMixTexture)),new u.W("highlightLevel",(e=>e.highlightLevel??0)),new l("highlightMixOrigin",(e=>e.highlightMixOrigin))),e.outputs.add("fragHighlight","vec2",0),e.include(i.y),r.code.add(s.H`vec2 getAccumulatedHighlight() { 324return texelFetch(highlightTexture, ivec2(gl_FragCoord.xy) - highlightMixOrigin, 0).rg; 325} 326void outputHighlight(bool occluded) { 327if (highlightLevel == 0) { 328uint bits = occluded ? 3u : 1u; 329fragHighlight = vec2(float(bits) / 255.0, 0.0); 330} else { 331int ll = (highlightLevel & 3) << 1; 332int li = (highlightLevel >> 2) & 3; 333uint bits; 334if (occluded) { 335bits = 3u << ll; 336} else { 337bits = 1u << ll; 338} 339vec2 combinedHighlight = getAccumulatedHighlight(); 340uint accumulatedI = uint(combinedHighlight[li] * 255.0); 341combinedHighlight[li] = float(bits | accumulatedI) / 255.0; 342fragHighlight = combinedHighlight; 343} 344} 345bool isHighlightOccluded() { 346float sceneDepth = texelFetch(depthTexture, ivec2(gl_FragCoord.xy), 0).x; 347return gl_FragCoord.z > sceneDepth + 5e-7; 348} 349void calculateOcclusionAndOutputHighlight() { 350outputHighlight(isHighlightOccluded()); 351}`),t.canHaveOverlay&&r.code.add(s.H`void calculateOcclusionAndOutputHighlightOverlay(vec2 highlightToAdd) { 352uint levelBits = readLevelBits(highlightToAdd, highlightLevel); 353if ((levelBits & 1u) == 0u) { discard; } 354outputHighlight(isHighlightOccluded()); 355}`)):r.code.add(s.H`void calculateOcclusionAndOutputHighlight() {}`)}},51414:(e,t,r)=>{r.d(t,{E:()=>a}) 356var i=r(13775),n=r(85437),s=r(9566),o=r(58719) 357function a(e){e.uniforms.add(new s.E("zProjectionMap",(e=>function(e){const t=e.projectionMatrix 358return(0,i.set)(l,t[14],t[10])}(e.camera)))),e.code.add(o.H`float linearizeDepth(float depth) { 359float depthNdc = depth * 2.0 - 1.0; 360float c1 = zProjectionMap[0]; 361float c2 = zProjectionMap[1]; 362return -(c1 / (depthNdc + c2 + 1e-7)); 363}`),e.code.add(o.H`float depthFromTexture(sampler2D depthTexture, vec2 uv) { 364ivec2 iuv = ivec2(uv * vec2(textureSize(depthTexture, 0))); 365float depth = texelFetch(depthTexture, iuv, 0).r; 366return depth; 367}`),e.code.add(o.H`float linearDepthFromTexture(sampler2D depthTexture, vec2 uv) { 368return linearizeDepth(depthFromTexture(depthTexture, uv)); 369}`)}const l=(0,n.vt)()},86432:(e,t,r)=>{function i(e){const t=3.141592653589793,r=.3183098861837907 370e.vertex.constants.add("PI","float",t),e.fragment.constants.add("PI","float",t),e.fragment.constants.add("LIGHT_NORMALIZATION","float",r),e.fragment.constants.add("INV_PI","float",r),e.fragment.constants.add("HALF_PI","float",1.570796326794897),e.fragment.constants.add("TWO_PI","float",6.28318530717958)}r.d(t,{p:()=>i})},83332:(e,t,r)=>{r.d(t,{Z:()=>o}) 371var i=r(51414),n=r(58719),s=r(75793) 372function o(e,{occlusionPass:t,terrainDepthTest:r,cullAboveTerrain:o}){const a=e.vertex,l=e.fragment 373if(!r)return a.code.add("void forwardViewPosDepth(vec3 pos) {}"),void l.code.add(`${t?"bool":"void"} discardByTerrainDepth() { ${(0,n.If)(t,"return false;")}}`) 374e.varyings.add("viewPosDepth","float"),a.code.add("void forwardViewPosDepth(vec3 pos) {\n viewPosDepth = pos.z;\n }"),l.include(i.E),l.uniforms.add(new s.x("terrainDepthTexture",(e=>e.terrainDepth?.attachment))).code.add(n.H` 375 ${t?"bool":"void"} discardByTerrainDepth() { 376 float depth = texelFetch(terrainDepthTexture, ivec2(gl_FragCoord.xy), 0).r; 377 float linearDepth = linearizeDepth(depth); 378 ${t?"return viewPosDepth < linearDepth && depth < 1.0;":`if(viewPosDepth ${o?">":"<="} linearDepth) discard;`} 379 }`)}},9775:(e,t,r)=>{r.d(t,{A:()=>c}) 380var i=r(76105),n=r(33177),s=r(21385),o=r(58719),a=r(96926),l=r(60026),u=r(7088) 381function c(e,t){const{vertex:r,attributes:c}=e 382t.hasVvInstancing&&(t.vvSize||t.vvColor)&&c.add(l.r.INSTANCEFEATUREATTRIBUTE,"vec4"),t.vvSize?(r.uniforms.add(new i.t("vvSizeMinSize",(e=>e.vvSize.minSize))),r.uniforms.add(new i.t("vvSizeMaxSize",(e=>e.vvSize.maxSize))),r.uniforms.add(new i.t("vvSizeOffset",(e=>e.vvSize.offset))),r.uniforms.add(new i.t("vvSizeFactor",(e=>e.vvSize.factor))),r.uniforms.add(new a.k("vvSymbolRotationMatrix",(e=>e.vvSymbolRotationMatrix))),r.uniforms.add(new i.t("vvSymbolAnchor",(e=>e.vvSymbolAnchor))),r.code.add(o.H`vec3 vvScale(vec4 _featureAttribute) { 383return clamp(vvSizeOffset + _featureAttribute.x * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize); 384} 385vec4 vvTransformPosition(vec3 position, vec4 _featureAttribute) { 386return vec4(vvSymbolRotationMatrix * ( vvScale(_featureAttribute) * (position + vvSymbolAnchor)), 1.0); 387}`),r.code.add(o.H` 388 const float eps = 1.192092896e-07; 389 vec4 vvTransformNormal(vec3 _normal, vec4 _featureAttribute) { 390 vec3 vvScale = clamp(vvSizeOffset + _featureAttribute.x * vvSizeFactor, vvSizeMinSize + eps, vvSizeMaxSize); 391 return vec4(vvSymbolRotationMatrix * _normal / vvScale, 1.0); 392 } 393 394 ${t.hasVvInstancing?o.H` 395 vec4 vvLocalNormal(vec3 _normal) { 396 return vvTransformNormal(_normal, instanceFeatureAttribute); 397 } 398 399 vec4 localPosition() { 400 return vvTransformPosition(position, instanceFeatureAttribute); 401 }`:""} 402 `)):r.code.add(o.H`vec4 localPosition() { return vec4(position, 1.0
402); } 403vec4 vvLocalNormal(vec3 _normal) { return vec4(_normal, 1.0); }`),t.vvColor?(r.constants.add("vvColorNumber","int",u.p),r.uniforms.add(new s.x("vvColorValues",(e=>e.vvColor.values),u.p),new n.F("vvColorColors",(e=>e.vvColor.colors),u.p)),r.code.add(o.H` 404 vec4 interpolateVVColor(float value) { 405 if (value <= vvColorValues[0]) { 406 return vvColorColors[0]; 407 } 408 409 for (int i = 1; i < vvColorNumber; ++i) { 410 if (vvColorValues[i] >= value) { 411 float f = (value - vvColorValues[i-1]) / (vvColorValues[i] - vvColorValues[i-1]); 412 return mix(vvColorColors[i-1], vvColorColors[i], f); 413 } 414 } 415 return vvColorColors[vvColorNumber - 1]; 416 } 417 418 vec4 vvGetColor(vec4 featureAttribute) { 419 return interpolateVVColor(featureAttribute.y); 420 } 421 422 ${t.hasVvInstancing?o.H` 423 vec4 vvColor() { 424 return vvGetColor(instanceFeatureAttribute); 425 }`:"vec4 vvColor() { return vec4(1.0); }"} 426 `)):r.code.add(o.H`vec4 vvColor() { return vec4(1.0); }`)}},87031:(e,t,r)=>{r.d(t,{a:()=>n}) 427var i=r(58719) 428function n(e){e.code.add(i.H`vec4 premultiplyAlpha(vec4 v) { 429return vec4(v.rgb * v.a, v.a); 430} 431vec3 rgb2hsv(vec3 c) { 432vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); 433vec4 p = c.g < c.b ? vec4(c.bg, K.wz) : vec4(c.gb, K.xy); 434vec4 q = c.r < p.x ? vec4(p.xyw, c.r) : vec4(c.r, p.yzx); 435float d = q.x - min(q.w, q.y); 436float e = 1.0e-10; 437return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), min(d / (q.x + e), 1.0), q.x); 438} 439vec3 hsv2rgb(vec3 c) { 440vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); 441vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); 442return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); 443} 444float rgb2v(vec3 c) { 445return max(c.x, max(c.y, c.z)); 446}`)}},65668:(e,t,r)=>{r.d(t,{r:()=>n}) 447var i=r(58719) 448function n(e){e.fragment.code.add(i.H`vec4 textureAtlasLookup(sampler2D tex, vec2 textureCoordinates, vec4 atlasRegion) { 449vec2 atlasScale = atlasRegion.zw - atlasRegion.xy; 450vec2 uvAtlas = fract(textureCoordinates) * atlasScale + atlasRegion.xy; 451float maxdUV = 0.125; 452vec2 dUVdx = clamp(dFdx(textureCoordinates), -maxdUV, maxdUV) * atlasScale; 453vec2 dUVdy = clamp(dFdy(textureCoordinates), -maxdUV, maxdUV) * atlasScale; 454return textureGrad(tex, uvAtlas, dUVdx, dUVdy); 455}`)}},17235:(e,t,r)=>{r.d(t,{NB:()=>h,Nz:()=>_,S7:()=>g,yu:()=>d}) 456var i=r(25341),n=r(63811),s=r(95612),o=r(69460),a=r(16623),l=r(2848),u=r(16832),c=r(41283),f=r(8644) 457function d(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",o.uY):e.uniforms.add(new l.W("cameraPosition",((e,t)=>(0,s.i)(m,t.camera.viewInverseTransposeMatrix[3]-e.origin[0],t.camera.viewInverseTransposeMatrix[7]-e.origin[1],t.camera.viewInverseTransposeMatrix[11]-e.origin[2]))))}function h(e,t){if(!t.instancedDoublePrecision)return void e.uniforms.add(new c.F("proj",(e=>e.camera.projectionMatrix)),new f.S("view",((e,t)=>(0,i.Tl)(p,t.camera.viewMatrix,e.origin))),new l.W("localOrigin",(e=>e.origin))) 458const r=({camera:e})=>(0,s.i)(m,e.viewInverseTransposeMatrix[3],e.viewInverseTransposeMatrix[7],e.viewInverseTransposeMatrix[11]) 459e.uniforms.add(new c.F("proj",(e=>e.camera.projectionMatrix)),new c.F("view",(e=>(0,i.Tl)(p,e.camera.viewMatrix,r(e)))),new a.d("localOrigin",(e=>r(e))))}const p=(0,n.vt)(),m=(0,o.vt)() 460function g(e){e.uniforms.add(new c.F("viewNormal",(e=>e.camera.viewInverseTransposeMatrix)))}function _(e){e.uniforms.add(new u.U("pixelRatio",(e=>e.camera.pixelRatio/e.overlayStretch)))}},9566:(e,t,r)=>{r.d(t,{E:()=>s}) 461var i=r(95332),n=r(85919) 462class s extends n.n{constructor(e,t){super(e,"vec2",i.c.Bind,((r,i)=>r.setUniform2fv(e,t(i))))}}},16623:(e,t,r)=>{r.d(t,{d:()=>s}) 463var i=r(95332),n=r(85919) 464class s extends n.n{constructor(e,t){super(e,"vec3",i.c.Bind,((r,i)=>r.setUniform3fv(e,t(i))))}}},2848:(e,t,r)=>{r.d(t,{W:()=>s}) 465var i=r(95332),n=r(85919) 466class s extends n.n{constructor(e,t){super(e,"vec3",i.c.Draw,((r,i,n,s)=>r.setUniform3fv(e,t(i,n,s))))}}},76105:(e,t,r)=>{r.d(t,{t:()=>s}) 467var i=r(95332),n=r(85919) 468class s extends n.n{constructor(e,t){super(e,"vec3",i.c.Pass,((r,i,n)=>r.setUniform3fv(e,t(i,n))))}}},69520:(e,t,r)=>{r.d(t,{I:()=>s}) 469var i=r(95332),n=r(85919) 470class s extends n.n{constructor(e,t){super(e,"vec4",i.c.Bind,((r,i)=>r.setUniform4fv(e,t(i))))}}},39250:(e,t,r)=>{r.d(t,{E:()=>s}) 471var i=r(95332),n=r(85919) 472class s extends n.n{constructor(e,t){super(e,"vec4",i.c.Pass,((r,i,n)=>r.setUniform4fv(e,t(i,n))))}}},33177:(e,t,r)=>{r.d(t,{F:()=>s}) 473var i=r(95332),n=r(85919) 474class s extends n.n{constructor(e,t,r){super(e,"vec4",i.c.Pass,((r,i,n)=>r.setUniform4fv(e,t(i,n))),r)}}},16832:(e,t,r)=>{r.d(t,{U:()=>s}) 475var i=r(95332),n=r(85919) 476class s extends n.n{constructor(e,t){super(e,"float",i.c.Bind,((r,i)=>r.setUniform1f(e,t(i))))}}},55778:(e,t,r)=>{r.d(t,{m:()=>s}) 477var i=r(95332),n=r(85919) 478class s extends n.n{constructor(e,t){super(e,"float",i.c.Pass,((r,i,n)=>r.setUniform1f(e,t(i,n))))}}},21385:(e,t,r)=>{r.d(t,{x:()=>s}) 479var i=r(95332),n=r(85919) 480class s extends n.n{constructor(e,t,r){super(e,"float",i.c.Pass,((r,i,n)=>r.setUniform1fv(e,t(i,n))),r)}}},8032:(e,t,r)=>{r.d(t,{W:()=>s}) 481var i=r(95332),n=r(85919) 482class s extends n.n{constructor(e,t){super(e,"int",i.c.Bind,((r,i)=>r.setUniform1i(e,t(i))))}}},96926:(e,t,r)=>{r.d(t,{k:()=>s}) 483var i=r(95332),n=r(85919) 484class s extends n.n{constructor(e,t){super(e,"mat3",i.c.Pass,((r,i,n)=>r.setUniformMatrix3fv(e,t(i,n))))}}},41283:(e,t,r)=>{r.d(t,{F:()=>s}) 485var i=r(95332),n=r(85919) 486class s extends n.n{constructor(e,t){super(e,"mat4",i.c.Bind,((r,i)=>r.setUniformMatrix4fv(e,t(i))))}}},8644:(e,t,r)=>{r.d(t,{S:()=>s}) 487var i=r(95332),n=r(85919) 488class s extends n.n{constructor(e,t){super(e,"mat4",i.c.Draw,((r,i,n)=>r.setUniformMatrix4fv(e,t(i,n))))}}},75793:(e,t,r)=>{r.d(t,{x:()=>s}) 489var i=r(95332),n=r(85919) 490class s extends n.n{constructor(e,t){super(e,"sampler2D",i.c.Bind,((r,i)=>r.bindTexture(e,t(i))))}}},642:(e,t,r)=>{r.d(t,{o:()=>s}) 491var i=r(95332),n=r(85919) 492class s extends n.n{constructor(e,t){super(e,"sampler2D",i.c.Draw,((r,i,n)=>r.bindTexture(e,t(i,n))))}}},13955:(e,t,r)=>{r.d(t,{N:()=>s}) 493var i=r(95332),n=r(85919) 494class s extends n.n{constructor(e,t){super(e,"sampler2D",i.c.Pass,((r,i,n)=>r.bindTexture(e,t(i,n))))}}},58719:(e,t,r)=>{function i(e,...t){let r="" 495for(let i=0;i<t.length;i++)r+=e[i]+t[i] 496return r+=e[e.length-1],r}function n(e,t,r=""){return e?t:r}r.d(t,{H:()=>i,If:()=>n}),function(e){e.int=function(e){return Math.round(e).toString()},e.float=function(e){return e.toPrecision(8)}}(i)},21678:(e,t,r)=>{r.d(t,{$:()=>i}) 497class i{constructor(e,t){this._module=e,this._load=t}get(){return this._module}async reload(){return this._module=await this._load(),this._module}}},77962:(e,t,r)=>{r.d(t,{w:()=>f}) 498var i=r(12752),n=r(92874),s=r(54531),o=r(53285),a=r(30322) 499class l{constructor(e,t,r){this._context=e,this._locations=r,this._textures=new Map,this._freeTextureUnits=new o.A({deallocator:null}),this._glProgram=e.programCache.acquire(t.generate("vertex",!0),t.generate("fragment",!0),r),this._glProgram.stop=()=>{throw new Error("Wrapped _glProgram used directly")},this.bind=t.generateBind(this),this.bindPass=t.generateBindPass(this),this.bindDraw=t.generateBindDraw(this),this._fragmentUniforms=(0,a.en)()?t.fragmentUniforms:null}dispose(){this._glProgram.dispose()}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}setUniform1b(e,t){this._glProgram.setUniform1i(e,t?1:0)}setUniform1i(e,t){this._glProgram.setUniform1i(e,t)}setUniform1f(e,t){this._glProgram.setUniform1f(e,t)}setUniform2fv(e,t){this._glProgram.setUniform2fv(e,t)}setUniform3fv(e,t){this._glProgram.setUniform3fv(e,t)}setUniform4fv(e,t){this._glProgram.setUniform4fv(e,t)}setUniformMatrix3fv(e,t){this._glProgram.setUniformMatrix3fv(e,t)}setUniformMatrix4fv(e,t){this._glProgram.setUniformMatrix4fv(e,t)}setUniform1fv(e,t){this._glProgram.setUniform1fv(e,t)}setUniform1iv(e,t){this._glProgram.setUniform1iv(e,t)}setUniform2iv(e,t){this._glProgram.setUniform2iv(e,t)}setUniform3iv(e,t){this._glProgram.setUniform3iv(e,t)}setUniform4iv(e,t){this._glProgram.setUniform4iv(e,t)}assertCompatibleVertexAttributeLocations(e){e.locations!==this._locations&&console.error("VertexAttributeLocations are incompatible")}stop(){this._textures.clear(),this._freeTextureUnits.clear()}bindTexture(e,t){if(null==t?.glName){const t=this._textures.get(e) 500return t&&(this._context.bindTexture(null,t.unit),this._freeTextureUnit(t),this._textures.delete(e)),null}let r=this._textures.get(e) 501return null==r?(r=this._allocTextureUnit(t),this._textures.set(e,r)):r.texture=t,this._context.useProgram(this),this.setUniform1i(e,r.unit),this._context.bindTexture(t,r.unit),r.unit}rebindTextures(){this._context.useProgram(this),this._textures.forEac
501h(((e,t)=>{this._context.bindTexture(e.texture,e.unit),this.setUniform1i(t,e.unit)})),this._fragmentUniforms?.forEach((e=>{"sampler2D"!==e.type&&"samplerCube"!==e.type||this._textures.has(e.name)||console.error(`Texture sampler ${e.name} has no bound texture`)}))}_allocTextureUnit(e){return{texture:e,unit:0===this._freeTextureUnits.length?this._textures.size:this._freeTextureUnits.pop()}}_freeTextureUnit(e){this._freeTextureUnits.push(e.unit)}}var u=r(49805),c=r(3102) 502class f{constructor(e,t,r,o=s.D){this.locations=o,this.primitiveType=u.WR.TRIANGLES,this.key=t.key,this._program=new l(e.rctx,r.get().build(t),o),this._pipeline=this.initializePipeline(t),this.reload=async s=>{s&&await r.reload(),this.key.equals(t.key)||i.A.getLogger("esri.views.3d.webgl.ShaderTechnique").warn("Configuration was changed after construction, cannot reload shader.",r),(0,n.WD)(this._program),this._program=new l(e.rctx,r.get().build(t),o),this._pipeline=this.initializePipeline(t)}}destroy(){this._program=(0,n.WD)(this._program),this._pipeline=null}get program(){return this._program}get compiled(){return this.program.compiled}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}getPipeline(e,t){return this._pipeline}initializePipeline(e){return(0,c.Ey)({blending:c.Os,colorWrite:c.kn})}}},71087:(e,t,r)=>{r.d(t,{K:()=>a,W:()=>l}) 503var i=r(61840),n=r(21590) 504class s{constructor(e){this._bits=[...e]}equals(e){return(0,n.aI)(this._bits,e.bits)}get code(){return this._code??=String.fromCharCode(...this._bits),this._code}get bits(){return this._bits}}var o=r(67484) 505class a extends o.Y{constructor(){super(),this._parameterBits=this._parameterBits?.map((()=>0))??[],this._parameterNames??=[]}get key(){return this._key??=new s(this._parameterBits),this._key}decode(e=this.key){const t=this._parameterBits 506this._parameterBits=[...e.bits] 507const r=this._parameterNames.map((e=>` ${e}: ${this[e]}`)).join("\n") 508return this._parameterBits=t,r}}function l(e={}){return(t,r)=>{t.hasOwnProperty("_parameterNames")||Object.defineProperty(t,"_parameterNames",{value:t._parameterNames?.slice()??[],configurable:!0,writable:!0}),t.hasOwnProperty("_parameterBits")||Object.defineProperty(t,"_parameterBits",{value:t._parameterBits?.slice()??[0],configurable:!0,writable:!0}),t._parameterNames.push(r) 509const n=e.count||2,s=Math.ceil(Math.log2(n)),o=t._parameterBits 510let a=0 511for(;o[a]+s>16;)a++,a>=o.length&&o.push(0) 512const l=o[a],u=(1<<s)-1<<l 513o[a]+=s,e.count?Object.defineProperty(t,r,{get(){return(this._parameterBits[a]&u)>>l},set(t){if(this[r]!==t){if(this._key=null,this._parameterBits[a]=this._parameterBits[a]&~u|+t<<l&u,"
513number"!=typeof t)throw new i.default(`Configuration value for ${r} must be a number, got ${typeof t}`) 514if(null==e.count)throw new i.default(`Configuration value for ${r} must provide a count option`)}}}):Object.defineProperty(t,r,{get(){return!!((this._parameterBits[a]&u)>>l)},set(e){if(this[r]!==e&&(this._key=null,this._parameterBits[a]=this._parameterBits[a]&~u|+e<<l&u,"boolean"!=typeof e))throw new i.default(`Configuration value for ${r} must be boolean, got ${typeof e}`)}})}}},42293:(e,t,r)=>{r.d(t,{E:()=>n}) 515var i=r(57250) 516function n(){return!!(0,i.A)("enable-feature:objectAndLayerId-rendering")}},64143:(e,t,r)=>{r.d(t,{S:()=>n}) 517var i=r(81109) 518function n(e){if(e.length<i.y9)return Array.from(e) 519if(Array.isArray(e))return Float64Array.from(e) 520if(!("BYTES_PER_ELEMENT"in e))return Array.from(e) 521switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e) 522case 2:return(0,i.jq)(e)?Uint16Array.from(e):Int16Array.from(e) 523case 4:return Float32Array.from(e) 524default:return Float64Array.from(e)}}},95685:(e,t,r)=>{r.d(t,{KV:()=>_,Vc:()=>y,Cr:()=>d,JI:()=>h,q9:()=>f}) 525var i=r(9295) 526let n 527var s=r(85839),o=r(49805),a=r(51336),l=r(22787) 528let u=null,c=null 529async function f(){return null==c&&(n??=(async()=>{const e=await r.e(92807).then(r.bind(r,92807)),t=await e.default({locateFile:e=>(0,i.s)(`esri/libs/basisu/${e}`)}) 530return t.initializeBasis(),t})(),c=n,u=await c),c}function d(e,t){if(null==u)return e.byteLength 531const r=new u.BasisFile(new Uint8Array(e)),i=m(r)?p(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0 532return r.close(),r.delete(),i}function h(e,t){if(null==u)return e.byteLength 533const r=new u.KTX2File(new Uint8Array(e)),i=g(r)?p(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0 534return r.close(),r.delete(),i}function p(e,t,r,i,n){const s=(0,l.IB)(t?o.CQ.COMPRESSED_RGBA8_ETC2_EAC:o.CQ.COMPRESSED_RGB8_ETC2),a=n&&e>1?(4**e-1)/(3*4**(e-1)):1 535return Math.ceil(r*i*s*a)}function m(e){return e.getNumImages()>=1&&!e.isUASTC()}function g(e){return e.getFaces()>=1&&e.isETC1S()}async function _(e,t,r){null==u&&(u=await f()) 536const i=new u.BasisFile(new Uint8Array(r)) 537if(!m(i))return null 538i.startTranscoding() 539const n=v(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),((e,t)=>i.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>i.transcodeImage(r,0,e,t,0,0))) 540return i.close(),i.delete(),n}async function y(e,t,r){null==u&&(u=await f()) 541const i=new u.KTX2File(new Uint8Array(r)) 542if(!g(i))return null 543i.startTranscoding() 544const n=v(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),((e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1))) 545return i.close(),i.delete(),n}function v(e,t,r,i,n,l,u,c){const{compressedTextureETC:f,compressedTextureS3TC:d}=e.capabilities,[h,p]=f?i?[s.n.ETC2_RGBA,o.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[s.n.ETC1_RGB,o.CQ.COMPRESSED_RGB8_ETC2]:d?i?[s.n.BC3_RGBA,o.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[s.n.BC1_RGB,o.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[s.n.RGBA32,o.Ab.RGBA],m=t.hasMipmap?r:Math.min(1,r),g=[] 546for(let s=0;s<m;s++)g.push(new Uint8Array(u(s,h))),c(s,h,g[s]) 547return t.internalFormat=p,t.hasMipmap=g.length>1,t.samplingMode=t.hasMipmap?o.Cj.LINEAR_MIPMAP_LINEAR:o.Cj.LINEAR,t.width=n,t.height=l,new a.g(e,t,{type:"compressed",levels:g})}},64954:(e,t,r)=>{r.d(t,{j:()=>a}) 548var i=r(53285),n=r(95612),s=r(69460),o=r(830) 549class a{constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=r,this._children=void 0,(0,o.vA)(e.length>=1),(0,o.vA)(3===r.size||4===r.size) 550const{data:i,size:a,indices:u}=r;(0,o.vA)(u.length%this._numIndexPerPrimitive==0),(0,o.vA)(u.length>=e.length*this._numIndexPerPrimitive) 551const c=e.length 552let f=a*u[this._numIndexPerPrimitive*e[0]] 553l.clear(),l.push(f) 554const d=(0,s.fA)(i[f],i[f+1],i[f+2]),h=(0,s.o8)(d) 555for(let n=0;n<c;++n){const t=this._numIndexPerPrimitive*e[n] 556for(let e=0;e<this._numIndexPerPrimitive;++e){f=a*u[t+e],l.push(f) 557let r=i[f] 558d[0]=Math.min(r,d[0]),h[0]=Math.max(r,h[0]),r=i[f+1],d[1]=Math.min(r,d[1]),h[1]=Math.max(r,h[1]),r=i[f+2],d[2]=Math.min(r,d[2]),h[2]=Math.max(r,h[2])}}this.bbMin=d,this.bbMax=h 559const p=(0,n.m)((0,s.vt)(),this.bbMin,this.bbMax,.5) 560this.radius=.5*Math.max(Math.max(h[0]-d[0],h[1]-d[1]),h[2]-d[2]) 561let m=this.radius*this.radius 562for(let n=0;n<l.length;++n){f=l.at(n) 563const e=i[f]-p[0],t=i[f+1]-p[1],r=i[f+2]-p[2],s=e*e+t*t+r*r 564if(s<=m)continue 565const o=Math.sqrt(s),a=.5*(o-this.radius) 566this.radius=this.radius+a,m=this.radius*this.radius 567const u=a/o 568p[0]+=e*u,p[1]+=t*u,p[2]+=r*u}this.center=p,l.clear()}getChildren(){if(this._children||(0,n.s)(this.bbMin,this.bbMax)<=1)return this._children 569const e=(0,n.m)((0,s.vt)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),i=new Array(8) 570for(let n=0;n<8;++n)i[n]=0 571const{data:o,size:l,indices:u}=this.position 572for(let n=0;n<t;++n){let t=0 573const s=this._numIndexPerPrimitive*this.primitiveIndices[n] 574let a=l*u[s],c=o[a],f=o[a+1],d=o[a+2] 575for(let e=1;e<this._numIndexPerPrimitive;++e){a=l*u[s+e]
576const t=o[a],r=o[a+1],i=o[a+2] 577t<c&&(c=t),r<f&&(f=r),i<d&&(d=i)}c<e[0]&&(t|=1),f<e[1]&&(t|=2),d<e[2]&&(t|=4),r[n]=t,++i[t]}let c=0 578for(let n=0;n<8;++n)i[n]>0&&++c 579if(c<2)return 580const f=new Array(8) 581for(let n=0;n<8;++n)f[n]=i[n]>0?new Uint32Array(i[n]):void 0 582for(let n=0;n<8;++n)i[n]=0 583for(let n=0;n<t;++n){const e=r[n] 584f[e][i[e]++]=this.primitiveIndices[n]}this._children=new Array 585for(let n=0;n<8;++n)void 0!==f[n]&&this._children.push(new a(f[n],this._numIndexPerPrimitive,this.position)) 586return this._children}static prune(){l.prune()}}const l=new i.A({deallocator:null})},19188:(e,t,r)=>{r.d(t,{A:()=>n}) 587var i=r(70662) 588class n{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){}get _stippleTextures(){return this._techniques.context.stippleTextures}get _markerTextures(){return this._techniques.context.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(this._output,t))}ensureResources(e){return i.Am.LOADED}}},5167:(e,t,r)=>{r.d(t,{NV:()=>c,m8:()=>l}) 589var i=r(92874),n=r(81814),s=r(70662),o=r(19188),a=r(67484) 590class l extends o.A{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,(e=>this._textureNormal=e)),this._acquire(e.emissiveTextureId,(e=>this._textureEmissive=e)),this._acquire(e.occlusionTextureId,(e=>this._textureOcclusion=e)),this._acquire(e.metallicRoughnessTextureId,(e=>this._textureMetallicRoughness=e))}dispose(){super.dispose(),this._texture=(0,i.Gz)(this._texture),this._textureNormal=(0,i.Gz)(this._textureNormal),this._textureEmissive=(0,i.Gz)(this._textureEmissive),this._textureOcclusion=(0,i.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,i.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?s.Am.LOADED:s.Am.LOADING}get textureBindParameters(){return new c(null!=this._texture?this._texture.glTexture:null,null!=this._textureNormal?this._textureNormal.glTexture:null,null!=this._textureEmissive?this._textureEmissive.glTexture:null,null!=this._textureOcclusion?this._textureOcclusion.glTexture:null,null!=this._textureMetallicRoughness?this._textureMetallicRoughness.glTexture:null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,i.Gz)(this._texture),this._textureId=e,this._acquire(this._textureId,(e=>this._texture=e)))}_acquire(e,t){if(null==e)return void t(null) 591const r=this._textures.acquire(e) 592if((0,n.isPromiseLike)(r))return++this._numLoading,void r.then((e=>{if(this._disposed)return(0,i.Gz)(e),void t(null) 593t(e)})).finally((()=>--this._numLoading)) 594t(r)}}class u extends a.Y{constructor(e=null){super(),this.textureEmissive=e}}class c extends u{constructor(e=null,t=null,r=null,i=null,n=null,s,o){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=n,this.scale=s,this.normalTextureTransformMatrix=o}}},41100:(e,t,r)=>{r.d(t,{V:()=>v}) 595var i=r(63811),n=r(95612),s=r(86412),o=r(64143),a=r(64954),l=r(64270),u=r(52070),c=r(69460),f=r(31597) 596const d=(0,c.vt)(),h=(0,c.vt)(),p=(0,c.vt)(),m=(0,c.vt)() 597var g=r(54516),_=r(830),y=r(60026) 598class v extends l.J{constructor(e,t,r=null,i=u.X.Mesh,n=null,o=-1){super(),this.material=e,this.mapPositions=r,this.type=i,this.objectAndLayerIdColor=n,this.edgeIndicesLength=o,this.highlights=new Set,this._highlightOptionsCounts=new Map,this.visible=!0,this._attributes=new Map,this._boundingInfo=null 599for(const[a,l]of t)this._attributes.set(a,{...l,indices:(0,s.Dg)(l.indices)}),a===y.r.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._attributes.get(a).indices.length:this.edgeIndicesLength)}instantiate(e={}){const t=new v(e.material||this.material,[],this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength) 600return this._attributes.forEach(((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)})),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}get attributes(){return this._attributes}getMutableAttribute(e){let t=this._attributes.get(e) 601return t&&!t.exclusive&&(t={...t,exclusive:!0,data:(0,o.S)(t.data)},this._attributes.set(e,t)),t}setAttributeData(e,t){const r=this._attributes.get(e) 602r&&this._attributes.set(e,{...r,exclusive:!0,data:t})}get indexCount(){const e=this._attributes.values().next().value?.indices 603return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return null==this._boundingInfo&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(e){return!!(this.type===u.X.Mesh?this._computeAttachmentOriginTriangles(e):this.type===u.X.Line?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,n.t)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t){if(!e)return!1 604const{size:r,data:i,indices:s}=e;(0,n.i)(t,0,0,0),(0,n.i)(m,0,0,0) 605let o=0,a=0 606for(let l=0;l<s.length-2;l+=3){const e=s[l]*r,u=s[l+1]*r,c=s[l+2]*r;(0,n.i)(d,i[e],i[e+1],i[e+2]),(0,n.i)(h,i[u],i[u+1],i[u+2]),(0,n.i)(p,i[c],i[c+1],i[c+2]) 607const g=(0,f.Q7)(d,h,p) 608g?((0,n.g)(d,d,h),(0,n.g)(d,d,p),(0,n.h)(d,d,1/3*g),(0,n.g)(t,t,d),o+=g):((0,n.g)(m,m,d),(0,n.g)(m,m,h),(0,n.g)(m,m,p),a+=3)}return!(0===a&&0===o||(0!==o?((0,n.h)(t,t,1/o),0):0===a||((0,n.h)(t,m,1/a),0)))}(this.attributes.get(y.r.POSITION),e)}_computeAttachmentOriginLines(e){const t=this.attributes.get(y.r.POSITION) 609return function(e,t,r){if(!e)return!1;(0,n.i)(r,0,0,0),(0,n.i)(m,0,0,0) 610let i=0,s=0 611const{size:o,data:a,indices:l}=e,u=l.length-1,c=u+(t?2:0) 612for(let f=0;f<c;f+=2){const e=f<u?f+1:0,t=l[f<u?f:u]*o,c=l[e]*o 613d[0]=a[t],d[1]=a[t+1],d[2]=a[t+2],h[0]=a[c],h[1]=a[c+1],h[2]=a[c+2],(0,n.h)(d,(0,n.g)(d,d,h),.5) 614const p=(0,n.G)(d,h) 615p>0?((0,n.g)(r,r,(0,n.h)(d,d,p)),i+=p):0===i&&((0,n.g)(m,m,d),s++)}return 0!==i?((0,n.h)(r,r,1/i),!0):0!==s&&((0,n.h)(r,m,1/s),!0)}(t,function(e,t){return!(!("isClosed"in e)||!e.isClosed)&&t.indices.length>2}(this.material.parameters,t),e)}_computeAttachmentOriginPoints(e){return function(e,t){if(!e)return!1 616const{size:r,data:i,indices:s}=e;(0,n.i)(t,0,0,0) 617let o=-1,a=0 618for(let n=0;n<s.length;n++){const e=s[n]*r 619o!==e&&(t[0]+=i[e],t[1]+=i[e+1],t[2]+=i[e+2],a++),o=e}return a>1&&(0,n.h)(t,t,1/a),a>0}(this.attributes.get(y.r.POSITION),e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.attributes.get(y.r.POSITION) 620if(!e||0===e.indices.length)return null
621const t=this.type===u.X.Mesh?3:1;(0,_.vA)(e.indices.length%t==0,"Indexing error: "+e.indices.length+" not divisible by "+t) 622const r=(0,s.tM)(e.indices.length/t) 623return new a.j(r,t,e)}get transformation(){return this._transformation??i.zK}set transformation(e){this._transformation=e&&e!==i.zK?(0,i.o8)(e):null}get highlightNames(){return this._highlightOptionsCounts}get hasHighlights(){return this._highlightOptionsCounts.size>0}foreachHighlightOptions(e){this._highlightOptionsCounts.forEach(((t,r)=>e(r)))}allocateIdAndHighlight(e){const t=new g.h(e) 624return this.addHighlight(t)}addHighlight(e){this.highlights.add(e) 625const{highlightName:t}=e,r=(this._highlightOptionsCounts.get(t)??0)+1 626return this._highlightOptionsCounts.set(t,r),e}removeHighlight(e){if(this.highlights.delete(e)){const{highlightName:t}=e,r=this._highlightOptionsCounts.get(t)??0 627r<=1?this._highlightOptionsCounts.delete(t):this._highlightOptionsCounts.set(t,r-1)}}}},56157:(e,t,r)=>{var i 628r.d(t,{Y:()=>i}),function(e){e[e.NONE=0]="NONE",e[e.ColorAlpha=1]="ColorAlpha",e[e.FrontFace=2]="FrontFace",e[e.COUNT=3]="COUNT"}(i||(i={}))},54516:(e,t,r)=>{r.d(t,{h:()=>o,p:()=>a}) 629var i=r(28828),n=r(70662) 630class s{constructor(){this.uid=(0,i.c)()}}class o extends s{constructor(e){super(),this.highlightName=e,this.channel=n.Mg.Highlight}}class a extends s{constructor(){super(...arguments),this.channel=n.Mg.MaskOccludee}}},7862:(e,t,r)=>{r.d(t,{K_:()=>p,SE:()=>d,Yf:()=>u,aB:()=>h,ez:()=>l,m6:()=>m,xt:()=>f,z5:()=>c}) 631var i=r(72481),n=r(56157),s=r(49805),o=r(3102) 632const a=(0,o.p3)(s.dn.ONE,s.dn.ZERO,s.dn.ONE,s.dn.ONE_MINUS_SRC_ALPHA) 633function l(e){return e===n.Y.FrontFace?null:a}function u(e){switch(e){case n.Y.NONE:return o.Ky 634case n.Y.ColorAlpha:return a 635case n.Y.FrontFace:case n.Y.COUNT:return null}}function c(e){if(e.draped)return null 636switch(e.oitPass){case n.Y.NONE:case n.Y.FrontFace:return e.writeDepth?o.Uy:null 637case n.Y.ColorAlpha:case n.Y.COUNT:return null}}const f=5e5,d={factor:-1,units:-2} 638function h(e){return e?d:null}function p(e,t=s.MT.LESS){return e===n.Y.NONE||e===n.Y.FrontFace?t:s.MT.LEQUAL}function m(e,t){const r=(0,i.LG)(t) 639return e===n.Y.ColorAlpha?r?{buffers:[s.Nm.COLOR_ATTACHMENT0,s.Nm.COLOR_ATTACHMENT1,s.Nm.COLOR_ATTACHMENT2]}:{buffers:[s.Nm.COLOR_ATTACHMENT0,s.Nm.COLOR_ATTACHMENT1]}:r?{buffers:[s.Nm.COLOR_ATTACHMENT0,s.Nm.COLOR_ATTACHMENT1]}:null}},95950:(e,t,r)=>{var i 640r.d(t,{N:()=>i}),function(e){e[e.INTEGRATED_MESH=0]="INTEGRATED_MESH",e[e.OPAQUE_TERRAIN=1]="OPAQUE_TERRAIN",e[e.OPAQUE_MATERIAL=2]="OPAQUE_MATERIAL",e[e.OPAQUE_MATERIAL_WITHOUT_NORMALS=3]="OPAQUE_MATERIAL_WITHOUT_NORMALS",e[e.TRANSPARENT_MATERIAL=4]="TRANSPARENT_MATERIAL",e[e.TRANSPARENT_MATERIAL_WITHOUT_NORMALS=5]="TRANSPARENT_MATERIAL_WITHOUT_NORMALS",e[e.TRANSPARENT_TERRAIN=6]="TRANSPARENT_TERRAIN",e[e.TRANSPARENT_MATERIAL_WITHOUT_DEPTH=7]="TRANSPARENT_MATERIAL_WITHOUT_DEPTH",e[e.OCCLUDED_TERRAIN=8]="OCCLUDED_TERRAIN",e[e.OCCLUDER_MATERIAL=9]="OCCLUDER_MATERIAL",e[e.TRANSPARENT_OCCLUDER_MATERIAL=10]="TRANSPARENT_OCCLUDER_MATERIAL",e[e.OCCLUSION_PIXELS=11]="OCCLUSION_PIXELS",e[e.HUD_MATERIAL=12]="HUD_MATERIAL",e[e.LABEL_MATERIAL=13]="LABEL_MATERIAL",e[e.LINE_CALLOUTS=14]="LINE_CALLOUTS",e[e.LINE_CALLOUTS_HUD_DEPTH=15]="LINE_CALLOUTS_HUD_DEPTH",e[e.OVERLAY=16]="OVERLAY",e[e.DRAPED_MATERIAL=17]="DRAPED_MATERIAL",e[e.DRAPED_WATER=18]="DRAPED_WATER",e[e.VOXEL=19]="VOXEL",e[e.MAX_SLOTS=20]="MAX_SLOTS"}(i||(i={}))},60847:(e,t,r)=>{r.d(t,{I$:()=>h,Rv:()=>u,a9:()=>d,m:()=>s,mK:()=>p,qh:()=>f,r8:()=>l,sf:()=>o,ub:()=>c,v0:()=>a}) 641var i=r(70662),n=r(49805) 642const s={func:n.MT.LESS},o={func:n.MT.ALWAYS},a={mask:255},l={mask:0},u=e=>({function:{func:n.MT.NOTEQUAL,ref:e,mask:e},operation:{fail:n.eA.KEEP,zFail:n.eA.KEEP,zPass:n.eA.KEEP}}),c=e=>({function:{func:n.MT.ALWAYS,ref:e,mask:e},operation:{fail:n.eA.KEEP,zFail:n.eA.KEEP,zPass:n.eA.REPLACE}}),f={function:{func:n.MT.ALWAYS,ref:i.dd.OutlineVisualElementMask,mask:i.dd.OutlineVisualElementMask},operation:{fail:n.eA.KEEP,zFail:n.eA.KEEP,zPass:n.eA.ZERO}},d={function:{func:n.MT.ALWAYS,ref:i.dd.OutlineVisualElementMask,mask:i.dd.OutlineVisualElementMask},operation:{fail:n.eA.KEEP,zFail:n.eA.KEEP,zPass:n.eA.REPLACE}},h={function:{func:n.MT.EQUAL,ref:i.dd.OutlineVisualElementMask,mask:i.dd.OutlineVisualElementMask},operation:{fail:n.eA.KEEP,zFail:n.eA.KEEP,zPass:n.eA.KEEP}},p={function:{func:n.MT.NOTEQUAL,ref:i.dd.OutlineVisualElementMask,mask:i.dd.OutlineVisualElementMask},operation:{fail:n.eA.KEEP,zFail:n.eA.KEEP,zPass:n.eA.KEEP}}},46730:(e,t,r)=>{r.d(t,{g:()=>B}),r(57250) 643var i=r(61840),n=r(92879),s=r(92874),o=r(81814),a=r(81109),l=r(83546),u=r(70623),c=r(67900),f=r(70662),d=r(95685),h=r(64270),p=r(52070),m=r(12752),g=r(49805),_=r(51336) 644const y=()=>m.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil") 645function v(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const T=v("DXT1"),A=v("DXT3"),E=v("DXT5") 646var b,x,S=r(29702),w=r(830),C=r(24325) 647class B extends h.J{constructor(e,t){super(),this._data=e,this.type=p.X.Texture,this.events=new n.A,this._glTexture=null,this._loadingPromise=null,this._loadingController=null,this._parameters={...I,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.frameUpdate=void 0}_startPreload(e){null!=e&&(e instanceof HTMLVideoElement?(this.frameUpdate=t=>this._frameUpdate(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e))}_startPreloadVideoElement(e){if(!((0,l.isBlobProtocol)(e.src)||"auto"===e.preload&&e.crossOrigin)){e.preload="auto",e.crossOrigin="anonymous" 648const t=!e.paused 649if(e.src=e.src,t&&e.autoplay){const t=()=>{e.removeEventListener("canplay",t),e.play()} 650e.addEventListener("canplay",t)}}}_startPreloadImageElement(e){(0,l.isDataProtocol)(e.src)||(0,l.isBlobProtocol)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new C.R 651return t.wrapMode=this._parameters.wrap??g.pF.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?g.Cj.LINEAR_MIPMAP_LINEAR:g.Cj.LINEAR,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t}get glTexture(){return this._glTexture}get memoryEstimate(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0 652if((0,a.mw)(e)||(0,a.mg)(e))return t.encoding===f.JS.KTX2_ENCODING?(0,d.JI)(e,!!t.mipmap):t.encoding===f.JS.BASIS_ENCODING?(0,d.Cr)(e,!!t.mipmap):e.byteLength 653const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?O(e):t 654return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._glTexture)return this._glTexture 655if(this._loadingPromise)return this._loadingPromise 656const t=this._data 657return null==t?(this._glTexture=new _.g(e,this._createDescriptor(e),null),this._glTexture):(this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,a.mg)(t)&&this._parameters.encoding===f.JS.DDS_ENCODING?this._loadFromDDSData(e,t):(0,a.mw)(t)&&this._parameters.encoding===f.JS.DDS_ENCODING?this._loadFromDDSData(e,new Uint8Array(t)):((0,a.mw)(t)||(0,a.mg)(t))&&this._parameters.encoding===f.JS.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,a.mw)(t)||(0,a.mg)(t))&&this._parameters.encoding===f.JS.BASIS_ENCODING?this._loadFromBasis(e,t):(0,a.mg)(t)?this._loadFromPixelData(e,t):(0,a.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_frameUpdate(e,t){return null==this._glTexture||e.readyState<b.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31) 658if(542327876!==r[0])return y().error("Invalid magic number in DDS header"),null 659if(!(4&r[20]))return y().error("Unsupported format, must contain a FourCC code"),null 660const i=r[21] 661let n,s 662switch(i){case T:n=8,s=g.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT 663break 664case A:n=16,s=g.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT 665break 666case E:n=16,s=g.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT 667break 668default:return y().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let o=1,a=r[4],l=r[3];(3&a||3&l)&&(y().warn("Rounding up compressed texture size to nearest multiple of 4."),a=a+3&-4,l=l+3&-4) 669const u=a,c=l 670let f,d 671131072&r[2]&&!1!==t&&(o=Math.max(1,r[7])) 672let h=e.byteOffset+r[1]+4 673const p=[] 674for(let m=0;m<o;++m)d=(a+3>>2)*(l+3>>2)*n,f=new Uint8Array(e.buffer,h,d),p.push(f),h+=d,a=Math.max(1,a>>1),l=Math.max(1,l>>1) 675return{textureData:{type:"compressed",levels:p},internalFormat:s,width:u,height:c}}(r,t.hasMipmap??!1) 676if(null==i)throw new Error("DDS texture data is null") 677const{textureData:n,internalFormat:s,width:o,height:a}=i 678return t.samplingMode=n.levels.length>1?g.Cj.LINEAR_MIPMAP_LINEAR:g.Cj.LINEAR,t.hasMipmap=n.levels.length>1,t.internalFormat=s,t.width=o,t.height=a,new _.g(e,t,n)}(e,this._createDescriptor(e),t),this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>(0,d.Vc)(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>(0,d.KV)(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,w.vA)(this._parameters.width>0&&this._parameters.height>0) 679const r=this._createDescriptor(e) 680return r.pixelFormat=1===this._parameters.components?g.Ab.LUMINANCE:3===this._parameters.components?g.Ab.RGB:g.Ab.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new _.g(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const i=await(0,u.D)(t,{signal:r}) 681return(0,o.throwIfAborted)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,c.Sx)(t,t.src,!1,r) 682return(0,o.throwIfAborted)(r),this._loadFromImage(e,i)}))}_loadFromVideoElement(e,t){return t.readyState>=b.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((n,a)=>{const l=()=>{t.removeEventListener("loadeddata",u),t.removeEventListener("error",c),(0,s.xt)(f)},u=()=>{t.readyState>=b.HAVE_CURRENT_DATA&&(l(),n(this._loadFromImage(e,t)))},c=e=>{l(),a(e||new i.default("Failed to load video"))} 683t.addEventListener("loadeddata",u),t.addEventListener("error",c) 684const f=(0,o.onAbort)(r,(()=>c((0,o.createAbortError)())))}))))}_loadFromImage(e,t){let r=t
685if(!(r instanceof HTMLVideoElement)){const{maxTextureSize:t}=e.parameters 686r=this._parameters.downsampleUncompressed?(0,S.IR)(r,t):(0,S.vM)(r,t)}const i=O(r) 687this._parameters.width=i.width,this._parameters.height=i.height 688const n=this._createDescriptor(e) 689return n.pixelFormat=3===this._parameters.components?g.Ab.RGB:g.Ab.RGBA,n.width=i.width,n.height=i.height,n.shouldCompress=this._parameters.shouldCompress,this._glTexture=new _.g(e,n,r),this._glTexture}_loadAsync(e){const t=new AbortController 690this._loadingController=t 691const r=e(t.signal) 692this._loadingPromise=r 693const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null)} 694return r.then(i,i),r}unload(){if(this._glTexture=(0,s.WD)(this._glTexture),null!=this._loadingController){const e=this._loadingController 695this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function O(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}(x=b||(b={}))[x.HAVE_NOTHING=0]="HAVE_NOTHING",x[x.HAVE_METADATA=1]="HAVE_METADATA",x[x.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",x[x.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",x[x.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA" 696const I={wrap:{s:g.pF.REPEAT,t:g.pF.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1,downsampleUncompressed:!1,shouldCompress:!1}},830:(e,t,r)=>{r.d(t,{Cv:()=>f,L:()=>c,MX:()=>l,O_:()=>u,kL:()=>d,vA:()=>a,zH:()=>h}) 697var i=r(85437),n=r(80483) 698const s=(0,r(65739).vt)() 699class o{constructor(e){this.message=e}toString(){return`AssertException: ${this.message}`}}function a(e,t="Assertion"){if(!e){const e=new Error(t).stack 700throw new o(`${t} at ${e}`)}}function l(e,t){e||(t=t||"",console.warn("Verify failed: "+t+"\n"+new Error("verify").stack))}
700function u(e,t,r,i){let n,s=(r[0]-e[0])/t[0],o=(i[0]-e[0])/t[0] 701s>o&&(n=s,s=o,o=n) 702let a=(r[1]-e[1])/t[1],l=(i[1]-e[1])/t[1] 703if(a>l&&(n=a,a=l,l=n),s>l||a>o)return!1 704a>s&&(s=a),l<o&&(o=l) 705let u=(r[2]-e[2])/t[2],c=(i[2]-e[2])/t[2] 706return u>c&&(n=u,u=c,c=n),!(s>c||u>o||(c<o&&(o=c),o<0))}function c(e,t,r,n,s,o=(0,i.vt)()){const a=(n[s]-r[s])*(t[0]-e[0])-(n[0]-r[0])*(t[s]-e[s]),l=(n[0]-r[0])*(e[s]-r[s])-(n[s]-r[s])*(e[0]-r[0]) 707if(0===a)return!1 708const u=l/a 709return o[0]=e[0]+u*(t[0]-e[0]),o[1]=e[s]+u*(t[s]-e[s]),!0}function f(e,t,r,i,o){s[0]=e[0],s[1]=e[1],s[2]=e[2],s[3]=1,(0,n.t)(s,s,t),o.length>2&&(o[2]=-s[2]),(0,n.t)(s,s,r),a(0!==s[3]),o[0]=s[0]/s[3],o[1]=s[1]/s[3],o[2]=s[2]/s[3],o[0]=(.5*o[0]+.5)*i[2]+i[0],o[1]=(.5*o[1]+.5)*i[3]+i[1]}function d(e,t){return Math.log(e)/Math.log(t)}function h(e){return 1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&1===e[15]}},70662:(e,t,r)=>{var i,n,s,o,a,l,u,c 710r.d(t,{Am:()=>o,C7:()=>s,JS:()=>c,Mg:()=>l,dd:()=>a,it:()=>n,s2:()=>i,sf:()=>u}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(i||(i={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(n||(n={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(s||(s={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(o||(o={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(a||(a={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee"}(l||(l={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(u||(u={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(c||(c={}))},29702:(e,t,r)=>{r.d(t,{IR:()=>a,Mv:()=>s,uT:()=>o,vM:()=>l}) 711var i=r(61840) 712const n=16 713function s(e){return Math.ceil(e/n)*n}function o(e){return Math.floor(e/n)*n}function a(e,t){let r=e.width*e.height 714if(r<4096)return e instanceof ImageData?c(e):e 715let i=e.width,n=e.height 716do{i=Math.ceil(i/2),n=Math.ceil(n/2),r=i*n}while(r>1048576||null!=t&&(i>t||n>t)) 717return u(e,i,n)}function l(e,t){const r=Math.max(e.width,e.height) 718if(r<=t)return e 719const i=t/r 720return u(e,Math.round(e.width*i),Math.round(e.height*i))}function u(e,t,r){if(e instanceof ImageData)return u(c(e),t,r) 721const i=document.createElement("canvas") 722return i.width=t,i.height=r,i.getContext("2d").drawImage(e,0,0,i.width,i.height),i}function c(e){const t=document.createElement("canvas") 723t.width=e.width,t.height=e.height 724const r=t.getContext("2d") 725if(null==r)throw new i.default("Failed to create 2d context from HTMLCanvasElement") 726return r.putImageData(e,0,0),t}},9495:(e,t,r)=>{r.d(t,{E:()=>u})
727var i=r(52067),n=r(72481),s=r(71087) 728class o extends s.K{constructor(){super(...arguments),this.instancedDoublePrecision=!1,this.hasModelTransformation=!1}}(0,i._)([(0,s.W)()],o.prototype,"instancedDoublePrecision",void 0),(0,i._)([(0,s.W)()],o.prototype,"hasModelTransformation",void 0) 729var a=r(56157),l=r(95332) 730class u extends o{constructor(){super(...arguments),this.output=n.V.Color,this.oitPass=a.Y.NONE,this.hasSlicePlane=!1,this.bindType=l.c.Pass,this.writeDepth=!0}}(0,i._)([(0,s.W)({count:n.V.COUNT})],u.prototype,"output",void 0),(0,i._)([(0,s.W)({count:a.Y.COUNT})],u.prototype,"oitPass",void 0),(0,i._)([(0,s.W)()],u.prototype,"hasSlicePlane",void 0)},7088:(e,t,r)=>{r.d(t,{S:()=>s,p:()=>o}) 731var i=r(51324),n=r(49899) 732class s extends i.Gd{constructor(){super(...arguments),this.renderOccluded=n.m$.Occlude,this.isDecoration=!1}}const o=8},10867:(e,t,r)=>{r.d(t,{z:()=>c}) 733var i=r(72481),n=r(86329),s=r(40180),o=r(87031),a=r(58719),l=r(56157),u=r(97098) 734function c(e,t){e.include(s.Q,t),e.include(n.NL,t),e.fragment.include(o.a) 735const r=t.output===i.V.ObjectAndLayerIdColor,c=(0,i.LG)(t.output),f=(0,i.RN)(t.output)&&t.oitPass===l.Y.ColorAlpha,d=(0,i.RN)(t.output)&&t.oitPass!==l.Y.ColorAlpha,h=t.discardInvisibleFragments 736let p=0;(d||c||f)&&e.outputs.add("fragColor","vec4",p++),c&&e.outputs.add("fragEmission","vec4",p++),f&&e.outputs.add("fragAlpha","float",p++),e.fragment.code.add(a.H` 737 void outputColorHighlightOID(vec4 finalColor, const in vec3 vWorldPosition) { 738 ${(0,a.If)(r,"finalColor.a = 1.0;")} 739 740 ${(0,a.If)(h,`if (finalColor.a < ${a.H.float(u.Q)}) { discard; }`)} 741 742 finalColor = applySlice(finalColor, vWorldPosition); 743 ${(0,a.If)(f,a.H`fragColor = premultiplyAlpha(finalColor); 744 fragAlpha = finalColor.a;`)} 745 ${(0,a.If)(d,"fragColor = finalColor;")} 746 ${(0,a.If)(c,"fragEmission = finalColor.a * getEmissions();")} 747 calculateOcclusionAndOutputHighlight(); 748 ${(0,a.If)(r,"outputObjectAndLayerIdColor();")} 749 } 750 `)}},95332:(e,t,r)=>{var i 751r.d(t,{c:()=>i}),function(e){e[e.Bind=0]="Bind",e[e.Pass=1]="Pass",e[e.Draw=2]="Draw"}(i||(i={}))},16395:(e,t,r)=>{r.d(t,{N5:()=>l}) 752var i=r(61840),n=(r(57250),r(12752)),s=r(95332) 753const o=()=>n.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder") 754class a{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class l extends a{constructor(){super(...arguments),this.vertex=new d,this.fragment=new d,this.attributes=new h,this.varyings=new p,this.extensions=new m,this.outputs=new g}get fragmentUniforms(){return this.fragment.uniforms.entries}get builder(){return this}generate(e,t=!1){const r=this.extensions.generateSource(e),i=this.attributes.generateSource(e),n=this.varyings.generateSource(e),s="vertex"===e?this.vertex:this.fragment,o=s.uniforms.generateSource(),a=s.code.generateSource(),l=s.main.generateSource(t),u="vertex"===e?v:y,c=s.constants.generateSource(),f=this.outputs.generateSource(e) 755return`#version 300 es\n${r.join("\n")}\n${u}\n${c.join("\n")}\n${o.join("\n")}\n${i.join("\n")}\n${n.join("\n")}\n${f.join("\n")}\n${a.join("\n")}\n${l.join("\n")}`}generateBind(e){const t=new Map 756this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[s.c.Bind] 757r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[s.c.Bind] 758r&&t.set(e.name,r)})) 759const r=Array.from(t.values()),i=r.length 760return t=>{for(let n=0;n<i;++n)r[n](e,t)}}generateBindPass(e){const t=new Map 761this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[s.c.Pass] 762r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[s.c.Pass] 763r&&t.set(e.name,r)})) 764const r=Array.from(t.values()),i=r.length 765return(t,n)=>{for(let s=0;s<i;++s)r[s](e,t,n)}}generateBindDraw(e){const t=new Map 766this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[s.c.Draw] 767r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[s.c.Draw] 768r&&t.set(e.name,r)})) 769const r=Array.from(t.values()),i=r.length 770return(t,n,s)=>{for(let o=0;o<i;++o)r[o](e,s,t,n)}}}class u{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(const t of e)this._add(t) 771return this._stage}get(e){return this._entries.get(e)}_add(e){if(null!=e){if(this._entries.has(e.name)&&!this._entries.get(e.name).equals(e))throw new i.default(`Duplicate uniform name ${e.name} for different uniform type`) 772this._entries.set(e.name,e)}else o().error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map((e=>null!=e.arraySize?`uniform ${e.type} ${e.name}[${e.arraySize}];`:`uniform ${e.type} ${e.name};`))}get entries(){return Array.from(this._entries.values())}}class c{constructor(e){this._stage=e,this._bodies=new Array}add(e){return this._bodies.push(e),this._stage}generateSource(e){if(this._bodies.length>0)return[`void main() {\n ${this._bodies.join("\n")||""} \n}`] 773if(e)throw new i.default("Shader does not contain main function body.") 774return[]}}class f{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class d extends a{constructor(){super(...arguments),this.uniforms=new u(this),this.main=new c(this),this.code=new f(this),this.constants=new _(this)}get builder(){return this}}class h{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map((e=>`in ${e[1]} ${e[0]};`))}}class p{constructor(){this._entries=new Map}add(e,t){this._entries.has(e)?o().warn(`Ignoring duplicate varying ${t} ${e}`):this._entries.set(e,t)}generateSource(e){const t=new Array
775return this._entries.forEach(((r,i)=>t.push("vertex"===e?`out ${r} ${i};`:`in ${r} ${i};`))),t}}class m{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const t="vertex"===e?m.ALLOWLIST_VERTEX:m.ALLOWLIST_FRAGMENT 776return Array.from(this._entries).filter((e=>t.includes(e))).map((e=>`#extension ${e} : enable`))}}m.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"],m.ALLOWLIST_VERTEX=[] 777class g{constructor(){this._entries=new Map}add(e,t,r=0){const i=this._entries.get(r) 778i?.name!==e||i?.type!==t?this._entries.set(r,{name:e,type:t}):o().warn(`Fragment shader output location ${r} occupied`)}generateSource(e){if("vertex"===e)return[] 7790===this._entries.size&&this._entries.set(0,{name:g.DEFAULT_NAME,type:g.DEFAULT_TYPE}) 780const t=new Array 781return this._entries.forEach(((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`))),t}}g.DEFAULT_TYPE="vec4",g.DEFAULT_NAME="fragColor" 782class _{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let i="ERROR_CONSTRUCTOR_STRING" 783switch(t){case"float":i=_._numberToFloatStr(r) 784break 785case"int":i=_._numberToIntStr(r) 786break 787case"bool":i=r.toString() 788break 789case"vec2":i=`vec2(${_._numberToFloatStr(r[0])}, ${_._numberToFloatStr(r[1])})` 790break 791case"vec3":i=`vec3(${_._numberToFloatStr(r[0])}, ${_._numberToFloatStr(r[1])}, ${_._numberToFloatStr(r[2])})` 792break 793case"vec4":i=`vec4(${_._numberToFloatStr(r[0])}, ${_._numberToFloatStr(r[1])}, ${_._numberToFloatStr(r[2])}, ${_._numberToFloatStr(r[3])})` 794break 795case"ivec2":i=`ivec2(${_._numberToIntStr(r[0])}, ${_._numberToIntStr(r[1])})` 796break 797case"ivec3":i=`ivec3(${_._numberToIntStr(r[0])}, ${_._numberToIntStr(r[1])}, ${_._numberToIntStr(r[2])})` 798break 799case"ivec4":i=`ivec4(${_._numberToIntStr(r[0])}, ${_._numberToIntStr(r[1])}, ${_._numberToIntStr(r[2])}, ${_._numberToIntStr(r[3])})` 800break 801case"mat2":case"mat3":case"mat4":i=`${t}(${Array.prototype.map.call(r,(e=>_._numberToFloatStr(e))).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${i};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const y="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n#endif",v="precision highp float;\nprecision highp sampler2D;"},85919:(e,t,r)=>{r.d(t,{n:()=>n}),r(57250) 802var i=r(95332) 803class n{constructor(e,t,r,n,s=null){if(this.name=e,this.type=t,this.arraySize=s,this.bind={[i.c.Bind]:null,[i.c.Pass]:null,[
803i.c.Draw]:null},n)switch(r){case void 0:break 804case i.c.Bind:this.bind[i.c.Bind]=n 805break 806case i.c.Pass:this.bind[i.c.Pass]=n 807break 808case i.c.Draw:this.bind[i.c.Draw]=n}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}},51735:(e,t,r)=>{function i(e,t,r){for(let i=0;i<r;++i)t[2*i]=e[i],t[2*i+1]=e[i]-t[2*i]}function n(e,t){const r=e.length 809for(let i=0;i<r;++i)o[0]=e[i],t[i]=o[0] 810return t}function s(e,t){const r=e.length 811for(let i=0;i<r;++i)o[0]=e[i],o[1]=e[i]-o[0],t[i]=o[1] 812return t}r.d(t,{Zo:()=>n,jA:()=>s,jS:()=>i}) 813const o=new Float32Array(2)},3102:(e,t,r)=>{r.d(t,{Ey:()=>w,Ky:()=>f,Ms:()=>X,Os:()=>c,PI:()=>d,Uy:()=>m,Xt:()=>p,fg:()=>l,gh:()=>a,hG:()=>h,kn:()=>g,ox:()=>s,p3:()=>o,vg:()=>u}) 814var i=r(70662),n=r(49805) 815function s(e,t,r=n.Tb.ADD,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}function o(e,t,r,i,s=n.Tb.ADD,o=n.Tb.ADD,a=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:s,opAlpha:o,color:{r:a[0],g:a[1],b:a[2],a:a[3]}}}const a=s(n.dn.ZERO,n.dn.ONE_MINUS_SRC_ALPHA),l=s(n.dn.ONE,n.dn.ZERO),u=s(n.dn.ONE,n.dn.ONE),c=s(n.dn.ONE,n.dn.ONE_MINUS_SRC_ALPHA),f=o(n.dn.SRC_ALPHA,n.dn.ONE,n.dn.ONE_MINUS_SRC_ALPHA,n.dn.ONE_MINUS_SRC_ALPHA),d={face:n.Y7.BACK,mode:n.Ac.CCW},h={face:n.Y7.FRONT,mode:n.Ac.CCW},p=e=>e===i.s2.Back?d:e===i.s2.Front?h:null,m={zNear:0,zFar:1},g={r:!0,g:!0,b:!0,a:!0} 816function _(e){return O.intern(e)}function y(e){return L.intern(e)}function v(e){return M.intern(e)}function T(e){return N.intern(e)}function A(e){return U.intern(e)}function E(e){return F.intern(e)}function b(e){return V.intern(e)}function x(e){return $.intern(e)}function S(e){return k.intern(e)}function w(e){return j.intern(e)}class C{constructor(e,t){this._makeKey=e,this._makeRef=t,this._interns=new Map}intern(e){if(!e)return null 817const t=this._makeKey(e),r=this._interns 818return r.has(t)||r.set(t,this._makeRef(e)),r.get(t)??null}}function B(e){return"["+e.join(",")+"]"}const O=new C(I,(e=>({__tag:"Blending",...e}))) 819function I(e){return e?B([e.srcRgb,e.srcAlpha,e.dstRgb,e.dstAlpha,e.opRgb,e.opAlpha,e.color.r,e.color.g,e.color.b,e.color.a]):null}const L=new C(P,(e=>({__tag:"Culling",...e}))) 820function P(e){return e?B([e.face,e.mode]):null}const M=new C(R,(e=>({__tag:"PolygonOffset",...e}))) 821function R(e){return e?B([e.factor,e.units]):null}const N=new C(D,(e=>({__tag:"DepthTest",...e}))) 822function D(e){return e?B([e.func]):null}const U=new C(z,(e=>({__tag:"StencilTest",...e}))) 823function z(e){return e?B([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const F=new C(H,(e=>({__tag:"DepthWrite",...e}))) 824function H(e){return e?B([e.zNear,e.zFar]):null}const V=new C(G,(e=>({__tag:"ColorWrite",...e}))) 825function G(e){return e?B([e.r,e.g,e.b,e.a]):null}const $=new C(W,(e=>({__tag:"StencilWrite",...e}))) 826function W(e){return e?B([e.mask]):null}const k=new C(Y,(e=>({__tag:"DrawBuffers",...e}))) 827function Y(e){return e?B(e.buffers):null}const j=new C((function(e){return e?B([I(e.blending),P(e.culling),R(e.polygonOffset),D(e.depthTest),z(e.stencilTest),H(e.depthWrite),G(e.colorWrite),W(e.stencilWrite),Y(e.drawBuffers)]):null}),(e=>({blending:_(e.blending),culling:y(e.culling),polygonOffset:v(e.polygonOffset),depthTest:T(e.depthTest),stencilTest:A(e.stencilTest),depthWrite:E(e.depthWrite),colorWrite:b(e.colorWrite),stencilWrite:x(e.stencilWrite),drawBuffers:S(e.drawBuffers)}))) 828class X{constructor(e){this._pipelineInvalid=!0,this._blendingInvalid=!0,this._cullingInvalid=!0,this._polygonOffsetInvalid=!0,this._depthTestInvalid=!0,this._stencilTestInvalid=!0,this._depthWriteInvalid=!0,this._colorWriteInvalid=!0,this._stencilWriteInvalid=!0,this._drawBuffersInvalid=!0,this._stateSetters=e}setPipeline(e){(this._pipelineInvalid||e!==this._pipeline)&&(this._setBlending(e.blending),this._setCulling(e.culling),this._setPolygonOffset(e.polygonOffset),this._setDepthTest(e.depthTest),this._setStencilTest(e.stencilTest),this._setDepthWrite(e.depthWrite),this._setColorWrite(e.colorWrite),this._setStencilWrite(e.stencilWrite),this._setDrawBuffers(e.drawBuffers),this._pipeline=e),this._pipelineInvalid=!1}invalidateBlending(){this._blendingInvalid=!0,this._pipelineInvalid=!0}
828invalidateCulling(){this._cullingInvalid=!0,this._pipelineInvalid=!0}invalidatePolygonOffset(){this._polygonOffsetInvalid=!0,this._pipelineInvalid=!0}invalidateDepthTest(){this._depthTestInvalid=!0,this._pipelineInvalid=!0}invalidateStencilTest(){this._stencilTestInvalid=!0,this._pipelineInvalid=!0}invalidateDepthWrite(){this._depthWriteInvalid=!0,this._pipelineInvalid=!0}invalidateColorWrite(){this._colorWriteInvalid=!0,this._pipelineInvalid=!0}invalidateStencilWrite(){this._stencilTestInvalid=!0,this._pipelineInvalid=!0}invalidateDrawBuffers(){this._drawBuffersInvalid=!0,this._pipelineInvalid=!0}_setBlending(e){this._blending=this._setSubState(e,this._blending,this._blendingInvalid,this._stateSetters.setBlending),this._blendingInvalid=!1}_setCulling(e){this._culling=this._setSubState(e,this._culling,this._cullingInvalid,this._stateSetters.setCulling),this._cullingInvalid=!1}_setPolygonOffset(e){this._polygonOffset=this._setSubState(e,this._polygonOffset,this._polygonOffsetInvalid,this._stateSetters.setPolygonOffset),this._polygonOffsetInvalid=!1}_setDepthTest(e){this._depthTest=this._setSubState(e,this._depthTest,this._depthTestInvalid,this._stateSetters.setDepthTest),this._depthTestInvalid=!1}_setStencilTest(e){this._stencilTest=this._setSubState(e,this._stencilTest,this._stencilTestInvalid,this._stateSetters.setStencilTest),this._stencilTestInvalid=!1}_setDepthWrite(e){this._depthWrite=this._setSubState(e,this._depthWrite,this._depthWriteInvalid,this._stateSetters.setDepthWrite),this._depthWriteInvalid=!1}_setColorWrite(e){this._colorWrite=this._setSubState(e,this._colorWrite,this._colorWriteInvalid,this._stateSetters.setColorWrite),this._colorWriteInvalid=!1}_setStencilWrite(e){this._stencilWrite=this._setSubState(e,this._stencilWrite,this._stencilWriteInvalid,this._stateSetters.setStencilWrite),this._stencilTestInvalid=!1}_setDrawBuffers(e){this._drawBuffers=this._setSubState(e,this._drawBuffers,this._drawBuffersInvalid,this._stateSetters.setDrawBuffers),this._drawBuffersInvalid=!1}_setSubState(e,t,r,i){return(r||e!==t)&&(i(e),this._pipelineInvalid=!0),e}}},97098:(e,t,r)=>{r.d(t,{Q:()=>i}) 829const i=1/255.5}}])
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.