@arcgis/core 4.25.0-next.20220818 → 4.25.0-next.20220821

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.
Files changed (89) hide show
  1. package/analysis/LengthDimension.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0b1d39dc063c4c3385e2.js +1 -0
  4. package/assets/esri/core/workers/chunks/{59a04f1640cd2b710028.js → 0c625803648e554f1fcf.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{50985ec72b9e4557d371.js → 0f1fae79b5311d55c0da.js} +1 -1
  6. package/assets/esri/core/workers/chunks/1a360d839c4eb83aaa02.js +1 -0
  7. package/assets/esri/core/workers/chunks/3381b5454cd530cf940a.js +1 -0
  8. package/assets/esri/core/workers/chunks/3900c702242358c5d00e.js +1 -0
  9. package/assets/esri/core/workers/chunks/43f84cb852c9ab5e742f.js +1 -0
  10. package/assets/esri/core/workers/chunks/4637bfd3deff50b03f2e.js +1 -0
  11. package/assets/esri/core/workers/chunks/4d5bdf18feeb9c8cb6ff.js +1 -0
  12. package/assets/esri/core/workers/chunks/5c2574365af4a484cd4b.js +1 -0
  13. package/assets/esri/core/workers/chunks/70179a003b5e52a99e10.js +1 -0
  14. package/assets/esri/core/workers/chunks/77a38124ef155a1b0f3e.js +1 -0
  15. package/assets/esri/core/workers/chunks/{ab0ce16ced3532f0e429.js → 81418b47acb4ef68daf7.js} +1 -1
  16. package/assets/esri/core/workers/chunks/88b5ce63c4706d0954dc.js +1 -0
  17. package/assets/esri/core/workers/chunks/{064a4baa576964efa238.js → 9809878b87595ac77dc4.js} +1 -1
  18. package/assets/esri/core/workers/chunks/9dbe94a70624a5592690.js +1 -0
  19. package/assets/esri/core/workers/chunks/{d013daa46de022f0db4d.js → a0750175b499a89fd07d.js} +1 -1
  20. package/assets/esri/core/workers/chunks/be4a8a4b2804188817b3.js +1 -0
  21. package/assets/esri/core/workers/chunks/da13db62d54cbca350c3.js +1 -0
  22. package/assets/esri/core/workers/chunks/e472e4f4a2f046846258.js +1 -0
  23. package/assets/esri/core/workers/chunks/f351cccf879ba295acbc.js +1 -0
  24. package/chunks/boundedPlane.js +1 -1
  25. package/chunks/pe.js +1 -1
  26. package/core/Identifiable.js +1 -1
  27. package/geometry/Circle.js +1 -1
  28. package/geometry/Extent.js +1 -1
  29. package/geometry/Mesh.js +1 -1
  30. package/geometry/Multipoint.js +1 -1
  31. package/geometry/Point.js +1 -1
  32. package/geometry/geometryEngine.js +1 -1
  33. package/geometry/geometryEngineAsync.js +1 -1
  34. package/geometry/projection.js +1 -1
  35. package/geometry/support/aaBoundingBox.js +1 -1
  36. package/geometry/support/boundsUtils.js +1 -1
  37. package/geometry/support/centroid.js +1 -1
  38. package/geometry/support/cut.js +1 -1
  39. package/geometry/support/extentUtils.js +1 -1
  40. package/geometry/support/geodesicUtils.js +1 -1
  41. package/geometry/support/heightModelInfoUtils.js +1 -1
  42. package/geometry/support/meshUtils/primitives.js +1 -1
  43. package/geometry/support/quantizationUtils.js +1 -1
  44. package/interfaces.d.ts +60 -84
  45. package/layers/DimensionLayer.js +1 -1
  46. package/layers/support/ExportImageServiceParameters.js +1 -1
  47. package/layers/support/imageryRendererUtils.js +1 -1
  48. package/package.json +1 -1
  49. package/renderers/support/rasterRendererHelper.js +1 -1
  50. package/support/revision.js +1 -1
  51. package/symbols/cim/CIMResourceManager.js +1 -1
  52. package/symbols/cim/cimAnalyzer.js +1 -1
  53. package/symbols/cim/quantizeTime.js +5 -0
  54. package/views/2d/engine/webgl/TextureManager.js +1 -1
  55. package/views/2d/engine/webgl/animatedFormats/AnimatableTextureResource.js +5 -0
  56. package/views/2d/engine/webgl/animatedFormats/apng.js +1 -1
  57. package/views/2d/engine/webgl/animatedFormats/gif.js +1 -1
  58. package/views/2d/engine/webgl/animatedFormats/utils.js +1 -1
  59. package/views/3d/analysis/Dimensioning/LengthDimensionComputation.js +1 -1
  60. package/views/3d/analysis/Dimensioning/LengthDimensionSubTool.js +1 -1
  61. package/views/3d/analysis/Dimensioning/LengthDimensionVisualization.js +1 -1
  62. package/views/3d/analysis/Dimensioning/lengthDimensionUtils.js +1 -1
  63. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
  64. package/views/3d/analysis/support/measurementUtils.js +1 -1
  65. package/views/3d/terrain/PlanarPatch.js +1 -1
  66. package/views/3d/terrain/SphericalPatch.js +1 -1
  67. package/views/3d/terrain/TerrainSurface.js +1 -1
  68. package/views/3d/terrain/Tile.js +1 -1
  69. package/views/3d/terrain/interfaces.js +1 -1
  70. package/views/support/geodesicLengthMeasurementUtils.js +1 -1
  71. package/widgets/Bookmarks.js +1 -1
  72. package/widgets/Search/SearchViewModel.js +1 -1
  73. package/assets/esri/core/workers/chunks/229bfbf3faa789f40b7e.js +0 -1
  74. package/assets/esri/core/workers/chunks/2e715520e5badbe570ac.js +0 -1
  75. package/assets/esri/core/workers/chunks/40098b3be512ad8461f8.js +0 -1
  76. package/assets/esri/core/workers/chunks/420ae87ba8dc74fd05f5.js +0 -1
  77. package/assets/esri/core/workers/chunks/46c836fc575251f1ff34.js +0 -1
  78. package/assets/esri/core/workers/chunks/481532ce4871b0d94587.js +0 -1
  79. package/assets/esri/core/workers/chunks/5fa78a6745ef14c7c4d1.js +0 -1
  80. package/assets/esri/core/workers/chunks/606f45a93c707054c521.js +0 -1
  81. package/assets/esri/core/workers/chunks/78e59b29e59b10f64aa9.js +0 -1
  82. package/assets/esri/core/workers/chunks/7be7c53727cb1bc73a64.js +0 -1
  83. package/assets/esri/core/workers/chunks/8d3fba983c360e1fdabf.js +0 -1
  84. package/assets/esri/core/workers/chunks/a69d194526bdc489b30b.js +0 -1
  85. package/assets/esri/core/workers/chunks/b59855826d235cba0889.js +0 -1
  86. package/assets/esri/core/workers/chunks/bff5812e3797c8e42ac0.js +0 -1
  87. package/assets/esri/core/workers/chunks/d6e177749bde46ab57fc.js +0 -1
  88. package/assets/esri/core/workers/chunks/d9c8a8bed6b34ed57faf.js +0 -1
  89. package/views/2d/engine/webgl/animatedFormats/BaseAnimatableTextureResource.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{getPointsBounds as n,getRingsOrPathsBounds as i}from"./boundsUtils.js";function t(n){return void 0!==n.xmin&&void 0!==n.ymin&&void 0!==n.xmax&&void 0!==n.ymax}function u(n){return void 0!==n.points}function m(n){return void 0!==n.x&&void 0!==n.y}function o(n){return void 0!==n.paths}function r(n){return void 0!==n.rings}const x=[];function a(n,i,t,u){return{xmin:n,ymin:i,xmax:t,ymax:u}}function c(n,i,t,u,m,o){return{xmin:n,ymin:i,zmin:t,xmax:u,ymax:m,zmax:o}}function s(n,i,t,u,m,o){return{xmin:n,ymin:i,mmin:t,xmax:u,ymax:m,mmax:o}}function e(n,i,t,u,m,o,r,x){return{xmin:n,ymin:i,zmin:t,mmin:u,xmax:m,ymax:o,zmax:r,mmax:x}}function f(n,i=!1,t=!1){return i?t?e(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]):c(n[0],n[1],n[2],n[3],n[4],n[5]):t?s(n[0],n[1],n[2],n[3],n[4],n[5]):a(n[0],n[1],n[2],n[3])}function l(n){return n?t(n)?n:m(n)?d(n):r(n)?v(n):o(n)?h(n):u(n)?y(n):null:null}function y(i){const{hasZ:t,hasM:u,points:m}=i;return f(n(x,m,t,u),t,u)}function d(n){const{x:i,y:t,z:u,m}=n,o=null!=m;return null!=u?o?e(i,t,u,m,i,t,u,m):c(i,t,u,i,t,u):o?s(i,t,m,i,t,m):a(i,t,i,t)}function v(n){const{hasZ:t,hasM:u,rings:m}=n,o=i(x,m,t,u);return o?f(o,t,u):null}function h(n){const{hasZ:t,hasM:u,paths:m}=n,o=i(x,m,t,u);return o?f(o,t,u):null}export{l as getGeometryExtent,y as getMultipointExtent,d as getPointExtent,v as getPolygonExtent,h as getPolylineExtent};
