@arcgis/core 4.28.0-next.20230821 → 4.28.0-next.20230822

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 (183) hide show
  1. package/arcade/functions/geomasync.js +1 -1
  2. package/arcade/portalUtils.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/0746319459dbcd3ab6f7.js +1 -0
  5. package/assets/esri/core/workers/chunks/217910f88fe2c03e6bdd.js +1 -0
  6. package/assets/esri/core/workers/chunks/54aaa21144431b29b6ed.js +1 -0
  7. package/assets/esri/core/workers/chunks/{46f6b77e586d78aeb75c.js → 6866dee1c7e2f230ad08.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{d6c96a20e9640b433719.js → 7dad40179a9767ea9087.js} +56 -56
  9. package/assets/esri/core/workers/chunks/{05ab09713d599687afa3.js → c6bd9c400615107591ec.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{4922a0fed7cbc6895882.js → f701a5afa1b730c51a49.js} +1 -1
  11. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ar.json +1 -0
  12. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_bg.json +1 -0
  13. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_bs.json +1 -0
  14. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ca.json +1 -0
  15. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_cs.json +1 -0
  16. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_da.json +1 -0
  17. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_de.json +1 -0
  18. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_el.json +1 -0
  19. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_es.json +1 -0
  20. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_et.json +1 -0
  21. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_fi.json +1 -0
  22. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_fr.json +1 -0
  23. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_he.json +1 -0
  24. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_hr.json +1 -0
  25. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_hu.json +1 -0
  26. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_id.json +1 -0
  27. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_it.json +1 -0
  28. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ja.json +1 -0
  29. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ko.json +1 -0
  30. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_lt.json +1 -0
  31. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_lv.json +1 -0
  32. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_nb.json +1 -0
  33. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_nl.json +1 -0
  34. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_pl.json +1 -0
  35. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_pt-BR.json +1 -0
  36. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_pt-PT.json +1 -0
  37. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ro.json +1 -0
  38. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ru.json +1 -0
  39. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sk.json +1 -0
  40. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sl.json +1 -0
  41. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sr.json +1 -0
  42. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sv.json +1 -0
  43. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_th.json +1 -0
  44. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_tr.json +1 -0
  45. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_uk.json +1 -0
  46. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_vi.json +1 -0
  47. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_zh-CN.json +1 -0
  48. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_zh-HK.json +1 -0
  49. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_zh-TW.json +1 -0
  50. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  51. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  52. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  53. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  54. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  55. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  56. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  57. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  58. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  59. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  60. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  61. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  62. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  63. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  64. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  65. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  66. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  67. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  68. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  69. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  70. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  71. package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
  72. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  73. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  74. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  75. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  76. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  77. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  78. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  79. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  80. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  81. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  82. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  83. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  84. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  85. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  86. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  87. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  88. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  89. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ar.json +1 -1
  90. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bg.json +1 -1
  91. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bs.json +1 -1
  92. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ca.json +1 -1
  93. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_cs.json +1 -1
  94. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_da.json +1 -1
  95. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_de.json +1 -1
  96. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_el.json +1 -1
  97. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_es.json +1 -1
  98. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_et.json +1 -1
  99. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fi.json +1 -1
  100. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fr.json +1 -1
  101. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_he.json +1 -1
  102. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hr.json +1 -1
  103. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hu.json +1 -1
  104. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_id.json +1 -1
  105. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_it.json +1 -1
  106. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ja.json +1 -1
  107. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ko.json +1 -1
  108. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lt.json +1 -1
  109. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lv.json +1 -1
  110. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nb.json +1 -1
  111. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nl.json +1 -1
  112. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pl.json +1 -1
  113. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-BR.json +1 -1
  114. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-PT.json +1 -1
  115. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ro.json +1 -1
  116. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ru.json +1 -1
  117. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sk.json +1 -1
  118. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sl.json +1 -1
  119. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sr.json +1 -1
  120. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sv.json +1 -1
  121. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_th.json +1 -1
  122. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_tr.json +1 -1
  123. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_uk.json +1 -1
  124. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_vi.json +1 -1
  125. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-CN.json +1 -1
  126. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-HK.json +1 -1
  127. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-TW.json +1 -1
  128. package/chunks/LineSeries.js +1 -1
  129. package/chunks/Theme.js +1 -1
  130. package/chunks/chartUtilsAm5.js +1 -1
  131. package/layers/support/layerUtils.js +1 -1
  132. package/package.json +1 -1
  133. package/portal/support/utils.js +5 -0
  134. package/smartMapping/popup/support/utils.js +1 -1
  135. package/support/revision.js +1 -1
  136. package/symbols/cim/CIMImageColorSubstitutionHelper.js +1 -1
  137. package/symbols/support/previewSymbol3D.js +1 -1
  138. package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
  139. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  140. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  141. package/views/3d/analysis/images/Factory.js +5 -0
  142. package/views/3d/interactive/Manipulator3D.js +1 -1
  143. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
  144. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  145. package/views/3d/interactive/visualElements/VisualElementResources.js +1 -1
  146. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  147. package/views/3d/layers/I3SMeshView3D.js +1 -1
  148. package/views/3d/layers/MediaLayerView3D.js +1 -1
  149. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  150. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  151. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  152. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  153. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  154. package/views/3d/support/StreamTextureCollection.js +1 -1
  155. package/views/3d/support/TextureCollection.js +1 -1
  156. package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
  157. package/views/3d/webgl-engine/Stage.js +1 -1
  158. package/views/3d/webgl-engine/lib/ContentObject.js +1 -1
  159. package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
  160. package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
  161. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  162. package/views/3d/webgl-engine/lib/ITexture.js +5 -0
  163. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  164. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  165. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  166. package/views/3d/webgl-engine/parts/Model.js +1 -1
  167. package/views/draw/DrawManipulator.js +1 -1
  168. package/views/interactive/GraphicManipulator.js +1 -1
  169. package/views/interactive/ManipulatorCollection.js +1 -1
  170. package/views/interactive/ToolViewManagerManipulatorState.js +1 -1
  171. package/views/support/layerViewUtils.js +1 -1
  172. package/widgets/Sketch.js +1 -1
  173. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  174. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  175. package/assets/esri/core/workers/chunks/4e39252f40bc57be9d12.js +0 -1
  176. package/assets/esri/core/workers/chunks/c99fa4189a114370b004.js +0 -1
  177. package/assets/esri/core/workers/chunks/ebd006fcd568a7731115.js +0 -1
  178. package/views/3d/analysis/Slice/images/Factory.js +0 -5
  179. /package/assets/esri/views/3d/analysis/{Slice/images → images}/heading-rotate.ts.svg +0 -0
  180. /package/assets/esri/views/3d/analysis/{Slice/images → images}/tilt-rotate.ts.svg +0 -0
  181. /package/views/3d/analysis/{Slice/images → images}/generateTextures.js +0 -0
  182. /package/views/3d/analysis/{Slice/images → images}/heading-rotate-svg.js +0 -0
  183. /package/views/3d/analysis/{Slice/images → images}/tilt-rotate-svg.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8758],{48758:(e,n,t)=>{t.r(n),t.d(n,{registerFunctions:()=>v});var a=t(48853),i=t(28228),r=t(33586),l=t(27535),s=t(15274),o=t(28924),f=t(67651),u=t(12384),c=t(61363),d=t(26520),m=t(70409),y=t(84328),h=t(85065),p=t(63991),g=t(75148),w=t(17805),F=t(3823),I=t(90658),D=t(36515),E=t(24240),x=t(95330),N=t(41534),b=t(19238),S=t(1231),C=t(48522);async function A(e,n,t){const a=e.getVariables();if(a.length>0){const i=[];for(let e=0;e<a.length;e++){const r={name:a[e]};i.push(await n.evaluateIdentifier(t,r))}const r={};for(let e=0;e<a.length;e++)r[a[e]]=i[e];return e.parameters=r,e}return e}function T(e,n,t=null){for(const t in e)if(t.toLowerCase()===n.toLowerCase())return e[t];return t}function P(e){if(null===e)return null;const n={type:T(e,"type",""),name:T(e,"name","")};if("range"===n.type)n.range=T(e,"range",[]);else{n.codedValues=[];for(const t of T(e,"codedValues",[]))n.codedValues.push({name:T(t,"name",""),code:T(t,"code",null)})}return n}function $(e){if(null===e)return null;const n={},t=T(e,"wkt",null);null!==t&&(n.wkt=t);const a=T(e,"wkid",null);return null!==a&&(n.wkid=a),n}function H(e){if(null===e)return null;const n={hasZ:T(e,"hasz",!1),hasM:T(e,"hasm",!1)},t=T(e,"spatialreference",null);t&&(n.spatialReference=$(t));const a=T(e,"x",null);if(null!==a)return n.x=a,n.y=T(e,"y",null),n;const i=T(e,"rings",null);if(null!==i)return n.rings=i,n;const r=T(e,"paths",null);if(null!==r)return n.paths=r,n;const l=T(e,"points",null);if(null!==l)return n.points=l,n;for(const t of["xmin","xmax","ymin","ymax","zmin","zmax","mmin","mmax"]){const a=T(e,t,null);null!==a&&(n[t]=a)}return n}function v(e){"async"===e.mode&&(e.functions.timezone=function(n,t){return e.standardFunctionAsync(n,t,(async(e,i,s)=>{if((0,c.C)(s,1,2,n,t),(0,c.r)(s[0])){if(await s[0].load(),1===s.length||null===s[1])return s[0].dateTimeReferenceFieldIndex.layerDateFieldsTimeZone;if(!(s[1]instanceof r.Z)||!1===s[1].hasField("type"))throw new l.aV(n,l.rH.InvalidParameter,t);const e=s[1].field("type");if(!1===(0,c.c)(e))throw new l.aV(n,l.rH.InvalidParameter,t);switch((0,c.j)(e).toLowerCase()){case"preferredtimezone":return s[0].dateTimeReferenceFieldIndex.layerPreferredTimeZone;case"editfieldsinfo":return s[0].dateTimeReferenceFieldIndex.layerEditFieldsTimeZone;case"timeinfo":return s[0].dateTimeReferenceFieldIndex.layerTimeInfoTimeZone;case"field":if(s[1].hasField("fieldname")&&(0,c.c)(s[1].field("fieldname")))return s[0].dateTimeReferenceFieldIndex.fieldTimeZone((0,c.j)(s[1].field("fieldname")))}throw new l.aV(n,l.rH.InvalidParameter,t)}const o=(0,c.l)(s[0],(0,c.J)(n));if(null===o)return null;const f=o.timeZone;return"system"===f?a.iG.systemTimeZoneCanonicalName:f}))},e.functions.sqltimestamp=function(n,t){return e.standardFunctionAsync(n,t,(async(e,a,i)=>{(0,c.C)(i,1,3,n,t);const r=i[0];if((0,c.k)(r)){if(1===i.length)return r.toSQLString();if(2===i.length)return r.changeTimeZone((0,c.j)(i[1])).toSQLString();throw new l.aV(n,l.rH.InvalidParameter,t)}if((0,c.r)(r)){if(3!==i.length)throw new l.aV(n,l.rH.InvalidParameter,t);await r.load();const e=(0,c.j)(i[1]);if(!1===(0,c.k)(i[2]))throw new l.aV(n,l.rH.InvalidParameter,t);const a=r.fieldTimeZone(e);return null===a?i[2].toSQLString():i[2].changeTimeZone(a).toSQLString()}throw new l.aV(n,l.rH.InvalidParameter,t)}))},e.signatures.push({name:"sqltimestamp",min:2,max:4}),e.functions.featuresetbyid=function(n,t){return e.standardFunctionAsync(n,t,((e,a,i)=>{if((0,c.C)(i,2,4,n,t),i[0]instanceof o.Z){const e=(0,c.j)(i[1]);let a=(0,c.F)(i[2],null);const r=(0,c.h)((0,c.F)(i[3],!0));if(null===a&&(a=["*"]),!1===(0,c.m)(a))throw new l.aV(n,l.rH.InvalidParameter,t);return i[0].featureSetById(e,r,a)}throw new l.aV(n,l.rH.InvalidParameter,t)}))},e.signatures.push({name:"featuresetbyid",min:2,max:4}),e.functions.getfeatureset=function(n,t){return e.standardFunctionAsync(n,t,((e,a,i)=>{if((0,c.C)(i,1,2,n,t),(0,c.p)(i[0])){let e=(0,c.F)(i[1],"datasource");return null===e&&(e="datasource"),e=(0,c.j)(e).toLowerCase(),(0,f.convertToFeatureSet)(i[0].fullSchema(),e,n.lrucache,n.interceptor,n.spatialReference)}throw new l.aV(n,l.rH.InvalidParameter,t)}))},e.signatures.push({name:"getfeatureset",min:1,max:2}),e.functions.featuresetbyportalitem=function(n,t){return e.standardFunctionAsync(n,t,((e,a,r)=>{if((0,c.C)(r,2,5,n,t),null===r[0])throw new l.aV(n,l.rH.PortalRequired,t);if(r[0]instanceof i.Z){const e=(0,c.j)(r[1]),a=(0,c.j)(r[2]);let i=(0,c.F)(r[3],null);const s=(0,c.h)((0,c.F)(r[4],!0));if(null===i&&(i=["*"]),!1===(0,c.m)(i))throw new l.aV(n,l.rH.InvalidParameter,t);let o=null;return o=n.services&&n.services.portal?n.services.portal:C.Z.getDefault(),o=(0,d._)(r[0],o),(0,f.constructFeatureSetFromPortalItem)(e,a,n.spatialReference,i,s,o,n.lrucache,n.interceptor)}if(!1===(0,c.c)(r[0]))throw new l.aV(n,l.rH.PortalRequired,t);const s=(0,c.j)(r[0]),o=(0,c.j)(r[1]);let u=(0,c.F)(r[2],null);const m=(0,c.h)((0,c.F)(r[3],!0));if(null===u&&(u=["*"]),!1===(0,c.m)(u))throw new l.aV(n,l.rH.InvalidParameter,t);return(0,f.constructFeatureSetFromPortalItem)(s,o,n.spatialReference,u,m,n.services?.portal??C.Z.getDefault(),n.lrucache,n.interceptor)}))},e.signatures.push({name:"featuresetbyportalitem",min:2,max:5}),e.functions.featuresetbyname=function(n,t){return e.standardFunctionAsync(n,t,((e,a,i)=>{if((0,c.C)(i,2,4,n,t),i[0]instanceof o.Z){const e=(0,c.j)(i[1]);let a=(0,c.F)(i[2],null);const r=(0,c.h)((0,c.F)(i[3],!0));if(null===a&&(a=["*"]),!1===(0,c.m)(a))throw new l.aV(n,l.rH.InvalidParameter,t);return i[0].featureSetByName(e,r,a)}throw new l.aV(n,l.rH.InvalidParameter,t)}))},e.signatures.push({name:"featuresetbyname",min:2,max:4}),e.functions.featureset=function(n,t){return e.standardFunction(n,t,((e,a,i)=>{(0,c.C)(i,1,1,n,t);let s=i[0];const o={layerDefinition:{geometryType:"",objectIdField:"",hasM:!1,hasZ:!1,globalIdField:"",typeIdField:"",fields:[]},featureSet:{geometryType:"",features:[]}};if((0,c.c)(s))s=JSON.parse(s),void 0!==s.layerDefinition?(o.layerDefinition=s.layerDefinition,o.featureSet=s.featureSet,s.layerDefinition.spatialReference&&(o.layerDefinition.spatialReference=s.layerDefinition.spatialReference)):(o.featureSet.features=s.features,o.featureSet.geometryType=s.geometryType,o.layerDefinition.geometryType=o.featureSet.geometryType,o.layerDefinition.objectIdField=s.objectIdFieldName??"",o.layerDefinition.typeIdField=s.typeIdFieldName,o.layerDefinition.globalIdField=s.globalIdFieldName,o.layerDefinition.fields=s.fields,s.spatialReference&&(o.layerDefinition.spatialReference=s.spatialReference));else{if(!(i[0]instanceof r.Z))throw new l.aV(n,l.rH.InvalidParameter,t);{s=JSON.parse(i[0].castToText(!0));const e=T(s,"layerdefinition");if(null!==e){o.layerDefinition.geometryType=T(e,"geometrytype",""),o.featureSet.geometryType=o.layerDefinition.geometryType,o.layerDefinition.globalIdField=T(e,"globalidfield",""),o.layerDefinition.objectIdField=T(e,"objectidfield",""),o.layerDefinition.typeIdField=T(e,"typeidfield",""),o.layerDefinition.hasZ=!0===T(e,"hasz",!1),o.layerDefinition.hasM=!0===T(e,"hasm",!1);const n=T(e,"spatialreference",null);n&&(o.layerDefinition.spatialReference=$(n));for(const n of T(e,"fields",[])){const e={name:T(n,"name",""),alias:T(n,"alias",""),type:T(n,"type",""),nullable:T(n,"nullable",!0),editable:T(n,"editable",!0),length:T(n,"length",null),domain:P(T(n,"domain"))};o.layerDefinition.fields.push(e)}const t=T(s,"featureset",null);if(t){const e={};for(const n of o.layerDefinition.fields)e[n.name.toLowerCase()]=n.name;for(const n of T(t,"features",[])){const t={},a=T(n,"attributes",{});for(const n in a)t[e[n.toLowerCase()]]=a[n];o.featureSet.features.push({attributes:t,geometry:H(T(n,"geometry",null))})}}}else{o.layerDefinition.hasZ=!0===T(s,"hasz",!1),o.layerDefinition.hasM=!0===T(s,"hasm",!1),o.layerDefinition.geometryType=T(s,"geometrytype",""),o.featureSet.geometryType=o.layerDefinition.geometryType,o.layerDefinition.objectIdField=T(s,"objectidfieldname",""),o.layerDefinition.typeIdField=T(s,"typeidfieldname","");const e=T(s,"spatialreference",null);e&&(o.layerDefinition.spatialReference=$(e));let n=T(s,"fields",null);if((0,c.m)(n))for(const e of n){const n={name:T(e,"name",""),alias:T(e,"alias",""),type:T(e,"type",""),nullable:T(e,"nullable",!0),editable:T(e,"editable",!0),length:T(e,"length",null),domain:P(T(e,"domain"))};o.layerDefinition.fields.push(n)}else n=null,o.layerDefinition.fields=n;const t={};for(const e of o.layerDefinition.fields)t[e.name.toLowerCase()]=e.name;let a=T(s,"features",null);if((0,c.m)(a))for(const e of a){const n={},a=T(e,"attributes",{});for(const e in a)n[t[e.toLowerCase()]]=a[e];o.featureSet.features.push({attributes:n,geometry:H(T(e,"geometry",null))})}else a=null,o.featureSet.features=a}}}if(!1===function(e){return!!e.layerDefinition&&!!e.featureSet&&!1!==function(e,n){for(const n of["",null,"esriGeometryNull","esriGeometryPoint","esriGeometryPolyline","esriGeometryPolygon","esriGeometryMultipoint","esriGeometryEnvelope"])if(n===e)return!0;return!1}(e.layerDefinition.geometryType)&&!1!==(0,c.m)(e.layerDefinition.fields)&&!1!==(0,c.m)(e.featureSet.features)}(o))throw new l.aV(n,l.rH.InvalidParameter,t);return""===(o?.layerDefinition?.geometryType||"")&&(o.layerDefinition.geometryType="esriGeometryNull"),w.Z.create(o,n.spatialReference)}))},e.signatures.push({name:"featureset",min:1,max:1}),e.functions.filter=function(n,t){return e.standardFunctionAsync(n,t,(async(a,i,r)=>{if((0,c.C)(r,2,2,n,t),(0,c.m)(r[0])||(0,c.o)(r[0])){const e=[];let a=r[0];a instanceof u.Z&&(a=a.toArray());let i=null;if(!(0,c.i)(r[1]))throw new l.aV(n,l.rH.InvalidParameter,t);i=r[1].createFunction(n);for(const n of a){const t=i(n);(0,x.y8)(t)?!0===await t&&e.push(n):!0===t&&e.push(n)}return e}if((0,c.r)(r[0])){const t=await r[0].load(),a=N.WhereClause.create(r[1],t.getFieldsIndex()),i=a.getVariables();if(i.length>0){const t=[];for(let a=0;a<i.length;a++){const r={name:i[a]};t.push(await e.evaluateIdentifier(n,r))}const l={};for(let e=0;e<i.length;e++)l[i[e]]=t[e];return a.parameters=l,new y.Z({parentfeatureset:r[0],whereclause:a})}return new y.Z({parentfeatureset:r[0],whereclause:a})}throw new l.aV(n,l.rH.InvalidParameter,t)}))},e.signatures.push({name:"filter",min:2,max:2}),e.functions.orderby=function(n,t){return e.standardFunctionAsync(n,t,(async(e,a,i)=>{if((0,c.C)(i,2,2,n,t),(0,c.r)(i[0])){const e=new F.Z(i[1]);return new h.Z({parentfeatureset:i[0],orderbyclause:e})}throw new l.aV(n,l.rH.InvalidParameter,t)}))},e.signatures.push({name:"orderby",min:2,max:2}),e.functions.top=function(n,t){return e.standardFunctionAsync(n,t,(async(e,a,i)=>{if((0,c.C)(i,2,2,n,t),(0,c.r)(i[0]))return new p.Z({parentfeatureset:i[0],topnum:i[1]});if((0,c.m)(i[0]))return(0,c.g)(i[1])>=i[0].length?i[0].slice(0):i[0].slice(0,(0,c.g)(i[1]));if((0,c.o)(i[0]))return(0,c.g)(i[1])>=i[0].length()?i[0].slice(0):i[0].slice(0,(0,c.g)(i[1]));throw new l.aV(n,l.rH.InvalidParameter,t)}))},e.signatures.push({name:"top",min:2,max:2}),e.functions.first=function(n,t){return e.standardFunctionAsync(n,t,(async(e,a,i)=>{if((0,c.C)(i,1,1,n,t),(0,c.r)(i[0])){const t=await i[0].first(e.abortSignal);if(null!==t){const e=s.Z.createFromGraphicLikeObject(t.geometry,t.attributes,i[0],n.timeReference);return e._underlyingGraphic=t,e}return t}return(0,c.m)(i[0])?0===i[0].length?null:i[0][0]:(0,c.o)(i[0])?0===i[0].length()?null:i[0].get(0):null}))},e.signatures.push({name:"first",min:1,max:1}),e.functions.attachments=function(n,t){return e.standardFunctionAsync(n,t,(async(e,a,i)=>{(0,c.C)(i,1,2,n,t);const s={minsize:-1,maxsize:-1,types:null,returnMetadata:!1};if(i.length>1)if(i[1]instanceof r.Z){if(i[1].hasField("minsize")&&(s.minsize=(0,c.g)(i[1].field("minsize"))),i[1].hasField("metadata")&&(s.returnMetadata=(0,c.h)(i[1].field("metadata"))),i[1].hasField("maxsize")&&(s.maxsize=(0,c.g)(i[1].field("maxsize"))),i[1].hasField("types")){const e=(0,c.a0)(i[1].field("types"),!1);e.length>0&&(s.types=e)}}else if(null!==i[1])throw new l.aV(n,l.rH.InvalidParameter,t);if((0,c.p)(i[0])){let e=i[0]._layer;return e instanceof b.default&&(e=(0,f.constructFeatureSet)(e,n.spatialReference,["*"],!0,n.lrucache,n.interceptor)),null===e||!1===(0,c.r)(e)?[]:(await e.load(),e.queryAttachments(i[0].field(e.objectIdField),s.minsize,s.maxsize,s.types,s.returnMetadata))}if(null===i[0])return[];throw new l.aV(n,l.rH.InvalidParameter,t)}))},e.signatures.push({name:"attachments",min:1,max:2}),e.functions.featuresetbyrelationshipname=function(n,t){return e.standardFunctionAsync(n,t,(async(e,a,i)=>{(0,c.C)(i,2,4,n,t);const r=i[0],s=(0,c.j)(i[1]);let o=(0,c.F)(i[2],null);const u=(0,c.h)((0,c.F)(i[3],!0));if(null===o&&(o=["*"]),!1===(0,c.m)(o))throw new l.aV(n,l.rH.InvalidParameter,t);if(null===i[0])return null;if(!(0,c.p)(i[0]))throw new l.aV(n,l.rH.InvalidParameter,t);let d=r._layer;if(d instanceof b.default&&(d=(0,f.constructFeatureSet)(d,n.spatialReference,["*"],!0,n.lrucache,n.interceptor)),null===d)return null;if(!1===(0,c.r)(d))return null;d=await d.load();const m=d.relationshipMetaData().filter((e=>e.name===s));if(0===m.length)return null;if(void 0!==m[0].relationshipTableId&&null!==m[0].relationshipTableId&&m[0].relationshipTableId>-1)return(0,f.constructFeatureSetFromRelationship)(d,m[0],r.field(d.objectIdField),d.spatialReference,o,u,n.lrucache,n.interceptor);let y=d.serviceUrl();if(!y)return null;y="/"===y.charAt(y.length-1)?y+m[0].relatedTableId.toString():y+"/"+m[0].relatedTableId.toString();const h=await(0,f.constructFeatureSetFromUrl)(y,d.spatialReference,o,u,n.lrucache,n.interceptor);await h.load();let p=h.relationshipMetaData();if(p=p.filter((e=>e.id===m[0].id)),!1===r.hasField(m[0].keyField)||null===r.field(m[0].keyField)){const e=await d.getFeatureByObjectId(r.field(d.objectIdField),[m[0].keyField]);if(e){const n=N.WhereClause.create(p[0].keyField+"= @id",h.getFieldsIndex());return n.parameters={id:e.attributes[m[0].keyField]},h.filter(n)}return new g.Z({parentfeatureset:h})}const w=N.WhereClause.create(p[0].keyField+"= @id",h.getFieldsIndex());return w.parameters={id:r.field(m[0].keyField)},h.filter(w)}))},e.signatures.push({name:"featuresetbyrelationshipname",min:2,max:4}),e.functions.featuresetbyassociation=function(n,t){return e.standardFunctionAsync(n,t,(async(e,a,i)=>{(0,c.C)(i,2,3,n,t);const r=i[0],s=(0,c.j)((0,c.F)(i[1],"")).toLowerCase(),o=(0,c.c)(i[2])?(0,c.j)(i[2]):null;if(null===i[0])return null;if(!(0,c.p)(i[0]))throw new l.aV(n,l.rH.InvalidParameter,t);let u=r._layer;if(u instanceof b.default&&(u=(0,f.constructFeatureSet)(u,n.spatialReference,["*"],!0,n.lrucache,n.interceptor)),null===u)return null;if(!1===(0,c.r)(u))return null;await u.load();const d=u.serviceUrl(),y=await(0,f.constructAssociationMetaDataFeatureSetFromUrl)(d,n.spatialReference);let h=null,p=null,g=!1;if(null!==o&&""!==o&&void 0!==o){for(const e of y.terminals)e.terminalName===o&&(p=e.terminalId);null===p&&(g=!0)}const w=y.associations.getFieldsIndex(),F=w.get("TOGLOBALID").name,D=w.get("FROMGLOBALID").name,E=w.get("TOTERMINALID").name,x=w.get("FROMTERMINALID").name,C=w.get("FROMNETWORKSOURCEID").name,A=w.get("TONETWORKSOURCEID").name,T=w.get("ASSOCIATIONTYPE").name,P=w.get("ISCONTENTVISIBLE").name,$=w.get("OBJECTID").name;for(const e of u.fields)if("global-id"===e.type){h=r.field(e.name);break}let H=null,v=new m.yN(new S.Z({name:"percentalong",alias:"percentalong",type:"double"}),N.WhereClause.create("0",y.associations.getFieldsIndex())),L=new m.yN(new S.Z({name:"side",alias:"side",type:"string"}),N.WhereClause.create("''",y.associations.getFieldsIndex()));const V="globalid",R="globalId",Z={};for(const e in y.lkp)Z[e]=y.lkp[e].sourceId;const j=new m.TO(new S.Z({name:"classname",alias:"classname",type:"string"}),null,Z);let W="";switch(s){case"midspan":{W=`((${F}='${h}') OR ( ${D}='${h}')) AND (${T} IN (5))`,j.codefield=N.WhereClause.create(`CASE WHEN (${F}='${h}') THEN ${C} ELSE ${A} END`,y.associations.getFieldsIndex());const e=(0,I.JW)(m.Xx.findField(y.associations.fields,D));e.name=V,e.alias=V,H=new m.yN(e,N.WhereClause.create(`CASE WHEN (${D}='${h}') THEN ${F} ELSE ${D} END`,y.associations.getFieldsIndex())),v=y.unVersion>=4?new m.$X(m.Xx.findField(y.associations.fields,w.get("PERCENTALONG").name)):new m.yN(new S.Z({name:"percentalong",alias:"percentalong",type:"double"}),N.WhereClause.create("0",y.associations.getFieldsIndex()));break}case"junctionedge":{W=`((${F}='${h}') OR ( ${D}='${h}')) AND (${T} IN (4,6))`,j.codefield=N.WhereClause.create(`CASE WHEN (${F}='${h}') THEN ${C} ELSE ${A} END`,y.associations.getFieldsIndex());const e=(0,I.JW)(m.Xx.findField(y.associations.fields,D));e.name=V,e.alias=V,H=new m.yN(e,N.WhereClause.create(`CASE WHEN (${D}='${h}') THEN ${F} ELSE ${D} END`,y.associations.getFieldsIndex())),L=new m.yN(new S.Z({name:"side",alias:"side",type:"string"}),N.WhereClause.create(`CASE WHEN (${T}=4) THEN 'from' ELSE 'to' END`,y.associations.getFieldsIndex()));break}case"connected":{let e=`${F}='@T'`,n=`${D}='@T'`;null!==p&&(e+=` AND ${E}=@A`,n+=` AND ${x}=@A`),W="(("+e+") OR ("+n+"))",W=(0,c.P)(W,"@T",h??""),e=(0,c.P)(e,"@T",h??""),null!==p&&(e=(0,c.P)(e,"@A",p.toString()),W=(0,c.P)(W,"@A",p.toString())),j.codefield=N.WhereClause.create("CASE WHEN "+e+` THEN ${C} ELSE ${A} END`,y.associations.getFieldsIndex());const t=(0,I.JW)(m.Xx.findField(y.associations.fields,D));t.name=V,t.alias=V,H=new m.yN(t,N.WhereClause.create("CASE WHEN "+e+` THEN ${D} ELSE ${F} END`,y.associations.getFieldsIndex()));break}case"container":W=`${F}='${h}' AND ${T} = 2`,null!==p&&(W+=` AND ${E} = `+p.toString()),j.codefield=C,W="( "+W+" )",H=new m.QP(m.Xx.findField(y.associations.fields,D),V,V);break;case"content":W=`(${D}='${h}' AND ${T} = 2)`,null!==p&&(W+=` AND ${x} = `+p.toString()),j.codefield=A,W="( "+W+" )",H=new m.QP(m.Xx.findField(y.associations.fields,F),V,V);break;case"structure":W=`(${F}='${h}' AND ${T} = 3)`,null!==p&&(W+=` AND ${E} = `+p.toString()),j.codefield=C,W="( "+W+" )",H=new m.QP(m.Xx.findField(y.associations.fields,D),V,R);break;case"attached":W=`(${D}='${h}' AND ${T} = 3)`,null!==p&&(W+=` AND ${x} = `+p.toString()),j.codefield=A,W="( "+W+" )",H=new m.QP(m.Xx.findField(y.associations.fields,F),V,R);break;default:throw new l.aV(n,l.rH.InvalidParameter,t)}return g&&(W="1 <> 1"),new m.Xx({parentfeatureset:y.associations,adaptedFields:[new m.$X(m.Xx.findField(y.associations.fields,$)),new m.$X(m.Xx.findField(y.associations.fields,P)),H,L,j,v],extraFilter:W?N.WhereClause.create(W,y.associations.getFieldsIndex()):null})}))},e.signatures.push({name:"featuresetbyassociation",min:2,max:6}),e.functions.groupby=function(n,t){return e.standardFunctionAsync(n,t,(async(a,i,s)=>{if((0,c.C)(s,3,3,n,t),!(0,c.r)(s[0]))throw new l.aV(n,l.rH.InvalidParameter,t);const o=await s[0].load(),f=[],u=[];let d=!1,m=[];if((0,c.c)(s[1]))m.push(s[1]);else if(s[1]instanceof r.Z)m.push(s[1]);else if((0,c.m)(s[1]))m=s[1];else{if(!(0,c.o)(s[1]))throw new l.aV(n,l.rH.InvalidParameter,t);m=s[1].toArray()}for(const e of m)if((0,c.c)(e)){const n=N.WhereClause.create((0,c.j)(e),o.getFieldsIndex()),t=!0===(0,D.y5)(n)?(0,c.j)(e):"%%%%FIELDNAME";f.push({name:t,expression:n}),"%%%%FIELDNAME"===t&&(d=!0)}else{if(!(e instanceof r.Z))throw new l.aV(n,l.rH.InvalidParameter,t);{const a=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",i=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===a&&(d=!0),!a)throw new l.aV(n,l.rH.InvalidParameter,t);f.push({name:a,expression:N.WhereClause.create(i||a,o.getFieldsIndex())})}}if(m=[],(0,c.c)(s[2]))m.push(s[2]);else if((0,c.m)(s[2]))m=s[2];else if((0,c.o)(s[2]))m=s[2].toArray();else{if(!(s[2]instanceof r.Z))throw new l.aV(n,l.rH.InvalidParameter,t);m.push(s[2])}for(const e of m){if(!(e instanceof r.Z))throw new l.aV(n,l.rH.InvalidParameter,t);{const a=e.hasField("name")?e.field("name"):"",i=e.hasField("statistic")?e.field("statistic"):"",r=e.hasField("expression")?e.field("expression"):"";if(!a||!i||!r)throw new l.aV(n,l.rH.InvalidParameter,t);u.push({name:a,statistic:i.toLowerCase(),expression:N.WhereClause.create(r,o.getFieldsIndex())})}}if(d){const e={};for(const n of o.fields)e[n.name.toLowerCase()]=1;for(const n of f)"%%%%FIELDNAME"!==n.name&&(e[n.name.toLowerCase()]=1);for(const n of u)"%%%%FIELDNAME"!==n.name&&(e[n.name.toLowerCase()]=1);let n=0;for(const t of f)if("%%%%FIELDNAME"===t.name){for(;1===e["field_"+n.toString()];)n++;e["field_"+n.toString()]=1,t.name="FIELD_"+n.toString()}}for(const t of f)await A(t.expression,e,n);for(const t of u)await A(t.expression,e,n);return s[0].groupby(f,u)}))},e.signatures.push({name:"groupby",min:3,max:3}),e.functions.distinct=function(n,t){return e.standardFunctionAsync(n,t,(async(a,i,s)=>{if((0,c.r)(s[0])){(0,c.C)(s,2,2,n,t);const a=await s[0].load(),i=[];let o=[];if((0,c.c)(s[1]))o.push(s[1]);else if(s[1]instanceof r.Z)o.push(s[1]);else if((0,c.m)(s[1]))o=s[1];else{if(!(0,c.o)(s[1]))throw new l.aV(n,l.rH.InvalidParameter,t);o=s[1].toArray()}let f=!1;for(const e of o)if((0,c.c)(e)){const n=N.WhereClause.create((0,c.j)(e),a.getFieldsIndex()),t=!0===(0,D.y5)(n)?(0,c.j)(e):"%%%%FIELDNAME";i.push({name:t,expression:n}),"%%%%FIELDNAME"===t&&(f=!0)}else{if(!(e instanceof r.Z))throw new l.aV(n,l.rH.InvalidParameter,t);{const r=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",s=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===r&&(f=!0),!r)throw new l.aV(n,l.rH.InvalidParameter,t);i.push({name:r,expression:N.WhereClause.create(s||r,a.getFieldsIndex())})}}if(f){const e={};for(const n of a.fields)e[n.name.toLowerCase()]=1;for(const n of i)"%%%%FIELDNAME"!==n.name&&(e[n.name.toLowerCase()]=1);let n=0;for(const t of i)if("%%%%FIELDNAME"===t.name){for(;1===e["field_"+n.toString()];)n++;e["field_"+n.toString()]=1,t.name="FIELD_"+n.toString()}}for(const t of i)await A(t.expression,e,n);return s[0].groupby(i,[])}return function(e,n,t,a){if(1===a.length){if((0,c.m)(a[0]))return(0,E.t)(e,a[0],-1);if((0,c.o)(a[0]))return(0,E.t)(e,a[0].toArray(),-1)}return(0,E.t)(e,a,-1)}("distinct",0,0,s)}))})}},26520:(e,n,t)=>{t.d(n,{_:()=>i});var a=t(48522);function i(e,n){return null===e?n:new a.Z({url:e.field("url")})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3801,661,5234,9880],{95463:(n,t,e)=>{e.r(t),e.d(t,{registerFunctions:()=>P});var r=e(40330),a=e(28228),o=e(33586),i=e(27535),s=e(77286),u=e(61363),c=e(26520),l=e(71201),f=e(67900),d=e(6570),h=e(9361),m=e(8667),y=e(65091),g=e(94139),w=e(38913),p=e(58901),Z=e(33955),v=e(48522),F=e(3172);async function D(n,t,e){const a=r.id?.findCredential(n.restUrl);if(!a)return null;if("loaded"===n.loadStatus&&""===t&&n.user&&n.user.sourceJSON&&!1===e)return n.user.sourceJSON;const o={responseType:"json",query:{f:"json"}};if(e&&(o.query.returnUserLicenseTypeExtensions=!0),""===t){const t=await(0,F.Z)(n.restUrl+"/community/self",o);if(t.data){const n=t.data;if(n&&n.username)return n}return null}const i=await(0,F.Z)(n.restUrl+"/community/users/"+t,o);if(i.data){const n=i.data;return n.error?null:n}return null}function A(n){return 0===r.i8.indexOf("4.")?w.Z.fromExtent(n):new w.Z({spatialReference:n.spatialReference,rings:[[[n.xmin,n.ymin],[n.xmin,n.ymax],[n.xmax,n.ymax],[n.xmax,n.ymin],[n.xmin,n.ymin]]]})}function I(n,t,e){if((0,u.C)(n,2,2,t,e),n[0]instanceof h.Z&&n[1]instanceof h.Z);else if(n[0]instanceof h.Z&&null===n[1]);else if(n[1]instanceof h.Z&&null===n[0]);else if(null!==n[0]||null!==n[1])throw new i.aV(t,i.rH.InvalidParameter,e)}async function H(n,t){if("polygon"!==n.type&&"polyline"!==n.type&&"extent"!==n.type)return 0;let e=1;(n.spatialReference.vcsWkid||n.spatialReference.latestVcsWkid)&&(e=(0,l._R)(n.spatialReference)/(0,f.c9)(n.spatialReference));let r=0;if("polyline"===n.type)for(const t of n.paths)for(let n=1;n<t.length;n++)r+=(0,l.AW)(t[n],t[n-1],e);else if("polygon"===n.type)for(const t of n.rings){for(let n=1;n<t.length;n++)r+=(0,l.AW)(t[n],t[n-1],e);(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||void 0!==t[0][2]&&t[0][2]!==t[t.length-1][2])&&(r+=(0,l.AW)(t[0],t[t.length-1],e))}else"extent"===n.type&&(r+=2*(0,l.AW)([n.xmin,n.ymin,0],[n.xmax,n.ymin,0],e),r+=2*(0,l.AW)([n.xmin,n.ymin,0],[n.xmin,n.ymax,0],e),r*=2,r+=4*Math.abs((0,u.F)(n.zmax,0)*e-(0,u.F)(n.zmin,0)*e));const a=new p.Z({hasZ:!1,hasM:!1,spatialReference:n.spatialReference,paths:[[0,0],[0,r]]});return(0,m.sz)(a,t)}function P(n){"async"===n.mode&&(n.functions.disjoint=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>(I(a=(0,u.D)(a),t,e),null===a[0]||null===a[1]||(0,m.ED)(a[0],a[1]))))},n.functions.intersects=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>(I(a=(0,u.D)(a),t,e),null!==a[0]&&null!==a[1]&&(0,m.kK)(a[0],a[1]))))},n.functions.touches=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>(I(a=(0,u.D)(a),t,e),null!==a[0]&&null!==a[1]&&(0,m.W4)(a[0],a[1]))))},n.functions.crosses=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>(I(a=(0,u.D)(a),t,e),null!==a[0]&&null!==a[1]&&(0,m.jU)(a[0],a[1]))))},n.functions.within=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>(I(a=(0,u.D)(a),t,e),null!==a[0]&&null!==a[1]&&(0,m.uh)(a[0],a[1]))))},n.functions.contains=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>(I(a=(0,u.D)(a),t,e),null!==a[0]&&null!==a[1]&&(0,m.r3)(a[0],a[1]))))},n.functions.overlaps=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>(I(a=(0,u.D)(a),t,e),null!==a[0]&&null!==a[1]&&(0,m.Nm)(a[0],a[1]))))},n.functions.equals=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>((0,u.C)(a,2,2,t,e),a[0]===a[1]||(a[0]instanceof h.Z&&a[1]instanceof h.Z?(0,m.fS)(a[0],a[1]):!(!(0,u.k)(a[0])||!(0,u.k)(a[1]))&&a[0].equals(a[1])))))},n.functions.relate=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>{if(a=(0,u.D)(a),(0,u.C)(a,3,3,t,e),a[0]instanceof h.Z&&a[1]instanceof h.Z)return(0,m.LV)(a[0],a[1],(0,u.j)(a[2]));if(a[0]instanceof h.Z&&null===a[1])return!1;if(a[1]instanceof h.Z&&null===a[0])return!1;if(null===a[0]&&null===a[1])return!1;throw new i.aV(t,i.rH.InvalidParameter,e)}))},n.functions.intersection=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>(I(a=(0,u.D)(a),t,e),null===a[0]||null===a[1]?null:(0,m.wf)(a[0],a[1]))))},n.functions.union=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>{const o=[];if(0===(a=(0,u.D)(a)).length)throw new i.aV(t,i.rH.WrongNumberOfParameters,e);if(1===a.length)if((0,u.m)(a[0])){const n=(0,u.D)(a[0]);for(let r=0;r<n.length;r++)if(null!==n[r]){if(!(n[r]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);o.push(n[r])}}else{if(!(0,u.o)(a[0])){if(a[0]instanceof h.Z)return(0,u.y)((0,s.r1)(a[0]),t.spatialReference);if(null===a[0])return null;throw new i.aV(t,i.rH.InvalidParameter,e)}{const n=(0,u.D)(a[0].toArray());for(let r=0;r<n.length;r++)if(null!==n[r]){if(!(n[r]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);o.push(n[r])}}}else for(let n=0;n<a.length;n++)if(null!==a[n]){if(!(a[n]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);o.push(a[n])}return 0===o.length?null:(0,m.G0)(o)}))},n.functions.difference=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>(I(a=(0,u.D)(a),t,e),null!==a[0]&&null===a[1]?(0,s.r1)(a[0]):null===a[0]?null:(0,m.e5)(a[0],a[1]))))},n.functions.symmetricdifference=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>(I(a=(0,u.D)(a),t,e),null===a[0]&&null===a[1]?null:null===a[0]?(0,s.r1)(a[1]):null===a[1]?(0,s.r1)(a[0]):(0,m.Sp)(a[0],a[1]))))},n.functions.clip=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>{if(a=(0,u.D)(a),(0,u.C)(a,2,2,t,e),!(a[1]instanceof d.Z)&&null!==a[1])throw new i.aV(t,i.rH.InvalidParameter,e);if(null===a[0])return null;if(!(a[0]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);return null===a[1]?null:(0,m.oq)(a[0],a[1])}))},n.functions.cut=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>{if(a=(0,u.D)(a),(0,u.C)(a,2,2,t,e),!(a[1]instanceof p.Z)&&null!==a[1])throw new i.aV(t,i.rH.InvalidParameter,e);if(null===a[0])return[];if(!(a[0]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);return null===a[1]?[(0,s.r1)(a[0])]:(0,m.z7)(a[0],a[1])}))},n.functions.area=function(t,e){return n.standardFunctionAsync(t,e,(async(n,r,a)=>{if((0,u.C)(a,1,2,t,e),null===(a=(0,u.D)(a))[0])return 0;if((0,u.r)(a[0])){const n=await a[0].sumArea((0,s.EI)((0,u.F)(a[1],-1)),!1,t.abortSignal);if(t.abortSignal.aborted)throw new i.aV(t,i.rH.Cancelled,e);return n}if((0,u.m)(a[0])||(0,u.o)(a[0])){const n=(0,u.E)(a[0],t.spatialReference);return null===n?0:(0,m.CJ)(n,(0,s.EI)((0,u.F)(a[1],-1)))}if(!(a[0]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);return(0,m.CJ)(a[0],(0,s.EI)((0,u.F)(a[1],-1)))}))},n.functions.areageodetic=function(t,e){return n.standardFunctionAsync(t,e,(async(n,r,a)=>{if((0,u.C)(a,1,2,t,e),null===(a=(0,u.D)(a))[0])return 0;if((0,u.r)(a[0])){const n=await a[0].sumArea((0,s.EI)((0,u.F)(a[1],-1)),!0,t.abortSignal);if(t.abortSignal.aborted)throw new i.aV(t,i.rH.Cancelled,e);return n}if((0,u.m)(a[0])||(0,u.o)(a[0])){const n=(0,u.E)(a[0],t.spatialReference);return null===n?0:(0,m.Y4)(n,(0,s.EI)((0,u.F)(a[1],-1)))}if(!(a[0]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);return(0,m.Y4)(a[0],(0,s.EI)((0,u.F)(a[1],-1)))}))},n.functions.length=function(t,e){return n.standardFunctionAsync(t,e,(async(n,r,a)=>{if((0,u.C)(a,1,2,t,e),null===(a=(0,u.D)(a))[0])return 0;if((0,u.r)(a[0])){const n=await a[0].sumLength((0,s.Lz)((0,u.F)(a[1],-1)),!1,t.abortSignal);if(t.abortSignal.aborted)throw new i.aV(t,i.rH.Cancelled,e);return n}if((0,u.m)(a[0])||(0,u.o)(a[0])){const n=(0,u.G)(a[0],t.spatialReference);return null===n?0:(0,m.sz)(n,(0,s.Lz)((0,u.F)(a[1],-1)))}if(!(a[0]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);return(0,m.sz)(a[0],(0,s.Lz)((0,u.F)(a[1],-1)))}))},n.functions.length3d=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>{if((0,u.C)(a,1,2,t,e),null===(a=(0,u.D)(a))[0])return 0;if((0,u.m)(a[0])||(0,u.o)(a[0])){const n=(0,u.G)(a[0],t.spatialReference);return null===n?0:!0===n.hasZ?H(n,(0,s.Lz)((0,u.F)(a[1],-1))):(0,m.sz)(n,(0,s.Lz)((0,u.F)(a[1],-1)))}if(!(a[0]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);return!0===a[0].hasZ?H(a[0],(0,s.Lz)((0,u.F)(a[1],-1))):(0,m.sz)(a[0],(0,s.Lz)((0,u.F)(a[1],-1)))}))},n.functions.lengthgeodetic=function(t,e){return n.standardFunctionAsync(t,e,(async(n,r,a)=>{if((0,u.C)(a,1,2,t,e),null===(a=(0,u.D)(a))[0])return 0;if((0,u.r)(a[0])){const n=await a[0].sumLength((0,s.Lz)((0,u.F)(a[1],-1)),!0,t.abortSignal);if(t.abortSignal.aborted)throw new i.aV(t,i.rH.Cancelled,e);return n}if((0,u.m)(a[0])||(0,u.o)(a[0])){const n=(0,u.G)(a[0],t.spatialReference);return null===n?0:(0,m.kQ)(n,(0,s.Lz)((0,u.F)(a[1],-1)))}if(!(a[0]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);return(0,m.kQ)(a[0],(0,s.Lz)((0,u.F)(a[1],-1)))}))},n.functions.distance=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>{a=(0,u.D)(a),(0,u.C)(a,2,3,t,e);let o=a[0];((0,u.m)(a[0])||(0,u.o)(a[0]))&&(o=(0,u.H)(a[0],t.spatialReference));let c=a[1];if(((0,u.m)(a[1])||(0,u.o)(a[1]))&&(c=(0,u.H)(a[1],t.spatialReference)),!(o instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);if(!(c instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);return(0,m.TE)(o,c,(0,s.Lz)((0,u.F)(a[2],-1)))}))},n.functions.distancegeodetic=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>{a=(0,u.D)(a),(0,u.C)(a,2,3,t,e);const o=a[0],c=a[1];if(!(o instanceof g.Z))throw new i.aV(t,i.rH.InvalidParameter,e);if(!(c instanceof g.Z))throw new i.aV(t,i.rH.InvalidParameter,e);const l=new p.Z({paths:[],spatialReference:o.spatialReference});return l.addPath([o,c]),(0,m.kQ)(l,(0,s.Lz)((0,u.F)(a[2],-1)))}))},n.functions.densify=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>{if(a=(0,u.D)(a),(0,u.C)(a,2,3,t,e),null===a[0])return null;if(!(a[0]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);const o=(0,u.g)(a[1]);if(isNaN(o))throw new i.aV(t,i.rH.InvalidParameter,e);if(o<=0)throw new i.aV(t,i.rH.InvalidParameter,e);return a[0]instanceof w.Z||a[0]instanceof p.Z?(0,m.Cz)(a[0],o,(0,s.Lz)((0,u.F)(a[2],-1))):a[0]instanceof d.Z?(0,m.Cz)(A(a[0]),o,(0,s.Lz)((0,u.F)(a[2],-1))):a[0]}))},n.functions.densifygeodetic=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>{if(a=(0,u.D)(a),(0,u.C)(a,2,3,t,e),null===a[0])return null;if(!(a[0]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);const o=(0,u.g)(a[1]);if(isNaN(o))throw new i.aV(t,i.rH.InvalidParameter,e);if(o<=0)throw new i.aV(t,i.rH.InvalidParameter,e);return a[0]instanceof w.Z||a[0]instanceof p.Z?(0,m.j2)(a[0],o,(0,s.Lz)((0,u.F)(a[2],-1))):a[0]instanceof d.Z?(0,m.j2)(A(a[0]),o,(0,s.Lz)((0,u.F)(a[2],-1))):a[0]}))},n.functions.generalize=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>{if(a=(0,u.D)(a),(0,u.C)(a,2,4,t,e),null===a[0])return null;if(!(a[0]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);const o=(0,u.g)(a[1]);if(isNaN(o))throw new i.aV(t,i.rH.InvalidParameter,e);return(0,m.D$)(a[0],o,(0,u.h)((0,u.F)(a[2],!0)),(0,s.Lz)((0,u.F)(a[3],-1)))}))},n.functions.buffer=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>{if(a=(0,u.D)(a),(0,u.C)(a,2,3,t,e),null===a[0])return null;if(!(a[0]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);const o=(0,u.g)(a[1]);if(isNaN(o))throw new i.aV(t,i.rH.InvalidParameter,e);return 0===o?(0,s.r1)(a[0]):(0,m.f3)(a[0],o,(0,s.Lz)((0,u.F)(a[2],-1)))}))},n.functions.buffergeodetic=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>{if(a=(0,u.D)(a),(0,u.C)(a,2,3,t,e),null===a[0])return null;if(!(a[0]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);const o=(0,u.g)(a[1]);if(isNaN(o))throw new i.aV(t,i.rH.InvalidParameter,e);return 0===o?(0,s.r1)(a[0]):(0,m.rd)(a[0],o,(0,s.Lz)((0,u.F)(a[2],-1)))}))},n.functions.offset=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>{if(a=(0,u.D)(a),(0,u.C)(a,2,6,t,e),null===a[0])return null;if(!(a[0]instanceof w.Z||a[0]instanceof p.Z))throw new i.aV(t,i.rH.InvalidParameter,e);const o=(0,u.g)(a[1]);if(isNaN(o))throw new i.aV(t,i.rH.InvalidParameter,e);const c=(0,u.g)((0,u.F)(a[4],10));if(isNaN(c))throw new i.aV(t,i.rH.InvalidParameter,e);const l=(0,u.g)((0,u.F)(a[5],0));if(isNaN(l))throw new i.aV(t,i.rH.InvalidParameter,e);return(0,m.cv)(a[0],o,(0,s.Lz)((0,u.F)(a[2],-1)),(0,u.j)((0,u.F)(a[3],"round")).toLowerCase(),c,l)}))},n.functions.rotate=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>{a=(0,u.D)(a),(0,u.C)(a,2,3,t,e);let o=a[0];if(null===o)return null;if(!(o instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);o instanceof d.Z&&(o=w.Z.fromExtent(o));const s=(0,u.g)(a[1]);if(isNaN(s))throw new i.aV(t,i.rH.InvalidParameter,e);const c=(0,u.F)(a[2],null);if(null===c)return(0,m.U1)(o,s);if(c instanceof g.Z)return(0,m.U1)(o,s,c);throw new i.aV(t,i.rH.InvalidParameter,e)}))},n.functions.centroid=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>{if(a=(0,u.D)(a),(0,u.C)(a,1,1,t,e),null===a[0])return null;let o=a[0];if(((0,u.m)(a[0])||(0,u.o)(a[0]))&&(o=(0,u.H)(a[0],t.spatialReference)),null===o)return null;if(!(o instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);return o instanceof g.Z?(0,u.y)((0,s.r1)(a[0]),t.spatialReference):o instanceof w.Z?o.centroid:o instanceof p.Z?(0,l.s9)(o):o instanceof y.Z?(0,l.Ay)(o):o instanceof d.Z?o.center:null}))},n.functions.multiparttosinglepart=function(t,e){return n.standardFunctionAsync(t,e,(async(n,r,a)=>{a=(0,u.D)(a),(0,u.C)(a,1,1,t,e);const o=[];if(null===a[0])return null;if(!(a[0]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);if(a[0]instanceof g.Z)return[(0,u.y)((0,s.r1)(a[0]),t.spatialReference)];if(a[0]instanceof d.Z)return[(0,u.y)((0,s.r1)(a[0]),t.spatialReference)];const c=await(0,m.og)(a[0]);if(c instanceof w.Z){const n=[],t=[];for(let e=0;e<c.rings.length;e++)if(c.isClockwise(c.rings[e])){const t=(0,Z.im)({rings:[c.rings[e]],hasZ:!0===c.hasZ,hazM:!0===c.hasM,spatialReference:c.spatialReference.toJSON()});n.push(t)}else t.push({ring:c.rings[e],pt:c.getPoint(e,0)});for(let e=0;e<t.length;e++)for(let r=0;r<n.length;r++)if(n[r].contains(t[e].pt)){n[r].addRing(t[e].ring);break}return n}if(c instanceof p.Z){const n=[];for(let t=0;t<c.paths.length;t++){const e=(0,Z.im)({paths:[c.paths[t]],hasZ:!0===c.hasZ,hazM:!0===c.hasM,spatialReference:c.spatialReference.toJSON()});n.push(e)}return n}if(a[0]instanceof y.Z){const n=(0,u.y)((0,s.r1)(a[0]),t.spatialReference);for(let t=0;t<n.points.length;t++)o.push(n.getPoint(t));return o}return null}))},n.functions.issimple=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>{if(a=(0,u.D)(a),(0,u.C)(a,1,1,t,e),null===a[0])return!0;if(!(a[0]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);return(0,m.Gg)(a[0])}))},n.functions.simplify=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>{if(a=(0,u.D)(a),(0,u.C)(a,1,1,t,e),null===a[0])return null;if(!(a[0]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);return(0,m.og)(a[0])}))},n.functions.convexhull=function(t,e){return n.standardFunctionAsync(t,e,((n,r,a)=>{if(a=(0,u.D)(a),(0,u.C)(a,1,1,t,e),null===a[0])return null;if(!(a[0]instanceof h.Z))throw new i.aV(t,i.rH.InvalidParameter,e);return(0,m.JI)(a[0])}))},n.functions.getuser=function(t,e){return n.standardFunctionAsync(t,e,(async(n,r,s)=>{(0,u.C)(s,0,2,t,e);let l=(0,u.F)(s[1],""),f=!0===l;if(l=!0===l||!1===l?"":(0,u.j)(l),0===s.length||s[0]instanceof a.Z){let n=null;n=t.services&&t.services.portal?t.services.portal:v.Z.getDefault(),s.length>0&&(n=(0,c._)(s[0],n));const e=await D(n,l,f);if(e){const n=JSON.parse(JSON.stringify(e));for(const t of["lastLogin","created","modified"])void 0!==n[t]&&null!==n[t]&&(n[t]=new Date(n[t]));return o.Z.convertObjectToArcadeDictionary(n,(0,u.J)(t))}return null}let d=null;if((0,u.r)(s[0])&&(d=s[0]),d){if(f=!1,l)return null;await d.load();const n=await d.getOwningSystemUrl();if(!n){if(!l){const n=await d.getIdentityUser();return n?o.Z.convertObjectToArcadeDictionary({username:n},(0,u.J)(t)):null}return null}let e=null;e=t.services&&t.services.portal?t.services.portal:v.Z.getDefault(),e=(0,c._)(new a.Z(n),e);const r=await D(e,l,f);if(r){const n=JSON.parse(JSON.stringify(r));for(const t of["lastLogin","created","modified"])void 0!==n[t]&&null!==n[t]&&(n[t]=new Date(n[t]));return o.Z.convertObjectToArcadeDictionary(n,(0,u.J)(t))}return null}throw new i.aV(t,i.rH.InvalidParameter,e)}))}),n.functions.nearestcoordinate=function(t,e){return n.standardFunctionAsync(t,e,(async(n,r,a)=>{if(a=(0,u.D)(a),(0,u.C)(a,2,2,t,e),!(a[0]instanceof h.Z||null===a[0]))throw new i.aV(t,i.rH.InvalidParameter,e);if(!(a[1]instanceof g.Z||null===a[1]))throw new i.aV(t,i.rH.InvalidParameter,e);if(null===a[0]||null===a[1])return null;const s=await(0,m.FH)(a[0],a[1]);return null===s?null:o.Z.convertObjectToArcadeDictionary({coordinate:s.coordinate,distance:s.distance},(0,u.J)(t),!1,!0)}))},n.functions.nearestvertex=function(t,e){return n.standardFunctionAsync(t,e,(async(n,r,a)=>{if(a=(0,u.D)(a),(0,u.C)(a,2,2,t,e),!(a[0]instanceof h.Z||null===a[0]))throw new i.aV(t,i.rH.InvalidParameter,e);if(!(a[1]instanceof g.Z||null===a[1]))throw new i.aV(t,i.rH.InvalidParameter,e);if(null===a[0]||null===a[1])return null;const s=await(0,m._L)(a[0],a[1]);return null===s?null:o.Z.convertObjectToArcadeDictionary({coordinate:s.coordinate,distance:s.distance},(0,u.J)(t),!1,!0)}))}}},26520:(n,t,e)=>{e.d(t,{_:()=>a});var r=e(48522);function a(n,t){return null===n?t:new r.Z({url:n.field("url")})}},99880:(n,t,e)=>{e.d(t,{V:()=>u});var r=e(68773),a=(e(3172),e(20102)),o=e(92604),i=e(17452);const s=o.Z.getLogger("esri.assets");function u(n){if(!r.default.assetsPath)throw s.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new a.Z("assets:path-not-set","config.assetsPath is not set");return(0,i.v_)(r.default.assetsPath,n)}},10661:(n,t,e)=>{e.d(t,{s:()=>a});var r=e(42100);class a extends r.s{notify(){const n=this._observers;if(n&&n.length>0){const t=n.slice();for(const n of t)n.onInvalidated(),n.onCommitted()}}}},8667:(n,t,e)=>{e.d(t,{CJ:()=>M,Cz:()=>k,D$:()=>R,ED:()=>v,FH:()=>x,G0:()=>C,Gg:()=>A,JI:()=>H,LV:()=>D,Nm:()=>F,Sp:()=>V,TE:()=>y,U1:()=>T,W4:()=>p,Y4:()=>E,_L:()=>N,cv:()=>S,e5:()=>P,f3:()=>z,fS:()=>g,j2:()=>O,jU:()=>m,kK:()=>w,kQ:()=>J,og:()=>I,oq:()=>f,r3:()=>h,rd:()=>b,sz:()=>_,uh:()=>Z,wf:()=>L,z7:()=>d}),e(66577);var r=e(56569),a=e(94139),o=e(33955);function i(n){return Array.isArray(n)?n[0]?.spatialReference:n?.spatialReference}function s(n){return n?Array.isArray(n)?n.map(s):n.toJSON?n.toJSON():n:n}function u(n){return Array.isArray(n)?n.map((n=>(0,o.im)(n))):(0,o.im)(n)}let c;async function l(n,t){return(await async function(){return c||(c=(0,r.bA)("geometryEngineWorker",{strategy:"distributed"})),c}()).invoke("executeGEOperation",{operation:n,parameters:s(t)})}async function f(n,t){return u(await l("clip",[i(n),n,t]))}async function d(n,t){return u(await l("cut",[i(n),n,t]))}function h(n,t){return l("contains",[i(n),n,t])}function m(n,t){return l("crosses",[i(n),n,t])}function y(n,t,e){return l("distance",[i(n),n,t,e])}function g(n,t){return l("equals",[i(n),n,t])}function w(n,t){return l("intersects",[i(n),n,t])}function p(n,t){return l("touches",[i(n),n,t])}function Z(n,t){return l("within",[i(n),n,t])}function v(n,t){return l("disjoint",[i(n),n,t])}function F(n,t){return l("overlaps",[i(n),n,t])}function D(n,t,e){return l("relate",[i(n),n,t,e])}function A(n){return l("isSimple",[i(n),n])}async function I(n){return u(await l("simplify",[i(n),n]))}async function H(n,t=!1){return u(await l("convexHull",[i(n),n,t]))}async function P(n,t){return u(await l("difference",[i(n),n,t]))}async function V(n,t){return u(await l("symmetricDifference",[i(n),n,t]))}async function L(n,t){return u(await l("intersect",[i(n),n,t]))}async function C(n,t=null){const e=function(n,t){let e;return Array.isArray(n)?e=n:(e=[],e.push(n),null!=t&&e.push(t)),e}(n,t);return u(await l("union",[i(e),e]))}async function S(n,t,e,r,a,o){return u(await l("offset",[i(n),n,t,e,r,a,o]))}async function z(n,t,e,r=!1){const a=[i(n),n,t,e,r];return u(await l("buffer",a))}async function b(n,t,e,r,a,o){const s=[i(n),n,t,e,r,a,o];return u(await l("geodesicBuffer",s))}async function x(n,t,e=!0){const r=await l("nearestCoordinate",[i(n),n,t,e]);return{...r,coordinate:a.Z.fromJSON(r.coordinate)}}async function N(n,t){const e=await l("nearestVertex",[i(n),n,t]);return{...e,coordinate:a.Z.fromJSON(e.coordinate)}}async function T(n,t,e){if(null==n)throw new j;const r=n.spatialReference;if(null==(e=e??function(n){return"xmin"in n?n.center:"x"in n?n:n.extent?.center}(n)))throw new j;const a=n.constructor.fromJSON(await l("rotate",[r,n,t,e]));return a.spatialReference=r,a}async function R(n,t,e,r){return u(await l("generalize",[i(n),n,t,e,r]))}async function k(n,t,e){return u(await l("densify",[i(n),n,t,e]))}async function O(n,t,e,r=0){return u(await l("geodesicDensify",[i(n),n,t,e,r]))}function M(n,t){return l("planarArea",[i(n),n,t])}function _(n,t){return l("planarLength",[i(n),n,t])}function E(n,t,e){return l("geodesicArea",[i(n),n,t,e])}function J(n,t,e){return l("geodesicLength",[i(n),n,t,e])}class j extends Error{constructor(){super("Illegal Argument Exception")}}},90344:(n,t,e)=>{e.d(t,{LJ:()=>I,Xr:()=>w,Ze:()=>F,f1:()=>V,i$:()=>H,o8:()=>A,p6:()=>D});var r=e(35454),a=e(70171),o=e(17126);const i={year:void 0,month:void 0,day:void 0,weekday:void 0},s={hour:void 0,minute:void 0,second:void 0},u=Intl.DateTimeFormat().resolvedOptions().timeZone,c={timeZone:"UTC"},l={year:"numeric",month:"numeric",day:"numeric"},f={year:"numeric",month:"long",day:"numeric"},d={year:"numeric",month:"short",day:"numeric"},h={year:"numeric",month:"long",weekday:"long",day:"numeric"},m={hour:"numeric",minute:"numeric"},y={...m,second:"numeric"},g={"short-date":l,"short-date-short-time":{...l,...m},"short-date-short-time-24":{...l,...m,hour12:!1},"short-date-long-time":{...l,...y},"short-date-long-time-24":{...l,...y,hour12:!1},"short-date-le":l,"short-date-le-short-time":{...l,...m},"short-date-le-short-time-24":{...l,...m,hour12:!1},"short-date-le-long-time":{...l,...y},"short-date-le-long-time-24":{...l,...y,hour12:!1},"long-month-day-year":f,"long-month-day-year-short-time":{...f,...m},"long-month-day-year-short-time-24":{...f,...m,hour12:!1},"long-month-day-year-long-time":{...f,...y},"long-month-day-year-long-time-24":{...f,...y,hour12:!1},"day-short-month-year":d,"day-short-month-year-short-time":{...d,...m},"day-short-month-year-short-time-24":{...d,...m,hour12:!1},"day-short-month-year-long-time":{...d,...y},"day-short-month-year-long-time-24":{...d,...y,hour12:!1},"long-date":h,"long-date-short-time":{...h,...m},"long-date-short-time-24":{...h,...m,hour12:!1},"long-date-long-time":{...h,...y},"long-date-long-time-24":{...h,...y,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":m,"long-time":y},w=(0,r.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),p={ar:"ar-u-nu-latn-ca-gregory"};let Z=new WeakMap;const v=g["short-date-short-time"];function F(n){return g[n]}function D(n,t=v){return function(n){let t=Z.get(n);if(!t){const e=(0,a.Kd)(),r=p[e]||e,o=P(n);t=new Intl.DateTimeFormat(r,o),Z.set(n,t)}return t}(t).format(n)}function A(n,t=v){return D(new Date(n),{...t,...c,...s})}function I(n,t=v){return D(new Date(`1970-01-01T${n}Z`),{...t,...c,...i})}function H(n,t=v){const e=o.ou.fromISO(n,{setZone:!0}),r=(0,a.Kd)(),i=p[r]??r,s=P(t);return e.toLocaleString(s,{locale:i})}function P(n){const t=V(n.timeZone??"system");return{...n,timeZone:t}}function V(n){switch(n){case"system":return u;case"unknown":return"UTC";default:return n}}(0,a.Ze)((()=>{Z=new WeakMap}))},94443:(n,t,e)=>{e.d(t,{ME:()=>m,Su:()=>y,tz:()=>h});var r=e(20102),a=e(50758),o=e(95330),i=e(70171);const s=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,u={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function c(n){return n in u}Object.keys(u);const l=[],f=new Map;function d(n){for(const t of f.keys())g(n.pattern,t)&&f.delete(t)}function h(n){return l.includes(n)||(d(n),l.unshift(n)),(0,a.kB)((()=>{const t=l.indexOf(n);t>-1&&(l.splice(t,1),d(n))}))}async function m(n){const t=(0,i.Kd)();f.has(n)||f.set(n,async function(n,t){const e=[];for(const r of l)if(g(r.pattern,n))try{return await r.fetchMessageBundle(n,t)}catch(n){e.push(n)}if(e.length)throw new r.Z("intl:message-bundle-error",`Errors occurred while loading "${n}"`,{errors:e});throw new r.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${n}"`)}(n,t));const e=f.get(n);return e&&await w.add(e),e}function y(n){if(!s.test(n))return null;const t=s.exec(n);if(null===t)return null;const[,e,r]=t,a=e+(r?"-"+r.toUpperCase():"");return c(a)?a:c(e)?e:null}function g(n,t){return"string"==typeof n?t.startsWith(n):n.test(t)}(0,i.Ze)((()=>{f.clear()}));const w=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(n){return this._increase(),n.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,o.hh)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},18848:(n,t,e)=>{e.d(t,{sh:()=>s,uf:()=>u});var r=e(70171);const a={ar:"ar-u-nu-latn"};let o=new WeakMap,i={};function s(n={}){const t={};return null!=n.digitSeparator&&(t.useGrouping=n.digitSeparator),null!=n.places&&(t.minimumFractionDigits=t.maximumFractionDigits=n.places),t}function u(n,t){return Object.is(n,-0)&&(n=0),function(n){const t=n||i;if(!o.has(t)){const e=(0,r.Kd)(),i=a[(0,r.Kd)()]||e;o.set(t,new Intl.NumberFormat(i,n))}return o.get(t)}(t).format(n)}(0,r.Ze)((()=>{o=new WeakMap,i={}}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7203],{95401:(e,t,n)=>{n.d(t,{e:()=>l});var r,i,o,s=n(5732),a={exports:{}};r=a,i=function(){function e(e,n,i){i=i||2;var o,s,a,c,u,h,f,p=n&&n.length,d=p?n[0]*i:e.length,g=t(e,0,d,i,!0),m=[];if(!g||g.next===g.prev)return m;if(p&&(g=l(e,n,g,i)),e.length>80*i){o=a=e[0],s=c=e[1];for(var y=i;y<d;y+=i)(u=e[y])<o&&(o=u),(h=e[y+1])<s&&(s=h),u>a&&(a=u),h>c&&(c=h);f=0!==(f=Math.max(a-o,c-s))?1/f:0}return r(g,m,i,o,s,f),m}function t(e,t,n,r,i){var o,s;if(i===I(e,t,n,r)>0)for(o=t;o<n;o+=r)s=M(o,e[o],e[o+1],s);else for(o=n-r;o>=t;o-=r)s=M(o,e[o],e[o+1],s);if(s&&v(s,s.next)){var a=s.next;S(s),s=a}return s}function n(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==x(r.prev,r,r.next))r=r.next;else{var i=r.prev;if(S(r),(r=t=i)===r.next)break;n=!0}}while(n||r!==t);return t}function r(e,t,l,c,u,h,f){if(e){!f&&h&&p(e,c,u,h);for(var d,g,m=e;e.prev!==e.next;)if(d=e.prev,g=e.next,h?o(e,c,u,h):i(e))t.push(d.i/l),t.push(e.i/l),t.push(g.i/l),S(e),e=g.next,m=g.next;else if((e=g)===m){f?1===f?r(e=s(n(e),t,l),t,l,c,u,h,2):2===f&&a(e,t,l,c,u,h):r(n(e),t,l,c,u,h,1);break}}}function i(e){var t=e.prev,n=e,r=e.next;if(x(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(m(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&x(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function o(e,t,n,r){var i=e.prev,o=e,s=e.next;if(x(i,o,s)>=0)return!1;for(var a=i.x<o.x?i.x<s.x?i.x:s.x:o.x<s.x?o.x:s.x,l=i.y<o.y?i.y<s.y?i.y:s.y:o.y<s.y?o.y:s.y,c=i.x>o.x?i.x>s.x?i.x:s.x:o.x>s.x?o.x:s.x,u=i.y>o.y?i.y>s.y?i.y:s.y:o.y>s.y?o.y:s.y,h=d(a,l,t,n,r),f=d(c,u,t,n,r),p=e.prevZ,g=e.nextZ;p&&p.z>=h&&g&&g.z<=f;){if(p!==e.prev&&p!==e.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&x(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,g!==e.prev&&g!==e.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,g.x,g.y)&&x(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;p&&p.z>=h;){if(p!==e.prev&&p!==e.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&x(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;g&&g.z<=f;){if(g!==e.prev&&g!==e.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,g.x,g.y)&&x(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function s(e,t,r){var i=e;do{var o=i.prev,s=i.next.next;!v(o,s)&&w(o,i,i.next,s)&&T(o,s)&&T(s,o)&&(t.push(o.i/r),t.push(i.i/r),t.push(s.i/r),S(i),S(i.next),i=e=s),i=i.next}while(i!==e);return n(i)}function a(e,t,i,o,s,a){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&y(l,c)){var u=_(l,c);return l=n(l,l.next),u=n(u,u.next),r(l,t,i,o,s,a),void r(u,t,i,o,s,a)}c=c.next}l=l.next}while(l!==e)}function l(e,r,i,o){var s,a,l,u=[];for(s=0,a=r.length;s<a;s++)(l=t(e,r[s]*o,s<a-1?r[s+1]*o:e.length,o,!1))===l.next&&(l.steiner=!0),u.push(g(l));for(u.sort(c),s=0;s<u.length;s++)i=n(i=h(u[s],i),i.next);return i}function c(e,t){return e.x-t.x}function u(e){if(e.next.prev===e)return e;let t=e;for(;;){const n=t.next;if(n.prev===t||n===t||n===e)break;t=n}return t}function h(e,t){var r=function(e,t){var n,r=t,i=e.x,o=e.y,s=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var a=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=i&&a>s){if(s=a,a===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(i===s)return n;var l,c=n,u=n.x,h=n.y,p=1/0;r=n;do{i>=r.x&&r.x>=u&&i!==r.x&&m(o<h?i:s,o,u,h,o<h?s:i,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(i-r.x),T(r,e)&&(l<p||l===p&&(r.x>n.x||r.x===n.x&&f(n,r)))&&(n=r,p=l)),r=r.next}while(r!==c);return n}(e,t);if(!r)return t;var i=_(r,e),o=n(r,r.next);let s=u(i);return n(s,s.next),o=u(o),u(t===r?o:t)}function f(e,t){return x(e.prev,e,t.prev)<0&&x(t.next,e,e.next)<0}function p(e,t,n,r){var i=e;do{null===i.z&&(i.z=d(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,s,a,l,c=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,r=n,a=0,t=0;t<c&&(a++,r=r.nextZ);t++);for(l=c;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(s>1)}(i)}function d(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function g(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function m(e,t,n,r,i,o,s,a){return(i-s)*(t-a)-(e-s)*(o-a)>=0&&(e-s)*(r-a)-(n-s)*(t-a)>=0&&(n-s)*(o-a)-(i-s)*(r-a)>=0}function y(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&w(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(T(e,t)&&T(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(x(e.prev,e,t.prev)||x(e,t.prev,t))||v(e,t)&&x(e.prev,e,e.next)>0&&x(t.prev,t,t.next)>0)}function x(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,n,r){var i=A(x(e,t,n)),o=A(x(e,t,r)),s=A(x(n,r,e)),a=A(x(n,r,t));return i!==o&&s!==a||!(0!==i||!b(e,n,t))||!(0!==o||!b(e,r,t))||!(0!==s||!b(n,e,r))||!(0!==a||!b(n,t,r))}function b(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function A(e){return e>0?1:e<0?-1:0}function T(e,t){return x(e.prev,e,e.next)<0?x(e,t,e.next)>=0&&x(e,e.prev,t)>=0:x(e,t,e.prev)<0||x(e,e.next,t)<0}function _(e,t){var n=new O(e.i,e.x,e.y),r=new O(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function M(e,t,n,r){var i=new O(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function S(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function O(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function I(e,t,n,r){for(var i=0,o=t,s=n-r;o<n;o+=r)i+=(e[s]-e[o])*(e[o+1]+e[s+1]),s=o;return i}return e.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(I(e,0,o,n));if(i)for(var a=0,l=t.length;a<l;a++){var c=t[a]*n,u=a<l-1?t[a+1]*n:e.length;s-=Math.abs(I(e,c,u,n))}var h=0;for(a=0;a<r.length;a+=3){var f=r[a]*n,p=r[a+1]*n,d=r[a+2]*n;h+=Math.abs((e[f]-e[d])*(e[p+1]-e[f+1])-(e[f]-e[p])*(e[d+1]-e[f+1]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},e.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var s=0;s<t;s++)n.vertices.push(e[i][o][s]);i>0&&(r+=e[i-1].length,n.holes.push(r))}return n},e},void 0!==(o=i())&&(r.exports=o);const l=(0,s.g)(a.exports)},46521:(e,t,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function i(e,t,n,r,i,o,s,a,l){return[e,t,n,r,i,o,s,a,l]}function o(e,t){return new Float64Array(e,t,9)}n.d(t,{a:()=>o,c:()=>r,f:()=>i}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:r,createView:o,fromValues:i},Symbol.toStringTag,{value:"Module"}))},13598:(e,t,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}function o(e,t){return new Float64Array(e,t,16)}n.d(t,{I:()=>s,a:()=>o,b:()=>i,c:()=>r});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:i,create:r,createView:o,fromValues:function(e,t,n,r,i,o,s,a,l,c,u,h,f,p,d,g){return[e,t,n,r,i,o,s,a,l,c,u,h,f,p,d,g]}},Symbol.toStringTag,{value:"Module"}))},94961:(e,t,n)=>{function r(){return[0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3]]}function o(e,t){return new Float64Array(e,t,4)}n.d(t,{I:()=>s,a:()=>i,b:()=>r,c:()=>o});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:i,create:r,createView:o,fromValues:function(e,t,n,r){return[e,t,n,r]}},Symbol.toStringTag,{value:"Module"}))},8310:(e,t,n)=>{n.d(t,{a:()=>y,c:()=>g,g:()=>x,h:()=>m,j:()=>b,l:()=>I}),n(80442);var r=n(92604),i=n(22021),o=n(52138),s=n(17896),a=n(65617),l=n(98766),c=n(88669),u=n(62155),h=n(78341),f=n(61277),p=n(12981);const d=g();function g(){return(0,c.c)()}function m(e,t=g()){return(0,l.c)(t,e)}function y(e){return e[3]}function x(e){return e}function v(e,t,n){if(null==t)return!1;const{origin:r,direction:i}=t,o=w;o[0]=r[0]-e[0],o[1]=r[1]-e[1],o[2]=r[2]-e[2];const s=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===s)return!1;const a=2*(i[0]*o[0]+i[1]*o[1]+i[2]*o[2]),l=a*a-4*s*(o[0]*o[0]+o[1]*o[1]+o[2]*o[2]-e[3]*e[3]);if(l<0)return!1;const c=Math.sqrt(l);let u=(-a-c)/(2*s);const h=(-a+c)/(2*s);return(u<0||h<u&&h>0)&&(u=h),!(u<0||(n&&(n[0]=r[0]+i[0]*u,n[1]=r[1]+i[1]*u,n[2]=r[2]+i[2]*u),0))}const w=(0,a.c)();function b(e,t){return v(e,t,null)}function A(e,t,n){const r=p.WM.get(),i=p.MP.get();(0,s.c)(r,t.origin,t.direction);const a=y(e);(0,s.c)(n,r,t.origin),(0,s.b)(n,n,1/(0,s.l)(n)*a);const l=_(e,t.origin),c=(0,f.EU)(t.origin,n);return(0,o.d)(i,c+l,r),(0,s.m)(n,n,i),n}function T(e,t,n){const r=(0,s.g)(p.WM.get(),t,e),i=(0,s.b)(p.WM.get(),r,e[3]/(0,s.l)(r));return(0,s.e)(n,i,e)}function _(e,t){const n=(0,s.g)(p.WM.get(),t,e),r=(0,s.l)(n),o=y(e),a=o+Math.abs(o-r);return(0,i.ZF)(o/a)}const M=(0,a.c)();function S(e,t,n,r){const o=(0,s.g)(M,t,e);switch(n){case u.R.X:{const e=(0,i.jE)(o,M)[2];return(0,s.s)(r,-Math.sin(e),Math.cos(e),0)}case u.R.Y:{const e=(0,i.jE)(o,M),t=e[1],n=e[2],a=Math.sin(t);return(0,s.s)(r,-a*Math.cos(n),-a*Math.sin(n),Math.cos(t))}case u.R.Z:return(0,s.n)(r,o);default:return}}function O(e,t){const n=(0,s.g)(E,t,e);return(0,s.l)(n)-e[3]}function I(e,t){const n=(0,s.a)(e,t),r=y(e);return n<=r*r}const E=(0,a.c)(),C=g();Object.freeze(Object.defineProperty({__proto__:null,NullSphere:d,altitudeAt:O,angleToSilhouette:_,axisAt:S,clear:function(e){e[0]=e[1]=e[2]=e[3]=0},closestPoint:function(e,t,n){return v(e,t,n)?n:((0,h.JI)(t,e,n),T(e,n,n))},closestPointOnSilhouette:A,containsPoint:I,copy:m,create:g,distanceToSilhouette:function(e,t){const n=(0,s.g)(p.WM.get(),t,e),r=(0,s.p)(n),i=e[3]*e[3];return Math.sqrt(Math.abs(r-i))},elevate:function(e,t,n){return e!==n&&(0,s.i)(n,e),n[3]=e[3]+t,n},fromCenterAndRadius:function(e,t){return(0,c.f)(e[0],e[1],e[2],t)},fromRadius:function(e,t){return e[0]=e[1]=e[2]=0,e[3]=t,e},fromValues:function(e,t,n,r){return(0,c.f)(e,t,n,r)},getCenter:x,getRadius:y,intersectRay:v,intersectRayClosestSilhouette:function(e,t,n){if(v(e,t,n))return n;const r=A(e,t,p.WM.get());return(0,s.e)(n,t.origin,(0,s.b)(p.WM.get(),t.direction,(0,s.h)(t.origin,r)/(0,s.l)(t.direction))),n},intersectsRay:b,projectPoint:T,setAltitudeAt:function(e,t,n,r){const i=O(e,t),o=S(e,t,u.R.Z,E),a=(0,s.b)(E,o,n-i);return(0,s.e)(r,t,a)},setExtent:function(e,t,n){return r.Z.getLogger("esri.geometry.support.sphere").error("sphere.setExtent is not yet supported"),e===n?n:m(e,n)},tmpSphere:C,union:function(e,t,n=g()){const r=(0,s.h)(e,t),i=e[3],o=t[3];return r+o<i?((0,l.c)(n,e),n):r+i<o?((0,l.c)(n,t),n):((0,s.f)(n,e,t,(r+o-i)/(2*r)),n[3]=(r+i+o)/2,n)},wrap:function(e){return e}},Symbol.toStringTag,{value:"Module"}))},97323:(e,t,n)=>{function r(){return[0,0]}function i(e,t){return[e,t]}function o(e,t){return new Float64Array(e,t,2)}function s(){return i(1,1)}function a(){return i(1,0)}function l(){return i(0,1)}n.d(t,{a:()=>r,c:()=>o,f:()=>i});const c=s(),u=a(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:h,ZEROS:[0,0],clone:function(e){return[e[0],e[1]]},create:r,createView:o,fromArray:function(e,t=[0,0]){const n=Math.min(2,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t},fromValues:i,ones:s,unitX:a,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},20773:(e,t,n)=>{n.d(t,{a:()=>a,b:()=>s,c:()=>i,d:()=>u,e:()=>l,n:()=>h,s:()=>c,t:()=>o});var r=n(72220);function i(e,t,n){o(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function o(e,t,n,i=3,o=i){if(e.length/i!==Math.ceil(t.length/o))return r.c.error("source and destination buffers need to have the same number of elements"),e;const s=e.length/i,a=n[0],l=n[1],c=n[2],u=n[4],h=n[5],f=n[6],p=n[8],d=n[9],g=n[10],m=n[12],y=n[13],x=n[14];let v=0,w=0;for(let n=0;n<s;n++){const n=t[v],r=t[v+1],s=t[v+2];e[w]=a*n+u*r+p*s+m,e[w+1]=l*n+h*r+d*s+y,e[w+2]=c*n+f*r+g*s+x,v+=o,w+=i}return e}function s(e,t,n){a(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function a(e,t,n,i=3,o=i){if(e.length/i!==Math.ceil(t.length/o))return void r.c.error("source and destination buffers need to have the same number of elements");const s=e.length/i,a=n[0],l=n[1],c=n[2],u=n[3],h=n[4],f=n[5],p=n[6],d=n[7],g=n[8];let m=0,y=0;for(let n=0;n<s;n++){const n=t[m],r=t[m+1],s=t[m+2];e[y]=a*n+u*r+p*s,e[y+1]=l*n+h*r+d*s,e[y+2]=c*n+f*r+g*s,m+=o,y+=i}}function l(e,t,n){c(e.typedBuffer,t,n,e.typedBufferStride)}function c(e,t,n,r=3){const i=Math.min(e.length/r,t.count),o=t.typedBuffer,s=t.typedBufferStride;let a=0,l=0;for(let t=0;t<i;t++)e[l]=n*o[a],e[l+1]=n*o[a+1],e[l+2]=n*o[a+2],a+=s,l+=r}function u(e,t){h(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function h(e,t,n=3,r=n){const i=Math.min(e.length/n,t.length/r);let o=0,s=0;for(let a=0;a<i;a++){const i=t[o],a=t[o+1],l=t[o+2],c=i*i+a*a+l*l;if(c>0){const t=1/Math.sqrt(c);e[s]=t*i,e[s+1]=t*a,e[s+2]=t*l}o+=r,s+=n}}Object.freeze(Object.defineProperty({__proto__:null,normalize:h,normalizeView:u,scale:c,scaleView:l,shiftRight:function(e,t,n){const r=Math.min(e.count,t.count),i=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride;let l=0,c=0;for(let e=0;e<r;e++)i[c]=s[l]>>n,i[c+1]=s[l+1]>>n,i[c+2]=s[l+2]>>n,l+=a,c+=o},transformMat3:a,transformMat3View:s,transformMat4:o,transformMat4View:i},Symbol.toStringTag,{value:"Module"}))},91303:(e,t,n)=>{var r;n.d(t,{Y:()=>r}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(r||(r={}))},22807:(e,t,n)=>{n.d(t,{x:()=>i});var r=n(41213);class i{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,r.Y)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*o);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,o));e++)this._items.push(this._allocator())}}const o=1024},70163:(e,t,n)=>{n.d(t,{Jl:()=>u,n$:()=>h});var r=n(3172),i=n(20102),o=n(95330),s=n(17452),a=n(49917);let l=null,c=!0;function u(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(e,t,n)}catch(e){c=!1}const i=function(e,t,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(e,t)}(t,n,r);return i.data.set(e,0),i}async function h(e,t){const{arrayBuffer:l,mediaType:c}=await async function(e,t){const n=(0,s.sJ)(e);if(n?.isBase64)return{arrayBuffer:(0,a.R)(n.data),mediaType:n.mediaType};const i=await(0,r.Z)(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader("Content-Type")}}(e,t),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:e,parseGif:r}=await n.e(3310).then(n.bind(n,83310));if(e(l))return r(l,t)}if(u){const{isAnimatedPNG:e,parseApng:r}=await n.e(4492).then(n.bind(n,54492));if(e(l))return r(l,t)}return async function(e,t){const n=window.URL.createObjectURL(e);try{const{data:e}=await(0,r.Z)(n,{...t,responseType:"image"});return e}catch(e){if(!(0,o.D_)(e))throw new i.Z("invalid-image",`Could not fetch requested image at ${n}`);throw e}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:c}),t)}},83025:(e,t,n)=>{n.d(t,{JK:()=>a,QZ:()=>o,Rq:()=>s,bg:()=>i,mB:()=>l});var r=n(1533);function i(e,t=!1){return e<=r.DB?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function o(e){return((0,r.kJ)(e)?e.length:e.byteLength/8)<=r.DB?Array.from(e):new Float64Array(e)}function s(e,t,n){return Array.isArray(e)?e.slice(t,t+n):e.subarray(t,t+n)}function a(e,t){for(let n=0;n<t.length;++n)e[n]=t[n];return e}function l(e){return Array.isArray(e)?new Float64Array(e):e}},24882:(e,t,n)=>{n.d(t,{$z:()=>s,KF:()=>u,mi:()=>i});var r=n(1533);function i(e){return(0,r.kJ)(e)?e.length<r.DB?e:o(e):e.length<r.DB?Array.from(e):e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:o(e)}function o(e){let t=!0;for(const n of e){if(n>=65536)return(0,r.kJ)(e)?new Uint32Array(e):e;n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}function s(e){return e<=r.DB?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=(()=>{const e=new Uint32Array(131072);for(let t=0;t<e.length;++t)e[t]=t;return e})();const l=[0],c=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function u(e){if(1===e)return l;if(e<r.DB)return Array.from(new Uint16Array(c.buffer,0,e));if(e<c.length)return new Uint16Array(c.buffer,0,e);if(e>a.length){const t=Math.max(2*a.length,e);a=new Uint32Array(t);for(let e=0;e<a.length;e++)a[e]=e}return new Uint32Array(a.buffer,0,e)}new Uint8Array(65536)},62540:(e,t,n)=>{n.d(t,{Z:()=>x});var r,i=n(43697),o=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011),h=n(75215),f=n(65542),p=n(60746),d=n(71630);const g="esri.geometry.support.MeshComponent",m=a.Z.getLogger(g);let y=r=class extends o.wq{static from(e){return(0,h.TJ)(r,e)}constructor(e){super(e),this.faces=null,this.material=null,this.shading="source",this.trustSourceNormals=!1}castFaces(e){return(0,d.X)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},m)}castMaterial(e){return(0,h.TJ)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?p.Z:f.Z,e)}clone(){return new r({faces:(0,s.d9)(this.faces),shading:this.shading,material:(0,s.d9)(this.material),trustSourceNormals:this.trustSourceNormals})}cloneWithDeduplication(e,t){const n={faces:(0,s.d9)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals};return new r(n)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,i._)([(0,l.Cb)({json:{write:!0}})],y.prototype,"faces",void 0),(0,i._)([(0,c.p)("faces")],y.prototype,"castFaces",null),(0,i._)([(0,l.Cb)({type:f.Z,json:{write:!0}})],y.prototype,"material",void 0),(0,i._)([(0,c.p)("material")],y.prototype,"castMaterial",null),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"shading",void 0),(0,i._)([(0,l.Cb)({type:Boolean})],y.prototype,"trustSourceNormals",void 0),y=r=(0,i._)([(0,u.j)(g)],y);const x=y},85872:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(36030)),l=n(52011),c=n(65617),u=n(94139);let h=class extends((0,i.J)(o.wq)){constructor(e){super(e),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,c.c)()}getOriginPoint(e){const[t,n,r]=this.origin;return new u.Z({x:t,y:n,z:r,spatialReference:e})}setOriginFromPoint({x:e,y:t,z:n}){this.origin=(0,c.f)(e,t,n??0)}};(0,r._)([(0,a.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],h.prototype,"type",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"origin",void 0),h=(0,r._)([(0,l.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],h);const f=h},50567:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(43697),i=n(2368),o=n(96674),s=(n(92604),n(75215),n(67676),n(80442),n(20102),n(36030)),a=n(52011);let l=class extends((0,i.J)(o.wq)){constructor(){super({}),this.type="georeferenced",this.isRelative=!1,this.isGeoreferenced=!0}};(0,r._)([(0,s.J)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),l=(0,r._)([(0,a.j)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l);const c=l},84555:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(36030)),l=n(52011),c=n(65617),u=n(94139);let h=class extends((0,i.J)(o.wq)){constructor(e){super(e),this.type="local",this.isRelative=!0,this.isGeoreferenced=!1,this.origin=(0,c.c)()}getOriginPoint(e){const[t,n,r]=this.origin;return new u.Z({x:t,y:n,z:r,spatialReference:e})}setOriginFromPoint({x:e,y:t,z:n}){this.origin=(0,c.f)(e,t,n??0)}};(0,r._)([(0,a.J)({local:"local"},{readOnly:!0})],h.prototype,"type",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"origin",void 0),h=(0,r._)([(0,l.j)("esri.geometry.support.MeshLocalVertexSpace")],h);const f=h},65542:(e,t,n)=>{n.d(t,{Z:()=>f});var r,i=n(43697),o=n(22303),s=n(96674),a=n(5600),l=(n(75215),n(67676),n(80442),n(52011)),c=n(85965),u=n(80218);let h=r=class extends s.wq{constructor(e){super(e),this.color=null,this.colorTexture=null,this.colorTextureTransform=null,this.normalTexture=void 0,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const i=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,i),i}clonePropertiesWithDeduplication(e){return{color:null!=this.color?this.color.clone():null,colorTexture:this.colorTexture?.cloneWithDeduplication(e),normalTexture:this.normalTexture?.cloneWithDeduplication(e),alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:this.colorTextureTransform?.clone(),normalTextureTransform:this.normalTextureTransform?.clone()}}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null!=this.color?16:0,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null!=this.colorTextureTransform?20:0,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null!=this.normalTextureTransform?20:0,e}};(0,i._)([(0,a.Cb)({type:o.Z,json:{write:!0}})],h.prototype,"color",void 0),(0,i._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"colorTexture",void 0),(0,i._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"colorTextureTransform",void 0),(0,i._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"normalTexture",void 0),(0,i._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"normalTextureTransform",void 0),(0,i._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaMode",void 0),(0,i._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaCutoff",void 0),(0,i._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],h.prototype,"doubleSided",void 0),h=r=(0,i._)([(0,l.j)("esri.geometry.support.MeshMaterial")],h);const f=h},60746:(e,t,n)=>{n.d(t,{Z:()=>f});var r,i=n(43697),o=n(22303),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011)),l=n(65542),c=n(85965),u=n(80218);let h=r=class extends l.Z{constructor(e){super(e),this.emissiveColor=null,this.emissiveTexture=null,this.emissiveTextureTransform=void 0,this.occlusionTexture=null,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null,this.metallicRoughnessTextureTransform=void 0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const i=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,i),i}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null!=this.emissiveColor?16:0,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null!=this.emissiveTextureTransform?20:0,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null!=this.occlusionTextureTransform?20:0,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null!=this.metallicRoughnessTextureTransform?20:0,e}clonePropertiesWithDeduplication(e){return{...super.clonePropertiesWithDeduplication(e),emissiveColor:this.emissiveColor?.clone(),emissiveTexture:this.emissiveTexture?.cloneWithDeduplication(e),emissiveTextureTransform:this.emissiveTextureTransform?.clone(),occlusionTexture:this.occlusionTexture?.cloneWithDeduplication(e),occlusionTextureTransform:this.occlusionTextureTransform?.clone(),metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:this.metallicRoughnessTexture?.cloneWithDeduplication(e),metallicRoughnessTextureTransform:this.metallicRoughnessTextureTransform?.clone()}}};(0,i._)([(0,s.Cb)({type:o.Z,json:{write:!0}})],h.prototype,"emissiveColor",void 0),(0,i._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"emissiveTexture",void 0),(0,i._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"emissiveTextureTransform",void 0),(0,i._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"occlusionTexture",void 0),(0,i._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"occlusionTextureTransform",void 0),(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],h.prototype,"metallic",void 0),(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],h.prototype,"roughness",void 0),(0,i._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"metallicRoughnessTexture",void 0),(0,i._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"metallicRoughnessTextureTransform",void 0),h=r=(0,i._)([(0,a.j)("esri.geometry.support.MeshMaterialMetallicRoughness")],h);const f=h},85965:(e,t,n)=>{n.d(t,{Z:()=>m});var r,i=n(43697),o=(n(80442),n(70163)),s=n(96674),a=n(5600),l=n(75215),c=(n(67676),n(71715)),u=n(52011),h=n(30556),f=n(25929);const p=new WeakMap;let d=0,g=r=class extends s.wq{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){if(e instanceof HTMLImageElement){const i={type:"image-element",src:(0,f.t)(e.src,r),crossOrigin:e.crossOrigin};t[n]=i}else if(e instanceof HTMLCanvasElement){const r=e.getContext("2d").getImageData(0,0,e.width,e.height),i={type:"canvas-element",imageData:this._encodeImageData(r)};t[n]=i}else if(e instanceof HTMLVideoElement){const i={type:"video-element",src:(0,f.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[n]=i}else if(e instanceof ImageData){const r={type:"image-data",imageData:this._encodeImageData(e)};t[n]=r}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=this._decodeImageData(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return this._decodeImageData(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const e=this.data,t=this.url;if(e instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(e.getContext("2d").getImageData(0,0,e.width,e.height));if(e instanceof ImageData)return this._imageDataContainsTransparent(e);if(t){const e=t.substr(t.length-4,4).toLowerCase(),n=t.substr(0,15).toLocaleLowerCase();if(".png"===e||"data:image/png;"===n)return!0}return!1}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(p.has(this.data)||p.set(this.data,++d),t(p.get(this.data))):t()}get memoryUsage(){let e=0;if(e+=null!=this.url?this.url.length:0,null!=this.data){const t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(){const e={url:this.url,data:this.data,wrap:this._cloneWrap()};return new r(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const n=this.clone();return e.set(this,n),n}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}_decodeImageData(e){const t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(0,o.Jl)(n,e.width,e.height)}_imageDataContainsTransparent(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}static from(e){return"string"==typeof e?new r({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new r({data:e}):(0,l.TJ)(r,e)}};(0,i._)([(0,a.Cb)({type:String,json:{write:f.w}})],g.prototype,"url",null),(0,i._)([(0,a.Cb)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,a.Cb)()],g.prototype,"data",null),(0,i._)([(0,h.c)("data")],g.prototype,"writeData",null),(0,i._)([(0,c.r)("data")],g.prototype,"readData",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],g.prototype,"transparent",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],g.prototype,"wrap",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],g.prototype,"contentHash",null),g=r=(0,i._)([(0,u.j)("esri.geometry.support.MeshTexture")],g);const m=g},80218:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011));let l=class extends((0,i.J)(o.wq)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,r._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,r._)([(0,a.j)("esri.geometry.support.MeshTextureTransform")],l);const c=l},71630:(e,t,n)=>{n.d(t,{Q:()=>p,X:()=>g});var r,i=n(43697),o=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011);const h="esri.geometry.support.MeshVertexAttributes",f=a.Z.getLogger(h);let p=r=class extends o.wq{constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return g(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},f)}castPosition(e){return e&&e instanceof Float32Array&&f.warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),g(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},f)}castUv(e){return g(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},f)}castNormal(e){return g(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},f)}castTangent(e){return g(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},f)}clone(){const e={position:(0,s.d9)(this.position),uv:(0,s.d9)(this.uv),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),color:(0,s.d9)(this.color)};return new r(e)}clonePositional(){const e={position:(0,s.d9)(this.position),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),uv:this.uv,color:this.color};return new r(e)}get memoryUsage(){let e=0;return e+=this.position.byteLength,null!=this.uv&&(e+=this.uv.byteLength),null!=this.normal&&(e+=this.normal.byteLength),null!=this.tangent&&(e+=this.tangent.byteLength),null!=this.color&&(e+=this.color.byteLength),e}};function d(e,t,n,r){const{loggerTag:i,stride:o}=t;return e.length%o!=0?(r.error(i,`Invalid array length, expected a multiple of ${o}`),new n([])):e}function g(e,t,n,r,i){if(!e)return e;if(e instanceof t)return d(e,r,t,i);for(const o of n)if(e instanceof o)return d(new t(e),r,t,i);if(Array.isArray(e))return d(new t(e),r,t,i);{const r=n.map((e=>`'${e.name}'`));return i.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function m(e,t,n){t[n]=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"color",void 0),(0,i._)([(0,c.p)("color")],p.prototype,"castColor",null),(0,i._)([(0,l.Cb)({nonNullable:!0,json:{write:m}})],p.prototype,"position",void 0),(0,i._)([(0,c.p)("position")],p.prototype,"castPosition",null),(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"uv",void 0),(0,i._)([(0,c.p)("uv")],p.prototype,"castUv",null),(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"normal",void 0),(0,i._)([(0,c.p)("normal")],p.prototype,"castNormal",null),(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"tangent",void 0),(0,i._)([(0,c.p)("tangent")],p.prototype,"castTangent",null),p=r=(0,i._)([(0,u.j)(h)],p)},72220:(e,t,n)=>{n.d(t,{c:()=>r});const r=n(92604).Z.getLogger("esri.views.3d.support.buffer.math")},16996:(e,t,n)=>{n.d(t,{Ue:()=>l,nF:()=>u,zk:()=>c});var r=n(22021),i=n(22807),o=n(17896),s=n(65617),a=n(12981);function l(e){return e?{origin:(0,s.a)(e.origin),vector:(0,s.a)(e.vector)}:{origin:(0,s.c)(),vector:(0,s.c)()}}function c(e,t,n=l()){return(0,o.i)(n.origin,e),(0,o.g)(n.vector,t,e),n}function u(e,t,n){return function(e,t,n,i,s){const{vector:l,origin:c}=e,u=(0,o.g)(a.WM.get(),t,c),h=(0,o.d)(l,u)/(0,o.p)(l);return(0,o.b)(s,l,(0,r.uZ)(h,0,1)),(0,o.e)(s,s,e.origin)}(e,t,0,0,n)}(0,s.c)(),(0,s.c)(),new i.x((()=>l()))},84470:(e,t,n)=>{n.d(t,{CP:()=>a,JG:()=>d,LL:()=>l,NZ:()=>c,fV:()=>g,vj:()=>y,yT:()=>v,zE:()=>x});var r=n(3172),i=n(67676),o=n(95330),s=n(2981);class a{constructor(e,t,n){this.assetName=e,this.assetMimeType=t,this.parts=n}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,i.fS)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const n=await Promise.all(t.map((t=>t.toBlob(e))));return(0,o.k_)(e),new Blob(n)}}class l{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,r.Z)(this.partUrl,{responseType:"blob"});return(0,o.k_)(e),t}}function c(e){return function(e){return!!e&&(Array.isArray(e)?e.some(p):p(e))}(e?.source)}function u(e){return!!Array.isArray(e)&&e.every((e=>e instanceof a))}const h=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function p(e){if(e instanceof File){const{type:t,name:n}=e;return h.test(t)||f.test(n)}return h.test(e.assetMimeType)||f.test(e.assetName)}function d(e,t){if(!e)return!1;const{source:n}=e;return function(e,t){if(Array.isArray(e)){const n=e;return n.length>0&&n.every((e=>m(e,t)))}return m(e,t)}(n,t)}function g(e,t){if(e===t)return!0;const{source:n}=e,{source:r}=t;if(n===r)return!0;if(u(n)&&u(r)){if(n.length!==r.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...n].sort(e),i=[...r].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(i[e]))return!1;return!0}return!1}function m(e,t){return e instanceof a&&e.isOnService(t)}function y(e,t){return e instanceof File?(0,s.Ow)(e.name,t)??(0,s.S0)(e.type,t):(0,s.S0)(e.assetMimeType,t)??(0,s.Ow)(e.assetName,t)}function x(e){return Array.isArray(e)?e:[e]}function v(e){return!!e.original}},47545:(e,t,n)=>{n.d(t,{d:()=>o});var r=n(22021),i=n(24882);function o(e,t,n){const o=Array.isArray(e),u=o?e.length/t:e.byteLength/(4*t),h=o?e:new Uint32Array(e,0,u*t),f=n?.minReduction??0,p=n?.originalIndices||null,d=p?p.length:0,g=n?.componentOffsets||null;let m=0;if(g)for(let e=0;e<g.length-1;e++){const t=g[e+1]-g[e];t>m&&(m=t)}else m=u;const y=Math.floor(1.1*m)+1;(null==c||c.length<2*y)&&(c=new Uint32Array((0,r.Sf)(2*y)));for(let e=0;e<2*y;e++)c[e]=0;let x=0;const v=!!g&&!!p,w=v?d:u;let b=(0,i.$z)(u);const A=new Uint32Array(d),T=1.96;let _=0!==f?Math.ceil(4*T*T/(f*f)*f*(1-f)):w,M=1,S=g?g[1]:w;for(let e=0;e<w;e++){if(e===_){const t=1-x/e;if(t+T*Math.sqrt(t*(1-t)/e)<f)return null;_*=2}if(e===S){for(let e=0;e<2*y;e++)c[e]=0;if(p)for(let e=g[M-1];e<g[M];e++)A[e]=b[p[e]];S=g[++M]}const n=v?p[e]:e,r=n*t,i=l(h,r,t);let o=i%y,a=x;for(;0!==c[2*o+1];){if(c[2*o]===i){const e=c[2*o+1]-1;if(s(h,r,e*t,t)){a=b[e];break}}o++,o>=y&&(o-=y)}a===x&&(c[2*o]=i,c[2*o+1]=n+1,x++),b[n]=a}if(0!==f&&1-x/u<f)return null;if(v){for(let e=g[M-1];e<A.length;e++)A[e]=b[p[e]];b=(0,i.mi)(A)}const O=o?new Array(x):new Uint32Array(x*t);x=0;for(let e=0;e<w;e++)b[e]===x&&(a(h,(v?p[e]:e)*t,O,x*t,t),x++);if(p&&!v){const e=new Uint32Array(d);for(let t=0;t<e.length;t++)e[t]=b[p[t]];b=(0,i.mi)(e)}return{buffer:Array.isArray(O)?O:O.buffer,indices:b,uniqueCount:x}}function s(e,t,n,r){for(let i=0;i<r;i++)if(e[t+i]!==e[n+i])return!1;return!0}function a(e,t,n,r,i){for(let o=0;o<i;o++)n[r+o]=e[t+o]}function l(e,t,n){let r=0;for(let i=0;i<n;i++)r=e[t+i]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let c=null},62073:(e,t,n)=>{n.d(t,{Ue:()=>o,zu:()=>s,mJ:()=>p}),n(22021);var r=n(17896),i=n(65617);function o(e=d){return[e[0],e[1],e[2],e[3]]}function s(e,t,n,i=0,p=Math.floor(n*(1/3)),d=Math.floor(n*(2/3))){if(n<3)return!1;t(l,i);let g=p,m=!1;for(;g<n-1&&!m;)t(c,g),g++,m=!(0,r.k)(l,c);if(!m)return!1;for(g=Math.max(g,d),m=!1;g<n&&!m;)t(u,g),g++,(0,r.g)(h,l,c),(0,r.n)(h,h),(0,r.g)(f,c,u),(0,r.n)(f,f),m=!(0,r.k)(l,u)&&!(0,r.k)(c,u)&&Math.abs((0,r.d)(h,f))<a;return m?(function(e,t,n,r=o()){const i=n[0]-t[0],s=n[1]-t[1],a=n[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],u=e[2]-t[2],h=s*u-a*c,f=a*l-i*u,p=i*c-s*l,d=h*h+f*f+p*p,g=Math.abs(d-1)>1e-5&&d>1e-12?1/Math.sqrt(d):1;r[0]=h*g,r[1]=f*g,r[2]=p*g,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2])}(l,c,u,e),!0):(0!==i||1!==p||2!==d)&&s(e,t,n,0,1,2)}n(8310),n(61277),n(12981),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)();const a=.99619469809,l=(0,i.c)(),c=(0,i.c)(),u=(0,i.c)(),h=(0,i.c)(),f=(0,i.c)();function p(e){return e}const d=[0,0,1,0];var g,m;(m=g||(g={}))[m.NONE=0]="NONE",m[m.CLAMP=1]="CLAMP",m[m.INFINITE_MIN=4]="INFINITE_MIN",m[m.INFINITE_MAX=8]="INFINITE_MAX",g.INFINITE_MIN,g.INFINITE_MAX,g.INFINITE_MAX},78341:(e,t,n)=>{n.d(t,{JI:()=>c,Ue:()=>s,re:()=>l}),n(67676);var r=n(22807),i=n(17896),o=n(65617);function s(e){return e?a((0,o.a)(e.origin),(0,o.a)(e.direction)):a((0,o.c)(),(0,o.c)())}function a(e,t){return{origin:e,direction:t}}function l(e,t){const n=u.get();return n.origin=e,n.direction=t,n}function c(e,t,n){const r=(0,i.d)(e.direction,(0,i.g)(n,t,e.origin));return(0,i.e)(n,e.origin,(0,i.b)(n,e.direction,r)),n}n(12981);const u=new r.x((()=>s()))},61277:(e,t,n)=>{n.d(t,{EU:()=>s});var r=n(22021),i=n(17896),o=n(65617);function s(e,t){const n=(0,i.d)(e,t)/((0,i.l)(e)*(0,i.l)(t));return-(0,r.ZF)(n)}(0,o.c)(),(0,o.c)()},12981:(e,t,n)=>{n.d(t,{MP:()=>d,WM:()=>p});var r=n(91303),i=n(41213),o=n(46521),s=n(13598),a=n(94961),l=n(97323),c=n(65617),u=n(88669);class h{constructor(e,t,n){this._itemByteSize=e,this._itemCreate=t,this._buffers=new Array,this._items=new Array,this._itemsPtr=0,this._itemsPerBuffer=Math.ceil(n/this._itemByteSize)}get(){0===this._itemsPtr&&(0,i.Y)((()=>this._reset()));const e=Math.floor(this._itemsPtr/this._itemsPerBuffer);for(;this._buffers.length<=e;){const e=new ArrayBuffer(this._itemsPerBuffer*this._itemByteSize);for(let t=0;t<this._itemsPerBuffer;++t)this._items.push(this._itemCreate(e,t*this._itemByteSize));this._buffers.push(e)}return this._items[this._itemsPtr++]}_reset(){const e=2*(Math.floor(this._itemsPtr/this._itemsPerBuffer)+1);for(;this._buffers.length>e;)this._buffers.pop(),this._items.length=this._buffers.length*this._itemsPerBuffer;this._itemsPtr=0}static createVec2f64(e=f){return new h(16,l.c,e)}static createVec3f64(e=f){return new h(24,c.b,e)}static createVec4f64(e=f){return new h(32,u.a,e)}static createMat3f64(e=f){return new h(72,o.a,e)}static createMat4f64(e=f){return new h(128,s.a,e)}static createQuatf64(e=f){return new h(32,a.c,e)}get test(){return{size:this._buffers.length*this._itemsPerBuffer*this._itemByteSize}}}const f=4*r.Y.KILOBYTES,p=(h.createVec2f64(),h.createVec3f64()),d=(h.createVec4f64(),h.createMat3f64(),h.createMat4f64());h.createQuatf64()},40671:(e,t,n)=>{n.r(t),n.d(t,{assetMapFromAssetMapsJSON:()=>tt,extractMesh:()=>Ke,meshFeatureSetFromJSON:()=>Xe});var r=n(38171),i=n(92604),o=n(30175),s=n(65617),a=n(6570),l=n(43697),c=n(20102),u=n(83379),h=n(609),f=n(95330),p=n(17445),d=n(5600),g=(n(75215),n(67676),n(80442),n(52011)),m=n(9361),y=n(94139),x=n(38913),v=n(3709),w=n(62540),b=n(85872),A=n(50567),T=n(84555),_=n(2674),M=n(71630),S=n(95401),O=n(62155),I=n(86662),E=n(83025),C=n(24882),R=n(47545),N=(n(66577),n(22021)),L=n(67900),P=n(17896),Z=n(62073);n(4726),n(22631),n(35065);const F=(0,Z.Ue)();function U(e,t,n,r,i,o,s){i*=3;for(let a=0;a<o;++a){const o=e[t];r[i++]=o[0],r[i++]=o[1],r[i++]=s?o[2]:0,t+=n}return i/3}function D(e,t,n){if(t){const t=function(e,t,n){const r=function(e,t,n,r){const i=(e=>!Array.isArray(e[0]))(t)?(e,n)=>t[3*e+n]:(e,n)=>t[e][n],o=r?(0,L.c9)(r)/(0,L._R)(r):1;return(0,Z.zu)(e,((e,t)=>(0,P.s)(e,i(t,0)*o,i(t,1)*o,i(t,2))),n)}(F,e,t,n)?(0,Z.mJ)(F):[0,0,1];return Math.abs(r[2])>Math.cos((0,N.Vl)(80))?O.R.Z:Math.abs(r[1])>Math.abs(r[0])?O.R.Y:O.R.X}(e,e.length-1,n);if(t===O.R.X)return!(0,I.bu)(e,O.R.Y,O.R.Z);if(t===O.R.Y)return!(0,I.bu)(e,O.R.X,O.R.Z)}return!(0,I.bu)(e,O.R.X,O.R.Y)}var j,B;(B=j||(j={}))[B.NONE=0]="NONE",B[B.CCW_IS_HOLE=1]="CCW_IS_HOLE";var z=n(66459);let k=null;function V(e,t){let n=1/0,r=1/0,i=1/0,o=-1/0,s=-1/0,l=-1/0;const c=e.length;let u=0;for(;u<c;){const t=e[u++],a=e[u++],c=e[u++];n=Math.min(n,t),r=Math.min(r,a),i=Math.min(i,c),o=Math.max(o,t),s=Math.max(s,a),l=Math.max(l,c)}return new a.Z({xmin:n,ymin:r,zmin:i,xmax:o,ymax:s,zmax:l,spatialReference:t})}var G=n(87360);function W(e,t,n,r=0){H[0]=e.x,H[1]=e.y;const i=e.z;return H[2]=void 0!==i?i:r,(0,G.projectBuffer)(H,e.spatialReference,0,t,n,0,1)}const H=(0,s.c)();var Y=n(13442);const J="esri.geometry.support.meshUtils.centerAt";const $=(0,s.c)(),q=(0,s.c)(),X=(0,s.c)();n(99880),n(3172);var K=n(17452);function Q(e){const t=(0,K.Yd)(e.url);return n=>{const r=(0,K.PF)(n,t,t),i=r?r.replace(/^ *\.\//,""):null;return(i?e.files.get(i):null)??n}}function ee(e){return ie.fromBlob(e)}n(47026);const te=/^(model\/gltf\+json)|(model\/gltf-binary)$/,ne=/\.(gltf|glb)/i;function re(e){const t=new Map;let n=null;for(const{name:r,mimeType:i,source:o}of e)(null==n||te.test(i)||ne.test(r))&&(n=o.url),t.set(r,o.url),o.files.forEach(((e,n)=>t.set(n,e)));if(null==n)throw new c.Z("mesh-load-external:missing-files","Missing files to load external mesh source");return new ie(n,(()=>e.forEach((({source:e})=>e.dispose()))),t)}class ie{constructor(e,t=(()=>{}),n=new Map){this.url=e,this.dispose=t,this.files=n}static fromBlob(e){const t=URL.createObjectURL(e);return new ie(t,(()=>URL.revokeObjectURL(t)))}}var oe=n(2368),se=n(46791),ae=n(84470);let le=class extends oe.j{constructor(){super(),this.externalSources=new se.Z,this._explicitDisplaySource=null,this.addHandles((0,p.on)((()=>this.externalSources),"after-remove",(({item:e})=>{e===this._explicitDisplaySource&&(this._explicitDisplaySource=null)}),{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,ae.NZ)(e))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every((t=>!(0,ae.fV)(t,e)))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter((t=>(0,ae.JG)(t,e)))}get _implicitDisplaySource(){return this.externalSources.find(ae.NZ)}};(0,l._)([(0,d.Cb)()],le.prototype,"externalSources",void 0),(0,l._)([(0,d.Cb)()],le.prototype,"displaySource",null),(0,l._)([(0,d.Cb)()],le.prototype,"_implicitDisplaySource",null),(0,l._)([(0,d.Cb)()],le.prototype,"_explicitDisplaySource",void 0),le=(0,l._)([(0,g.j)("esri.geometry.support.meshUtils.Metadata")],le);var ce=n(21787),ue=n(46521),he=n(13598),fe=n(58995),pe=n(83932),de=n(56493);function ge(e,t){if(e)for(let n=0;n<e.length;n+=3)for(let r=0;r<3;r++)e[n+r]+=t[r]}const me=(0,s.c)(),ye=(0,he.c)(),xe=(0,ue.c)(),ve={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function we(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null==t)return;const n="number"==typeof t?[t,t,t]:[null!=t.width?t.width:1,null!=t.depth?t.depth:1,null!=t.height?t.height:1];_e[0]=n[0],_e[4]=n[1],_e[8]=n[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)Te[n]=e.position[t+n];(0,P.t)(Te,Te,_e);for(let n=0;n<3;n++)e.position[t+n]=Te[n]}if(n[0]!==n[1]||n[1]!==n[2]){_e[0]=1/n[0],_e[4]=1/n[1],_e[8]=1/n[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)Te[n]=e.normal[t+n];(0,P.t)(Te,Te,_e),(0,P.n)(Te,Te);for(let n=0;n<3;n++)e.normal[t+n]=Te[n]}}}(e,n?.size);const{vertexAttributes:r,vertexSpace:i,transform:o}=(0,z.w1)(e,t,n);return{vertexAttributes:new M.Q({...r,uv:e.uv}),vertexSpace:i,transform:o,components:[new w.Z({faces:e.faces,material:n&&n.material||null})],spatialReference:t.spatialReference}}const be={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},Ae={south:0,east:1,north:2,west:3,up:4,down:5},Te=(0,s.c)(),_e=(0,ue.c)();var Me=n(52138);const Se="esri.geometry.support.meshUtils.rotate";function Oe(e,t,n,r=s.Z){if(null!=e){(0,Me.d)(Re,(0,v.WH)(t),(0,v.ZZ)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)Ie[n]=e[t+n]-r[n];(0,P.m)(Ie,Ie,Re);for(let n=0;n<3;n++)e[t+n]=Ie[n]+r[n]}}}const Ie=(0,s.c)(),Ee=(0,s.c)(),Ce=(0,v.Ue)(),Re=(0,he.c)(),Ne=(0,ue.c)(),Le=(0,s.c)(),Pe="esri.geometry.support.meshUtils.scale";function Ze(e,t,n=s.Z){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)Fe[t]=e[r+t]-n[t];(0,P.b)(Fe,Fe,t);for(let t=0;t<3;t++)e[r+t]=Fe[t]+n[t]}}const Fe=(0,s.c)(),Ue=(0,s.c)(),De=(0,s.c)();var je,Be=n(2981);async function ze(e){const{BlobReader:t,ZipReader:r,BlobWriter:i}=await Promise.all([n.e(2712),n.e(4041)]).then(n.bind(n,74041)),o=[],s=new r(new t(e));return(await s.getEntries()).forEach((e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new i,n=e.getData?.(t).then((t=>new File([t],e.filename)));n&&o.push(n)})),Promise.all(o)}const ke="esri.geometry.Mesh",Ve={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:A.Z,"georeferenced-relative":b.Z,local:T.Z}};let Ge=je=class extends(u.Z.LoadableMixin((0,h.v)(m.Z))){constructor(e){super(e),this.components=null,this.vertexSpace=new A.Z,this.transform=null,this.metadata=new le,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new M.Q,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.addHandles((0,p.YP)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:e,spatialReference:t,vertexAttributes:n,vertexSpace:r}=this,i=n.position;if(0===i.length||e&&0===e.length)return new a.Z({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t});if("local"===r.type){const{_untransformedExtent:e,transform:n}=this;return function({xmin:e,xmax:t,ymin:n,ymax:r,zmin:i,zmax:o},s,a,l){i??=0,o??=0,k??=new Float64Array(24);const c=k;return c[0]=e,c[1]=n,c[2]=i,c[3]=e,c[4]=r,c[5]=i,c[6]=t,c[7]=r,c[8]=i,c[9]=t,c[10]=n,c[11]=i,c[12]=e,c[13]=n,c[14]=o,c[15]=e,c[16]=r,c[17]=o,c[18]=t,c[19]=r,c[20]=o,c[21]=t,c[22]=n,c[23]=o,(0,z.project)({positions:c,transform:s,vertexSpace:a,inSpatialReference:l,outSpatialReference:l,outPositions:c,local:!1}),V(c,l)}(e,n,r,t)}if("georeferenced-relative"===r.type){const{transform:e}=this;return V((0,z.project)({positions:i,transform:e,vertexSpace:r,inSpatialReference:t,outSpatialReference:t,local:!1}),t)}return V(i,t)}get _untransformedExtent(){return V(this.vertexAttributes.position,this.spatialReference)}get anchor(){const{vertexSpace:e}=this;if(e.isRelative)return e.getOriginPoint(this.spatialReference);const{center:t,zmin:n}=this._transformedExtent;return new y.Z({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get origin(){const{vertexSpace:e}=this;return e.isRelative?e.getOriginPoint(this.spatialReference):this._transformedExtent.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this.loaded?(this.components||(this.components=[]),this.components.push(w.Z.from(e)),this.notifyChange("components")):i.Z.getLogger(this).error("addComponent()","Mesh must be loaded before applying operations")}removeComponent(e){if(this.loaded){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}i.Z.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}else i.Z.getLogger(this).error("removeComponent()","Mesh must be loaded before applying operations")}rotate(e,t,n,r){return(0,v.qw)(e,t,n,He),function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position||0===t[3])return;const{spatialReference:r,vertexSpace:o}=e;if(o.isRelative){(0,Y.A)(o,Se,n);const r=n?.origin??e.origin;e.transform??=new _.Z,function(e,t,n,r){const i=t.origin,o=(0,P.s)(Ie,r.x,r.y,r.z??0),a=(0,P.g)(Ie,o,i);e.applyLocalInverse(a,Ee),e.rotation=(0,v.qC)(e.rotation,n,(0,v.Ue)()),e.applyLocalInverse(a,a),(0,P.g)(a,a,Ee),e.translation=(0,P.e)((0,s.c)(),e.translation,a)}(e.transform,o,t,r)}else{const o=n?.origin??e.origin;(0,Y.h)(r,n)?function(e,t,n){const r=e.spatialReference,i=(0,fe.rS)(r),o=Le;W(n,o,i)||W(e.origin,o,i);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,h=null!=l?new Float32Array(l.length):null;(0,pe.B)(i,o,Re,i),(0,ce.f)(Ne,Re);const f=Ce;(0,P.t)((0,v.ZZ)(Ce),(0,v.ZZ)(t),Ne),f[3]=t[3],(0,de.XO)(s,r,c),null!=a&&null!=u&&(0,de.Iz)(a,s,c,r,u),null!=l&&null!=h&&(0,de.wi)(l,s,c,r,h),Oe(c,f,3,o),(0,de.To)(c,s,r),null!=a&&null!=u&&(Oe(u,f,3),(0,de.Yk)(u,s,c,r,a)),null!=l&&null!=h&&(Oe(h,f,4),(0,de.M2)(h,s,c,r,l)),e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=Le;if(!W(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,i.Z.getLogger(Se).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Oe(e.vertexAttributes.position,t,3,r),Oe(e.vertexAttributes.normal,t,3),Oe(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,o)}}(this,He,r),this}offset(e,t,n,r){return this.loaded?(We[0]=e,We[1]=t,We[2]=n,function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:r}=e;r.isRelative?((0,Y.A)(r,"esri.geometry.support.meshUtils.offset",n),function(e,t){const n=e.origin;e.origin=(0,P.e)((0,s.c)(),n,t)}(r,t)):(0,Y.h)(e.spatialReference,n)?function(e,t){const n=e.spatialReference,r=e.vertexAttributes.position,i=e.vertexAttributes.normal,o=e.vertexAttributes.tangent,s=new Float64Array(r.length),a=null!=i?new Float32Array(i.length):null,l=null!=o?new Float32Array(o.length):null,c=e.extent.center,u=me;(0,pe.B)(n,[c.x,c.y,c.z],ye,(0,fe.rS)(n)),(0,ce.f)(xe,ye),(0,P.t)(u,t,xe),(0,de.XO)(r,n,s),null!=i&&null!=a&&(0,de.Iz)(i,r,s,n,a),null!=o&&null!=l&&(0,de.wi)(o,r,s,n,l),ge(s,u),(0,de.To)(s,r,n),null!=i&&null!=a&&(0,de.Yk)(a,r,s,n,i),null!=o&&null!=l&&(0,de.M2)(l,r,s,n,o),e.vertexAttributesChanged()}(e,t):function(e,t){ge(e.vertexAttributes.position,t),e.vertexAttributesChanged()}(e,t)}(this,We,r),this):(i.Z.getLogger(this).error("offset()","Mesh must be loaded before applying operations"),this)}scale(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{spatialReference:r,vertexSpace:o}=e;if(o.isRelative){(0,Y.A)(o,Pe,n);const r=n?.origin??e.origin;e.transform??=new _.Z,function(e,t,n,r){const i=t.origin,o=(0,P.s)(Fe,r.x,r.y,r.z),a=(0,P.g)(Fe,o,i);e.applyLocalInverse(a,Ue);const l=(0,P.b)((0,s.c)(),e.scale,n);e.scale=l,e.applyLocalInverse(a,a),(0,P.g)(a,a,Ue),e.translation=(0,P.e)((0,s.c)(),e.translation,a)}(e.transform,o,t,r)}else{const o=(0,Y.h)(r,n),s=n?.origin??e.origin;o?function(e,t,n){const r=e.spatialReference,i=(0,fe.rS)(r),o=De;W(n,o,i)||W(e.origin,o,i);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,h=null!=l?new Float32Array(l.length):null;(0,de.XO)(s,r,c),null!=a&&null!=u&&(0,de.Iz)(a,s,c,r,u),null!=l&&null!=h&&(0,de.wi)(l,s,c,r,h),Ze(c,t,o),(0,de.To)(c,s,r),null!=a&&null!=u&&(0,de.Yk)(u,s,c,r,a),null!=l&&null!=h&&(0,de.M2)(h,s,c,r,l),e.vertexAttributesChanged()}(e,t,s):function(e,t,n){const r=De;if(!W(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,i.Z.getLogger(Pe).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Ze(e.vertexAttributes.position,t,r),e.vertexAttributesChanged()}(e,t,s)}}(this,e,t),this):(i.Z.getLogger(this).error("scale()","Mesh must be loaded before applying operations"),this)}centerAt(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:r}=e,o=n?.origin??e.origin;r.isRelative?((0,Y.A)(r,J,n),function(e,t,n){const{vertexSpace:r}=e;if(!r.isRelative)return;const o=q,a=$;if(!W(t,a,e.spatialReference))return void i.Z.getLogger(J).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`);if(!W(n,o,e.spatialReference)){const t=e.origin;o[0]=t.x,o[1]=t.y,o[2]=t.z,i.Z.getLogger(J).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}const l=(0,P.g)(X,a,o),c=r.origin;r.origin=(0,P.e)((0,s.c)(),c,l)}(e,t,o)):(0,Y.h)(e.spatialReference,n)?function(e,t,n){const r=(0,z.FF)(e.vertexAttributes,n,{geographic:!0}),{position:i,normal:o,tangent:s}=(0,z.iv)(r,t,{geographic:!0});e.vertexAttributes.position=i,e.vertexAttributes.normal=o,e.vertexAttributes.tangent=s,e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=q,o=$;if(W(t,o,e.spatialReference)){if(!W(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,i.Z.getLogger(J).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let i=0;i<3;i++)e[r+i]+=t[i]-n[i]})(e.vertexAttributes.position,o,r),e.vertexAttributesChanged()}else i.Z.getLogger(J).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(e,t,o)}(this,e,t),this):(i.Z.getLogger(this).error("centerAt()","Mesh must be loaded before applying operations"),this)}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,r){const{source:i}=t,{loadGLTFMesh:o}=await(0,f.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r),s=await async function(e,t){if(Array.isArray(e)){if(!e.length)throw new c.Z("mesh-load-external:missing-assets","There must be at least one file to load");return e[0]instanceof File?function(e){return re(e.map((e=>({name:e.name,mimeType:e.type,source:ee(e)}))))}(e):async function(e,t){const n=await(0,f.OT)(e.map((async e=>{const n=await async function(e,t){const{parts:n}=e;if(1===n.length)return new ie(n[0].partUrl);const r=await e.toBlob(t);return(0,f.k_)(t),ie.fromBlob(r)}(e);return(0,f.k_)(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}})));if((0,f.Hc)(t))throw n.forEach((e=>e.source.dispose())),(0,f.zE)();return re(n)}(e,t)}return ee(e)}(i,r);(0,f.k_)(r);const a=o(new y.Z({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:Q(s),requestFile:void 0,useTransform:!0,signal:r?.signal});a.then((()=>s.dispose()),(()=>s.dispose()));const{vertexAttributes:l,components:u}=await a;e.vertexAttributes=l,e.components=u}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneWithVertexSpace(this.vertexSpace.clone())}cloneWithVertexSpace(e){let t=null;if(this.components){const e=new Map,n=new Map;t=this.components.map((t=>t.cloneWithDeduplication(e,n)))}const n={components:t,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:e,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new je(n)}cloneShallow(){return new je({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=n.e(7277).then(n.bind(n,7277)),r=this.load(),i=await Promise.all([t,r]),{toBinaryGLTF:o}=i[0];return o(this,e)}get memoryUsage(){let e=0;if(e+=this.vertexAttributes.memoryUsage,null!=this.components)for(const t of this.components)e+=t.memoryUsage;return e}_clearSources(){this.metadata.clearSources()}static createBox(e,t){if(!(e instanceof y.Z))return i.Z.getLogger(ke).error(".createBox()","expected location to be a Point instance"),null;const n=new je(we(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=be,r=4*e.length,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array(2*e.length*3);let l=0,c=0,u=0,h=0;for(let r=0;r<e.length;r++){const f=e[r],p=l/3;for(const e of t)a[h++]=p+e;const d=f.corners;for(let e=0;e<4;e++){const t=d[e];let r=0;s[u++]=.25*n[e][0]+f.uvOrigin[0],s[u++]=f.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0!==f.axis[e]?(i[l++]=.5*f.axis[e],o[c++]=f.axis[e]):(i[l++]=.5*t[r++],o[c++]=0)}}return{position:i,normal:o,uv:s,faces:a}}(),e,t));return t&&t.imageFace&&"all"!==t.imageFace?function(e,t){const n=e.components[0],r=n.faces,i=Ae[t],o=6*i,s=new Array(6),a=new Array(r.length-6);let l=0,c=0;for(let e=0;e<r.length;e++)e>=o&&e<o+6?s[l++]=r[e]:a[c++]=r[e];if(null!=e.vertexAttributes.uv){const t=new Float32Array(e.vertexAttributes.uv),n=4*i*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new w.Z({faces:s,material:n.material}),new w.Z({faces:a})],e}(n,t.imageFace):n}static createSphere(e,t){return e instanceof y.Z?new je(we(function(e=0){const t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array((t-1)*n*2*3);let l=0,c=0,u=0,h=0;for(let e=0;e<=t;e++){const r=e/t*Math.PI+.5*Math.PI,f=Math.cos(r),p=Math.sin(r);Te[2]=p;const d=0===e||e===t,g=d?n-1:n;for(let r=0;r<=g;r++){const p=r/g*2*Math.PI;Te[0]=-Math.sin(p)*f,Te[1]=Math.cos(p)*f;for(let e=0;e<3;e++)i[l]=.5*Te[e],o[l]=Te[e],++l;s[c++]=(r+(d?.5:0))/n,s[c++]=e/t,0!==e&&r!==n&&(e!==t&&(a[u++]=h,a[u++]=h+1,a[u++]=h-n),1!==e&&(a[u++]=h,a[u++]=h-n,a[u++]=h-n-1)),h++}}return{position:i,normal:o,uv:s,faces:a}}(t&&t.densificationFactor||0),e,t)):(i.Z.getLogger(ke).error(".createSphere()","expected location to be a Point instance"),null)}static createCylinder(e,t){return e instanceof y.Z?new je(we(function(e=0){const t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),i=new Float32Array(3*n),o=new Float32Array(2*n),s=new Uint32Array(4*t*3);let a=0,l=0,c=0,u=0,h=0;for(let e=0;e<=5;e++){const n=0===e||5===e,f=e<=1||e>=4,p=2===e||4===e,d=n?t-1:t;for(let g=0;g<=d;g++){const m=g/d*2*Math.PI,y=n?0:.5;Te[0]=y*Math.sin(m),Te[1]=y*-Math.cos(m),Te[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[a++]=Te[t],i[l++]=f?2===t?e<=1?1:-1:0:2===t?0:Te[t]/y;o[c++]=(g+(n?.5:0))/t,o[c++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,p||0===e||g===t||(5!==e&&(s[u++]=h,s[u++]=h+1,s[u++]=h-t),1!==e&&(s[u++]=h,s[u++]=h-t,s[u++]=h-t-1)),h++}}return{position:r,normal:i,uv:o,faces:s}}(t&&t.densificationFactor||0),e,t)):(i.Z.getLogger(ke).error(".createCylinder()","expected location to be a Point instance"),null)}static createPlane(e,t){if(!(e instanceof y.Z))return i.Z.getLogger(ke).error(".createPlane()","expected location to be a Point instance"),null;const n=t?.facing??"up",r=function(e,t){const n="number"==typeof t?t:null!=t?t.width:1,r="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}(n,t?.size);return new je(we(function(e){const t=ve.facingAxisOrderSwap[e],n=ve.position,r=ve.normal,i=new Float64Array(n.length),o=new Float32Array(r.length);let s=0;for(let e=0;e<4;e++){const e=s;for(let a=0;a<3;a++){const l=t[a],c=Math.abs(l)-1,u=l>=0?1:-1;i[s]=n[e+c]*u,o[s]=r[e+c]*u,s++}}return{position:i,normal:o,uv:new Float32Array(ve.uv),faces:new Uint32Array(ve.faces),isPlane:!0}}(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof x.Z))return i.Z.getLogger(ke).error(".createFromPolygon()","expected polygon to be a Polygon instance"),null;const n=function(e){const t=function(e,t,n,r){const i=e.length,o=new Array(i),s=new Array(i),a=new Array(i);let l=0,c=0,u=0,h=0;for(let t=0;t<i;++t)h+=e[t].length;const f=(0,E.bg)(3*h);let p=0;for(let h=i-1;h>=0;h--){const d=e[h],g=n===j.CCW_IS_HOLE&&D(d,t,r);if(g&&1!==i)o[l++]=d;else{let e=d.length;for(let t=0;t<l;++t)e+=o[t].length;const n={index:p,pathLengths:new Array(l+1),count:e,holeIndices:new Array(l)};n.pathLengths[0]=d.length,d.length>0&&(a[u++]={index:p,count:d.length}),p=g?U(d,d.length-1,-1,f,p,d.length,t):U(d,0,1,f,p,d.length,t);for(let e=0;e<l;++e){const r=o[e];n.holeIndices[e]=p,n.pathLengths[e+1]=r.length,r.length>0&&(a[u++]={index:p,count:r.length}),p=U(r,0,1,f,p,r.length,t)}l=0,n.count>0&&(s[c++]=n)}}for(let e=0;e<l;++e){const n=o[e];n.length>0&&(a[u++]={index:p,count:n.length}),p=U(n,0,1,f,p,n.length,t)}return s.length=c,a.length=u,{position:f,polygons:s,outlines:a}}(e.rings,e.hasZ,j.CCW_IS_HOLE,e.spatialReference),n=new Array;let r=0,i=0;for(const e of t.polygons){const o=e.count,s=e.index,a=(0,E.Rq)(t.position,3*s,3*o),l=e.holeIndices.map((e=>e-s)),c=(0,C.mi)((0,S.e)(a,l,3));n.push({position:a,faces:c}),r+=a.length,i+=c.length}const o=function(e,t,n){if(1===e.length)return e[0];const r=(0,E.bg)(t),i=new Array(n);let o=0,s=0,a=0;for(const t of e){for(let e=0;e<t.position.length;e++)r[o++]=t.position[e];for(const e of t.faces)i[s++]=e+a;a=o/3}return{position:r,faces:(0,C.mi)(i)}}(n,r,i),s=Array.isArray(o.position)?(0,R.d)(o.position,3,{originalIndices:o.faces}):(0,R.d)(o.position.buffer,6,{originalIndices:o.faces});return o.position=(0,E.QZ)(new Float64Array(s.buffer)),o.faces=s.indices,o}(e);return new je({vertexAttributes:new M.Q({position:n.position}),components:[new w.Z({faces:n.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new A.Z})}static async createFromGLTF(e,t,r){if(!(e instanceof y.Z))throw i.Z.getLogger(ke).error(".createfromGLTF()","expected location to be a Point instance"),new c.Z("invalid-input","Expected location to be a Point instance");const{loadGLTFMesh:o}=await(0,f.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r);return new je(await o(e,t,r))}static async createFromFiles(e,t,n){if(!(e instanceof y.Z)){const e="Expected location to be a Point instance";throw i.Z.getLogger(ke).error(".createFromFiles()",e),new c.Z("invalid-input",e)}const r=n?.layer;if(!r){const e="A layer is needed to convert the files";throw i.Z.getLogger(ke).error(".createFromFiles()",e),new c.Z("invalid-input",e)}const o=(await async function(e){const t=[];for(const n of e)n.name.toLowerCase().endsWith(".zip")?t.push(ze(n)):t.push(Promise.resolve(n));return(await Promise.all(t)).flat()}(t)).filter((e=>(0,Be.F7)(r.infoFor3D,e))),s=je.createWithExternalSource(e,o),[a]=await r.uploadAssets([s],n);return a}static createWithExternalSource(e,t,n){const r=n?.extent??null,{x:i,y:o,z:s,spatialReference:a}=e,l=n?.transform?.clone()??new _.Z,c=n?.vertexSpace??new T.Z({origin:[i,o,s??0]}),u={source:t,extent:r},h=new le;return h.externalSources.push(u),new je({metadata:h,transform:l,vertexSpace:c,spatialReference:a})}static createIncomplete(e,t){const{x:n,y:r,z:i,spatialReference:o}=e,s=t?.transform?.clone()??new _.Z,a=t?.vertexSpace??new T.Z({origin:[n,r,i??0]}),l=new je({transform:s,vertexSpace:a,spatialReference:o});return l.addResolvingPromise(Promise.reject(new c.Z("mesh-incomplete","Mesh resources are not complete"))),l}};(0,l._)([(0,d.Cb)({type:[w.Z],json:{write:!0}})],Ge.prototype,"components",void 0),(0,l._)([(0,d.Cb)({nonNullable:!0,types:Ve,constructOnly:!0,json:{write:!0}})],Ge.prototype,"vertexSpace",void 0),(0,l._)([(0,d.Cb)({type:_.Z,json:{write:!0}})],Ge.prototype,"transform",void 0),(0,l._)([(0,d.Cb)({constructOnly:!0})],Ge.prototype,"metadata",void 0),(0,l._)([(0,d.Cb)()],Ge.prototype,"hasExtent",null),(0,l._)([(0,d.Cb)()],Ge.prototype,"_transformedExtent",null),(0,l._)([(0,d.Cb)()],Ge.prototype,"_untransformedExtent",null),(0,l._)([(0,d.Cb)()],Ge.prototype,"anchor",null),(0,l._)([(0,d.Cb)()],Ge.prototype,"origin",null),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],Ge.prototype,"extent",null),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Ge.prototype,"hasZ",void 0),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Ge.prototype,"hasM",void 0),(0,l._)([(0,d.Cb)({type:M.Q,nonNullable:!0,json:{write:!0}})],Ge.prototype,"vertexAttributes",void 0),Ge=je=(0,l._)([(0,g.j)(ke)],Ge);const We=(0,s.c)(),He=(0,v.Ue)(),Ye=Ge;var Je=n(82971),$e=n(74889);const qe=()=>i.Z.getLogger("esri.rest.support.meshFeatureSet");function Xe(e,t,n){const i=n.features;n.features=[],delete n.geometryType;const o=$e.Z.fromJSON(n);if(o.geometryType="mesh",!n.assetMaps)return o;const s=tt(t,n.assetMaps),a=e.sourceSpatialReference??Je.Z.WGS84,l=n.globalIdFieldName,{outFields:c}=e,u=null!=c&&c.length>0?(h=c.includes("*")?null:new Set(c),({attributes:e})=>{if(!e)return{};if(!h)return e;for(const t in e)h.has(t)||delete e[t];return e}):()=>({});var h;for(const e of i){const n=Ke(e,l,a,t,s);null!=n&&o.features.push(new r.Z({geometry:n,attributes:u(e)}))}return o}function Ke(e,t,n,r,i){const o=e.attributes[t],l=i.get(o);if(null==l)return qe().error("mesh-feature-set:asset-not-found","Service returned a feature which was not found in the asset map",e),null;if(!e.geometry)return qe().error("mesh-feature-set:no-geometry","Service returned a feature without geometry",e),null;const{originPoint:c,originVector:u}=function({attributes:e},t,{transformFieldRoles:n}){const r=e[n.originX],i=e[n.originY],o=e[n.originZ];return{originPoint:new y.Z({x:r,y:i,z:o,spatialReference:t}),originVector:(0,s.f)(r,i,o)}}(e,n,r),h=a.Z.fromJSON(e.geometry);h.spatialReference=n;const f=function(e,{transformFieldRoles:t}){return new _.Z({translation:[e[t.translationX],-e[t.translationZ],e[t.translationY]],rotationAxis:[e[t.rotationX],-e[t.rotationZ],e[t.rotationY]],rotationAngle:e[t.rotationDeg],scale:[e[t.scaleX],e[t.scaleZ],e[t.scaleY]]})}(e.attributes,r),p=l.projectVertices?new b.Z({origin:u}):new T.Z({origin:u}),d=function(e){const t=Array.from(e.files.values()),n=new Array;for(const e of t){if(e.status!==Qe.COMPLETED)return null;const t=new Array;for(const n of e.parts){if(!n)return null;t.push(new ae.LL(n.url,n.hash))}n.push(new ae.CP(e.name,e.mimeType,t))}return n}(l);return d?Ye.createWithExternalSource(c,d,{extent:h,transform:f,vertexSpace:p}):Ye.createIncomplete(c,{extent:h,transform:f,vertexSpace:p})}var Qe,et;function tt(e,t){const n=new Map;for(const r of t){const t=r.parentGlobalId;if(null==t)continue;const i=r.assetName,s=r.assetType,a=r.assetHash,l=r.assetURL,c=r.conversionStatus,u=r.seqNo,h=(0,Be.d1)(s,e.supportedFormats);if(!h){qe().error("mesh-feature-set:unknown-format",`Service returned an asset of type ${s}, but it does not list it as a supported type`);continue}const f=(0,o.s1)(n,t,(()=>({projectVertices:rt(r.flags).projectVertices,files:new Map})));(0,o.s1)(f.files,i,(()=>({name:i,type:s,mimeType:h,status:nt(c),parts:[]}))).parts[u]={hash:a,url:l}}return n}function nt(e){switch(e){case"COMPLETED":case"SUBMITTED":return Qe.COMPLETED;case"INPROGRESS":return Qe.PENDING;default:return Qe.FAILED}}function rt(e){return{projectVertices:e.includes("PROJECT_VERTICES")}}(et=Qe||(Qe={}))[et.FAILED=0]="FAILED",et[et.PENDING=1]="PENDING",et[et.COMPLETED=2]="COMPLETED"},17662:(e,t,n)=>{n.d(t,{c:()=>i});var r=n(99001);class i{constructor(){this.id=(0,r.D)()}unload(){}}},4726:(e,t,n)=>{var r;n.d(t,{U:()=>r}),function(e){e[e.Layer=0]="Layer",e[e.Object=1]="Object",e[e.Mesh=2]="Mesh",e[e.Line=3]="Line",e[e.Point=4]="Point",e[e.Material=5]="Material",e[e.Texture=6]="Texture",e[e.COUNT=7]="COUNT"}(r||(r={}))},22631:(e,t,n)=>{n.d(t,{Z:()=>I});var r=n(13598),i=n(17896),o=n(24882),s=n(1533);function a(e){if(e.length<s.DB)return Array.from(e);if((0,s.kJ)(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,s.Uc)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}var l=n(47026),c=n(44553),u=n(65617),h=n(11726);class f{constructor(e,t,n,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.indices=n,this.position=r,this._children=void 0,(0,h.hu)(e.length>=1),(0,h.hu)(n.length%this._numIndexPerPrimitive==0),(0,h.hu)(n.length>=e.length*this._numIndexPerPrimitive),(0,h.hu)(3===r.size||4===r.size);const{data:o,size:s}=r,a=e.length;let l=s*n[this._numIndexPerPrimitive*e[0]];p.clear(),p.push(l);const c=(0,u.f)(o[l],o[l+1],o[l+2]),f=(0,u.a)(c);for(let t=0;t<a;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){l=s*n[r+e],p.push(l);let t=o[l];c[0]=Math.min(t,c[0]),f[0]=Math.max(t,f[0]),t=o[l+1],c[1]=Math.min(t,c[1]),f[1]=Math.max(t,f[1]),t=o[l+2],c[2]=Math.min(t,c[2]),f[2]=Math.max(t,f[2])}}this.bbMin=c,this.bbMax=f;const d=(0,i.f)((0,u.c)(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(f[0]-c[0],f[1]-c[1]),f[2]-c[2]);let g=this.radius*this.radius;for(let e=0;e<p.length;++e){l=p.at(e);const t=o[l]-d[0],n=o[l+1]-d[1],r=o[l+2]-d[2],i=t*t+n*n+r*r;if(i<=g)continue;const s=Math.sqrt(i),a=.5*(s-this.radius);this.radius=this.radius+a,g=this.radius*this.radius;const c=a/s;d[0]+=t*c,d[1]+=n*c,d[2]+=r*c}this.center=d,p.clear()}getChildren(){if(this._children||(0,i.a)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,i.f)((0,u.c)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,n=new Uint8Array(t),r=new Array(8);for(let e=0;e<8;++e)r[e]=0;const{data:o,size:s}=this.position;for(let i=0;i<t;++i){let t=0;const a=this._numIndexPerPrimitive*this.primitiveIndices[i];let l=s*this.indices[a],c=o[l],u=o[l+1],h=o[l+2];for(let e=1;e<this._numIndexPerPrimitive;++e){l=s*this.indices[a+e];const t=o[l],n=o[l+1],r=o[l+2];t<c&&(c=t),n<u&&(u=n),r<h&&(h=r)}c<e[0]&&(t|=1),u<e[1]&&(t|=2),h<e[2]&&(t|=4),n[i]=t,++r[t]}let a=0;for(let e=0;e<8;++e)r[e]>0&&++a;if(a<2)return;const l=new Array(8);for(let e=0;e<8;++e)l[e]=r[e]>0?new Uint32Array(r[e]):void 0;for(let e=0;e<8;++e)r[e]=0;for(let e=0;e<t;++e){const t=n[e];l[t][r[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==l[e]&&this._children.push(new f(l[e],this._numIndexPerPrimitive,this.indices,this.position));return this._children}static prune(){p.prune()}}const p=new c.Z({deallocator:null});var d=n(17662),g=n(4726),m=n(22807),y=n(16996);function x(e,t,n){return(0,i.g)(v,t,e),(0,i.g)(w,n,e),(0,i.l)((0,i.c)(v,v,w))/2}n(12981),new m.x(y.Ue),new m.x((()=>{return e?{p0:(0,u.a)(e.p0),p1:(0,u.a)(e.p1),p2:(0,u.a)(e.p2)}:{p0:(0,u.c)(),p1:(0,u.c)(),p2:(0,u.c)()};var e}));const v=(0,u.c)(),w=(0,u.c)(),b=(0,u.c)(),A=(0,u.c)(),T=(0,u.c)(),_=(0,u.c)();var M=n(99001);class S{constructor(e){this.channel=e,this.id=(0,M.D)()}}var O=n(35065);n(9820),(0,u.c)(),new Float32Array(6);class I extends d.c{constructor(e,t,n=[],r=null,i=g.U.Mesh,s=null,a=-1){super(),this.material=e,this.mapPositions=r,this.type=i,this.objectAndLayerIdColor=s,this.edgeIndicesLength=a,this.visible=!0,this._vertexAttributes=new Map,this._indices=new Map,this._boundingInfo=null;for(const[e,n]of t)n&&this._vertexAttributes.set(e,{...n});if(null==n||0===n.length){const e=function(e){const t=e.values().next().value;return null==t?0:t.data.length/t.size}(this._vertexAttributes),t=(0,o.KF)(e);this.edgeIndicesLength=this.edgeIndicesLength<0?e:this.edgeIndicesLength;for(const e of this._vertexAttributes.keys())this._indices.set(e,t)}else for(const[e,t]of n)t&&(this._indices.set(e,(0,o.mi)(t)),e===O.T.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._indices.get(e).length:this.edgeIndicesLength))}instantiate(e={}){const t=new I(e.material||this.material,[],void 0,this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);return this._vertexAttributes.forEach(((e,n)=>{e.exclusive=!1,t._vertexAttributes.set(n,e)})),this._indices.forEach(((e,n)=>t._indices.set(n,e))),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}get vertexAttributes(){return this._vertexAttributes}getMutableAttribute(e){let t=this._vertexAttributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:a(t.data)},this._vertexAttributes.set(e,t)),t}setAttributeData(e,t){const n=this._vertexAttributes.get(e);n&&this._vertexAttributes.set(e,{...n,exclusive:!0,data:t})}get indices(){return this._indices}get indexCount(){const e=this._indices.values().next().value;return e?e.length:0}get faceCount(){return this.indexCount/3}get boundingInfo(){return null==this._boundingInfo&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(e){return!!(this.type===g.U.Mesh?this._computeAttachmentOriginTriangles(e):this.type===g.U.Line?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,i.m)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){const t=this.indices.get(O.T.POSITION);return function(e,t,n){if(!e||!t)return!1;const{size:r,data:o}=e;(0,i.s)(n,0,0,0),(0,i.s)(_,0,0,0);let s=0,a=0;for(let e=0;e<t.length-2;e+=3){const l=t[e]*r,c=t[e+1]*r,u=t[e+2]*r;(0,i.s)(b,o[l],o[l+1],o[l+2]),(0,i.s)(A,o[c],o[c+1],o[c+2]),(0,i.s)(T,o[u],o[u+1],o[u+2]);const h=x(b,A,T);h?((0,i.e)(b,b,A),(0,i.e)(b,b,T),(0,i.b)(b,b,1/3*h),(0,i.e)(n,n,b),s+=h):((0,i.e)(_,_,b),(0,i.e)(_,_,A),(0,i.e)(_,_,T),a+=3)}return!(0===a&&0===s||(0!==s?((0,i.b)(n,n,1/s),0):0===a||((0,i.b)(n,_,1/a),0)))}(this.vertexAttributes.get(O.T.POSITION),t,e)}_computeAttachmentOriginLines(e){const t=this.vertexAttributes.get(O.T.POSITION),n=this.indices.get(O.T.POSITION);return function(e,t,n,r){if(!e)return!1;(0,i.s)(r,0,0,0),(0,i.s)(_,0,0,0);let o=0,s=0;const{size:a,data:l}=e,c=t?t.length-1:l.length/a-1,u=c+(n?2:0);for(let e=0;e<u;e+=2){const n=e<c?e:c,u=e<c?e+1:0,h=(t?t[n]:n)*a,f=(t?t[u]:u)*a;b[0]=l[h],b[1]=l[h+1],b[2]=l[h+2],A[0]=l[f],A[1]=l[f+1],A[2]=l[f+2],(0,i.b)(b,(0,i.e)(b,b,A),.5);const p=(0,i.j)(b,A);p>0?((0,i.e)(r,r,(0,i.b)(b,b,p)),o+=p):0===o&&((0,i.e)(_,_,b),s++)}return 0!==o?((0,i.b)(r,r,1/o),!0):0!==s&&((0,i.b)(r,_,1/s),!0)}(t,n,n&&function(e,t,n){return!(!("isClosed"in e)||!e.isClosed)&&(n?n.length>2:t.data.length>6)}(this.material.parameters,t,n),e)}_computeAttachmentOriginPoints(e){const t=this.indices.get(O.T.POSITION);return function(e,t,n){if(!e||!t)return!1;const{size:r,data:o}=e;(0,i.s)(n,0,0,0);let s=-1,a=0;for(let e=0;e<t.length;e++){const i=t[e]*r;s!==i&&(n[0]+=o[i],n[1]+=o[i+1],n[2]+=o[i+2],a++),s=i}return a>1&&(0,i.b)(n,n,1/a),a>0}(this.vertexAttributes.get(O.T.POSITION),t,e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.indices.get(O.T.POSITION),t=this.vertexAttributes.get(O.T.POSITION);if(!e||0===e.length||!t)return null;const n=this.type===g.U.Mesh?3:1;(0,h.hu)(e.length%n==0,"Indexing error: "+e.length+" not divisible by "+n);const r=(0,o.KF)(e.length/n);return new f(r,n,e,t)}get transformation(){return this._transformation??r.I}set transformation(e){this._transformation=e&&e!==r.I?(0,r.b)(e):null}addHighlight(){const e=new S(l.V_.Highlight);return this.highlights=function(e,t){return null==e&&(e=[]),e.push(t),e}(this.highlights,e),e}removeHighlight(e){this.highlights=function(e,t){if(null==e)return null;const n=e.filter((e=>e!==t));return 0===n.length?null:n}(this.highlights,e)}}},11726:(e,t,n)=>{n.d(t,{hu:()=>i,yK:()=>o}),n(97323),n(98766),(0,n(88669).c)();class r{constructor(e){this.message=e}toString(){return`AssertException: ${this.message}`}}function i(e,t){if(!e){t=t||"Assertion";const e=new Error(t).stack;throw new r(`${t} at ${e}`)}}function o(e,t,n,r){let i,o=(n[0]-e[0])/t[0],s=(r[0]-e[0])/t[0];o>s&&(i=o,o=s,s=i);let a=(n[1]-e[1])/t[1],l=(r[1]-e[1])/t[1];if(a>l&&(i=a,a=l,l=i),o>l||a>s)return!1;a>o&&(o=a),l<s&&(s=l);let c=(n[2]-e[2])/t[2],u=(r[2]-e[2])/t[2];return c>u&&(i=c,c=u,u=i),!(o>u||c>s||(u<s&&(s=u),s<0))}},35065:(e,t,n)=>{var r;n.d(t,{T:()=>r}),function(e){e.POSITION="position",e.NORMAL="normal",e.NORMALCOMPRESSED="normalCompressed",e.UV0="uv0",e.AUXPOS1="auxpos1",e.AUXPOS2="auxpos2",e.COLOR="color",e.SYMBOLCOLOR="symbolColor",e.SIZE="size",e.TANGENT="tangent",e.OFFSET="offset",e.SUBDIVISIONFACTOR="subdivisionFactor",e.COLORFEATUREATTRIBUTE="colorFeatureAttribute",e.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",e.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",e.DISTANCETOSTART="distanceToStart",e.UVMAPSPACE="uvMapSpace",e.BOUNDINGRECT="boundingRect",e.UVREGION="uvRegion",e.PROFILERIGHT="profileRight",e.PROFILEUP="profileUp",e.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",e.FEATUREVALUE="featureValue",e.INSTANCEMODELORIGINHI="instanceModelOriginHi",e.INSTANCEMODELORIGINLO="instanceModelOriginLo",e.INSTANCEMODEL="instanceModel",e.INSTANCEMODELNORMAL="instanceModelNormal",e.INSTANCECOLOR="instanceColor",e.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",e.LOCALTRANSFORM="localTransform",e.GLOBALTRANSFORM="globalTransform",e.BOUNDINGSPHERE="boundingSphere",e.MODELORIGIN="modelOrigin",e.MODELSCALEFACTORS="modelScaleFactors",e.FEATUREATTRIBUTE="featureAttribute",e.STATE="state",e.LODLEVEL="lodLevel",e.POSITION0="position0",e.POSITION1="position1",e.NORMALA="normalA",e.NORMALB="normalB",e.COMPONENTINDEX="componentIndex",e.VARIANTOFFSET="variantOffset",e.VARIANTSTROKE="variantStroke",e.VARIANTEXTENSION="variantExtension",e.U8PADDING="u8padding",e.U16PADDING="u16padding",e.SIDENESS="sideness",e.START="start",e.END="end",e.UP="up",e.EXTRUDE="extrude",e.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",e.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(r||(r={}))},47026:(e,t,n)=>{var r,i,o,s,a,l,c,u,h;n.d(t,{Gv:()=>i,Iq:()=>u,JJ:()=>c,Rw:()=>s,Ti:()=>h,V_:()=>l,Vr:()=>r,hU:()=>a}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(r||(r={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(i||(i={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(o||(o={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(s||(s={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(a||(a={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee",e[e.COUNT=2]="COUNT"}(l||(l={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(c||(c={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON"}(u||(u={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(h||(h={}))},9820:(e,t,n)=>{function r(e,t){const n=e.length;for(let r=0;r<n;++r)o[0]=e[r],t[r]=o[0];return t}function i(e,t){const n=e.length;for(let r=0;r<n;++r)o[0]=e[r],o[1]=e[r]-o[0],t[r]=o[1];return t}n.d(t,{GB:()=>i,U8:()=>r});const o=new Float32Array(2)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7203],{95401:(e,t,n)=>{n.d(t,{e:()=>l});var r,i,o,s=n(5732),a={exports:{}};r=a,i=function(){function e(e,n,i){i=i||2;var o,s,a,c,u,h,f,p=n&&n.length,d=p?n[0]*i:e.length,g=t(e,0,d,i,!0),m=[];if(!g||g.next===g.prev)return m;if(p&&(g=l(e,n,g,i)),e.length>80*i){o=a=e[0],s=c=e[1];for(var y=i;y<d;y+=i)(u=e[y])<o&&(o=u),(h=e[y+1])<s&&(s=h),u>a&&(a=u),h>c&&(c=h);f=0!==(f=Math.max(a-o,c-s))?1/f:0}return r(g,m,i,o,s,f),m}function t(e,t,n,r,i){var o,s;if(i===I(e,t,n,r)>0)for(o=t;o<n;o+=r)s=M(o,e[o],e[o+1],s);else for(o=n-r;o>=t;o-=r)s=M(o,e[o],e[o+1],s);if(s&&v(s,s.next)){var a=s.next;S(s),s=a}return s}function n(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==x(r.prev,r,r.next))r=r.next;else{var i=r.prev;if(S(r),(r=t=i)===r.next)break;n=!0}}while(n||r!==t);return t}function r(e,t,l,c,u,h,f){if(e){!f&&h&&p(e,c,u,h);for(var d,g,m=e;e.prev!==e.next;)if(d=e.prev,g=e.next,h?o(e,c,u,h):i(e))t.push(d.i/l),t.push(e.i/l),t.push(g.i/l),S(e),e=g.next,m=g.next;else if((e=g)===m){f?1===f?r(e=s(n(e),t,l),t,l,c,u,h,2):2===f&&a(e,t,l,c,u,h):r(n(e),t,l,c,u,h,1);break}}}function i(e){var t=e.prev,n=e,r=e.next;if(x(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(m(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&x(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function o(e,t,n,r){var i=e.prev,o=e,s=e.next;if(x(i,o,s)>=0)return!1;for(var a=i.x<o.x?i.x<s.x?i.x:s.x:o.x<s.x?o.x:s.x,l=i.y<o.y?i.y<s.y?i.y:s.y:o.y<s.y?o.y:s.y,c=i.x>o.x?i.x>s.x?i.x:s.x:o.x>s.x?o.x:s.x,u=i.y>o.y?i.y>s.y?i.y:s.y:o.y>s.y?o.y:s.y,h=d(a,l,t,n,r),f=d(c,u,t,n,r),p=e.prevZ,g=e.nextZ;p&&p.z>=h&&g&&g.z<=f;){if(p!==e.prev&&p!==e.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&x(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,g!==e.prev&&g!==e.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,g.x,g.y)&&x(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;p&&p.z>=h;){if(p!==e.prev&&p!==e.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&x(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;g&&g.z<=f;){if(g!==e.prev&&g!==e.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,g.x,g.y)&&x(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function s(e,t,r){var i=e;do{var o=i.prev,s=i.next.next;!v(o,s)&&w(o,i,i.next,s)&&T(o,s)&&T(s,o)&&(t.push(o.i/r),t.push(i.i/r),t.push(s.i/r),S(i),S(i.next),i=e=s),i=i.next}while(i!==e);return n(i)}function a(e,t,i,o,s,a){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&y(l,c)){var u=_(l,c);return l=n(l,l.next),u=n(u,u.next),r(l,t,i,o,s,a),void r(u,t,i,o,s,a)}c=c.next}l=l.next}while(l!==e)}function l(e,r,i,o){var s,a,l,u=[];for(s=0,a=r.length;s<a;s++)(l=t(e,r[s]*o,s<a-1?r[s+1]*o:e.length,o,!1))===l.next&&(l.steiner=!0),u.push(g(l));for(u.sort(c),s=0;s<u.length;s++)i=n(i=h(u[s],i),i.next);return i}function c(e,t){return e.x-t.x}function u(e){if(e.next.prev===e)return e;let t=e;for(;;){const n=t.next;if(n.prev===t||n===t||n===e)break;t=n}return t}function h(e,t){var r=function(e,t){var n,r=t,i=e.x,o=e.y,s=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var a=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=i&&a>s){if(s=a,a===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(i===s)return n;var l,c=n,u=n.x,h=n.y,p=1/0;r=n;do{i>=r.x&&r.x>=u&&i!==r.x&&m(o<h?i:s,o,u,h,o<h?s:i,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(i-r.x),T(r,e)&&(l<p||l===p&&(r.x>n.x||r.x===n.x&&f(n,r)))&&(n=r,p=l)),r=r.next}while(r!==c);return n}(e,t);if(!r)return t;var i=_(r,e),o=n(r,r.next);let s=u(i);return n(s,s.next),o=u(o),u(t===r?o:t)}function f(e,t){return x(e.prev,e,t.prev)<0&&x(t.next,e,e.next)<0}function p(e,t,n,r){var i=e;do{null===i.z&&(i.z=d(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,s,a,l,c=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,r=n,a=0,t=0;t<c&&(a++,r=r.nextZ);t++);for(l=c;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(s>1)}(i)}function d(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function g(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function m(e,t,n,r,i,o,s,a){return(i-s)*(t-a)-(e-s)*(o-a)>=0&&(e-s)*(r-a)-(n-s)*(t-a)>=0&&(n-s)*(o-a)-(i-s)*(r-a)>=0}function y(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&w(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(T(e,t)&&T(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(x(e.prev,e,t.prev)||x(e,t.prev,t))||v(e,t)&&x(e.prev,e,e.next)>0&&x(t.prev,t,t.next)>0)}function x(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,n,r){var i=A(x(e,t,n)),o=A(x(e,t,r)),s=A(x(n,r,e)),a=A(x(n,r,t));return i!==o&&s!==a||!(0!==i||!b(e,n,t))||!(0!==o||!b(e,r,t))||!(0!==s||!b(n,e,r))||!(0!==a||!b(n,t,r))}function b(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function A(e){return e>0?1:e<0?-1:0}function T(e,t){return x(e.prev,e,e.next)<0?x(e,t,e.next)>=0&&x(e,e.prev,t)>=0:x(e,t,e.prev)<0||x(e,e.next,t)<0}function _(e,t){var n=new O(e.i,e.x,e.y),r=new O(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function M(e,t,n,r){var i=new O(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function S(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function O(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function I(e,t,n,r){for(var i=0,o=t,s=n-r;o<n;o+=r)i+=(e[s]-e[o])*(e[o+1]+e[s+1]),s=o;return i}return e.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(I(e,0,o,n));if(i)for(var a=0,l=t.length;a<l;a++){var c=t[a]*n,u=a<l-1?t[a+1]*n:e.length;s-=Math.abs(I(e,c,u,n))}var h=0;for(a=0;a<r.length;a+=3){var f=r[a]*n,p=r[a+1]*n,d=r[a+2]*n;h+=Math.abs((e[f]-e[d])*(e[p+1]-e[f+1])-(e[f]-e[p])*(e[d+1]-e[f+1]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},e.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var s=0;s<t;s++)n.vertices.push(e[i][o][s]);i>0&&(r+=e[i-1].length,n.holes.push(r))}return n},e},void 0!==(o=i())&&(r.exports=o);const l=(0,s.g)(a.exports)},46521:(e,t,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function i(e,t,n,r,i,o,s,a,l){return[e,t,n,r,i,o,s,a,l]}function o(e,t){return new Float64Array(e,t,9)}n.d(t,{a:()=>o,c:()=>r,f:()=>i}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:r,createView:o,fromValues:i},Symbol.toStringTag,{value:"Module"}))},13598:(e,t,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}function o(e,t){return new Float64Array(e,t,16)}n.d(t,{I:()=>s,a:()=>o,b:()=>i,c:()=>r});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:i,create:r,createView:o,fromValues:function(e,t,n,r,i,o,s,a,l,c,u,h,f,p,d,g){return[e,t,n,r,i,o,s,a,l,c,u,h,f,p,d,g]}},Symbol.toStringTag,{value:"Module"}))},94961:(e,t,n)=>{function r(){return[0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3]]}function o(e,t){return new Float64Array(e,t,4)}n.d(t,{I:()=>s,a:()=>i,b:()=>r,c:()=>o});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:i,create:r,createView:o,fromValues:function(e,t,n,r){return[e,t,n,r]}},Symbol.toStringTag,{value:"Module"}))},8310:(e,t,n)=>{n.d(t,{a:()=>y,c:()=>g,g:()=>x,h:()=>m,j:()=>b,l:()=>I}),n(80442);var r=n(92604),i=n(22021),o=n(52138),s=n(17896),a=n(65617),l=n(98766),c=n(88669),u=n(62155),h=n(78341),f=n(61277),p=n(12981);const d=g();function g(){return(0,c.c)()}function m(e,t=g()){return(0,l.c)(t,e)}function y(e){return e[3]}function x(e){return e}function v(e,t,n){if(null==t)return!1;const{origin:r,direction:i}=t,o=w;o[0]=r[0]-e[0],o[1]=r[1]-e[1],o[2]=r[2]-e[2];const s=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===s)return!1;const a=2*(i[0]*o[0]+i[1]*o[1]+i[2]*o[2]),l=a*a-4*s*(o[0]*o[0]+o[1]*o[1]+o[2]*o[2]-e[3]*e[3]);if(l<0)return!1;const c=Math.sqrt(l);let u=(-a-c)/(2*s);const h=(-a+c)/(2*s);return(u<0||h<u&&h>0)&&(u=h),!(u<0||(n&&(n[0]=r[0]+i[0]*u,n[1]=r[1]+i[1]*u,n[2]=r[2]+i[2]*u),0))}const w=(0,a.c)();function b(e,t){return v(e,t,null)}function A(e,t,n){const r=p.WM.get(),i=p.MP.get();(0,s.c)(r,t.origin,t.direction);const a=y(e);(0,s.c)(n,r,t.origin),(0,s.b)(n,n,1/(0,s.l)(n)*a);const l=_(e,t.origin),c=(0,f.EU)(t.origin,n);return(0,o.d)(i,c+l,r),(0,s.m)(n,n,i),n}function T(e,t,n){const r=(0,s.g)(p.WM.get(),t,e),i=(0,s.b)(p.WM.get(),r,e[3]/(0,s.l)(r));return(0,s.e)(n,i,e)}function _(e,t){const n=(0,s.g)(p.WM.get(),t,e),r=(0,s.l)(n),o=y(e),a=o+Math.abs(o-r);return(0,i.ZF)(o/a)}const M=(0,a.c)();function S(e,t,n,r){const o=(0,s.g)(M,t,e);switch(n){case u.R.X:{const e=(0,i.jE)(o,M)[2];return(0,s.s)(r,-Math.sin(e),Math.cos(e),0)}case u.R.Y:{const e=(0,i.jE)(o,M),t=e[1],n=e[2],a=Math.sin(t);return(0,s.s)(r,-a*Math.cos(n),-a*Math.sin(n),Math.cos(t))}case u.R.Z:return(0,s.n)(r,o);default:return}}function O(e,t){const n=(0,s.g)(E,t,e);return(0,s.l)(n)-e[3]}function I(e,t){const n=(0,s.a)(e,t),r=y(e);return n<=r*r}const E=(0,a.c)(),C=g();Object.freeze(Object.defineProperty({__proto__:null,NullSphere:d,altitudeAt:O,angleToSilhouette:_,axisAt:S,clear:function(e){e[0]=e[1]=e[2]=e[3]=0},closestPoint:function(e,t,n){return v(e,t,n)?n:((0,h.JI)(t,e,n),T(e,n,n))},closestPointOnSilhouette:A,containsPoint:I,copy:m,create:g,distanceToSilhouette:function(e,t){const n=(0,s.g)(p.WM.get(),t,e),r=(0,s.p)(n),i=e[3]*e[3];return Math.sqrt(Math.abs(r-i))},elevate:function(e,t,n){return e!==n&&(0,s.i)(n,e),n[3]=e[3]+t,n},fromCenterAndRadius:function(e,t){return(0,c.f)(e[0],e[1],e[2],t)},fromRadius:function(e,t){return e[0]=e[1]=e[2]=0,e[3]=t,e},fromValues:function(e,t,n,r){return(0,c.f)(e,t,n,r)},getCenter:x,getRadius:y,intersectRay:v,intersectRayClosestSilhouette:function(e,t,n){if(v(e,t,n))return n;const r=A(e,t,p.WM.get());return(0,s.e)(n,t.origin,(0,s.b)(p.WM.get(),t.direction,(0,s.h)(t.origin,r)/(0,s.l)(t.direction))),n},intersectsRay:b,projectPoint:T,setAltitudeAt:function(e,t,n,r){const i=O(e,t),o=S(e,t,u.R.Z,E),a=(0,s.b)(E,o,n-i);return(0,s.e)(r,t,a)},setExtent:function(e,t,n){return r.Z.getLogger("esri.geometry.support.sphere").error("sphere.setExtent is not yet supported"),e===n?n:m(e,n)},tmpSphere:C,union:function(e,t,n=g()){const r=(0,s.h)(e,t),i=e[3],o=t[3];return r+o<i?((0,l.c)(n,e),n):r+i<o?((0,l.c)(n,t),n):((0,s.f)(n,e,t,(r+o-i)/(2*r)),n[3]=(r+i+o)/2,n)},wrap:function(e){return e}},Symbol.toStringTag,{value:"Module"}))},97323:(e,t,n)=>{function r(){return[0,0]}function i(e,t){return[e,t]}function o(e,t){return new Float64Array(e,t,2)}function s(){return i(1,1)}function a(){return i(1,0)}function l(){return i(0,1)}n.d(t,{a:()=>r,c:()=>o,f:()=>i});const c=s(),u=a(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:h,ZEROS:[0,0],clone:function(e){return[e[0],e[1]]},create:r,createView:o,fromArray:function(e,t=[0,0]){const n=Math.min(2,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t},fromValues:i,ones:s,unitX:a,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},20773:(e,t,n)=>{n.d(t,{a:()=>a,b:()=>s,c:()=>i,d:()=>u,e:()=>l,n:()=>h,s:()=>c,t:()=>o});var r=n(72220);function i(e,t,n){o(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function o(e,t,n,i=3,o=i){if(e.length/i!==Math.ceil(t.length/o))return r.c.error("source and destination buffers need to have the same number of elements"),e;const s=e.length/i,a=n[0],l=n[1],c=n[2],u=n[4],h=n[5],f=n[6],p=n[8],d=n[9],g=n[10],m=n[12],y=n[13],x=n[14];let v=0,w=0;for(let n=0;n<s;n++){const n=t[v],r=t[v+1],s=t[v+2];e[w]=a*n+u*r+p*s+m,e[w+1]=l*n+h*r+d*s+y,e[w+2]=c*n+f*r+g*s+x,v+=o,w+=i}return e}function s(e,t,n){a(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function a(e,t,n,i=3,o=i){if(e.length/i!==Math.ceil(t.length/o))return void r.c.error("source and destination buffers need to have the same number of elements");const s=e.length/i,a=n[0],l=n[1],c=n[2],u=n[3],h=n[4],f=n[5],p=n[6],d=n[7],g=n[8];let m=0,y=0;for(let n=0;n<s;n++){const n=t[m],r=t[m+1],s=t[m+2];e[y]=a*n+u*r+p*s,e[y+1]=l*n+h*r+d*s,e[y+2]=c*n+f*r+g*s,m+=o,y+=i}}function l(e,t,n){c(e.typedBuffer,t,n,e.typedBufferStride)}function c(e,t,n,r=3){const i=Math.min(e.length/r,t.count),o=t.typedBuffer,s=t.typedBufferStride;let a=0,l=0;for(let t=0;t<i;t++)e[l]=n*o[a],e[l+1]=n*o[a+1],e[l+2]=n*o[a+2],a+=s,l+=r}function u(e,t){h(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function h(e,t,n=3,r=n){const i=Math.min(e.length/n,t.length/r);let o=0,s=0;for(let a=0;a<i;a++){const i=t[o],a=t[o+1],l=t[o+2],c=i*i+a*a+l*l;if(c>0){const t=1/Math.sqrt(c);e[s]=t*i,e[s+1]=t*a,e[s+2]=t*l}o+=r,s+=n}}Object.freeze(Object.defineProperty({__proto__:null,normalize:h,normalizeView:u,scale:c,scaleView:l,shiftRight:function(e,t,n){const r=Math.min(e.count,t.count),i=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride;let l=0,c=0;for(let e=0;e<r;e++)i[c]=s[l]>>n,i[c+1]=s[l+1]>>n,i[c+2]=s[l+2]>>n,l+=a,c+=o},transformMat3:a,transformMat3View:s,transformMat4:o,transformMat4View:i},Symbol.toStringTag,{value:"Module"}))},91303:(e,t,n)=>{var r;n.d(t,{Y:()=>r}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(r||(r={}))},22807:(e,t,n)=>{n.d(t,{x:()=>i});var r=n(41213);class i{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,r.Y)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*o);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,o));e++)this._items.push(this._allocator())}}const o=1024},70163:(e,t,n)=>{n.d(t,{Jl:()=>u,n$:()=>h});var r=n(3172),i=n(20102),o=n(95330),s=n(17452),a=n(49917);let l=null,c=!0;function u(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(e,t,n)}catch(e){c=!1}const i=function(e,t,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(e,t)}(t,n,r);return i.data.set(e,0),i}async function h(e,t){const{arrayBuffer:l,mediaType:c}=await async function(e,t){const n=(0,s.sJ)(e);if(n?.isBase64)return{arrayBuffer:(0,a.R)(n.data),mediaType:n.mediaType};const i=await(0,r.Z)(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader("Content-Type")}}(e,t),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:e,parseGif:r}=await n.e(3310).then(n.bind(n,83310));if(e(l))return r(l,t)}if(u){const{isAnimatedPNG:e,parseApng:r}=await n.e(4492).then(n.bind(n,54492));if(e(l))return r(l,t)}return async function(e,t){const n=window.URL.createObjectURL(e);try{const{data:e}=await(0,r.Z)(n,{...t,responseType:"image"});return e}catch(e){if(!(0,o.D_)(e))throw new i.Z("invalid-image",`Could not fetch requested image at ${n}`);throw e}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:c}),t)}},83025:(e,t,n)=>{n.d(t,{JK:()=>a,QZ:()=>o,Rq:()=>s,bg:()=>i,mB:()=>l});var r=n(1533);function i(e,t=!1){return e<=r.DB?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function o(e){return((0,r.kJ)(e)?e.length:e.byteLength/8)<=r.DB?Array.from(e):new Float64Array(e)}function s(e,t,n){return Array.isArray(e)?e.slice(t,t+n):e.subarray(t,t+n)}function a(e,t){for(let n=0;n<t.length;++n)e[n]=t[n];return e}function l(e){return Array.isArray(e)?new Float64Array(e):e}},24882:(e,t,n)=>{n.d(t,{$z:()=>s,KF:()=>u,mi:()=>i});var r=n(1533);function i(e){return(0,r.kJ)(e)?e.length<r.DB?e:o(e):e.length<r.DB?Array.from(e):e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:o(e)}function o(e){let t=!0;for(const n of e){if(n>=65536)return(0,r.kJ)(e)?new Uint32Array(e):e;n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}function s(e){return e<=r.DB?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=(()=>{const e=new Uint32Array(131072);for(let t=0;t<e.length;++t)e[t]=t;return e})();const l=[0],c=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function u(e){if(1===e)return l;if(e<r.DB)return Array.from(new Uint16Array(c.buffer,0,e));if(e<c.length)return new Uint16Array(c.buffer,0,e);if(e>a.length){const t=Math.max(2*a.length,e);a=new Uint32Array(t);for(let e=0;e<a.length;e++)a[e]=e}return new Uint32Array(a.buffer,0,e)}new Uint8Array(65536)},62540:(e,t,n)=>{n.d(t,{Z:()=>x});var r,i=n(43697),o=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011),h=n(75215),f=n(65542),p=n(60746),d=n(71630);const g="esri.geometry.support.MeshComponent",m=a.Z.getLogger(g);let y=r=class extends o.wq{static from(e){return(0,h.TJ)(r,e)}constructor(e){super(e),this.faces=null,this.material=null,this.shading="source",this.trustSourceNormals=!1}castFaces(e){return(0,d.X)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},m)}castMaterial(e){return(0,h.TJ)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?p.Z:f.Z,e)}clone(){return new r({faces:(0,s.d9)(this.faces),shading:this.shading,material:(0,s.d9)(this.material),trustSourceNormals:this.trustSourceNormals})}cloneWithDeduplication(e,t){const n={faces:(0,s.d9)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals};return new r(n)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,i._)([(0,l.Cb)({json:{write:!0}})],y.prototype,"faces",void 0),(0,i._)([(0,c.p)("faces")],y.prototype,"castFaces",null),(0,i._)([(0,l.Cb)({type:f.Z,json:{write:!0}})],y.prototype,"material",void 0),(0,i._)([(0,c.p)("material")],y.prototype,"castMaterial",null),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"shading",void 0),(0,i._)([(0,l.Cb)({type:Boolean})],y.prototype,"trustSourceNormals",void 0),y=r=(0,i._)([(0,u.j)(g)],y);const x=y},85872:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(36030)),l=n(52011),c=n(65617),u=n(94139);let h=class extends((0,i.J)(o.wq)){constructor(e){super(e),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,c.c)()}getOriginPoint(e){const[t,n,r]=this.origin;return new u.Z({x:t,y:n,z:r,spatialReference:e})}setOriginFromPoint({x:e,y:t,z:n}){this.origin=(0,c.f)(e,t,n??0)}};(0,r._)([(0,a.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],h.prototype,"type",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"origin",void 0),h=(0,r._)([(0,l.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],h);const f=h},50567:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(43697),i=n(2368),o=n(96674),s=(n(92604),n(75215),n(67676),n(80442),n(20102),n(36030)),a=n(52011);let l=class extends((0,i.J)(o.wq)){constructor(){super({}),this.type="georeferenced",this.isRelative=!1,this.isGeoreferenced=!0}};(0,r._)([(0,s.J)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),l=(0,r._)([(0,a.j)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l);const c=l},84555:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(36030)),l=n(52011),c=n(65617),u=n(94139);let h=class extends((0,i.J)(o.wq)){constructor(e){super(e),this.type="local",this.isRelative=!0,this.isGeoreferenced=!1,this.origin=(0,c.c)()}getOriginPoint(e){const[t,n,r]=this.origin;return new u.Z({x:t,y:n,z:r,spatialReference:e})}setOriginFromPoint({x:e,y:t,z:n}){this.origin=(0,c.f)(e,t,n??0)}};(0,r._)([(0,a.J)({local:"local"},{readOnly:!0})],h.prototype,"type",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"origin",void 0),h=(0,r._)([(0,l.j)("esri.geometry.support.MeshLocalVertexSpace")],h);const f=h},65542:(e,t,n)=>{n.d(t,{Z:()=>f});var r,i=n(43697),o=n(22303),s=n(96674),a=n(5600),l=(n(75215),n(67676),n(80442),n(52011)),c=n(85965),u=n(80218);let h=r=class extends s.wq{constructor(e){super(e),this.color=null,this.colorTexture=null,this.colorTextureTransform=null,this.normalTexture=void 0,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const i=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,i),i}clonePropertiesWithDeduplication(e){return{color:null!=this.color?this.color.clone():null,colorTexture:this.colorTexture?.cloneWithDeduplication(e),normalTexture:this.normalTexture?.cloneWithDeduplication(e),alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:this.colorTextureTransform?.clone(),normalTextureTransform:this.normalTextureTransform?.clone()}}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null!=this.color?16:0,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null!=this.colorTextureTransform?20:0,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null!=this.normalTextureTransform?20:0,e}};(0,i._)([(0,a.Cb)({type:o.Z,json:{write:!0}})],h.prototype,"color",void 0),(0,i._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"colorTexture",void 0),(0,i._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"colorTextureTransform",void 0),(0,i._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"normalTexture",void 0),(0,i._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"normalTextureTransform",void 0),(0,i._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaMode",void 0),(0,i._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaCutoff",void 0),(0,i._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],h.prototype,"doubleSided",void 0),h=r=(0,i._)([(0,l.j)("esri.geometry.support.MeshMaterial")],h);const f=h},60746:(e,t,n)=>{n.d(t,{Z:()=>f});var r,i=n(43697),o=n(22303),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011)),l=n(65542),c=n(85965),u=n(80218);let h=r=class extends l.Z{constructor(e){super(e),this.emissiveColor=null,this.emissiveTexture=null,this.emissiveTextureTransform=void 0,this.occlusionTexture=null,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null,this.metallicRoughnessTextureTransform=void 0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const i=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,i),i}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null!=this.emissiveColor?16:0,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null!=this.emissiveTextureTransform?20:0,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null!=this.occlusionTextureTransform?20:0,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null!=this.metallicRoughnessTextureTransform?20:0,e}clonePropertiesWithDeduplication(e){return{...super.clonePropertiesWithDeduplication(e),emissiveColor:this.emissiveColor?.clone(),emissiveTexture:this.emissiveTexture?.cloneWithDeduplication(e),emissiveTextureTransform:this.emissiveTextureTransform?.clone(),occlusionTexture:this.occlusionTexture?.cloneWithDeduplication(e),occlusionTextureTransform:this.occlusionTextureTransform?.clone(),metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:this.metallicRoughnessTexture?.cloneWithDeduplication(e),metallicRoughnessTextureTransform:this.metallicRoughnessTextureTransform?.clone()}}};(0,i._)([(0,s.Cb)({type:o.Z,json:{write:!0}})],h.prototype,"emissiveColor",void 0),(0,i._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"emissiveTexture",void 0),(0,i._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"emissiveTextureTransform",void 0),(0,i._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"occlusionTexture",void 0),(0,i._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"occlusionTextureTransform",void 0),(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],h.prototype,"metallic",void 0),(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],h.prototype,"roughness",void 0),(0,i._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"metallicRoughnessTexture",void 0),(0,i._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"metallicRoughnessTextureTransform",void 0),h=r=(0,i._)([(0,a.j)("esri.geometry.support.MeshMaterialMetallicRoughness")],h);const f=h},85965:(e,t,n)=>{n.d(t,{Z:()=>m});var r,i=n(43697),o=(n(80442),n(70163)),s=n(96674),a=n(5600),l=n(75215),c=(n(67676),n(71715)),u=n(52011),h=n(30556),f=n(25929);const p=new WeakMap;let d=0,g=r=class extends s.wq{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){if(e instanceof HTMLImageElement){const i={type:"image-element",src:(0,f.t)(e.src,r),crossOrigin:e.crossOrigin};t[n]=i}else if(e instanceof HTMLCanvasElement){const r=e.getContext("2d").getImageData(0,0,e.width,e.height),i={type:"canvas-element",imageData:this._encodeImageData(r)};t[n]=i}else if(e instanceof HTMLVideoElement){const i={type:"video-element",src:(0,f.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[n]=i}else if(e instanceof ImageData){const r={type:"image-data",imageData:this._encodeImageData(e)};t[n]=r}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=this._decodeImageData(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return this._decodeImageData(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const e=this.data,t=this.url;if(e instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(e.getContext("2d").getImageData(0,0,e.width,e.height));if(e instanceof ImageData)return this._imageDataContainsTransparent(e);if(t){const e=t.substr(t.length-4,4).toLowerCase(),n=t.substr(0,15).toLocaleLowerCase();if(".png"===e||"data:image/png;"===n)return!0}return!1}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(p.has(this.data)||p.set(this.data,++d),t(p.get(this.data))):t()}get memoryUsage(){let e=0;if(e+=null!=this.url?this.url.length:0,null!=this.data){const t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(){const e={url:this.url,data:this.data,wrap:this._cloneWrap()};return new r(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const n=this.clone();return e.set(this,n),n}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}_decodeImageData(e){const t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(0,o.Jl)(n,e.width,e.height)}_imageDataContainsTransparent(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}static from(e){return"string"==typeof e?new r({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new r({data:e}):(0,l.TJ)(r,e)}};(0,i._)([(0,a.Cb)({type:String,json:{write:f.w}})],g.prototype,"url",null),(0,i._)([(0,a.Cb)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,a.Cb)()],g.prototype,"data",null),(0,i._)([(0,h.c)("data")],g.prototype,"writeData",null),(0,i._)([(0,c.r)("data")],g.prototype,"readData",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],g.prototype,"transparent",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],g.prototype,"wrap",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],g.prototype,"contentHash",null),g=r=(0,i._)([(0,u.j)("esri.geometry.support.MeshTexture")],g);const m=g},80218:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011));let l=class extends((0,i.J)(o.wq)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,r._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,r._)([(0,a.j)("esri.geometry.support.MeshTextureTransform")],l);const c=l},71630:(e,t,n)=>{n.d(t,{Q:()=>p,X:()=>g});var r,i=n(43697),o=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011);const h="esri.geometry.support.MeshVertexAttributes",f=a.Z.getLogger(h);let p=r=class extends o.wq{constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return g(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},f)}castPosition(e){return e&&e instanceof Float32Array&&f.warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),g(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},f)}castUv(e){return g(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},f)}castNormal(e){return g(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},f)}castTangent(e){return g(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},f)}clone(){const e={position:(0,s.d9)(this.position),uv:(0,s.d9)(this.uv),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),color:(0,s.d9)(this.color)};return new r(e)}clonePositional(){const e={position:(0,s.d9)(this.position),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),uv:this.uv,color:this.color};return new r(e)}get memoryUsage(){let e=0;return e+=this.position.byteLength,null!=this.uv&&(e+=this.uv.byteLength),null!=this.normal&&(e+=this.normal.byteLength),null!=this.tangent&&(e+=this.tangent.byteLength),null!=this.color&&(e+=this.color.byteLength),e}};function d(e,t,n,r){const{loggerTag:i,stride:o}=t;return e.length%o!=0?(r.error(i,`Invalid array length, expected a multiple of ${o}`),new n([])):e}function g(e,t,n,r,i){if(!e)return e;if(e instanceof t)return d(e,r,t,i);for(const o of n)if(e instanceof o)return d(new t(e),r,t,i);if(Array.isArray(e))return d(new t(e),r,t,i);{const r=n.map((e=>`'${e.name}'`));return i.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function m(e,t,n){t[n]=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"color",void 0),(0,i._)([(0,c.p)("color")],p.prototype,"castColor",null),(0,i._)([(0,l.Cb)({nonNullable:!0,json:{write:m}})],p.prototype,"position",void 0),(0,i._)([(0,c.p)("position")],p.prototype,"castPosition",null),(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"uv",void 0),(0,i._)([(0,c.p)("uv")],p.prototype,"castUv",null),(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"normal",void 0),(0,i._)([(0,c.p)("normal")],p.prototype,"castNormal",null),(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"tangent",void 0),(0,i._)([(0,c.p)("tangent")],p.prototype,"castTangent",null),p=r=(0,i._)([(0,u.j)(h)],p)},72220:(e,t,n)=>{n.d(t,{c:()=>r});const r=n(92604).Z.getLogger("esri.views.3d.support.buffer.math")},16996:(e,t,n)=>{n.d(t,{Ue:()=>l,nF:()=>u,zk:()=>c});var r=n(22021),i=n(22807),o=n(17896),s=n(65617),a=n(12981);function l(e){return e?{origin:(0,s.a)(e.origin),vector:(0,s.a)(e.vector)}:{origin:(0,s.c)(),vector:(0,s.c)()}}function c(e,t,n=l()){return(0,o.i)(n.origin,e),(0,o.g)(n.vector,t,e),n}function u(e,t,n){return function(e,t,n,i,s){const{vector:l,origin:c}=e,u=(0,o.g)(a.WM.get(),t,c),h=(0,o.d)(l,u)/(0,o.p)(l);return(0,o.b)(s,l,(0,r.uZ)(h,0,1)),(0,o.e)(s,s,e.origin)}(e,t,0,0,n)}(0,s.c)(),(0,s.c)(),new i.x((()=>l()))},84470:(e,t,n)=>{n.d(t,{CP:()=>a,JG:()=>d,LL:()=>l,NZ:()=>c,fV:()=>g,vj:()=>y,yT:()=>v,zE:()=>x});var r=n(3172),i=n(67676),o=n(95330),s=n(2981);class a{constructor(e,t,n){this.assetName=e,this.assetMimeType=t,this.parts=n}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,i.fS)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const n=await Promise.all(t.map((t=>t.toBlob(e))));return(0,o.k_)(e),new Blob(n)}}class l{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,r.Z)(this.partUrl,{responseType:"blob"});return(0,o.k_)(e),t}}function c(e){return function(e){return!!e&&(Array.isArray(e)?e.some(p):p(e))}(e?.source)}function u(e){return!!Array.isArray(e)&&e.every((e=>e instanceof a))}const h=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function p(e){if(e instanceof File){const{type:t,name:n}=e;return h.test(t)||f.test(n)}return h.test(e.assetMimeType)||f.test(e.assetName)}function d(e,t){if(!e)return!1;const{source:n}=e;return function(e,t){if(Array.isArray(e)){const n=e;return n.length>0&&n.every((e=>m(e,t)))}return m(e,t)}(n,t)}function g(e,t){if(e===t)return!0;const{source:n}=e,{source:r}=t;if(n===r)return!0;if(u(n)&&u(r)){if(n.length!==r.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...n].sort(e),i=[...r].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(i[e]))return!1;return!0}return!1}function m(e,t){return e instanceof a&&e.isOnService(t)}function y(e,t){return e instanceof File?(0,s.Ow)(e.name,t)??(0,s.S0)(e.type,t):(0,s.S0)(e.assetMimeType,t)??(0,s.Ow)(e.assetName,t)}function x(e){return Array.isArray(e)?e:[e]}function v(e){return!!e.original}},47545:(e,t,n)=>{n.d(t,{d:()=>o});var r=n(22021),i=n(24882);function o(e,t,n){const o=Array.isArray(e),u=o?e.length/t:e.byteLength/(4*t),h=o?e:new Uint32Array(e,0,u*t),f=n?.minReduction??0,p=n?.originalIndices||null,d=p?p.length:0,g=n?.componentOffsets||null;let m=0;if(g)for(let e=0;e<g.length-1;e++){const t=g[e+1]-g[e];t>m&&(m=t)}else m=u;const y=Math.floor(1.1*m)+1;(null==c||c.length<2*y)&&(c=new Uint32Array((0,r.Sf)(2*y)));for(let e=0;e<2*y;e++)c[e]=0;let x=0;const v=!!g&&!!p,w=v?d:u;let b=(0,i.$z)(u);const A=new Uint32Array(d),T=1.96;let _=0!==f?Math.ceil(4*T*T/(f*f)*f*(1-f)):w,M=1,S=g?g[1]:w;for(let e=0;e<w;e++){if(e===_){const t=1-x/e;if(t+T*Math.sqrt(t*(1-t)/e)<f)return null;_*=2}if(e===S){for(let e=0;e<2*y;e++)c[e]=0;if(p)for(let e=g[M-1];e<g[M];e++)A[e]=b[p[e]];S=g[++M]}const n=v?p[e]:e,r=n*t,i=l(h,r,t);let o=i%y,a=x;for(;0!==c[2*o+1];){if(c[2*o]===i){const e=c[2*o+1]-1;if(s(h,r,e*t,t)){a=b[e];break}}o++,o>=y&&(o-=y)}a===x&&(c[2*o]=i,c[2*o+1]=n+1,x++),b[n]=a}if(0!==f&&1-x/u<f)return null;if(v){for(let e=g[M-1];e<A.length;e++)A[e]=b[p[e]];b=(0,i.mi)(A)}const O=o?new Array(x):new Uint32Array(x*t);x=0;for(let e=0;e<w;e++)b[e]===x&&(a(h,(v?p[e]:e)*t,O,x*t,t),x++);if(p&&!v){const e=new Uint32Array(d);for(let t=0;t<e.length;t++)e[t]=b[p[t]];b=(0,i.mi)(e)}return{buffer:Array.isArray(O)?O:O.buffer,indices:b,uniqueCount:x}}function s(e,t,n,r){for(let i=0;i<r;i++)if(e[t+i]!==e[n+i])return!1;return!0}function a(e,t,n,r,i){for(let o=0;o<i;o++)n[r+o]=e[t+o]}function l(e,t,n){let r=0;for(let i=0;i<n;i++)r=e[t+i]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let c=null},62073:(e,t,n)=>{n.d(t,{Ue:()=>o,zu:()=>s,mJ:()=>p}),n(22021);var r=n(17896),i=n(65617);function o(e=d){return[e[0],e[1],e[2],e[3]]}function s(e,t,n,i=0,p=Math.floor(n*(1/3)),d=Math.floor(n*(2/3))){if(n<3)return!1;t(l,i);let g=p,m=!1;for(;g<n-1&&!m;)t(c,g),g++,m=!(0,r.k)(l,c);if(!m)return!1;for(g=Math.max(g,d),m=!1;g<n&&!m;)t(u,g),g++,(0,r.g)(h,l,c),(0,r.n)(h,h),(0,r.g)(f,c,u),(0,r.n)(f,f),m=!(0,r.k)(l,u)&&!(0,r.k)(c,u)&&Math.abs((0,r.d)(h,f))<a;return m?(function(e,t,n,r=o()){const i=n[0]-t[0],s=n[1]-t[1],a=n[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],u=e[2]-t[2],h=s*u-a*c,f=a*l-i*u,p=i*c-s*l,d=h*h+f*f+p*p,g=Math.abs(d-1)>1e-5&&d>1e-12?1/Math.sqrt(d):1;r[0]=h*g,r[1]=f*g,r[2]=p*g,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2])}(l,c,u,e),!0):(0!==i||1!==p||2!==d)&&s(e,t,n,0,1,2)}n(8310),n(61277),n(12981),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)();const a=.99619469809,l=(0,i.c)(),c=(0,i.c)(),u=(0,i.c)(),h=(0,i.c)(),f=(0,i.c)();function p(e){return e}const d=[0,0,1,0];var g,m;(m=g||(g={}))[m.NONE=0]="NONE",m[m.CLAMP=1]="CLAMP",m[m.INFINITE_MIN=4]="INFINITE_MIN",m[m.INFINITE_MAX=8]="INFINITE_MAX",g.INFINITE_MIN,g.INFINITE_MAX,g.INFINITE_MAX},78341:(e,t,n)=>{n.d(t,{JI:()=>c,Ue:()=>s,re:()=>l}),n(67676);var r=n(22807),i=n(17896),o=n(65617);function s(e){return e?a((0,o.a)(e.origin),(0,o.a)(e.direction)):a((0,o.c)(),(0,o.c)())}function a(e,t){return{origin:e,direction:t}}function l(e,t){const n=u.get();return n.origin=e,n.direction=t,n}function c(e,t,n){const r=(0,i.d)(e.direction,(0,i.g)(n,t,e.origin));return(0,i.e)(n,e.origin,(0,i.b)(n,e.direction,r)),n}n(12981);const u=new r.x((()=>s()))},61277:(e,t,n)=>{n.d(t,{EU:()=>s});var r=n(22021),i=n(17896),o=n(65617);function s(e,t){const n=(0,i.d)(e,t)/((0,i.l)(e)*(0,i.l)(t));return-(0,r.ZF)(n)}(0,o.c)(),(0,o.c)()},12981:(e,t,n)=>{n.d(t,{MP:()=>d,WM:()=>p});var r=n(91303),i=n(41213),o=n(46521),s=n(13598),a=n(94961),l=n(97323),c=n(65617),u=n(88669);class h{constructor(e,t,n){this._itemByteSize=e,this._itemCreate=t,this._buffers=new Array,this._items=new Array,this._itemsPtr=0,this._itemsPerBuffer=Math.ceil(n/this._itemByteSize)}get(){0===this._itemsPtr&&(0,i.Y)((()=>this._reset()));const e=Math.floor(this._itemsPtr/this._itemsPerBuffer);for(;this._buffers.length<=e;){const e=new ArrayBuffer(this._itemsPerBuffer*this._itemByteSize);for(let t=0;t<this._itemsPerBuffer;++t)this._items.push(this._itemCreate(e,t*this._itemByteSize));this._buffers.push(e)}return this._items[this._itemsPtr++]}_reset(){const e=2*(Math.floor(this._itemsPtr/this._itemsPerBuffer)+1);for(;this._buffers.length>e;)this._buffers.pop(),this._items.length=this._buffers.length*this._itemsPerBuffer;this._itemsPtr=0}static createVec2f64(e=f){return new h(16,l.c,e)}static createVec3f64(e=f){return new h(24,c.b,e)}static createVec4f64(e=f){return new h(32,u.a,e)}static createMat3f64(e=f){return new h(72,o.a,e)}static createMat4f64(e=f){return new h(128,s.a,e)}static createQuatf64(e=f){return new h(32,a.c,e)}get test(){return{size:this._buffers.length*this._itemsPerBuffer*this._itemByteSize}}}const f=4*r.Y.KILOBYTES,p=(h.createVec2f64(),h.createVec3f64()),d=(h.createVec4f64(),h.createMat3f64(),h.createMat4f64());h.createQuatf64()},40671:(e,t,n)=>{n.r(t),n.d(t,{assetMapFromAssetMapsJSON:()=>tt,extractMesh:()=>Ke,meshFeatureSetFromJSON:()=>Xe});var r=n(38171),i=n(92604),o=n(30175),s=n(65617),a=n(6570),l=n(43697),c=n(20102),u=n(83379),h=n(609),f=n(95330),p=n(17445),d=n(5600),g=(n(75215),n(67676),n(80442),n(52011)),m=n(9361),y=n(94139),x=n(38913),v=n(3709),w=n(62540),b=n(85872),A=n(50567),T=n(84555),_=n(2674),M=n(71630),S=n(95401),O=n(62155),I=n(86662),E=n(83025),C=n(24882),R=n(47545),N=(n(66577),n(22021)),L=n(67900),P=n(17896),Z=n(62073);n(4726),n(22631),n(35065);const F=(0,Z.Ue)();function U(e,t,n,r,i,o,s){i*=3;for(let a=0;a<o;++a){const o=e[t];r[i++]=o[0],r[i++]=o[1],r[i++]=s?o[2]:0,t+=n}return i/3}function D(e,t,n){if(t){const t=function(e,t,n){const r=function(e,t,n,r){const i=(e=>!Array.isArray(e[0]))(t)?(e,n)=>t[3*e+n]:(e,n)=>t[e][n],o=r?(0,L.c9)(r)/(0,L._R)(r):1;return(0,Z.zu)(e,((e,t)=>(0,P.s)(e,i(t,0)*o,i(t,1)*o,i(t,2))),n)}(F,e,t,n)?(0,Z.mJ)(F):[0,0,1];return Math.abs(r[2])>Math.cos((0,N.Vl)(80))?O.R.Z:Math.abs(r[1])>Math.abs(r[0])?O.R.Y:O.R.X}(e,e.length-1,n);if(t===O.R.X)return!(0,I.bu)(e,O.R.Y,O.R.Z);if(t===O.R.Y)return!(0,I.bu)(e,O.R.X,O.R.Z)}return!(0,I.bu)(e,O.R.X,O.R.Y)}var j,B;(B=j||(j={}))[B.NONE=0]="NONE",B[B.CCW_IS_HOLE=1]="CCW_IS_HOLE";var z=n(66459);let k=null;function V(e,t){let n=1/0,r=1/0,i=1/0,o=-1/0,s=-1/0,l=-1/0;const c=e.length;let u=0;for(;u<c;){const t=e[u++],a=e[u++],c=e[u++];n=Math.min(n,t),r=Math.min(r,a),i=Math.min(i,c),o=Math.max(o,t),s=Math.max(s,a),l=Math.max(l,c)}return new a.Z({xmin:n,ymin:r,zmin:i,xmax:o,ymax:s,zmax:l,spatialReference:t})}var G=n(87360);function W(e,t,n,r=0){H[0]=e.x,H[1]=e.y;const i=e.z;return H[2]=void 0!==i?i:r,(0,G.projectBuffer)(H,e.spatialReference,0,t,n,0,1)}const H=(0,s.c)();var Y=n(13442);const J="esri.geometry.support.meshUtils.centerAt";const $=(0,s.c)(),q=(0,s.c)(),X=(0,s.c)();n(99880),n(3172);var K=n(17452);function Q(e){const t=(0,K.Yd)(e.url);return n=>{const r=(0,K.PF)(n,t,t),i=r?r.replace(/^ *\.\//,""):null;return(i?e.files.get(i):null)??n}}function ee(e){return ie.fromBlob(e)}n(47026);const te=/^(model\/gltf\+json)|(model\/gltf-binary)$/,ne=/\.(gltf|glb)/i;function re(e){const t=new Map;let n=null;for(const{name:r,mimeType:i,source:o}of e)(null==n||te.test(i)||ne.test(r))&&(n=o.url),t.set(r,o.url),o.files.forEach(((e,n)=>t.set(n,e)));if(null==n)throw new c.Z("mesh-load-external:missing-files","Missing files to load external mesh source");return new ie(n,(()=>e.forEach((({source:e})=>e.dispose()))),t)}class ie{constructor(e,t=(()=>{}),n=new Map){this.url=e,this.dispose=t,this.files=n}static fromBlob(e){const t=URL.createObjectURL(e);return new ie(t,(()=>URL.revokeObjectURL(t)))}}var oe=n(2368),se=n(46791),ae=n(84470);let le=class extends oe.j{constructor(){super(),this.externalSources=new se.Z,this._explicitDisplaySource=null,this.addHandles((0,p.on)((()=>this.externalSources),"after-remove",(({item:e})=>{e===this._explicitDisplaySource&&(this._explicitDisplaySource=null)}),{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,ae.NZ)(e))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every((t=>!(0,ae.fV)(t,e)))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter((t=>(0,ae.JG)(t,e)))}get _implicitDisplaySource(){return this.externalSources.find(ae.NZ)}};(0,l._)([(0,d.Cb)()],le.prototype,"externalSources",void 0),(0,l._)([(0,d.Cb)()],le.prototype,"displaySource",null),(0,l._)([(0,d.Cb)()],le.prototype,"_implicitDisplaySource",null),(0,l._)([(0,d.Cb)()],le.prototype,"_explicitDisplaySource",void 0),le=(0,l._)([(0,g.j)("esri.geometry.support.meshUtils.Metadata")],le);var ce=n(21787),ue=n(46521),he=n(13598),fe=n(58995),pe=n(83932),de=n(56493);function ge(e,t){if(e)for(let n=0;n<e.length;n+=3)for(let r=0;r<3;r++)e[n+r]+=t[r]}const me=(0,s.c)(),ye=(0,he.c)(),xe=(0,ue.c)(),ve={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function we(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null==t)return;const n="number"==typeof t?[t,t,t]:[null!=t.width?t.width:1,null!=t.depth?t.depth:1,null!=t.height?t.height:1];_e[0]=n[0],_e[4]=n[1],_e[8]=n[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)Te[n]=e.position[t+n];(0,P.t)(Te,Te,_e);for(let n=0;n<3;n++)e.position[t+n]=Te[n]}if(n[0]!==n[1]||n[1]!==n[2]){_e[0]=1/n[0],_e[4]=1/n[1],_e[8]=1/n[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)Te[n]=e.normal[t+n];(0,P.t)(Te,Te,_e),(0,P.n)(Te,Te);for(let n=0;n<3;n++)e.normal[t+n]=Te[n]}}}(e,n?.size);const{vertexAttributes:r,vertexSpace:i,transform:o}=(0,z.w1)(e,t,n);return{vertexAttributes:new M.Q({...r,uv:e.uv}),vertexSpace:i,transform:o,components:[new w.Z({faces:e.faces,material:n&&n.material||null})],spatialReference:t.spatialReference}}const be={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},Ae={south:0,east:1,north:2,west:3,up:4,down:5},Te=(0,s.c)(),_e=(0,ue.c)();var Me=n(52138);const Se="esri.geometry.support.meshUtils.rotate";function Oe(e,t,n,r=s.Z){if(null!=e){(0,Me.d)(Re,(0,v.WH)(t),(0,v.ZZ)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)Ie[n]=e[t+n]-r[n];(0,P.m)(Ie,Ie,Re);for(let n=0;n<3;n++)e[t+n]=Ie[n]+r[n]}}}const Ie=(0,s.c)(),Ee=(0,s.c)(),Ce=(0,v.Ue)(),Re=(0,he.c)(),Ne=(0,ue.c)(),Le=(0,s.c)(),Pe="esri.geometry.support.meshUtils.scale";function Ze(e,t,n=s.Z){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)Fe[t]=e[r+t]-n[t];(0,P.b)(Fe,Fe,t);for(let t=0;t<3;t++)e[r+t]=Fe[t]+n[t]}}const Fe=(0,s.c)(),Ue=(0,s.c)(),De=(0,s.c)();var je,Be=n(2981);async function ze(e){const{BlobReader:t,ZipReader:r,BlobWriter:i}=await Promise.all([n.e(2712),n.e(4041)]).then(n.bind(n,74041)),o=[],s=new r(new t(e));return(await s.getEntries()).forEach((e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new i,n=e.getData?.(t).then((t=>new File([t],e.filename)));n&&o.push(n)})),Promise.all(o)}const ke="esri.geometry.Mesh",Ve={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:A.Z,"georeferenced-relative":b.Z,local:T.Z}};let Ge=je=class extends(u.Z.LoadableMixin((0,h.v)(m.Z))){constructor(e){super(e),this.components=null,this.vertexSpace=new A.Z,this.transform=null,this.metadata=new le,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new M.Q,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.addHandles((0,p.YP)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:e,spatialReference:t,vertexAttributes:n,vertexSpace:r}=this,i=n.position;if(0===i.length||e&&0===e.length)return new a.Z({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t});if("local"===r.type){const{_untransformedExtent:e,transform:n}=this;return function({xmin:e,xmax:t,ymin:n,ymax:r,zmin:i,zmax:o},s,a,l){i??=0,o??=0,k??=new Float64Array(24);const c=k;return c[0]=e,c[1]=n,c[2]=i,c[3]=e,c[4]=r,c[5]=i,c[6]=t,c[7]=r,c[8]=i,c[9]=t,c[10]=n,c[11]=i,c[12]=e,c[13]=n,c[14]=o,c[15]=e,c[16]=r,c[17]=o,c[18]=t,c[19]=r,c[20]=o,c[21]=t,c[22]=n,c[23]=o,(0,z.project)({positions:c,transform:s,vertexSpace:a,inSpatialReference:l,outSpatialReference:l,outPositions:c,local:!1}),V(c,l)}(e,n,r,t)}if("georeferenced-relative"===r.type){const{transform:e}=this;return V((0,z.project)({positions:i,transform:e,vertexSpace:r,inSpatialReference:t,outSpatialReference:t,local:!1}),t)}return V(i,t)}get _untransformedExtent(){return V(this.vertexAttributes.position,this.spatialReference)}get anchor(){const{vertexSpace:e}=this;if(e.isRelative)return e.getOriginPoint(this.spatialReference);const{center:t,zmin:n}=this._transformedExtent;return new y.Z({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get origin(){const{vertexSpace:e}=this;return e.isRelative?e.getOriginPoint(this.spatialReference):this._transformedExtent.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this.loaded?(this.components||(this.components=[]),this.components.push(w.Z.from(e)),this.notifyChange("components")):i.Z.getLogger(this).error("addComponent()","Mesh must be loaded before applying operations")}removeComponent(e){if(this.loaded){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}i.Z.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}else i.Z.getLogger(this).error("removeComponent()","Mesh must be loaded before applying operations")}rotate(e,t,n,r){return(0,v.qw)(e,t,n,He),function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position||0===t[3])return;const{spatialReference:r,vertexSpace:o}=e;if(o.isRelative){(0,Y.A)(o,Se,n);const r=n?.origin??e.origin;e.transform??=new _.Z,function(e,t,n,r){const i=t.origin,o=(0,P.s)(Ie,r.x,r.y,r.z??0),a=(0,P.g)(Ie,o,i);e.applyLocalInverse(a,Ee),e.rotation=(0,v.qC)(e.rotation,n,(0,v.Ue)()),e.applyLocalInverse(a,a),(0,P.g)(a,a,Ee),e.translation=(0,P.e)((0,s.c)(),e.translation,a)}(e.transform,o,t,r)}else{const o=n?.origin??e.origin;(0,Y.h)(r,n)?function(e,t,n){const r=e.spatialReference,i=(0,fe.rS)(r),o=Le;W(n,o,i)||W(e.origin,o,i);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,h=null!=l?new Float32Array(l.length):null;(0,pe.B)(i,o,Re,i),(0,ce.f)(Ne,Re);const f=Ce;(0,P.t)((0,v.ZZ)(Ce),(0,v.ZZ)(t),Ne),f[3]=t[3],(0,de.XO)(s,r,c),null!=a&&null!=u&&(0,de.Iz)(a,s,c,r,u),null!=l&&null!=h&&(0,de.wi)(l,s,c,r,h),Oe(c,f,3,o),(0,de.To)(c,s,r),null!=a&&null!=u&&(Oe(u,f,3),(0,de.Yk)(u,s,c,r,a)),null!=l&&null!=h&&(Oe(h,f,4),(0,de.M2)(h,s,c,r,l)),e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=Le;if(!W(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,i.Z.getLogger(Se).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Oe(e.vertexAttributes.position,t,3,r),Oe(e.vertexAttributes.normal,t,3),Oe(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,o)}}(this,He,r),this}offset(e,t,n,r){return this.loaded?(We[0]=e,We[1]=t,We[2]=n,function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:r}=e;r.isRelative?((0,Y.A)(r,"esri.geometry.support.meshUtils.offset",n),function(e,t){const n=e.origin;e.origin=(0,P.e)((0,s.c)(),n,t)}(r,t)):(0,Y.h)(e.spatialReference,n)?function(e,t){const n=e.spatialReference,r=e.vertexAttributes.position,i=e.vertexAttributes.normal,o=e.vertexAttributes.tangent,s=new Float64Array(r.length),a=null!=i?new Float32Array(i.length):null,l=null!=o?new Float32Array(o.length):null,c=e.extent.center,u=me;(0,pe.B)(n,[c.x,c.y,c.z],ye,(0,fe.rS)(n)),(0,ce.f)(xe,ye),(0,P.t)(u,t,xe),(0,de.XO)(r,n,s),null!=i&&null!=a&&(0,de.Iz)(i,r,s,n,a),null!=o&&null!=l&&(0,de.wi)(o,r,s,n,l),ge(s,u),(0,de.To)(s,r,n),null!=i&&null!=a&&(0,de.Yk)(a,r,s,n,i),null!=o&&null!=l&&(0,de.M2)(l,r,s,n,o),e.vertexAttributesChanged()}(e,t):function(e,t){ge(e.vertexAttributes.position,t),e.vertexAttributesChanged()}(e,t)}(this,We,r),this):(i.Z.getLogger(this).error("offset()","Mesh must be loaded before applying operations"),this)}scale(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{spatialReference:r,vertexSpace:o}=e;if(o.isRelative){(0,Y.A)(o,Pe,n);const r=n?.origin??e.origin;e.transform??=new _.Z,function(e,t,n,r){const i=t.origin,o=(0,P.s)(Fe,r.x,r.y,r.z),a=(0,P.g)(Fe,o,i);e.applyLocalInverse(a,Ue);const l=(0,P.b)((0,s.c)(),e.scale,n);e.scale=l,e.applyLocalInverse(a,a),(0,P.g)(a,a,Ue),e.translation=(0,P.e)((0,s.c)(),e.translation,a)}(e.transform,o,t,r)}else{const o=(0,Y.h)(r,n),s=n?.origin??e.origin;o?function(e,t,n){const r=e.spatialReference,i=(0,fe.rS)(r),o=De;W(n,o,i)||W(e.origin,o,i);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,h=null!=l?new Float32Array(l.length):null;(0,de.XO)(s,r,c),null!=a&&null!=u&&(0,de.Iz)(a,s,c,r,u),null!=l&&null!=h&&(0,de.wi)(l,s,c,r,h),Ze(c,t,o),(0,de.To)(c,s,r),null!=a&&null!=u&&(0,de.Yk)(u,s,c,r,a),null!=l&&null!=h&&(0,de.M2)(h,s,c,r,l),e.vertexAttributesChanged()}(e,t,s):function(e,t,n){const r=De;if(!W(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,i.Z.getLogger(Pe).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Ze(e.vertexAttributes.position,t,r),e.vertexAttributesChanged()}(e,t,s)}}(this,e,t),this):(i.Z.getLogger(this).error("scale()","Mesh must be loaded before applying operations"),this)}centerAt(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:r}=e,o=n?.origin??e.origin;r.isRelative?((0,Y.A)(r,J,n),function(e,t,n){const{vertexSpace:r}=e;if(!r.isRelative)return;const o=q,a=$;if(!W(t,a,e.spatialReference))return void i.Z.getLogger(J).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`);if(!W(n,o,e.spatialReference)){const t=e.origin;o[0]=t.x,o[1]=t.y,o[2]=t.z,i.Z.getLogger(J).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}const l=(0,P.g)(X,a,o),c=r.origin;r.origin=(0,P.e)((0,s.c)(),c,l)}(e,t,o)):(0,Y.h)(e.spatialReference,n)?function(e,t,n){const r=(0,z.FF)(e.vertexAttributes,n,{geographic:!0}),{position:i,normal:o,tangent:s}=(0,z.iv)(r,t,{geographic:!0});e.vertexAttributes.position=i,e.vertexAttributes.normal=o,e.vertexAttributes.tangent=s,e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=q,o=$;if(W(t,o,e.spatialReference)){if(!W(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,i.Z.getLogger(J).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let i=0;i<3;i++)e[r+i]+=t[i]-n[i]})(e.vertexAttributes.position,o,r),e.vertexAttributesChanged()}else i.Z.getLogger(J).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(e,t,o)}(this,e,t),this):(i.Z.getLogger(this).error("centerAt()","Mesh must be loaded before applying operations"),this)}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,r){const{source:i}=t,{loadGLTFMesh:o}=await(0,f.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r),s=await async function(e,t){if(Array.isArray(e)){if(!e.length)throw new c.Z("mesh-load-external:missing-assets","There must be at least one file to load");return e[0]instanceof File?function(e){return re(e.map((e=>({name:e.name,mimeType:e.type,source:ee(e)}))))}(e):async function(e,t){const n=await(0,f.OT)(e.map((async e=>{const n=await async function(e,t){const{parts:n}=e;if(1===n.length)return new ie(n[0].partUrl);const r=await e.toBlob(t);return(0,f.k_)(t),ie.fromBlob(r)}(e);return(0,f.k_)(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}})));if((0,f.Hc)(t))throw n.forEach((e=>e.source.dispose())),(0,f.zE)();return re(n)}(e,t)}return ee(e)}(i,r);(0,f.k_)(r);const a=o(new y.Z({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:Q(s),requestFile:void 0,useTransform:!0,signal:r?.signal});a.then((()=>s.dispose()),(()=>s.dispose()));const{vertexAttributes:l,components:u}=await a;e.vertexAttributes=l,e.components=u}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneWithVertexSpace(this.vertexSpace.clone())}cloneWithVertexSpace(e){let t=null;if(this.components){const e=new Map,n=new Map;t=this.components.map((t=>t.cloneWithDeduplication(e,n)))}const n={components:t,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:e,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new je(n)}cloneShallow(){return new je({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=n.e(7277).then(n.bind(n,7277)),r=this.load(),i=await Promise.all([t,r]),{toBinaryGLTF:o}=i[0];return o(this,e)}get memoryUsage(){let e=0;if(e+=this.vertexAttributes.memoryUsage,null!=this.components)for(const t of this.components)e+=t.memoryUsage;return e}_clearSources(){this.metadata.clearSources()}static createBox(e,t){if(!(e instanceof y.Z))return i.Z.getLogger(ke).error(".createBox()","expected location to be a Point instance"),null;const n=new je(we(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=be,r=4*e.length,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array(2*e.length*3);let l=0,c=0,u=0,h=0;for(let r=0;r<e.length;r++){const f=e[r],p=l/3;for(const e of t)a[h++]=p+e;const d=f.corners;for(let e=0;e<4;e++){const t=d[e];let r=0;s[u++]=.25*n[e][0]+f.uvOrigin[0],s[u++]=f.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0!==f.axis[e]?(i[l++]=.5*f.axis[e],o[c++]=f.axis[e]):(i[l++]=.5*t[r++],o[c++]=0)}}return{position:i,normal:o,uv:s,faces:a}}(),e,t));return t&&t.imageFace&&"all"!==t.imageFace?function(e,t){const n=e.components[0],r=n.faces,i=Ae[t],o=6*i,s=new Array(6),a=new Array(r.length-6);let l=0,c=0;for(let e=0;e<r.length;e++)e>=o&&e<o+6?s[l++]=r[e]:a[c++]=r[e];if(null!=e.vertexAttributes.uv){const t=new Float32Array(e.vertexAttributes.uv),n=4*i*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new w.Z({faces:s,material:n.material}),new w.Z({faces:a})],e}(n,t.imageFace):n}static createSphere(e,t){return e instanceof y.Z?new je(we(function(e=0){const t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array((t-1)*n*2*3);let l=0,c=0,u=0,h=0;for(let e=0;e<=t;e++){const r=e/t*Math.PI+.5*Math.PI,f=Math.cos(r),p=Math.sin(r);Te[2]=p;const d=0===e||e===t,g=d?n-1:n;for(let r=0;r<=g;r++){const p=r/g*2*Math.PI;Te[0]=-Math.sin(p)*f,Te[1]=Math.cos(p)*f;for(let e=0;e<3;e++)i[l]=.5*Te[e],o[l]=Te[e],++l;s[c++]=(r+(d?.5:0))/n,s[c++]=e/t,0!==e&&r!==n&&(e!==t&&(a[u++]=h,a[u++]=h+1,a[u++]=h-n),1!==e&&(a[u++]=h,a[u++]=h-n,a[u++]=h-n-1)),h++}}return{position:i,normal:o,uv:s,faces:a}}(t&&t.densificationFactor||0),e,t)):(i.Z.getLogger(ke).error(".createSphere()","expected location to be a Point instance"),null)}static createCylinder(e,t){return e instanceof y.Z?new je(we(function(e=0){const t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),i=new Float32Array(3*n),o=new Float32Array(2*n),s=new Uint32Array(4*t*3);let a=0,l=0,c=0,u=0,h=0;for(let e=0;e<=5;e++){const n=0===e||5===e,f=e<=1||e>=4,p=2===e||4===e,d=n?t-1:t;for(let g=0;g<=d;g++){const m=g/d*2*Math.PI,y=n?0:.5;Te[0]=y*Math.sin(m),Te[1]=y*-Math.cos(m),Te[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[a++]=Te[t],i[l++]=f?2===t?e<=1?1:-1:0:2===t?0:Te[t]/y;o[c++]=(g+(n?.5:0))/t,o[c++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,p||0===e||g===t||(5!==e&&(s[u++]=h,s[u++]=h+1,s[u++]=h-t),1!==e&&(s[u++]=h,s[u++]=h-t,s[u++]=h-t-1)),h++}}return{position:r,normal:i,uv:o,faces:s}}(t&&t.densificationFactor||0),e,t)):(i.Z.getLogger(ke).error(".createCylinder()","expected location to be a Point instance"),null)}static createPlane(e,t){if(!(e instanceof y.Z))return i.Z.getLogger(ke).error(".createPlane()","expected location to be a Point instance"),null;const n=t?.facing??"up",r=function(e,t){const n="number"==typeof t?t:null!=t?t.width:1,r="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}(n,t?.size);return new je(we(function(e){const t=ve.facingAxisOrderSwap[e],n=ve.position,r=ve.normal,i=new Float64Array(n.length),o=new Float32Array(r.length);let s=0;for(let e=0;e<4;e++){const e=s;for(let a=0;a<3;a++){const l=t[a],c=Math.abs(l)-1,u=l>=0?1:-1;i[s]=n[e+c]*u,o[s]=r[e+c]*u,s++}}return{position:i,normal:o,uv:new Float32Array(ve.uv),faces:new Uint32Array(ve.faces),isPlane:!0}}(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof x.Z))return i.Z.getLogger(ke).error(".createFromPolygon()","expected polygon to be a Polygon instance"),null;const n=function(e){const t=function(e,t,n,r){const i=e.length,o=new Array(i),s=new Array(i),a=new Array(i);let l=0,c=0,u=0,h=0;for(let t=0;t<i;++t)h+=e[t].length;const f=(0,E.bg)(3*h);let p=0;for(let h=i-1;h>=0;h--){const d=e[h],g=n===j.CCW_IS_HOLE&&D(d,t,r);if(g&&1!==i)o[l++]=d;else{let e=d.length;for(let t=0;t<l;++t)e+=o[t].length;const n={index:p,pathLengths:new Array(l+1),count:e,holeIndices:new Array(l)};n.pathLengths[0]=d.length,d.length>0&&(a[u++]={index:p,count:d.length}),p=g?U(d,d.length-1,-1,f,p,d.length,t):U(d,0,1,f,p,d.length,t);for(let e=0;e<l;++e){const r=o[e];n.holeIndices[e]=p,n.pathLengths[e+1]=r.length,r.length>0&&(a[u++]={index:p,count:r.length}),p=U(r,0,1,f,p,r.length,t)}l=0,n.count>0&&(s[c++]=n)}}for(let e=0;e<l;++e){const n=o[e];n.length>0&&(a[u++]={index:p,count:n.length}),p=U(n,0,1,f,p,n.length,t)}return s.length=c,a.length=u,{position:f,polygons:s,outlines:a}}(e.rings,e.hasZ,j.CCW_IS_HOLE,e.spatialReference),n=new Array;let r=0,i=0;for(const e of t.polygons){const o=e.count,s=e.index,a=(0,E.Rq)(t.position,3*s,3*o),l=e.holeIndices.map((e=>e-s)),c=(0,C.mi)((0,S.e)(a,l,3));n.push({position:a,faces:c}),r+=a.length,i+=c.length}const o=function(e,t,n){if(1===e.length)return e[0];const r=(0,E.bg)(t),i=new Array(n);let o=0,s=0,a=0;for(const t of e){for(let e=0;e<t.position.length;e++)r[o++]=t.position[e];for(const e of t.faces)i[s++]=e+a;a=o/3}return{position:r,faces:(0,C.mi)(i)}}(n,r,i),s=Array.isArray(o.position)?(0,R.d)(o.position,3,{originalIndices:o.faces}):(0,R.d)(o.position.buffer,6,{originalIndices:o.faces});return o.position=(0,E.QZ)(new Float64Array(s.buffer)),o.faces=s.indices,o}(e);return new je({vertexAttributes:new M.Q({position:n.position}),components:[new w.Z({faces:n.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new A.Z})}static async createFromGLTF(e,t,r){if(!(e instanceof y.Z))throw i.Z.getLogger(ke).error(".createfromGLTF()","expected location to be a Point instance"),new c.Z("invalid-input","Expected location to be a Point instance");const{loadGLTFMesh:o}=await(0,f.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r);return new je(await o(e,t,r))}static async createFromFiles(e,t,n){if(!(e instanceof y.Z)){const e="Expected location to be a Point instance";throw i.Z.getLogger(ke).error(".createFromFiles()",e),new c.Z("invalid-input",e)}const r=n?.layer;if(!r){const e="A layer is needed to convert the files";throw i.Z.getLogger(ke).error(".createFromFiles()",e),new c.Z("invalid-input",e)}const o=(await async function(e){const t=[];for(const n of e)n.name.toLowerCase().endsWith(".zip")?t.push(ze(n)):t.push(Promise.resolve(n));return(await Promise.all(t)).flat()}(t)).filter((e=>(0,Be.F7)(r.infoFor3D,e))),s=je.createWithExternalSource(e,o),[a]=await r.uploadAssets([s],n);return a}static createWithExternalSource(e,t,n){const r=n?.extent??null,{x:i,y:o,z:s,spatialReference:a}=e,l=n?.transform?.clone()??new _.Z,c=n?.vertexSpace??new T.Z({origin:[i,o,s??0]}),u={source:t,extent:r},h=new le;return h.externalSources.push(u),new je({metadata:h,transform:l,vertexSpace:c,spatialReference:a})}static createIncomplete(e,t){const{x:n,y:r,z:i,spatialReference:o}=e,s=t?.transform?.clone()??new _.Z,a=t?.vertexSpace??new T.Z({origin:[n,r,i??0]}),l=new je({transform:s,vertexSpace:a,spatialReference:o});return l.addResolvingPromise(Promise.reject(new c.Z("mesh-incomplete","Mesh resources are not complete"))),l}};(0,l._)([(0,d.Cb)({type:[w.Z],json:{write:!0}})],Ge.prototype,"components",void 0),(0,l._)([(0,d.Cb)({nonNullable:!0,types:Ve,constructOnly:!0,json:{write:!0}})],Ge.prototype,"vertexSpace",void 0),(0,l._)([(0,d.Cb)({type:_.Z,json:{write:!0}})],Ge.prototype,"transform",void 0),(0,l._)([(0,d.Cb)({constructOnly:!0})],Ge.prototype,"metadata",void 0),(0,l._)([(0,d.Cb)()],Ge.prototype,"hasExtent",null),(0,l._)([(0,d.Cb)()],Ge.prototype,"_transformedExtent",null),(0,l._)([(0,d.Cb)()],Ge.prototype,"_untransformedExtent",null),(0,l._)([(0,d.Cb)()],Ge.prototype,"anchor",null),(0,l._)([(0,d.Cb)()],Ge.prototype,"origin",null),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],Ge.prototype,"extent",null),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Ge.prototype,"hasZ",void 0),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Ge.prototype,"hasM",void 0),(0,l._)([(0,d.Cb)({type:M.Q,nonNullable:!0,json:{write:!0}})],Ge.prototype,"vertexAttributes",void 0),Ge=je=(0,l._)([(0,g.j)(ke)],Ge);const We=(0,s.c)(),He=(0,v.Ue)(),Ye=Ge;var Je=n(82971),$e=n(74889);const qe=()=>i.Z.getLogger("esri.rest.support.meshFeatureSet");function Xe(e,t,n){const i=n.features;n.features=[],delete n.geometryType;const o=$e.Z.fromJSON(n);if(o.geometryType="mesh",!n.assetMaps)return o;const s=tt(t,n.assetMaps),a=e.sourceSpatialReference??Je.Z.WGS84,l=n.globalIdFieldName,{outFields:c}=e,u=null!=c&&c.length>0?(h=c.includes("*")?null:new Set(c),({attributes:e})=>{if(!e)return{};if(!h)return e;for(const t in e)h.has(t)||delete e[t];return e}):()=>({});var h;for(const e of i){const n=Ke(e,l,a,t,s);null!=n&&o.features.push(new r.Z({geometry:n,attributes:u(e)}))}return o}function Ke(e,t,n,r,i){const o=e.attributes[t],l=i.get(o);if(null==l)return qe().error("mesh-feature-set:asset-not-found","Service returned a feature which was not found in the asset map",e),null;if(!e.geometry)return qe().error("mesh-feature-set:no-geometry","Service returned a feature without geometry",e),null;const{originPoint:c,originVector:u}=function({attributes:e},t,{transformFieldRoles:n}){const r=e[n.originX],i=e[n.originY],o=e[n.originZ];return{originPoint:new y.Z({x:r,y:i,z:o,spatialReference:t}),originVector:(0,s.f)(r,i,o)}}(e,n,r),h=a.Z.fromJSON(e.geometry);h.spatialReference=n;const f=function(e,{transformFieldRoles:t}){return new _.Z({translation:[e[t.translationX],-e[t.translationZ],e[t.translationY]],rotationAxis:[e[t.rotationX],-e[t.rotationZ],e[t.rotationY]],rotationAngle:e[t.rotationDeg],scale:[e[t.scaleX],e[t.scaleZ],e[t.scaleY]]})}(e.attributes,r),p=l.projectVertices?new b.Z({origin:u}):new T.Z({origin:u}),d=function(e){const t=Array.from(e.files.values()),n=new Array;for(const e of t){if(e.status!==Qe.COMPLETED)return null;const t=new Array;for(const n of e.parts){if(!n)return null;t.push(new ae.LL(n.url,n.hash))}n.push(new ae.CP(e.name,e.mimeType,t))}return n}(l);return d?Ye.createWithExternalSource(c,d,{extent:h,transform:f,vertexSpace:p}):Ye.createIncomplete(c,{extent:h,transform:f,vertexSpace:p})}var Qe,et;function tt(e,t){const n=new Map;for(const r of t){const t=r.parentGlobalId;if(null==t)continue;const i=r.assetName,s=r.assetType,a=r.assetHash,l=r.assetURL,c=r.conversionStatus,u=r.seqNo,h=(0,Be.d1)(s,e.supportedFormats);if(!h){qe().error("mesh-feature-set:unknown-format",`Service returned an asset of type ${s}, but it does not list it as a supported type`);continue}const f=(0,o.s1)(n,t,(()=>({projectVertices:rt(r.flags).projectVertices,files:new Map})));(0,o.s1)(f.files,i,(()=>({name:i,type:s,mimeType:h,status:nt(c),parts:[]}))).parts[u]={hash:a,url:l}}return n}function nt(e){switch(e){case"COMPLETED":case"SUBMITTED":return Qe.COMPLETED;case"INPROGRESS":return Qe.PENDING;default:return Qe.FAILED}}function rt(e){return{projectVertices:e.includes("PROJECT_VERTICES")}}(et=Qe||(Qe={}))[et.FAILED=0]="FAILED",et[et.PENDING=1]="PENDING",et[et.COMPLETED=2]="COMPLETED"},17662:(e,t,n)=>{n.d(t,{c:()=>i});var r=n(99001);class i{constructor(){this.id=(0,r.D)()}}},4726:(e,t,n)=>{var r;n.d(t,{U:()=>r}),function(e){e[e.Layer=0]="Layer",e[e.Object=1]="Object",e[e.Mesh=2]="Mesh",e[e.Line=3]="Line",e[e.Point=4]="Point",e[e.Material=5]="Material",e[e.Texture=6]="Texture",e[e.COUNT=7]="COUNT"}(r||(r={}))},22631:(e,t,n)=>{n.d(t,{Z:()=>I});var r=n(13598),i=n(17896),o=n(24882),s=n(1533);function a(e){if(e.length<s.DB)return Array.from(e);if((0,s.kJ)(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,s.Uc)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}var l=n(47026),c=n(44553),u=n(65617),h=n(11726);class f{constructor(e,t,n,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.indices=n,this.position=r,this._children=void 0,(0,h.hu)(e.length>=1),(0,h.hu)(n.length%this._numIndexPerPrimitive==0),(0,h.hu)(n.length>=e.length*this._numIndexPerPrimitive),(0,h.hu)(3===r.size||4===r.size);const{data:o,size:s}=r,a=e.length;let l=s*n[this._numIndexPerPrimitive*e[0]];p.clear(),p.push(l);const c=(0,u.f)(o[l],o[l+1],o[l+2]),f=(0,u.a)(c);for(let t=0;t<a;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){l=s*n[r+e],p.push(l);let t=o[l];c[0]=Math.min(t,c[0]),f[0]=Math.max(t,f[0]),t=o[l+1],c[1]=Math.min(t,c[1]),f[1]=Math.max(t,f[1]),t=o[l+2],c[2]=Math.min(t,c[2]),f[2]=Math.max(t,f[2])}}this.bbMin=c,this.bbMax=f;const d=(0,i.f)((0,u.c)(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(f[0]-c[0],f[1]-c[1]),f[2]-c[2]);let g=this.radius*this.radius;for(let e=0;e<p.length;++e){l=p.at(e);const t=o[l]-d[0],n=o[l+1]-d[1],r=o[l+2]-d[2],i=t*t+n*n+r*r;if(i<=g)continue;const s=Math.sqrt(i),a=.5*(s-this.radius);this.radius=this.radius+a,g=this.radius*this.radius;const c=a/s;d[0]+=t*c,d[1]+=n*c,d[2]+=r*c}this.center=d,p.clear()}getChildren(){if(this._children||(0,i.a)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,i.f)((0,u.c)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,n=new Uint8Array(t),r=new Array(8);for(let e=0;e<8;++e)r[e]=0;const{data:o,size:s}=this.position;for(let i=0;i<t;++i){let t=0;const a=this._numIndexPerPrimitive*this.primitiveIndices[i];let l=s*this.indices[a],c=o[l],u=o[l+1],h=o[l+2];for(let e=1;e<this._numIndexPerPrimitive;++e){l=s*this.indices[a+e];const t=o[l],n=o[l+1],r=o[l+2];t<c&&(c=t),n<u&&(u=n),r<h&&(h=r)}c<e[0]&&(t|=1),u<e[1]&&(t|=2),h<e[2]&&(t|=4),n[i]=t,++r[t]}let a=0;for(let e=0;e<8;++e)r[e]>0&&++a;if(a<2)return;const l=new Array(8);for(let e=0;e<8;++e)l[e]=r[e]>0?new Uint32Array(r[e]):void 0;for(let e=0;e<8;++e)r[e]=0;for(let e=0;e<t;++e){const t=n[e];l[t][r[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==l[e]&&this._children.push(new f(l[e],this._numIndexPerPrimitive,this.indices,this.position));return this._children}static prune(){p.prune()}}const p=new c.Z({deallocator:null});var d=n(17662),g=n(4726),m=n(22807),y=n(16996);function x(e,t,n){return(0,i.g)(v,t,e),(0,i.g)(w,n,e),(0,i.l)((0,i.c)(v,v,w))/2}n(12981),new m.x(y.Ue),new m.x((()=>{return e?{p0:(0,u.a)(e.p0),p1:(0,u.a)(e.p1),p2:(0,u.a)(e.p2)}:{p0:(0,u.c)(),p1:(0,u.c)(),p2:(0,u.c)()};var e}));const v=(0,u.c)(),w=(0,u.c)(),b=(0,u.c)(),A=(0,u.c)(),T=(0,u.c)(),_=(0,u.c)();var M=n(99001);class S{constructor(e){this.channel=e,this.id=(0,M.D)()}}var O=n(35065);n(9820),(0,u.c)(),new Float32Array(6);class I extends d.c{constructor(e,t,n=[],r=null,i=g.U.Mesh,s=null,a=-1){super(),this.material=e,this.mapPositions=r,this.type=i,this.objectAndLayerIdColor=s,this.edgeIndicesLength=a,this.visible=!0,this._vertexAttributes=new Map,this._indices=new Map,this._boundingInfo=null;for(const[e,n]of t)n&&this._vertexAttributes.set(e,{...n});if(null==n||0===n.length){const e=function(e){const t=e.values().next().value;return null==t?0:t.data.length/t.size}(this._vertexAttributes),t=(0,o.KF)(e);this.edgeIndicesLength=this.edgeIndicesLength<0?e:this.edgeIndicesLength;for(const e of this._vertexAttributes.keys())this._indices.set(e,t)}else for(const[e,t]of n)t&&(this._indices.set(e,(0,o.mi)(t)),e===O.T.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._indices.get(e).length:this.edgeIndicesLength))}instantiate(e={}){const t=new I(e.material||this.material,[],void 0,this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);return this._vertexAttributes.forEach(((e,n)=>{e.exclusive=!1,t._vertexAttributes.set(n,e)})),this._indices.forEach(((e,n)=>t._indices.set(n,e))),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}get vertexAttributes(){return this._vertexAttributes}getMutableAttribute(e){let t=this._vertexAttributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:a(t.data)},this._vertexAttributes.set(e,t)),t}setAttributeData(e,t){const n=this._vertexAttributes.get(e);n&&this._vertexAttributes.set(e,{...n,exclusive:!0,data:t})}get indices(){return this._indices}get indexCount(){const e=this._indices.values().next().value;return e?e.length:0}get faceCount(){return this.indexCount/3}get boundingInfo(){return null==this._boundingInfo&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(e){return!!(this.type===g.U.Mesh?this._computeAttachmentOriginTriangles(e):this.type===g.U.Line?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,i.m)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){const t=this.indices.get(O.T.POSITION);return function(e,t,n){if(!e||!t)return!1;const{size:r,data:o}=e;(0,i.s)(n,0,0,0),(0,i.s)(_,0,0,0);let s=0,a=0;for(let e=0;e<t.length-2;e+=3){const l=t[e]*r,c=t[e+1]*r,u=t[e+2]*r;(0,i.s)(b,o[l],o[l+1],o[l+2]),(0,i.s)(A,o[c],o[c+1],o[c+2]),(0,i.s)(T,o[u],o[u+1],o[u+2]);const h=x(b,A,T);h?((0,i.e)(b,b,A),(0,i.e)(b,b,T),(0,i.b)(b,b,1/3*h),(0,i.e)(n,n,b),s+=h):((0,i.e)(_,_,b),(0,i.e)(_,_,A),(0,i.e)(_,_,T),a+=3)}return!(0===a&&0===s||(0!==s?((0,i.b)(n,n,1/s),0):0===a||((0,i.b)(n,_,1/a),0)))}(this.vertexAttributes.get(O.T.POSITION),t,e)}_computeAttachmentOriginLines(e){const t=this.vertexAttributes.get(O.T.POSITION),n=this.indices.get(O.T.POSITION);return function(e,t,n,r){if(!e)return!1;(0,i.s)(r,0,0,0),(0,i.s)(_,0,0,0);let o=0,s=0;const{size:a,data:l}=e,c=t?t.length-1:l.length/a-1,u=c+(n?2:0);for(let e=0;e<u;e+=2){const n=e<c?e:c,u=e<c?e+1:0,h=(t?t[n]:n)*a,f=(t?t[u]:u)*a;b[0]=l[h],b[1]=l[h+1],b[2]=l[h+2],A[0]=l[f],A[1]=l[f+1],A[2]=l[f+2],(0,i.b)(b,(0,i.e)(b,b,A),.5);const p=(0,i.j)(b,A);p>0?((0,i.e)(r,r,(0,i.b)(b,b,p)),o+=p):0===o&&((0,i.e)(_,_,b),s++)}return 0!==o?((0,i.b)(r,r,1/o),!0):0!==s&&((0,i.b)(r,_,1/s),!0)}(t,n,n&&function(e,t,n){return!(!("isClosed"in e)||!e.isClosed)&&(n?n.length>2:t.data.length>6)}(this.material.parameters,t,n),e)}_computeAttachmentOriginPoints(e){const t=this.indices.get(O.T.POSITION);return function(e,t,n){if(!e||!t)return!1;const{size:r,data:o}=e;(0,i.s)(n,0,0,0);let s=-1,a=0;for(let e=0;e<t.length;e++){const i=t[e]*r;s!==i&&(n[0]+=o[i],n[1]+=o[i+1],n[2]+=o[i+2],a++),s=i}return a>1&&(0,i.b)(n,n,1/a),a>0}(this.vertexAttributes.get(O.T.POSITION),t,e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.indices.get(O.T.POSITION),t=this.vertexAttributes.get(O.T.POSITION);if(!e||0===e.length||!t)return null;const n=this.type===g.U.Mesh?3:1;(0,h.hu)(e.length%n==0,"Indexing error: "+e.length+" not divisible by "+n);const r=(0,o.KF)(e.length/n);return new f(r,n,e,t)}get transformation(){return this._transformation??r.I}set transformation(e){this._transformation=e&&e!==r.I?(0,r.b)(e):null}addHighlight(){const e=new S(l.V_.Highlight);return this.highlights=function(e,t){return null==e&&(e=[]),e.push(t),e}(this.highlights,e),e}removeHighlight(e){this.highlights=function(e,t){if(null==e)return null;const n=e.filter((e=>e!==t));return 0===n.length?null:n}(this.highlights,e)}}},11726:(e,t,n)=>{n.d(t,{hu:()=>i,yK:()=>o}),n(97323),n(98766),(0,n(88669).c)();class r{constructor(e){this.message=e}toString(){return`AssertException: ${this.message}`}}function i(e,t){if(!e){t=t||"Assertion";const e=new Error(t).stack;throw new r(`${t} at ${e}`)}}function o(e,t,n,r){let i,o=(n[0]-e[0])/t[0],s=(r[0]-e[0])/t[0];o>s&&(i=o,o=s,s=i);let a=(n[1]-e[1])/t[1],l=(r[1]-e[1])/t[1];if(a>l&&(i=a,a=l,l=i),o>l||a>s)return!1;a>o&&(o=a),l<s&&(s=l);let c=(n[2]-e[2])/t[2],u=(r[2]-e[2])/t[2];return c>u&&(i=c,c=u,u=i),!(o>u||c>s||(u<s&&(s=u),s<0))}},35065:(e,t,n)=>{var r;n.d(t,{T:()=>r}),function(e){e.POSITION="position",e.NORMAL="normal",e.NORMALCOMPRESSED="normalCompressed",e.UV0="uv0",e.AUXPOS1="auxpos1",e.AUXPOS2="auxpos2",e.COLOR="color",e.SYMBOLCOLOR="symbolColor",e.SIZE="size",e.TANGENT="tangent",e.OFFSET="offset",e.SUBDIVISIONFACTOR="subdivisionFactor",e.COLORFEATUREATTRIBUTE="colorFeatureAttribute",e.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",e.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",e.DISTANCETOSTART="distanceToStart",e.UVMAPSPACE="uvMapSpace",e.BOUNDINGRECT="boundingRect",e.UVREGION="uvRegion",e.PROFILERIGHT="profileRight",e.PROFILEUP="profileUp",e.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",e.FEATUREVALUE="featureValue",e.INSTANCEMODELORIGINHI="instanceModelOriginHi",e.INSTANCEMODELORIGINLO="instanceModelOriginLo",e.INSTANCEMODEL="instanceModel",e.INSTANCEMODELNORMAL="instanceModelNormal",e.INSTANCECOLOR="instanceColor",e.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",e.LOCALTRANSFORM="localTransform",e.GLOBALTRANSFORM="globalTransform",e.BOUNDINGSPHERE="boundingSphere",e.MODELORIGIN="modelOrigin",e.MODELSCALEFACTORS="modelScaleFactors",e.FEATUREATTRIBUTE="featureAttribute",e.STATE="state",e.LODLEVEL="lodLevel",e.POSITION0="position0",e.POSITION1="position1",e.NORMALA="normalA",e.NORMALB="normalB",e.COMPONENTINDEX="componentIndex",e.VARIANTOFFSET="variantOffset",e.VARIANTSTROKE="variantStroke",e.VARIANTEXTENSION="variantExtension",e.U8PADDING="u8padding",e.U16PADDING="u16padding",e.SIDENESS="sideness",e.START="start",e.END="end",e.UP="up",e.EXTRUDE="extrude",e.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",e.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(r||(r={}))},47026:(e,t,n)=>{var r,i,o,s,a,l,c,u,h;n.d(t,{Gv:()=>i,Iq:()=>u,JJ:()=>c,Rw:()=>s,Ti:()=>h,V_:()=>l,Vr:()=>r,hU:()=>a}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(r||(r={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(i||(i={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(o||(o={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(s||(s={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(a||(a={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee",e[e.COUNT=2]="COUNT"}(l||(l={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(c||(c={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON"}(u||(u={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(h||(h={}))},9820:(e,t,n)=>{function r(e,t){const n=e.length;for(let r=0;r<n;++r)o[0]=e[r],t[r]=o[0];return t}function i(e,t){const n=e.length;for(let r=0;r<n;++r)o[0]=e[r],o[1]=e[r]-o[0],t[r]=o[1];return t}n.d(t,{GB:()=>i,U8:()=>r});const o=new Float32Array(2)}}]);