@arcgis/core 4.33.0-next.20250512 → 4.33.0-next.20250514
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/arcade/functions/centroid.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/geometry.js +1 -1
- package/arcade/functions/geomsync.js +1 -1
- package/arcade/geometry/operators.js +1 -1
- package/arcade/geometry/operatorsWorker.js +1 -1
- package/arcade/treeAnalysis.js +1 -1
- package/assets/components/assets/combobox/t9n/messages.en.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.json +1 -1
- package/assets/components/assets/icon/calendarHeatChart16.json +1 -0
- package/assets/components/assets/icon/calendarHeatChart24.json +1 -0
- package/assets/components/assets/icon/calendarHeatChart32.json +1 -0
- package/assets/components/assets/icon/matrixHeatChart16.json +1 -0
- package/assets/components/assets/icon/matrixHeatChart24.json +1 -0
- package/assets/components/assets/icon/matrixHeatChart32.json +1 -0
- package/assets/components/assets/icon/progressBarChart16.json +1 -0
- package/assets/components/assets/icon/progressBarChart24.json +1 -0
- package/assets/components/assets/icon/progressBarChart32.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualization16.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualization24.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualization32.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOpen16.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOpen24.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOpen32.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlined16F.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlined24F.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlined32F.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedColorLocked16.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedColorLocked24.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedColorLocked32.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpen16.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpen24.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpen32.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpenColorLocked16.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpenColorLocked24.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpenColorLocked32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0766ecb677d667e5fb83.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{4deeeceb784e4390441d.js → 0a4cece5e96fb7e8a57b.js} +1 -1
- package/assets/esri/core/workers/chunks/12e99071f6582f6caeaf.js +1 -0
- package/assets/esri/core/workers/chunks/191a45a594ecaf7f1abb.js +1 -0
- package/assets/esri/core/workers/chunks/1991f0d0f0a12175f849.js +1 -0
- package/assets/esri/core/workers/chunks/218a66d53f7cf4f285aa.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{07695960aa0344dbfbf3.js → 28d9e2ffc3059a55311e.js} +1 -1
- package/assets/esri/core/workers/chunks/{a5e746e10239a3bfe237.js → 30f3014c0ac6e2bc14bf.js} +1 -1
- package/assets/esri/core/workers/chunks/3596540ef49e5330ceb2.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/4899cdc8bb5085c356f9.js +1 -0
- package/assets/esri/core/workers/chunks/498886c321a2501658bc.js +1 -0
- package/assets/esri/core/workers/chunks/56569d0c2cf5c5167651.js +1 -0
- package/assets/esri/core/workers/chunks/{ba3193ea145960a50e87.js → 5c8d52b72a3bea4202ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{fbcd94f60f92257a7303.js → 6394ab6f629aa90292e6.js} +2 -2
- package/assets/esri/core/workers/chunks/{fbcd94f60f92257a7303.js.LICENSE.txt → 6394ab6f629aa90292e6.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{8b74b609de4f70e1a75c.js → 64af433e88d4dd21a2ff.js} +1 -1
- package/assets/esri/core/workers/chunks/{2b01e3bce78541620a86.js → 6cbe8205a4e0f62da519.js} +1 -1
- package/assets/esri/core/workers/chunks/6e64ce0958c3432004b6.js +346 -0
- package/assets/esri/core/workers/chunks/6e8c6c9112ecb867b7be.js +1 -0
- package/assets/esri/core/workers/chunks/{a8430e1e2142f1ce9b92.js → 82c395d8649096609a8a.js} +1 -1
- package/assets/esri/core/workers/chunks/{a73c6b4bc5baf440f85a.js → 88b7265270feede80e1d.js} +1 -1
- package/assets/esri/core/workers/chunks/8a87c181b85d0b86b9bb.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/8c21cc9af4ce9652cc5c.js +1 -0
- package/assets/esri/core/workers/chunks/{243dc74ec62891ba1ef7.js → 8e82acd1f730571680f4.js} +1 -1
- package/assets/esri/core/workers/chunks/90ae15ce22a49bd84876.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/a09b5700c92bb76c3234.js +1 -0
- package/assets/esri/core/workers/chunks/b06cb23048c32940f5de.js +1 -0
- package/assets/esri/core/workers/chunks/{079434fe765c53d304f2.js → b1e275607d9754079f60.js} +1 -1
- package/assets/esri/core/workers/chunks/b4f38fe9cc948a39ad87.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{3c45603af279ad7fed8c.js → b8b5dfd2d73a8410fba2.js} +1 -1
- package/assets/esri/core/workers/chunks/c604fefedccfd4db9953.js +1 -0
- package/assets/esri/core/workers/chunks/{0aca29f7156b2b412f2e.js → d1f7bfb8daf11ecada9f.js} +1 -1
- package/assets/esri/core/workers/chunks/{b816b608f31954128246.js → d21d9e8b8c8a2e0485d5.js} +1 -1
- package/assets/esri/core/workers/chunks/da3c62a851a4332f6dda.js +1 -0
- package/assets/esri/core/workers/chunks/{a8b42d8c0b76c234c09f.js → e0247252c6a0f3340e33.js} +81 -82
- package/assets/esri/core/workers/chunks/e0dc8794343c2a949ffb.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/e5608e5232e983531f72.js +1 -0
- package/assets/esri/core/workers/chunks/f8fb0c7eaf73709bd855.js +1 -0
- package/assets/esri/core/workers/chunks/fd24dd602a3fed88d90e.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/themes/base/widgets/_BuildingPhasePicker.scss +17 -10
- package/assets/esri/themes/base/widgets/_FeatureTable.scss +4 -0
- package/assets/esri/themes/base/widgets/_SelectionList.scss +7 -3
- 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/chunks/LineSeries.js +1 -1
- package/chunks/OperatorCut.js +1 -1
- package/chunks/OperatorDefinitions.js +5 -0
- package/chunks/OperatorMultiPartToSinglePart.js +1 -1
- package/chunks/OperatorSimplifyOGC.js +1 -1
- package/chunks/ProjectionTransformation.js +1 -1
- package/chunks/ShadowCastAccumulate.glsl.js +1 -1
- package/chunks/ShadowHighlight.glsl.js +5 -5
- package/chunks/Theme.js +1 -1
- package/chunks/Tick.js +1 -1
- package/chunks/arcade.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/core/Accessor.js +1 -1
- package/core/accessorSupport/Lifecycle.js +5 -0
- package/core/accessorSupport/Properties.js +1 -1
- package/core/accessorSupport/decorators/subclass.js +1 -1
- package/core/accessorSupport/tracking/Flags.js +1 -1
- package/core/accessorSupport/watch.js +1 -1
- package/core/mapCollectionUtils.js +1 -1
- package/core/urlUtils.js +1 -1
- package/geometry/operators/gx/operatorIntegrate.js +1 -1
- package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
- package/geometry/operators/gx/operatorSimplifyOGC.js +1 -1
- package/geometry/operators/simplifyOGCOperator.js +1 -1
- package/interfaces.d.ts +368 -2450
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/KnowledgeGraphLayer.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/knowledgeGraph/supportUtils.js +1 -1
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/package.json +3 -4
- package/smartMapping/statistics/uniqueValues.js +1 -1
- package/smartMapping/support/adapters/support/layerUtils.js +1 -1
- package/statistics/utils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/effects/EffectRadial.js +1 -1
- package/versionManagement/versionAdapters/FeatureLayerVersionAdapter.js +1 -1
- package/versionManagement/versionAdapters/NetworkVersionAdapter.js +1 -1
- package/versionManagement/versionAdapters/SubTypeGroupLayerVersionAdapter.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VideoLayerView2D.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/3d/FocusAreasView.js +5 -0
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/SliceAnalysisView3D.js +1 -1
- package/views/3d/analysis/Viewshed/viewshedToolManipulatorUtils.js +1 -1
- package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/Lyr3DWasm.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
- package/views/3d/layers/graphics/pipeline/FeatureProcessingContext.js +1 -1
- package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
- package/views/3d/layers/graphics/pipeline/TileLocks.js +5 -0
- package/views/3d/layers/graphics/pipeline/featureData/FeatureData.js +1 -1
- package/views/3d/layers/graphics/pipeline/featureData/FeatureDataSubset.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/RenderCommandContext.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/layers/i3s/I3SQueryResultGeometry.js +1 -1
- package/views/3d/layers/i3s/meshUtils.js +5 -0
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/terrain/TileTexture.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -27
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ShadowmapFiltering.glsl.js +29 -0
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View.js +1 -1
- package/views/analysis/analysisViewUtils.js +1 -1
- package/views/layers/BuildingComponentSublayerView.js +1 -1
- package/views/layers/BuildingSceneLayerView.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/support/TextureCompressionWorker.js +1 -1
- package/views/support/TextureCompressionWorkerHandle.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
- package/widgets/Editor/Edits.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/FeatureTable/AttachmentsColumn.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/support/ColumnTemplateBase.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/Slice.js +1 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
- package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/widgets/support/iconUtils.js +1 -1
- package/assets/esri/core/workers/chunks/009dbddfc6499e2cee4f.js +0 -1
- package/assets/esri/core/workers/chunks/1b8cc83aa1179245b2dc.js +0 -1
- package/assets/esri/core/workers/chunks/26ebb7816dd8c8cd4f3b.js +0 -1
- package/assets/esri/core/workers/chunks/2abce00d812c7f6b542d.js +0 -1
- package/assets/esri/core/workers/chunks/47cd99ab3ed11a931084.js +0 -1
- package/assets/esri/core/workers/chunks/51d9eaeeb781fd1d1162.js +0 -1
- package/assets/esri/core/workers/chunks/5228fc7fcdf57f44781e.js +0 -1
- package/assets/esri/core/workers/chunks/83d6a1b3db7d364d156b.js +0 -1
- package/assets/esri/core/workers/chunks/83e13baab4b90a88d967.js +0 -1
- package/assets/esri/core/workers/chunks/92cbe9af8a6c061bfb57.js +0 -346
- package/assets/esri/core/workers/chunks/93cc26e5636040fdc0b8.js +0 -1
- package/assets/esri/core/workers/chunks/c17c269cc30e7e1d0bfb.js +0 -1
- package/assets/esri/core/workers/chunks/c3f144ca69995dca34a9.js +0 -1
- package/assets/esri/core/workers/chunks/d551f70560a2b1ef5696.js +0 -1
- package/core/accessorSupport/interfaces.js +0 -5
- package/views/3d/layers/graphics/pipeline/TileActionSynchronizer.js +0 -5
- package/views/FocusAreasView.js +0 -5
package/chunks/Tick.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{d as e}from"./tslib.es6.js";import{F as t,S as s,g as i,i as a,H as l,k as r,a as n,I as o,C as h,P as u,J as d,L as c,K as m,e as p,N as f}from"./Theme.js";class b extends t{constructor(){super(...arguments),Object.defineProperty(this,"processor",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}incrementRef(){}decrementRef(){}_onPush(e){this.processor&&this.processor.processRow(e),super._onPush(e)}_onInsertIndex(e,t){this.processor&&this.processor.processRow(t),super._onInsertIndex(e,t)}_onSetIndex(e,t,s){this.processor&&this.processor.processRow(s),super._onSetIndex(e,t,s)}}class _ extends s{constructor(e,t,s){super(s),Object.defineProperty(this,"component",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"dataContext",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bullets",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"open",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"close",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.dataContext=t,this.component=e,this._settings.visible=!0,this._checkDirty()}markDirty(){this.component.markDirtyValues(this)}_startAnimation(){this.component._root._addAnimation(this)}_animationTime(){return this.component._root.animationTime}_dispose(){this.component&&this.component.disposeDataItem(this),super._dispose()}show(e){this.setRaw("visible",!0),this.component&&this.component.showDataItem(this,e)}hide(e){this.setRaw("visible",!1),this.component&&this.component.hideDataItem(this,e)}isHidden(){return!this.get("visible")}}class g extends i{constructor(){super(...arguments),Object.defineProperty(this,"_data",{enumerable:!0,configurable:!0,writable:!0,value:new b}),Object.defineProperty(this,"_dataItems",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_mainDataItems",{enumerable:!0,configurable:!0,writable:!0,value:this._dataItems}),Object.defineProperty(this,"valueFields",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"fields",{enumerable:!0,configurable:!0,writable:!0,value:["id"]}),Object.defineProperty(this,"_valueFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_valueFieldsF",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fieldsF",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_valuesDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dataChanged",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dataGrouped",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"inited",{enumerable:!0,configurable:!0,writable:!0,value:!1})}set data(e){e.incrementRef(),this._data.decrementRef(),this._data=e}get data(){return this._data}_dispose(){super._dispose(),this._data.decrementRef()}_onDataClear(){}_afterNew(){super._afterNew(),this._data.incrementRef(),this._updateFields(),this._disposers.push(this.data.events.onAll((e=>{const t=this._mainDataItems;if(this.markDirtyValues(),this._markDirtyGroup(),this._dataChanged=!0,"clear"===e.type)a(t,(e=>{e.dispose()})),t.length=0,this._onDataClear();else if("push"===e.type){const s=new _(this,e.newValue,this._makeDataItem(e.newValue));t.push(s),this.processDataItem(s)}else if("setIndex"===e.type){const s=t[e.index],i=this._makeDataItem(e.newValue);s.bullets&&0==s.bullets.length&&(s.bullets=void 0),l(i).forEach((e=>{s.animate({key:e,to:i[e],duration:this.get("interpolationDuration",0),easing:this.get("interpolationEasing")})})),s.dataContext=e.newValue}else if("insertIndex"===e.type){const s=new _(this,e.newValue,this._makeDataItem(e.newValue));t.splice(e.index,0,s),this.processDataItem(s)}else if("removeIndex"===e.type){t[e.index].dispose(),t.splice(e.index,1)}else{if("moveIndex"!==e.type)throw new Error("Unknown IStreamEvent type");{const s=t[e.oldIndex];t.splice(e.oldIndex,1),t.splice(e.newIndex,0,s)}}this._afterDataChange()})))}_updateFields(){this.valueFields&&(this._valueFields=[],this._valueFieldsF={},a(this.valueFields,(e=>{this.get(e+"Field")&&(this._valueFields.push(e),this._valueFieldsF[e]={fieldKey:e+"Field",workingKey:e+"Working"})}))),this.fields&&(this._fields=[],this._fieldsF={},a(this.fields,(e=>{this.get(e+"Field")&&(this._fields.push(e),this._fieldsF[e]=e+"Field")})))}get dataItems(){return this._dataItems}processDataItem(e){}_makeDataItem(e){const t={};return this._valueFields&&a(this._valueFields,(s=>{const i=this.get(this._valueFieldsF[s].fieldKey);t[s]=e[i],t[this._valueFieldsF[s].workingKey]=t[s]})),this._fields&&a(this._fields,(s=>{const i=this.get(this._fieldsF[s]);t[s]=e[i]})),t}makeDataItem(e,t){let s=new _(this,t,e);return this.processDataItem(s),s}pushDataItem(e,t){const s=this.makeDataItem(e,t);return this._mainDataItems.push(s),s}disposeDataItem(e){}showDataItem(t,s){return e(this,void 0,void 0,(function*(){t.set("visible",!0)}))}hideDataItem(t,s){return e(this,void 0,void 0,(function*(){t.set("visible",!1)}))}_clearDirty(){super._clearDirty(),this._valuesDirty=!1}_afterDataChange(){}_afterChanged(){if(super._afterChanged(),this._dataChanged){const e="datavalidated";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this}),this._dataChanged=!1}this.inited=!0}markDirtyValues(e){this.markDirty(),this._valuesDirty=!0}_markDirtyGroup(){this._dataGrouped=!1}markDirtySize(){this._sizeDirty=!0,this.markDirty()}}function v(e){return new Promise(((t,s)=>{setTimeout(t,e)}))}function y(e,t,s,i,a,l,n){if(!n||a){let l=0;switch(a||"millisecond"==t||(l=e.getTimezoneOffset(),e.setUTCMinutes(e.getUTCMinutes()-l)),t){case"day":let t=e.getUTCDate();s>1||e.setUTCDate(t),e.setUTCHours(0,0,0,0);break;case"second":let a=e.getUTCSeconds();s>1&&(a=Math.floor(a/s)*s),e.setUTCSeconds(a,0);break;case"millisecond":if(1==s)return e;let l=e.getUTCMilliseconds();l=Math.floor(l/s)*s,e.setUTCMilliseconds(l);break;case"hour":let n=e.getUTCHours();s>1&&(n=Math.floor(n/s)*s),e.setUTCHours(n,0,0,0);break;case"minute":let o=e.getUTCMinutes();s>1&&(o=Math.floor(o/s)*s),e.setUTCMinutes(o,0,0);break;case"month":let h=e.getUTCMonth();s>1&&(h=Math.floor(h/s)*s),e.setUTCMonth(h,1),e.setUTCHours(0,0,0,0);break;case"year":let u=e.getUTCFullYear();s>1&&(u=Math.floor(u/s)*s),e.setUTCFullYear(u,0,1),e.setUTCHours(0,0,0,0);break;case"week":let d=e.getUTCDate(),c=e.getUTCDay();r(i)||(i=1),d=c>=i?d-c+i:d-(7+c)+i,e.setUTCDate(d),e.setUTCHours(0,0,0,0)}if(!a&&"millisecond"!=t&&(e.setUTCMinutes(e.getUTCMinutes()+l),"day"==t||"week"==t||"month"==t||"year"==t)){let t=e.getTimezoneOffset();if(t!=l){let s=t-l;e.setUTCMinutes(e.getUTCMinutes()+s)}}return e}{if(isNaN(e.getTime()))return e;let a=e.getTime(),l=n.offsetUTC(e),o=e.getTimezoneOffset(),h=n.parseDate(e),u=h.year,d=h.month,c=h.day,m=h.hour,p=h.minute,f=h.second,b=h.millisecond,_=h.weekday,g=l-o;switch(t){case"day":m=0,p=g,f=0,b=0;break;case"second":p+=g,s>1&&(f=Math.floor(f/s)*s),b=0;break;case"millisecond":p+=g,s>1&&(b=Math.floor(b/s)*s);break;case"hour":s>1&&(m=Math.floor(m/s)*s),p=g,f=0,b=0;break;case"minute":s>1&&(p=Math.floor(p/s)*s),p+=g,f=0,b=0;break;case"month":s>1&&(d=Math.floor(d/s)*s),c=1,m=0,p=g,f=0,b=0;break;case"year":s>1&&(u=Math.floor(u/s)*s),d=0,c=1,m=0,p=g,f=0,b=0;break;case"week":r(i)||(i=1),c=_>=i?c-_+i:c-(7+_)+i,m=0,p=g,f=0,b=0}const v=(e=new Date(u,d,c,m,p,f,b)).getTime();let y=36e5;"hour"==t&&(y=36e5*s),v+y<=a&&("hour"!=t&&"minute"!=t&&"second"!=t&&"millisecond"!=t||(e=new Date(v+y)));let w=e.getTimezoneOffset(),I=n.offsetUTC(e)-w;return I!=g&&e.setTime(e.getTime()+6e4*(I-g)),e}}Object.defineProperty(g,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Component"}),Object.defineProperty(g,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:i.classNames.concat([g.className])});class w extends g{constructor(){super(...arguments),Object.defineProperty(this,"_aggregatesCalculated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_selectionAggregatesCalculated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dataProcessed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_psi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pei",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"chart",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bullets",{enumerable:!0,configurable:!0,writable:!0,value:new t}),Object.defineProperty(this,"bulletsContainer",{enumerable:!0,configurable:!0,writable:!0,value:i.new(this._root,{width:n,height:n,position:"absolute"})})}_afterNew(){this.valueFields.push("value","customValue"),super._afterNew(),this.setPrivate("customData",{}),this._disposers.push(this.bullets.events.onAll((e=>{if("clear"===e.type)this._handleBullets(this.dataItems);else if("push"===e.type)this._handleBullets(this.dataItems);else if("setIndex"===e.type)this._handleBullets(this.dataItems);else if("insertIndex"===e.type)this._handleBullets(this.dataItems);else if("removeIndex"===e.type)this._handleBullets(this.dataItems);else{if("moveIndex"!==e.type)throw new Error("Unknown IListEvent type");this._handleBullets(this.dataItems)}})))}_dispose(){this.bulletsContainer.dispose(),super._dispose()}startIndex(){let e=this.dataItems.length;return Math.min(this.getPrivate("startIndex",0),e)}endIndex(){let e=this.dataItems.length;return Math.min(this.getPrivate("endIndex",e),e)}_handleBullets(e){a(e,(e=>{const t=e.bullets;t&&(a(t,(e=>{e.dispose()})),e.bullets=void 0)})),this.markDirtyValues()}getDataItemById(e){return o(this.dataItems,(t=>t.get("id")==e))}_makeBullets(e){this._shouldMakeBullet(e)&&(e.bullets=[],this.bullets.each((t=>{this._makeBullet(e,t)})))}_shouldMakeBullet(e){return!0}_makeBullet(e,t,s){const i=t(this._root,this,e);return i&&(i._index=s,this._makeBulletReal(e,i)),i}_makeBulletReal(e,t){let s=t.get("sprite");s&&(s._setDataItem(e),s.setRaw("position","absolute"),this.bulletsContainer.children.push(s)),t.series=this,e.bullets.push(t)}addBullet(e,t){e.bullets||(e.bullets=[]),t&&this._makeBulletReal(e,t)}_clearDirty(){super._clearDirty(),this._aggregatesCalculated=!1,this._selectionAggregatesCalculated=!1}_prepareChildren(){super._prepareChildren();let e=this.startIndex(),t=this.endIndex();if(this.isDirty("name")&&this.updateLegendValue(),this.isDirty("heatRules")&&(this._valuesDirty=!0),this.isPrivateDirty("baseValueSeries")){const e=this.getPrivate("baseValueSeries");e&&this._disposers.push(e.onPrivate("startIndex",(()=>{this.markDirtyValues()})))}if(this.get("calculateAggregates")&&(this._valuesDirty&&!this._dataProcessed&&(this._aggregatesCalculated||(this._calculateAggregates(0,this.dataItems.length),this._aggregatesCalculated=!0,0!=e&&(this._psi=void 0))),this._psi==e&&this._pei==t&&!this.isPrivateDirty("adjustedStartIndex")||this._selectionAggregatesCalculated||(0===e&&t===this.dataItems.length&&this._aggregatesCalculated||this._calculateAggregates(e,t),this._selectionAggregatesCalculated=!0)),this.isDirty("tooltip")){let e=this.get("tooltip");e&&(e.hide(0),e.set("tooltipTarget",this))}if(this.isDirty("fill")||this.isDirty("stroke")){let e;const t=this.get("legendDataItem");if(t&&(e=t.get("markerRectangle"),e&&this.isVisible())){if(this.isDirty("stroke")){let t=this.get("stroke");e.set("stroke",t)}if(this.isDirty("fill")){let t=this.get("fill");e.set("fill",t)}}this.updateLegendMarker(void 0)}if(this.bullets.length>0){let e=this.startIndex(),t=this.endIndex();t<this.dataItems.length&&t++;for(let s=e;s<t;s++){let e=this.dataItems[s];e.bullets||this._makeBullets(e)}}}_handleRemoved(){}_adjustStartIndex(e){return e}_calculateAggregates(e,t){let s=this._valueFields;if(!s)throw new Error("No value fields are set for the series.");const i={},l={},r={},n={},o={},h={},u={},d={},c={};a(s,(e=>{i[e]=0,l[e]=0,r[e]=0})),a(s,(s=>{let a=s+"Change",m=s+"ChangePercent",p=s+"ChangePrevious",f=s+"ChangePreviousPercent",b=s+"ChangeSelection",_=s+"ChangeSelectionPercent",g="valueY";"valueX"!=s&&"openValueX"!=s&&"lowValueX"!=s&&"highValueX"!=s||(g="valueX");const v=this.getPrivate("baseValueSeries"),y=this.getPrivate("adjustedStartIndex",e);for(let w=y;w<t;w++){const t=this.dataItems[w];if(t){let y=t.get(s);null!=y&&(r[s]++,i[s]+=y,l[s]+=Math.abs(y),d[s]=i[s]/r[s],(n[s]>y||null==n[s])&&(n[s]=y),(o[s]<y||null==o[s])&&(o[s]=y),u[s]=y,null==h[s]&&(h[s]=y,c[s]=y,v&&(h[g]=v._getBase(g))),0===e&&(t.setRaw(a,y-h[g]),t.setRaw(m,(y-h[g])/h[g]*100)),t.setRaw(p,y-c[g]),t.setRaw(f,(y-c[g])/c[g]*100),t.setRaw(b,y-h[g]),t.setRaw(_,(y-h[g])/h[g]*100),c[s]=y)}}if(t<this.dataItems.length-1){const e=this.dataItems[t];if(e){let t=e.get(s);e.setRaw(p,t-c[g]),e.setRaw(f,(t-c[g])/c[g]*100),e.setRaw(b,t-h[g]),e.setRaw(_,(t-h[g])/h[g]*100)}}e>0&&e--,delete c[s];for(let t=e;t<y;t++){const e=this.dataItems[t];if(e){let t=e.get(s);null==c[s]&&(c[s]=t),null!=t&&(e.setRaw(p,t-c[g]),e.setRaw(f,(t-c[g])/c[g]*100),e.setRaw(b,t-h[g]),e.setRaw(_,(t-h[g])/h[g]*100),c[s]=t)}}})),a(s,(e=>{this.setPrivate(e+"AverageSelection",d[e]),this.setPrivate(e+"CountSelection",r[e]),this.setPrivate(e+"SumSelection",i[e]),this.setPrivate(e+"AbsoluteSumSelection",l[e]),this.setPrivate(e+"LowSelection",n[e]),this.setPrivate(e+"HighSelection",o[e]),this.setPrivate(e+"OpenSelection",h[e]),this.setPrivate(e+"CloseSelection",u[e])})),0===e&&t===this.dataItems.length&&a(s,(e=>{this.setPrivate(e+"Average",d[e]),this.setPrivate(e+"Count",r[e]),this.setPrivate(e+"Sum",i[e]),this.setPrivate(e+"AbsoluteSum",l[e]),this.setPrivate(e+"Low",n[e]),this.setPrivate(e+"High",o[e]),this.setPrivate(e+"Open",h[e]),this.setPrivate(e+"Close",u[e])}))}_updateChildren(){super._updateChildren(),this._psi=this.startIndex(),this._pei=this.endIndex(),this.isDirty("visible")&&this.bulletsContainer.set("visible",this.get("visible"));const e=this.get("heatRules");if(this._valuesDirty&&e&&e.length>0&&a(e,(e=>{const t=e.minValue||this.getPrivate(e.dataField+"Low")||0,s=e.maxValue||this.getPrivate(e.dataField+"High")||0;a(e.target._entities,(i=>{const a=i.dataItem.get(e.dataField);if(!r(a)){e.neutral&&i.set(e.key,e.neutral);const t=i.states;if(t){const s=t.lookup("default");s&&e.neutral&&s.set(e.key,e.neutral)}if(!e.customFunction)return}if(e.customFunction)e.customFunction.call(this,i,t,s,a);else{let l,n;l=e.logarithmic?(Math.log(a)*Math.LOG10E-Math.log(t)*Math.LOG10E)/(Math.log(s)*Math.LOG10E-Math.log(t)*Math.LOG10E):(a-t)/(s-t),!r(a)||r(l)&&Math.abs(l)!=1/0||(l=.5),r(e.min)?n=e.min+(e.max-e.min)*l:e.min instanceof h?n=h.interpolate(l,e.min,e.max):e.min instanceof u&&(n=d(l,e.min,e.max)),i.set(e.key,n);const o=i.states;if(o){const t=o.lookup("default");t&&t.set(e.key,n)}}}))})),this.get("visible")){let e=this.dataItems.length,t=this.startIndex(),s=this.endIndex();s<e&&s++,t>0&&t--;for(let i=0;i<t;i++)this._hideBullets(this.dataItems[i]);for(let i=t;i<s;i++)this._positionBullets(this.dataItems[i]);for(let i=s;i<e;i++)this._hideBullets(this.dataItems[i])}}_positionBullets(e){e.bullets&&a(e.bullets,(e=>{this._positionBullet(e);const t=e.get("sprite");e.get("dynamic")&&(t&&(t._markDirtyKey("fill"),t.markDirtySize()),t instanceof i&&t.walkChildren((e=>{e._markDirtyKey("fill"),e.markDirtySize(),e instanceof c&&e.text.markDirtyText()}))),t instanceof c&&t.get("populateText")&&t.text.markDirtyText()}))}_hideBullets(e){e.bullets&&a(e.bullets,(e=>{let t=e.get("sprite");t&&t.setPrivate("visible",!1)}))}_positionBullet(e){}_placeBulletsContainer(e){e.bulletsContainer.children.moveValue(this.bulletsContainer)}_removeBulletsContainer(){const e=this.bulletsContainer;e.parent&&e.parent.children.removeValue(e)}disposeDataItem(e){const t=e.bullets;t&&a(t,(e=>{e.dispose()}))}_getItemReaderLabel(){return""}showDataItem(t,s){const i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return e(this,void 0,void 0,(function*(){const e=[i.showDataItem.call(this,t,s)],l=t.bullets;l&&a(l,(t=>{const i=t.get("sprite");i&&e.push(i.show(s))})),yield Promise.all(e)}))}hideDataItem(t,s){const i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return e(this,void 0,void 0,(function*(){const e=[i.hideDataItem.call(this,t,s)],l=t.bullets;l&&a(l,(t=>{const i=t.get("sprite");i&&e.push(i.hide(s))})),yield Promise.all(e)}))}_sequencedShowHide(t,s){return e(this,void 0,void 0,(function*(){if(this.get("sequencedInterpolation"))if(r(s)||(s=this.get("interpolationDuration",0)),s>0){const i=this.startIndex(),a=this.endIndex();yield Promise.all(m(this.dataItems,((l,r)=>e(this,void 0,void 0,(function*(){let e=s||0;(r<i-10||r>a+10)&&(e=0);let n=this.get("sequencedDelay",0)+e/(a-i);yield v(n*(r-i)),t?yield this.showDataItem(l,e):yield this.hideDataItem(l,e)})))))}else yield Promise.all(m(this.dataItems,(e=>t?this.showDataItem(e,0):this.hideDataItem(e,0))))}))}updateLegendValue(e){if(e){const t=e.get("legendDataItem");if(t){const s=t.get("valueLabel");if(s){const t=s.text;let i="";s._setDataItem(e),i=this.get("legendValueText",t.get("text","")),s.set("text",i),t.markDirtyText()}const i=t.get("label");if(i){const t=i.text;let s="";i._setDataItem(e),s=this.get("legendLabelText",t.get("text","")),i.set("text",s),t.markDirtyText()}}}}updateLegendMarker(e){}_onHide(){super._onHide();const e=this.getTooltip();e&&e.hide()}hoverDataItem(e){}unhoverDataItem(e){}_getBase(e){const t=this.dataItems[this.startIndex()];return t?t.get(e):0}}function I(e,t){for(let s=0,i=t.length;s<i;s++){const i=t[s];if(i.length>0){let t=i[0];if(t.length>0){let s=t[0];e.moveTo(s.x,s.y);for(let t=0,a=i.length;t<a;t++)D(e,i[t])}}}}function D(e,t){for(let s=0,i=t.length;s<i;s++){const i=t[s];e.lineTo(i.x,i.y)}}Object.defineProperty(w,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Series"}),Object.defineProperty(w,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:g.classNames.concat([w.className])});class x extends p{_beforeChanged(){super._beforeChanged(),(this.isDirty("points")||this.isDirty("segments")||this._sizeDirty||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){const e=this.get("points"),t=this.get("segments");if(e&&e.length>0){let t=e[0];this._display.moveTo(t.x,t.y),I(this._display,[[e]])}else if(t)I(this._display,t);else if(!this.get("draw")){let e=this.width(),t=this.height();this._display.moveTo(0,0),this._display.lineTo(e,t)}}}}function C(e){return function(){return e}}Object.defineProperty(x,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Line"}),Object.defineProperty(x,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:p.classNames.concat([x.className])});const P=Math.PI,k=2*P,T=1e-6,M=k-T;function O(e){this._+=e[0];for(let t=1,s=e.length;t<s;++t)this._+=arguments[t]+e[t]}function $(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return O;const s=10**t;return function(e){this._+=e[0];for(let t=1,i=e.length;t<i;++t)this._+=Math.round(arguments[t]*s)/s+e[t]}}class j{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?O:$(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,s,i){this._append`Q${+e},${+t},${this._x1=+s},${this._y1=+i}`}bezierCurveTo(e,t,s,i,a,l){this._append`C${+e},${+t},${+s},${+i},${this._x1=+a},${this._y1=+l}`}arcTo(e,t,s,i,a){if(e=+e,t=+t,s=+s,i=+i,(a=+a)<0)throw new Error(`negative radius: ${a}`);let l=this._x1,r=this._y1,n=s-e,o=i-t,h=l-e,u=r-t,d=h*h+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>T)if(Math.abs(u*n-o*h)>T&&a){let c=s-l,m=i-r,p=n*n+o*o,f=c*c+m*m,b=Math.sqrt(p),_=Math.sqrt(d),g=a*Math.tan((P-Math.acos((p+d-f)/(2*b*_)))/2),v=g/_,y=g/b;Math.abs(v-1)>T&&this._append`L${e+v*h},${t+v*u}`,this._append`A${a},${a},0,0,${+(u*c>h*m)},${this._x1=e+y*n},${this._y1=t+y*o}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,s,i,a,l){if(e=+e,t=+t,l=!!l,(s=+s)<0)throw new Error(`negative radius: ${s}`);let r=s*Math.cos(i),n=s*Math.sin(i),o=e+r,h=t+n,u=1^l,d=l?i-a:a-i;null===this._x1?this._append`M${o},${h}`:(Math.abs(this._x1-o)>T||Math.abs(this._y1-h)>T)&&this._append`L${o},${h}`,s&&(d<0&&(d=d%k+k),d>M?this._append`A${s},${s},0,1,${u},${e-r},${t-n}A${s},${s},0,1,${u},${this._x1=o},${this._y1=h}`:d>T&&this._append`A${s},${s},0,${+(d>=P)},${u},${this._x1=e+s*Math.cos(a)},${this._y1=t+s*Math.sin(a)}`)}rect(e,t,s,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${s=+s}v${+i}h${-s}Z`}toString(){return this._}}function S(e){let t=3;return e.digits=function(s){if(!arguments.length)return t;if(null==s)t=null;else{const e=Math.floor(s);if(!(e>=0))throw new RangeError(`invalid digits: ${s}`);t=e}return e},()=>new j(t)}class V extends i{constructor(){super(...arguments),Object.defineProperty(this,"chartContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(i.new(this._root,{width:n,height:n,interactiveChildren:!1}))}),Object.defineProperty(this,"bulletsContainer",{enumerable:!0,configurable:!0,writable:!0,value:i.new(this._root,{interactiveChildren:!1,isMeasured:!1,position:"absolute",width:n,height:n})})}}Object.defineProperty(V,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Chart"}),Object.defineProperty(V,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:i.classNames.concat([V.className])});class F extends V{constructor(){super(...arguments),Object.defineProperty(this,"seriesContainer",{enumerable:!0,configurable:!0,writable:!0,value:i.new(this._root,{width:n,height:n,isMeasured:!1})}),Object.defineProperty(this,"series",{enumerable:!0,configurable:!0,writable:!0,value:new f})}_afterNew(){super._afterNew(),this._disposers.push(this.series);const e=this.seriesContainer.children;this._disposers.push(this.series.events.onAll((t=>{if("clear"===t.type){a(t.oldValues,(e=>{this._removeSeries(e)}));const e=this.get("colors");e&&e.reset();const s=this.get("patterns");s&&s.reset()}else if("push"===t.type)e.moveValue(t.newValue),this._processSeries(t.newValue);else if("setIndex"===t.type)e.setIndex(t.index,t.newValue),this._processSeries(t.newValue);else if("insertIndex"===t.type)e.insertIndex(t.index,t.newValue),this._processSeries(t.newValue);else if("removeIndex"===t.type)this._removeSeries(t.oldValue);else if("moveIndex"===t.type)e.moveValue(t.value,t.newIndex),this._processSeries(t.value);else{if("swap"!==t.type)throw new Error("Unknown IListEvent type");{const s=t.a,i=t.b,a=this.series.indexOf(s),l=this.series.indexOf(i);e.moveValue(s,l),e.moveValue(i,a),this.series.each((e=>{this._processSeries(e),e.markDirtyValues()}))}}})))}_processSeries(e){e.chart=this,e._placeBulletsContainer(this)}_removeSeries(e){e._handleRemoved(),e.isDisposed()||(this.seriesContainer.children.removeValue(e),e._removeBulletsContainer())}}Object.defineProperty(F,"className",{enumerable:!0,configurable:!0,writable:!0,value:"SerialChart"}),Object.defineProperty(F,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:V.classNames.concat([F.className])});class R extends x{}Object.defineProperty(R,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Tick"}),Object.defineProperty(R,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:x.classNames.concat([R.className])});export{g as C,_ as D,F as S,R as T,w as a,C as c,y as r,S as w};
|
|
5
|
+
import{d as e}from"./tslib.es6.js";import{F as t,S as s,g as i,i as a,H as l,k as r,a as n,I as o,C as h,P as u,J as d,L as c,K as m,e as p,N as f}from"./Theme.js";class b extends t{constructor(){super(...arguments),Object.defineProperty(this,"processor",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}incrementRef(){}decrementRef(){}_onPush(e){this.processor&&this.processor.processRow(e),super._onPush(e)}_onInsertIndex(e,t){this.processor&&this.processor.processRow(t),super._onInsertIndex(e,t)}_onSetIndex(e,t,s){this.processor&&this.processor.processRow(s),super._onSetIndex(e,t,s)}}class _ extends s{constructor(e,t,s){super(s),Object.defineProperty(this,"component",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"dataContext",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bullets",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"open",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"close",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.dataContext=t,this.component=e,this._settings.visible=!0,this._checkDirty()}markDirty(){this.component.markDirtyValues(this)}_startAnimation(){this.component._root._addAnimation(this)}_animationTime(){return this.component._root.animationTime}_dispose(){this.component&&this.component.disposeDataItem(this),super._dispose()}show(e){this.setRaw("visible",!0),this.component&&this.component.showDataItem(this,e)}hide(e){this.setRaw("visible",!1),this.component&&this.component.hideDataItem(this,e)}isHidden(){return!this.get("visible")}}class g extends i{constructor(){super(...arguments),Object.defineProperty(this,"_data",{enumerable:!0,configurable:!0,writable:!0,value:new b}),Object.defineProperty(this,"_dataItems",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_mainDataItems",{enumerable:!0,configurable:!0,writable:!0,value:this._dataItems}),Object.defineProperty(this,"valueFields",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"fields",{enumerable:!0,configurable:!0,writable:!0,value:["id"]}),Object.defineProperty(this,"_valueFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_valueFieldsF",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fieldsF",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_valuesDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dataChanged",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dataGrouped",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"inited",{enumerable:!0,configurable:!0,writable:!0,value:!1})}set data(e){e.incrementRef(),this._data.decrementRef(),this._data=e}get data(){return this._data}_dispose(){super._dispose(),this._data.decrementRef()}_onDataClear(){}_afterNew(){super._afterNew(),this._data.incrementRef(),this._updateFields(),this._disposers.push(this.data.events.onAll((e=>{const t=this._mainDataItems;if(this.markDirtyValues(),this._markDirtyGroup(),this._dataChanged=!0,"clear"===e.type)a(t,(e=>{e.dispose()})),t.length=0,this._onDataClear();else if("push"===e.type){const s=new _(this,e.newValue,this._makeDataItem(e.newValue));t.push(s),this.processDataItem(s)}else if("setIndex"===e.type){const s=t[e.index],i=this._makeDataItem(e.newValue);s.bullets&&0==s.bullets.length&&(s.bullets=void 0),l(i).forEach((e=>{s.animate({key:e,to:i[e],duration:this.get("interpolationDuration",0),easing:this.get("interpolationEasing")})})),s.dataContext=e.newValue}else if("insertIndex"===e.type){const s=new _(this,e.newValue,this._makeDataItem(e.newValue));t.splice(e.index,0,s),this.processDataItem(s)}else if("removeIndex"===e.type){t[e.index].dispose(),t.splice(e.index,1)}else{if("moveIndex"!==e.type)throw new Error("Unknown IStreamEvent type");{const s=t[e.oldIndex];t.splice(e.oldIndex,1),t.splice(e.newIndex,0,s)}}this._afterDataChange()})))}_updateFields(){this.valueFields&&(this._valueFields=[],this._valueFieldsF={},a(this.valueFields,(e=>{this.get(e+"Field")&&(this._valueFields.push(e),this._valueFieldsF[e]={fieldKey:e+"Field",workingKey:e+"Working"})}))),this.fields&&(this._fields=[],this._fieldsF={},a(this.fields,(e=>{this.get(e+"Field")&&(this._fields.push(e),this._fieldsF[e]=e+"Field")})))}get dataItems(){return this._dataItems}processDataItem(e){}_makeDataItem(e){const t={};return this._valueFields&&a(this._valueFields,(s=>{const i=this.get(this._valueFieldsF[s].fieldKey);t[s]=e[i],t[this._valueFieldsF[s].workingKey]=t[s]})),this._fields&&a(this._fields,(s=>{const i=this.get(this._fieldsF[s]);t[s]=e[i]})),t}makeDataItem(e,t){let s=new _(this,t,e);return this.processDataItem(s),s}pushDataItem(e,t){const s=this.makeDataItem(e,t);return this._mainDataItems.push(s),s}disposeDataItem(e){}showDataItem(t,s){return e(this,void 0,void 0,(function*(){t.set("visible",!0)}))}hideDataItem(t,s){return e(this,void 0,void 0,(function*(){t.set("visible",!1)}))}_clearDirty(){super._clearDirty(),this._valuesDirty=!1}_afterDataChange(){}_afterChanged(){if(super._afterChanged(),this._dataChanged){const e="datavalidated";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this}),this._dataChanged=!1}this.inited=!0}markDirtyValues(e){this.markDirty(),this._valuesDirty=!0}_markDirtyGroup(){this._dataGrouped=!1}markDirtySize(){this._sizeDirty=!0,this.markDirty()}}function v(e){return new Promise(((t,s)=>{setTimeout(t,e)}))}function y(e,t,s,i,a,l,n){if(!n||a){let l=0;switch(a||"millisecond"==t||(l=e.getTimezoneOffset(),e.setUTCMinutes(e.getUTCMinutes()-l)),t){case"day":let t=e.getUTCDate();s>1||e.setUTCDate(t),e.setUTCHours(0,0,0,0);break;case"second":let a=e.getUTCSeconds();s>1&&(a=Math.floor(a/s)*s),e.setUTCSeconds(a,0);break;case"millisecond":if(1==s)return e;let l=e.getUTCMilliseconds();l=Math.floor(l/s)*s,e.setUTCMilliseconds(l);break;case"hour":let n=e.getUTCHours();s>1&&(n=Math.floor(n/s)*s),e.setUTCHours(n,0,0,0);break;case"minute":let o=e.getUTCMinutes();s>1&&(o=Math.floor(o/s)*s),e.setUTCMinutes(o,0,0);break;case"month":let h=e.getUTCMonth();s>1&&(h=Math.floor(h/s)*s),e.setUTCMonth(h,1),e.setUTCHours(0,0,0,0);break;case"year":let u=e.getUTCFullYear();s>1&&(u=Math.floor(u/s)*s),e.setUTCFullYear(u,0,1),e.setUTCHours(0,0,0,0);break;case"week":let d=e.getUTCDate(),c=e.getUTCDay();r(i)||(i=1),d=c>=i?d-c+i:d-(7+c)+i,e.setUTCDate(d),e.setUTCHours(0,0,0,0)}if(!a&&"millisecond"!=t&&(e.setUTCMinutes(e.getUTCMinutes()+l),"day"==t||"week"==t||"month"==t||"year"==t)){let t=e.getTimezoneOffset();if(t!=l){let s=t-l;e.setUTCMinutes(e.getUTCMinutes()+s)}}return e}{if(isNaN(e.getTime()))return e;let a=e.getTime(),l=n.offsetUTC(e),o=e.getTimezoneOffset(),h=n.parseDate(e),u=h.year,d=h.month,c=h.day,m=h.hour,p=h.minute,f=h.second,b=h.millisecond,_=h.weekday,g=l-o;switch(t){case"day":m=0,p=g,f=0,b=0;break;case"second":p+=g,s>1&&(f=Math.floor(f/s)*s),b=0;break;case"millisecond":p+=g,s>1&&(b=Math.floor(b/s)*s);break;case"hour":s>1&&(m=Math.floor(m/s)*s),p=g,f=0,b=0;break;case"minute":s>1&&(p=Math.floor(p/s)*s),p+=g,f=0,b=0;break;case"month":s>1&&(d=Math.floor(d/s)*s),c=1,m=0,p=g,f=0,b=0;break;case"year":s>1&&(u=Math.floor(u/s)*s),d=0,c=1,m=0,p=g,f=0,b=0;break;case"week":r(i)||(i=1),c=_>=i?c-_+i:c-(7+_)+i,m=0,p=g,f=0,b=0}const v=(e=new Date(u,d,c,m,p,f,b)).getTime();let y=36e5;"hour"==t&&(y=36e5*s),v+y<=a&&("hour"!=t&&"minute"!=t&&"second"!=t&&"millisecond"!=t||(e=new Date(v+y)));let w=e.getTimezoneOffset(),I=n.offsetUTC(e)-w;return I!=g&&e.setTime(e.getTime()+6e4*(I-g)),e}}Object.defineProperty(g,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Component"}),Object.defineProperty(g,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:i.classNames.concat([g.className])});class w extends g{constructor(){super(...arguments),Object.defineProperty(this,"_aggregatesCalculated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_selectionAggregatesCalculated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dataProcessed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_psi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pei",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"chart",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bullets",{enumerable:!0,configurable:!0,writable:!0,value:new t}),Object.defineProperty(this,"bulletsContainer",{enumerable:!0,configurable:!0,writable:!0,value:i.new(this._root,{width:n,height:n,position:"absolute"})})}_afterNew(){this.valueFields.push("value","customValue"),super._afterNew(),this.setPrivate("customData",{}),this._disposers.push(this.bullets.events.onAll((e=>{if("clear"===e.type)this._handleBullets(this.dataItems);else if("push"===e.type)this._handleBullets(this.dataItems);else if("setIndex"===e.type)this._handleBullets(this.dataItems);else if("insertIndex"===e.type)this._handleBullets(this.dataItems);else if("removeIndex"===e.type)this._handleBullets(this.dataItems);else{if("moveIndex"!==e.type)throw new Error("Unknown IListEvent type");this._handleBullets(this.dataItems)}})))}_dispose(){this.bulletsContainer.dispose(),super._dispose()}startIndex(){let e=this.dataItems.length;return Math.min(this.getPrivate("startIndex",0),e)}endIndex(){let e=this.dataItems.length;return Math.min(this.getPrivate("endIndex",e),e)}_handleBullets(e){a(e,(e=>{const t=e.bullets;t&&(a(t,(e=>{e.dispose()})),e.bullets=void 0)})),this.markDirtyValues()}getDataItemById(e){return o(this.dataItems,(t=>t.get("id")==e))}_makeBullets(e){this._shouldMakeBullet(e)&&(e.bullets=[],this.bullets.each((t=>{this._makeBullet(e,t)})))}_shouldMakeBullet(e){return!0}_makeBullet(e,t,s){const i=t(this._root,this,e);return i&&(i._index=s,this._makeBulletReal(e,i)),i}_makeBulletReal(e,t){let s=t.get("sprite");s&&(s._setDataItem(e),s.setRaw("position","absolute"),this.bulletsContainer.children.push(s)),t.series=this,e.bullets.push(t)}addBullet(e,t){e.bullets||(e.bullets=[]),t&&this._makeBulletReal(e,t)}_clearDirty(){super._clearDirty(),this._aggregatesCalculated=!1,this._selectionAggregatesCalculated=!1}_prepareChildren(){super._prepareChildren();let e=this.startIndex(),t=this.endIndex();if(this.isDirty("name")&&this.updateLegendValue(),this.isDirty("heatRules")&&(this._valuesDirty=!0),this.isPrivateDirty("baseValueSeries")){const e=this.getPrivate("baseValueSeries");e&&this._disposers.push(e.onPrivate("startIndex",(()=>{this.markDirtyValues()})))}if(this.get("calculateAggregates")&&(this._valuesDirty&&!this._dataProcessed&&(this._aggregatesCalculated||(this._calculateAggregates(0,this.dataItems.length),this._aggregatesCalculated=!0,0!=e&&(this._psi=void 0))),this._psi==e&&this._pei==t&&!this.isPrivateDirty("adjustedStartIndex")||this._selectionAggregatesCalculated||(0===e&&t===this.dataItems.length&&this._aggregatesCalculated||this._calculateAggregates(e,t),this._selectionAggregatesCalculated=!0)),this.isDirty("tooltip")){let e=this.get("tooltip");e&&(e.hide(0),e.set("tooltipTarget",this))}if(this.isDirty("fill")||this.isDirty("stroke")){let e;const t=this.get("legendDataItem");if(t&&(e=t.get("markerRectangle"),e&&this.isVisible())){if(this.isDirty("stroke")){let t=this.get("stroke");e.set("stroke",t)}if(this.isDirty("fill")){let t=this.get("fill");e.set("fill",t)}}this.updateLegendMarker(void 0)}if(this.bullets.length>0){let e=this.startIndex(),t=this.endIndex();t<this.dataItems.length&&t++;for(let s=e;s<t;s++){let e=this.dataItems[s];e.bullets||this._makeBullets(e)}}}_handleRemoved(){}_adjustStartIndex(e){return e}_calculateAggregates(e,t){let s=this._valueFields;if(!s)throw new Error("No value fields are set for the series.");const i={},l={},r={},n={},o={},h={},u={},d={},c={};a(s,(e=>{i[e]=0,l[e]=0,r[e]=0})),a(s,(s=>{let a=s+"Change",m=s+"ChangePercent",p=s+"ChangePrevious",f=s+"ChangePreviousPercent",b=s+"ChangeSelection",_=s+"ChangeSelectionPercent",g="valueY";"valueX"!=s&&"openValueX"!=s&&"lowValueX"!=s&&"highValueX"!=s||(g="valueX");const v=this.getPrivate("baseValueSeries"),y=this.getPrivate("adjustedStartIndex",e);for(let w=y;w<t;w++){const t=this.dataItems[w];if(t){let y=t.get(s);null!=y&&(r[s]++,i[s]+=y,l[s]+=Math.abs(y),d[s]=i[s]/r[s],(n[s]>y||null==n[s])&&(n[s]=y),(o[s]<y||null==o[s])&&(o[s]=y),u[s]=y,null==h[s]&&(h[s]=y,c[s]=y,v&&(h[g]=v._getBase(g))),0===e&&(t.setRaw(a,y-h[g]),t.setRaw(m,(y-h[g])/h[g]*100)),t.setRaw(p,y-c[g]),t.setRaw(f,(y-c[g])/c[g]*100),t.setRaw(b,y-h[g]),t.setRaw(_,(y-h[g])/h[g]*100),c[s]=y)}}if(t<this.dataItems.length-1){const e=this.dataItems[t];if(e){let t=e.get(s);e.setRaw(p,t-c[g]),e.setRaw(f,(t-c[g])/c[g]*100),e.setRaw(b,t-h[g]),e.setRaw(_,(t-h[g])/h[g]*100)}}e>0&&e--,delete c[s];for(let t=e;t<y;t++){const e=this.dataItems[t];if(e){let t=e.get(s);null==c[s]&&(c[s]=t),null!=t&&(e.setRaw(p,t-c[g]),e.setRaw(f,(t-c[g])/c[g]*100),e.setRaw(b,t-h[g]),e.setRaw(_,(t-h[g])/h[g]*100),c[s]=t)}}})),a(s,(e=>{this.setPrivate(e+"AverageSelection",d[e]),this.setPrivate(e+"CountSelection",r[e]),this.setPrivate(e+"SumSelection",i[e]),this.setPrivate(e+"AbsoluteSumSelection",l[e]),this.setPrivate(e+"LowSelection",n[e]),this.setPrivate(e+"HighSelection",o[e]),this.setPrivate(e+"OpenSelection",h[e]),this.setPrivate(e+"CloseSelection",u[e])})),0===e&&t===this.dataItems.length&&a(s,(e=>{this.setPrivate(e+"Average",d[e]),this.setPrivate(e+"Count",r[e]),this.setPrivate(e+"Sum",i[e]),this.setPrivate(e+"AbsoluteSum",l[e]),this.setPrivate(e+"Low",n[e]),this.setPrivate(e+"High",o[e]),this.setPrivate(e+"Open",h[e]),this.setPrivate(e+"Close",u[e])}))}_updateChildren(){super._updateChildren(),this._psi=this.startIndex(),this._pei=this.endIndex(),this.isDirty("visible")&&this.bulletsContainer.set("visible",this.get("visible"));const e=this.get("heatRules");if(this._valuesDirty&&e&&e.length>0&&a(e,(e=>{const t=e.minValue||this.getPrivate(e.dataField+"Low")||0,s=e.maxValue||this.getPrivate(e.dataField+"High")||0;a(e.target._entities,(i=>{const a=i.dataItem.get(e.dataField);if(!r(a)){e.neutral&&i.set(e.key,e.neutral);const t=i.states;if(t){const s=t.lookup("default");s&&e.neutral&&s.set(e.key,e.neutral)}if(!e.customFunction)return}if(e.customFunction)e.customFunction.call(this,i,t,s,a);else{let l,n;l=e.logarithmic?(Math.log(a)*Math.LOG10E-Math.log(t)*Math.LOG10E)/(Math.log(s)*Math.LOG10E-Math.log(t)*Math.LOG10E):(a-t)/(s-t),!r(a)||r(l)&&Math.abs(l)!=1/0||(l=.5),r(e.min)?n=e.min+(e.max-e.min)*l:e.min instanceof h?n=h.interpolate(l,e.min,e.max):e.min instanceof u&&(n=d(l,e.min,e.max)),i.set(e.key,n);const o=i.states;if(o){const t=o.lookup("default");t&&t.set(e.key,n)}}}))})),this.get("visible")){let e=this.dataItems.length,t=this.startIndex(),s=this.endIndex();s<e&&s++,t>0&&t--;for(let i=0;i<t;i++)this._hideBullets(this.dataItems[i]);for(let i=t;i<s;i++)this._positionBullets(this.dataItems[i]);for(let i=s;i<e;i++)this._hideBullets(this.dataItems[i])}}_positionBullets(e){e.bullets&&a(e.bullets,(e=>{this._positionBullet(e);const t=e.get("sprite");e.get("dynamic")&&(t&&(t._markDirtyKey("fill"),t.markDirtySize()),t instanceof i&&t.walkChildren((e=>{e._markDirtyKey("fill"),e.markDirtySize(),e instanceof c&&e.text.markDirtyText()}))),t instanceof c&&t.get("populateText")&&t.text.markDirtyText()}))}_hideBullets(e){e.bullets&&a(e.bullets,(e=>{let t=e.get("sprite");t&&t.setPrivate("visible",!1)}))}_positionBullet(e){}_placeBulletsContainer(e){e.bulletsContainer.children.moveValue(this.bulletsContainer)}_removeBulletsContainer(){const e=this.bulletsContainer;e.parent&&e.parent.children.removeValue(e)}disposeDataItem(e){const t=e.bullets;t&&(a(t,(e=>{e.dispose()})),e.bullets=void 0)}_getItemReaderLabel(){return""}showDataItem(t,s){const i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return e(this,void 0,void 0,(function*(){const e=[i.showDataItem.call(this,t,s)],l=t.bullets;l&&a(l,(t=>{const i=t.get("sprite");i&&e.push(i.show(s))})),yield Promise.all(e)}))}hideDataItem(t,s){const i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return e(this,void 0,void 0,(function*(){const e=[i.hideDataItem.call(this,t,s)],l=t.bullets;l&&a(l,(t=>{const i=t.get("sprite");i&&e.push(i.hide(s))})),yield Promise.all(e)}))}_sequencedShowHide(t,s){return e(this,void 0,void 0,(function*(){if(this.get("sequencedInterpolation"))if(r(s)||(s=this.get("interpolationDuration",0)),s>0){const i=this.startIndex(),a=this.endIndex();yield Promise.all(m(this.dataItems,((l,r)=>e(this,void 0,void 0,(function*(){let e=s||0;(r<i-10||r>a+10)&&(e=0);let n=this.get("sequencedDelay",0)+e/(a-i);yield v(n*(r-i)),t?yield this.showDataItem(l,e):yield this.hideDataItem(l,e)})))))}else yield Promise.all(m(this.dataItems,(e=>t?this.showDataItem(e,0):this.hideDataItem(e,0))))}))}updateLegendValue(e){if(e){const t=e.get("legendDataItem");if(t){const s=t.get("valueLabel");if(s){const t=s.text;let i="";s._setDataItem(e),i=this.get("legendValueText",t.get("text","")),s.set("text",i),t.markDirtyText()}const i=t.get("label");if(i){const t=i.text;let s="";i._setDataItem(e),s=this.get("legendLabelText",t.get("text","")),i.set("text",s),t.markDirtyText()}}}}updateLegendMarker(e){}_onHide(){super._onHide();const e=this.getTooltip();e&&e.hide()}hoverDataItem(e){}unhoverDataItem(e){}_getBase(e){const t=this.dataItems[this.startIndex()];return t?t.get(e):0}}function I(e,t){for(let s=0,i=t.length;s<i;s++){const i=t[s];if(i.length>0){let t=i[0];if(t.length>0){let s=t[0];e.moveTo(s.x,s.y);for(let t=0,a=i.length;t<a;t++)D(e,i[t])}}}}function D(e,t){for(let s=0,i=t.length;s<i;s++){const i=t[s];e.lineTo(i.x,i.y)}}Object.defineProperty(w,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Series"}),Object.defineProperty(w,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:g.classNames.concat([w.className])});class x extends p{_beforeChanged(){super._beforeChanged(),(this.isDirty("points")||this.isDirty("segments")||this._sizeDirty||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){const e=this.get("points"),t=this.get("segments");if(e&&e.length>0){let t=e[0];this._display.moveTo(t.x,t.y),I(this._display,[[e]])}else if(t)I(this._display,t);else if(!this.get("draw")){let e=this.width(),t=this.height();this._display.moveTo(0,0),this._display.lineTo(e,t)}}}}function C(e){return function(){return e}}Object.defineProperty(x,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Line"}),Object.defineProperty(x,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:p.classNames.concat([x.className])});const P=Math.PI,k=2*P,T=1e-6,M=k-T;function O(e){this._+=e[0];for(let t=1,s=e.length;t<s;++t)this._+=arguments[t]+e[t]}function $(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return O;const s=10**t;return function(e){this._+=e[0];for(let t=1,i=e.length;t<i;++t)this._+=Math.round(arguments[t]*s)/s+e[t]}}class j{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?O:$(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,s,i){this._append`Q${+e},${+t},${this._x1=+s},${this._y1=+i}`}bezierCurveTo(e,t,s,i,a,l){this._append`C${+e},${+t},${+s},${+i},${this._x1=+a},${this._y1=+l}`}arcTo(e,t,s,i,a){if(e=+e,t=+t,s=+s,i=+i,(a=+a)<0)throw new Error(`negative radius: ${a}`);let l=this._x1,r=this._y1,n=s-e,o=i-t,h=l-e,u=r-t,d=h*h+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>T)if(Math.abs(u*n-o*h)>T&&a){let c=s-l,m=i-r,p=n*n+o*o,f=c*c+m*m,b=Math.sqrt(p),_=Math.sqrt(d),g=a*Math.tan((P-Math.acos((p+d-f)/(2*b*_)))/2),v=g/_,y=g/b;Math.abs(v-1)>T&&this._append`L${e+v*h},${t+v*u}`,this._append`A${a},${a},0,0,${+(u*c>h*m)},${this._x1=e+y*n},${this._y1=t+y*o}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,s,i,a,l){if(e=+e,t=+t,l=!!l,(s=+s)<0)throw new Error(`negative radius: ${s}`);let r=s*Math.cos(i),n=s*Math.sin(i),o=e+r,h=t+n,u=1^l,d=l?i-a:a-i;null===this._x1?this._append`M${o},${h}`:(Math.abs(this._x1-o)>T||Math.abs(this._y1-h)>T)&&this._append`L${o},${h}`,s&&(d<0&&(d=d%k+k),d>M?this._append`A${s},${s},0,1,${u},${e-r},${t-n}A${s},${s},0,1,${u},${this._x1=o},${this._y1=h}`:d>T&&this._append`A${s},${s},0,${+(d>=P)},${u},${this._x1=e+s*Math.cos(a)},${this._y1=t+s*Math.sin(a)}`)}rect(e,t,s,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${s=+s}v${+i}h${-s}Z`}toString(){return this._}}function S(e){let t=3;return e.digits=function(s){if(!arguments.length)return t;if(null==s)t=null;else{const e=Math.floor(s);if(!(e>=0))throw new RangeError(`invalid digits: ${s}`);t=e}return e},()=>new j(t)}class V extends i{constructor(){super(...arguments),Object.defineProperty(this,"chartContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(i.new(this._root,{width:n,height:n,interactiveChildren:!1}))}),Object.defineProperty(this,"bulletsContainer",{enumerable:!0,configurable:!0,writable:!0,value:i.new(this._root,{interactiveChildren:!1,isMeasured:!1,position:"absolute",width:n,height:n})})}}Object.defineProperty(V,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Chart"}),Object.defineProperty(V,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:i.classNames.concat([V.className])});class F extends V{constructor(){super(...arguments),Object.defineProperty(this,"seriesContainer",{enumerable:!0,configurable:!0,writable:!0,value:i.new(this._root,{width:n,height:n,isMeasured:!1})}),Object.defineProperty(this,"series",{enumerable:!0,configurable:!0,writable:!0,value:new f})}_afterNew(){super._afterNew(),this._disposers.push(this.series);const e=this.seriesContainer.children;this._disposers.push(this.series.events.onAll((t=>{if("clear"===t.type){a(t.oldValues,(e=>{this._removeSeries(e)}));const e=this.get("colors");e&&e.reset();const s=this.get("patterns");s&&s.reset()}else if("push"===t.type)e.moveValue(t.newValue),this._processSeries(t.newValue);else if("setIndex"===t.type)e.setIndex(t.index,t.newValue),this._processSeries(t.newValue);else if("insertIndex"===t.type)e.insertIndex(t.index,t.newValue),this._processSeries(t.newValue);else if("removeIndex"===t.type)this._removeSeries(t.oldValue);else if("moveIndex"===t.type)e.moveValue(t.value,t.newIndex),this._processSeries(t.value);else{if("swap"!==t.type)throw new Error("Unknown IListEvent type");{const s=t.a,i=t.b,a=this.series.indexOf(s),l=this.series.indexOf(i);e.moveValue(s,l),e.moveValue(i,a),this.series.each((e=>{this._processSeries(e),e.markDirtyValues()}))}}})))}_processSeries(e){e.chart=this,e._placeBulletsContainer(this)}_removeSeries(e){e._handleRemoved(),e.isDisposed()||(this.seriesContainer.children.removeValue(e),e._removeBulletsContainer())}}Object.defineProperty(F,"className",{enumerable:!0,configurable:!0,writable:!0,value:"SerialChart"}),Object.defineProperty(F,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:V.classNames.concat([F.className])});class R extends x{}Object.defineProperty(R,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Tick"}),Object.defineProperty(R,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:x.classNames.concat([R.className])});export{g as C,_ as D,F as S,R as T,w as a,C as c,y as r,S as w};
|
package/chunks/arcade.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{compileScript as e,extend as r,enableAsyncSupport as t}from"../arcade/arcadeCompiler.js";import{ArcadeModuleResolver as n}from"../arcade/ArcadeModuleResolver.js";import{executeScript as s,extend as a}from"../arcade/arcadeRuntime.js";import{ArcadeExecutionError as u,ExecutionErrorCodes as o}from"../arcade/executionError.js";import{parseScript as
|
|
5
|
+
import{compileScript as e,extend as r,enableAsyncSupport as t}from"../arcade/arcadeCompiler.js";import{ArcadeModuleResolver as n}from"../arcade/ArcadeModuleResolver.js";import{executeScript as s,extend as a}from"../arcade/arcadeRuntime.js";import{ArcadeExecutionError as u,ExecutionErrorCodes as o}from"../arcade/executionError.js";import{parseScript as c}from"../arcade/parser.js";import{referencesMember as i,referencesFunction as l,findLiteralMemberAccesses as f,findExpectedFieldLiterals as p,findScriptDependencies as d,findModuleImports as m,findFunctionCalls as y}from"../arcade/treeAnalysis.js";import{loadOperators as S}from"../arcade/functions/geomsync.js";import has from"../core/has.js";import{assertIsSome as b}from"../core/maybe.js";const w=new Set(["feature","angle","bearing","centroid","envelopeintersects","extent","geometry","ringisclockwise"]);let h=!1,A=!1,j=null,x=[];function g(r,t){if(!0===t.useAsync||!0===r.isAsync)return M(r,t);if(has("esri-csp-restrictions"))return function(e){return s(r,e)};try{return e(r,t)}catch(n){if("esri.arcade.arcadeuncompilableerror"===n.declaredRootClass)return function(e){return s(r,e)};throw n}}function M(r,t){if(null===j)throw new u(null,o.AsyncNotEnabled,null);if(has("esri-csp-restrictions"))return function(e){return j.executeScript(r,e)};try{return e(r,t,!0)}catch(n){if("esri.arcade.arcadeuncompilableerror"===n.declaredRootClass)return function(e){return j.executeScript(r,e)};throw n}}function v(e){a(e),r(e,"sync"),null===j?x.push(e):(r(e,"async"),j.extend(e))}function F(e,r=[]){return c(e,r)}function E(e,r,t=[]){return G(c(e,t),r)}function G(e,r){if(!0===r.useAsync||!0===e.isAsync){if(null===j)throw new u(null,o.AsyncNotEnabled,null);return j.executeScript(e,r)}return s(e,r)}function I(e,r){return i(e,r)}function U(e,r){return l(e,r)}function _(e,r=!1){return void 0===r&&(r=!1),f(e).map((({varId:e,memberId:r})=>`${e}.${r}`))}function C(e){return p(e)}function R(e,r=[]){return void 0===e.usesGeometry&&d(e,r),!0===e.usesGeometry}let k=null;function D(){return k||(k=P(),k)}async function P(){return await S(),A=!0,!0}let z=null;function L(){return null!==z||(z=$()),z}async function $(){await t(),j=await import("../arcade/arcadeAsyncRuntime.js");for(const e of x)j.extend(e),r(e,"async");return x=null,!0}function N(){return h}function O(){return!!j}function T(){return A}let q=null;function B(){return q||(q=V(),q)}async function V(){await L();const[e,t,n,s,a,u]=await Promise.all([import("../arcade/featureSetUtils.js"),import("../arcade/functions/featuresetbase.js"),import("../arcade/functions/featuresetgeom.js"),import("../arcade/functions/featuresetstats.js"),import("../arcade/functions/featuresetstring.js"),import("../arcade/functions/knowledgegraph.js")]);return re=e,j.extend([t,n,s,a,u]),r([t,n,s,a,u],"async"),h=!0,!0}function H(e,r=[]){return void 0===e.usesFeatureSet&&d(e,r),!0===e.usesFeatureSet}function J(e,r=[]){return void 0===e.isAsync&&d(e,r),!0===e.isAsync}function K(e,r){if(r){for(const t of r)if(I(e,t))return!0;return!1}return!1}async function Q(e,r,t=[],n=!1,s=null){return W(new Set,e,r,t,n,s)}async function W(e,r,t,n=[],s=!1,a=null){const u="string"==typeof r?F(r):r,o=[];return u&&(!1===T()&&(R(u)||s)&&o.push(D()),!1===O()&&(!0===u.isAsync||t)&&o.push(L()),!1===N()&&(H(u)||K(u,n))&&o.push(B())),o.length&&await Promise.all(o),await Y(e,u,a,t,s),!0}function X(e,r=[]){return void 0===e.usesModules&&d(e,r),!0===e.usesModules}async function Y(e,r,t=null,s=!1,a=!1){const c=m(r);null===t&&c.length>0&&(t=n.getDefault()),r.loadedModules={};for(const n of c){b(t);const c=t.normalizeModuleUri(n.source);if(e.has(c.uri))throw new u(null,o.CircularModules,null);e.add(c.uri);const i=await t.fetchModule(c);await W(e,i,s,[],a,t),e.delete(c.uri),i.isAsync&&(r.isAsync=!0),i.usesFeatureSet&&(r.usesFeatureSet=!0),i.usesGeometry&&(r.usesGeometry=!0),r.loadedModules[n.libname]={uri:c.uri,script:i}}}function Z(e){if(R(e))return!0;const r=y(e);let t=!1;for(let n=0;n<r.length;n++)if(w.has(r[n])){t=!0;break}return t}function ee(e,r){const t=null==r?null:new Set(r.map((e=>e.toLowerCase())));return f(e).some((({varId:e,memberId:r})=>"$view"===e&&(null==t||t.has(r))))}let re=null;function te(){return re}const ne=Object.freeze(Object.defineProperty({__proto__:null,_loadScriptDependenciesImpl:W,compileScript:g,enableAsyncSupport:L,enableAsyncSupportImpl:$,enableFeatureSetSupport:B,enableFeatureSetSupportImpl:V,enableGeometrySupport:D,enableGeometrySupportImpl:P,executeScript:G,extend:v,extractExpectedFieldLiterals:C,extractFieldLiterals:_,featureSetUtils:te,isAsyncEnabled:O,isFeatureSetSupportEnabled:N,isGeometryEnabled:T,loadDependentModules:Y,loadScriptDependencies:Q,parseAndExecuteScript:E,parseScript:F,referencesFunction:U,referencesMember:I,scriptIsAsync:J,scriptTouchesGeometry:Z,scriptUsesFeatureSet:H,scriptUsesGeometryEngine:R,scriptUsesModules:X,scriptUsesViewProperties:ee},Symbol.toStringTag,{value:"Module"}));export{Y as A,ee as B,W as _,C as a,D as b,g as c,B as d,G as e,te as f,R as g,ne as h,v as i,E as j,U as k,Q as l,_ as m,P as n,L as o,F as p,$ as q,I as r,Z as s,N as t,O as u,T as v,V as w,H as x,J as y,X as z};
|
package/chunks/lyr3DMain.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{g as r}from"./_commonjsHelpers.js";var e,t={exports:{}};function n(){return e||(e=1,r=t,n="undefined"!=typeof document?document.currentScript?.src:void 0,a=async function(r={}){var e,t,a,o=r,i=new Promise(((r,n)=>{e=r,t=n})),u="./this.program",s="";function f(r){return o.locateFile?o.locateFile(r,s):s+r}"undefined"!=typeof document&&document.currentScript&&(s=document.currentScript.src),n&&(s=n),s=s.startsWith("blob:")?"":s.slice(0,s.replace(/[?#].*/,"").lastIndexOf("/")+1),a=async r=>{var e=await fetch(r,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)},console.log.bind(console);var c,l,p,v,d,h,g,m,y,w,T,b,A=console.error.bind(console),C=!1;function W(){var r=l.buffer;p=new Int8Array(r),d=new Int16Array(r),o.HEAPU8=v=new Uint8Array(r),h=new Uint16Array(r),g=new Int32Array(r),o.HEAPU32=m=new Uint32Array(r),y=new Float32Array(r),o.HEAPF64=b=new Float64Array(r),w=new BigInt64Array(r),T=new BigUint64Array(r)}function P(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)z(o.preRun.shift());j(L)}function E(){Le.E()}function F(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)N(o.postRun.shift());j(H)}var _,x=0,R=null;function S(r){x++,o.monitorRunDependencies?.(x)}function $(r){if(x--,o.monitorRunDependencies?.(x),0==x&&R){var e=R;R=null,e()}}function k(r){o.onAbort?.(r),A(r="Aborted("+r+")"),C=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw t(e),e}function I(){return f("lyr3DMain.wasm")}function O(r){if(r==_&&c)return new Uint8Array(c);throw"both async and sync fetching of the wasm failed"}async function U(r){if(!c)try{var e=await a(r);return new Uint8Array(e)}catch{}return O(r)}async function D(r,e){try{var t=await U(r);return await WebAssembly.instantiate(t,e)}catch(n){A(`failed to asynchronously prepare wasm: ${n}`),k(n)}}async function V(r,e,t){if(!r&&"function"==typeof WebAssembly.instantiateStreaming)try{var n=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(n,t)}catch(a){A(`wasm streaming compile failed: ${a}`),A("falling back to ArrayBuffer instantiation")}return D(e,t)}function B(){return{a:Ne}}async function M(){function r(r,e){return Le=r.exports,l=Le.D,W(),$r=Le.G,$(),Le}function e(e){return r(e.instance)}S();var n=B();if(o.instantiateWasm)return new Promise(((e,t)=>{o.instantiateWasm(n,((t,n)=>{e(r(t))}))}));_??=I();try{return e(await V(c,_,n))}catch(a){return t(a),Promise.reject(a)}}var j=r=>{for(;r.length>0;)r.shift()(o)},H=[],N=r=>H.push(r),L=[],z=r=>L.push(r);class G{constructor(r){this.excPtr=r,this.ptr=r-24}set_type(r){m[this.ptr+4>>2]=r}get_type(){return m[this.ptr+4>>2]}set_destructor(r){m[this.ptr+8>>2]=r}get_destructor(){return m[this.ptr+8>>2]}set_caught(r){r=r?1:0,p[this.ptr+12]=r}get_caught(){return 0!=p[this.ptr+12]}set_rethrown(r){r=r?1:0,p[this.ptr+13]=r}get_rethrown(){return 0!=p[this.ptr+13]}init(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e)}set_adjusted_ptr(r){m[this.ptr+16>>2]=r}get_adjusted_ptr(){return m[this.ptr+16>>2]}}var Y=(r,e,t)=>{throw new G(r).init(e,t),r},q=()=>k(""),J={},K=r=>{for(;r.length;){var e=r.pop();r.pop()(e)}};function Q(r){return this.fromWireType(m[r>>2])}var X,Z={},rr={},er={},tr=o.InternalError=class extends Error{constructor(r){super(r),this.name="InternalError"}},nr=r=>{throw new tr(r)},ar=(r,e,t)=>{function n(e){var n=t(e);n.length!==r.length&&nr("Mismatched type converter count");for(var a=0;a<r.length;++a)dr(r[a],n[a])}r.forEach((r=>er[r]=e));var a=new Array(e.length),o=[],i=0;e.forEach(((r,e)=>{rr.hasOwnProperty(r)?a[e]=rr[r]:(o.push(r),Z.hasOwnProperty(r)||(Z[r]=[]),Z[r].push((()=>{a[e]=rr[r],++i===o.length&&n(a)})))})),0===o.length&&n(a)},or=r=>{var e=J[r];delete J[r];var t=e.elements,n=t.length,a=t.map((r=>r.getterReturnType)).concat(t.map((r=>r.setterArgumentType))),o=e.rawConstructor,i=e.rawDestructor;ar([r],a,(r=>(t.forEach(((e,t)=>{var a=r[t],o=e.getter,i=e.getterContext,u=r[t+n],s=e.setter,f=e.setterContext;e.read=r=>a.fromWireType(o(i,r)),e.write=(r,e)=>{var t=[];s(f,r,u.toWireType(t,e)),K(t)}})),[{name:e.name,fromWireType:r=>{for(var e=new Array(n),a=0;a<n;++a)e[a]=t[a].read(r);return i(r),e},toWireType:(r,a)=>{if(n!==a.length)throw new TypeError(`Incorrect number of tuple elements for ${e.name}: expected=${n}, actual=${a.length}`);for(var u=o(),s=0;s<n;++s)t[s].write(u,a[s]);return null!==r&&r.push(i,u),u},argPackAdvance:mr,readValueFromPointer:Q,destructorFunction:i}])))},ir={},ur=r=>{var e=ir[r];delete ir[r];var t=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map((r=>r.getterReturnType)).concat(a.map((r=>r.setterArgumentType)));ar([r],o,(r=>{var o={};return a.forEach(((e,t)=>{var n=e.fieldName,i=r[t],u=r[t].optional,s=e.getter,f=e.getterContext,c=r[t+a.length],l=e.setter,p=e.setterContext;o[n]={read:r=>i.fromWireType(s(f,r)),write:(r,e)=>{var t=[];l(p,r,c.toWireType(t,e)),K(t)},optional:u}})),[{name:e.name,fromWireType:r=>{var e={};for(var t in o)e[t]=o[t].read(r);return n(r),e},toWireType:(r,e)=>{for(var a in o)if(!(a in e)&&!o[a].optional)throw new TypeError(`Missing field: "${a}"`);var i=t();for(a in o)o[a].write(i,e[a]);return null!==r&&r.push(n,i),i},argPackAdvance:mr,readValueFromPointer:Q,destructorFunction:n}]}))},sr=r=>{if(null===r)return"null";var e=typeof r;return"object"===e||"array"===e||"function"===e?r.toString():""+r},fr=()=>{for(var r=new Array(256),e=0;e<256;++e)r[e]=String.fromCharCode(e);X=r},cr=r=>{for(var e="",t=r;v[t];)e+=X[v[t++]];return e},lr=o.BindingError=class extends Error{constructor(r){super(r),this.name="BindingError"}},pr=r=>{throw new lr(r)};function vr(r,e,t={}){var n=e.name;if(r||pr(`type "${n}" must have a positive integer typeid pointer`),rr.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;pr(`Cannot register type '${n}' twice`)}if(rr[r]=e,delete er[r],Z.hasOwnProperty(r)){var a=Z[r];delete Z[r],a.forEach((r=>r()))}}function dr(r,e,t={}){return vr(r,e,t)}var hr=(r,e,t)=>{switch(e){case 1:return t?r=>p[r]:r=>v[r];case 2:return t?r=>d[r>>1]:r=>h[r>>1];case 4:return t?r=>g[r>>2]:r=>m[r>>2];case 8:return t?r=>w[r>>3]:r=>T[r>>3];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},gr=(r,e,t,n,a)=>{var o=-1!=(e=cr(e)).indexOf("u");dr(r,{name:e,fromWireType:r=>r,toWireType:function(r,e){if("bigint"!=typeof e&&"number"!=typeof e)throw new TypeError(`Cannot convert "${sr(e)}" to ${this.name}`);return"number"==typeof e&&(e=BigInt(e)),e},argPackAdvance:mr,readValueFromPointer:hr(e,t,!o),destructorFunction:null})},mr=8,yr=(r,e,t,n)=>{dr(r,{name:e=cr(e),fromWireType:function(r){return!!r},toWireType:function(r,e){return e?t:n},argPackAdvance:mr,readValueFromPointer:function(r){return this.fromWireType(v[r])},destructorFunction:null})},wr=[],Tr=[],br=r=>{r>9&&0==--Tr[r+1]&&(Tr[r]=void 0,wr.push(r))},Ar=()=>Tr.length/2-5-wr.length,Cr=()=>{Tr.push(0,1,void 0,1,null,1,!0,1,!1,1),o.count_emval_handles=Ar},Wr={toValue:r=>(r||pr(`Cannot use deleted val. handle = ${r}`),Tr[r]),toHandle:r=>{switch(r){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=wr.pop()||Tr.length;return Tr[e]=r,Tr[e+1]=1,e}}}},Pr={name:"emscripten::val",fromWireType:r=>{var e=Wr.toValue(r);return br(r),e},toWireType:(r,e)=>Wr.toHandle(e),argPackAdvance:mr,readValueFromPointer:Q,destructorFunction:null},Er=r=>dr(r,Pr),Fr=(r,e)=>{switch(e){case 4:return function(r){return this.fromWireType(y[r>>2])};case 8:return function(r){return this.fromWireType(b[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},_r=(r,e,t)=>{dr(r,{name:e=cr(e),fromWireType:r=>r,toWireType:(r,e)=>e,argPackAdvance:mr,readValueFromPointer:Fr(e,t),destructorFunction:null})},xr=(r,e)=>Object.defineProperty(e,"name",{value:r});function Rr(r){for(var e=1;e<r.length;++e)if(null!==r[e]&&void 0===r[e].destructorFunction)return!0;return!1}function Sr(r,e,t,n,a,o){var i=e.length;i<2&&pr("argTypes array size mismatch! Must at least get return value and 'this' types!"),e[1];var u=Rr(e),s="void"!==e[0].name,f=i-2,c=new Array(f),l=[],p=[];return xr(r,(function(...r){var t;p.length=0,l.length=1,l[0]=a;for(var o=0;o<f;++o)c[o]=e[o+2].toWireType(p,r[o]),l.push(c[o]);function i(r){if(u)K(p);else for(var n=2;n<e.length;n++){var a=1===n?t:c[n-2];null!==e[n].destructorFunction&&e[n].destructorFunction(a)}if(s)return e[0].fromWireType(r)}return i(n(...l))}))}var $r,kr=(r,e,t)=>{if(void 0===r[e].overloadTable){var n=r[e];r[e]=function(...n){return r[e].overloadTable.hasOwnProperty(n.length)||pr(`Function '${t}' called with an invalid number of arguments (${n.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[n.length].apply(this,n)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},Ir=(r,e,t)=>{o.hasOwnProperty(r)?((void 0===t||void 0!==o[r].overloadTable&&void 0!==o[r].overloadTable[t])&&pr(`Cannot register public name '${r}' twice`),kr(o,r,r),o[r].overloadTable.hasOwnProperty(t)&&pr(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),o[r].overloadTable[t]=e):(o[r]=e,o[r].argCount=t)},Or=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(m[e+4*n>>2]);return t},Ur=(r,e,t)=>{o.hasOwnProperty(r)||nr("Replacing nonexistent public symbol"),void 0!==o[r].overloadTable&&void 0!==t?o[r].overloadTable[t]=e:(o[r]=e,o[r].argCount=t)},Dr=[],Vr=r=>{var e=Dr[r];return e||(Dr[r]=e=$r.get(r)),e},Br=(r,e,t=!1)=>{function n(){return Vr(e)}r=cr(r);var a=n();return"function"!=typeof a&&pr(`unknown function pointer with signature ${r}: ${e}`),a};class Mr extends Error{}var jr,Hr=r=>{var e=ze(r),t=cr(e);return Ge(e),t},Nr=(r,e)=>{var t=[],n={};function a(r){n[r]||rr[r]||(er[r]?er[r].forEach(a):(t.push(r),n[r]=!0))}throw e.forEach(a),new Mr(`${r}: `+t.map(Hr).join([", "]))},Lr=r=>{const e=(r=r.trim()).indexOf("(");return-1===e?r:r.slice(0,e)},zr=(r,e,t,n,a,o,i,u)=>{var s=Or(e,t);r=cr(r),r=Lr(r),a=Br(n,a,i),Ir(r,(function(){Nr(`Cannot call ${r} due to unbound types`,s)}),e-1),ar([],s,(t=>{var n=[t[0],null].concat(t.slice(1));return Ur(r,Sr(r,n,null,a,o),e-1),[]}))},Gr=(r,e,t,n,a)=>{e=cr(e);var o=r=>r;if(0===n){var i=32-8*t;o=r=>r<<i>>>i}var u=e.includes("unsigned"),s=(r,e)=>{};dr(r,{name:e,fromWireType:o,toWireType:u?function(r,e){return s(e,this.name),e>>>0}:function(r,e){return s(e,this.name),e},argPackAdvance:mr,readValueFromPointer:hr(e,t,0!==n),destructorFunction:null})},Yr=(r,e,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][e];function a(r){var e=m[r>>2],t=m[r+4>>2];return new n(p.buffer,t,e)}dr(r,{name:t=cr(t),fromWireType:a,argPackAdvance:mr,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},qr=(r,e,t,n)=>{if(!(n>0))return 0;for(var a=t,o=t+n-1,i=0;i<r.length;++i){var u=r.charCodeAt(i);if(u>=55296&&u<=57343&&(u=65536+((1023&u)<<10)|1023&r.charCodeAt(++i)),u<=127){if(t>=o)break;e[t++]=u}else if(u<=2047){if(t+1>=o)break;e[t++]=192|u>>6,e[t++]=128|63&u}else if(u<=65535){if(t+2>=o)break;e[t++]=224|u>>12,e[t++]=128|u>>6&63,e[t++]=128|63&u}else{if(t+3>=o)break;e[t++]=240|u>>18,e[t++]=128|u>>12&63,e[t++]=128|u>>6&63,e[t++]=128|63&u}}return e[t]=0,t-a},Jr=(r,e,t)=>qr(r,v,e,t),Kr=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},Qr="undefined"!=typeof TextDecoder?new TextDecoder:void 0,Xr=(r,e=0,t=NaN)=>{for(var n=e+t,a=e;r[a]&&!(a>=n);)++a;if(a-e>16&&r.buffer&&Qr)return Qr.decode(r.subarray(e,a));for(var o="";e<a;){var i=r[e++];if(128&i){var u=63&r[e++];if(192!=(224&i)){var s=63&r[e++];if((i=224==(240&i)?(15&i)<<12|u<<6|s:(7&i)<<18|u<<12|s<<6|63&r[e++])<65536)o+=String.fromCharCode(i);else{var f=i-65536;o+=String.fromCharCode(55296|f>>10,56320|1023&f)}}else o+=String.fromCharCode((31&i)<<6|u)}else o+=String.fromCharCode(i)}return o},Zr=(r,e)=>r?Xr(v,r,e):"",re=(r,e)=>{dr(r,{name:e=cr(e),fromWireType(r){for(var e,t=m[r>>2],n=r+4,a=n,o=0;o<=t;++o){var i=n+o;if(o==t||0==v[i]){var u=Zr(a,i-a);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),a=i+1}}return Ge(r),e},toWireType(r,e){var t;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var n="string"==typeof e;n||ArrayBuffer.isView(e)&&1==e.BYTES_PER_ELEMENT||pr("Cannot pass non-string to std::string"),t=n?Kr(e):e.length;var a=Ye(4+t+1),o=a+4;return m[a>>2]=t,n?Jr(e,o,t+1):v.set(e,o),null!==r&&r.push(Ge,a),a},argPackAdvance:mr,readValueFromPointer:Q,destructorFunction(r){Ge(r)}})},ee="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,te=(r,e)=>{for(var t=r,n=t>>1,a=n+e/2;!(n>=a)&&h[n];)++n;if((t=n<<1)-r>32&&ee)return ee.decode(v.subarray(r,t));for(var o="",i=0;!(i>=e/2);++i){var u=d[r+2*i>>1];if(0==u)break;o+=String.fromCharCode(u)}return o},ne=(r,e,t)=>{if(t??=2147483647,t<2)return 0;for(var n=e,a=(t-=2)<2*r.length?t/2:r.length,o=0;o<a;++o){var i=r.charCodeAt(o);d[e>>1]=i,e+=2}return d[e>>1]=0,e-n},ae=r=>2*r.length,oe=(r,e)=>{for(var t=0,n="";!(t>=e/4);){var a=g[r+4*t>>2];if(0==a)break;if(++t,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}else n+=String.fromCharCode(a)}return n},ie=(r,e,t)=>{if(t??=2147483647,t<4)return 0;for(var n=e,a=n+t-4,o=0;o<r.length;++o){var i=r.charCodeAt(o);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&r.charCodeAt(++o)),g[e>>2]=i,(e+=4)+4>a)break}return g[e>>2]=0,e-n},ue=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&++t,e+=4}return e},se=(r,e,t)=>{var n,a,o,i;t=cr(t),2===e?(n=te,a=ne,i=ae,o=r=>h[r>>1]):4===e&&(n=oe,a=ie,i=ue,o=r=>m[r>>2]),dr(r,{name:t,fromWireType:r=>{for(var t,a=m[r>>2],i=r+4,u=0;u<=a;++u){var s=r+4+u*e;if(u==a||0==o(s)){var f=n(i,s-i);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),i=s+e}}return Ge(r),t},toWireType:(r,n)=>{"string"!=typeof n&&pr(`Cannot pass non-string to C++ string type ${t}`);var o=i(n),u=Ye(4+o+e);return m[u>>2]=o/e,a(n,u+4,o+e),null!==r&&r.push(Ge,u),u},argPackAdvance:mr,readValueFromPointer:Q,destructorFunction(r){Ge(r)}})},fe=(r,e,t,n,a,o)=>{J[r]={name:cr(e),rawConstructor:Br(t,n),rawDestructor:Br(a,o),elements:[]}},ce=(r,e,t,n,a,o,i,u,s)=>{J[r].elements.push({getterReturnType:e,getter:Br(t,n),getterContext:a,setterArgumentType:o,setter:Br(i,u),setterContext:s})},le=(r,e,t,n,a,o)=>{ir[r]={name:cr(e),rawConstructor:Br(t,n),rawDestructor:Br(a,o),fields:[]}},pe=(r,e,t,n,a,o,i,u,s,f)=>{ir[r].fields.push({fieldName:cr(e),getterReturnType:t,getter:Br(n,a),getterContext:o,setterArgumentType:i,setter:Br(u,s),setterContext:f})},ve=(r,e)=>{dr(r,{isVoid:!0,name:e=cr(e),argPackAdvance:0,fromWireType:()=>{},toWireType:(r,e)=>{}})},de=r=>{r>9&&(Tr[r+1]+=1)},he=()=>Wr.toHandle([]),ge={},me=r=>{var e=ge[r];return void 0===e?cr(r):e},ye=r=>Wr.toHandle(me(r)),we=()=>Wr.toHandle({}),Te=(r,e,t)=>{r=Wr.toValue(r),e=Wr.toValue(e),t=Wr.toValue(t),r[e]=t},be=(r,e)=>{var t=rr[r];return void 0===t&&pr(`${e} has unknown type ${Hr(r)}`),t},Ae=(r,e)=>{var t=(r=be(r,"_emval_take_value")).readValueFromPointer(e);return Wr.toHandle(t)},Ce=(r,e,t,n)=>{var a=(new Date).getFullYear(),o=new Date(a,0,1),i=new Date(a,6,1),u=o.getTimezoneOffset(),s=i.getTimezoneOffset(),f=Math.max(u,s);m[r>>2]=60*f,g[e>>2]=Number(u!=s);var c=r=>{var e=r>=0?"-":"+",t=Math.abs(r);return`UTC${e}${String(Math.floor(t/60)).padStart(2,"0")}${String(t%60).padStart(2,"0")}`},l=c(u),p=c(s);s<u?(Jr(l,t,17),Jr(p,n,17)):(Jr(l,n,17),Jr(p,t,17))},We=()=>2147483648,Pe=(r,e)=>Math.ceil(r/e)*e,Ee=r=>{var e=(r-l.buffer.byteLength+65535)/65536|0;try{return l.grow(e),W(),1}catch(t){}},Fe=r=>{var e=v.length;r>>>=0;var t=We();if(r>t)return!1;for(var n=1;n<=4;n*=2){var a=e*(1+.2/n);a=Math.min(a,r+100663296);var o=Math.min(t,Pe(Math.max(r,a),65536));if(Ee(o))return!0}return!1},_e={},xe=()=>u||"./this.program",Re=()=>{if(!Re.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:xe()};for(var e in _e)void 0===_e[e]?delete r[e]:r[e]=_e[e];var t=[];for(var e in r)t.push(`${e}=${r[e]}`);Re.strings=t}return Re.strings},Se=(r,e)=>{var t=0,n=0;for(var a of Re()){var o=e+t;m[r+n>>2]=o,t+=Jr(a,o,1/0)+1,n+=4}return 0},$e=(r,e)=>{var t=Re();m[r>>2]=t.length;var n=0;for(var a of t)n+=Kr(a)+1;return m[e>>2]=n,0},ke=(r,e)=>{r<128?e.push(r):e.push(r%128|128,r>>7)},Ie=r=>{for(var e={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},t={parameters:[],results:"v"==r[0]?[]:[e[r[0]]]},n=1;n<r.length;++n)t.parameters.push(e[r[n]]);return t},Oe=(r,e)=>{var t=r.slice(0,1),n=r.slice(1),a={i:127,p:127,j:126,f:125,d:124,e:111};for(var o of(e.push(96),ke(n.length,e),n))e.push(a[o]);"v"==t?e.push(0):e.push(1,a[t])},Ue=(r,e)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function(Ie(e),r);var t=[1];Oe(e,t);var n=[0,97,115,109,1,0,0,0,1];ke(t.length,n),n.push(...t),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var a=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(a,{e:{f:r}}).exports.f},De=(r,e)=>{if(jr)for(var t=r;t<r+e;t++){var n=Vr(t);n&&jr.set(n,t)}},Ve=r=>(jr||(jr=new WeakMap,De(0,$r.length)),jr.get(r)||0),Be=[],Me=()=>{if(Be.length)return Be.pop();try{$r.grow(1)}catch(A){if(!(A instanceof RangeError))throw A;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return $r.length-1},je=(r,e)=>{$r.set(r,e),Dr[r]=$r.get(r)},He=(r,e)=>{var t=Ve(r);if(t)return t;var n=Me();try{je(n,r)}catch(A){if(!(A instanceof TypeError))throw A;var a=Ue(r,e);je(n,a)}return jr.set(r,n),n};fr(),Cr(),o.noExitRuntime&&o.noExitRuntime,o.print&&o.print,o.printErr&&(A=o.printErr),o.wasmBinary&&(c=o.wasmBinary),o.arguments&&o.arguments,o.thisProgram&&(u=o.thisProgram),o.addFunction=He,o.UTF8ToString=Zr;var Ne={k:Y,y:q,l:or,t:ur,q:gr,r:yr,B:Er,p:_r,c:zr,h:Gr,b:Yr,C:re,n:se,m:fe,d:ce,u:le,i:pe,s:ve,a:br,o:de,A:he,g:ye,j:we,e:Te,f:Ae,v:Ce,z:Fe,w:Se,x:$e},Le=await M();Le.E;var ze=Le.F,Ge=o._free=Le.H,Ye=o._malloc=Le.I;function qe(){function r(){o.calledRun=!0,C||(E(),e(o),o.onRuntimeInitialized?.(),F())}x>0?R=qe:(P(),x>0?R=qe:o.setStatus?(o.setStatus("Running..."),setTimeout((()=>{setTimeout((()=>o.setStatus("")),1),r()}),1)):r())}function Je(){if(o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.shift()()}return Je(),qe(),i},r.exports=a,r.exports.default=a),t.exports;var r,n,a}const a=r(n()),o=Object.freeze(Object.defineProperty({__proto__:null,default:a},Symbol.toStringTag,{value:"Module"}));export{o as l};
|
|
5
|
+
import{g as r}from"./_commonjsHelpers.js";var e,t={exports:{}};function n(){return e||(e=1,r=t,n="undefined"!=typeof document?document.currentScript?.src:void 0,a=async function(r={}){var e,t,a,o=r,i=new Promise(((r,n)=>{e=r,t=n})),u="./this.program",s="";function f(r){return o.locateFile?o.locateFile(r,s):s+r}"undefined"!=typeof document&&document.currentScript&&(s=document.currentScript.src),n&&(s=n),s=s.startsWith("blob:")?"":s.slice(0,s.replace(/[?#].*/,"").lastIndexOf("/")+1),a=async r=>{var e=await fetch(r,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)},console.log.bind(console);var c,l,p,v,d,h,g,m,y,w,T,b,A=console.error.bind(console),C=!1;function W(){var r=l.buffer;p=new Int8Array(r),d=new Int16Array(r),o.HEAPU8=v=new Uint8Array(r),h=new Uint16Array(r),g=new Int32Array(r),o.HEAPU32=m=new Uint32Array(r),y=new Float32Array(r),o.HEAPF64=b=new Float64Array(r),w=new BigInt64Array(r),T=new BigUint64Array(r)}function P(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)z(o.preRun.shift());j(L)}function E(){Le.E()}function F(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)N(o.postRun.shift());j(H)}var _,x=0,R=null;function S(r){x++,o.monitorRunDependencies?.(x)}function $(r){if(x--,o.monitorRunDependencies?.(x),0==x&&R){var e=R;R=null,e()}}function k(r){o.onAbort?.(r),A(r="Aborted("+r+")"),C=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw t(e),e}function I(){return f("lyr3DMain.wasm")}function O(r){if(r==_&&c)return new Uint8Array(c);throw"both async and sync fetching of the wasm failed"}async function U(r){if(!c)try{var e=await a(r);return new Uint8Array(e)}catch{}return O(r)}async function D(r,e){try{var t=await U(r);return await WebAssembly.instantiate(t,e)}catch(n){A(`failed to asynchronously prepare wasm: ${n}`),k(n)}}async function V(r,e,t){if(!r&&"function"==typeof WebAssembly.instantiateStreaming)try{var n=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(n,t)}catch(a){A(`wasm streaming compile failed: ${a}`),A("falling back to ArrayBuffer instantiation")}return D(e,t)}function B(){return{a:Ne}}async function M(){function r(r,e){return Le=r.exports,l=Le.D,W(),$r=Le.G,$(),Le}function e(e){return r(e.instance)}S();var n=B();if(o.instantiateWasm)return new Promise(((e,t)=>{o.instantiateWasm(n,((t,n)=>{e(r(t))}))}));_??=I();try{return e(await V(c,_,n))}catch(a){return t(a),Promise.reject(a)}}var j=r=>{for(;r.length>0;)r.shift()(o)},H=[],N=r=>H.push(r),L=[],z=r=>L.push(r);class G{constructor(r){this.excPtr=r,this.ptr=r-24}set_type(r){m[this.ptr+4>>2]=r}get_type(){return m[this.ptr+4>>2]}set_destructor(r){m[this.ptr+8>>2]=r}get_destructor(){return m[this.ptr+8>>2]}set_caught(r){r=r?1:0,p[this.ptr+12]=r}get_caught(){return 0!=p[this.ptr+12]}set_rethrown(r){r=r?1:0,p[this.ptr+13]=r}get_rethrown(){return 0!=p[this.ptr+13]}init(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e)}set_adjusted_ptr(r){m[this.ptr+16>>2]=r}get_adjusted_ptr(){return m[this.ptr+16>>2]}}var Y=(r,e,t)=>{throw new G(r).init(e,t),r},q=()=>k(""),J={},K=r=>{for(;r.length;){var e=r.pop();r.pop()(e)}};function Q(r){return this.fromWireType(m[r>>2])}var X,Z={},rr={},er={},tr=o.InternalError=class extends Error{constructor(r){super(r),this.name="InternalError"}},nr=r=>{throw new tr(r)},ar=(r,e,t)=>{function n(e){var n=t(e);n.length!==r.length&&nr("Mismatched type converter count");for(var a=0;a<r.length;++a)dr(r[a],n[a])}r.forEach((r=>er[r]=e));var a=new Array(e.length),o=[],i=0;e.forEach(((r,e)=>{rr.hasOwnProperty(r)?a[e]=rr[r]:(o.push(r),Z.hasOwnProperty(r)||(Z[r]=[]),Z[r].push((()=>{a[e]=rr[r],++i===o.length&&n(a)})))})),0===o.length&&n(a)},or=r=>{var e=J[r];delete J[r];var t=e.elements,n=t.length,a=t.map((r=>r.getterReturnType)).concat(t.map((r=>r.setterArgumentType))),o=e.rawConstructor,i=e.rawDestructor;ar([r],a,(r=>(t.forEach(((e,t)=>{var a=r[t],o=e.getter,i=e.getterContext,u=r[t+n],s=e.setter,f=e.setterContext;e.read=r=>a.fromWireType(o(i,r)),e.write=(r,e)=>{var t=[];s(f,r,u.toWireType(t,e)),K(t)}})),[{name:e.name,fromWireType:r=>{for(var e=new Array(n),a=0;a<n;++a)e[a]=t[a].read(r);return i(r),e},toWireType:(r,a)=>{if(n!==a.length)throw new TypeError(`Incorrect number of tuple elements for ${e.name}: expected=${n}, actual=${a.length}`);for(var u=o(),s=0;s<n;++s)t[s].write(u,a[s]);return null!==r&&r.push(i,u),u},argPackAdvance:mr,readValueFromPointer:Q,destructorFunction:i}])))},ir={},ur=r=>{var e=ir[r];delete ir[r];var t=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map((r=>r.getterReturnType)).concat(a.map((r=>r.setterArgumentType)));ar([r],o,(r=>{var o={};return a.forEach(((e,t)=>{var n=e.fieldName,i=r[t],u=r[t].optional,s=e.getter,f=e.getterContext,c=r[t+a.length],l=e.setter,p=e.setterContext;o[n]={read:r=>i.fromWireType(s(f,r)),write:(r,e)=>{var t=[];l(p,r,c.toWireType(t,e)),K(t)},optional:u}})),[{name:e.name,fromWireType:r=>{var e={};for(var t in o)e[t]=o[t].read(r);return n(r),e},toWireType:(r,e)=>{for(var a in o)if(!(a in e)&&!o[a].optional)throw new TypeError(`Missing field: "${a}"`);var i=t();for(a in o)o[a].write(i,e[a]);return null!==r&&r.push(n,i),i},argPackAdvance:mr,readValueFromPointer:Q,destructorFunction:n}]}))},sr=r=>{if(null===r)return"null";var e=typeof r;return"object"===e||"array"===e||"function"===e?r.toString():""+r},fr=()=>{for(var r=new Array(256),e=0;e<256;++e)r[e]=String.fromCharCode(e);X=r},cr=r=>{for(var e="",t=r;v[t];)e+=X[v[t++]];return e},lr=o.BindingError=class extends Error{constructor(r){super(r),this.name="BindingError"}},pr=r=>{throw new lr(r)};function vr(r,e,t={}){var n=e.name;if(r||pr(`type "${n}" must have a positive integer typeid pointer`),rr.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;pr(`Cannot register type '${n}' twice`)}if(rr[r]=e,delete er[r],Z.hasOwnProperty(r)){var a=Z[r];delete Z[r],a.forEach((r=>r()))}}function dr(r,e,t={}){return vr(r,e,t)}var hr=(r,e,t)=>{switch(e){case 1:return t?r=>p[r]:r=>v[r];case 2:return t?r=>d[r>>1]:r=>h[r>>1];case 4:return t?r=>g[r>>2]:r=>m[r>>2];case 8:return t?r=>w[r>>3]:r=>T[r>>3];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},gr=(r,e,t,n,a)=>{var o=-1!=(e=cr(e)).indexOf("u");dr(r,{name:e,fromWireType:r=>r,toWireType:function(r,e){if("bigint"!=typeof e&&"number"!=typeof e)throw new TypeError(`Cannot convert "${sr(e)}" to ${this.name}`);return"number"==typeof e&&(e=BigInt(e)),e},argPackAdvance:mr,readValueFromPointer:hr(e,t,!o),destructorFunction:null})},mr=8,yr=(r,e,t,n)=>{dr(r,{name:e=cr(e),fromWireType:function(r){return!!r},toWireType:function(r,e){return e?t:n},argPackAdvance:mr,readValueFromPointer:function(r){return this.fromWireType(v[r])},destructorFunction:null})},wr=[],Tr=[],br=r=>{r>9&&0==--Tr[r+1]&&(Tr[r]=void 0,wr.push(r))},Ar=()=>Tr.length/2-5-wr.length,Cr=()=>{Tr.push(0,1,void 0,1,null,1,!0,1,!1,1),o.count_emval_handles=Ar},Wr={toValue:r=>(r||pr(`Cannot use deleted val. handle = ${r}`),Tr[r]),toHandle:r=>{switch(r){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=wr.pop()||Tr.length;return Tr[e]=r,Tr[e+1]=1,e}}}},Pr={name:"emscripten::val",fromWireType:r=>{var e=Wr.toValue(r);return br(r),e},toWireType:(r,e)=>Wr.toHandle(e),argPackAdvance:mr,readValueFromPointer:Q,destructorFunction:null},Er=r=>dr(r,Pr),Fr=(r,e)=>{switch(e){case 4:return function(r){return this.fromWireType(y[r>>2])};case 8:return function(r){return this.fromWireType(b[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},_r=(r,e,t)=>{dr(r,{name:e=cr(e),fromWireType:r=>r,toWireType:(r,e)=>e,argPackAdvance:mr,readValueFromPointer:Fr(e,t),destructorFunction:null})},xr=(r,e)=>Object.defineProperty(e,"name",{value:r});function Rr(r){for(var e=1;e<r.length;++e)if(null!==r[e]&&void 0===r[e].destructorFunction)return!0;return!1}function Sr(r,e,t,n,a,o){var i=e.length;i<2&&pr("argTypes array size mismatch! Must at least get return value and 'this' types!"),e[1];var u=Rr(e),s="void"!==e[0].name,f=i-2,c=new Array(f),l=[],p=[];return xr(r,(function(...r){var t;p.length=0,l.length=1,l[0]=a;for(var o=0;o<f;++o)c[o]=e[o+2].toWireType(p,r[o]),l.push(c[o]);function i(r){if(u)K(p);else for(var n=2;n<e.length;n++){var a=1===n?t:c[n-2];null!==e[n].destructorFunction&&e[n].destructorFunction(a)}if(s)return e[0].fromWireType(r)}return i(n(...l))}))}var $r,kr=(r,e,t)=>{if(void 0===r[e].overloadTable){var n=r[e];r[e]=function(...n){return r[e].overloadTable.hasOwnProperty(n.length)||pr(`Function '${t}' called with an invalid number of arguments (${n.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[n.length].apply(this,n)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},Ir=(r,e,t)=>{o.hasOwnProperty(r)?((void 0===t||void 0!==o[r].overloadTable&&void 0!==o[r].overloadTable[t])&&pr(`Cannot register public name '${r}' twice`),kr(o,r,r),o[r].overloadTable.hasOwnProperty(t)&&pr(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),o[r].overloadTable[t]=e):(o[r]=e,o[r].argCount=t)},Or=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(m[e+4*n>>2]);return t},Ur=(r,e,t)=>{o.hasOwnProperty(r)||nr("Replacing nonexistent public symbol"),void 0!==o[r].overloadTable&&void 0!==t?o[r].overloadTable[t]=e:(o[r]=e,o[r].argCount=t)},Dr=[],Vr=r=>{var e=Dr[r];return e||(Dr[r]=e=$r.get(r)),e},Br=(r,e,t=!1)=>{function n(){return Vr(e)}r=cr(r);var a=n();return"function"!=typeof a&&pr(`unknown function pointer with signature ${r}: ${e}`),a};class Mr extends Error{}var jr,Hr=r=>{var e=ze(r),t=cr(e);return Ye(e),t},Nr=(r,e)=>{var t=[],n={};function a(r){n[r]||rr[r]||(er[r]?er[r].forEach(a):(t.push(r),n[r]=!0))}throw e.forEach(a),new Mr(`${r}: `+t.map(Hr).join([", "]))},Lr=r=>{const e=(r=r.trim()).indexOf("(");return-1===e?r:r.slice(0,e)},zr=(r,e,t,n,a,o,i,u)=>{var s=Or(e,t);r=cr(r),r=Lr(r),a=Br(n,a,i),Ir(r,(function(){Nr(`Cannot call ${r} due to unbound types`,s)}),e-1),ar([],s,(t=>{var n=[t[0],null].concat(t.slice(1));return Ur(r,Sr(r,n,null,a,o),e-1),[]}))},Gr=(r,e,t,n,a)=>{e=cr(e);var o=r=>r;if(0===n){var i=32-8*t;o=r=>r<<i>>>i}var u=e.includes("unsigned"),s=(r,e)=>{};dr(r,{name:e,fromWireType:o,toWireType:u?function(r,e){return s(e,this.name),e>>>0}:function(r,e){return s(e,this.name),e},argPackAdvance:mr,readValueFromPointer:hr(e,t,0!==n),destructorFunction:null})},Yr=(r,e,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][e];function a(r){var e=m[r>>2],t=m[r+4>>2];return new n(p.buffer,t,e)}dr(r,{name:t=cr(t),fromWireType:a,argPackAdvance:mr,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},qr=(r,e,t,n)=>{if(!(n>0))return 0;for(var a=t,o=t+n-1,i=0;i<r.length;++i){var u=r.charCodeAt(i);if(u>=55296&&u<=57343&&(u=65536+((1023&u)<<10)|1023&r.charCodeAt(++i)),u<=127){if(t>=o)break;e[t++]=u}else if(u<=2047){if(t+1>=o)break;e[t++]=192|u>>6,e[t++]=128|63&u}else if(u<=65535){if(t+2>=o)break;e[t++]=224|u>>12,e[t++]=128|u>>6&63,e[t++]=128|63&u}else{if(t+3>=o)break;e[t++]=240|u>>18,e[t++]=128|u>>12&63,e[t++]=128|u>>6&63,e[t++]=128|63&u}}return e[t]=0,t-a},Jr=(r,e,t)=>qr(r,v,e,t),Kr=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},Qr="undefined"!=typeof TextDecoder?new TextDecoder:void 0,Xr=(r,e=0,t=NaN)=>{for(var n=e+t,a=e;r[a]&&!(a>=n);)++a;if(a-e>16&&r.buffer&&Qr)return Qr.decode(r.subarray(e,a));for(var o="";e<a;){var i=r[e++];if(128&i){var u=63&r[e++];if(192!=(224&i)){var s=63&r[e++];if((i=224==(240&i)?(15&i)<<12|u<<6|s:(7&i)<<18|u<<12|s<<6|63&r[e++])<65536)o+=String.fromCharCode(i);else{var f=i-65536;o+=String.fromCharCode(55296|f>>10,56320|1023&f)}}else o+=String.fromCharCode((31&i)<<6|u)}else o+=String.fromCharCode(i)}return o},Zr=(r,e)=>r?Xr(v,r,e):"",re=(r,e)=>{dr(r,{name:e=cr(e),fromWireType(r){for(var e,t=m[r>>2],n=r+4,a=n,o=0;o<=t;++o){var i=n+o;if(o==t||0==v[i]){var u=Zr(a,i-a);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),a=i+1}}return Ye(r),e},toWireType(r,e){var t;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var n="string"==typeof e;n||ArrayBuffer.isView(e)&&1==e.BYTES_PER_ELEMENT||pr("Cannot pass non-string to std::string"),t=n?Kr(e):e.length;var a=Ge(4+t+1),o=a+4;return m[a>>2]=t,n?Jr(e,o,t+1):v.set(e,o),null!==r&&r.push(Ye,a),a},argPackAdvance:mr,readValueFromPointer:Q,destructorFunction(r){Ye(r)}})},ee="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,te=(r,e)=>{for(var t=r,n=t>>1,a=n+e/2;!(n>=a)&&h[n];)++n;if((t=n<<1)-r>32&&ee)return ee.decode(v.subarray(r,t));for(var o="",i=0;!(i>=e/2);++i){var u=d[r+2*i>>1];if(0==u)break;o+=String.fromCharCode(u)}return o},ne=(r,e,t)=>{if(t??=2147483647,t<2)return 0;for(var n=e,a=(t-=2)<2*r.length?t/2:r.length,o=0;o<a;++o){var i=r.charCodeAt(o);d[e>>1]=i,e+=2}return d[e>>1]=0,e-n},ae=r=>2*r.length,oe=(r,e)=>{for(var t=0,n="";!(t>=e/4);){var a=g[r+4*t>>2];if(0==a)break;if(++t,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}else n+=String.fromCharCode(a)}return n},ie=(r,e,t)=>{if(t??=2147483647,t<4)return 0;for(var n=e,a=n+t-4,o=0;o<r.length;++o){var i=r.charCodeAt(o);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&r.charCodeAt(++o)),g[e>>2]=i,(e+=4)+4>a)break}return g[e>>2]=0,e-n},ue=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&++t,e+=4}return e},se=(r,e,t)=>{var n,a,o,i;t=cr(t),2===e?(n=te,a=ne,i=ae,o=r=>h[r>>1]):4===e&&(n=oe,a=ie,i=ue,o=r=>m[r>>2]),dr(r,{name:t,fromWireType:r=>{for(var t,a=m[r>>2],i=r+4,u=0;u<=a;++u){var s=r+4+u*e;if(u==a||0==o(s)){var f=n(i,s-i);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),i=s+e}}return Ye(r),t},toWireType:(r,n)=>{"string"!=typeof n&&pr(`Cannot pass non-string to C++ string type ${t}`);var o=i(n),u=Ge(4+o+e);return m[u>>2]=o/e,a(n,u+4,o+e),null!==r&&r.push(Ye,u),u},argPackAdvance:mr,readValueFromPointer:Q,destructorFunction(r){Ye(r)}})},fe=(r,e,t,n,a,o)=>{J[r]={name:cr(e),rawConstructor:Br(t,n),rawDestructor:Br(a,o),elements:[]}},ce=(r,e,t,n,a,o,i,u,s)=>{J[r].elements.push({getterReturnType:e,getter:Br(t,n),getterContext:a,setterArgumentType:o,setter:Br(i,u),setterContext:s})},le=(r,e,t,n,a,o)=>{ir[r]={name:cr(e),rawConstructor:Br(t,n),rawDestructor:Br(a,o),fields:[]}},pe=(r,e,t,n,a,o,i,u,s,f)=>{ir[r].fields.push({fieldName:cr(e),getterReturnType:t,getter:Br(n,a),getterContext:o,setterArgumentType:i,setter:Br(u,s),setterContext:f})},ve=(r,e)=>{dr(r,{isVoid:!0,name:e=cr(e),argPackAdvance:0,fromWireType:()=>{},toWireType:(r,e)=>{}})},de=r=>{r>9&&(Tr[r+1]+=1)},he=()=>Wr.toHandle([]),ge={},me=r=>{var e=ge[r];return void 0===e?cr(r):e},ye=r=>Wr.toHandle(me(r)),we=()=>Wr.toHandle({}),Te=(r,e,t)=>{r=Wr.toValue(r),e=Wr.toValue(e),t=Wr.toValue(t),r[e]=t},be=(r,e)=>{var t=rr[r];return void 0===t&&pr(`${e} has unknown type ${Hr(r)}`),t},Ae=(r,e)=>{var t=(r=be(r,"_emval_take_value")).readValueFromPointer(e);return Wr.toHandle(t)},Ce=(r,e,t,n)=>{var a=(new Date).getFullYear(),o=new Date(a,0,1),i=new Date(a,6,1),u=o.getTimezoneOffset(),s=i.getTimezoneOffset(),f=Math.max(u,s);m[r>>2]=60*f,g[e>>2]=Number(u!=s);var c=r=>{var e=r>=0?"-":"+",t=Math.abs(r);return`UTC${e}${String(Math.floor(t/60)).padStart(2,"0")}${String(t%60).padStart(2,"0")}`},l=c(u),p=c(s);s<u?(Jr(l,t,17),Jr(p,n,17)):(Jr(l,n,17),Jr(p,t,17))},We=()=>2147483648,Pe=(r,e)=>Math.ceil(r/e)*e,Ee=r=>{var e=(r-l.buffer.byteLength+65535)/65536|0;try{return l.grow(e),W(),1}catch(t){}},Fe=r=>{var e=v.length;r>>>=0;var t=We();if(r>t)return!1;for(var n=1;n<=4;n*=2){var a=e*(1+.2/n);a=Math.min(a,r+100663296);var o=Math.min(t,Pe(Math.max(r,a),65536));if(Ee(o))return!0}return!1},_e={},xe=()=>u||"./this.program",Re=()=>{if(!Re.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:xe()};for(var e in _e)void 0===_e[e]?delete r[e]:r[e]=_e[e];var t=[];for(var e in r)t.push(`${e}=${r[e]}`);Re.strings=t}return Re.strings},Se=(r,e)=>{var t=0,n=0;for(var a of Re()){var o=e+t;m[r+n>>2]=o,t+=Jr(a,o,1/0)+1,n+=4}return 0},$e=(r,e)=>{var t=Re();m[r>>2]=t.length;var n=0;for(var a of t)n+=Kr(a)+1;return m[e>>2]=n,0},ke=(r,e)=>{r<128?e.push(r):e.push(r%128|128,r>>7)},Ie=r=>{for(var e={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},t={parameters:[],results:"v"==r[0]?[]:[e[r[0]]]},n=1;n<r.length;++n)t.parameters.push(e[r[n]]);return t},Oe=(r,e)=>{var t=r.slice(0,1),n=r.slice(1),a={i:127,p:127,j:126,f:125,d:124,e:111};for(var o of(e.push(96),ke(n.length,e),n))e.push(a[o]);"v"==t?e.push(0):e.push(1,a[t])},Ue=(r,e)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function(Ie(e),r);var t=[1];Oe(e,t);var n=[0,97,115,109,1,0,0,0,1];ke(t.length,n),n.push(...t),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var a=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(a,{e:{f:r}}).exports.f},De=(r,e)=>{if(jr)for(var t=r;t<r+e;t++){var n=Vr(t);n&&jr.set(n,t)}},Ve=r=>(jr||(jr=new WeakMap,De(0,$r.length)),jr.get(r)||0),Be=[],Me=()=>{if(Be.length)return Be.pop();try{$r.grow(1)}catch(A){if(!(A instanceof RangeError))throw A;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return $r.length-1},je=(r,e)=>{$r.set(r,e),Dr[r]=$r.get(r)},He=(r,e)=>{var t=Ve(r);if(t)return t;var n=Me();try{je(n,r)}catch(A){if(!(A instanceof TypeError))throw A;var a=Ue(r,e);je(n,a)}return jr.set(r,n),n};fr(),Cr(),o.noExitRuntime&&o.noExitRuntime,o.print&&o.print,o.printErr&&(A=o.printErr),o.wasmBinary&&(c=o.wasmBinary),o.arguments&&o.arguments,o.thisProgram&&(u=o.thisProgram),o.addFunction=He,o.UTF8ToString=Zr;var Ne={k:Y,y:q,l:or,t:ur,q:gr,r:yr,B:Er,p:_r,c:zr,h:Gr,b:Yr,C:re,n:se,m:fe,d:ce,u:le,i:pe,s:ve,a:br,o:de,A:he,g:ye,j:we,e:Te,f:Ae,v:Ce,z:Fe,w:Se,x:$e},Le=await M();Le.E;var ze=Le.F,Ge=o._malloc=Le.H,Ye=o._free=Le.I;function qe(){function r(){o.calledRun=!0,C||(E(),e(o),o.onRuntimeInitialized?.(),F())}x>0?R=qe:(P(),x>0?R=qe:o.setStatus?(o.setStatus("Running..."),setTimeout((()=>{setTimeout((()=>o.setStatus("")),1),r()}),1)):r())}function Je(){if(o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.shift()()}return Je(),qe(),i},r.exports=a,r.exports.default=a),t.exports;var r,n,a}const a=r(n()),o=Object.freeze(Object.defineProperty({__proto__:null,default:a},Symbol.toStringTag,{value:"Module"}));export{o as l};
|
package/core/Accessor.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{deprecatedFunction as e}from"./deprecate.js";import t from"./Handles.js";import r from"./Logger.js";import{destroyMaybe as s}from"./maybe.js";import{beforeDestroySymbol as o}from"./accessorSupport/beforeDestroy.js";import{get as
|
|
5
|
+
import{deprecatedFunction as e}from"./deprecate.js";import t from"./Handles.js";import r from"./Logger.js";import{destroyMaybe as s}from"./maybe.js";import{beforeDestroySymbol as o}from"./accessorSupport/beforeDestroy.js";import{get as c}from"./accessorSupport/get.js";import{Lifecycle as i}from"./accessorSupport/Lifecycle.js";import{getPropertiesMetadata as a}from"./accessorSupport/metadata.js";import n from"./accessorSupport/Properties.js";import{set as _}from"./accessorSupport/set.js";import{getAccessorInterceptor as h}from"./accessorSupport/testSupport.js";import{removeTarget as p,watch as l}from"./accessorSupport/watch.js";import{property as u}from"./accessorSupport/decorators/property.js";import{subclass as d}from"./accessorSupport/decorators/subclass.js";var f,y;function m(e){if(null==e)return{value:e};if(Array.isArray(e))return{type:[e[0]],value:null};switch(typeof e){case"object":return e.constructor?.__accessorMetadata__||e instanceof Date?{type:e.constructor,value:e}:e;case"boolean":return{type:Boolean,value:e};case"string":return{type:String,value:e};case"number":return{type:Number,value:e};case"function":return{type:e,value:null};default:return}}const v=Symbol("Accessor-Handles"),g=Symbol("Accessor-Initialized");class b{static{f=v,y=g}static createSubclass(e={}){if(Array.isArray(e))throw new Error("Multi-inheritance unsupported since 4.16");const{properties:t,declaredClass:r,constructor:s}=e;delete e.declaredClass,delete e.properties,delete e.constructor;const o=this;class c extends o{constructor(...e){super(...e),this.inherited=null,s&&s.apply(this,e)}}a(c.prototype);for(const i in e){const t=e[i];c.prototype[i]="function"==typeof t?function(...e){const r=this.inherited;let s;this.inherited=function(...e){if(o.prototype[i])return o.prototype[i].apply(this,e)};try{s=t.apply(this,e)}catch(c){throw this.inherited=r,c}return this.inherited=r,s}:e[i]}for(const i in t){const e=m(t[i]);u(e)(c.prototype,i)}return d(r)(c)}static freeze(e){return e instanceof b?e.__accessor__.mutable=!1:Object.freeze(e),e}static isFrozen(e){return e instanceof b?!e.__accessor__.mutable:Object.isFrozen(e)}constructor(...e){if(this[f]=null,this[y]=!1,this.constructor===b)throw new Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");const t=new n(this);Object.defineProperty(this,"__accessor__",{enumerable:!1,value:t}),e.length>0&&(t.ctorArgs=this.normalizeCtorArgs?.apply(this,e)??e[0]),h()?.onInstanceConstruct(this)}postscript(){const e=this.__accessor__,t=e.ctorArgs;e.initialize(),t&&(this.set(t),e.ctorArgs=null),e.constructed(),this.initialize(),this[g]=!0}initialize(){}[o](){this[v]=s(this[v])}destroy(){this.destroyed||(p(this),this.__accessor__.destroy(),h()?.onInstanceDestroy(this))}[Symbol.dispose](){this.destroy()}get constructed(){return this.__accessor__&&this.__accessor__.initialized||!1}get initialized(){return this[g]}get destroyed(){return this.__accessor__?.lifecycle===i.DESTROYED||!1}get destroying(){return this.__accessor__?.lifecycle===i.DESTROYING||!1}commitProperty(e){c(this,e)}hasOwnProperty(e){return this.__accessor__?this.__accessor__.has(e):Object.prototype.hasOwnProperty.call(this,e)}keys(){return this.__accessor__?this.__accessor__.keys():[]}set(e,t){return _(this,e,t),this}watch(t,s,o){return e(r.getLogger(this),"`watch` is deprecated in favor of reactiveUtils.watch",{replacement:"reactiveUtils.watch",version:"4.32",see:"https://arcg.is/1vaqf42#watch",warnOnce:!0}),l(this,t,s,o)}addHandles(e,r){if(this.destroyed){const t=Array.isArray(e)?e:[e];for(const e of t)e.remove();return}(this[v]??=new t).add(e,r)}removeHandles(e){this[v]?.remove(e)}removeAllHandles(){this[v]?.removeAll()}removeHandlesReference(e){this[v]?.removeReference(e)}hasHandles(e){return!0===this[v]?.has(e)}_override(e,t){void 0===t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_clearOverride(e){return this.__accessor__.clearOverride(e)}_overrideIfSome(e,t){null==t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_isOverridden(e){return this.__accessor__.isOverridden(e)}notifyChange(e){this.__accessor__.notifyChange(e)}_get(e){return this.__accessor__.internalGet(e)}_set(e,t){return this.__accessor__.internalSet(e,t),this}}export{b as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../has.js";import{equals as t}from"../lang.js";import"../Logger.js";import e from"../ObjectPool.js";import{Lifecycle as i}from"./
|
|
5
|
+
import"../has.js";import{equals as t}from"../lang.js";import"../Logger.js";import e from"../ObjectPool.js";import{Lifecycle as i}from"./Lifecycle.js";import{Property as s}from"./Property.js";import{OriginId as r,idToName as n,nameToId as o}from"./PropertyOrigin.js";import{Store as a}from"./Store.js";import{trackAccess as c,runTracked as l,initializeDependencyTracking as h}from"./tracking.js";import{Flags as g}from"./tracking/Flags.js";import{TrackingTarget as f}from"./tracking/TrackingTarget.js";function p(t,e,i){return void 0!==t}function m(t,e,s,r){return void 0!==t&&(!(null==s&&t.flags&g.NonNullable)||(r.lifecycle,i.INITIALIZING,!1))}class u{constructor(t){this.host=t,this.propertiesByName=new Map,this.ctorArgs=null,this.lifecycle=i.INITIALIZING,this.store=new a,this.mutable=!0,this._origin=r.USER;const e=this.host.constructor.__accessorMetadata__;for(const i in e){const t=new s(i,e[i]);this.propertiesByName.set(i,t)}this.metadata=e}initialize(){this.lifecycle=i.CONSTRUCTING}constructed(){this.lifecycle=i.CONSTRUCTED}destroy(){this.lifecycle=i.DESTROYED,this.propertiesByName.forEach((t=>t.destroy()))}get initialized(){return this.lifecycle!==i.INITIALIZING}get(t){const e=this.propertiesByName.get(t);if(!p(e))return;if(e.metadata.get)return e.getComputed(this);this.mutable&&c(e);const i=this.store;return i.has(t)?i.get(t):e.metadata.value}originOf(t){const e=this.store.originOf(t);if(void 0===e){const e=this.propertiesByName.get(t);if(void 0!==e&&e.flags&g.HasDefaultValue)return"defaults"}return n(e)}has(t){return this.propertiesByName.has(t)&&this.store.has(t)}keys(){return[...this.propertiesByName.keys()]}internalGet(t){const e=this.propertiesByName.get(t);if(p(e))return this.store.has(t)?this.store.get(t):e.metadata.value}internalSet(t,e){const i=this.propertiesByName.get(t);p(i)&&this._internalSet(i,e)}getDependsInfo(t,e,i){const r=this.propertiesByName.get(e);if(!p(r))return"";const n=new f,o=l(n,(()=>r.metadata.get?.call(t)));let a=`${i}${t.declaredClass.split(".").pop()}.${e}: ${o}\n`;const c=n.accessed??new Set;if(0===c.size)return a;i+=" ";for(const l of c){if(!(l instanceof s))continue;a+=`${i}${l.propertyName}: undefined\n`}return a}setAtOrigin(t,e,i){const s=this.propertiesByName.get(t);if(p(s))return this._setAtOrigin(s,e,i)}isOverridden(t){const e=this.propertiesByName.get(t);return void 0!==e&&!!(e.flags&g.Overridden)}clearOrigin(t,e){const i=this.store,s=this.propertiesByName.get(t);if(!p(s))return;const r=i.isAtOrigin(t,e)&&!(s.flags&g.Overridden);i.delete(t,e),r&&s.notifyChange()}clearOverride(t){const e=this.propertiesByName.get(t);e&&e.flags&g.Overridden&&(e.flags&=~g.Overridden,e.notifyChange())}override(t,e){const i=this.propertiesByName.get(t);if(!m(i,t,e,this))return;const s=i.metadata.cast;if(s){const t=this._cast(s,e),{valid:i,value:r}=t;if(y.release(t),!i)return;e=r}i.flags|=g.Overridden,this._internalSet(i,e)}set(t,e){const i=this.propertiesByName.get(t);if(!m(i,t,e,this))return;const s=i.metadata.cast;if(s){const t=this._cast(s,e),{valid:i,value:r}=t;if(y.release(t),!i)return;e=r}const r=i.metadata.set;r?r.call(this.host,e):this._internalSet(i,e)}setDefaultOrigin(t){this._origin=o(t)}getDefaultOrigin(){return n(this._origin)}notifyChange(t){const e=this.propertiesByName.get(t);void 0!==e&&e.notifyChange()}invalidate(t){const e=this.propertiesByName.get(t);void 0!==e&&e.invalidate()}commit(t){const e=this.propertiesByName.get(t);void 0!==e&&e.commit()}_internalSet(t,e){const s=this.lifecycle!==i.INITIALIZING?this._origin:r.DEFAULTS;this._setAtOrigin(t,e,s)}_setAtOrigin(e,i,s){const r=this.store,n=e.propertyName;if(r.isAtOrigin(n,s)&&t(i,r.get(n))&&~e.flags&g.Overridden)return;const o=r.isBelowOrigin(n,s)||r.isAtOrigin(n,s);o&&e.invalidate(),r.set(n,i,s),o&&e.commit(),h(this.host,e)}_cast(t,e){const i=y.acquire();return i.valid=!0,i.value=e,t&&(i.value=t.call(this.host,e,i)),i}}class d{constructor(){this.value=null,this.valid=!0}acquire(){this.valid=!0}release(){this.value=null}}const y=new e(d);export{u as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../has.js";import e from"../../Logger.js";import{beforeDestroySymbol as t}from"../beforeDestroy.js";import{Lifecycle as r}from"../
|
|
5
|
+
import"../../has.js";import e from"../../Logger.js";import{beforeDestroySymbol as t}from"../beforeDestroy.js";import{Lifecycle as r}from"../Lifecycle.js";import{getPropertiesMetadata as o}from"../metadata.js";import{trackAccess as s}from"../tracking.js";import{processPrototypePropertyMetadata as i}from"../extensions/serializableProperty.js";const n=new Set,c=new Set;function a(e){return s=>{e??="esri.core.Accessor",s.prototype.declaredClass=e,p(s);const i=[],a=[];let l=s.prototype;for(;l;)l.hasOwnProperty("initialize")&&!n.has(l.initialize)&&(n.add(l.initialize),i.push(l.initialize)),l.hasOwnProperty("destroy")&&!c.has(l.destroy)&&(c.add(l.destroy),a.push(l.destroy)),l=Object.getPrototypeOf(l);n.clear(),c.clear();const f=class extends s{constructor(...e){if(super(...e),this.constructor===f&&"function"==typeof this.postscript){if(i.length&&Object.defineProperty(this,"initialize",{enumerable:!1,configurable:!0,value(){for(let e=i.length-1;e>=0;e--)i[e].call(this)}}),a.length){let e=!1;const o=this[t];Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!e){this.__accessor__.lifecycle=r.DESTROYING,e=!0,o.call(this);for(let e=0;e<a.length;e++)a[e].call(this)}}})}Object.defineProperty(this,Symbol.dispose,{enumerable:!1,configurable:!0,value(){this.destroy()}}),this.postscript()}}};f.__accessorMetadata__=o(s.prototype),f.prototype.declaredClass=e;const u=(e||"AccessorSubclass").split(".").slice(-1)[0];return Object.defineProperty(f,"name",{value:u,configurable:!0}),f}}function l(e,t){return null==t.get?function(){const t=this.__accessor__,r=t.propertiesByName.get(e);if(void 0===r)return;t.mutable&&s(r);const o=t.store;return o.has(e)?o.get(e):r.metadata.value}:function(){const t=this.__accessor__,r=t.propertiesByName.get(e);if(void 0!==r)return r.getComputed(t)}}function p(e){const t=e.prototype,s=o(t),n={};for(const o of Object.getOwnPropertyNames(s)){const e=s[o];i(e),n[o]={enumerable:!0,configurable:!0,get:l(o,e),set(t){const s=this.__accessor__;if(void 0!==s){if(s.mutable)return s.initialized&&e.readOnly?f("read-only",o):s.lifecycle===r.CONSTRUCTED&&e.constructOnly?f("construct-only",o):void s.set(o,t)}else Object.defineProperty(this,o,{enumerable:!0,configurable:!0,writable:!0,value:t})}}}Object.defineProperties(e.prototype,n)}const f=(t,r)=>{e.getLogger("esri.core.Accessor").error(`cannot assign to ${t} property '${r}'`)};export{p as finalizeClass,a as subclass};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
const i={Dirty:1,Overridden:2,Computing:4,NonNullable:8,HasDefaultValue:16,DepTrackingInitialized:32,AutoTracked:64,ExplicitlyTracking:128};export{i as Flags};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../ArrayPool.js";import{makeHandle as t}from"../handleUtils.js";import{equals as r,equalsShallow as l}from"../lang.js";import{ReentrantObjectPool as o}from"../ReentrantObjectPool.js";import{schedule as i}from"../scheduling.js";import{someSet as n}from"../SetUtils.js";import{generateUID as s}from"../uid.js";import{valueOf as c}from"./get.js";import{Lifecycle as u}from"./
|
|
5
|
+
import e from"../ArrayPool.js";import{makeHandle as t}from"../handleUtils.js";import{equals as r,equalsShallow as l}from"../lang.js";import{ReentrantObjectPool as o}from"../ReentrantObjectPool.js";import{schedule as i}from"../scheduling.js";import{someSet as n}from"../SetUtils.js";import{generateUID as s}from"../uid.js";import{valueOf as c}from"./get.js";import{Lifecycle as u}from"./Lifecycle.js";import{reaction as a,reactionDeferred as d}from"./trackingUtils.js";import{parse as f}from"./utils.js";var h;!function(e){e[e.Untracked=0]="Untracked",e[e.Tracked=1]="Tracked"}(h||(h={}));class m{constructor(){this.uid=s(),this.removed=!1,this.type=null,this.oldValue=null,this.callback=null,this.getValue=null,this.target=null,this.path=null,this.equals=null}static{this.pool=new o(m)}static acquireUntracked(e,t,l,o,i){return this.pool.acquire(h.Untracked,e,t,l,o,i,r)}static acquireTracked(e,t,r,l){return this.pool.acquire(h.Tracked,e,t,r,null,null,l)}notify(e,t){this.type===h.Untracked?this.callback.call(this.target,e,t,this.path,this.target):this.callback.call(null,e,t,void 0,void 0)}acquire(e,t,r,l,o,i,n){this.uid=s(),this.removed=!1,this.type=e,this.oldValue=t,this.callback=r,this.getValue=l,this.target=o,this.path=i,this.equals=n}release(){this.target=this.path=this.oldValue=this.callback=this.getValue=null,this.uid=s(),this.removed=!0}}const p=new e,v=new Set;let k;function _(e){v.delete(e),v.add(e),k||(k=i(q))}function g(e){if(e.removed)return;const t=e.oldValue,r=e.getValue();e.equals(t,r)||(e.oldValue=r,e.notify(r,t))}function j(e){for(const t of v.values())t.target===e&&(t.removed=!0)}function q(){let e=10;for(;k&&e--;){k=null;const e=y(),t=p.acquire();for(const r of e){const e=r.uid;g(r),e===r.uid&&r.removed&&t.push(r)}for(const r of v)r.removed&&(t.push(r),v.delete(r));for(const r of t)m.pool.release(r);p.release(t),p.release(e),V.forEach((e=>e()))}}function y(){const e=p.acquire();e.length=v.size;let t=0;for(const r of v)e[t]=r,++t;return v.clear(),e}const V=new Set;function U(e){return V.add(e),t((()=>V.delete(e)))}function T(e,r,l){let o=f(e,r,l,((e,r,l)=>{let i,n,s=d((()=>c(e,r)),((t,s)=>{e.__accessor__?.lifecycle===u.DESTROYED||i&&i.uid!==n?o.remove():(i||(i=m.acquireUntracked(t,l,s,e,r),n=i.uid),_(i))}));return t((()=>{s.remove(),i&&(i.uid!==n||i.removed||(i.removed=!0,_(i)),i=null),o=s=null}))}));return o}function E(e,t,l){const o=f(e,t,l,((e,t,l)=>{let i=!1;return a((()=>c(e,t)),((n,s)=>{e.__accessor__.lifecycle!==u.DESTROYED?i||(i=!0,r(s,n)||l.call(e,n,s,t,e),i=!1):o.remove()}))}));return o}function b(e,r,l,o=!1){return e.__accessor__&&e.__accessor__.lifecycle!==u.DESTROYED?o?E(e,r,l):T(e,r,l):t()}function D(e,r,l){let o,i,n=d(e,((e,t)=>{o&&o.uid!==i?n.remove():(o||(o=m.acquireTracked(e,r,t,l),i=o.uid),_(o))}));return t((()=>{n.remove(),o&&(o.uid!==i||o.removed||(o.removed=!0,_(o)),o=null),n=null}))}function S(e,t,r){let l=!1;return a(e,((e,o)=>{l||(l=!0,r(o,e)||t(e,o),l=!1)}))}function w(e,t,r=!1,o=l){return r?S(e,t,o):D(e,t,o)}function O(e){return n(v,(t=>t.oldValue===e))}export{U as afterDispatch,q as dispatch,O as isValueInUse,j as removeTarget,b as watch,w as watchTracked};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{createTask as e}from"./asyncUtils.js";import t from"./Collection.js";import{
|
|
5
|
+
import{createTask as e}from"./asyncUtils.js";import t from"./Collection.js";import{destroyHandle as o,removeIfHandle as s}from"./handleUtils.js";import{ignoreAbortErrors as r,isAborted as n,createAbortError as i}from"./promiseUtils.js";import{on as a}from"./reactiveUtils.js";function c(e,o,s){const r=s?.createCollection?.()??new t,n=!!s?.recycleItems?new d:null,i=(e,t=0)=>{if(!e?.length)return;const o=r.splice(t,e.length);n?n.processRemoved(e):o.forEach(m)},c=(e,t=0)=>{if(!e?.length)return;const s=[];for(const r of e){const e=n?.use(r);if(e)s.push(e);else{const e=o(r);n?.register(r,e),s.push(e)}}r.addMany(s,t)},l=a(e,"after-splice",(({added:e,start:t,removed:o})=>{i(o,t),c(e,t)}),{sync:!0,onListenerRemove:e=>i(e.items),onListenerAdd:e=>c(e.items)});return r.addHandles(l),r}class d{constructor(){this._originalToMapped=new Map,this._removedItemCandidates=new Set,this._garbageCollectionQueued=!1}processRemoved(e){if(!e?.length)return;const{_removedItemCandidates:t}=this;for(const o of e)this._getItem(o)?.markRemoved()&&(t.add(o),this._queueGarbageCollection())}use(e){const t=this._getItem(e);return t&&(t.removed=!1),t?.item}register(e,t){this._originalToMapped.set(e,new l(t))}_getItem(e){return this._originalToMapped.get(e)}_queueGarbageCollection(){this._garbageCollectionQueued||(this._garbageCollectionQueued=!0,queueMicrotask((()=>this._garbageCollectCandidates())))}_garbageCollectCandidates(){this._garbageCollectionQueued=!1;const{_removedItemCandidates:e}=this,t=Array.from(e);e.clear(),t.forEach((e=>this._garbageCollectIfRemoved(e)))}_garbageCollectIfRemoved(e){const{_originalToMapped:t}=this,o=this._getItem(e);o?.removed&&(m(o.item),t.delete(e))}}class l{constructor(e){this.item=e,this.removed=!1}markRemoved(){return this.removed=!0,!0}}function m(e){"object"==typeof e&&e&&("destroy"in e&&"function"==typeof e.destroy?e.destroy():s(e))}function u(s,a,d){const l=new t,u=c(s,(t=>e((async e=>{const o=await a(t,e);if(n(e))throw m(o),i();return o}))),d),f=()=>null,g=async e=>{const t=await e.promise,o=u.indexOf(e);o<0||l.splice(o,1,t)};l.addMany(u.items.map(f));for(const e of u)r(g(e));const h=u.on("after-splice",(({added:e,start:t,deleteCount:o})=>{const s=l.splice(t,o);for(const r of s)m(r);if(e?.length){l.addMany(e.map(f),t);for(const t of e)r(g(t))}}));return l.addHandles([o(u),h]),l}export{c as mapCollection,u as mapCollectionAsync};
|
package/core/urlUtils.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../config.js";import{isSome as n}from"./arrayUtils.js";import e from"./Error.js";import r from"./Logger.js";import{isSerializable as o}from"./support/jsonUtils.js";import{parseKnownArcGISOnlineDomain as i}from"../portal/support/urlUtils.js";import{base64ToArrayBuffer as s,arrayBufferToBase64 as u}from"../support/base64Utils.js";const l=()=>r.getLogger("esri.core.urlUtils"),c=t.request,f="esri/config: esriConfig.request.proxyUrl is not set.",a=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,p=/^\s*http:/i,h=/^\s*https:/i,d=/^\s*file:/i,m=/:\d+$/,y=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,g=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),$=new RegExp("^((([^[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^[:]*))(:([0-9]+))?$");class x{constructor(t=""){this.uri=t,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let n=this.uri.match(g);this.scheme=n[2]||(n[1]?"":null),this.authority=n[4]||(n[3]?"":null),this.path=n[5],this.query=n[7]||(n[6]?"":null),this.fragment=n[9]||(n[8]?"":null),null!=this.authority&&(n=this.authority.match($),this.user=n[3]||null,this.password=n[4]||null,this.host=n[6]||n[7],this.port=n[9]||null)}toString(){return this.uri}}const w={},U=new x(t.applicationUrl);let O=U;const R=b();let q=R;const C=()=>O,j=()=>q;function b(){const t=O.path,n=t.slice(0,t.lastIndexOf("/")+1);return`${`${O.scheme}://${O.host}${null!=O.port?`:${O.port}`:""}`}${n}`}const L={setAppUrl:t=>O=t,setAppBaseUrl:t=>q=t,restoreUrls:()=>{O=U,q=R}};function I(t){if(!t)return null;const n={path:null,query:null},e=new x(t),r=t.indexOf("?");return null===e.query?n.path=t:(n.path=t.slice(0,r),n.query=A(e.query)),e.fragment&&(n.hash=e.fragment,null===e.query&&(n.path=n.path.slice(0,n.path.length-(e.fragment.length+1)))),n}function A(t){const n=t.split("&"),e={};for(const r of n){if(!r)continue;const t=r.indexOf("=");let n,o;t<0?(n=decodeURIComponent(r),o=""):(n=decodeURIComponent(r.slice(0,t)),o=decodeURIComponent(r.slice(t+1)));let i=e[n];"string"==typeof i&&(i=e[n]=[i]),Array.isArray(i)?i.push(o):e[n]=o}return e}function v(t,n){return t?n&&"function"==typeof n?Object.keys(t).map((e=>encodeURIComponent(e)+"="+encodeURIComponent(n(e,t[e])))).join("&"):Object.keys(t).map((e=>{const r=t[e];if(null==r)return"";const i=encodeURIComponent(e)+"=",s=n?.[e];return s?i+encodeURIComponent(s(r)):Array.isArray(r)?r.map((t=>o(t)?i+encodeURIComponent(JSON.stringify(t)):i+encodeURIComponent(t))).join("&"):o(r)?i+encodeURIComponent(JSON.stringify(r)):i+encodeURIComponent(r)})).filter((t=>t)).join("&"):""}function P(t=!1){let n,r=c.proxyUrl;if("string"==typeof t){n=dt(t);const e=T(t);e&&(r=e.proxyUrl)}else n=!!t;if(!r)throw l().warn(f),new e("urlUtils:proxy-not-set",f);n&&wt()&&(r=$t(r));return I(r)}function k(t,n=!1){const e=T(t);let r,o;if(e){const t=B(e.proxyUrl);r=t.path,o=t.query?A(t.query):null}else if(n){const n=P(t);r=n.path,o=n.query}if(r){const n=I(t);t=r+"?"+n.path;const e=v({...o,...n.query});e&&(t=`${t}?${e}`)}return t}const E={path:"",query:""};function B(t){const n=t.indexOf("?");return-1!==n?(E.path=t.slice(0,n),E.query=t.slice(n+1)):(E.path=t,E.query=null),E}function S(t){return t=(t=Ut(t=Ct(t=B(t).path),!0)).toLowerCase()}function H(t){const n={proxyUrl:t.proxyUrl,urlPrefix:S(t.urlPrefix)},e=c.proxyRules,r=n.urlPrefix;let o=e.length;for(let i=0;i<e.length;i++){const t=e[i].urlPrefix;if(0===r.indexOf(t)){if(r.length===t.length)return-1;o=i;break}0===t.indexOf(r)&&(o=i+1)}return e.splice(o,0,n),o}function T(t){const n=c.proxyRules,e=S(t);for(let r=0;r<n.length;r++)if(0===e.indexOf(n[r].urlPrefix))return n[r]}function W(t,n){if(!t||!n)return!1;t=J(t),n=J(n);const e=i(t),r=i(n);return null!=e&&null!=r?e.portalHostname===r.portalHostname:null==e&&null==r&&F(t,n,!0)}function z(t,n){if(!t||!n)return!1;t=J(t),n=J(n);const e=i(t),r=i(n);return null!=e&&null!=r&&e.portalHostname===r.portalHostname}function D(t,n){return t=J(t),n=J(n),Ut(t)===Ut(n)}function J(t){const n=(t=K(t)).indexOf("/sharing");return n>0?t.slice(0,n):t.replace(/\/+$/,"")}function N(t,n=c.interceptors){const e=n=>null==n||n instanceof RegExp&&n.test(t)||"string"==typeof n&&t.startsWith(n);if(n)for(const r of n)if(Array.isArray(r.urls)){if(r.urls.some(e))return r}else if(e(r.urls))return r;return null}function F(t,n,e=!1){if(!t||!n)return!1;const r=vt(t),o=vt(n);return!(!e&&r.scheme!==o.scheme)&&(null!=r.host&&null!=o.host&&(r.host.toLowerCase()===o.host.toLowerCase()&&r.port===o.port))}function M(t){if("string"==typeof t){if(!Y(t))return!0;t=vt(t)}if(F(t,O))return!0;const n=c.trustedServers||[];for(let e=0;e<n.length;e++){const r=Q(n[e]);for(let n=0;n<r.length;n++)if(F(t,r[n]))return!0}return!1}function Q(t){return w[t]||(ht(t)||pt(t)?w[t]=[new x(_(t))]:w[t]=[new x(`http://${t}`),new x(`https://${t}`)]),w[t]}function _(t,n=q,e){return pt(t)?e?.preserveProtocolRelative?t:"http"===O.scheme&&O.authority===X(t).slice(2)?`http:${t}`:`https:${t}`:ht(t)?t:V("/"===t[0]?Ot(n):n,t)}function G(t,n=q,e){if(null==t||!Y(t))return t;const r=K(t),o=r.toLowerCase(),i=K(n).toLowerCase().replace(/\/+$/,""),s=e?K(e).toLowerCase().replace(/\/+$/,""):null;if(s&&0!==i.indexOf(s))return t;const u=(t,n,e)=>-1===(e=t.indexOf(n,e))?t.length:e;let l=u(o,"/",o.indexOf("//")+2),c=-1;for(;o.slice(0,l+1)===i.slice(0,l)+"/"&&(c=l+1,l!==o.length);)l=u(o,"/",l+1);if(-1===c)return t;if(s&&c<s.length)return t;t=r.slice(c);const f=i.slice(c-1).replaceAll(/[^/]+/g,"").length;if(f>0)for(let a=0;a<f;a++)t=`../${t}`;else t=`./${t}`;return t}function K(t){return t=It(t=Lt(t=bt(t=_(t=t.trim()))))}function V(...t){const e=t.filter(n);if(!e?.length)return;const r=[];if(Y(e[0])){const t=e[0],n=t.indexOf("//");-1!==n&&(r.push(t.slice(0,n+1)),yt(e[0])&&(r[0]+="/"),e[0]=t.slice(n+2))}else"/"===e[0][0]&&r.push("");const o=e.reduce(((t,n)=>n?t.concat(n.split("/")):t),[]);for(let n=0;n<o.length;n++){const t=o[n];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&n===o.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function X(t,n=!1){if(null==t||Z(t)||tt(t))return null;let e=t.indexOf("://");if(-1===e&&pt(t))e=2;else{if(-1===e)return null;e+=3}const r=t.indexOf("/",e);return-1!==r&&(t=t.slice(0,r)),n&&(t=Ut(t,!0)),t}function Y(t){return pt(t)||ht(t)}function Z(t){return null!=t&&"blob:"===t.slice(0,5)}function tt(t){return null!=t&&"data:"===t.slice(0,5)}function nt(t){const n=ot(t);return n?.isBase64?s(n.data):null}function et(t){return u(t).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}const rt=/^data:(.*?)(;base64)?,(.*)$/;function ot(t){const n=t.match(rt);if(!n)return null;const[,e,r,o]=n;return{mediaType:e,isBase64:!!r,data:o}}function it(t){return t.isBase64?`data:${t.mediaType};base64,${t.data}`:`data:${t.mediaType},${t.data}`}async function st(t){return(await fetch(t)).blob()}function ut(t){const n=nt(t);if(!n)return null;const e=ot(t);return new Blob([n],{type:e.mediaType})}function lt(t,n){ft(t,n)}function ct(t,n){at(t,n)}function ft(t,n){const e=ut(t);return!!e&&at(e,n)}function at(t,n){if(!t)return!1;const e=document.createElement("a");if(!("download"in e))return!1;const r=URL.createObjectURL(t);return e.download=n,e.href=r,e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e),URL.revokeObjectURL(r),!0}function pt(t){return null!=t&&"/"===t[0]&&"/"===t[1]}function ht(t){return null!=t&&a.test(t)}function dt(t){return null!=t&&h.test(t)||"https"===O.scheme&&pt(t)}function mt(t){return null!=t&&p.test(t)||"http"===O.scheme&&pt(t)}function yt(t){return null!=t&&d.test(t)}function gt(t){return pt(t)?`http:${t}`:t.replace(h,"http:")}function $t(t){return pt(t)?`https:${t}`:t.replace(p,"https:")}function xt(){return"http"===O.scheme}function wt(){return"https"===O.scheme}function Ut(t,n=!1){return pt(t)?t.slice(2):(t=t.replace(a,""),n&&t.length>1&&"/"===t[0]&&"/"===t[1]&&(t=t.slice(2)),t)}function Ot(t){const n=t.indexOf("//"),e=t.indexOf("/",n+2);return-1===e?t:t.slice(0,e)}function Rt(t){let n=0;if(Y(t)){const e=t.indexOf("//");-1!==e&&(n=e+2)}const e=t.lastIndexOf("/");return e<n?t:t.slice(0,e+1)}function qt(t,n){if(!t)return"";const e=I(t).path.replace(/\/+$/,""),r=e.slice(e.lastIndexOf("/")+1);if(!n?.length)return r;const o=new RegExp(`\\.(${n.join("|")})$`,"i");return r.replace(o,"")}function Ct(t){return t.endsWith("/")?t:`${t}/`}function jt(t){return t.replace(/\/+$/,"")}function bt(t){if(/^https?:\/\//i.test(t)){const n=B(t);t=(t=n.path.replaceAll(/\/{2,}/g,"/")).replace("/","//"),n.query&&(t+=`?${n.query}`)}return t}function Lt(t){return t.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}function It(t){const n=c.httpsDomains;if(!mt(t))return t;const e=t.indexOf("/",7);let r;if(r=-1===e?t:t.slice(0,e),r=r.toLowerCase().slice(7),m.test(r)){if(!r.endsWith(":80"))return t;r=r.slice(0,-3),t=t.replace(":80","")}return xt()&&r===O.authority&&!y.test(t)||(wt()&&r===O.authority||n&&n.some((t=>r===t||r.endsWith(`.${t}`)))||wt()&&!T(t))&&(t=$t(t)),t}function At(t,n,e){if(!(n&&e&&t&&Y(t)))return t;const r=t.indexOf("//"),o=t.indexOf("/",r+2),i=t.indexOf(":",r+2),s=Math.min(o<0?t.length:o,i<0?t.length:i);if(t.slice(r+2,s).toLowerCase()!==n.toLowerCase())return t;return`${t.slice(0,r+2)}${e}${t.slice(s)}`}function vt(t){return"string"==typeof t?new x(_(t)):(t.scheme||(t.scheme=O.scheme),t)}function Pt(t){return Dt.test(t)}function kt(t,n){const e=I(t),r=Object.keys(e.query||{});return r.length>0&&n&&n.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${r.join(", ")}.`),e.path}function Et(t,n,e){const r=I(t),o=r.query||{};return o[n]=String(e),`${r.path}?${v(o)}`}function Bt(t,n){if(!n)return t;const e=I(t),r=e.query||{};for(const[i,s]of Object.entries(n))null!=s&&(r[i]=s);const o=v(r);return o?`${e.path}?${o}`:e.path}function St(t,n){const{path:e,query:r}=I(t);if(!r)return t;delete r[n];const o=v(r);return o?`${e}?${o}`:e}function Ht(t){if(null==t)return null;const n=t.match(zt);return n?n[2]:null}function Tt(t){if(null==t)return null;const n=t.match(zt);return n?{path:n[1],extension:n[2]}:{path:t,extension:null}}async function Wt(t){if("string"==typeof t){return ot(t)??{data:t}}return new Promise(((n,e)=>{const r=new FileReader;r.readAsDataURL(t),r.onload=()=>n(ot(r.result)),r.onerror=t=>e(t)}))}const zt=/([^.]*)\.([^/]*)$/,Dt=/(^data:image\/svg|\.svg$)/i;export{x as Url,k as addProxy,H as addProxyRule,Et as addQueryParameter,Bt as addQueryParameters,et as base64UrlEncode,st as blobUrlToBlob,At as changeDomain,ot as dataComponents,nt as dataToArrayBuffer,ut as dataToBlob,ct as downloadBlobAsFile,lt as downloadDataAsFile,Ct as ensureTrailingSlash,j as getAppBaseUrl,C as getAppUrl,qt as getFilename,N as getInterceptor,X as getOrigin,Ht as getPathExtension,T as getProxyRule,P as getProxyUrl,ht as hasProtocol,z as hasSameCanonicalArcGISOnlinePortal,W as hasSameCanonicalPortal,F as hasSameOrigin,D as hasSamePortal,Y as isAbsolute,wt as isAppHTTPS,Z as isBlobProtocol,tt as isDataProtocol,dt as isHTTPSProtocol,pt as isProtocolRelative,Pt as isSVG,M as isTrustedServer,V as join,_ as makeAbsolute,it as makeData,G as makeRelative,K as normalize,v as objectToQuery,Wt as parseData,A as queryToObject,Rt as removeFile,St as removeQueryParameter,kt as removeQueryParameters,jt as removeTrailingSlash,Tt as splitPathExtension,L as test,gt as toHTTP,$t as toHTTPS,w as trustedServersUrlCache,I as urlToObject};
|
|
5
|
+
import t from"../config.js";import{isSome as n}from"./arrayUtils.js";import e from"./Error.js";import r from"./Logger.js";import{isSerializable as o}from"./support/jsonUtils.js";import{parseKnownArcGISOnlineDomain as i}from"../portal/support/urlUtils.js";import{base64ToArrayBuffer as s,arrayBufferToBase64 as u}from"../support/base64Utils.js";const l=()=>r.getLogger("esri.core.urlUtils"),c=t.request,f="esri/config: esriConfig.request.proxyUrl is not set.",a=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,p=/^\s*http:/i,h=/^\s*https:/i,d=/^\s*file:/i,m=/:\d+$/,y=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,g=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),$=new RegExp("^((([^[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^[:]*))(:([0-9]+))?$");class x{constructor(t=""){this.uri=t,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let n=this.uri.match(g);this.scheme=n[2]||(n[1]?"":null),this.authority=n[4]||(n[3]?"":null),this.path=n[5],this.query=n[7]||(n[6]?"":null),this.fragment=n[9]||(n[8]?"":null),null!=this.authority&&(n=this.authority.match($),this.user=n[3]||null,this.password=n[4]||null,this.host=n[6]||n[7],this.port=n[9]||null)}toString(){return this.uri}}const w={},U=new x(t.applicationUrl);let O=U;const R=b();let q=R;const C=()=>O,j=()=>q;function b(){const t=O.path,n=t.slice(0,t.lastIndexOf("/")+1);return`${`${O.scheme}://${O.host}${null!=O.port?`:${O.port}`:""}`}${n}`}const L={setAppUrl:t=>O=t,setAppBaseUrl:t=>q=t,restoreUrls:()=>{O=U,q=R}};function I(t){if(!t)return null;const n={path:null,query:null},e=new x(t),r=t.indexOf("?");return null===e.query?n.path=t:(n.path=t.slice(0,r),n.query=A(e.query)),e.fragment&&(n.hash=e.fragment,null===e.query&&(n.path=n.path.slice(0,n.path.length-(e.fragment.length+1)))),n}function A(t){const n=t.split("&"),e={};for(const r of n){if(!r)continue;const t=r.indexOf("=");let n,o;t<0?(n=decodeURIComponent(r),o=""):(n=decodeURIComponent(r.slice(0,t)),o=decodeURIComponent(r.slice(t+1)));let i=e[n];"string"==typeof i&&(i=e[n]=[i]),Array.isArray(i)?i.push(o):e[n]=o}return e}function v(t,n){return t?n&&"function"==typeof n?Object.keys(t).map((e=>encodeURIComponent(e)+"="+encodeURIComponent(n(e,t[e])))).join("&"):Object.keys(t).map((e=>{const r=t[e];if(null==r)return"";const i=encodeURIComponent(e)+"=",s=n?.[e];return s?i+encodeURIComponent(s(r)):Array.isArray(r)?r.map((t=>o(t)?i+encodeURIComponent(JSON.stringify(t)):i+encodeURIComponent(t))).join("&"):o(r)?i+encodeURIComponent(JSON.stringify(r)):i+encodeURIComponent(r)})).filter((t=>t)).join("&"):""}function P(t=!1){let n,r=c.proxyUrl;if("string"==typeof t){n=dt(t);const e=T(t);e&&(r=e.proxyUrl)}else n=!!t;if(!r)throw l().warn(f),new e("urlUtils:proxy-not-set",f);n&&wt()&&(r=$t(r));return I(r)}function k(t,n=!1){const e=T(t);let r,o;if(e){const t=B(e.proxyUrl);r=t.path,o=t.query?A(t.query):null}else if(n){const n=P(t);r=n.path,o=n.query}if(r){const n=I(t);t=r+"?"+n.path;const e=v({...o,...n.query});e&&(t=`${t}?${e}`)}return t}const E={path:"",query:""};function B(t){const n=t.indexOf("?");return-1!==n?(E.path=t.slice(0,n),E.query=t.slice(n+1)):(E.path=t,E.query=null),E}function S(t){return t=(t=Ut(t=Ct(t=B(t).path),!0)).toLowerCase()}function H(t){const n={proxyUrl:t.proxyUrl,urlPrefix:S(t.urlPrefix)},e=c.proxyRules,r=n.urlPrefix;let o=e.length;for(let i=0;i<e.length;i++){const t=e[i].urlPrefix;if(0===r.indexOf(t)){if(r.length===t.length)return-1;o=i;break}0===t.indexOf(r)&&(o=i+1)}return e.splice(o,0,n),o}function T(t){const n=c.proxyRules,e=S(t);for(let r=0;r<n.length;r++)if(0===e.indexOf(n[r].urlPrefix))return n[r]}function W(t,n){if(!t||!n)return!1;t=J(t),n=J(n);const e=i(t),r=i(n);return null!=e&&null!=r?e.portalHostname===r.portalHostname:null==e&&null==r&&F(t,n,!0)}function z(t,n){if(!t||!n)return!1;t=J(t),n=J(n);const e=i(t),r=i(n);return null!=e&&null!=r&&e.portalHostname===r.portalHostname}function D(t,n){return t=J(t),n=J(n),Ut(t)===Ut(n)}function J(t){const n=(t=K(t)).indexOf("/sharing");return n>0?t.slice(0,n):t.replace(/\/+$/,"")}function N(t,n=c.interceptors){const e=n=>n instanceof RegExp?n.test(t):"string"==typeof n?t.startsWith(n):null==n;if(n)for(const r of n)if(Array.isArray(r.urls)){if(r.urls.some(e))return r}else if(e(r.urls))return r;return null}function F(t,n,e=!1){if(!t||!n)return!1;const r=vt(t),o=vt(n);return!(!e&&r.scheme!==o.scheme)&&(null!=r.host&&null!=o.host&&(r.host.toLowerCase()===o.host.toLowerCase()&&r.port===o.port))}function M(t){if("string"==typeof t){if(!Y(t))return!0;t=vt(t)}if(F(t,O))return!0;const n=c.trustedServers||[];for(let e=0;e<n.length;e++){const r=Q(n[e]);for(let n=0;n<r.length;n++)if(F(t,r[n]))return!0}return!1}function Q(t){return w[t]||(ht(t)||pt(t)?w[t]=[new x(_(t))]:w[t]=[new x(`http://${t}`),new x(`https://${t}`)]),w[t]}function _(t,n=q,e){return pt(t)?e?.preserveProtocolRelative?t:"http"===O.scheme&&O.authority===X(t).slice(2)?`http:${t}`:`https:${t}`:ht(t)?t:V("/"===t[0]?Ot(n):n,t)}function G(t,n=q,e){if(null==t||!Y(t))return t;const r=K(t),o=r.toLowerCase(),i=K(n).toLowerCase().replace(/\/+$/,""),s=e?K(e).toLowerCase().replace(/\/+$/,""):null;if(s&&0!==i.indexOf(s))return t;const u=(t,n,e)=>-1===(e=t.indexOf(n,e))?t.length:e;let l=u(o,"/",o.indexOf("//")+2),c=-1;for(;o.slice(0,l+1)===i.slice(0,l)+"/"&&(c=l+1,l!==o.length);)l=u(o,"/",l+1);if(-1===c)return t;if(s&&c<s.length)return t;t=r.slice(c);const f=i.slice(c-1).replaceAll(/[^/]+/g,"").length;if(f>0)for(let a=0;a<f;a++)t=`../${t}`;else t=`./${t}`;return t}function K(t){return t=It(t=Lt(t=bt(t=_(t=t.trim()))))}function V(...t){const e=t.filter(n);if(!e?.length)return;const r=[];if(Y(e[0])){const t=e[0],n=t.indexOf("//");-1!==n&&(r.push(t.slice(0,n+1)),yt(e[0])&&(r[0]+="/"),e[0]=t.slice(n+2))}else"/"===e[0][0]&&r.push("");const o=e.reduce(((t,n)=>n?t.concat(n.split("/")):t),[]);for(let n=0;n<o.length;n++){const t=o[n];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&n===o.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function X(t,n=!1){if(null==t||Z(t)||tt(t))return null;let e=t.indexOf("://");if(-1===e&&pt(t))e=2;else{if(-1===e)return null;e+=3}const r=t.indexOf("/",e);return-1!==r&&(t=t.slice(0,r)),n&&(t=Ut(t,!0)),t}function Y(t){return pt(t)||ht(t)}function Z(t){return null!=t&&"blob:"===t.slice(0,5)}function tt(t){return null!=t&&"data:"===t.slice(0,5)}function nt(t){const n=ot(t);return n?.isBase64?s(n.data):null}function et(t){return u(t).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}const rt=/^data:(.*?)(;base64)?,(.*)$/;function ot(t){const n=t.match(rt);if(!n)return null;const[,e,r,o]=n;return{mediaType:e,isBase64:!!r,data:o}}function it(t){return t.isBase64?`data:${t.mediaType};base64,${t.data}`:`data:${t.mediaType},${t.data}`}async function st(t){return(await fetch(t)).blob()}function ut(t){const n=nt(t);if(!n)return null;const e=ot(t);return new Blob([n],{type:e.mediaType})}function lt(t,n){ft(t,n)}function ct(t,n){at(t,n)}function ft(t,n){const e=ut(t);return!!e&&at(e,n)}function at(t,n){if(!t)return!1;const e=document.createElement("a");if(!("download"in e))return!1;const r=URL.createObjectURL(t);return e.download=n,e.href=r,e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e),URL.revokeObjectURL(r),!0}function pt(t){return null!=t&&"/"===t[0]&&"/"===t[1]}function ht(t){return null!=t&&a.test(t)}function dt(t){return null!=t&&h.test(t)||"https"===O.scheme&&pt(t)}function mt(t){return null!=t&&p.test(t)||"http"===O.scheme&&pt(t)}function yt(t){return null!=t&&d.test(t)}function gt(t){return pt(t)?`http:${t}`:t.replace(h,"http:")}function $t(t){return pt(t)?`https:${t}`:t.replace(p,"https:")}function xt(){return"http"===O.scheme}function wt(){return"https"===O.scheme}function Ut(t,n=!1){return pt(t)?t.slice(2):(t=t.replace(a,""),n&&t.length>1&&"/"===t[0]&&"/"===t[1]&&(t=t.slice(2)),t)}function Ot(t){const n=t.indexOf("//"),e=t.indexOf("/",n+2);return-1===e?t:t.slice(0,e)}function Rt(t){let n=0;if(Y(t)){const e=t.indexOf("//");-1!==e&&(n=e+2)}const e=t.lastIndexOf("/");return e<n?t:t.slice(0,e+1)}function qt(t,n){if(!t)return"";const e=I(t).path.replace(/\/+$/,""),r=e.slice(e.lastIndexOf("/")+1);if(!n?.length)return r;const o=new RegExp(`\\.(${n.join("|")})$`,"i");return r.replace(o,"")}function Ct(t){return t.endsWith("/")?t:`${t}/`}function jt(t){return t.replace(/\/+$/,"")}function bt(t){if(/^https?:\/\//i.test(t)){const n=B(t);t=(t=n.path.replaceAll(/\/{2,}/g,"/")).replace("/","//"),n.query&&(t+=`?${n.query}`)}return t}function Lt(t){return t.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}function It(t){const n=c.httpsDomains;if(!mt(t))return t;const e=t.indexOf("/",7);let r;if(r=-1===e?t:t.slice(0,e),r=r.toLowerCase().slice(7),m.test(r)){if(!r.endsWith(":80"))return t;r=r.slice(0,-3),t=t.replace(":80","")}return xt()&&r===O.authority&&!y.test(t)||(wt()&&r===O.authority||n&&n.some((t=>r===t||r.endsWith(`.${t}`)))||wt()&&!T(t))&&(t=$t(t)),t}function At(t,n,e){if(!(n&&e&&t&&Y(t)))return t;const r=t.indexOf("//"),o=t.indexOf("/",r+2),i=t.indexOf(":",r+2),s=Math.min(o<0?t.length:o,i<0?t.length:i);if(t.slice(r+2,s).toLowerCase()!==n.toLowerCase())return t;return`${t.slice(0,r+2)}${e}${t.slice(s)}`}function vt(t){return"string"==typeof t?new x(_(t)):(t.scheme||(t.scheme=O.scheme),t)}function Pt(t){return Dt.test(t)}function kt(t,n){const e=I(t),r=Object.keys(e.query||{});return r.length>0&&n&&n.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${r.join(", ")}.`),e.path}function Et(t,n,e){const r=I(t),o=r.query||{};return o[n]=String(e),`${r.path}?${v(o)}`}function Bt(t,n){if(!n)return t;const e=I(t),r=e.query||{};for(const[i,s]of Object.entries(n))null!=s&&(r[i]=s);const o=v(r);return o?`${e.path}?${o}`:e.path}function St(t,n){const{path:e,query:r}=I(t);if(!r)return t;delete r[n];const o=v(r);return o?`${e}?${o}`:e}function Ht(t){if(null==t)return null;const n=t.match(zt);return n?n[2]:null}function Tt(t){if(null==t)return null;const n=t.match(zt);return n?{path:n[1],extension:n[2]}:{path:t,extension:null}}async function Wt(t){if("string"==typeof t){return ot(t)??{data:t}}return new Promise(((n,e)=>{const r=new FileReader;r.readAsDataURL(t),r.onload=()=>n(ot(r.result)),r.onerror=t=>e(t)}))}const zt=/([^.]*)\.([^/]*)$/,Dt=/(^data:image\/svg|\.svg$)/i;export{x as Url,k as addProxy,H as addProxyRule,Et as addQueryParameter,Bt as addQueryParameters,et as base64UrlEncode,st as blobUrlToBlob,At as changeDomain,ot as dataComponents,nt as dataToArrayBuffer,ut as dataToBlob,ct as downloadBlobAsFile,lt as downloadDataAsFile,Ct as ensureTrailingSlash,j as getAppBaseUrl,C as getAppUrl,qt as getFilename,N as getInterceptor,X as getOrigin,Ht as getPathExtension,T as getProxyRule,P as getProxyUrl,ht as hasProtocol,z as hasSameCanonicalArcGISOnlinePortal,W as hasSameCanonicalPortal,F as hasSameOrigin,D as hasSamePortal,Y as isAbsolute,wt as isAppHTTPS,Z as isBlobProtocol,tt as isDataProtocol,dt as isHTTPSProtocol,pt as isProtocolRelative,Pt as isSVG,M as isTrustedServer,V as join,_ as makeAbsolute,it as makeData,G as makeRelative,K as normalize,v as objectToQuery,Wt as parseData,A as queryToObject,Rt as removeFile,St as removeQueryParameter,kt as removeQueryParameters,jt as removeTrailingSlash,Tt as splitPathExtension,L as test,gt as toHTTP,$t as toHTTPS,w as trustedServersUrlCache,I as urlToObject};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{r as s,G as r,c as i}from"../../../chunks/Geometry.js";import{E as m,n as o}from"../../../chunks/QuadraticBezier.js";import{Envelope2D as n}from"../../../chunks/Envelope2D.js";import{c as h,P as a}from"../../../chunks/Envelope.js";import{am as _,an as p,ao as u,
|
|
5
|
+
import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{r as s,G as r,c as i}from"../../../chunks/Geometry.js";import{E as m,n as o}from"../../../chunks/QuadraticBezier.js";import{Envelope2D as n}from"../../../chunks/Envelope2D.js";import{c as h,P as a}from"../../../chunks/Envelope.js";import{am as _,an as p,ao as u,m as l,l as c,n as y,ap as G,aq as g,C as d,ar as f}from"../../../chunks/ProjectionTransformation.js";class x{getOperatorType(){return 10009}supportsCurves(){return!0}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,s,r=0){return new T(e,t,s,r)}}class T extends e{constructor(e,t,r,i){super(),this.m_shape=new m,this.m_currentGeom=o,this.m_progressCounter=0,this.m_geomIndex=-1,this.m_geomTypeIndex=-1,this.m_index=-1,this.m_bBuilt=!1,this.m_bOutputOnlyModified=!1,this.m_bSimplifyPolygons=!1,this.m_bSnapToSr=!1,this.m_progressTracker=r,this.m_inputGeometries=e,this.m_sr=t,this.m_options=i,1===i||2===i?(this.m_bOutputOnlyModified=!0,this.m_options=0,this.m_bSimplifyPolygons=!0,this.m_bSnapToSr=null!=t&&2===i,this.m_bSnapToSr&&!_()&&s("PE is required for snapping to spatial reference operation")):0===i&&(this.m_bSimplifyPolygons=!0)}progress_(e=!1){}tock(){return!0}getRank(){return 1}moveToNextGeom(){for(;;){if(this.m_bBuilt?this.m_currentGeom=this.m_shape.getNextGeometry(this.m_currentGeom):(this.m_currentGeom=this.m_shape.getFirstGeometry(),this.m_bBuilt=!0),this.m_currentGeom!==o){let e=!1;if(this.m_bSimplifyPolygons&&this.m_shape.getGeometryType(this.m_currentGeom)===r.enumPolygon&&(e=p(this.m_shape,this.m_currentGeom,-1,!1,o,this.m_progressTracker)),this.m_bOutputOnlyModified&&!e&&!this.m_shape.getGeometryModified(this.m_currentGeom))continue}break}}next(){if(this.m_bBuilt)this.moveToNextGeom();else{this.m_geomIndex=this.m_shape.createGeometryUserIndex();const e=new n;for(let o=this.m_inputGeometries.next();null!=o;o=this.m_inputGeometries.next()){this.progress_(),i(o);let t=!1;this.m_bSnapToSr&&(o=o.clone(),t=u(this.m_sr,o));const s=this.m_shape.addGeometry(o);this.m_shape.setGeometryUserIndex(s,this.m_geomIndex,this.m_inputGeometries.getGeometryID());const m=o.getGeometryType();m===r.enumPoint&&(-1===this.m_geomTypeIndex&&(this.m_geomTypeIndex=this.m_shape.createGeometryUserIndex()),this.m_shape.setGeometryUserIndex(s,this.m_geomTypeIndex,m));const h=new n;o.queryLooseEnvelope(h),e.mergeEnvelope2D(h),t&&this.m_shape.setGeometryModified(s,!0)}const t=h(this.m_sr,e,!0),s=h(this.m_sr,e,!1);e.inflate(10*t.total()),this.m_shape.forceSetEnvelope2D(e);let m=null,a=0,_=0;if(this.m_shape.hasCurves()){m=new d;const s=l(t.total(),e);a=c(t.total()),_=f(s,a),y(this.m_shape,s,t.total(),12e3,m,null,this.m_progressTracker)}if(G(this.m_shape,s,this.m_progressTracker)){if(g(this.m_shape,t.add(_),this.m_progressTracker,0===this.m_options,this.m_bOutputOnlyModified),null!==m){if(this.m_bSimplifyPolygons){for(let e=this.m_shape.getFirstGeometry();e!==o;e=this.m_shape.getNextGeometry(e))if(this.m_shape.getGeometryType(e)===r.enumPolygon){p(this.m_shape,e,-1,!1,o,this.m_progressTracker)&&this.m_shape.setGeometryModified(e,!0)}this.m_bSimplifyPolygons=!1}m.stitchCurves(this.m_shape,o,a,!0),m.clearStitcher(this.m_shape)}}else this.m_bSimplifyPolygons=!1,null!==m&&(m.stitchCurves(this.m_shape,o,a,!0),m.clearStitcher(this.m_shape));this.moveToNextGeom()}if(this.m_currentGeom!==o){if(this.m_index=this.m_shape.getGeometryUserIndex(this.m_currentGeom,this.m_geomIndex),-1!==this.m_geomTypeIndex&&this.m_shape.getGeometryUserIndex(this.m_currentGeom,this.m_geomTypeIndex)===r.enumPoint){const e=new a({vd:this.m_shape.getVertexDescription()});return this.m_shape.queryPointGeometryOnly(this.m_currentGeom,e),this.m_bSnapToSr&&u(this.m_sr,e),e}{const e=this.m_shape.getGeometry(this.m_currentGeom);return this.m_bSnapToSr&&u(this.m_sr,e),e}}return null}getGeometryID(){return this.m_index}}const S=new x;function b(e,s,r){const i=S.executeMany(new t(e),s,null,r);return Array.from(i)}function I(){return S.supportsCurves()}export{b as executeMany,I as supportsCurves};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{O as t,S as e}from"../../../chunks/SimpleGeometryCursor.js";import{a as s,c as i,G as r,g as h}from"../../../chunks/Geometry.js";import{Envelope2D as n}from"../../../chunks/Envelope2D.js";import{c as o}from"../../../chunks/Envelope.js";import{E as a,k as m,n as p}from"../../../chunks/QuadraticBezier.js";import{C as _,
|
|
5
|
+
import{O as t,S as e}from"../../../chunks/SimpleGeometryCursor.js";import{a as s,c as i,G as r,g as h}from"../../../chunks/Geometry.js";import{Envelope2D as n}from"../../../chunks/Envelope2D.js";import{c as o}from"../../../chunks/Envelope.js";import{E as a,k as m,n as p}from"../../../chunks/QuadraticBezier.js";import{C as _,m as c,l as u,ar as l,n as g,ap as d,aq as G,an as C,at as y,au as I,av as x}from"../../../chunks/ProjectionTransformation.js";import{v as f}from"../../../chunks/Point2D.js";function k(t){t&&t.checkProgress()}class v{getOperatorType(){return 10012}accelerateGeometry(t,e,s){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}executeMany(t,e,s,i){return new S(t,e,s,i)}}class S extends t{constructor(t,e,i,r){super(),this.m_shape=null,this.m_topoGraph=null,this.m_curveStitcher=null,this.m_stitchMaxDeviation=0,this.m_chainStack=[],this.m_bitsetToChains=null,this.m_chainsLists=null,this.m_visitedChainsIndex=-1,this.m_index=-1,this.m_geometryIndex=-1,this.m_progressCounter=0,this.m_currentIds=[],this.m_currentEdgeIds=[],t||s(""),this.m_progressTracker=r,this.m_options=0!==i?i:3,(this.m_options<=0||this.m_options>63)&&s("options"),this.m_inputGeometryCursor=t,this.m_sr=e}tock(){return!0}getRank(){return 1}next(){if(-1===this.m_index){this.m_shape=new a;const t=new n;t.setEmpty(),this.m_geometryIndex=this.m_shape.createGeometryUserIndex();for(let o=this.m_inputGeometryCursor.next();null!==o;o=this.m_inputGeometryCursor.next()){i(o);const e=this.m_shape.addGeometry(o);o.getGeometryType()!==r.enumPolygon&&s("Polygon Overlay only supports Polygons"),this.m_shape.setGeometryUserIndex(e,this.m_geometryIndex,this.m_inputGeometryCursor.getGeometryID());const h=this.m_inputGeometryCursor.getRank();h>m&&this.m_shape.assignRankToGeometryVertices(e,h);const a=new n;o.queryLooseEnvelope(a),t.mergeEnvelope2D(a),k(this.m_progressTracker)}this.m_inputGeometryCursor=null;const e=o(this.m_sr,t,!0),h=o(this.m_sr,t,!1);t.inflate(10*e.total()),this.m_shape.forceSetEnvelope2D(t),this.m_stitchMaxDeviation=0;let x=0;if(this.m_shape.hasCurves()){this.m_curveStitcher=new _;const s=c(e.total(),t);this.m_stitchMaxDeviation=u(e.total()),x=l(s,this.m_stitchMaxDeviation),g(this.m_shape,s,e.total(),12e3,this.m_curveStitcher,null,this.m_progressTracker)}if(d(this.m_shape,h,this.m_progressTracker)){G(this.m_shape,e.add(x),this.m_progressTracker,!0,!1);for(let t=this.m_shape.getFirstGeometry();t!==p;t=this.m_shape.getNextGeometry(t))this.m_shape.getGeometryType(t)===r.enumPolygon&&C(this.m_shape,t,-1,!1,p,this.m_progressTracker)}this.m_topoGraph=new y,this.m_topoGraph.buildGeometryParentageSets(),this.m_topoGraph.setEditShape(this.m_shape,this.m_progressTracker);const f=this.m_topoGraph.getFirstChain();for(let s=this.m_topoGraph.getChainFirstIsland(f);s!==p;s=this.m_topoGraph.getChainNextInParent(s))for(let t=this.m_topoGraph.getChainFirstIsland(s);t!==p;t=this.m_topoGraph.getChainNextInParent(t))this.m_chainStack.push(t);if(16&this.m_options){this.m_visitedChainsIndex=this.m_topoGraph.createUserIndexForChains(),this.m_bitsetToChains=new Map,this.m_chainsLists=new I;const t=[],e=this.m_topoGraph.getFirstChain();for(t.push(e);t.length>0;){const e=t.at(-1);t.pop();for(let s=this.m_topoGraph.getChainFirstIsland(e);s!==p;s=this.m_topoGraph.getChainNextInParent(s))for(let e=this.m_topoGraph.getChainFirstIsland(s);e!==p;e=this.m_topoGraph.getChainNextInParent(e)){const s=this.m_topoGraph.getChainBitSet(e);if(null!==s&&!s.isZero()){let t;this.m_bitsetToChains.has(s)?t=this.m_bitsetToChains.get(s):(t=this.m_chainsLists.createList(),this.m_bitsetToChains.set(s,t)),this.m_chainsLists.addElement(t,e)}t.push(e)}}}}return this.makeNextGeometry()}getGeometryID(){return this.m_index}getGeometryIDs(){return this.m_currentIds.slice()}getBoundaryIDs(){return this.m_currentEdgeIds.slice()}buildIdsFromBitset(t,e){if(!t)return;const s=this.m_topoGraph.getGeometriesFromBits(t);if(s.length>0){for(let t=0,i=s.length;t<i;t++)e.push(this.m_shape.getGeometryUserIndex(s[t],this.m_geometryIndex));f(e)}}makeGeometryFromChainSinglePart(t){this.m_index++;const e=new a;null!==this.m_curveStitcher&&e.setCurveStitcherPointer(this.m_curveStitcher);const s=this.m_topoGraph.extractPolygonFromChainAndIslands(e,p,t,p);return null!==this.m_curveStitcher&&this.m_curveStitcher.stitchCurves(e,s,this.m_stitchMaxDeviation,!1),e.getGeometry(s)}makeGeometryFromChainMultiPart(t,e){this.m_index++;const s=new a;null!==this.m_curveStitcher&&s.setCurveStitcherPointer(this.m_curveStitcher);const i=this.m_bitsetToChains.has(e);h(i);const r=this.m_bitsetToChains.get(e);let n=p;for(let h=this.m_chainsLists.getFirst(r);h!==I.st_nullNode();h=this.m_chainsLists.getNext(h)){const t=this.m_chainsLists.getElement(h);n=this.m_topoGraph.extractPolygonFromChainAndIslands(s,n,t,p),this.m_topoGraph.setChainUserIndex(t,this.m_visitedChainsIndex,1)}return null!==this.m_curveStitcher&&this.m_curveStitcher.stitchCurves(s,n,this.m_stitchMaxDeviation,!1),s.getGeometry(n)}makeNextGeometry(){for(k(this.m_progressTracker);this.m_chainStack.length>0;){this.m_currentIds.length=0,this.m_currentEdgeIds.length=0;const t=this.m_chainStack.at(-1);this.m_chainStack.pop();const e=this.m_topoGraph.getChainArea(t);if(0!==e)if(e<0)for(let s=this.m_topoGraph.getChainFirstIsland(t);s!==p;s=this.m_topoGraph.getChainNextInParent(s))this.m_topoGraph.getChainArea(s)>0&&this.m_chainStack.push(s);else{for(let i=this.m_topoGraph.getChainFirstIsland(t);i!==p;i=this.m_topoGraph.getChainNextInParent(i))this.m_topoGraph.getChainArea(i)<0&&this.m_chainStack.push(i);if(-1!==this.m_visitedChainsIndex&&1===this.m_topoGraph.getChainUserIndex(t,this.m_visitedChainsIndex))continue;const e=t=>{const e=t.getUnorderedBitIterator();let s=0;for(;e.next()!==x.npos();)if(s++,s>1)return s;return s},s=e(this.m_topoGraph.getChainBitSet(t));if(s>0){if(1===s&&2&this.m_options||s>1&&1&this.m_options){const e=this.m_topoGraph.getChainBitSet(t);return this.buildIdsFromBitset(e,this.m_currentIds),16&this.m_options?this.makeGeometryFromChainMultiPart(t,e):this.makeGeometryFromChainSinglePart(t)}}else{if(!(12&~this.m_options)){if(32&this.m_options){const e=this.m_topoGraph.getChainBoundaryBitSet(t);this.buildIdsFromBitset(e,this.m_currentEdgeIds)}return this.makeGeometryFromChainSinglePart(t)}if(4&this.m_options){const s=this.m_topoGraph.getChainBoundaryBitSet(t);if(e(s)>1)return 32&this.m_options&&this.buildIdsFromBitset(s,this.m_currentEdgeIds),this.makeGeometryFromChainSinglePart(t);continue}if(8&this.m_options){const s=this.m_topoGraph.getChainBoundaryBitSet(t);if(1===e(s))return 32&this.m_options&&this.buildIdsFromBitset(s,this.m_currentEdgeIds),this.makeGeometryFromChainSinglePart(t);continue}}}}return null}}const F=new v;function P(t,s,i){return F.executeMany(new e(t),s,i,null)}function T(){return F.supportsCurves()}export{P as executeMany,T as supportsCurves};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{S as
|
|
5
|
+
import{S as r}from"../../../chunks/SimpleGeometryCursor.js";import{O as n}from"../../../chunks/OperatorSimplifyOGC.js";const e=new n;function t(r,n,t){return e.execute(r,n,t,null)}function u(n,t,u){const o=e.executeMany(new r(n),t,u,null);return Array.from(o)}function o(r,n,t,u){return e.isSimple(r,n,t,u,null)}function s(){return e.supportsCurves()}export{t as execute,u as executeMany,o as isSimple,s as supportsCurves};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
5
|
+
import{isSimple as r,supportsCurves as t,execute as n,executeMany as o}from"./gx/operatorSimplifyOGC.js";import{fromSpatialReference as e,getSpatialReference as s,fromGeometry as p,toGeometry as u}from"./support/apiConverter.js";function i(r){const t=s(r);return u(n(p(r),e(t),!1),t)}function a(r){const t=r.map(p),n=s(r);return o(t,e(n),!1).map((r=>u(r,n)))}function c(t,n){return r(p(t),e(s(t)),null!=n,n??null)}const m=t();export{i as execute,a as executeMany,c as isSimple,m as supportsCurves};
|