5
+ import{getPointsBounds as n,getRingsOrPathsBounds as i}from"./boundsUtils.js";function t(n){return void 0!==n.xmin&&void 0!==n.ymin&&void 0!==n.xmax&&void 0!==n.ymax}function u(n){return void 0!==n.points}function m(n){return void 0!==n.x&&void 0!==n.y}function o(n){return void 0!==n.paths}function r(n){return void 0!==n.rings}const x=[];function a(n,i,t,u){return{xmin:n,ymin:i,xmax:t,ymax:u}}function c(n,i,t,u,m,o){return{xmin:n,ymin:i,zmin:t,xmax:u,ymax:m,zmax:o}}function s(n,i,t,u,m,o){return{xmin:n,ymin:i,mmin:t,xmax:u,ymax:m,mmax:o}}function e(n,i,t,u,m,o,r,x){return{xmin:n,ymin:i,zmin:t,mmin:u,xmax:m,ymax:o,zmax:r,mmax:x}}function f(n,i=!1,t=!1){return i?t?e(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]):c(n[0],n[1],n[2],n[3],n[4],n[5]):t?s(n[0],n[1],n[2],n[3],n[4],n[5]):a(n[0],n[1],n[2],n[3])}function l(n){return n?t(n)?n:m(n)?d(n):r(n)?v(n):o(n)?h(n):u(n)?y(n):null:null}function y(i){const{hasZ:t,hasM:u,points:m}=i;return f(n(x,m,t??!1,u??!1),t,u)}function d(n){const{x:i,y:t,z:u,m}=n,o=null!=m;return null!=u?o?e(i,t,u,m,i,t,u,m):c(i,t,u,i,t,u):o?s(i,t,m,i,t,m):a(i,t,i,t)}function v(n){const{hasZ:t,hasM:u,rings:m}=n,o=i(x,m,t??!1,u??!1);return o?f(o,t,u):null}function h(n){const{hasZ:t,hasM:u,paths:m}=n,o=i(x,m,t??!1,u??!1);return o?f(o,t,u):null}export{l as getGeometryExtent,y as getMultipointExtent,d as getPointExtent,v as getPolygonExtent,h as getPolylineExtent};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import"../../geometry.js";import e from"../../core/Error.js";import{convertUnit as t}from"../../core/unitUtils.js";import{toRadians as n,spheroids as i,WKT_SPHEROID_REGEX as s}from"./geodesicConstants.js";import{equals as a,isGeographic as r}from"./spatialReferenceUtils.js";import o from"../Polyline.js";import c from"../Polygon.js";import l from"../Point.js";import h from"../SpatialReference.js";function f(e){if(!e)return null;if(r(e)&&e.wkid){const t=i[e.wkid];if(t)return t}if(e.wkt){const t=p(e.wkt);if(t)return t}return null}function p(e){const t=s.exec(e);if(!t||2!==t.length)return null;const n=t[1].split(",");if(!n||n.length<3)return null;const i=parseFloat(n[1]),a=parseFloat(n[2]);if(isNaN(i)||isNaN(a))return null;return{a:i,f:0===a?0:1/a}}function u(e){const t=f(e||h.WGS84);if(d(t))return t;const n=t.a*(1-t.f);return Object.assign(t,{b:n,eSq:1-(n/t.a)**2,radius:(2*t.a+n)/3,densificationRatio:1e4/((2*t.a+n)/3)})}function d(e){return"b"in e&&"eSq"in e&&"radius"in e}function m(e){return e<0?e+360:e}function g(e,t,i){const{a:s,eSq:a}=u(i),r=Math.sqrt(a),o=Math.sin(t[1]*n),c=s*t[0]*n;let l;if(a>0){l=s*((1-a)*(o/(1-a*(o*o))-1/(2*r)*Math.log((1-r*o)/(1+r*o))))*.5}else l=s*o;return e[0]=c,e[1]=l,e}function M(e){return null!==f(e)}function w(n,i="square-meters"){if(n.some((e=>!M(e.spatialReference))))throw new e("geodesic-areas:invalid-spatial-reference","the input geometries spatial reference is not supported");const s=[];for(let e=0;e<n.length;e++){const t=n[e],i=t.spatialReference,{radius:a,densificationRatio:r}=u(i),o=a*r;s.push(R(t,o))}const a=[],r=[0,0],o=[0,0];for(let e=0;e<s.length;e++){const{rings:n,spatialReference:c}=s[e];let l=0;for(let e=0;e<n.length;e++){const t=n[e];g(r,t[0],c),g(o,t[t.length-1],c);let i=o[0]*r[1]-r[0]*o[1];for(let e=0;e<t.length-1;e++)g(r,t[e+1],c),g(o,t[e],c),i+=o[0]*r[1]-r[0]*o[1];l+=i}l=t(l,"square-meters",i),a.push(l/-2)}return a}function y(n,i="meters"){if(!n)throw new e("geodesic-lengths:invalid-geometries","the input geometries type is not supported");if(n.some((e=>!M(e.spatialReference))))throw new e("geodesic-lengths:invalid-spatial-reference","the input geometries spatial reference is not supported");const s=[];for(let e=0;e<n.length;e++){const a=n[e],{spatialReference:r}=a,o="polyline"===a.type?a.paths:a.rings;let c=0;for(let e=0;e<o.length;e++){const t=o[e];let n=0;for(let e=1;e<t.length;e++){const i=t[e-1][0],s=t[e][0],a=t[e-1][1],o=t[e][1];if(a!==o||i!==s){const e={distance:null};z(e,[i,a],[s,o],r),n+=e.distance}}c+=n}c=t(c,"meters",i),s.push(c)}return s}function R(t,n){if("polyline"!==t.type&&"polygon"!==t.type)throw new e("geodesic-densify:invalid-geometry","the input geometry is neither polyline nor polygon");const{spatialReference:i}=t;if(!M(i))throw new e("geodesic-densify:invalid-spatial-reference","the input geometry spatial reference is not supported");const s="polyline"===t.type?t.paths:t.rings,a=[],r=[0,0],l={distance:null};for(const e of s){const t=[];a.push(t),t.push([e[0][0],e[0][1]]);let s,o,c=e[0][0],h=e[0][1];for(let a=0;a<e.length-1;a++){if(s=e[a+1][0],o=e[a+1][1],c===s&&h===o)continue;const f=[c,h];z(l,[c,h],[s,o],i);const{azimuth:p,distance:u}=l,d=u/n;if(d>1){for(let e=1;e<=d-1;e++){v(r,f,p,e*n,i),t.push(r.slice(0))}v(r,f,p,(u+Math.floor(d-1)*n)/2,i),t.push(r.slice(0))}v(r,f,p,u,i),t.push(r.slice(0)),c=r[0],h=r[1]}}return"polyline"===t.type?new o({paths:a,spatialReference:i}):new c({rings:a,spatialReference:i})}function v(e,t,i,s,a){const r=t[0],o=t[1],c=r*n,l=o*n,h=i*n,{a:f,b:p,f:d}=u(a),m=Math.sin(h),g=Math.cos(h),M=(1-d)*Math.tan(l),w=1/Math.sqrt(1+M*M),y=M*w,R=Math.atan2(M,g),v=w*m,z=v*v,b=1-z,j=b*(f*f-p*p)/(p*p),q=1+j/16384*(4096+j*(j*(320-175*j)-768)),x=j/1024*(256+j*(j*(74-47*j)-128));let A,N,S,k,P=s/(p*q),F=2*Math.PI;for(;Math.abs(P-F)>1e-12;)S=Math.cos(2*R+P),A=Math.sin(P),N=Math.cos(P),k=x*A*(S+x/4*(N*(2*S*S-1)-x/6*S*(4*A*A-3)*(4*S*S-3))),F=P,P=s/(p*q)+k;const U=y*A-w*N*g,C=Math.atan2(y*N+w*A*g,(1-d)*Math.sqrt(z+U*U)),E=Math.atan2(A*m,w*N-y*A*g),G=d/16*b*(4+d*(4-3*b)),I=C/n,O=(c+(E-(1-G)*d*v*(P+G*A*(S+G*N*(2*S*S-1)))))/n;return e[0]=O,e[1]=I,e}function z(e,t,i,s){const a=t[0]*n,r=t[1]*n,o=i[0]*n,c=i[1]*n,{a:l,b:h,f,radius:p}=u(s),d=o-a,m=Math.atan((1-f)*Math.tan(r)),g=Math.atan((1-f)*Math.tan(c)),M=Math.sin(m),w=Math.cos(m),y=Math.sin(g),R=Math.cos(g);let v,z,b,j,q,x,A,N,S,k,P=1e3,F=d;do{if(A=Math.sin(F),N=Math.cos(F),b=Math.sqrt(R*A*(R*A)+(w*y-M*R*N)*(w*y-M*R*N)),0===b)return e.distance=0,e.azimuth=void 0,e.reverseAzimuth=void 0,e;q=M*y+w*R*N,x=Math.atan2(b,q),S=w*R*A/b,z=1-S*S,j=q-2*M*y/z,isNaN(j)&&(j=0),k=f/16*z*(4+f*(4-3*z)),v=F,F=d+(1-k)*f*S*(x+k*b*(j+k*q*(2*j*j-1)))}while(Math.abs(F-v)>1e-12&&--P>0);if(0===P){const t=p,i=Math.acos(Math.sin(r)*Math.sin(c)+Math.cos(r)*Math.cos(c)*Math.cos(o-a))*t,s=o-a,l=Math.sin(s)*Math.cos(c),h=Math.cos(r)*Math.sin(c)-Math.sin(r)*Math.cos(c)*Math.cos(s),f=Math.atan2(l,h);return e.azimuth=f/n,e.distance=i,e.reverseAzimuth=void 0,e}const U=z*(l*l-h*h)/(h*h),C=U/1024*(256+U*(U*(74-47*U)-128)),E=h*(1+U/16384*(4096+U*(U*(320-175*U)-768)))*(x-C*b*(j+C/4*(q*(2*j*j-1)-C/6*j*(4*b*b-3)*(4*j*j-3)))),G=Math.atan2(R*Math.sin(F),w*y-M*R*Math.cos(F)),I=Math.atan2(w*Math.sin(F),w*y*Math.cos(F)-M*R);return e.azimuth=G/n,e.distance=E,e.reverseAzimuth=I/n,e}function b(n,i,s="meters"){if(!n||!i)throw new e("geodesic-distance:missing-parameters","one or both input parameters are missing");if(!n.spatialReference||!i.spatialReference)throw new e("geodesic-distance:invalid-parameters","one or both input points do not have a spatial reference");if(!a(n.spatialReference,i.spatialReference))throw new e("geodesic-distance:invalid-parameters","spatial references of input parameters do not match");const{spatialReference:r}=n;if(!M(r))throw new e("geodesic-distance:not-supported","input geometry spatial reference is not supported");if(n.x===i.x&&n.y===i.y)return{distance:0,azimuth:0,reverseAzimuth:0};const o={distance:null};return z(o,[n.x,n.y],[i.x,i.y],r),o.distance=t(o.distance,"meters",s),o.azimuth=m(o.azimuth),o.reverseAzimuth=m(o.reverseAzimuth),o}function j(t,n,i){if(!t||null==n||null==i)throw new e("point-from-distance:missing-parameters","one or more input parameters are missing or undefined");if(i<0||i>360)throw new e("point-from-distance:-of-bounds","azimuth is restricted to angles between, and including, 0° to 360° degrees");if(!t.spatialReference)throw new e("point-from-distance:missing-spatial-reference","the input point must have a spatial reference");const{spatialReference:s}=t;if(!M(s))throw new e("geodesic-distance:not-supported","input geometry spatial reference is not supported");const a=[0,0];return v(a,[t.x,t.y],i,n,s),new l({x:a[0],y:a[1],spatialReference:s})}export{v as directGeodeticSolver,w as geodesicAreas,R as geodesicDensify,b as geodesicDistance,y as geodesicLengths,z as inverseGeodeticSolver,M as isSupported,j as pointFromDistance};
5
+ import"../../geometry.js";import e from"../../core/Error.js";import{convertUnit as t}from"../../core/unitUtils.js";import{toRadians as n,spheroids as i,WKT_SPHEROID_REGEX as s}from"./geodesicConstants.js";import{equals as r,isGeographic as a}from"./spatialReferenceUtils.js";import o from"../Polyline.js";import c from"../Polygon.js";import h from"../Point.js";import l from"../SpatialReference.js";function f(e){if(!e)return null;if(a(e)&&e.wkid){const t=i[e.wkid];if(t)return t}if(e.wkt){const t=p(e.wkt);if(t)return t}return null}function p(e){const t=s.exec(e);if(!t||2!==t.length)return null;const n=t[1].split(",");if(!n||n.length<3)return null;const i=parseFloat(n[1]),r=parseFloat(n[2]);if(isNaN(i)||isNaN(r))return null;return{a:i,f:0===r?0:1/r}}function u(e){const t=f(e??l.WGS84);if(m(t))return t;const n=t.a*(1-t.f);return Object.assign(t,{b:n,eSq:1-(n/t.a)**2,radius:(2*t.a+n)/3,densificationRatio:1e4/((2*t.a+n)/3)})}function m(e){return null!=e&&"b"in e&&"eSq"in e&&"radius"in e}function d(e){return null!=e&&e<0?e+360:e}function g(e,t,i){const{a:s,eSq:r}=u(i),a=Math.sqrt(r),o=Math.sin(t[1]*n),c=s*t[0]*n;let h;if(r>0){h=s*((1-r)*(o/(1-r*(o*o))-1/(2*a)*Math.log((1-a*o)/(1+a*o))))*.5}else h=s*o;return e[0]=c,e[1]=h,e}function M(e){return null!==f(e)}function w(n,i="square-meters"){if(n.some((e=>!M(e.spatialReference))))throw new e("geodesic-areas:invalid-spatial-reference","the input geometries spatial reference is not supported");const s=[];for(let e=0;e<n.length;e++){const t=n[e],i=t.spatialReference,{radius:r,densificationRatio:a}=u(i),o=r*a;s.push(R(t,o))}const r=[],a=[0,0],o=[0,0];for(let e=0;e<s.length;e++){const{rings:n,spatialReference:c}=s[e];let h=0;for(let e=0;e<n.length;e++){const t=n[e];g(a,t[0],c),g(o,t[t.length-1],c);let i=o[0]*a[1]-a[0]*o[1];for(let e=0;e<t.length-1;e++)g(a,t[e+1],c),g(o,t[e],c),i+=o[0]*a[1]-a[0]*o[1];h+=i}h=t(h,"square-meters",i),r.push(h/-2)}return r}function y(n,i="meters"){if(!n)throw new e("geodesic-lengths:invalid-geometries","the input geometries type is not supported");if(n.some((e=>!M(e.spatialReference))))throw new e("geodesic-lengths:invalid-spatial-reference","the input geometries spatial reference is not supported");const s=[];for(let e=0;e<n.length;e++){const r=n[e],{spatialReference:a}=r,o="polyline"===r.type?r.paths:r.rings;let c=0;for(let e=0;e<o.length;e++){const t=o[e];let n=0;for(let e=1;e<t.length;e++){const i=t[e-1][0],s=t[e][0],r=t[e-1][1],o=t[e][1];if(r!==o||i!==s){const e=new v;b(e,[i,r],[s,o],a),n+=e.distance}}c+=n}c=t(c,"meters",i),s.push(c)}return s}function R(t,n){if("polyline"!==t.type&&"polygon"!==t.type)throw new e("geodesic-densify:invalid-geometry","the input geometry is neither polyline nor polygon");const{spatialReference:i}=t;if(!M(i))throw new e("geodesic-densify:invalid-spatial-reference","the input geometry spatial reference is not supported");const s="polyline"===t.type?t.paths:t.rings,r=[],a=[0,0],h=new v;for(const e of s){const t=[];r.push(t),t.push([e[0][0],e[0][1]]);let s,o,c=e[0][0],l=e[0][1];for(let r=0;r<e.length-1;r++){if(s=e[r+1][0],o=e[r+1][1],c===s&&l===o)continue;const f=[c,l];b(h,[c,l],[s,o],i);const{azimuth:p,distance:u}=h,m=u/n;if(m>1){for(let e=1;e<=m-1;e++){z(a,f,p,e*n,i),t.push(a.slice(0))}z(a,f,p,(u+Math.floor(m-1)*n)/2,i),t.push(a.slice(0))}z(a,f,p,u,i),t.push(a.slice(0)),c=a[0],l=a[1]}}return"polyline"===t.type?new o({paths:r,spatialReference:i}):new c({rings:r,spatialReference:i})}class v{constructor(e=0,t,n){this.distance=e,this.azimuth=t,this.reverseAzimuth=n}}function z(e,t,i,s,r){const a=t[0],o=t[1],c=a*n,h=o*n,l=(i??0)*n,{a:f,b:p,f:m}=u(r),d=Math.sin(l),g=Math.cos(l),M=(1-m)*Math.tan(h),w=1/Math.sqrt(1+M*M),y=M*w,R=Math.atan2(M,g),v=w*d,z=v*v,b=1-z,j=b*(f*f-p*p)/(p*p),q=1+j/16384*(4096+j*(j*(320-175*j)-768)),x=j/1024*(256+j*(j*(74-47*j)-128));let A,N,S,k,P=s/(p*q),F=2*Math.PI;for(;Math.abs(P-F)>1e-12;)S=Math.cos(2*R+P),A=Math.sin(P),N=Math.cos(P),k=x*A*(S+x/4*(N*(2*S*S-1)-x/6*S*(4*A*A-3)*(4*S*S-3))),F=P,P=s/(p*q)+k;const U=y*A-w*N*g,C=Math.atan2(y*N+w*A*g,(1-m)*Math.sqrt(z+U*U)),E=Math.atan2(A*d,w*N-y*A*g),G=m/16*b*(4+m*(4-3*b)),I=C/n,O=(c+(E-(1-G)*m*v*(P+G*A*(S+G*N*(2*S*S-1)))))/n;return e[0]=O,e[1]=I,e}function b(e,t,i,s){const r=t[0]*n,a=t[1]*n,o=i[0]*n,c=i[1]*n,{a:h,b:l,f,radius:p}=u(s),m=o-r,d=Math.atan((1-f)*Math.tan(a)),g=Math.atan((1-f)*Math.tan(c)),M=Math.sin(d),w=Math.cos(d),y=Math.sin(g),R=Math.cos(g);let v,z,b,j,q,x,A,N,S,k,P=1e3,F=m;do{if(A=Math.sin(F),N=Math.cos(F),b=Math.sqrt(R*A*(R*A)+(w*y-M*R*N)*(w*y-M*R*N)),0===b)return e.distance=0,e.azimuth=void 0,e.reverseAzimuth=void 0,e;q=M*y+w*R*N,x=Math.atan2(b,q),S=w*R*A/b,z=1-S*S,j=q-2*M*y/z,isNaN(j)&&(j=0),k=f/16*z*(4+f*(4-3*z)),v=F,F=m+(1-k)*f*S*(x+k*b*(j+k*q*(2*j*j-1)))}while(Math.abs(F-v)>1e-12&&--P>0);if(0===P){const t=p,i=Math.acos(Math.sin(a)*Math.sin(c)+Math.cos(a)*Math.cos(c)*Math.cos(o-r))*t,s=o-r,h=Math.sin(s)*Math.cos(c),l=Math.cos(a)*Math.sin(c)-Math.sin(a)*Math.cos(c)*Math.cos(s),f=Math.atan2(h,l);return e.azimuth=f/n,e.distance=i,e.reverseAzimuth=void 0,e}const U=z*(h*h-l*l)/(l*l),C=U/1024*(256+U*(U*(74-47*U)-128)),E=l*(1+U/16384*(4096+U*(U*(320-175*U)-768)))*(x-C*b*(j+C/4*(q*(2*j*j-1)-C/6*j*(4*b*b-3)*(4*j*j-3)))),G=Math.atan2(R*Math.sin(F),w*y-M*R*Math.cos(F)),I=Math.atan2(w*Math.sin(F),w*y*Math.cos(F)-M*R);return e.azimuth=G/n,e.distance=E,e.reverseAzimuth=I/n,e}function j(n,i,s="meters"){if(!n||!i)throw new e("geodesic-distance:missing-parameters","one or both input parameters are missing");if(!n.spatialReference||!i.spatialReference)throw new e("geodesic-distance:invalid-parameters","one or both input points do not have a spatial reference");if(!r(n.spatialReference,i.spatialReference))throw new e("geodesic-distance:invalid-parameters","spatial references of input parameters do not match");const{spatialReference:a}=n;if(!M(a))throw new e("geodesic-distance:not-supported","input geometry spatial reference is not supported");if(n.x===i.x&&n.y===i.y)return new v(0,0,0);const o=new v;return b(o,[n.x,n.y],[i.x,i.y],a),o.distance=t(o.distance,"meters",s),o.azimuth=d(o.azimuth),o.reverseAzimuth=d(o.reverseAzimuth),o}function q(t,n,i){if(!t||null==n||null==i)throw new e("point-from-distance:missing-parameters","one or more input parameters are missing or undefined");if(i<0||i>360)throw new e("point-from-distance:-of-bounds","azimuth is restricted to angles between, and including, 0° to 360° degrees");if(!t.spatialReference)throw new e("point-from-distance:missing-spatial-reference","the input point must have a spatial reference");const{spatialReference:s}=t;if(!M(s))throw new e("geodesic-distance:not-supported","input geometry spatial reference is not supported");const r=[0,0];return z(r,[t.x,t.y],i,n,s),new h({x:r[0],y:r[1],spatialReference:s})}export{v as InverseGeodeticSolverResult,z as directGeodeticSolver,w as geodesicAreas,R as geodesicDensify,j as geodesicDistance,y as geodesicLengths,b as inverseGeodeticSolver,M as isSupported,q as pointFromDistance};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import"../../core/has.js";import e from"../../core/Error.js";import{isSome as t}from"../../core/maybe.js";import n from"../HeightModelInfo.js";import{parse as i}from"../../layers/support/arcgisLayerUrl.js";function r(t,i){if(!t)return null;if(!c(t))return new e("webscene:unsupported-height-model-info","The vertical coordinate system of the scene is not supported",{heightModelInfo:t});const r=t.heightUnit,o=n.deriveUnitFromSR(t,i).heightUnit;return r!==o?new e("webscene:incompatible-height-unit",`The vertical units of the scene (${r}) must match the horizontal units of the scene (${o})`,{verticalUnit:r,horizontalUnit:o}):null}function o(t,i,r){const o=h(t),c=i,u=a(o,c,r);if(o){const i=n.deriveUnitFromSR(o,t.spatialReference).heightUnit;if(!r&&i!==o.heightUnit){const t=new e("layerview:unmatched-height-unit",`The vertical units of the layer must match the horizontal units (${i})`,{horizontalUnit:i});return new e("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:o,error:t})}}if(!l(t)||u===s.Unsupported)return new e("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:o});switch(u){case s.Units:{const t=o.heightUnit||"unknown",n=c.heightUnit||"unknown",i=new e("layerview:incompatible-height-unit",`The vertical units of the layer (${t}) must match the vertical units of the scene (${n})`,{layerUnit:t,sceneUnit:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:c,error:i})}case s.HeightModel:{const t=o.heightModel||"unknown",n=c.heightModel||"unknown",i=new e("layerview:incompatible-height-model",`The height model of the layer (${t}) must match the height model of the scene (${n})`,{layerHeightModel:t,sceneHeightModel:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:c,error:i})}case s.CRS:{const t=o.vertCRS||"unknown",n=c.vertCRS||"unknown",i=new e("layerview:incompatible-vertical-datum",`The vertical datum of the layer (${t}) must match the vertical datum of the scene (${n})`,{layerDatum:t,sceneDatum:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:c,error:i})}}return null}function a(e,t,n){if(!c(e)||!c(t))return s.Unsupported;if(null==e||null==t)return s.Ok;if(!n&&e.heightUnit!==t.heightUnit)return s.Units;if(e.heightModel!==t.heightModel)return s.HeightModel;switch(e.heightModel){case"gravity-related-height":return s.Ok;case"ellipsoidal":return e.vertCRS===t.vertCRS?s.Ok:s.CRS;default:return s.Unsupported}}var s;function c(e){return null==e||null!=e.heightModel&&null!=e.heightUnit}function l(e){return"heightModelInfo"in e&&null!=e.heightModelInfo||null!=e.spatialReference||!f(e)}function h(e){const r=e.url&&i(e.url);return!(null==(e.spatialReference&&e.spatialReference.vcsWkid)&&t(r)&&"ImageServer"===r.serverType)&&u(e)&&e.heightModelInfo?e.heightModelInfo:f(e)?n.deriveUnitFromSR(p,e.spatialReference):null}function u(e){return"heightModelInfo"in e}function d(e){if("unknown"===e.type||!("capabilities"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"subtype-group":case"ogc-feature":case"wfs":return!0;default:return!1}}function f(e){return d(e)?!!(e.capabilities&&e.capabilities.data&&e.capabilities.data.supportsZ):m(e)}function g(e){return null!=e.layers||m(e)||d(e)||u(e)}function m(e){switch(e.type){case"building-scene":case"elevation":case"integrated-mesh":case"point-cloud":case"scene":case"voxel":return!0;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"csv":case"dimension":case"geojson":case"feature":case"subtype-group":case"geo-rss":case"graphics":case"group":case"imagery":case"imagery-tile":case"kml":case"line-of-sight":case"map-image":case"map-notes":case"media":case"ogc-feature":case"open-street-map":case"route":case"stream":case"tile":case"unknown":case"unsupported":case"vector-tile":case"wcs":case"web-tile":case"wfs":case"wms":case"wmts":case null:return!1}return!1}!function(e){e[e.Ok=0]="Ok",e[e.Units=1]="Units",e[e.HeightModel=2]="HeightModel",e[e.CRS=3]="CRS",e[e.Unsupported=4]="Unsupported"}(s||(s={}));const p=new n({heightModel:"gravity-related-height"});export{h as deriveHeightModelInfoFromLayer,o as rejectLayerError,g as supportsHeightModelInfo,r as validateWebSceneError};
5
+ import"../../core/has.js";import e from"../../core/Error.js";import{isSome as t}from"../../core/maybe.js";import n from"../HeightModelInfo.js";import{parse as i}from"../../layers/support/arcgisLayerUrl.js";function o(t,i){if(!t)return null;if(!c(t))return new e("webscene:unsupported-height-model-info","The vertical coordinate system of the scene is not supported",{heightModelInfo:t});const o=t.heightUnit,r=n.deriveUnitFromSR(t,i).heightUnit;return o!==r?new e("webscene:incompatible-height-unit",`The vertical units of the scene (${o}) must match the horizontal units of the scene (${r})`,{verticalUnit:o,horizontalUnit:r}):null}function r(t,i,o){const r=h(t),c=i,u=a(r,c,o);if(r){const i=n.deriveUnitFromSR(r,t.spatialReference).heightUnit;if(!o&&i!==r.heightUnit){const t=new e("layerview:unmatched-height-unit",`The vertical units of the layer must match the horizontal units (${i})`,{horizontalUnit:i});return new e("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:r,error:t})}}if(!l(t)||u===s.Unsupported)return new e("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:r});switch(u){case s.Units:{const t=r?.heightUnit||"unknown",n=c?.heightUnit||"unknown",i=new e("layerview:incompatible-height-unit",`The vertical units of the layer (${t}) must match the vertical units of the scene (${n})`,{layerUnit:t,sceneUnit:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:r,sceneHeightModelInfo:c,error:i})}case s.HeightModel:{const t=r?.heightModel||"unknown",n=c?.heightModel||"unknown",i=new e("layerview:incompatible-height-model",`The height model of the layer (${t}) must match the height model of the scene (${n})`,{layerHeightModel:t,sceneHeightModel:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:r,sceneHeightModelInfo:c,error:i})}case s.CRS:{const t=r?.vertCRS||"unknown",n=c?.vertCRS||"unknown",i=new e("layerview:incompatible-vertical-datum",`The vertical datum of the layer (${t}) must match the vertical datum of the scene (${n})`,{layerDatum:t,sceneDatum:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:r,sceneHeightModelInfo:c,error:i})}}return null}function a(e,t,n){if(!c(e)||!c(t))return s.Unsupported;if(null==e||null==t)return s.Ok;if(!n&&e.heightUnit!==t.heightUnit)return s.Units;if(e.heightModel!==t.heightModel)return s.HeightModel;switch(e.heightModel){case"gravity-related-height":return s.Ok;case"ellipsoidal":return e.vertCRS===t.vertCRS?s.Ok:s.CRS;default:return s.Unsupported}}var s;function c(e){return null==e||null!=e.heightModel&&null!=e.heightUnit}function l(e){return"heightModelInfo"in e&&null!=e.heightModelInfo||null!=e.spatialReference||!f(e)}function h(e){const o=e.url?i(e.url):void 0,r=e.spatialReference?.vcsWkid;return!(null==r&&t(o)&&"ImageServer"===o.serverType)&&u(e)&&e.heightModelInfo?e.heightModelInfo:f(e)?n.deriveUnitFromSR(p,e.spatialReference):null}function u(e){return"heightModelInfo"in e}function d(e){if("unknown"===e.type||!("capabilities"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"subtype-group":case"ogc-feature":case"wfs":return!0;default:return!1}}function f(e){return d(e)?!!(e.capabilities&&e.capabilities.data&&e.capabilities.data.supportsZ):m(e)}function g(e){return null!=e.layers||m(e)||d(e)||u(e)}function m(e){switch(e.type){case"building-scene":case"elevation":case"integrated-mesh":case"point-cloud":case"scene":case"voxel":return!0;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"csv":case"dimension":case"geojson":case"feature":case"subtype-group":case"geo-rss":case"graphics":case"group":case"imagery":case"imagery-tile":case"kml":case"line-of-sight":case"map-image":case"map-notes":case"media":case"ogc-feature":case"open-street-map":case"route":case"stream":case"tile":case"unknown":case"unsupported":case"vector-tile":case"wcs":case"web-tile":case"wfs":case"wms":case"wmts":case null:return!1}return!1}!function(e){e[e.Ok=0]="Ok",e[e.Units=1]="Units",e[e.HeightModel=2]="HeightModel",e[e.CRS=3]="CRS",e[e.Unsupported=4]="Unsupported"}(s||(s={}));const p=new n({heightModel:"gravity-related-height"});export{h as deriveHeightModelInfoFromLayer,r as rejectLayerError,g as supportsHeightModelInfo,o as validateWebSceneError};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as t}from"../../../core/maybe.js";import{c as e}from"../../../chunks/mat3f64.js";import{t as n,n as r}from"../../../chunks/vec3.js";import{c as o}from"../../../chunks/vec3f64.js";import s from"../MeshComponent.js";import{MeshVertexAttributes as a}from"../MeshVertexAttributes.js";import{georeferenceByTransform as i}from"./georeference.js";function c(){const{faceDescriptions:t,faceVertexOffsets:e,uvScales:n}=d,r=4*t.length,o=new Float64Array(3*r),s=new Float32Array(3*r),a=new Float32Array(2*r),i=new Uint32Array(2*t.length*3);let c=0,l=0,f=0,u=0;for(let h=0;h<t.length;h++){const r=t[h],p=c/3;for(const t of e)i[u++]=p+t;const m=r.corners;for(let t=0;t<4;t++){const e=m[t];let i=0;a[f++]=.25*n[t][0]+r.uvOrigin[0],a[f++]=r.uvOrigin[1]-.25*n[t][1];for(let t=0;t<3;t++)0!==r.axis[t]?(o[c++]=.5*r.axis[t],s[l++]=r.axis[t]):(o[c++]=.5*e[i++],s[l++]=0)}}return{position:o,normal:s,uv:a,faces:i}}function l(e,n){const r=e.components[0],o=r.faces,a=M[n],i=6*a,c=new Uint32Array(6),l=new Uint32Array(o.length-6);let f=0,u=0;for(let t=0;t<o.length;t++)t>=i&&t<i+6?c[f++]=o[t]:l[u++]=o[t];if(t(e.vertexAttributes.uv)){const t=new Float32Array(e.vertexAttributes.uv),n=4*a*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new s({faces:c,material:r.material}),new s({faces:l})],e}function f(t=0){const e=Math.round(8*2**t),n=2*e,r=(e-1)*(n+1)+2*n,o=new Float64Array(3*r),s=new Float32Array(3*r),a=new Float32Array(2*r),i=new Uint32Array(3*((e-1)*n*2));let c=0,l=0,f=0,u=0;for(let h=0;h<=e;h++){const t=h/e*Math.PI+.5*Math.PI,r=Math.cos(t),p=Math.sin(t);F[2]=p;const m=0===h||h===e,w=m?n-1:n;for(let v=0;v<=w;v++){const t=v/w*2*Math.PI;F[0]=-Math.sin(t)*r,F[1]=Math.cos(t)*r;for(let e=0;e<3;e++)o[c]=.5*F[e],s[c]=F[e],++c;a[l++]=(v+(m?.5:0))/n,a[l++]=h/e,0!==h&&v!==n&&(h!==e&&(i[f++]=u,i[f++]=u+1,i[f++]=u-n),1!==h&&(i[f++]=u,i[f++]=u-n,i[f++]=u-n-1)),u++}}return{position:o,normal:s,uv:a,faces:i}}function u(t=0){const e=5,n=Math.round(16*2**t),r=(e-1)*(n+1)+2*n,o=new Float64Array(3*r),s=new Float32Array(3*r),a=new Float32Array(2*r),i=new Uint32Array(3*(4*n));let c=0,l=0,f=0,u=0,h=0;for(let p=0;p<=e;p++){const t=0===p||p===e,r=p<=1||p>=e-1,m=2===p||4===p,w=t?n-1:n;for(let v=0;v<=w;v++){const g=v/w*2*Math.PI,A=t?0:.5;F[0]=A*Math.sin(g),F[1]=A*-Math.cos(g),F[2]=p<=2?.5:-.5;for(let t=0;t<3;t++)o[c++]=F[t],s[l++]=r?2===t?p<=1?1:-1:0:2===t?0:F[t]/A;a[f++]=(v+(t?.5:0))/n,a[f++]=p<=1?1*p/3:p<=3?1*(p-2)/3+1/3:1*(p-4)/3+2/3,m||0===p||v===n||(p!==e&&(i[u++]=h,i[u++]=h+1,i[u++]=h-n),1!==p&&(i[u++]=h,i[u++]=h-n,i[u++]=h-n-1)),h++}}return{position:o,normal:s,uv:a,faces:i}}function h(t,e){const n="number"==typeof e?e:null!=e?e.width:1,r="number"==typeof e?e:null!=e?e.height:1;switch(t){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}function p(t){const e=g.facingAxisOrderSwap[t],n=g.position,r=g.normal,o=new Float64Array(n.length),s=new Float32Array(r.length);let a=0;for(let i=0;i<4;i++){const t=a;for(let i=0;i<3;i++){const c=e[i],l=Math.abs(c)-1,f=c>=0?1:-1;o[a]=n[t+l]*f,s[a]=r[t+l]*f,a++}}return{position:o,normal:s,uv:new Float32Array(g.uv),faces:new Uint32Array(g.faces),isPlane:!0}}const m=1,w=2,v=3,g={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[v,m,w],west:[-v,-m,w],north:[-m,v,w],south:[m,-v,w],up:[m,w,v],down:[m,-w,-v]}};function A(t,e,n){t.isPlane||y(t),x(t,n&&n.size);const{vertexAttributes:r,transform:o}=i(t,e,n);return{vertexAttributes:new a({...r,uv:t.uv}),transform:o,components:[new s({faces:t.faces,material:n&&n.material||null})],spatialReference:e.spatialReference}}function y(t){for(let e=0;e<t.position.length;e+=3)t.position[e+2]+=.5}function x(t,e){if(null==e)return;const o="number"==typeof e?[e,e,e]:[null!=e.width?e.width:1,null!=e.depth?e.depth:1,null!=e.height?e.height:1];O[0]=o[0],O[4]=o[1],O[8]=o[2];for(let r=0;r<t.position.length;r+=3){for(let e=0;e<3;e++)F[e]=t.position[r+e];n(F,F,O);for(let e=0;e<3;e++)t.position[r+e]=F[e]}if(o[0]!==o[1]||o[1]!==o[2]){O[0]=1/o[0],O[4]=1/o[1],O[8]=1/o[2];for(let e=0;e<t.normal.length;e+=3){for(let n=0;n<3;n++)F[n]=t.normal[e+n];n(F,F,O),r(F,F);for(let n=0;n<3;n++)t.normal[e+n]=F[n]}}}const d={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},M={south:0,east:1,north:2,west:3,up:4,down:5},F=o(),O=e();export{M as boxFaceOrder,h as convertPlaneSizeParameter,A as convertUnitGeometry,c as createUnitSizeBox,u as createUnitSizeCylinder,p as createUnitSizePlane,f as createUnitSizeSphere,l as extractSingleFaceOfBox};
5
+ import{isSome as t}from"../../../core/maybe.js";import{c as e}from"../../../chunks/mat3f64.js";import{t as n,n as r}from"../../../chunks/vec3.js";import{c as o}from"../../../chunks/vec3f64.js";import s from"../MeshComponent.js";import{MeshVertexAttributes as a}from"../MeshVertexAttributes.js";import{georeferenceByTransform as i}from"./georeference.js";function c(){const{faceDescriptions:t,faceVertexOffsets:e,uvScales:n}=d,r=4*t.length,o=new Float64Array(3*r),s=new Float32Array(3*r),a=new Float32Array(2*r),i=new Uint32Array(2*t.length*3);let c=0,l=0,f=0,u=0;for(let h=0;h<t.length;h++){const r=t[h],p=c/3;for(const t of e)i[u++]=p+t;const m=r.corners;for(let t=0;t<4;t++){const e=m[t];let i=0;a[f++]=.25*n[t][0]+r.uvOrigin[0],a[f++]=r.uvOrigin[1]-.25*n[t][1];for(let t=0;t<3;t++)0!==r.axis[t]?(o[c++]=.5*r.axis[t],s[l++]=r.axis[t]):(o[c++]=.5*e[i++],s[l++]=0)}}return{position:o,normal:s,uv:a,faces:i}}function l(e,n){const r=e.components[0],o=r.faces,a=M[n],i=6*a,c=new Uint32Array(6),l=new Uint32Array(o.length-6);let f=0,u=0;for(let t=0;t<o.length;t++)t>=i&&t<i+6?c[f++]=o[t]:l[u++]=o[t];if(t(e.vertexAttributes.uv)){const t=new Float32Array(e.vertexAttributes.uv),n=4*a*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new s({faces:c,material:r.material}),new s({faces:l})],e}function f(t=0){const e=Math.round(8*2**t),n=2*e,r=(e-1)*(n+1)+2*n,o=new Float64Array(3*r),s=new Float32Array(3*r),a=new Float32Array(2*r),i=new Uint32Array(3*((e-1)*n*2));let c=0,l=0,f=0,u=0;for(let h=0;h<=e;h++){const t=h/e*Math.PI+.5*Math.PI,r=Math.cos(t),p=Math.sin(t);F[2]=p;const m=0===h||h===e,w=m?n-1:n;for(let v=0;v<=w;v++){const t=v/w*2*Math.PI;F[0]=-Math.sin(t)*r,F[1]=Math.cos(t)*r;for(let e=0;e<3;e++)o[c]=.5*F[e],s[c]=F[e],++c;a[l++]=(v+(m?.5:0))/n,a[l++]=h/e,0!==h&&v!==n&&(h!==e&&(i[f++]=u,i[f++]=u+1,i[f++]=u-n),1!==h&&(i[f++]=u,i[f++]=u-n,i[f++]=u-n-1)),u++}}return{position:o,normal:s,uv:a,faces:i}}function u(t=0){const e=5,n=Math.round(16*2**t),r=(e-1)*(n+1)+2*n,o=new Float64Array(3*r),s=new Float32Array(3*r),a=new Float32Array(2*r),i=new Uint32Array(3*(4*n));let c=0,l=0,f=0,u=0,h=0;for(let p=0;p<=e;p++){const t=0===p||p===e,r=p<=1||p>=e-1,m=2===p||4===p,w=t?n-1:n;for(let v=0;v<=w;v++){const g=v/w*2*Math.PI,A=t?0:.5;F[0]=A*Math.sin(g),F[1]=A*-Math.cos(g),F[2]=p<=2?.5:-.5;for(let t=0;t<3;t++)o[c++]=F[t],s[l++]=r?2===t?p<=1?1:-1:0:2===t?0:F[t]/A;a[f++]=(v+(t?.5:0))/n,a[f++]=p<=1?1*p/3:p<=3?1*(p-2)/3+1/3:1*(p-4)/3+2/3,m||0===p||v===n||(p!==e&&(i[u++]=h,i[u++]=h+1,i[u++]=h-n),1!==p&&(i[u++]=h,i[u++]=h-n,i[u++]=h-n-1)),h++}}return{position:o,normal:s,uv:a,faces:i}}function h(t,e){const n="number"==typeof e?e:null!=e?e.width:1,r="number"==typeof e?e:null!=e?e.height:1;switch(t){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}function p(t){const e=g.facingAxisOrderSwap[t],n=g.position,r=g.normal,o=new Float64Array(n.length),s=new Float32Array(r.length);let a=0;for(let i=0;i<4;i++){const t=a;for(let i=0;i<3;i++){const c=e[i],l=Math.abs(c)-1,f=c>=0?1:-1;o[a]=n[t+l]*f,s[a]=r[t+l]*f,a++}}return{position:o,normal:s,uv:new Float32Array(g.uv),faces:new Uint32Array(g.faces),isPlane:!0}}const m=1,w=2,v=3,g={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[v,m,w],west:[-v,-m,w],north:[-m,v,w],south:[m,-v,w],up:[m,w,v],down:[m,-w,-v]}};function A(t,e,n){t.isPlane||y(t),x(t,n?.size);const{vertexAttributes:r,transform:o}=i(t,e,n);return{vertexAttributes:new a({...r,uv:t.uv}),transform:o,components:[new s({faces:t.faces,material:n&&n.material||null})],spatialReference:e.spatialReference}}function y(t){for(let e=0;e<t.position.length;e+=3)t.position[e+2]+=.5}function x(t,e){if(null==e)return;const o="number"==typeof e?[e,e,e]:[null!=e.width?e.width:1,null!=e.depth?e.depth:1,null!=e.height?e.height:1];O[0]=o[0],O[4]=o[1],O[8]=o[2];for(let r=0;r<t.position.length;r+=3){for(let e=0;e<3;e++)F[e]=t.position[r+e];n(F,F,O);for(let e=0;e<3;e++)t.position[r+e]=F[e]}if(o[0]!==o[1]||o[1]!==o[2]){O[0]=1/o[0],O[4]=1/o[1],O[8]=1/o[2];for(let e=0;e<t.normal.length;e+=3){for(let n=0;n<3;n++)F[n]=t.normal[e+n];n(F,F,O),r(F,F);for(let n=0;n<3;n++)t.normal[e+n]=F[n]}}}const d={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},M={south:0,east:1,north:2,west:3,up:4,down:5},F=o(),O=e();export{M as boxFaceOrder,h as convertPlaneSizeParameter,A as convertUnitGeometry,c as createUnitSizeBox,u as createUnitSizeCylinder,p as createUnitSizePlane,f as createUnitSizeSphere,l as extractSingleFaceOfBox};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as n,isNone as t}from"../../core/maybe.js";import{isPoint as e,isPolyline as r,isPolygon as u,isMultipoint as i,isExtent as o}from"./jsonUtils.js";function l(n){return n&&"upperLeft"===n.originPosition}const a=(n,t,e)=>[t,e],m=(n,t,e)=>[t,e,n[2]],c=(n,t,e)=>[t,e,n[2],n[3]];function s(t){if(!t)return null;return{originPosition:"upper-left"===t.originPosition?"upperLeft":"lower-left"===t.originPosition?"lowerLeft":t.originPosition,scale:t.tolerance?[t.tolerance,t.tolerance]:[1,1],translate:n(t.extent)?[t.extent.xmin,t.extent.ymax]:[0,0]}}function f(t,e){if(t===e||null==t&&null==e)return!0;if(null==t||null==e)return!1;let r,u,i,o,a,m;return l(t)?(r=t.translate[0],u=t.translate[1],i=t.scale[0]):(r=n(t.extent)?t.extent.xmin:0,u=n(t.extent)?t.extent.ymax:0,i=t.tolerance),l(e)?(o=e.translate[0],a=e.translate[1],m=e.scale[0]):(o=n(e.extent)?e.extent.xmin:0,a=n(e.extent)?e.extent.ymax:0,m=e.tolerance),r===o&&u===a&&i===m}function x({scale:n,translate:t},e){return Math.round((e-t[0])/n[0])}function h({scale:n,translate:t},e){return Math.round((t[1]-e)/n[1])}function I(n,t,e){const r=[];let u,i,o,l;for(let a=0;a<e.length;a++){const m=e[a];a>0?(o=x(n,m[0]),l=h(n,m[1]),o===u&&l===i||(r.push(t(m,o-u,l-i)),u=o,i=l)):(u=x(n,m[0]),i=h(n,m[1]),r.push(t(m,u,i)))}return r.length>0?r:null}function g(n,t,e){return t[0]=x(n,e[0]),t[3]=h(n,e[1]),t[2]=x(n,e[2]),t[1]=h(n,e[3]),t}function p(n,t,e,r){return I(n,e?r?c:m:r?m:a,t)}function N(n,t,e,r){const u=[],i=e?r?c:m:r?m:a;for(let o=0;o<t.length;o++){const e=I(n,i,t[o]);e&&e.length>=3&&u.push(e)}return u.length?u:null}function y(n,t,e,r){const u=[],i=e?r?c:m:r?m:a;for(let o=0;o<t.length;o++){const e=I(n,i,t[o]);e&&e.length>=2&&u.push(e)}return u.length?u:null}function z({scale:n,translate:t},e){return e*n[0]+t[0]}function T({scale:n,translate:t},e){return t[1]-e*n[1]}function M(n,t,e){const r=new Array(e.length);if(!e.length)return r;const[u,i]=n.scale;let o=z(n,e[0][0]),l=T(n,e[0][1]);r[0]=t(e[0],o,l);for(let a=1;a<e.length;a++){const n=e[a];o+=n[0]*u,l-=n[1]*i,r[a]=t(n,o,l)}return r}function E(n,t,e){const r=new Array(e.length);for(let u=0;u<e.length;u++)r[u]=M(n,t,e[u]);return r}function P(n,t,e){return e?(t[0]=z(n,e[0]),t[1]=T(n,e[3]),t[2]=z(n,e[2]),t[3]=T(n,e[1]),t):[z(n,t[0]),T(n,t[3]),z(n,t[2]),T(n,t[1])]}function b(n,t,e,r){return M(n,e?r?c:m:r?m:a,t)}function F(n,t,e,r){return E(n,e?r?c:m:r?m:a,t)}function V(n,t,e,r){return E(n,e?r?c:m:r?m:a,t)}function Y(n,t,e){let[r,u]=e[0],i=Math.min(r,t[0]),o=Math.min(u,t[1]),l=Math.max(r,t[2]),a=Math.max(u,t[3]);for(let m=1;m<e.length;m++){const[n,t]=e[m];r+=n,u+=t,n<0&&(i=Math.min(i,r)),n>0&&(l=Math.max(l,r)),t<0?o=Math.min(o,u):t>0&&(a=Math.max(a,u))}return n[0]=i,n[1]=o,n[2]=l,n[3]=a,n}function _(n,t){if(!t.length)return null;n[0]=n[1]=Number.POSITIVE_INFINITY,n[2]=n[3]=Number.NEGATIVE_INFINITY;for(let e=0;e<t.length;e++)Y(n,n,t[e]);return n}function A(n){const t=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];return Y(t,t,n)}function w(n){return _([0,0,0,0],n)}function j(n){return _([0,0,0,0],n)}function G(n,t,e,r,u){return t.xmin=x(n,e.xmin),t.ymin=h(n,e.ymin),t.xmax=x(n,e.xmax),t.ymax=h(n,e.ymax),t!==e&&(r&&(t.zmin=e.zmin,t.zmax=e.zmax),u&&(t.mmin=e.mmin,t.mmax=e.mmax)),t}function L(n,t,e,r,u){return t.points=p(n,e.points,r,u),t}function O(n,t,e,r,u){return t.x=x(n,e.x),t.y=h(n,e.y),t!==e&&(r&&(t.z=e.z),u&&(t.m=e.m)),t}function S(n,t,e,r,u){const i=N(n,e.rings,r,u);return i?(t.rings=i,t):null}function d(n,t,e,r,u){const i=y(n,e.paths,r,u);return i?(t.paths=i,t):null}function U(n,t){return n&&t?e(t)?O(n,{},t,!1,!1):r(t)?d(n,{},t,!1,!1):u(t)?S(n,{},t,!1,!1):i(t)?L(n,{},t,!1,!1):o(t)?G(n,{},t,!1,!1):null:null}function k(n,t,e,r,u){return t.xmin=z(n,e.xmin),t.ymin=T(n,e.ymin),t.xmax=z(n,e.xmax),t.ymax=T(n,e.ymax),t!==e&&(r&&(t.zmin=e.zmin,t.zmax=e.zmax),u&&(t.mmin=e.mmin,t.mmax=e.mmax)),t}function q(t,e,r,u,i){return n(r)&&(e.points=b(t,r.points,u,i)),e}function v(n,e,r,u,i){return t(r)||(e.x=z(n,r.x),e.y=T(n,r.y),e!==r&&(u&&(e.z=r.z),i&&(e.m=r.m))),e}function B(t,e,r,u,i){return n(r)&&(e.rings=V(t,r.rings,u,i)),e}function C(t,e,r,u,i){return n(r)&&(e.paths=F(t,r.paths,u,i)),e}export{f as equals,Y as getQuantizedBoundsCoordsArray,_ as getQuantizedBoundsCoordsArrayArray,w as getQuantizedBoundsPaths,A as getQuantizedBoundsPoints,j as getQuantizedBoundsRings,g as quantizeBounds,G as quantizeExtent,U as quantizeGeometry,L as quantizeMultipoint,y as quantizePaths,O as quantizePoint,p as quantizePoints,S as quantizePolygon,d as quantizePolyline,N as quantizeRings,x as quantizeX,h as quantizeY,s as toQuantizationTransform,P as unquantizeBounds,M as unquantizeCoordsArray,E as unquantizeCoordsArrayArray,k as unquantizeExtent,q as unquantizeMultipoint,F as unquantizePaths,v as unquantizePoint,b as unquantizePoints,B as unquantizePolygon,C as unquantizePolyline,V as unquantizeRings,z as unquantizeX,T as unquantizeY};
5
+ import{isSome as n,isNone as t}from"../../core/maybe.js";import{isPoint as e,isPolyline as r,isPolygon as u,isMultipoint as i,isExtent as o}from"./jsonUtils.js";function l(n){return n&&"upperLeft"===n.originPosition}const a=(n,t,e)=>[t,e],m=(n,t,e)=>[t,e,n[2]],c=(n,t,e)=>[t,e,n[2],n[3]];function s(t){if(!t)return null;return{originPosition:"upper-left"===t.originPosition?"upperLeft":"lower-left"===t.originPosition?"lowerLeft":t.originPosition,scale:t.tolerance?[t.tolerance,t.tolerance]:[1,1],translate:n(t.extent)?[t.extent.xmin,t.extent.ymax]:[0,0]}}function f(t,e){if(t===e||null==t&&null==e)return!0;if(null==t||null==e)return!1;let r,u,i,o,a,m;return l(t)?(r=t.translate[0],u=t.translate[1],i=t.scale[0]):(r=n(t.extent)?t.extent.xmin:0,u=n(t.extent)?t.extent.ymax:0,i=t.tolerance),l(e)?(o=e.translate[0],a=e.translate[1],m=e.scale[0]):(o=n(e.extent)?e.extent.xmin:0,a=n(e.extent)?e.extent.ymax:0,m=e.tolerance),r===o&&u===a&&i===m}function x({scale:n,translate:t},e){return Math.round((e-t[0])/n[0])}function h({scale:n,translate:t},e){return Math.round((t[1]-e)/n[1])}function I(n,t,e){const r=[];let u,i,o,l;for(let a=0;a<e.length;a++){const m=e[a];a>0?(o=x(n,m[0]),l=h(n,m[1]),o===u&&l===i||(r.push(t(m,o-u,l-i)),u=o,i=l)):(u=x(n,m[0]),i=h(n,m[1]),r.push(t(m,u,i)))}return r.length>0?r:null}function g(n,t,e){return t[0]=x(n,e[0]),t[3]=h(n,e[1]),t[2]=x(n,e[2]),t[1]=h(n,e[3]),t}function p(n,t,e,r){return I(n,e?r?c:m:r?m:a,t)}function N(n,t,e,r){const u=[],i=e?r?c:m:r?m:a;for(let o=0;o<t.length;o++){const e=I(n,i,t[o]);e&&e.length>=3&&u.push(e)}return u.length?u:null}function y(n,t,e,r){const u=[],i=e?r?c:m:r?m:a;for(let o=0;o<t.length;o++){const e=I(n,i,t[o]);e&&e.length>=2&&u.push(e)}return u.length?u:null}function z({scale:n,translate:t},e){return e*n[0]+t[0]}function T({scale:n,translate:t},e){return t[1]-e*n[1]}function M(n,t,e){const r=new Array(e.length);if(!e.length)return r;const[u,i]=n.scale;let o=z(n,e[0][0]),l=T(n,e[0][1]);r[0]=t(e[0],o,l);for(let a=1;a<e.length;a++){const n=e[a];o+=n[0]*u,l-=n[1]*i,r[a]=t(n,o,l)}return r}function E(n,t,e){const r=new Array(e.length);for(let u=0;u<e.length;u++)r[u]=M(n,t,e[u]);return r}function P(n,t,e){return e?(t[0]=z(n,e[0]),t[1]=T(n,e[3]),t[2]=z(n,e[2]),t[3]=T(n,e[1]),t):[z(n,t[0]),T(n,t[3]),z(n,t[2]),T(n,t[1])]}function b(n,t,e,r){return M(n,e?r?c:m:r?m:a,t)}function F(n,t,e,r){return E(n,e?r?c:m:r?m:a,t)}function V(n,t,e,r){return E(n,e?r?c:m:r?m:a,t)}function Y(n,t,e){let[r,u]=e[0],i=Math.min(r,t[0]),o=Math.min(u,t[1]),l=Math.max(r,t[2]),a=Math.max(u,t[3]);for(let m=1;m<e.length;m++){const[n,t]=e[m];r+=n,u+=t,n<0&&(i=Math.min(i,r)),n>0&&(l=Math.max(l,r)),t<0?o=Math.min(o,u):t>0&&(a=Math.max(a,u))}return n[0]=i,n[1]=o,n[2]=l,n[3]=a,n}function _(n,t){if(!t.length)return null;n[0]=n[1]=Number.POSITIVE_INFINITY,n[2]=n[3]=Number.NEGATIVE_INFINITY;for(let e=0;e<t.length;e++)Y(n,n,t[e]);return n}function A(n){const t=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];return Y(t,t,n)}function w(n){return _([0,0,0,0],n)}function j(n){return _([0,0,0,0],n)}function G(n,t,e,r,u){return t.xmin=x(n,e.xmin),t.ymin=h(n,e.ymin),t.xmax=x(n,e.xmax),t.ymax=h(n,e.ymax),t!==e&&(r&&(t.zmin=e.zmin,t.zmax=e.zmax),u&&(t.mmin=e.mmin,t.mmax=e.mmax)),t}function L(n,t,e,r,u){return t.points=p(n,e.points,r,u)??[],t}function O(n,t,e,r,u){return t.x=x(n,e.x),t.y=h(n,e.y),t!==e&&(r&&(t.z=e.z),u&&(t.m=e.m)),t}function S(n,t,e,r,u){const i=N(n,e.rings,r,u);return i?(t.rings=i,t):null}function d(n,t,e,r,u){const i=y(n,e.paths,r,u);return i?(t.paths=i,t):null}function U(n,t){return n&&t?e(t)?O(n,{},t,!1,!1):r(t)?d(n,{},t,!1,!1):u(t)?S(n,{},t,!1,!1):i(t)?L(n,{},t,!1,!1):o(t)?G(n,{},t,!1,!1):null:null}function k(n,t,e,r,u){return t.xmin=z(n,e.xmin),t.ymin=T(n,e.ymin),t.xmax=z(n,e.xmax),t.ymax=T(n,e.ymax),t!==e&&(r&&(t.zmin=e.zmin,t.zmax=e.zmax),u&&(t.mmin=e.mmin,t.mmax=e.mmax)),t}function q(t,e,r,u,i){return n(r)&&(e.points=b(t,r.points,u,i)),e}function v(n,e,r,u,i){return t(r)||(e.x=z(n,r.x),e.y=T(n,r.y),e!==r&&(u&&(e.z=r.z),i&&(e.m=r.m))),e}function B(t,e,r,u,i){return n(r)&&(e.rings=V(t,r.rings,u,i)),e}function C(t,e,r,u,i){return n(r)&&(e.paths=F(t,r.paths,u,i)),e}export{f as equals,Y as getQuantizedBoundsCoordsArray,_ as getQuantizedBoundsCoordsArrayArray,w as getQuantizedBoundsPaths,A as getQuantizedBoundsPoints,j as getQuantizedBoundsRings,g as quantizeBounds,G as quantizeExtent,U as quantizeGeometry,L as quantizeMultipoint,y as quantizePaths,O as quantizePoint,p as quantizePoints,S as quantizePolygon,d as quantizePolyline,N as quantizeRings,x as quantizeX,h as quantizeY,s as toQuantizationTransform,P as unquantizeBounds,M as unquantizeCoordsArray,E as unquantizeCoordsArrayArray,k as unquantizeExtent,q as unquantizeMultipoint,F as unquantizePaths,v as unquantizePoint,b as unquantizePoints,B as unquantizePolygon,C as unquantizePolyline,V as unquantizeRings,z as unquantizeX,T as unquantizeY};