@arcgis/core 4.29.7 → 4.29.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{4984e2b79d862114d6a6.js → 1a8d56e01ddfec2257c3.js} +1 -1
- package/assets/esri/core/workers/chunks/{a8ac511280f873960d46.js → 1dc474a28d5ddac1a4b7.js} +1 -1
- package/assets/esri/core/workers/chunks/{3afb525a131b6841276b.js → 1e4d779a884f13762601.js} +1 -1
- package/assets/esri/core/workers/chunks/{2447a4d5886aeb0ff72a.js → 205597cd91cb7ff3d2b4.js} +1 -1
- package/assets/esri/core/workers/chunks/{6c50daccd84ba5545bfe.js → 22ebdec0867e44d8d58c.js} +1 -1
- package/assets/esri/core/workers/chunks/{fc5ac713872766571e07.js → 31c065746e53f7518c17.js} +1 -1
- package/assets/esri/core/workers/chunks/{da4616b02dd0c3dd3d5d.js → 321547d796a2ecd72ab4.js} +1 -1
- package/assets/esri/core/workers/chunks/{6c3ae96ec90e9ed7dd50.js → 32be478638e9e643ea32.js} +1 -1
- package/assets/esri/core/workers/chunks/{c556644bb0cf88770939.js → 413978b96c88d5ff01ee.js} +1 -1
- package/assets/esri/core/workers/chunks/{a61f337802ae963d7f65.js → 59f03847a9eb96e5f65c.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a98d2e026f63a581b1e.js → 5b08309b184f5d8345a0.js} +1 -1
- package/assets/esri/core/workers/chunks/{8225febaf0a412f4cee4.js → 5e4465448b2728cafab0.js} +1 -1
- package/assets/esri/core/workers/chunks/6301990e489d31596bc8.js +1 -0
- package/assets/esri/core/workers/chunks/631bda7b99a27f4453c1.js +1 -0
- package/assets/esri/core/workers/chunks/{c527692694688a5b3b07.js → 658a8ee9a4f24bc03f7f.js} +1 -1
- package/assets/esri/core/workers/chunks/{9a8ab968ebb18480481d.js → 8699eaadd3fb6709fd94.js} +1 -1
- package/assets/esri/core/workers/chunks/{b139cf91bc148aa84419.js → 96cb79adabfbbcc3e707.js} +1 -1
- package/assets/esri/core/workers/chunks/99ac2a6a5be0604ee4c2.js +1 -0
- package/assets/esri/core/workers/chunks/{2433b39624a7e274cb98.js → b4c41a8244b7371e864e.js} +1 -1
- package/assets/esri/core/workers/chunks/{48db6e0bbb1a9c043193.js → b7a78246d25dc07f173d.js} +1 -1
- package/assets/esri/core/workers/chunks/{60ab18c6a04d4b2f1d4c.js → bb05528d2ca12c57a031.js} +1 -1
- package/assets/esri/core/workers/chunks/{b42a83db83851cb57d44.js → bed684a8d38fa7ac5eb7.js} +1 -1
- package/assets/esri/core/workers/chunks/{5227f9eea6988aadad7f.js → cf0dc0ccbeaf9458de6e.js} +1 -1
- package/assets/esri/core/workers/chunks/{f59b5ea05caca8a1a398.js → d40408be9bbcb0021d18.js} +1 -1
- package/assets/esri/core/workers/chunks/{fe74ee642bc72fe18210.js → d576aa444ad7c9289617.js} +1 -1
- package/assets/esri/core/workers/chunks/{f60e5dd0e712cf32f782.js → f2e8b75ad3b574894ade.js} +1 -1
- package/assets/esri/core/workers/chunks/{b9c55ff1f21db198ce03.js → ff96940be6a4c8489ebb.js} +1 -1
- package/chunks/Laserlines.glsl.js +1 -1
- package/chunks/sphere.js +1 -1
- package/chunks/vec32.js +1 -1
- package/chunks/vec42.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/libs/gl-matrix-2/math/vec4.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/interfaces.d.ts +5 -5
- package/kernel.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/voxel/VoxelVolume.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/MultiTileMeshData.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
- package/views/2d/layers/features/support/GraphicsReader.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/layers/support/makeScheduleFunction.js +5 -0
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/global/ZoomController.js +1 -1
- package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
- package/views/3d/state/controllers/momentum/ZoomSphericalMomentumController.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/geometryUtils/sphere.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
- package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
- package/views/support/geometry3dUtils.js +1 -1
- package/assets/esri/core/workers/chunks/967812e66fef41febb98.js +0 -1
- package/assets/esri/core/workers/chunks/a28b7d868346e13468bb.js +0 -1
- package/assets/esri/core/workers/chunks/ccd53b81c2688dd11584.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5368],{44247:(e,t,r)=>{async function s(e,t){const{WhereClause:s}=await Promise.all([r.e(3220),r.e(988)]).then(r.bind(r,63220));return s.create(e,t)}function i(e,t){return null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{_:()=>i,u:()=>s})},8444:(e,t,r)=>{r.r(t),r.d(t,{default:()=>be});var s=r(41948),i=r(3856),o=r(2952),n=r(20744),a=r(79152),l=r(26496),p=r(10860),u=r(57896),d=r(44247),c=r(28176),y=r(1580),h=(r(9456),r(66360)),g=(r(72052),r(33600)),f=r(12552),m=r(81436),b=r(38724),v=r(16660),w=r(25216),q=r(28584),S=r(6576),_=r(36388),F=r(66576),E=r(98768),A=r(26916),C=r(3116),x=r(19560),I=r(48212),T=r(21488),O=r(70388),R=r(81732),j=r(564),L=r(82692),P=r(99704),Q=(r(73868),r(90200),r(12836),r(63718),r(2360)),D=r(64624),G=r(24948),M=(r(70236),r(22156)),U=r(62088),$=r(95800),N=r(58820),V=r(18996),k=r(64408),z=r(36600),H=r(87352),W=r(6168),B=r(34880),K=r(95776),J=r(65548),Y=r(45704);const Z={key:"type",base:Q.c,errorContext:"renderer",typeMap:{simple:D.c,"unique-value":G.c,"class-breaks":P.c}},X=(0,R.l)(),ee=(0,k.g)({types:Z});let te=0;function re(e){const t=e.json.write;return"object"==typeof t?t.ignoreOrigin=!0:e.json.write={ignoreOrigin:!0},e}function se(e){switch(e){case"point":case"multipoint":return Y.Uz.clone();case"polyline":return Y.Uj.clone();case"polygon":case"multipatch":return Y.Sg.clone();default:return null}}function ie(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function oe(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const s={},i=ie(e,t);if(null!=i){const{defaultValues:e}=i;for(const t in e)s[t]=e[t]}return s[t.subtypeField]=e,new H.c({name:"New Feature",drawingTool:r,prototype:{attributes:s}})}const ne="esri.layers.support.SubtypeSublayer";let ae=class extends((0,l.U)((0,i.q)((0,M.MR)($.c)))){constructor(e){super(e),this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${te++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}load(e){return(0,j.Gi)(this.renderer,this.fieldsIndex),Promise.resolve(this)}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}writeFieldOverrides(e,t,r){const{fields:s,parent:i}=this;let o;if(s){o=[];let e=0;s.forEach((({name:t,alias:r,editable:s,visible:n})=>{if(!n)return;const a=i?.fields?.find((e=>e.name===t));if(!a)return;const l={name:t};let p=!1;r!==a.alias&&(l.alias=r,p=!0),s!==a.editable&&(l.editable=s,p=!0),o.push(l),p&&e++})),0===e&&o.length===s.length&&(o=null)}else o=(0,U.ct)(e);o?.length&&(0,N.qQ)(r,o,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,s=e?.fields;if(!e||!s?.length)return null;const{subtypes:i,subtypeField:o}=e,n=i?.find((e=>e.code===r)),a=n?.defaultValues,l=n?.domains,p=[];for(const e of s){const s=e.clone(),{name:i}=s,n=t?.find((e=>e.name===i));if(s.visible=!t||!!n,n){const{alias:e,editable:t}=n;e&&(s.alias=e),!1===t&&(s.editable=!1)}const u=a?.[i]??null;s.defaultValue=i===o?r:u;const d=l?.[i]??null;s.domain=i===o?null:d?"inherited"===d.type?s.domain:d.clone():null,p.push(s)}return p}get floorInfo(){return this.parent?.floorInfo}get geometryType(){return this.parent?.geometryType}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||h.c.getLogger(ne).error(pe("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,j.Gi)(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?function(e){return new D.c({symbol:se(e)})}(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const s=t.drawingInfo?.renderer,i=ee(s,t,r);let o;const{subtypeCode:n}=this;if(null!=n&&function(e,t){return!(!t||"unique-value"!==e?.type||"string"!=typeof e.field||e.field.toLowerCase()!==t.toLowerCase()||e.field2||e.field3||e.valueExpression)}(i,t.subtypeField)){const e=i.uniqueValueInfos?.find((({value:e})=>(e="number"==typeof e?String(e):e)===String(n)));e&&(o=new D.c({symbol:e.symbol}))}else"simple"!==i?.type||i.visualVariables?.length||(o=i);return o}readRenderer(e,t,r){const s=t?.layerDefinition?.drawingInfo?.renderer;if(!s)return;const i=s.visualVariables?.some((e=>"rotationInfo"!==e.type));return i?void 0:ee(s,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference}get subtypeField(){return this.parent?.subtypeField}readTemplatesFromService(e,t){return[oe(this.subtypeCode,t)]}readTitleFromService(e,t){const r=ie(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw pe("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new n.c("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:s}=this;if(!s)throw pe("updateAttachment");if(e.getAttribute(s.subtypeField)!==this.subtypeCode)throw new n.c("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return s.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw pe("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new n.c("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw pe("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:s,title:i}=this;if(r){const{displayField:e,editFieldsInfo:o,objectIdField:n}=r;t={displayField:e,editFieldsInfo:o,fields:s,objectIdField:n,title:i}}return(0,J.Ap)(t,e)}createQuery(){if(!this.parent)throw pe("createQuery");const e=(0,O.cJ)(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=(0,d._)(t,this.parent.definitionExpression),e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e){return this._getLayerDomain(e)}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw pe("queryAttachments");const s=e.clone();return s.where=le(s.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(e,t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw pe("queryFeatures");const s=K.c.from(e)??r.createQuery();return null!=e&&(s.where=le(s.where,r.parent.subtypeField,r.subtypeCode)),r.parent.queryFeatures(s,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};(0,s._)([(0,y.qq)({readOnly:!0,json:{read:!1}})],ae.prototype,"capabilities",null),(0,s._)([(0,y.qq)({readOnly:!0,json:{read:!1}})],ae.prototype,"effectiveCapabilities",null),(0,s._)([(0,y.qq)({json:{write:{ignoreOrigin:!0}}})],ae.prototype,"charts",void 0),(0,s._)([(0,y.qq)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:{ignoreOrigin:!0}}})],ae.prototype,"editingEnabled",void 0),(0,s._)([(0,y.qq)({type:Boolean,readOnly:!0})],ae.prototype,"effectiveEditingEnabled",null),(0,s._)([(0,y.qq)({readOnly:!0,json:{read:!1}})],ae.prototype,"elevationInfo",null),(0,s._)([(0,y.qq)({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],ae.prototype,"fieldOverrides",void 0),(0,s._)([(0,V.G)("fieldOverrides")],ae.prototype,"writeFieldOverrides",null),(0,s._)([(0,y.qq)({...X.fields,readOnly:!0,json:{read:!1}})],ae.prototype,"fields",null),(0,s._)([(0,y.qq)(X.fieldsIndex)],ae.prototype,"fieldsIndex",void 0),(0,s._)([(0,y.qq)({readOnly:!0,json:{read:!1}})],ae.prototype,"floorInfo",null),(0,s._)([(0,y.qq)({type:z.c,json:{name:"formInfo",write:{ignoreOrigin:!0}}})],ae.prototype,"formTemplate",void 0),(0,s._)([(0,y.qq)({type:String,clonable:!1,readOnly:!0,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],ae.prototype,"id",void 0),(0,s._)([(0,y.qq)({readOnly:!0,json:{read:!1}})],ae.prototype,"geometryType",null),(0,s._)([(0,y.qq)({readOnly:!0,json:{read:!1}})],ae.prototype,"type",void 0),(0,s._)([(0,y.qq)(re((0,U.ct)(T.Wu)))],ae.prototype,"labelsVisible",void 0),(0,s._)([(0,y.qq)({type:[W.c],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:B.E},write:{ignoreOrigin:!0}}})],ae.prototype,"labelingInfo",void 0),(0,s._)([(0,y.qq)({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],ae.prototype,"layerType",void 0),(0,s._)([(0,y.qq)(re((0,U.ct)(T.Uj)))],ae.prototype,"legendEnabled",void 0),(0,s._)([(0,y.qq)({type:["show","hide"]})],ae.prototype,"listMode",void 0),(0,s._)([(0,y.qq)((()=>{const e=(0,U.ct)(T.Og);return e.json.origins.service.read=!1,re(e)})())],ae.prototype,"minScale",void 0),(0,s._)([(0,y.qq)((()=>{const e=(0,U.ct)(T.ED);return e.json.origins.service.read=!1,re(e)})())],ae.prototype,"maxScale",void 0),(0,s._)([(0,y.qq)({readOnly:!0})],ae.prototype,"effectiveScaleRange",null),(0,s._)([(0,y.qq)({readOnly:!0,json:{read:!1}})],ae.prototype,"objectIdField",null),(0,s._)([(0,y.qq)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],ae.prototype,"opacity",void 0),(0,s._)([(0,y.qq)({clonable:!1})],ae.prototype,"parent",void 0),(0,s._)([(0,y.qq)(re((0,U.ct)(T.Ou)))],ae.prototype,"popupEnabled",void 0),(0,s._)([(0,y.qq)({type:L.c,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],ae.prototype,"popupTemplate",void 0),(0,s._)([(0,y.qq)({readOnly:!0})],ae.prototype,"defaultPopupTemplate",null),(0,s._)([(0,y.qq)({types:Z,json:{write:{target:"layerDefinition.drawingInfo.renderer",ignoreOrigin:!0}}})],ae.prototype,"renderer",null),(0,s._)([(0,g.E)("service","renderer",["drawingInfo.renderer","subtypeField","type"])],ae.prototype,"readRendererFromService",null),(0,s._)([(0,g.E)("renderer",["layerDefinition.drawingInfo.renderer"])],ae.prototype,"readRenderer",null),(0,s._)([(0,y.qq)({readOnly:!0,json:{read:!1}})],ae.prototype,"spatialReference",null),(0,s._)([(0,y.qq)({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],ae.prototype,"subtypeCode",void 0),(0,s._)([(0,y.qq)({readOnly:!0,json:{read:!1}})],ae.prototype,"subtypeField",null),(0,s._)([(0,y.qq)({type:[H.c],json:{name:"layerDefinition.templates",write:{ignoreOrigin:!0}}})],ae.prototype,"templates",void 0),(0,s._)([(0,g.E)("service","templates",["geometryType","subtypeField","subtypes","type"])],ae.prototype,"readTemplatesFromService",null),(0,s._)([(0,y.qq)({type:String,json:{write:{ignoreOrigin:!0}}})],ae.prototype,"title",void 0),(0,s._)([(0,g.E)("service","title",["subtypes"])],ae.prototype,"readTitleFromService",null),(0,s._)([(0,y.qq)({readOnly:!0,json:{read:!1}})],ae.prototype,"url",null),(0,s._)([(0,y.qq)({readOnly:!0})],ae.prototype,"userHasUpdateItemPrivileges",null),(0,s._)([(0,y.qq)({type:Boolean,nonNullable:!0,json:{name:"visibility",write:{ignoreOrigin:!0}}})],ae.prototype,"visible",void 0),ae=(0,s._)([(0,f.c)(ne)],ae);const le=(e,t,r)=>{const s=new RegExp(`${t}\\s*=\\s*\\d+`),i=`${t}=${r}`,o=e??"";return s.test(o)?o.replace(s,i):(0,d._)(i,o)},pe=e=>new n.c(`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`),ue=ae;var de=r(99336),ce=r(98984),ye=r(8616);const he="SubtypeGroupLayer";function ge(e,t){return new n.c("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}const fe=(0,R.l)();let me=class extends((0,_.S)((0,S.CE)((0,w.W)((0,x.u)((0,C.I)((0,A.G)((0,v.u)((0,F.Y)((0,E.K)((0,l.U)((0,q.G)((0,b.C)((0,i.q)(m.c)))))))))))))){constructor(...e){super(...e),this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.sublayers=new(o.c.ofType(ue)),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this._debouncedSaveOperations=(0,p.Cu)((async(e,t,s)=>{const{save:i,saveAs:o}=await r.e(972).then(r.bind(r,70972));switch(e){case ye.U.SAVE:return i(this,t);case ye.U.SAVE_AS:return o(this,s,t)}})),this.addHandles((0,u.aE)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),u.du))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(p.CE).then((async()=>{if(!this.url)throw new n.c("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new n.c("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(t))})).then((()=>(0,O.oh)(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return(0,O.ig)(this)}get parsedUrl(){const e=(0,c.as)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,c.kn)(e.path,this.layerId.toString())),e}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?(0,I.q_)(this.url,t):t}async addAttachment(e,t){return(0,O.wj)(this,e,t,he)}async updateAttachment(e,t,r){return(0,O.kd)(this,e,t,r,he)}async applyEdits(e,t){return(0,O.cV)(this,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){const{default:t}=await(0,p.Yv)(Promise.all([r.e(2848),r.e(5468),r.e(572),r.e(8136)]).then(r.bind(r,50572)),e);return new t({layer:this}).load({signal:e})}createQuery(){const e=(0,O.cJ)(this),t=this.sublayers.map((e=>e.subtypeCode));return e.where=(0,d._)(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){return(0,O.WC)(this,e,t,he)}async fetchRecomputedExtents(e){return(0,O.s1)(this,e,he)}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}loadAll(){return(0,a.A)(this,(e=>{e(this.sublayers)}))}async queryAttachments(e,t){return(0,O.Q1)(this,e,t,he)}async queryFeatures(e,t){const r=await this.load(),s=K.c.from(e)??r.createQuery(),i=s.outFields??[];i.includes(this.subtypeField)||(i.push(this.subtypeField),s.outFields=i);const o=await r.source.queryFeatures(s,t);if(o?.features)for(const e of o.features)e.layer=e.sourceLayer=this.findSublayerForFeature(e);return o}async queryObjectIds(e,t){return(0,O.W2)(this,e,t,he)}async queryFeatureCount(e,t){return(0,O.YL)(this,e,t,he)}async queryExtent(e,t){return(0,O.iq)(this,e,t,he)}async queryRelatedFeatures(e,t){return(0,O.ms)(this,e,t,he)}async queryRelatedFeaturesCount(e,t){return(0,O.UN)(this,e,t,he)}async save(e){return this._debouncedSaveOperations(ye.U.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(ye.U.SAVE_AS,t,e)}write(e,t){const{origin:r,layerContainerType:s,messages:i}=t;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==s)return i?.push(ge(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===s)return i?.push(ge(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,t):(i?.push(new n.c("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&(0,ce.o)(this,e)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}async _initLayerProperties(e){this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),this.isTable)throw new n.c("subtype-grouplayer:unsupported-source","SubtypeGroupLayer cannot be created using a layer with table source");if(!this.subtypes?.length)throw new n.c("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),(0,j.Wc)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,O.yo)(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach((e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),e.on("after-remove",(({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)}))],"sublayers-owner"))}};(0,s._)([(0,y.qq)({readOnly:!0})],me.prototype,"createQueryVersion",null),(0,s._)([(0,y.qq)({readOnly:!0})],me.prototype,"editingEnabled",null),(0,s._)([(0,y.qq)({readOnly:!0})],me.prototype,"effectiveEditingEnabled",null),(0,s._)([(0,y.qq)({...fe.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],me.prototype,"fields",void 0),(0,s._)([(0,y.qq)(fe.fieldsIndex)],me.prototype,"fieldsIndex",void 0),(0,s._)([(0,y.qq)(T.id)],me.prototype,"id",void 0),(0,s._)([(0,y.qq)({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],me.prototype,"listMode",void 0),(0,s._)([(0,y.qq)({value:"SubtypeGroupLayer",type:["SubtypeGroupLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],me.prototype,"operationalLayerType",void 0),(0,s._)([(0,y.qq)(fe.outFields)],me.prototype,"outFields",void 0),(0,s._)([(0,y.qq)({readOnly:!0})],me.prototype,"parsedUrl",null),(0,s._)([(0,y.qq)({clonable:!1})],me.prototype,"source",null),(0,s._)([(0,y.qq)({type:o.c.ofType(ue),json:{origins:{service:{read:{source:"subtypes",reader:(e,t,r)=>{const s=e.map((({code:e})=>{const s=new ue({subtypeCode:e});return s.read(t,r),s}));return new(o.c.ofType(ue))(s)}}}},name:"layers",write:{ignoreOrigin:!0}}})],me.prototype,"sublayers",void 0),(0,s._)([(0,y.qq)({type:de.c})],me.prototype,"timeInfo",void 0),(0,s._)([(0,y.qq)({json:{origins:{"portal-item":{write:{enabled:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],me.prototype,"title",void 0),(0,s._)([(0,g.E)("service","title",["name"])],me.prototype,"readTitleFromService",null),(0,s._)([(0,y.qq)({json:{read:!1}})],me.prototype,"type",void 0),me=(0,s._)([(0,f.c)("esri.layers.SubtypeGroupLayer")],me);const be=me},38724:(e,t,r)=>{r.d(t,{C:()=>n});var s=r(41948),i=r(1580),o=(r(9456),r(66360),r(72052),r(12552));const n=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,i.qq)({type:String})],t.prototype,"apiKey",null),t=(0,s._)([(0,o.c)("esri.layers.mixins.APIKeyMixin")],t),t}},16660:(e,t,r)=>{r.d(t,{u:()=>l});var s=r(41948),i=r(66360),o=r(1580),n=(r(9456),r(72052),r(12552)),a=r(48212);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.K0)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.oR)(e,i.c.getLogger(this)))}};return(0,s._)([(0,o.qq)()],t.prototype,"title",null),(0,s._)([(0,o.qq)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,n.c)("esri.layers.mixins.ArcGISService")],t),t}},87352:(e,t,r)=>{r.d(t,{c:()=>d});var s=r(41948),i=r(3856),o=r(14628),n=r(40504),a=r(1580),l=(r(9456),r(66360),r(72052),r(12552));const p=new o.O({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,i.q)(n.am)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,s._)([(0,a.qq)({json:{write:!0}})],u.prototype,"name",void 0),(0,s._)([(0,a.qq)({json:{write:!0}})],u.prototype,"description",void 0),(0,s._)([(0,a.qq)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,s._)([(0,a.qq)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,s._)([(0,a.qq)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,s._)([(0,l.c)("esri.layers.support.FeatureTemplate")],u);const d=u},24144:(e,t,r)=>{r.d(t,{c:()=>u});var s,i=r(41948),o=r(2952),n=r(40504),a=r(1580),l=(r(9456),r(66360),r(72052),r(12552));let p=s=class extends n.am{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.c}clone(){return new s({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,i._)([(0,a.qq)({type:String,json:{write:!0}})],p.prototype,"floorField",void 0),(0,i._)([(0,a.qq)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,i._)([(0,a.qq)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=s=(0,i._)([(0,l.c)("esri.layers.support.LayerFloorInfo")],p);const u=p},4144:(e,t,r)=>{r.d(t,{GC:()=>_,I5:()=>g,Wi:()=>m,Y$:()=>h,cF:()=>f,wf:()=>b,y6:()=>y});var s=r(88264);const i="__begin__",o="__end__",n=new RegExp(i,"ig"),a=new RegExp(o,"ig"),l=new RegExp("^"+i,"i"),p=new RegExp(o+"$","i"),u='"',d=u+" + ",c=" + "+u;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function g(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function f(e){const t=g(e);if(!t)return null;switch(t.type){case"conventional":return b(t.expression);case"arcade":return t.expression}return null}function m(e){const t=g(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(v);return t?.[1].trim()||null}(t.expression);case"arcade":return _(t.expression)}return null}function b(e){let t;return e?(t=(0,s.qq)(e,(e=>i+'$feature["'+e+'"]'+o)),t=l.test(t)?t.replace(l,""):u+t,t=p.test(t)?t.replace(p,""):t+u,t=t.replaceAll(n,d).replaceAll(a,c)):t='""',t}const v=/^\s*\{([^}]+)\}\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,q=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,S=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function _(e){if(!e)return null;let t=w.exec(e)||q.exec(e);return t?t[1]||t[3]:(t=S.exec(e),t?t[2]:null)}},54712:(e,t,r)=>{r.d(t,{S:()=>d});var s=r(9456),i=r(48212);function o(e,t,r){return!!a(e,t,r)}function n(e,t,r){return a(e,t,r)}function a(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const l={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function p(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function u(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function d(e,t){return{analytics:c(e),attachment:y(e),data:h(e),metadata:g(e),operations:f(e.capabilities,e,t),query:m(e,t),queryRelated:b(e),queryTopFeatures:v(e),editing:w(e)}}function c(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryAnalytics")}}function y(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:u(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:o(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=l[e.name];t&&(r[t]=!!e.isEnabled)})),r}function h(e){return{isVersioned:o(e,"isDataVersioned",!1),supportsAttachment:o(e,"hasAttachments",!1),supportsM:o(e,"hasM",!1),supportsZ:o(e,"hasZ",!1)}}function g(e){return{supportsAdvancedFieldProperties:o(e,"supportsFieldDescriptionProperty",!1)}}function f(e,t,r){const s=e?e.toLowerCase().split(",").map((e=>e.trim())):[],n=r?(0,i.K0)(r):null,a=s.includes(null!=n&&"MapServer"===n.serverType?"data":"query"),l=s.includes("editing")&&!t.datesInUnknownTimezone;let p=l&&s.includes("create"),u=l&&s.includes("delete"),d=l&&s.includes("update");const c=s.includes("changetracking"),y=t.advancedQueryCapabilities;return l&&!(p||u||d)&&(p=u=d=!0),{supportsCalculate:o(t,"supportsCalculate",!1),supportsTruncate:o(t,"supportsTruncate",!1),supportsValidateSql:o(t,"supportsValidateSql",!1),supportsAdd:p,supportsDelete:u,supportsEditing:l,supportsChangeTracking:c,supportsQuery:a,supportsQueryAnalytics:o(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:o(y,"supportsQueryAttachments",!1),supportsQueryTopFeatures:o(y,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:o(t,"supportsAttachmentsResizing",!1),supportsSync:s.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:o(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:o(t,"supportsAsyncConvert3D",!1)}}function m(e,t){const r=e.advancedQueryCapabilities,a=e.ownershipBasedAccessControlForFeatures,l=e.archivingInfo,d=e.currentVersion,c=t?.includes("MapServer"),y=!c||d>=(0,s.c)("mapserver-pbf-version-support"),h=(0,i.Wq)(t),g=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:o(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:o(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:o(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:p(r),supportsCentroid:o(r,"supportsReturningGeometryCentroid",!1),supportsDistance:o(r,"supportsQueryWithDistance",!1),supportsDistinct:o(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:o(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:o(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:o(r,"supportsHavingClause",!1),supportsOrderBy:o(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:o(r,"supportsPagination",!1),supportsQuantization:o(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:o(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:o(e,"supportsReturningQueryGeometry",!1),supportsResultType:o(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:o(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:o(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:o(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:o(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:o(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:o(a,"allowOthersToQuery",!0),supportsHistoricMoment:o(l,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:y&&g.has("pbf"),supportsDisjointSpatialRelationship:o(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:o(r,"supportsQueryWithCacheHint",!1)||u(r,"query"),supportsDefaultSpatialReference:o(r,"supportsDefaultSR",!1),supportsCompactGeometry:h,supportsFullTextSearch:o(r,"supportsFullTextSearch",!1),maxRecordCountFactor:n(e,"maxRecordCountFactor",void 0),maxRecordCount:n(e,"maxRecordCount",void 0),standardMaxRecordCount:n(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:n(e,"tileMaxRecordCount",void 0)}}function b(e){const t=e.advancedQueryCapabilities,r=o(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:o(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:u(t,"queryRelated")}}function v(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryTopFilter")}}function w(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:o(e,"allowGeometryUpdates",!0),supportsGlobalId:o(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:o(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:o(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:o(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:o(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:o(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:o(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:o(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:o(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:o(r,"supportsAsyncApplyEdits",!1),zDefault:n(e,"zDefault",void 0)}}},45704:(e,t,r)=>{r.d(t,{Sg:()=>u,Uj:()=>p,Uz:()=>l,YP:()=>d}),r(9456);var s=r(47472),i=r(7432),o=r(49736),n=r(28652),a=r(9504);const l=o.c.fromJSON(a.qe),p=i.c.fromJSON(a.MZ),u=s.c.fromJSON(a.yq),d=n.c.fromJSON(a.gF);o.c.fromJSON(a.gP),i.c.fromJSON(a.aV),s.c.fromJSON(a.wp)},9504:(e,t,r)=>{r.d(t,{MZ:()=>o,aV:()=>p,gF:()=>a,gP:()=>l,qe:()=>i,wp:()=>u,yq:()=>n});const s=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},n={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
@@ -277,7 +277,7 @@ return fallOffFunction(vv, vn, 0.1);
|
|
|
277
277
|
|
|
278
278
|
fragBlur = b / w_total;
|
|
279
279
|
}
|
|
280
|
-
`),e}const p=Object.freeze(Object.defineProperty({__proto__:null,build:f},Symbol.toStringTag,{value:"Module"}))},84752:(e,t,r)=>{r.d(t,{a:()=>T,c:()=>x,d:()=>v,f:()=>b,g:()=>E,i:()=>w,n:()=>L}),r(9456);var i=r(66360),o=r(53648),a=r(15008),n=r(98472),s=r(62484),l=r(74784),c=r(37008),d=r(47364),u=r(82315),h=r(90484),m=r(48880),f=r(20136);const p=v();function v(){return(0,c.Su)()}const g=l.e,_=l.e;function x(e,t){return(0,l.c)(t,e)}function T(e){return e[3]}function E(e){return e}function b(e,t,r,i){return(0,c.WK)(e,t,r,i)}function S(e,t,r){if(null==t)return!1;if(!y(e,t,A))return!1;let{t0:i,t1:o}=A;if((i<0||o<i&&o>0)&&(i=o),i<0)return!1;if(r){const{origin:e,direction:o}=t;r[0]=e[0]+o[0]*i,r[1]=e[1]+o[1]*i,r[2]=e[2]+o[2]*i}return!0}const A={t0:0,t1:0};function y(e,t,r){const{origin:i,direction:o}=t,a=C;a[0]=i[0]-e[0],a[1]=i[1]-e[1],a[2]=i[2]-e[2];const n=o[0]*o[0]+o[1]*o[1]+o[2]*o[2];if(0===n)return!1;const s=2*(o[0]*a[0]+o[1]*a[1]+o[2]*a[2]),l=s*s-4*n*(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]-e[3]*e[3]);if(l<0)return!1;const c=Math.sqrt(l);return r.t0=(-s-c)/(2*n),r.t1=(-s+c)/(2*n),!0}const C=(0,s.Su)();function w(e,t){return S(e,t,null)}function M(e,t,r){const i=f.Wq.get(),o=f.SW.get();(0,n.b)(i,t.origin,t.direction);const s=T(e);(0,n.b)(r,i,t.origin),(0,n.h)(r,r,1/(0,n.l)(r)*s);const l=I(e,t.origin),c=(0,m.i4)(t.origin,r);return(0,a.IT)(o,c+l,i),(0,n.e)(r,r,o),r}function R(e,t,r){const i=(0,n.f)(f.Wq.get(),t,e),o=(0,n.h)(f.Wq.get(),i,e[3]/(0,n.l)(i));return(0,n.g)(r,o,e)}function I(e,t){const r=(0,n.f)(f.Wq.get(),t,e),i=(0,n.l)(r),a=T(e),s=a+Math.abs(a-i);return(0,o.Uj)(a/s)}const O=(0,s.Su)();function N(e,t,r,i){const a=(0,n.f)(O,t,e);switch(r){case u.k.X:{const e=(0,o.Iv)(a,O)[2];return(0,n.s)(i,-Math.sin(e),Math.cos(e),0)}case u.k.Y:{const e=(0,o.Iv)(a,O),t=e[1],r=e[2],s=Math.sin(t);return(0,n.s)(i,-s*Math.cos(r),-s*Math.sin(r),Math.cos(t))}case u.k.Z:return(0,n.n)(i,a);default:return}}function P(e,t){const r=(0,n.f)(D,t,e);return(0,n.l)(r)-e[3]}function L(e,t){const r=(0,n.a)(e,t),i=T(e);return r<=i*i}const D=(0,s.Su)(),F=v();Object.freeze(Object.defineProperty({__proto__:null,NullSphere:p,altitudeAt:P,angleToSilhouette:I,axisAt:N,clear:function(e){e[0]=e[1]=e[2]=e[3]=0},closestPoint:function(e,t,r){return S(e,t,r)?r:((0,h.CE)(t,e,r),R(e,r,r))},closestPointOnSilhouette:M,containsPoint:L,copy:x,create:v,distanceToSilhouette:function(e,t){const r=(0,n.f)(f.Wq.get(),t,e),i=(0,n.p)(r),o=e[3]*e[3];return Math.sqrt(Math.abs(i-o))},elevate:function(e,t,r){return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=e[3]+t,r},equals:_,exactEquals:g,fromCenterAndRadius:function(e,t){return(0,c.WK)(e[0],e[1],e[2],t)},fromRadius:function(e,t){return e[0]=e[1]=e[2]=0,e[3]=t,e},fromValues:b,getCenter:E,getRadius:T,intersectLine:function(e,t,r){const i=(0,h.i_)(t,r);if(!y(e,i,A))return[];const{origin:o,direction:a}=i,{t0:l,t1:c}=A,u=t=>{const r=(0,s.Su)();return(0,n.r)(r,o,a,t),R(e,r,r)};return Math.abs(l-c)<(0,d.Au)()?[u(l)]:[u(l),u(c)]},intersectRay:S,intersectRayClosestSilhouette:function(e,t,r){if(S(e,t,r))return r;const i=M(e,t,f.Wq.get());return(0,n.g)(r,t.origin,(0,n.h)(f.Wq.get(),t.direction,(0,n.q)(t.origin,i)/(0,n.l)(t.direction))),r},intersectsRay:w,projectPoint:R,setAltitudeAt:function(e,t,r,i){const o=P(e,t),a=N(e,t,u.k.Z,D),s=(0,n.h)(D,a,r-o);return(0,n.g)(i,t,s)},setExtent:function(e,t,r){return i.c.getLogger("esri.geometry.support.sphere").error("sphere.setExtent is not yet supported"),e!==r&&x(e,r),r},tmpSphere:F,union:function(e,t,r=(0,c.Su)()){const i=(0,n.q)(e,t),o=e[3],a=t[3];return i+a<o?((0,l.c)(r,e),r):i+o<a?((0,l.c)(r,t),r):((0,n.m)(r,e,t,(i+a-o)/(2*i)),r[3]=(i+o+a)/2,r)},wrap:function(e){return e}},Symbol.toStringTag,{value:"Module"}))},52180:(e,t,r)=>{r.d(t,{o:()=>o});var i=r(52324);class o{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.o)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*a);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,a));e++)this._items.push(this._allocator())}}const a=1024},95728:(e,t,r)=>{r.d(t,{a:()=>o});var i=r(20744);let o=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.c(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[o,a]=t.split("."),n=/^\s*\d+\s*$/;if(!o?.match||!n.test(o))throw new i.c((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!a?.match||!n.test(a))throw new i.c((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const s=parseInt(o,10),l=parseInt(a,10);return new e(s,l,r)}}},8472:(e,t,r)=>{function i(e){return e=e||globalThis.location.hostname,c.some((t=>null!=e?.match(t)))}function o(e,t){return e&&(t=t||globalThis.location.hostname)?null!=t.match(a)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(n)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e}r.d(t,{OM:()=>i,Ur:()=>o});const a=/^devext.arcgis.com$/,n=/^qaext.arcgis.com$/,s=/^[\w-]*\.mapsdevext.arcgis.com$/,l=/^[\w-]*\.mapsqa.arcgis.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local.esri.com$/,a,n,/^jsapps.esri.com$/,s,l]},38600:(e,t,r)=>{function i(){return new Float32Array(2)}function o(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function a(){return i()}function n(){return o(1,1)}function s(){return o(1,0)}function l(){return o(0,1)}r.d(t,{Qw:()=>d,Su:()=>i,WK:()=>o,cX:()=>c});const c=a(),d=n(),u=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:u,UNIT_Y:h,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:i,createView:function(e,t){return new Float32Array(e,t,2)},fromValues:o,ones:n,unitX:s,unitY:l,zeros:a},Symbol.toStringTag,{value:"Module"}))},92896:(e,t,r)=>{r.d(t,{mc:()=>o});var i=r(72008);function o(e,t=!1){return e<=i._?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}},90484:(e,t,r)=>{r.d(t,{CE:()=>d,Su:()=>n,em:()=>l,i_:()=>c}),r(92400);var i=r(52180),o=r(98472),a=r(62484);function n(e){return e?s((0,a.ct)(e.origin),(0,a.ct)(e.direction)):s((0,a.Su)(),(0,a.Su)())}function s(e,t){return{origin:e,direction:t}}function l(e,t){const r=u.get();return r.origin=e,r.direction=t,r}function c(e,t,r=n()){return(0,o.c)(r.origin,e),(0,o.f)(r.direction,t,e),r}function d(e,t,r){const i=(0,o.k)(e.direction,(0,o.f)(r,t,e.origin));return(0,o.g)(r,e.origin,(0,o.h)(r,e.direction,i)),r}r(20136);const u=new i.o((()=>n()))},96472:(e,t,r)=>{r.d(t,{fetch:()=>jt});var i=r(8472),o=r(77556),a=r(68612),n=r(15008),s=r(87104),l=r(85256),c=r(98472),d=r(62484),u=r(77048),h=r(92896),m=r(71004),f=r(48952),p=r(92160),v=r(12240),g=r(88340),_=r(74960),x=r(57792),T=r(68268),E=r(2888),b=r(5472),S=r(38600);function A(e){if(null==e)return null;const t=null!=e.offset?e.offset:S.cX,r=null!=e.rotation?e.rotation:0,i=null!=e.scale?e.scale:S.Qw,n=(0,a.WK)(1,0,0,0,1,0,t[0],t[1],1),s=(0,a.WK)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,a.WK)(i[0],0,0,0,i[1],0,0,0,1),c=(0,a.Su)();return(0,o.iW)(c,s,l),(0,o.iW)(c,n,c),c}class y{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class C{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new y,this.numberOfVertices=0}}var w=r(2600),M=r(40196),R=r(33184),I=r(20744),O=r(66360);class N{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get(e,t){return this._outer.get(e)?.get(t)}set(e,t,r){const i=this._outer.get(e);i?i.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)))}}var P=r(10860),L=r(95728),D=r(97143);async function F(e,t){const{data:r}=await(0,w.c)(e,{responseType:"image",...t});return r}var U=r(89560),G=r(12260),B=r(71520),V=r(9456),z=r(77860),Y=r(70680),H=r(72008),W=r(28176),j=r(49628),q=r(24832);let K;var k,$;($=k||(k={}))[$.ETC1_RGB=0]="ETC1_RGB",$[$.ETC2_RGBA=1]="ETC2_RGBA",$[$.BC1_RGB=2]="BC1_RGB",$[$.BC3_RGBA=3]="BC3_RGBA",$[$.BC4_R=4]="BC4_R",$[$.BC5_RG=5]="BC5_RG",$[$.BC7_M6_RGB=6]="BC7_M6_RGB",$[$.BC7_M5_RGBA=7]="BC7_M5_RGBA",$[$.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",$[$.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",$[$.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",$[$.ATC_RGB=11]="ATC_RGB",$[$.ATC_RGBA=12]="ATC_RGBA",$[$.FXT1_RGB=17]="FXT1_RGB",$[$.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",$[$.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",$[$.ETC2_EAC_R11=20]="ETC2_EAC_R11",$[$.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",$[$.RGBA32=13]="RGBA32",$[$.RGB565=14]="RGB565",$[$.BGR565=15]="BGR565",$[$.RGBA4444=16]="RGBA4444";var X=r(77800),J=r(22184),Z=r(97684);let Q=null,ee=null;async function te(){return null==ee&&(ee=function(){if(null==K){const e=e=>(0,q.O)(`esri/libs/basisu/${e}`);K=r.e(4824).then(r.bind(r,84824)).then((e=>e.b)).then((({default:t})=>t({locateFile:e}).then((e=>(e.initializeBasis(),delete e.then,e)))))}return K}(),Q=await ee),ee}function re(e,t,r,i,o){const a=(0,Z.O4)(t?X.sr.COMPRESSED_RGBA8_ETC2_EAC:X.sr.COMPRESSED_RGB8_ETC2),n=o&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*a*n)}function ie(e){return e.getNumImages()>=1&&!e.isUASTC()}function oe(e){return e.getFaces()>=1&&e.isETC1S()}function ae(e,t,r,i,o,a,n,s){const{compressedTextureETC:l,compressedTextureS3TC:c}=e.capabilities,[d,u]=l?i?[k.ETC2_RGBA,X.sr.COMPRESSED_RGBA8_ETC2_EAC]:[k.ETC1_RGB,X.sr.COMPRESSED_RGB8_ETC2]:c?i?[k.BC3_RGBA,X.sr.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[k.BC1_RGB,X.sr.COMPRESSED_RGB_S3TC_DXT1_EXT]:[k.RGBA32,X.Id.RGBA],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(n(e,d))),s(e,d,m[e]);return t.internalFormat=u,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?X.Ud.LINEAR_MIPMAP_LINEAR:X.Ud.LINEAR,t.width=o,t.height=a,new J.w(e,t,{type:"compressed",levels:m})}var ne=r(58608),se=r(74376);const le=()=>O.c.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function ce(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const de=ce("DXT1"),ue=ce("DXT3"),he=ce("DXT5");function me(e,t,r){if(e instanceof ImageData)return me(fe(e),t,r);const i=document.createElement("canvas");return i.width=t,i.height=r,i.getContext("2d").drawImage(e,0,0,i.width,i.height),i}function fe(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new I.c("Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}var pe,ve,ge=r(90736),_e=r(51576);class xe extends ne.u{get parameters(){return this._parameters}constructor(e,t){super(),this._data=e,this.type=se.C.Texture,this._glTexture=null,this._loadingPromise=null,this._loadingController=null,this.events=new z.c,this._parameters={...Ee,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.frameUpdate=void 0}_startPreload(e){null!=e&&(e instanceof HTMLVideoElement?(this.frameUpdate=t=>this._frameUpdate(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e))}_startPreloadVideoElement(e){if(!((0,W.ue)(e.src)||"auto"===e.preload&&e.crossOrigin)){e.preload="auto",e.crossOrigin="anonymous";const t=!e.paused;if(e.src=e.src,t&&e.autoplay){const t=()=>{e.removeEventListener("canplay",t),e.play()};e.addEventListener("canplay",t)}}}_startPreloadImageElement(e){(0,W.o9)(e.src)||(0,W.ue)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new _e.O;return t.wrapMode=this._parameters.wrap??X.Qz.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?X.Ud.LINEAR_MIPMAP_LINEAR:X.Ud.LINEAR,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t}get glTexture(){return this._glTexture}get memoryEstimate(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,H.uk)(e)||(0,H.K2)(e))return t.encoding===G.yk.KTX2_ENCODING?function(e,t){if(null==Q)return e.byteLength;const r=new Q.KTX2File(new Uint8Array(e)),i=oe(r)?re(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):t.encoding===G.yk.BASIS_ENCODING?function(e,t){if(null==Q)return e.byteLength;const r=new Q.BasisFile(new Uint8Array(e)),i=ie(r)?re(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?Te(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._glTexture)return this._glTexture;if(this._loadingPromise)return this._loadingPromise;const t=this._data;return null==t?(this._glTexture=new J.w(e,this._createDescriptor(e),null),this._glTexture):(this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):((0,H.uk)(t)||(0,H.K2)(t))&&this._parameters.encoding===G.yk.DDS_ENCODING?this._loadFromDDSData(e,t):((0,H.uk)(t)||(0,H.K2)(t))&&this._parameters.encoding===G.yk.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,H.uk)(t)||(0,H.K2)(t))&&this._parameters.encoding===G.yk.BASIS_ENCODING?this._loadFromBasis(e,t):(0,H.K2)(t)?this._loadFromPixelData(e,t):(0,H.uk)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_frameUpdate(e,t){return null==this._glTexture||e.readyState<pe.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e,0,31);if(542327876!==r[0])return le().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return le().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let o,a;switch(i){case de:o=8,a=X.sr.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case ue:o=16,a=X.sr.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case he:o=16,a=X.sr.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return le().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let n=1,s=r[4],l=r[3];0==(3&s)&&0==(3&l)||(le().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,l=l+3&-4);const c=s,d=l;let u,h;131072&r[2]&&!1!==t&&(n=Math.max(1,r[7]));let m=r[1]+4;const f=[];for(let t=0;t<n;++t)h=(s+3>>2)*(l+3>>2)*o,u=new Uint8Array(e,m,h),f.push(u),m+=h,s=Math.max(1,s>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:f},internalFormat:a,width:c,height:d}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:o,internalFormat:a,width:n,height:s}=i;return t.samplingMode=o.levels.length>1?X.Ud.LINEAR_MIPMAP_LINEAR:X.Ud.LINEAR,t.hasMipmap=o.levels.length>1,t.internalFormat=a,t.width=n,t.height=s,new J.w(e,t,o)}(e,this._createDescriptor(e),t),this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>async function(e,t,r){null==Q&&(Q=await te());const i=new Q.KTX2File(new Uint8Array(r));if(!oe(i))return null;i.startTranscoding();const o=ae(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),((e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>async function(e,t,r){null==Q&&(Q=await te());const i=new Q.BasisFile(new Uint8Array(r));if(!ie(i))return null;i.startTranscoding();const o=ae(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),((e,t)=>i.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>i.transcodeImage(r,0,e,t,0,0)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,ge.Uc)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?X.Id.LUMINANCE:3===this._parameters.components?X.Id.RGB:X.Id.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new J.w(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const i=await F(t,{signal:r});return(0,P.wp)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,j.wx)(t,t.src,!1,r);return(0,P.wp)(r),this._loadFromImage(e,i)}))}_loadFromVideoElement(e,t){return t.readyState>=pe.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((i,o)=>{const a=()=>{t.removeEventListener("loadeddata",n),t.removeEventListener("error",s),(0,Y.oR)(l)},n=()=>{t.readyState>=pe.HAVE_CURRENT_DATA&&(a(),i(this._loadFromImage(e,t)))},s=e=>{a(),o(e||new I.c("Failed to load video"))};t.addEventListener("loadeddata",n),t.addEventListener("error",s);const l=(0,P.wD)(r,(()=>s((0,P.Uh)())))}))))}_loadFromImage(e,t){let r=t;if(!(r instanceof HTMLVideoElement)){const{maxTextureSize:t}=e.parameters;r=this._parameters.downsampleUncompressed?function(e,t){let r=e.width*e.height;if(r<4096)return e instanceof ImageData?fe(e):e;let i=e.width,o=e.height;do{i=Math.ceil(i/2),o=Math.ceil(o/2),r=i*o}while(r>1048576||null!=t&&(i>t||o>t));return me(e,i,o)}(r,t):function(e,t){const r=Math.max(e.width,e.height);if(r<=t)return e;const i=t/r;return me(e,Math.round(e.width*i),Math.round(e.height*i))}(r,t)}const i=Te(r);this._parameters.width=i.width,this._parameters.height=i.height;const o=this._createDescriptor(e);return o.pixelFormat=3===this._parameters.components?X.Id.RGB:X.Id.RGBA,o.width=i.width,o.height=i.height,this._glTexture=new J.w(e,o,r),this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null)};return r.then(i,i),r}unload(){if(this._glTexture=(0,Y.yI)(this._glTexture),null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}}function Te(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}(ve=pe||(pe={}))[ve.HAVE_NOTHING=0]="HAVE_NOTHING",ve[ve.HAVE_METADATA=1]="HAVE_METADATA",ve[ve.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",ve[ve.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",ve[ve.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA";const Ee={wrap:{s:X.Qz.REPEAT,t:X.Qz.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1,downsampleUncompressed:!1};var be=r(4636),Se=r(21288),Ae=r(72364),ye=r(80324),Ce=r(88196),we=r(58472),Me=r(81832),Re=r(10375),Ie=r(81048),Oe=r(56336),Ne=r(81472);const Pe=(0,Ne.ac)(X.w$.SRC_ALPHA,X.w$.ONE,X.w$.ONE_MINUS_SRC_ALPHA,X.w$.ONE_MINUS_SRC_ALPHA),Le=(0,Ne.KO)(X.w$.ONE,X.w$.ONE),De=(0,Ne.KO)(X.w$.ZERO,X.w$.ONE_MINUS_SRC_ALPHA);function Fe(e){return e===Oe.H.FrontFace?null:e===Oe.H.Alpha?De:Le}const Ue={factor:-1,units:-2};function Ge(e,t=X.et.LESS){return e===Oe.H.NONE||e===Oe.H.FrontFace?t:X.et.LEQUAL}var Be=r(40328),Ve=r(84752),ze=r(29244);const Ye=new class{constructor(e=0){this.offset=e,this.sphere=(0,Ve.d)(),this.tmpVertex=(0,d.Su)()}applyToVertex(e,t,r){const i=this.objectTransform.transform,o=(0,c.s)(He,e,t,r),a=(0,c.e)(o,o,i),n=this.offset/(0,c.l)(a);(0,c.r)(a,a,a,n);const s=this.objectTransform.inverse;return(0,c.e)(this.tmpVertex,a,s),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,c.l)(e);(0,c.r)(e,e,e,r);const i=this.offset/(0,c.l)(t);(0,c.r)(t,t,t,i)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=(0,c.l)((0,Ve.g)(e)),r=this.offset/t;return(0,c.r)((0,Ve.g)(this.sphere),(0,Ve.g)(e),(0,Ve.g)(e),r),this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}};new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,d.Su)(),this._tmpMbs=(0,Ve.d)(),this._tmpObb=new ze.Eb,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,c.l)(e)}applyToVertex(e,t,r){const i=(0,c.s)(He,e,t,r),o=(0,c.s)(We,e,t,r+this.componentLocalOriginLength),a=this._totalOffset/(0,c.l)(o);return(0,c.r)(this._tmpVertex,i,o,a),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],i=e[1],o=e[2]+t,a=e[3],n=e[4],s=e[5]+t,l=Math.abs(r),c=Math.abs(i),d=Math.abs(o),u=Math.abs(a),h=Math.abs(n),m=Math.abs(s),f=.5*(1+Math.sign(r*a))*Math.min(l,u),p=.5*(1+Math.sign(i*n))*Math.min(c,h),v=.5*(1+Math.sign(o*s))*Math.min(d,m),g=Math.max(l,u),_=Math.max(c,h),x=Math.max(d,m),T=Math.sqrt(f*f+p*p+v*v),E=Math.sign(l+r),b=Math.sign(c+i),S=Math.sign(d+o),A=Math.sign(u+a),y=Math.sign(h+n),C=Math.sign(m+s),w=this._totalOffset;if(T<w)return e[0]-=(1-E)*w,e[1]-=(1-b)*w,e[2]-=(1-S)*w,e[3]+=A*w,e[4]+=y*w,e[5]+=C*w,e;const M=w/Math.sqrt(g*g+_*_+x*x),R=w/T,I=R-M,O=-I;return e[0]+=r*(E*O+R),e[1]+=i*(b*O+R),e[2]+=o*(S*O+R),e[3]+=a*(A*I+M),e[4]+=n*(y*I+M),e[5]+=s*(C*I+M),e}applyToMbs(e){const t=(0,c.l)((0,Ve.g)(e)),r=this._totalOffset/t;return(0,c.r)((0,Ve.g)(this._tmpMbs),(0,Ve.g)(e),(0,Ve.g)(e),r),this._tmpMbs[3]=e[3]+e[3]*this._totalOffset/t,this._tmpMbs}applyToObb(e){return(0,ze.er)(e,this._totalOffset,this._totalOffset,Se.UZ.Global,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,d.Su)()}applyToVertex(e,t,r){const i=(0,c.s)(He,e,t,r),o=(0,c.g)(We,i,this.localOrigin),a=this.offset/(0,c.l)(o);return(0,c.r)(this.tmpVertex,i,o,a),this.tmpVertex}applyToAabb(e){const t=je,r=qe,i=Ke;for(let o=0;o<3;++o)t[o]=e[0+o]+this.localOrigin[o],r[o]=e[3+o]+this.localOrigin[o],i[o]=t[o];const o=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=o[t],e[t+3]=o[t];const a=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let o=0;o<3;++o)i[o]=0==(e&1<<o)?t[o]:r[o];a(i)}let n=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(n|=1<<e);if(0!==n&&7!==n)for(let e=0;e<8;++e)if(0==(n&e)){for(let o=0;o<3;++o)i[o]=0!=(n&1<<o)?0:0!=(e&1<<o)?t[o]:r[o];a(i)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const He=(0,d.Su)(),We=(0,d.Su)(),je=(0,d.Su)(),qe=(0,d.Su)(),Ke=(0,d.Su)();function ke(e,t,r){const{data:i,indices:o}=e,a=t.typedBuffer,n=t.typedBufferStride,s=o.length;r*=n;for(let e=0;e<s;++e){const t=2*o[e];a[r]=i[t],a[r+1]=i[t+1],r+=n}}function $e(e,t,r,i){const{data:o,indices:a}=e,n=t.typedBuffer,s=t.typedBufferStride,l=a.length;if(r*=s,null==i||1===i)for(let e=0;e<l;++e){const t=3*a[e];n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],r+=s}else for(let e=0;e<l;++e){const t=3*a[e];for(let e=0;e<i;++e)n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],r+=s}}function Xe(e,t,r,i=1){const{data:o,indices:a}=e,n=t.typedBuffer,s=t.typedBufferStride,l=a.length;if(r*=s,1===i)for(let e=0;e<l;++e){const t=4*a[e];n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],n[r+3]=o[t+3],r+=s}else for(let e=0;e<l;++e){const t=4*a[e];for(let e=0;e<i;++e)n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],n[r+3]=o[t+3],r+=s}}function Je(e,t,r,i,o=1){const a=t.typedBuffer,n=t.typedBufferStride;if(i*=n,1===o)for(let t=0;t<r;++t)a[i]=e[0],a[i+1]=e[1],a[i+2]=e[2],a[i+3]=e[3],i+=n;else for(let t=0;t<r;++t)for(let t=0;t<o;++t)a[i]=e[0],a[i+1]=e[1],a[i+2]=e[2],a[i+3]=e[3],i+=n}function Ze(e,t,r,i,o,a){switch(e){case be.K.POSITION:{(0,ge.Uc)(3===t.size);const i=o.getField(e,m.Yj);(0,ge.Uc)(!!i,`No buffer view for ${e}`),i&&function(e,t,r,i,o=1){if(!t)return void $e(e,r,i,o);const{data:a,indices:s}=e,l=r.typedBuffer,c=r.typedBufferStride,d=s.length,u=t[0],h=t[1],m=t[2],f=t[4],p=t[5],v=t[6],g=t[8],_=t[9],x=t[10],T=t[12],E=t[13],b=t[14];i*=c;let S=0,A=0,y=0;const C=(0,n.yp)(t)?e=>{S=a[e]+T,A=a[e+1]+E,y=a[e+2]+b}:e=>{const t=a[e],r=a[e+1],i=a[e+2];S=u*t+f*r+g*i+T,A=h*t+p*r+_*i+E,y=m*t+v*r+x*i+b};if(1===o)for(let e=0;e<d;++e)C(3*s[e]),l[i]=S,l[i+1]=A,l[i+2]=y,i+=c;else for(let e=0;e<d;++e){C(3*s[e]);for(let e=0;e<o;++e)l[i]=S,l[i+1]=A,l[i+2]=y,i+=c}}(t,r,i,a);break}case be.K.NORMAL:{(0,ge.Uc)(3===t.size);const r=o.getField(e,m.Yj);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&function(e,t,r,i,o=1){if(!t)return void $e(e,r,i,o);const{data:a,indices:s}=e,l=t,c=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=l[0],m=l[1],f=l[2],p=l[4],v=l[5],g=l[6],_=l[8],x=l[9],T=l[10],E=!(0,n.QT)(l),b=1e-6,S=1-b;i*=d;let A=0,y=0,C=0;const w=(0,n.yp)(l)?e=>{A=a[e],y=a[e+1],C=a[e+2]}:e=>{const t=a[e],r=a[e+1],i=a[e+2];A=h*t+p*r+_*i,y=m*t+v*r+x*i,C=f*t+g*r+T*i};if(1===o)if(E)for(let e=0;e<u;++e){w(3*s[e]);const t=A*A+y*y+C*C;if(t<S&&t>b){const e=1/Math.sqrt(t);c[i]=A*e,c[i+1]=y*e,c[i+2]=C*e}else c[i]=A,c[i+1]=y,c[i+2]=C;i+=d}else for(let e=0;e<u;++e)w(3*s[e]),c[i]=A,c[i+1]=y,c[i+2]=C,i+=d;else for(let e=0;e<u;++e){if(w(3*s[e]),E){const e=A*A+y*y+C*C;if(e<S&&e>b){const t=1/Math.sqrt(e);A*=t,y*=t,C*=t}}for(let e=0;e<o;++e)c[i]=A,c[i+1]=y,c[i+2]=C,i+=d}}(t,i,r,a);break}case be.K.NORMALCOMPRESSED:{(0,ge.Uc)(2===t.size);const r=o.getField(e,m.iN);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&ke(t,r,a);break}case be.K.UV0:{(0,ge.Uc)(2===t.size);const r=o.getField(e,m.U7);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&ke(t,r,a);break}case be.K.COLOR:case be.K.SYMBOLCOLOR:{const r=o.getField(e,m.sb);(0,ge.Uc)(!!r,`No buffer view for ${e}`),(0,ge.Uc)(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||function(e,t,r,i,o=1){const{data:a,indices:n}=e,s=r.typedBuffer,l=r.typedBufferStride,c=n.length;if(i*=l,t!==a.length||4!==t)if(1!==o)if(4!==t)for(let e=0;e<c;++e){const t=3*n[e];for(let e=0;e<o;++e)s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=255,i+=l}else for(let e=0;e<c;++e){const t=4*n[e];for(let e=0;e<o;++e)s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=a[t+3],i+=l}else{if(4===t){for(let e=0;e<c;++e){const t=4*n[e];s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=a[t+3],i+=l}return}for(let e=0;e<c;++e){const t=3*n[e];s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=255,i+=l}}else{s[i]=a[0],s[i+1]=a[1],s[i+2]=a[2],s[i+3]=a[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,n=e[i/=4];i+=t;const d=c*o;for(let r=1;r<d;++r)e[i]=n,i+=t}}(t,t.size,r,a);break}case be.K.COLORFEATUREATTRIBUTE:{const r=o.getField(e,m.AZ);(0,ge.Uc)(!!r,`No buffer view for ${e}`),(0,ge.Uc)(1===t.size),r&&1===t.size&&function(e,t,r){const{data:i,indices:o}=e,a=t.typedBuffer,n=t.typedBufferStride,s=o.length,l=i[0];r*=n;for(let e=0;e<s;++e)a[r]=l,r+=n}(t,r,a);break}case be.K.TANGENT:{(0,ge.Uc)(4===t.size);const r=o.getField(e,m._5);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&function(e,t,r,i,o=1){if(!t)return void Xe(e,r,i,o);const{data:a,indices:s}=e,l=t,c=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=l[0],m=l[1],f=l[2],p=l[4],v=l[5],g=l[6],_=l[8],x=l[9],T=l[10],E=!(0,n.QT)(l),b=1e-6,S=1-b;if(i*=d,1===o)for(let e=0;e<u;++e){const t=4*s[e],r=a[t],o=a[t+1],n=a[t+2],l=a[t+3];let u=h*r+p*o+_*n,A=m*r+v*o+x*n,y=f*r+g*o+T*n;if(E){const e=u*u+A*A+y*y;if(e<S&&e>b){const t=1/Math.sqrt(e);u*=t,A*=t,y*=t}}c[i]=u,c[i+1]=A,c[i+2]=y,c[i+3]=l,i+=d}else for(let e=0;e<u;++e){const t=4*s[e],r=a[t],n=a[t+1],l=a[t+2],u=a[t+3];let A=h*r+p*n+_*l,y=m*r+v*n+x*l,C=f*r+g*n+T*l;if(E){const e=A*A+y*y+C*C;if(e<S&&e>b){const t=1/Math.sqrt(e);A*=t,y*=t,C*=t}}for(let e=0;e<o;++e)c[i]=A,c[i+1]=y,c[i+2]=C,c[i+3]=u,i+=d}}(t,i,r,a);break}case be.K.PROFILERIGHT:case be.K.PROFILEUP:case be.K.PROFILEVERTEXANDNORMAL:case be.K.FEATUREVALUE:{(0,ge.Uc)(4===t.size);const r=o.getField(e,m._5);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&Xe(t,r,a)}}}class Qe{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.attributes.get(be.K.POSITION).indices.length}write(e,t,r,i,o){!function(e,t,r,i,o,a){for(const n of t.fields.keys()){const t=e.attributes.get(n),s=t?.indices;if(t&&s)Ze(n,t,r,i,o,a);else if(n===be.K.OBJECTANDLAYERIDCOLOR&&null!=e.objectAndLayerIdColor){const t=e.attributes.get(be.K.POSITION)?.indices;if(t){const r=t.length,i=o.getField(n,m.sb);Je(e.objectAndLayerIdColor,i,r,a)}}}}(r,this.vertexBufferLayout,e,t,i,o)}}var et=r(22592),tt=r(37008),rt=r(55164),it=r(60072),ot=r(74072),at=r(74780),nt=r(93316),st=r(63524),lt=r(1492);X.et.LESS,X.et.ALWAYS;const ct={mask:255},dt={function:{func:X.et.ALWAYS,ref:G.Aj.OutlineVisualElementMask,mask:G.Aj.OutlineVisualElementMask},operation:{fail:X.QD.KEEP,zFail:X.QD.KEEP,zPass:X.QD.ZERO}},ut={function:{func:X.et.ALWAYS,ref:G.Aj.OutlineVisualElementMask,mask:G.Aj.OutlineVisualElementMask},operation:{fail:X.QD.KEEP,zFail:X.QD.KEEP,zPass:X.QD.REPLACE}};X.et.EQUAL,G.Aj.OutlineVisualElementMask,G.Aj.OutlineVisualElementMask,X.QD.KEEP,X.QD.KEEP,X.QD.KEEP,X.et.NOTEQUAL,G.Aj.OutlineVisualElementMask,G.Aj.OutlineVisualElementMask,X.QD.KEEP,X.QD.KEEP,X.QD.KEEP;const ht=[1,1,.5],mt=[0,.6,.2],ft=[0,1,.2];var pt=r(83840);class vt extends it.Yj{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=(0,d.eu)(ht),this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=G.CM.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveFactor=(0,d.WK)(0,0,0),this.instancedDoublePrecision=!1,this.normalType=Ce.g.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.shadowMappingEnabled=!1,this.ambient=(0,d.WK)(.2,.2,.2),this.diffuse=(0,d.WK)(.8,.8,.8),this.externalColor=(0,tt.WK)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,d.Su)(),this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.transparent=!1,this.writeDepth=!0,this.customDepthTest=G.sr.Less,this.textureAlphaMode=G.OA.Blend,this.textureAlphaCutoff=ot.k,this.textureAlphaPremultiplied=!1,this.hasOccludees=!1,this.renderOccluded=Ie.C2.Occlude,this.isDecoration=!1}}it.yO;class gt extends nt.O{initializeConfiguration(e,t){t.spherical=e.viewingMode===Se.UZ.Global,t.doublePrecisionRequiresObfuscation=e.rctx.driverTest.doublePrecisionRequiresObfuscation.result,t.textureCoordinateType=t.hasColorTexture||t.hasMetallicRoughnessTexture||t.hasEmissionTexture||t.hasOcclusionTexture||t.hasNormalTexture?rt.i.Default:rt.i.None,t.objectAndLayerIdColorInstanced=t.instanced}initializeProgram(e){return this._initializeProgram(e,gt.shader)}_initializeProgram(e,t){return new lt.G(e.rctx,t.get().build(this.configuration),st.q)}_convertDepthTestFunction(e){return e===G.sr.Lequal?X.et.LEQUAL:X.et.LESS}_makePipeline(e,t){const r=this.configuration,i=e===Oe.H.NONE,o=e===Oe.H.FrontFace;return(0,Ne._w)({blending:r.output!==ye.mC.Color&&r.output!==ye.mC.Alpha||!r.transparent?null:i?Pe:Fe(e),culling:_t(r)?(0,Ne.AD)(r.cullFace):null,depthTest:{func:Ge(e,this._convertDepthTestFunction(r.customDepthTest))},depthWrite:(i||o)&&r.writeDepth?Ne.AT:null,colorWrite:Ne.kp,stencilWrite:r.hasOccludees?ct:null,stencilTest:r.hasOccludees?t?ut:dt:null,polygonOffset:i||o?null:(a=r.enableOffset,a?Ue:null)});var a}initializePipeline(){return this._occludeePipelineState=this._makePipeline(this.configuration.transparencyPassType,!0),this._makePipeline(this.configuration.transparencyPassType,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function _t(e){return e.cullFace!==G.CM.None||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}gt.shader=new at.O(pt.D,(()=>r.e(5880).then(r.bind(r,75880))));var xt=r(41948),Tt=r(74912),Et=r(11925),bt=r(75040);class St extends Et.i0{}(0,xt._)([(0,Tt.y)({constValue:!0})],St.prototype,"hasSliceHighlight",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],St.prototype,"hasSliceInVertexProgram",void 0),(0,xt._)([(0,Tt.y)({constValue:bt.u.Pass})],St.prototype,"pbrTextureBindType",void 0);class At extends St{constructor(){super(...arguments),this.output=ye.mC.Color,this.alphaDiscardMode=G.OA.Opaque,this.doubleSidedMode=we.J.None,this.pbrMode=Me.Ax.Disabled,this.cullFace=G.CM.None,this.transparencyPassType=Oe.H.NONE,this.normalType=Ce.g.Attribute,this.textureCoordinateType=rt.i.None,this.customDepthTest=G.sr.Less,this.spherical=!1,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.multipassEnabled=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.objectAndLayerIdColorInstanced=!1,this.instancedDoublePrecision=!1,this.doublePrecisionRequiresObfuscation=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.cullAboveGround=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1}}(0,xt._)([(0,Tt.y)({count:ye.mC.COUNT})],At.prototype,"output",void 0),(0,xt._)([(0,Tt.y)({count:G.OA.COUNT})],At.prototype,"alphaDiscardMode",void 0),(0,xt._)([(0,Tt.y)({count:we.J.COUNT})],At.prototype,"doubleSidedMode",void 0),(0,xt._)([(0,Tt.y)({count:Me.Ax.COUNT})],At.prototype,"pbrMode",void 0),(0,xt._)([(0,Tt.y)({count:G.CM.COUNT})],At.prototype,"cullFace",void 0),(0,xt._)([(0,Tt.y)({count:Oe.H.COUNT})],At.prototype,"transparencyPassType",void 0),(0,xt._)([(0,Tt.y)({count:Ce.g.COUNT})],At.prototype,"normalType",void 0),(0,xt._)([(0,Tt.y)({count:rt.i.COUNT})],At.prototype,"textureCoordinateType",void 0),(0,xt._)([(0,Tt.y)({count:G.sr.COUNT})],At.prototype,"customDepthTest",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"spherical",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasVertexColors",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasSymbolColors",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasVerticalOffset",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasSlicePlane",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasSliceHighlight",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasColorTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasMetallicRoughnessTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasEmissionTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasOcclusionTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasNormalTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasScreenSizePerspective",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasVertexTangents",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasOccludees",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"multipassEnabled",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasModelTransformation",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"offsetBackfaces",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"vvSize",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"vvColor",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"receiveShadows",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"receiveAmbientOcclusion",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"textureAlphaPremultiplied",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"instanced",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"instancedColor",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"objectAndLayerIdColorInstanced",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"instancedDoublePrecision",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"doublePrecisionRequiresObfuscation",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"writeDepth",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"transparent",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"enableOffset",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"cullAboveGround",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"snowCover",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasColorTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasEmissionTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasNormalTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasOcclusionTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasMetallicRoughnessTextureTransform",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],At.prototype,"occlusionPass",void 0),(0,xt._)([(0,Tt.y)({constValue:!0})],At.prototype,"hasVvInstancing",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],At.prototype,"useCustomDTRExponentForWater",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],At.prototype,"supportsTextureAtlas",void 0),(0,xt._)([(0,Tt.y)({constValue:!0})],At.prototype,"useFillLights",void 0);var yt=r(59888);class Ct extends gt{initializeConfiguration(e,t){super.initializeConfiguration(e,t),t.hasMetallicRoughnessTexture=!1,t.hasEmissionTexture=!1,t.hasOcclusionTexture=!1,t.hasNormalTexture=!1,t.hasModelTransformation=!1,t.normalType=Ce.g.Attribute,t.doubleSidedMode=we.J.WindingOrder,t.hasVertexTangents=!1}initializeProgram(e){return this._initializeProgram(e,Ct.shader)}}Ct.shader=new at.O(yt.R,(()=>r.e(1980).then(r.bind(r,81980))));class wt extends Ie.iK{constructor(e){super(e,Rt),this.supportsEdges=!0,this.produces=new Map([[Be.y.OPAQUE_MATERIAL,e=>((0,ye.ue)(e)||(0,ye.KQ)(e))&&!this.parameters.transparent],[Be.y.TRANSPARENT_MATERIAL,e=>((0,ye.ue)(e)||(0,ye.KQ)(e))&&this.parameters.transparent&&this.parameters.writeDepth],[Be.y.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL,e=>((0,ye.ue)(e)||(0,ye.KQ)(e))&&this.parameters.transparent&&!this.parameters.writeDepth]]),this._configuration=new At,this._vertexBufferLayout=function(e){const t=(0,Ae.iC)().vec3f(be.K.POSITION);return e.normalType===Ce.g.Compressed?t.vec2i16(be.K.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(be.K.NORMAL),e.hasVertexTangents&&t.vec4f(be.K.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f(be.K.UV0),e.hasVertexColors&&t.vec4u8(be.K.COLOR),e.hasSymbolColors&&t.vec4u8(be.K.SYMBOLCOLOR),(0,V.c)("enable-feature:objectAndLayerId-rendering")&&t.vec4u8(be.K.OBJECTANDLAYERIDCOLOR),t}(this.parameters)}isVisibleForOutput(e){return e!==ye.mC.Shadow&&e!==ye.mC.ShadowExcludeHighlight&&e!==ye.mC.ShadowHighlight||this.parameters.castShadows}isVisible(){const e=this.parameters;if(!super.isVisible()||0===e.layerOpacity)return!1;const{hasInstancedColor:t,hasVertexColors:r,hasSymbolColors:i,vvColor:o}=e,a="replace"===e.colorMixMode,n=e.opacity>0,s=e.externalColor&&e.externalColor[3]>0,l=t||o||i;return r&&l?a||n:r?a?s:n:l?a||n:a?s:n}getConfiguration(e,t){return this._configuration.output=e,this._configuration.hasNormalTexture=!!this.parameters.normalTextureId,this._configuration.hasColorTexture=!!this.parameters.textureId,this._configuration.hasVertexTangents=this.parameters.hasVertexTangents,this._configuration.instanced=this.parameters.isInstanced,this._configuration.instancedDoublePrecision=this.parameters.instancedDoublePrecision,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.hasVerticalOffset=null!=this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=null!=this.parameters.screenSizePerspective,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasSliceHighlight=this.parameters.hasSliceHighlight,this._configuration.alphaDiscardMode=this.parameters.textureAlphaMode,this._configuration.normalType=this.parameters.normalType,this._configuration.transparent=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,null!=this.parameters.customDepthTest&&(this._configuration.customDepthTest=this.parameters.customDepthTest),this._configuration.hasOccludees=this.parameters.hasOccludees,this._configuration.cullFace=this.parameters.hasSlicePlane?G.CM.None:this.parameters.cullFace,this._configuration.multipassEnabled=t.multipassEnabled,this._configuration.cullAboveGround=t.multipassTerrain.cullAboveGround,this._configuration.hasModelTransformation=null!=this.parameters.modelTransformation,e!==ye.mC.Color&&e!==ye.mC.Alpha||(this._configuration.hasVertexColors=this.parameters.hasVertexColors,this._configuration.hasSymbolColors=this.parameters.hasSymbolColors,this.parameters.treeRendering?this._configuration.doubleSidedMode=we.J.WindingOrder:this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?we.J.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?we.J.WindingOrder:we.J.None,this._configuration.instancedColor=this.parameters.hasInstancedColor,this._configuration.receiveShadows=this.parameters.receiveShadows&&this.parameters.shadowMappingEnabled,this._configuration.receiveAmbientOcclusion=this.parameters.receiveAmbientOcclusion&&null!=t.ssao,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.textureAlphaPremultiplied=!!this.parameters.textureAlphaPremultiplied,this._configuration.pbrMode=this.parameters.usePBR?this.parameters.isSchematic?Me.Ax.Schematic:Me.Ax.Normal:Me.Ax.Disabled,this._configuration.hasMetallicRoughnessTexture=!!this.parameters.metallicRoughnessTextureId,this._configuration.hasEmissionTexture=!!this.parameters.emissiveTextureId,this._configuration.hasOcclusionTexture=!!this.parameters.occlusionTextureId,this._configuration.offsetBackfaces=!(!this.parameters.transparent||!this.parameters.offsetTransparentBackfaces),this._configuration.transparencyPassType=t.transparencyPassType,this._configuration.enableOffset=t.camera.relativeElevation<5e5,this._configuration.snowCover=this.hasSnowCover(t),this._configuration.hasColorTextureTransform=!!this.parameters.colorTextureTransformMatrix,this._configuration.hasNormalTextureTransform=!!this.parameters.normalTextureTransformMatrix,this._configuration.hasEmissionTextureTransform=!!this.parameters.emissiveTextureTransformMatrix,this._configuration.hasOcclusionTextureTransform=!!this.parameters.occlusionTextureTransformMatrix,this._configuration.hasMetallicRoughnessTextureTransform=!!this.parameters.metallicRoughnessTextureTransformMatrix),this._configuration}hasSnowCover(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}intersect(e,t,r,i,o,a){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,c.s)(Dt,t[12],t[13],t[14]);let a=null;switch(r.viewingMode){case Se.UZ.Global:a=(0,c.n)(Pt,Dt);break;case Se.UZ.Local:a=(0,c.c)(Pt,Nt)}let n=0;const s=(0,c.f)(Ft,Dt,e.eye),l=(0,c.l)(s),d=(0,c.h)(s,s,1/l);let u=null;this.parameters.screenSizePerspective&&(u=(0,c.k)(a,d)),n+=(0,et.u6)(e,l,this.parameters.verticalOffset,u??0,this.parameters.screenSizePerspective),(0,c.h)(a,a,n),(0,c.t)(Lt,a,r.transform.inverseRotation),i=(0,c.f)(It,i,Lt),o=(0,c.f)(Ot,o,Lt)}var n;(0,et.Ep)(e,r,i,o,null!=(n=r.verticalOffset)?(Ye.offset=n,Ye):null,a)}createGLMaterial(e){return new Mt(e)}createBufferWriter(){return new Qe(this._vertexBufferLayout)}}class Mt extends Re.Q{constructor(e){super({...e,...e.material.parameters})}_updateShadowState(e){e.shadowMap.enabled!==this._material.parameters.shadowMappingEnabled&&this._material.setParameters({shadowMappingEnabled:e.shadowMap.enabled})}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.hasOccludees&&this._material.setParameters({hasOccludees:e.hasOccludees})}beginSlot(e){this._output!==ye.mC.Color&&this._output!==ye.mC.Alpha||(this._updateShadowState(e),this._updateOccludeeState(e));const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,c.s)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.ensureTechnique(t.treeRendering?Ct:gt,e)}}const Rt=new class extends vt{constructor(){super(...arguments),this.initTextureTransparent=!1,this.treeRendering=!1,this.hasVertexTangents=!1}},It=(0,d.Su)(),Ot=(0,d.Su)(),Nt=(0,d.WK)(0,0,1),Pt=(0,d.Su)(),Lt=(0,d.Su)(),Dt=(0,d.Su)(),Ft=(0,d.Su)(),Ut=()=>O.c.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");function Gt(e){throw new I.c("",`Request for object resource failed: ${e}`)}function Bt(e){const t=e.params,r=t.topology;let i=!0;switch(t.vertexAttributes||(Ut().warn("Geometry must specify vertex attributes"),i=!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&&(Ut().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(Ut().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(Ut().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else Ut().warn("Indexed geometries must specify faces"),i=!1;break}default:Ut().warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(Ut().warn("Geometry requires material"),i=!1);const o=e.params.vertexAttributes;for(const e in o)o[e].values||(Ut().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function Vt(e){const t=(0,u.FZ)();return e.forEach((e=>{const r=e.boundingInfo;null!=r&&((0,u.K8)(t,r.bbMin),(0,u.K8)(t,r.bbMax))})),t}function zt(e){switch(e){case"mask":return G.OA.Mask;case"maskAndTransparency":return G.OA.MaskBlend;case"none":return G.OA.Opaque;default:return G.OA.Blend}}function Yt(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Ht=new L.a(1,2,"wosr");var Wt=r(44875);async function jt(e,t){const r=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,i.Ur)(e));if("wosr"===r.fileType){const e=await(t.cache?t.cache.loadWOSR(r.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 i=await(0,M.aG)(t.request(e,"json",r));if(!0===i.ok)return i.value;(0,P.CE)(i.error),Gt(i.error.details.url)}(e,r,t);const i=await(0,M.aG)((0,w.c)(e,t));if(!0===i.ok)return i.value.data;(0,P.CE)(i.error),Gt(i.error)}(e,t),i=await async function(e,t){const r=new Array;for(const i in e){const o=e[i],a=o.images[0].data;if(!a){Ut().warn("Externally referenced texture data is not yet supported");continue}const n=o.encoding+";base64,"+a,s="/textureDefinitions/"+i,l="rgba"===o.channels?o.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:X.Qz.REPEAT,t:X.Qz.REPEAT},preMultiplyAlpha:zt(l)!==G.OA.Opaque},d=null!=t&&t.disableTextures?Promise.resolve(null):F(n,t);r.push(d.then((e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l}))))}const i=await Promise.all(r),o={};for(const e of i)o[e.refId]=e;return o}(r.textureDefinitions??{},t);let o=0;for(const e in i)if(i.hasOwnProperty(e)){const t=i[e];o+=t?.image?t.image.width*t.image.height*4:0}return{resource:r,textures:i,size:o+(0,R.UN)(r)}}(r.url,t)),{engineResources:i,referenceBoundingBox:o}=function(e,t){const r=new Array,i=new Array,o=new Array,a=new N,n=e.resource,s=L.a.parse(n.version||"1.0","wosr");Ht.validate(s);const l=n.model.name,c=n.model.geometries,u=n.materialDefinitions??{},h=e.textures;let m=0;const f=new Map;for(let e=0;e<c.length;e++){const n=c[e];if(!Bt(n))continue;const s=Yt(n),l=n.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===n.params.topology)return null;const t=n.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l[be.K.POSITION],_=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,i=v(e)??(0,D.yh)(_);p.push([e,new U.O(r,i,t.valuesPerElement,!0)])}const x=s.texture,T=h&&h[x];if(T&&!f.has(x)){const{image:e,parameters:t}=T,r=new xe(e,t);i.push(r),f.set(x,r)}const E=f.get(x),b=E?E.id:void 0,S=s.material;let A=a.get(S,x);if(null==A){const e=u[S.substring(S.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=T&&T.alphaChannelUsage,i=e.transparency>0||"transparency"===r||"maskAndTransparency"===r,o=T?zt(T.alphaChannelUsage):void 0,n={ambient:(0,d.eu)(e.diffuse),diffuse:(0,d.eu)(e.diffuse),opacity:1-(e.transparency||0),transparent:i,textureAlphaMode:o,textureAlphaCutoff:.33,textureId:b,initTextureTransparent:!0,doubleSided:!0,cullFace:G.CM.None,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:T?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(n,t.materialParameters),A=new wt(n),a.set(S,x,A)}o.push(A);const y=new B.K(A,p);m+=p.find((e=>e[0]===be.K.POSITION))?.[1]?.indices.length??0,r.push(y)}return{engineResources:[{name:l,stageResources:{textures:i,materials:o,geometries:r},pivotOffset:n.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:Vt(r)}}(e,t);return{lods:i,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}const a=await(t.cache?t.cache.loadGLTF(r.url,t,!!t.usePBR):(0,T.G)(new x.k(t.streamDataRequester),r.url,t,t.usePBR)),S=a.model.meta?.ESRI_proxyEllipsoid,y=a.meta.isEsriSymbolResource&&null!=S&&"EsriRealisticTreesStyle"===a.meta.ESRI_webstyle;y&&!a.customMeta.esriTreeRendering&&(a.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const i=e.model.lods[r];for(const o of i.parts){const i=o.attributes.normal;if(null==i)return;const a=o.attributes.position,l=a.count,u=(0,d.Su)(),h=(0,d.Su)(),f=(0,d.Su)(),p=new Uint8Array(4*l),v=new Float64Array(3*l),g=(0,n.S_)((0,s.Su)(),o.transform);let _=0,x=0;for(let n=0;n<l;n++){a.getVec(n,h),i.getVec(n,u),(0,c.e)(h,h,o.transform),(0,c.f)(f,h,t.center),(0,c.H)(f,f,t.radius);const s=f[2],l=(0,c.l)(f),d=Math.min(.45+.55*l*l,1);(0,c.H)(f,f,t.radius),null!==g&&(0,c.e)(f,f,g),(0,c.n)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,c.m)(f,f,u,s>-1?.2:Math.min(-4*s-3.8,1)),v[_]=f[0],v[_+1]=f[1],v[_+2]=f[2],_+=3,p[x]=255*d,p[x+1]=255*d,p[x+2]=255*d,p[x+3]=255,x+=4}o.attributes.normal=new m.Yj(v),o.attributes.color=new m.sb(p)}}}(a,S));const I=!!t.usePBR,O=a.meta.isEsriSymbolResource?{usePBR:I,isSchematic:!1,treeRendering:y,mrrFactors:[...ft]}:{usePBR:I,isSchematic:!1,treeRendering:!1,mrrFactors:[...ht]},V={...t.materialParameters,treeRendering:y},{engineResources:z,referenceBoundingBox:Y}=function(e,t,r,i){const a=e.model,n=new Array,s=new Map,x=new Map,T=a.lods.length,S=(0,u.FZ)();return a.lods.forEach(((e,y)=>{const w=!0===i.skipHighLods&&(T>1&&0===y||T>3&&1===y)||!1===i.skipHighLods&&null!=i.singleLodIndex&&y!==i.singleLodIndex;if(w&&0!==y)return;const M=new C(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach((e=>{const i=w?new wt({}):function(e,t,r,i,o,a,n){const s=t.material+(t.attributes.normal?"_normal":"")+(t.attributes.color?"_color":"")+(t.attributes.texCoord0?"_texCoord0":"")+(t.attributes.tangent?"_tangent":""),u=e.materials.get(t.material),h=null!=t.attributes.texCoord0,m=null!=t.attributes.normal;if(null==u)return null;const f=function(e){switch(e){case"BLEND":return G.OA.Blend;case"MASK":return G.OA.Mask;case"OPAQUE":case null:case void 0:return G.OA.Opaque}}(u.alphaMode);if(!a.has(s)){if(h){const t=(t,r=!1)=>{if(null!=t&&!n.has(t)){const i=e.textures.get(t);if(null!=i){const e=i.data;n.set(t,new xe((0,b.e6)(e)?e.data:e,{...i.parameters,preMultiplyAlpha:!(0,b.e6)(e)&&r,encoding:(0,b.e6)(e)&&null!=e.encoding?e.encoding:void 0}))}}};t(u.textureColor,f!==G.OA.Opaque),t(u.textureNormal),t(u.textureOcclusion),t(u.textureEmissive),t(u.textureMetallicRoughness)}const r=u.color[0]**(1/Wt.g),p=u.color[1]**(1/Wt.g),v=u.color[2]**(1/Wt.g),g=u.emissiveFactor[0]**(1/Wt.g),_=u.emissiveFactor[1]**(1/Wt.g),x=u.emissiveFactor[2]**(1/Wt.g),T=null!=u.textureColor&&h?n.get(u.textureColor):null,E=function({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:i,emissiveTexture:o,emissiveFactor:a,occlusionTexture:n}){return null==e&&null==t&&null==o&&(null==a||(0,c.j)(a,d.cX))&&null==n&&(null==i||1===i)&&(null==r||1===r)}({normalTexture:u.textureNormal,metallicRoughnessTexture:u.textureMetallicRoughness,metallicFactor:u.metallicFactor,roughnessFactor:u.roughnessFactor,emissiveTexture:u.textureEmissive,emissiveFactor:u.emissiveFactor,occlusionTexture:u.textureOcclusion}),S=null!=u.normalTextureTransform?.scale?u.normalTextureTransform?.scale:l.Qw;a.set(s,new wt({...i,transparent:f===G.OA.Blend,customDepthTest:G.sr.Lequal,textureAlphaMode:f,textureAlphaCutoff:u.alphaCutoff,diffuse:[r,p,v],ambient:[r,p,v],opacity:u.opacity,doubleSided:u.doubleSided,doubleSidedType:"winding-order",cullFace:u.doubleSided?G.CM.None:G.CM.Back,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:m?Ce.g.Attribute:Ce.g.ScreenDerivative,castShadows:!0,receiveShadows:u.receiveShadows,receiveAmbientOcclusion:u.receiveAmbientOcclustion,textureId:null!=T?T.id:void 0,colorMixMode:u.colorMixMode,normalTextureId:null!=u.textureNormal&&h?n.get(u.textureNormal).id:void 0,textureAlphaPremultiplied:null!=T&&!!T.parameters.preMultiplyAlpha,occlusionTextureId:null!=u.textureOcclusion&&h?n.get(u.textureOcclusion).id:void 0,emissiveTextureId:null!=u.textureEmissive&&h?n.get(u.textureEmissive).id:void 0,metallicRoughnessTextureId:null!=u.textureMetallicRoughness&&h?n.get(u.textureMetallicRoughness).id:void 0,emissiveFactor:[g,_,x],mrrFactors:E?[...mt]:[u.metallicFactor,u.roughnessFactor,i.mrrFactors[2]],isSchematic:E,colorTextureTransformMatrix:A(u.colorTextureTransform),normalTextureTransformMatrix:A(u.normalTextureTransform),scale:[S[0],S[1]],occlusionTextureTransformMatrix:A(u.occlusionTextureTransform),emissiveTextureTransformMatrix:A(u.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:A(u.metallicRoughnessTextureTransform),...o}))}const p=a.get(s);if(r.stageResources.materials.push(p),h){const e=e=>{null!=e&&r.stageResources.textures.push(n.get(e))};e(u.textureColor),e(u.textureNormal),e(u.textureOcclusion),e(u.textureEmissive),e(u.textureMetallicRoughness)}return p}(a,e,M,t,r,s,x),{geometry:n,vertexCount:T}=function(e,t){const r=e.attributes.position.count,i=(0,E.y)(e.indices||r,e.primitiveType),a=(0,h.mc)(3*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.position;(0,f.a)(a,n,e.transform,3,s);const l=[[be.K.POSITION,new U.O(a,i,3,!0)]];if(null!=e.attributes.normal){const t=(0,h.mc)(3*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.normal;(0,o.yy)(qt,e.transform),(0,f.b)(t,a,qt,3,n),l.push([be.K.NORMAL,new U.O(t,i,3,!0)])}if(null!=e.attributes.tangent){const t=(0,h.mc)(4*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.tangent;(0,o.yy)(qt,e.transform),(0,p.t)(t,a,qt,4,n),l.push([be.K.TANGENT,new U.O(t,i,4,!0)])}if(null!=e.attributes.texCoord0){const t=(0,h.mc)(2*r),{typedBuffer:o,typedBufferStride:a}=e.attributes.texCoord0;(0,v.n)(t,o,2,a),l.push([be.K.UV0,new U.O(t,i,2,!0)])}if(null!=e.attributes.color){const t=new Uint8Array(4*r);4===e.attributes.color.elementCount?e.attributes.color instanceof m._5?(0,p.s)(t,e.attributes.color,255):e.attributes.color instanceof m.sb?(0,_.c)(t,e.attributes.color):e.attributes.color instanceof m.Ig&&(0,p.s)(t,e.attributes.color,1/256):(t.fill(255),e.attributes.color instanceof m.Yj?(0,f.s)(t,e.attributes.color,255,4):e.attributes.color instanceof m.IN?(0,g.c)(t,e.attributes.color.typedBuffer,4,e.attributes.color.typedBufferStride):e.attributes.color instanceof m.k5&&(0,f.s)(t,e.attributes.color,1/256,4)),l.push([be.K.COLOR,new U.O(t,i,4,!0)])}return{geometry:new B.K(t,l),vertexCount:r}}(e,null!=i?i:new wt({})),C=n.boundingInfo;null!=C&&0===y&&((0,u.K8)(S,C.bbMin),(0,u.K8)(S,C.bbMax)),null!=i&&(M.stageResources.geometries.push(n),M.numberOfVertices+=T)})),w||n.push(M)})),{engineResources:n,referenceBoundingBox:S}}(a,O,V,t.skipHighLods&&null==r.specifiedLodIndex?{skipHighLods:!0}:{skipHighLods:!1,singleLodIndex:r.specifiedLodIndex});return{lods:z,referenceBoundingBox:Y,isEsriSymbolResource:a.meta.isEsriSymbolResource,isWosr:!1}}const qt=(0,a.Su)()},78720:(e,t,r)=>{var i,o;r.d(t,{KQ:()=>i}),r(53648),(o=i||(i={}))[o.Multiply=1]="Multiply",o[o.Ignore=2]="Ignore",o[o.Replace=3]="Replace",o[o.Tint=4]="Tint"},72364:(e,t,r)=>{r.d(t,{U1:()=>c,iC:()=>l});var i=r(71004),o=r(98132),a=r(90736);class n{constructor(e,t){this.layout=e,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const t of e.fields.keys()){const r=e.fields.get(t);this[t]=new r.constructor(this.buffer,r.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(e,t){const r=this[e];return r&&r.elementCount===t.ElementCount&&r.elementType===t.ElementType?r:null}slice(e,t){return new n(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,r=0,i=e.count){const o=this.stride;if(o%4==0){const a=new Uint32Array(e.buffer,t*o,i*o/4);new Uint32Array(this.buffer,r*o,i*o/4).set(a)}else{const a=new Uint8Array(e.buffer,t*o,i*o);new Uint8Array(this.buffer,r*o,i*o).set(a)}return this}get usedMemory(){return this.byteLength}dispose(){}}class s{constructor(e=null){this._stride=0,this._lastAligned=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach((e=>this._fields.set(e[0],{...e[1],constructor:h(e[1].constructor)}))))}vec2f(e,t){return this._appendField(e,i.U7,t),this}vec2f64(e,t){return this._appendField(e,i.wT,t),this}vec3f(e,t){return this._appendField(e,i.Yj,t),this}vec3f64(e,t){return this._appendField(e,i.Ax,t),this}vec4f(e,t){return this._appendField(e,i._5,t),this}vec4f64(e,t){return this._appendField(e,i.Ip,t),this}mat3f(e,t){return this._appendField(e,i.Ko,t),this}mat3f64(e,t){return this._appendField(e,i.m_,t),this}mat4f(e,t){return this._appendField(e,i.IL,t),this}mat4f64(e,t){return this._appendField(e,i.mF,t),this}vec4u8(e,t){return this._appendField(e,i.sb,t),this}f32(e,t){return this._appendField(e,i.AZ,t),this}f64(e,t){return this._appendField(e,i.oN,t),this}u8(e,t){return this._appendField(e,i.Kg,t),this}u16(e,t){return this._appendField(e,i.E_,t),this}i8(e,t){return this._appendField(e,i.kV,t),this}vec2i8(e,t){return this._appendField(e,i.oR,t),this}vec2i16(e,t){return this._appendField(e,i.iN,t),this}vec2u8(e,t){return this._appendField(e,i.eS,t),this}vec4u16(e,t){return this._appendField(e,i.Ig,t),this}u32(e,t){return this._appendField(e,i.Ym,t),this}_appendField(e,t,r){if(this._fields.has(e))return void(0,a.Uc)(!1,`${e} already added to vertex buffer layout`);const i=t.ElementCount*(0,o.Ad)(t.ElementType),n=this._stride;this._stride+=i,this._fields.set(e,{size:i,constructor:t,offset:n,optional:r})}createBuffer(e){return new n(this,e)}createView(e){return new n(this,e)}clone(){const e=new s;return e._stride=this._stride,e._fields=new Map,this._fields.forEach(((t,r)=>e._fields.set(r,t))),e.BufferType=this.BufferType,e}get stride(){if(this._lastAligned!==this._fields.size){let e=1;this._fields.forEach((t=>e=Math.max(e,(0,o.Ad)(t.constructor.ElementType)))),this._stride=Math.floor((this._stride+e-1)/e)*e,this._lastAligned=this._fields.size}return this._stride}get fields(){return this._fields}}function l(){return new s}class c{constructor(e){this.fields=new Array,e.fields.forEach(((e,t)=>{const r={...e,constructor:u(e.constructor)};this.fields.push([t,r])})),this.stride=e.stride}}const d=[i.AZ,i.U7,i.Yj,i._5,i.Ko,i.IL,i.oN,i.wT,i.Ax,i.Ip,i.m_,i.mF,i.Kg,i.eS,i.IN,i.sb,i.E_,i.kg,i.k5,i.Ig,i.Ym,i.qZ,i.ER,i.q$,i.kV,i.oR,i.Oq,i.mq,i.Mt,i.iN,i.g7,i.OS,i.Ep,i.mI,i.Yv,i.i9];function u(e){return`${e.ElementType}_${e.ElementCount}`}function h(e){return m.get(e)}const m=new Map;d.forEach((e=>m.set(u(e),e)))},29244:(e,t,r)=>{r.d(t,{Eb:()=>Te,er:()=>Ie});var i=r(77556),o=r(68612),a=r(87104),n=r(41512),s=r(2620),l=r(98472),c=r(62484),d=r(74784),u=r(37008),h=r(22080),m=r(82448),f=r(51120),p=r(62880),v=r(38380),g=r(58632),_=r(60544),x=r(20136),T=r(21288),E=r(85256),b=r(89560);const S=1e-6,A=(0,c.Su)(),y=(0,c.Su)();function C(e,t,r,i,o,a,n,s,l,c){return function(e,t,r){let i=_e(e.maxVert[0],e.minVert[0]),o=0;for(let t=1;t<7;++t){const r=_e(e.maxVert[t],e.minVert[t]);r>i&&(i=r,o=t)}fe(t,e.minVert[o]),fe(r,e.maxVert[o])}(e,i,o),_e(i,o)<S?1:(he(n,i,o),ve(n,n),function(e,t,r,i){const{data:o,size:a}=e;let n=Number.NEGATIVE_INFINITY,s=0;for(let e=0;e<o.length;e+=a){F[0]=o[e]-t[0],F[1]=o[e+1]-t[1],F[2]=o[e+2]-t[2];const i=r[0]*F[0]+r[1]*F[1]+r[2]*F[2],a=r[0]*r[0]+r[1]*r[1]+r[2]*r[2],l=F[0]*F[0]+F[1]*F[1]+F[2]*F[2]-i*i/a;l>n&&(n=l,s=e)}return fe(i,o,s),n}(t,i,n,a)<S?2:(he(s,o,a),ve(s,s),he(l,a,i),ve(l,l),pe(r,s,n),ve(r,r),W(t,r,n,s,l,c),0))}const w=(0,c.Su)(),M=(0,c.Su)(),R=(0,c.Su)(),I=(0,c.Su)(),O=(0,c.Su)(),N=(0,c.Su)(),P=(0,c.Su)(),L=(0,c.Su)();function D(e,t,r,i,o,a,n,s,l){(function(e,t,r,i,o){!function(e,t,r,i,o){const{data:a,size:n}=e;fe(i,a),fe(o,i),r[0]=xe(j,t),r[1]=r[0];for(let e=n;e<a.length;e+=n){const n=a[e]*t[0]+a[e+1]*t[1]+a[e+2]*t[2];n<r[0]&&(r[0]=n,fe(i,a,e)),n>r[1]&&(r[1]=n,fe(o,a,e))}}(e,t,U,o,i);const a=xe(r,t);U[1]-S<=a&&(i[0]=void 0),U[0]+S>=a&&(o[0]=void 0)})(e,t,r,w,M),void 0!==w[0]&&(he(R,w,r),ve(R,R),he(I,w,i),ve(I,I),he(O,w,o),ve(O,O),pe(N,I,a),ve(N,N),pe(P,O,n),ve(P,P),pe(L,R,s),ve(L,L),W(e,N,a,I,R,l),W(e,P,n,O,I,l),W(e,L,s,R,O,l)),void 0!==M[0]&&(he(R,M,r),ve(R,R),he(I,M,i),ve(I,I),he(O,M,o),ve(O,O),pe(N,I,a),ve(N,N),pe(P,O,n),ve(P,P),pe(L,R,s),ve(L,L),W(e,N,a,I,R,l),W(e,P,n,O,I,l),W(e,L,s,R,O,l))}const F=[0,0,0],U=(0,E.Su)(),G=(0,c.Su)(),B=(0,c.Su)(),V=(0,c.Su)(),z=(0,c.Su)(),Y=(0,c.Su)(),H=(0,c.Su)();function W(e,t,r,i,o,a){if(ge(t)<S)return;pe(G,r,t),pe(B,i,t),pe(V,o,t),q(e,t,U),Y[1]=U[0],z[1]=U[1],H[1]=z[1]-Y[1];const n=[r,i,o],s=[G,B,V];for(let r=0;r<3;++r){q(e,n[r],U),Y[0]=U[0],z[0]=U[1],q(e,s[r],U),Y[2]=U[0],z[2]=U[1],H[0]=z[0]-Y[0],H[2]=z[2]-Y[2];const i=de(H);i<a.quality&&(fe(a.b0,n[r]),fe(a.b1,t),fe(a.b2,s[r]),a.quality=i)}}const j=(0,c.Su)();function q(e,t,r){const{data:i,size:o}=e;r[0]=Number.POSITIVE_INFINITY,r[1]=Number.NEGATIVE_INFINITY;for(let e=0;e<i.length;e+=o){const o=i[e]*t[0]+i[e+1]*t[1]+i[e+2]*t[2];r[0]=Math.min(r[0],o),r[1]=Math.max(r[1],o)}}function K(e,t,r){r.center=e,r.halfSize=(0,l.h)(t,t,.5),r.quaternion=s.IJ}const k=(0,c.Su)(),$=(0,c.Su)(),X=(0,c.Su)(),J=(0,c.Su)(),Z=(0,c.Su)(),Q=(0,c.Su)();function ee(e,t,r){fe(k,t),Math.abs(t[0])>Math.abs(t[1])&&Math.abs(t[0])>Math.abs(t[2])?k[0]=0:Math.abs(t[1])>Math.abs(t[2])?k[1]=0:k[2]=0,ge(k)<S&&(k[0]=k[1]=k[2]=1),pe($,t,k),ve($,$),pe(X,t,$),ve(X,X),te(e,t,$,X,J,Z),he(Q,Z,J),se(t,$,X,J,Z,Q,r)}function te(e,t,r,i,o,a){q(e,t,U),o[0]=U[0],a[0]=U[1],q(e,r,U),o[1]=U[0],a[1]=U[1],q(e,i,U),o[2]=U[0],a[2]=U[1]}const re=(0,c.Su)(),ie=(0,c.Su)(),oe=(0,c.Su)(),ae=(0,o.WK)(1,0,0,0,1,0,0,0,1),ne=(0,s.Su)();function se(e,t,r,i,o,a,n){ae[0]=e[0],ae[1]=e[1],ae[2]=e[2],ae[3]=t[0],ae[4]=t[1],ae[5]=t[2],ae[6]=r[0],ae[7]=r[1],ae[8]=r[2],n.quaternion=function(e,t){const r=t[0]+t[4]+t[8];if(r>0){let i=Math.sqrt(r+1);e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i}else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const i=(r+1)%3,o=(r+2)%3;let a=Math.sqrt(t[3*r+r]-t[3*i+i]-t[3*o+o]+1);e[r]=.5*a,a=.5/a,e[3]=(t[3*i+o]-t[3*o+i])*a,e[i]=(t[3*i+r]+t[3*r+i])*a,e[o]=(t[3*o+r]+t[3*r+o])*a}return e}(ne,ae),ue(re,i,o),me(re,re,.5),me(ie,e,re[0]),me(oe,t,re[1]),ue(ie,ie,oe),me(oe,r,re[2]),n.center=(0,l.g)(ie,ie,oe),n.halfSize=(0,l.h)(re,a,.5)}class le{constructor(e){this.minVert=new Array(7),this.maxVert=new Array(7),this.buffer=new ArrayBuffer(448);let t=0;this.minProj=new Float64Array(this.buffer,t,7),t+=56,this.maxProj=new Float64Array(this.buffer,t,7),t+=56;for(let e=0;e<7;++e)this.minVert[e]=new Float64Array(this.buffer,t,3),t+=24;for(let e=0;e<7;++e)this.maxVert[e]=new Float64Array(this.buffer,t,3),t+=24;for(let e=0;e<7;++e)this.minProj[e]=Number.POSITIVE_INFINITY,this.maxProj[e]=Number.NEGATIVE_INFINITY;const r=new Array(7),i=new Array(7),{data:o,size:a}=e;for(let e=0;e<o.length;e+=a){let t=o[e];t<this.minProj[0]&&(this.minProj[0]=t,r[0]=e),t>this.maxProj[0]&&(this.maxProj[0]=t,i[0]=e),t=o[e+1],t<this.minProj[1]&&(this.minProj[1]=t,r[1]=e),t>this.maxProj[1]&&(this.maxProj[1]=t,i[1]=e),t=o[e+2],t<this.minProj[2]&&(this.minProj[2]=t,r[2]=e),t>this.maxProj[2]&&(this.maxProj[2]=t,i[2]=e),t=o[e]+o[e+1]+o[e+2],t<this.minProj[3]&&(this.minProj[3]=t,r[3]=e),t>this.maxProj[3]&&(this.maxProj[3]=t,i[3]=e),t=o[e]+o[e+1]-o[e+2],t<this.minProj[4]&&(this.minProj[4]=t,r[4]=e),t>this.maxProj[4]&&(this.maxProj[4]=t,i[4]=e),t=o[e]-o[e+1]+o[e+2],t<this.minProj[5]&&(this.minProj[5]=t,r[5]=e),t>this.maxProj[5]&&(this.maxProj[5]=t,i[5]=e),t=o[e]-o[e+1]-o[e+2],t<this.minProj[6]&&(this.minProj[6]=t,r[6]=e),t>this.maxProj[6]&&(this.maxProj[6]=t,i[6]=e)}for(let e=0;e<7;++e){let t=r[e];fe(this.minVert[e],o,t),t=i[e],fe(this.maxVert[e],o,t)}}}class ce{constructor(){this.b0=(0,c.WK)(1,0,0),this.b1=(0,c.WK)(0,1,0),this.b2=(0,c.WK)(0,0,1),this.quality=0}}function de(e){return e[0]*e[1]+e[0]*e[2]+e[1]*e[2]}function ue(e,t,r){e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2]}function he(e,t,r){e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2]}function me(e,t,r){e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r}function fe(e,t,r=0){e[0]=t[r],e[1]=t[r+1],e[2]=t[r+2]}function pe(e,t,r){const i=t[0],o=t[1],a=t[2],n=r[0],s=r[1],l=r[2];e[0]=o*l-a*s,e[1]=a*n-i*l,e[2]=i*s-o*n}function ve(e,t){const r=t[0]*t[0]+t[1]*t[1]+t[2]*t[2];if(r>0){const i=1/Math.sqrt(r);e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i}}function ge(e){return e[0]*e[0]+e[1]*e[1]+e[2]*e[2]}function _e(e,t){const r=t[0]-e[0],i=t[1]-e[1],o=t[2]-e[2];return r*r+i*i+o*o}function xe(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}class Te{constructor(e=c.cX,t=We,r=s.IJ){this._data=[e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2],r[3]]}clone(){const e=new Te;return e._data=this._data.slice(),e}invalidate(){this._data[3]=-1}get isValid(){return this._data[3]>=0}static fromData(e){const t=new Te;return t._data=e.slice(),t}static fromJSON(e){return new Te(e.center,e.halfSize,e.quaternion)}copy(e){this._data=e.data.slice()}get center(){return(0,l.s)(x.Wq.get(),this._data[0],this._data[1],this._data[2])}get centerX(){return this._data[0]}get centerY(){return this._data[1]}get centerZ(){return this._data[2]}getCenter(e){return e[0]=this._data[0],e[1]=this._data[1],e[2]=this._data[2],e}set center(e){this._data[0]=e[0],this._data[1]=e[1],this._data[2]=e[2]}setCenter(e,t,r){this._data[0]=e,this._data[1]=t,this._data[2]=r}get halfSize(){return(0,l.s)(x.Wq.get(),this._data[3],this._data[4],this._data[5])}get halfSizeX(){return this._data[3]}get halfSizeY(){return this._data[4]}get halfSizeZ(){return this._data[5]}getHalfSize(e){return e[0]=this._data[3],e[1]=this._data[4],e[2]=this._data[5],e}set halfSize(e){this._data[3]=e[0],this._data[4]=e[1],this._data[5]=e[2]}get quaternion(){return(0,n.WO)(x.QX.get(),this._data[6],this._data[7],this._data[8],this._data[9])}getQuaternion(e){return e[0]=this._data[6],e[1]=this._data[7],e[2]=this._data[8],e[3]=this._data[9],e}set quaternion(e){this._data[6]=e[0],this._data[7]=e[1],this._data[8]=e[2],this._data[9]=e[3]}get data(){return this._data}getCorners(e){const t=Ee,r=this._data;t[0]=r[6],t[1]=r[7],t[2]=r[8],t[3]=r[9];for(let i=0;i<8;++i){const o=e[i];o[0]=(1&i?-1:1)*r[3],o[1]=(2&i?-1:1)*r[4],o[2]=(4&i?-1:1)*r[5],(0,l.u)(o,o,t),o[0]+=r[0],o[1]+=r[1],o[2]+=r[2]}}isVisible(e){return this.intersectPlane(e[0])<=0&&this.intersectPlane(e[1])<=0&&this.intersectPlane(e[2])<=0&&this.intersectPlane(e[3])<=0&&this.intersectPlane(e[4])<=0&&this.intersectPlane(e[5])<=0}get radius(){const e=this._data[3],t=this._data[4],r=this._data[5];return Math.sqrt(e*e+t*t+r*r)}intersectSphere(e){Ae[0]=this._data[0]-e[0],Ae[1]=this._data[1]-e[1],Ae[2]=this._data[2]-e[2];const t=this.getQuaternion(be);return(0,n.fO)(Ee,t),(0,l.u)(Ae,Ae,Ee),(0,l.v)(Ae,Ae),ye[0]=Math.min(Ae[0],this._data[3]),ye[1]=Math.min(Ae[1],this._data[4]),ye[2]=Math.min(Ae[2],this._data[5]),(0,l.w)(ye,Ae)<e[3]*e[3]}intersectSphereWithMBS(e,t=this.radius){const r=this._data;Ae[0]=r[0]-e[0],Ae[1]=r[1]-e[1],Ae[2]=r[2]-e[2];const i=e[3],o=i+t;return!((0,l.x)(Ae)>o*o)&&(Ee[0]=-r[6],Ee[1]=-r[7],Ee[2]=-r[8],Ee[3]=r[9],(0,l.u)(Ae,Ae,Ee),(0,l.v)(Ae,Ae),ye[0]=Math.min(Ae[0],r[3]),ye[1]=Math.min(Ae[1],r[4]),ye[2]=Math.min(Ae[2],r[5]),(0,l.w)(ye,Ae)<i*i)}intersectPlane(e){const t=e[0]*this._data[0]+e[1]*this._data[1]+e[2]*this._data[2]+e[3],r=this.projectedRadius((0,g.Oq)(e));return t>r?1:t<-r?-1:0}intersectRay(e,t,r=0){const i=this._data,o=Ee;o[0]=-i[6],o[1]=-i[7],o[2]=-i[8],o[3]=i[9],Ae[0]=e[0]-i[0],Ae[1]=e[1]-i[1],Ae[2]=e[2]-i[2];const a=(0,l.u)(Ae,Ae,Ee),n=(0,l.u)(ye,t,Ee);let s=-1/0,c=1/0;const d=this.getHalfSize(Ue);for(let e=0;e<3;e++){const t=a[e],i=n[e],o=d[e]+r;if(Math.abs(i)>1e-6){const e=(o-t)/i,r=(-o-t)/i;s=Math.max(s,Math.min(e,r)),c=Math.min(c,Math.max(e,r))}else if(t>o||t<-o)return!1}return s<=c}projectedArea(e,t,r,o){const a=this.getQuaternion(be);(0,n.fO)(Ee,a),Ae[0]=e[0]-this._data[0],Ae[1]=e[1]-this._data[1],Ae[2]=e[2]-this._data[2],(0,l.u)(Ae,Ae,Ee);const s=this.getHalfSize(Ue),c=Ae[0]<-s[0]?-1:Ae[0]>s[0]?1:0,u=Ae[1]<-s[1]?-1:Ae[1]>s[1]?1:0,h=Ae[2]<-s[2]?-1:Ae[2]>s[2]?1:0,m=Math.abs(c)+Math.abs(u)+Math.abs(h);if(0===m)return 1/0;const f=1===m?4:6,p=6*(c+3*u+9*h+13);(0,i.KU)(Ge,a),(0,i.aU)(Ge,Ge,s);const v=this.getCenter(De);for(let e=0;e<f;e++){const r=Re[p+e];(0,l.s)(Ae,((1&r)<<1)-1,(2&r)-1,((4&r)>>1)-1),(0,l.t)(Ae,Ae,Ge),(0,l.g)(Ce,v,Ae),Ce[3]=1,(0,d.t)(Ce,Ce,t);const i=1/Math.max(1e-6,Ce[3]);Me[2*e]=Ce[0]*i,Me[2*e+1]=Ce[1]*i}const g=2*f-2;let _=Me[0]*(Me[3]-Me[g+1])+Me[g]*(Me[1]-Me[g-1]);for(let e=2;e<g;e+=2)_+=Me[e]*(Me[e+3]-Me[e-1]);return Math.abs(_)*r*o*.125}projectedRadius(e){const t=this.getQuaternion(be);return(0,n.fO)(Ee,t),(0,l.u)(Ae,e,Ee),Math.abs(Ae[0]*this._data[3])+Math.abs(Ae[1]*this._data[4])+Math.abs(Ae[2]*this._data[5])}minimumDistancePlane(e){return e[0]*this._data[0]+e[1]*this._data[1]+e[2]*this._data[2]+e[3]-this.projectedRadius((0,g.Oq)(e))}maximumDistancePlane(e){return e[0]*this._data[0]+e[1]*this._data[1]+e[2]*this._data[2]+e[3]+this.projectedRadius((0,g.Oq)(e))}toAaBoundingBox(e){const t=this.getQuaternion(be),r=(0,i.KU)(Ge,t),o=this._data[3]*Math.abs(r[0])+this._data[4]*Math.abs(r[3])+this._data[5]*Math.abs(r[6]),a=this._data[3]*Math.abs(r[1])+this._data[4]*Math.abs(r[4])+this._data[5]*Math.abs(r[7]),n=this._data[3]*Math.abs(r[2])+this._data[4]*Math.abs(r[5])+this._data[5]*Math.abs(r[8]);e[0]=this._data[0]-o,e[1]=this._data[1]-a,e[2]=this._data[2]-n,e[3]=this._data[0]+o,e[4]=this._data[1]+a,e[5]=this._data[2]+n}transform(e,t,r,i=0,o=(0,m._s)(r),a=(0,m._s)(t),s=(0,v.Mx)(t,a)){if(r===o)t.isGeographic?function(e,t,r,i,o=(0,m._s)(r)){const a=(0,h.e0)(r),s=1+Math.max(0,i)/(a.radius+e.centerZ);e.getCenter(Le),Le[2]+=i,(0,p.projectBuffer)(Le,r,0,Le,o,0,1),t.center=Le;const c=e.getQuaternion(be);t.quaternion=c,(0,n.fO)(Ee,c),(0,l.s)(ze,0,0,1),(0,l.u)(ze,ze,Ee);const d=e.getHalfSize(Ue);(0,l.s)(ze,d[0]*Math.abs(ze[0]),d[1]*Math.abs(ze[1]),d[2]*Math.abs(ze[2])),(0,l.h)(ze,ze,a.inverseFlattening),(0,l.g)(ze,d,ze),t.halfSize=(0,l.h)(ze,ze,s)}(this,e,t,i,a):function(e,t,r,i,o=(0,m._s)(r),a=(0,v.Mx)(r,o)){e.getCorners(Ve),e.getCenter(Le),Le[2]+=i,(0,f.y)(r,Le,Be,o),t.setCenter(Be[12],Be[13],Be[14]);const s=2*Math.sqrt(1+Be[0]+Be[5]+Be[10]);Ee[0]=(Be[6]-Be[9])/s,Ee[1]=(Be[8]-Be[2])/s,Ee[2]=(Be[1]-Be[4])/s,Ee[3]=.25*s;const c=e.getQuaternion(be);t.quaternion=(0,n.iW)(Ee,Ee,c),(0,n.fO)(Ee,Ee),(0,l.s)(Ye,0,0,0);const d=t.getCenter(Fe);for(const e of Ve)e[2]+=i,a(e,0,e,0),(0,l.z)(ze,e,d),(0,l.u)(ze,ze,Ee),(0,l.v)(ze,ze),(0,l.C)(Ye,Ye,ze);t.halfSize=Ye}(this,e,t,i,a,s);else if(t.isWGS84&&(r.isWebMercator||(0,_.GK)(r)))!function(e,t,r,i,o){t.getCenter(De),De[2]+=o;const a=(0,m._s)(r);(0,p.projectBuffer)(De,e,0,De,a,0,1),Oe(a,t,De,r,i)}(t,this,r,e,i);else if(t.isWebMercator&&(0,_.GK)(r))!function(e,t,r,i,o){t.getCenter(De),De[2]+=o,Oe(e,t,De,r,i)}(t,this,r,e,i);else{const o=this.getCenter(De);o[2]+=i,(0,p.projectBuffer)(o,t,0,o,r,0,1),e.center=o,this!==e&&(e.quaternion=this.getQuaternion(be),e.halfSize=this.getHalfSize(Ue))}}}const Ee=(0,s.Su)(),be=(0,s.Su)(),Se=(0,s.Su)(),Ae=(0,c.Su)(),ye=(0,c.Su)(),Ce=(0,u.Su)();function we(e,t=new Te){return function(e,t){const{data:r,size:i}=e,o=r.length/i;if(o<=0)return;const a=new le(e);ue(A,a.minProj,a.maxProj),me(A,A,.5),he(y,a.maxProj,a.minProj);const n=de(y),s=new ce;s.quality=n,o<14&&(e=new b.Y(new Float64Array(a.buffer,112,42),3));const l=(0,c.Su)(),d=(0,c.Su)(),u=(0,c.Su)(),h=(0,c.Su)(),m=(0,c.Su)(),f=(0,c.Su)(),p=(0,c.Su)();switch(C(a,e,p,l,d,u,h,m,f,s)){case 1:return void K(A,y,t);case 2:return void ee(e,h,t)}D(e,p,l,d,u,h,m,f,s),te(e,s.b0,s.b1,s.b2,J,Z);const v=(0,c.Su)();he(v,Z,J),s.quality=de(v),s.quality<n?se(s.b0,s.b1,s.b2,J,Z,v,t):K(A,y,t)}(e,t),t}const Me=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.2],Re=(()=>{const e=new Int8Array(162);let t=0;const r=r=>{for(let i=0;i<r.length;i++)e[t+i]=r[i];t+=6};return r([6,2,3,1,5,4]),r([0,2,3,1,5,4]),r([0,2,3,7,5,4]),r([0,1,3,2,6,4]),r([0,1,3,2,0,0]),r([0,1,5,7,3,2]),r([0,1,3,7,6,4]),r([0,1,3,7,6,2]),r([0,1,5,7,6,2]),r([0,1,5,4,6,2]),r([0,1,5,4,0,0]),r([0,1,3,7,5,4]),r([0,2,6,4,0,0]),r([0,0,0,0,0,0]),r([1,3,7,5,0,0]),r([2,3,7,6,4,0]),r([2,3,7,6,0,0]),r([2,3,1,5,7,6]),r([0,1,5,7,6,2]),r([0,1,5,7,6,4]),r([0,1,3,7,6,4]),r([4,5,7,6,2,0]),r([4,5,7,6,0,0]),r([4,5,1,3,7,6]),r([0,2,3,7,5,4]),r([6,2,3,7,5,4]),r([6,2,3,1,5,4]),e})();function Ie(e,t,r,i,o){const a=e.getQuaternion(be);o.quaternion=a,(0,n.fO)(Ee,a);const s=e.getCenter(De),d=e.getHalfSize(Ue);if(i===T.UZ.Global){(0,l.u)(ze,s,Ee),(0,l.v)(Ye,ze),(0,l.y)(He,Ye,d),(0,l.z)(He,Ye,He);const i=(0,l.l)(He);(0,l.g)(He,Ye,d);const a=(0,l.l)(He);if(i<r)o.center=s,(0,l.s)(ze,r,r,r),o.halfSize=(0,l.g)(ze,d,ze);else{const n=a>0?1+t/a:1,s=i>0?1+r/i:1,c=(s+n)/2,u=(s-n)/2;(0,l.h)(He,Ye,u),o.halfSize=(0,l.r)(He,He,d,c),(0,l.h)(He,Ye,c),(0,l.r)(He,He,d,u),(0,l.A)(ze,ze),(0,l.B)(ze,He,ze);const h=e.getQuaternion(Se);o.center=(0,l.u)(ze,ze,h)}}else{o.center=(0,l.r)(ze,s,c.wx,(r+t)/2);const e=(0,l.u)(ze,c.wx,Ee);(0,l.v)(e,e),o.halfSize=(0,l.r)(Ye,d,e,(r-t)/2)}return o}function Oe(e,t,r,o,a){const n=t.getQuaternion(be),s=(0,i.KU)(Ge,n),l=t.getHalfSize(Ue);for(let e=0;e<8;++e){for(let t=0;t<3;++t)Le[t]=l[t]*(0!=(e&1<<t)?-1:1);for(let t=0;t<3;++t){let i=r[t];for(let e=0;e<3;++e)i+=Le[e]*s[3*e+t];Ne[3*e+t]=i}}(0,p.projectBuffer)(Ne,e,0,Ne,o,0,8),we(Pe,a)}const Ne=new Array(24),Pe=new b.Y(Ne,3),Le=(0,c.Su)(),De=(0,c.Su)(),Fe=(0,c.Su)(),Ue=(0,c.Su)(),Ge=(0,o.Su)(),Be=(0,a.Su)(),Ve=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],ze=(0,c.Su)(),Ye=(0,c.Su)(),He=(0,c.Su)(),We=(0,c.WK)(-1,-1,-1)},90124:(e,t,r)=>{r.d(t,{Er:()=>d,G8:()=>c,_J:()=>l});var i=r(80324),o=r(44840),a=r(48688),n=r(60288);function s(e){e.varyings.add("linearDepth","float")}function l(e){e.vertex.uniforms.add(new a.$("nearFar",((e,t)=>t.camera.nearFar)))}function c(e){e.vertex.code.add(n.Y`float calculateLinearDepth(vec2 nearFar,float z) {
|
|
280
|
+
`),e}const p=Object.freeze(Object.defineProperty({__proto__:null,build:f},Symbol.toStringTag,{value:"Module"}))},84752:(e,t,r)=>{r.d(t,{a:()=>x,b:()=>T,c:()=>v,f:()=>b,g:()=>E,j:()=>w,n:()=>L}),r(9456);var i=r(66360),o=r(53648),a=r(15008),n=r(98472),s=r(62484),l=r(74784),c=r(37008),d=r(47364),u=r(82315),h=r(90484),m=r(48880),f=r(20136);const p=v();function v(){return(0,c.Su)()}const g=l.e,_=l.e;function x(e,t){return(0,l.c)(t,e)}function T(e){return e[3]}function E(e){return e}function b(e,t,r,i){return(0,c.WK)(e,t,r,i)}function S(e,t,r){if(null==t)return!1;if(!y(e,t,A))return!1;let{t0:i,t1:o}=A;if((i<0||o<i&&o>0)&&(i=o),i<0)return!1;if(r){const{origin:e,direction:o}=t;r[0]=e[0]+o[0]*i,r[1]=e[1]+o[1]*i,r[2]=e[2]+o[2]*i}return!0}const A={t0:0,t1:0};function y(e,t,r){const{origin:i,direction:o}=t,a=C;a[0]=i[0]-e[0],a[1]=i[1]-e[1],a[2]=i[2]-e[2];const n=o[0]*o[0]+o[1]*o[1]+o[2]*o[2];if(0===n)return!1;const s=2*(o[0]*a[0]+o[1]*a[1]+o[2]*a[2]),l=s*s-4*n*(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]-e[3]*e[3]);if(l<0)return!1;const c=Math.sqrt(l);return r.t0=(-s-c)/(2*n),r.t1=(-s+c)/(2*n),!0}const C=(0,s.Su)();function w(e,t){return S(e,t,null)}function M(e,t,r){const i=f.Wq.get(),o=f.SW.get();(0,n.b)(i,t.origin,t.direction);const s=T(e);(0,n.b)(r,i,t.origin),(0,n.h)(r,r,1/(0,n.l)(r)*s);const l=I(e,t.origin),c=(0,m.i4)(t.origin,r);return(0,a.IT)(o,c+l,i),(0,n.e)(r,r,o),r}function R(e,t,r){const i=(0,n.f)(f.Wq.get(),t,e),o=(0,n.h)(f.Wq.get(),i,e[3]/(0,n.l)(i));return(0,n.g)(r,o,e)}function I(e,t){const r=(0,n.f)(f.Wq.get(),t,e),i=(0,n.l)(r),a=T(e),s=a+Math.abs(a-i);return(0,o.Uj)(a/s)}const O=(0,s.Su)();function N(e,t,r,i){const a=(0,n.f)(O,t,e);switch(r){case u.k.X:{const e=(0,o.Iv)(a,O)[2];return(0,n.s)(i,-Math.sin(e),Math.cos(e),0)}case u.k.Y:{const e=(0,o.Iv)(a,O),t=e[1],r=e[2],s=Math.sin(t);return(0,n.s)(i,-s*Math.cos(r),-s*Math.sin(r),Math.cos(t))}case u.k.Z:return(0,n.n)(i,a);default:return}}function P(e,t){const r=(0,n.f)(D,t,e);return(0,n.l)(r)-e[3]}function L(e,t){const r=(0,n.a)(e,t),i=T(e);return r<=i*i}const D=(0,s.Su)(),F=v();Object.freeze(Object.defineProperty({__proto__:null,NullSphere:p,altitudeAt:P,angleToSilhouette:I,axisAt:N,clear:function(e){e[0]=e[1]=e[2]=e[3]=0},closestPoint:function(e,t,r){return S(e,t,r)?r:((0,h.CE)(t,e,r),R(e,r,r))},closestPointOnSilhouette:M,containsPoint:L,copy:x,create:v,distanceToSilhouette:function(e,t){const r=(0,n.f)(f.Wq.get(),t,e),i=(0,n.p)(r),o=e[3]*e[3];return Math.sqrt(Math.abs(i-o))},elevate:function(e,t,r){return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=e[3]+t,r},equals:_,exactEquals:g,fromCenterAndRadius:function(e,t){return(0,c.WK)(e[0],e[1],e[2],t)},fromRadius:function(e,t){return e[0]=e[1]=e[2]=0,e[3]=t,e},fromValues:b,getCenter:E,getRadius:T,intersectLine:function(e,t,r){const i=(0,h.i_)(t,r);if(!y(e,i,A))return[];const{origin:o,direction:a}=i,{t0:l,t1:c}=A,u=t=>{const r=(0,s.Su)();return(0,n.r)(r,o,a,t),R(e,r,r)};return Math.abs(l-c)<(0,d.Au)()?[u(l)]:[u(l),u(c)]},intersectRay:S,intersectRayClosestSilhouette:function(e,t,r){if(S(e,t,r))return r;const i=M(e,t,f.Wq.get());return(0,n.g)(r,t.origin,(0,n.h)(f.Wq.get(),t.direction,(0,n.q)(t.origin,i)/(0,n.l)(t.direction))),r},intersectsRay:w,projectPoint:R,setAltitudeAt:function(e,t,r,i){const o=P(e,t),a=N(e,t,u.k.Z,D),s=(0,n.h)(D,a,r-o);return(0,n.g)(i,t,s)},setExtent:function(e,t,r){return i.c.getLogger("esri.geometry.support.sphere").error("sphere.setExtent is not yet supported"),e!==r&&x(e,r),r},tmpSphere:F,union:function(e,t,r=(0,c.Su)()){const i=(0,n.q)(e,t),o=e[3],a=t[3];return i+a<o?((0,l.c)(r,e),r):i+o<a?((0,l.c)(r,t),r):((0,n.m)(r,e,t,(i+a-o)/(2*i)),r[3]=(i+o+a)/2,r)},wrap:function(e){return e}},Symbol.toStringTag,{value:"Module"}))},52180:(e,t,r)=>{r.d(t,{o:()=>o});var i=r(52324);class o{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.o)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*a);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,a));e++)this._items.push(this._allocator())}}const a=1024},95728:(e,t,r)=>{r.d(t,{a:()=>o});var i=r(20744);let o=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.c(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[o,a]=t.split("."),n=/^\s*\d+\s*$/;if(!o?.match||!n.test(o))throw new i.c((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!a?.match||!n.test(a))throw new i.c((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const s=parseInt(o,10),l=parseInt(a,10);return new e(s,l,r)}}},8472:(e,t,r)=>{function i(e){return e=e||globalThis.location.hostname,c.some((t=>null!=e?.match(t)))}function o(e,t){return e&&(t=t||globalThis.location.hostname)?null!=t.match(a)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(n)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e}r.d(t,{OM:()=>i,Ur:()=>o});const a=/^devext.arcgis.com$/,n=/^qaext.arcgis.com$/,s=/^[\w-]*\.mapsdevext.arcgis.com$/,l=/^[\w-]*\.mapsqa.arcgis.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local.esri.com$/,a,n,/^jsapps.esri.com$/,s,l]},38600:(e,t,r)=>{function i(){return new Float32Array(2)}function o(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function a(){return i()}function n(){return o(1,1)}function s(){return o(1,0)}function l(){return o(0,1)}r.d(t,{Qw:()=>d,Su:()=>i,WK:()=>o,cX:()=>c});const c=a(),d=n(),u=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:u,UNIT_Y:h,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:i,createView:function(e,t){return new Float32Array(e,t,2)},fromValues:o,ones:n,unitX:s,unitY:l,zeros:a},Symbol.toStringTag,{value:"Module"}))},92896:(e,t,r)=>{r.d(t,{mc:()=>o});var i=r(72008);function o(e,t=!1){return e<=i._?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}},90484:(e,t,r)=>{r.d(t,{CE:()=>d,Su:()=>n,em:()=>l,i_:()=>c}),r(92400);var i=r(52180),o=r(98472),a=r(62484);function n(e){return e?s((0,a.ct)(e.origin),(0,a.ct)(e.direction)):s((0,a.Su)(),(0,a.Su)())}function s(e,t){return{origin:e,direction:t}}function l(e,t){const r=u.get();return r.origin=e,r.direction=t,r}function c(e,t,r=n()){return(0,o.c)(r.origin,e),(0,o.f)(r.direction,t,e),r}function d(e,t,r){const i=(0,o.k)(e.direction,(0,o.f)(r,t,e.origin));return(0,o.g)(r,e.origin,(0,o.h)(r,e.direction,i)),r}r(20136);const u=new i.o((()=>n()))},96472:(e,t,r)=>{r.d(t,{fetch:()=>jt});var i=r(8472),o=r(77556),a=r(68612),n=r(15008),s=r(87104),l=r(85256),c=r(98472),d=r(62484),u=r(77048),h=r(92896),m=r(71004),f=r(48952),p=r(92160),v=r(12240),g=r(88340),_=r(74960),x=r(57792),T=r(68268),E=r(2888),b=r(5472),S=r(38600);function A(e){if(null==e)return null;const t=null!=e.offset?e.offset:S.cX,r=null!=e.rotation?e.rotation:0,i=null!=e.scale?e.scale:S.Qw,n=(0,a.WK)(1,0,0,0,1,0,t[0],t[1],1),s=(0,a.WK)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,a.WK)(i[0],0,0,0,i[1],0,0,0,1),c=(0,a.Su)();return(0,o.iW)(c,s,l),(0,o.iW)(c,n,c),c}class y{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class C{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new y,this.numberOfVertices=0}}var w=r(2600),M=r(40196),R=r(33184),I=r(20744),O=r(66360);class N{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get(e,t){return this._outer.get(e)?.get(t)}set(e,t,r){const i=this._outer.get(e);i?i.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)))}}var P=r(10860),L=r(95728),D=r(97143);async function F(e,t){const{data:r}=await(0,w.c)(e,{responseType:"image",...t});return r}var U=r(89560),G=r(12260),B=r(71520),V=r(9456),z=r(77860),Y=r(70680),H=r(72008),W=r(28176),j=r(49628),q=r(24832);let K;var k,$;($=k||(k={}))[$.ETC1_RGB=0]="ETC1_RGB",$[$.ETC2_RGBA=1]="ETC2_RGBA",$[$.BC1_RGB=2]="BC1_RGB",$[$.BC3_RGBA=3]="BC3_RGBA",$[$.BC4_R=4]="BC4_R",$[$.BC5_RG=5]="BC5_RG",$[$.BC7_M6_RGB=6]="BC7_M6_RGB",$[$.BC7_M5_RGBA=7]="BC7_M5_RGBA",$[$.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",$[$.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",$[$.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",$[$.ATC_RGB=11]="ATC_RGB",$[$.ATC_RGBA=12]="ATC_RGBA",$[$.FXT1_RGB=17]="FXT1_RGB",$[$.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",$[$.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",$[$.ETC2_EAC_R11=20]="ETC2_EAC_R11",$[$.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",$[$.RGBA32=13]="RGBA32",$[$.RGB565=14]="RGB565",$[$.BGR565=15]="BGR565",$[$.RGBA4444=16]="RGBA4444";var X=r(77800),J=r(22184),Z=r(97684);let Q=null,ee=null;async function te(){return null==ee&&(ee=function(){if(null==K){const e=e=>(0,q.O)(`esri/libs/basisu/${e}`);K=r.e(4824).then(r.bind(r,84824)).then((e=>e.b)).then((({default:t})=>t({locateFile:e}).then((e=>(e.initializeBasis(),delete e.then,e)))))}return K}(),Q=await ee),ee}function re(e,t,r,i,o){const a=(0,Z.O4)(t?X.sr.COMPRESSED_RGBA8_ETC2_EAC:X.sr.COMPRESSED_RGB8_ETC2),n=o&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*a*n)}function ie(e){return e.getNumImages()>=1&&!e.isUASTC()}function oe(e){return e.getFaces()>=1&&e.isETC1S()}function ae(e,t,r,i,o,a,n,s){const{compressedTextureETC:l,compressedTextureS3TC:c}=e.capabilities,[d,u]=l?i?[k.ETC2_RGBA,X.sr.COMPRESSED_RGBA8_ETC2_EAC]:[k.ETC1_RGB,X.sr.COMPRESSED_RGB8_ETC2]:c?i?[k.BC3_RGBA,X.sr.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[k.BC1_RGB,X.sr.COMPRESSED_RGB_S3TC_DXT1_EXT]:[k.RGBA32,X.Id.RGBA],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(n(e,d))),s(e,d,m[e]);return t.internalFormat=u,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?X.Ud.LINEAR_MIPMAP_LINEAR:X.Ud.LINEAR,t.width=o,t.height=a,new J.w(e,t,{type:"compressed",levels:m})}var ne=r(58608),se=r(74376);const le=()=>O.c.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function ce(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const de=ce("DXT1"),ue=ce("DXT3"),he=ce("DXT5");function me(e,t,r){if(e instanceof ImageData)return me(fe(e),t,r);const i=document.createElement("canvas");return i.width=t,i.height=r,i.getContext("2d").drawImage(e,0,0,i.width,i.height),i}function fe(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new I.c("Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}var pe,ve,ge=r(90736),_e=r(51576);class xe extends ne.u{get parameters(){return this._parameters}constructor(e,t){super(),this._data=e,this.type=se.C.Texture,this._glTexture=null,this._loadingPromise=null,this._loadingController=null,this.events=new z.c,this._parameters={...Ee,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.frameUpdate=void 0}_startPreload(e){null!=e&&(e instanceof HTMLVideoElement?(this.frameUpdate=t=>this._frameUpdate(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e))}_startPreloadVideoElement(e){if(!((0,W.ue)(e.src)||"auto"===e.preload&&e.crossOrigin)){e.preload="auto",e.crossOrigin="anonymous";const t=!e.paused;if(e.src=e.src,t&&e.autoplay){const t=()=>{e.removeEventListener("canplay",t),e.play()};e.addEventListener("canplay",t)}}}_startPreloadImageElement(e){(0,W.o9)(e.src)||(0,W.ue)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new _e.O;return t.wrapMode=this._parameters.wrap??X.Qz.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?X.Ud.LINEAR_MIPMAP_LINEAR:X.Ud.LINEAR,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t}get glTexture(){return this._glTexture}get memoryEstimate(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,H.uk)(e)||(0,H.K2)(e))return t.encoding===G.yk.KTX2_ENCODING?function(e,t){if(null==Q)return e.byteLength;const r=new Q.KTX2File(new Uint8Array(e)),i=oe(r)?re(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):t.encoding===G.yk.BASIS_ENCODING?function(e,t){if(null==Q)return e.byteLength;const r=new Q.BasisFile(new Uint8Array(e)),i=ie(r)?re(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?Te(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._glTexture)return this._glTexture;if(this._loadingPromise)return this._loadingPromise;const t=this._data;return null==t?(this._glTexture=new J.w(e,this._createDescriptor(e),null),this._glTexture):(this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):((0,H.uk)(t)||(0,H.K2)(t))&&this._parameters.encoding===G.yk.DDS_ENCODING?this._loadFromDDSData(e,t):((0,H.uk)(t)||(0,H.K2)(t))&&this._parameters.encoding===G.yk.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,H.uk)(t)||(0,H.K2)(t))&&this._parameters.encoding===G.yk.BASIS_ENCODING?this._loadFromBasis(e,t):(0,H.K2)(t)?this._loadFromPixelData(e,t):(0,H.uk)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_frameUpdate(e,t){return null==this._glTexture||e.readyState<pe.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e,0,31);if(542327876!==r[0])return le().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return le().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let o,a;switch(i){case de:o=8,a=X.sr.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case ue:o=16,a=X.sr.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case he:o=16,a=X.sr.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return le().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let n=1,s=r[4],l=r[3];0==(3&s)&&0==(3&l)||(le().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,l=l+3&-4);const c=s,d=l;let u,h;131072&r[2]&&!1!==t&&(n=Math.max(1,r[7]));let m=r[1]+4;const f=[];for(let t=0;t<n;++t)h=(s+3>>2)*(l+3>>2)*o,u=new Uint8Array(e,m,h),f.push(u),m+=h,s=Math.max(1,s>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:f},internalFormat:a,width:c,height:d}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:o,internalFormat:a,width:n,height:s}=i;return t.samplingMode=o.levels.length>1?X.Ud.LINEAR_MIPMAP_LINEAR:X.Ud.LINEAR,t.hasMipmap=o.levels.length>1,t.internalFormat=a,t.width=n,t.height=s,new J.w(e,t,o)}(e,this._createDescriptor(e),t),this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>async function(e,t,r){null==Q&&(Q=await te());const i=new Q.KTX2File(new Uint8Array(r));if(!oe(i))return null;i.startTranscoding();const o=ae(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),((e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>async function(e,t,r){null==Q&&(Q=await te());const i=new Q.BasisFile(new Uint8Array(r));if(!ie(i))return null;i.startTranscoding();const o=ae(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),((e,t)=>i.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>i.transcodeImage(r,0,e,t,0,0)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,ge.Uc)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?X.Id.LUMINANCE:3===this._parameters.components?X.Id.RGB:X.Id.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new J.w(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const i=await F(t,{signal:r});return(0,P.wp)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,j.wx)(t,t.src,!1,r);return(0,P.wp)(r),this._loadFromImage(e,i)}))}_loadFromVideoElement(e,t){return t.readyState>=pe.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((i,o)=>{const a=()=>{t.removeEventListener("loadeddata",n),t.removeEventListener("error",s),(0,Y.oR)(l)},n=()=>{t.readyState>=pe.HAVE_CURRENT_DATA&&(a(),i(this._loadFromImage(e,t)))},s=e=>{a(),o(e||new I.c("Failed to load video"))};t.addEventListener("loadeddata",n),t.addEventListener("error",s);const l=(0,P.wD)(r,(()=>s((0,P.Uh)())))}))))}_loadFromImage(e,t){let r=t;if(!(r instanceof HTMLVideoElement)){const{maxTextureSize:t}=e.parameters;r=this._parameters.downsampleUncompressed?function(e,t){let r=e.width*e.height;if(r<4096)return e instanceof ImageData?fe(e):e;let i=e.width,o=e.height;do{i=Math.ceil(i/2),o=Math.ceil(o/2),r=i*o}while(r>1048576||null!=t&&(i>t||o>t));return me(e,i,o)}(r,t):function(e,t){const r=Math.max(e.width,e.height);if(r<=t)return e;const i=t/r;return me(e,Math.round(e.width*i),Math.round(e.height*i))}(r,t)}const i=Te(r);this._parameters.width=i.width,this._parameters.height=i.height;const o=this._createDescriptor(e);return o.pixelFormat=3===this._parameters.components?X.Id.RGB:X.Id.RGBA,o.width=i.width,o.height=i.height,this._glTexture=new J.w(e,o,r),this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null)};return r.then(i,i),r}unload(){if(this._glTexture=(0,Y.yI)(this._glTexture),null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}}function Te(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}(ve=pe||(pe={}))[ve.HAVE_NOTHING=0]="HAVE_NOTHING",ve[ve.HAVE_METADATA=1]="HAVE_METADATA",ve[ve.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",ve[ve.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",ve[ve.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA";const Ee={wrap:{s:X.Qz.REPEAT,t:X.Qz.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1,downsampleUncompressed:!1};var be=r(4636),Se=r(21288),Ae=r(72364),ye=r(80324),Ce=r(88196),we=r(58472),Me=r(81832),Re=r(10375),Ie=r(81048),Oe=r(56336),Ne=r(81472);const Pe=(0,Ne.ac)(X.w$.SRC_ALPHA,X.w$.ONE,X.w$.ONE_MINUS_SRC_ALPHA,X.w$.ONE_MINUS_SRC_ALPHA),Le=(0,Ne.KO)(X.w$.ONE,X.w$.ONE),De=(0,Ne.KO)(X.w$.ZERO,X.w$.ONE_MINUS_SRC_ALPHA);function Fe(e){return e===Oe.H.FrontFace?null:e===Oe.H.Alpha?De:Le}const Ue={factor:-1,units:-2};function Ge(e,t=X.et.LESS){return e===Oe.H.NONE||e===Oe.H.FrontFace?t:X.et.LEQUAL}var Be=r(40328),Ve=r(84752),ze=r(29244);const Ye=new class{constructor(e=0){this.offset=e,this.sphere=(0,Ve.c)(),this.tmpVertex=(0,d.Su)()}applyToVertex(e,t,r){const i=this.objectTransform.transform,o=(0,c.s)(He,e,t,r),a=(0,c.e)(o,o,i),n=this.offset/(0,c.l)(a);(0,c.r)(a,a,a,n);const s=this.objectTransform.inverse;return(0,c.e)(this.tmpVertex,a,s),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,c.l)(e);(0,c.r)(e,e,e,r);const i=this.offset/(0,c.l)(t);(0,c.r)(t,t,t,i)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=(0,c.l)((0,Ve.g)(e)),r=this.offset/t;return(0,c.r)((0,Ve.g)(this.sphere),(0,Ve.g)(e),(0,Ve.g)(e),r),this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}};new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,d.Su)(),this._tmpMbs=(0,Ve.c)(),this._tmpObb=new ze.Eb,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,c.l)(e)}applyToVertex(e,t,r){const i=(0,c.s)(He,e,t,r),o=(0,c.s)(We,e,t,r+this.componentLocalOriginLength),a=this._totalOffset/(0,c.l)(o);return(0,c.r)(this._tmpVertex,i,o,a),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],i=e[1],o=e[2]+t,a=e[3],n=e[4],s=e[5]+t,l=Math.abs(r),c=Math.abs(i),d=Math.abs(o),u=Math.abs(a),h=Math.abs(n),m=Math.abs(s),f=.5*(1+Math.sign(r*a))*Math.min(l,u),p=.5*(1+Math.sign(i*n))*Math.min(c,h),v=.5*(1+Math.sign(o*s))*Math.min(d,m),g=Math.max(l,u),_=Math.max(c,h),x=Math.max(d,m),T=Math.sqrt(f*f+p*p+v*v),E=Math.sign(l+r),b=Math.sign(c+i),S=Math.sign(d+o),A=Math.sign(u+a),y=Math.sign(h+n),C=Math.sign(m+s),w=this._totalOffset;if(T<w)return e[0]-=(1-E)*w,e[1]-=(1-b)*w,e[2]-=(1-S)*w,e[3]+=A*w,e[4]+=y*w,e[5]+=C*w,e;const M=w/Math.sqrt(g*g+_*_+x*x),R=w/T,I=R-M,O=-I;return e[0]+=r*(E*O+R),e[1]+=i*(b*O+R),e[2]+=o*(S*O+R),e[3]+=a*(A*I+M),e[4]+=n*(y*I+M),e[5]+=s*(C*I+M),e}applyToMbs(e){const t=(0,c.l)((0,Ve.g)(e)),r=this._totalOffset/t;return(0,c.r)((0,Ve.g)(this._tmpMbs),(0,Ve.g)(e),(0,Ve.g)(e),r),this._tmpMbs[3]=e[3]+e[3]*this._totalOffset/t,this._tmpMbs}applyToObb(e){return(0,ze.er)(e,this._totalOffset,this._totalOffset,Se.UZ.Global,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,d.Su)()}applyToVertex(e,t,r){const i=(0,c.s)(He,e,t,r),o=(0,c.g)(We,i,this.localOrigin),a=this.offset/(0,c.l)(o);return(0,c.r)(this.tmpVertex,i,o,a),this.tmpVertex}applyToAabb(e){const t=je,r=qe,i=Ke;for(let o=0;o<3;++o)t[o]=e[0+o]+this.localOrigin[o],r[o]=e[3+o]+this.localOrigin[o],i[o]=t[o];const o=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=o[t],e[t+3]=o[t];const a=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let o=0;o<3;++o)i[o]=0==(e&1<<o)?t[o]:r[o];a(i)}let n=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(n|=1<<e);if(0!==n&&7!==n)for(let e=0;e<8;++e)if(0==(n&e)){for(let o=0;o<3;++o)i[o]=0!=(n&1<<o)?0:0!=(e&1<<o)?t[o]:r[o];a(i)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const He=(0,d.Su)(),We=(0,d.Su)(),je=(0,d.Su)(),qe=(0,d.Su)(),Ke=(0,d.Su)();function ke(e,t,r){const{data:i,indices:o}=e,a=t.typedBuffer,n=t.typedBufferStride,s=o.length;r*=n;for(let e=0;e<s;++e){const t=2*o[e];a[r]=i[t],a[r+1]=i[t+1],r+=n}}function $e(e,t,r,i){const{data:o,indices:a}=e,n=t.typedBuffer,s=t.typedBufferStride,l=a.length;if(r*=s,null==i||1===i)for(let e=0;e<l;++e){const t=3*a[e];n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],r+=s}else for(let e=0;e<l;++e){const t=3*a[e];for(let e=0;e<i;++e)n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],r+=s}}function Xe(e,t,r,i=1){const{data:o,indices:a}=e,n=t.typedBuffer,s=t.typedBufferStride,l=a.length;if(r*=s,1===i)for(let e=0;e<l;++e){const t=4*a[e];n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],n[r+3]=o[t+3],r+=s}else for(let e=0;e<l;++e){const t=4*a[e];for(let e=0;e<i;++e)n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],n[r+3]=o[t+3],r+=s}}function Je(e,t,r,i,o=1){const a=t.typedBuffer,n=t.typedBufferStride;if(i*=n,1===o)for(let t=0;t<r;++t)a[i]=e[0],a[i+1]=e[1],a[i+2]=e[2],a[i+3]=e[3],i+=n;else for(let t=0;t<r;++t)for(let t=0;t<o;++t)a[i]=e[0],a[i+1]=e[1],a[i+2]=e[2],a[i+3]=e[3],i+=n}function Ze(e,t,r,i,o,a){switch(e){case be.K.POSITION:{(0,ge.Uc)(3===t.size);const i=o.getField(e,m.Yj);(0,ge.Uc)(!!i,`No buffer view for ${e}`),i&&function(e,t,r,i,o=1){if(!t)return void $e(e,r,i,o);const{data:a,indices:s}=e,l=r.typedBuffer,c=r.typedBufferStride,d=s.length,u=t[0],h=t[1],m=t[2],f=t[4],p=t[5],v=t[6],g=t[8],_=t[9],x=t[10],T=t[12],E=t[13],b=t[14];i*=c;let S=0,A=0,y=0;const C=(0,n.yp)(t)?e=>{S=a[e]+T,A=a[e+1]+E,y=a[e+2]+b}:e=>{const t=a[e],r=a[e+1],i=a[e+2];S=u*t+f*r+g*i+T,A=h*t+p*r+_*i+E,y=m*t+v*r+x*i+b};if(1===o)for(let e=0;e<d;++e)C(3*s[e]),l[i]=S,l[i+1]=A,l[i+2]=y,i+=c;else for(let e=0;e<d;++e){C(3*s[e]);for(let e=0;e<o;++e)l[i]=S,l[i+1]=A,l[i+2]=y,i+=c}}(t,r,i,a);break}case be.K.NORMAL:{(0,ge.Uc)(3===t.size);const r=o.getField(e,m.Yj);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&function(e,t,r,i,o=1){if(!t)return void $e(e,r,i,o);const{data:a,indices:s}=e,l=t,c=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=l[0],m=l[1],f=l[2],p=l[4],v=l[5],g=l[6],_=l[8],x=l[9],T=l[10],E=!(0,n.QT)(l),b=1e-6,S=1-b;i*=d;let A=0,y=0,C=0;const w=(0,n.yp)(l)?e=>{A=a[e],y=a[e+1],C=a[e+2]}:e=>{const t=a[e],r=a[e+1],i=a[e+2];A=h*t+p*r+_*i,y=m*t+v*r+x*i,C=f*t+g*r+T*i};if(1===o)if(E)for(let e=0;e<u;++e){w(3*s[e]);const t=A*A+y*y+C*C;if(t<S&&t>b){const e=1/Math.sqrt(t);c[i]=A*e,c[i+1]=y*e,c[i+2]=C*e}else c[i]=A,c[i+1]=y,c[i+2]=C;i+=d}else for(let e=0;e<u;++e)w(3*s[e]),c[i]=A,c[i+1]=y,c[i+2]=C,i+=d;else for(let e=0;e<u;++e){if(w(3*s[e]),E){const e=A*A+y*y+C*C;if(e<S&&e>b){const t=1/Math.sqrt(e);A*=t,y*=t,C*=t}}for(let e=0;e<o;++e)c[i]=A,c[i+1]=y,c[i+2]=C,i+=d}}(t,i,r,a);break}case be.K.NORMALCOMPRESSED:{(0,ge.Uc)(2===t.size);const r=o.getField(e,m.iN);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&ke(t,r,a);break}case be.K.UV0:{(0,ge.Uc)(2===t.size);const r=o.getField(e,m.U7);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&ke(t,r,a);break}case be.K.COLOR:case be.K.SYMBOLCOLOR:{const r=o.getField(e,m.sb);(0,ge.Uc)(!!r,`No buffer view for ${e}`),(0,ge.Uc)(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||function(e,t,r,i,o=1){const{data:a,indices:n}=e,s=r.typedBuffer,l=r.typedBufferStride,c=n.length;if(i*=l,t!==a.length||4!==t)if(1!==o)if(4!==t)for(let e=0;e<c;++e){const t=3*n[e];for(let e=0;e<o;++e)s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=255,i+=l}else for(let e=0;e<c;++e){const t=4*n[e];for(let e=0;e<o;++e)s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=a[t+3],i+=l}else{if(4===t){for(let e=0;e<c;++e){const t=4*n[e];s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=a[t+3],i+=l}return}for(let e=0;e<c;++e){const t=3*n[e];s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=255,i+=l}}else{s[i]=a[0],s[i+1]=a[1],s[i+2]=a[2],s[i+3]=a[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,n=e[i/=4];i+=t;const d=c*o;for(let r=1;r<d;++r)e[i]=n,i+=t}}(t,t.size,r,a);break}case be.K.COLORFEATUREATTRIBUTE:{const r=o.getField(e,m.AZ);(0,ge.Uc)(!!r,`No buffer view for ${e}`),(0,ge.Uc)(1===t.size),r&&1===t.size&&function(e,t,r){const{data:i,indices:o}=e,a=t.typedBuffer,n=t.typedBufferStride,s=o.length,l=i[0];r*=n;for(let e=0;e<s;++e)a[r]=l,r+=n}(t,r,a);break}case be.K.TANGENT:{(0,ge.Uc)(4===t.size);const r=o.getField(e,m._5);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&function(e,t,r,i,o=1){if(!t)return void Xe(e,r,i,o);const{data:a,indices:s}=e,l=t,c=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=l[0],m=l[1],f=l[2],p=l[4],v=l[5],g=l[6],_=l[8],x=l[9],T=l[10],E=!(0,n.QT)(l),b=1e-6,S=1-b;if(i*=d,1===o)for(let e=0;e<u;++e){const t=4*s[e],r=a[t],o=a[t+1],n=a[t+2],l=a[t+3];let u=h*r+p*o+_*n,A=m*r+v*o+x*n,y=f*r+g*o+T*n;if(E){const e=u*u+A*A+y*y;if(e<S&&e>b){const t=1/Math.sqrt(e);u*=t,A*=t,y*=t}}c[i]=u,c[i+1]=A,c[i+2]=y,c[i+3]=l,i+=d}else for(let e=0;e<u;++e){const t=4*s[e],r=a[t],n=a[t+1],l=a[t+2],u=a[t+3];let A=h*r+p*n+_*l,y=m*r+v*n+x*l,C=f*r+g*n+T*l;if(E){const e=A*A+y*y+C*C;if(e<S&&e>b){const t=1/Math.sqrt(e);A*=t,y*=t,C*=t}}for(let e=0;e<o;++e)c[i]=A,c[i+1]=y,c[i+2]=C,c[i+3]=u,i+=d}}(t,i,r,a);break}case be.K.PROFILERIGHT:case be.K.PROFILEUP:case be.K.PROFILEVERTEXANDNORMAL:case be.K.FEATUREVALUE:{(0,ge.Uc)(4===t.size);const r=o.getField(e,m._5);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&Xe(t,r,a)}}}class Qe{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.attributes.get(be.K.POSITION).indices.length}write(e,t,r,i,o){!function(e,t,r,i,o,a){for(const n of t.fields.keys()){const t=e.attributes.get(n),s=t?.indices;if(t&&s)Ze(n,t,r,i,o,a);else if(n===be.K.OBJECTANDLAYERIDCOLOR&&null!=e.objectAndLayerIdColor){const t=e.attributes.get(be.K.POSITION)?.indices;if(t){const r=t.length,i=o.getField(n,m.sb);Je(e.objectAndLayerIdColor,i,r,a)}}}}(r,this.vertexBufferLayout,e,t,i,o)}}var et=r(22592),tt=r(37008),rt=r(55164),it=r(60072),ot=r(74072),at=r(74780),nt=r(93316),st=r(63524),lt=r(1492);X.et.LESS,X.et.ALWAYS;const ct={mask:255},dt={function:{func:X.et.ALWAYS,ref:G.Aj.OutlineVisualElementMask,mask:G.Aj.OutlineVisualElementMask},operation:{fail:X.QD.KEEP,zFail:X.QD.KEEP,zPass:X.QD.ZERO}},ut={function:{func:X.et.ALWAYS,ref:G.Aj.OutlineVisualElementMask,mask:G.Aj.OutlineVisualElementMask},operation:{fail:X.QD.KEEP,zFail:X.QD.KEEP,zPass:X.QD.REPLACE}};X.et.EQUAL,G.Aj.OutlineVisualElementMask,G.Aj.OutlineVisualElementMask,X.QD.KEEP,X.QD.KEEP,X.QD.KEEP,X.et.NOTEQUAL,G.Aj.OutlineVisualElementMask,G.Aj.OutlineVisualElementMask,X.QD.KEEP,X.QD.KEEP,X.QD.KEEP;const ht=[1,1,.5],mt=[0,.6,.2],ft=[0,1,.2];var pt=r(83840);class vt extends it.Yj{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=(0,d.eu)(ht),this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=G.CM.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveFactor=(0,d.WK)(0,0,0),this.instancedDoublePrecision=!1,this.normalType=Ce.g.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.shadowMappingEnabled=!1,this.ambient=(0,d.WK)(.2,.2,.2),this.diffuse=(0,d.WK)(.8,.8,.8),this.externalColor=(0,tt.WK)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,d.Su)(),this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.transparent=!1,this.writeDepth=!0,this.customDepthTest=G.sr.Less,this.textureAlphaMode=G.OA.Blend,this.textureAlphaCutoff=ot.k,this.textureAlphaPremultiplied=!1,this.hasOccludees=!1,this.renderOccluded=Ie.C2.Occlude,this.isDecoration=!1}}it.yO;class gt extends nt.O{initializeConfiguration(e,t){t.spherical=e.viewingMode===Se.UZ.Global,t.doublePrecisionRequiresObfuscation=e.rctx.driverTest.doublePrecisionRequiresObfuscation.result,t.textureCoordinateType=t.hasColorTexture||t.hasMetallicRoughnessTexture||t.hasEmissionTexture||t.hasOcclusionTexture||t.hasNormalTexture?rt.i.Default:rt.i.None,t.objectAndLayerIdColorInstanced=t.instanced}initializeProgram(e){return this._initializeProgram(e,gt.shader)}_initializeProgram(e,t){return new lt.G(e.rctx,t.get().build(this.configuration),st.q)}_convertDepthTestFunction(e){return e===G.sr.Lequal?X.et.LEQUAL:X.et.LESS}_makePipeline(e,t){const r=this.configuration,i=e===Oe.H.NONE,o=e===Oe.H.FrontFace;return(0,Ne._w)({blending:r.output!==ye.mC.Color&&r.output!==ye.mC.Alpha||!r.transparent?null:i?Pe:Fe(e),culling:_t(r)?(0,Ne.AD)(r.cullFace):null,depthTest:{func:Ge(e,this._convertDepthTestFunction(r.customDepthTest))},depthWrite:(i||o)&&r.writeDepth?Ne.AT:null,colorWrite:Ne.kp,stencilWrite:r.hasOccludees?ct:null,stencilTest:r.hasOccludees?t?ut:dt:null,polygonOffset:i||o?null:(a=r.enableOffset,a?Ue:null)});var a}initializePipeline(){return this._occludeePipelineState=this._makePipeline(this.configuration.transparencyPassType,!0),this._makePipeline(this.configuration.transparencyPassType,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function _t(e){return e.cullFace!==G.CM.None||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}gt.shader=new at.O(pt.D,(()=>r.e(5880).then(r.bind(r,75880))));var xt=r(41948),Tt=r(74912),Et=r(11925),bt=r(75040);class St extends Et.i0{}(0,xt._)([(0,Tt.y)({constValue:!0})],St.prototype,"hasSliceHighlight",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],St.prototype,"hasSliceInVertexProgram",void 0),(0,xt._)([(0,Tt.y)({constValue:bt.u.Pass})],St.prototype,"pbrTextureBindType",void 0);class At extends St{constructor(){super(...arguments),this.output=ye.mC.Color,this.alphaDiscardMode=G.OA.Opaque,this.doubleSidedMode=we.J.None,this.pbrMode=Me.Ax.Disabled,this.cullFace=G.CM.None,this.transparencyPassType=Oe.H.NONE,this.normalType=Ce.g.Attribute,this.textureCoordinateType=rt.i.None,this.customDepthTest=G.sr.Less,this.spherical=!1,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.multipassEnabled=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.objectAndLayerIdColorInstanced=!1,this.instancedDoublePrecision=!1,this.doublePrecisionRequiresObfuscation=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.cullAboveGround=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1}}(0,xt._)([(0,Tt.y)({count:ye.mC.COUNT})],At.prototype,"output",void 0),(0,xt._)([(0,Tt.y)({count:G.OA.COUNT})],At.prototype,"alphaDiscardMode",void 0),(0,xt._)([(0,Tt.y)({count:we.J.COUNT})],At.prototype,"doubleSidedMode",void 0),(0,xt._)([(0,Tt.y)({count:Me.Ax.COUNT})],At.prototype,"pbrMode",void 0),(0,xt._)([(0,Tt.y)({count:G.CM.COUNT})],At.prototype,"cullFace",void 0),(0,xt._)([(0,Tt.y)({count:Oe.H.COUNT})],At.prototype,"transparencyPassType",void 0),(0,xt._)([(0,Tt.y)({count:Ce.g.COUNT})],At.prototype,"normalType",void 0),(0,xt._)([(0,Tt.y)({count:rt.i.COUNT})],At.prototype,"textureCoordinateType",void 0),(0,xt._)([(0,Tt.y)({count:G.sr.COUNT})],At.prototype,"customDepthTest",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"spherical",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasVertexColors",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasSymbolColors",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasVerticalOffset",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasSlicePlane",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasSliceHighlight",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasColorTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasMetallicRoughnessTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasEmissionTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasOcclusionTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasNormalTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasScreenSizePerspective",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasVertexTangents",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasOccludees",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"multipassEnabled",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasModelTransformation",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"offsetBackfaces",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"vvSize",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"vvColor",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"receiveShadows",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"receiveAmbientOcclusion",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"textureAlphaPremultiplied",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"instanced",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"instancedColor",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"objectAndLayerIdColorInstanced",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"instancedDoublePrecision",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"doublePrecisionRequiresObfuscation",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"writeDepth",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"transparent",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"enableOffset",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"cullAboveGround",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"snowCover",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasColorTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasEmissionTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasNormalTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasOcclusionTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasMetallicRoughnessTextureTransform",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],At.prototype,"occlusionPass",void 0),(0,xt._)([(0,Tt.y)({constValue:!0})],At.prototype,"hasVvInstancing",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],At.prototype,"useCustomDTRExponentForWater",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],At.prototype,"supportsTextureAtlas",void 0),(0,xt._)([(0,Tt.y)({constValue:!0})],At.prototype,"useFillLights",void 0);var yt=r(59888);class Ct extends gt{initializeConfiguration(e,t){super.initializeConfiguration(e,t),t.hasMetallicRoughnessTexture=!1,t.hasEmissionTexture=!1,t.hasOcclusionTexture=!1,t.hasNormalTexture=!1,t.hasModelTransformation=!1,t.normalType=Ce.g.Attribute,t.doubleSidedMode=we.J.WindingOrder,t.hasVertexTangents=!1}initializeProgram(e){return this._initializeProgram(e,Ct.shader)}}Ct.shader=new at.O(yt.R,(()=>r.e(1980).then(r.bind(r,81980))));class wt extends Ie.iK{constructor(e){super(e,Rt),this.supportsEdges=!0,this.produces=new Map([[Be.y.OPAQUE_MATERIAL,e=>((0,ye.ue)(e)||(0,ye.KQ)(e))&&!this.parameters.transparent],[Be.y.TRANSPARENT_MATERIAL,e=>((0,ye.ue)(e)||(0,ye.KQ)(e))&&this.parameters.transparent&&this.parameters.writeDepth],[Be.y.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL,e=>((0,ye.ue)(e)||(0,ye.KQ)(e))&&this.parameters.transparent&&!this.parameters.writeDepth]]),this._configuration=new At,this._vertexBufferLayout=function(e){const t=(0,Ae.iC)().vec3f(be.K.POSITION);return e.normalType===Ce.g.Compressed?t.vec2i16(be.K.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(be.K.NORMAL),e.hasVertexTangents&&t.vec4f(be.K.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f(be.K.UV0),e.hasVertexColors&&t.vec4u8(be.K.COLOR),e.hasSymbolColors&&t.vec4u8(be.K.SYMBOLCOLOR),(0,V.c)("enable-feature:objectAndLayerId-rendering")&&t.vec4u8(be.K.OBJECTANDLAYERIDCOLOR),t}(this.parameters)}isVisibleForOutput(e){return e!==ye.mC.Shadow&&e!==ye.mC.ShadowExcludeHighlight&&e!==ye.mC.ShadowHighlight||this.parameters.castShadows}isVisible(){const e=this.parameters;if(!super.isVisible()||0===e.layerOpacity)return!1;const{hasInstancedColor:t,hasVertexColors:r,hasSymbolColors:i,vvColor:o}=e,a="replace"===e.colorMixMode,n=e.opacity>0,s=e.externalColor&&e.externalColor[3]>0,l=t||o||i;return r&&l?a||n:r?a?s:n:l?a||n:a?s:n}getConfiguration(e,t){return this._configuration.output=e,this._configuration.hasNormalTexture=!!this.parameters.normalTextureId,this._configuration.hasColorTexture=!!this.parameters.textureId,this._configuration.hasVertexTangents=this.parameters.hasVertexTangents,this._configuration.instanced=this.parameters.isInstanced,this._configuration.instancedDoublePrecision=this.parameters.instancedDoublePrecision,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.hasVerticalOffset=null!=this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=null!=this.parameters.screenSizePerspective,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasSliceHighlight=this.parameters.hasSliceHighlight,this._configuration.alphaDiscardMode=this.parameters.textureAlphaMode,this._configuration.normalType=this.parameters.normalType,this._configuration.transparent=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,null!=this.parameters.customDepthTest&&(this._configuration.customDepthTest=this.parameters.customDepthTest),this._configuration.hasOccludees=this.parameters.hasOccludees,this._configuration.cullFace=this.parameters.hasSlicePlane?G.CM.None:this.parameters.cullFace,this._configuration.multipassEnabled=t.multipassEnabled,this._configuration.cullAboveGround=t.multipassTerrain.cullAboveGround,this._configuration.hasModelTransformation=null!=this.parameters.modelTransformation,e!==ye.mC.Color&&e!==ye.mC.Alpha||(this._configuration.hasVertexColors=this.parameters.hasVertexColors,this._configuration.hasSymbolColors=this.parameters.hasSymbolColors,this.parameters.treeRendering?this._configuration.doubleSidedMode=we.J.WindingOrder:this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?we.J.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?we.J.WindingOrder:we.J.None,this._configuration.instancedColor=this.parameters.hasInstancedColor,this._configuration.receiveShadows=this.parameters.receiveShadows&&this.parameters.shadowMappingEnabled,this._configuration.receiveAmbientOcclusion=this.parameters.receiveAmbientOcclusion&&null!=t.ssao,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.textureAlphaPremultiplied=!!this.parameters.textureAlphaPremultiplied,this._configuration.pbrMode=this.parameters.usePBR?this.parameters.isSchematic?Me.Ax.Schematic:Me.Ax.Normal:Me.Ax.Disabled,this._configuration.hasMetallicRoughnessTexture=!!this.parameters.metallicRoughnessTextureId,this._configuration.hasEmissionTexture=!!this.parameters.emissiveTextureId,this._configuration.hasOcclusionTexture=!!this.parameters.occlusionTextureId,this._configuration.offsetBackfaces=!(!this.parameters.transparent||!this.parameters.offsetTransparentBackfaces),this._configuration.transparencyPassType=t.transparencyPassType,this._configuration.enableOffset=t.camera.relativeElevation<5e5,this._configuration.snowCover=this.hasSnowCover(t),this._configuration.hasColorTextureTransform=!!this.parameters.colorTextureTransformMatrix,this._configuration.hasNormalTextureTransform=!!this.parameters.normalTextureTransformMatrix,this._configuration.hasEmissionTextureTransform=!!this.parameters.emissiveTextureTransformMatrix,this._configuration.hasOcclusionTextureTransform=!!this.parameters.occlusionTextureTransformMatrix,this._configuration.hasMetallicRoughnessTextureTransform=!!this.parameters.metallicRoughnessTextureTransformMatrix),this._configuration}hasSnowCover(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}intersect(e,t,r,i,o,a){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,c.s)(Dt,t[12],t[13],t[14]);let a=null;switch(r.viewingMode){case Se.UZ.Global:a=(0,c.n)(Pt,Dt);break;case Se.UZ.Local:a=(0,c.c)(Pt,Nt)}let n=0;const s=(0,c.f)(Ft,Dt,e.eye),l=(0,c.l)(s),d=(0,c.h)(s,s,1/l);let u=null;this.parameters.screenSizePerspective&&(u=(0,c.k)(a,d)),n+=(0,et.u6)(e,l,this.parameters.verticalOffset,u??0,this.parameters.screenSizePerspective),(0,c.h)(a,a,n),(0,c.t)(Lt,a,r.transform.inverseRotation),i=(0,c.f)(It,i,Lt),o=(0,c.f)(Ot,o,Lt)}var n;(0,et.Ep)(e,r,i,o,null!=(n=r.verticalOffset)?(Ye.offset=n,Ye):null,a)}createGLMaterial(e){return new Mt(e)}createBufferWriter(){return new Qe(this._vertexBufferLayout)}}class Mt extends Re.Q{constructor(e){super({...e,...e.material.parameters})}_updateShadowState(e){e.shadowMap.enabled!==this._material.parameters.shadowMappingEnabled&&this._material.setParameters({shadowMappingEnabled:e.shadowMap.enabled})}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.hasOccludees&&this._material.setParameters({hasOccludees:e.hasOccludees})}beginSlot(e){this._output!==ye.mC.Color&&this._output!==ye.mC.Alpha||(this._updateShadowState(e),this._updateOccludeeState(e));const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,c.s)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.ensureTechnique(t.treeRendering?Ct:gt,e)}}const Rt=new class extends vt{constructor(){super(...arguments),this.initTextureTransparent=!1,this.treeRendering=!1,this.hasVertexTangents=!1}},It=(0,d.Su)(),Ot=(0,d.Su)(),Nt=(0,d.WK)(0,0,1),Pt=(0,d.Su)(),Lt=(0,d.Su)(),Dt=(0,d.Su)(),Ft=(0,d.Su)(),Ut=()=>O.c.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");function Gt(e){throw new I.c("",`Request for object resource failed: ${e}`)}function Bt(e){const t=e.params,r=t.topology;let i=!0;switch(t.vertexAttributes||(Ut().warn("Geometry must specify vertex attributes"),i=!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&&(Ut().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(Ut().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(Ut().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else Ut().warn("Indexed geometries must specify faces"),i=!1;break}default:Ut().warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(Ut().warn("Geometry requires material"),i=!1);const o=e.params.vertexAttributes;for(const e in o)o[e].values||(Ut().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function Vt(e){const t=(0,u.FZ)();return e.forEach((e=>{const r=e.boundingInfo;null!=r&&((0,u.K8)(t,r.bbMin),(0,u.K8)(t,r.bbMax))})),t}function zt(e){switch(e){case"mask":return G.OA.Mask;case"maskAndTransparency":return G.OA.MaskBlend;case"none":return G.OA.Opaque;default:return G.OA.Blend}}function Yt(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Ht=new L.a(1,2,"wosr");var Wt=r(44875);async function jt(e,t){const r=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,i.Ur)(e));if("wosr"===r.fileType){const e=await(t.cache?t.cache.loadWOSR(r.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 i=await(0,M.aG)(t.request(e,"json",r));if(!0===i.ok)return i.value;(0,P.CE)(i.error),Gt(i.error.details.url)}(e,r,t);const i=await(0,M.aG)((0,w.c)(e,t));if(!0===i.ok)return i.value.data;(0,P.CE)(i.error),Gt(i.error)}(e,t),i=await async function(e,t){const r=new Array;for(const i in e){const o=e[i],a=o.images[0].data;if(!a){Ut().warn("Externally referenced texture data is not yet supported");continue}const n=o.encoding+";base64,"+a,s="/textureDefinitions/"+i,l="rgba"===o.channels?o.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:X.Qz.REPEAT,t:X.Qz.REPEAT},preMultiplyAlpha:zt(l)!==G.OA.Opaque},d=null!=t&&t.disableTextures?Promise.resolve(null):F(n,t);r.push(d.then((e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l}))))}const i=await Promise.all(r),o={};for(const e of i)o[e.refId]=e;return o}(r.textureDefinitions??{},t);let o=0;for(const e in i)if(i.hasOwnProperty(e)){const t=i[e];o+=t?.image?t.image.width*t.image.height*4:0}return{resource:r,textures:i,size:o+(0,R.UN)(r)}}(r.url,t)),{engineResources:i,referenceBoundingBox:o}=function(e,t){const r=new Array,i=new Array,o=new Array,a=new N,n=e.resource,s=L.a.parse(n.version||"1.0","wosr");Ht.validate(s);const l=n.model.name,c=n.model.geometries,u=n.materialDefinitions??{},h=e.textures;let m=0;const f=new Map;for(let e=0;e<c.length;e++){const n=c[e];if(!Bt(n))continue;const s=Yt(n),l=n.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===n.params.topology)return null;const t=n.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l[be.K.POSITION],_=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,i=v(e)??(0,D.yh)(_);p.push([e,new U.O(r,i,t.valuesPerElement,!0)])}const x=s.texture,T=h&&h[x];if(T&&!f.has(x)){const{image:e,parameters:t}=T,r=new xe(e,t);i.push(r),f.set(x,r)}const E=f.get(x),b=E?E.id:void 0,S=s.material;let A=a.get(S,x);if(null==A){const e=u[S.substring(S.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=T&&T.alphaChannelUsage,i=e.transparency>0||"transparency"===r||"maskAndTransparency"===r,o=T?zt(T.alphaChannelUsage):void 0,n={ambient:(0,d.eu)(e.diffuse),diffuse:(0,d.eu)(e.diffuse),opacity:1-(e.transparency||0),transparent:i,textureAlphaMode:o,textureAlphaCutoff:.33,textureId:b,initTextureTransparent:!0,doubleSided:!0,cullFace:G.CM.None,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:T?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(n,t.materialParameters),A=new wt(n),a.set(S,x,A)}o.push(A);const y=new B.K(A,p);m+=p.find((e=>e[0]===be.K.POSITION))?.[1]?.indices.length??0,r.push(y)}return{engineResources:[{name:l,stageResources:{textures:i,materials:o,geometries:r},pivotOffset:n.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:Vt(r)}}(e,t);return{lods:i,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}const a=await(t.cache?t.cache.loadGLTF(r.url,t,!!t.usePBR):(0,T.G)(new x.k(t.streamDataRequester),r.url,t,t.usePBR)),S=a.model.meta?.ESRI_proxyEllipsoid,y=a.meta.isEsriSymbolResource&&null!=S&&"EsriRealisticTreesStyle"===a.meta.ESRI_webstyle;y&&!a.customMeta.esriTreeRendering&&(a.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const i=e.model.lods[r];for(const o of i.parts){const i=o.attributes.normal;if(null==i)return;const a=o.attributes.position,l=a.count,u=(0,d.Su)(),h=(0,d.Su)(),f=(0,d.Su)(),p=new Uint8Array(4*l),v=new Float64Array(3*l),g=(0,n.S_)((0,s.Su)(),o.transform);let _=0,x=0;for(let n=0;n<l;n++){a.getVec(n,h),i.getVec(n,u),(0,c.e)(h,h,o.transform),(0,c.f)(f,h,t.center),(0,c.D)(f,f,t.radius);const s=f[2],l=(0,c.l)(f),d=Math.min(.45+.55*l*l,1);(0,c.D)(f,f,t.radius),null!==g&&(0,c.e)(f,f,g),(0,c.n)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,c.m)(f,f,u,s>-1?.2:Math.min(-4*s-3.8,1)),v[_]=f[0],v[_+1]=f[1],v[_+2]=f[2],_+=3,p[x]=255*d,p[x+1]=255*d,p[x+2]=255*d,p[x+3]=255,x+=4}o.attributes.normal=new m.Yj(v),o.attributes.color=new m.sb(p)}}}(a,S));const I=!!t.usePBR,O=a.meta.isEsriSymbolResource?{usePBR:I,isSchematic:!1,treeRendering:y,mrrFactors:[...ft]}:{usePBR:I,isSchematic:!1,treeRendering:!1,mrrFactors:[...ht]},V={...t.materialParameters,treeRendering:y},{engineResources:z,referenceBoundingBox:Y}=function(e,t,r,i){const a=e.model,n=new Array,s=new Map,x=new Map,T=a.lods.length,S=(0,u.FZ)();return a.lods.forEach(((e,y)=>{const w=!0===i.skipHighLods&&(T>1&&0===y||T>3&&1===y)||!1===i.skipHighLods&&null!=i.singleLodIndex&&y!==i.singleLodIndex;if(w&&0!==y)return;const M=new C(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach((e=>{const i=w?new wt({}):function(e,t,r,i,o,a,n){const s=t.material+(t.attributes.normal?"_normal":"")+(t.attributes.color?"_color":"")+(t.attributes.texCoord0?"_texCoord0":"")+(t.attributes.tangent?"_tangent":""),u=e.materials.get(t.material),h=null!=t.attributes.texCoord0,m=null!=t.attributes.normal;if(null==u)return null;const f=function(e){switch(e){case"BLEND":return G.OA.Blend;case"MASK":return G.OA.Mask;case"OPAQUE":case null:case void 0:return G.OA.Opaque}}(u.alphaMode);if(!a.has(s)){if(h){const t=(t,r=!1)=>{if(null!=t&&!n.has(t)){const i=e.textures.get(t);if(null!=i){const e=i.data;n.set(t,new xe((0,b.e6)(e)?e.data:e,{...i.parameters,preMultiplyAlpha:!(0,b.e6)(e)&&r,encoding:(0,b.e6)(e)&&null!=e.encoding?e.encoding:void 0}))}}};t(u.textureColor,f!==G.OA.Opaque),t(u.textureNormal),t(u.textureOcclusion),t(u.textureEmissive),t(u.textureMetallicRoughness)}const r=u.color[0]**(1/Wt.g),p=u.color[1]**(1/Wt.g),v=u.color[2]**(1/Wt.g),g=u.emissiveFactor[0]**(1/Wt.g),_=u.emissiveFactor[1]**(1/Wt.g),x=u.emissiveFactor[2]**(1/Wt.g),T=null!=u.textureColor&&h?n.get(u.textureColor):null,E=function({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:i,emissiveTexture:o,emissiveFactor:a,occlusionTexture:n}){return null==e&&null==t&&null==o&&(null==a||(0,c.j)(a,d.cX))&&null==n&&(null==i||1===i)&&(null==r||1===r)}({normalTexture:u.textureNormal,metallicRoughnessTexture:u.textureMetallicRoughness,metallicFactor:u.metallicFactor,roughnessFactor:u.roughnessFactor,emissiveTexture:u.textureEmissive,emissiveFactor:u.emissiveFactor,occlusionTexture:u.textureOcclusion}),S=null!=u.normalTextureTransform?.scale?u.normalTextureTransform?.scale:l.Qw;a.set(s,new wt({...i,transparent:f===G.OA.Blend,customDepthTest:G.sr.Lequal,textureAlphaMode:f,textureAlphaCutoff:u.alphaCutoff,diffuse:[r,p,v],ambient:[r,p,v],opacity:u.opacity,doubleSided:u.doubleSided,doubleSidedType:"winding-order",cullFace:u.doubleSided?G.CM.None:G.CM.Back,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:m?Ce.g.Attribute:Ce.g.ScreenDerivative,castShadows:!0,receiveShadows:u.receiveShadows,receiveAmbientOcclusion:u.receiveAmbientOcclustion,textureId:null!=T?T.id:void 0,colorMixMode:u.colorMixMode,normalTextureId:null!=u.textureNormal&&h?n.get(u.textureNormal).id:void 0,textureAlphaPremultiplied:null!=T&&!!T.parameters.preMultiplyAlpha,occlusionTextureId:null!=u.textureOcclusion&&h?n.get(u.textureOcclusion).id:void 0,emissiveTextureId:null!=u.textureEmissive&&h?n.get(u.textureEmissive).id:void 0,metallicRoughnessTextureId:null!=u.textureMetallicRoughness&&h?n.get(u.textureMetallicRoughness).id:void 0,emissiveFactor:[g,_,x],mrrFactors:E?[...mt]:[u.metallicFactor,u.roughnessFactor,i.mrrFactors[2]],isSchematic:E,colorTextureTransformMatrix:A(u.colorTextureTransform),normalTextureTransformMatrix:A(u.normalTextureTransform),scale:[S[0],S[1]],occlusionTextureTransformMatrix:A(u.occlusionTextureTransform),emissiveTextureTransformMatrix:A(u.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:A(u.metallicRoughnessTextureTransform),...o}))}const p=a.get(s);if(r.stageResources.materials.push(p),h){const e=e=>{null!=e&&r.stageResources.textures.push(n.get(e))};e(u.textureColor),e(u.textureNormal),e(u.textureOcclusion),e(u.textureEmissive),e(u.textureMetallicRoughness)}return p}(a,e,M,t,r,s,x),{geometry:n,vertexCount:T}=function(e,t){const r=e.attributes.position.count,i=(0,E.y)(e.indices||r,e.primitiveType),a=(0,h.mc)(3*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.position;(0,f.a)(a,n,e.transform,3,s);const l=[[be.K.POSITION,new U.O(a,i,3,!0)]];if(null!=e.attributes.normal){const t=(0,h.mc)(3*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.normal;(0,o.yy)(qt,e.transform),(0,f.b)(t,a,qt,3,n),l.push([be.K.NORMAL,new U.O(t,i,3,!0)])}if(null!=e.attributes.tangent){const t=(0,h.mc)(4*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.tangent;(0,o.yy)(qt,e.transform),(0,p.t)(t,a,qt,4,n),l.push([be.K.TANGENT,new U.O(t,i,4,!0)])}if(null!=e.attributes.texCoord0){const t=(0,h.mc)(2*r),{typedBuffer:o,typedBufferStride:a}=e.attributes.texCoord0;(0,v.n)(t,o,2,a),l.push([be.K.UV0,new U.O(t,i,2,!0)])}if(null!=e.attributes.color){const t=new Uint8Array(4*r);4===e.attributes.color.elementCount?e.attributes.color instanceof m._5?(0,p.s)(t,e.attributes.color,255):e.attributes.color instanceof m.sb?(0,_.c)(t,e.attributes.color):e.attributes.color instanceof m.Ig&&(0,p.s)(t,e.attributes.color,1/256):(t.fill(255),e.attributes.color instanceof m.Yj?(0,f.s)(t,e.attributes.color,255,4):e.attributes.color instanceof m.IN?(0,g.c)(t,e.attributes.color.typedBuffer,4,e.attributes.color.typedBufferStride):e.attributes.color instanceof m.k5&&(0,f.s)(t,e.attributes.color,1/256,4)),l.push([be.K.COLOR,new U.O(t,i,4,!0)])}return{geometry:new B.K(t,l),vertexCount:r}}(e,null!=i?i:new wt({})),C=n.boundingInfo;null!=C&&0===y&&((0,u.K8)(S,C.bbMin),(0,u.K8)(S,C.bbMax)),null!=i&&(M.stageResources.geometries.push(n),M.numberOfVertices+=T)})),w||n.push(M)})),{engineResources:n,referenceBoundingBox:S}}(a,O,V,t.skipHighLods&&null==r.specifiedLodIndex?{skipHighLods:!0}:{skipHighLods:!1,singleLodIndex:r.specifiedLodIndex});return{lods:z,referenceBoundingBox:Y,isEsriSymbolResource:a.meta.isEsriSymbolResource,isWosr:!1}}const qt=(0,a.Su)()},78720:(e,t,r)=>{var i,o;r.d(t,{KQ:()=>i}),r(53648),(o=i||(i={}))[o.Multiply=1]="Multiply",o[o.Ignore=2]="Ignore",o[o.Replace=3]="Replace",o[o.Tint=4]="Tint"},72364:(e,t,r)=>{r.d(t,{U1:()=>c,iC:()=>l});var i=r(71004),o=r(98132),a=r(90736);class n{constructor(e,t){this.layout=e,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const t of e.fields.keys()){const r=e.fields.get(t);this[t]=new r.constructor(this.buffer,r.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(e,t){const r=this[e];return r&&r.elementCount===t.ElementCount&&r.elementType===t.ElementType?r:null}slice(e,t){return new n(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,r=0,i=e.count){const o=this.stride;if(o%4==0){const a=new Uint32Array(e.buffer,t*o,i*o/4);new Uint32Array(this.buffer,r*o,i*o/4).set(a)}else{const a=new Uint8Array(e.buffer,t*o,i*o);new Uint8Array(this.buffer,r*o,i*o).set(a)}return this}get usedMemory(){return this.byteLength}dispose(){}}class s{constructor(e=null){this._stride=0,this._lastAligned=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach((e=>this._fields.set(e[0],{...e[1],constructor:h(e[1].constructor)}))))}vec2f(e,t){return this._appendField(e,i.U7,t),this}vec2f64(e,t){return this._appendField(e,i.wT,t),this}vec3f(e,t){return this._appendField(e,i.Yj,t),this}vec3f64(e,t){return this._appendField(e,i.Ax,t),this}vec4f(e,t){return this._appendField(e,i._5,t),this}vec4f64(e,t){return this._appendField(e,i.Ip,t),this}mat3f(e,t){return this._appendField(e,i.Ko,t),this}mat3f64(e,t){return this._appendField(e,i.m_,t),this}mat4f(e,t){return this._appendField(e,i.IL,t),this}mat4f64(e,t){return this._appendField(e,i.mF,t),this}vec4u8(e,t){return this._appendField(e,i.sb,t),this}f32(e,t){return this._appendField(e,i.AZ,t),this}f64(e,t){return this._appendField(e,i.oN,t),this}u8(e,t){return this._appendField(e,i.Kg,t),this}u16(e,t){return this._appendField(e,i.E_,t),this}i8(e,t){return this._appendField(e,i.kV,t),this}vec2i8(e,t){return this._appendField(e,i.oR,t),this}vec2i16(e,t){return this._appendField(e,i.iN,t),this}vec2u8(e,t){return this._appendField(e,i.eS,t),this}vec4u16(e,t){return this._appendField(e,i.Ig,t),this}u32(e,t){return this._appendField(e,i.Ym,t),this}_appendField(e,t,r){if(this._fields.has(e))return void(0,a.Uc)(!1,`${e} already added to vertex buffer layout`);const i=t.ElementCount*(0,o.Ad)(t.ElementType),n=this._stride;this._stride+=i,this._fields.set(e,{size:i,constructor:t,offset:n,optional:r})}createBuffer(e){return new n(this,e)}createView(e){return new n(this,e)}clone(){const e=new s;return e._stride=this._stride,e._fields=new Map,this._fields.forEach(((t,r)=>e._fields.set(r,t))),e.BufferType=this.BufferType,e}get stride(){if(this._lastAligned!==this._fields.size){let e=1;this._fields.forEach((t=>e=Math.max(e,(0,o.Ad)(t.constructor.ElementType)))),this._stride=Math.floor((this._stride+e-1)/e)*e,this._lastAligned=this._fields.size}return this._stride}get fields(){return this._fields}}function l(){return new s}class c{constructor(e){this.fields=new Array,e.fields.forEach(((e,t)=>{const r={...e,constructor:u(e.constructor)};this.fields.push([t,r])})),this.stride=e.stride}}const d=[i.AZ,i.U7,i.Yj,i._5,i.Ko,i.IL,i.oN,i.wT,i.Ax,i.Ip,i.m_,i.mF,i.Kg,i.eS,i.IN,i.sb,i.E_,i.kg,i.k5,i.Ig,i.Ym,i.qZ,i.ER,i.q$,i.kV,i.oR,i.Oq,i.mq,i.Mt,i.iN,i.g7,i.OS,i.Ep,i.mI,i.Yv,i.i9];function u(e){return`${e.ElementType}_${e.ElementCount}`}function h(e){return m.get(e)}const m=new Map;d.forEach((e=>m.set(u(e),e)))},29244:(e,t,r)=>{r.d(t,{Eb:()=>Te,er:()=>Ie});var i=r(77556),o=r(68612),a=r(87104),n=r(41512),s=r(2620),l=r(98472),c=r(62484),d=r(74784),u=r(37008),h=r(22080),m=r(82448),f=r(51120),p=r(62880),v=r(38380),g=r(58632),_=r(60544),x=r(20136),T=r(21288),E=r(85256),b=r(89560);const S=1e-6,A=(0,c.Su)(),y=(0,c.Su)();function C(e,t,r,i,o,a,n,s,l,c){return function(e,t,r){let i=_e(e.maxVert[0],e.minVert[0]),o=0;for(let t=1;t<7;++t){const r=_e(e.maxVert[t],e.minVert[t]);r>i&&(i=r,o=t)}fe(t,e.minVert[o]),fe(r,e.maxVert[o])}(e,i,o),_e(i,o)<S?1:(he(n,i,o),ve(n,n),function(e,t,r,i){const{data:o,size:a}=e;let n=Number.NEGATIVE_INFINITY,s=0;for(let e=0;e<o.length;e+=a){F[0]=o[e]-t[0],F[1]=o[e+1]-t[1],F[2]=o[e+2]-t[2];const i=r[0]*F[0]+r[1]*F[1]+r[2]*F[2],a=r[0]*r[0]+r[1]*r[1]+r[2]*r[2],l=F[0]*F[0]+F[1]*F[1]+F[2]*F[2]-i*i/a;l>n&&(n=l,s=e)}return fe(i,o,s),n}(t,i,n,a)<S?2:(he(s,o,a),ve(s,s),he(l,a,i),ve(l,l),pe(r,s,n),ve(r,r),W(t,r,n,s,l,c),0))}const w=(0,c.Su)(),M=(0,c.Su)(),R=(0,c.Su)(),I=(0,c.Su)(),O=(0,c.Su)(),N=(0,c.Su)(),P=(0,c.Su)(),L=(0,c.Su)();function D(e,t,r,i,o,a,n,s,l){(function(e,t,r,i,o){!function(e,t,r,i,o){const{data:a,size:n}=e;fe(i,a),fe(o,i),r[0]=xe(j,t),r[1]=r[0];for(let e=n;e<a.length;e+=n){const n=a[e]*t[0]+a[e+1]*t[1]+a[e+2]*t[2];n<r[0]&&(r[0]=n,fe(i,a,e)),n>r[1]&&(r[1]=n,fe(o,a,e))}}(e,t,U,o,i);const a=xe(r,t);U[1]-S<=a&&(i[0]=void 0),U[0]+S>=a&&(o[0]=void 0)})(e,t,r,w,M),void 0!==w[0]&&(he(R,w,r),ve(R,R),he(I,w,i),ve(I,I),he(O,w,o),ve(O,O),pe(N,I,a),ve(N,N),pe(P,O,n),ve(P,P),pe(L,R,s),ve(L,L),W(e,N,a,I,R,l),W(e,P,n,O,I,l),W(e,L,s,R,O,l)),void 0!==M[0]&&(he(R,M,r),ve(R,R),he(I,M,i),ve(I,I),he(O,M,o),ve(O,O),pe(N,I,a),ve(N,N),pe(P,O,n),ve(P,P),pe(L,R,s),ve(L,L),W(e,N,a,I,R,l),W(e,P,n,O,I,l),W(e,L,s,R,O,l))}const F=[0,0,0],U=(0,E.Su)(),G=(0,c.Su)(),B=(0,c.Su)(),V=(0,c.Su)(),z=(0,c.Su)(),Y=(0,c.Su)(),H=(0,c.Su)();function W(e,t,r,i,o,a){if(ge(t)<S)return;pe(G,r,t),pe(B,i,t),pe(V,o,t),q(e,t,U),Y[1]=U[0],z[1]=U[1],H[1]=z[1]-Y[1];const n=[r,i,o],s=[G,B,V];for(let r=0;r<3;++r){q(e,n[r],U),Y[0]=U[0],z[0]=U[1],q(e,s[r],U),Y[2]=U[0],z[2]=U[1],H[0]=z[0]-Y[0],H[2]=z[2]-Y[2];const i=de(H);i<a.quality&&(fe(a.b0,n[r]),fe(a.b1,t),fe(a.b2,s[r]),a.quality=i)}}const j=(0,c.Su)();function q(e,t,r){const{data:i,size:o}=e;r[0]=Number.POSITIVE_INFINITY,r[1]=Number.NEGATIVE_INFINITY;for(let e=0;e<i.length;e+=o){const o=i[e]*t[0]+i[e+1]*t[1]+i[e+2]*t[2];r[0]=Math.min(r[0],o),r[1]=Math.max(r[1],o)}}function K(e,t,r){r.center=e,r.halfSize=(0,l.h)(t,t,.5),r.quaternion=s.IJ}const k=(0,c.Su)(),$=(0,c.Su)(),X=(0,c.Su)(),J=(0,c.Su)(),Z=(0,c.Su)(),Q=(0,c.Su)();function ee(e,t,r){fe(k,t),Math.abs(t[0])>Math.abs(t[1])&&Math.abs(t[0])>Math.abs(t[2])?k[0]=0:Math.abs(t[1])>Math.abs(t[2])?k[1]=0:k[2]=0,ge(k)<S&&(k[0]=k[1]=k[2]=1),pe($,t,k),ve($,$),pe(X,t,$),ve(X,X),te(e,t,$,X,J,Z),he(Q,Z,J),se(t,$,X,J,Z,Q,r)}function te(e,t,r,i,o,a){q(e,t,U),o[0]=U[0],a[0]=U[1],q(e,r,U),o[1]=U[0],a[1]=U[1],q(e,i,U),o[2]=U[0],a[2]=U[1]}const re=(0,c.Su)(),ie=(0,c.Su)(),oe=(0,c.Su)(),ae=(0,o.WK)(1,0,0,0,1,0,0,0,1),ne=(0,s.Su)();function se(e,t,r,i,o,a,n){ae[0]=e[0],ae[1]=e[1],ae[2]=e[2],ae[3]=t[0],ae[4]=t[1],ae[5]=t[2],ae[6]=r[0],ae[7]=r[1],ae[8]=r[2],n.quaternion=function(e,t){const r=t[0]+t[4]+t[8];if(r>0){let i=Math.sqrt(r+1);e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i}else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const i=(r+1)%3,o=(r+2)%3;let a=Math.sqrt(t[3*r+r]-t[3*i+i]-t[3*o+o]+1);e[r]=.5*a,a=.5/a,e[3]=(t[3*i+o]-t[3*o+i])*a,e[i]=(t[3*i+r]+t[3*r+i])*a,e[o]=(t[3*o+r]+t[3*r+o])*a}return e}(ne,ae),ue(re,i,o),me(re,re,.5),me(ie,e,re[0]),me(oe,t,re[1]),ue(ie,ie,oe),me(oe,r,re[2]),n.center=(0,l.g)(ie,ie,oe),n.halfSize=(0,l.h)(re,a,.5)}class le{constructor(e){this.minVert=new Array(7),this.maxVert=new Array(7),this.buffer=new ArrayBuffer(448);let t=0;this.minProj=new Float64Array(this.buffer,t,7),t+=56,this.maxProj=new Float64Array(this.buffer,t,7),t+=56;for(let e=0;e<7;++e)this.minVert[e]=new Float64Array(this.buffer,t,3),t+=24;for(let e=0;e<7;++e)this.maxVert[e]=new Float64Array(this.buffer,t,3),t+=24;for(let e=0;e<7;++e)this.minProj[e]=Number.POSITIVE_INFINITY,this.maxProj[e]=Number.NEGATIVE_INFINITY;const r=new Array(7),i=new Array(7),{data:o,size:a}=e;for(let e=0;e<o.length;e+=a){let t=o[e];t<this.minProj[0]&&(this.minProj[0]=t,r[0]=e),t>this.maxProj[0]&&(this.maxProj[0]=t,i[0]=e),t=o[e+1],t<this.minProj[1]&&(this.minProj[1]=t,r[1]=e),t>this.maxProj[1]&&(this.maxProj[1]=t,i[1]=e),t=o[e+2],t<this.minProj[2]&&(this.minProj[2]=t,r[2]=e),t>this.maxProj[2]&&(this.maxProj[2]=t,i[2]=e),t=o[e]+o[e+1]+o[e+2],t<this.minProj[3]&&(this.minProj[3]=t,r[3]=e),t>this.maxProj[3]&&(this.maxProj[3]=t,i[3]=e),t=o[e]+o[e+1]-o[e+2],t<this.minProj[4]&&(this.minProj[4]=t,r[4]=e),t>this.maxProj[4]&&(this.maxProj[4]=t,i[4]=e),t=o[e]-o[e+1]+o[e+2],t<this.minProj[5]&&(this.minProj[5]=t,r[5]=e),t>this.maxProj[5]&&(this.maxProj[5]=t,i[5]=e),t=o[e]-o[e+1]-o[e+2],t<this.minProj[6]&&(this.minProj[6]=t,r[6]=e),t>this.maxProj[6]&&(this.maxProj[6]=t,i[6]=e)}for(let e=0;e<7;++e){let t=r[e];fe(this.minVert[e],o,t),t=i[e],fe(this.maxVert[e],o,t)}}}class ce{constructor(){this.b0=(0,c.WK)(1,0,0),this.b1=(0,c.WK)(0,1,0),this.b2=(0,c.WK)(0,0,1),this.quality=0}}function de(e){return e[0]*e[1]+e[0]*e[2]+e[1]*e[2]}function ue(e,t,r){e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2]}function he(e,t,r){e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2]}function me(e,t,r){e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r}function fe(e,t,r=0){e[0]=t[r],e[1]=t[r+1],e[2]=t[r+2]}function pe(e,t,r){const i=t[0],o=t[1],a=t[2],n=r[0],s=r[1],l=r[2];e[0]=o*l-a*s,e[1]=a*n-i*l,e[2]=i*s-o*n}function ve(e,t){const r=t[0]*t[0]+t[1]*t[1]+t[2]*t[2];if(r>0){const i=1/Math.sqrt(r);e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i}}function ge(e){return e[0]*e[0]+e[1]*e[1]+e[2]*e[2]}function _e(e,t){const r=t[0]-e[0],i=t[1]-e[1],o=t[2]-e[2];return r*r+i*i+o*o}function xe(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}class Te{constructor(e=c.cX,t=We,r=s.IJ){this._data=[e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2],r[3]]}clone(){const e=new Te;return e._data=this._data.slice(),e}invalidate(){this._data[3]=-1}get isValid(){return this._data[3]>=0}static fromData(e){const t=new Te;return t._data=e.slice(),t}static fromJSON(e){return new Te(e.center,e.halfSize,e.quaternion)}copy(e){this._data=e.data.slice()}get center(){return(0,l.s)(x.Wq.get(),this._data[0],this._data[1],this._data[2])}get centerX(){return this._data[0]}get centerY(){return this._data[1]}get centerZ(){return this._data[2]}getCenter(e){return e[0]=this._data[0],e[1]=this._data[1],e[2]=this._data[2],e}set center(e){this._data[0]=e[0],this._data[1]=e[1],this._data[2]=e[2]}setCenter(e,t,r){this._data[0]=e,this._data[1]=t,this._data[2]=r}get halfSize(){return(0,l.s)(x.Wq.get(),this._data[3],this._data[4],this._data[5])}get halfSizeX(){return this._data[3]}get halfSizeY(){return this._data[4]}get halfSizeZ(){return this._data[5]}getHalfSize(e){return e[0]=this._data[3],e[1]=this._data[4],e[2]=this._data[5],e}set halfSize(e){this._data[3]=e[0],this._data[4]=e[1],this._data[5]=e[2]}get quaternion(){return(0,n.WO)(x.QX.get(),this._data[6],this._data[7],this._data[8],this._data[9])}getQuaternion(e){return e[0]=this._data[6],e[1]=this._data[7],e[2]=this._data[8],e[3]=this._data[9],e}set quaternion(e){this._data[6]=e[0],this._data[7]=e[1],this._data[8]=e[2],this._data[9]=e[3]}get data(){return this._data}getCorners(e){const t=Ee,r=this._data;t[0]=r[6],t[1]=r[7],t[2]=r[8],t[3]=r[9];for(let i=0;i<8;++i){const o=e[i];o[0]=(1&i?-1:1)*r[3],o[1]=(2&i?-1:1)*r[4],o[2]=(4&i?-1:1)*r[5],(0,l.u)(o,o,t),o[0]+=r[0],o[1]+=r[1],o[2]+=r[2]}}isVisible(e){return this.intersectPlane(e[0])<=0&&this.intersectPlane(e[1])<=0&&this.intersectPlane(e[2])<=0&&this.intersectPlane(e[3])<=0&&this.intersectPlane(e[4])<=0&&this.intersectPlane(e[5])<=0}get radius(){const e=this._data[3],t=this._data[4],r=this._data[5];return Math.sqrt(e*e+t*t+r*r)}intersectSphere(e){Ae[0]=this._data[0]-e[0],Ae[1]=this._data[1]-e[1],Ae[2]=this._data[2]-e[2];const t=this.getQuaternion(be);return(0,n.fO)(Ee,t),(0,l.u)(Ae,Ae,Ee),(0,l.v)(Ae,Ae),ye[0]=Math.min(Ae[0],this._data[3]),ye[1]=Math.min(Ae[1],this._data[4]),ye[2]=Math.min(Ae[2],this._data[5]),(0,l.w)(ye,Ae)<e[3]*e[3]}intersectSphereWithMBS(e,t=this.radius){const r=this._data;Ae[0]=r[0]-e[0],Ae[1]=r[1]-e[1],Ae[2]=r[2]-e[2];const i=e[3],o=i+t;return!((0,l.x)(Ae)>o*o)&&(Ee[0]=-r[6],Ee[1]=-r[7],Ee[2]=-r[8],Ee[3]=r[9],(0,l.u)(Ae,Ae,Ee),(0,l.v)(Ae,Ae),ye[0]=Math.min(Ae[0],r[3]),ye[1]=Math.min(Ae[1],r[4]),ye[2]=Math.min(Ae[2],r[5]),(0,l.w)(ye,Ae)<i*i)}intersectPlane(e){const t=e[0]*this._data[0]+e[1]*this._data[1]+e[2]*this._data[2]+e[3],r=this.projectedRadius((0,g.Oq)(e));return t>r?1:t<-r?-1:0}intersectRay(e,t,r=0){const i=this._data,o=Ee;o[0]=-i[6],o[1]=-i[7],o[2]=-i[8],o[3]=i[9],Ae[0]=e[0]-i[0],Ae[1]=e[1]-i[1],Ae[2]=e[2]-i[2];const a=(0,l.u)(Ae,Ae,Ee),n=(0,l.u)(ye,t,Ee);let s=-1/0,c=1/0;const d=this.getHalfSize(Ue);for(let e=0;e<3;e++){const t=a[e],i=n[e],o=d[e]+r;if(Math.abs(i)>1e-6){const e=(o-t)/i,r=(-o-t)/i;s=Math.max(s,Math.min(e,r)),c=Math.min(c,Math.max(e,r))}else if(t>o||t<-o)return!1}return s<=c}projectedArea(e,t,r,o){const a=this.getQuaternion(be);(0,n.fO)(Ee,a),Ae[0]=e[0]-this._data[0],Ae[1]=e[1]-this._data[1],Ae[2]=e[2]-this._data[2],(0,l.u)(Ae,Ae,Ee);const s=this.getHalfSize(Ue),c=Ae[0]<-s[0]?-1:Ae[0]>s[0]?1:0,u=Ae[1]<-s[1]?-1:Ae[1]>s[1]?1:0,h=Ae[2]<-s[2]?-1:Ae[2]>s[2]?1:0,m=Math.abs(c)+Math.abs(u)+Math.abs(h);if(0===m)return 1/0;const f=1===m?4:6,p=6*(c+3*u+9*h+13);(0,i.KU)(Ge,a),(0,i.aU)(Ge,Ge,s);const v=this.getCenter(De);for(let e=0;e<f;e++){const r=Re[p+e];(0,l.s)(Ae,((1&r)<<1)-1,(2&r)-1,((4&r)>>1)-1),(0,l.t)(Ae,Ae,Ge),(0,l.g)(Ce,v,Ae),Ce[3]=1,(0,d.t)(Ce,Ce,t);const i=1/Math.max(1e-6,Ce[3]);Me[2*e]=Ce[0]*i,Me[2*e+1]=Ce[1]*i}const g=2*f-2;let _=Me[0]*(Me[3]-Me[g+1])+Me[g]*(Me[1]-Me[g-1]);for(let e=2;e<g;e+=2)_+=Me[e]*(Me[e+3]-Me[e-1]);return Math.abs(_)*r*o*.125}projectedRadius(e){const t=this.getQuaternion(be);return(0,n.fO)(Ee,t),(0,l.u)(Ae,e,Ee),Math.abs(Ae[0]*this._data[3])+Math.abs(Ae[1]*this._data[4])+Math.abs(Ae[2]*this._data[5])}minimumDistancePlane(e){return e[0]*this._data[0]+e[1]*this._data[1]+e[2]*this._data[2]+e[3]-this.projectedRadius((0,g.Oq)(e))}maximumDistancePlane(e){return e[0]*this._data[0]+e[1]*this._data[1]+e[2]*this._data[2]+e[3]+this.projectedRadius((0,g.Oq)(e))}toAaBoundingBox(e){const t=this.getQuaternion(be),r=(0,i.KU)(Ge,t),o=this._data[3]*Math.abs(r[0])+this._data[4]*Math.abs(r[3])+this._data[5]*Math.abs(r[6]),a=this._data[3]*Math.abs(r[1])+this._data[4]*Math.abs(r[4])+this._data[5]*Math.abs(r[7]),n=this._data[3]*Math.abs(r[2])+this._data[4]*Math.abs(r[5])+this._data[5]*Math.abs(r[8]);e[0]=this._data[0]-o,e[1]=this._data[1]-a,e[2]=this._data[2]-n,e[3]=this._data[0]+o,e[4]=this._data[1]+a,e[5]=this._data[2]+n}transform(e,t,r,i=0,o=(0,m._s)(r),a=(0,m._s)(t),s=(0,v.Mx)(t,a)){if(r===o)t.isGeographic?function(e,t,r,i,o=(0,m._s)(r)){const a=(0,h.e0)(r),s=1+Math.max(0,i)/(a.radius+e.centerZ);e.getCenter(Le),Le[2]+=i,(0,p.projectBuffer)(Le,r,0,Le,o,0,1),t.center=Le;const c=e.getQuaternion(be);t.quaternion=c,(0,n.fO)(Ee,c),(0,l.s)(ze,0,0,1),(0,l.u)(ze,ze,Ee);const d=e.getHalfSize(Ue);(0,l.s)(ze,d[0]*Math.abs(ze[0]),d[1]*Math.abs(ze[1]),d[2]*Math.abs(ze[2])),(0,l.h)(ze,ze,a.inverseFlattening),(0,l.g)(ze,d,ze),t.halfSize=(0,l.h)(ze,ze,s)}(this,e,t,i,a):function(e,t,r,i,o=(0,m._s)(r),a=(0,v.Mx)(r,o)){e.getCorners(Ve),e.getCenter(Le),Le[2]+=i,(0,f.y)(r,Le,Be,o),t.setCenter(Be[12],Be[13],Be[14]);const s=2*Math.sqrt(1+Be[0]+Be[5]+Be[10]);Ee[0]=(Be[6]-Be[9])/s,Ee[1]=(Be[8]-Be[2])/s,Ee[2]=(Be[1]-Be[4])/s,Ee[3]=.25*s;const c=e.getQuaternion(be);t.quaternion=(0,n.iW)(Ee,Ee,c),(0,n.fO)(Ee,Ee),(0,l.s)(Ye,0,0,0);const d=t.getCenter(Fe);for(const e of Ve)e[2]+=i,a(e,0,e,0),(0,l.z)(ze,e,d),(0,l.u)(ze,ze,Ee),(0,l.v)(ze,ze),(0,l.C)(Ye,Ye,ze);t.halfSize=Ye}(this,e,t,i,a,s);else if(t.isWGS84&&(r.isWebMercator||(0,_.GK)(r)))!function(e,t,r,i,o){t.getCenter(De),De[2]+=o;const a=(0,m._s)(r);(0,p.projectBuffer)(De,e,0,De,a,0,1),Oe(a,t,De,r,i)}(t,this,r,e,i);else if(t.isWebMercator&&(0,_.GK)(r))!function(e,t,r,i,o){t.getCenter(De),De[2]+=o,Oe(e,t,De,r,i)}(t,this,r,e,i);else{const o=this.getCenter(De);o[2]+=i,(0,p.projectBuffer)(o,t,0,o,r,0,1),e.center=o,this!==e&&(e.quaternion=this.getQuaternion(be),e.halfSize=this.getHalfSize(Ue))}}}const Ee=(0,s.Su)(),be=(0,s.Su)(),Se=(0,s.Su)(),Ae=(0,c.Su)(),ye=(0,c.Su)(),Ce=(0,u.Su)();function we(e,t=new Te){return function(e,t){const{data:r,size:i}=e,o=r.length/i;if(o<=0)return;const a=new le(e);ue(A,a.minProj,a.maxProj),me(A,A,.5),he(y,a.maxProj,a.minProj);const n=de(y),s=new ce;s.quality=n,o<14&&(e=new b.Y(new Float64Array(a.buffer,112,42),3));const l=(0,c.Su)(),d=(0,c.Su)(),u=(0,c.Su)(),h=(0,c.Su)(),m=(0,c.Su)(),f=(0,c.Su)(),p=(0,c.Su)();switch(C(a,e,p,l,d,u,h,m,f,s)){case 1:return void K(A,y,t);case 2:return void ee(e,h,t)}D(e,p,l,d,u,h,m,f,s),te(e,s.b0,s.b1,s.b2,J,Z);const v=(0,c.Su)();he(v,Z,J),s.quality=de(v),s.quality<n?se(s.b0,s.b1,s.b2,J,Z,v,t):K(A,y,t)}(e,t),t}const Me=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.2],Re=(()=>{const e=new Int8Array(162);let t=0;const r=r=>{for(let i=0;i<r.length;i++)e[t+i]=r[i];t+=6};return r([6,2,3,1,5,4]),r([0,2,3,1,5,4]),r([0,2,3,7,5,4]),r([0,1,3,2,6,4]),r([0,1,3,2,0,0]),r([0,1,5,7,3,2]),r([0,1,3,7,6,4]),r([0,1,3,7,6,2]),r([0,1,5,7,6,2]),r([0,1,5,4,6,2]),r([0,1,5,4,0,0]),r([0,1,3,7,5,4]),r([0,2,6,4,0,0]),r([0,0,0,0,0,0]),r([1,3,7,5,0,0]),r([2,3,7,6,4,0]),r([2,3,7,6,0,0]),r([2,3,1,5,7,6]),r([0,1,5,7,6,2]),r([0,1,5,7,6,4]),r([0,1,3,7,6,4]),r([4,5,7,6,2,0]),r([4,5,7,6,0,0]),r([4,5,1,3,7,6]),r([0,2,3,7,5,4]),r([6,2,3,7,5,4]),r([6,2,3,1,5,4]),e})();function Ie(e,t,r,i,o){const a=e.getQuaternion(be);o.quaternion=a,(0,n.fO)(Ee,a);const s=e.getCenter(De),d=e.getHalfSize(Ue);if(i===T.UZ.Global){(0,l.u)(ze,s,Ee),(0,l.v)(Ye,ze),(0,l.y)(He,Ye,d),(0,l.z)(He,Ye,He);const i=(0,l.l)(He);(0,l.g)(He,Ye,d);const a=(0,l.l)(He);if(i<r)o.center=s,(0,l.s)(ze,r,r,r),o.halfSize=(0,l.g)(ze,d,ze);else{const n=a>0?1+t/a:1,s=i>0?1+r/i:1,c=(s+n)/2,u=(s-n)/2;(0,l.h)(He,Ye,u),o.halfSize=(0,l.r)(He,He,d,c),(0,l.h)(He,Ye,c),(0,l.r)(He,He,d,u),(0,l.A)(ze,ze),(0,l.B)(ze,He,ze);const h=e.getQuaternion(Se);o.center=(0,l.u)(ze,ze,h)}}else{o.center=(0,l.r)(ze,s,c.wx,(r+t)/2);const e=(0,l.u)(ze,c.wx,Ee);(0,l.v)(e,e),o.halfSize=(0,l.r)(Ye,d,e,(r-t)/2)}return o}function Oe(e,t,r,o,a){const n=t.getQuaternion(be),s=(0,i.KU)(Ge,n),l=t.getHalfSize(Ue);for(let e=0;e<8;++e){for(let t=0;t<3;++t)Le[t]=l[t]*(0!=(e&1<<t)?-1:1);for(let t=0;t<3;++t){let i=r[t];for(let e=0;e<3;++e)i+=Le[e]*s[3*e+t];Ne[3*e+t]=i}}(0,p.projectBuffer)(Ne,e,0,Ne,o,0,8),we(Pe,a)}const Ne=new Array(24),Pe=new b.Y(Ne,3),Le=(0,c.Su)(),De=(0,c.Su)(),Fe=(0,c.Su)(),Ue=(0,c.Su)(),Ge=(0,o.Su)(),Be=(0,a.Su)(),Ve=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],ze=(0,c.Su)(),Ye=(0,c.Su)(),He=(0,c.Su)(),We=(0,c.WK)(-1,-1,-1)},90124:(e,t,r)=>{r.d(t,{Er:()=>d,G8:()=>c,_J:()=>l});var i=r(80324),o=r(44840),a=r(48688),n=r(60288);function s(e){e.varyings.add("linearDepth","float")}function l(e){e.vertex.uniforms.add(new a.$("nearFar",((e,t)=>t.camera.nearFar)))}function c(e){e.vertex.code.add(n.Y`float calculateLinearDepth(vec2 nearFar,float z) {
|
|
281
281
|
return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
|
|
282
282
|
}`)}function d(e,t){const{vertex:r}=e;switch(t.output){case i.mC.Color:if(t.receiveShadows)return s(e),void r.code.add(n.Y`void forwardLinearDepth() { linearDepth = gl_Position.w; }`);break;case i.mC.LinearDepth:case i.mC.Shadow:case i.mC.ShadowHighlight:case i.mC.ShadowExcludeHighlight:return e.include(o.AX,t),s(e),l(e),c(e),void r.code.add(n.Y`void forwardLinearDepth() {
|
|
283
283
|
linearDepth = calculateLinearDepth(nearFar, vPosition_view.z);
|