@arcgis/core 5.2.0-next.29 → 5.2.0-next.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/assets/esri/core/t9n/Units_en.json +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0af6b87a3d77bb93b893.js +1 -0
  4. package/assets/esri/core/workers/chunks/{7ff37a4f315f7621462b.js → 125edba5c618c6257cb8.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{4ba4fd8fa31169760fee.js → 1282598516cd0e3056b7.js} +3 -3
  6. package/assets/esri/core/workers/chunks/414691f7758c78e2a704.js +1 -0
  7. package/assets/esri/core/workers/chunks/4452fd0c59431904d533.js +1 -0
  8. package/assets/esri/core/workers/chunks/451331f69d21c61ec93b.js +1 -0
  9. package/assets/esri/core/workers/chunks/{11f47a012dd8881e3d55.js → 4e803d12486c8de4c901.js} +23 -23
  10. package/assets/esri/core/workers/chunks/{992a90ecbab931198fd0.js → 4ecc345c3732f7fc130f.js} +1 -1
  11. package/assets/esri/core/workers/chunks/557300ec03bae84d8afc.js +1 -0
  12. package/assets/esri/core/workers/chunks/{b18b6bb85e52b03b85e3.js → 6df54132299b9e8f6dad.js} +18 -18
  13. package/assets/esri/core/workers/chunks/{c6f5688074ae89c37add.js → 7b1678dcf62481469544.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{a90619adff41658f8057.js → 8d21f3d6edbcd7b335d0.js} +1 -1
  15. package/assets/esri/core/workers/chunks/b1a0eb6598309e11337f.js +1 -0
  16. package/assets/esri/core/workers/chunks/bd0829eb79efff5b7223.js +1 -0
  17. package/assets/esri/core/workers/chunks/bee56a6ac99312f03109.js +1 -0
  18. package/assets/esri/core/workers/chunks/c7316fd2bdb7ac9eada3.js +1 -0
  19. package/assets/esri/core/workers/chunks/daf539e9f88fc9e101e4.js +1 -0
  20. package/assets/esri/core/workers/chunks/{9fe71d49c888fd871312.js → e2d500ac1a264d09c857.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{aded4e704e09a28edc8f.js → f63e7b01c70352538b1e.js} +1 -1
  22. package/assets/esri/core/workers/chunks/f71f5778e03f68f27482.js +1 -0
  23. package/assets/esri/core/workers/chunks/fc9664d3282b052ef40f.js +1 -0
  24. package/assets/esri/widgets/Features/t9n/Features_en.json +1 -1
  25. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_en.json +1 -1
  26. package/chunks/CutFillComposition.glsl.js +16 -10
  27. package/chunks/CutFillDepth.glsl.js +1 -14
  28. package/chunks/HUDMaterial.glsl.js +7 -7
  29. package/chunks/Viewshed.glsl.js +3 -3
  30. package/config.js +1 -1
  31. package/core/PooledArray.js +1 -1
  32. package/geometry/support/lineSegment.js +1 -1
  33. package/geometry/support/triangle.js +1 -1
  34. package/kernel.js +1 -1
  35. package/layers/AnnotationFeatureLayer.js +1 -1
  36. package/layers/DimensionFeatureLayer.js +1 -1
  37. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  38. package/layers/knowledgeGraph/nodeMovementUtils.js +1 -1
  39. package/layers/mixins/ArcGISImageService.js +1 -1
  40. package/layers/raster/datasets/pixelReader.js +1 -1
  41. package/layers/support/ExportImageServiceParameters.js +1 -1
  42. package/package.json +1 -1
  43. package/support/revision.js +1 -1
  44. package/views/2d/engine/webgl/mesh/bufcut.js +1 -1
  45. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  46. package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
  47. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  48. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  49. package/views/2d/layers/support/annodime/DimensionInfo.js +1 -1
  50. package/views/2d/layers/support/annodime/MatcherGeometryOverride.js +1 -1
  51. package/views/2d/layers/support/annodime/annotationGraphic.js +1 -1
  52. package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
  53. package/views/2d/layers/support/annodime/dimensionSymbols.js +1 -1
  54. package/views/2d/layers/support/annodime/dimensionUtils.js +1 -1
  55. package/views/2d/layers/support/annodime/fields.js +1 -1
  56. package/views/2d/layers/support/annodime/utils.js +1 -1
  57. package/views/2d/layers/support/annodime/virtualFields.js +1 -1
  58. package/views/3d/FocusAreasView.js +1 -1
  59. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  60. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  61. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  62. package/views/3d/support/hitTest.js +1 -1
  63. package/views/3d/webgl/RenderCamera.js +1 -1
  64. package/views/3d/webgl-engine/core/shaderLibrary/util/LocalFromScreenSpace.glsl.js +2 -2
  65. package/views/3d/webgl-engine/core/shaderModules/FloatsDrawUniform.js +2 -0
  66. package/views/3d/webgl-engine/effects/focusArea/{FocusAreaMaskNode.js → FocusAreaMask.js} +1 -1
  67. package/views/3d/webgl-engine/effects/focusArea/{FocusAreaColorNode.js → FocusAreaVisualization.js} +1 -1
  68. package/views/3d/webgl-engine/effects/geometry/{ObjectAndLayerIDRenderNode.js → ObjectAndLayerID.js} +1 -1
  69. package/views/3d/webgl-engine/effects/geometry/{RenderOccludedRenderNode.js → RenderOccluded.js} +1 -1
  70. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  71. package/views/3d/webgl-engine/lib/CutFillComputation.js +2 -0
  72. package/views/3d/webgl-engine/lib/CutFillVisualization.js +2 -0
  73. package/views/3d/webgl-engine/lib/{GaussianSplatRenderNode.js → GaussianSplatRenderer.js} +1 -1
  74. package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +2 -0
  75. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  76. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  77. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  78. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  79. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  80. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  81. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  82. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  83. package/views/3d/webgl-engine/lib/intersectionConstants.js +2 -0
  84. package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +2 -0
  85. package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +2 -0
  86. package/views/3d/webgl-engine/lib/triangleIntersectionUtils.js +1 -1
  87. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  88. package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
  89. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  90. package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
  91. package/views/3d/webgl-engine/materials/intersectWithPolygonOffset.js +2 -0
  92. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  93. package/views/3d/webgl-engine/shaders/CutFillComposition.glsl.js +1 -1
  94. package/views/3d/webgl-engine/shaders/CutFillCompositionTechnique.js +1 -1
  95. package/views/3d/webgl-engine/shaders/CutFillDepth.glsl.js +1 -1
  96. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  97. package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
  98. package/views/3d/webgl-engine/shaders/ViewshedTechnique.js +1 -1
  99. package/views/SceneView.js +1 -1
  100. package/views/draw/support/Reshape.js +1 -1
  101. package/views/layers/FeatureLikeLayerView.js +1 -1
  102. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  103. package/views/webgl/ShaderBuilder.js +1 -1
  104. package/widgets/Attachments/support/attachmentUtils.js +1 -1
  105. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  106. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  107. package/widgets/BatchAttributeForm.js +1 -1
  108. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  109. package/widgets/Editor.js +1 -1
  110. package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +1 -1
  111. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  112. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  113. package/widgets/PanoramicViewer/support/PanoramicTileNode.js +1 -1
  114. package/widgets/PanoramicViewer/utils.js +1 -1
  115. package/widgets/Sketch/support/OperationHandle.js +1 -1
  116. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
  117. package/assets/esri/core/workers/chunks/0d3c9112ae07fa4a97d6.js +0 -1
  118. package/assets/esri/core/workers/chunks/1849f72f23b434e6c78d.js +0 -1
  119. package/assets/esri/core/workers/chunks/218e2d8d6cd147c769ce.js +0 -1
  120. package/assets/esri/core/workers/chunks/294f2803aac000c99693.js +0 -1
  121. package/assets/esri/core/workers/chunks/2c15c227d057292d4fa8.js +0 -1
  122. package/assets/esri/core/workers/chunks/38a2f34661563c7c29c1.js +0 -1
  123. package/assets/esri/core/workers/chunks/5468a65698931603656d.js +0 -1
  124. package/assets/esri/core/workers/chunks/780519b60aa674a61a74.js +0 -1
  125. package/assets/esri/core/workers/chunks/88827e23f8938342781c.js +0 -1
  126. package/assets/esri/core/workers/chunks/bfe9c8ab35d9bf7e1035.js +0 -1
  127. package/assets/esri/core/workers/chunks/caf150028aeac91b8d80.js +0 -1
  128. package/assets/esri/core/workers/chunks/e98a8f80023c6023e72c.js +0 -1
  129. package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +0 -2
  130. package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +0 -2
  131. package/views/3d/webgl-engine/lib/GaussianSplatShadowRenderNode.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{isSome as t}from"../../../core/arrayUtils.js";import o from"../../../core/Collection.js";import{EventedAccessor as r}from"../../../core/Evented.js";import{property as s,subclass as n}from"../../../core/accessorSupport/decorators.js";import{getLegacyTool as i}from"./sketchUtils.js";let p=class extends r{constructor(e){super(e),this.cancelled=!1,this.history={undo:new o,redo:new o},this.type=null}get tool(){const{activeComponent:e}=this;if(!e)return null;switch(e.type){case"graphic-mover":case"move-3d":return"move";case"box":case"transform-3d":return"transform";case"reshape":case"reshape-3d":return"reshape";case"draw-2d":return"text"===e.graphicSymbol?.type?"text":e.geometryType;case"draw-3d":return e.geometryType;case"draw-2.0":return i(e.pluginStack.toArray().map(e=>e?.configuration).filter(t))??null}return null}addToHistory(e){this.history.redo.removeAll(),this.history.undo.push(e)}resetHistory(){this.history.redo.removeAll(),this.history.undo.removeAll()}canUndo(){return this.history.undo.length>0}canRedo(){return this.history.redo.length>0}complete(){const{activeComponent:e}=this;e&&"reset"in e?e.reset():e&&"complete"in e&&e.mostUpstreamPlugin&&e.complete(e.mostUpstreamPlugin),this.onEnd(),this.emit("complete")}cancel(){this.cancelled=!0;const{activeComponent:e}=this;e&&"reset"in e&&e.reset(),this.onEnd(),this.emit("complete")}refreshComponent(){const e=this.activeComponent;e&&("box"!==e.type&&"reshape"!==e.type&&"graphic-mover"!==e.type||e.refresh())}set undo(e){this._set("undo",()=>{this.canUndo()&&e()})}set redo(e){this._set("redo",()=>{this.canRedo()&&e()})}};e([s()],p.prototype,"activeComponent",void 0),e([s()],p.prototype,"cancelled",void 0),e([s()],p.prototype,"history",void 0),e([s()],p.prototype,"tool",null),e([s()],p.prototype,"type",void 0),e([s()],p.prototype,"canUndo",null),e([s()],p.prototype,"canRedo",null),e([s()],p.prototype,"onEnd",void 0),e([s()],p.prototype,"undo",null),e([s()],p.prototype,"redo",null),e([s()],p.prototype,"toggleTool",void 0),e([s()],p.prototype,"addToSelection",void 0),e([s()],p.prototype,"removeFromSelection",void 0),p=e([n("esri.widgets.Sketch.support.OperationHandle")],p);let a=class extends p{};e([s()],a.prototype,"activeComponent",void 0),a=e([n("esri.widgets.Sketch.support.OperationHandle.CreateOperationHandle")],a);let l=class extends p{};e([s()],l.prototype,"activeComponent",void 0),l=e([n("esri.widgets.Sketch.support.OperationHandle.UpdateOperationHandle")],l);let c=class extends p{};e([s()],c.prototype,"activeComponent",void 0),c=e([n("esri.widgets.Sketch.support.OperationHandle.DrawToolOperationHandle")],c);export{a as CreateOperationHandle,c as DrawToolOperationHandle,p as OperationHandle,l as UpdateOperationHandle};
2
+ import{__decorate as e}from"tslib";import{isSome as t}from"../../../core/arrayUtils.js";import o from"../../../core/Collection.js";import{EventedAccessor as r}from"../../../core/Evented.js";import{property as s,subclass as n}from"../../../core/accessorSupport/decorators.js";import{getLegacyTool as i}from"./sketchUtils.js";let p=class extends r{constructor(e){super(e),this.cancelled=!1,this.history={undo:new o,redo:new o},this.type=null}get tool(){const{activeComponent:e}=this;if(!e)return null;switch(e.type){case"graphic-mover":case"move-3d":return"move";case"box":case"transform-3d":return"transform";case"reshape":case"reshape-3d":return"reshape";case"draw-2d":case"draw-3d":return"text"===e.graphicSymbol?.type?"text":e.geometryType;case"draw-2.0":return i(e.pluginStack.toArray().map(e=>e?.configuration).filter(t))??null}return null}addToHistory(e){this.history.redo.removeAll(),this.history.undo.push(e)}resetHistory(){this.history.redo.removeAll(),this.history.undo.removeAll()}canUndo(){return this.history.undo.length>0}canRedo(){return this.history.redo.length>0}complete(){const{activeComponent:e}=this;e&&"reset"in e?e.reset():e&&"complete"in e&&e.mostUpstreamPlugin&&e.complete(e.mostUpstreamPlugin),this.onEnd(),this.emit("complete")}cancel(){this.cancelled=!0;const{activeComponent:e}=this;e&&"reset"in e&&e.reset(),this.onEnd(),this.emit("complete")}refreshComponent(){const e=this.activeComponent;e&&("box"!==e.type&&"reshape"!==e.type&&"graphic-mover"!==e.type||e.refresh())}set undo(e){this._set("undo",()=>{this.canUndo()&&e()})}set redo(e){this._set("redo",()=>{this.canRedo()&&e()})}};e([s()],p.prototype,"activeComponent",void 0),e([s()],p.prototype,"cancelled",void 0),e([s()],p.prototype,"history",void 0),e([s()],p.prototype,"tool",null),e([s()],p.prototype,"type",void 0),e([s()],p.prototype,"canUndo",null),e([s()],p.prototype,"canRedo",null),e([s()],p.prototype,"onEnd",void 0),e([s()],p.prototype,"undo",null),e([s()],p.prototype,"redo",null),e([s()],p.prototype,"toggleTool",void 0),e([s()],p.prototype,"addToSelection",void 0),e([s()],p.prototype,"removeFromSelection",void 0),p=e([n("esri.widgets.Sketch.support.OperationHandle")],p);let a=class extends p{};e([s()],a.prototype,"activeComponent",void 0),a=e([n("esri.widgets.Sketch.support.OperationHandle.CreateOperationHandle")],a);let l=class extends p{};e([s()],l.prototype,"activeComponent",void 0),l=e([n("esri.widgets.Sketch.support.OperationHandle.UpdateOperationHandle")],l);let c=class extends p{};e([s()],c.prototype,"activeComponent",void 0),c=e([n("esri.widgets.Sketch.support.OperationHandle.DrawToolOperationHandle")],c);export{a as CreateOperationHandle,c as DrawToolOperationHandle,p as OperationHandle,l as UpdateOperationHandle};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../../Graphic.js";import o from"../../../core/Accessor.js";import{ClonableMixin as r}from"../../../core/Clonable.js";import s from"../../../core/Collection.js";import{IdentifiableMixin as i}from"../../../core/Identifiable.js";import{getOrCreateMapValue as a}from"../../../core/MapUtils.js";import{ignoreAbortErrors as n,debounce as c}from"../../../core/promiseUtils.js";import l from"../../../core/ReactiveMap.js";import{watch as u,initial as y}from"../../../core/reactiveUtils.js";import{sqlIn as d}from"../../../core/sql.js";import{property as h,subclass as p}from"../../../core/accessorSupport/decorators.js";import{queryAllJSON as m}from"../../../layers/support/featureQueryAll.js";import{isSubtypeSublayer as g,isSubtypeGroupLayer as _}from"../../../layers/support/layerUtils.js";import{findUtilityNetwork as w}from"../../../popup/support/featureUtils.js";import b from"../../../rest/networks/support/NetworkElement.js";import A from"../../../rest/support/FeatureSet.js";import F from"../../../rest/support/Query.js";import{featureUtilityNetworkFields as f}from"../../Feature/FeatureUtilityNetworkAssociations/resources.js";import{getFeatureTitle as C}from"./utils/getFeatureTitle.js";const I=100;let v=class extends(r(i(o))){constructor(t){super(t),this._loaded=!1,this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.networkSourceIdsInUse=new Set,this.source="popup",this.description=null,this.graphic=null,this.layer=null,this.map=null,this.featureCount=0,this.associationTypes=null,this.showAllEnabled=!1,this.title=null,this.attachmentsFeatureCount=0,this.structureFeatureCount=0,this.contentFeatureCount=0,this.containerFeatureCount=0,this.connectivityFeatureCount=0,this._queryOpenAssociationType=async()=>{this.activeAssociationType&&await this._queryDebounced(this.activeAssociationType)},this._cancelQuery=()=>{const{_queryAbortController:t}=this;t&&t.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{const{_queryFeatureCountAbortController:t}=this;t&&t.abort(),this._queryFeatureCountAbortController=null},this._queryController=async t=>{this._cancelQuery();const e=new AbortController;this._queryAbortController=e,await n(this._query(t)),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();const t=new AbortController;this._queryFeatureCountAbortController=t,await n(this._queryFeatureCount()),this._queryFeatureCountAbortController===t&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryDebounced=c(this._queryController,I),this._queryFeatureCountDebounced=c(this._queryFeatureCountController,I)}initialize(){this.addHandles([u(()=>[this.graphic,this.layer,this.map,this.associationTypes,this.objectId,this.globalId,this.canQuery],()=>{this.refresh()},y),u(()=>this.activeAssociationType,t=>{this._queryDebounced(t)},y)])}destroy(){this._cancelQuery(),this._cancelQueryFeatureCount(),this._destroyAssociatedFeatureViewModels()}get supportsCacheHint(){return!!this.layer?.capabilities?.query?.supportsCacheHint}get canLoad(){return!!this.map&&!!this.associationTypes&&"string"==typeof this.globalId}get canQuery(){const t=this.layer?.capabilities?.query;return!!this.associationTypes&&"string"==typeof this.globalId&&!!t?.supportsPagination}set displayCount(t){const e=0,o=3;this._set("displayCount",Math.max(t??o,e))}get displayCount(){return this._get("displayCount")}get objectId(){return(this.objectIdField&&this.graphic?.attributes?.[this.objectIdField])??null}get objectIdField(){return this.layer?.objectIdField||null}get globalId(){return(this.globalIdField&&this.graphic?.attributes?.[this.globalIdField])??null}get globalIdField(){const{layer:t}=this;return t?.globalIdField}get activeAssociationType(){return this._get("activeAssociationType")}set activeAssociationType(t){t&&!this.associationTypes.includes(t)||this._set("activeAssociationType",t)}get state(){const{_queryAbortController:t,_queryFeatureCountAbortController:e,_queryPageAbortController:o,canQuery:r,_loaded:s,canLoad:i,source:a}=this;return e||i&&!s?"loading":t||o?"querying":!r||"popup"===a&&0===this.featureCount?"disabled":"ready"}get utilityNetwork(){const{layer:t,map:e}=this;if(!t?.loaded||!e)return null;const o=g(t)?t.parent:t;return w(e,o)}get attachmentsAssociations(){return this._get("attachmentsAssociations")||new s}get structureAssociations(){return this._get("structureAssociations")||new s}get contentAssociations(){return this._get("contentAssociations")||new s}get containerAssociations(){return this._get("containerAssociations")||new s}get connectivityAssociations(){return this._get("connectivityAssociations")||new s}get associationFeatures(){return this._get("associationFeatures")||new l}get associationViewModels(){return this._get("associationViewModels")||new Map}async refresh(){await this._queryFeatureCountDebounced(),await this._queryOpenAssociationType()}getFeatureCountForAssociationType(t){switch(t){case"attachment":return this.attachmentsFeatureCount;case"structure":return this.structureFeatureCount;case"content":return this.contentFeatureCount;case"container":return this.containerFeatureCount;case"connectivity":return this.connectivityFeatureCount}}_destroyAssociatedFeatureViewModels(){this.associationViewModels.forEach(t=>t.destroyAll())}async _loadUtiltyNetworks(){const t=this.map;if(!t)return;await Promise.allSettled(t.utilityNetworks?.map(async t=>{await t.load()})??[]);const e=this.utilityNetwork;if(e){const o=t=>{if("layerId"in t&&e.isUtilityLayer(t)){const o=null!=t.layerId?e.getSourceIdByLayerId(t.layerId):null;null!=o&&this.networkSourceIdsInUse.add(o)}};this._set("networkSourceIdsInUse",new Set),t.allLayers.forEach(o),t.allTables.forEach(o)}}async _findLayersBySourceId(t){const{utilityNetwork:e,map:o}=this,r=t=>{const o=t;if(!t.url)return!1;if(o.layerId===s){return t.url.replace(/\/\d+$/,"")===e?.featureServiceUrl}return!1};await(e?.load());const s=e.getLayerIdBySourceId(t),i=o.allLayers.filter(r),a=o.allTables.filter(r),n=i.concat(a).toArray();return await Promise.allSettled(n.map(t=>t.load())),n}_clearAssociations(){this.attachmentsAssociations.removeAll(),this.structureAssociations.removeAll(),this.contentAssociations.removeAll(),this.containerAssociations.removeAll(),this.connectivityAssociations.removeAll()}_clearFeatures(){this.associationFeatures.forEach(t=>t.removeAll()),this.associationFeatures.clear()}_getAssociationsByType(t){switch(t){case"attachment":return this.attachmentsAssociations;case"structure":return this.structureAssociations;case"connectivity":return this.connectivityAssociations;case"container":return this.containerAssociations;case"content":return this.contentAssociations}}async _queryLayer(t,e,o,r,s){const i=this._getFeatureQueryWhereClause(t,e,o,r),a=new F({where:i,outFields:["*"],cacheHint:this.supportsCacheHint}),n=A.fromJSON(await m(t,a,s));return n.features.forEach(e=>{e.layer=e.sourceLayer=_(t)?t.findSublayerForFeature(e):t}),n.features}async _createAssociationFeatureObjects(t,e,o,r,s,i){if(0===t.length)return[];const a=new Map;for(const[c,l]of e){const t=await this._findLayersBySourceId(c);for(const e of t){(await this._queryLayer(e,l,r,s,i)).forEach(t=>{if("popup"===this.source?t.sourceLayer&&t.getEffectivePopupTemplate():!!t.sourceLayer){const o=a.get(t.attributes[e.globalIdField])??[];o.push(t),a.set(t.attributes[e.globalIdField],o)}})}}const n=[];return await Promise.all(t.toArray().map(async t=>{const{fromNetworkElement:e,toNetworkElement:r}=t,s=e.globalId===o?r:e,i=a.get(s.globalId)??[];await Promise.all(i.map(async e=>{const o=null!=s?.terminalId?this.utilityNetwork?.getTerminalById(s.terminalId)?.name:void 0,r=e.sourceLayer&&"getFeatureTitle"in e.sourceLayer&&await e.sourceLayer.getFeatureTitle(e)||C(e);n.push({title:r,feature:e,association:t,terminalName:o})}))})),n}_parseFeatureObjects(t,e){const o=new Map;t.forEach(t=>{const e=t?.feature,r=e.sourceLayer;a(o,r,()=>new s).add(t)});for(const[r,s]of o)this._sortFeatureObjectsByTitle(s),e.set(r,s)}_sortFeatureObjectsByTitle(t){t.sort(this._compareByFeatureTitle)}_compareByFeatureTitle(t,e){return t.title.localeCompare(e.title,void 0,{numeric:!0})}async _queryAssociations(t){const{layer:e,globalId:o,associationTypes:r,utilityNetwork:s,canQuery:i}=this;if(await Promise.allSettled([e?.load(),s?.load()]),this._clearAssociations(),!(i&&e&&r&&s&&o))return;const a=g(e)?e.parent:e,n=new b({globalId:o,networkSourceId:s.getSourceIdByLayerId(a.layerId)}),c=new Set;r.forEach(t=>{switch(t.type){case"attachment":case"structure":c.add("attachment");break;case"container":case"content":c.add("containment");break;case"connectivity":c.add("connectivity"),c.add("junction-junction-connectivity"),c.add("junction-edge-from-connectivity"),c.add("junction-edge-midspan-connectivity"),c.add("junction-edge-to-connectivity")}});const l=await(s?.queryAssociations({elements:[n],types:Array.from(c)},{signal:t?.signal})),u=new Map,y=new Map;r.forEach(t=>{y.set(t.type,t),u.set(t.type,[])}),l.forEach(t=>{const{toNetworkElement:e,fromNetworkElement:r}=t;switch(t.associationType){case"connectivity":case"junction-junction-connectivity":case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":if(r?.globalId===o){if(this._shouldDiscardNetworkElement(e,"connectivity",y))break;u.get("connectivity")?.push(e.globalId)}else{if(this._shouldDiscardNetworkElement(r,"connectivity",y))break;u.get("connectivity")?.push(r.globalId)}this.connectivityAssociations.add(t);break;case"containment":if(r?.globalId===o){if(this._shouldDiscardNetworkElement(e,"content",y))break;u.get("content")?.push(e.globalId),this.contentAssociations.add(t)}else{if(this._shouldDiscardNetworkElement(r,"container",y))break;u.get("container")?.push(r.globalId),this.containerAssociations.add(t)}break;case"attachment":if(r?.globalId===o){if(this._shouldDiscardNetworkElement(e,"attachment",y))break;u.get("attachment")?.push(e.globalId),this.attachmentsAssociations.add(t)}else{if(this._shouldDiscardNetworkElement(r,"structure",y))break;u.get("structure")?.push(r.globalId),this.structureAssociations.add(t)}}});const d=r.map(async e=>{const{associatedNetworkSourceId:o,associatedAssetGroup:r,associatedAssetType:s}=e,i=u.get(e.type),a=null!=r?await this._countAssociatedFeatures(o,i,r,s,t):i.length;switch(e.type){case"attachment":this._set("attachmentsFeatureCount",a);break;case"structure":this._set("structureFeatureCount",a);break;case"content":this._set("contentFeatureCount",a);break;case"container":this._set("containerFeatureCount",a);break;case"connectivity":this._set("connectivityFeatureCount",a)}});await Promise.allSettled(d)}async _countAssociatedFeatureCount(t,e,o,r,s){const i=this._getFeatureQueryWhereClause(t,e,o,r);return t.queryFeatureCount({where:i,outFields:["*"],returnGeometry:!1},{signal:s?.signal})}async _countAssociatedFeatures(t,e,o,r,s){if(0===e.length)return 0;const i=(await this._findLayersBySourceId(t)).map(async t=>this._countAssociatedFeatureCount(t,e,o,r,s));return(await Promise.all(i)).reduce((t,e)=>t+e,0)}async _queryAssociatedFeatures(t,e){const{layer:o,globalId:r,associationTypes:s,utilityNetwork:i,canQuery:a,associationFeatures:n}=this;if(await Promise.allSettled([o?.load(),i?.load()]),!(a&&o&&s&&i))return;const c=this._getAssociationsByType(t.type),{associatedAssetGroup:l,associatedAssetType:u}=t,y=new Map;c.forEach(t=>{const{fromNetworkElement:e,toNetworkElement:o}=t,{networkSourceId:s,elementGlobalId:i}=e.globalId===r?{networkSourceId:o.networkSourceId,elementGlobalId:o.globalId}:{networkSourceId:e.networkSourceId,elementGlobalId:e.globalId},a=y.get(s)||[];a.push(i),y.set(s,a)});const d=await this._createAssociationFeatureObjects(c,y,r,l,u,e);this._parseFeatureObjects(d,n)}async _queryFeatureCount(){await this._loadUtiltyNetworks();const{_queryFeatureCountAbortController:t,canQuery:e}=this;e?(await this._queryAssociations(t),this._set("featureCount",this.attachmentsFeatureCount+this.structureFeatureCount+this.contentFeatureCount+this.containerFeatureCount+this.connectivityFeatureCount)):this._set("featureCount",0)}async _query(t){if(!t)return;await this._loadUtiltyNetworks();const{_queryAbortController:e}=this;this._destroyAssociatedFeatureViewModels(),this._clearFeatures(),0!==this.featureCount&&(this.destroyed||await this._queryAssociatedFeatures(t,{signal:e?.signal}))}_shouldDiscardNetworkElement(t,e,o){if(!t)return!1;const{networkSourceIdsInUse:r}=this,{networkSourceId:s}=t,i=o.get(e)?.associatedNetworkSourceId,a=r.has(s);return null!=i&&i!==s||!a}_getFeatureQueryWhereClause(t,e,o,r){const s=t.globalIdField,i=t.fieldsIndex.get(f.assetGroup),a=t.fieldsIndex.get(f.assetType),n=null!=o,c=null!=r;return[s?d(s,e):null,n?`(${i?.name} = ${o})`:null,n&&c?`(${a?.name} = ${r})`:null].filter(Boolean).join(" AND ")}};t([h()],v.prototype,"_loaded",void 0),t([h()],v.prototype,"_queryAbortController",void 0),t([h()],v.prototype,"_queryPageAbortController",void 0),t([h()],v.prototype,"_queryFeatureCountAbortController",void 0),t([h({readOnly:!0})],v.prototype,"supportsCacheHint",null),t([h({readOnly:!0})],v.prototype,"canLoad",null),t([h({readOnly:!0})],v.prototype,"canQuery",null),t([h()],v.prototype,"networkSourceIdsInUse",void 0),t([h({constructOnly:!0})],v.prototype,"source",void 0),t([h()],v.prototype,"description",void 0),t([h({value:3})],v.prototype,"displayCount",null),t([h({type:e})],v.prototype,"graphic",void 0),t([h()],v.prototype,"layer",void 0),t([h()],v.prototype,"map",void 0),t([h({readOnly:!0})],v.prototype,"objectId",null),t([h({readOnly:!0})],v.prototype,"objectIdField",null),t([h({readOnly:!0})],v.prototype,"globalId",null),t([h({readOnly:!0})],v.prototype,"globalIdField",null),t([h()],v.prototype,"featureCount",void 0),t([h()],v.prototype,"associationTypes",void 0),t([h()],v.prototype,"activeAssociationType",null),t([h()],v.prototype,"showAllEnabled",void 0),t([h()],v.prototype,"state",null),t([h()],v.prototype,"title",void 0),t([h({readOnly:!0})],v.prototype,"utilityNetwork",null),t([h({readOnly:!0})],v.prototype,"attachmentsFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"structureFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"attachmentsAssociations",null),t([h({readOnly:!0})],v.prototype,"structureAssociations",null),t([h({readOnly:!0})],v.prototype,"contentFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"containerFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"contentAssociations",null),t([h({readOnly:!0})],v.prototype,"containerAssociations",null),t([h({readOnly:!0})],v.prototype,"connectivityFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"connectivityAssociations",null),t([h({readOnly:!0})],v.prototype,"associationFeatures",null),t([h({readOnly:!0})],v.prototype,"associationViewModels",null),v=t([p("esri.widgets.support.UtilityNetworkAssociations.FeatureUtilityNetworkAssociationsViewModel")],v);export{v as default};
2
+ import{__decorate as t}from"tslib";import e from"../../../Graphic.js";import o from"../../../core/Accessor.js";import{ClonableMixin as r}from"../../../core/Clonable.js";import s from"../../../core/Collection.js";import{IdentifiableMixin as i}from"../../../core/Identifiable.js";import{getOrCreateMapValue as a}from"../../../core/MapUtils.js";import{ignoreAbortErrors as n,debounce as c}from"../../../core/promiseUtils.js";import l from"../../../core/ReactiveMap.js";import{watch as u,initial as y}from"../../../core/reactiveUtils.js";import{sqlIn as d}from"../../../core/sql.js";import{property as h,subclass as p}from"../../../core/accessorSupport/decorators.js";import{queryAllJSON as m}from"../../../layers/support/featureQueryAll.js";import{isSubtypeSublayer as g,isSubtypeGroupLayer as _}from"../../../layers/support/layerUtils.js";import{findUtilityNetwork as w}from"../../../popup/support/featureUtils.js";import b from"../../../rest/networks/support/NetworkElement.js";import A from"../../../rest/support/FeatureSet.js";import{featureUtilityNetworkFields as F}from"../../Feature/FeatureUtilityNetworkAssociations/resources.js";import{getFeatureTitle as f}from"./utils/getFeatureTitle.js";const C=100;let I=class extends(r(i(o))){constructor(t){super(t),this._loaded=!1,this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.networkSourceIdsInUse=new Set,this.source="popup",this.description=null,this.graphic=null,this.layer=null,this.map=null,this.featureCount=0,this.associationTypes=null,this.showAllEnabled=!1,this.title=null,this.attachmentsFeatureCount=0,this.structureFeatureCount=0,this.contentFeatureCount=0,this.containerFeatureCount=0,this.connectivityFeatureCount=0,this._queryOpenAssociationType=async()=>{this.activeAssociationType&&await this._queryDebounced(this.activeAssociationType)},this._cancelQuery=()=>{const{_queryAbortController:t}=this;t&&t.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{const{_queryFeatureCountAbortController:t}=this;t&&t.abort(),this._queryFeatureCountAbortController=null},this._queryController=async t=>{this._cancelQuery();const e=new AbortController;this._queryAbortController=e,await n(this._query(t)),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();const t=new AbortController;this._queryFeatureCountAbortController=t,await n(this._queryFeatureCount()),this._queryFeatureCountAbortController===t&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryDebounced=c(this._queryController,C),this._queryFeatureCountDebounced=c(this._queryFeatureCountController,C)}initialize(){this.addHandles([u(()=>[this.graphic,this.layer,this.map,this.associationTypes,this.objectId,this.globalId,this.canQuery],()=>{this.refresh()},y),u(()=>this.activeAssociationType,t=>{this._queryDebounced(t)},y)])}destroy(){this._cancelQuery(),this._cancelQueryFeatureCount(),this._destroyAssociatedFeatureViewModels()}get supportsCacheHint(){return!!this.layer?.capabilities?.query?.supportsCacheHint}get canLoad(){return!!this.map&&!!this.associationTypes&&"string"==typeof this.globalId}get canQuery(){const t=this.layer?.capabilities?.query;return!!this.associationTypes&&"string"==typeof this.globalId&&!!t?.supportsPagination}set displayCount(t){const e=0,o=3;this._set("displayCount",Math.max(t??o,e))}get displayCount(){return this._get("displayCount")}get objectId(){return(this.objectIdField&&this.graphic?.attributes?.[this.objectIdField])??null}get objectIdField(){return this.layer?.objectIdField||null}get globalId(){return(this.globalIdField&&this.graphic?.attributes?.[this.globalIdField])??null}get globalIdField(){const{layer:t}=this;return t?.globalIdField}get activeAssociationType(){return this._get("activeAssociationType")}set activeAssociationType(t){t&&!this.associationTypes.includes(t)||this._set("activeAssociationType",t)}get state(){const{_queryAbortController:t,_queryFeatureCountAbortController:e,_queryPageAbortController:o,canQuery:r,_loaded:s,canLoad:i,source:a}=this;return e||i&&!s?"loading":t||o?"querying":!r||"popup"===a&&0===this.featureCount?"disabled":"ready"}get utilityNetwork(){const{layer:t,map:e}=this;if(!t?.loaded||!e)return null;const o=g(t)?t.parent:t;return w(e,o)}get attachmentsAssociations(){return this._get("attachmentsAssociations")||new s}get structureAssociations(){return this._get("structureAssociations")||new s}get contentAssociations(){return this._get("contentAssociations")||new s}get containerAssociations(){return this._get("containerAssociations")||new s}get connectivityAssociations(){return this._get("connectivityAssociations")||new s}get associationFeatures(){return this._get("associationFeatures")||new l}get associationViewModels(){return this._get("associationViewModels")||new Map}async refresh(){await this._queryFeatureCountDebounced(),await this._queryOpenAssociationType()}getFeatureCountForAssociationType(t){switch(t){case"attachment":return this.attachmentsFeatureCount;case"structure":return this.structureFeatureCount;case"content":return this.contentFeatureCount;case"container":return this.containerFeatureCount;case"connectivity":return this.connectivityFeatureCount}}_destroyAssociatedFeatureViewModels(){this.associationViewModels.forEach(t=>t.destroyAll())}async _loadUtiltyNetworks(){const t=this.map;if(!t)return;await Promise.allSettled(t.utilityNetworks?.map(async t=>{await t.load()})??[]);const e=this.utilityNetwork;if(e){const o=t=>{if("layerId"in t&&e.isUtilityLayer(t)){const o=null!=t.layerId?e.getSourceIdByLayerId(t.layerId):null;null!=o&&this.networkSourceIdsInUse.add(o)}};this._set("networkSourceIdsInUse",new Set),t.allLayers.forEach(o),t.allTables.forEach(o)}}async _findLayersBySourceId(t){const{utilityNetwork:e,map:o}=this,r=t=>{const o=t;if(!t.url)return!1;if(o.layerId===s){return t.url.replace(/\/\d+$/,"")===e?.featureServiceUrl}return!1};await(e?.load());const s=e.getLayerIdBySourceId(t),i=o.allLayers.filter(r),a=o.allTables.filter(r),n=i.concat(a).toArray();return await Promise.allSettled(n.map(t=>t.load())),n}_clearAssociations(){this.attachmentsAssociations.removeAll(),this.structureAssociations.removeAll(),this.contentAssociations.removeAll(),this.containerAssociations.removeAll(),this.connectivityAssociations.removeAll()}_clearFeatures(){this.associationFeatures.forEach(t=>t.removeAll()),this.associationFeatures.clear()}_getAssociationsByType(t){switch(t){case"attachment":return this.attachmentsAssociations;case"structure":return this.structureAssociations;case"connectivity":return this.connectivityAssociations;case"container":return this.containerAssociations;case"content":return this.contentAssociations}}async _queryLayer(t,e,o,r,s){const i=this._getFeatureQueryWhereClause(t,e,o,r),a=t.createQuery();a.where=i,a.outFields=["*"],a.returnGeometry=!1,a.cacheHint=this.supportsCacheHint;const n=A.fromJSON(await m(t,a,s));return n.features.forEach(e=>{e.layer=e.sourceLayer=_(t)?t.findSublayerForFeature(e):t}),n.features}async _createAssociationFeatureObjects(t,e,o,r,s,i){if(0===t.length)return[];const a=new Map;for(const[c,l]of e){const t=await this._findLayersBySourceId(c);for(const e of t){(await this._queryLayer(e,l,r,s,i)).forEach(t=>{if("popup"===this.source?t.sourceLayer&&t.getEffectivePopupTemplate():!!t.sourceLayer){const o=a.get(t.attributes[e.globalIdField])??[];o.push(t),a.set(t.attributes[e.globalIdField],o)}})}}const n=[];return await Promise.all(t.toArray().map(async t=>{const{fromNetworkElement:e,toNetworkElement:r}=t,s=e.globalId===o?r:e,i=a.get(s.globalId)??[];await Promise.all(i.map(async e=>{const o=null!=s?.terminalId?this.utilityNetwork?.getTerminalById(s.terminalId)?.name:void 0,r=e.sourceLayer&&"getFeatureTitle"in e.sourceLayer&&await e.sourceLayer.getFeatureTitle(e)||f(e);n.push({title:r,feature:e,association:t,terminalName:o})}))})),n}_parseFeatureObjects(t,e){const o=new Map;t.forEach(t=>{const e=t?.feature,r=e.sourceLayer;a(o,r,()=>new s).add(t)});for(const[r,s]of o)this._sortFeatureObjectsByTitle(s),e.set(r,s)}_sortFeatureObjectsByTitle(t){t.sort(this._compareByFeatureTitle)}_compareByFeatureTitle(t,e){return t.title.localeCompare(e.title,void 0,{numeric:!0})}async _queryAssociations(t){const{layer:e,globalId:o,associationTypes:r,utilityNetwork:s,canQuery:i}=this;if(await Promise.allSettled([e?.load(),s?.load()]),this._clearAssociations(),!(i&&e&&r&&s&&o))return;const a=g(e)?e.parent:e,n=new b({globalId:o,networkSourceId:s.getSourceIdByLayerId(a.layerId)}),c=new Set;r.forEach(t=>{switch(t.type){case"attachment":case"structure":c.add("attachment");break;case"container":case"content":c.add("containment");break;case"connectivity":c.add("connectivity"),c.add("junction-junction-connectivity"),c.add("junction-edge-from-connectivity"),c.add("junction-edge-midspan-connectivity"),c.add("junction-edge-to-connectivity")}});const l=await(s?.queryAssociations({elements:[n],types:Array.from(c)},{signal:t?.signal})),u=new Map,y=new Map;r.forEach(t=>{y.set(t.type,t),u.set(t.type,[])}),l.forEach(t=>{const{toNetworkElement:e,fromNetworkElement:r}=t;switch(t.associationType){case"connectivity":case"junction-junction-connectivity":case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":if(r?.globalId===o){if(this._shouldDiscardNetworkElement(e,"connectivity",y))break;u.get("connectivity")?.push(e.globalId)}else{if(this._shouldDiscardNetworkElement(r,"connectivity",y))break;u.get("connectivity")?.push(r.globalId)}this.connectivityAssociations.add(t);break;case"containment":if(r?.globalId===o){if(this._shouldDiscardNetworkElement(e,"content",y))break;u.get("content")?.push(e.globalId),this.contentAssociations.add(t)}else{if(this._shouldDiscardNetworkElement(r,"container",y))break;u.get("container")?.push(r.globalId),this.containerAssociations.add(t)}break;case"attachment":if(r?.globalId===o){if(this._shouldDiscardNetworkElement(e,"attachment",y))break;u.get("attachment")?.push(e.globalId),this.attachmentsAssociations.add(t)}else{if(this._shouldDiscardNetworkElement(r,"structure",y))break;u.get("structure")?.push(r.globalId),this.structureAssociations.add(t)}}});const d=r.map(async e=>{const{associatedNetworkSourceId:o,associatedAssetGroup:r,associatedAssetType:s}=e,i=u.get(e.type),a=null!=r?await this._countAssociatedFeatures(o,i,r,s,t):i.length;switch(e.type){case"attachment":this._set("attachmentsFeatureCount",a);break;case"structure":this._set("structureFeatureCount",a);break;case"content":this._set("contentFeatureCount",a);break;case"container":this._set("containerFeatureCount",a);break;case"connectivity":this._set("connectivityFeatureCount",a)}});await Promise.allSettled(d)}async _countAssociatedFeatureCount(t,e,o,r,s){const i=this._getFeatureQueryWhereClause(t,e,o,r),a=t.createQuery();return a.where=i,a.outFields=["*"],a.returnGeometry=!1,t.queryFeatureCount(a,{signal:s?.signal})}async _countAssociatedFeatures(t,e,o,r,s){if(0===e.length)return 0;const i=(await this._findLayersBySourceId(t)).map(async t=>this._countAssociatedFeatureCount(t,e,o,r,s));return(await Promise.all(i)).reduce((t,e)=>t+e,0)}async _queryAssociatedFeatures(t,e){const{layer:o,globalId:r,associationTypes:s,utilityNetwork:i,canQuery:a,associationFeatures:n}=this;if(await Promise.allSettled([o?.load(),i?.load()]),!(a&&o&&s&&i))return;const c=this._getAssociationsByType(t.type),{associatedAssetGroup:l,associatedAssetType:u}=t,y=new Map;c.forEach(t=>{const{fromNetworkElement:e,toNetworkElement:o}=t,{networkSourceId:s,elementGlobalId:i}=e.globalId===r?{networkSourceId:o.networkSourceId,elementGlobalId:o.globalId}:{networkSourceId:e.networkSourceId,elementGlobalId:e.globalId},a=y.get(s)||[];a.push(i),y.set(s,a)});const d=await this._createAssociationFeatureObjects(c,y,r,l,u,e);this._parseFeatureObjects(d,n)}async _queryFeatureCount(){await this._loadUtiltyNetworks();const{_queryFeatureCountAbortController:t,canQuery:e}=this;e?(await this._queryAssociations(t),this._set("featureCount",this.attachmentsFeatureCount+this.structureFeatureCount+this.contentFeatureCount+this.containerFeatureCount+this.connectivityFeatureCount)):this._set("featureCount",0)}async _query(t){if(!t)return;await this._loadUtiltyNetworks();const{_queryAbortController:e}=this;this._destroyAssociatedFeatureViewModels(),this._clearFeatures(),0!==this.featureCount&&(this.destroyed||await this._queryAssociatedFeatures(t,{signal:e?.signal}))}_shouldDiscardNetworkElement(t,e,o){if(!t)return!1;const{networkSourceIdsInUse:r}=this,{networkSourceId:s}=t,i=o.get(e)?.associatedNetworkSourceId,a=r.has(s);return null!=i&&i!==s||!a}_getFeatureQueryWhereClause(t,e,o,r){const s=t.globalIdField,i=t.fieldsIndex.get(F.assetGroup),a=t.fieldsIndex.get(F.assetType),n=null!=o,c=null!=r;return[s?d(s,e):null,n?`(${i?.name} = ${o})`:null,n&&c?`(${a?.name} = ${r})`:null].filter(Boolean).join(" AND ")}};t([h()],I.prototype,"_loaded",void 0),t([h()],I.prototype,"_queryAbortController",void 0),t([h()],I.prototype,"_queryPageAbortController",void 0),t([h()],I.prototype,"_queryFeatureCountAbortController",void 0),t([h({readOnly:!0})],I.prototype,"supportsCacheHint",null),t([h({readOnly:!0})],I.prototype,"canLoad",null),t([h({readOnly:!0})],I.prototype,"canQuery",null),t([h()],I.prototype,"networkSourceIdsInUse",void 0),t([h({constructOnly:!0})],I.prototype,"source",void 0),t([h()],I.prototype,"description",void 0),t([h({value:3})],I.prototype,"displayCount",null),t([h({type:e})],I.prototype,"graphic",void 0),t([h()],I.prototype,"layer",void 0),t([h()],I.prototype,"map",void 0),t([h({readOnly:!0})],I.prototype,"objectId",null),t([h({readOnly:!0})],I.prototype,"objectIdField",null),t([h({readOnly:!0})],I.prototype,"globalId",null),t([h({readOnly:!0})],I.prototype,"globalIdField",null),t([h()],I.prototype,"featureCount",void 0),t([h()],I.prototype,"associationTypes",void 0),t([h()],I.prototype,"activeAssociationType",null),t([h()],I.prototype,"showAllEnabled",void 0),t([h()],I.prototype,"state",null),t([h()],I.prototype,"title",void 0),t([h({readOnly:!0})],I.prototype,"utilityNetwork",null),t([h({readOnly:!0})],I.prototype,"attachmentsFeatureCount",void 0),t([h({readOnly:!0})],I.prototype,"structureFeatureCount",void 0),t([h({readOnly:!0})],I.prototype,"attachmentsAssociations",null),t([h({readOnly:!0})],I.prototype,"structureAssociations",null),t([h({readOnly:!0})],I.prototype,"contentFeatureCount",void 0),t([h({readOnly:!0})],I.prototype,"containerFeatureCount",void 0),t([h({readOnly:!0})],I.prototype,"contentAssociations",null),t([h({readOnly:!0})],I.prototype,"containerAssociations",null),t([h({readOnly:!0})],I.prototype,"connectivityFeatureCount",void 0),t([h({readOnly:!0})],I.prototype,"connectivityAssociations",null),t([h({readOnly:!0})],I.prototype,"associationFeatures",null),t([h({readOnly:!0})],I.prototype,"associationViewModels",null),I=t([p("esri.widgets.support.UtilityNetworkAssociations.FeatureUtilityNetworkAssociationsViewModel")],I);export{I as default};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6661],{48163(t,n,e){function r(){return[0,0]}function o(t){return[t[0],t[1]]}function i(t,n){return[t,n]}function a(){return i(1,1)}function u(){return i(-1,-1)}function s(){return i(1,0)}function c(){return i(0,1)}e.d(n,{IA:()=>l,Un:()=>f,fA:()=>i,o8:()=>o,vt:()=>r});const f=a(),l=u(),h=s(),m=c();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:l,ONES:f,UNIT_X:h,UNIT_Y:m,ZEROS:[0,0],clone:o,create:r,freeze:function(t,n){return[t,n]},fromArray:function(t,n=[0,0]){const e=Math.min(2,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:i,negativeOnes:u,ones:a,unitX:s,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},51850(t,n,e){function r(){return[0,0,0]}function o(t){return[t[0],t[1],t[2]]}function i(t,n,e){return[t,n,e]}function a(t,n,e){return[t,n,e]}function u(t,n=[0,0,0]){const e=Math.min(3,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n}function s(){return[0,0,0]}function c(){return i(1,1,1)}function f(){return i(1,0,0)}function l(){return i(0,1,0)}function h(){return i(0,0,1)}e.d(n,{CN:()=>a,Cb:()=>y,Cw:()=>d,JP:()=>g,S:()=>c,Ul:()=>s,Un:()=>M,ci:()=>u,fA:()=>i,o8:()=>o,uY:()=>m,vt:()=>r});const m=[0,0,0],M=c(),d=f(),g=l(),y=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:M,UNIT_X:d,UNIT_Y:g,UNIT_Z:y,ZEROS:m,clone:o,create:r,freeze:a,fromArray:u,fromValues:i,ones:c,unitX:f,unitY:l,unitZ:h,zeros:s},Symbol.toStringTag,{value:"Module"}))},91829(t,n,e){function r(){return[0,0,0,0]}function o(t,n,e,r){return[t,n,e,r]}function i(t,n,e,r){return[t,n,e,r]}function a(){return o(1,1,1,1)}function u(){return o(1,0,0,0)}function s(){return o(0,1,0,0)}function c(){return o(0,0,1,0)}function f(){return o(0,0,0,1)}e.d(n,{CN:()=>i,Un:()=>h,_Y:()=>f,fA:()=>o,uY:()=>l,vt:()=>r});const l=[0,0,0,0],h=a(),m=u(),M=s(),d=c(),g=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:g,UNIT_X:m,UNIT_Y:M,UNIT_Z:d,ZEROS:l,clone:function(t){return[t[0],t[1],t[2],t[3]]},create:r,freeze:i,fromArray:function(t,n=[0,0,0,0]){const e=Math.min(4,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:o,ones:a,unitW:f,unitX:u,unitY:s,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},34304(t,n,e){e.d(n,{DF:()=>s,FD:()=>o,Ov:()=>i,ct:()=>c});let r=1e-6;function o(){return r}const i=Math.random,a=Math.PI/180,u=180/Math.PI;function s(t){return t*a}function c(t){return t*u}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:i,equals:function(t,n){return Math.abs(t-n)<=r*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:o,setEpsilon:function(t){r=t},toDegree:c,toRadian:s},Symbol.toStringTag,{value:"Module"}))},37585(t,n,e){e.d(n,{C:()=>i,Cc:()=>A,Il:()=>N,Io:()=>d,LI:()=>m,Om:()=>v,Re:()=>s,S8:()=>w,T9:()=>l,WQ:()=>u,aI:()=>I,e$:()=>_,hG:()=>g,hZ:()=>a,hs:()=>M,jb:()=>U,l0:()=>S,qE:()=>h,t2:()=>x,xg:()=>O,ze:()=>p});var r=e(34727),o=e(34304);function i(t,n){return t[0]=n[0],t[1]=n[1],t}function a(t,n,e){return t[0]=n,t[1]=e,t}function u(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t}function s(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t}function c(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t}function f(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t}function l(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t}function h(t,n,e,o){return t[0]=(0,r.qE)(n[0],e[0],o[0]),t[1]=(0,r.qE)(n[1],e[1],o[1]),t}function m(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t}function M(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t}function d(t,n){const e=n[0]-t[0],r=n[1]-t[1];return Math.sqrt(e*e+r*r)}function g(t,n){const e=n[0]-t[0],r=n[1]-t[1];return e*e+r*r}function y(t){const n=t[0],e=t[1];return Math.sqrt(n*n+e*e)}function b(t){const n=t[0],e=t[1];return n*n+e*e}function p(t,n){return t[0]=-n[0],t[1]=-n[1],t}function w(t,n){const e=n[0],r=n[1];let o=e*e+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=n[0]*o,t[1]=n[1]*o),t}function v(t,n){return t[0]*n[0]+t[1]*n[1]}function A(t,n,e,r){const o=n[0],i=n[1];return t[0]=o+r*(e[0]-o),t[1]=i+r*(e[1]-i),t}function S(t,n,e){const r=n[0],o=n[1];return t[0]=e[0]*r+e[2]*o+e[4],t[1]=e[1]*r+e[3]*o+e[5],t}function _(t,n,e,r){const o=n[0]-e[0],i=n[1]-e[1],a=Math.sin(r),u=Math.cos(r);return t[0]=o*u-i*a+e[0],t[1]=o*a+i*u+e[1],t}function x(t,n){return t[0]===n[0]&&t[1]===n[1]}function I(t,n){const e=t[0],r=t[1],i=n[0],a=n[1],u=(0,o.FD)();return Math.abs(e-i)<=u*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))}const N=y,U=s,E=c,T=f,O=d,q=g,C=b;Object.freeze(Object.defineProperty({__proto__:null,add:u,angle:function(t,n){const e=t[0],r=t[1],o=n[0],i=n[1];let a=e*e+r*r;a>0&&(a=1/Math.sqrt(a));let u=o*o+i*i;u>0&&(u=1/Math.sqrt(u));const s=(e*o+r*i)*a*u;return s>1?0:s<-1?Math.PI:Math.acos(s)},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t},clamp:h,copy:i,cross:function(t,n,e){const r=n[0]*e[1]-n[1]*e[0];return t[0]=t[1]=0,t[2]=r,t},dist:O,distance:d,div:T,divide:f,dot:v,equals:I,exactEquals:x,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t},len:N,length:y,lerp:A,max:l,min:function(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t},mul:E,multiply:c,negate:p,normalize:w,projectAndScale:function(t,n,e,r,o){let i=n[0]-e[0],a=n[1]-e[1];const u=(r[0]*i+r[1]*a)*(o-1);return i=r[0]*u,a=r[1]*u,t[0]=n[0]+i,t[1]=n[1]+a,t},random:function(t,n=1){const e=2*(0,o.Ov)()*Math.PI;return t[0]=Math.cos(e)*n,t[1]=Math.sin(e)*n,t},rotate:_,round:m,scale:M,scaleAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t},set:a,sqrDist:q,sqrLen:C,squaredDistance:g,squaredLength:b,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:U,subtract:s,transformMat2:function(t,n,e){const r=n[0],o=n[1];return t[0]=e[0]*r+e[2]*o,t[1]=e[1]*r+e[3]*o,t},transformMat2d:S,transformMat3:function(t,n,e){const r=n[0],o=n[1];return t[0]=e[0]*r+e[3]*o+e[6],t[1]=e[1]*r+e[4]*o+e[7],t},transformMat4:function(t,n,e){const r=n[0],o=n[1];return t[0]=e[0]*r+e[4]*o+e[12],t[1]=e[1]*r+e[5]*o+e[13],t}},Symbol.toStringTag,{value:"Module"}))},35522(t,n,e){e.d(n,{$A:()=>x,Bw:()=>i,C:()=>a,Cc:()=>I,DI:()=>A,Il:()=>D,Io:()=>b,Ln:()=>y,Om:()=>_,Qr:()=>l,Re:()=>c,S8:()=>S,T9:()=>d,WQ:()=>s,Z0:()=>N,_S:()=>m,aI:()=>B,ei:()=>U,fw:()=>T,g7:()=>O,gL:()=>E,hG:()=>p,hZ:()=>u,hs:()=>g,jb:()=>P,jk:()=>M,lo:()=>j,lw:()=>f,m3:()=>w,oW:()=>F,t2:()=>z,tn:()=>h,uE:()=>W,xg:()=>R,ze:()=>v});var r=e(51850),o=e(34304);function i(t){const n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function u(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function s(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function c(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function f(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function l(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function h(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function m(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function M(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function d(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function g(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function y(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function b(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(e*e+r*r+o*o)}function p(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return e*e+r*r+o*o}function w(t){const n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function v(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function A(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function S(t,n){const e=n[0],r=n[1],o=n[2];let i=e*e+r*r+o*o;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i),t}function _(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function x(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],u=e[1],s=e[2];return t[0]=o*s-i*u,t[1]=i*a-r*s,t[2]=r*u-o*a,t}function I(t,n,e,r){const o=n[0],i=n[1],a=n[2];return t[0]=o+r*(e[0]-o),t[1]=i+r*(e[1]-i),t[2]=a+r*(e[2]-a),t}function N(t,n,e){const r=n[0],o=n[1],i=n[2];return t[0]=e[0]*r+e[4]*o+e[8]*i+e[12],t[1]=e[1]*r+e[5]*o+e[9]*i+e[13],t[2]=e[2]*r+e[6]*o+e[10]*i+e[14],t}function U(t,n,e){const r=n[0],o=n[1],i=n[2];return t[0]=r*e[0]+o*e[3]+i*e[6],t[1]=r*e[1]+o*e[4]+i*e[7],t[2]=r*e[2]+o*e[5]+i*e[8],t}function E(t,n,e){return T(t,n,e[0],e[1],e[2],e[3])}function T(t,n,e,r,o,i){const a=n[0],u=n[1],s=n[2],c=r*s-o*u,f=o*a-e*s,l=e*u-r*a,h=r*l-o*f,m=o*c-e*l,M=e*f-r*c,d=2*i;return t[0]=a+c*d+2*h,t[1]=u+f*d+2*m,t[2]=s+l*d+2*M,t}function O(t,n){S(q,t),S(C,n);const e=_(q,C);return e>1?0:e<-1?Math.PI:Math.acos(e)}const q=(0,r.vt)(),C=(0,r.vt)();function z(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function B(t,n){if(t===n)return!0;const e=t[0],r=t[1],i=t[2],a=n[0],u=n[1],s=n[2],c=(0,o.FD)();return Math.abs(e-a)<=c*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(r-u)<=c*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(i-s)<=c*Math.max(1,Math.abs(i),Math.abs(s))}function F(t,n,e){const r=e[0]-n[0],o=e[1]-n[1],i=e[2]-n[2];let a=r*r+o*o+i*i;return a>0?(a=1/Math.sqrt(a),t[0]=r*a,t[1]=o*a,t[2]=i*a,t):(t[0]=0,t[1]=0,t[2]=0,t)}const P=c,V=f,L=l,R=b,j=p,D=i,W=w;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:s,angle:O,bezier:function(t,n,e,r,o,i){const a=1-i,u=a*a,s=i*i,c=u*a,f=3*i*u,l=3*s*a,h=s*i;return t[0]=n[0]*c+e[0]*f+r[0]*l+o[0]*h,t[1]=n[1]*c+e[1]*f+r[1]*l+o[1]*h,t[2]=n[2]*c+e[2]*f+r[2]*l+o[2]*h,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},clamp:function(t,n=0,e=1){return t[0]=Math.min(Math.max(t[0],n),e),t[1]=Math.min(Math.max(t[1],n),e),t[2]=Math.min(Math.max(t[2],n),e),t},copy:a,cross:x,crossAndNormalize:function(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],u=e[1],s=e[2],c=o*s-i*u,f=i*a-r*s,l=r*u-o*a,h=Math.sqrt(c*c+f*f+l*l);return t[0]=c/h,t[1]=f/h,t[2]=l/h,t},direction:F,dist:R,distance:b,div:L,divide:l,dot:_,equals:B,exactEquals:z,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,e,r,o,i){const a=i*i,u=a*(2*i-3)+1,s=a*(i-2)+i,c=a*(i-1),f=a*(3-2*i);return t[0]=n[0]*u+e[0]*s+r[0]*c+o[0]*f,t[1]=n[1]*u+e[1]*s+r[1]*c+o[1]*f,t[2]=n[2]*u+e[2]*s+r[2]*c+o[2]*f,t},inverse:A,len:D,length:i,lerp:I,max:d,min:M,mul:V,multiply:f,negate:v,normalize:S,random:function(t,n=1){const e=o.Ov,r=2*e()*Math.PI,i=2*e()-1,a=Math.sqrt(1-i*i)*n;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=i*n,t},rotateX:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[0],i[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),i[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateY:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),i[1]=o[1],i[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateZ:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),i[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),i[2]=o[2],t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:g,scaleAndAdd:y,set:u,sign:m,sqrDist:j,sqrLen:W,squaredDistance:p,squaredLength:w,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:P,subtract:c,transformMat3:U,transformMat4:N,transformQuat:E,transformQuatValues:T},Symbol.toStringTag,{value:"Module"}))},78955(t,n,e){e.d(n,{Bw:()=>g,C:()=>o,Cc:()=>w,LI:()=>h,Om:()=>p,S8:()=>b,T9:()=>l,WQ:()=>a,Z0:()=>v,aI:()=>S,hG:()=>d,hZ:()=>i,hs:()=>m,jk:()=>f,m3:()=>y,t2:()=>A});var r=e(34304);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function i(t,n,e,r,o){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t}function a(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t}function u(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t}function s(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t[3]=n[3]*e[3],t}function c(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t[3]=n[3]/e[3],t}function f(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t[3]=Math.min(n[3],e[3]),t}function l(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t[3]=Math.max(n[3],e[3]),t}function h(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t[3]=Math.round(n[3]),t}function m(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t}function M(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],i=n[3]-t[3];return Math.sqrt(e*e+r*r+o*o+i*i)}function d(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],i=n[3]-t[3];return e*e+r*r+o*o+i*i}function g(t){const n=t[0],e=t[1],r=t[2],o=t[3];return Math.sqrt(n*n+e*e+r*r+o*o)}function y(t){const n=t[0],e=t[1],r=t[2],o=t[3];return n*n+e*e+r*r+o*o}function b(t,n){const e=n[0],r=n[1],o=n[2],i=n[3];let a=e*e+r*r+o*o+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=e*a,t[1]=r*a,t[2]=o*a,t[3]=i*a),t}function p(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function w(t,n,e,r){const o=n[0],i=n[1],a=n[2],u=n[3];return t[0]=o+r*(e[0]-o),t[1]=i+r*(e[1]-i),t[2]=a+r*(e[2]-a),t[3]=u+r*(e[3]-u),t}function v(t,n,e){const r=n[0],o=n[1],i=n[2],a=n[3];return t[0]=e[0]*r+e[4]*o+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*o+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*o+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*o+e[11]*i+e[15]*a,t}function A(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function S(t,n){const e=t[0],o=t[1],i=t[2],a=t[3],u=n[0],s=n[1],c=n[2],f=n[3],l=(0,r.FD)();return Math.abs(e-u)<=l*Math.max(1,Math.abs(e),Math.abs(u))&&Math.abs(o-s)<=l*Math.max(1,Math.abs(o),Math.abs(s))&&Math.abs(i-c)<=l*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(a-f)<=l*Math.max(1,Math.abs(a),Math.abs(f))}const _=u,x=s,I=c,N=M,U=d,E=g,T=y;Object.freeze(Object.defineProperty({__proto__:null,add:a,ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t[3]=Math.ceil(n[3]),t},copy:o,copyVec3:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},dist:N,distance:M,div:I,divide:c,dot:p,equals:S,exactEquals:A,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t[3]=Math.floor(n[3]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},len:E,length:g,lerp:w,max:l,min:f,mul:x,multiply:s,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},normalize:b,random:function(t,n=1){const e=r.Ov;let o,i,a,u,s,c;do{o=2*e()-1,i=2*e()-1,s=o*o+i*i}while(s>=1);do{a=2*e()-1,u=2*e()-1,c=a*a+u*u}while(c>=1);const f=Math.sqrt((1-s)/c);return t[0]=n*o,t[1]=n*i,t[2]=n*a*f,t[3]=n*u*f,t},round:h,scale:m,scaleAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t},set:i,sqrDist:U,sqrLen:T,squaredDistance:d,squaredLength:y,str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},sub:_,subtract:u,transformMat4:v,transformQuat:function(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],u=e[1],s=e[2],c=e[3],f=c*r+u*i-s*o,l=c*o+s*r-a*i,h=c*i+a*o-u*r,m=-a*r-u*o-s*i;return t[0]=f*c+m*-a+l*-s-h*-u,t[1]=l*c+m*-u+h*-a-f*-s,t[2]=h*c+m*-s+f*-u-l*-a,t[3]=n[3],t}},Symbol.toStringTag,{value:"Module"}))},34727(t,n,e){e.d(n,{$8:()=>_,Cc:()=>u,Hx:()=>g,Io:()=>A,KJ:()=>f,OS:()=>N,Sp:()=>m,XM:()=>l,YN:()=>h,ZH:()=>d,b6:()=>S,cU:()=>o,gg:()=>M,hs:()=>s,kU:()=>c,mP:()=>a,or:()=>I,pF:()=>E,pq:()=>U,qE:()=>i});const r=new Float32Array(1);function o(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function i(t,n,e){return Math.min(Math.max(t,n),e)}function a(t,n){return 0===n?0:Math.ceil(t/n)*n}function u(t,n,e){return t+(n-t)*e}function s(t,n,e,r,o){return u(r,o,(t-n)/(e-n))}function c(t){return t*Math.PI/180}function f(t){return 180*t/Math.PI}function l(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function m(t,n,e=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=e}function M(t,n,e=1e-6){return!m(t,n,e)&&t>n}function d(t,n,e=1e-6){return!m(t,n,e)&&t<n}function g(t,n,e=1e-6){return m(t,n,e)||t>n}const y=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function b(t){return y.setFloat64(0,t),y.getBigInt64(0)}const p=1000000n,w=v(1);function v(t){const n=b(t=Math.abs(t)),e=function(t){return y.setBigInt64(0,t),y.getFloat64(0)}(n<=p?p:n-p);return Math.abs(t-e)}function A(t,n,e=w){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;if(null!=e&&v(Math.min(Math.abs(t),Math.abs(n)))<e)return Math.abs(t-n)<=e;const r=b(t),o=b(n);return r<0==o<0&&!((r<o?o-r:r-o)>p)}function S(t,n,e=1e-6){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;const r=Math.abs(t-n),o=Math.abs(t),i=Math.abs(n);if(0===t||0===n||o<1e-12&&i<1e-12){if(r>.01*e)return!1}else if(r/(o+i)>e)return!1;return!0}function _(t){return x(Math.max(-U,Math.min(t,U)))}function x(t){return r[0]=t,r[0]}function I(t){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],e=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(m(n,1)&&m(e,1)&&m(r,1))}function N(t,n){return(t%n+n)%n}const U=x(34028234663852886e22);function E(t,n,e){if(void 0===e||0===+e)return Math[t](n);if(n=+n,e=+e,isNaN(n)||"number"!=typeof e||e%1!=0)return NaN;let r=n.toString().split("e");return r=(n=Math[t](+(r[0]+"e"+(r[1]?+r[1]-e:-e)))).toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+e:e))}},97146(t,n,e){e.d(n,{Dg:()=>i,lC:()=>u,my:()=>a,tM:()=>l,uW:()=>o});var r=e(34275);function o(t){return i(t,!0)}function i(t,n){if(Array.isArray(t)){if(t.length<r.y9)return t}else if(t.length<r.y9)return Array.from(t);let e=!0,o=!0;return t.some((t,n)=>(e=e&&0===t,o=o&&t===n,!e&&!o)),e?function(t){if(1===t)return c;if(t<r.y9)return new Array(t).fill(0);if(t>m.length){const n=Math.max(2*m.length,t);m=new Uint8Array(n)}return new Uint8Array(m.buffer,0,t)}(t.length):o?l(t.length):(0,r.iu)(t)&&t.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?t:function(t,n){for(const e of t){if(e>=65536)return(0,r.iu)(t)?t:new Uint32Array(t);e>=256&&(n=!1)}return n?new Uint8Array(t):new Uint16Array(t)}(t,!n)}function a(t,n=t){return t<=r.y9?new Array(t):n<=65536?new Uint16Array(t):new Uint32Array(t)}function u(t,n,e){if(0===n.length)return t.slice();if(0===t.length)return n.slice();const r=a(t.length+n.length,e);for(let n=0;n<t.length;++n)r[n]=t[n];for(let e=0;e<n.length;++e)r[t.length+e]=n[e];return r}let s=h(131072);const c=[0],f=(()=>{const t=new Uint16Array(65536);for(let n=0;n<t.length;++n)t[n]=n;return t})();function l(t){return 1===t?c:t<r.y9?Array.from(new Uint16Array(f.buffer,0,t)):t<f.length?new Uint16Array(f.buffer,0,t):(t>s.length&&(s=h(Math.max(2*s.length,t))),new Uint32Array(s.buffer,0,t))}function h(t){const n=new Uint32Array(t);for(let t=0;t<n.length;t++)n[t]=t;return n}let m=new Uint8Array(65536)},10614(t,n,e){e.d(n,{Tz:()=>a,aT:()=>i});var r=e(34727),o=e(35522);function i(t,n,e,r,o,i=2,a=0){const s=1/(Math.abs(e)+Math.abs(r)+Math.abs(o)),c=e*s,f=r*s,l=o<=0?(c>=0?1:-1)*(1-Math.abs(f)):c,h=o<=0?(f>=0?1:-1)*(1-Math.abs(c)):f,m=n*i+a;t[m]=u(l),t[m+1]=u(h)}function a(t,n,e,r=2,i=0){const a=e*r+i,u=s(n[a]),c=s(n[a+1]),f=1-Math.abs(u)-Math.abs(c);return t[2]=f,f<0?(t[0]=(u>=0?1:-1)*(1-Math.abs(c)),t[1]=(c>=0?1:-1)*(1-Math.abs(u))):(t[0]=u,t[1]=c),(0,o.S8)(t,t)}function u(t){return(0,r.qE)(Math.round(32767*t),-32767,32767)}function s(t){return(0,r.qE)(t/32767,-1,1)}e(51850)},52728(t,n,e){e.d(n,{m:()=>g});var r=e(63907);class o{constructor(t){this.internalFormat=t,this.channelByteStride=4,this.dataType=r.ld.UNSIGNED_INT,this.elementArrayConstructor=Uint32Array,this.pixelFormat=a[t],this.channels=i[this.pixelFormat],this.byteStride=this.channelByteStride*this.channels}}const i={36244:1,33320:2,36249:4},a={[r.H0.R32UI]:36244,[r.H0.RG32UI]:33320,[r.H0.RGBA32UI]:36249},u=[new o(r.H0.RGBA32UI),new o(r.H0.RG32UI),new o(r.H0.R32UI)];function s(t){let n=1/0,e=null;for(const r of u){const o=r.byteStride,i=(o-t%o)%o;i<n&&(n=i,e=r)}return e??u[2]}var c=e(20498),f=e(13030),l=e(90239);class h{constructor(t,n,e){this.elementCount=t,this.elementType=n,this.bufferViewConstructor=e,this.byteSize=function(t){return(0,l.GJ)(t.ElementType)*t.ElementCount}(e)}}const m={u8:new h(1,"uint",f.SL),vec4u8:new h(4,"uint",f.XP),unorm8:new h(1,"float",f.dy),vec4unorm8:new h(4,"float",f.td),snorm16:new h(1,"float",f.Qy),vec2snorm16:new h(2,"float",f.ES),f16:new h(1,"float",c.SX?f.XW:f.Y$),vec4f16:new h(4,"float",c.SX?f.jz:f.Eq),f32:new h(1,"float",f.Y$),vec2f32:new h(2,"float",f.gH),vec3f32:new h(3,"float",f.xs),vec4f32:new h(4,"float",f.Eq),mat3f32:new h(9,"float",f.jZ)};class M{constructor(t,n,e,r){this._declaration=t,this._byteOffset=n,this._creationInfo=r,this._startTexel=Math.floor(n/e);const o=r.byteSize;this._numTexels=Math.ceil((n+o)/e)-this._startTexel,this._texelByteStride=e}get name(){return this._declaration.name}get fieldType(){return this._declaration.type}get byteOffset(){return this._byteOffset}get startTexel(){return this._startTexel}get numTexels(){return this._numTexels}get texelByteStride(){return this._texelByteStride}get elementType(){return this._creationInfo.elementType}get elementCount(){return this._creationInfo.elementCount}get byteSize(){return this._creationInfo.byteSize}get bufferViewConstructor(){return this._creationInfo.bufferViewConstructor}}class d{constructor(t,n,e,r=0){this.layout=t,this.byteOffset=r,this._bufferViews=new Map,this.buffer="number"==typeof n?new ArrayBuffer(n*t.byteStride):n,this.texelElementBuffer=new e(this.buffer,r);const o=this._bufferViews;for(const[t,n]of this.layout.fields)o.set(t,new n.bufferViewConstructor(this.buffer,r+n.byteOffset,this.layout.byteStride))}get stride(){return this.layout.byteStride}get count(){return this.byteLength/this.stride}get byteLength(){return this.buffer.byteLength-this.byteOffset}getField(t,n){const e=this._bufferViews.get(t);return null!=e&&e.elementCount===n.ElementCount&&e.elementType===n.ElementType?e:null}get usedMemory(){return this.byteLength}}class g{constructor(t){this._fields=new Map;let n=0;const e=[];for(let r=0;r<t.length;++r){const o=t[r],{type:i}=o,a=m[i];e.push({declaration:o,byteOffset:n,creationInfo:a}),n+=a.byteSize}this.texelFormatInfo=s(n);const{texelByteStride:r}=this;n=Math.ceil(n/r)*r;const o=n,i=this._fields;for(const{declaration:t,byteOffset:n,creationInfo:o}of e)i.set(t.name,new M(t,n,r,o));this.byteStride=o,this.texelStride=Math.ceil(o/r)}get texelByteStride(){return this.texelFormatInfo.byteStride}get texelElementArrayConstructor(){return this.texelFormatInfo.elementArrayConstructor}get stride(){return this.byteStride}get fields(){return this._fields}createBuffer(t){return new d(this,t,this.texelElementArrayConstructor)}createView(t,n){return new d(this,t,this.texelElementArrayConstructor,n)}}},3055(t,n,e){e.d(n,{I$:()=>a,In:()=>f,gr:()=>c});var r=e(4431),o=e(1843),i=e(52728);const a=(0,o.BP)().vec3f("position").u16("componentIndex",{integer:!0}).freeze(),u=(0,o.BP)().vec2u8("sideness").freeze(),s=(0,r.U)(u),c=(0,o.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").u16("componentIndex",{integer:!0}).u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),f=(0,o.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").vec2i16("normal2Compressed").u16("componentIndex",{integer:!0}).u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),l=(0,r.U)(c,1),h=(0,r.U)(f,1);s.concat(l),s.concat(h),new i.m([{name:"color",type:"vec4unorm8"},{name:"lineWidth",type:"u8"},{name:"extensionLength",type:"u8"},{name:"materialType",type:"u8"},{name:"opacity",type:"unorm8"},{name:"elevationOffset",type:"f32"}])},93406(t,n,e){e.d(n,{K:()=>u});var r=e(34727),o=e(15142),i=e(35522),a=e(51850);function u(t,n,e){const r=t.vertices.position,o=t.vertices.componentIndex,a=M.position0,u=M.position1,f=M.faceNormal0,h=M.faceNormal1,{edges:m,normals:d}=c(t),g=m.length/4,y=n.allocate(g);let b=0;const p=g,A=e?.allocate(p);let _=0,x=0,I=0;l.length=0;for(let t=0;t<g;++t){const n=4*t;r.getVec(m.data[n],a),r.getVec(m.data[n+1],u);const e=l.pushNew();e.index=4*t,e.length=(0,i.Io)(a,u)}l.sort((t,n)=>n.length-t.length);const N=new Array,U=new Array;l.forAll(({length:t,index:c})=>{const l=m.data[c],g=m.data[c+1],p=m.data[c+2],E=m.data[c+3],T=-1===E;if(r.getVec(l,a),r.getVec(g,u),T){const t=3*p;(0,i.hZ)(f,d.data[t],d.data[t+1],d.data[t+2]),(0,i.C)(h,f),M.componentIndex=o.get(l),M.cosAngle=(0,i.Om)(f,h)}else{let t=3*p;if((0,i.hZ)(f,d.data[t],d.data[t+1],d.data[t+2]),t=3*E,(0,i.hZ)(h,d.data[t],d.data[t+1],d.data[t+2]),M.componentIndex=o.get(l),M.cosAngle=(0,i.Om)(f,h),function(t,n){return t.cosAngle>n}(M,v))return;M.cosAngle<-.9999&&(0,i.C)(h,f)}x+=t,I++,T||function(t,n){return t.cosAngle<n}(M,S)?(n.write(y,b++,M),N.push(t)):s(M,w)&&(A&&e&&e.write(A,_++,M),U.push(t))});const E=new Float32Array(N.reverse()),T=new Float32Array(U.reverse()),O=A&&e?{instancesData:A.slice(0,_),lodInfo:{lengths:T}}:void 0;return{regular:{instancesData:y.slice(0,b),lodInfo:{lengths:E}},silhouette:O,averageEdgeLength:x/I}}function s(t,n){const e=(0,r.XM)(t.cosAngle);return(0,i.oW)(g,t.position1,t.position0),e*((0,i.Om)((0,i.$A)(d,t.faceNormal0,t.faceNormal1),g)>0?-1:1)>n}function c(t){const n=t.faces.length/3,e=t.faces,r=t.neighbors,o=t.vertices.position;h.length=m.length=0;for(let t=0;t<n;t++){const n=3*t,a=r[n],u=r[n+1],s=r[n+2],c=e[n],f=e[n+1],l=e[n+2];o.getVec(c,y),o.getVec(f,b),o.getVec(l,p),(0,i.Re)(b,b,y),(0,i.Re)(p,p,y),(0,i.$A)(y,b,p),(0,i.S8)(y,y),m.pushArray(y),(-1===a||c<f)&&(h.push(c),h.push(f),h.push(t),h.push(a)),(-1===u||f<l)&&(h.push(f),h.push(l),h.push(t),h.push(u)),(-1===s||l<c)&&(h.push(l),h.push(c),h.push(t),h.push(s))}return{edges:h,normals:m}}class f{constructor(){this.index=0,this.length=0}}const l=new o.A({allocator:t=>t||new f,deallocator:null}),h=new o.A({deallocator:null}),m=new o.A({deallocator:null}),M=new class{constructor(){this.position0=(0,a.vt)(),this.position1=(0,a.vt)(),this.faceNormal0=(0,a.vt)(),this.faceNormal1=(0,a.vt)(),this.componentIndex=0,this.cosAngle=0}},d=(0,a.vt)(),g=(0,a.vt)(),y=(0,a.vt)(),b=(0,a.vt)(),p=(0,a.vt)(),w=(0,r.kU)(4),v=Math.cos(w),A=(0,r.kU)(35),S=Math.cos(A)},44801(t,n,e){e.d(n,{o6:()=>N,HY:()=>C,hx:()=>U,Jb:()=>q});var r=e(34727),o=e(97146);function i(t,n,e){const i=Array.isArray(t),f=i?t.length/n:t.byteLength/(4*n),l=i?t:new Uint32Array(t,0,f*n),h=e?.minReduction??0,m=e?.originalIndices||null,M=m?m.length:0,d=e?.componentOffsets||null;let g=0;if(d)for(let t=0;t<d.length-1;t++){const n=d[t+1]-d[t];n>g&&(g=n)}else g=f;const y=Math.floor(1.1*g)+1;(null==c||c.length<2*y)&&(c=new Uint32Array((0,r.cU)(2*y)));for(let t=0;t<2*y;t++)c[t]=0;let b=0;const p=!!d&&!!m,w=p?M:f;let v=(0,o.my)(f);const A=new Uint32Array(M),S=1.96;let _=0!==h?Math.ceil(4*S*S/(h*h)*h*(1-h)):w,x=1,I=d?d[1]:w;for(let t=0;t<w;t++){if(t===_){const n=1-b/t;if(n+S*Math.sqrt(n*(1-n)/t)<h)return null;_*=2}if(t===I){for(let t=0;t<2*y;t++)c[t]=0;if(m)for(let t=d[x-1];t<d[x];t++)A[t]=v[m[t]];I=d[++x]}const e=p?m[t]:t,r=e*n,o=s(l,r,n);let i=o%y,u=b;for(;0!==c[2*i+1];){if(c[2*i]===o){const t=c[2*i+1]-1;if(a(l,r,t*n,n)){u=v[t];break}}i++,i>=y&&(i-=y)}u===b&&(c[2*i]=o,c[2*i+1]=e+1,b++),v[e]=u}if(0!==h&&1-b/f<h)return null;if(p){for(let t=d[x-1];t<A.length;t++)A[t]=v[m[t]];v=(0,o.uW)(A)}const N=i?new Array(b):new Uint32Array(b*n);b=0;for(let t=0;t<w;t++)v[t]===b&&(u(l,(p?m[t]:t)*n,N,b*n,n),b++);if(m&&!p){const t=new Uint32Array(M);for(let n=0;n<t.length;n++)t[n]=v[m[n]];v=(0,o.uW)(t)}return{buffer:Array.isArray(N)?N:N.buffer,indices:v,uniqueCount:b}}function a(t,n,e,r){for(let o=0;o<r;o++)if(t[n+o]!==t[e+o])return!1;return!0}function u(t,n,e,r,o){for(let i=0;i<o;i++)e[r+i]=t[n+i]}function s(t,n,e){let r=0;for(let o=0;o<e;o++)r=t[n+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let c=null;function f(t,n,e){const r=n/3,o=new Uint32Array(e+1),i=new Uint32Array(e+1),a=(t,n)=>{t<n?o[t+1]++:i[n+1]++};for(let n=0;n<r;n++){const e=t[3*n],r=t[3*n+1],o=t[3*n+2];a(e,r),a(r,o),a(o,e)}let u=0,s=0;for(let t=0;t<e;t++){const n=o[t+1],e=i[t+1];o[t+1]=u,i[t+1]=s,u+=n,s+=e}const c=new Uint32Array(6*r),f=o[e],l=(t,n,e)=>{if(t<n){const r=o[t+1]++;c[2*r]=n,c[2*r+1]=e}else{const r=i[n+1]++;c[2*f+2*r]=t,c[2*f+2*r+1]=e}};for(let n=0;n<r;n++){const e=t[3*n],r=t[3*n+1],o=t[3*n+2];l(e,r,n),l(r,o,n),l(o,e,n)}const h=(t,n)=>{const e=2*t,r=n-t;for(let t=1;t<r;t++){const n=c[e+2*t],r=c[e+2*t+1];let o=t-1;for(;o>=0&&c[e+2*o]>n;o--)c[e+2*o+2]=c[e+2*o],c[e+2*o+3]=c[e+2*o+1];c[e+2*o+2]=n,c[e+2*o+3]=r}};for(let t=0;t<e;t++)h(o[t],o[t+1]),h(f+i[t],f+i[t+1]);const m=new Int32Array(3*r),M=(n,e)=>n===t[3*e]?0:n===t[3*e+1]?1:n===t[3*e+2]?2:-1,d=(t,n)=>{const e=M(t,n);m[3*n+e]=-1},g=(t,n,e,r)=>{const o=M(t,n);m[3*n+o]=r;const i=M(e,r);m[3*r+i]=n};for(let t=0;t<e;t++){let n=o[t];const e=o[t+1];let r=i[t];const a=i[t+1];for(;n<e&&r<a;){const e=c[2*n],o=c[2*f+2*r];e===o?(g(t,c[2*n+1],o,c[2*f+2*r+1]),n++,r++):e<o?(d(t,c[2*n+1]),n++):(d(o,c[2*f+2*r+1]),r++)}for(;n<e;)d(t,c[2*n+1]),n++;for(;r<a;)d(c[2*f+2*r],c[2*f+2*r+1]),r++}return m}var l=e(1843),h=e(3055),m=e(87811),M=e(35522),d=e(51850),g=e(10614);class y{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:v}write(t,n,e){x.seed=this._edgeHashFunction(e);const r=x.getIntRange(0,255),o=x.getIntRange(0,this.settings.variants-1),i=x.getFloat(),a=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1),t.componentIndex.set(n,e.componentIndex),t.variantOffset.set(n,r),t.variantStroke.set(n,o),t.variantExtension.set(n,a)}}const b=new Float32Array(6),p=new Uint32Array(b.buffer),w=new Uint32Array(1);function v(t){return b[0]=t.position0[0],b[1]=t.position0[1],b[2]=t.position0[2],b[3]=t.position1[0],b[4]=t.position1[1],b[5]=t.position1[2],w[0]=31*(31*(31*(31*(31*(166811+p[0])+p[1])+p[2])+p[3])+p[4])+p[5],w[0]}function A(t){const n=b;n[0]=S(t.position0[0]),n[1]=S(t.position0[1]),n[2]=S(t.position0[2]),n[3]=S(t.position1[0]),n[4]=S(t.position1[1]),n[5]=S(t.position1[2]),w[0]=5381;for(let t=0;t<p.length;t++)w[0]=31*w[0]+p[t];return w[0]}function S(t){return Math.round(1e4*t)/1e4}const _=(0,d.vt)(),x=new m.A;var I=e(93406);function N(t){const n=U(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return T.updateSettings(t.writerSettings),O.updateSettings(t.writerSettings),(0,I.K)(n,T,O)}function U(t,n,e,r){if(n){const n=f(e,r,t.count);return new E(e,r,n,t)}const o=i(t.buffer,t.stride/4,{originalIndices:e}),a=f(o.indices,r,o.uniqueCount);return{faces:o.indices,facesLength:o.indices.length,neighbors:a,vertices:h.I$.createView(o.buffer)}}class E{constructor(t,n,e,r){this.faces=t,this.facesLength=n,this.neighbors=e,this.vertices=r}}const T=new class{constructor(){this._commonWriter=new y}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return h.gr.createBuffer(t)}write(t,n,e){this._commonWriter.write(t,n,e),(0,M.WQ)(_,e.faceNormal0,e.faceNormal1),(0,M.S8)(_,_);const{typedBuffer:r,typedBufferStride:o}=t.normalCompressed;(0,g.aT)(r,n,_[0],_[1],_[2],o)}},O=new class{constructor(){this._commonWriter=new y}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return h.In.createBuffer(t)}write(t,n,e){this._commonWriter.write(t,n,e);{const{typedBuffer:r,typedBufferStride:o}=t.normalCompressed;(0,g.aT)(r,n,e.faceNormal0[0],e.faceNormal0[1],e.faceNormal0[2],o)}{const{typedBuffer:r,typedBufferStride:o}=t.normal2Compressed;(0,g.aT)(r,n,e.faceNormal1[0],e.faceNormal1[1],e.faceNormal1[2],o)}}},q=(0,l.BP)().vec3f("position0").vec3f("position1"),C=(0,l.BP)().vec3f("position0").vec3f("position1").u16("componentIndex",{integer:!0})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4066],{29242(t,n,e){function r(){return[1,0,0,0,1,0,0,0,1]}function o(t,n,e,r,o,a,i,u,s){return[t,n,e,r,o,a,i,u,s]}e.d(n,{fA:()=>o,vt:()=>r,zK:()=>a});const a=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,fromValues:o},Symbol.toStringTag,{value:"Module"}))},82534(t,n,e){function r(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}e.d(n,{o8:()=>o,vt:()=>r,zK:()=>a});const a=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:o,create:r,fromValues:function(t,n,e,r){return[t,n,e,r]}},Symbol.toStringTag,{value:"Module"}))},48163(t,n,e){function r(){return[0,0]}function o(t){return[t[0],t[1]]}function a(t,n){return[t,n]}function i(){return a(1,1)}function u(){return a(-1,-1)}function s(){return a(1,0)}function c(){return a(0,1)}e.d(n,{IA:()=>l,Un:()=>f,fA:()=>a,o8:()=>o,vt:()=>r});const f=i(),l=u(),h=s(),M=c();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:l,ONES:f,UNIT_X:h,UNIT_Y:M,ZEROS:[0,0],clone:o,create:r,freeze:function(t,n){return[t,n]},fromArray:function(t,n=[0,0]){const e=Math.min(2,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:a,negativeOnes:u,ones:i,unitX:s,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},51850(t,n,e){function r(){return[0,0,0]}function o(t){return[t[0],t[1],t[2]]}function a(t,n,e){return[t,n,e]}function i(t,n,e){return[t,n,e]}function u(t,n=[0,0,0]){const e=Math.min(3,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n}function s(){return[0,0,0]}function c(){return a(1,1,1)}function f(){return a(1,0,0)}function l(){return a(0,1,0)}function h(){return a(0,0,1)}e.d(n,{CN:()=>i,Cb:()=>p,Cw:()=>d,JP:()=>b,S:()=>c,Ul:()=>s,Un:()=>m,ci:()=>u,fA:()=>a,o8:()=>o,uY:()=>M,vt:()=>r});const M=[0,0,0],m=c(),d=f(),b=l(),p=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:m,UNIT_X:d,UNIT_Y:b,UNIT_Z:p,ZEROS:M,clone:o,create:r,freeze:i,fromArray:u,fromValues:a,ones:c,unitX:f,unitY:l,unitZ:h,zeros:s},Symbol.toStringTag,{value:"Module"}))},91829(t,n,e){function r(){return[0,0,0,0]}function o(t,n,e,r){return[t,n,e,r]}function a(t,n,e,r){return[t,n,e,r]}function i(){return o(1,1,1,1)}function u(){return o(1,0,0,0)}function s(){return o(0,1,0,0)}function c(){return o(0,0,1,0)}function f(){return o(0,0,0,1)}e.d(n,{CN:()=>a,Un:()=>h,_Y:()=>f,fA:()=>o,uY:()=>l,vt:()=>r});const l=[0,0,0,0],h=i(),M=u(),m=s(),d=c(),b=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:b,UNIT_X:M,UNIT_Y:m,UNIT_Z:d,ZEROS:l,clone:function(t){return[t[0],t[1],t[2],t[3]]},create:r,freeze:a,fromArray:function(t,n=[0,0,0,0]){const e=Math.min(4,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:o,ones:i,unitW:f,unitX:u,unitY:s,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},34304(t,n,e){e.d(n,{DF:()=>s,FD:()=>o,Ov:()=>a,ct:()=>c});let r=1e-6;function o(){return r}const a=Math.random,i=Math.PI/180,u=180/Math.PI;function s(t){return t*i}function c(t){return t*u}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:a,equals:function(t,n){return Math.abs(t-n)<=r*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:o,setEpsilon:function(t){r=t},toDegree:c,toRadian:s},Symbol.toStringTag,{value:"Module"}))},77690(t,n,e){e.d(n,{B8:()=>u,Ge:()=>M,I0:()=>h,KC:()=>s,a4:()=>c,hZ:()=>a,hs:()=>l,lw:()=>f,mg:()=>i,z0:()=>o});var r=e(34304);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function a(t,n,e,r,o,a,i,u,s,c){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t[4]=a,t[5]=i,t[6]=u,t[7]=s,t[8]=c,t}function i(t,n){if(t===n){const e=n[1],r=n[2],o=n[5];t[1]=n[3],t[2]=n[6],t[3]=e,t[5]=n[7],t[6]=r,t[7]=o}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function u(t,n){const e=n[0],r=n[1],o=n[2],a=n[3],i=n[4],u=n[5],s=n[6],c=n[7],f=n[8],l=f*i-u*c,h=-f*a+u*s,M=c*a-i*s;let m=e*l+r*h+o*M;return m?(m=1/m,t[0]=l*m,t[1]=(-f*r+o*c)*m,t[2]=(u*r-o*i)*m,t[3]=h*m,t[4]=(f*e-o*s)*m,t[5]=(-u*e+o*a)*m,t[6]=M*m,t[7]=(-c*e+r*s)*m,t[8]=(i*e-r*a)*m,t):null}function s(t,n){const e=n[0],r=n[1],o=n[2],a=n[3],i=n[4],u=n[5],s=n[6],c=n[7],f=n[8];return t[0]=i*f-u*c,t[1]=o*c-r*f,t[2]=r*u-o*i,t[3]=u*s-a*f,t[4]=e*f-o*s,t[5]=o*a-e*u,t[6]=a*c-i*s,t[7]=r*s-e*c,t[8]=e*i-r*a,t}function c(t){const n=t[0],e=t[1],r=t[2],o=t[3],a=t[4],i=t[5],u=t[6],s=t[7],c=t[8];return n*(c*a-i*s)+e*(-c*o+i*u)+r*(s*o-a*u)}function f(t,n,e){const r=n[0],o=n[1],a=n[2],i=n[3],u=n[4],s=n[5],c=n[6],f=n[7],l=n[8],h=e[0],M=e[1],m=e[2],d=e[3],b=e[4],p=e[5],v=e[6],y=e[7],x=e[8];return t[0]=h*r+M*i+m*c,t[1]=h*o+M*u+m*f,t[2]=h*a+M*s+m*l,t[3]=d*r+b*i+p*c,t[4]=d*o+b*u+p*f,t[5]=d*a+b*s+p*l,t[6]=v*r+y*i+x*c,t[7]=v*o+y*u+x*f,t[8]=v*a+y*s+x*l,t}function l(t,n,e){const r=e[0],o=e[1],a=e[2];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t[6]=a*n[6],t[7]=a*n[7],t[8]=a*n[8],t}function h(t,n){const e=n[0],r=n[1],o=n[2],a=n[3],i=e+e,u=r+r,s=o+o,c=e*i,f=r*i,l=r*u,h=o*i,M=o*u,m=o*s,d=a*i,b=a*u,p=a*s;return t[0]=1-l-m,t[3]=f-p,t[6]=h+b,t[1]=f+p,t[4]=1-c-m,t[7]=M-d,t[2]=h-b,t[5]=M+d,t[8]=1-c-l,t}function M(t,n){const e=n[0],r=n[1],o=n[2],a=n[3],i=n[4],u=n[5],s=n[6],c=n[7],f=n[8],l=n[9],h=n[10],M=n[11],m=n[12],d=n[13],b=n[14],p=n[15],v=e*u-r*i,y=e*s-o*i,x=e*c-a*i,g=r*s-o*u,E=r*c-a*u,w=o*c-a*s,A=f*d-l*m,S=f*b-h*m,N=f*p-M*m,O=l*b-h*d,_=l*p-M*d,q=h*p-M*b;let I=v*q-y*_+x*O+g*N-E*S+w*A;return I?(I=1/I,t[0]=(u*q-s*_+c*O)*I,t[1]=(s*N-i*q-c*S)*I,t[2]=(i*_-u*N+c*A)*I,t[3]=(o*_-r*q-a*O)*I,t[4]=(e*q-o*N+a*S)*I,t[5]=(r*N-e*_-a*A)*I,t[6]=(d*w-b*E+p*g)*I,t[7]=(b*x-m*w-p*y)*I,t[8]=(m*E-d*x+p*v)*I,t):null}function m(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t}const d=f,b=m;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t},adjoint:s,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:c,equals:function(t,n){const e=t[0],o=t[1],a=t[2],i=t[3],u=t[4],s=t[5],c=t[6],f=t[7],l=t[8],h=n[0],M=n[1],m=n[2],d=n[3],b=n[4],p=n[5],v=n[6],y=n[7],x=n[8],g=(0,r.FD)();return Math.abs(e-h)<=g*Math.max(1,Math.abs(e),Math.abs(h))&&Math.abs(o-M)<=g*Math.max(1,Math.abs(o),Math.abs(M))&&Math.abs(a-m)<=g*Math.max(1,Math.abs(a),Math.abs(m))&&Math.abs(i-d)<=g*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(u-b)<=g*Math.max(1,Math.abs(u),Math.abs(b))&&Math.abs(s-p)<=g*Math.max(1,Math.abs(s),Math.abs(p))&&Math.abs(c-v)<=g*Math.max(1,Math.abs(c),Math.abs(v))&&Math.abs(f-y)<=g*Math.max(1,Math.abs(f),Math.abs(y))&&Math.abs(l-x)<=g*Math.max(1,Math.abs(l),Math.abs(x))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:o,fromQuat:h,fromRotation:function(t,n){const e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=-e,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:u,isOrthoNormal:function(t){const n=(0,r.FD)(),e=t[0],o=t[1],a=t[2],i=t[3],u=t[4],s=t[5],c=t[6],f=t[7],l=t[8];return Math.abs(1-(e*e+i*i+c*c))<=n&&Math.abs(1-(o*o+u*u+f*f))<=n&&Math.abs(1-(a*a+s*s+l*l))<=n},mul:d,multiply:f,multiplyScalar:function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t},multiplyScalarAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t},normalFromMat4:M,normalFromMat4Legacy:function(t,n){const e=n[0],r=n[1],o=n[2],a=n[4],i=n[5],u=n[6],s=n[8],c=n[9],f=n[10],l=f*i-u*c,h=-f*a+u*s,M=c*a-i*s,m=e*l+r*h+o*M;if(!m)return null;const d=1/m;return t[0]=l*d,t[1]=(-f*r+o*c)*d,t[2]=(u*r-o*i)*d,t[3]=h*d,t[4]=(f*e-o*s)*d,t[5]=(-u*e+o*a)*d,t[6]=M*d,t[7]=(-c*e+r*s)*d,t[8]=(i*e-r*a)*d,t},projection:function(t,n,e){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/e,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,e){const r=n[0],o=n[1],a=n[2],i=n[3],u=n[4],s=n[5],c=n[6],f=n[7],l=n[8],h=Math.sin(e),M=Math.cos(e);return t[0]=M*r+h*i,t[1]=M*o+h*u,t[2]=M*a+h*s,t[3]=M*i-h*r,t[4]=M*u-h*o,t[5]=M*s-h*a,t[6]=c,t[7]=f,t[8]=l,t},scale:l,scaleByVec2:function(t,n,e){const r=e[0],o=e[1];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t},set:a,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:b,subtract:m,translate:function(t,n,e){const r=n[0],o=n[1],a=n[2],i=n[3],u=n[4],s=n[5],c=n[6],f=n[7],l=n[8],h=e[0],M=e[1];return t[0]=r,t[1]=o,t[2]=a,t[3]=i,t[4]=u,t[5]=s,t[6]=h*r+M*i+c,t[7]=h*o+M*u+f,t[8]=h*a+M*s+l,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},37585(t,n,e){e.d(n,{C:()=>a,Cc:()=>E,Il:()=>O,Io:()=>d,LI:()=>M,Om:()=>g,Re:()=>s,S8:()=>x,T9:()=>l,WQ:()=>u,aI:()=>N,e$:()=>A,hG:()=>b,hZ:()=>i,hs:()=>m,jb:()=>_,l0:()=>w,qE:()=>h,t2:()=>S,xg:()=>C,ze:()=>y});var r=e(34727),o=e(34304);function a(t,n){return t[0]=n[0],t[1]=n[1],t}function i(t,n,e){return t[0]=n,t[1]=e,t}function u(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t}function s(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t}function c(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t}function f(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t}function l(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t}function h(t,n,e,o){return t[0]=(0,r.qE)(n[0],e[0],o[0]),t[1]=(0,r.qE)(n[1],e[1],o[1]),t}function M(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t}function m(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t}function d(t,n){const e=n[0]-t[0],r=n[1]-t[1];return Math.sqrt(e*e+r*r)}function b(t,n){const e=n[0]-t[0],r=n[1]-t[1];return e*e+r*r}function p(t){const n=t[0],e=t[1];return Math.sqrt(n*n+e*e)}function v(t){const n=t[0],e=t[1];return n*n+e*e}function y(t,n){return t[0]=-n[0],t[1]=-n[1],t}function x(t,n){const e=n[0],r=n[1];let o=e*e+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=n[0]*o,t[1]=n[1]*o),t}function g(t,n){return t[0]*n[0]+t[1]*n[1]}function E(t,n,e,r){const o=n[0],a=n[1];return t[0]=o+r*(e[0]-o),t[1]=a+r*(e[1]-a),t}function w(t,n,e){const r=n[0],o=n[1];return t[0]=e[0]*r+e[2]*o+e[4],t[1]=e[1]*r+e[3]*o+e[5],t}function A(t,n,e,r){const o=n[0]-e[0],a=n[1]-e[1],i=Math.sin(r),u=Math.cos(r);return t[0]=o*u-a*i+e[0],t[1]=o*i+a*u+e[1],t}function S(t,n){return t[0]===n[0]&&t[1]===n[1]}function N(t,n){const e=t[0],r=t[1],a=n[0],i=n[1],u=(0,o.FD)();return Math.abs(e-a)<=u*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(r-i)<=u*Math.max(1,Math.abs(r),Math.abs(i))}const O=p,_=s,q=c,I=f,C=d,T=b,V=v;Object.freeze(Object.defineProperty({__proto__:null,add:u,angle:function(t,n){const e=t[0],r=t[1],o=n[0],a=n[1];let i=e*e+r*r;i>0&&(i=1/Math.sqrt(i));let u=o*o+a*a;u>0&&(u=1/Math.sqrt(u));const s=(e*o+r*a)*i*u;return s>1?0:s<-1?Math.PI:Math.acos(s)},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t},clamp:h,copy:a,cross:function(t,n,e){const r=n[0]*e[1]-n[1]*e[0];return t[0]=t[1]=0,t[2]=r,t},dist:C,distance:d,div:I,divide:f,dot:g,equals:N,exactEquals:S,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t},len:O,length:p,lerp:E,max:l,min:function(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t},mul:q,multiply:c,negate:y,normalize:x,projectAndScale:function(t,n,e,r,o){let a=n[0]-e[0],i=n[1]-e[1];const u=(r[0]*a+r[1]*i)*(o-1);return a=r[0]*u,i=r[1]*u,t[0]=n[0]+a,t[1]=n[1]+i,t},random:function(t,n=1){const e=2*(0,o.Ov)()*Math.PI;return t[0]=Math.cos(e)*n,t[1]=Math.sin(e)*n,t},rotate:A,round:M,scale:m,scaleAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t},set:i,sqrDist:T,sqrLen:V,squaredDistance:b,squaredLength:v,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:_,subtract:s,transformMat2:function(t,n,e){const r=n[0],o=n[1];return t[0]=e[0]*r+e[2]*o,t[1]=e[1]*r+e[3]*o,t},transformMat2d:w,transformMat3:function(t,n,e){const r=n[0],o=n[1];return t[0]=e[0]*r+e[3]*o+e[6],t[1]=e[1]*r+e[4]*o+e[7],t},transformMat4:function(t,n,e){const r=n[0],o=n[1];return t[0]=e[0]*r+e[4]*o+e[12],t[1]=e[1]*r+e[5]*o+e[13],t}},Symbol.toStringTag,{value:"Module"}))},35522(t,n,e){e.d(n,{$A:()=>S,Bw:()=>a,C:()=>i,Cc:()=>N,DI:()=>E,Il:()=>L,Io:()=>v,Ln:()=>p,Om:()=>A,Qr:()=>l,Re:()=>c,S8:()=>w,T9:()=>d,WQ:()=>s,Z0:()=>O,_S:()=>M,aI:()=>U,ei:()=>_,fw:()=>I,g7:()=>C,gL:()=>q,hG:()=>y,hZ:()=>u,hs:()=>b,jb:()=>F,jk:()=>m,lo:()=>P,lw:()=>f,m3:()=>x,oW:()=>D,t2:()=>z,tn:()=>h,uE:()=>Y,xg:()=>j,ze:()=>g});var r=e(51850),o=e(34304);function a(t){const n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function i(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function u(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function s(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function c(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function f(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function l(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function h(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function M(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function m(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function d(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function b(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function p(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function v(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(e*e+r*r+o*o)}function y(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return e*e+r*r+o*o}function x(t){const n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function g(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function E(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function w(t,n){const e=n[0],r=n[1],o=n[2];let a=e*e+r*r+o*o;return a>0&&(a=1/Math.sqrt(a),t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a),t}function A(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function S(t,n,e){const r=n[0],o=n[1],a=n[2],i=e[0],u=e[1],s=e[2];return t[0]=o*s-a*u,t[1]=a*i-r*s,t[2]=r*u-o*i,t}function N(t,n,e,r){const o=n[0],a=n[1],i=n[2];return t[0]=o+r*(e[0]-o),t[1]=a+r*(e[1]-a),t[2]=i+r*(e[2]-i),t}function O(t,n,e){const r=n[0],o=n[1],a=n[2];return t[0]=e[0]*r+e[4]*o+e[8]*a+e[12],t[1]=e[1]*r+e[5]*o+e[9]*a+e[13],t[2]=e[2]*r+e[6]*o+e[10]*a+e[14],t}function _(t,n,e){const r=n[0],o=n[1],a=n[2];return t[0]=r*e[0]+o*e[3]+a*e[6],t[1]=r*e[1]+o*e[4]+a*e[7],t[2]=r*e[2]+o*e[5]+a*e[8],t}function q(t,n,e){return I(t,n,e[0],e[1],e[2],e[3])}function I(t,n,e,r,o,a){const i=n[0],u=n[1],s=n[2],c=r*s-o*u,f=o*i-e*s,l=e*u-r*i,h=r*l-o*f,M=o*c-e*l,m=e*f-r*c,d=2*a;return t[0]=i+c*d+2*h,t[1]=u+f*d+2*M,t[2]=s+l*d+2*m,t}function C(t,n){w(T,t),w(V,n);const e=A(T,V);return e>1?0:e<-1?Math.PI:Math.acos(e)}const T=(0,r.vt)(),V=(0,r.vt)();function z(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function U(t,n){if(t===n)return!0;const e=t[0],r=t[1],a=t[2],i=n[0],u=n[1],s=n[2],c=(0,o.FD)();return Math.abs(e-i)<=c*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(r-u)<=c*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(a-s)<=c*Math.max(1,Math.abs(a),Math.abs(s))}function D(t,n,e){const r=e[0]-n[0],o=e[1]-n[1],a=e[2]-n[2];let i=r*r+o*o+a*a;return i>0?(i=1/Math.sqrt(i),t[0]=r*i,t[1]=o*i,t[2]=a*i,t):(t[0]=0,t[1]=0,t[2]=0,t)}const F=c,R=f,B=l,j=v,P=y,L=a,Y=x;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:s,angle:C,bezier:function(t,n,e,r,o,a){const i=1-a,u=i*i,s=a*a,c=u*i,f=3*a*u,l=3*s*i,h=s*a;return t[0]=n[0]*c+e[0]*f+r[0]*l+o[0]*h,t[1]=n[1]*c+e[1]*f+r[1]*l+o[1]*h,t[2]=n[2]*c+e[2]*f+r[2]*l+o[2]*h,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},clamp:function(t,n=0,e=1){return t[0]=Math.min(Math.max(t[0],n),e),t[1]=Math.min(Math.max(t[1],n),e),t[2]=Math.min(Math.max(t[2],n),e),t},copy:i,cross:S,crossAndNormalize:function(t,n,e){const r=n[0],o=n[1],a=n[2],i=e[0],u=e[1],s=e[2],c=o*s-a*u,f=a*i-r*s,l=r*u-o*i,h=Math.sqrt(c*c+f*f+l*l);return t[0]=c/h,t[1]=f/h,t[2]=l/h,t},direction:D,dist:j,distance:v,div:B,divide:l,dot:A,equals:U,exactEquals:z,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,e,r,o,a){const i=a*a,u=i*(2*a-3)+1,s=i*(a-2)+a,c=i*(a-1),f=i*(3-2*a);return t[0]=n[0]*u+e[0]*s+r[0]*c+o[0]*f,t[1]=n[1]*u+e[1]*s+r[1]*c+o[1]*f,t[2]=n[2]*u+e[2]*s+r[2]*c+o[2]*f,t},inverse:E,len:L,length:a,lerp:N,max:d,min:m,mul:R,multiply:f,negate:g,normalize:w,random:function(t,n=1){const e=o.Ov,r=2*e()*Math.PI,a=2*e()-1,i=Math.sqrt(1-a*a)*n;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=a*n,t},rotateX:function(t,n,e,r){const o=[],a=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],a[0]=o[0],a[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),a[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},rotateY:function(t,n,e,r){const o=[],a=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],a[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),a[1]=o[1],a[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},rotateZ:function(t,n,e,r){const o=[],a=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],a[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),a[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),a[2]=o[2],t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:b,scaleAndAdd:p,set:u,sign:M,sqrDist:P,sqrLen:Y,squaredDistance:y,squaredLength:x,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:F,subtract:c,transformMat3:_,transformMat4:O,transformQuat:q,transformQuatValues:I},Symbol.toStringTag,{value:"Module"}))},78955(t,n,e){e.d(n,{Bw:()=>b,C:()=>o,Cc:()=>x,LI:()=>h,Om:()=>y,S8:()=>v,T9:()=>l,WQ:()=>i,Z0:()=>g,aI:()=>w,hG:()=>d,hZ:()=>a,hs:()=>M,jk:()=>f,m3:()=>p,t2:()=>E});var r=e(34304);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function a(t,n,e,r,o){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t}function i(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t}function u(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t}function s(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t[3]=n[3]*e[3],t}function c(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t[3]=n[3]/e[3],t}function f(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t[3]=Math.min(n[3],e[3]),t}function l(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t[3]=Math.max(n[3],e[3]),t}function h(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t[3]=Math.round(n[3]),t}function M(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t}function m(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],a=n[3]-t[3];return Math.sqrt(e*e+r*r+o*o+a*a)}function d(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],a=n[3]-t[3];return e*e+r*r+o*o+a*a}function b(t){const n=t[0],e=t[1],r=t[2],o=t[3];return Math.sqrt(n*n+e*e+r*r+o*o)}function p(t){const n=t[0],e=t[1],r=t[2],o=t[3];return n*n+e*e+r*r+o*o}function v(t,n){const e=n[0],r=n[1],o=n[2],a=n[3];let i=e*e+r*r+o*o+a*a;return i>0&&(i=1/Math.sqrt(i),t[0]=e*i,t[1]=r*i,t[2]=o*i,t[3]=a*i),t}function y(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function x(t,n,e,r){const o=n[0],a=n[1],i=n[2],u=n[3];return t[0]=o+r*(e[0]-o),t[1]=a+r*(e[1]-a),t[2]=i+r*(e[2]-i),t[3]=u+r*(e[3]-u),t}function g(t,n,e){const r=n[0],o=n[1],a=n[2],i=n[3];return t[0]=e[0]*r+e[4]*o+e[8]*a+e[12]*i,t[1]=e[1]*r+e[5]*o+e[9]*a+e[13]*i,t[2]=e[2]*r+e[6]*o+e[10]*a+e[14]*i,t[3]=e[3]*r+e[7]*o+e[11]*a+e[15]*i,t}function E(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function w(t,n){const e=t[0],o=t[1],a=t[2],i=t[3],u=n[0],s=n[1],c=n[2],f=n[3],l=(0,r.FD)();return Math.abs(e-u)<=l*Math.max(1,Math.abs(e),Math.abs(u))&&Math.abs(o-s)<=l*Math.max(1,Math.abs(o),Math.abs(s))&&Math.abs(a-c)<=l*Math.max(1,Math.abs(a),Math.abs(c))&&Math.abs(i-f)<=l*Math.max(1,Math.abs(i),Math.abs(f))}const A=u,S=s,N=c,O=m,_=d,q=b,I=p;Object.freeze(Object.defineProperty({__proto__:null,add:i,ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t[3]=Math.ceil(n[3]),t},copy:o,copyVec3:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},dist:O,distance:m,div:N,divide:c,dot:y,equals:w,exactEquals:E,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t[3]=Math.floor(n[3]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},len:q,length:b,lerp:x,max:l,min:f,mul:S,multiply:s,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},normalize:v,random:function(t,n=1){const e=r.Ov;let o,a,i,u,s,c;do{o=2*e()-1,a=2*e()-1,s=o*o+a*a}while(s>=1);do{i=2*e()-1,u=2*e()-1,c=i*i+u*u}while(c>=1);const f=Math.sqrt((1-s)/c);return t[0]=n*o,t[1]=n*a,t[2]=n*i*f,t[3]=n*u*f,t},round:h,scale:M,scaleAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t},set:a,sqrDist:_,sqrLen:I,squaredDistance:d,squaredLength:p,str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},sub:A,subtract:u,transformMat4:g,transformQuat:function(t,n,e){const r=n[0],o=n[1],a=n[2],i=e[0],u=e[1],s=e[2],c=e[3],f=c*r+u*a-s*o,l=c*o+s*r-i*a,h=c*a+i*o-u*r,M=-i*r-u*o-s*a;return t[0]=f*c+M*-i+l*-s-h*-u,t[1]=l*c+M*-u+h*-i-f*-s,t[2]=h*c+M*-s+f*-u-l*-i,t[3]=n[3],t}},Symbol.toStringTag,{value:"Module"}))},34727(t,n,e){e.d(n,{$8:()=>A,Cc:()=>u,Hx:()=>b,Io:()=>E,KJ:()=>f,OS:()=>O,Sp:()=>M,XM:()=>l,YN:()=>h,ZH:()=>d,b6:()=>w,cU:()=>o,gg:()=>m,hs:()=>s,kU:()=>c,mP:()=>i,or:()=>N,pF:()=>q,pq:()=>_,qE:()=>a});const r=new Float32Array(1);function o(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function a(t,n,e){return Math.min(Math.max(t,n),e)}function i(t,n){return 0===n?0:Math.ceil(t/n)*n}function u(t,n,e){return t+(n-t)*e}function s(t,n,e,r,o){return u(r,o,(t-n)/(e-n))}function c(t){return t*Math.PI/180}function f(t){return 180*t/Math.PI}function l(t){return Math.acos(a(t,-1,1))}function h(t){return Math.asin(a(t,-1,1))}function M(t,n,e=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=e}function m(t,n,e=1e-6){return!M(t,n,e)&&t>n}function d(t,n,e=1e-6){return!M(t,n,e)&&t<n}function b(t,n,e=1e-6){return M(t,n,e)||t>n}const p=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function v(t){return p.setFloat64(0,t),p.getBigInt64(0)}const y=1000000n,x=g(1);function g(t){const n=v(t=Math.abs(t)),e=function(t){return p.setBigInt64(0,t),p.getFloat64(0)}(n<=y?y:n-y);return Math.abs(t-e)}function E(t,n,e=x){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;if(null!=e&&g(Math.min(Math.abs(t),Math.abs(n)))<e)return Math.abs(t-n)<=e;const r=v(t),o=v(n);return r<0==o<0&&!((r<o?o-r:r-o)>y)}function w(t,n,e=1e-6){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;const r=Math.abs(t-n),o=Math.abs(t),a=Math.abs(n);if(0===t||0===n||o<1e-12&&a<1e-12){if(r>.01*e)return!1}else if(r/(o+a)>e)return!1;return!0}function A(t){return S(Math.max(-_,Math.min(t,_)))}function S(t){return r[0]=t,r[0]}function N(t){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],e=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(M(n,1)&&M(e,1)&&M(r,1))}function O(t,n){return(t%n+n)%n}const _=S(34028234663852886e22);function q(t,n,e){if(void 0===e||0===+e)return Math[t](n);if(n=+n,e=+e,isNaN(n)||"number"!=typeof e||e%1!=0)return NaN;let r=n.toString().split("e");return r=(n=Math[t](+(r[0]+"e"+(r[1]?+r[1]-e:-e)))).toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+e:e))}},77214(t,n,e){e.r(n),e.d(n,{destroyContext:()=>E,initialize:()=>y,processVertices:()=>g});var r=e(82534),o=e(51850),a=e(13030),i=e(77690),u=e(29242),s=e(35522),c=e(89606);class f{constructor(t=1/0,n=-1/0){this.minElevation=t,this.maxElevation=n}get elevationRangeValid(){return!Number.isNaN(this.minElevation)}get isEmpty(){return!(this.minElevation<=this.maxElevation)}contains(t){return this.minElevation<=t.minElevation&&this.maxElevation>=t.maxElevation}invalidateElevationRange(){this.minElevation=NaN}initializeEmpty(){this.minElevation=1/0,this.maxElevation=-1/0}expandElevationRange(t){const n=Math.min(this.minElevation,t.minElevation),e=Math.max(this.maxElevation,t.maxElevation),r=n!==this.minElevation||e!==this.maxElevation;return this.minElevation=n,this.maxElevation=e,r}expandElevationRangeValues(t,n){const e=Math.min(this.minElevation,t),r=Math.max(this.maxElevation,n),o=e!==this.minElevation||r!==this.maxElevation;return this.minElevation=e,this.maxElevation=r,o}setElevationRange(t){this.minElevation=t.minElevation,this.maxElevation=t.maxElevation}setElevationRangeValues(t,n){this.minElevation=t,this.maxElevation=n}equals(t){return this.minElevation===t.minElevation&&this.maxElevation===t.maxElevation}}var l=e(1843),h=e(65786);h.Y;class M extends h.Y{constructor(t,n,e){super(),this.hasVertexColors=t,this.hasNormals=n,this.textureCoordinateType=e}}function m(t){const n=(0,l.BP)().vec3f("position");return t.hasNormals&&n.vec2i16("normalCompressed",{glNormalized:!0}),1===t.textureCoordinateType?n.vec2f("uv0"):2===t.textureCoordinateType&&(n.vec2f("uv0"),n.vec4u16("uvRegion",{glNormalized:!0})),t.hasVertexColors&&n.vec4u8("color",{glNormalized:!0}),n.freeze()}function d(t,n,e,r,a,i,u){const s=new Array,l=(0,o.fA)(0,0,0),h=new f,d={origin:n,ellipsoidRadius:e,isGlobal:r,ecefRotation:a};for(const n of t){const{componentIndex:t,positionView:e,indicesView:r,texCoord0Data:o,colorView:a,normalsData:f}=n,p=e.count,v=o?1:0,y=new M(null!=a,null!=f||u,v),x=u&&null==f?(0,c.GN)(r.typedBuffer,e.typedBuffer,e.typedBufferStride):null,g=x?.outputVertexCount??p,E=m(y),w=E.createBuffer(g),A=x?E.fields.get("normalCompressed"):null;if(null!=x&&null==A)throw new Error("computeNormals requires a reserved NORMALCOMPRESSED attribute in layout");let S;if(b(d,{texCoord0Data:o,colorView:a,packedNormalsSource:x?x.packedNormals:f??null},w,{positionView:e,tileObb:i,obbHalfSizeAccumulator:l,elevationRange:h}),null!=x){const t=E.stride/4,n=A.offset/4,e=p,r=new Uint32Array(w.buffer);(0,c.yf)(r,t,n,r,t,e,g,x.appendedVertexToOriginal,x.packedNormals),S=x.indices}else S=r.typedBuffer;s.push({componentIndex:t,positionView:e,indicesView:r,layout:E,textureCoordinateType:v,interleavedVertexData:w.buffer,indices:S})}return{vertexProcessingOutputs:s,obbHalfSizeAccumulator:l,elevationRange:h}}function b(t,n,e,r){const{origin:o,ellipsoidRadius:c,isGlobal:f,ecefRotation:l}=t,{texCoord0Data:h,colorView:M,packedNormalsSource:m}=n,{positionView:d,tileObb:b,obbHalfSizeAccumulator:y,elevationRange:x}=r,g=e.getField("position",a.xs),E=g.typedBuffer,w=g.typedBufferStride,A=null!=h?e.getField("uv0",a.gH):null,S=A?.typedBuffer,N=A?.typedBufferStride??0,O=M?.typedBuffer,_=M?.elementCount??0,q=null!=M?e.getField("color",a.XP):null,I=q?.typedBuffer,C=q?.typedBufferStride??0,T=null!=m?e.getField("normalCompressed",a.mJ):null,V=null!=T?new Uint32Array(T.typedBuffer.buffer,T.typedBuffer.byteOffset,T.typedBuffer.length/2):null,z=null!=T?T.typedBufferStride/2:0,U=(0,i.I0)(v,b.quaternionConjugate),D=(0,s.ei)(p,b.center,U),F=U[0],R=U[1],B=U[2],j=U[3],P=U[4],L=U[5],Y=U[6],k=U[7],Z=U[8],G=D[0],X=D[1],H=D[2],Q=l[0],W=l[1],K=l[2],J=l[3],$=l[4],tt=l[5],nt=l[6],et=l[7],rt=l[8],ot=l!==u.zK,at=o[0],it=o[1],ut=o[2],st=d.count,ct=d.typedBufferStride,ft=d.typedBuffer,lt=null!=S&&null!=h,ht=null!=I&&null!=O&&(3===_||4===_),Mt=4===_,mt=null!=V&&null!=m;let dt=y[0],bt=y[1],pt=y[2];for(let t=0;t<st;++t){const n=t*ct,e=ft[n],r=ft[n+1],o=ft[n+2],a=e+at,i=r+it,u=o+ut,s=f?Math.sqrt(a*a+i*i+u*u)-c:u;x.expandElevationRangeValues(s,s);const l=Math.abs(a*F+i*j+u*Y-G),M=Math.abs(a*R+i*P+u*k-X),d=Math.abs(a*B+i*L+u*Z-H);dt=Math.max(dt,l),bt=Math.max(bt,M),pt=Math.max(pt,d),ot&&(ft[n]=e*Q+r*J+o*nt,ft[n+1]=e*W+r*$+o*et,ft[n+2]=e*K+r*tt+o*rt);const b=t*w;if(E[b]=e,E[b+1]=r,E[b+2]=o,lt){const n=2*t,e=t*N;S[e]=h[n],S[e+1]=h[n+1]}if(ht){const n=t*C;if(Mt){const e=4*t;I[n]=O[e],I[n+1]=O[e+1],I[n+2]=O[e+2],I[n+3]=O[e+3]}else{const e=3*t;I[n]=O[e],I[n+1]=O[e+1],I[n+2]=O[e+2],I[n+3]=255}}mt&&(V[t*z]=m[t])}y[0]=dt,y[1]=bt,y[2]=pt}const p=(0,o.vt)(),v=(0,u.vt)();function y(){}function x(t){const{colorData:n,colorElementCount:e}=t;if(null==n||0===e)return;const r=n.byteOffset,o=r+n.byteLength;return 3===e?n instanceof Float32Array?new a.xs(n.buffer,r,void 0,o):n instanceof Uint8Array?new a.eI(n.buffer,r,void 0,o):new a.nS(n.buffer,r,void 0,o):n instanceof Float32Array?new a.Eq(n.buffer,r,void 0,o):n instanceof Uint8Array?new a.XP(n.buffer,r,void 0,o):new a.Uz(n.buffer,r,void 0,o)}async function g(t){const n={center:(0,o.o8)(t.tileObbCenter),quaternionConjugate:(0,r.o8)(t.tileObbQuaternionConjugate)},{vertexProcessingOutputs:e,obbHalfSizeAccumulator:i,elevationRange:u}=d(t.inputs.map((t,n)=>{const{indicesData:e}=t,r=t.positionData.byteOffset,o=r+t.positionData.byteLength,i=t.positionStride*Float32Array.BYTES_PER_ELEMENT,u=e.byteOffset,s=u+e.byteLength;return{componentIndex:n,positionView:new a.xs(t.positionData.buffer,r,i,o),indicesView:e instanceof Uint16Array?new a.h(e.buffer,u,void 0,s):new a.P(e.buffer,u,void 0,s),texCoord0Data:t.texCoord0Data??void 0,colorView:x(t),normalsData:t.normalsData??void 0}}),t.origin,t.ellipsoidRadius,t.isGlobal,t.ecefRotation,n,t.imVertexNormals),s=(f=e,l=t.isGlobal,f.map(t=>({positionData:l?t.positionView.typedBuffer:null,interleavedVertexData:t.interleavedVertexData,renderIndices:t.indices===t.indicesView.typedBuffer?null:t.indices}))),c=function(t){const n=[];for(const e of t)null!=e.positionData&&n.push(e.positionData.buffer),n.push(e.interleavedVertexData),null!=e.renderIndices&&n.push(e.renderIndices.buffer);return n}(s);var f,l;return{result:{outputs:s,obbHalfSizeAccumulator:(0,o.o8)(i),minElevation:u.minElevation,maxElevation:u.maxElevation},transferList:c}}function E(t){}},89606(t,n,e){e.d(n,{GN:()=>l,MU:()=>f,yf:()=>M});var r=e(35522),o=e(51850),a=e(10614),i=e(63907),u=e(74038);class s{constructor(t,n){this.data=t,this.indices=n}}class c{constructor(t,n,e,r,o){this.indices=t,this.packedNormals=n,this.appendedVertexToOriginal=e,this.outputVertexCount=r,this.appendedVertexCount=o}}function f(t,n,e,c,f){return!c||e.some(({name:t})=>"normal"===t||"normalCompressed"===t)?function(t,n,e,i){const u=new s(t.slice().buffer,n);if(!i)return u;const c=e[0].stride,f=u.data.byteLength/c;for(const t of e)if("normalCompressed"===t.name){const{offset:n}=t,e=new Int16Array(u.data),s=(0,o.vt)();for(let t=0;t<f;++t)(0,a.Tz)(s,e,t,c/2,n/2),(0,r.ei)(s,s,i),(0,a.aT)(e,t,s[0],s[1],s[2],c/2,n/2)}else if("normal"===t.name){const{offset:n}=t,e=new Float32Array(u.data),a=(0,o.vt)();for(let t=0;t<f;++t){const o=(t*c+n)/4;a[0]=e[o],a[1]=e[o+1],a[2]=e[o+2],(0,r.ei)(a,a,i),e[o]=a[0],e[o+1]=a[1],e[o+2]=a[2]}}return u}(t,n,e,f):function(t,n,e,r){const o=e[0].stride,a=o/4,s=new Float32Array(t.buffer,t.byteOffset,t.byteLength/4),c=t.byteLength/o,f=o+4;e.forEach(t=>t.stride=f),e.push(new u._("normalCompressed",2,i.pe.SHORT,o,f,!0));const M=l(n,s,a,r);return h(s,c,o,f,M)}(t,n,e,f)}function l(t,n,e,r){const o=t.length/3,a=n.length/e,{faceNormals:i,faceAreas:u,faceEdges:s,edgeFaces:c,vertexFaces:f,vertexFaceCountAndOffset:l}=function(t,n,e,r,o,a){const i=new Float32Array(3*o),u=new Float32Array(o),s=new Uint32Array(3*o),c=new Int32Array(3*o*2),f=3*o,l=new Uint32Array(f),h=new Uint32Array(2*e);for(let t=0;t<o;++t){const n=3*t;for(let t=0;t<3;++t)++h[2*r[n+t]]}{let t=0;for(let n=0;n<e;++n){const e=2*n;h[e+1]=t,t+=h[e]}for(let t=0;t<o;++t){const n=3*t;for(let e=0;e<3;++e)l[h[2*r[n+e]+1]++]=t}for(let t=0;t<e;++t)h[2*t+1]-=h[2*t]}let M=0;const m=new Uint32Array(2*f*2),d=new Uint32Array(2*e);for(let t=0;t<e;++t){const n=2*t,e=4*h[n+1];d[n]=e,d[n+1]=e}function b(t,n,e){const r=Math.min(t,n),o=Math.max(t,n),a=t<n?0:1,i=2*r,u=d[i],s=d[i+1];let f=-1;for(let t=u;t<s;t+=2)if(m[t]===o){f=m[t+1];break}return-1===f&&(f=M++,m[s]=o,m[s+1]=f,d[i+1]=s+2,c[2*f+(1-a)]=-1),c[2*f+a]=e,f}for(let e=0;e<r.length;e+=3){const o=r[e],c=o*n,f=t[c],l=t[c+1],h=t[c+2],M=r[e+1],m=M*n,d=t[m],p=t[m+1],v=t[m+2],y=r[e+2],x=y*n,g=f-d,E=l-p,w=h-v,A=f-t[x],S=l-t[x+1],N=h-t[x+2],O=E*N-w*S,_=w*A-g*N,q=g*S-E*A,I=Math.sqrt(O*O+_*_+q*q)||1,C=e/3;u[C]=.5*I;const T=1/I;if(a){const t=a[0]*O+a[3]*_+a[6]*q,n=a[1]*O+a[4]*_+a[7]*q,e=a[2]*O+a[5]*_+a[8]*q;i[3*C]=t*T,i[3*C+1]=n*T,i[3*C+2]=e*T}else i[3*C]=O*T,i[3*C+1]=_*T,i[3*C+2]=q*T;const V=b(o,M,C),z=b(M,y,C),U=b(y,o,C);s[3*C]=V,s[3*C+1]=z,s[3*C+2]=U}return{faceNormals:i,faceAreas:u,faceEdges:s,vertexFaces:l,vertexFaceCountAndOffset:h,edgeFaces:c}}(n,e,a,t,o,r);return function(t,n,e,r,o,a){const i=new Uint8Array(n),u=new Uint32Array(n),s=new Uint32Array(3*n);let c=0;const f=new Uint32Array(n);let l=0;for(let n=0;n<t.length;n+=3){const t=n/3;if(1===i[t])continue;i[t]=1;const h=e[3*t],M=e[3*t+1],m=e[3*t+2];for(l=0,f[l++]=t,s[0]=o[3*t],s[1]=o[3*t+1],s[2]=o[3*t+2],c=3,u[t]=t+1;c>0;){const n=s[--c];for(let r=0;r<2;++r){const b=a[2*n+r];if(-1===b||u[b]===t+1)continue;u[b]=t+1;const p=e[3*b],v=e[3*b+1],y=e[3*b+2];if(Math.abs(1-(h*p+M*v+m*y))<d){f[l++]=b,i[b]=1;for(let t=0;t<3;++t){const e=o[3*b+t];e!==n&&(s[c++]=e)}}}}if(l>1){let t=0,n=0,o=0,a=0;for(let i=0;i<l;++i){const u=f[i],s=r[u];t+=s,n+=e[3*u]*s,o+=e[3*u+1]*s,a+=e[3*u+2]*s}const i=Math.sqrt(n*n+o*o+a*a)||1;n/=i,o/=i,a/=i;for(let i=0;i<l;++i){const u=f[i];e[3*u]=n,e[3*u+1]=o,e[3*u+2]=a,r[u]=t}}}}(t,o,i,u,s,c),m(o,a,t,i,u,f,l)}function h(t,n,e,r,o){const a=e/4,i=r/4,u=o.outputVertexCount,c=new Float32Array(u*i),f=new Uint32Array(c.buffer),l=a,h=new Uint32Array(t.buffer,t.byteOffset,t.length);return function(t,n,e,r,o,a,i){for(let u=0;u<a;++u){const a=u*o,s=u*n;for(let n=0;n<o;++n)t[s+n]=r[a+n];t[s+e]=i[u]}}(f,i,l,h,a,n,o.packedNormals),M(f,i,l,h,a,n,u,o.appendedVertexToOriginal,o.packedNormals),new s(c.buffer,o.indices)}function M(t,n,e,r,o,a,i,u,s){for(let c=a;c<i;++c){const i=u[c-a]*o,f=c*n;for(let n=0;n<o;++n)t[f+n]=r[i+n];t[f+e]=s[c]}}function m(t,n,e,r,o,a,i){const u=3*t,s=new(u<256?Uint8Array:u<65536?Uint16Array:Uint32Array)(e);let f=n;const l=new(n<256?Uint8Array:n<65536?Uint16Array:Uint32Array)(u-n),h=new ArrayBuffer(4*u),M=new Int16Array(h),m=new Uint32Array(h);let d=0,p=0;const v=new Uint32Array(t);let y=0;const x=1-b;for(let t=0;t<n;++t){d=i[2*t+1],p=d+i[2*t];let e=t;for(;d<p;){{const t=a[--p],n=3*t,i=r[n],u=r[n+1],s=r[n+2];y=0,v[y++]=t;let c=d;for(;c<p;){const t=a[c],n=3*t;if(i*r[n]+u*r[n+1]+s*r[n+2]>x){v[y++]=t;const n=--p;if(c<n){a[c]=a[n];continue}}++c}let f=0,l=0,h=0;if(1===y)f=i,l=u,h=s;else{for(let t=0;t<y;++t){const n=v[t],e=o[n],a=3*n;f+=r[a]*e,l+=r[a+1]*e,h+=r[a+2]*e}const t=Math.sqrt(f*f+l*l+h*h)||1;f/=t,l/=t,h/=t}{const t=1/(Math.abs(f)+Math.abs(l)+Math.abs(h)),n=f*t,r=l*t;let o=n,a=r;h<=0&&(o=(n>=0?1:-1)*(1-Math.abs(r)),a=(r>=0?1:-1)*(1-Math.abs(n)));const i=2*e,u=Math.round(32767*o),s=Math.round(32767*a);M[i]=u<-32767?-32767:u>32767?32767:u,M[i+1]=s<-32767?-32767:s>32767?32767:s}}if(e!==t)for(let n=0;n<y;++n){const r=3*v[n];s[r]===t&&(s[r]=e),s[r+1]===t&&(s[r+1]=e),s[r+2]===t&&(s[r+2]=e)}if(d>=p)break;e=f++,l[e-n]=t}}return new c(s,m,l,f,f-n)}const d=.04,b=.8},10614(t,n,e){e.d(n,{Tz:()=>i,aT:()=>a});var r=e(34727),o=e(35522);function a(t,n,e,r,o,a=2,i=0){const s=1/(Math.abs(e)+Math.abs(r)+Math.abs(o)),c=e*s,f=r*s,l=o<=0?(c>=0?1:-1)*(1-Math.abs(f)):c,h=o<=0?(f>=0?1:-1)*(1-Math.abs(c)):f,M=n*a+i;t[M]=u(l),t[M+1]=u(h)}function i(t,n,e,r=2,a=0){const i=e*r+a,u=s(n[i]),c=s(n[i+1]),f=1-Math.abs(u)-Math.abs(c);return t[2]=f,f<0?(t[0]=(u>=0?1:-1)*(1-Math.abs(c)),t[1]=(c>=0?1:-1)*(1-Math.abs(u))):(t[0]=u,t[1]=c),(0,o.S8)(t,t)}function u(t){return(0,r.qE)(Math.round(32767*t),-32767,32767)}function s(t){return(0,r.qE)(t/32767,-1,1)}e(51850)},65786(t,n,e){e.d(n,{Y:()=>r});const r=class{};new r}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1448],{5482(t,e,n){function r(t,e,n,r){var s,i=arguments.length,o=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,n,o):s(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o}function s(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var r,s;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=e[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=e[Symbol.dispose],n&&(s=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");s&&(r=function(){try{s.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:r,async:n})}else n&&t.stack.push({async:!0});return e}n.d(e,{Cg:()=>r,hk:()=>o,mS:()=>s}),Object.create,Object.create;var i="function"==typeof SuppressedError?SuppressedError:function(t,e,n){var r=new Error(n);return r.name="SuppressedError",r.error=t,r.suppressed=e,r};function o(t){function e(e){t.error=t.hasError?new i(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var n,r=0;return function s(){for(;n=t.stack.pop();)try{if(!n.async&&1===r)return r=0,t.stack.push(n),Promise.resolve().then(s);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(s,function(t){return e(t),s()})}else r|=1}catch(t){e(t)}if(1===r)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},91869(t,e,n){function r(t,e){for(const n of t.values())if(e(n))return!0;return!1}function s(t,e){for(const n of t.values())if(!e(n))return!1;return!0}function i(t,e,n){const r=t.get(e);if(void 0!==r)return r;const s=n();return t.set(e,s),s}function o(t){const e=new Map;return n=>(e.has(n)||e.set(n,t(n)),e.get(n))}n.d(e,{Bj:()=>o,Bs:()=>r,mt:()=>s,tE:()=>i})},4341(t,e,n){n.d(e,{I:()=>s});var r=n(26390);class s{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*i);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,i));t++)this._items.push(this._allocator())}}const i=1024},29242(t,e,n){function r(){return[1,0,0,0,1,0,0,0,1]}function s(t,e,n,r,s,i,o,a,c){return[t,e,n,r,s,i,o,a,c]}n.d(e,{fA:()=>s,vt:()=>r,zK:()=>i});const i=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,fromValues:s},Symbol.toStringTag,{value:"Module"}))},9093(t,e,n){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}n.d(e,{o8:()=>s,vt:()=>r,zK:()=>i});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:s,create:r,fromValues:function(t,e,n,r,s,i,o,a,c,u,h,f,l,d,m,M){return[t,e,n,r,s,i,o,a,c,u,h,f,l,d,m,M]}},Symbol.toStringTag,{value:"Module"}))},82534(t,e,n){function r(){return[0,0,0,1]}function s(t){return[t[0],t[1],t[2],t[3]]}n.d(e,{o8:()=>s,vt:()=>r,zK:()=>i});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:s,create:r,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"}))},77690(t,e,n){n.d(e,{B8:()=>a,Ge:()=>d,I0:()=>l,KC:()=>c,a4:()=>u,hZ:()=>i,hs:()=>f,lw:()=>h,mg:()=>o,z0:()=>s});var r=n(34304);function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function i(t,e,n,r,s,i,o,a,c,u){return t[0]=e,t[1]=n,t[2]=r,t[3]=s,t[4]=i,t[5]=o,t[6]=a,t[7]=c,t[8]=u,t}function o(t,e){if(t===e){const n=e[1],r=e[2],s=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=s}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function a(t,e){const n=e[0],r=e[1],s=e[2],i=e[3],o=e[4],a=e[5],c=e[6],u=e[7],h=e[8],f=h*o-a*u,l=-h*i+a*c,d=u*i-o*c;let m=n*f+r*l+s*d;return m?(m=1/m,t[0]=f*m,t[1]=(-h*r+s*u)*m,t[2]=(a*r-s*o)*m,t[3]=l*m,t[4]=(h*n-s*c)*m,t[5]=(-a*n+s*i)*m,t[6]=d*m,t[7]=(-u*n+r*c)*m,t[8]=(o*n-r*i)*m,t):null}function c(t,e){const n=e[0],r=e[1],s=e[2],i=e[3],o=e[4],a=e[5],c=e[6],u=e[7],h=e[8];return t[0]=o*h-a*u,t[1]=s*u-r*h,t[2]=r*a-s*o,t[3]=a*c-i*h,t[4]=n*h-s*c,t[5]=s*i-n*a,t[6]=i*u-o*c,t[7]=r*c-n*u,t[8]=n*o-r*i,t}function u(t){const e=t[0],n=t[1],r=t[2],s=t[3],i=t[4],o=t[5],a=t[6],c=t[7],u=t[8];return e*(u*i-o*c)+n*(-u*s+o*a)+r*(c*s-i*a)}function h(t,e,n){const r=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],h=e[7],f=e[8],l=n[0],d=n[1],m=n[2],M=n[3],b=n[4],g=n[5],_=n[6],p=n[7],v=n[8];return t[0]=l*r+d*o+m*u,t[1]=l*s+d*a+m*h,t[2]=l*i+d*c+m*f,t[3]=M*r+b*o+g*u,t[4]=M*s+b*a+g*h,t[5]=M*i+b*c+g*f,t[6]=_*r+p*o+v*u,t[7]=_*s+p*a+v*h,t[8]=_*i+p*c+v*f,t}function f(t,e,n){const r=n[0],s=n[1],i=n[2];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=s*e[3],t[4]=s*e[4],t[5]=s*e[5],t[6]=i*e[6],t[7]=i*e[7],t[8]=i*e[8],t}function l(t,e){const n=e[0],r=e[1],s=e[2],i=e[3],o=n+n,a=r+r,c=s+s,u=n*o,h=r*o,f=r*a,l=s*o,d=s*a,m=s*c,M=i*o,b=i*a,g=i*c;return t[0]=1-f-m,t[3]=h-g,t[6]=l+b,t[1]=h+g,t[4]=1-u-m,t[7]=d-M,t[2]=l-b,t[5]=d+M,t[8]=1-u-f,t}function d(t,e){const n=e[0],r=e[1],s=e[2],i=e[3],o=e[4],a=e[5],c=e[6],u=e[7],h=e[8],f=e[9],l=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15],_=n*a-r*o,p=n*c-s*o,v=n*u-i*o,y=r*c-s*a,S=r*u-i*a,x=s*u-i*c,w=h*M-f*m,A=h*b-l*m,O=h*g-d*m,j=f*b-l*M,q=f*g-d*M,T=l*g-d*b;let C=_*T-p*q+v*j+y*O-S*A+x*w;return C?(C=1/C,t[0]=(a*T-c*q+u*j)*C,t[1]=(c*O-o*T-u*A)*C,t[2]=(o*q-a*O+u*w)*C,t[3]=(s*q-r*T-i*j)*C,t[4]=(n*T-s*O+i*A)*C,t[5]=(r*O-n*q-i*w)*C,t[6]=(M*x-b*S+g*y)*C,t[7]=(b*v-m*x-g*p)*C,t[8]=(m*S-M*v+g*_)*C,t):null}function m(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}const M=h,b=m;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:c,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:u,equals:function(t,e){const n=t[0],s=t[1],i=t[2],o=t[3],a=t[4],c=t[5],u=t[6],h=t[7],f=t[8],l=e[0],d=e[1],m=e[2],M=e[3],b=e[4],g=e[5],_=e[6],p=e[7],v=e[8],y=(0,r.FD)();return Math.abs(n-l)<=y*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(s-d)<=y*Math.max(1,Math.abs(s),Math.abs(d))&&Math.abs(i-m)<=y*Math.max(1,Math.abs(i),Math.abs(m))&&Math.abs(o-M)<=y*Math.max(1,Math.abs(o),Math.abs(M))&&Math.abs(a-b)<=y*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(c-g)<=y*Math.max(1,Math.abs(c),Math.abs(g))&&Math.abs(u-_)<=y*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(h-p)<=y*Math.max(1,Math.abs(h),Math.abs(p))&&Math.abs(f-v)<=y*Math.max(1,Math.abs(f),Math.abs(v))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:s,fromQuat:l,fromRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:a,isOrthoNormal:function(t){const e=(0,r.FD)(),n=t[0],s=t[1],i=t[2],o=t[3],a=t[4],c=t[5],u=t[6],h=t[7],f=t[8];return Math.abs(1-(n*n+o*o+u*u))<=e&&Math.abs(1-(s*s+a*a+h*h))<=e&&Math.abs(1-(i*i+c*c+f*f))<=e},mul:M,multiply:h,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},normalFromMat4:d,normalFromMat4Legacy:function(t,e){const n=e[0],r=e[1],s=e[2],i=e[4],o=e[5],a=e[6],c=e[8],u=e[9],h=e[10],f=h*o-a*u,l=-h*i+a*c,d=u*i-o*c,m=n*f+r*l+s*d;if(!m)return null;const M=1/m;return t[0]=f*M,t[1]=(-h*r+s*u)*M,t[2]=(a*r-s*o)*M,t[3]=l*M,t[4]=(h*n-s*c)*M,t[5]=(-a*n+s*i)*M,t[6]=d*M,t[7]=(-u*n+r*c)*M,t[8]=(o*n-r*i)*M,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){const r=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],h=e[7],f=e[8],l=Math.sin(n),d=Math.cos(n);return t[0]=d*r+l*o,t[1]=d*s+l*a,t[2]=d*i+l*c,t[3]=d*o-l*r,t[4]=d*a-l*s,t[5]=d*c-l*i,t[6]=u,t[7]=h,t[8]=f,t},scale:f,scaleByVec2:function(t,e,n){const r=n[0],s=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=s*e[3],t[4]=s*e[4],t[5]=s*e[5],t},set:i,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:b,subtract:m,translate:function(t,e,n){const r=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],h=e[7],f=e[8],l=n[0],d=n[1];return t[0]=r,t[1]=s,t[2]=i,t[3]=o,t[4]=a,t[5]=c,t[6]=l*r+d*o+u,t[7]=l*s+d*a+h,t[8]=l*i+d*c+f,t},transpose:o},Symbol.toStringTag,{value:"Module"}))},58083(t,e,n){n.d(e,{$0:()=>b,$h:()=>O,B8:()=>u,C:()=>i,D_:()=>a,N9:()=>_,O7:()=>A,Tl:()=>f,X_:()=>S,e$:()=>d,eL:()=>m,hM:()=>g,hZ:()=>o,hs:()=>l,kN:()=>M,l:()=>x,lw:()=>h,mg:()=>c,o1:()=>w,sC:()=>y,t2:()=>C,t5:()=>q,tZ:()=>P,ut:()=>E,v3:()=>j});var r=n(51850),s=n(34304);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function o(t,e,n,r,s,i,o,a,c,u,h,f,l,d,m,M,b){return t[0]=e,t[1]=n,t[2]=r,t[3]=s,t[4]=i,t[5]=o,t[6]=a,t[7]=c,t[8]=u,t[9]=h,t[10]=f,t[11]=l,t[12]=d,t[13]=m,t[14]=M,t[15]=b,t}function a(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function c(t,e){if(t===e){const n=e[1],r=e[2],s=e[3],i=e[6],o=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=i,t[11]=e[14],t[12]=s,t[13]=o,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function u(t,e){const n=e[0],r=e[1],s=e[2],i=e[3],o=e[4],a=e[5],c=e[6],u=e[7],h=e[8],f=e[9],l=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15],_=n*a-r*o,p=n*c-s*o,v=n*u-i*o,y=r*c-s*a,S=r*u-i*a,x=s*u-i*c,w=h*M-f*m,A=h*b-l*m,O=h*g-d*m,j=f*b-l*M,q=f*g-d*M,T=l*g-d*b;let C=_*T-p*q+v*j+y*O-S*A+x*w;return C?(C=1/C,t[0]=(a*T-c*q+u*j)*C,t[1]=(s*q-r*T-i*j)*C,t[2]=(M*x-b*S+g*y)*C,t[3]=(l*S-f*x-d*y)*C,t[4]=(c*O-o*T-u*A)*C,t[5]=(n*T-s*O+i*A)*C,t[6]=(b*v-m*x-g*p)*C,t[7]=(h*x-l*v+d*p)*C,t[8]=(o*q-a*O+u*w)*C,t[9]=(r*O-n*q-i*w)*C,t[10]=(m*S-M*v+g*_)*C,t[11]=(f*v-h*S-d*_)*C,t[12]=(a*A-o*j-c*w)*C,t[13]=(n*j-r*A+s*w)*C,t[14]=(M*p-m*y-b*_)*C,t[15]=(h*y-f*p+l*_)*C,t):null}function h(t,e,n){const r=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],h=e[7],f=e[8],l=e[9],d=e[10],m=e[11],M=e[12],b=e[13],g=e[14],_=e[15];let p=n[0],v=n[1],y=n[2],S=n[3];return t[0]=p*r+v*a+y*f+S*M,t[1]=p*s+v*c+y*l+S*b,t[2]=p*i+v*u+y*d+S*g,t[3]=p*o+v*h+y*m+S*_,p=n[4],v=n[5],y=n[6],S=n[7],t[4]=p*r+v*a+y*f+S*M,t[5]=p*s+v*c+y*l+S*b,t[6]=p*i+v*u+y*d+S*g,t[7]=p*o+v*h+y*m+S*_,p=n[8],v=n[9],y=n[10],S=n[11],t[8]=p*r+v*a+y*f+S*M,t[9]=p*s+v*c+y*l+S*b,t[10]=p*i+v*u+y*d+S*g,t[11]=p*o+v*h+y*m+S*_,p=n[12],v=n[13],y=n[14],S=n[15],t[12]=p*r+v*a+y*f+S*M,t[13]=p*s+v*c+y*l+S*b,t[14]=p*i+v*u+y*d+S*g,t[15]=p*o+v*h+y*m+S*_,t}function f(t,e,n){const r=n[0],s=n[1],i=n[2];if(e===t)t[12]=e[0]*r+e[4]*s+e[8]*i+e[12],t[13]=e[1]*r+e[5]*s+e[9]*i+e[13],t[14]=e[2]*r+e[6]*s+e[10]*i+e[14],t[15]=e[3]*r+e[7]*s+e[11]*i+e[15];else{const n=e[0],o=e[1],a=e[2],c=e[3],u=e[4],h=e[5],f=e[6],l=e[7],d=e[8],m=e[9],M=e[10],b=e[11];t[0]=n,t[1]=o,t[2]=a,t[3]=c,t[4]=u,t[5]=h,t[6]=f,t[7]=l,t[8]=d,t[9]=m,t[10]=M,t[11]=b,t[12]=n*r+u*s+d*i+e[12],t[13]=o*r+h*s+m*i+e[13],t[14]=a*r+f*s+M*i+e[14],t[15]=c*r+l*s+b*i+e[15]}return t}function l(t,e,n){const r=n[0],s=n[1],i=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*s,t[5]=e[5]*s,t[6]=e[6]*s,t[7]=e[7]*s,t[8]=e[8]*i,t[9]=e[9]*i,t[10]=e[10]*i,t[11]=e[11]*i,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function d(t,e,n,r){let o=r[0],a=r[1],c=r[2],u=Math.sqrt(o*o+a*a+c*c);if(u<=(0,s.FD)())return void i(t,e);u=1/u,o*=u,a*=u,c*=u;const h=Math.sin(n),f=Math.cos(n),l=1-f,d=e[0],m=e[1],M=e[2],b=e[3],g=e[4],_=e[5],p=e[6],v=e[7],y=e[8],S=e[9],x=e[10],w=e[11],A=o*o*l+f,O=a*o*l+c*h,j=c*o*l-a*h,q=o*a*l-c*h,T=a*a*l+f,C=c*a*l+o*h,E=o*c*l+a*h,P=a*c*l-o*h,R=c*c*l+f;t[0]=d*A+g*O+y*j,t[1]=m*A+_*O+S*j,t[2]=M*A+p*O+x*j,t[3]=b*A+v*O+w*j,t[4]=d*q+g*T+y*C,t[5]=m*q+_*T+S*C,t[6]=M*q+p*T+x*C,t[7]=b*q+v*T+w*C,t[8]=d*E+g*P+y*R,t[9]=m*E+_*P+S*R,t[10]=M*E+p*P+x*R,t[11]=b*E+v*P+w*R,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15])}function m(t,e,n){const r=Math.sin(n),s=Math.cos(n),i=e[4],o=e[5],a=e[6],c=e[7],u=e[8],h=e[9],f=e[10],l=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*s+u*r,t[5]=o*s+h*r,t[6]=a*s+f*r,t[7]=c*s+l*r,t[8]=u*s-i*r,t[9]=h*s-o*r,t[10]=f*s-a*r,t[11]=l*s-c*r,t}function M(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function b(t,e,n){if(0===e)return a(t);let r=n[0],i=n[1],o=n[2],c=Math.sqrt(r*r+i*i+o*o);if(c<=(0,s.FD)())return null;c=1/c,r*=c,i*=c,o*=c;const u=Math.sin(e),h=Math.cos(e),f=1-h;return t[0]=r*r*f+h,t[1]=i*r*f+o*u,t[2]=o*r*f-i*u,t[3]=0,t[4]=r*i*f-o*u,t[5]=i*i*f+h,t[6]=o*i*f+r*u,t[7]=0,t[8]=r*o*f+i*u,t[9]=i*o*f-r*u,t[10]=o*o*f+h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function g(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function _(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function p(t,e,n){const r=e[0],s=e[1],i=e[2],o=e[3],a=r+r,c=s+s,u=i+i,h=r*a,f=r*c,l=r*u,d=s*c,m=s*u,M=i*u,b=o*a,g=o*c,_=o*u;return t[0]=1-(d+M),t[1]=f+_,t[2]=l-g,t[3]=0,t[4]=f-_,t[5]=1-(h+M),t[6]=m+b,t[7]=0,t[8]=l+g,t[9]=m-b,t[10]=1-(h+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const v=(0,r.vt)();function y(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function S(t,e){const n=e[0],r=e[1],s=e[2],i=e[4],o=e[5],a=e[6],c=e[8],u=e[9],h=e[10];return t[0]=Math.sqrt(n*n+r*r+s*s),t[1]=Math.sqrt(i*i+o*o+a*a),t[2]=Math.sqrt(c*c+u*u+h*h),t}function x(t,e){const n=e[0]+e[5]+e[10];let r=0;return n>0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(e[6]-e[9])/r,t[1]=(e[8]-e[2])/r,t[2]=(e[1]-e[4])/r):e[0]>e[5]&&e[0]>e[10]?(r=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/r,t[0]=.25*r,t[1]=(e[1]+e[4])/r,t[2]=(e[8]+e[2])/r):e[5]>e[10]?(r=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/r,t[0]=(e[1]+e[4])/r,t[1]=.25*r,t[2]=(e[6]+e[9])/r):(r=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/r,t[0]=(e[8]+e[2])/r,t[1]=(e[6]+e[9])/r,t[2]=.25*r),t}function w(t,e,n,r){const s=e[0],i=e[1],o=e[2],a=e[3],c=s+s,u=i+i,h=o+o,f=s*c,l=s*u,d=s*h,m=i*u,M=i*h,b=o*h,g=a*c,_=a*u,p=a*h,v=r[0],y=r[1],S=r[2];return t[0]=(1-(m+b))*v,t[1]=(l+p)*v,t[2]=(d-_)*v,t[3]=0,t[4]=(l-p)*y,t[5]=(1-(f+b))*y,t[6]=(M+g)*y,t[7]=0,t[8]=(d+_)*S,t[9]=(M-g)*S,t[10]=(1-(f+m))*S,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function A(t,e,n,r,s){const i=e[0],o=e[1],a=e[2],c=e[3],u=i+i,h=o+o,f=a+a,l=i*u,d=i*h,m=i*f,M=o*h,b=o*f,g=a*f,_=c*u,p=c*h,v=c*f,y=r[0],S=r[1],x=r[2],w=s[0],A=s[1],O=s[2],j=(1-(M+g))*y,q=(d+v)*y,T=(m-p)*y,C=(d-v)*S,E=(1-(l+g))*S,P=(b+_)*S,R=(m+p)*x,z=(b-_)*x,D=(1-(l+M))*x;return t[0]=j,t[1]=q,t[2]=T,t[3]=0,t[4]=C,t[5]=E,t[6]=P,t[7]=0,t[8]=R,t[9]=z,t[10]=D,t[11]=0,t[12]=n[0]+w-(j*w+C*A+R*O),t[13]=n[1]+A-(q*w+E*A+z*O),t[14]=n[2]+O-(T*w+P*A+D*O),t[15]=1,t}function O(t,e,n,r,s,i,o){const a=1/(n-e),c=1/(s-r),u=1/(i-o);return t[0]=2*i*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*i*c,t[6]=0,t[7]=0,t[8]=(n+e)*a,t[9]=(s+r)*c,t[10]=(o+i)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*i*2*u,t[15]=0,t}function j(t,e,n,r,s,i,o){const a=1/(e-n),c=1/(r-s),u=1/(i-o);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+n)*a,t[13]=(s+r)*c,t[14]=(o+i)*u,t[15]=1,t}function q(t,e,n,r){const i=e[0],o=e[1],c=e[2];let u=i-n[0],h=o-n[1],f=c-n[2];const l=(0,s.FD)();if(Math.abs(u)<l&&Math.abs(h)<l&&Math.abs(f)<l)return void a(t);let d=1/Math.sqrt(u*u+h*h+f*f);u*=d,h*=d,f*=d;const m=r[0],M=r[1],b=r[2];let g=M*f-b*h,_=b*u-m*f,p=m*h-M*u;d=Math.sqrt(g*g+_*_+p*p),d?(d=1/d,g*=d,_*=d,p*=d):(g=0,_=0,p=0);let v=h*p-f*_,y=f*g-u*p,S=u*_-h*g;d=Math.sqrt(v*v+y*y+S*S),d?(d=1/d,v*=d,y*=d,S*=d):(v=0,y=0,S=0),t[0]=g,t[1]=v,t[2]=u,t[3]=0,t[4]=_,t[5]=y,t[6]=h,t[7]=0,t[8]=p,t[9]=S,t[10]=f,t[11]=0,t[12]=-(g*i+_*o+p*c),t[13]=-(v*i+y*o+S*c),t[14]=-(u*i+h*o+f*c),t[15]=1}function T(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function C(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function E(t){const e=(0,s.FD)(),n=t[0],r=t[1],i=t[2],o=t[4],a=t[5],c=t[6],u=t[8],h=t[9],f=t[10];return Math.abs(1-(n*n+o*o+u*u))<=e&&Math.abs(1-(r*r+a*a+h*h))<=e&&Math.abs(1-(i*i+c*c+f*f))<=e}function P(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const R=h,z=T;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){const n=e[0],r=e[1],s=e[2],i=e[3],o=e[4],a=e[5],c=e[6],u=e[7],h=e[8],f=e[9],l=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15];return t[0]=a*(l*g-d*b)-f*(c*g-u*b)+M*(c*d-u*l),t[1]=-(r*(l*g-d*b)-f*(s*g-i*b)+M*(s*d-i*l)),t[2]=r*(c*g-u*b)-a*(s*g-i*b)+M*(s*u-i*c),t[3]=-(r*(c*d-u*l)-a*(s*d-i*l)+f*(s*u-i*c)),t[4]=-(o*(l*g-d*b)-h*(c*g-u*b)+m*(c*d-u*l)),t[5]=n*(l*g-d*b)-h*(s*g-i*b)+m*(s*d-i*l),t[6]=-(n*(c*g-u*b)-o*(s*g-i*b)+m*(s*u-i*c)),t[7]=n*(c*d-u*l)-o*(s*d-i*l)+h*(s*u-i*c),t[8]=o*(f*g-d*M)-h*(a*g-u*M)+m*(a*d-u*f),t[9]=-(n*(f*g-d*M)-h*(r*g-i*M)+m*(r*d-i*f)),t[10]=n*(a*g-u*M)-o*(r*g-i*M)+m*(r*u-i*a),t[11]=-(n*(a*d-u*f)-o*(r*d-i*f)+h*(r*u-i*a)),t[12]=-(o*(f*b-l*M)-h*(a*b-c*M)+m*(a*l-c*f)),t[13]=n*(f*b-l*M)-h*(r*b-s*M)+m*(r*l-s*f),t[14]=-(n*(a*b-c*M)-o*(r*b-s*M)+m*(r*c-s*a)),t[15]=n*(a*l-c*f)-o*(r*l-s*f)+h*(r*c-s*a),t},copy:i,determinant:function(t){const e=t[0],n=t[1],r=t[2],s=t[3],i=t[4],o=t[5],a=t[6],c=t[7],u=t[8],h=t[9],f=t[10],l=t[11],d=t[12],m=t[13],M=t[14],b=t[15];return(e*o-n*i)*(f*b-l*M)-(e*a-r*i)*(h*b-l*m)+(e*c-s*i)*(h*M-f*m)+(n*a-r*o)*(u*b-l*d)-(n*c-s*o)*(u*M-f*d)+(r*c-s*a)*(u*m-h*d)},equals:function(t,e){if(t===e)return!0;const n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],c=t[5],u=t[6],h=t[7],f=t[8],l=t[9],d=t[10],m=t[11],M=t[12],b=t[13],g=t[14],_=t[15],p=e[0],v=e[1],y=e[2],S=e[3],x=e[4],w=e[5],A=e[6],O=e[7],j=e[8],q=e[9],T=e[10],C=e[11],E=e[12],P=e[13],R=e[14],z=e[15],D=(0,s.FD)();return Math.abs(n-p)<=D*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(r-v)<=D*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-y)<=D*Math.max(1,Math.abs(i),Math.abs(y))&&Math.abs(o-S)<=D*Math.max(1,Math.abs(o),Math.abs(S))&&Math.abs(a-x)<=D*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(c-w)<=D*Math.max(1,Math.abs(c),Math.abs(w))&&Math.abs(u-A)<=D*Math.max(1,Math.abs(u),Math.abs(A))&&Math.abs(h-O)<=D*Math.max(1,Math.abs(h),Math.abs(O))&&Math.abs(f-j)<=D*Math.max(1,Math.abs(f),Math.abs(j))&&Math.abs(l-q)<=D*Math.max(1,Math.abs(l),Math.abs(q))&&Math.abs(d-T)<=D*Math.max(1,Math.abs(d),Math.abs(T))&&Math.abs(m-C)<=D*Math.max(1,Math.abs(m),Math.abs(C))&&Math.abs(M-E)<=D*Math.max(1,Math.abs(M),Math.abs(E))&&Math.abs(b-P)<=D*Math.max(1,Math.abs(b),Math.abs(P))&&Math.abs(g-R)<=D*Math.max(1,Math.abs(g),Math.abs(R))&&Math.abs(_-z)<=D*Math.max(1,Math.abs(_),Math.abs(z))},exactEquals:C,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){const n=e[0],r=e[1],s=e[2],i=e[3],o=n+n,a=r+r,c=s+s,u=n*o,h=r*o,f=r*a,l=s*o,d=s*a,m=s*c,M=i*o,b=i*a,g=i*c;return t[0]=1-f-m,t[1]=h+g,t[2]=l-b,t[3]=0,t[4]=h-g,t[5]=1-u-m,t[6]=d+M,t[7]=0,t[8]=l+b,t[9]=d-M,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const n=v,r=-e[0],s=-e[1],i=-e[2],o=e[3],a=e[4],c=e[5],u=e[6],h=e[7],f=r*r+s*s+i*i+o*o;return f>0?(n[0]=2*(a*o+h*r+c*i-u*s)/f,n[1]=2*(c*o+h*s+u*r-a*i)/f,n[2]=2*(u*o+h*i+a*s-c*r)/f):(n[0]=2*(a*o+h*r+c*i-u*s),n[1]=2*(c*o+h*s+u*r-a*i),n[2]=2*(u*o+h*i+a*s-c*r)),p(t,e,n),t},fromRotation:b,fromRotationTranslation:p,fromRotationTranslationScale:w,fromRotationTranslationScaleOrigin:A,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:M,fromXRotation:g,fromYRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:_,frustum:O,getRotation:x,getScale:S,getTranslation:y,hasIdentityRotation:P,identity:a,invert:u,invertOrIdentity:function(t,e){return u(t,e)||a(t),t},isOrthoNormal:E,lookAt:q,mul:R,multiply:h,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},ortho:j,perspective:function(t,e,n,r,s){const i=1/Math.tan(e/2);let o;return t[0]=i/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=s&&s!==1/0?(o=1/(r-s),t[10]=(s+r)*o,t[14]=2*s*r*o):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,e,n,r){const s=Math.tan(e.upDegrees*Math.PI/180),i=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),a=Math.tan(e.rightDegrees*Math.PI/180),c=2/(o+a),u=2/(s+i);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-(o-a)*c*.5,t[9]=(s-i)*u*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},rotate:d,rotateX:m,rotateY:function(t,e,n){const r=Math.sin(n),s=Math.cos(n),i=e[0],o=e[1],a=e[2],c=e[3],u=e[8],h=e[9],f=e[10],l=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*s-u*r,t[1]=o*s-h*r,t[2]=a*s-f*r,t[3]=c*s-l*r,t[8]=i*r+u*s,t[9]=o*r+h*s,t[10]=a*r+f*s,t[11]=c*r+l*s,t},rotateZ:function(t,e,n){const r=Math.sin(n),s=Math.cos(n),i=e[0],o=e[1],a=e[2],c=e[3],u=e[4],h=e[5],f=e[6],l=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*s+u*r,t[1]=o*s+h*r,t[2]=a*s+f*r,t[3]=c*s+l*r,t[4]=u*s-i*r,t[5]=h*s-o*r,t[6]=f*s-a*r,t[7]=l*s-c*r,t},scale:l,set:o,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:z,subtract:T,targetTo:function(t,e,n,r){const s=e[0],i=e[1],o=e[2],a=r[0],c=r[1],u=r[2];let h=s-n[0],f=i-n[1],l=o-n[2],d=h*h+f*f+l*l;d>0&&(d=1/Math.sqrt(d),h*=d,f*=d,l*=d);let m=c*l-u*f,M=u*h-a*l,b=a*f-c*h;return d=m*m+M*M+b*b,d>0&&(d=1/Math.sqrt(d),m*=d,M*=d,b*=d),t[0]=m,t[1]=M,t[2]=b,t[3]=0,t[4]=f*b-l*M,t[5]=l*m-h*b,t[6]=h*M-f*m,t[7]=0,t[8]=h,t[9]=f,t[10]=l,t[11]=0,t[12]=s,t[13]=i,t[14]=o,t[15]=1,t},translate:f,transpose:c},Symbol.toStringTag,{value:"Module"}))},82919(t,e,n){n.d(e,{DV:()=>g,C:()=>M,vt:()=>d,Qy:()=>m,ui:()=>b,ST:()=>v,bU:()=>y,pw:()=>p,m7:()=>_,c8:()=>x});var r=n(4341),s=n(58083),i=n(35522),o=n(51850),a=n(78955),c=n(91829),u=n(71351);function h(t){return t?{ray:(0,u.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,u.vt)(),c0:0,c1:Number.MAX_VALUE}}new r.I(()=>h());var f=n(27921),l=n(32114);function d(t){return t?[(0,f.vt)(t[0]),(0,f.vt)(t[1]),(0,f.vt)(t[2]),(0,f.vt)(t[3]),(0,f.vt)(t[4]),(0,f.vt)(t[5])]:[(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)()]}function m(){return[(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)()]}function M(t,e){for(let n=0;n<w;n++)(0,f.C)(t[n],e[n]);return t}function b(t,e,n,r=q){const o=(0,s.lw)(l.Rc.get(),e,t);(0,s.B8)(o,o);for(let t=0;t<A;++t){const e=(0,a.Z0)(l.Km.get(),O[t],o);(0,i.hZ)(r[t],e[0]/e[3],e[1]/e[3],e[2]/e[3])}g(n,r)}function g(t,e){(0,f.Cr)(e[4],e[0],e[3],t[0]),(0,f.Cr)(e[1],e[5],e[6],t[1]),(0,f.Cr)(e[4],e[5],e[1],t[2]),(0,f.Cr)(e[3],e[2],e[6],t[3]),(0,f.Cr)(e[0],e[1],e[2],t[4]),(0,f.Cr)(e[5],e[4],e[7],t[5])}function _(t,e){for(let n=0;n<w;n++){const r=t[n];if(r[0]*e.center[0]+r[1]*e.center[1]+r[2]*e.center[2]+r[3]>=e.radius)return!1}return!0}function p(t,e){return S(t,function(t,e=h()){return(0,u.C)(t,e.ray),e.c0=0,e.c1=Number.MAX_VALUE,e}(e,j.get()))}function v(t,e,n){return S(t,function(t,e,n=h()){const r=(0,i.Bw)(t.vector);return(0,u.fA)(t.origin,e,n.ray),n.c0=0,n.c1=r,n}(e,n,j.get()))}function y(t,e){for(let n=0;n<w;n++)if((0,f.mN)(t[n],e)>0)return!1;return!0}function S(t,e){for(let n=0;n<w;n++)if(!(0,f.$Q)(t[n],e))return!1;return!0}const x={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},w=6,A=8,O=[(0,c.fA)(-1,-1,-1,1),(0,c.fA)(1,-1,-1,1),(0,c.fA)(1,1,-1,1),(0,c.fA)(-1,1,-1,1),(0,c.fA)(-1,-1,1,1),(0,c.fA)(1,-1,1,1),(0,c.fA)(1,1,1,1),(0,c.fA)(-1,1,1,1)],j=new r.I(h),q=m()},11964(t,e,n){n.d(e,{Cr:()=>h,G1:()=>d,LV:()=>u,_I:()=>l,kb:()=>f,ld:()=>m,vt:()=>c});var r=n(34727),s=n(4341),i=n(35522),o=n(51850),a=n(32114);function c(t){return t?{origin:(0,o.o8)(t.origin),vector:(0,o.o8)(t.vector)}:{origin:(0,o.vt)(),vector:(0,o.vt)()}}function u(t,e){const n=b.get();return n.origin=t,n.vector=e,n}function h(t,e,n=c()){return(0,i.C)(n.origin,t),(0,i.Re)(n.vector,e,t),n}function f(t,e){const n=(0,i.Re)(a.rq.get(),e,t.origin),s=(0,i.Om)(t.vector,n),o=(0,i.Om)(t.vector,t.vector),c=(0,r.qE)(s/o,0,1),u=(0,i.Re)(a.rq.get(),(0,i.hs)(a.rq.get(),t.vector,c),n);return(0,i.Om)(u,u)}function l(t,e,n){return function(t,e,n,s,o){const{vector:c,origin:u}=t,h=(0,i.Re)(a.rq.get(),e,u),f=(0,i.Om)(c,h)/(0,i.m3)(c);return(0,i.hs)(o,c,(0,r.qE)(f,0,1)),(0,i.WQ)(o,o,t.origin)}(t,e,0,0,n)}function d(t,e){const{vector:n,origin:s}=t,o=(0,i.Re)(a.rq.get(),e,s),c=(0,i.Om)(n,o)/(0,i.m3)(n);return(0,r.qE)(c,0,1)}function m(t,e,n){return!!function(t,e,n,s){const o=1e-6,c=t.origin,u=(0,i.WQ)(a.rq.get(),c,t.vector),h=e.origin,f=(0,i.WQ)(a.rq.get(),h,e.vector),l=a.rq.get(),d=a.rq.get();if(l[0]=c[0]-h[0],l[1]=c[1]-h[1],l[2]=c[2]-h[2],d[0]=f[0]-h[0],d[1]=f[1]-h[1],d[2]=f[2]-h[2],Math.abs(d[0])<o&&Math.abs(d[1])<o&&Math.abs(d[2])<o)return!1;const m=a.rq.get();if(m[0]=u[0]-c[0],m[1]=u[1]-c[1],m[2]=u[2]-c[2],Math.abs(m[0])<o&&Math.abs(m[1])<o&&Math.abs(m[2])<o)return!1;const M=l[0]*d[0]+l[1]*d[1]+l[2]*d[2],b=d[0]*m[0]+d[1]*m[1]+d[2]*m[2],g=l[0]*m[0]+l[1]*m[1]+l[2]*m[2],_=d[0]*d[0]+d[1]*d[1]+d[2]*d[2],p=(m[0]*m[0]+m[1]*m[1]+m[2]*m[2])*_-b*b;if(Math.abs(p)<o)return!1;let v=(M*b-g*_)/p,y=(M+b*v)/_;n&&(v=(0,r.qE)(v,0,1),y=(0,r.qE)(y,0,1));const S=a.rq.get(),x=a.rq.get();return S[0]=c[0]+v*m[0],S[1]=c[1]+v*m[1],S[2]=c[2]+v*m[2],x[0]=h[0]+y*d[0],x[1]=h[1]+y*d[1],x[2]=h[2]+y*d[2],s.tA=v,s.tB=y,s.pA=S,s.pB=x,s.distance2=(0,i.hG)(S,x),!0}(t,e,!0,M)&&((0,i.C)(n,M.pA),!0)}const M={tA:0,tB:0,pA:(0,o.vt)(),pB:(0,o.vt)(),distance2:0},b=new s.I(()=>c())},27921(t,e,n){n.d(e,{$Q:()=>v,C:()=>a,Cr:()=>h,O_:()=>u,Qj:()=>c,T7:()=>_,Tj:()=>p,lU:()=>f,mN:()=>y,vE:()=>S,vt:()=>o});var r=n(34727),s=n(35522),i=n(51850);function o(t=x){return[t[0],t[1],t[2],t[3]]}function a(t,e){return function(t,e,n,r,s=o()){return s[0]=t,s[1]=e,s[2]=n,s[3]=r,s}(e[0],e[1],e[2],e[3],t)}function c(t){return t}function u(t,e,n){const r=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],s=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return n[0]=e[0]*s,n[1]=e[1]*s,n[2]=e[2]*s,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}function h(t,e,n,r=o()){const s=n[0]-e[0],i=n[1]-e[1],a=n[2]-e[2],c=t[0]-e[0],u=t[1]-e[1],h=t[2]-e[2],f=i*h-a*u,l=a*c-s*h,d=s*u-i*c,m=f*f+l*l+d*d,M=Math.abs(m-1)>1e-5&&m>1e-12?1/Math.sqrt(m):1;return r[0]=f*M,r[1]=l*M,r[2]=d*M,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function f(t,e,n,r=0,i=Math.floor(n*(1/3)),o=Math.floor(n*(2/3))){if(n<3)return!1;e(d,r);let a=i,c=!1;for(;a<n-1&&!c;)e(m,a),a++,c=!(0,s.t2)(d,m);if(!c)return!1;for(a=Math.max(a,o),c=!1;a<n&&!c;)e(M,a),a++,(0,s.Re)(b,d,m),(0,s.S8)(b,b),(0,s.Re)(g,m,M),(0,s.S8)(g,g),c=!(0,s.t2)(d,M)&&!(0,s.t2)(m,M)&&Math.abs((0,s.Om)(b,g))<l;return c?(h(d,m,M,t),!0):(0!==r||1!==i||2!==o)&&f(t,e,n,0,1,2)}n(78955),n(44280),n(32114),n(32728);const l=.99619469809,d=(0,i.vt)(),m=(0,i.vt)(),M=(0,i.vt)(),b=(0,i.vt)(),g=(0,i.vt)();function _(t,e,n){return function(t){return 0===t||1===t}(S(t,e.origin,e.vector,0,n))}function p(t,e){return y(t,e)>=0}function v(t,e){const n=(0,s.Om)(t,e.ray.direction),r=-y(t,e.ray.origin);if(r<0&&n>=0)return!1;if(n>-1e-6&&n<1e-6)return r>0;if((r<0||n<0)&&!(r<0&&n<0))return!0;const i=r/n;return n>0?i<e.c1&&(e.c1=i):i>e.c0&&(e.c0=i),e.c0<=e.c1}function y(t,e){return(0,s.Om)(t,e)+t[3]}function S(t,e,n,i,o){const a=(0,s.Om)(t,n),c=y(t,e);if(0===a)return c>=0?2:3;let u=-c/a;return 1&i&&(u=(0,r.qE)(u,0,1)),!(4&i)&&u<0||!(8&i)&&u>1?c>=0?2:3:((0,s.WQ)(o,e,(0,s.hs)(o,n,u)),c>=0?0:1)}const x=[0,0,1,0]},71351(t,e,n){n.d(e,{C:()=>h,Cr:()=>f,LV:()=>u,fA:()=>l,vt:()=>a}),n(4576);var r=n(4341),s=(n(77690),n(29242)),i=n(35522),o=n(51850);function a(t){return t?c((0,o.o8)(t.origin),(0,o.o8)(t.direction)):c((0,o.vt)(),(0,o.vt)())}function c(t,e){return{origin:t,direction:e}}function u(t,e){const n=d.get();return n.origin=t,n.direction=e,n}function h(t,e=a()){return l(t.origin,t.direction,e)}function f(t,e,n=a()){return(0,i.C)(n.origin,t),(0,i.Re)(n.direction,e,t),n}function l(t,e,n=a()){return(0,i.C)(n.origin,t),(0,i.C)(n.direction,e),n}n(32114);const d=new r.I(()=>a());(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,s.vt)()},94008(t,e,n){n.d(e,{iy:()=>d}),n(44208),n(53966);var r=n(34727),s=n(34304),i=n(58083),o=n(35522),a=n(51850),c=n(91829),u=n(34275);var h=n(71351),f=n(44280),l=n(32114);class d{constructor(t=0,e=0,n=0,r=0){this.radius=r,"number"==typeof t?this._center=(0,a.fA)(t,e,n):function(t){return e=t,(0,u.vZ)(e)&&e.length>=3||function(t){return((0,u.aI)(t)||Array.isArray(t))&&t.length>=3}(t);var e}(t)||function(t){return(e=t)instanceof Float32Array&&e.length>=4||function(t){return Array.isArray(t)&&t.length>=4}(t);var e}(t)?(this._center=(0,a.ci)(t),this.radius=4===t.length?t[3]:e):(this._center=(0,a.o8)(t.center),this.radius=t.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(t){(0,o.C)(this.center,t)}exactEquals(t){return(0,o.aI)(this._center,t.center)&&this.radius===t.radius}copyFrom(t){return t!==this&&((0,o.C)(this._center,t.center),this.radius=t.radius),this}clone(){return new d(this.center,this.radius)}toVec4(){return(0,c.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(t){return(0,o.hG)(this.center,t)<=this.radius**2}intersectRay(t,e){if(null==t)return!1;if(!this._intersect(t,m))return!1;let{t0:n,t1:r}=m;if((n<0||r<n&&r>0)&&(n=r),n<0)return!1;if(e){const{origin:r,direction:s}=t;e[0]=r[0]+s[0]*n,e[1]=r[1]+s[1]*n,e[2]=r[2]+s[2]*n}return!0}intersectLine(t,e){const n=(0,h.Cr)(t,e);if(!this._intersect(n,m))return[];const{origin:r,direction:i}=n,{t0:c,t1:u}=m,f=t=>{const e=(0,a.vt)();return(0,o.Ln)(e,r,i,t),this.projectPoint(e,e)};return Math.abs(c-u)<(0,s.FD)()?[f(c)]:[f(c),f(u)]}_intersect(t,e){const{origin:n,direction:r}=t,s=M;s[0]=n[0]-this.center[0],s[1]=n[1]-this.center[1],s[2]=n[2]-this.center[2];const i=r[0]*r[0]+r[1]*r[1]+r[2]*r[2];if(0===i)return!1;const o=2*(r[0]*s[0]+r[1]*s[1]+r[2]*s[2]),a=o*o-4*i*(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]-this.radius**2);if(a<0)return!1;const c=Math.sqrt(a);return e.t0=(-o-c)/(2*i),e.t1=(-o+c)/(2*i),!0}projectPoint(t,e){const n=(0,o.Re)(l.rq.get(),t,this.center),r=(0,o.hs)(l.rq.get(),n,this.radius/(0,o.Bw)(n));return(0,o.WQ)(e,r,this.center)}closestPointOnSilhouette(t,e){const n=l.rq.get(),r=l.Rc.get();(0,o.$A)(n,t.origin,t.direction),(0,o.$A)(e,n,t.origin),(0,o.hs)(e,e,1/(0,o.Bw)(e)*this.radius);const s=this._angleToSilhouette(t.origin),a=(0,f.g7)(t.origin,e);return(0,i.$0)(r,a+s,n),(0,o.Z0)(e,e,r),e}frustumCoverage(t,e,n){const r=this.radius,s=r*r,i=t+.5*Math.PI,o=e*e+s-2*Math.cos(i)*e*r,a=Math.sqrt(o),c=o-s;if(c<=0)return.5;const u=Math.sqrt(c),h=Math.acos(u/a)-Math.asin(r/(a/Math.sin(i)));return Math.min(1,(h+.5*n)/n)}_angleToSilhouette(t){const e=(0,o.Re)(l.rq.get(),t,this.center),n=(0,o.Bw)(e),s=this.radius,i=s+Math.abs(s-n);return(0,r.XM)(s/i)}union(t){const e=(0,o.Io)(this._center,t.center),n=this.radius,r=t.radius;return e+r<n?this:e+n<r?(this.copyFrom(t),this):((0,o.Cc)(this._center,this._center,t.center,(e+r-n)/(2*e)),this.radius=(e+n+r)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(t){const{center:e,radius:n}=this,r=t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3];return r<0?Math.min(r+n,0):Math.max(r-n,0)}}new d;const m={t0:0,t1:0},M=(0,a.vt)();(0,a.vt)(),(0,a.vt)()},44280(t,e,n){n.d(e,{g7:()=>a,gr:()=>o});var r=n(34727),s=n(35522),i=n(51850);function o(t,e){return(0,s.Om)(t,e)/(0,s.Bw)(t)}function a(t,e){const n=(0,s.Om)(t,e)/((0,s.Bw)(t)*(0,s.Bw)(e));return-(0,r.XM)(n)}(0,i.vt)(),(0,i.vt)()},32114(t,e,n){n.d(e,{Rc:()=>d,rq:()=>f,Km:()=>l}),n(44208);var r=n(26390),s=n(29242),i=n(9093),o=n(82534),a=n(48163),c=n(51850),u=n(91829);class h{constructor(t){this._create=t,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new h(a.vt)}static createVec3f64(){return new h(c.vt)}static createVec4f64(){return new h(u.vt)}static createMat3f64(){return new h(s.vt)}static createMat4f64(){return new h(i.vt)}static createQuatf64(){return new h(o.vt)}get test(){}}h.createVec2f64();const f=h.createVec3f64(),l=h.createVec4f64(),d=(h.createMat3f64(),h.createMat4f64());h.createQuatf64()},32728(t,e,n){n.d(e,{YH:()=>a,hG:()=>i,nu:()=>c,wp:()=>o}),n(34727);var r=n(35522),s=n(51850);function i(t){const e=t[0]*t[0]+t[4]*t[4]+t[8]*t[8],n=t[1]*t[1]+t[5]*t[5]+t[9]*t[9],r=t[2]*t[2]+t[6]*t[6]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))}function o(t,e){const n=Math.sqrt(e[0]*e[0]+e[4]*e[4]+e[8]*e[8]),s=Math.sqrt(e[1]*e[1]+e[5]*e[5]+e[9]*e[9]),i=Math.sqrt(e[2]*e[2]+e[6]*e[6]+e[10]*e[10]);return(0,r.hZ)(t,n,s,i),t}function a(t,e,n){n=n||t;const s=(0,r.Om)(t,e);(0,r.hZ)(n,t[0]-s*e[0],t[1]-s*e[1],t[2]-s*e[2]),(0,r.S8)(n,n)}function c(t,e,n,i=(0,s.vt)()){const o=(0,r.Bw)(t),a=(0,r.Bw)(e),c=(0,r.Om)(t,e)/(o*a);if(c<.9999999999999999){const s=Math.acos(c),f=((1-n)*o+n*a)/Math.sin(s),l=f/o*Math.sin((1-n)*s),d=f/a*Math.sin(n*s);return(0,r.hs)(u,t,l),(0,r.hs)(h,e,d),(0,r.WQ)(i,u,h)}return(0,r.Cc)(i,t,e,n)}(0,s.vt)(),(0,s.vt)(),(0,s.vt)();const u=(0,s.vt)(),h=(0,s.vt)()},78230(t,e,n){n.d(e,{x:()=>f});var r=n(93687),s=n(15142),i=n(35522),o=n(51850),a=n(82919),c=n(71351),u=n(94008),h=n(620);class f{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new l,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),l.clearPool(),q[0]=null,R.prune(),N.prune()}add(t){const e=Array.from(t);this._grow(e);const n=l.acquire();for(const t of e)++this._objectCount,this._isDegenerate(t)?this._degenerateObjects.add(t):(n.init(this._root),this._add(t,n));l.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=l.acquire();for(const r of t){const t=e??this.objectToBoundingSphere(r);w(t.radius)?(n.init(this._root),M(r,t,n)):this._degenerateObjects.delete(r)}l.release(n),this._shrink()}update(t,e){if(!w(e.radius)&&this._isDegenerate(t))return;const n=function(t){return q[0]=t,q}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const r=(0,c.LV)(t,e);d(this._root,t=>{if(!function(t,e){return v(e.bounds.center,2*-e.halfSize,E),v(e.bounds.center,2*e.halfSize,P),(0,h.O_)(t.origin,t.direction,E,P)}(r,t))return!1;const e=t.node;return e.terminals.forAll(t=>{this._intersectsObject(r,t)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObject(r,t)&&n(t)}),!0})}forEachAlongRayWithVerticalOffset(t,e,n,r){const s=(0,c.LV)(t,e);d(this._root,t=>{if(!function(t,e,n){return v(e.bounds.center,2*-e.halfSize,E),v(e.bounds.center,2*e.halfSize,P),n.applyToMinMax(E,P),(0,h.O_)(t.origin,t.direction,E,P)}(s,t,r))return!1;const e=t.node;return e.terminals.forAll(t=>{this._intersectsObjectWithOffset(s,t,r)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObjectWithOffset(s,t,r)&&n(t)}),!0})}forEach(t){d(this._root,e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0}),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,r=()=>!0,s=1/0){let o=1/0,c=1/0,u=null;const h=S(t,e),f=i=>{if(--s,!r(i))return;const h=this.objectToBoundingSphere(i);if(!(0,a.m7)(n,h))return;const f=x(t,e,h.center),l=f-h.radius,d=f+h.radius;l<o&&(o=l,c=d,u=i)};return m(this._root,r=>{if(s<=0||!(0,a.m7)(n,r.bounds))return!1;if((0,i.hs)(C,h,r.halfSize),(0,i.WQ)(C,C,r.bounds.center),x(t,e,C)>c)return!1;const o=r.node;return o.terminals.forAll(t=>f(t)),null!==o.residents&&o.residents.forAll(t=>f(t)),!0},t,e),u}forEachInDepthRange(t,e,n,r,s,o,c){let u=-1/0,h=1/0;const f={setRange:t=>{1===n?(u=Math.max(u,t.near),h=Math.min(h,t.far)):(u=Math.max(u,-t.far),h=Math.min(h,-t.near))}};f.setRange(r);const l=x(e,n,t),d=S(e,n),M=S(e,-n),b=t=>{if(!c(t))return;const r=this.objectToBoundingSphere(t),i=x(e,n,r.center)-l,d=i-r.radius,m=i+r.radius;d>h||m<u||!(0,a.m7)(o,r)||s(t,f)};m(this._root,t=>{if(!(0,a.m7)(o,t.bounds))return!1;if((0,i.hs)(C,d,t.halfSize),(0,i.WQ)(C,C,t.bounds.center),x(e,n,C)-l>h)return!1;if((0,i.hs)(C,M,t.halfSize),(0,i.WQ)(C,C,t.bounds.center),x(e,n,C)-l<u)return!1;const r=t.node;return r.terminals.forAll(t=>b(t)),null!==r.residents&&r.residents.forAll(t=>b(t)),!0},e,n)}forEachNode(t){d(this._root,e=>t(e.node,e.bounds,e.halfSize,e.depth))}forEachNeighbor(t,e){const n=e.radius,r=e.center,s=e=>{const s=this.objectToBoundingSphere(e),o=s.radius,a=n+o;return!((0,i.hG)(s.center,r)-a*a<=0)||t(e)};let o=!0;const a=t=>{o&&(o=s(t))};d(this._root,t=>{const e=t.bounds.radius,s=n+e;if((0,i.hG)(t.bounds.center,r)-s*s>0)return!1;const c=t.node;return c.terminals.forAll(a),o&&null!==c.residents&&c.residents.forAll(a),o}),o&&this.forEachDegenerateObject(a)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n.radius>0)||n.intersectRay(t)}_intersectsObjectWithOffset(t,e,n){const r=this.objectToBoundingSphere(e);return!(r.radius>0)||n.applyToBoundingSphere(r).intersectRay(t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const r=l.acquire().init(t);this._add(e.at(n),r),l.release(r)}}_grow(t){if(y(t,t=>this.objectToBoundingSphere(t),z),w(z.radius)&&!this._fitsInsideTree(z))if(g(this._root.node))this._root.bounds.copyFrom(z),this._root.halfSize=1.25*this._root.bounds.radius,this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(z);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(z,t):this._growRootAsSubNode(t),l.release(t)}}_rebuildTree(t,e){D.center=e.bounds.center,D.radius=e.halfSize,y([t,D],t=>t,I);const n=l.acquire().init(this._root);this._root.initFrom(null,I,I.radius),this._root.increaseHalfSize(1.25),d(n,t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0)),l.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return d(this._root,t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth)),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t.radius,n=t.center;let r=-1/0;const s=this._root.bounds.center,i=this._root.halfSize;for(let t=0;t<3;t++){const o=s[t]-i-(n[t]-e),a=n[t]+e-(s[t]+i),c=Math.max(0,Math.ceil(o/(2*i))),u=Math.max(0,Math.ceil(a/(2*i)))+1,h=2**Math.ceil(Math.log(c+u)*Math.LOG2E);r=Math.max(r,h),B[t].min=c,B[t].max=u}for(let t=0;t<3;t++){let e=B[t].min,n=B[t].max;const o=(r-(e+n))/2;e+=Math.ceil(o),n+=Math.floor(o);const a=s[t]-i-e*i*2;T.center[t]=a+(n+e)*i}const o=r*i;return T.radius=o*j,l.acquire().initFrom(null,T,o,0)}_growRootAsSubNode(t){const e=this._root.node;z.center=this._root.bounds.center,z.radius=this._root.halfSize,this._root.init(t),t.advanceTo(z,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,r=0;for(;r<e.length&&null==t;)n=r++,t=e[n];for(;r<e.length;)if(e[r++])return-1;return n}_isDegenerate(t){return!w(this.objectToBoundingSphere(t).radius)}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t.radius<=n&&t.center[0]>=e.center[0]-n&&t.center[0]<=e.center[0]+n&&t.center[1]>=e.center[1]-n&&t.center[1]<=e.center[1]+n&&t.center[2]>=e.center[2]-n&&t.center[2]<=e.center[2]+n}_nodeToJSON(t){const e=t.children.map(t=>t?this._nodeToJSON(t):null),n=t.residents?.map(t=>this.objectToBoundingSphere(t)),r=t.terminals?.map(t=>this.objectToBoundingSphere(t));return{children:e,residents:n,terminals:r}}}class l{constructor(){this.bounds=new u.iy,this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,r=this.depth){return this.node=null!=t?t:l.createEmptyNode(),e&&this.bounds.copyFrom(e),this.halfSize=n,this.depth=r,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds.radius=this.halfSize*j}advance(t){let e=this.node.children[t];e||(e=l.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=A[t];return this.bounds.center[0]+=n[0]*this.halfSize,this.bounds.center[1]+=n[1]*this.halfSize,this.bounds.center[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e?.(this,-1),!0;if(this.isLeaf()){if(!n)return e?.(this,-1),!1;this.node.residents=null}const r=this._childIndex(t);e?.(this,r),this.advance(r)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t.radius>this.halfSize/2}_childIndex(t){const e=this.bounds.center;return(e[0]<t.center[0]?1:0)+(e[1]<t.center[1]?2:0)+(e[2]<t.center[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new s.A({shrink:!0}),residents:new s.A({shrink:!0})}}static{this._pool=new r.A(()=>new l)}static acquire(){return l._pool.acquire()}static release(t){l._pool.release(t)}static clearPool(){l._pool.prune()}}function d(t,e){let n=l.acquire().init(t);const r=[n];for(;0!==r.length;){if(n=r.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&r.push(l.acquire().init(n).advance(t));l.release(n)}}function m(t,e,n,r=1){let s=l.acquire().init(t);const i=[s];for(function(t,e,n){if(!N.length)for(let t=0;t<8;++t)N.push({index:0,distance:0});for(let n=0;n<8;++n){const r=A[n];N.data[n].index=n,N.data[n].distance=x(t,e,r)}N.sort((t,e)=>t.distance-e.distance);for(let t=0;t<8;++t)n[t]=N.data[t].index}(n,r,F);0!==i.length;){if(s=i.pop(),e(s)&&!s.isLeaf())for(let t=7;t>=0;--t){const e=F[t];s.node.children[e]&&i.push(l.acquire().init(s).advance(e))}l.release(s)}}function M(t,e,n){R.clear();const r=n.advanceTo(e,(t,e)=>{R.push(t.node),R.push(e)})?n.node.terminals:n.node.residents;if(r.removeUnordered(t),0===r.length)for(let t=R.length-2;t>=0&&b(R.data[t],R.data[t+1]);t-=2);}function b(t,e){return e>=0&&(t.children[e]=null),!!g(t)&&(null===t.residents&&(t.residents=new s.A({shrink:!0})),!0)}function g(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function _(t,e){t[0]=Math.min(t[0],e.center[0]-e.radius),t[1]=Math.min(t[1],e.center[1]-e.radius),t[2]=Math.min(t[2],e.center[2]-e.radius)}function p(t,e){t[0]=Math.max(t[0],e.center[0]+e.radius),t[1]=Math.max(t[1],e.center[1]+e.radius),t[2]=Math.max(t[2],e.center[2]+e.radius)}function v(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function y(t,e,n){E[0]=1/0,E[1]=1/0,E[2]=1/0,P[0]=-1/0,P[1]=-1/0,P[2]=-1/0;for(const n of t){const t=e(n);w(t.radius)&&(_(E,t),p(P,t))}(0,i.Cc)(n.center,E,P,.5),n.radius=Math.max(P[0]-E[0],P[1]-E[1],P[2]-E[2])/2}function S(t,e){let n,r=1/0;for(let s=0;s<8;++s){const i=x(t,e,O[s]);i<r&&(r=i,n=O[s])}return n}function x(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function w(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}const A=[(0,o.fA)(-1,-1,-1),(0,o.fA)(1,-1,-1),(0,o.fA)(-1,1,-1),(0,o.fA)(1,1,-1),(0,o.fA)(-1,-1,1),(0,o.fA)(1,-1,1),(0,o.fA)(-1,1,1),(0,o.fA)(1,1,1)],O=[(0,o.fA)(-1,-1,-1),(0,o.fA)(-1,-1,1),(0,o.fA)(-1,1,-1),(0,o.fA)(-1,1,1),(0,o.fA)(1,-1,-1),(0,o.fA)(1,-1,1),(0,o.fA)(1,1,-1),(0,o.fA)(1,1,1)],j=Math.sqrt(3),q=[null],T=new u.iy,C=(0,o.vt)(),E=(0,o.vt)(),P=(0,o.vt)(),R=new s.A,z=new u.iy,D=new u.iy,I=new u.iy,B=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],N=new s.A,F=[0,0,0,0,0,0,0,0]},56780(t,e,n){n.r(e),n.d(e,{default:()=>_});var r=n(5482),s=n(17676),i=n(24326),o=n(91429),a=n(35522),c=n(51850),u=n(11964),h=n(94008),f=n(78230),l=n(44801);function d(t,e,n){const r=new h.iy;return(0,a.hs)(r.center,t,.5),(0,a.Ln)(r.center,r.center,e,.5),r.radius=(0,a.Io)(r.center,t),(0,a.WQ)(r.center,r.center,n),r}class m{constructor(t,e,n){this.objectId=t,this.target=e,this.distance=n}}class M extends m{constructor(t,e,n){super(t,e,n),this.type="vertex"}}class b extends m{constructor(t,e,n,r,s){super(t,e,n),this.start=r,this.end=s,this.type="edge"}}let g=class{constructor(){this._idToComponent=new Map,this._components=new f.x(t=>t.bounds),this._edges=new f.x(t=>t.bounds),this._tmpLineSegment=(0,u.vt)(),this._tmpP1=(0,c.vt)(),this._tmpP2=(0,c.vt)(),this._tmpP3=(0,c.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,s.Te)(e);const n=t;n.mbs=new h.iy(t.mbsJSON),await this._ensureEdgeLocations(n,e);const r=[];return this._edges.forEachNeighbor(t=>(this._addCandidates(n,t,r),r.length<1e3),n.mbs),{result:{candidates:r}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor(t=>{if(null==t.info){const{id:e,uid:r}=t;n.push({id:e,uid:r})}return!0},t.mbs),!n.length)return;const r={components:n},s=await this.remoteClient.invoke("fetchAllEdgeLocations",r,e??{});for(const t of s.components)this._setFetchEdgeLocations(t)}async add(t){const e=new v(t.id,new h.iy(t.bounds));return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor(n=>(n.component===e&&t.push(n),!0),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;const n=l.HY.createView(t.locations),r=new Array(n.count),s=(0,c.vt)(),i=(0,c.vt)();for(let o=0;o<n.count;o++){n.position0.getVec(o,s),n.position1.getVec(o,i);const a=d(s,i,t.origin),c=new y(e,o,a);r[o]=c}this._edges.add(r);const{objectIds:o,origin:a}=t;e.info={locations:n,objectIds:o,origin:a}}_addCandidates(t,e,n){const{info:r}=e.component,{origin:s,objectIds:i}=r,o=r.locations,c=o.position0.getVec(e.index,this._tmpP1),u=o.position1.getVec(e.index,this._tmpP2);(0,a.WQ)(c,c,s),(0,a.WQ)(u,u,s);const h=i[o.componentIndex.get(e.index)];this._addEdgeCandidate(t,h,c,u,n),p(t,h,c,n),p(t,h,u,n)}_addEdgeCandidate(t,e,n,r,s){if(!t.returnEdge)return;const i=t.mbs.center,o=(0,u.Cr)(n,r,this._tmpLineSegment),h=(0,u._I)(o,i,this._tmpP3);t.mbs.contains(h)&&s.push(new b(e,(0,c.o8)(h),(0,a.Io)(i,h),(0,c.o8)(n),(0,c.o8)(r)))}};g=(0,r.Cg)([(0,o.$K)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],g);const _=g;function p(t,e,n,r){t.returnVertex&&t.mbs.contains(n)&&r.push(new M(e,(0,c.o8)(n),(0,a.Io)(t.mbs.center,n)))}class v{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=(0,i.c)()}}class y{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5217,5243],{25217(t,e,i){i.r(e),i.d(e,{default:()=>u});var s=i(49186),a=i(17676),o=i(83300),n=i(16930),r=i(19211),l=i(35063),h=i(28208),c=i(66655);class u{constructor(t,e,i,o,u,m,f,d,w,g){this.level=t,this.row=e,this.column=i,this.horizontalFieldOfView=o,this.verticalFieldOfView=u,this.yaw=m,this.pitch=f,this.distance=d,this.horizonAngles=w,this.getPixelBlock=g,this._cache=null,this.loadMesh=async t=>{const{level:e,row:i,column:o,horizontalFieldOfView:u,verticalFieldOfView:m,yaw:f,pitch:d,distance:w}=this,{Mesh:g,MeshComponent:p,MeshVertexAttributes:M,panoramicMeshManager:x}=await(0,c.Zg)(),{faces:_,...v}=await x.getFacesWithVertexAttributes({distance:w,yaw:f,horizontalFieldOfView:u,pitch:d,verticalFieldOfView:m});(0,a.Te)(t);const y=await this.getPixelBlock(e,i,o,t);if((0,a.Te)(t),!y)throw new s.A("panoramic-viewer:missing-tile-data",`Tile data for level ${e}, row ${i}, column ${o} is missing`,{level:e,row:i,column:o});const z=await x.convertPixelBlockToImageData(y);(0,a.Te)(t);const b=new g({vertexAttributes:new M(v),components:[new p({faces:_,trustSourceNormals:!0,material:new r.default({colorTexture:new l.default({data:z})})})],spatialReference:n.A.WebMercator});return b.rotate(...this.horizonAngles,{origin:h.ZH}),await b.load(t),this._cache=b,this._cache},this.loadMeshAtDistance=async(t,e)=>{const i=this.distance;return this.distance=t,Math.abs(i-t)>1e-6&&this._cache?this._cache:await this.loadMesh(e)}}get loaded(){return null!==this._cache}get key(){return`${this.level}/${this.row}/${this.column}`}clone(){const{level:t,row:e,column:i,horizontalFieldOfView:s,verticalFieldOfView:a,yaw:n,pitch:r,distance:l,getPixelBlock:h,horizonAngles:c}=this,m=new u(t,e,i,s,a,n,r,l,c,h);if(this._cache){const{vertexAttributes:t,components:e,spatialReference:i}=this._cache,s=e?.map(({material:t,faces:e,trustSourceNormals:i})=>({material:t,faces:e?.slice(),trustSourceNormals:i}));m._cache=new o.default({components:s,vertexAttributes:t.clone(),spatialReference:i})}return m}}},95243(t,e,i){i.r(e),i.d(e,{default:()=>_});var s=i(5482),a=i(69622),o=i(49186),n=i(91429),r=i(5443),l=i(72545),h=i(28208);class c{constructor(){this._keys=[],this._map=new Map}set(t,e){let i=0;for(;i<this._keys.length&&this._keys[i]<t;)i++;return this._keys.splice(i,0,t),this._map.set(t,e),this}get(t){let e=this._keys[0];for(const i of this._keys)t>=i&&(e=i);return this._map.get(e)}clear(){this._keys=[],this._map.clear()}}function u(t){return((t+180)%360+360)%360-180}function m(t){return Math.max(-90,Math.min(90,t))}function f(t,e,i,s){const a=Math.min(Math.max(i,0),360),o=Math.min(Math.max(s,0),180),n=a/2,r=o/2,l=e-90,h=m(l-r),c=m(l+r),f=c>=90||h<=-90||a>=360,d=u(t);return{latMin:h,latMax:c,lonMin:u(d-n),lonMax:u(d+n),fullLongitude:f,hfov:a,vfov:o}}function d(t,e,i,s){if(Math.abs(e-t)>=360||Math.abs(s-i)>=360)return!0;function a(t,e){return t<=e?[[t,e]]:[[t,180],[-180,e]]}const o=a(t,e),n=a(i,s);for(const t of o)for(const e of n)if(!(t[1]<=e[0]||t[0]>=e[1]))return!0;return!1}function w(t,e,i,s){return!(e<=i||t>=s)}function g(t,e,i,s){const a=360/i,o=180/s,n=t*a-180,r=n+a,l=90-e*o,h=l-o;return{lonMinRaw:n,lonMaxRaw:r,lonMin:u(n),lonMax:u(r),latMin:h,latMax:l}}function p(t,[e,i],[s,a],o,n,r,l,h){const{latMin:c,latMax:u,lonMin:m,lonMax:p,fullLongitude:M}=f(n,r,l,h),x=s-e+1,_=a-i+1,v=[];for(let n=e;n<=s;n++){const{lonMin:e,lonMax:s}=g(n,i,x,_);if(M||d(m,p,e,s))for(let e=i;e<=a;e++){const{latMin:i,latMax:s}=g(n,e,x,_);if(!w(c,u,i,s))continue;const a=`${t}/${e}/${n}`,r=o.get(a);r&&v.push(r)}}return v}var M=i(25217);let x=class extends((0,l.G)(a.A)){constructor(t){super(t),this._maximumPyramidLevel=-1,this._pixelAngleToLevelMap=new c,this._tileMap=new Map,this.horizonPitch=0,this.horizonYaw=0,this.horizonRoll=0,this.raster=null,this._fetchRawTile=async(t,e,i,s)=>{await this._initJobHandler();const{pyramidBlockWidth:a,pyramidBlockHeight:o}=this.storageInfo,{minCol:n,maxCol:l,minRow:h,maxRow:c}=this.storageInfo.blockBoundary[t],u=l-n+1,m=c-h+1,f=i*this.imageSize[0]/u,d=e*this.imageSize[1]/m,w=Math.min((i+1)*this.imageSize[0]/u,this.imageSize[0]),g=Math.min((e+1)*this.imageSize[1]/m,this.imageSize[1]),p=w-f,M=g-d,x=new r.A({xmin:f-.5,ymin:.5-g,xmax:w-.5,ymax:.5-d,spatialReference:this.raster.rasterInfo.spatialReference}),{pixelBlock:_}=await this.raster.fetchPixels(x,a??p,o??M,s);return _},this.getLevelTiles=t=>{const e=[],{minCol:i,maxCol:s,minRow:a,maxRow:o}=this.storageInfo.blockBoundary[t];for(let n=a;n<=o;n++)for(let a=i;a<=s;a++){const i=this._tileMap.get(`${t}/${n}/${a}`);i&&e.push(i)}return e.length?e:null},this.getLevelWithPixelAngle=t=>this._pixelAngleToLevelMap.get(t)??0,this.getLowResolutionTiles=()=>{const t=this.maximumPyramidLevel;return t<0?null:this.getLevelTiles(t)},this.getTiles=(t,e,i,s,a)=>{const{minCol:o,minRow:n,maxCol:r,maxRow:l}=this.storageInfo.blockBoundary[t];return p(t,[o,n],[r,l],this._tileMap,e,i,s,a)}}initialize(){this._processLevels()}destroy(){this.raster.rasterJobHandler=null,this.raster=null,this._shutdownJobHandler(),this._tileMap.clear(),this._pixelAngleToLevelMap.clear()}async _initJobHandler(){this._rasterJobHandler||(await super._initJobHandler(),this.raster.rasterJobHandler=this._rasterJobHandler)}_processLevels(){const{blockBoundary:t,tileInfo:e}=this.storageInfo,i=t?.length;if(!i)throw new o.A("panoramic-viewer:missing-pyramid-resolutions","TIFF/MRF must have pyramid resolutions defined",{rasterId:this.raster.rasterId});this._tileMap.clear();for(let s=0;s<i;s++){const{maxCol:i,maxRow:a,minCol:o,minRow:n}=t[s],r=180/(a-n+1),l=360/(i-o+1),c=l/e.size[0];if(c>h.NU)break;this._pixelAngleToLevelMap.set(c,s);for(let t=n;t<=a;t++){const e=180-(t+.5)*r;for(let a=o;a<=i;a++){const i=(a+.5)*l-180;this._tileMap.set(`${s}/${t}/${a}`,new M.default(s,t,a,l,r,i,e,h.vK/2,[this.horizonPitch,this.horizonRoll,this.horizonYaw],this._fetchRawTile))}}this._maximumPyramidLevel=s}}get rasterInfo(){return this.raster.rasterInfo}get storageInfo(){return this.rasterInfo.storageInfo}get imageSize(){const{width:t,height:e}=this.rasterInfo;return[t,e]}get maximumPyramidLevel(){return this._maximumPyramidLevel}};(0,s.Cg)([(0,n.MZ)()],x.prototype,"horizonPitch",void 0),(0,s.Cg)([(0,n.MZ)()],x.prototype,"horizonYaw",void 0),(0,s.Cg)([(0,n.MZ)()],x.prototype,"horizonRoll",void 0),(0,s.Cg)([(0,n.MZ)()],x.prototype,"raster",void 0),x=(0,s.Cg)([(0,n.$K)("esri.widgets.PanoramicViewer.support.PanoramicTilePyramid")],x);const _=x}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5077],{25077(e,t,r){r.r(t),r.d(t,{default:()=>Q});var i=r(5482),s=r(37838),a=r(11254),o=r(69540),n=r(49186),l=r(36563),u=r(25728),d=r(17676),p=r(84952),h=r(91429),c=r(16930),y=r(55156),m=r(60950),f=r(89808),g=r(99959);const v=Symbol("isDimensionFeatureGraphicOrigin");var E;class T extends g.A{get[(E=v,m.ym)](){return this.layer}get[y.e](){return this.layer}get[f.Q](){return this.layer}constructor(e){super(),this[E]=!0,this.type="dimension-feature",this.layer=e}get id(){return this.layer.id}}var I=r(4146),b=r(52136),S=r(18768),M=r(63074),w=r(69208),C=r(10086),A=r(34287),P=r(8303),D=r(54310),F=r(25036),L=r(82935),O=r(60694),q=r(10873),Z=r(15426),j=r(17036),G=r(30524),N=r(91908),_=r(97552),x=r(30291),k=r(36005);const R="dimension-feature-layer",X=(0,j.p)();let Y=class extends((0,C.j)((0,M.dM)((0,L.e)((0,F.j)((0,D.J)((0,S.b)((0,A.q)((0,P.A)((0,u.M)((0,w.d)((0,b.p)((0,o.OU)(I.A))))))))))))){constructor(e){super(e),this.barrierWeight="high",this.fields=null,this.fieldsIndex=null,this.graphicOrigin=new T(this),this.operationalLayerType="ArcGISDimensionLayer",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.source=null,this.sublayerTitleMode="item-title",this.supportedSourceTypes=new Set(["Dimension Layer"]),this.type="dimension-feature",this._dataElementPromise=null}destroy(){this.source?.destroy()}load(e){const t=e?.signal,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(d.QP).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url)throw new n.A(`${R}:missing-url`,"DimensionFeatureLayer must be created with a url");return this.initLayerProperties(await this.createGraphicsSource(t))}).then(()=>(0,Z.VA)(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get effectiveEditingEnabled(){return!1}get defaultPopupTemplate(){return this.createPopupTemplate()}readTitleFromService(e,t){const{url:r}=this,i=t.name||(0,O.qg)(r)?.title;switch(this.sublayerTitleMode){case"item-title":if(r)return(0,O.yG)(r,i);break;case"item-title-and-service-name":{let e=this.portalItem?.title;if(e&&e!==i)return e=(0,O.cr)(e),i?`${e} - ${(0,O.cr)(i)}`:e;break}}return i?(0,O.cr)(i):void 0}readTitleFromPortalItem(e){return"item-title"===this.sublayerTitleMode?e:void 0}createPopupTemplate(e){return(0,x.tn)(this,e)}async createGraphicsSource(e){const t={stack:[],error:void 0,hasError:!1};try{const{default:s}=await(0,d.qr)(Promise.all([r.e(893),r.e(3636),r.e(3467)]).then(r.bind(r,65515)),e),a=new s({layer:this,supportedSourceTypes:this.supportedSourceTypes});return(0,i.mS)(t,(0,l.Bf)((0,d.u7)(e,()=>a.cancelLoad())??(0,l.hA)()),!1),await a.load({signal:e}),a}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}createQuery(){const e=(0,Z.VZ)(this);return e.where=this.definitionExpression||"1=1",e}async fetchDataElement(e){if(this._dataElementPromise)return this._dataElementPromise;if(!this.url)throw new Error("InternalError: A URL is required to retrieve the data element for this layer.");const t=(0,p.fj)(this.url,"queryDataElements"),r={f:"json",layers:this.layerId};return this._dataElementPromise=(0,a.A)(t,{...e,responseType:"json",query:r}).then(e=>{const t=e.data.layerDataElements,r=this.layerId,i=t.find(e=>e.layerId===r);if(!i)throw new n.A("fetchDataElement:not-available","A data element for this layer could not be retrieved.");return i.dataElement}),this._dataElementPromise}getFieldDomain(e,t){return(0,Z.Vq)(this,e,t,this.getField(e)?.domain??null)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(_.A.from(e)??r.createQuery(),t),s=this.graphicOrigin;if(i?.features)for(const e of i.features)e.layer=e.sourceLayer=r,e.origin=s;return i}async queryObjectIds(e,t){const r=await this.load();return r.source.queryObjectIds(_.A.from(e)??r.createQuery(),t)}async queryFeatureCount(e,t){const r=await this.load();return r.source.queryFeatureCount(_.A.from(e)??r.createQuery(),t)}async queryExtent(e,t){const r=await this.load();return r.source.queryExtent(_.A.from(e)??r.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&(0,N.D)(this,e)}async initLayerProperties(e){this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),(0,G.sv)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,Z.jp)(this)}_verifySource(){if(this.version&&this.version<10.8)throw new n.A(R+":unsupported-version","The feature service must be version 10.8 or above.");const e=["DIMLENGTH","BEGINX","BEGINY","ENDX","ENDY","DIMX","DIMY","TEXTX","TEXTY","DIMTYPE","EXTANGLE","STYLEID","USECUSTOMLENGTH","CUSTOMLENGTH","DIMDISPLAY","EXTDISPLAY","MARKERDISPLAY","TEXTANGLE"],t=e.filter(e=>!this.fieldsIndex.has(e));if(t.length)throw new n.A(R+":missing-fields","There are missing fields to operate properly",{requiredFields:e,missingFields:t})}_fetchFirstValidLayerId(e){return(0,a.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const t=e.data;if(!t)return;this.applyPreferredHost(t);const r=[...t.layers||[],...t.tables||[]];return r.find(({type:e})=>!e||this.supportedSourceTypes.has(e))?.id})}};(0,i.Cg)([(0,h.MZ)({type:c.A,json:{origins:{service:{read:{source:"sourceSpatialReference"}}}}})],Y.prototype,"attributeSpatialReference",void 0),(0,i.Cg)([(0,h.MZ)(q.es)],Y.prototype,"barrierWeight",void 0),(0,i.Cg)([(0,h.MZ)({json:{write:!0}})],Y.prototype,"editingEnabled",null),(0,i.Cg)([(0,h.MZ)({readOnly:!0})],Y.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,h.MZ)({...X.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Y.prototype,"fields",void 0),(0,i.Cg)([(0,h.MZ)(X.fieldsIndex)],Y.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0,clonable:!1})],Y.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,h.MZ)(q.id)],Y.prototype,"id",void 0),(0,i.Cg)([(0,h.MZ)({type:["ArcGISDimensionLayer"]})],Y.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,h.MZ)(X.outFields)],Y.prototype,"outFields",void 0),(0,i.Cg)([(0,h.MZ)(q.M6)],Y.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,h.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],Y.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0})],Y.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,h.MZ)({clonable:!1,readOnly:!0})],Y.prototype,"source",void 0),(0,i.Cg)([(0,h.MZ)({type:String})],Y.prototype,"sublayerTitleMode",void 0),(0,i.Cg)([(0,k.w)("service","title",["name"])],Y.prototype,"readTitleFromService",null),(0,i.Cg)([(0,k.w)("portal-item","title")],Y.prototype,"readTitleFromPortalItem",null),(0,i.Cg)([(0,h.MZ)({json:{read:!1},value:"dimension-feature",readOnly:!0})],Y.prototype,"type",void 0),Y=(0,i.Cg)([(0,h.$K)("esri.layers.DimensionFeatureLayer")],Y);const Q=Y}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5217],{25217(e,t,i){i.r(t),i.d(t,{default:()=>w});var a=i(49186),s=i(17676),c=i(83300),l=i(16930),o=i(19211),n=i(35063),r=i(28208),h=i(66655);class w{constructor(e,t,i,c,w,u,d,f,m,p){this.level=e,this.row=t,this.column=i,this.horizontalFieldOfView=c,this.verticalFieldOfView=w,this.yaw=u,this.pitch=d,this.distance=f,this.horizonAngles=m,this.getPixelBlock=p,this._cache=null,this.loadMesh=async e=>{const{level:t,row:i,column:c,horizontalFieldOfView:w,verticalFieldOfView:u,yaw:d,pitch:f,distance:m}=this,{Mesh:p,MeshComponent:v,MeshVertexAttributes:g,panoramicMeshManager:A}=await(0,h.Zg)(),{faces:x,...M}=await A.getFacesWithVertexAttributes({distance:m,yaw:d,horizontalFieldOfView:w,pitch:f,verticalFieldOfView:u});(0,s.Te)(e);const V=await this.getPixelBlock(t,i,c,e);if((0,s.Te)(e),!V)throw new a.A("panoramic-viewer:missing-tile-data",`Tile data for level ${t}, row ${i}, column ${c} is missing`,{level:t,row:i,column:c});const b=await A.convertPixelBlockToImageData(V);(0,s.Te)(e);const k=new p({vertexAttributes:new g(M),components:[new v({faces:x,trustSourceNormals:!0,material:new o.default({colorTexture:new n.default({data:b})})})],spatialReference:l.A.WebMercator});return k.rotate(...this.horizonAngles,{origin:r.ZH}),await k.load(e),this._cache=k,this._cache},this.loadMeshAtDistance=async(e,t)=>{const i=this.distance;return this.distance=e,Math.abs(i-e)>1e-6&&this._cache?this._cache:await this.loadMesh(t)}}get loaded(){return null!==this._cache}get key(){return`${this.level}/${this.row}/${this.column}`}clone(){const{level:e,row:t,column:i,horizontalFieldOfView:a,verticalFieldOfView:s,yaw:l,pitch:o,distance:n,getPixelBlock:r,horizonAngles:h}=this,u=new w(e,t,i,a,s,l,o,n,h,r);if(this._cache){const{vertexAttributes:e,components:t,spatialReference:i}=this._cache,a=t?.map(({material:e,faces:t,trustSourceNormals:i})=>({material:e,faces:t?.slice(),trustSourceNormals:i}));u._cache=new c.default({components:a,vertexAttributes:e.clone(),spatialReference:i})}return u}}}}]);