@arcgis/core 4.33.0-next.20250502 → 4.33.0-next.20250503

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 (69) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{0219c3f9408d3fa3c9a0.js → 03ee9d0407c230b885ed.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{84f972d7851d982701a0.js → 1ca7e0d519ecbfe6976f.js} +1 -1
  4. package/assets/esri/core/workers/chunks/3fb25912b274f264c84e.js +1 -0
  5. package/assets/esri/core/workers/chunks/{9652cfd4668b95036c87.js → 532088a72c3ddc50f3be.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{653ff3e631fea8ad393a.js → a0db1f3ca29e34dfa16f.js} +12 -12
  7. package/assets/esri/core/workers/chunks/{581180668e0229dcdc14.js → bf190d672dcbaedc1a41.js} +1 -1
  8. package/assets/esri/geometry/support/pe-wasm.wasm +0 -0
  9. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +14 -1
  10. package/assets/esri/themes/base/widgets/_SelectionList.scss +34 -0
  11. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +6 -0
  12. package/assets/esri/themes/dark/main.css +1 -1
  13. package/assets/esri/themes/light/main.css +1 -1
  14. package/assets/esri/themes/light/view.css +1 -1
  15. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  16. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  17. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList.json +1 -1
  18. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_en.json +1 -1
  19. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar.json +1 -1
  20. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_en.json +1 -1
  21. package/chunks/pe-wasm.js +1 -1
  22. package/chunks/pe.js +1 -1
  23. package/geometry/coordinateFormatter.js +1 -1
  24. package/geometry/support/WKIDUnitConversion.js +1 -1
  25. package/package.json +1 -1
  26. package/support/revision.js +1 -1
  27. package/views/3d/interactive/Manipulator3D.js +1 -1
  28. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  29. package/views/3d/layers/DrapedSubView3D.js +1 -1
  30. package/views/3d/layers/I3SMeshView3D.js +1 -1
  31. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  32. package/views/3d/layers/MediaLayerView3D.js +1 -1
  33. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  34. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  35. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  36. package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
  37. package/views/3d/layers/graphics/pipeline/rendering/LodRenderer.js +1 -1
  38. package/views/3d/support/StreamTextureCollection.js +1 -1
  39. package/views/3d/support/TextureCollection.js +1 -1
  40. package/views/3d/webgl-engine/Stage.js +1 -1
  41. package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
  42. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  43. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  44. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  45. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  46. package/views/3d/webgl-engine/parts/Model.js +1 -1
  47. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  48. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  49. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  50. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +5 -0
  51. package/widgets/OrientedImageryViewer/components/ImageMeasurementWidget.js +1 -1
  52. package/widgets/OrientedImageryViewer/css.js +1 -1
  53. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  54. package/widgets/OrientedImageryViewer/mixins/SketchHandlerMixin.js +1 -1
  55. package/widgets/OrientedImageryViewer/mixins/TriangulatedImageMeasurementMixin.js +5 -0
  56. package/widgets/OrientedImageryViewer/mixins/TriangulatedSketchHandlerMixin.js +5 -0
  57. package/widgets/OrientedImageryViewer.js +1 -1
  58. package/widgets/Sketch.js +1 -1
  59. package/widgets/support/SelectionList/LayerItem.js +1 -1
  60. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  61. package/widgets/support/SelectionList/VisibleElements.js +1 -1
  62. package/widgets/support/SelectionList.js +1 -1
  63. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  64. package/widgets/support/SelectionToolbar/VisibleElements.js +5 -0
  65. package/widgets/support/SelectionToolbar.js +1 -1
  66. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  67. package/assets/esri/core/workers/chunks/e3ef0451dcdc2e966628.js +0 -1
  68. package/views/3d/webgl-engine/lib/ContentObject.js +0 -5
  69. package/views/3d/webgl-engine/lib/ContentObjectType.js +0 -5
@@ -26,7 +26,7 @@ return dpDummy * hiD + loD;
26
26
 
27
27
  return vec4(symbolColor.r, symbolColor.g, symbolColor.b, symbolAlpha);
28
28
  }
29
- `)}},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"}))},49255:(e,t,r)=>{var n;function o(e){return e===n.Shadow||e===n.ShadowHighlight||e===n.ShadowExcludeHighlight||e===n.ViewshedShadow}function s(e){return function(e){return function(e){return c(e)||a(e)}(e)||f(e)}(e)||e===n.Normal}function i(e){return function(e){return l(e)||f(e)}(e)||e===n.Normal}function a(e){return e===n.Highlight||e===n.ObjectAndLayerIdColor}function c(e){return e===n.Color}function u(e){return c(e)||d(e)}function l(e){return u(e)||a(e)}function f(e){return e===n.Depth}function d(e){return e===n.ColorEmission}r.d(t,{LG:()=>d,Mb:()=>l,PJ:()=>o,RN:()=>u,V:()=>n,XY:()=>s,iq:()=>i}),function(e){e[e.Color=0]="Color",e[e.ColorEmission=1]="ColorEmission",e[e.Depth=2]="Depth",e[e.Normal=3]="Normal",e[e.Shadow=4]="Shadow",e[e.ShadowHighlight=5]="ShadowHighlight",e[e.ShadowExcludeHighlight=6]="ShadowExcludeHighlight",e[e.ViewshedShadow=7]="ViewshedShadow",e[e.Highlight=8]="Highlight",e[e.ObjectAndLayerIdColor=9]="ObjectAndLayerIdColor",e[e.COUNT=10]="COUNT"}(n||(n={}))},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}},58029:(e,t,r)=>{r.d(t,{F:()=>s});var n=r(69270),o=r(74333);class s extends o.n{constructor(e,t){super(e,"mat4",n.c.Bind,((r,n)=>r.setUniformMatrix4fv(e,t(n))))}}},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]},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),m=r(70328),h=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 S{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new B,this.numberOfVertices=0}}var A=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 outerSize(){return 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){this._outer.forEach(((t,r)=>t.forEach(((t,n)=>e(t,r,n)))))}}var O=r(74887),I=r(46140),U=r(97146),q=r(99677),N=r(46610),k=r(89192),D=r(87170),L=r(31006),j=r(46540),V=r(88076),F=r(63907);const z=()=>C.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class H{constructor(e,t,r){this.resource=e,this.textures=t,this.cachedMemory=r}}function $(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||(z().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&&(z().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),n=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(z().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),n=!1)):(z().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),n=!1)}}else z().warn("Indexed geometries must specify faces"),n=!1;break}default:z().warn(`Unsupported topology '${r}'`),n=!1}e.params.material||(z().warn("Geometry requires material"),n=!1);const o=e.params.vertexAttributes;for(const e in o)o[e].values||(z().warn("Geometries with externally defined attributes are not yet supported"),n=!1);return n}function W(e){const t=(0,m.Ie)();return e.forEach((e=>{const r=e.boundingInfo;null!=r&&((0,m.iT)(t,r.bbMin),(0,m.iT)(t,r.bbMax))})),t}function X(e){switch(e){case"mask":return k.sf.Mask;case"maskAndTransparency":return k.sf.MaskBlend;case"none":return k.sf.Opaque;default:return k.sf.Blend}}function Y(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const J=new I.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,O.QP)(n.error),$(n.error.details.url)}(e,r,t);const n=await(0,R.Ke)((0,A.A)(e,t));if(!0===n.ok)return n.value.data;(0,O.QP)(n.error),$(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){z().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:F.pF.REPEAT,t:F.pF.REPEAT},preMultiplyAlpha:X(c)!==k.sf.Opaque},l=t?.disableTextures?Promise.resolve(null):(0,q.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 H(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=I.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 m=0;const h=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[j.r.POSITION],v=y.values.length/y.valuesPerElement;for(const e in c){const t=c[e],r=t.values,n=g(e)??(0,U.tM)(v);p.push([e,new N.n(r,n,t.valuesPerElement,!0)])}const b=a.texture,x=f&&f[b];if(x&&!h.has(b)){const{image:e,parameters:t}=x,r=new L.g(e,t);n.push(r),h.set(b,r)}const w=h.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(x.alphaChannelUsage):void 0,n={ambient:(0,d.ci)(e.diffuse),diffuse:(0,d.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:M,doubleSided:!0,cullFace:k.s2.None,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:x?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(n,t.materialParameters),B=new V.$U(n,t),s.set(T,b,B)}o.push(B);const S=new D.V(B,p);m+=p.find((e=>e[0]===j.r.POSITION))?.[1]?.indices.length??0,r.push(S)}return{engineResources:[{name:c,stageResources:{textures:n,materials:o,geometries:r},pivotOffset:i.model.pivotOffset,numberOfVertices:m,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)(),m=(0,d.vt)(),h=(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,m),o.getVec(c,l),(0,f.t)(m,m,s.transform),(0,f.d)(h,m,t.center),(0,f.E)(h,h,t.radius);const a=h[2],u=(0,f.l)(h),d=Math.min(.45+.55*u*u,1)**n.Tf;(0,f.E)(h,h,t.radius),null!==v&&(0,f.t)(h,h,v),(0,f.n)(h,h),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,f.m)(h,h,l,a>-1?.2:Math.min(-4*a-3.8,1)),y[b]=h[0],y[b+1]=h[1],y[b+2]=h[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,c){const u=e.model,f=new Array,d=new Map,b=new Map,M=u.lods.length,B=(0,m.Ie)();return u.lods.forEach(((e,A)=>{const R=!0===o.skipHighLods&&(M>1&&0===A||M>3&&1===A)||!1===o.skipHighLods&&null!=a&&A!==a;if(R&&0!==A)return;const _=new S(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach((e=>{const a=R?new V.$U({},o):function(e,t,r,o,s,i,a,c,u){const f=e.materials.get(t.material);if(null==f)return null;const{normal:d,color:m,texCoord0:h,tangent:p}=t.attributes,g=t.material+(d?"_normal":"")+(m?"_color":"")+(h?"_texCoord0":"")+(p?"_tangent":""),y=null!=t.attributes.texCoord0,v=null!=t.attributes.normal,b=function(e){switch(e){case"BLEND":return k.sf.Blend;case"MASK":return k.sf.Mask;case"OPAQUE":case null:case void 0:return k.sf.Opaque}}(f.alphaMode);if(!i.has(g)){if(y){const t=(t,r=!1,n=!1)=>{if(null!=t&&!a.has(t)){const o=e.textures.get(t);if(o){const e=o.data,s=r&&!(0,w.x3)(e);a.set(t,new L.g((0,w.x3)(e)?e.data:e,{...o.parameters,preMultiplyAlpha:!(0,w.x3)(e)&&n,encoding:(0,w.x3)(e)?e.encoding:void 0,compressionHandle:s?c.compressionHandle:void 0,compressionCallback:s?c.compressionCallback:void 0}))}}},r=b!==k.sf.Opaque&&!u;t(f.colorTexture,r,b!==k.sf.Opaque),t(f.normalTexture),t(f.occlusionTexture,!0),t(f.emissiveTexture),t(f.metallicRoughnessTexture,!0)}const r=1/n.Tf,d=f.color[0]**r,m=f.color[1]**r,h=f.color[2]**r,p=f.emissiveFactor[0]**r,x=f.emissiveFactor[1]**r,M=f.emissiveFactor[2]**r,B=null!=f.colorTexture&&y?a.get(f.colorTexture):null,S=(0,Q.Jr)(f),A=null!=f.normalTextureTransform?.scale?f.normalTextureTransform?.scale:l.Un;i.set(g,new V.$U({...o,customDepthTest:k.it.Lequal,textureAlphaMode:b,textureAlphaCutoff:f.alphaCutoff,diffuse:[d,m,h],ambient:[d,m,h],opacity:"OPAQUE"===f.alphaMode?1:f.opacity,doubleSided:f.doubleSided,doubleSidedType:"winding-order",cullFace:f.doubleSided?k.s2.None:k.s2.Back,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:v?K.W.Attribute:K.W.ScreenDerivative,castShadows:!0,receiveShadows:f.receiveShadows,receiveAmbientOcclusion:f.receiveAmbientOcclusion,textureId:null!=B?B.id:void 0,colorMixMode:f.colorMixMode,normalTextureId:null!=f.normalTexture&&y?a.get(f.normalTexture).id:void 0,textureAlphaPremultiplied:null!=B&&!!B.parameters.preMultiplyAlpha,occlusionTextureId:null!=f.occlusionTexture&&y?a.get(f.occlusionTexture).id:void 0,emissiveTextureId:null!=f.emissiveTexture&&y?a.get(f.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=f.metallicRoughnessTexture&&y?a.get(f.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[p,x,M],mrrFactors:S?Q.Bt:[f.metallicFactor,f.roughnessFactor,o.mrrFactors[2]],isSchematic:S,colorTextureTransformMatrix:T(f.colorTextureTransform),normalTextureTransformMatrix:T(f.normalTextureTransform),scale:[A[0],A[1]],occlusionTextureTransformMatrix:T(f.occlusionTextureTransform),emissiveTextureTransformMatrix:T(f.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:T(f.metallicRoughnessTextureTransform),...s},c))}const x=i.get(g);if(r.stageResources.materials.push(x),y){const e=e=>{null!=e&&r.stageResources.textures.push(a.get(e))};e(f.colorTexture),e(f.normalTexture),e(f.occlusionTexture),e(f.emissiveTexture),e(f.metallicRoughnessTexture)}return x}(u,e,_,t,r,d,b,o,c),{geometry:f,vertexCount:M}=function(e,t){const r=e.attributes.position.count,n=(0,x.x)(e.indices||r,e.primitiveType),o=(0,h.oe)(3*r),{typedBuffer:a,typedBufferStride:c}=e.attributes.position;(0,g.t)(o,a,e.transform,3,c);const u=[[j.r.POSITION,new N.n(o,n,3,!0)]];if(null!=e.attributes.normal){const t=(0,h.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([j.r.NORMAL,new N.n(t,n,3,!0)])}if(null!=e.attributes.tangent){const t=(0,h.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([j.r.TANGENT,new N.n(t,n,4,!0)])}if(null!=e.attributes.texCoord0){const t=(0,h.oe)(2*r),{typedBuffer:o,typedBufferStride:s}=e.attributes.texCoord0;(0,v.a)(t,o,2,s),u.push([j.r.UV0,new N.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([j.r.COLOR,new N.n(t,n,4,!0)])}return{geometry:new D.V(t,u),vertexCount:r}}(e,a??new V.$U({},o)),S=f.boundingInfo;null!=S&&0===A&&((0,m.iT)(B,S.bbMin),(0,m.iT)(B,S.bbMax)),null!=a&&(_.stageResources.geometries.push(f),_.numberOfVertices+=M)})),R||f.push(_)})),{engineResources:f,referenceBoundingBox:B}}(M,Z,te,t,a.specifiedLodIndex,_);return{lods:re,referenceBoundingBox:ne,isEsriSymbolResource:M.meta.isEsriSymbolResource,isWosr:!1}}const ee=(0,a.vt)()},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],m=r[7],h=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+m*y,e[g+2]=c*r+f*s+h*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],m=r[6],h=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],S=t[T+3];e[B]=a*r+f*o+p*i+b*S,e[B+1]=c*r+d*o+g*i+x*S,e[B+2]=u*r+m*o+y*i+w*S,e[B+3]=l*r+h*o+v*i+M*S,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],m=r[9],h=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],S=M[r+2],A=M[r+3];x[t]=o*n+c*B+d*S+g*A,x[t+1]=s*n+u*B+m*S+y*A,x[t+2]=i*n+l*B+h*S+v*A,x[t+3]=a*n+f*B+p*S+b*A}}},Symbol.toStringTag,{value:"Module"}))},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"},69270:(e,t,r)=>{var n;r.d(t,{c:()=>n}),function(e){e[e.Bind=0]="Bind",e[e.Pass=1]="Pass",e[e.Draw=2]="Draw"}(n||(n={}))},71351:(e,t,r)=>{r.d(t,{C:()=>f,Cr:()=>d,LV:()=>l,kb:()=>m,oC:()=>h,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 m(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 h(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)()},73354:(e,t,r)=>{r.d(t,{a:()=>f,b:()=>a,c:()=>i,d:()=>o,e:()=>d,f:()=>l,l:()=>u,n:()=>m,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],m=r[9],h=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+m*x+g,e[b+2]=c*r+f*s+h*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],m=r[7],h=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+m*y,e[g+2]=c*r+f*s+h*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){m(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function m(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:m,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"}))},74333:(e,t,r)=>{r.d(t,{n:()=>o}),r(44208);var n=r(69270);class o{constructor(e,t,r,o,s=null){if(this.name=e,this.type=t,this.arraySize=s,this.bind={[n.c.Bind]:null,[n.c.Pass]:null,[n.c.Draw]:null},o)switch(r){case void 0:break;case n.c.Bind:this.bind[n.c.Bind]=o;break;case n.c.Pass:this.bind[n.c.Pass]=o;break;case n.c.Draw:this.bind[n.c.Draw]=o}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}},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}},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"}))},96336:(e,t,r)=>{r.d(t,{W:()=>n,Y:()=>c});var n,o,s=r(21818),i=r(31821),a=r(46540);function c(e,t){switch(t.normalType){case n.Compressed:e.attributes.add(a.r.NORMALCOMPRESSED,"vec2"),e.vertex.code.add(i.H`vec3 decompressNormal(vec2 normal) {
29
+ `)}},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"}))},49255:(e,t,r)=>{var n;function o(e){return e===n.Shadow||e===n.ShadowHighlight||e===n.ShadowExcludeHighlight||e===n.ViewshedShadow}function s(e){return function(e){return function(e){return c(e)||a(e)}(e)||f(e)}(e)||e===n.Normal}function i(e){return function(e){return l(e)||f(e)}(e)||e===n.Normal}function a(e){return e===n.Highlight||e===n.ObjectAndLayerIdColor}function c(e){return e===n.Color}function u(e){return c(e)||d(e)}function l(e){return u(e)||a(e)}function f(e){return e===n.Depth}function d(e){return e===n.ColorEmission}r.d(t,{LG:()=>d,Mb:()=>l,PJ:()=>o,RN:()=>u,V:()=>n,XY:()=>s,iq:()=>i}),function(e){e[e.Color=0]="Color",e[e.ColorEmission=1]="ColorEmission",e[e.Depth=2]="Depth",e[e.Normal=3]="Normal",e[e.Shadow=4]="Shadow",e[e.ShadowHighlight=5]="ShadowHighlight",e[e.ShadowExcludeHighlight=6]="ShadowExcludeHighlight",e[e.ViewshedShadow=7]="ViewshedShadow",e[e.Highlight=8]="Highlight",e[e.ObjectAndLayerIdColor=9]="ObjectAndLayerIdColor",e[e.COUNT=10]="COUNT"}(n||(n={}))},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}},58029:(e,t,r)=>{r.d(t,{F:()=>s});var n=r(69270),o=r(74333);class s extends o.n{constructor(e,t){super(e,"mat4",n.c.Bind,((r,n)=>r.setUniformMatrix4fv(e,t(n))))}}},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]},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),m=r(70328),h=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 S{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new B,this.numberOfVertices=0}}var A=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 outerSize(){return 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){this._outer.forEach(((t,r)=>t.forEach(((t,n)=>e(t,r,n)))))}}var O=r(74887),I=r(46140),U=r(97146),q=r(99677),N=r(46610),k=r(89192),D=r(87170),L=r(48833),j=r(46540),V=r(88076),F=r(63907);const z=()=>C.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class H{constructor(e,t,r){this.resource=e,this.textures=t,this.cachedMemory=r}}function $(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||(z().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&&(z().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),n=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(z().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),n=!1)):(z().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),n=!1)}}else z().warn("Indexed geometries must specify faces"),n=!1;break}default:z().warn(`Unsupported topology '${r}'`),n=!1}e.params.material||(z().warn("Geometry requires material"),n=!1);const o=e.params.vertexAttributes;for(const e in o)o[e].values||(z().warn("Geometries with externally defined attributes are not yet supported"),n=!1);return n}function W(e){const t=(0,m.Ie)();return e.forEach((e=>{const r=e.boundingInfo;null!=r&&((0,m.iT)(t,r.bbMin),(0,m.iT)(t,r.bbMax))})),t}function X(e){switch(e){case"mask":return k.sf.Mask;case"maskAndTransparency":return k.sf.MaskBlend;case"none":return k.sf.Opaque;default:return k.sf.Blend}}function Y(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const J=new I.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,O.QP)(n.error),$(n.error.details.url)}(e,r,t);const n=await(0,R.Ke)((0,A.A)(e,t));if(!0===n.ok)return n.value.data;(0,O.QP)(n.error),$(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){z().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:F.pF.REPEAT,t:F.pF.REPEAT},preMultiplyAlpha:X(c)!==k.sf.Opaque},l=t?.disableTextures?Promise.resolve(null):(0,q.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 H(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=I.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 m=0;const h=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[j.r.POSITION],v=y.values.length/y.valuesPerElement;for(const e in c){const t=c[e],r=t.values,n=g(e)??(0,U.tM)(v);p.push([e,new N.n(r,n,t.valuesPerElement,!0)])}const b=a.texture,x=f&&f[b];if(x&&!h.has(b)){const{image:e,parameters:t}=x,r=new L.g(e,t);n.push(r),h.set(b,r)}const w=h.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(x.alphaChannelUsage):void 0,n={ambient:(0,d.ci)(e.diffuse),diffuse:(0,d.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:M,doubleSided:!0,cullFace:k.s2.None,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:x?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(n,t.materialParameters),B=new V.$U(n,t),s.set(T,b,B)}o.push(B);const S=new D.V(B,p);m+=p.find((e=>e[0]===j.r.POSITION))?.[1]?.indices.length??0,r.push(S)}return{engineResources:[{name:c,stageResources:{textures:n,materials:o,geometries:r},pivotOffset:i.model.pivotOffset,numberOfVertices:m,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)(),m=(0,d.vt)(),h=(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,m),o.getVec(c,l),(0,f.t)(m,m,s.transform),(0,f.d)(h,m,t.center),(0,f.E)(h,h,t.radius);const a=h[2],u=(0,f.l)(h),d=Math.min(.45+.55*u*u,1)**n.Tf;(0,f.E)(h,h,t.radius),null!==v&&(0,f.t)(h,h,v),(0,f.n)(h,h),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,f.m)(h,h,l,a>-1?.2:Math.min(-4*a-3.8,1)),y[b]=h[0],y[b+1]=h[1],y[b+2]=h[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,c){const u=e.model,f=new Array,d=new Map,b=new Map,M=u.lods.length,B=(0,m.Ie)();return u.lods.forEach(((e,A)=>{const R=!0===o.skipHighLods&&(M>1&&0===A||M>3&&1===A)||!1===o.skipHighLods&&null!=a&&A!==a;if(R&&0!==A)return;const _=new S(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach((e=>{const a=R?new V.$U({},o):function(e,t,r,o,s,i,a,c,u){const f=e.materials.get(t.material);if(null==f)return null;const{normal:d,color:m,texCoord0:h,tangent:p}=t.attributes,g=t.material+(d?"_normal":"")+(m?"_color":"")+(h?"_texCoord0":"")+(p?"_tangent":""),y=null!=t.attributes.texCoord0,v=null!=t.attributes.normal,b=function(e){switch(e){case"BLEND":return k.sf.Blend;case"MASK":return k.sf.Mask;case"OPAQUE":case null:case void 0:return k.sf.Opaque}}(f.alphaMode);if(!i.has(g)){if(y){const t=(t,r=!1,n=!1)=>{if(null!=t&&!a.has(t)){const o=e.textures.get(t);if(o){const e=o.data,s=r&&!(0,w.x3)(e);a.set(t,new L.g((0,w.x3)(e)?e.data:e,{...o.parameters,preMultiplyAlpha:!(0,w.x3)(e)&&n,encoding:(0,w.x3)(e)?e.encoding:void 0,compressionHandle:s?c.compressionHandle:void 0,compressionCallback:s?c.compressionCallback:void 0}))}}},r=b!==k.sf.Opaque&&!u;t(f.colorTexture,r,b!==k.sf.Opaque),t(f.normalTexture),t(f.occlusionTexture,!0),t(f.emissiveTexture),t(f.metallicRoughnessTexture,!0)}const r=1/n.Tf,d=f.color[0]**r,m=f.color[1]**r,h=f.color[2]**r,p=f.emissiveFactor[0]**r,x=f.emissiveFactor[1]**r,M=f.emissiveFactor[2]**r,B=null!=f.colorTexture&&y?a.get(f.colorTexture):null,S=(0,Q.Jr)(f),A=null!=f.normalTextureTransform?.scale?f.normalTextureTransform?.scale:l.Un;i.set(g,new V.$U({...o,customDepthTest:k.it.Lequal,textureAlphaMode:b,textureAlphaCutoff:f.alphaCutoff,diffuse:[d,m,h],ambient:[d,m,h],opacity:"OPAQUE"===f.alphaMode?1:f.opacity,doubleSided:f.doubleSided,doubleSidedType:"winding-order",cullFace:f.doubleSided?k.s2.None:k.s2.Back,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:v?K.W.Attribute:K.W.ScreenDerivative,castShadows:!0,receiveShadows:f.receiveShadows,receiveAmbientOcclusion:f.receiveAmbientOcclusion,textureId:null!=B?B.id:void 0,colorMixMode:f.colorMixMode,normalTextureId:null!=f.normalTexture&&y?a.get(f.normalTexture).id:void 0,textureAlphaPremultiplied:null!=B&&!!B.parameters.preMultiplyAlpha,occlusionTextureId:null!=f.occlusionTexture&&y?a.get(f.occlusionTexture).id:void 0,emissiveTextureId:null!=f.emissiveTexture&&y?a.get(f.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=f.metallicRoughnessTexture&&y?a.get(f.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[p,x,M],mrrFactors:S?Q.Bt:[f.metallicFactor,f.roughnessFactor,o.mrrFactors[2]],isSchematic:S,colorTextureTransformMatrix:T(f.colorTextureTransform),normalTextureTransformMatrix:T(f.normalTextureTransform),scale:[A[0],A[1]],occlusionTextureTransformMatrix:T(f.occlusionTextureTransform),emissiveTextureTransformMatrix:T(f.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:T(f.metallicRoughnessTextureTransform),...s},c))}const x=i.get(g);if(r.stageResources.materials.push(x),y){const e=e=>{null!=e&&r.stageResources.textures.push(a.get(e))};e(f.colorTexture),e(f.normalTexture),e(f.occlusionTexture),e(f.emissiveTexture),e(f.metallicRoughnessTexture)}return x}(u,e,_,t,r,d,b,o,c),{geometry:f,vertexCount:M}=function(e,t){const r=e.attributes.position.count,n=(0,x.x)(e.indices||r,e.primitiveType),o=(0,h.oe)(3*r),{typedBuffer:a,typedBufferStride:c}=e.attributes.position;(0,g.t)(o,a,e.transform,3,c);const u=[[j.r.POSITION,new N.n(o,n,3,!0)]];if(null!=e.attributes.normal){const t=(0,h.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([j.r.NORMAL,new N.n(t,n,3,!0)])}if(null!=e.attributes.tangent){const t=(0,h.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([j.r.TANGENT,new N.n(t,n,4,!0)])}if(null!=e.attributes.texCoord0){const t=(0,h.oe)(2*r),{typedBuffer:o,typedBufferStride:s}=e.attributes.texCoord0;(0,v.a)(t,o,2,s),u.push([j.r.UV0,new N.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([j.r.COLOR,new N.n(t,n,4,!0)])}return{geometry:new D.V(t,u),vertexCount:r}}(e,a??new V.$U({},o)),S=f.boundingInfo;null!=S&&0===A&&((0,m.iT)(B,S.bbMin),(0,m.iT)(B,S.bbMax)),null!=a&&(_.stageResources.geometries.push(f),_.numberOfVertices+=M)})),R||f.push(_)})),{engineResources:f,referenceBoundingBox:B}}(M,Z,te,t,a.specifiedLodIndex,_);return{lods:re,referenceBoundingBox:ne,isEsriSymbolResource:M.meta.isEsriSymbolResource,isWosr:!1}}const ee=(0,a.vt)()},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],m=r[7],h=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+m*y,e[g+2]=c*r+f*s+h*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],m=r[6],h=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],S=t[T+3];e[B]=a*r+f*o+p*i+b*S,e[B+1]=c*r+d*o+g*i+x*S,e[B+2]=u*r+m*o+y*i+w*S,e[B+3]=l*r+h*o+v*i+M*S,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],m=r[9],h=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],S=M[r+2],A=M[r+3];x[t]=o*n+c*B+d*S+g*A,x[t+1]=s*n+u*B+m*S+y*A,x[t+2]=i*n+l*B+h*S+v*A,x[t+3]=a*n+f*B+p*S+b*A}}},Symbol.toStringTag,{value:"Module"}))},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"},69270:(e,t,r)=>{var n;r.d(t,{c:()=>n}),function(e){e[e.Bind=0]="Bind",e[e.Pass=1]="Pass",e[e.Draw=2]="Draw"}(n||(n={}))},71351:(e,t,r)=>{r.d(t,{C:()=>f,Cr:()=>d,LV:()=>l,kb:()=>m,oC:()=>h,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 m(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 h(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)()},73354:(e,t,r)=>{r.d(t,{a:()=>f,b:()=>a,c:()=>i,d:()=>o,e:()=>d,f:()=>l,l:()=>u,n:()=>m,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],m=r[9],h=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+m*x+g,e[b+2]=c*r+f*s+h*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],m=r[7],h=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+m*y,e[g+2]=c*r+f*s+h*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){m(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function m(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:m,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"}))},74333:(e,t,r)=>{r.d(t,{n:()=>o}),r(44208);var n=r(69270);class o{constructor(e,t,r,o,s=null){if(this.name=e,this.type=t,this.arraySize=s,this.bind={[n.c.Bind]:null,[n.c.Pass]:null,[n.c.Draw]:null},o)switch(r){case void 0:break;case n.c.Bind:this.bind[n.c.Bind]=o;break;case n.c.Pass:this.bind[n.c.Pass]=o;break;case n.c.Draw:this.bind[n.c.Draw]=o}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}},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}},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"}))},96336:(e,t,r)=>{r.d(t,{W:()=>n,Y:()=>c});var n,o,s=r(21818),i=r(31821),a=r(46540);function c(e,t){switch(t.normalType){case n.Compressed:e.attributes.add(a.r.NORMALCOMPRESSED,"vec2"),e.vertex.code.add(i.H`vec3 decompressNormal(vec2 normal) {
30
30
  float z = 1.0 - abs(normal.x) - abs(normal.y);
31
31
  return vec3(normal + sign(normal) * min(z, 0.0), z);
32
32
  }