@arcgis/core 4.33.0-next.20250212 → 4.33.0-next.20250213
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/15ad8036736a32652c9b.js +1 -0
- package/assets/esri/core/workers/chunks/211c32244e05164dcd38.js +314 -0
- package/assets/esri/core/workers/chunks/219b06cca6aa1e041f40.js +1 -0
- package/assets/esri/core/workers/chunks/282c2d52011b331d4704.js +1 -0
- package/assets/esri/core/workers/chunks/2dc35c1c5d83174a2c06.js +1 -0
- package/assets/esri/core/workers/chunks/{e4651d577d297386268e.js → 32035bc69ee18b19623d.js} +1 -1
- package/assets/esri/core/workers/chunks/39c595734a9e9cd67e41.js +1 -0
- package/assets/esri/core/workers/chunks/544ad8fa4777ba8ec177.js +1 -0
- package/assets/esri/core/workers/chunks/6c64ccf5f64b5025b239.js +1 -0
- package/assets/esri/core/workers/chunks/89960be0e525d42ccffe.js +1 -0
- package/assets/esri/core/workers/chunks/9be12d0df67e2c4c3787.js +1 -0
- package/assets/esri/core/workers/chunks/a80c3ada9e09b8832e9b.js +1 -0
- package/assets/esri/core/workers/chunks/a8457210711b663059f0.js +1 -0
- package/assets/esri/core/workers/chunks/cbba0b6bd41d16eacb5c.js +1 -0
- package/assets/esri/core/workers/chunks/ea4c7560e64335f155f9.js +1 -0
- package/assets/esri/core/workers/chunks/eac791e3a0bb056a28f3.js +1 -0
- package/assets/esri/core/workers/chunks/{08980b1ad3d5d67c6390.js → f419aaf3bab086060894.js} +1 -1
- package/chunks/ComponentShader.glsl.js +6 -6
- package/core/libs/gl-matrix-2/factories/mat2df32.js +1 -1
- package/core/libs/gl-matrix-2/factories/mat2df64.js +1 -1
- package/core/libs/gl-matrix-2/factories/mat2f32.js +1 -1
- package/core/libs/gl-matrix-2/factories/mat2f64.js +1 -1
- package/core/libs/gl-matrix-2/factories/mat3f32.js +1 -1
- package/core/libs/gl-matrix-2/factories/mat3f64.js +1 -1
- package/core/libs/gl-matrix-2/factories/mat4f32.js +1 -1
- package/core/libs/gl-matrix-2/factories/mat4f64.js +1 -1
- package/core/libs/gl-matrix-2/factories/quat2f64.js +1 -1
- package/core/libs/gl-matrix-2/factories/vec2f32.js +1 -1
- package/core/libs/gl-matrix-2/factories/vec2f64.js +1 -1
- package/core/libs/gl-matrix-2/factories/vec3f32.js +1 -1
- package/core/libs/gl-matrix-2/factories/vec3f64.js +1 -1
- package/core/libs/gl-matrix-2/factories/vec4f32.js +1 -1
- package/core/libs/gl-matrix-2/factories/vec4f64.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/webgl-engine/lib/AnimationTimer.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/SceneView.js +1 -1
- package/assets/esri/core/workers/chunks/3ba85f1d660b8887f963.js +0 -314
- package/assets/esri/core/workers/chunks/3c8e5b5fb52611e30ed6.js +0 -1
- package/assets/esri/core/workers/chunks/5eceedac9b2b4d1ef133.js +0 -1
- package/assets/esri/core/workers/chunks/74e0116ae84def626c87.js +0 -1
- package/assets/esri/core/workers/chunks/7e3b374f906441cd7fb0.js +0 -1
- package/assets/esri/core/workers/chunks/84c1c3336011a1b79669.js +0 -1
- package/assets/esri/core/workers/chunks/9e7895e8201127ffe0a8.js +0 -1
- package/assets/esri/core/workers/chunks/a5e9ea13e844a62b2a7f.js +0 -1
- package/assets/esri/core/workers/chunks/a6ec3665bde2af8a96e6.js +0 -1
- package/assets/esri/core/workers/chunks/bf0bf2b912d668575a9b.js +0 -1
- package/assets/esri/core/workers/chunks/d7b260d6187f29e0c136.js +0 -1
- package/assets/esri/core/workers/chunks/debfb75a94b66b58cbbc.js +0 -1
- package/assets/esri/core/workers/chunks/e490f70f192780d7ad50.js +0 -1
- package/assets/esri/core/workers/chunks/e71b780d1e6a32f303b7.js +0 -1
- package/assets/esri/core/workers/chunks/f285ed5425b31123d2bc.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[662],{97937:(e,t,r)=>{r.d(t,{a:()=>M,c:()=>g,e:()=>b,f:()=>T,g:()=>w,i:()=>_,o:()=>U,s:()=>F,w:()=>x}),r(44208),r(53966);var n=r(34727),o=r(58083),s=r(38954),i=r(51850),a=r(87317),c=r(91829),u=r(34304),l=r(88582),f=r(71351);function d(e,t){const r=(0,s.l)(e),o=(0,n.YN)(e[2]/r),i=Math.atan2(e[1]/r,e[0]/r);return(0,s.i)(t,r,o,i),t}var h=r(44280),m=r(32114);const p=g();function g(){return(0,c.vt)()}const y=a.e,v=a.e;function b(e,t){return(0,a.c)(t,e)}function x(e){return e}function w(e){return e[3]}function M(e){return e}function T(e,t,r,n){return(0,c.fA)(e,t,r,n)}function B(e,t,r){if(null==t)return!1;if(!S(e,t,A))return!1;let{t0:n,t1:o}=A;if((n<0||o<n&&o>0)&&(n=o),n<0)return!1;if(r){const{origin:e,direction:o}=t;r[0]=e[0]+o[0]*n,r[1]=e[1]+o[1]*n,r[2]=e[2]+o[2]*n}return!0}const A={t0:0,t1:0};function S(e,t,r){const{origin:n,direction:o}=t,s=R;s[0]=n[0]-e[0],s[1]=n[1]-e[1],s[2]=n[2]-e[2];const i=o[0]*o[0]+o[1]*o[1]+o[2]*o[2];if(0===i)return!1;const a=2*(o[0]*s[0]+o[1]*s[1]+o[2]*s[2]),c=a*a-4*i*(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]-e[3]*e[3]);if(c<0)return!1;const u=Math.sqrt(c);return r.t0=(-a-u)/(2*i),r.t1=(-a+u)/(2*i),!0}const R=(0,i.vt)();function _(e,t){return B(e,t,null)}function C(e,t,r){const n=m.rq.get(),i=m.Rc.get();(0,s.e)(n,t.origin,t.direction);const a=w(e);(0,s.e)(r,n,t.origin),(0,s.h)(r,r,1/(0,s.l)(r)*a);const c=E(e,t.origin),u=(0,h.g7)(t.origin,r);return(0,o.$0)(i,u+c,n),(0,s.t)(r,r,i),r}function P(e,t,r){const n=(0,s.d)(m.rq.get(),t,e),o=(0,s.h)(m.rq.get(),n,e[3]/(0,s.l)(n));return(0,s.g)(r,o,e)}function E(e,t){const r=(0,s.d)(m.rq.get(),t,e),o=(0,s.l)(r),i=w(e),a=i+Math.abs(i-o);return(0,n.XM)(i/a)}const I=(0,i.vt)();function O(e,t,r,n){const o=(0,s.d)(I,t,e);switch(r){case l._.X:{const e=d(o,I)[2];return(0,s.i)(n,-Math.sin(e),Math.cos(e),0)}case l._.Y:{const e=d(o,I),t=e[1],r=e[2],i=Math.sin(t);return(0,s.i)(n,-i*Math.cos(r),-i*Math.sin(r),Math.cos(t))}case l._.Z:return(0,s.n)(n,o);default:return}}function q(e,t){const r=(0,s.d)(j,t,e);return(0,s.l)(r)-e[3]}function U(e,t){const r=(0,s.s)(e,t),n=w(e);return r<=n*n}const j=(0,i.vt)(),N=g(),F=Object.freeze(Object.defineProperty({__proto__:null,NullSphere:p,altitudeAt:q,angleToSilhouette:E,axisAt:O,cameraFrustumCoverage:function(e,t,r,n){const o=w(e),s=o*o,i=t+.5*Math.PI,a=r*r+s-2*Math.cos(i)*r*o,c=Math.sqrt(a),u=a-s;if(u<=0)return.5;const l=Math.sqrt(u),f=Math.acos(l/c)-Math.asin(o/(c/Math.sin(i)));return Math.min(1,(f+.5*n)/n)},clear:function(e){e[0]=e[1]=e[2]=e[3]=0},closestPoint:function(e,t,r){return B(e,t,r)?r:((0,f.oC)(t,e,r),P(e,r,r))},closestPointOnSilhouette:C,containsPoint:U,copy:b,create:g,distanceToSilhouette:function(e,t){const r=(0,s.d)(m.rq.get(),t,e),n=(0,s.k)(r),o=e[3]*e[3];return Math.sqrt(Math.abs(n-o))},elevate:function(e,t,r){return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=e[3]+t,r},equals:v,exactEquals:y,fromCenterAndRadius:function(e,t){return(0,c.fA)(e[0],e[1],e[2],t)},fromRadius:function(e,t){return e[0]=e[1]=e[2]=0,e[3]=t,e},fromValues:T,getCenter:M,getExtent:function(e,t){return t},getRadius:w,intersectLine:function(e,t,r){const n=(0,f.Cr)(t,r);if(!S(e,n,A))return[];const{origin:o,direction:a}=n,{t0:c,t1:l}=A,d=t=>{const r=(0,i.vt)();return(0,s.b)(r,o,a,t),P(e,r,r)};return Math.abs(c-l)<(0,u.FD)()?[d(c)]:[d(c),d(l)]},intersectRay:B,intersectRayClosestSilhouette:function(e,t,r){if(B(e,t,r))return r;const n=C(e,t,m.rq.get());return(0,s.g)(r,t.origin,(0,s.h)(m.rq.get(),t.direction,(0,s.j)(t.origin,n)/(0,s.l)(t.direction))),r},intersectsRay:_,projectPoint:P,setAltitudeAt:function(e,t,r,n){const o=q(e,t),i=O(e,t,l._.Z,j),a=(0,s.h)(j,i,r-o);return(0,s.g)(n,t,a)},setExtent:function(e,t,r){return e!==r&&b(e,r),r},tmpSphere:N,union:function(e,t,r=(0,c.vt)()){const n=(0,s.j)(e,t),o=e[3],i=t[3];return n+i<o?((0,a.c)(r,e),r):n+o<i?((0,a.c)(r,t),r):((0,s.m)(r,e,t,(n+i-o)/(2*n)),r[3]=(n+o+i)/2,r)},wrap:x},Symbol.toStringTag,{value:"Module"}))},43609:(e,t,r)=>{r.d(t,{a:()=>s,f:()=>i,n:()=>o});var n=r(34275);function o(e,t){s(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r=2,o=r){const s=t.length/2;let i=0,a=0;if(!(0,n.iu)(t)||(0,n.dk)(t)){for(let n=0;n<s;++n)e[i]=t[a],e[i+1]=t[a+1],i+=r,a+=o;return}const c=(0,n.a3)(t);if((0,n.JI)(t))for(let n=0;n<s;++n)e[i]=Math.max(t[a]/c,-1),e[i+1]=Math.max(t[a+1]/c,-1),i+=r,a+=o;else for(let n=0;n<s;++n)e[i]=t[a]/c,e[i+1]=t[a+1]/c,i+=r,a+=o}function i(e,t,r,n){const o=e.typedBuffer,s=e.typedBufferStride,i=n?.count??e.count;let a=(n?.dstIndex??0)*s;for(let e=0;e<i;++e)o[a]=t,o[a+1]=r,a+=s}Object.freeze(Object.defineProperty({__proto__:null,fill:i,normalizeIntegerBuffer:s,normalizeIntegerBufferView:o},Symbol.toStringTag,{value:"Module"}))},73354:(e,t,r)=>{r.d(t,{a:()=>f,b:()=>a,c:()=>i,d:()=>o,e:()=>d,f:()=>l,l:()=>u,n:()=>h,t:()=>s});var n=r(40876);function o(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,n=3,o=n){if(e.length/n!==Math.ceil(t.length/o))return e;const s=e.length/n,i=r[0],a=r[1],c=r[2],u=r[4],l=r[5],f=r[6],d=r[8],h=r[9],m=r[10],p=r[12],g=r[13],y=r[14];let v=0,b=0;for(let r=0;r<s;r++){const r=t[v],s=t[v+1],x=t[v+2];e[b]=i*r+u*s+d*x+p,e[b+1]=a*r+l*s+h*x+g,e[b+2]=c*r+f*s+m*x+y,v+=o,b+=n}return e}function i(e,t,r){a(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function a(e,t,r,n=3,o=n){if(e.length/n!==Math.ceil(t.length/o))return;const s=e.length/n,i=r[0],a=r[1],c=r[2],u=r[3],l=r[4],f=r[5],d=r[6],h=r[7],m=r[8];let p=0,g=0;for(let r=0;r<s;r++){const r=t[p],s=t[p+1],y=t[p+2];e[g]=i*r+u*s+d*y,e[g+1]=a*r+l*s+h*y,e[g+2]=c*r+f*s+m*y,p+=o,g+=n}}function c(e,t,r,n=3,o=n){const s=Math.min(e.length/n,t.length/o);let i=0,a=0;for(let c=0;c<s;c++)e[a]=r*t[i],e[a+1]=r*t[i+1],e[a+2]=r*t[i+2],i+=o,a+=n;return e}function u(e,t,r,n){l(e.typedBuffer,t.typedBuffer,r,n,e.typedBufferStride,t.typedBufferStride)}function l(e,t,r,o,s=3,i=s){const a=Math.min(e.length/s,t.length/i);let c=0,u=0;const l=1/n.Tf;for(let n=0;n<a;n++)e[u]=o*(r*t[c])**l,e[u+1]=o*(r*t[c+1])**l,e[u+2]=o*(r*t[c+2])**l,c+=i,u+=s}function f(e,t,r,n=3,o=n){const s=e.length/n;if(s!==Math.ceil(t.length/o))return e;let i=0,a=0;for(let c=0;c<s;c++)e[a]=t[i]+r[0],e[a+1]=t[i+1]+r[1],e[a+2]=t[i+2]+r[2],i+=o,a+=n;return e}function d(e,t){h(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function h(e,t,r=3,n=r){const o=Math.min(e.length/r,t.length/n);let s=0,i=0;for(let a=0;a<o;a++){const o=t[s],a=t[s+1],c=t[s+2],u=o*o+a*a+c*c;if(u>0){const t=1/Math.sqrt(u);e[i]=t*o,e[i+1]=t*a,e[i+2]=t*c}s+=n,i+=r}}r(44208),r(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:l,linearToSRGBView:u,normalize:h,normalizeView:d,scale:c,scaleView:function(e,t,r){c(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const n=Math.min(e.count,t.count),o=e.typedBuffer,s=e.typedBufferStride,i=t.typedBuffer,a=t.typedBufferStride;let c=0,u=0;for(let e=0;e<n;e++)o[u]=i[c]>>r,o[u+1]=i[c+1]>>r,o[u+2]=i[c+2]>>r,c+=a,u+=s},transformMat3:a,transformMat3View:i,transformMat4:s,transformMat4View:o,translate:f},Symbol.toStringTag,{value:"Module"}))},65686:(e,t,r)=>{r.d(t,{a:()=>s,b:()=>l,l:()=>u,n:()=>a,t:()=>i});var n=r(40876),o=(r(44208),r(53966));function s(e,t,r){i(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r,n=4,o=n){if(e.length/n!=t.length/o)return;const s=e.length/n,i=r[0],a=r[1],c=r[2],u=r[3],l=r[4],f=r[5],d=r[6],h=r[7],m=r[8];let p=0,g=0;for(let r=0;r<s;r++){const r=t[p],s=t[p+1],y=t[p+2],v=t[p+3];e[g]=i*r+u*s+d*y,e[g+1]=a*r+l*s+h*y,e[g+2]=c*r+f*s+m*y,e[g+3]=v,p+=o,g+=n}}function a(e,t){const r=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,i=t.typedBufferStride;for(let e=0;e<r;e++){const t=e*o,r=e*i,a=s[r],c=s[r+1],u=s[r+2],l=a*a+c*c+u*u;if(l>0){const e=1/Math.sqrt(l);n[t]=e*a,n[t+1]=e*c,n[t+2]=e*u}}}function c(e,t,r,n=4){const o=Math.min(e.length/n,t.count),s=t.typedBuffer,i=t.typedBufferStride;let a=0,c=0;for(let t=0;t<o;t++)e[c]=r*s[a],e[c+1]=r*s[a+1],e[c+2]=r*s[a+2],e[c+3]=r*s[a+3],a+=i,c+=n}function u(e,t,r,n){l(e.typedBuffer,t,r,n,e.typedBufferStride)}function l(e,t,r,o,s=4){const i=Math.min(e.length/s,t.count),a=t.typedBuffer,c=t.typedBufferStride;let u=0,l=0;const f=1/n.Tf;for(let t=0;t<i;t++)e[l]=o*(r*a[u])**f,e[l+1]=o*(r*a[u+1])**f,e[l+2]=o*(r*a[u+2])**f,e[l+3]=o*r*a[u+3],u+=c,l+=s}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:l,linearToSRGBView:u,normalize:a,scale:c,scaleView:function(e,t,r){c(e.typedBuffer,t,r,e.typedBufferStride)},transformMat3:i,transformMat3View:s,transformMat4:function(e,t,r,n=4,s=n){if(e.length/n!=t.length/s)return void o.A.getLogger("esri.views.3d.support.buffer.math").error("source and destination buffers need to have the same number of elements");const i=e.length/n,a=r[0],c=r[1],u=r[2],l=r[3],f=r[4],d=r[5],h=r[6],m=r[7],p=r[8],g=r[9],y=r[10],v=r[11],b=r[12],x=r[13],w=r[14],M=r[15];let T=0,B=0;for(let r=0;r<i;r++){const r=t[T],o=t[T+1],i=t[T+2],A=t[T+3];e[B]=a*r+f*o+p*i+b*A,e[B+1]=c*r+d*o+g*i+x*A,e[B+2]=u*r+h*o+y*i+w*A,e[B+3]=l*r+m*o+v*i+M*A,T+=s,B+=n}},transformMat4View:function(e,t,r){if(e.count!==t.count)return;const n=e.count,o=r[0],s=r[1],i=r[2],a=r[3],c=r[4],u=r[5],l=r[6],f=r[7],d=r[8],h=r[9],m=r[10],p=r[11],g=r[12],y=r[13],v=r[14],b=r[15],x=e.typedBuffer,w=e.typedBufferStride,M=t.typedBuffer,T=t.typedBufferStride;for(let e=0;e<n;e++){const t=e*w,r=e*T,n=M[r],B=M[r+1],A=M[r+2],S=M[r+3];x[t]=o*n+c*B+d*A+g*S,x[t+1]=s*n+u*B+h*A+y*S,x[t+2]=i*n+l*B+m*A+v*S,x[t+3]=a*n+f*B+p*A+b*S}}},Symbol.toStringTag,{value:"Module"}))},4341:(e,t,r)=>{r.d(t,{I:()=>o});var n=r(26390);class o{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,n.d)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*s);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,s));e++)this._items.push(this._allocator())}}const s=1024},46140:(e,t,r)=>{r.d(t,{R:()=>o});var n=r(49186);let o=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new n.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[o,s]=t.split("."),i=/^\s*\d+\s*$/;if(!o?.match||!i.test(o))throw new n.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!i.test(s))throw new n.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(o,10),c=parseInt(s,10);return new e(a,c,r)}}},61473:(e,t,r)=>{function n(e){return e=e||globalThis.location.hostname,u.some((t=>null!=e?.match(t)))}function o(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(s)||null!=t.match(a)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(i)||null!=t.match(c)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>o,b5:()=>n});const s=/^devext\.arcgis\.com$/,i=/^qaext\.arcgis\.com$/,a=/^[\w-]*\.mapsdevext\.arcgis\.com$/,c=/^[\w-]*\.mapsqa\.arcgis\.com$/,u=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,s,i,/^jsapps\.esri\.com$/,a,c]},88340:(e,t,r)=>{function n(){return new Float32Array(2)}function o(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function s(){return n()}function i(){return o(1,1)}function a(){return o(1,0)}function c(){return o(0,1)}r.d(t,{Un:()=>l,fA:()=>o,uY:()=>u,vt:()=>n});const u=s(),l=i(),f=a(),d=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:l,UNIT_X:f,UNIT_Y:d,ZEROS:u,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:n,createView:function(e,t){return new Float32Array(e,t,2)},fromValues:o,ones:i,unitX:a,unitY:c,zeros:s},Symbol.toStringTag,{value:"Module"}))},44794:(e,t,r)=>{r.d(t,{v:()=>a});var n=r(4718),o=r(62788),s=r(95488);class i{constructor(e,t){this._observable=new s.I,this._value=e,this._equalityFunction=t}get value(){return(0,o.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function a(e,t=n.gh){return new i(e,t)}},71351:(e,t,r)=>{r.d(t,{C:()=>f,Cr:()=>d,LV:()=>l,kb:()=>h,oC:()=>m,vt:()=>c}),r(4576);var n=r(4341),o=(r(77690),r(29242)),s=r(38954),i=r(51850),a=r(32114);function c(e){return e?u((0,i.o8)(e.origin),(0,i.o8)(e.direction)):u((0,i.vt)(),(0,i.vt)())}function u(e,t){return{origin:e,direction:t}}function l(e,t){const r=p.get();return r.origin=e,r.direction=t,r}function f(e,t=c()){return function(e,t,r=c()){return(0,s.c)(r.origin,e),(0,s.c)(r.direction,t),r}(e.origin,e.direction,t)}function d(e,t,r=c()){return(0,s.c)(r.origin,e),(0,s.d)(r.direction,t,e),r}function h(e,t){const r=(0,s.e)(a.rq.get(),(0,s.n)(a.rq.get(),e.direction),(0,s.d)(a.rq.get(),t,e.origin));return(0,s.f)(r,r)}function m(e,t,r){const n=(0,s.f)(e.direction,(0,s.d)(r,t,e.origin));return(0,s.g)(r,e.origin,(0,s.h)(r,e.direction,n)),r}const p=new n.I((()=>c()));(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,o.vt)()},21015:(e,t,r)=>{r.d(t,{R:()=>c});var n=r(78888),o=r(60999),s=r(49186),i=r(74887),a=r(84952);class c{constructor(e){this._streamDataRequester=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,a.DB)(e)?((0,i.Te)(t),(0,a.lJ)(e)):this._load("binary",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){if(null==this._streamDataRequester)return(await(0,n.A)(t,{responseType:u[e]})).data;const a=await(0,o.Ke)(this._streamDataRequester.request(t,e,r));if(!0===a.ok)return a.value;throw(0,i.QP)(a.error),new s.A("glt-loader-request-error",`Request for resource failed: ${a.error}`)}}const u={image:"image",binary:"array-buffer",json:"json","image+type":void 0}},84498:(e,t,r)=>{r.d(t,{x:()=>i});var n=r(34275),o=r(97146),s=r(63907);function i(e,t){switch(t){case s.WR.TRIANGLES:return"number"==typeof(r=e)?(0,o.tM)(r):(0,n.mg)(r)?new Uint16Array(r):r;case s.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,n=(0,o.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(n[e++]=t,n[e++]=t+1,n[e++]=t+2):(n[e++]=t+1,n[e++]=t,n[e++]=t+2)}else{let t=0;for(let o=0;o<r;o+=1)o%2==0?(n[t++]=e[o],n[t++]=e[o+1],n[t++]=e[o+2]):(n[t++]=e[o+1],n[t++]=e[o],n[t++]=e[o+2])}return n}(e);case s.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,n=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)n[e++]=0,n[e++]=t+1,n[e++]=t+2;return n}const o=e[0];let s=e[1],i=0;for(let t=0;t<r;++t){const r=e[t+2];n[i++]=o,n[i++]=s,n[i++]=r,s=r}return n}(e)}var r}},51530:(e,t,r)=>{r.d(t,{KB:()=>a,Xi:()=>s,pn:()=>c,x3:()=>i});var n=r(44208),o=r(89192);class s{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding=o.JS.KTX2_ENCODING}}function i(e){return"encoded-mesh-texture"===e?.type}async function a(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function c(e,t){if(t===o.JS.KTX2_ENCODING)return new s(e);const r=new Blob([e],{type:t});let i=URL.createObjectURL(r);switch(t){case"image/jpeg":i+="#.jpg";break;case"image/png":i+="#.png"}const a=new Image;if((0,n.A)("esri-iPhone"))return new Promise(((e,t)=>{const r=()=>{o(),e(a)},n=e=>{o(),t(e)},o=()=>{URL.revokeObjectURL(i),a.removeEventListener("load",r),a.removeEventListener("error",n)};a.addEventListener("load",r),a.addEventListener("error",n),a.src=i}));try{a.src=i,await a.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(i),a}},64304:(e,t,r)=>{r.d(t,{fetch:()=>Z});var n=r(40876),o=r(61473),s=r(34727),i=r(77690),a=r(29242),c=r(58083),u=r(9093),l=r(48163),f=r(38954),d=r(51850),h=r(70328),m=r(11868),p=r(13030),g=r(73354),y=r(65686),v=r(43609),b=r(21015),x=r(84498),w=r(51530),M=r(88340);function T(e){if(null==e)return null;const t=null!=e.offset?e.offset:M.uY,r=null!=e.rotation?e.rotation:0,n=null!=e.scale?e.scale:M.Un,o=(0,a.fA)(1,0,0,0,1,0,t[0],t[1],1),s=(0,a.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),c=(0,a.fA)(n[0],0,0,0,n[1],0,0,0,1),u=(0,a.vt)();return(0,i.lw)(u,s,c),(0,i.lw)(u,o,u),u}class B{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class A{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new B,this.numberOfVertices=0}}var S=r(78888),R=r(60999),_=r(49186),C=r(53966),P=r(69397);class E{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const n=this._outer.get(e);n?n.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}forEach(e){this._outer.forEach(((t,r)=>e(t,r)))}forAll(e){for(const t of this._outer.values())for(const r of t.values())e(r)}}var I=r(74887),O=r(46140),q=r(97146),U=r(99677),j=r(46610),N=r(89192),F=r(2415),k=r(48833),L=r(46540),D=r(11787),V=r(63907);const $=()=>C.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class z{constructor(e,t,r){this.resource=e,this.textures=t,this.cachedMemory=r}}function H(e){throw new _.A("",`Request for object resource failed: ${e}`)}function G(e){const t=e.params,r=t.topology;let n=!0;switch(t.vertexAttributes||($().warn("Geometry must specify vertex attributes"),n=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&($().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),n=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&($().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),n=!1)):($().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),n=!1)}}else $().warn("Indexed geometries must specify faces"),n=!1;break}default:$().warn(`Unsupported topology '${r}'`),n=!1}e.params.material||($().warn("Geometry requires material"),n=!1);const o=e.params.vertexAttributes;for(const e in o)o[e].values||($().warn("Geometries with externally defined attributes are not yet supported"),n=!1);return n}function W(e){const t=(0,h.Ie)();return e.forEach((e=>{const r=e.boundingInfo;null!=r&&((0,h.iT)(t,r.bbMin),(0,h.iT)(t,r.bbMax))})),t}function X(e){switch(e){case"mask":return N.sf.Mask;case"maskAndTransparency":return N.sf.MaskBlend;case"none":return N.sf.Opaque;default:return N.sf.Blend}}function Y(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const J=new O.R(1,2,"wosr");var K=r(96336),Q=r(74810);async function Z(e,t){const a=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,o.EM)(e));if("wosr"===a.fileType){const e=await(t.cache?t.cache.loadWOSR(a.url,t):async function(e,t){const r=await async function(e,t){const r=t?.streamDataRequester;if(r)return async function(e,t,r){const n=await(0,R.Ke)(t.request(e,"json",r));if(!0===n.ok)return n.value;(0,I.QP)(n.error),H(n.error.details.url)}(e,r,t);const n=await(0,R.Ke)((0,S.A)(e,t));if(!0===n.ok)return n.value.data;(0,I.QP)(n.error),H(n.error)}(e,t),n=await async function(e,t){const r=new Array;for(const n in e){const o=e[n],s=o.images[0].data;if(!s){$().warn("Externally referenced texture data is not yet supported");continue}const i=o.encoding+";base64,"+s,a="/textureDefinitions/"+n,c="rgba"===o.channels?o.alphaChannelUsage||"transparency":"none",u={noUnpackFlip:!0,wrap:{s:V.pF.REPEAT,t:V.pF.REPEAT},preMultiplyAlpha:X(c)!==N.sf.Opaque},l=t?.disableTextures?Promise.resolve(null):(0,U.D)(i,t);r.push(l.then((e=>({refId:a,image:e,parameters:u,alphaChannelUsage:c}))))}const n=await Promise.all(r),o={};for(const e of n)o[e.refId]=e;return o}(r.textureDefinitions??{},t);let o=0;for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];o+=t?.image?t.image.width*t.image.height*4:0}return new z(r,n,o+(0,P.Qh)(r))}(a.url,t)),{engineResources:r,referenceBoundingBox:n}=function(e,t){const r=new Array,n=new Array,o=new Array,s=new E,i=e.resource,a=O.R.parse(i.version||"1.0","wosr");J.validate(a);const c=i.model.name,u=i.model.geometries,l=i.materialDefinitions??{},f=e.textures;let h=0;const m=new Map;for(let e=0;e<u.length;e++){const i=u[e];if(!G(i))continue;const a=Y(i),c=i.params.vertexAttributes,p=[],g=e=>{if("PerAttributeArray"===i.params.topology)return null;const t=i.params.faces;for(const r in t)if(r===e)return t[r].values;return null},y=c[L.r.POSITION],v=y.values.length/y.valuesPerElement;for(const e in c){const t=c[e],r=t.values,n=g(e)??(0,q.tM)(v);p.push([e,new j.n(r,n,t.valuesPerElement,!0)])}const b=a.texture,x=f&&f[b];if(x&&!m.has(b)){const{image:e,parameters:t}=x,r=new k.g(e,t);n.push(r),m.set(b,r)}const w=m.get(b),M=w?w.id:void 0,T=a.material;let B=s.get(T,b);if(null==B){const e=l[T.slice(T.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=x&&x.alphaChannelUsage,n=e.transparency>0||"transparency"===r||"maskAndTransparency"===r,o=x?X(x.alphaChannelUsage):void 0,i={ambient:(0,d.ci)(e.diffuse),diffuse:(0,d.ci)(e.diffuse),opacity:1-(e.transparency||0),transparent:n,textureAlphaMode:o,textureAlphaCutoff:.33,textureId:M,doubleSided:!0,cullFace:N.s2.None,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:x?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(i,t.materialParameters),B=new D.$U(i,t),s.set(T,b,B)}o.push(B);const A=new F.V(B,p);h+=p.find((e=>e[0]===L.r.POSITION))?.[1]?.indices.length??0,r.push(A)}return{engineResources:[{name:c,stageResources:{textures:n,materials:o,geometries:r},pivotOffset:i.model.pivotOffset,numberOfVertices:h,lodThreshold:null}],referenceBoundingBox:W(r)}}(e,t);return{lods:r,referenceBoundingBox:n,isEsriSymbolResource:!1,isWosr:!0}}let M;if(t.cache)M=await t.cache.loadGLTF(a.url,t,!!t.usePBR);else{const{loadGLTF:e}=await r.e(4399).then(r.bind(r,4399));M=await e(new b.R(t.streamDataRequester),a.url,t,t.usePBR)}const B=M.model.meta?.ESRI_proxyEllipsoid,_=M.meta.isEsriSymbolResource&&null!=B&&"EsriRealisticTreesStyle"===M.meta.ESRI_webstyle;_&&!M.customMeta.esriTreeRendering&&(M.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const o=e.model.lods[r];for(const s of o.parts){const o=s.attributes.normal;if(null==o)return;const i=s.attributes.position,a=i.count,l=(0,d.vt)(),h=(0,d.vt)(),m=(0,d.vt)(),g=new Float32Array(4*a),y=new Float32Array(3*a),v=(0,c.B8)((0,u.vt)(),s.transform);let b=0,x=0;for(let c=0;c<a;c++){i.getVec(c,h),o.getVec(c,l),(0,f.t)(h,h,s.transform),(0,f.d)(m,h,t.center),(0,f.E)(m,m,t.radius);const a=m[2],u=(0,f.l)(m),d=Math.min(.45+.55*u*u,1)**n.Tf;(0,f.E)(m,m,t.radius),null!==v&&(0,f.t)(m,m,v),(0,f.n)(m,m),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,f.m)(m,m,l,a>-1?.2:Math.min(-4*a-3.8,1)),y[b]=m[0],y[b+1]=m[1],y[b+2]=m[2],b+=3,g[x]=d,g[x+1]=d,g[x+2]=d,g[x+3]=1,x+=4}s.attributes.normal=new p.xs(y),s.attributes.color=new p.Eq(g)}}}(M,B));const C=!!t.usePBR,Z=M.meta.isEsriSymbolResource?{usePBR:C,isSchematic:!1,treeRendering:_,mrrFactors:Q.SY}:{usePBR:C,isSchematic:!1,treeRendering:!1,mrrFactors:Q.mb},te={...t.materialParameters,treeRendering:_},{engineResources:re,referenceBoundingBox:ne}=function(e,t,r,o,a){const c=e.model,u=new Array,f=new Map,d=new Map,b=c.lods.length,M=(0,h.Ie)();return c.lods.forEach(((e,B)=>{const S=!0===o.skipHighLods&&(b>1&&0===B||b>3&&1===B)||!1===o.skipHighLods&&null!=a&&B!==a;if(S&&0!==B)return;const R=new A(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach((e=>{const a=S?new D.$U({},o):function(e,t,r,o,s,i,a,c){const u=e.materials.get(t.material);if(null==u)return null;const{normal:f,color:d,texCoord0:h,tangent:m}=t.attributes,p=t.material+(f?"_normal":"")+(d?"_color":"")+(h?"_texCoord0":"")+(m?"_tangent":""),g=null!=t.attributes.texCoord0,y=null!=t.attributes.normal,v=function(e){switch(e){case"BLEND":return N.sf.Blend;case"MASK":return N.sf.Mask;case"OPAQUE":case null:case void 0:return N.sf.Opaque}}(u.alphaMode);if(!i.has(p)){if(g){const t=(t,r=!1)=>{if(null!=t&&!a.has(t)){const n=e.textures.get(t);if(n){const e=n.data;a.set(t,new k.g((0,w.x3)(e)?e.data:e,{...n.parameters,preMultiplyAlpha:!(0,w.x3)(e)&&r,encoding:(0,w.x3)(e)?e.encoding:void 0}))}}};t(u.colorTexture,v!==N.sf.Opaque),t(u.normalTexture),t(u.occlusionTexture),t(u.emissiveTexture),t(u.metallicRoughnessTexture)}const r=1/n.Tf,f=u.color[0]**r,d=u.color[1]**r,h=u.color[2]**r,m=u.emissiveFactor[0]**r,b=u.emissiveFactor[1]**r,x=u.emissiveFactor[2]**r,M=null!=u.colorTexture&&g?a.get(u.colorTexture):null,B=(0,Q.Jr)(u),A=null!=u.normalTextureTransform?.scale?u.normalTextureTransform?.scale:l.Un;i.set(p,new D.$U({...o,transparent:v===N.sf.Blend,customDepthTest:N.it.Lequal,textureAlphaMode:v,textureAlphaCutoff:u.alphaCutoff,diffuse:[f,d,h],ambient:[f,d,h],opacity:u.opacity,doubleSided:u.doubleSided,doubleSidedType:"winding-order",cullFace:u.doubleSided?N.s2.None:N.s2.Back,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:y?K.W.Attribute:K.W.ScreenDerivative,castShadows:!0,receiveShadows:u.receiveShadows,receiveAmbientOcclusion:u.receiveAmbientOcclustion,textureId:null!=M?M.id:void 0,colorMixMode:u.colorMixMode,normalTextureId:null!=u.normalTexture&&g?a.get(u.normalTexture).id:void 0,textureAlphaPremultiplied:null!=M&&!!M.parameters.preMultiplyAlpha,occlusionTextureId:null!=u.occlusionTexture&&g?a.get(u.occlusionTexture).id:void 0,emissiveTextureId:null!=u.emissiveTexture&&g?a.get(u.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=u.metallicRoughnessTexture&&g?a.get(u.metallicRoughnessTexture).id:void 0,emissiveFactor:[m,b,x],mrrFactors:B?Q.Bt:[u.metallicFactor,u.roughnessFactor,o.mrrFactors[2]],isSchematic:B,colorTextureTransformMatrix:T(u.colorTextureTransform),normalTextureTransformMatrix:T(u.normalTextureTransform),scale:[A[0],A[1]],occlusionTextureTransformMatrix:T(u.occlusionTextureTransform),emissiveTextureTransformMatrix:T(u.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:T(u.metallicRoughnessTextureTransform),...s},c))}const b=i.get(p);if(r.stageResources.materials.push(b),g){const e=e=>{null!=e&&r.stageResources.textures.push(a.get(e))};e(u.colorTexture),e(u.normalTexture),e(u.occlusionTexture),e(u.emissiveTexture),e(u.metallicRoughnessTexture)}return b}(c,e,R,t,r,f,d,o),{geometry:u,vertexCount:b}=function(e,t){const r=e.attributes.position.count,n=(0,x.x)(e.indices||r,e.primitiveType),o=(0,m.oe)(3*r),{typedBuffer:a,typedBufferStride:c}=e.attributes.position;(0,g.t)(o,a,e.transform,3,c);const u=[[L.r.POSITION,new j.n(o,n,3,!0)]];if(null!=e.attributes.normal){const t=(0,m.oe)(3*r),{typedBuffer:o,typedBufferStride:a}=e.attributes.normal;(0,i.Ge)(ee,e.transform),(0,g.b)(t,o,ee,3,a),(0,s.or)(ee)&&(0,g.n)(t,t),u.push([L.r.NORMAL,new j.n(t,n,3,!0)])}if(null!=e.attributes.tangent){const t=(0,m.oe)(4*r),{typedBuffer:o,typedBufferStride:a}=e.attributes.tangent;(0,i.z0)(ee,e.transform),(0,y.t)(t,o,ee,4,a),(0,s.or)(ee)&&(0,g.n)(t,t,4),u.push([L.r.TANGENT,new j.n(t,n,4,!0)])}if(null!=e.attributes.texCoord0){const t=(0,m.oe)(2*r),{typedBuffer:o,typedBufferStride:s}=e.attributes.texCoord0;(0,v.a)(t,o,2,s),u.push([L.r.UV0,new j.n(t,n,2,!0)])}const l=e.attributes.color;if(null!=l){const t=new Uint8Array(4*r);4===l.elementCount?l instanceof p.Eq?(0,y.b)(t,l,1,255):(l instanceof p.XP||l instanceof p.Uz)&&(0,y.b)(t,l,1/255,255):(t.fill(255),l instanceof p.xs?(0,g.f)(t,l.typedBuffer,1,255,4,l.typedBufferStride):(e.attributes.color instanceof p.eI||e.attributes.color instanceof p.nS)&&(0,g.f)(t,l.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),u.push([L.r.COLOR,new j.n(t,n,4,!0)])}return{geometry:new F.V(t,u),vertexCount:r}}(e,a??new D.$U({},o)),A=u.boundingInfo;null!=A&&0===B&&((0,h.iT)(M,A.bbMin),(0,h.iT)(M,A.bbMax)),null!=a&&(R.stageResources.geometries.push(u),R.numberOfVertices+=b)})),S||u.push(R)})),{engineResources:u,referenceBoundingBox:M}}(M,Z,te,t,a.specifiedLodIndex);return{lods:re,referenceBoundingBox:ne,isEsriSymbolResource:M.meta.isEsriSymbolResource,isWosr:!1}}const ee=(0,a.vt)()},66104:(e,t,r)=>{var n,o;r.d(t,{k5:()=>n}),r(34727),(o=n||(n={}))[o.Multiply=1]="Multiply",o[o.Ignore=2]="Ignore",o[o.Replace=3]="Replace",o[o.Tint=4]="Tint"},42583:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(66104),o=r(31821);function s(e){e.vertex.code.add(o.H`
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[662],{97937:(e,t,r)=>{r.d(t,{a:()=>M,c:()=>g,e:()=>b,f:()=>T,g:()=>w,i:()=>_,o:()=>U,s:()=>k,w:()=>x}),r(44208),r(53966);var n=r(34727),o=r(58083),s=r(38954),i=r(51850),a=r(87317),c=r(91829),u=r(34304),l=r(88582),f=r(71351);function d(e,t){const r=(0,s.l)(e),o=(0,n.YN)(e[2]/r),i=Math.atan2(e[1]/r,e[0]/r);return(0,s.i)(t,r,o,i),t}var h=r(44280),m=r(32114);const p=g();function g(){return(0,c.vt)()}const y=a.e,v=a.e;function b(e,t){return(0,a.c)(t,e)}function x(e){return e}function w(e){return e[3]}function M(e){return e}function T(e,t,r,n){return(0,c.fA)(e,t,r,n)}function B(e,t,r){if(null==t)return!1;if(!S(e,t,A))return!1;let{t0:n,t1:o}=A;if((n<0||o<n&&o>0)&&(n=o),n<0)return!1;if(r){const{origin:e,direction:o}=t;r[0]=e[0]+o[0]*n,r[1]=e[1]+o[1]*n,r[2]=e[2]+o[2]*n}return!0}const A={t0:0,t1:0};function S(e,t,r){const{origin:n,direction:o}=t,s=R;s[0]=n[0]-e[0],s[1]=n[1]-e[1],s[2]=n[2]-e[2];const i=o[0]*o[0]+o[1]*o[1]+o[2]*o[2];if(0===i)return!1;const a=2*(o[0]*s[0]+o[1]*s[1]+o[2]*s[2]),c=a*a-4*i*(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]-e[3]*e[3]);if(c<0)return!1;const u=Math.sqrt(c);return r.t0=(-a-u)/(2*i),r.t1=(-a+u)/(2*i),!0}const R=(0,i.vt)();function _(e,t){return B(e,t,null)}function C(e,t,r){const n=m.rq.get(),i=m.Rc.get();(0,s.e)(n,t.origin,t.direction);const a=w(e);(0,s.e)(r,n,t.origin),(0,s.h)(r,r,1/(0,s.l)(r)*a);const c=E(e,t.origin),u=(0,h.g7)(t.origin,r);return(0,o.$0)(i,u+c,n),(0,s.t)(r,r,i),r}function P(e,t,r){const n=(0,s.d)(m.rq.get(),t,e),o=(0,s.h)(m.rq.get(),n,e[3]/(0,s.l)(n));return(0,s.g)(r,o,e)}function E(e,t){const r=(0,s.d)(m.rq.get(),t,e),o=(0,s.l)(r),i=w(e),a=i+Math.abs(i-o);return(0,n.XM)(i/a)}const I=(0,i.vt)();function O(e,t,r,n){const o=(0,s.d)(I,t,e);switch(r){case l._.X:{const e=d(o,I)[2];return(0,s.i)(n,-Math.sin(e),Math.cos(e),0)}case l._.Y:{const e=d(o,I),t=e[1],r=e[2],i=Math.sin(t);return(0,s.i)(n,-i*Math.cos(r),-i*Math.sin(r),Math.cos(t))}case l._.Z:return(0,s.n)(n,o);default:return}}function q(e,t){const r=(0,s.d)(j,t,e);return(0,s.l)(r)-e[3]}function U(e,t){const r=(0,s.s)(e,t),n=w(e);return r<=n*n}const j=(0,i.vt)(),N=g(),k=Object.freeze(Object.defineProperty({__proto__:null,NullSphere:p,altitudeAt:q,angleToSilhouette:E,axisAt:O,cameraFrustumCoverage:function(e,t,r,n){const o=w(e),s=o*o,i=t+.5*Math.PI,a=r*r+s-2*Math.cos(i)*r*o,c=Math.sqrt(a),u=a-s;if(u<=0)return.5;const l=Math.sqrt(u),f=Math.acos(l/c)-Math.asin(o/(c/Math.sin(i)));return Math.min(1,(f+.5*n)/n)},clear:function(e){e[0]=e[1]=e[2]=e[3]=0},closestPoint:function(e,t,r){return B(e,t,r)?r:((0,f.oC)(t,e,r),P(e,r,r))},closestPointOnSilhouette:C,containsPoint:U,copy:b,create:g,distanceToSilhouette:function(e,t){const r=(0,s.d)(m.rq.get(),t,e),n=(0,s.k)(r),o=e[3]*e[3];return Math.sqrt(Math.abs(n-o))},elevate:function(e,t,r){return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=e[3]+t,r},equals:v,exactEquals:y,fromCenterAndRadius:function(e,t){return(0,c.fA)(e[0],e[1],e[2],t)},fromRadius:function(e,t){return e[0]=e[1]=e[2]=0,e[3]=t,e},fromValues:T,getCenter:M,getExtent:function(e,t){return t},getRadius:w,intersectLine:function(e,t,r){const n=(0,f.Cr)(t,r);if(!S(e,n,A))return[];const{origin:o,direction:a}=n,{t0:c,t1:l}=A,d=t=>{const r=(0,i.vt)();return(0,s.b)(r,o,a,t),P(e,r,r)};return Math.abs(c-l)<(0,u.FD)()?[d(c)]:[d(c),d(l)]},intersectRay:B,intersectRayClosestSilhouette:function(e,t,r){if(B(e,t,r))return r;const n=C(e,t,m.rq.get());return(0,s.g)(r,t.origin,(0,s.h)(m.rq.get(),t.direction,(0,s.j)(t.origin,n)/(0,s.l)(t.direction))),r},intersectsRay:_,projectPoint:P,setAltitudeAt:function(e,t,r,n){const o=q(e,t),i=O(e,t,l._.Z,j),a=(0,s.h)(j,i,r-o);return(0,s.g)(n,t,a)},setExtent:function(e,t,r){return e!==r&&b(e,r),r},tmpSphere:N,union:function(e,t,r=(0,c.vt)()){const n=(0,s.j)(e,t),o=e[3],i=t[3];return n+i<o?((0,a.c)(r,e),r):n+o<i?((0,a.c)(r,t),r):((0,s.m)(r,e,t,(n+i-o)/(2*n)),r[3]=(n+o+i)/2,r)},wrap:x},Symbol.toStringTag,{value:"Module"}))},43609:(e,t,r)=>{r.d(t,{a:()=>s,f:()=>i,n:()=>o});var n=r(34275);function o(e,t){s(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r=2,o=r){const s=t.length/2;let i=0,a=0;if(!(0,n.iu)(t)||(0,n.dk)(t)){for(let n=0;n<s;++n)e[i]=t[a],e[i+1]=t[a+1],i+=r,a+=o;return}const c=(0,n.a3)(t);if((0,n.JI)(t))for(let n=0;n<s;++n)e[i]=Math.max(t[a]/c,-1),e[i+1]=Math.max(t[a+1]/c,-1),i+=r,a+=o;else for(let n=0;n<s;++n)e[i]=t[a]/c,e[i+1]=t[a+1]/c,i+=r,a+=o}function i(e,t,r,n){const o=e.typedBuffer,s=e.typedBufferStride,i=n?.count??e.count;let a=(n?.dstIndex??0)*s;for(let e=0;e<i;++e)o[a]=t,o[a+1]=r,a+=s}Object.freeze(Object.defineProperty({__proto__:null,fill:i,normalizeIntegerBuffer:s,normalizeIntegerBufferView:o},Symbol.toStringTag,{value:"Module"}))},73354:(e,t,r)=>{r.d(t,{a:()=>f,b:()=>a,c:()=>i,d:()=>o,e:()=>d,f:()=>l,l:()=>u,n:()=>h,t:()=>s});var n=r(40876);function o(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,n=3,o=n){if(e.length/n!==Math.ceil(t.length/o))return e;const s=e.length/n,i=r[0],a=r[1],c=r[2],u=r[4],l=r[5],f=r[6],d=r[8],h=r[9],m=r[10],p=r[12],g=r[13],y=r[14];let v=0,b=0;for(let r=0;r<s;r++){const r=t[v],s=t[v+1],x=t[v+2];e[b]=i*r+u*s+d*x+p,e[b+1]=a*r+l*s+h*x+g,e[b+2]=c*r+f*s+m*x+y,v+=o,b+=n}return e}function i(e,t,r){a(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function a(e,t,r,n=3,o=n){if(e.length/n!==Math.ceil(t.length/o))return;const s=e.length/n,i=r[0],a=r[1],c=r[2],u=r[3],l=r[4],f=r[5],d=r[6],h=r[7],m=r[8];let p=0,g=0;for(let r=0;r<s;r++){const r=t[p],s=t[p+1],y=t[p+2];e[g]=i*r+u*s+d*y,e[g+1]=a*r+l*s+h*y,e[g+2]=c*r+f*s+m*y,p+=o,g+=n}}function c(e,t,r,n=3,o=n){const s=Math.min(e.length/n,t.length/o);let i=0,a=0;for(let c=0;c<s;c++)e[a]=r*t[i],e[a+1]=r*t[i+1],e[a+2]=r*t[i+2],i+=o,a+=n;return e}function u(e,t,r,n){l(e.typedBuffer,t.typedBuffer,r,n,e.typedBufferStride,t.typedBufferStride)}function l(e,t,r,o,s=3,i=s){const a=Math.min(e.length/s,t.length/i);let c=0,u=0;const l=1/n.Tf;for(let n=0;n<a;n++)e[u]=o*(r*t[c])**l,e[u+1]=o*(r*t[c+1])**l,e[u+2]=o*(r*t[c+2])**l,c+=i,u+=s}function f(e,t,r,n=3,o=n){const s=e.length/n;if(s!==Math.ceil(t.length/o))return e;let i=0,a=0;for(let c=0;c<s;c++)e[a]=t[i]+r[0],e[a+1]=t[i+1]+r[1],e[a+2]=t[i+2]+r[2],i+=o,a+=n;return e}function d(e,t){h(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function h(e,t,r=3,n=r){const o=Math.min(e.length/r,t.length/n);let s=0,i=0;for(let a=0;a<o;a++){const o=t[s],a=t[s+1],c=t[s+2],u=o*o+a*a+c*c;if(u>0){const t=1/Math.sqrt(u);e[i]=t*o,e[i+1]=t*a,e[i+2]=t*c}s+=n,i+=r}}r(44208),r(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:l,linearToSRGBView:u,normalize:h,normalizeView:d,scale:c,scaleView:function(e,t,r){c(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const n=Math.min(e.count,t.count),o=e.typedBuffer,s=e.typedBufferStride,i=t.typedBuffer,a=t.typedBufferStride;let c=0,u=0;for(let e=0;e<n;e++)o[u]=i[c]>>r,o[u+1]=i[c+1]>>r,o[u+2]=i[c+2]>>r,c+=a,u+=s},transformMat3:a,transformMat3View:i,transformMat4:s,transformMat4View:o,translate:f},Symbol.toStringTag,{value:"Module"}))},65686:(e,t,r)=>{r.d(t,{a:()=>s,b:()=>l,l:()=>u,n:()=>a,t:()=>i});var n=r(40876),o=(r(44208),r(53966));function s(e,t,r){i(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r,n=4,o=n){if(e.length/n!=t.length/o)return;const s=e.length/n,i=r[0],a=r[1],c=r[2],u=r[3],l=r[4],f=r[5],d=r[6],h=r[7],m=r[8];let p=0,g=0;for(let r=0;r<s;r++){const r=t[p],s=t[p+1],y=t[p+2],v=t[p+3];e[g]=i*r+u*s+d*y,e[g+1]=a*r+l*s+h*y,e[g+2]=c*r+f*s+m*y,e[g+3]=v,p+=o,g+=n}}function a(e,t){const r=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,i=t.typedBufferStride;for(let e=0;e<r;e++){const t=e*o,r=e*i,a=s[r],c=s[r+1],u=s[r+2],l=a*a+c*c+u*u;if(l>0){const e=1/Math.sqrt(l);n[t]=e*a,n[t+1]=e*c,n[t+2]=e*u}}}function c(e,t,r,n=4){const o=Math.min(e.length/n,t.count),s=t.typedBuffer,i=t.typedBufferStride;let a=0,c=0;for(let t=0;t<o;t++)e[c]=r*s[a],e[c+1]=r*s[a+1],e[c+2]=r*s[a+2],e[c+3]=r*s[a+3],a+=i,c+=n}function u(e,t,r,n){l(e.typedBuffer,t,r,n,e.typedBufferStride)}function l(e,t,r,o,s=4){const i=Math.min(e.length/s,t.count),a=t.typedBuffer,c=t.typedBufferStride;let u=0,l=0;const f=1/n.Tf;for(let t=0;t<i;t++)e[l]=o*(r*a[u])**f,e[l+1]=o*(r*a[u+1])**f,e[l+2]=o*(r*a[u+2])**f,e[l+3]=o*r*a[u+3],u+=c,l+=s}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:l,linearToSRGBView:u,normalize:a,scale:c,scaleView:function(e,t,r){c(e.typedBuffer,t,r,e.typedBufferStride)},transformMat3:i,transformMat3View:s,transformMat4:function(e,t,r,n=4,s=n){if(e.length/n!=t.length/s)return void o.A.getLogger("esri.views.3d.support.buffer.math").error("source and destination buffers need to have the same number of elements");const i=e.length/n,a=r[0],c=r[1],u=r[2],l=r[3],f=r[4],d=r[5],h=r[6],m=r[7],p=r[8],g=r[9],y=r[10],v=r[11],b=r[12],x=r[13],w=r[14],M=r[15];let T=0,B=0;for(let r=0;r<i;r++){const r=t[T],o=t[T+1],i=t[T+2],A=t[T+3];e[B]=a*r+f*o+p*i+b*A,e[B+1]=c*r+d*o+g*i+x*A,e[B+2]=u*r+h*o+y*i+w*A,e[B+3]=l*r+m*o+v*i+M*A,T+=s,B+=n}},transformMat4View:function(e,t,r){if(e.count!==t.count)return;const n=e.count,o=r[0],s=r[1],i=r[2],a=r[3],c=r[4],u=r[5],l=r[6],f=r[7],d=r[8],h=r[9],m=r[10],p=r[11],g=r[12],y=r[13],v=r[14],b=r[15],x=e.typedBuffer,w=e.typedBufferStride,M=t.typedBuffer,T=t.typedBufferStride;for(let e=0;e<n;e++){const t=e*w,r=e*T,n=M[r],B=M[r+1],A=M[r+2],S=M[r+3];x[t]=o*n+c*B+d*A+g*S,x[t+1]=s*n+u*B+h*A+y*S,x[t+2]=i*n+l*B+m*A+v*S,x[t+3]=a*n+f*B+p*A+b*S}}},Symbol.toStringTag,{value:"Module"}))},4341:(e,t,r)=>{r.d(t,{I:()=>o});var n=r(26390);class o{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,n.d)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*s);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,s));e++)this._items.push(this._allocator())}}const s=1024},46140:(e,t,r)=>{r.d(t,{R:()=>o});var n=r(49186);let o=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new n.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[o,s]=t.split("."),i=/^\s*\d+\s*$/;if(!o?.match||!i.test(o))throw new n.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!i.test(s))throw new n.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(o,10),c=parseInt(s,10);return new e(a,c,r)}}},61473:(e,t,r)=>{function n(e){return e=e||globalThis.location.hostname,u.some((t=>null!=e?.match(t)))}function o(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(s)||null!=t.match(a)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(i)||null!=t.match(c)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>o,b5:()=>n});const s=/^devext\.arcgis\.com$/,i=/^qaext\.arcgis\.com$/,a=/^[\w-]*\.mapsdevext\.arcgis\.com$/,c=/^[\w-]*\.mapsqa\.arcgis\.com$/,u=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,s,i,/^jsapps\.esri\.com$/,a,c]},88340:(e,t,r)=>{function n(){return new Float32Array(2)}function o(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function s(){return n()}function i(){return o(1,1)}function a(){return o(1,0)}function c(){return o(0,1)}r.d(t,{Un:()=>l,fA:()=>o,uY:()=>u,vt:()=>n});const u=s(),l=i(),f=a(),d=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:l,UNIT_X:f,UNIT_Y:d,ZEROS:u,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:n,fromValues:o,ones:i,unitX:a,unitY:c,zeros:s},Symbol.toStringTag,{value:"Module"}))},44794:(e,t,r)=>{r.d(t,{v:()=>a});var n=r(4718),o=r(62788),s=r(95488);class i{constructor(e,t){this._observable=new s.I,this._value=e,this._equalityFunction=t}get value(){return(0,o.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function a(e,t=n.gh){return new i(e,t)}},71351:(e,t,r)=>{r.d(t,{C:()=>f,Cr:()=>d,LV:()=>l,kb:()=>h,oC:()=>m,vt:()=>c}),r(4576);var n=r(4341),o=(r(77690),r(29242)),s=r(38954),i=r(51850),a=r(32114);function c(e){return e?u((0,i.o8)(e.origin),(0,i.o8)(e.direction)):u((0,i.vt)(),(0,i.vt)())}function u(e,t){return{origin:e,direction:t}}function l(e,t){const r=p.get();return r.origin=e,r.direction=t,r}function f(e,t=c()){return function(e,t,r=c()){return(0,s.c)(r.origin,e),(0,s.c)(r.direction,t),r}(e.origin,e.direction,t)}function d(e,t,r=c()){return(0,s.c)(r.origin,e),(0,s.d)(r.direction,t,e),r}function h(e,t){const r=(0,s.e)(a.rq.get(),(0,s.n)(a.rq.get(),e.direction),(0,s.d)(a.rq.get(),t,e.origin));return(0,s.f)(r,r)}function m(e,t,r){const n=(0,s.f)(e.direction,(0,s.d)(r,t,e.origin));return(0,s.g)(r,e.origin,(0,s.h)(r,e.direction,n)),r}const p=new n.I((()=>c()));(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,o.vt)()},21015:(e,t,r)=>{r.d(t,{R:()=>c});var n=r(78888),o=r(60999),s=r(49186),i=r(74887),a=r(84952);class c{constructor(e){this._streamDataRequester=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,a.DB)(e)?((0,i.Te)(t),(0,a.lJ)(e)):this._load("binary",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){if(null==this._streamDataRequester)return(await(0,n.A)(t,{responseType:u[e]})).data;const a=await(0,o.Ke)(this._streamDataRequester.request(t,e,r));if(!0===a.ok)return a.value;throw(0,i.QP)(a.error),new s.A("glt-loader-request-error",`Request for resource failed: ${a.error}`)}}const u={image:"image",binary:"array-buffer",json:"json","image+type":void 0}},84498:(e,t,r)=>{r.d(t,{x:()=>i});var n=r(34275),o=r(97146),s=r(63907);function i(e,t){switch(t){case s.WR.TRIANGLES:return"number"==typeof(r=e)?(0,o.tM)(r):(0,n.mg)(r)?new Uint16Array(r):r;case s.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,n=(0,o.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(n[e++]=t,n[e++]=t+1,n[e++]=t+2):(n[e++]=t+1,n[e++]=t,n[e++]=t+2)}else{let t=0;for(let o=0;o<r;o+=1)o%2==0?(n[t++]=e[o],n[t++]=e[o+1],n[t++]=e[o+2]):(n[t++]=e[o+1],n[t++]=e[o],n[t++]=e[o+2])}return n}(e);case s.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,n=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)n[e++]=0,n[e++]=t+1,n[e++]=t+2;return n}const o=e[0];let s=e[1],i=0;for(let t=0;t<r;++t){const r=e[t+2];n[i++]=o,n[i++]=s,n[i++]=r,s=r}return n}(e)}var r}},51530:(e,t,r)=>{r.d(t,{KB:()=>a,Xi:()=>s,pn:()=>c,x3:()=>i});var n=r(44208),o=r(89192);class s{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding=o.JS.KTX2_ENCODING}}function i(e){return"encoded-mesh-texture"===e?.type}async function a(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function c(e,t){if(t===o.JS.KTX2_ENCODING)return new s(e);const r=new Blob([e],{type:t});let i=URL.createObjectURL(r);switch(t){case"image/jpeg":i+="#.jpg";break;case"image/png":i+="#.png"}const a=new Image;if((0,n.A)("esri-iPhone"))return new Promise(((e,t)=>{const r=()=>{o(),e(a)},n=e=>{o(),t(e)},o=()=>{URL.revokeObjectURL(i),a.removeEventListener("load",r),a.removeEventListener("error",n)};a.addEventListener("load",r),a.addEventListener("error",n),a.src=i}));try{a.src=i,await a.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(i),a}},64304:(e,t,r)=>{r.d(t,{fetch:()=>Z});var n=r(40876),o=r(61473),s=r(34727),i=r(77690),a=r(29242),c=r(58083),u=r(9093),l=r(48163),f=r(38954),d=r(51850),h=r(70328),m=r(11868),p=r(13030),g=r(73354),y=r(65686),v=r(43609),b=r(21015),x=r(84498),w=r(51530),M=r(88340);function T(e){if(null==e)return null;const t=null!=e.offset?e.offset:M.uY,r=null!=e.rotation?e.rotation:0,n=null!=e.scale?e.scale:M.Un,o=(0,a.fA)(1,0,0,0,1,0,t[0],t[1],1),s=(0,a.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),c=(0,a.fA)(n[0],0,0,0,n[1],0,0,0,1),u=(0,a.vt)();return(0,i.lw)(u,s,c),(0,i.lw)(u,o,u),u}class B{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class A{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new B,this.numberOfVertices=0}}var S=r(78888),R=r(60999),_=r(49186),C=r(53966),P=r(69397);class E{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const n=this._outer.get(e);n?n.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}forEach(e){this._outer.forEach(((t,r)=>e(t,r)))}forAll(e){for(const t of this._outer.values())for(const r of t.values())e(r)}}var I=r(74887),O=r(46140),q=r(97146),U=r(99677),j=r(46610),N=r(89192),k=r(2415),F=r(48833),L=r(46540),D=r(11787),V=r(63907);const $=()=>C.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class z{constructor(e,t,r){this.resource=e,this.textures=t,this.cachedMemory=r}}function H(e){throw new _.A("",`Request for object resource failed: ${e}`)}function G(e){const t=e.params,r=t.topology;let n=!0;switch(t.vertexAttributes||($().warn("Geometry must specify vertex attributes"),n=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&($().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),n=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&($().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),n=!1)):($().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),n=!1)}}else $().warn("Indexed geometries must specify faces"),n=!1;break}default:$().warn(`Unsupported topology '${r}'`),n=!1}e.params.material||($().warn("Geometry requires material"),n=!1);const o=e.params.vertexAttributes;for(const e in o)o[e].values||($().warn("Geometries with externally defined attributes are not yet supported"),n=!1);return n}function W(e){const t=(0,h.Ie)();return e.forEach((e=>{const r=e.boundingInfo;null!=r&&((0,h.iT)(t,r.bbMin),(0,h.iT)(t,r.bbMax))})),t}function X(e){switch(e){case"mask":return N.sf.Mask;case"maskAndTransparency":return N.sf.MaskBlend;case"none":return N.sf.Opaque;default:return N.sf.Blend}}function Y(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const J=new O.R(1,2,"wosr");var K=r(96336),Q=r(74810);async function Z(e,t){const a=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,o.EM)(e));if("wosr"===a.fileType){const e=await(t.cache?t.cache.loadWOSR(a.url,t):async function(e,t){const r=await async function(e,t){const r=t?.streamDataRequester;if(r)return async function(e,t,r){const n=await(0,R.Ke)(t.request(e,"json",r));if(!0===n.ok)return n.value;(0,I.QP)(n.error),H(n.error.details.url)}(e,r,t);const n=await(0,R.Ke)((0,S.A)(e,t));if(!0===n.ok)return n.value.data;(0,I.QP)(n.error),H(n.error)}(e,t),n=await async function(e,t){const r=new Array;for(const n in e){const o=e[n],s=o.images[0].data;if(!s){$().warn("Externally referenced texture data is not yet supported");continue}const i=o.encoding+";base64,"+s,a="/textureDefinitions/"+n,c="rgba"===o.channels?o.alphaChannelUsage||"transparency":"none",u={noUnpackFlip:!0,wrap:{s:V.pF.REPEAT,t:V.pF.REPEAT},preMultiplyAlpha:X(c)!==N.sf.Opaque},l=t?.disableTextures?Promise.resolve(null):(0,U.D)(i,t);r.push(l.then((e=>({refId:a,image:e,parameters:u,alphaChannelUsage:c}))))}const n=await Promise.all(r),o={};for(const e of n)o[e.refId]=e;return o}(r.textureDefinitions??{},t);let o=0;for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];o+=t?.image?t.image.width*t.image.height*4:0}return new z(r,n,o+(0,P.Qh)(r))}(a.url,t)),{engineResources:r,referenceBoundingBox:n}=function(e,t){const r=new Array,n=new Array,o=new Array,s=new E,i=e.resource,a=O.R.parse(i.version||"1.0","wosr");J.validate(a);const c=i.model.name,u=i.model.geometries,l=i.materialDefinitions??{},f=e.textures;let h=0;const m=new Map;for(let e=0;e<u.length;e++){const i=u[e];if(!G(i))continue;const a=Y(i),c=i.params.vertexAttributes,p=[],g=e=>{if("PerAttributeArray"===i.params.topology)return null;const t=i.params.faces;for(const r in t)if(r===e)return t[r].values;return null},y=c[L.r.POSITION],v=y.values.length/y.valuesPerElement;for(const e in c){const t=c[e],r=t.values,n=g(e)??(0,q.tM)(v);p.push([e,new j.n(r,n,t.valuesPerElement,!0)])}const b=a.texture,x=f&&f[b];if(x&&!m.has(b)){const{image:e,parameters:t}=x,r=new F.g(e,t);n.push(r),m.set(b,r)}const w=m.get(b),M=w?w.id:void 0,T=a.material;let B=s.get(T,b);if(null==B){const e=l[T.slice(T.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=x&&x.alphaChannelUsage,n=e.transparency>0||"transparency"===r||"maskAndTransparency"===r,o=x?X(x.alphaChannelUsage):void 0,i={ambient:(0,d.ci)(e.diffuse),diffuse:(0,d.ci)(e.diffuse),opacity:1-(e.transparency||0),transparent:n,textureAlphaMode:o,textureAlphaCutoff:.33,textureId:M,doubleSided:!0,cullFace:N.s2.None,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:x?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(i,t.materialParameters),B=new D.$U(i,t),s.set(T,b,B)}o.push(B);const A=new k.V(B,p);h+=p.find((e=>e[0]===L.r.POSITION))?.[1]?.indices.length??0,r.push(A)}return{engineResources:[{name:c,stageResources:{textures:n,materials:o,geometries:r},pivotOffset:i.model.pivotOffset,numberOfVertices:h,lodThreshold:null}],referenceBoundingBox:W(r)}}(e,t);return{lods:r,referenceBoundingBox:n,isEsriSymbolResource:!1,isWosr:!0}}let M;if(t.cache)M=await t.cache.loadGLTF(a.url,t,!!t.usePBR);else{const{loadGLTF:e}=await r.e(4399).then(r.bind(r,4399));M=await e(new b.R(t.streamDataRequester),a.url,t,t.usePBR)}const B=M.model.meta?.ESRI_proxyEllipsoid,_=M.meta.isEsriSymbolResource&&null!=B&&"EsriRealisticTreesStyle"===M.meta.ESRI_webstyle;_&&!M.customMeta.esriTreeRendering&&(M.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const o=e.model.lods[r];for(const s of o.parts){const o=s.attributes.normal;if(null==o)return;const i=s.attributes.position,a=i.count,l=(0,d.vt)(),h=(0,d.vt)(),m=(0,d.vt)(),g=new Float32Array(4*a),y=new Float32Array(3*a),v=(0,c.B8)((0,u.vt)(),s.transform);let b=0,x=0;for(let c=0;c<a;c++){i.getVec(c,h),o.getVec(c,l),(0,f.t)(h,h,s.transform),(0,f.d)(m,h,t.center),(0,f.E)(m,m,t.radius);const a=m[2],u=(0,f.l)(m),d=Math.min(.45+.55*u*u,1)**n.Tf;(0,f.E)(m,m,t.radius),null!==v&&(0,f.t)(m,m,v),(0,f.n)(m,m),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,f.m)(m,m,l,a>-1?.2:Math.min(-4*a-3.8,1)),y[b]=m[0],y[b+1]=m[1],y[b+2]=m[2],b+=3,g[x]=d,g[x+1]=d,g[x+2]=d,g[x+3]=1,x+=4}s.attributes.normal=new p.xs(y),s.attributes.color=new p.Eq(g)}}}(M,B));const C=!!t.usePBR,Z=M.meta.isEsriSymbolResource?{usePBR:C,isSchematic:!1,treeRendering:_,mrrFactors:Q.SY}:{usePBR:C,isSchematic:!1,treeRendering:!1,mrrFactors:Q.mb},te={...t.materialParameters,treeRendering:_},{engineResources:re,referenceBoundingBox:ne}=function(e,t,r,o,a){const c=e.model,u=new Array,f=new Map,d=new Map,b=c.lods.length,M=(0,h.Ie)();return c.lods.forEach(((e,B)=>{const S=!0===o.skipHighLods&&(b>1&&0===B||b>3&&1===B)||!1===o.skipHighLods&&null!=a&&B!==a;if(S&&0!==B)return;const R=new A(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach((e=>{const a=S?new D.$U({},o):function(e,t,r,o,s,i,a,c){const u=e.materials.get(t.material);if(null==u)return null;const{normal:f,color:d,texCoord0:h,tangent:m}=t.attributes,p=t.material+(f?"_normal":"")+(d?"_color":"")+(h?"_texCoord0":"")+(m?"_tangent":""),g=null!=t.attributes.texCoord0,y=null!=t.attributes.normal,v=function(e){switch(e){case"BLEND":return N.sf.Blend;case"MASK":return N.sf.Mask;case"OPAQUE":case null:case void 0:return N.sf.Opaque}}(u.alphaMode);if(!i.has(p)){if(g){const t=(t,r=!1)=>{if(null!=t&&!a.has(t)){const n=e.textures.get(t);if(n){const e=n.data;a.set(t,new F.g((0,w.x3)(e)?e.data:e,{...n.parameters,preMultiplyAlpha:!(0,w.x3)(e)&&r,encoding:(0,w.x3)(e)?e.encoding:void 0}))}}};t(u.colorTexture,v!==N.sf.Opaque),t(u.normalTexture),t(u.occlusionTexture),t(u.emissiveTexture),t(u.metallicRoughnessTexture)}const r=1/n.Tf,f=u.color[0]**r,d=u.color[1]**r,h=u.color[2]**r,m=u.emissiveFactor[0]**r,b=u.emissiveFactor[1]**r,x=u.emissiveFactor[2]**r,M=null!=u.colorTexture&&g?a.get(u.colorTexture):null,B=(0,Q.Jr)(u),A=null!=u.normalTextureTransform?.scale?u.normalTextureTransform?.scale:l.Un;i.set(p,new D.$U({...o,transparent:v===N.sf.Blend,customDepthTest:N.it.Lequal,textureAlphaMode:v,textureAlphaCutoff:u.alphaCutoff,diffuse:[f,d,h],ambient:[f,d,h],opacity:u.opacity,doubleSided:u.doubleSided,doubleSidedType:"winding-order",cullFace:u.doubleSided?N.s2.None:N.s2.Back,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:y?K.W.Attribute:K.W.ScreenDerivative,castShadows:!0,receiveShadows:u.receiveShadows,receiveAmbientOcclusion:u.receiveAmbientOcclustion,textureId:null!=M?M.id:void 0,colorMixMode:u.colorMixMode,normalTextureId:null!=u.normalTexture&&g?a.get(u.normalTexture).id:void 0,textureAlphaPremultiplied:null!=M&&!!M.parameters.preMultiplyAlpha,occlusionTextureId:null!=u.occlusionTexture&&g?a.get(u.occlusionTexture).id:void 0,emissiveTextureId:null!=u.emissiveTexture&&g?a.get(u.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=u.metallicRoughnessTexture&&g?a.get(u.metallicRoughnessTexture).id:void 0,emissiveFactor:[m,b,x],mrrFactors:B?Q.Bt:[u.metallicFactor,u.roughnessFactor,o.mrrFactors[2]],isSchematic:B,colorTextureTransformMatrix:T(u.colorTextureTransform),normalTextureTransformMatrix:T(u.normalTextureTransform),scale:[A[0],A[1]],occlusionTextureTransformMatrix:T(u.occlusionTextureTransform),emissiveTextureTransformMatrix:T(u.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:T(u.metallicRoughnessTextureTransform),...s},c))}const b=i.get(p);if(r.stageResources.materials.push(b),g){const e=e=>{null!=e&&r.stageResources.textures.push(a.get(e))};e(u.colorTexture),e(u.normalTexture),e(u.occlusionTexture),e(u.emissiveTexture),e(u.metallicRoughnessTexture)}return b}(c,e,R,t,r,f,d,o),{geometry:u,vertexCount:b}=function(e,t){const r=e.attributes.position.count,n=(0,x.x)(e.indices||r,e.primitiveType),o=(0,m.oe)(3*r),{typedBuffer:a,typedBufferStride:c}=e.attributes.position;(0,g.t)(o,a,e.transform,3,c);const u=[[L.r.POSITION,new j.n(o,n,3,!0)]];if(null!=e.attributes.normal){const t=(0,m.oe)(3*r),{typedBuffer:o,typedBufferStride:a}=e.attributes.normal;(0,i.Ge)(ee,e.transform),(0,g.b)(t,o,ee,3,a),(0,s.or)(ee)&&(0,g.n)(t,t),u.push([L.r.NORMAL,new j.n(t,n,3,!0)])}if(null!=e.attributes.tangent){const t=(0,m.oe)(4*r),{typedBuffer:o,typedBufferStride:a}=e.attributes.tangent;(0,i.z0)(ee,e.transform),(0,y.t)(t,o,ee,4,a),(0,s.or)(ee)&&(0,g.n)(t,t,4),u.push([L.r.TANGENT,new j.n(t,n,4,!0)])}if(null!=e.attributes.texCoord0){const t=(0,m.oe)(2*r),{typedBuffer:o,typedBufferStride:s}=e.attributes.texCoord0;(0,v.a)(t,o,2,s),u.push([L.r.UV0,new j.n(t,n,2,!0)])}const l=e.attributes.color;if(null!=l){const t=new Uint8Array(4*r);4===l.elementCount?l instanceof p.Eq?(0,y.b)(t,l,1,255):(l instanceof p.XP||l instanceof p.Uz)&&(0,y.b)(t,l,1/255,255):(t.fill(255),l instanceof p.xs?(0,g.f)(t,l.typedBuffer,1,255,4,l.typedBufferStride):(e.attributes.color instanceof p.eI||e.attributes.color instanceof p.nS)&&(0,g.f)(t,l.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),u.push([L.r.COLOR,new j.n(t,n,4,!0)])}return{geometry:new k.V(t,u),vertexCount:r}}(e,a??new D.$U({},o)),A=u.boundingInfo;null!=A&&0===B&&((0,h.iT)(M,A.bbMin),(0,h.iT)(M,A.bbMax)),null!=a&&(R.stageResources.geometries.push(u),R.numberOfVertices+=b)})),S||u.push(R)})),{engineResources:u,referenceBoundingBox:M}}(M,Z,te,t,a.specifiedLodIndex);return{lods:re,referenceBoundingBox:ne,isEsriSymbolResource:M.meta.isEsriSymbolResource,isWosr:!1}}const ee=(0,a.vt)()},66104:(e,t,r)=>{var n,o;r.d(t,{k5:()=>n}),r(34727),(o=n||(n={}))[o.Multiply=1]="Multiply",o[o.Ignore=2]="Ignore",o[o.Replace=3]="Replace",o[o.Tint=4]="Tint"},42583:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(66104),o=r(31821);function s(e){e.vertex.code.add(o.H`
|
|
2
2
|
vec4 decodeSymbolColor(vec4 symbolColor, out int colorMixMode) {
|
|
3
3
|
float symbolAlpha = 0.0;
|
|
4
4
|
|
|
@@ -11,12 +11,6 @@ import{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";imp
|
|
|
11
11
|
|
|
12
12
|
${W(G===s.ObjectAndLayerIdColor,"externalColor.a = 1.0;")}
|
|
13
13
|
|
|
14
|
-
if (externalColor.a < ${P.float(H)}) {
|
|
15
|
-
// Discard this vertex
|
|
16
|
-
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
14
|
forwardPosition(readElevationOffset());
|
|
21
15
|
forwardViewPosDepth(vPosition_view);
|
|
22
16
|
forwardNormal();
|
|
@@ -32,6 +26,12 @@ import{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";imp
|
|
|
32
26
|
tbnTangent = vec3(1.0, 0.0, 0.0);
|
|
33
27
|
tbnBiTangent = vec3(0.0, 1.0, 0.0);`)}
|
|
34
28
|
${W(ee,"setOverlayVTC(projectOverlay(position));")}
|
|
29
|
+
|
|
30
|
+
if (externalColor.a < ${P.float(H)}) {
|
|
31
|
+
// Discard this vertex
|
|
32
|
+
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
35
|
`),g(G))return V.include(C,I),V.include(b,I),V.include(y,I),V.include(z,I),J&&V.include(M,I),_.code.add(P`
|
|
36
36
|
float evaluateShadow() {
|
|
37
37
|
return ${J?"readShadowMap(vPositionWorldCameraRelative, linearDepth)":"0.0"};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function n(){const n=new Float32Array(6);return n[0]=1,n[3]=1,n}function t(n){const t=new Float32Array(6);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t}function
|
|
5
|
+
function n(){const n=new Float32Array(6);return n[0]=1,n[3]=1,n}function t(n){const t=new Float32Array(6);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t}function o(n,t,o,r,e,c){const a=new Float32Array(6);return a[0]=n,a[1]=t,a[2]=o,a[3]=r,a[4]=e,a[5]=c,a}function r(n,t,o,r){const e=t[r],c=t[r+1];n[r]=o[0]*e+o[2]*c+o[4],n[r+1]=o[1]*e+o[3]*c+o[5]}function e(n,t,o,e=0,c=0,a=2){const l=c||t.length/a;for(let u=e;u<l;u++){r(n,t,o,u*a)}}const c=Object.freeze(Object.defineProperty({__proto__:null,clone:t,create:n,fromValues:o,transform:r,transformMany:e},Symbol.toStringTag,{value:"Module"}));export{t as clone,n as create,o as fromValues,c as m,r as transform,e as transformMany};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function e(){return[1,0,0,1,0,0]}function
|
|
5
|
+
function e(){return[1,0,0,1,0,0]}function t(e){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,n,r,o,u){return[e,t,n,r,o,u]}const r=e(),o=Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:r,clone:t,create:e,fromValues:n},Symbol.toStringTag,{value:"Module"}));export{r as IDENTITY,t as clone,e as create,n as fromValues,o as m};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function e(){const e=new Float32Array(4);return e[0]=1,e[3]=1,e}function
|
|
5
|
+
function e(){const e=new Float32Array(4);return e[0]=1,e[3]=1,e}function t(e){const t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function n(e,t,n,r){const o=new Float32Array(4);return o[0]=e,o[1]=t,o[2]=n,o[3]=r,o}const r=Object.freeze(Object.defineProperty({__proto__:null,clone:t,create:e,fromValues:n},Symbol.toStringTag,{value:"Module"}));export{t as clone,e as create,n as fromValues,r as m};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function e(){return[1,0,0,1]}function
|
|
5
|
+
function e(){return[1,0,0,1]}function t(e){return[e[0],e[1],e[2],e[3]]}function n(e,t,n,r){return[e,t,n,r]}const r=Object.freeze(Object.defineProperty({__proto__:null,clone:t,create:e,fromValues:n},Symbol.toStringTag,{value:"Module"}));export{t as clone,e as create,n as fromValues,r as m};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function e(){const e=new Float32Array(9);return e[0]=1,e[4]=1,e[8]=1,e}function
|
|
5
|
+
function e(){const e=new Float32Array(9);return e[0]=1,e[4]=1,e[8]=1,e}function t(e){const t=new Float32Array(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function n(e,t,n,r,o,a,c,l,u){const f=new Float32Array(9);return f[0]=e,f[1]=t,f[2]=n,f[3]=r,f[4]=o,f[5]=a,f[6]=c,f[7]=l,f[8]=u,f}const r=Object.freeze(Object.defineProperty({__proto__:null,clone:t,create:e,fromValues:n},Symbol.toStringTag,{value:"Module"}));export{t as clone,e as create,n as fromValues,r as m};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function e(){return[1,0,0,0,1,0,0,0,1]}function
|
|
5
|
+
function e(){return[1,0,0,0,1,0,0,0,1]}function t(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]}function n(e,t,n,r,o,u,c,l,f){return[e,t,n,r,o,u,c,l,f]}const r=e(),o=Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:r,clone:t,create:e,fromValues:n},Symbol.toStringTag,{value:"Module"}));export{r as IDENTITY,t as clone,e as create,n as fromValues,o as m};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function e(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function
|
|
5
|
+
function e(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function t(e){const t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function n(e,t,n,r,o,a,c,l,u,f,s,i,y,_,b,m){const p=new Float32Array(16);return p[0]=e,p[1]=t,p[2]=n,p[3]=r,p[4]=o,p[5]=a,p[6]=c,p[7]=l,p[8]=u,p[9]=f,p[10]=s,p[11]=i,p[12]=y,p[13]=_,p[14]=b,p[15]=m,p}const r=e(),o=Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:r,clone:t,create:e,fromValues:n},Symbol.toStringTag,{value:"Module"}));export{r as IDENTITY,t as clone,e as create,n as fromValues,o as m};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function e(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function
|
|
5
|
+
function e(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function t(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}function n(e,t,n,r,o,u,c,l,f,a,i,_,b,m,p,s){return[e,t,n,r,o,u,c,l,f,a,i,_,b,m,p,s]}const r=e(),o=Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:r,clone:t,create:e,fromValues:n},Symbol.toStringTag,{value:"Module"}));export{r as IDENTITY,t as clone,e as create,n as fromValues,o as m};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function
|
|
5
|
+
function n(){return[0,0,0,1,0,0,0,0]}function t(n){return[n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]]}function e(n,t,e,o,r,u,c,a){return[n,t,e,o,r,u,c,a]}function o(n,t,e,o,r,u,c){const a=.5*r,l=.5*u,f=.5*c;return[n,t,e,o,a*o+l*e-f*t,l*o+f*n-a*e,f*o+a*t-l*n,-a*n-l*t-f*e]}const r=Object.freeze(Object.defineProperty({__proto__:null,clone:t,create:n,fromRotationTranslationValues:o,fromValues:e},Symbol.toStringTag,{value:"Module"}));export{t as clone,n as create,o as fromRotationTranslationValues,e as fromValues,r as q};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function n(){return new Float32Array(2)}function
|
|
5
|
+
function n(){return new Float32Array(2)}function t(n){const t=new Float32Array(2);return t[0]=n[0],t[1]=n[1],t}function r(n,t){const r=new Float32Array(2);return r[0]=n,r[1]=t,r}function e(){return n()}function o(){return r(1,1)}function u(){return r(1,0)}function c(){return r(0,1)}const a=e(),i=o(),f=u(),l=c(),s=Object.freeze(Object.defineProperty({__proto__:null,ONES:i,UNIT_X:f,UNIT_Y:l,ZEROS:a,clone:t,create:n,fromValues:r,ones:o,unitX:u,unitY:c,zeros:e},Symbol.toStringTag,{value:"Module"}));export{i as ONES,f as UNIT_X,l as UNIT_Y,a as ZEROS,t as clone,n as create,r as fromValues,o as ones,u as unitX,c as unitY,s as v,e as zeros};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function n(){return[0,0]}function
|
|
5
|
+
function n(){return[0,0]}function t(n){return[n[0],n[1]]}function r(n,t){return[n,t]}function e(n,t){return[n,t]}function o(t,r=n()){const e=Math.min(2,t.length);for(let n=0;n<e;++n)r[n]=t[n];return r}function u(){return n()}function c(){return r(1,1)}function f(){return r(1,0)}function i(){return r(0,1)}const l=u(),a=c(),s=f(),_=i(),m=Object.freeze(Object.defineProperty({__proto__:null,ONES:a,UNIT_X:s,UNIT_Y:_,ZEROS:l,clone:t,create:n,freeze:e,fromArray:o,fromValues:r,ones:c,unitX:f,unitY:i,zeros:u},Symbol.toStringTag,{value:"Module"}));export{a as ONES,s as UNIT_X,_ as UNIT_Y,l as ZEROS,t as clone,n as create,e as freeze,o as fromArray,r as fromValues,c as ones,f as unitX,i as unitY,m as v,u as zeros};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function n(){return new Float32Array(3)}function t(n){const t=new Float32Array(3);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function r(n,t,r){const e=new Float32Array(3);return e[0]=n,e[1]=t,e[2]=r,e}function e(
|
|
5
|
+
function n(){return new Float32Array(3)}function t(n){const t=new Float32Array(3);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function r(n,t,r){const e=new Float32Array(3);return e[0]=n,e[1]=t,e[2]=r,e}function e(){return n()}function o(){return r(1,1,1)}function u(){return r(1,0,0)}function c(){return r(0,1,0)}function i(){return r(0,0,1)}const a=e(),f=o(),l=u(),s=c(),_=i(),y=Object.freeze(Object.defineProperty({__proto__:null,ONES:f,UNIT_X:l,UNIT_Y:s,UNIT_Z:_,ZEROS:a,clone:t,create:n,fromValues:r,ones:o,unitX:u,unitY:c,unitZ:i,zeros:e},Symbol.toStringTag,{value:"Module"}));export{f as ONES,l as UNIT_X,s as UNIT_Y,_ as UNIT_Z,a as ZEROS,t as clone,n as create,r as fromValues,o as ones,u as unitX,c as unitY,i as unitZ,y as v,e as zeros};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function n(){return[0,0,0]}function t(n){return[n[0],n[1],n[2]]}function r(n,t,r){return[n,t,r]}function e(n,t,r){return[n,t,r]}function u(t,r=n()){const e=Math.min(3,t.length);for(let n=0;n<e;++n)r[n]=t[n];return r}function o(
|
|
5
|
+
function n(){return[0,0,0]}function t(n){return[n[0],n[1],n[2]]}function r(n,t,r){return[n,t,r]}function e(n,t,r){return[n,t,r]}function u(t,r=n()){const e=Math.min(3,t.length);for(let n=0;n<e;++n)r[n]=t[n];return r}function o(){return n()}function c(){return r(1,1,1)}function f(){return r(1,0,0)}function i(){return r(0,1,0)}function l(){return r(0,0,1)}const a=o(),_=c(),s=f(),m=i(),N=l(),O=Object.freeze(Object.defineProperty({__proto__:null,ONES:_,UNIT_X:s,UNIT_Y:m,UNIT_Z:N,ZEROS:a,clone:t,create:n,freeze:e,fromArray:u,fromValues:r,ones:c,unitX:f,unitY:i,unitZ:l,zeros:o},Symbol.toStringTag,{value:"Module"}));export{_ as ONES,s as UNIT_X,m as UNIT_Y,N as UNIT_Z,a as ZEROS,t as clone,n as create,e as freeze,u as fromArray,r as fromValues,c as ones,f as unitX,i as unitY,l as unitZ,O as v,o as zeros};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function n(){return new Float32Array(4)}function t(n){const t=new Float32Array(4);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function r(n,t,r,e){const o=new Float32Array(4);return o[0]=n,o[1]=t,o[2]=r,o[3]=e,o}function e(
|
|
5
|
+
function n(){return new Float32Array(4)}function t(n){const t=new Float32Array(4);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function r(n,t,r,e){const o=new Float32Array(4);return o[0]=n,o[1]=t,o[2]=r,o[3]=e,o}function e(){return n()}function o(){return r(1,1,1,1)}function u(){return r(1,0,0,0)}function c(){return r(0,1,0,0)}function i(){return r(0,0,1,0)}function f(){return r(0,0,0,1)}const a=e(),l=o(),_=u(),s=c(),y=i(),N=f(),T=Object.freeze(Object.defineProperty({__proto__:null,ONES:l,UNIT_W:N,UNIT_X:_,UNIT_Y:s,UNIT_Z:y,ZEROS:a,clone:t,create:n,fromValues:r,ones:o,unitW:f,unitX:u,unitY:c,unitZ:i,zeros:e},Symbol.toStringTag,{value:"Module"}));export{l as ONES,N as UNIT_W,_ as UNIT_X,s as UNIT_Y,y as UNIT_Z,a as ZEROS,t as clone,n as create,r as fromValues,o as ones,f as unitW,u as unitX,c as unitY,i as unitZ,T as v,e as zeros};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function n(){return[0,0,0,0]}function t(n){return[n[0],n[1],n[2],n[3]]}function r(n,t,r,e){return[n,t,r,e]}function e(n,t,r,e){return[n,t,r,e]}function u(t,r=n()){const e=Math.min(4,t.length);for(let n=0;n<e;++n)r[n]=t[n];return r}function o(
|
|
5
|
+
function n(){return[0,0,0,0]}function t(n){return[n[0],n[1],n[2],n[3]]}function r(n,t,r,e){return[n,t,r,e]}function e(n,t,r,e){return[n,t,r,e]}function u(t,r=n()){const e=Math.min(4,t.length);for(let n=0;n<e;++n)r[n]=t[n];return r}function o(){return n()}function i(){return r(1,1,1,1)}function c(){return r(1,0,0,0)}function f(){return r(0,1,0,0)}function l(){return r(0,0,1,0)}function _(){return r(0,0,0,1)}const a=o(),s=i(),N=c(),T=f(),m=l(),I=_(),O=Object.freeze(Object.defineProperty({__proto__:null,ONES:s,UNIT_W:I,UNIT_X:N,UNIT_Y:T,UNIT_Z:m,ZEROS:a,clone:t,create:n,freeze:e,fromArray:u,fromValues:r,ones:i,unitW:_,unitX:c,unitY:f,unitZ:l,zeros:o},Symbol.toStringTag,{value:"Module"}));export{s as ONES,I as UNIT_W,N as UNIT_X,T as UNIT_Y,m as UNIT_Z,a as ZEROS,t as clone,n as create,e as freeze,u as fromArray,r as fromValues,i as ones,_ as unitW,c as unitX,f as unitY,l as unitZ,O as v,o as zeros};
|
package/package.json
CHANGED
package/support/revision.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const e="20250213",a="87830921ea89de3b2025938d92ae36eaa310b09c";export{e as buildDate,a as commitHash};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../intl.js";import t from"../../../../core/Accessor.js";import{unitRGBAFromColor as i,multiplyOpacityToUnitRGBA as s,getContrast as n,BrightnessThreshold as o,multiplyOpacity as r}from"../../../../core/colorUtils.js";import"../../../../core/has.js";import{nextHighestPowerOfTen as l,deg2rad as a}from"../../../../core/mathUtils.js";import{destroyMaybe as c}from"../../../../core/maybe.js";import{formatDecimal as d,formatImperialLength as h,formatImperialVerticalLength as u,formatMetricLength as m,formatMetricVerticalLength as g}from"../../../../core/quantityFormatUtils.js";import{toUnit as p}from"../../../../core/quantityUtils.js";import{watch as _,syncAndInitial as v,initial as b}from"../../../../core/reactiveUtils.js";import{createRenderScreenPointArray3 as L,createRenderScreenPointArray as w}from"../../../../core/screenUtils.js";import{adaptiveImperialLengthUnit as S,convertUnit as f}from"../../../../core/unitUtils.js";import{property as y}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as A}from"../../../../core/accessorSupport/decorators/subclass.js";import{dot as E}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{h as V,g as P}from"../../../../chunks/vec32.js";import{create as z}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{MeasurementMode as j}from"../interfaces.js";import{ViewMode as M,VisualElementOrientation as C}from"./interfaces.js";import{renderScreenSpaceTangent as O}from"../../interactive/support/viewUtils.js";import{LabelVisualElement as D,mirrorPosition as x}from"../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as G}from"../../interactive/visualElements/LineVisualElement.js";import{MeasurementArrowVisualElement as H}from"../../interactive/visualElements/MeasurementArrowVisualElement.js";import{RightAngleQuadVisualElement as T}from"../../interactive/visualElements/RightAngleQuadVisualElement.js";import{GeodesicSegment as k,EuclideanSegment as U}from"../../interactive/visualElements/support/Segment.js";import{RenderOccludedFlag as R}from"../../webgl-engine/lib/Material.js";import{createStipplePatternSimple as F}from"../../webgl-engine/materials/lineStippleUtils.js";import{geodesicDistanceThreshold as Q}from"../../../support/geodesicMeasurementUtils.js";import{onLocaleChange as q}from"../../../../intl/locale.js";import{fetchMessageBundle as B}from"../../../../intl/messages.js";let W=class extends t{get _parameters(){const e=this.view.effectiveTheme,{accentColor:t,textColor:l}=e,a=i(t),c=s(t,.75),d=i(n(t)),h=n(l,o.Low);return{accentColor:a,contrastColor:d,translucentAccentColor:c,triangleLineWidth:3,geodesicProjectionLineWidth:2,guideLineWidth:2,guideStippleLengthPixels:3,directLabelFontSize:16,horizontalLabelFontSize:12,verticalLabelFontSize:12,textColor:l,textBackgroundColor:r(h,.6),textCalloutColor:r(h,.5)}}get visible(){return this.analysisView.visible}get viewMode(){const{elevationAlignedStartPoint:e,elevationAlignedEndPoint:t}=this.analysisView;if(null==e||null==t||e.equals(t))return M.None;const i=this.analysisView.result;if(null==i)return M.Direct;if("geodesic"===this.actualVisualizedMeasurement)return this._requiresGeodesicGuideAt(this._startPosition)||this._requiresGeodesicGuideAt(this._endPosition)?M.ProjectedGeodesic:M.Direct;const{verticalDistance:s,horizontalDistance:n}=i,o=p(s,"meters").value,r=p(n,"meters").value;return Math.min(o/r,r/o)<this.triangleCollapseRatioThreshold?M.Direct:M.Triangle}get actualVisualizedMeasurement(){const{measurementMode:e,result:t}=this.analysisView;switch(e){case j.Auto:return null!=t&&p(t.horizontalDistance,"meters").value>Q?"geodesic":"euclidean";case j.Euclidean:return"euclidean";case j.Geodesic:return"geodesic"}}get allowVisualElementsOrientationChange(){return null==this._triangleOrientationOverride}set allowVisualElementsOrientationChange(e){null==this._triangleOrientationOverride!==e&&(null==this._triangleOrientationOverride?this._triangleOrientationOverride=this._actualVisualElementsOrientation:this._triangleOrientationOverride=null)}get labels(){return"geodesic"===this.actualVisualizedMeasurement?{direct:null,horizontal:this._segmentLabel,vertical:this._verticalLabel}:{direct:this._segmentLabel,horizontal:this._horizontalLabel,vertical:this._verticalLabel}}constructor(e){super(e),this._segmentVisualElement=null,this._triangleVisualElement=null,this._rightAngleQuad=null,this._projectedGeodesicLine=null,this._geodesicStartHint=null,this._geodesicEndHint=null,this._segmentLabel=null,this._verticalLabel=null,this._horizontalLabel=null,this._startPosition=z(),this._endPosition=z(),this._cornerPosition=z(),this._startPositionAtSeaLevel=z(),this._endPositionAtSeaLevel=z(),this._triangleOrientationOverride=null,this.messages=null,this.loadingMessages=!0,this.visualElementOrientation=C.Auto,this.triangleCollapseRatioThreshold=.03}initialize(){const e=this._parameters,t={attached:!0,view:this.view,isDecoration:!0},{guideLineWidth:i,guideStippleLengthPixels:s,triangleLineWidth:n,geodesicProjectionLineWidth:o,directLabelFontSize:r,verticalLabelFontSize:l,horizontalLabelFontSize:a}=e;this._segmentVisualElement=new H({...t,geometry:null,renderOccluded:R.OccludeAndTransparent}),this._triangleVisualElement=new G({...t,width:n,renderOccluded:R.OccludeAndTransparent}),this._rightAngleQuad=new T({...t,renderOccluded:R.OccludeAndTransparent});const c={...t,polygonOffset:!0,renderOccluded:R.OccludeAndTransparent};this._projectedGeodesicLine=new G({...c,width:o,stipplePattern:F(s)}),this._geodesicStartHint=new G({...c,width:i,stipplePattern:F(s)}),this._geodesicEndHint=new G({...c,width:i,stipplePattern:F(s)}),this._segmentLabel=new D({...t,fontSize:r}),this._verticalLabel=new D({...t,fontSize:l}),this._horizontalLabel=new D({...t,fontSize:a}),this.addHandles([_((()=>{const{elevationAlignedStartPoint:e,elevationAlignedEndPoint:t}=this.analysisView,i=this.view;return{view:i,camera:i.state.camera,viewMode:this.viewMode,elevationAlignedStartPoint:e,elevationAlignedEndPoint:t,orientation:this._actualVisualElementsOrientation,visualizedMeasurement:this.actualVisualizedMeasurement,stripeLength:this._measurementArrowStripeLength}}),(e=>this._updateGeometryAndViewMode(e)),v),_((()=>({visible:this.visible,viewMode:this.viewMode})),(e=>this._updateVisualElementVisibility(e)),v),_((()=>({text:this._labelsText,visualizedMeasurement:this.actualVisualizedMeasurement})),(e=>this._updateLabelText(e)),v),_((()=>({visible:this.visible,viewMode:this.viewMode})),(e=>this._updateLabelVisibility(e)),v),_((()=>this._measurementArrowStripeLength),(e=>this._updateSegmentStripeLength(e)),v),q((async()=>this._updateMessageBundle())),_((()=>this._parameters),(({textBackgroundColor:e,textCalloutColor:t,textColor:i,translucentAccentColor:s,accentColor:n,contrastColor:o})=>{const{_segmentLabel:r,_verticalLabel:l,_horizontalLabel:a,_triangleVisualElement:c,_rightAngleQuad:d,_projectedGeodesicLine:h,_geodesicStartHint:u,_geodesicEndHint:m,_segmentVisualElement:g}=this;r.backgroundColor=e,r.calloutColor=t,r.textColor=i,l.backgroundColor=e,l.calloutColor=t,l.textColor=i,a.backgroundColor=e,a.calloutColor=t,a.textColor=i,c.color=s,d.color=s,h.color=s,u.color=s,m.color=s,g.color=n,g.contrastColor=o}),b)]),this._updateMessageBundle()}destroy(){this._segmentVisualElement=c(this._segmentVisualElement),this._triangleVisualElement=c(this._triangleVisualElement),this._rightAngleQuad=c(this._rightAngleQuad),this._projectedGeodesicLine=c(this._projectedGeodesicLine),this._geodesicStartHint=c(this._geodesicStartHint),this._geodesicEndHint=c(this._geodesicEndHint),this._segmentLabel=c(this._segmentLabel),this._verticalLabel=c(this._verticalLabel),this._horizontalLabel=c(this._horizontalLabel),this.set("view",null)}_updateVisualElementVisibility({visible:e,viewMode:t}){if(this._segmentVisualElement.visible=!1,this._triangleVisualElement.visible=!1,this._rightAngleQuad.visible=!1,this._projectedGeodesicLine.visible=!1,this._geodesicStartHint.visible=!1,this._geodesicEndHint.visible=!1,e)switch(t){case M.None:break;case M.Direct:this._segmentVisualElement.visible=!0;break;case M.Triangle:this._segmentVisualElement.visible=!0,this._triangleVisualElement.visible=!0,this._rightAngleQuad.visible=!0;break;case M.ProjectedGeodesic:this._segmentVisualElement.visible=!0,this._projectedGeodesicLine.visible=!0,this._geodesicStartHint.visible=!0,this._geodesicEndHint.visible=!0}}_updateGeometryAndViewMode({view:e,camera:t,viewMode:i,elevationAlignedStartPoint:s,elevationAlignedEndPoint:n,orientation:o,visualizedMeasurement:r,stripeLength:l}){const a=e.renderCoordsHelper;if(null==a||null==s||null==n||s.equals(n))return;let c=this._startPosition,d=this._endPosition;a.toRenderCoords(s,c),a.toRenderCoords(n,d);const h=o===C.AboveSegment?1:-1,u=h*(a.getAltitude(d)-a.getAltitude(c));u<0&&(c=this._endPosition,d=this._startPosition);const m="geodesic"===r?new k(this._startPosition,this._endPosition,a.spatialReference):new U(this._startPosition,this._endPosition);switch(this._segmentVisualElement.geometry=m,this._updateSegmentStripeLength(l),i){case M.Direct:this._updateSegment(m,o);break;case M.Triangle:this._updateSegmentAndTriangle({view:e,camera:t,segment:m,orientation:o,startPosition:c,endPosition:d,deltaSign:h,altitudeDelta:u});break;case M.ProjectedGeodesic:this._updateSegmentAndProjection({view:e,orientation:o,startPosition:c,endPosition:d})}}_updateSegment(e,t){this._segmentLabel.anchor=t===C.AboveSegment?"top":"bottom",this._segmentLabel.geometry={type:"segment",segment:e,sampleLocation:"center"}}_updateSegmentAndTriangle({view:{renderCoordsHelper:e},camera:t,segment:i,orientation:s,startPosition:n,endPosition:o,deltaSign:r,altitudeDelta:l}){const a=this._cornerPosition;e.worldUpAtPosition(n,a),V(a,a,r*Math.abs(l)),P(a,a,n),this._triangleVisualElement.geometry=[[[n[0],n[1],n[2]],[a[0],a[1],a[2]],[o[0],o[1],o[2]]]],this._rightAngleQuad.geometry={previous:n,center:a,next:o};const c=new U(n,a),d=new U(a,o),h=N(n,o,a,s,t);this._segmentLabel.anchor=h.segment,this._segmentLabel.geometry={type:"segment",segment:i,sampleLocation:"center"},this._verticalLabel.geometry={type:"segment",segment:c,sampleLocation:"center"},this._verticalLabel.anchor=h.vertical,this._horizontalLabel.geometry={type:"segment",segment:d,sampleLocation:"center"},this._horizontalLabel.anchor=h.horizontal}_updateSegmentAndProjection({view:{renderCoordsHelper:e},orientation:t,startPosition:i,endPosition:s}){e.setAltitude(this._startPositionAtSeaLevel,0,i),e.setAltitude(this._endPositionAtSeaLevel,0,s);const n=new k(this._startPositionAtSeaLevel,this._endPositionAtSeaLevel,e.spatialReference);this._projectedGeodesicLine.setGeometryFromSegment(n),this._geodesicStartHint.setGeometryFromSegment(new U(this._startPositionAtSeaLevel,i)),this._geodesicEndHint.setGeometryFromSegment(new U(this._endPositionAtSeaLevel,s)),this._segmentLabel.geometry={type:"segment",segment:n,sampleLocation:"center"},this._segmentLabel.anchor=t===C.AboveSegment?"top":"bottom"}_updateLabelText({text:e,visualizedMeasurement:t}){null!=e?(this._segmentLabel.text="euclidean"===t?e.directDistance:e.horizontalDistance,this._horizontalLabel.text=e.horizontalDistance,this._verticalLabel.text=e.verticalDistance):(this._segmentLabel.text=null,this._horizontalLabel.text=null,this._verticalLabel.text=null),this.notifyChange("labels")}_updateLabelVisibility({visible:e,viewMode:t}){const i=this._segmentLabel,s=this._horizontalLabel,n=this._verticalLabel;if(i.visible=!1,s.visible=!1,n.visible=!1,e)switch(t){case M.Direct:i.visible=!0;break;case M.Triangle:i.visible=!0,s.visible=!0,n.visible=!0;break;case M.ProjectedGeodesic:i.visible=!0;case M.None:}}get _labelsText(){if(this.destroyed)return null;const e=this.messages,t=this.analysisView.result;if(null==t||null==e)return null;const{directDistance:i,horizontalDistance:s,verticalDistance:n}=t,o=this.analysisView.unit,r=e=>({directDistance:"",horizontalDistance:"",verticalDistance:"",...e});switch(o){case"metric":return r({directDistance:i&&m(e,i),horizontalDistance:s&&m(e,s),verticalDistance:n&&g(e,n)});case"imperial":return r({directDistance:i&&h(e,i),horizontalDistance:s&&h(e,s),verticalDistance:n&&u(e,n)});default:return r({directDistance:i&&d(e,i,o),horizontalDistance:s&&d(e,s,o),verticalDistance:n&&d(e,n,o)})}}_updateSegmentStripeLength(e){const t=this._segmentVisualElement;null!=e?(t.stripeLength=e,t.stripesEnabled=!0):t.stripesEnabled=!1}get _actualVisualElementsOrientation(){if(null!=this._triangleOrientationOverride)return this._triangleOrientationOverride;const e=this.visualElementOrientation;return e===C.Auto?this.view.state.camera.aboveGround?C.AboveSegment:C.BelowSegment:e}_requiresGeodesicGuideAt(e){const t=this.view;if(!t?.state)return!1;const i=t.state.camera,s=t.renderCoordsHelper;if(!s)return!1;const n=i.computeScreenPixelSizeAt(e);return s.getAltitude(e)/n>=10}get _measurementArrowStripeLength(){const{result:e,unit:t}=this.analysisView;if(null==e)return null;let i=null;const s=e.directDistance;switch(t){case"metric":i=s&&p(s,"meters");break;case"imperial":i=s&&p(s,S(s.value,s.unit));break;default:i=s&&p(s,t)}if(null==i)return null;return l(i.value/30)*f(1,i.unit,"meters")}_updateMessageBundle(){this.loadingMessages=!0,B("esri/core/t9n/Units").then((e=>{this.messages=e})).finally((()=>{this.loadingMessages=!1}))}get testData(){}};function N(e,t,i,s,n){const o=J,r=K;n.projectToRenderScreen(i,o),n.projectToRenderScreen(t,r);const l={segment:"bottom",horizontal:"top",vertical:o[0]<r[0]?"left":"right"};{const s=X,o=Y;if(O(e,i,n,s),O(e,t,n,o),E(s,o)>=I){const e=Math.sign(s[1])===Math.sign(o[1]);l.segment=e?x(l.vertical):l.vertical}else{const e=Z;O(i,t,n,e),E(e,o)>=I&&(l.segment=Math.sign(e[0])===Math.sign(o[0])?x(l.horizontal):l.horizontal)}}if(s===C.BelowSegment){const e=e=>"top"===e?"bottom":"top";l.segment=e(l.segment),l.horizontal=e(l.horizontal),l.vertical=e(l.vertical)}return l}e([y()],W.prototype,"_parameters",null),e([y()],W.prototype,"_triangleOrientationOverride",void 0),e([y()],W.prototype,"messages",void 0),e([y()],W.prototype,"view",void 0),e([y()],W.prototype,"analysis",void 0),e([y()],W.prototype,"analysisView",void 0),e([y()],W.prototype,"loadingMessages",void 0),e([y()],W.prototype,"visible",null),e([y()],W.prototype,"viewMode",null),e([y()],W.prototype,"actualVisualizedMeasurement",null),e([y()],W.prototype,"visualElementOrientation",void 0),e([y()],W.prototype,"triangleCollapseRatioThreshold",void 0),e([y()],W.prototype,"allowVisualElementsOrientationChange",null),e([y()],W.prototype,"labels",null),e([y()],W.prototype,"_labelsText",null),e([y()],W.prototype,"_actualVisualElementsOrientation",null),e([y()],W.prototype,"_measurementArrowStripeLength",null),W=e([A("esri.views.3d.analysis.DirectLineMeasurement.DirectLineMeasurementVisualization")],W);const I=Math.cos(a(12)),J=L(),K=L(),X=w(),Y=w(),Z=w();export{W as DirectLineMeasurementVisualization};
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../intl.js";import t from"../../../../core/Accessor.js";import{unitRGBAFromColor as i,multiplyOpacityToUnitRGBA as s,getContrast as n,BrightnessThreshold as o,multiplyOpacity as r}from"../../../../core/colorUtils.js";import"../../../../core/has.js";import{nextHighestPowerOfTen as l,deg2rad as a}from"../../../../core/mathUtils.js";import{destroyMaybe as c}from"../../../../core/maybe.js";import{formatDecimal as d,formatImperialLength as h,formatImperialVerticalLength as u,formatMetricLength as m,formatMetricVerticalLength as g}from"../../../../core/quantityFormatUtils.js";import{toUnit as p}from"../../../../core/quantityUtils.js";import{watch as _,syncAndInitial as v,initial as b}from"../../../../core/reactiveUtils.js";import{createRenderScreenPointArray3 as L,createRenderScreenPointArray as w}from"../../../../core/screenUtils.js";import{adaptiveImperialLengthUnit as S,convertUnit as f}from"../../../../core/unitUtils.js";import{property as y}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as A}from"../../../../core/accessorSupport/decorators/subclass.js";import{dot as E}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{h as V,g as P}from"../../../../chunks/vec32.js";import{create as z}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{MeasurementMode as j}from"../interfaces.js";import{ViewMode as M,VisualElementOrientation as C}from"./interfaces.js";import{renderScreenSpaceTangent as O}from"../../interactive/support/viewUtils.js";import{LabelVisualElement as D,mirrorPosition as x}from"../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as G}from"../../interactive/visualElements/LineVisualElement.js";import{MeasurementArrowVisualElement as H}from"../../interactive/visualElements/MeasurementArrowVisualElement.js";import{RightAngleQuadVisualElement as T}from"../../interactive/visualElements/RightAngleQuadVisualElement.js";import{GeodesicSegment as k,EuclideanSegment as U}from"../../interactive/visualElements/support/Segment.js";import{RenderOccludedFlag as R}from"../../webgl-engine/lib/Material.js";import{createStipplePatternSimple as F}from"../../webgl-engine/materials/lineStippleUtils.js";import{geodesicDistanceThreshold as Q}from"../../../support/geodesicMeasurementUtils.js";import{onLocaleChange as q}from"../../../../intl/locale.js";import{fetchMessageBundle as B}from"../../../../intl/messages.js";let W=class extends t{get _parameters(){const e=this.view.effectiveTheme,{accentColor:t,textColor:l}=e,a=i(t),c=s(t,.75),d=i(n(t)),h=n(l,o.Low);return{accentColor:a,contrastColor:d,translucentAccentColor:c,triangleLineWidth:3,geodesicProjectionLineWidth:2,guideLineWidth:2,guideStippleLengthPixels:3,directLabelFontSize:16,horizontalLabelFontSize:12,verticalLabelFontSize:12,textColor:l,textBackgroundColor:r(h,.6),textCalloutColor:r(h,.5)}}get visible(){return this.analysisView.visible}get viewMode(){const{elevationAlignedStartPoint:e,elevationAlignedEndPoint:t}=this.analysisView;if(null==e||null==t||e.equals(t))return M.None;const i=this.analysisView.result;if(null==i)return M.Direct;if("geodesic"===this.actualVisualizedMeasurement)return this._requiresGeodesicGuideAt(this._startPosition)||this._requiresGeodesicGuideAt(this._endPosition)?M.ProjectedGeodesic:M.Direct;const{verticalDistance:s,horizontalDistance:n}=i,o=p(s,"meters").value,r=p(n,"meters").value;return Math.min(o/r,r/o)<this.triangleCollapseRatioThreshold?M.Direct:M.Triangle}get actualVisualizedMeasurement(){const{measurementMode:e,result:t}=this.analysisView;switch(e){case j.Auto:return null!=t&&p(t.horizontalDistance,"meters").value>Q?"geodesic":"euclidean";case j.Euclidean:return"euclidean";case j.Geodesic:return"geodesic"}}get allowVisualElementsOrientationChange(){return null==this._triangleOrientationOverride}set allowVisualElementsOrientationChange(e){null==this._triangleOrientationOverride!==e&&(null==this._triangleOrientationOverride?this._triangleOrientationOverride=this._actualVisualElementsOrientation:this._triangleOrientationOverride=null)}get labels(){return"geodesic"===this.actualVisualizedMeasurement?{direct:null,horizontal:this._segmentLabel,vertical:this._verticalLabel}:{direct:this._segmentLabel,horizontal:this._horizontalLabel,vertical:this._verticalLabel}}constructor(e){super(e),this._segmentVisualElement=null,this._triangleVisualElement=null,this._rightAngleQuad=null,this._projectedGeodesicLine=null,this._geodesicStartHint=null,this._geodesicEndHint=null,this._segmentLabel=null,this._verticalLabel=null,this._horizontalLabel=null,this._startPosition=z(),this._endPosition=z(),this._cornerPosition=z(),this._startPositionAtSeaLevel=z(),this._endPositionAtSeaLevel=z(),this._triangleOrientationOverride=null,this.messages=null,this.loadingMessages=!0,this.visualElementOrientation=C.Auto,this.triangleCollapseRatioThreshold=.03}initialize(){const e={attached:!0,view:this.view,isDecoration:!0},{guideLineWidth:t,guideStippleLengthPixels:i,triangleLineWidth:s,geodesicProjectionLineWidth:n,directLabelFontSize:o,verticalLabelFontSize:r,horizontalLabelFontSize:l}=this._parameters;this._segmentVisualElement=new H({...e,geometry:null,renderOccluded:R.OccludeAndTransparent}),this._triangleVisualElement=new G({...e,width:s,renderOccluded:R.OccludeAndTransparent}),this._rightAngleQuad=new T({...e,renderOccluded:R.OccludeAndTransparent});const a={...e,polygonOffset:!0,renderOccluded:R.OccludeAndTransparent};this._projectedGeodesicLine=new G({...a,width:n,stipplePattern:F(i)}),this._geodesicStartHint=new G({...a,width:t,stipplePattern:F(i)}),this._geodesicEndHint=new G({...a,width:t,stipplePattern:F(i)}),this._segmentLabel=new D({...e,fontSize:o}),this._verticalLabel=new D({...e,fontSize:r}),this._horizontalLabel=new D({...e,fontSize:l}),this.addHandles([_((()=>{const{elevationAlignedStartPoint:e,elevationAlignedEndPoint:t}=this.analysisView,i=this.view;return{view:i,camera:i.state.camera,viewMode:this.viewMode,elevationAlignedStartPoint:e,elevationAlignedEndPoint:t,orientation:this._actualVisualElementsOrientation,visualizedMeasurement:this.actualVisualizedMeasurement,stripeLength:this._measurementArrowStripeLength}}),(e=>this._updateGeometryAndViewMode(e)),v),_((()=>({visible:this.visible,viewMode:this.viewMode})),(e=>this._updateVisualElementVisibility(e)),v),_((()=>({text:this._labelsText,visualizedMeasurement:this.actualVisualizedMeasurement})),(e=>this._updateLabelText(e)),v),_((()=>({visible:this.visible,viewMode:this.viewMode})),(e=>this._updateLabelVisibility(e)),v),_((()=>this._measurementArrowStripeLength),(e=>this._updateSegmentStripeLength(e)),v),q((async()=>this._updateMessageBundle())),_((()=>this._parameters),(({textBackgroundColor:e,textCalloutColor:t,textColor:i,translucentAccentColor:s,accentColor:n,contrastColor:o})=>{const{_segmentLabel:r,_verticalLabel:l,_horizontalLabel:a,_triangleVisualElement:c,_rightAngleQuad:d,_projectedGeodesicLine:h,_geodesicStartHint:u,_geodesicEndHint:m,_segmentVisualElement:g}=this;r.backgroundColor=e,r.calloutColor=t,r.textColor=i,l.backgroundColor=e,l.calloutColor=t,l.textColor=i,a.backgroundColor=e,a.calloutColor=t,a.textColor=i,c.color=s,d.color=s,h.color=s,u.color=s,m.color=s,g.color=n,g.contrastColor=o}),b)]),this._updateMessageBundle()}destroy(){this._segmentVisualElement=c(this._segmentVisualElement),this._triangleVisualElement=c(this._triangleVisualElement),this._rightAngleQuad=c(this._rightAngleQuad),this._projectedGeodesicLine=c(this._projectedGeodesicLine),this._geodesicStartHint=c(this._geodesicStartHint),this._geodesicEndHint=c(this._geodesicEndHint),this._segmentLabel=c(this._segmentLabel),this._verticalLabel=c(this._verticalLabel),this._horizontalLabel=c(this._horizontalLabel),this.set("view",null)}_updateVisualElementVisibility({visible:e,viewMode:t}){if(this._segmentVisualElement.visible=!1,this._triangleVisualElement.visible=!1,this._rightAngleQuad.visible=!1,this._projectedGeodesicLine.visible=!1,this._geodesicStartHint.visible=!1,this._geodesicEndHint.visible=!1,e)switch(t){case M.None:break;case M.Direct:this._segmentVisualElement.visible=!0;break;case M.Triangle:this._segmentVisualElement.visible=!0,this._triangleVisualElement.visible=!0,this._rightAngleQuad.visible=!0;break;case M.ProjectedGeodesic:this._segmentVisualElement.visible=!0,this._projectedGeodesicLine.visible=!0,this._geodesicStartHint.visible=!0,this._geodesicEndHint.visible=!0}}_updateGeometryAndViewMode({view:e,camera:t,viewMode:i,elevationAlignedStartPoint:s,elevationAlignedEndPoint:n,orientation:o,visualizedMeasurement:r,stripeLength:l}){const a=e.renderCoordsHelper;if(null==a||null==s||null==n||s.equals(n))return;let c=this._startPosition,d=this._endPosition;a.toRenderCoords(s,c),a.toRenderCoords(n,d);const h=o===C.AboveSegment?1:-1,u=h*(a.getAltitude(d)-a.getAltitude(c));u<0&&(c=this._endPosition,d=this._startPosition);const m="geodesic"===r?new k(this._startPosition,this._endPosition,a.spatialReference):new U(this._startPosition,this._endPosition);switch(this._segmentVisualElement.geometry=m,this._updateSegmentStripeLength(l),i){case M.Direct:this._updateSegment(m,o);break;case M.Triangle:this._updateSegmentAndTriangle({view:e,camera:t,segment:m,orientation:o,startPosition:c,endPosition:d,deltaSign:h,altitudeDelta:u});break;case M.ProjectedGeodesic:this._updateSegmentAndProjection({view:e,orientation:o,startPosition:c,endPosition:d})}}_updateSegment(e,t){this._segmentLabel.anchor=t===C.AboveSegment?"top":"bottom",this._segmentLabel.geometry={type:"segment",segment:e,sampleLocation:"center"}}_updateSegmentAndTriangle({view:{renderCoordsHelper:e},camera:t,segment:i,orientation:s,startPosition:n,endPosition:o,deltaSign:r,altitudeDelta:l}){const a=this._cornerPosition;e.worldUpAtPosition(n,a),V(a,a,r*Math.abs(l)),P(a,a,n),this._triangleVisualElement.geometry=[[[n[0],n[1],n[2]],[a[0],a[1],a[2]],[o[0],o[1],o[2]]]],this._rightAngleQuad.geometry={previous:n,center:a,next:o};const c=new U(n,a),d=new U(a,o),h=N(n,o,a,s,t);this._segmentLabel.anchor=h.segment,this._segmentLabel.geometry={type:"segment",segment:i,sampleLocation:"center"},this._verticalLabel.geometry={type:"segment",segment:c,sampleLocation:"center"},this._verticalLabel.anchor=h.vertical,this._horizontalLabel.geometry={type:"segment",segment:d,sampleLocation:"center"},this._horizontalLabel.anchor=h.horizontal}_updateSegmentAndProjection({view:{renderCoordsHelper:e},orientation:t,startPosition:i,endPosition:s}){e.setAltitude(this._startPositionAtSeaLevel,0,i),e.setAltitude(this._endPositionAtSeaLevel,0,s);const n=new k(this._startPositionAtSeaLevel,this._endPositionAtSeaLevel,e.spatialReference);this._projectedGeodesicLine.setGeometryFromSegment(n),this._geodesicStartHint.setGeometryFromSegment(new U(this._startPositionAtSeaLevel,i)),this._geodesicEndHint.setGeometryFromSegment(new U(this._endPositionAtSeaLevel,s)),this._segmentLabel.geometry={type:"segment",segment:n,sampleLocation:"center"},this._segmentLabel.anchor=t===C.AboveSegment?"top":"bottom"}_updateLabelText({text:e,visualizedMeasurement:t}){null!=e?(this._segmentLabel.text="euclidean"===t?e.directDistance:e.horizontalDistance,this._horizontalLabel.text=e.horizontalDistance,this._verticalLabel.text=e.verticalDistance):(this._segmentLabel.text=null,this._horizontalLabel.text=null,this._verticalLabel.text=null),this.notifyChange("labels")}_updateLabelVisibility({visible:e,viewMode:t}){const i=this._segmentLabel,s=this._horizontalLabel,n=this._verticalLabel;if(i.visible=!1,s.visible=!1,n.visible=!1,e)switch(t){case M.Direct:i.visible=!0;break;case M.Triangle:i.visible=!0,s.visible=!0,n.visible=!0;break;case M.ProjectedGeodesic:i.visible=!0;case M.None:}}get _labelsText(){if(this.destroyed)return null;const e=this.messages,t=this.analysisView.result;if(null==t||null==e)return null;const{directDistance:i,horizontalDistance:s,verticalDistance:n}=t,o=this.analysisView.unit,r=e=>({directDistance:"",horizontalDistance:"",verticalDistance:"",...e});switch(o){case"metric":return r({directDistance:i&&m(e,i),horizontalDistance:s&&m(e,s),verticalDistance:n&&g(e,n)});case"imperial":return r({directDistance:i&&h(e,i),horizontalDistance:s&&h(e,s),verticalDistance:n&&u(e,n)});default:return r({directDistance:i&&d(e,i,o),horizontalDistance:s&&d(e,s,o),verticalDistance:n&&d(e,n,o)})}}_updateSegmentStripeLength(e){const t=this._segmentVisualElement;null!=e?(t.stripeLength=e,t.stripesEnabled=!0):t.stripesEnabled=!1}get _actualVisualElementsOrientation(){if(null!=this._triangleOrientationOverride)return this._triangleOrientationOverride;const e=this.visualElementOrientation;return e===C.Auto?this.view.state.camera.aboveGround?C.AboveSegment:C.BelowSegment:e}_requiresGeodesicGuideAt(e){const t=this.view;if(!t?.state)return!1;const i=t.state.camera,s=t.renderCoordsHelper;if(!s)return!1;const n=i.computeScreenPixelSizeAt(e);return s.getAltitude(e)/n>=10}get _measurementArrowStripeLength(){const{result:e,unit:t}=this.analysisView;if(null==e)return null;let i=null;const s=e.directDistance;switch(t){case"metric":i=s&&p(s,"meters");break;case"imperial":i=s&&p(s,S(s.value,s.unit));break;default:i=s&&p(s,t)}if(null==i)return null;return l(i.value/30)*f(1,i.unit,"meters")}_updateMessageBundle(){this.loadingMessages=!0,B("esri/core/t9n/Units").then((e=>{this.messages=e})).finally((()=>{this.loadingMessages=!1}))}get testData(){}};function N(e,t,i,s,n){const o=J,r=K;n.projectToRenderScreen(i,o),n.projectToRenderScreen(t,r);const l={segment:"bottom",horizontal:"top",vertical:o[0]<r[0]?"left":"right"};{const s=X,o=Y;if(O(e,i,n,s),O(e,t,n,o),E(s,o)>=I){const e=Math.sign(s[1])===Math.sign(o[1]);l.segment=e?x(l.vertical):l.vertical}else{const e=Z;O(i,t,n,e),E(e,o)>=I&&(l.segment=Math.sign(e[0])===Math.sign(o[0])?x(l.horizontal):l.horizontal)}}if(s===C.BelowSegment){const e=e=>"top"===e?"bottom":"top";l.segment=e(l.segment),l.horizontal=e(l.horizontal),l.vertical=e(l.vertical)}return l}e([y()],W.prototype,"_parameters",null),e([y()],W.prototype,"_triangleOrientationOverride",void 0),e([y()],W.prototype,"messages",void 0),e([y()],W.prototype,"view",void 0),e([y()],W.prototype,"analysis",void 0),e([y()],W.prototype,"analysisView",void 0),e([y()],W.prototype,"loadingMessages",void 0),e([y()],W.prototype,"visible",null),e([y()],W.prototype,"viewMode",null),e([y()],W.prototype,"actualVisualizedMeasurement",null),e([y()],W.prototype,"visualElementOrientation",void 0),e([y()],W.prototype,"triangleCollapseRatioThreshold",void 0),e([y()],W.prototype,"allowVisualElementsOrientationChange",null),e([y()],W.prototype,"labels",null),e([y()],W.prototype,"_labelsText",null),e([y()],W.prototype,"_actualVisualElementsOrientation",null),e([y()],W.prototype,"_measurementArrowStripeLength",null),W=e([A("esri.views.3d.analysis.DirectLineMeasurement.DirectLineMeasurementVisualization")],W);const I=Math.cos(a(12)),J=L(),K=L(),X=w(),Y=w(),Z=w();export{W as DirectLineMeasurementVisualization};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Evented.js";import"../../../core/has.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{watch as n,when as r,sync as o,syncAndInitial as s}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{h as l,c,m as g}from"../../../chunks/vec32.js";import{create as d,fromValues as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isLoadedOrLoadFor as m}from"../../../geometry/projection.js";import u from"../../../geometry/SpatialReference.js";import{projectPointToVector as _}from"../../../geometry/projection/projectPointToVector.js";import{getGCSForPlanet as v}from"../../../geometry/support/planetGCSUtils.js";import{isEarth as f}from"../../../geometry/support/spatialReferenceUtils.js";import{ViewingMode as w}from"../../ViewingMode.js";import{EnvironmentRenderer as b}from"./EnvironmentRenderer.js";import{positionToTimezoneInfo as y}from"../support/earthUtils.js";import{ColorAndIntensity as P,computeColorAndIntensity as j,computeVirtualLightDirection as T,computeShadowsEnabled as L}from"../support/sunUtils.js";import{Update as E}from"../webgl-engine/lib/Update.js";import{MainLight as S,AmbientLight as G,FillLight as U}from"../webgl-engine/lighting/Lightsources.js";let H=class extends t.EventedAccessor{constructor(){super(),this._tmpLightParameters=new P,this._defaultLightParameters=new P,this._tmpDate=new Date,this._tmpTz={hours:0,minutes:0,seconds:0},this._viewHandlesKey="viewHandles",this._trackingEnabled=!1,this._mainLight=new S,this._ambientLight=new G,this._moonLight=new U,this._disableProjectionEngineAutoLoad=!1,this._disableWeather=!1,this._renderer=null,this._referencePositionGeographic=null,this._resetReferencePosition()}destroy(){this.disconnectView()}get _view(){return this._renderer?.view}get updating(){return!!this._renderer?.updating||!this._canProjectCameraPosition}get weatherEnabled(){return this._view?.environment.atmosphereEnabled&&!this._disableWeather&&this._view?.state?.viewingMode===w.Global&&f(this._view.spatialReference)}get _weatherAvailable(){return this.weatherEnabled&&this._renderer?.weatherAvailable}get referencePositionGeographic(){return this._referencePositionGeographic}get _canProjectCameraPosition(){const e=this._view?.stateManager?.camera?.position?.spatialReference??u.WGS84,t=v(e);return this._disableProjectionEngineAutoLoad||m(e,t)}connectView(e){if(this._renderer)return;this._renderer=new b({view:e});const t=()=>this._updateRenderParameters(),i=()=>this._cameraHandler();this.addHandles([n((()=>e.environment.lighting),(e=>this._updateLightingHandler(e)),o),n((()=>"virtual"!==e.environment.lighting.type?e.environment.lighting.date:null),(e=>this._lightingDateHandler(e)),o),n((()=>e.environment.lighting.directShadowsEnabled),t,o),n((()=>e.qualitySettings.ambientOcclusion),t,o),n((()=>e.qualitySettings.reflections),t,o),n((()=>e.spatialReference),(()=>this._resetReferencePosition(!0)),o),n((()=>[e.environment.weather.type,this.weatherEnabled]),(()=>this._updateLighting(null,E.FadeWithWeather)),o),n((()=>e.environment),(e=>e.setComputeWeatherAvailable((()=>this._weatherAvailable))),s),n((()=>e.viewingMode),(()=>this._resetReferencePosition(!0)),s),n((()=>"virtual"!==e.environment.lighting.type&&e.environment.lighting.cameraTrackingEnabled),(e=>this._updateCameraTracking(e)),s),n((()=>e.state.camera),i,s),r((()=>this._canProjectCameraPosition),i,o)],this._viewHandlesKey),this._updateRenderParameters(),this._updateLighting(),this._cameraHandler(),this.notifyChange("updating")}disconnectView(){this.removeHandles(this._viewHandlesKey),this._resetReferencePosition(),this._renderer=i(this._renderer)}_updateLightingHandler(e){this._updateCameraTracking("virtual"!==e.type&&e.cameraTrackingEnabled),this._lightingDateHandler("virtual"!==e.type?e.date:null),this._updateRenderParameters()}_updateCameraTracking(e){if(this._trackingEnabled=e,e)this._cameraHandler();else{const e=this._view.environment.lighting;"virtual"!==e?.type&&(e.positionTimezoneInfo.autoUpdated=!1)}}_lightingDateHandler(e){const t=this._view.environment.lighting;if("virtual"!==t?.type){if(e){if(!t.positionTimezoneInfo.autoUpdated&&(this._preupdateTracking(e),null!=this._referencePositionGeographic)){const e=y(this._referencePositionGeographic,this._tmpTz);null!=e&&(t.autoUpdate(null,e),this._trackingEnabled&&(t.positionTimezoneInfo.autoUpdated=!0))}this._updateLighting(e)}}else this._updateLighting()}_preupdateTracking(e){!this._trackingEnabled&&"virtual"!==this._view.environment.lighting.type&&this._view.environment.lighting.cameraTrackingEnabled&&this._cameraHandler(e)}_cameraHandler(e=null){const t=this._view;if(!t.ready)return;const i=t.stateManager.camera;if(!i)return;const{position:n}=i,r=n.spatialReference??u.WGS84,o=v(r),s=this._referencePositionGeographic??d();if(!_(n,s,o))return this._referencePositionGeographic=null,void this._updateLighting();this._referencePositionGeographic=s,this.notifyChange("referencePositionGeographic"),this._autoUpdateTimezone(s,e)||this._updateLighting(e)}_updateLighting(e,t=E.Immediate){const i=this._view,{lighting:n}=i.environment,r="virtual"===n.type,o=this._referencePositionGeographic,s=null!=o?this._tmpLightParameters:this._defaultLightParameters;if(o){e??=r?null:n.date;const t=this._weatherAvailable?i.environment.weather.type:"disabled";j(e,o,i.state.viewingMode,t,i.state.camera,s)}else r&&T(i.state.camera,i.state.viewingMode,s.direct.directionToLightSource);const a=this._mainLight,h=s.direct;l(a.intensity,h.color,h.intensity*Math.PI),c(a.direction,h.directionToLightSource),a.specularStrength=s.specularStrength,a.environmentStrength=s.environmentStrength;const d=this._ambientLight;l(d.intensity,s.ambient.color,s.ambient.intensity);const p=this._moonLight;g(p.intensity,C,R,s.globalFactor);const m=(1-.5*s.globalFactor)*(1-.4*s.noonFactor*(1-s.globalFactor));l(p.intensity,p.intensity,m),c(p.direction,h.directionToLightSource),this._view._stage
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Evented.js";import"../../../core/has.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{watch as n,when as r,sync as o,syncAndInitial as s}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{h as l,c,m as g}from"../../../chunks/vec32.js";import{create as d,fromValues as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isLoadedOrLoadFor as m}from"../../../geometry/projection.js";import u from"../../../geometry/SpatialReference.js";import{projectPointToVector as _}from"../../../geometry/projection/projectPointToVector.js";import{getGCSForPlanet as v}from"../../../geometry/support/planetGCSUtils.js";import{isEarth as f}from"../../../geometry/support/spatialReferenceUtils.js";import{ViewingMode as w}from"../../ViewingMode.js";import{EnvironmentRenderer as b}from"./EnvironmentRenderer.js";import{positionToTimezoneInfo as y}from"../support/earthUtils.js";import{ColorAndIntensity as P,computeColorAndIntensity as j,computeVirtualLightDirection as T,computeShadowsEnabled as L}from"../support/sunUtils.js";import{Update as E}from"../webgl-engine/lib/Update.js";import{MainLight as S,AmbientLight as G,FillLight as U}from"../webgl-engine/lighting/Lightsources.js";let H=class extends t.EventedAccessor{constructor(){super(),this._tmpLightParameters=new P,this._defaultLightParameters=new P,this._tmpDate=new Date,this._tmpTz={hours:0,minutes:0,seconds:0},this._viewHandlesKey="viewHandles",this._trackingEnabled=!1,this._mainLight=new S,this._ambientLight=new G,this._moonLight=new U,this._disableProjectionEngineAutoLoad=!1,this._disableWeather=!1,this._renderer=null,this._referencePositionGeographic=null,this._resetReferencePosition()}destroy(){this.disconnectView()}get _view(){return this._renderer?.view}get updating(){return!!this._renderer?.updating||!this._canProjectCameraPosition}get weatherEnabled(){return this._view?.environment.atmosphereEnabled&&!this._disableWeather&&this._view?.state?.viewingMode===w.Global&&f(this._view.spatialReference)}get _weatherAvailable(){return this.weatherEnabled&&this._renderer?.weatherAvailable}get referencePositionGeographic(){return this._referencePositionGeographic}get _canProjectCameraPosition(){const e=this._view?.stateManager?.camera?.position?.spatialReference??u.WGS84,t=v(e);return this._disableProjectionEngineAutoLoad||m(e,t)}connectView(e){if(this._renderer)return;this._renderer=new b({view:e});const t=()=>this._updateRenderParameters(),i=()=>this._cameraHandler();this.addHandles([n((()=>e.environment.lighting),(e=>this._updateLightingHandler(e)),o),n((()=>"virtual"!==e.environment.lighting.type?e.environment.lighting.date:null),(e=>this._lightingDateHandler(e)),o),n((()=>e.environment.lighting.directShadowsEnabled),t,o),n((()=>e.qualitySettings.ambientOcclusion),t,o),n((()=>e.qualitySettings.reflections),t,o),n((()=>e.spatialReference),(()=>this._resetReferencePosition(!0)),o),n((()=>[e.environment.weather.type,this.weatherEnabled]),(()=>this._updateLighting(null,E.FadeWithWeather)),o),n((()=>e.environment),(e=>e.setComputeWeatherAvailable((()=>this._weatherAvailable))),s),n((()=>e.viewingMode),(()=>this._resetReferencePosition(!0)),s),n((()=>"virtual"!==e.environment.lighting.type&&e.environment.lighting.cameraTrackingEnabled),(e=>this._updateCameraTracking(e)),s),n((()=>e.state.camera),i,s),r((()=>this._canProjectCameraPosition),i,o)],this._viewHandlesKey),this._updateRenderParameters(),this._updateLighting(),this._cameraHandler(),this.notifyChange("updating")}disconnectView(){this.removeHandles(this._viewHandlesKey),this._resetReferencePosition(),this._renderer=i(this._renderer)}_updateLightingHandler(e){this._updateCameraTracking("virtual"!==e.type&&e.cameraTrackingEnabled),this._lightingDateHandler("virtual"!==e.type?e.date:null),this._updateRenderParameters()}_updateCameraTracking(e){if(this._trackingEnabled=e,e)this._cameraHandler();else{const e=this._view.environment.lighting;"virtual"!==e?.type&&(e.positionTimezoneInfo.autoUpdated=!1)}}_lightingDateHandler(e){const t=this._view.environment.lighting;if("virtual"!==t?.type){if(e){if(!t.positionTimezoneInfo.autoUpdated&&(this._preupdateTracking(e),null!=this._referencePositionGeographic)){const e=y(this._referencePositionGeographic,this._tmpTz);null!=e&&(t.autoUpdate(null,e),this._trackingEnabled&&(t.positionTimezoneInfo.autoUpdated=!0))}this._updateLighting(e)}}else this._updateLighting()}_preupdateTracking(e){!this._trackingEnabled&&"virtual"!==this._view.environment.lighting.type&&this._view.environment.lighting.cameraTrackingEnabled&&this._cameraHandler(e)}_cameraHandler(e=null){const t=this._view;if(!t.ready)return;const i=t.stateManager.camera;if(!i)return;const{position:n}=i,r=n.spatialReference??u.WGS84,o=v(r),s=this._referencePositionGeographic??d();if(!_(n,s,o))return this._referencePositionGeographic=null,void this._updateLighting();this._referencePositionGeographic=s,this.notifyChange("referencePositionGeographic"),this._autoUpdateTimezone(s,e)||this._updateLighting(e)}_updateLighting(e,t=E.Immediate){const i=this._view,{lighting:n}=i.environment,r="virtual"===n.type,o=this._referencePositionGeographic,s=null!=o?this._tmpLightParameters:this._defaultLightParameters;if(o){e??=r?null:n.date;const t=this._weatherAvailable?i.environment.weather.type:"disabled";j(e,o,i.state.viewingMode,t,i.state.camera,s)}else r&&T(i.state.camera,i.state.viewingMode,s.direct.directionToLightSource);const a=this._mainLight,h=s.direct;l(a.intensity,h.color,h.intensity*Math.PI),c(a.direction,h.directionToLightSource),a.specularStrength=s.specularStrength,a.environmentStrength=s.environmentStrength;const d=this._ambientLight;l(d.intensity,s.ambient.color,s.ambient.intensity);const p=this._moonLight;g(p.intensity,C,R,s.globalFactor);const m=(1-.5*s.globalFactor)*(1-.4*s.noonFactor*(1-s.globalFactor));l(p.intensity,p.intensity,m),c(p.direction,h.directionToLightSource),this._view._stage?.renderer.updateLighting([a,d,p],s.noonFactor,s.globalFactor,t),this._updateRenderParameters()}_autoUpdateTimezone(e,t=null){if("virtual"===this._view.environment.lighting.type||!this._view.environment.lighting.cameraTrackingEnabled||null==e)return!1;const i=this._tmpDate;i.setTime((t||this._view.environment.lighting.date).getTime());const n=y(e,this._tmpTz);if(null==n)return!1;let r=this._view.environment.lighting.positionTimezoneInfo;if(r.autoUpdated){if(r.hours===n.hours&&r.minutes===n.minutes&&r.seconds===n.seconds)return!1}else r=n;const o=i.getUTCHours()-(n.hours-r.hours),s=i.getUTCMinutes()-(n.minutes-r.minutes),a=i.getUTCSeconds()-(n.seconds-r.seconds);return i.setUTCHours(o),i.setUTCMinutes(s),i.setUTCSeconds(a),!t&&this._view.environment.lighting.autoUpdate(i,n)}_updateRenderParameters(){const e=this._view._stage;if(!e)return;const t=null==this._referencePositionGeographic||L(this._referencePositionGeographic[2],this._view.state.viewingMode);e.renderer.setParameters({shadowMap:this._view.environment.lighting.directShadowsEnabled&&t,environment:this._view.environment,weatherVisible:this._weatherAvailable,qualitySettings:this._view.qualitySettings})}_resetReferencePosition(e=!1){this._referencePositionGeographic=null,e&&this._cameraHandler()}get test(){}};e([a({type:Boolean,readOnly:!0})],H.prototype,"updating",null),e([a()],H.prototype,"_disableProjectionEngineAutoLoad",void 0),e([a()],H.prototype,"_disableWeather",void 0),e([a()],H.prototype,"weatherEnabled",null),e([a()],H.prototype,"_weatherAvailable",null),e([a()],H.prototype,"referencePositionGeographic",null),e([a()],H.prototype,"_renderer",void 0),e([a()],H.prototype,"_referencePositionGeographic",void 0),e([a()],H.prototype,"_canProjectCameraPosition",null),H=e([h("esri.views.3d.environment.EnvironmentManager")],H);const C=p(.22,.22,.33),R=p(.22,.22,.22);export{H as EnvironmentManager};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../chunks/tslib.es6.js";import"../../../core/has.js";import{destroyMaybe as e}from"../../../core/maybe.js";import{watch as i,sync as r}from"../../../core/reactiveUtils.js";import{signal as s}from"../../../core/signal.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{l as a}from"../../../chunks/vec32.js";import{getReferenceEllipsoid as u}from"../../../geometry/ellipsoidUtils.js";import{CubeMapState as c}from"./Clouds.js";import{cloudPresets as p}from"./CloudsPresets.js";import{CloudsRenderer as l}from"./CloudsRenderer.js";import{Precipitation as h}from"./Precipitation.js";import{heightLimit as d}from"./weather.js";import{SyncRenderPlugin as _}from"../webgl-engine/effects/RenderPlugin.js";let m=class extends _{constructor(t){super(t),this.produces=new Map([]),this._clouds=s(null),this._incarnation=0,this._precipitation=null}initialize(){this.view._stage
|
|
5
|
+
import{_ as t}from"../../../chunks/tslib.es6.js";import"../../../core/has.js";import{destroyMaybe as e}from"../../../core/maybe.js";import{watch as i,sync as r}from"../../../core/reactiveUtils.js";import{signal as s}from"../../../core/signal.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{l as a}from"../../../chunks/vec32.js";import{getReferenceEllipsoid as u}from"../../../geometry/ellipsoidUtils.js";import{CubeMapState as c}from"./Clouds.js";import{cloudPresets as p}from"./CloudsPresets.js";import{CloudsRenderer as l}from"./CloudsRenderer.js";import{Precipitation as h}from"./Precipitation.js";import{heightLimit as d}from"./weather.js";import{SyncRenderPlugin as _}from"../webgl-engine/effects/RenderPlugin.js";let m=class extends _{constructor(t){super(t),this.produces=new Map([]),this._clouds=s(null),this._incarnation=0,this._precipitation=null}initialize(){this.view._stage?.addRenderPlugin(this)}destroy(){this.removeHandles(),this.uninitializeRenderContext(),this.view?._stage?.removeRenderPlugin(this),this._set("view",null)}get updating(){return!!this._clouds.value?.running}get weatherAvailable(){return a(this.view.state.camera.eye)-u(this.view.spatialReference).radius<=d}get usedMemory(){return this._clouds.value?.usedMemory??0}_fadeOutPrecipitation(){this._precipitation&&(this._precipitationOutgoing?.destroy(),this._precipitationOutgoing=this._precipitation,this._precipitationOutgoing.fadeOut((()=>{this._precipitationOutgoing=e(this._precipitationOutgoing)})),this._precipitation=null,++this._incarnation)}get weather(){return this.view?.environmentManager?.weatherEnabled?this.view.environment.weather:null}initializeRenderContext(t){this._context=t;const e=this.view,s=()=>this._requestRender();this.addHandles([i((()=>this._precipitation),s,r),i((()=>this._clouds.value?.state),s,r),i((()=>e.state.mode),s,r),i((()=>this._updateClouds()),s,r),i((()=>this._updatePrecipitation()),s,r),i((()=>this.weather),(t=>this._initWeather(t)))])}uninitializeRenderContext(){this._context=null,this._clouds.value=e(this._clouds.value),this._precipitation=e(this._precipitation),this._precipitationOutgoing=e(this._precipitationOutgoing)}prepareRender(t){const{bind:e,time:i}=t;if("local"!==this.view.viewingMode&&e.clouds.data){e.clouds.fade(e.camera,i,this.view.qualitySettings.fadeDuration);const t=this._clouds.value;t&&t.state===c.Idle&&0===t.coverage&&!t.running&&t.destroyCubeMap()}}acquireTechniques(){return[]}render(){}_requestRender(){this._context?.requestRender()}_initWeather(t){const i=this._context;if(!t||!i)return void(this._clouds.value=e(this._clouds.value));if(this._clouds.value)return;const r=this.view;this._clouds.value=new l({context:i,view:r,requestRender:()=>this._requestRender()})}_updateClouds(){const t=this.view.environment.weather;return null==t||null==this._clouds.value||this._clouds.value.applyPreset(p[t.type],v(t)),++this._incarnation}_updatePrecipitation(){const t=this.view.environment.weather;if(t.type===this._precipitation?.type)return this._incarnation;this._fadeOutPrecipitation();const e="rainy"===t.type||"snowy"===t.type,i=this._context;return e&&i&&(this._precipitation=new h({view:this.view,type:t.type}),++this._incarnation),this._incarnation}get test(){}hasHighlightOptions(t){return!1}};function v(t){switch(t.type){case"rainy":case"snowy":case"cloudy":case"sunny":return t.cloudCover;case"foggy":return t.fogStrength}}t([n({constructOnly:!0})],m.prototype,"view",void 0),t([n({type:Boolean,readOnly:!0})],m.prototype,"updating",null),t([n()],m.prototype,"weatherAvailable",null),t([n()],m.prototype,"_context",void 0),m=t([o("esri.views.3d.environment.EnvironmentRenderer")],m);export{m as EnvironmentRenderer};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import{lerp as t,smoothstep as s}from"../../../core/mathUtils.js";import{watch as r,syncAndInitial as a}from"../../../core/reactiveUtils.js";import"../../../core/Logger.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import"../../../core/Error.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{c as o,n,f as h,h as m,m as p,l as c}from"../../../chunks/vec32.js";import{create as d,fromValues as l}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as _}from"../../../geometry/ellipsoidUtils.js";import{InternalRenderCategory as g}from"../webgl.js";import{F as u}from"../../../chunks/Fog.glsl.js";import{FogTechnique as f}from"./FogTechnique.js";import{heightLimit as w}from"./weather.js";import{TransparentEnvironment as P}from"../webgl-engine/effects/TransparentEnvironment.js";import{RenderRequestType as y}from"../webgl-engine/lib/basicInterfaces.js";const b=.95,v=1;let j=class extends P{constructor(e){super(e),this.requireGeometryDepth=!0,this._newParameters=new F,this._oldParameters=new F,this._fadedParameters=new F,this._parameters=this._newParameters,this._passParameters=new u;const t=_(e.view.spatialReference);this._planetRadius=t.radius,this._atmosphereRadius=t.radius+t.atmosphereHeight,e.view._stage
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import{lerp as t,smoothstep as s}from"../../../core/mathUtils.js";import{watch as r,syncAndInitial as a}from"../../../core/reactiveUtils.js";import"../../../core/Logger.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import"../../../core/Error.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{c as o,n,f as h,h as m,m as p,l as c}from"../../../chunks/vec32.js";import{create as d,fromValues as l}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as _}from"../../../geometry/ellipsoidUtils.js";import{InternalRenderCategory as g}from"../webgl.js";import{F as u}from"../../../chunks/Fog.glsl.js";import{FogTechnique as f}from"./FogTechnique.js";import{heightLimit as w}from"./weather.js";import{TransparentEnvironment as P}from"../webgl-engine/effects/TransparentEnvironment.js";import{RenderRequestType as y}from"../webgl-engine/lib/basicInterfaces.js";const b=.95,v=1;let j=class extends P{constructor(e){super(e),this.requireGeometryDepth=!0,this._newParameters=new F,this._oldParameters=new F,this._fadedParameters=new F,this._parameters=this._newParameters,this._passParameters=new u;const t=_(e.view.spatialReference);this._planetRadius=t.radius,this._atmosphereRadius=t.radius+t.atmosphereHeight,e.view._stage?.renderView.techniques.precompile(f)}toogle(){this.view.environment.atmosphereEnabled&&this.view.environment.weather?this._enable():this._disable()}initialize(){this.addHandles([r((()=>this.view.environment.atmosphereEnabled),(()=>this.toogle()),a),r((()=>this.view.environment.weather),(()=>this.toogle()),a),r((()=>this._updateFogParameters()),(()=>{}),a)]),this.addHandles(r((()=>this._fadeFactor),(e=>this._fade(e)),a))}get _fadeFactor(){return this.view._stage?.renderer.renderContext.bind.clouds.fadeFactor??1}_fade(e){const{_newParameters:t,_oldParameters:s}=this;e>=1?(this._parameters=t,this._oldParameters.copyFrom(this._newParameters)):e<=0?this._parameters=s:(this._fadedParameters.lerp(s,t,e),this._parameters=this._fadedParameters)}_updateFogParameters(){const e=this.view.environment.weather,s="foggy"===e.type||"snowy"===e.type||"rainy"===e.type;this._newParameters.strength="foggy"===e.type?t(3e-5,.005,e.fogStrength**3):"snowy"===e.type||"rainy"===e.type?t(4e-6,2e-4,(e.precipitation??0)**3):0,this._newParameters.amount=s?1:0,"foggy"!==e.type&&"snowy"!==e.type||o(this._newParameters.color,q),"rainy"===e.type&&o(this._newParameters.color,R),this._fadeFactor>=1&&this._oldParameters.copyFrom(this._newParameters),this.requestRender(y.UPDATE)}render(e){const t=e.find((({name:e})=>e===g.TRANSPARENT_ENVIRONMENT));if(0===this._parameters.amount)return t;if(this._update(),this._passParameters.amount<=0)return t;const s=this.techniques.get(f);if(!s.compiled)return this.requestRender(y.UPDATE),t;const r=this.renderingContext,a=t.getAttachment(r.gl.DEPTH_STENCIL_ATTACHMENT);return t.attachDepth(null),r.bindFramebuffer(t.fbo),r.bindTechnique(s,this.bindParameters,this._passParameters),r.screen.draw(),t.attachDepth(a),t}_update(){const e=this.bindParameters.camera;n(T,e.eye);const t=Math.max(0,h(T,this.bindParameters.lighting.mainLight.direction)),r=this._parameters.color;m(E,r,.1),p(this._passParameters.color,E,r,t);const a=c(e.eye);this._passParameters.atmosphereC=a**2-this._atmosphereRadius**2,this._passParameters.amount=(1-s(b*w,v*w,Math.abs(a-this._planetRadius)))*this._parameters.amount,this._passParameters.strength=this._parameters.strength}};j=e([i("esri.views.3d.environment.Fog")],j);class F{constructor(){this.color=d(),this.strength=0,this.amount=0}copyFrom(e){this.amount=e.amount,this.strength=e.strength,o(this.color,e.color)}lerp(e,s,r){this.amount=t(e.amount,s.amount,r),this.strength=t(e.strength,s.strength,r),p(this.color,e.color,s.color,r)}}const T=d(),E=d(),R=l(.5,.5,.5),q=l(1.5,1.5,1.5);export{j as Fog,F as FogParameters};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{Milliseconds as t}from"../../../../core/time.js";class e{constructor(e,
|
|
5
|
+
import{Milliseconds as t}from"../../../../core/time.js";class e{constructor(e,s){this._camera=e,this._dt=t(0),this._time=t(0),this._lastUpdate=t(0),this._lastUpdate=s,this._time=s}advance(e,s,i){const a=t(s-this._lastUpdate);this._dt=t(a/i),this._time=t(this._time+a),this._lastUpdate=s,this._camera=e}get camera(){return this._camera}get dt(){return this._dt}get time(){return this._time}}export{e as AnimationTimer};
|