@arcgis/core 4.32.0-next.20250121 → 4.32.0-next.20250122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/WebLinkChart.js +1 -1
- package/arcade/treeAnalysis.js +1 -1
- package/assets/esri/core/t9n/Units_ar.json +1 -1
- package/assets/esri/core/t9n/Units_bg.json +1 -1
- package/assets/esri/core/t9n/Units_bs.json +1 -1
- package/assets/esri/core/t9n/Units_ca.json +1 -1
- package/assets/esri/core/t9n/Units_cs.json +1 -1
- package/assets/esri/core/t9n/Units_da.json +1 -1
- package/assets/esri/core/t9n/Units_de.json +1 -1
- package/assets/esri/core/t9n/Units_el.json +1 -1
- package/assets/esri/core/t9n/Units_es.json +1 -1
- package/assets/esri/core/t9n/Units_et.json +1 -1
- package/assets/esri/core/t9n/Units_fi.json +1 -1
- package/assets/esri/core/t9n/Units_fr.json +1 -1
- package/assets/esri/core/t9n/Units_he.json +1 -1
- package/assets/esri/core/t9n/Units_hr.json +1 -1
- package/assets/esri/core/t9n/Units_hu.json +1 -1
- package/assets/esri/core/t9n/Units_id.json +1 -1
- package/assets/esri/core/t9n/Units_it.json +1 -1
- package/assets/esri/core/t9n/Units_ja.json +1 -1
- package/assets/esri/core/t9n/Units_ko.json +1 -1
- package/assets/esri/core/t9n/Units_lt.json +1 -1
- package/assets/esri/core/t9n/Units_lv.json +1 -1
- package/assets/esri/core/t9n/Units_nl.json +1 -1
- package/assets/esri/core/t9n/Units_no.json +1 -1
- package/assets/esri/core/t9n/Units_pl.json +1 -1
- package/assets/esri/core/t9n/Units_pt-BR.json +1 -1
- package/assets/esri/core/t9n/Units_pt-PT.json +1 -1
- package/assets/esri/core/t9n/Units_ro.json +1 -1
- package/assets/esri/core/t9n/Units_ru.json +1 -1
- package/assets/esri/core/t9n/Units_sk.json +1 -1
- package/assets/esri/core/t9n/Units_sl.json +1 -1
- package/assets/esri/core/t9n/Units_sr.json +1 -1
- package/assets/esri/core/t9n/Units_sv.json +1 -1
- package/assets/esri/core/t9n/Units_th.json +1 -1
- package/assets/esri/core/t9n/Units_tr.json +1 -1
- package/assets/esri/core/t9n/Units_uk.json +1 -1
- package/assets/esri/core/t9n/Units_vi.json +1 -1
- package/assets/esri/core/t9n/Units_zh-CN.json +1 -1
- package/assets/esri/core/t9n/Units_zh-HK.json +1 -1
- package/assets/esri/core/t9n/Units_zh-TW.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/03b94362ed2a45ee5ea3.js +1 -0
- package/assets/esri/core/workers/chunks/0446f2ffad255cd40272.js +1 -0
- package/assets/esri/core/workers/chunks/059119f1731c2103c91c.js +1 -0
- package/assets/esri/core/workers/chunks/05e58286f8015dba6768.js +1 -0
- package/assets/esri/core/workers/chunks/060414956bf316529c48.js +1 -0
- package/assets/esri/core/workers/chunks/{f8e188af5608293d5b2b.js → 07bff9e742f3e5877f3f.js} +1 -1
- package/assets/esri/core/workers/chunks/{6400f39a965900f66ce7.js → 083c73428945fb3d4558.js} +1 -1
- package/assets/esri/core/workers/chunks/0d3154b90bc3fd7e6b4c.js +1 -0
- package/assets/esri/core/workers/chunks/0ec2ae595fa22998ffea.js +1 -0
- package/assets/esri/core/workers/chunks/{105dcc7b7284b1e965b7.js → 15c5b1dd8f398f641f6e.js} +1 -1
- package/assets/esri/core/workers/chunks/163451124c66a7a0bcdc.js +1 -0
- package/assets/esri/core/workers/chunks/17cc6638a510da164f58.js +1 -0
- package/assets/esri/core/workers/chunks/1e3ab66d0e8a7f160f33.js +1 -0
- package/assets/esri/core/workers/chunks/1e9349411af082ec03d0.js +1 -0
- package/assets/esri/core/workers/chunks/1eb47cfca815ac432cf5.js +1 -0
- package/assets/esri/core/workers/chunks/{82266ca8002554198208.js → 20e7fae0c173807ba9a2.js} +1 -1
- package/assets/esri/core/workers/chunks/{af0b0a7eedebcf99d05d.js → 2118e9ffb24178ed7f59.js} +1 -1
- package/assets/esri/core/workers/chunks/21c12edc0632eb911e73.js +1 -0
- package/assets/esri/core/workers/chunks/21c3882a282a4755e032.js +1 -0
- package/assets/esri/core/workers/chunks/{435c037ccba71f1e22d3.js → 2488a0da3be64b0a26f4.js} +1 -1
- package/assets/esri/core/workers/chunks/254fbd8055ae7a0bb393.js +1 -0
- package/assets/esri/core/workers/chunks/2d55eb8059a532ffcc56.js +1 -0
- package/assets/esri/core/workers/chunks/3034df78da56fe1c0535.js +1 -0
- package/assets/esri/core/workers/chunks/32a96ef30f4608f377d6.js +1 -0
- package/assets/esri/core/workers/chunks/{97d66b0d0ff1132966de.js → 33b2f59c2ec10b2a1034.js} +1 -1
- package/assets/esri/core/workers/chunks/402de76b5de05615e111.js +1 -0
- package/assets/esri/core/workers/chunks/{17726b0ab1bf66185d66.js → 40efcdf03c5224e6c4f7.js} +1 -1
- package/assets/esri/core/workers/chunks/424c7788a708abbf9299.js +1 -0
- package/assets/esri/core/workers/chunks/484d99910d110830df76.js +1 -0
- package/assets/esri/core/workers/chunks/{9970e0e74cf2877a7ffc.js → 486969dba1dc99402172.js} +2 -2
- package/assets/esri/core/workers/chunks/{02b2175132c9720bc756.js → 48f4ba1a5bb692903d06.js} +1 -1
- package/assets/esri/core/workers/chunks/4d7bd2bbe9045a2fee7a.js +1 -0
- package/assets/esri/core/workers/chunks/{decd316936df1ad3fa65.js → 50b538c93696de5eda97.js} +1 -1
- package/assets/esri/core/workers/chunks/{de00150030003de05146.js → 52aea8a4f292a66f5cfa.js} +1 -1
- package/assets/esri/core/workers/chunks/56f0eb9802f5cf9ad0d9.js +1 -0
- package/assets/esri/core/workers/chunks/57ddd64f0c22274d87e0.js +1 -0
- package/assets/esri/core/workers/chunks/5b5be7eb139b153934f5.js +1 -0
- package/assets/esri/core/workers/chunks/{4af0674fabfc965f1660.js → 5b876743865ef91b5648.js} +1 -1
- package/assets/esri/core/workers/chunks/62b88350892198de5055.js +1 -0
- package/assets/esri/core/workers/chunks/{206194cf069ad4bcc3ad.js → 6adf4f3d807f1af1c7c1.js} +1 -1
- package/assets/esri/core/workers/chunks/6b1285db2d6695a87553.js +1 -0
- package/assets/esri/core/workers/chunks/6c425e1041bdeef32832.js +1 -0
- package/assets/esri/core/workers/chunks/6eb829a7959df2269b0e.js +1 -0
- package/assets/esri/core/workers/chunks/765b4aefce7c11bbcb1f.js +1 -0
- package/assets/esri/core/workers/chunks/{6d17488396583d83d9be.js → 79a265dc21e29d3fd888.js} +1 -1
- package/assets/esri/core/workers/chunks/7a9e1696dc6120df15b0.js +1 -0
- package/assets/esri/core/workers/chunks/7ae1f26ded268099f429.js +1 -0
- package/assets/esri/core/workers/chunks/7bf08823f861628144a1.js +1 -0
- package/assets/esri/core/workers/chunks/7e4d72279cc599b7029c.js +1 -0
- package/assets/esri/core/workers/chunks/{ee5f43fbe4c2cc199e64.js → 8434cd16effc5efbf1bd.js} +1 -1
- package/assets/esri/core/workers/chunks/86149b4a5a148744c7d1.js +1 -0
- package/assets/esri/core/workers/chunks/{2779cf112299b612a73a.js → 875cb81f143ff8fe03b5.js} +1 -1
- package/assets/esri/core/workers/chunks/885814ef0e34c01a589f.js +1 -0
- package/assets/esri/core/workers/chunks/{e610dd938d30f75778bc.js → 8be2d16663a238de9438.js} +1 -1
- package/assets/esri/core/workers/chunks/91d5cb094a7051abb6c5.js +1 -0
- package/assets/esri/core/workers/chunks/93ba76749746871357e7.js +314 -0
- package/assets/esri/core/workers/chunks/991c597f27daa67158c5.js +1 -0
- package/assets/esri/core/workers/chunks/9bd22cdf6eb158555906.js +1 -0
- package/assets/esri/core/workers/chunks/{33eebe5cb22a03ae90c8.js → 9c88ce9b0020b6f9a37a.js} +1 -1
- package/assets/esri/core/workers/chunks/9df7bffadbe0b4aad442.js +1 -0
- package/assets/esri/core/workers/chunks/a0a056698f8227210f49.js +1 -0
- package/assets/esri/core/workers/chunks/a1cdd09968e11d95c701.js +1 -0
- package/assets/esri/core/workers/chunks/a28cb975974b99540432.js +1 -0
- package/assets/esri/core/workers/chunks/a29958273958c3e3e932.js +1 -0
- package/assets/esri/core/workers/chunks/{98da074899c82f0ded0b.js → af224962edae72b002fa.js} +1 -1
- package/assets/esri/core/workers/chunks/af2ed4c8ac238b932d89.js +1 -0
- package/assets/esri/core/workers/chunks/af75107f207b2ba01bb4.js +1 -0
- package/assets/esri/core/workers/chunks/b1661e6c76ef0800ffd6.js +1 -0
- package/assets/esri/core/workers/chunks/b42ecc7c3eb2fd8d1308.js +1 -0
- package/assets/esri/core/workers/chunks/b44cf0e4c2f93408cabc.js +1 -0
- package/assets/esri/core/workers/chunks/b846052b6f80ad6ada89.js +1 -0
- package/assets/esri/core/workers/chunks/{399e67ccb69a5b206354.js → c1fd87af3129873369fd.js} +1 -1
- package/assets/esri/core/workers/chunks/c473756f8785ab868ba5.js +1 -0
- package/assets/esri/core/workers/chunks/c5368ca97b7f7261967a.js +1 -0
- package/assets/esri/core/workers/chunks/c685991c9a30f7435933.js +1 -0
- package/assets/esri/core/workers/chunks/ca5bd71bc2c1b1b3f9d9.js +1 -0
- package/assets/esri/core/workers/chunks/ce1c89b5a10fb5a7bb49.js +1 -0
- package/assets/esri/core/workers/chunks/d45ff061bf71b73e9f26.js +1 -0
- package/assets/esri/core/workers/chunks/d4760e583dfac95dc8a1.js +1 -0
- package/assets/esri/core/workers/chunks/de2ca2dc1b5d62c0d82e.js +1 -0
- package/assets/esri/core/workers/chunks/dfa4be2e07cc4c0938b0.js +1 -0
- package/assets/esri/core/workers/chunks/e067cef3b3ac3af49b88.js +1 -0
- package/assets/esri/core/workers/chunks/e2775bcceb62fd0df41b.js +1 -0
- package/assets/esri/core/workers/chunks/{c81204ae663e58c7b689.js → e63ff8d57fd771413488.js} +1 -1
- package/assets/esri/core/workers/chunks/e9993d4f2bfdc434fbcc.js +1 -0
- package/assets/esri/core/workers/chunks/{54c149f90bf94b797b36.js → ed30f46236da29c15430.js} +1 -1
- package/assets/esri/core/workers/chunks/f016205a8f1fb665d6dd.js +1 -0
- package/assets/esri/core/workers/chunks/f02119812ec852edda57.js +1 -0
- package/assets/esri/core/workers/chunks/f272070f0878cd3e39a4.js +1 -0
- package/assets/esri/core/workers/chunks/f2cf05fbbb51d657d300.js +1 -0
- package/assets/esri/core/workers/chunks/{e4f4ad67d778dea5b956.js → f4f6f4933ca58438d7bc.js} +1 -1
- package/assets/esri/core/workers/chunks/fdc3d97510c6d43a8882.js +1 -0
- package/assets/esri/core/workers/chunks/fef135e55706d84d1947.js +1 -0
- package/assets/esri/core/workers/chunks/ff4107b4fd3d3ce24e84.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +24 -0
- package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +49 -24
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_en.json +1 -1
- package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
- package/chunks/arcgis-knowledge-client-core.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/lyr3DWorker.js +1 -1
- package/editing/sharedTemplates/SharedTemplate.js +1 -1
- package/editing/sharedTemplates/SharedTemplateMetadata.d.ts +4 -0
- package/editing/sharedTemplates/SharedTemplateMetadata.js +1 -1
- package/editing/templateUtils.js +5 -0
- package/geometry/operators/projectOperator.d.ts +4 -0
- package/geometry/operators/shapePreservingProjectOperator.d.ts +4 -0
- package/geometry/operators/support/GeographicTransformation.d.ts +4 -0
- package/geometry/operators/support/GeographicTransformation.js +1 -1
- package/geometry/operators/support/GeographicTransformationStep.d.ts +4 -0
- package/geometry/operators/support/geographicTransformationUtils.d.ts +4 -0
- package/geometry/support/GeographicTransformation.d.ts +2 -2
- package/geometry/support/GeographicTransformationStep.d.ts +2 -2
- package/interfaces.d.ts +522 -53
- package/layers/ILyr3DWasmPerSceneView.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/networks/support/utils.js +1 -1
- package/package.json +1 -1
- package/rest/featureService/FeatureService.js +1 -1
- package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsConfiguration.d.ts +4 -0
- package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsConfiguration.js +5 -0
- package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsEntity.d.ts +4 -0
- package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsEntity.js +5 -0
- package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.d.ts +4 -0
- package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.js +5 -0
- package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.d.ts +4 -0
- package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.js +5 -0
- package/rest/knowledgeGraph/toolService/findPaths/FindPathsToolSettings.d.ts +4 -0
- package/rest/knowledgeGraph/toolService/findPaths/FindPathsToolSettings.js +5 -0
- package/rest/knowledgeGraphService.js +1 -1
- package/support/revision.js +1 -1
- package/undoredo/support/Services.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/Lyr3DWasm.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
- package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
- package/widgets/FeatureTemplates/TemplateItem.js +1 -1
- package/widgets/FeatureTemplates/featureTemplatesUtils.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/Locate.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerVisibleElements.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageAreaMeasurement.js +5 -0
- package/widgets/OrientedImageryViewer/components/ImageDistanceMeasurement.js +5 -0
- package/widgets/OrientedImageryViewer/components/ImageMeasurement.js +5 -0
- package/widgets/OrientedImageryViewer/css.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +5 -0
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +5 -0
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0651586dc7bd2e8b34db.js +0 -1
- package/assets/esri/core/workers/chunks/077070295499b9bfabb6.js +0 -1
- package/assets/esri/core/workers/chunks/090cfc7f088a729afd47.js +0 -1
- package/assets/esri/core/workers/chunks/0d387baa64a89f88b1de.js +0 -1
- package/assets/esri/core/workers/chunks/134de9fa142129a43b1e.js +0 -1
- package/assets/esri/core/workers/chunks/16fa0a5f73ab67a8d3e4.js +0 -1
- package/assets/esri/core/workers/chunks/1797f62e9bf8f1ac8d13.js +0 -1
- package/assets/esri/core/workers/chunks/182722e2fe0a35c4d8db.js +0 -1
- package/assets/esri/core/workers/chunks/1b3215f3290fb2f07ab8.js +0 -1
- package/assets/esri/core/workers/chunks/1f4dd96aacf8c40a1120.js +0 -1
- package/assets/esri/core/workers/chunks/22748779ca94eda44de5.js +0 -1
- package/assets/esri/core/workers/chunks/2427a01678f3d9fbf30b.js +0 -1
- package/assets/esri/core/workers/chunks/33a13544b9e5f4f20bce.js +0 -1
- package/assets/esri/core/workers/chunks/423329432fbf007c620b.js +0 -1
- package/assets/esri/core/workers/chunks/467bd3c0da9518a0058b.js +0 -1
- package/assets/esri/core/workers/chunks/4c1d11a91291b28a73be.js +0 -1
- package/assets/esri/core/workers/chunks/51fbbd082ca78e4417d9.js +0 -1
- package/assets/esri/core/workers/chunks/5c05c899f7e6f764fedd.js +0 -1
- package/assets/esri/core/workers/chunks/6c1470dc0bd4389d1a2d.js +0 -1
- package/assets/esri/core/workers/chunks/6e804ee2d96d4de85a5f.js +0 -1
- package/assets/esri/core/workers/chunks/712f0dd46932c544df68.js +0 -1
- package/assets/esri/core/workers/chunks/71e88c90e9f9a9bddcd8.js +0 -1
- package/assets/esri/core/workers/chunks/74ba752dfab8ea5b6d2a.js +0 -314
- package/assets/esri/core/workers/chunks/79903647d4ed16d9a402.js +0 -1
- package/assets/esri/core/workers/chunks/7b4880b2dc6b01d70ccc.js +0 -1
- package/assets/esri/core/workers/chunks/7c98e4fcba1dc24eb788.js +0 -1
- package/assets/esri/core/workers/chunks/7d0fc25ce1f74adcfeb6.js +0 -1
- package/assets/esri/core/workers/chunks/8249351daa45ca82ca0c.js +0 -1
- package/assets/esri/core/workers/chunks/87ddc3d5d751d565cd97.js +0 -1
- package/assets/esri/core/workers/chunks/88bb55bca76f978c0aa3.js +0 -1
- package/assets/esri/core/workers/chunks/89198ca24466d939e4e8.js +0 -1
- package/assets/esri/core/workers/chunks/8cda8dbd95f0a78063a8.js +0 -1
- package/assets/esri/core/workers/chunks/8e0e5183c88a45fbfd8e.js +0 -1
- package/assets/esri/core/workers/chunks/90eea0c2435bb5d10460.js +0 -1
- package/assets/esri/core/workers/chunks/93c1541241f92fc07eaa.js +0 -1
- package/assets/esri/core/workers/chunks/964f2897794d8d71dcb7.js +0 -1
- package/assets/esri/core/workers/chunks/976daa00d35ee7f27a26.js +0 -1
- package/assets/esri/core/workers/chunks/99b4f146d0f1661a217c.js +0 -1
- package/assets/esri/core/workers/chunks/aa96a05b94ae642c1c9f.js +0 -1
- package/assets/esri/core/workers/chunks/b0055e7b2e840d478de8.js +0 -1
- package/assets/esri/core/workers/chunks/b1bf8ad629a6b8f4489a.js +0 -1
- package/assets/esri/core/workers/chunks/b1e3448ba51557ff6c13.js +0 -1
- package/assets/esri/core/workers/chunks/b30046a40bcfbec8abe4.js +0 -1
- package/assets/esri/core/workers/chunks/b538d02706a25bbbe2d0.js +0 -1
- package/assets/esri/core/workers/chunks/c436a112a3119ceabebf.js +0 -1
- package/assets/esri/core/workers/chunks/c690268f48bc84778b23.js +0 -1
- package/assets/esri/core/workers/chunks/c8a09db652389f0d254d.js +0 -1
- package/assets/esri/core/workers/chunks/c8a645601d041f411060.js +0 -1
- package/assets/esri/core/workers/chunks/cb3b7f83b3efb315bd14.js +0 -1
- package/assets/esri/core/workers/chunks/cdc5e4cd1214362e752a.js +0 -1
- package/assets/esri/core/workers/chunks/da5fc368eb5b3592d05e.js +0 -1
- package/assets/esri/core/workers/chunks/dae7e8357936466482fe.js +0 -1
- package/assets/esri/core/workers/chunks/dd935b6335c674b6f596.js +0 -1
- package/assets/esri/core/workers/chunks/ddd20894b5107b76b815.js +0 -1
- package/assets/esri/core/workers/chunks/df4d7f100222ea671730.js +0 -1
- package/assets/esri/core/workers/chunks/eb256e8488e341c4a6f2.js +0 -1
- package/assets/esri/core/workers/chunks/ebc0094355504ec09fb8.js +0 -1
- package/assets/esri/core/workers/chunks/f1b63f092e239f84b849.js +0 -1
- package/assets/esri/core/workers/chunks/f2126b79f41dc62cc576.js +0 -1
- package/assets/esri/core/workers/chunks/f3e0b0f07a622fcdd6ae.js +0 -1
- package/assets/esri/core/workers/chunks/f581aec77accce7411e0.js +0 -1
- package/assets/esri/core/workers/chunks/f877bcbd277a28154d82.js +0 -1
- package/assets/esri/core/workers/chunks/fa1c68f2ffcdff7986b6.js +0 -1
- package/assets/esri/core/workers/chunks/feeb36ffdffb227c4353.js +0 -1
- package/widgets/support/templateUtils.js +0 -5
- /package/assets/esri/core/workers/chunks/{9970e0e74cf2877a7ffc.js.LICENSE.txt → 486969dba1dc99402172.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2543],{71903:(e,t,s)=>{var i;s.d(t,{u:()=>i}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(i||(i={}))},51624:(e,t,s)=>{s.d(t,{A:()=>h});var i,r,n=s(44208),o=s(69397),a=s(93687);(r=i||(i={}))[r.varint=0]="varint",r[r.fixed64=1]="fixed64",r[r.delimited=2]="delimited",r[r.fixed32=5]="fixed32",r[r.unknown=99]="unknown";const l=4294967296,u=new TextDecoder("utf-8"),c=(0,n.A)("safari")||(0,n.A)("ios")?6:(0,n.A)("ff")?12:32;class h{constructor(e,t,s=0,r=(e?e.byteLength:0)){this._tag=0,this._dataType=i.unknown,this._init(e,t,s,r)}_init(e,t,s,i){this._data=e,this._dataView=t,this._pos=s,this._end=i}get usedMemory(){return 64+(0,o.Qf)(this._data)}asUnsafe(){return this}clone(){return new h(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getUint32(t+4,!0)*l;return this._skip(8),s}getSFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getInt32(t+4,!0)*l;return this._skip(8),s}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,s=this._toString(this._data,t,t+e);return this._skip(e),s}getBytes(){const e=this._getLength(),t=this._pos,s=this._toBytes(this._data,t,t+e);return this._skip(e),s}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,s,i){const r=this.getMessage(),n=e(r,t,s,i);return r.release(),n}processMessage(e){const t=this.getMessage(),s=e(t);return t.release(),s}getMessage(){const e=this._getLength(),t=h.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){h.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case i.varint:this._decodeVarint();break;case i.fixed64:this._skip(8);break;case i.delimited:this._skip(this._getLength());break;case i.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,s=0,i=0;if(this._end-t>=10)do{if(i=e[t++],s|=127&i,!(128&i))break;if(i=e[t++],s|=(127&i)<<7,!(128&i))break;if(i=e[t++],s|=(127&i)<<14,!(128&i))break;if(i=e[t++],s|=(127&i)<<21,!(128&i))break;if(i=e[t++],s+=268435456*(127&i),!(128&i))break;if(i=e[t++],s+=34359738368*(127&i),!(128&i))break;if(i=e[t++],s+=4398046511104*(127&i),!(128&i))break;if(i=e[t++],s+=562949953421312*(127&i),!(128&i))break;if(i=e[t++],s+=72057594037927940*(127&i),!(128&i))break;if(i=e[t++],s+=0x8000000000000000*(127&i),!(128&i))break;throw new Error("Varint too long!")}while(0);else{let r=1;for(;t!==this._end&&(i=e[t],128&i);)++t,s+=(127&i)*r,r*=128;if(t===this._end)throw new Error("Varint overrun!");++t,s+=i*r}return this._pos=t,s}_decodeSVarint(){const e=this._data;let t,s=0,i=0;const r=1&e[this._pos];if(i=e[this._pos++],s|=127&i,!(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<7,!(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<14,!(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<21,!(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s+=268435456*(127&i),!(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s+=34359738368*(127&i),!(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s+=4398046511104*(127&i),!(128&i))return r?-(s+1)/2:s/2;if(t=BigInt(s),i=e[this._pos++],t+=0x2000000000000n*BigInt(127&i),!(128&i))return Number(r?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x100000000000000n*BigInt(127&i),!(128&i))return Number(r?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x8000000000000000n*BigInt(127&i),!(128&i))return Number(r?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(this._dataType!==i.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,s){if((s=Math.min(this._end,s))-t>c){const i=e.subarray(t,s);return u.decode(i)}let i="",r="";for(let n=t;n<s;++n){const t=e[n];128&t?r+="%"+t.toString(16):(i+=decodeURIComponent(r)+String.fromCharCode(t),r="")}return r.length&&(i+=decodeURIComponent(r)),i}_toBytes(e,t,s){return s=Math.min(this._end,s),new Uint8Array(e.buffer,t,s-t)}}h.pool=new a.A(h,void 0,(e=>{e._data=null,e._dataView=null}))},79897:(e,t,s)=>{s.d(t,{U:()=>c});var i=s(90237),r=s(69622),n=s(36563),o=s(36708),a=s(11932),l=s(10107),u=s(40608);let c=class extends r.A{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll()}add(e,t,s={}){return this._installWatch(e,t,s,o.wB)}addWhen(e,t,s={}){return this._installWatch(e,t,s,o.z7)}addOnCollectionChange(e,t,{initial:s=!1,final:i=!1}={}){const r=++this._handleId;return this.addHandles([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.OH),(0,o.on)(e,"change",t,{onListenerAdd:s?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:i?e=>t({added:[],removed:e.toArray()}):void 0})],r),(0,n.hA)((()=>this.removeHandles(r)))}addPromise(e){if(null==e)return e;const t=++this._handleId;this.addHandles((0,n.hA)((()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this.hasHandles(h)||this._set("updating",!1))})),t),this._pendingPromises.add(e),this._set("updating",!0);const s=()=>this.removeHandles(t);return e.then(s,s),e}removeAll(){this._pendingPromises.clear(),this.removeAllHandles(),this._set("updating",!1)}_installWatch(e,t,s={},i){const r=++this._handleId;s.sync||this._installSyncUpdatingWatch(e,r);const o=i(e,t,s);return this.addHandles(o,r),(0,n.hA)((()=>this.removeHandles(r)))}_installSyncUpdatingWatch(e,t){const s=this._createSyncUpdatingCallback(),i=(0,o.wB)(e,s,{sync:!0,equals:()=>!1});return this.addHandles(i,t),i}_createSyncUpdatingCallback(){return()=>{this.removeHandles(h),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this.addHandles((0,a._)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this.removeHandles(h))})),h)}}};(0,i._)([(0,l.MZ)({readOnly:!0})],c.prototype,"updating",void 0),c=(0,i._)([(0,u.$)("esri.core.support.UpdatingHandles")],c);const h=-42},13069:(e,t,s)=>{s.d(t,{AG:()=>a,lk:()=>r,vD:()=>o,yS:()=>n});const i="randomUUID"in crypto;function r(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${r().toUpperCase()}}`}function o(){return`{${r()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},91806:(e,t,s)=>{s.d(t,{A:()=>c});var i,r=s(90237),n=s(25482),o=s(10107),a=s(56507),l=(s(44208),s(87811),s(40608));let u=i=class extends n.A{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new i({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"cols",void 0),(0,r._)([(0,o.MZ)({type:a.jz,json:{write:!0}})],u.prototype,"level",void 0),(0,r._)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"levelValue",void 0),(0,r._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"origin",void 0),(0,r._)([(0,o.MZ)({type:Number,json:{write:!0}})],u.prototype,"resolution",void 0),(0,r._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"rows",void 0),(0,r._)([(0,o.MZ)({type:Number,json:{write:!0}})],u.prototype,"scale",void 0),u=i=(0,r._)([(0,l.$)("esri.layers.support.LOD")],u);const c=u},87045:(e,t,s)=>{s.d(t,{A:()=>E});var i,r=s(90237),n=s(66552),o=s(25482),a=s(83047),l=s(10107),u=s(56507),c=(s(44208),s(87811),s(36005)),h=s(40608),d=s(43937),p=s(86738),f=s(16930),g=s(19419),_=s(21325),y=s(28735),m=s(91806),T=s(72802);const w=new n.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let v=i=class extends o.A{static create(e={}){const{resolutionFactor:t=1,scales:s,size:r=256,spatialReference:n=f.A.WebMercator,numLODs:o=24}=e;if(!(0,_.fn)(n)){const e=[];if(s)for(let t=0;t<s.length;t++){const i=s[t];e.push(new m.A({level:t,scale:i,resolution:i}))}else{let t=5e-4;for(let s=o-1;s>=0;s--)e.unshift(new m.A({level:s,scale:t,resolution:t})),t*=2}return new i({dpi:96,lods:e,origin:new p.A(0,0,n),size:[r,r],spatialReference:n})}const l=(0,_.Vp)(n),u=e.origin?new p.A({x:e.origin.x,y:e.origin.y,spatialReference:n}):new p.A(l?{x:l.origin[0],y:l.origin[1],spatialReference:n}:{x:0,y:0,spatialReference:n}),c=1/(39.37*(0,a.GA)(n)*96),h=[];if(s)for(let e=0;e<s.length;e++){const t=s[e],i=t*c;h.push(new m.A({level:e,scale:t,resolution:i}))}else{let e=(0,_.EA)(n)?512/r*591657527.5917094:256/r*591657527.591555;const s=Math.ceil(o/t);h.push(new m.A({level:0,scale:e,resolution:e*c}));for(let i=1;i<s;i++){const s=e/2**t,r=s*c;h.push(new m.A({level:i,scale:s,resolution:r})),e=s}}return new i({dpi:96,lods:h,origin:u,size:[r,r],spatialReference:n})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const s=(0,_.Vp)(e);return e.isWrappable&&!!s&&Math.abs(s.origin[0]-t.x)<=s.dx}return!1}readOrigin(e,t){return p.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,s=0;const i=[],r=this._levelToLOD={};e&&(t=-1/0,s=1/0,e.forEach((e=>{i.push(e.scale),t=e.scale>t?e.scale:t,s=e.scale<s?e.scale:s,r[e.level]=e}))),this._set("scales",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const s=Math.floor(e),i=s+1;return t[s]/(t[s]/t[i])**(e-s)}scaleToZoom(e){const t=this.scales,s=t.length-1;let i=0;for(;i<s;i++){const s=t[i],r=t[i+1];if(s<=e)return i;if(r===e)return i+1;if(s>e&&r<e)return i+Math.log(s/e)/Math.log(s/r)}return i}tileAt(e,t,s,i){const r=this.lodAt(e);if(!r)return null;let n,o;if("number"==typeof t)n=t,o=s;else if((0,_.aI)(t.spatialReference,this.spatialReference))n=t.x,o=t.y,i=s;else{const e=(0,y.Cv)(t,this.spatialReference);if(null==e)return null;n=e.x,o=e.y,i=s}const a=r.resolution*this.size[0],l=r.resolution*this.size[1];return i||(i=new T.U(null,0,0,0,(0,g.vt)())),i.level=e,i.row=Math.floor((this.origin.y-o)/l+.001),i.col=Math.floor((n-this.origin.x)/a+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=i.ExtrapolateOptions.NONE){let s=this.lodAt(e.level);if(!s&&t===i.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(s=t)}if(!s)return;const r=e.level-s.level,n=s.resolution*this.size[0]/2**r,o=s.resolution*this.size[1]/2**r;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,g.vt)()),e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const s=this.lodAt(t.level);if(null==s)return null;const{resolution:i}=s,r=i*this.size[0],n=i*this.size[1];return e[0]=this.origin.x+t.col*r,e[1]=this.origin.y-(t.row+1)*n,e[2]=e[0]+r,e[3]=e[1]+n,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return i.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const s=[],r=this.lods.length-t;for(let e=0;e<r;e++){const i=e+t,{scale:r,resolution:n}=i>=0?this.lods[i]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};s.push(new m.A({level:e,scale:r,resolution:n}))}return new i({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:s})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let s=0;s<e.length;s++){const i=e[s];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};var F,b;(0,r._)([(0,l.MZ)({type:Number,json:{write:!0}})],v.prototype,"compressionQuality",void 0),(0,r._)([(0,l.MZ)({type:Number,json:{write:!0}})],v.prototype,"dpi",void 0),(0,r._)([(0,l.MZ)({type:String,json:{read:w.read,write:w.write,origins:{"web-scene":{read:!1,write:!1}}}})],v.prototype,"format",void 0),(0,r._)([(0,l.MZ)({readOnly:!0})],v.prototype,"isWrappable",null),(0,r._)([(0,l.MZ)({type:p.A,json:{write:!0}})],v.prototype,"origin",void 0),(0,r._)([(0,c.w)("origin")],v.prototype,"readOrigin",null),(0,r._)([(0,l.MZ)({type:[m.A],value:null,json:{write:!0}})],v.prototype,"lods",null),(0,r._)([(0,l.MZ)({readOnly:!0})],v.prototype,"scales",void 0),(0,r._)([(0,l.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],v.prototype,"size",void 0),(0,r._)([(0,c.w)("size",["rows","cols"])],v.prototype,"readSize",null),(0,r._)([(0,d.K)("size",{cols:{type:u.jz},rows:{type:u.jz}})],v.prototype,"writeSize",null),(0,r._)([(0,l.MZ)({type:f.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),v=i=(0,r._)([(0,h.$)("esri.layers.support.TileInfo")],v),F=v||(v={}),(b=F.ExtrapolateOptions||(F.ExtrapolateOptions={}))[b.NONE=0]="NONE",b[b.POWER_OF_TWO=1]="POWER_OF_TWO";const E=v},72802:(e,t,s)=>{s.d(t,{U:()=>i});class i{constructor(e,t,s,i,r=void 0){this.id=e,this.level=t,this.row=s,this.col=i,this.extent=r}}},31756:(e,t,s)=>{s.d(t,{j:()=>n});var i=s(83047),r=s(79258);const n={unknown:1,inches:(0,i.oU)(1,"meters","inches"),feet:(0,i.oU)(1,"meters","feet"),"us-feet":(0,i.oU)(1,"meters","us-feet"),yards:(0,i.oU)(1,"meters","yards"),miles:(0,i.oU)(1,"meters","miles"),"nautical-miles":(0,i.oU)(1,"meters","nautical-miles"),millimeters:(0,i.oU)(1,"meters","millimeters"),centimeters:(0,i.oU)(1,"meters","centimeters"),decimeters:(0,i.oU)(1,"meters","decimeters"),meters:(0,i.oU)(1,"meters","meters"),kilometers:(0,i.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.vl)(1,"meters",r.$O.radius)}},10536:(e,t,s)=>{function i(e){const t={};for(const s in e){if("declaredClass"===s)continue;const r=e[s];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){t[s]=[];for(let e=0;e<r.length;e++)t[s][e]=i(r[e])}else"object"==typeof r?r.toJSON&&(t[s]=JSON.stringify(r)):t[s]=r}return t}s.d(t,{z:()=>i})},53655:(e,t,s)=>{s.d(t,{SH:()=>C,ae:()=>b,cn:()=>m});var i=s(49186),r=s(51624),n=s(92722),o=s(69418);const a=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],l=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],u=["upperLeft","lowerLeft"];function c(e){return e>=a.length?null:a[e]}function h(e){return e>=l.length?null:l[e]}function d(e){return e>=u.length?null:u[e]}function p(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function f(e,t,s){const i=e.asUnsafe(),r=t.createPointGeometry(s);for(;i.next();)switch(i.tag()){case 3:{const e=i.getUInt32(),s=i.pos()+e;let n=0;for(;i.pos()<s;)t.addCoordinatePoint(r,i.getSInt64(),n++);break}default:i.skip()}return r}function g(e,t,s){const i=e.asUnsafe(),r=t.createGeometry(s),n=2+(s.hasZ?1:0)+(s.hasM?1:0);for(;i.next();)switch(i.tag()){case 2:{const e=i.getUInt32(),s=i.pos()+e;let n=0;for(;i.pos()<s;)t.addLength(r,i.getUInt32(),n++);break}case 3:{const e=i.getUInt32(),s=i.pos()+e;let o=0;for(t.allocateCoordinates(r);i.pos()<s;)t.addCoordinate(r,i.getSInt64(),o),o++,o===n&&(o=0);break}default:i.skip()}return r}function _(e){const t=e.asUnsafe(),s=new n.A;let i="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),i=t.pos()+e;for(;t.pos()<i;)s.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),i=t.pos()+e;for(;t.pos()<i;)s.coords.push(t.getSInt64());break}case 1:i=o.z[t.getEnum()];break;default:t.skip()}return{queryGeometry:s,queryGeometryType:i}}function y(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function m(e){const t=e.asUnsafe(),s={type:c(0)};for(;t.next();)switch(t.tag()){case 1:s.name=t.getString();break;case 2:s.type=c(t.getEnum());break;case 3:s.alias=t.getString();break;case 4:s.sqlType=h(t.getEnum());break;case 5:default:t.skip();break;case 6:s.defaultValue=t.getString()}return s}function T(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.name=s.getString();break;case 2:t.isSystemMaintained=s.getBool();break;default:s.skip()}return t}function w(e,t,s,i){const r=t.createFeature(s);let n=0;for(;e.next();)switch(e.tag()){case 1:{const t=i[n++].name;r.attributes[t]=e.processMessage(y);break}case 2:r.geometry=e.processMessageWithArgs(g,t,s);break;case 4:r.centroid=e.processMessageWithArgs(f,t,s);break;default:e.skip()}return r}function v(e){const t=[1,1,1,1],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function F(e){const t=[0,0,0,0],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function b(e){const t={originPosition:d(0)},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.originPosition=d(s.getEnum());break;case 2:t.scale=s.processMessage(v);break;case 3:t.translate=s.processMessage(F);break;default:s.skip()}return t}function E(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.shapeAreaFieldName=s.getString();break;case 2:t.shapeLengthFieldName=s.getString();break;case 3:t.units=s.getString();break;default:s.skip()}return t}function S(e,t){const s=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:s.wkid=e.getUInt32();break;case 5:s.wkt=e.getString();break;case 2:s.latestWkid=e.getUInt32();break;case 3:s.vcsWkid=e.getUInt32();break;case 4:s.latestVcsWkid=e.getUInt32();break;default:e.skip()}return s}function I(e,t){const s=t.createFeatureResult(),i=e.asUnsafe();s.geometryType=p(t,0);let r=!1;for(;i.next();)switch(i.tag()){case 1:s.objectIdFieldName=i.getString();break;case 3:s.globalIdFieldName=i.getString();break;case 4:s.geohashFieldName=i.getString();break;case 5:s.geometryProperties=i.processMessage(E);break;case 7:s.geometryType=p(t,i.getEnum());break;case 8:s.spatialReference=i.processMessageWithArgs(S,t);break;case 10:s.hasZ=i.getBool();break;case 11:s.hasM=i.getBool();break;case 12:s.transform=i.processMessage(b);break;case 9:s.exceededTransferLimit=i.getBool();break;case 13:t.addField(s,i.processMessage(m));break;case 15:r||(t.prepareFeatures(s),r=!0),t.addFeature(s,i.processMessageWithArgs(w,t,s,s.fields));break;case 2:s.uniqueIdField=i.processMessage(T);break;default:i.skip()}return t.finishFeatureResult(s),s}function x(e,t){const s={};let i=null;for(;e.next();)switch(e.tag()){case 4:i=e.processMessageWithArgs(_);break;case 1:s.featureResult=e.processMessageWithArgs(I,t);break;default:e.skip()}return null!=i&&s.featureResult&&t.addQueryGeometry(s,i),s}function C(e,t){try{const s=2,i=new r.A(new Uint8Array(e),new DataView(e)),n={};for(;i.next();)i.tag()===s?n.queryResult=i.processMessageWithArgs(x,t):i.skip();return n}catch(e){throw new i.A("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},69418:(e,t,s)=>{s.d(t,{S:()=>u,z:()=>l});var i=s(83047),r=s(21325),n=s(43334),o=s(58512),a=s(92722);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class u{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new o.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,r.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,i.G9)(this._options.sourceSpatialReference)/(0,i.G9)(e.spatialReference);if(1!==t)for(const s of e.features){if(!(0,n.N3)(s))continue;const e=s.geometry.coords;for(let s=2;s<e.length;s+=3)e[s]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new n.Om(null,{},null,0)}createSpatialReference(){return{wkid:0}}createGeometry(){return new a.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new a.A}}},66208:(e,t,s)=>{s.d(t,{m:()=>r});var i=s(53655);function r(e,t){const s=(0,i.SH)(e,t),r=s.queryResult.featureResult,n=s.queryResult.queryGeometry,o=s.queryResult.queryGeometryType;if(r&&r.features&&r.features.length&&r.objectIdFieldName){const e=r.objectIdFieldName;for(const t of r.features)t.attributes&&(t.objectId=t.attributes[e])}return r&&(r.queryGeometry=n,r.queryGeometryType=o),r}},80893:(e,t,s)=>{s.d(t,{IJ:()=>f,Jf:()=>m,Pk:()=>_,eW:()=>p,gW:()=>y,kS:()=>g});var i=s(78888),r=s(84952),n=s(65864),o=s(17136),a=s(21325),l=s(10536),u=s(66208),c=s(58501);const h="Layer does not support extent calculation.";function d(e,t){const s=e.geometry,i=e.toJSON();delete i.compactGeometryEnabled,delete i.defaultSpatialReferenceEnabled;const r=i;let o,l,u;if(null!=s&&(l=s.spatialReference,u=(0,a.YX)(l),r.geometryType=(0,n.$B)(s),r.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const s=e.toJSON();return delete s.spatialReference,JSON.stringify(s)}(s,e.compactGeometryEnabled),r.inSR=u),i.groupByFieldsForStatistics&&(r.groupByFieldsForStatistics=i.groupByFieldsForStatistics.join(",")),i.objectIds&&(r.objectIds=i.objectIds.join(",")),i.orderByFields&&(r.orderByFields=i.orderByFields.join(",")),!i.outFields||!i.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete r.outFields:i.outFields.includes("*")?r.outFields="*":r.outFields=i.outFields.join(","),i.outSR?(r.outSR=(0,a.YX)(i.outSR),o=e.outSpatialReference):s&&(i.returnGeometry||i.returnCentroid)&&(r.outSR=r.inSR,o=l),i.returnGeometry&&delete i.returnGeometry,i.outStatistics&&(r.outStatistics=JSON.stringify(i.outStatistics)),i.fullText&&(r.fullText=JSON.stringify(i.fullText)),i.pixelSize&&(r.pixelSize=JSON.stringify(i.pixelSize)),i.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=l&&null!=e.quantizationParameters?.extent&&l.equals(e.quantizationParameters.extent.spatialReference)&&delete i.quantizationParameters.extent.spatialReference,r.quantizationParameters=JSON.stringify(i.quantizationParameters)),i.parameterValues&&(r.parameterValues=JSON.stringify(i.parameterValues)),i.rangeValues&&(r.rangeValues=JSON.stringify(i.rangeValues)),i.dynamicDataSource&&(r.layer=JSON.stringify({source:i.dynamicDataSource}),delete i.dynamicDataSource),i.timeExtent){const e=i.timeExtent,{start:t,end:s}=e;null==t&&null==s||(r.time=t===s?t:`${t??"null"},${s??"null"}`),delete i.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=l&&null!=o&&l.equals(o)&&(r.defaultSR=r.inSR,delete r.inSR,delete r.outSR),r}async function p(e,t,s,i){const r=null!=t.timeExtent&&t.timeExtent.isEmpty?{data:{features:[]}}:await T(e,t,"json",i);return(0,c.q)(t,s,r.data),r}async function f(e,t,s,i){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:s.createFeatureResult()};const r=await g(e,t,i),n=r;return n.data=(0,u.m)(r.data,s),n}function g(e,t,s){return T(e,t,"pbf",s)}function _(e,t,s){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):T(e,t,"json",s,{returnIdsOnly:!0})}function y(e,t,s){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):T(e,t,"json",s,{returnIdsOnly:!0,returnCountOnly:!0})}async function m(e,t,s){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:{count:0,extent:null}};const i=await T(e,t,"json",s,{returnExtentOnly:!0,returnCountOnly:!0}),r=i.data;if(r.hasOwnProperty("extent"))return i;if(r.features)throw new Error(h);if(r.hasOwnProperty("count"))throw new Error(h);return i}async function T(e,t,s,n={},a={}){const u="string"==typeof e?(0,r.An)(e):e,c=t.geometry?[t.geometry]:[],h=await(0,o.el)(c,null,{signal:n.signal}),p=h?.[0];null!=p&&((t=t.clone()).geometry=p);const f=(0,l.z)({...u.query,f:s,...a,...d(t,a)});return(0,i.A)((0,r.fj)(u.path,(g=a,null==t.formatOf3DObjects||g.returnCountOnly||g.returnExtentOnly||g.returnIdsOnly?"query":"query3d")),{...n,responseType:"pbf"===s?"array-buffer":"json",query:{...f,...n.query}});var g}},58501:(e,t,s)=>{s.d(t,{q:()=>r});var i=s(62815);function r(e,t,s){if(!s?.features||!s.hasZ)return;const r=(0,i.N)(s.geometryType,t,e.outSpatialReference);if(null!=r)for(const e of s.features)r(e.geometry)}},88625:(e,t,s)=>{s.d(t,{A:()=>w});var i,r=s(90237),n=s(66552),o=s(25482),a=s(97768),l=s(10107),u=(s(44208),s(53966),s(87811),s(36005)),c=s(40608),h=s(43937),d=s(30524);let p=i=class extends o.A{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,d.Dx)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,r._)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"expression",void 0),(0,r._)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=i=(0,r._)([(0,c.$)("esri.symbols.support.FeatureExpressionInfo")],p);const f=p;var g,_=s(16271);const y=(0,n.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),m=new n.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let T=g=class extends o.A{constructor(e){super(e),this.featureExpressionInfo=void 0,this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,s,i){t[s]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new g({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,r._)([(0,l.MZ)({type:f,json:{write:!0}})],T.prototype,"featureExpressionInfo",void 0),(0,r._)([(0,u.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],T.prototype,"readFeatureExpressionInfo",null),(0,r._)([(0,h.K)("featureExpressionInfo",{featureExpressionInfo:{type:f},"featureExpression.value":{type:[0]}})],T.prototype,"writeFeatureExpressionInfo",null),(0,r._)([(0,l.MZ)({type:y.apiValues,nonNullable:!0,json:{type:y.jsonValues,read:y.read,write:{writer:y.write,isRequired:!0}}})],T.prototype,"mode",null),(0,r._)([(0,l.MZ)({type:Number,json:{write:!0}})],T.prototype,"offset",void 0),(0,r._)([(0,l.MZ)({type:_.KQ,json:{type:String,read:m.read,write:m.write}})],T.prototype,"unit",null),T=g=(0,r._)([(0,c.$)("esri.symbols.support.ElevationInfo")],T);const w=T},16271:(e,t,s)=>{s.d(t,{Ao:()=>n,KQ:()=>o});var i=s(4576),r=s(31756);function n(e){return 1/(r.j[e]||1)}const o=function(){const e=Object.keys(r.j);return(0,i.TF)(e,"decimal-degrees"),e.sort(),e}()},12543:(e,t,s)=>{s.r(t),s.d(t,{default:()=>ve});var i=s(90237),r=(s(59456),s(65529)),n=s(74887),o=s(36708),a=s(10107),l=(s(44208),s(53966)),u=(s(87811),s(40608)),c=s(79897),h=s(16930),d=s(58376),p=s(83221),f=s(19730),g=s(87045),_=s(61956),y=s(88625),m=s(66344),T=s(91869),w=s(83047),v=s(16271);function F(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s}=t;return new E(e,s)}return new b}class b{async alignCandidates(e,t,s){return e}notifyElevationSourceChange(){}}class E{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new m.q(1024),this._cacheVersion=0}async alignCandidates(e,t,s){const i=this._elevationInfo;return null==i||"absolute-height"!==i.mode||i.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,s):(function(e,t,s){const{offset:i,unit:r}=s;if(null==i)return;const n=(0,w.G9)(t),o=i*((0,v.Ao)(r??"meters")/n);for(const t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o;continue;case"vertex":t.target.z+=o;continue}}(e,t,i),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,t,s){const i=new Map;for(const t of e)(0,T.tE)(i,t.objectId,x).push(t);const[r,o,a]=this._prepareQuery(i,t),l=await this._alignPointsInFeatures(r,s);if((0,n.Te)(s),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,s);this._applyCacheAndResponse(r,l,o);const{drapedObjectIds:u,failedObjectIds:c}=l,h=[];for(const t of e){const{objectId:e}=t;u.has(e)&&"edge"===t.type&&(t.draped=!0),c.has(e)||h.push(t)}return h}_prepareQuery(e,t){const s=[],i=[];for(const[t,r]of e){const e=[];for(const s of r)this._addToQueriesOrCachedResult(t,s.target,e,i),"edge"===s.type&&(this._addToQueriesOrCachedResult(t,s.start,e,i),this._addToQueriesOrCachedResult(t,s.end,e,i));0!==e.length&&s.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:s},i,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,i){const r=I(e,t),n=this._alignmentsCache.get(r);null==n?s.push(t):i.push(new S(t,n))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:i},r){for(const e of r)e.apply();let n=0;const o=this._alignmentsCache;for(const{objectId:r,points:a}of e.pointsInFeatures){if(i.has(r)){n+=a.length;continue}const e=!s.has(r);for(const s of a){const i=I(r,s),a=t[n++];s.z=a,e&&o.put(i,a,1)}}}}class S{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function I(e,{x:t,y:s,z:i,spatialReference:r}){return`${e}-${t}-${s}-${i??0}}-wkid:${r?.wkid}`}function x(){return[]}class C{filter(e,t){return t}notifyElevationSourceChange(){}}class O{filter(e,t){const{point:s,distance:i}=e,{z:r}=s;if(null==r)return t;if(0===t.length)return t;const n=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(i),o=this._updateCandidatesTo3D(t,s,n).filter(A);return o.sort(U),o}_updateCandidatesTo3D(e,t,s){for(const i of e)switch(i.type){case"edge":M(i,t,s);continue;case"vertex":k(i,t,s);continue}return e}}function A(e){return e.distance<=1}function R(e=!1){return e?new O:new C}function M(e,t,{x:s,y:i,z:r}){const{start:n,end:o,target:a}=e;e.draped||function(e,t,s,i){const r=i.x-s.x,n=i.y-s.y,o=i.z-s.z,a=r*r+n*n+o*o,l=(t.x-s.x)*r+(t.y-s.y)*n+o*(t.z-s.z),u=Math.min(1,Math.max(0,l/a)),c=s.x+r*u,h=s.y+n*u,d=s.z+o*u;e.x=c,e.y=h,e.z=d}(a,t,n,o);const l=(t.x-a.x)/s,u=(t.y-a.y)/i,c=(t.z-a.z)/r;e.distance=Math.sqrt(l*l+u*u+c*c)}function k(e,t,{x:s,y:i,z:r}){const{target:n}=e,o=(t.x-n.x)/s,a=(t.y-n.y)/i,l=(t.z-n.z)/r,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function U(e,t){return e.distance-t.distance}var P=s(4718),z=s(799);function D(e=!1,t){return e?new N(t):new q}class q{async fetch(){return[]}notifySymbologyChange(){}}class N{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new m.q(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const s=[],i=[],r=this._candidatesCache;for(const t of e){const e=H(t),n=r.get(e);if(n)for(const e of n)i.push((0,P.o8)(e));else s.push(t),r.put(e,[],1)}if(0===s.length)return i;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(s,t);if((0,n.Te)(t),o!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:c}=a;for(let e=0;e<c;++e){const t=a[e],i=H(s[l[e]]),n=r.get(i);n.push(t),r.put(i,n,n.length),u.push((0,P.o8)(t))}return i.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function H(e){switch(e.type){case"vertex":{const{objectId:t,target:s}=e,i=`${t}-vertex-${s.x}-${s.y}-${s.z??0}`;return(0,z.Wm)(i).toString()}case"edge":{const{objectId:t,start:s,end:i}=e,r=`${t}-edge-${s.x}-${s.y}-${s.z??0}-to-${i.x}-${i.y}-${i.z??0}`;return(0,z.Wm)(r).toString()}default:return""}}var j,V=s(69622),G=s(4576),Z=s(60999),B=s(3483),L=s(13069),W=s(5443),$=s(19419),J=s(90708),Q=s(60694),Y=s(69418),K=s(80893);class X{constructor(e,t){this.data=e,this.resolution=t,this.state={type:j.CREATED},this.alive=!0}process(e){switch(this.state.type){case j.CREATED:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case j.FETCH_COUNT:break;case j.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case j.FETCH_FEATURES:break;case j.FETCHED_FEATURES:this.state=this._goToDone(this.state,e);case j.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case j.CREATED:case j.FETCH_COUNT:return 0;case j.FETCHED_COUNT:return this.state.featureCount;case j.FETCH_FEATURES:return this.state.previous.featureCount;case j.FETCHED_FEATURES:return this.state.features.length;case j.DONE:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case j.CREATED:return"created";case j.FETCH_COUNT:return"fetch-count";case j.FETCHED_COUNT:return"fetched-count";case j.FETCH_FEATURES:return"fetch-features";case j.FETCHED_FEATURES:return"fetched-features";case j.DONE:return"done"}}_gotoFetchCount(e,t){return{type:j.FETCH_COUNT,previous:e,task:(0,Z.UT)((async e=>{const s=await(0,Z.DZ)(t.fetchCount(this,e));this.state.type===j.FETCH_COUNT&&(this.state=function(e,t){return{type:j.FETCHED_COUNT,featureCount:t,previous:e}}(this.state,s.ok?s.value:1/0))}))}}_gotoFetchFeatures(e,t){return{type:j.FETCH_FEATURES,previous:e,task:(0,Z.UT)((async s=>{const i=await(0,Z.DZ)(t.fetchFeatures(this,e.featureCount,s));this.state.type===j.FETCH_FEATURES&&(this.state=function(e,t){return{type:j.FETCHED_FEATURES,previous:e,features:t}}(this.state,i.ok?i.value:[]))}))}}_goToDone(e,t){return t.finish(this,e.features),{type:j.DONE,previous:e}}reset(){const e=this.state;switch(this.state={type:j.CREATED},e.type){case j.CREATED:case j.FETCHED_COUNT:case j.FETCHED_FEATURES:case j.DONE:break;case j.FETCH_COUNT:case j.FETCH_FEATURES:e.task.abort()}}intersects(e){return null==e||!this.data.extent||((0,$.VY)(e,ee),(0,$.HY)(this.data.extent,ee))}}!function(e){e[e.CREATED=0]="CREATED",e[e.FETCH_COUNT=1]="FETCH_COUNT",e[e.FETCHED_COUNT=2]="FETCHED_COUNT",e[e.FETCH_FEATURES=3]="FETCH_FEATURES",e[e.FETCHED_FEATURES=4]="FETCHED_FEATURES",e[e.DONE=5]="DONE"}(j||(j={}));const ee=(0,$.vt)();let te=class extends V.A{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),s=(0,B.KC)(e,this._mandatoryOutFields);(0,B.aI)(s,t)||(this._set("outFields",s),(0,B.Yy)(s,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new c.U}initialize(){this._initializeFetchExtent(),this._updatingHandles.add((()=>this._configuration),(()=>this.refresh())),this._updatingHandles.add((()=>this.tilesOfInterest),((e,t)=>{(0,G.aI)(e,t,(({id:e},{id:t})=>e===t))||this._process()}),o.OH),this.addHandles((0,o.z7)((()=>!this.suspended),(()=>this._process())))}destroy(){this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(const e of this._pendingTiles.values())e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t)))},s=(0,Z.UT)((async e=>{try{await this.store.processEdits(t,((e,t)=>this._queryFeaturesById(e,t)),e),this._processPendingTiles()}catch(e){(0,n.QP)(e),l.A.getLogger(this).warn("Failed to apply edits",e)}}));this.addHandles(s),await this._updatingHandles.addPromise(s.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,Q.Wo)(this.url))return;const e=(0,Z.UT)((async e=>{try{const t=await(0,K.Jf)(this.url,new _.A({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=W.A.fromJSON(t.data?.extent)}catch(e){(0,n.QP)(e),l.A.getLogger(this).warn("Failed to fetch data extent",e)}}));this._updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:s}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const s=this.tilesOfInterest[t],i=this.store.process(s,((e,t)=>this._verifyTileComplexity(e,t)),this.outFields);null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this._updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<re}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const s=this.tileSize*t;return e*(ne/(s*s))<oe}_ensureFetchAllCounts(e){let t=!0;for(const s of this._pendingTiles.values())s.state.type<j.FETCHED_COUNT&&this._updatingHandles.addPromise(s.process(e)),s.state.type<=j.FETCH_COUNT&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new X(e,t);return this._pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:ie,signal:t})}async _fetchFeatures(e,t,s){let i=0;const r=[];let n=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,i,o),{features:u,exceededTransferLimit:c}=await this._queryFeatures(a,s);l&&(i+=a.num),n+=u.length;for(const e of u)r.push(e);if(o=t-n,!l||!c||o<=0)return r}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let i=null;const r=e?(0,L.AG)(e):e;if(this.store.featureStore.forEach((e=>{r===(0,L.AG)(e.attributes[t])&&(i=e.objectId??e.attributes[s])})),null==i)throw new Error(`Expected to find a feature with globalId ${e}`);return i}_queryFeaturesById(e,t){const s=this._createFeaturesQuery();return s.objectIds=e,this._queryFeatures(s,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,K.IJ)(this.url,e,new Y.S({sourceSpatialReference:s}),{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,J.eY)(i)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,K.eW)(this.url,e,s,{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,J.q3)(i,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),s=null!=e?.data?this.store.getAttributesForTile(e?.data?.id):null,i=(0,B.KC)((0,B.iv)(this.outFields,s??new Set),this._mandatoryOutFields);return t.outFields=Array.from(i),t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new _.A({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?(0,$.w1)(e.data.extent,this.tileInfo.spatialReference):void 0}),s=this._configuration.filter;return null!=s&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:i,supportsCacheHint:r,tileMaxRecordCount:n,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=i?_.A.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&n?n:o||se);return e.start=t,i?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/u)),e.num=Math.min(s,e.maxRecordCountFactor*u)):e.num=Math.min(s,u),!0}};(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"url",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"objectIdField",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"globalIdField",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"capabilities",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"spatialReference",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"store",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],te.prototype,"_minimumVerticesPerFeature",null),(0,i._)([(0,a.MZ)()],te.prototype,"_mandatoryOutFields",null),(0,i._)([(0,a.MZ)()],te.prototype,"outFields",null),(0,i._)([(0,a.MZ)()],te.prototype,"suspended",void 0),(0,i._)([(0,a.MZ)()],te.prototype,"_historicMoment",void 0),(0,i._)([(0,a.MZ)()],te.prototype,"filter",null),(0,i._)([(0,a.MZ)()],te.prototype,"customParameters",null),(0,i._)([(0,a.MZ)({readOnly:!0})],te.prototype,"_configuration",null),(0,i._)([(0,a.MZ)()],te.prototype,"tileInfo",null),(0,i._)([(0,a.MZ)()],te.prototype,"tileSize",null),(0,i._)([(0,a.MZ)()],te.prototype,"tilesOfInterest",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],te.prototype,"updating",null),(0,i._)([(0,a.MZ)({readOnly:!0})],te.prototype,"availability",void 0),(0,i._)([(0,a.MZ)()],te.prototype,"hasZ",null),te=(0,i._)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],te);const se=2e3,ie=6e5,re=1e6,ne=25,oe=1;var ae=s(71903),le=s(69397),ue=s(6518),ce=s(72802);class he{constructor(){this._store=new Map,this._byteSize=0}set(e,t){this.delete(e),this._store.set(e,t),this._byteSize+=t.byteSize}delete(e){const t=this._store.get(e);return!!this._store.delete(e)&&(null!=t&&(this._byteSize-=t.byteSize),!0)}get(e){return this._used(e),this._store.get(e)}has(e){return this._used(e),this._store.has(e)}clear(){this._store.clear()}applyByteSizeLimit(e,t){for(const[s,i]of this._store){if(this._byteSize<=e)break;this.delete(s),t(i)}}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}_used(e){const t=this._store.get(e);t&&(this._store.delete(e),this._store.set(e,t))}}let de=class extends V.A{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*ae.u.MEGABYTES,this._tileBounds=new ue.F,this._tiles=new he,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,$.vt)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const s=this.featureStore.upsertMany(t),i=s.map((e=>new Set(Object.keys(e.attributes)))).reduce(((e,t)=>(0,B.E$)(e,t)),new Set(Object.keys(s[0]?.attributes??[])));this._addTileStorage(e,new Set(s.map((e=>e.objectId))),function(e){return e.reduce(((e,t)=>e+function(e){return 32+function(e){if(null==e)return 0;const t=(0,le.rq)(e.lengths,4);return 32+(0,le.rq)(e.coords,8)+t}(e.geometry)+(0,le.lM)(e.attributes)}(t)),0)}(s),i),this._tiles.applyByteSizeLimit(this.maximumByteSize,(e=>this._removeTileStorage(e)))}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s,i){const r=e.id;this._tiles.set(r,new pe(e,t,s,i)),this._tileBounds.set(r,e.extent),this._tileFeatureCounts.set(r,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)this._unreferenceFeature(s)===me.REMOVED&&t.push(s);this.featureStore.removeManyById(t);const s=e.data.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){if(!e.length)return;const i=(await t(e,s)).features,{hasZ:r,hasM:n}=this.featureStore;for(const e of i){const t=(0,J.jQ)(this._tmpBoundingRect,e.geometry,r,n);null!=t&&this._tileBounds.forEachInBounds(t,(t=>{const s=this._tiles.get(t);this.featureStore.add(e);const i=e.objectId;s.objectIds.has(i)||(s.objectIds.add(i),this._referenceFeature(i),this._tileFeatureCounts.set(s.data.id,s.objectIds.size))}))}}process(e,t=()=>!0,s){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,$.HY)((0,$.VY)(this.extent,this._tmpBoundingRect),e.extent))return new ge(e);const i=this.getAttributesForTile(e.id);if((0,B.Yy)(s,i))return new ge(e);const r=this._createTileTree(e,this.tileInfo);return this._simplify(r,t,null,0,1),this._collectMissingTiles(e,r,this.tileInfo,s)}get debugInfo(){return Array.from(this._tiles.values()).map((({data:e})=>({data:e,featureCount:this._tileFeatureCounts.get(e.id)||0})))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){const r=this._tileFeatureCounts.get(e.id);if(null!=r)return r;const n=await(0,K.gW)(t,s,i);return this._tileFeatureCounts.set(e.id,n.data.count),n.data.count}_createTileTree(e,t){const s=new fe(e.level,e.row,e.col);return t.updateTileInfo(s,g.A.ExtrapolateOptions.POWER_OF_TWO),this._tileBounds.forEachInBounds(e.extent,(i=>{const r=this._tiles.get(i)?.data;r&&function(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,r=s?t:e,n=1<<r.level-i.level;return Math.floor(r.row/n)===i.row&&Math.floor(r.col/n)===i.col}(e,r)&&this._populateChildren(s,r,t,this._tileFeatureCounts.get(r.id)||0)})),s}_populateChildren(e,t,s,i){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const n=t.row>>r,o=t.col>>r,a=e.row<<1,l=o-(e.col<<1)+(n-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,s,i);else{const r=new fe(e.level+1,n,o);s.updateTileInfo(r,g.A.ExtrapolateOptions.POWER_OF_TWO),e.children[l]=r,this._populateChildren(r,t,s,i)}}_simplify(e,t,s,i,r){const n=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),null!=s&&(s.children[i]=null),n);const o=r/2,a=o*o;let l=0;for(let s=0;s<e.children.length;s++){const i=e.children[s];l+=null!=i?this._simplify(i,t,e,s,o):a}return 0===l?this._mergeChildren(e):1-l/n<ye&&(this._purge(e),null!=s&&(s.children[i]=null),l=n),l}_mergeChildren(e){const t=new Set;let s,i=0;this._forEachLeaf(e,(e=>{const r=this._tiles.get(e.id);if(r){s=s?(0,B.E$)(s,r.attributeKeys):new Set(r.attributeKeys),i+=r.byteSize;for(const e of r.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}})),this._addTileStorage(e,t,i,s??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s,i){const r=new _e(s,e,this.extent);return this._collectMissingTilesRecurse(t,r,1,i),r.info}_collectMissingTilesRecurse(e,t,s,i){const r=this.getAttributesForTile(e.id),n=r&&!(0,B.Yy)(i,r);if(n&&t.addMissing(e.level,e.row,e.col,s),e.isLeaf)return;if(!e.hasChildren)return void(n||t.addMissing(e.level,e.row,e.col,s));const o=s/2;for(let s=0;s<e.children.length;s++){const r=e.children[s];null==r?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),o):this._collectMissingTilesRecurse(r,t,o,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?me.ADDED:me.UNCHANGED}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),me.REMOVED):(t>0&&this._refCounts.set(e,t),me.UNCHANGED)}get test(){}};(0,i._)([(0,a.MZ)({constructOnly:!0})],de.prototype,"featureStore",void 0),(0,i._)([(0,a.MZ)()],de.prototype,"tileInfo",void 0),(0,i._)([(0,a.MZ)()],de.prototype,"extent",void 0),(0,i._)([(0,a.MZ)()],de.prototype,"maximumByteSize",void 0),de=(0,i._)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],de);class pe{constructor(e,t,s,i){this.data=e,this.objectIds=t,this.byteSize=s,this.attributeKeys=i}}class fe{constructor(e,t,s){this.level=e,this.row=t,this.col=s,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class ge{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,$.Wc)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class _e{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new ge(t),null!=s&&(this._extent=(0,$.VY)(s))}addMissing(e,t,s,i){const r=new ce.U(null,e,t,s);this._tileInfo.updateTileInfo(r,g.A.ExtrapolateOptions.POWER_OF_TWO),null==r.extent||null!=this._extent&&!(0,$.HY)(this._extent,r.extent)||(this.info.missingTiles.push({data:r,resolution:i}),this.info.coveredArea-=(0,$.Wc)(r.extent))}}const ye=.18751;var me;!function(e){e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.UNCHANGED=2]="UNCHANGED"}(me||(me={}));var Te=s(65864);let we=class extends r.A.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,n.Tw)(),this._elevationAligner=F(),this._elevationFilter=R(),this._symbologyCandidatesFetcher=D(),this._updatingHandles=new c.U,this._alignPointsInFeatures=async(e,t)=>{const s={query:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return(0,n.Te)(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return(0,n.Te)(t),i}}get updating(){return this._isInitializing||this._updatingHandles.updating||this._featureFetcher.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fieldsIndex:r}=e.serviceInfo,{hasZ:n}=e,a=h.A.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new p.A({...e.serviceInfo,hasZ:n,hasM:!1}),this._queryEngine=new f.do({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:r,hasZ:n,hasM:!1,objectIdField:s,timeInfo:i}),this._featureFetcher=new te({store:new de({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:h.A.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const l="3d"===e.configuration.viewType;return this._elevationAligner=F(l,{elevationInfo:null!=e.elevationInfo?y.A.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=R(l),this.addHandles([(0,o.wB)((()=>this._featureFetcher.availability),(e=>this.emit("notify-availability",{availability:e})),o.OH),(0,o.wB)((()=>this.updating),(()=>this._notifyUpdating()))]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),Fe}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.suspended=e,Fe}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.outFields=new Set(e??[]),Fe}async fetchCandidates(e,t){await this._whenSetup.promise,(0,n.Te)(t);const s=function(e){if(!e.filter)return{...e,query:{where:"1=1"}};const{distance:t,units:s,spatialRel:i,where:r,timeExtent:n,objectIds:o}=e.filter,a={geometry:e.filter.geometry?(0,Te.rS)(e.filter.geometry):void 0,distance:t,units:s,spatialRel:i,timeExtent:n,objectIds:o,where:r??"1=1"};return{...e,query:a}}(e),i=t?.signal,r=await(0,d.J)(this._queryEngine,s,i);(0,n.Te)(i);const o=await this._elevationAligner.alignCandidates(r.candidates,h.A.fromJSON(e.point.spatialReference)??h.A.WGS84,i);(0,n.Te)(i);const a=await this._symbologyCandidatesFetcher.fetch(o,i);(0,n.Te)(i);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(s,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=null!=e.tileInfo?g.A.fromJSON(e.tileInfo):null,Fe}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.refresh(),Fe}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await(0,o.C_)((()=>!this.updating),t),(0,n.Te)(t),Fe}async getDebugInfo(e,t){return(0,n.Te)(t),{result:this._featureFetcher.debugInfo}}async handleEdits(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await this._updatingHandles.addPromise(this._featureFetcher.handleEdits(e)),(0,n.Te)(t),Fe}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),Fe}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),Fe}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),Fe}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=D(e,this._getSymbologyCandidates),Fe}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?_.A.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,i._)([(0,a.MZ)({readOnly:!0})],we.prototype,"updating",null),(0,i._)([(0,a.MZ)()],we.prototype,"_isInitializing",void 0),we=(0,i._)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],we);const ve=we,Fe={result:{}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[284,7136],{92071:(e,t,r)=>{r.d(t,{P:()=>g,L:()=>w});var i=r(90237),o=r(69622),s=r(76953),n=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[a.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,n.o8)(e),a.Gr.DEFAULTS)}));for(let r=a.Gr.SERVICE;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach(((i,o)=>{e&&e.has(o)||t.set(o,(0,n.o8)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=a.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=a.Gr.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),o=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),o!==i}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var u=r(45917),p=r(88620),c=r(40608);const d=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,p.oY)(this),r=t.store,i=new l;t.store=i,(0,s.k)(t,r,i)}read(e,t){(0,u.L)(this,e,t)}getAtOrigin(e,t){const r=y(this),i=(0,a.aB)(t);if("string"==typeof e)return r.get(e,i);const o={};return e.forEach((e=>{o[e]=r.get(e,i)})),o}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return y(this).originOf(e)}revert(e,t){const r=y(this),i=(0,a.aB)(t),o=(0,p.oY)(this);let s;s="string"==typeof e?"*"===e?r.keys(i):[e]:e,s.forEach((e=>{o.invalidate(e),r.revert(e,i),o.commit(e)}))}};return t=(0,i._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function y(e){return(0,p.oY)(e).store}let m=class extends(d(o.A)){};m=(0,i._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],m);var h=r(16649),f=r(49422);const v=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return b(this).delete(e,(0,a.aB)(t))}write(e,t){return(0,f.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,p.oY)(this).setAtOrigin(e,t,(0,a.aB)(r))}removeOrigin(e){const t=b(this),r=(0,a.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),a.Gr.USER)}updateOrigin(e,t){const r=b(this),i=(0,a.aB)(t),o=(0,h.Jt)(this,e);for(let t=i+1;t<a.AU;++t)r.delete(e,t);r.set(e,o,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function b(e){return(0,p.oY)(e).store}const g=e=>{let t=class extends(v(d(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],t),t};let w=class extends(g(o.A)){};w=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],w)},46130:(e,t,r)=>{r.d(t,{v:()=>o});var i=r(76553);function o(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,i.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},76553:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>i})},17136:(e,t,r)=>{r.d(t,{O7:()=>S,el:()=>_});var i=r(92602),o=r(49186),s=r(53966),n=r(39829),a=r(82799),l=r(80754),u=r(21325),p=r(28735),c=(r(59456),r(78888)),d=r(65864),y=r(2272),m=r(84952),h=r(92300);const f=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function v(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function g(e,t,r){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof n.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw f().error(e),new o.A(e)}const r=(0,l.r8)(e),i=[];for(const e of r){const r=[];i.push(r),r.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const o=e[i][0],s=e[i][1],n=e[i+1][0],a=e[i+1][1],l=Math.sqrt((n-o)*(n-o)+(a-s)*(a-s)),u=(a-s)/l,p=(n-o)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,n=p*i+o,a=u*i+s;r.push([n,a])}const e=(l+Math.floor(c-1)*t)/2,i=p*e+o,n=u*e+s;r.push([i,n])}r.push([n,a])}}return function(e){return"polygon"===e.type}(e)?new n.A({rings:i,spatialReference:e.spatialReference}):new a.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return r&&(e=(0,l.kS)(e,r)),e}function w(e,t,r){if(Array.isArray(e)){const i=e[0];if(i>t){const r=(0,l.kd)(i,t);e[0]=i+r*(-2*t)}else if(i<r){const t=(0,l.kd)(i,r);e[0]=i+t*(-2*r)}}else{const i=e.x;if(i>t){const r=(0,l.kd)(i,t);e=e.clone().offset(r*(-2*t),0)}else if(i<r){const t=(0,l.kd)(i,r);e=e.clone().offset(t*(-2*r),0)}}return e}function T(e,t){let r=-1;for(let i=0;i<t.cutIndexes.length;i++){const o=t.cutIndexes[i],s=t.geometries[i],n=(0,l.r8)(s);for(let e=0;e<n.length;e++){const t=n[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const i=t[e][0];r=i>r?i:r}r=Number(r.toFixed(9));const i=-360*(0,l.kd)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(i,0))}return!0}}))}if(o===r){if(v(e))for(const t of(0,l.r8)(s))e[o]=e[o].addRing(t);else if(b(e))for(const t of(0,l.r8)(s))e[o]=e[o].addPath(t)}else r=o,e[o]=s}return e}async function _(e,t,r){if(!Array.isArray(e))return _([e],t);t&&"string"!=typeof t&&f().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let s,v,b,S,M,A,O,N,Z=0;const I=[],C=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,v=(0,u.Vp)(s),b=s.isWebMercator,A=b?102100:4326,S=l.j7[A].maxX,M=l.j7[A].minX,O=l.j7[A].plus180Line,N=l.j7[A].minus180Line),v)if("mesh"===t.type)C.push(t);else if("point"===t.type)C.push(w(t.clone(),S,M));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>w(e,S,M))),C.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,v);C.push(e.rings?new n.A(e):e)}else if(t.extent){const e=t.extent,r=(0,l.kd)(e.xmin,M)*(2*S);let i=0===r?t.clone():(0,l.kS)(t.clone(),r);e.offset(r,0);let{xmin:o,xmax:s}=e;o=Number(o.toFixed(9)),s=Number(s.toFixed(9)),e.intersects(O)&&s!==S?(Z=s>Z?s:Z,i=g(i,b),I.push(i),C.push("cut")):e.intersects(N)&&o!==M?(Z=s*(2*S)>Z?s*(2*S):Z,i=g(i,b,360),I.push(i),C.push("cut")):C.push(i)}else C.push(t.clone());else C.push(t);else C.push(t);let D=(0,l.kd)(Z,S),j=-90;const B=D,F=new a.A;for(;D>0;){const e=360*D-180;F.addPath([[e,j],[e,-1*j]]),j*=-1,D--}if(I.length>0&&B>0){const t=T(I,await async function(e,t,r,i){const o=(0,y.Dl)(e),s=t[0].spatialReference,n={...i,responseType:"json",query:{...o.query,f:"json",sr:(0,u.YX)(s),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,c.A)(o.path+"/cut",n),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=s,t}))}}(o,I,F,r)),i=[],s=[];for(let r=0;r<C.length;r++){const o=C[r];if("cut"!==o)s.push(o);else{const o=t.shift(),n=e[r];null!=n&&"polygon"===n.type&&n.rings&&n.rings.length>1&&o.rings.length>=n.rings.length?(i.push(o),s.push("simplify")):s.push(b?(0,p.Gh)(o):o)}}if(!i.length)return s;const n=await async function(e,t,r){const i="string"==typeof e?(0,m.An)(e):e,o=t[0].spatialReference,s=(0,d.$B)(t[0]),n={...r,query:{...i.query,f:"json",sr:(0,u.YX)(o),geometries:JSON.stringify((0,h.X)(t))}},{data:a}=await(0,c.A)(i.path+"/simplify",n);return(0,h.V)(a.geometries,s,o)}(o,i,r),a=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?a.push(t):a.push(b?(0,p.Gh)(n.shift()):n.shift())}return a}const x=[];for(let e=0;e<C.length;e++){const t=C[e];if("cut"!==t)x.push(t);else{const e=I.shift();x.push(!0===b?(0,p.Gh)(e):e)}}return x}function S(e,t,r){const i=(0,u.Vp)(r);if(null==i)return e;const[o,s]=i.valid,n=2*s;let a=0,l=0;t>s?a=Math.ceil(Math.abs(t-s)/n):t<o&&(a=-Math.ceil(Math.abs(t-o)/n)),e>s?l=Math.ceil(Math.abs(e-s)/n):e<o&&(l=-Math.ceil(Math.abs(e-o)/n));let p=e+(a-l)*n;const c=p-t;return c>s?p-=n:c<o&&(p+=n),p}},80754:(e,t,r)=>{r.d(t,{j7:()=>n,kS:()=>l,kd:()=>a,r8:()=>u});var i=r(82799),o=r(16930),s=r(65864);const n={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,s.Bi)(e)?e.rings:e.paths}},4146:(e,t,r)=>{r.d(t,{A:()=>w});var i=r(90237),o=(r(59456),r(78888)),s=r(49186),n=r(65529),a=r(4902),l=r(92474),u=r(53966),p=r(74887),c=r(84952),d=r(10107),y=(r(44208),r(87811),r(40608)),m=r(92602),h=r(79677),f=r(5443),v=r(16930);let b=0,g=class extends(n.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,v.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=v.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0,this.createLayerView=void 0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",o=r?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,p.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,o.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.MZ)({type:String})],g.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],g.prototype,"effectiveVisible",null),(0,i._)([(0,d.MZ)({type:f.A})],g.prototype,"fullExtent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],g.prototype,"hasAttributionData",null),(0,i._)([(0,d.MZ)({type:String,clonable:!1})],g.prototype,"id",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],g.prototype,"legendEnabled",void 0),(0,i._)([(0,d.MZ)({type:["show","hide","hide-children"]})],g.prototype,"listMode",void 0),(0,i._)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],g.prototype,"opacity",void 0),(0,i._)([(0,d.MZ)({clonable:!1})],g.prototype,"parent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],g.prototype,"parsedUrl",null),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],g.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],g.prototype,"popupEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],g.prototype,"attributionVisible",void 0),(0,i._)([(0,d.MZ)({type:v.A})],g.prototype,"spatialReference",void 0),(0,i._)([(0,d.MZ)({type:String})],g.prototype,"title",void 0),(0,i._)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],g.prototype,"type",void 0),(0,i._)([(0,d.MZ)()],g.prototype,"url",void 0),(0,i._)([(0,d.MZ)({type:h.A})],g.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],g.prototype,"visible",void 0),g=(0,i._)([(0,y.$)("esri.layers.Layer")],g);const w=g},80284:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Lt});var i=r(90237),o=r(92602),s=r(59456),n=r(52106),a=r(13874),l=(r(86162),r(52464),r(65345),r(42980),r(20917),r(92438),r(96576),r(93618),r(65494)),u=r(53966),p=r(5503),c=r(49186),d=r(92071),y=r(93637),m=r(74887),h=r(36708),f=r(83047),v=r(84952),b=r(10107),g=(r(44208),r(87811),r(36005)),w=r(40608),T=r(43937),_=r(46130),S=r(5443),M=r(57251),A=r(21325),O=r(4146),N=r(63074),Z=r(16131),I=r(8303),C=r(25036),D=r(60694),j=r(61147),B=r(25482),F=r(53930);let x=class extends B.A{constructor(e){super(e),this.break=new F.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new F.A({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new F.A({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new F.A({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new F.A({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new F.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,i._)([(0,b.MZ)({types:j.wC})],x.prototype,"break",void 0),(0,i._)([(0,b.MZ)({types:j.wC})],x.prototype,"first",void 0),(0,i._)([(0,b.MZ)({types:j.wC})],x.prototype,"unlocated",void 0),(0,i._)([(0,b.MZ)({types:j.wC})],x.prototype,"last",void 0),(0,i._)([(0,b.MZ)({types:j.wC})],x.prototype,"middle",void 0),(0,i._)([(0,b.MZ)({types:j.wC})],x.prototype,"waypoint",void 0),x=(0,i._)([(0,w.$)("esri.layers.support.RouteStopSymbols")],x);const P=x;var E=r(31593),L=r(94985);let J=class extends B.A{constructor(e){super(e),this.directionLines=new E.A({color:[0,122,194],width:6}),this.directionPoints=new F.A({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new F.A({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new L.A({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new E.A({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new E.A({width:8,color:[20,89,127]}),this.stops=new P}};(0,i._)([(0,b.MZ)({types:j.Y7})],J.prototype,"directionLines",void 0),(0,i._)([(0,b.MZ)({types:j.wC})],J.prototype,"directionPoints",void 0),(0,i._)([(0,b.MZ)({types:j.wC})],J.prototype,"pointBarriers",void 0),(0,i._)([(0,b.MZ)({types:j.Ac})],J.prototype,"polygonBarriers",void 0),(0,i._)([(0,b.MZ)({types:j.Y7})],J.prototype,"polylineBarriers",void 0),(0,i._)([(0,b.MZ)({types:j.Y7})],J.prototype,"routeInfo",void 0),(0,i._)([(0,b.MZ)({type:P})],J.prototype,"stops",void 0),J=(0,i._)([(0,w.$)("esri.layers.support.RouteSymbols")],J);const R=J;var U=r(20655),k=r(80812),$=r(10407),W=r(78888),V=r(2272),G=r(93223),q=r(2073);let z=class extends B.A{constructor(e){super(e),this.dataType=null,this.name=null,this.parameterNames=null,this.restrictionUsageParameterName=null,this.timeNeutralAttributeName=null,this.trafficSupport=null,this.units=null,this.usageType=null}};(0,i._)([(0,b.MZ)({type:String})],z.prototype,"dataType",void 0),(0,i._)([(0,G.e)(q.et,{ignoreUnknown:!1})],z.prototype,"name",void 0),(0,i._)([(0,b.MZ)({type:[String]})],z.prototype,"parameterNames",void 0),(0,i._)([(0,b.MZ)({type:String})],z.prototype,"restrictionUsageParameterName",void 0),(0,i._)([(0,G.e)(q.Mm,{ignoreUnknown:!1})],z.prototype,"timeNeutralAttributeName",void 0),(0,i._)([(0,b.MZ)({type:String})],z.prototype,"trafficSupport",void 0),(0,i._)([(0,G.e)(q.dn)],z.prototype,"units",void 0),(0,i._)([(0,G.e)(q.WU)],z.prototype,"usageType",void 0),z=(0,i._)([(0,w.$)("esri.rest.support.NetworkAttribute")],z);const K=z;let H=class extends B.A{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,i._)([(0,b.MZ)({type:Number})],H.prototype,"buildTime",void 0),(0,i._)([(0,b.MZ)({type:String})],H.prototype,"name",void 0),(0,i._)([(0,b.MZ)({type:[K]})],H.prototype,"networkAttributes",void 0),(0,i._)([(0,b.MZ)()],H.prototype,"networkSources",void 0),(0,i._)([(0,b.MZ)({type:String})],H.prototype,"state",void 0),H=(0,i._)([(0,w.$)("esri.rest.support.NetworkDataset")],H);const Y=H;var X=r(69540);let Q=class extends(X.A.ClonableMixin(B.A)){constructor(e){super(e),this.attributeParameterValues=null,this.description=null,this.distanceAttributeName=null,this.id=null,this.impedanceAttributeName=null,this.name=null,this.restrictionAttributeNames=null,this.simplificationTolerance=null,this.simplificationToleranceUnits=null,this.timeAttributeName=null,this.type=null,this.useHierarchy=null,this.uturnAtJunctions=null}readId(e,t){return t.id??t.itemId??null}readRestrictionAttributes(e,t){const{restrictionAttributeNames:r}=t;return null==r?null:r.map((e=>q.OC.fromJSON(e)))}writeRestrictionAttributes(e,t,r){null!=e&&(t[r]=e.map((e=>q.OC.toJSON(e))))}};(0,i._)([(0,b.MZ)({type:[Object],json:{write:!0}})],Q.prototype,"attributeParameterValues",void 0),(0,i._)([(0,b.MZ)({type:String,json:{write:!0}})],Q.prototype,"description",void 0),(0,i._)([(0,G.e)(q.dd,{ignoreUnknown:!1})],Q.prototype,"distanceAttributeName",void 0),(0,i._)([(0,b.MZ)({type:String,json:{write:!0}})],Q.prototype,"id",void 0),(0,i._)([(0,g.w)("id",["id","itemId"])],Q.prototype,"readId",null),(0,i._)([(0,G.e)(q.et,{ignoreUnknown:!1})],Q.prototype,"impedanceAttributeName",void 0),(0,i._)([(0,b.MZ)({type:String,json:{write:!0}})],Q.prototype,"name",void 0),(0,i._)([(0,b.MZ)({type:[String],json:{write:!0}})],Q.prototype,"restrictionAttributeNames",void 0),(0,i._)([(0,g.w)("restrictionAttributeNames")],Q.prototype,"readRestrictionAttributes",null),(0,i._)([(0,T.K)("restrictionAttributeNames")],Q.prototype,"writeRestrictionAttributes",null),(0,i._)([(0,b.MZ)({type:Number,json:{write:{allowNull:!0}}})],Q.prototype,"simplificationTolerance",void 0),(0,i._)([(0,G.e)(q.hY)],Q.prototype,"simplificationToleranceUnits",void 0),(0,i._)([(0,G.e)(q.Mm,{ignoreUnknown:!1})],Q.prototype,"timeAttributeName",void 0),(0,i._)([(0,G.e)(q.ow)],Q.prototype,"type",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"useHierarchy",void 0),(0,i._)([(0,G.e)(q.hE)],Q.prototype,"uturnAtJunctions",void 0),Q=(0,i._)([(0,w.$)("esri.rest.support.TravelMode")],Q);const ee=Q;let te=class extends B.A{constructor(e){super(e),this.accumulateAttributeNames=null,this.attributeParameterValues=null,this.currentVersion=null,this.defaultTravelMode=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsSupportedLanguages=null,this.directionsTimeAttribute=null,this.hasZ=null,this.impedance=null,this.networkDataset=null,this.supportedTravelModes=null}readAccumulateAttributes(e){return null==e?null:e.map((e=>q.et.fromJSON(e)))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>q.et.toJSON(e))))}get capabilities(){return{supportsNow:(this.currentVersion??10)>=10.81}}readDefaultTravelMode(e,t){const r=t.supportedTravelModes?.find((({id:e})=>e===t.defaultTravelMode))??t.supportedTravelModes?.find((({itemId:e})=>e===t.defaultTravelMode));return r?ee.fromJSON(r):null}};(0,i._)([(0,b.MZ)()],te.prototype,"accumulateAttributeNames",void 0),(0,i._)([(0,g.w)("accumulateAttributeNames")],te.prototype,"readAccumulateAttributes",null),(0,i._)([(0,T.K)("accumulateAttributeNames")],te.prototype,"writeAccumulateAttributes",null),(0,i._)([(0,b.MZ)()],te.prototype,"attributeParameterValues",void 0),(0,i._)([(0,b.MZ)()],te.prototype,"capabilities",null),(0,i._)([(0,b.MZ)()],te.prototype,"currentVersion",void 0),(0,i._)([(0,b.MZ)()],te.prototype,"defaultTravelMode",void 0),(0,i._)([(0,g.w)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],te.prototype,"readDefaultTravelMode",null),(0,i._)([(0,b.MZ)()],te.prototype,"directionsLanguage",void 0),(0,i._)([(0,G.e)(q.Z7)],te.prototype,"directionsLengthUnits",void 0),(0,i._)([(0,b.MZ)()],te.prototype,"directionsSupportedLanguages",void 0),(0,i._)([(0,G.e)(q.Mm,{ignoreUnknown:!1})],te.prototype,"directionsTimeAttribute",void 0),(0,i._)([(0,b.MZ)()],te.prototype,"hasZ",void 0),(0,i._)([(0,G.e)(q.et,{ignoreUnknown:!1})],te.prototype,"impedance",void 0),(0,i._)([(0,b.MZ)({type:Y})],te.prototype,"networkDataset",void 0),(0,i._)([(0,b.MZ)({type:[ee]})],te.prototype,"supportedTravelModes",void 0),te=(0,i._)([(0,w.$)("esri.rest.support.NetworkServiceDescription")],te);const re=te;function ie(e,t,r,i){i[r]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}async function oe(e,t,r){if(!e)throw new c.A("network-service:missing-url","Url to Network service is missing");const i=(0,V.jV)({f:"json",token:t},r),{data:o}=await(0,W.A)(e,i),s=o.currentVersion>=10.4?async function(e,t,r){try{const i=(0,V.jV)({f:"json",token:t},r),o=(0,v.UC)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:n}}=await(0,W.A)(o,i);return{supportedTravelModes:s,defaultTravelMode:n}}catch(e){throw new c.A("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,r):async function(e,t){const r=(0,V.jV)({f:"json"},t),{data:i}=await(0,W.A)(e.replace(/\/rest\/.*$/i,"/info"),r);if(!i?.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:o}=i,s=(0,v.UC)(o)+"/sharing/rest/portals/self",{data:n}=await(0,W.A)(s,r),a=(0,y.wc)("helperServices.routingUtilities.url",n);if(!a)return{supportedTravelModes:[],defaultTravelMode:null};const l=(0,V.Dl)(o),u=/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas",p=(0,V.jV)({f:"json",serviceName:u},t),c=(0,v.UC)(a)+"/GetTravelModes/execute",d=await(0,W.A)(c,p),m=[];let h=null;if(d?.data?.results?.length){const e=d.data.results;for(const t of e)if("supportedTravelModes"===t.paramName){if(t.value?.features)for(const{attributes:e}of t.value.features)if(e){const t=JSON.parse(e.TravelMode);m.push(t)}}else"defaultTravelMode"===t.paramName&&(h=t.value)}return{supportedTravelModes:m,defaultTravelMode:h}}(e,r),{defaultTravelMode:n,supportedTravelModes:a}=await s;return o.defaultTravelMode=n,o.supportedTravelModes=a,re.fromJSON(o)}var se=r(16649),ne=r(17136);function ae(e,t){if(null==e)return null;const r={},i=new RegExp(`^${t}`,"i");for(const o of Object.keys(e))if(i.test(o)){const i=o.slice(t.length);r[q.et.fromJSON(i)]=e[o]}return r}function le(e,t,r){if(null!=e){t.attributes||(t.attributes={});for(const i in e){const o=q.et.toJSON(i);t.attributes[`${r}${o}`]=e[i]}}}function ue(e){const t={};for(const r of Object.keys(e)){const i=r;t[q.et.fromJSON(i)]=e[r]}return t}function pe(e){const t={};for(const r of Object.keys(e)){const i=r;t[q.et.toJSON(i)]=e[r]}return t}function ce(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function de(e){const t=e.toJSON(),r=t;return r.accumulateAttributeNames&&=t.accumulateAttributeNames?.join(),r.attributeParameterValues&&=JSON.stringify(t.attributeParameterValues),r.barriers&&=JSON.stringify(t.barriers),r.outSR&&=t.outSR?.wkid,r.overrides&&=JSON.stringify(t.overrides),r.polygonBarriers&&=JSON.stringify(t.polygonBarriers),r.polylineBarriers&&=JSON.stringify(t.polylineBarriers),r.restrictionAttributeNames&&=t.restrictionAttributeNames?.join(),r.stops&&=JSON.stringify(t.stops),r.travelMode&&=JSON.stringify(t.travelMode),r}var ye=r(22671),me=r(4576),he=r(66552),fe=r(37807);const ve=new he.J({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let be=class extends fe.A{constructor(e){super(e),this.type=null}};(0,i._)([(0,b.MZ)({type:String,json:{read:ve.read,write:ve.write}})],be.prototype,"type",void 0),be=(0,i._)([(0,w.$)("esri.rest.support.NAMessage")],be);const ge=be;let we=class extends B.A{constructor(e){super(e)}};(0,i._)([(0,b.MZ)({json:{read:{source:"string"}}})],we.prototype,"text",void 0),(0,i._)([(0,G.e)(q.Ec,{name:"stringType"})],we.prototype,"type",void 0),we=(0,i._)([(0,w.$)("esri.rest.support.DirectionsString")],we);const Te=we;var _e=r(86738);let Se=class extends B.A{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return ce(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return _e.A.fromJSON(t.point)}};(0,i._)([(0,b.MZ)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],Se.prototype,"arriveTime",void 0),(0,i._)([(0,b.MZ)()],Se.prototype,"arriveTimeOffset",void 0),(0,i._)([(0,g.w)("arriveTimeOffset",["arriveTimeUTC","ETA"])],Se.prototype,"readArriveTimeOffset",null),(0,i._)([(0,b.MZ)({type:_e.A})],Se.prototype,"geometry",void 0),(0,i._)([(0,g.w)("geometry",["point"])],Se.prototype,"readGeometry",null),(0,i._)([(0,b.MZ)({type:[Te]})],Se.prototype,"strings",void 0),Se=(0,i._)([(0,w.$)("esri.rest.support.DirectionsEvent")],Se);const Me=Se;var Ae=r(82799);let Oe=class extends n.A{constructor(e){super(e),this.events=null,this.geometry=null,this.strings=null}readGeometry(e,t){const r=function(e){if(null==e||""===e)return null;let t=0,r=0,i=0,o=0;const s=[];let n,a,l,u,p,c,d,y,m=0,h=0,f=0;if(p=e.match(/((\+|-)[^+\-|]+|\|)/g),p||(p=[]),0===parseInt(p[m],32)){m=2;const e=parseInt(p[m],32);m++,c=parseInt(p[m],32),m++,1&e&&(h=p.indexOf("|")+1,d=parseInt(p[h],32),h++),2&e&&(f=p.indexOf("|",h)+1,y=parseInt(p[f],32),f++)}else c=parseInt(p[m],32),m++;for(;m<p.length&&"|"!==p[m];){n=parseInt(p[m],32)+t,m++,t=n,a=parseInt(p[m],32)+r,m++,r=a;const e=[n/c,a/c];h&&(u=parseInt(p[h],32)+i,h++,i=u,e.push(u/d)),f&&(l=parseInt(p[f],32)+o,f++,o=l,e.push(l/y)),s.push(e)}return{paths:[s],hasZ:h>0,hasM:f>0}}(t.compressedGeometry);return null!=r?Ae.A.fromJSON(r):null}};(0,i._)([(0,b.MZ)({type:[Me]})],Oe.prototype,"events",void 0),(0,i._)([(0,b.MZ)({type:Ae.A})],Oe.prototype,"geometry",void 0),(0,i._)([(0,g.w)("geometry",["compressedGeometry"])],Oe.prototype,"readGeometry",null),(0,i._)([(0,b.MZ)({type:[Te]})],Oe.prototype,"strings",void 0),Oe=(0,i._)([(0,w.$)("esri.rest.support.DirectionsFeature")],Oe);const Ne=Oe;var Ze=r(16930);let Ie=class extends ye.A{constructor(e){super(e),this.extent=null,this.features=[],this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){if(!e)return[];const r=t.summary.envelope.spatialReference??t.spatialReference,i=r&&Ze.A.fromJSON(r);return e.map((e=>{const t=Ne.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=i),null!=t.events)for(const e of t.events)null!=e.geometry&&(e.geometry.spatialReference=i);return t}))}get mergedGeometry(){return this.features?function(e,t){if(0===e.length)return new Ae.A({spatialReference:t});const r=[];for(const t of e)for(const e of t.paths)r.push(...e);const i=[];r.forEach(((e,t)=>{0!==t&&e[0]===r[t-1][0]&&e[1]===r[t-1][1]||i.push(e)}));const{hasM:o,hasZ:s}=e[0];return new Ae.A({hasM:o,hasZ:s,paths:[i],spatialReference:t})}(this.features.map((({geometry:e})=>e)),this.extent.spatialReference):null}get strings(){return this.features.flatMap((({strings:e})=>e)).filter(me.Ru)}};(0,i._)([(0,b.MZ)({type:S.A,json:{read:{source:"summary.envelope"}}})],Ie.prototype,"extent",void 0),(0,i._)([(0,b.MZ)({nonNullable:!0})],Ie.prototype,"features",void 0),(0,i._)([(0,g.w)("features")],Ie.prototype,"readFeatures",null),(0,i._)([(0,b.MZ)()],Ie.prototype,"geometryType",void 0),(0,i._)([(0,b.MZ)({readOnly:!0})],Ie.prototype,"mergedGeometry",null),(0,i._)([(0,b.MZ)()],Ie.prototype,"routeId",void 0),(0,i._)([(0,b.MZ)()],Ie.prototype,"routeName",void 0),(0,i._)([(0,b.MZ)({value:null,readOnly:!0})],Ie.prototype,"strings",null),(0,i._)([(0,b.MZ)({json:{read:{source:"summary.totalDriveTime"}}})],Ie.prototype,"totalDriveTime",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"summary.totalLength"}}})],Ie.prototype,"totalLength",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"summary.totalTime"}}})],Ie.prototype,"totalTime",void 0),Ie=(0,i._)([(0,w.$)("esri.rest.support.DirectionsFeatureSet")],Ie);const Ce=Ie;let De=class extends B.A{constructor(e){super(e),this.directionLines=null,this.directionPoints=null,this.directions=null,this.route=null,this.routeName=null,this.stops=null,this.traversedEdges=null,this.traversedJunctions=null,this.traversedTurns=null}};(0,i._)([(0,b.MZ)({type:ye.A,json:{write:!0}})],De.prototype,"directionLines",void 0),(0,i._)([(0,b.MZ)({type:ye.A,json:{write:!0}})],De.prototype,"directionPoints",void 0),(0,i._)([(0,b.MZ)({type:Ce,json:{write:!0}})],De.prototype,"directions",void 0),(0,i._)([(0,b.MZ)({type:n.A,json:{write:!0}})],De.prototype,"route",void 0),(0,i._)([(0,b.MZ)({type:String,json:{write:!0}})],De.prototype,"routeName",void 0),(0,i._)([(0,b.MZ)({type:[n.A],json:{write:!0}})],De.prototype,"stops",void 0),(0,i._)([(0,b.MZ)({type:ye.A,json:{write:!0}})],De.prototype,"traversedEdges",void 0),(0,i._)([(0,b.MZ)({type:ye.A,json:{write:!0}})],De.prototype,"traversedJunctions",void 0),(0,i._)([(0,b.MZ)({type:ye.A,json:{write:!0}})],De.prototype,"traversedTurns",void 0),De=(0,i._)([(0,w.$)("esri.rest.support.RouteResult")],De);const je=De;function Be(e){return e?ye.A.fromJSON(e).features.filter(me.Ru):[]}let Fe=class extends B.A{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return Be(t.barriers)}readPolylineBarriers(e){return Be(e)}readPolygonBarriers(e){return Be(e)}};(0,i._)([(0,b.MZ)({type:[ge]})],Fe.prototype,"messages",void 0),(0,i._)([(0,b.MZ)({type:[n.A]})],Fe.prototype,"pointBarriers",void 0),(0,i._)([(0,g.w)("pointBarriers",["barriers"])],Fe.prototype,"readPointBarriers",null),(0,i._)([(0,b.MZ)({type:[n.A]})],Fe.prototype,"polylineBarriers",void 0),(0,i._)([(0,g.w)("polylineBarriers")],Fe.prototype,"readPolylineBarriers",null),(0,i._)([(0,b.MZ)({type:[n.A]})],Fe.prototype,"polygonBarriers",void 0),(0,i._)([(0,g.w)("polygonBarriers")],Fe.prototype,"readPolygonBarriers",null),(0,i._)([(0,b.MZ)({type:[je]})],Fe.prototype,"routeResults",void 0),Fe=(0,i._)([(0,w.$)("esri.rest.support.RouteSolveResult")],Fe);const xe=Fe;function Pe(e){return e instanceof ye.A}async function Ee(e,t,r){const i=[],o=[],s={},n={},a=(0,V.Dl)(e),{path:l}=a;Pe(t.stops)&&ie(t.stops.features,o,"stops.features",s),Pe(t.pointBarriers)&&ie(t.pointBarriers.features,o,"pointBarriers.features",s),Pe(t.polylineBarriers)&&ie(t.polylineBarriers.features,o,"polylineBarriers.features",s),Pe(t.polygonBarriers)&&ie(t.polygonBarriers.features,o,"polygonBarriers.features",s);const p=await(0,ne.el)(o);for(const e in s){const t=s[e];i.push(e),n[e]=p.slice(t[0],t[1])}if(function(e,t){for(let r=0;r<t.length;r++){const i=e[t[r]];if(i&&i.length)for(const e of i)if(null!=e&&e.hasZ)return!0}return!1}(n,i)){let e=null;try{e=await oe(l,t.apiKey,r)}catch{}e&&!e.hasZ&&function(e,t){for(let r=0;r<t.length;r++){const i=e[t[r]];if(i&&i.length)for(const e of i)e.z=void 0}u.A.getLogger("esri.rest.networkService").warnOnce("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.")}(n,i)}for(const e in n)n[e].forEach(((r,i)=>{(0,se.Jt)(t,e)[i].geometry=r}));const c={...r,query:{...a.query,...de(t),f:"json"}},d=l.endsWith("/solve")?l:`${l}/solve`,{data:y}=await(0,W.A)(d,c);return function(e){const{barriers:t,directionLines:r,directionPoints:i,directions:o,messages:s,polygonBarriers:n,polylineBarriers:a,routes:l,stops:u,traversedEdges:p,traversedJunctions:c,traversedTurns:d}=e,y=e=>{const t=h.find((t=>t.routeName===e));if(null!=t)return t;const r={routeId:h.length+1,routeName:e};return h.push(r),r},m=e=>{const t=h.find((t=>t.routeId===e));if(null!=t)return t;const r={routeId:e,routeName:null};return h.push(r),r},h=[];l?.features.forEach(((e,t)=>{e.geometry.spatialReference=l.spatialReference??void 0;const r=e.attributes.Name,i=t+1;h.push({routeId:i,routeName:r,route:e})})),o?.forEach((e=>{const{routeName:t}=e;y(t).directions=e}));const f=u?.features.every((e=>null==e.attributes.RouteName))&&h.length>0?h[0].routeName:null;return u?.features.forEach((e=>{e.geometry&&(e.geometry.spatialReference??=u.spatialReference??void 0);const t=f??e.attributes.RouteName,r=y(t);r.stops??=[],r.stops.push(e)})),r?.features.forEach((e=>{const t=e.attributes.RouteID,i=m(t),{geometryType:o,spatialReference:s}=r;i.directionLines??={features:[],geometryType:o,spatialReference:s},i.directionLines.features.push(e)})),i?.features.forEach((e=>{const t=e.attributes.RouteID,r=m(t),{geometryType:o,spatialReference:s}=i;r.directionPoints??={features:[],geometryType:o,spatialReference:s},r.directionPoints.features.push(e)})),p?.features.forEach((e=>{const t=e.attributes.RouteID,r=m(t),{geometryType:i,spatialReference:o}=p;r.traversedEdges??={features:[],geometryType:i,spatialReference:o},r.traversedEdges.features.push(e)})),c?.features.forEach((e=>{const t=e.attributes.RouteID,r=m(t),{geometryType:i,spatialReference:o}=c;r.traversedJunctions??={features:[],geometryType:i,spatialReference:o},r.traversedJunctions.features.push(e)})),d?.features.forEach((e=>{const t=e.attributes.RouteID,r=m(t);r.traversedTurns??={features:[]},r.traversedTurns.features.push(e)})),xe.fromJSON({routeResults:h,barriers:t,polygonBarriers:n,polylineBarriers:a,messages:s})}(y)}var Le;let Je=Le=class extends(X.A.ClonableMixin(B.A)){constructor(e){super(e),this.directionLineType=null,this.directionPointId=null,this.distance=null,this.duration=null,this.fromLevel=null,this.geometry=null,this.objectId=null,this.popupTemplate=null,this.symbol=null,this.toLevel=null,this.type="direction-line"}static fromGraphic(e){return new Le({directionLineType:q.gD.fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:e.attributes.FromLevel??null,geometry:e.geometry,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,symbol:e.symbol,toLevel:e.attributes.ToLevel??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionLineType:null!=this.directionLineType?q.gD.toJSON(this.directionLineType):null,DirectionPointID:this.directionPointId,Meters:this.distance,Minutes:this.duration};return null!=this.fromLevel&&(e.FromLevel=this.fromLevel),null!=this.toLevel&&(e.ToLevel=this.toLevel),new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Je.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger"},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger"},{name:"FromLevel",alias:"From Level",type:"esriFieldTypeInteger"},{name:"Meters",alias:"Meters",type:"esriFieldTypeDouble"},{name:"Minutes",alias:"Minutes",type:"esriFieldTypeDouble"},{name:"ToLevel",alias:"To Level",type:"esriFieldTypeInteger"}],(0,i._)([(0,b.MZ)({type:q.gD.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:q.gD.read}}})],Je.prototype,"directionLineType",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.DirectionPointID"}}})],Je.prototype,"directionPointId",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.Meters"}}})],Je.prototype,"distance",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.Minutes"}}})],Je.prototype,"duration",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.FromLevel"}}})],Je.prototype,"fromLevel",void 0),(0,i._)([(0,b.MZ)({type:Ae.A})],Je.prototype,"geometry",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.ObjectID"}}})],Je.prototype,"objectId",void 0),(0,i._)([(0,b.MZ)({type:a.A})],Je.prototype,"popupTemplate",void 0),(0,i._)([(0,b.MZ)({types:j.Es})],Je.prototype,"symbol",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.ToLevel"}}})],Je.prototype,"toLevel",void 0),(0,i._)([(0,b.MZ)({readOnly:!0,json:{read:!1}})],Je.prototype,"type",void 0),Je=Le=(0,i._)([(0,w.$)("esri.rest.support.DirectionLine")],Je);const Re=Je;var Ue;let ke=Ue=class extends(X.A.ClonableMixin(B.A)){constructor(e){super(e),this.alternateName=null,this.arrivalTime=null,this.arrivalTimeOffset=null,this.azimuth=null,this.branchName=null,this.directionPointType=null,this.displayText=null,this.exitName=null,this.geometry=null,this.intersectingName=null,this.level=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sequence=null,this.shortVoiceInstruction=null,this.stopId=null,this.symbol=null,this.towardName=null,this.type="direction-point",this.voiceInstruction=null}readArrivalTime(e,t){return null!=t.attributes.ArrivalTime?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){return new Ue({alternateName:e.attributes.AlternateName??null,arrivalTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:e.attributes.ArrivalUTCOffset??null,azimuth:e.attributes.Azimuth??null,branchName:e.attributes.BranchName??null,directionPointType:q._6.fromJSON(e.attributes.DirectionPointType),displayText:e.attributes.DisplayText??null,exitName:e.attributes.ExitName??null,geometry:e.geometry,intersectingName:e.attributes.IntersectingName??null,level:e.attributes.Level??null,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:e.attributes.ShortVoiceInstruction??null,stopId:e.attributes.StopID??null,symbol:e.symbol,towardName:e.attributes.TowardName??null,voiceInstruction:e.attributes.VoiceInstruction??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionPointType:null!=this.directionPointType?q._6.toJSON(this.directionPointType):null,Sequence:this.sequence,StopID:this.stopId};return null!=this.alternateName&&(e.AlternateName=this.alternateName),null!=this.arrivalTime&&(e.ArrivalTime=this.arrivalTime.getTime()),null!=this.arrivalTimeOffset&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),null!=this.azimuth&&(e.Azimuth=this.azimuth),null!=this.branchName&&(e.BranchName=this.branchName),null!=this.displayText&&(e.DisplayText=this.displayText),null!=this.exitName&&(e.ExitName=this.exitName),null!=this.intersectingName&&(e.IntersectingName=this.intersectingName),null!=this.level&&(e.Level=this.level),null!=this.name&&(e.Name=this.name),null!=this.shortVoiceInstruction&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),null!=this.towardName&&(e.TowardName=this.towardName),null!=this.voiceInstruction&&(e.VoiceInstruction=this.voiceInstruction),new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ke.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AlternateName",alias:"Alternative Name",type:"esriFieldTypeString"},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate"},{name:"ArrivalUTCOffset",alias:"Arrival Time Offset",type:"esriFieldTypeInteger"},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble"},{name:"BranchName",alias:"Branch Name",type:"esriFieldTypeString"},{name:"DirectionPointType",alias:"Directions Point Type",type:"esriFieldTypeInteger"},{name:"DisplayText",alias:"Display Text",type:"esriFieldTypeString"},{name:"ExitName",alias:"Exit Name",type:"esriFieldTypeString"},{name:"IntersectingName",alias:"Intersecting Name",type:"esriFieldTypeString"},{name:"Level",alias:"Level",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger"},{name:"ShortVoiceInstruction",alias:"Short Voice Instruction",type:"esriFieldTypeString"},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger"},{name:"TowardName",alias:"Toward Name",type:"esriFieldTypeString"},{name:"VoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString"}],(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.AlternateName"}}})],ke.prototype,"alternateName",void 0),(0,i._)([(0,b.MZ)()],ke.prototype,"arrivalTime",void 0),(0,i._)([(0,g.w)("arrivalTime",["attributes.ArrivalTime"])],ke.prototype,"readArrivalTime",null),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],ke.prototype,"arrivalTimeOffset",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.Azimuth"}}})],ke.prototype,"azimuth",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.BranchName"}}})],ke.prototype,"branchName",void 0),(0,i._)([(0,b.MZ)({type:q._6.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:q._6.read}}})],ke.prototype,"directionPointType",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.DisplayText"}}})],ke.prototype,"displayText",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.ExitName"}}})],ke.prototype,"exitName",void 0),(0,i._)([(0,b.MZ)({type:_e.A})],ke.prototype,"geometry",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.IntersectingName"}}})],ke.prototype,"intersectingName",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.Level"}}})],ke.prototype,"level",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.Name"}}})],ke.prototype,"name",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.ObjectID"}}})],ke.prototype,"objectId",void 0),(0,i._)([(0,b.MZ)({type:a.A})],ke.prototype,"popupTemplate",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.Sequence"}}})],ke.prototype,"sequence",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.ShortVoiceInstruction"}}})],ke.prototype,"shortVoiceInstruction",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.StopID"}}})],ke.prototype,"stopId",void 0),(0,i._)([(0,b.MZ)({types:j.Es})],ke.prototype,"symbol",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.TowardName"}}})],ke.prototype,"towardName",void 0),(0,i._)([(0,b.MZ)({readOnly:!0,json:{read:!1}})],ke.prototype,"type",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.VoiceInstruction"}}})],ke.prototype,"voiceInstruction",void 0),ke=Ue=(0,i._)([(0,w.$)("esri.rest.support.DirectionPoint")],ke);const $e=ke;var We;let Ve=We=class extends(X.A.ClonableMixin(B.A)){constructor(e){super(e),this.addedCost=null,this.barrierType=null,this.costs=null,this.curbApproach=null,this.fullEdge=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sideOfEdge=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.type="point-barrier"}readCosts(e,t){return ae(t.attributes,"Attr_")}writeCosts(e,t){le(e,t,"Attr_")}static fromGraphic(e){return new We({addedCost:e.attributes.AddedCost??null,barrierType:null!=e.attributes.BarrierType?q.iM.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?ue(JSON.parse(e.attributes.Costs)):null,curbApproach:null!=e.attributes.CurbApproach?q.JJ.fromJSON(e.attributes.CurbApproach):null,fullEdge:null!=e.attributes.FullEdge?q.fe.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:null!=e.attributes.Status?q.$r.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:null!=this.barrierType?q.iM.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(pe(this.costs)):null,CurbApproach:null!=this.curbApproach?q.JJ.toJSON(this.curbApproach):null,FullEdge:null!=this.fullEdge?q.fe.toJSON(this.fullEdge):null,Name:this.name,Status:null!=this.status?q.$r.toJSON(this.status):null};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Ve.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger"},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"Status",alias:"Status",type:"esriFieldTypeInteger"}],(0,i._)([(0,b.MZ)()],Ve.prototype,"addedCost",void 0),(0,i._)([(0,b.MZ)({type:q.iM.apiValues,json:{name:"attributes.BarrierType",read:{reader:q.iM.read},write:{writer:q.iM.write}}})],Ve.prototype,"barrierType",void 0),(0,i._)([(0,b.MZ)()],Ve.prototype,"costs",void 0),(0,i._)([(0,g.w)("costs",["attributes"])],Ve.prototype,"readCosts",null),(0,i._)([(0,T.K)("costs")],Ve.prototype,"writeCosts",null),(0,i._)([(0,b.MZ)({constructOnly:!0,type:q.JJ.apiValues,json:{read:{source:"attributes.CurbApproach",reader:q.JJ.read}}})],Ve.prototype,"curbApproach",void 0),(0,i._)([(0,b.MZ)({type:q.fe.apiValues,json:{name:"attributes.FullEdge",read:{reader:q.fe.read},write:{writer:q.fe.write}}})],Ve.prototype,"fullEdge",void 0),(0,i._)([(0,b.MZ)({type:_e.A,json:{write:!0}})],Ve.prototype,"geometry",void 0),(0,i._)([(0,b.MZ)({json:{name:"attributes.Name"}})],Ve.prototype,"name",void 0),(0,i._)([(0,b.MZ)({json:{name:"attributes.ObjectID"}})],Ve.prototype,"objectId",void 0),(0,i._)([(0,b.MZ)({type:a.A})],Ve.prototype,"popupTemplate",void 0),(0,i._)([(0,b.MZ)({type:q.mt.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:q.mt.read}}})],Ve.prototype,"sideOfEdge",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.SourceID"}}})],Ve.prototype,"sourceId",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.SourceOID"}}})],Ve.prototype,"sourceOid",void 0),(0,i._)([(0,b.MZ)({type:q.$r.apiValues,json:{read:{source:"attributes.Status",reader:q.$r.read}}})],Ve.prototype,"status",void 0),(0,i._)([(0,b.MZ)({types:j.Es})],Ve.prototype,"symbol",void 0),(0,i._)([(0,b.MZ)({readOnly:!0,json:{read:!1}})],Ve.prototype,"type",void 0),Ve=We=(0,i._)([(0,w.$)("esri.rest.support.PointBarrier")],Ve);const Ge=Ve;var qe,ze=r(39829);let Ke=qe=class extends(X.A.ClonableMixin(B.A)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null,this.type="polygon-barrier"}readCosts(e,t){return ae(t.attributes,"Attr_")}writeCosts(e,t){le(e,t,"Attr_")}static fromGraphic(e){return new qe({barrierType:null!=e.attributes.BarrierType?q.iM.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?ue(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:null!=this.barrierType?q.iM.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(pe(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Ke.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble"}],(0,i._)([(0,b.MZ)({type:q.iM.apiValues,json:{name:"attributes.BarrierType",read:{reader:q.iM.read},write:{writer:q.iM.write}}})],Ke.prototype,"barrierType",void 0),(0,i._)([(0,b.MZ)()],Ke.prototype,"costs",void 0),(0,i._)([(0,g.w)("costs",["attributes"])],Ke.prototype,"readCosts",null),(0,i._)([(0,T.K)("costs")],Ke.prototype,"writeCosts",null),(0,i._)([(0,b.MZ)({type:ze.A,json:{write:!0}})],Ke.prototype,"geometry",void 0),(0,i._)([(0,b.MZ)({json:{name:"attributes.Name"}})],Ke.prototype,"name",void 0),(0,i._)([(0,b.MZ)({json:{name:"attributes.ObjectID"}})],Ke.prototype,"objectId",void 0),(0,i._)([(0,b.MZ)({type:a.A})],Ke.prototype,"popupTemplate",void 0),(0,i._)([(0,b.MZ)()],Ke.prototype,"scaleFactor",void 0),(0,i._)([(0,b.MZ)({types:j.Es})],Ke.prototype,"symbol",void 0),(0,i._)([(0,b.MZ)({readOnly:!0,json:{read:!1}})],Ke.prototype,"type",void 0),Ke=qe=(0,i._)([(0,w.$)("esri.rest.support.PolygonBarrier")],Ke);const He=Ke;var Ye;let Xe=Ye=class extends(X.A.ClonableMixin(B.A)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null,this.type="polyline-barrier"}readCosts(e,t){return ae(t.attributes,"Attr_")}static fromGraphic(e){return new Ye({barrierType:null!=e.attributes.BarrierType?q.iM.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?ue(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:null!=this.barrierType?q.iM.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(pe(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Xe.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble"}],(0,i._)([(0,b.MZ)({type:q.iM.apiValues,json:{read:{source:"attributes.BarrierType",reader:q.iM.read}}})],Xe.prototype,"barrierType",void 0),(0,i._)([(0,b.MZ)()],Xe.prototype,"costs",void 0),(0,i._)([(0,g.w)("costs",["attributes"])],Xe.prototype,"readCosts",null),(0,i._)([(0,b.MZ)({type:Ae.A,json:{write:!0}})],Xe.prototype,"geometry",void 0),(0,i._)([(0,b.MZ)({json:{name:"attributes.Name"}})],Xe.prototype,"name",void 0),(0,i._)([(0,b.MZ)({json:{name:"attributes.ObjectID"}})],Xe.prototype,"objectId",void 0),(0,i._)([(0,b.MZ)({type:a.A})],Xe.prototype,"popupTemplate",void 0),(0,i._)([(0,b.MZ)()],Xe.prototype,"scaleFactor",void 0),(0,i._)([(0,b.MZ)({types:j.Es})],Xe.prototype,"symbol",void 0),(0,i._)([(0,b.MZ)({readOnly:!0,json:{read:!1}})],Xe.prototype,"type",void 0),Xe=Ye=(0,i._)([(0,w.$)("esri.rest.support.PolylineBarrier")],Xe);const Qe=Xe;let et=class extends B.A{constructor(e){super(e),this.accumulateAttributes=null,this.directionsLanguage=null,this.findBestSequence=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.startTimeIsUTC=null,this.timeWindowsAreUTC=null,this.travelMode=null}readAccumulateAttributes(e){return null==e?null:e.map((e=>q.et.fromJSON(e)))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>q.et.toJSON(e))))}};(0,i._)([(0,b.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],et.prototype,"accumulateAttributes",void 0),(0,i._)([(0,g.w)("accumulateAttributes")],et.prototype,"readAccumulateAttributes",null),(0,i._)([(0,T.K)("accumulateAttributes")],et.prototype,"writeAccumulateAttributes",null),(0,i._)([(0,b.MZ)({type:String,json:{write:!0}})],et.prototype,"directionsLanguage",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],et.prototype,"findBestSequence",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],et.prototype,"preserveFirstStop",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],et.prototype,"preserveLastStop",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],et.prototype,"startTimeIsUTC",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],et.prototype,"timeWindowsAreUTC",void 0),(0,i._)([(0,b.MZ)({type:ee,json:{write:!0}})],et.prototype,"travelMode",void 0),et=(0,i._)([(0,w.$)("esri.rest.support.RouteSettings")],et);const tt=et;var rt;let it=rt=class extends(X.A.ClonableMixin(B.A)){constructor(e){super(e),this.analysisSettings=null,this.endTime=null,this.endTimeOffset=null,this.firstStopId=null,this.geometry=null,this.lastStopId=null,this.messages=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.startTime=null,this.startTimeOffset=null,this.stopCount=null,this.symbol=null,this.totalCosts=null,this.totalDistance=null,this.totalDuration=null,this.totalLateDuration=null,this.totalViolations=null,this.totalWait=null,this.totalWaitDuration=null,this.type="route-info",this.version="1.0.0"}readEndTime(e,t){return null!=t.attributes.EndTimeUTC?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return ce(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null!=t.attributes.StartTimeUTC?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return ce(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return ae(t.attributes,"Total_")}readTotalViolations(e,t){return ae(t.attributes,"TotalViolation_")}readTotalWait(e,t){return ae(t.attributes,"TotalWait_")}static fromGraphic(e){return new rt({analysisSettings:null!=e.attributes.AnalysisSettings?tt.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:null!=e.attributes.EndTime?new Date(e.attributes.EndTime):null,endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:null!=e.attributes.Messages?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:null!=e.attributes.StartTime?new Date(e.attributes.StartTime):null,startTimeOffset:e.attributes.StartUTCOffset??null,symbol:e.symbol,totalCosts:null!=e.attributes.TotalCosts?ue(JSON.parse(e.attributes.TotalCosts)):null,totalDistance:e.attributes.TotalMeters??null,totalDuration:e.attributes.TotalMinutes??null,totalLateDuration:e.attributes.TotalLateMinutes??null,totalWaitDuration:e.attributes.TotalWaitMinutes??null,version:e.attributes.Version})}toGraphic(){const e={ObjectID:this.objectId,AnalysisSettings:null!=this.analysisSettings?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:null!=this.endTime?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:null!=this.messages?JSON.stringify(this.messages):null,RouteName:this.name,StartTime:null!=this.startTime?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:null!=this.totalCosts?JSON.stringify(pe(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};it.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString"},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate"},{name:"EndUTCOffset",alias:"End Time Offset",type:"esriFieldTypeInteger"},{name:"Messages",alias:"Messages",type:"esriFieldTypeString"},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString"},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate"},{name:"StartUTCOffset",alias:"Start Time Offset",type:"esriFieldTypeInteger"},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString"},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble"},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble"},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble"},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble"},{name:"Version",alias:"Version",type:"esriFieldTypeString"}],(0,i._)([(0,b.MZ)()],it.prototype,"analysisSettings",void 0),(0,i._)([(0,b.MZ)()],it.prototype,"endTime",void 0),(0,i._)([(0,g.w)("endTime",["attributes.EndTimeUTC"])],it.prototype,"readEndTime",null),(0,i._)([(0,b.MZ)()],it.prototype,"endTimeOffset",void 0),(0,i._)([(0,g.w)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],it.prototype,"readEndTimeOffset",null),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.FirstStopID"}}})],it.prototype,"firstStopId",void 0),(0,i._)([(0,b.MZ)({type:Ae.A})],it.prototype,"geometry",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.LastStopID"}}})],it.prototype,"lastStopId",void 0),(0,i._)([(0,b.MZ)()],it.prototype,"messages",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.Name"}}})],it.prototype,"name",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.ObjectID"}}})],it.prototype,"objectId",void 0),(0,i._)([(0,b.MZ)({type:a.A})],it.prototype,"popupTemplate",void 0),(0,i._)([(0,b.MZ)()],it.prototype,"startTime",void 0),(0,i._)([(0,g.w)("startTime",["attributes.StartTimeUTC"])],it.prototype,"readStartTime",null),(0,i._)([(0,b.MZ)()],it.prototype,"startTimeOffset",void 0),(0,i._)([(0,g.w)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],it.prototype,"readStartTimeOffset",null),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.StopCount"}}})],it.prototype,"stopCount",void 0),(0,i._)([(0,b.MZ)({types:j.Es})],it.prototype,"symbol",void 0),(0,i._)([(0,b.MZ)()],it.prototype,"totalCosts",void 0),(0,i._)([(0,g.w)("totalCosts",["attributes"])],it.prototype,"readTotalCosts",null),(0,i._)([(0,b.MZ)()],it.prototype,"totalDistance",void 0),(0,i._)([(0,b.MZ)()],it.prototype,"totalDuration",void 0),(0,i._)([(0,b.MZ)()],it.prototype,"totalLateDuration",void 0),(0,i._)([(0,b.MZ)()],it.prototype,"totalViolations",void 0),(0,i._)([(0,g.w)("totalViolations",["attributes"])],it.prototype,"readTotalViolations",null),(0,i._)([(0,b.MZ)()],it.prototype,"totalWait",void 0),(0,i._)([(0,g.w)("totalWait",["attributes"])],it.prototype,"readTotalWait",null),(0,i._)([(0,b.MZ)()],it.prototype,"totalWaitDuration",void 0),(0,i._)([(0,b.MZ)({readOnly:!0,json:{read:!1}})],it.prototype,"type",void 0),(0,i._)([(0,b.MZ)()],it.prototype,"version",void 0),it=rt=(0,i._)([(0,w.$)("esri.rest.support.RouteInfo")],it);const ot=it;var st=r(56507);const nt={type:String,json:{read:{source:"token"},write:{target:"token"}}};var at=r(65864);let lt=class extends(X.A.ClonableMixin(B.A)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.geometry=null,this.geometryType=null,this.name=null,this.spatialRelationship=null,this.type="layer",this.where=null}};(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],lt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i._)([(0,b.MZ)({types:s.yR,json:{read:at.rS,write:!0}})],lt.prototype,"geometry",void 0),(0,i._)([(0,G.e)(q.Vj)],lt.prototype,"geometryType",void 0),(0,i._)([(0,b.MZ)({type:String,json:{name:"layerName",write:!0}})],lt.prototype,"name",void 0),(0,i._)([(0,G.e)(q.vS,{name:"spatialRel"})],lt.prototype,"spatialRelationship",void 0),(0,i._)([(0,b.MZ)({type:String,json:{write:!0}})],lt.prototype,"type",void 0),(0,i._)([(0,b.MZ)({type:String,json:{write:!0}})],lt.prototype,"where",void 0),lt=(0,i._)([(0,w.$)("esri.rest.support.DataLayer")],lt);const ut=lt;var pt;let ct=pt=class extends ye.A{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new pt({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ct.prototype,"doNotLocateOnRestrictedElements",void 0),ct=pt=(0,i._)([(0,w.$)("esri.rest.support.NetworkFeatureSet")],ct);const dt=ct;let yt=class extends(X.A.ClonableMixin(B.A)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i._)([(0,b.MZ)({type:String,json:{write:!0}})],yt.prototype,"url",void 0),yt=(0,i._)([(0,w.$)("esri.rest.support.NetworkUrl")],yt);const mt=yt;var ht;let ft=ht=class extends(X.A.ClonableMixin(B.A)){constructor(e){super(e),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsOutputType=null,this.directionsStyleName=null,this.directionsTimeAttribute=null,this.findBestSequence=null,this.geometryPrecision=null,this.geometryPrecisionM=null,this.geometryPrecisionZ=null,this.ignoreInvalidLocations=null,this.impedanceAttribute=null,this.outputGeometryPrecision=null,this.outputGeometryPrecisionUnits=null,this.outputLines="true-shape",this.outSpatialReference=null,this.overrides=null,this.pointBarriers=null,this.polygonBarriers=null,this.polylineBarriers=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.preserveObjectID=null,this.restrictionAttributes=null,this.restrictUTurns=null,this.returnBarriers=!1,this.returnDirections=!1,this.returnPolygonBarriers=!1,this.returnPolylineBarriers=!1,this.returnRoutes=!0,this.returnStops=!1,this.returnTraversedEdges=null,this.returnTraversedJunctions=null,this.returnTraversedTurns=null,this.returnZ=!0,this.startTime=null,this.startTimeIsUTC=!0,this.stops=null,this.timeWindowsAreUTC=null,this.travelMode=null,this.useHierarchy=null,this.useTimeWindows=null}static from(e){return(0,st.PZ)(ht,e)}readAccumulateAttributes(e){return null==e?null:e.map((e=>q.et.fromJSON(e)))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>q.et.toJSON(e))))}writePointBarriers(e,t,r){bt(e,t,r)}writePolygonBarrier(e,t,r){bt(e,t,r)}writePolylineBarrier(e,t,r){bt(e,t,r)}readRestrictionAttributes(e){return null==e?null:e.map((e=>q.OC.fromJSON(e)))}writeRestrictionAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>q.OC.toJSON(e))))}readStartTime(e,t){const{startTime:r}=t;return null==r?null:"now"===r?"now":new Date(r)}writeStartTime(e,t){null!=e&&(t.startTime="now"===e?"now":e.getTime())}readStops(e,t){return function(e){return function(e){return e&&"type"in e}(e)?ut.fromJSON(e):function(e){return e&&"url"in e}(e)?mt.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?dt.fromJSON(e):function(e){return e&&"features"in e}(e)?ye.A.fromJSON(e):null}(t.stops)}writeStops(e,t,r){bt(e,t,r)}};(0,i._)([(0,b.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],ft.prototype,"accumulateAttributes",void 0),(0,i._)([(0,g.w)("accumulateAttributes")],ft.prototype,"readAccumulateAttributes",null),(0,i._)([(0,T.K)("accumulateAttributes")],ft.prototype,"writeAccumulateAttributes",null),(0,i._)([(0,b.MZ)(nt)],ft.prototype,"apiKey",void 0),(0,i._)([(0,b.MZ)({json:{write:!0}})],ft.prototype,"attributeParameterValues",void 0),(0,i._)([(0,b.MZ)({type:String,json:{write:!0}})],ft.prototype,"directionsLanguage",void 0),(0,i._)([(0,G.e)(q.Z7)],ft.prototype,"directionsLengthUnits",void 0),(0,i._)([(0,G.e)(q.aJ)],ft.prototype,"directionsOutputType",void 0),(0,i._)([(0,G.e)(q.$n)],ft.prototype,"directionsStyleName",void 0),(0,i._)([(0,G.e)(q.Mm,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],ft.prototype,"directionsTimeAttribute",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"findBestSequence",void 0),(0,i._)([(0,b.MZ)({type:Number,json:{write:!0}})],ft.prototype,"geometryPrecision",void 0),(0,i._)([(0,b.MZ)({type:Number,json:{write:!0}})],ft.prototype,"geometryPrecisionM",void 0),(0,i._)([(0,b.MZ)({type:Number,json:{write:!0}})],ft.prototype,"geometryPrecisionZ",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"ignoreInvalidLocations",void 0),(0,i._)([(0,G.e)(q.et,{name:"impedanceAttributeName",ignoreUnknown:!1})],ft.prototype,"impedanceAttribute",void 0),(0,i._)([(0,b.MZ)({type:Number,json:{write:!0}})],ft.prototype,"outputGeometryPrecision",void 0),(0,i._)([(0,G.e)(q.hY)],ft.prototype,"outputGeometryPrecisionUnits",void 0),(0,i._)([(0,G.e)(q.Sr)],ft.prototype,"outputLines",void 0),(0,i._)([(0,b.MZ)({type:Ze.A,json:{name:"outSR",write:!0}})],ft.prototype,"outSpatialReference",void 0),(0,i._)([(0,b.MZ)({json:{write:!0}})],ft.prototype,"overrides",void 0),(0,i._)([(0,b.MZ)({json:{name:"barriers",write:!0}})],ft.prototype,"pointBarriers",void 0),(0,i._)([(0,T.K)("pointBarriers")],ft.prototype,"writePointBarriers",null),(0,i._)([(0,b.MZ)({json:{write:!0}})],ft.prototype,"polygonBarriers",void 0),(0,i._)([(0,T.K)("polygonBarriers")],ft.prototype,"writePolygonBarrier",null),(0,i._)([(0,b.MZ)({json:{write:!0}})],ft.prototype,"polylineBarriers",void 0),(0,i._)([(0,T.K)("polylineBarriers")],ft.prototype,"writePolylineBarrier",null),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"preserveFirstStop",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"preserveLastStop",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"preserveObjectID",void 0),(0,i._)([(0,b.MZ)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],ft.prototype,"restrictionAttributes",void 0),(0,i._)([(0,g.w)("restrictionAttributes")],ft.prototype,"readRestrictionAttributes",null),(0,i._)([(0,T.K)("restrictionAttributes")],ft.prototype,"writeRestrictionAttributes",null),(0,i._)([(0,G.e)(q.hE)],ft.prototype,"restrictUTurns",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"returnBarriers",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"returnDirections",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"returnPolygonBarriers",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"returnPolylineBarriers",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"returnRoutes",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"returnStops",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"returnTraversedEdges",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"returnTraversedJunctions",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"returnTraversedTurns",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"returnZ",void 0),(0,i._)([(0,b.MZ)({json:{write:!0}})],ft.prototype,"startTime",void 0),(0,i._)([(0,g.w)("startTime")],ft.prototype,"readStartTime",null),(0,i._)([(0,T.K)("startTime")],ft.prototype,"writeStartTime",null),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"startTimeIsUTC",void 0),(0,i._)([(0,b.MZ)({json:{write:!0}})],ft.prototype,"stops",void 0),(0,i._)([(0,g.w)("stops")],ft.prototype,"readStops",null),(0,i._)([(0,T.K)("stops")],ft.prototype,"writeStops",null),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"timeWindowsAreUTC",void 0),(0,i._)([(0,b.MZ)({type:ee,json:{write:!0}})],ft.prototype,"travelMode",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"useHierarchy",void 0),(0,i._)([(0,b.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"useTimeWindows",void 0),ft=ht=(0,i._)([(0,w.$)("esri.rest.support.RouteParameters")],ft);const vt=ft;function bt(e,t,r){null!=e&&(t[r]=p.A.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}var gt;let wt=gt=class extends(X.A.ClonableMixin(B.A)){constructor(e){super(e),this.arriveCurbApproach=null,this.arriveTime=null,this.arriveTimeOffset=null,this.bearing=null,this.bearingTol=null,this.cumulativeCosts=null,this.cumulativeDistance=null,this.cumulativeDuration=null,this.curbApproach=null,this.departCurbApproach=null,this.departTime=null,this.departTimeOffset=null,this.distanceToNetworkInMeters=null,this.geometry=null,this.lateDuration=null,this.locationType=null,this.name=null,this.navLatency=null,this.objectId=null,this.popupTemplate=null,this.posAlong=null,this.routeName=null,this.serviceCosts=null,this.serviceDistance=null,this.serviceDuration=null,this.sequence=null,this.sideOfEdge=null,this.snapX=null,this.snapY=null,this.snapZ=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.timeWindowEnd=null,this.timeWindowEndOffset=null,this.timeWindowStart=null,this.timeWindowStartOffset=null,this.type="stop",this.violations=null,this.waitDuration=null,this.wait=null}readArriveTimeOffset(e,t){return ce(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return ae(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return ce(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return ae(t.attributes,"Attr_")}writeServiceCosts(e,t){le(e,t,"Attr_")}writeTimeWindowEnd(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return ae(t.attributes,"Violation_")}readWait(e,t){return ae(t.attributes,"Wait_")}static fromGraphic(e){return new gt({arriveCurbApproach:null!=e.attributes.ArrivalCurbApproach?q.JJ.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:null!=e.attributes.CumulativeCosts?ue(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:null!=e.attributes.CurbApproach?q.JJ.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:null!=e.attributes.DepartureCurbApproach?q.JJ.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:null!=e.attributes.DepartureTime?new Date(e.attributes.DepartureTime):null,departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:null!=e.attributes.LocationType?q.EM.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:e.attributes.Sequence??null,serviceCosts:null!=e.attributes.ServiceCosts?ue(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:null!=e.attributes.Status?q.$r.fromJSON(e.attributes.Status):null,symbol:e.symbol,timeWindowEnd:null!=e.attributes.TimeWindowEnd?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:null!=e.attributes.TimeWindowStart?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){const e={ObjectID:this.objectId,ArrivalCurbApproach:null!=this.arriveCurbApproach?q.JJ.toJSON(this.arriveCurbApproach):null,ArrivalTime:null!=this.arriveTime?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:null!=this.cumulativeCosts?JSON.stringify(pe(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:null!=this.curbApproach?q.JJ.toJSON(this.curbApproach):null,DepartureCurbApproach:null!=this.departCurbApproach?q.JJ.toJSON(this.departCurbApproach):null,DepartureTime:null!=this.departTime?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:null!=this.locationType?q.EM.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:null!=this.serviceCosts?JSON.stringify(pe(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:null!=this.status?q.$r.toJSON(this.status):null,TimeWindowEnd:null!=this.timeWindowEnd?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,TimeWindowStart:null!=this.timeWindowStart?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:this.timeWindowStartOffset??this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};wt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger"},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate"},{name:"ArrivalUTCOffset",alias:"Arrival Time",type:"esriFieldTypeInteger"},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString"},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble"},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble"},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger"},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger"},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate"},{name:"DepartureUTCOffset",alias:"Departure Time",type:"esriFieldTypeInteger"},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble"},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString"},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger"},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString"},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble"},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble"},{name:"Status",alias:"Status",type:"esriFieldTypeInteger"},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate"},{name:"TimeWindowEndUTCOffset",alias:"Time Window End Offset",type:"esriFieldTypeInteger"},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate"},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start Offset",type:"esriFieldTypeInteger"},{name:"WaitMinutes",alias:"Minutes Wait",type:"esriFieldTypeDouble"}],(0,i._)([(0,b.MZ)({type:q.JJ.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:q.JJ.read}}})],wt.prototype,"arriveCurbApproach",void 0),(0,i._)([(0,b.MZ)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],wt.prototype,"arriveTime",void 0),(0,i._)([(0,b.MZ)()],wt.prototype,"arriveTimeOffset",void 0),(0,i._)([(0,g.w)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],wt.prototype,"readArriveTimeOffset",null),(0,i._)([(0,b.MZ)({json:{name:"attributes.Bearing",read:!1,write:!0}})],wt.prototype,"bearing",void 0),(0,i._)([(0,b.MZ)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],wt.prototype,"bearingTol",void 0),(0,i._)([(0,b.MZ)()],wt.prototype,"cumulativeCosts",void 0),(0,i._)([(0,g.w)("cumulativeCosts",["attributes"])],wt.prototype,"readCumulativeCosts",null),(0,i._)([(0,b.MZ)()],wt.prototype,"cumulativeDistance",void 0),(0,i._)([(0,b.MZ)()],wt.prototype,"cumulativeDuration",void 0),(0,i._)([(0,b.MZ)({type:q.JJ.apiValues,json:{name:"attributes.CurbApproach",read:{reader:q.JJ.read},write:{writer:q.JJ.write}}})],wt.prototype,"curbApproach",void 0),(0,i._)([(0,b.MZ)({type:q.JJ.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:q.JJ.read}}})],wt.prototype,"departCurbApproach",void 0),(0,i._)([(0,b.MZ)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],wt.prototype,"departTime",void 0),(0,i._)([(0,b.MZ)()],wt.prototype,"departTimeOffset",void 0),(0,i._)([(0,g.w)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],wt.prototype,"readDepartTimeOffset",null),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],wt.prototype,"distanceToNetworkInMeters",void 0),(0,i._)([(0,b.MZ)({type:_e.A,json:{write:!0}})],wt.prototype,"geometry",void 0),(0,i._)([(0,b.MZ)()],wt.prototype,"lateDuration",void 0),(0,i._)([(0,b.MZ)({type:q.EM.apiValues,json:{name:"attributes.LocationType",read:{reader:q.EM.read},write:{writer:q.EM.write}}})],wt.prototype,"locationType",void 0),(0,i._)([(0,b.MZ)({json:{name:"attributes.Name"}})],wt.prototype,"name",void 0),(0,i._)([(0,b.MZ)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],wt.prototype,"navLatency",void 0),(0,i._)([(0,b.MZ)({json:{name:"attributes.ObjectID"}})],wt.prototype,"objectId",void 0),(0,i._)([(0,b.MZ)({type:a.A})],wt.prototype,"popupTemplate",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.PosAlong"}}})],wt.prototype,"posAlong",void 0),(0,i._)([(0,b.MZ)({json:{name:"attributes.RouteName"}})],wt.prototype,"routeName",void 0),(0,i._)([(0,b.MZ)()],wt.prototype,"serviceCosts",void 0),(0,i._)([(0,g.w)("serviceCosts",["attributes"])],wt.prototype,"readServiceCosts",null),(0,i._)([(0,T.K)("serviceCosts")],wt.prototype,"writeServiceCosts",null),(0,i._)([(0,b.MZ)()],wt.prototype,"serviceDistance",void 0),(0,i._)([(0,b.MZ)()],wt.prototype,"serviceDuration",void 0),(0,i._)([(0,b.MZ)({json:{name:"attributes.Sequence"}})],wt.prototype,"sequence",void 0),(0,i._)([(0,b.MZ)({type:q.mt.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:q.mt.read}}})],wt.prototype,"sideOfEdge",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.SnapX"}}})],wt.prototype,"snapX",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.SnapY"}}})],wt.prototype,"snapY",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.SnapZ"}}})],wt.prototype,"snapZ",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.SourceID"}}})],wt.prototype,"sourceId",void 0),(0,i._)([(0,b.MZ)({json:{read:{source:"attributes.SourceOID"}}})],wt.prototype,"sourceOid",void 0),(0,i._)([(0,b.MZ)({type:q.$r.apiValues,json:{read:{source:"attributes.Status",reader:q.$r.read}}})],wt.prototype,"status",void 0),(0,i._)([(0,b.MZ)({types:j.Es})],wt.prototype,"symbol",void 0),(0,i._)([(0,b.MZ)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],wt.prototype,"timeWindowEnd",void 0),(0,i._)([(0,T.K)("timeWindowEnd")],wt.prototype,"writeTimeWindowEnd",null),(0,i._)([(0,b.MZ)()],wt.prototype,"timeWindowEndOffset",void 0),(0,i._)([(0,b.MZ)({type:Date,json:{name:"attributes.TimeWindowStart"}})],wt.prototype,"timeWindowStart",void 0),(0,i._)([(0,T.K)("timeWindowStart")],wt.prototype,"writeTimeWindowStart",null),(0,i._)([(0,b.MZ)()],wt.prototype,"timeWindowStartOffset",void 0),(0,i._)([(0,b.MZ)({readOnly:!0,json:{read:!1}})],wt.prototype,"type",void 0),(0,i._)([(0,b.MZ)()],wt.prototype,"violations",void 0),(0,i._)([(0,g.w)("violations",["attributes"])],wt.prototype,"readViolations",null),(0,i._)([(0,b.MZ)()],wt.prototype,"waitDuration",void 0),(0,i._)([(0,b.MZ)()],wt.prototype,"wait",void 0),(0,i._)([(0,g.w)("wait",["attributes"])],wt.prototype,"readWait",null),wt=gt=(0,i._)([(0,w.$)("esri.rest.support.Stop")],wt);const Tt=wt;var _t=r(48526);function St(e){return e.length?e:null}function Mt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Mt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Mt("esriGeometryPolyline")}}}function At(e){return"layers"in e}async function Ot(e){const t=Ze.A.WGS84;return await(0,M.initializeProjection)(e.spatialReference,t),(0,M.project)(e,t)}function Nt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Zt(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,f.oU)(e,t,"meters")}const It=p.A.ofType(Re),Ct=p.A.ofType($e),Dt=p.A.ofType(Ge),jt=p.A.ofType(He),Bt=p.A.ofType(Qe),Ft=p.A.ofType(Tt),xt="esri.layers.RouteLayer",Pt=()=>u.A.getLogger(xt);let Et=class extends((0,N.dM)((0,C.j)((0,Z.q)((0,I.A)((0,d.P)(O.A)))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new R,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new Dt,this.polygonBarriers=new jt,this.polylineBarriers=new Bt,this.routeInfo=null,this.spatialReference=Ze.A.WGS84,this.stops=new Ft,this.type="route";const t=()=>{this._setStopSymbol(this.stops)};this.addHandles((0,h.on)((()=>this.stops),"change",t,{sync:!0,onListenerAdd:t}))}writeFeatureCollectionWebmap(e,t,r,i){const o=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter((e=>!!e)),s=o.map(((e,t)=>t)),n="web-map"===i.origin?"featureCollection.layers":"layers";(0,y.sM)(n,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>Re.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>$e.fromGraphic(e)))}get fullExtent(){const e=new S.A({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:Ze.A.WGS84});if(null!=this.routeInfo?.geometry)return this.routeInfo.geometry.extent??e;if(null==this.stops)return e;const t=this.stops.filter((e=>null!=e.geometry));if(t.length<2)return e;const{spatialReference:r}=t.at(0).geometry;if(null==r)return e;const i=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new _t.A({points:i,spatialReference:r}).extent}readMaxScale(e,t){const r=At(t)?t.layers:t.featureCollection?.layers,i=r?.find((e=>null!=e.layerDefinition.maxScale));return i?.layerDefinition.maxScale??0}readMinScale(e,t){const r=At(t)?t.layers:t.featureCollection?.layers,i=r?.find((e=>null!=e.layerDefinition.minScale));return i?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>Ge.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>He.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>Qe.fromGraphic(e)))}readRouteInfo(e,t){return this._getNetworkFeatures(t,"RouteInfo",(e=>ot.fromGraphic(e))).at(0)??null}readSpatialReference(e,t){const r=At(t)?t.layers:t.featureCollection?.layers;if(!r?.length)return Ze.A.WGS84;const{layerDefinition:i,featureSet:o}=r[0],s=o.features[0],n=s?.geometry?.spatialReference??o.spatialReference??i.spatialReference??i.extent.spatialReference??A.KK;return Ze.A.fromJSON(n)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>Tt.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return this.routeInfo?.name??"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return o.A.routeServiceUrl}set url(e){null!=e?this._set("url",(0,D.Jf)(e,Pt())):this._set("url",o.A.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){this.removeResult(),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}removeResult(){null!=this.directionLines&&(this.directionLines.removeAll(),this._set("directionLines",null)),null!=this.directionPoints&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),null!=this.routeInfo&&this._set("routeInfo",null)}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new c.A("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new c.A("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new c.A("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(null==this.routeInfo)throw new c.A("routelayer:route-unsolved","save() requires a solved route");const{portal:r}=t;await r.signIn(),r.user||await t.reload();const{itemUrl:i,itemControl:o}=t;if("admin"!==o&&"update"!==o)throw new c.A("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");const s={messages:[],origin:"portal-item",portal:r,url:i?(0,v.An)(i):void 0,writtenProperties:[]},n=this.write(void 0,s);return t.extent=await Ot(e),t.title=this.title,await t.update({data:n}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new c.A("routelayer:route-unsolved","saveAs() requires a solved route");const r=k.default.from(e).clone();r.extent??=await Ot(this.fullExtent),r.id=null,r.portal??=U.A.getDefault(),r.title??=this.title,r.type="Feature Collection",r.typeKeywords=["Data","Feature Collection",$.mm.MULTI_LAYER,"Route Layer"];const{portal:i}=r,o={messages:[],origin:"portal-item",portal:i,url:null,writtenProperties:[]};await i.signIn();const s=t?.folder,n=this.write(void 0,o);return await i.user.addItem({item:r,folder:s,data:n}),this.portalItem=r,(0,_.v)(o),o.portalItem=r,r}async solve(e,t){const r=e?.stops??this.stops,i=e?.pointBarriers??St(this.pointBarriers),o=e?.polylineBarriers??St(this.polylineBarriers),s=e?.polygonBarriers??St(this.polygonBarriers);if(null==r)throw new c.A("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(r)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(r))&&r.features.length<2||p.A.isCollection(r)&&r.length<2)throw new c.A("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(p.A.isCollection(r))for(const e of r)e.routeName=null;const n=e?.apiKey,a=this.url,l=await this._getServiceDescription(a,n,t),u=e?.travelMode??l.defaultTravelMode,d=e?.accumulateAttributes??[];null!=u&&(d.push(u.distanceAttributeName),u.timeAttributeName&&d.push(u.timeAttributeName));const y={accumulateAttributes:d,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:i,polylineBarriers:o,polygonBarriers:s,preserveFirstStop:!0,preserveLastStop:!0,returnBarriers:!!i,returnDirections:!0,returnPolygonBarriers:!!s,returnPolylineBarriers:!!o,returnRoutes:!0,returnStops:!0,stops:r},h=vt.from(e??{});let f;h.set(y);try{f=await Ee(a,h,t)}catch(e){throw(0,m.zf)(e)?e:new c.A("routelayer:failed-route-request","the routing request failed",{error:e})}const v=this._toRouteLayerSolution(f);return this._isOverridden("title")||(this.title=v.routeInfo.name??"Route"),function(e,t,r){const i=t.networkDataset?.networkAttributes,o=i?.filter((({usageType:e})=>"cost"===e))??[],s=r.travelMode??t.defaultTravelMode;if(null==s)return void Pt().warn("route-layer:missing-travel-mode","The routing service must have a default travel mode or one must be specified in the route parameter.");const{timeAttributeName:n,distanceAttributeName:a}=s,l=o.find((({name:e})=>e===n)),u=o.find((({name:e})=>e===a)),p=r.travelMode?.impedanceAttributeName??r.impedanceAttribute??t.impedance,d=l?.units,y=u?.units;if(!d||!y)throw new c.A("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const m=r.directionsLanguage??t.directionsLanguage,h=r.accumulateAttributes??t.accumulateAttributeNames??[],f=new Set(o.filter((({name:e})=>e===n||e===a||e===p||null!=e&&h.includes(e))).map((({name:e})=>e))),v=e=>{for(const t in e)f.has(t)||delete e[t]};for(const t of e.pointBarriers)null!=t.costs&&(t.addedCost=t.costs[p]??0,v(t.costs));for(const t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[p]??1,v(t.costs));for(const t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[p]??1,v(t.costs));const{routeInfo:b}=e,{findBestSequence:g,preserveFirstStop:w,preserveLastStop:T,startTimeIsUTC:_,timeWindowsAreUTC:S}=r;b.analysisSettings=new tt({accumulateAttributes:h,directionsLanguage:m,findBestSequence:g,preserveFirstStop:w,preserveLastStop:T,startTimeIsUTC:_,timeWindowsAreUTC:S,travelMode:s}),b.totalDuration=Nt(b.totalCosts?.[n]??0,d),b.totalDistance=Zt(b.totalCosts?.[a]??0,y),b.totalLateDuration=Nt(b.totalViolations?.[n]??0,d),b.totalWaitDuration=Nt(b.totalWait?.[n]??0,d),null!=b.totalCosts&&v(b.totalCosts),null!=b.totalViolations&&v(b.totalViolations),null!=b.totalWait&&v(b.totalWait);for(const t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=Nt(t.serviceCosts[n]??0,d),t.serviceDistance=Zt(t.serviceCosts[a]??0,y),v(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=Nt(t.cumulativeCosts[n]??0,d),t.cumulativeDistance=Zt(t.cumulativeCosts[a]??0,y),v(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=Nt(t.violations[n]??0,d),v(t.violations)),null!=t.wait&&(t.waitDuration=Nt(t.wait[n]??0,d),v(t.wait))}(v,l,h),v}update(e){const{stops:t,directionLines:r,directionPoints:i,pointBarriers:o,polylineBarriers:s,polygonBarriers:n,routeInfo:a}=e;this.set({stops:t,pointBarriers:o,polylineBarriers:s,polygonBarriers:n}),this._set("directionLines",r),this._set("directionPoints",i),this._set("routeInfo",a),null!=a.geometry&&(this.spatialReference=a.geometry.spatialReference)}_getNetworkFeatures(e,t,r,i){const o=At(e)?e.layers:e.featureCollection?.layers,s=o?.find((e=>e.layerDefinition.name===t));if(null==s)return new p.A;const{layerDefinition:u,popupInfo:c,featureSet:d}=s,y=u.drawingInfo.renderer,{features:m}=d,h=d.spatialReference??u.spatialReference??u.extent.spatialReference??A.KK,f=y&&(0,l.L)(y),v=Ze.A.fromJSON(h),b=m.map((e=>{const i=n.A.fromJSON(e);null!=i.geometry&&null!=e.geometry&&null==e.geometry.spatialReference&&(i.geometry.spatialReference=v);const o=r(i);return o.symbol??=f?.getSymbol(i)??this._getNetworkSymbol(t),o.popupTemplate??=c&&a.A.fromJSON(c),o}));return i&&b.some((({symbol:e})=>!e))&&i(b),new p.A(b)}_getNetworkSymbol(e){switch(e){case"Barriers":return this.defaultSymbols.pointBarriers;case"DirectionPoints":return this.defaultSymbols.directionPoints;case"DirectionLines":return this.defaultSymbols.directionLines;case"PolylineBarriers":return this.defaultSymbols.polylineBarriers;case"PolygonBarriers":return this.defaultSymbols.polygonBarriers;case"RouteInfo":return this.defaultSymbols.routeInfo;case"Stops":return null}}async _getServiceDescription(e,t,r){if(null!=this._cachedServiceDescription&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const i=await oe(e,t,r);return this._cachedServiceDescription={serviceDescription:i,url:e},i}_setStopSymbol(e){if(!e||0===e.length)return;if(null==this.defaultSymbols.stops)return;if(e.every((({symbol:e})=>null!=e)))return;const{first:t,last:r,middle:i,unlocated:o,waypoint:s,break:n}=this.defaultSymbols.stops;if(null==this.routeInfo||1===e.length)return void e.forEach(((o,s)=>{switch(s){case 0:o.symbol=t;break;case e.length-1:o.symbol=r;break;default:o.symbol=i}}));const a=e.map((({sequence:e})=>e)).filter((e=>null!=e)),l=Math.min(...a),u=Math.max(...a);for(const a of e)a.sequence!==l?a.sequence!==u?"ok"===a.status||"not-located-on-closest"===a.status?"waypoint"!==a.locationType?"break"!==a.locationType?a.symbol=i:a.symbol=n:a.symbol=s:a.symbol=o:a.symbol=r:a.symbol=t}_toRouteLayerSolution(e){const t=e.routeResults[0].stops?.map((e=>Tt.fromJSON(e.toJSON())));this._setStopSymbol(t);const r=new Ft(t),i=new jt(e.polygonBarriers?.map((e=>{const t=He.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),o=new Bt(e.polylineBarriers?.map((e=>{const t=Qe.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),s=new Dt(e.pointBarriers?.map((e=>{const t=Ge.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),n=e.routeResults[0].route?.toJSON(),a=ot.fromJSON(n);a.symbol=this.defaultSymbols.routeInfo;const l=new Ct(e.routeResults[0].directionPoints?.features.map((e=>{const t=$e.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new It(e.routeResults[0].directionLines?.features.map((e=>{const t=Re.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:l,pointBarriers:s,polygonBarriers:i,polylineBarriers:o,routeInfo:a,stops:r}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",Re.fields,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",$e.fields,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,r,i,o,s){if(!e?.length)return null;const n=this.spatialReference.toJSON(),{fullExtent:a,maxScale:l,minScale:u}=this;return{featureSet:{features:e.toArray().map((e=>function(e){const{attributes:t,geometry:r,popupTemplate:i,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:r,popupInfo:i,symbol:o}}(e))),geometryType:r,spatialReference:n},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:null!=t?t.toJSON():Mt(r)}},extent:a.toJSON(),fields:i,geometryType:r,hasM:!1,hasZ:!1,maxScale:l,minScale:u,name:o,objectIdField:"ObjectID",spatialReference:n,title:s,type:"Feature Layer",typeIdField:""}}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",Ge.fields,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",He.fields,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",Qe.fields,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null!=this.routeInfo?new p.A([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",ot.fields,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",Tt.fields,"Stops","Stops");if(null==e)return null;const{stops:t}=this.defaultSymbols,r=t?.first?.toJSON(),i=t?.middle?.toJSON(),o=t?.last?.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:i,uniqueValueInfos:[{value:"1",symbol:r,label:"First Stop"},{value:`${this.stops.length}`,symbol:o,label:"Last Stop"}]},e}};(0,i._)([(0,b.MZ)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],Et.prototype,"_featureCollection",void 0),(0,i._)([(0,T.K)(["web-map","portal-item"],"_featureCollection")],Et.prototype,"writeFeatureCollectionWebmap",null),(0,i._)([(0,b.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],Et.prototype,"_type",void 0),(0,i._)([(0,b.MZ)({nonNullable:!0,type:R})],Et.prototype,"defaultSymbols",void 0),(0,i._)([(0,b.MZ)({readOnly:!0})],Et.prototype,"directionLines",void 0),(0,i._)([(0,g.w)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],Et.prototype,"readDirectionLines",null),(0,i._)([(0,b.MZ)({readOnly:!0})],Et.prototype,"directionPoints",void 0),(0,i._)([(0,g.w)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],Et.prototype,"readDirectionPoints",null),(0,i._)([(0,b.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],Et.prototype,"featureCollectionType",void 0),(0,i._)([(0,b.MZ)({readOnly:!0})],Et.prototype,"fullExtent",null),(0,i._)([(0,b.MZ)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],Et.prototype,"legendEnabled",void 0),(0,i._)([(0,b.MZ)({type:["show","hide"]})],Et.prototype,"listMode",void 0),(0,i._)([(0,b.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],Et.prototype,"maxScale",void 0),(0,i._)([(0,g.w)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],Et.prototype,"readMaxScale",null),(0,i._)([(0,b.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],Et.prototype,"minScale",void 0),(0,i._)([(0,g.w)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],Et.prototype,"readMinScale",null),(0,i._)([(0,b.MZ)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],Et.prototype,"operationalLayerType",void 0),(0,i._)([(0,b.MZ)({nonNullable:!0,type:p.A.ofType(Ge)})],Et.prototype,"pointBarriers",void 0),(0,i._)([(0,g.w)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],Et.prototype,"readPointBarriers",null),(0,i._)([(0,b.MZ)({nonNullable:!0,type:p.A.ofType(He)})],Et.prototype,"polygonBarriers",void 0),(0,i._)([(0,g.w)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],Et.prototype,"readPolygonBarriers",null),(0,i._)([(0,b.MZ)({nonNullable:!0,type:p.A.ofType(Qe)})],Et.prototype,"polylineBarriers",void 0),(0,i._)([(0,g.w)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],Et.prototype,"readPolylineBarriers",null),(0,i._)([(0,b.MZ)({readOnly:!0})],Et.prototype,"routeInfo",void 0),(0,i._)([(0,g.w)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],Et.prototype,"readRouteInfo",null),(0,i._)([(0,b.MZ)({type:Ze.A})],Et.prototype,"spatialReference",void 0),(0,i._)([(0,g.w)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],Et.prototype,"readSpatialReference",null),(0,i._)([(0,b.MZ)({nonNullable:!0,type:p.A.ofType(Tt)})],Et.prototype,"stops",void 0),(0,i._)([(0,g.w)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],Et.prototype,"readStops",null),(0,i._)([(0,b.MZ)()],Et.prototype,"title",null),(0,i._)([(0,b.MZ)({readOnly:!0,json:{read:!1}})],Et.prototype,"type",void 0),(0,i._)([(0,b.MZ)()],Et.prototype,"url",null),Et=(0,i._)([(0,w.$)(xt)],Et);const Lt=Et},76369:(e,t,r)=>{r.d(t,{LF:()=>S,M9:()=>M});var i=r(49186),o=r(93637),s=r(40876),n=r(59247),a=r(27865);function l(e,t,r,i){var o=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(o,l.prototype),o.expected=t,o.found=r,o.location=i,o.name="SyntaxError",o}function u(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}function p(e){if(!e||0===e.length)return null;if("string"==typeof e){const t=c(e);return t&&0!==t.length?t:null}const t=e.map((e=>{if(!Number.isFinite(e.scale)||e.scale<=0)throw new i.A("effect:invalid-scale","scale must be finite and greater than 0",{stop:e});return{scale:e.scale,effects:c(e.value)}}));t.sort(((e,t)=>t.effects.length-e.effects.length));for(let e=0;e<t.length-1;e++){if(!(0,a.mj)(t[e].effects,t[e+1].effects))throw new i.A("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:t[e].effects,b:t[e+1].effects});(0,a.O9)(t[e].effects,t[e+1].effects)}return t.sort(((e,t)=>t.scale-e.scale)),t}function c(e){let t;if(!e)return[];try{t=function(e,t){var r,i={},o=(t=void 0!==t?t:{}).grammarSource,s={start:Ve},n=Ve,a="none",u=")",p=",",c="(",d="%",y="px",m="cm",h="mm",f="in",v="pt",b="pc",g="deg",w="rad",T="grad",_="turn",S="#",M=".",A="e",O=/^[ \t\n\r]/,N=/^[a-z\-]/,Z=/^[0-9a-fA-F]/,I=/^[+\-]/,C=/^[0-9]/,D=Ue("none"),j=Je("none",!1),B=Je(")",!1),F=Je(",",!1),x=Ue("whitespace"),P=Re([" ","\t","\n","\r"],!1,!1),E=Ue("function"),L=Je("(",!1),J=Ue("identifier"),R=Re([["a","z"],"-"],!1,!1),U=Ue("percentage"),k=Je("%",!1),$=Ue("length"),W=Je("px",!1),V=Je("cm",!1),G=Je("mm",!1),q=Je("in",!1),z=Je("pt",!1),K=Je("pc",!1),H=Ue("angle"),Y=Je("deg",!1),X=Je("rad",!1),Q=Je("grad",!1),ee=Je("turn",!1),te=Ue("number"),re=Ue("color"),ie=Je("#",!1),oe=Re([["0","9"],["a","f"],["A","F"]],!1,!1),se=Re(["+","-"],!1,!1),ne=Re([["0","9"]],!1,!1),ae=Je(".",!1),le=Je("e",!1),ue=function(){return[]},pe=function(e,t){return{type:"function",name:e,parameters:t||[]}},ce=function(e,t){return t.length>0?function(e,t){return[e].concat(function(e){return e.map((function(e){return e[3]}))}(t))}(e,t):[e]},de=function(e){return{type:"quantity",value:e.value,unit:e.unit}},ye=function(e){return{type:"color",colorType:e.type,value:e.value}},me=function(e){return e},he=function(){return Le()},fe=function(e){return{value:e,unit:"%"}},ve=function(e){return{value:e,unit:"px"}},be=function(e){return{value:e,unit:"cm"}},ge=function(e){return{value:e,unit:"mm"}},we=function(e){return{value:e,unit:"in"}},Te=function(e){return{value:e,unit:"pt"}},_e=function(e){return{value:e,unit:"pc"}},Se=function(e){return{value:e,unit:"deg"}},Me=function(e){return{value:e,unit:"rad"}},Ae=function(e){return{value:e,unit:"grad"}},Oe=function(e){return{value:e,unit:"turn"}},Ne=function(e){return{value:e,unit:null}},Ze=function(){return{type:"hex",value:Le()}},Ie=function(e){return{type:"function",value:e}},Ce=function(){return{type:"named",value:Le()}},De=function(){return parseFloat(Le())},je=0|t.peg$currPos,Be=je,Fe=[{line:1,column:1}],xe=je,Pe=t.peg$maxFailExpected||[],Ee=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in s))throw new Error("Can't start parsing from rule \""+t.startRule+'".');n=s[t.startRule]}function Le(){return e.substring(Be,je)}function Je(e,t){return{type:"literal",text:e,ignoreCase:t}}function Re(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function Ue(e){return{type:"other",description:e}}function ke(t){var r,i=Fe[t];if(i)return i;if(t>=Fe.length)r=Fe.length-1;else for(r=t;!Fe[--r];);for(i={line:(i=Fe[r]).line,column:i.column};r<t;)10===e.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return Fe[t]=i,i}function $e(e,t,r){var i=ke(e),s=ke(t);return{source:o,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:s.line,column:s.column}}}function We(e){je<xe||(je>xe&&(xe=je,Pe=[]),Pe.push(e))}function Ve(){var e;return(e=Ge())===i&&(e=function(){var e,t;if(e=[],(t=qe())!==i)for(;t!==i;)e.push(t),t=qe();else e=i;return e}()),e}function Ge(){var t,r;return Ee++,t=je,Ke(),e.substr(je,4)===a?(r=a,je+=4):(r=i,0===Ee&&We(j)),r!==i?(Ke(),Be=t,t=ue()):(je=t,t=i),Ee--,t===i&&0===Ee&&We(D),t}function qe(){var t,r,o,s;return t=je,Ke(),(r=function(){var t,r,o;return Ee++,t=je,(r=He())!==i?(40===e.charCodeAt(je)?(o=c,je++):(o=i,0===Ee&&We(L)),o!==i?(Be=t,t=me(r)):(je=t,t=i)):(je=t,t=i),Ee--,t===i&&(r=i,0===Ee&&We(E)),t}())!==i?(Ke(),(o=function(){var t,r,o,s,n,a,l,u;if(t=je,(r=ze())!==i){for(o=[],s=je,n=Ke(),44===e.charCodeAt(je)?(a=p,je++):(a=i,0===Ee&&We(F)),a===i&&(a=null),l=Ke(),(u=ze())!==i?s=n=[n,a,l,u]:(je=s,s=i);s!==i;)o.push(s),s=je,n=Ke(),44===e.charCodeAt(je)?(a=p,je++):(a=i,0===Ee&&We(F)),a===i&&(a=null),l=Ke(),(u=ze())!==i?s=n=[n,a,l,u]:(je=s,s=i);Be=t,t=ce(r,o)}else je=t,t=i;return t}())===i&&(o=null),Ke(),41===e.charCodeAt(je)?(s=u,je++):(s=i,0===Ee&&We(B)),s!==i?(Ke(),Be=t,t=pe(r,o)):(je=t,t=i)):(je=t,t=i),t}function ze(){var e,t;return e=je,(t=Ye())===i&&(t=Xe())===i&&(t=Qe())===i&&(t=function(){var e,t;return Ee++,e=je,Ke(),(t=tt())!==i?(Be=e,e=Ne(t)):(je=e,e=i),Ee--,e===i&&0===Ee&&We(te),e}()),t!==i&&(Be=e,t=de(t)),(e=t)===i&&(e=je,(t=et())!==i&&(Be=e,t=ye(t)),e=t),e}function Ke(){var t,r;for(Ee++,t=[],r=e.charAt(je),O.test(r)?je++:(r=i,0===Ee&&We(P));r!==i;)t.push(r),r=e.charAt(je),O.test(r)?je++:(r=i,0===Ee&&We(P));return Ee--,r=i,0===Ee&&We(x),t}function He(){var t,r,o;if(Ee++,t=je,r=[],o=e.charAt(je),N.test(o)?je++:(o=i,0===Ee&&We(R)),o!==i)for(;o!==i;)r.push(o),o=e.charAt(je),N.test(o)?je++:(o=i,0===Ee&&We(R));else r=i;return r!==i&&(Be=t,r=he()),Ee--,(t=r)===i&&(r=i,0===Ee&&We(J)),t}function Ye(){var t,r,o;return Ee++,t=je,Ke(),(r=tt())!==i?(37===e.charCodeAt(je)?(o=d,je++):(o=i,0===Ee&&We(k)),o!==i?(Be=t,t=fe(r)):(je=t,t=i)):(je=t,t=i),Ee--,t===i&&0===Ee&&We(U),t}function Xe(){var t,r,o;return Ee++,t=je,Ke(),(r=tt())!==i?(e.substr(je,2)===y?(o=y,je+=2):(o=i,0===Ee&&We(W)),o!==i?(Be=t,t=ve(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,Ke(),(r=tt())!==i?(e.substr(je,2)===m?(o=m,je+=2):(o=i,0===Ee&&We(V)),o!==i?(Be=t,t=be(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,Ke(),(r=tt())!==i?(e.substr(je,2)===h?(o=h,je+=2):(o=i,0===Ee&&We(G)),o!==i?(Be=t,t=ge(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,Ke(),(r=tt())!==i?(e.substr(je,2)===f?(o=f,je+=2):(o=i,0===Ee&&We(q)),o!==i?(Be=t,t=we(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,Ke(),(r=tt())!==i?(e.substr(je,2)===v?(o=v,je+=2):(o=i,0===Ee&&We(z)),o!==i?(Be=t,t=Te(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,Ke(),(r=tt())!==i?(e.substr(je,2)===b?(o=b,je+=2):(o=i,0===Ee&&We(K)),o!==i?(Be=t,t=_e(r)):(je=t,t=i)):(je=t,t=i)))))),Ee--,t===i&&0===Ee&&We($),t}function Qe(){var t,r,o;return Ee++,t=je,(r=tt())!==i?(e.substr(je,3)===g?(o=g,je+=3):(o=i,0===Ee&&We(Y)),o!==i?(Be=t,t=Se(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,(r=tt())!==i?(e.substr(je,3)===w?(o=w,je+=3):(o=i,0===Ee&&We(X)),o!==i?(Be=t,t=Me(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,(r=tt())!==i?(e.substr(je,4)===T?(o=T,je+=4):(o=i,0===Ee&&We(Q)),o!==i?(Be=t,t=Ae(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,(r=tt())!==i?(e.substr(je,4)===_?(o=_,je+=4):(o=i,0===Ee&&We(ee)),o!==i?(Be=t,t=Oe(r)):(je=t,t=i)):(je=t,t=i)))),Ee--,t===i&&(r=i,0===Ee&&We(H)),t}function et(){var t,r,o,s;if(Ee++,t=je,35===e.charCodeAt(je)?(r=S,je++):(r=i,0===Ee&&We(ie)),r!==i){if(o=[],s=e.charAt(je),Z.test(s)?je++:(s=i,0===Ee&&We(oe)),s!==i)for(;s!==i;)o.push(s),s=e.charAt(je),Z.test(s)?je++:(s=i,0===Ee&&We(oe));else o=i;o!==i?(Be=t,t=Ze()):(je=t,t=i)}else je=t,t=i;return t===i&&(t=je,(r=qe())!==i&&(Be=t,r=Ie(r)),(t=r)===i&&(t=je,(r=He())!==i&&(Be=t,r=Ce()),t=r)),Ee--,t===i&&(r=i,0===Ee&&We(re)),t}function tt(){var t,r,o,s,n,a,l,u;for(t=je,r=e.charAt(je),I.test(r)?je++:(r=i,0===Ee&&We(se)),r===i&&(r=null),o=je,s=[],n=e.charAt(je),C.test(n)?je++:(n=i,0===Ee&&We(ne));n!==i;)s.push(n),n=e.charAt(je),C.test(n)?je++:(n=i,0===Ee&&We(ne));if(46===e.charCodeAt(je)?(n=M,je++):(n=i,0===Ee&&We(ae)),n!==i){if(a=[],l=e.charAt(je),C.test(l)?je++:(l=i,0===Ee&&We(ne)),l!==i)for(;l!==i;)a.push(l),l=e.charAt(je),C.test(l)?je++:(l=i,0===Ee&&We(ne));else a=i;a!==i?o=s=[s,n,a]:(je=o,o=i)}else je=o,o=i;if(o===i)if(o=[],s=e.charAt(je),C.test(s)?je++:(s=i,0===Ee&&We(ne)),s!==i)for(;s!==i;)o.push(s),s=e.charAt(je),C.test(s)?je++:(s=i,0===Ee&&We(ne));else o=i;if(o!==i){if(s=je,101===e.charCodeAt(je)?(n=A,je++):(n=i,0===Ee&&We(le)),n!==i){if(a=e.charAt(je),I.test(a)?je++:(a=i,0===Ee&&We(se)),a===i&&(a=null),l=[],u=e.charAt(je),C.test(u)?je++:(u=i,0===Ee&&We(ne)),u!==i)for(;u!==i;)l.push(u),u=e.charAt(je),C.test(u)?je++:(u=i,0===Ee&&We(ne));else l=i;l!==i?s=n=[n,a,l]:(je=s,s=i)}else je=s,s=i;s===i&&(s=null),Be=t,t=De()}else je=t,t=i;return t}if(r=n(),t.peg$library)return{peg$result:r,peg$currPos:je,peg$FAILED:i,peg$maxFailExpected:Pe,peg$maxFailPos:xe};if(r!==i&&je===e.length)return r;throw r!==i&&je<e.length&&We({type:"end"}),function(e,t,r){return new l(l.buildMessage(e,t),e,t,r)}(Pe,xe<e.length?e.charAt(xe):null,xe<e.length?$e(xe,xe+1):$e(xe,xe))}(e)}catch(t){throw new i.A("effect:invalid-syntax","Invalid effect syntax",{value:e,error:t})}return t.map((e=>function(e){try{switch(e.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return function(e){let t=1;return d(e.parameters,1),1===e.parameters.length&&(t=v(e.parameters[0])),new n.yG(e.name,t)}(e);case"opacity":return function(e){let t=1;return d(e.parameters,1),1===e.parameters.length&&(t=v(e.parameters[0])),new n.jm(t)}(e);case"hue-rotate":return function(e){let t=0;return d(e.parameters,1),1===e.parameters.length&&(t=function(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=h[e.unit]))throw new i.A("effect:type-error",`Expected <angle>, Actual: ${y(e)}`,{term:e})}(e),e.value*h[e.unit]||0}(e.parameters[0])),new n.Nd(t)}(e);case"blur":return function(e){let t=0;return d(e.parameters,1),1===e.parameters.length&&(t=b(e.parameters[0]),m(t,e.parameters[0])),new n.Fk(t)}(e);case"drop-shadow":return function(e){const t=[];let r=null;for(const o of e.parameters)if("color"===o.type){if(t.length&&Object.freeze(t),r)throw new i.A("effect:type-error","Accepts only one color",{});r=g(o)}else{const e=b(o);if(Object.isFrozen(t))throw new i.A("effect:type-error","<length> parameters not consecutive",{lengths:t});t.push(e),3===t.length&&m(e,o)}if(t.length<2||t.length>3)throw new i.A("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${t.length}}`,{lengths:t});return new n.$b(t[0],t[1],t[2]||0,r||w("black"))}(e);case"bloom":return function(e){let t=1,r=0,i=0;return d(e.parameters,3),e.parameters[0]&&(t=v(e.parameters[0])),e.parameters[1]&&(r=b(e.parameters[1]),m(r,e.parameters[1])),e.parameters[2]&&(i=v(e.parameters[2])),new n.bv(t,r,i)}(e)}}catch(t){throw t.details.filter=e,t}throw new i.A("effect:unknown-effect",`Effect '${e.name}' is not supported`,{effect:e})}(e)))}function d(e,t){if(e.length>t)throw new i.A("effect:type-error",`Function supports up to ${t} parameters, Actual: ${e.length}`,{parameters:e})}function y(e){if("color"===e.type)return"<color>";if(e.unit){if(e.unit in f)return"<length>";if(e.unit in h)return"<angle>";if("%"===e.unit)return"<percentage>"}return"<double>"}function m(e,t){if(e<0)throw new i.A("effect:type-error",`Negative values are not allowed, Actual: ${e}`,{term:t})}(function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r})(l,Error),l.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,i=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){i=e[r].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,s=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,n=this.location.source+":"+s.line+":"+s.column;if(i){var a=this.location.end,l=u("",s.line.toString().length," "),p=i[o.line-1],c=(o.line===a.line?a.column:p.length+1)-o.column||1;t+="\n --\x3e "+n+"\n"+l+" |\n"+s.line+" | "+p+"\n"+l+" | "+u("",o.column-1," ")+u("",c,"^")}else t+="\n at "+n}return t},l.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function i(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function s(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function n(e){return r[e.type](e)}return"Expected "+function(e){var t,r,i=e.map(n);if(i.sort(),i.length>0){for(t=1,r=1;t<i.length;t++)i[t-1]!==i[t]&&(i[r]=i[t],r++);i.length=r}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."};const h={deg:1,grad:.9,rad:180/Math.PI,turn:360},f={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function v(e){!function(e){if("quantity"!==e.type||null!==e.unit&&"%"!==e.unit)throw new i.A("effect:type-error",`Expected <double> or <percentage>, Actual: ${y(e)}`,{term:e})}(e);const t=e.value;return m(t,e),"%"===e.unit?.01*t:t}function b(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=f[e.unit]))throw new i.A("effect:type-error",`Expected <length>, Actual: ${y(e)}`,{term:e})}(e),e.value*f[e.unit]||0}function g(e){switch(e.colorType){case"hex":return(0,s.qh)(e.value);case"named":return w(e.value);case"function":return function(e){if(d(e.parameters,4),T.test(e.name))return[v(e.parameters[0]),v(e.parameters[1]),v(e.parameters[2]),e.parameters[3]?v(e.parameters[3]):1];if(_.test(e.name))return(0,s.z$)(function(e){return function(e){if("quantity"!==e.type||null!==e.unit)throw new i.A("effect:type-error",`Expected <double>, Actual: ${y(e)}`,{term:e})}(e),m(e.value,e),e.value}(e.parameters[0]),v(e.parameters[1]),v(e.parameters[2]),e.parameters[3]?v(e.parameters[3]):1);throw new i.A("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}(e.value)}}function w(e){if(!(0,s.V6)(e))throw new i.A("effect:unknown-color",`color '${e}' isn't valid`,{namedColor:e});return(0,s.c4)(e)}const T=/^rgba?/i,_=/^hsla?/i;function S(e,t,r){try{return function(e){if(!e||0===e.length)return null;if(function(e){const t=e[0];return!!t&&"scale"in t}(e)){const t=[];for(const r of e)t.push({scale:r.scale,value:A(r.value)});return t}return A(e)}(e)}catch(e){r?.messages?.push(e)}return null}function M(e,t,r,i){try{const i=function(e){const t=p(e);return t?(0,a.dw)(t)?t.map((e=>e.toJSON())):t.map((({scale:e,effects:t})=>({scale:e,value:t.map((e=>e.toJSON()))}))):null}(e);(0,o.sM)(r,i,t)}catch(e){i.messages&&i.messages.push(e)}}function A(e){if(!e?.length)return"";const t=[];for(const r of e){let e=[];switch(r.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":e=[O(r,"amount")];break;case"blur":e=[O(r,"radius","pt")];break;case"hue-rotate":e=[O(r,"angle","deg")];break;case"drop-shadow":e=[O(r,"xoffset","pt"),O(r,"yoffset","pt"),O(r,"blurRadius","pt"),N(r,"color")];break;case"bloom":e=[O(r,"strength"),O(r,"radius","pt"),O(r,"threshold")]}const i=`${r.type}(${e.filter(Boolean).join(" ")})`;p(i),t.push(i)}return t.join(" ")}function O(e,t,r){if(null==e[t])throw new i.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});return r?e[t]+r:""+e[t]}function N(e,t){if(null==e[t])throw new i.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});const r=e[t];return`rgba(${r[0]||0}, ${r[1]||0}, ${r[2]||0}, ${r[3]/255||0})`}},63074:(e,t,r)=>{r.d(t,{LF:()=>u,dM:()=>p,sU:()=>a});var i=r(90237),o=r(10107),s=(r(44208),r(53966),r(87811),r(40608)),n=r(76369);const a={type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:!0},"portal-item":{read:!0,write:!0}}}},l={read:{reader:n.LF},write:{allowNull:!0,writer:n.M9}},u={json:{read:!1,write:!1,origins:{"web-map":l,"portal-item":l}}},p=e=>{let t=class extends e{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,i._)([(0,o.MZ)(a)],t.prototype,"blendMode",void 0),(0,i._)([(0,o.MZ)(u)],t.prototype,"effect",void 0),t=(0,i._)([(0,s.$)("esri.layers.mixins.BlendLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>_});var i=r(90237),o=r(92602),s=r(70333),n=r(78888),a=r(60999),l=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),y=r(10107),m=(r(44208),r(87811),r(36005)),h=r(40608),f=r(43937),v=r(83531),b=r(20655),g=r(80812),w=r(41318),T=r(10407);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new g.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!o.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!s.id?.findCredential(this.url),o=e===r.id;if(o&&r.portal.user)return this._getUserPrivileges(r,i);let n,a;if(o)n=r.portal.url;else try{n=await(0,v.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!n||!(0,d.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const l=!0,u=!1,p=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:p}};try{if(o?await r.reload():(r=new g.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,c.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,T.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,o=b.A.getDefault();if(o&&o.loaded&&(0,d.S8)(o.restUrl)===(0,d.S8)(i))return o.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?w.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||b.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,y.MZ)({type:g.default})],t.prototype,"portalItem",null),(0,i._)([(0,m.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,y.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,h.$)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},25036:(e,t,r)=>{r.d(t,{j:()=>n});var i=r(90237),o=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,o.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,s.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},92300:(e,t,r)=>{r.d(t,{V:()=>s,X:()=>o});var i=r(65864);function o(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function s(e,t,r){const o=(0,i.xD)(t);return e.map((e=>{const t=o.fromJSON(e);return t.spatialReference=r,t}))}},2272:(e,t,r)=>{r.d(t,{Dl:()=>n,jV:()=>s,lF:()=>a}),r(92602),r(70333);var i=r(4718),o=r(84952);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function n(e){return"string"==typeof e?(0,o.An)(e):(0,i.o8)(e)}function a(e,t,r){const i={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))i[o]=s.map((e=>a(e)));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(r?.[o]);i[o]=t?e:JSON.stringify(e)}else i[o]=t?s:JSON.stringify(s);else i[o]=s}return i}r(926)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9234],{79234:(e,t,n)=>{var i,a,r,s,o,c,l,u,p,N,g,f,d,m,S;n.r(t),n.d(t,{destroyWasm:()=>D,initialize:()=>R,process:()=>L}),function(e){e.U8="U8",e.I8="I8",e.U16="U16",e.I16="I16",e.U32="U32",e.I32="I32",e.F32="F32",e.F64="F64",e.Utf8String="Utf8String",e.NotSet="NotSet"}(i||(i={})),function(e){e.Png="Png",e.Jpeg="Jpeg",e.Dds="Dds",e.Raw="Raw",e.Dxt1="Dxt1",e.Dxt5="Dxt5",e.Bc7="Bc7",e.Basis="Basis",e.Etc1="Etc1",e.Etc2="Etc2",e.Astc="Astc",e.Pvrtc="Pvrtc",e.NotSet="NotSet"}(a||(a={})),function(e){e.Position="Position",e.Normal="Normal",e.TexCoord="TexCoord",e.Color="Color",e.Tangent="Tangent",e.FeatureIndex="FeatureIndex",e.UvRegion="UvRegion",e.FeatureVariable="FeatureVariable",e.NotSet="NotSet"}(r||(r={})),function(e){e.Opaque="Opaque",e.Mask="Mask",e.Blend="Blend"}(s||(s={})),function(e){e.None="None",e.Mask="Mask",e.Alpha="Alpha",e.PreMultAlpha="PreMultAlpha",e.NotSet="NotSet"}(o||(o={})),function(e){e.Points="Points",e.Lines="Lines",e.LineStrip="LineStrip",e.Triangles="Triangles",e.TriangleStrip="TriangleStrip",e.NotSet="NotSet"}(c||(c={})),function(e){e.None="None",e.WrapXBit="WrapXBit",e.WrapYBit="WrapYBit",e.WrapXy="WrapXy",e.NotSet="NotSet"}(l||(l={})),function(e){e.Linear="Linear",e.Nearest="Nearest",e.NotSet="NotSet"}(u||(u={})),function(e){e.Linear="Linear",e.Nearest="Nearest",e.NearestMipmapNearest="NearestMipmapNearest",e.LinearMipmapNearest="LinearMipmapNearest",e.NearestMipmapLinear="NearestMipmapLinear",e.LinearMipmapLinear="LinearMipmapLinear",e.NotSet="NotSet"}(p||(p={})),function(e){e.FeatureId="FeatureId",e.GlobalUid="GlobalUid",e.UnspecifiedDateTime="UnspecifiedDateTime",e.EcmaIso8601DateTime="EcmaIso8601DateTime",e.EcmaIso8601DateOnly="EcmaIso8601DateOnly",e.TimeOnly="TimeOnly",e.TimeStamp="TimeStamp",e.ColorRgb="ColorRgb",e.ColorRgba="ColorRgba",e.Unrecognized="Unrecognized",e.NotSet="NotSet"}(N||(N={})),function(e){e.Texture="Texture",e.VertexAtrb="VertexAtrb",e.Implicit="Implicit",e.NotSet="NotSet"}(g||(g={})),function(e){e.Front="Front",e.Back="Back",e.None="None",e.NotSet="NotSet"}(f||(f={})),function(e){e.Pbr="Pbr",e.Unlit="Unlit"}(d||(d={})),function(e){e.Rgb8="Rgb8",e.Rgba8="Rgba8",e.R8="R8",e.Bgr8="Bgr8",e.Bgra8="Bgra8",e.Rg8="Rg8",e.Ga8="Ga8",e.Etc1="Etc1",e.Etc2="Etc2",e.Dxt1="Dxt1",e.Dxt5="Dxt5",e.Bc7="Bc7",e.NotSet="NotSet"}(m||(m={})),function(e){e[e.Succeeded=0]="Succeeded",e[e.Failed=1]="Failed",e[e.MissingInputs=2]="MissingInputs"}(S||(S={}));var b=n(2741);function U(e){return(0,b.s)(`esri/libs/lyr3d/${e}`)}let h,I;async function L(e){if(await R(),e.inputs.length<1)return{result:{status:S.Failed,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[]},transferList:[]};const t={ptrs:[],sizes:[]};for(const n of e.inputs){const e=I._malloc(n.byteLength);new Uint8Array(I.HEAPU8.buffer,e,n.byteLength).set(new Uint8Array(n)),t.ptrs.push(e),t.sizes.push(n.byteLength)}const n=I.process(e.jobDescJson,t,e.isMissingResourceCase),i=n.status===S.Succeeded&&n.data,a=n.status===S.MissingInputs&&n.missingInputUrls.length>0;if(i){const e=n.data.slice();n.data=e}else a&&(n.jobDescJson=n.jobDescJson.slice(),n.originalInputs=e.inputs.slice());for(let e=0;e<t.ptrs.length;++e)I._free(t.ptrs[e]);const r=[];if(i)r.push(n.data.buffer);else if(a)for(const t of e.inputs)r.push(t);return{result:n,transferList:r}}function D(){I&&(I.uninitialize_lyr3d_worker_wasm(),I=null)}function R(){return I?Promise.resolve():(h||(h=new Promise((e=>n.e(2343).then(n.bind(n,2343)).then((e=>e.l)).then((({default:t})=>{const n=t({locateFile:U,onRuntimeInitialized:()=>e(n)})})))).catch((e=>{throw e})).then((e=>{I=e,I.initialize_lyr3d_worker_wasm(),h=null}))),h)}}}]);
|