@arcgis/core 4.33.0-next.20250213 → 4.33.0-next.20250214
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/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeEnvironment.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/actions/OrderBy.js +1 -1
- package/arcade/functions/date.js +1 -1
- package/arcade/functions/feature.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetgeom.js +1 -1
- package/arcade/functions/featuresetstats.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/functions/fieldStats.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/functions/knowledgegraph.js +1 -1
- package/arcade/functions/maths.js +1 -1
- package/arcade/functions/string.js +1 -1
- package/arcade/geometry/functions.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/arcade.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{89960be0e525d42ccffe.js → 01f8f52a3f9e6fb72f64.js} +1 -1
- package/assets/esri/core/workers/chunks/{8191dd3d7451b2e7b95e.js → 041eebac192855fbf919.js} +1 -1
- package/assets/esri/core/workers/chunks/09cbf45dc7b026957d3e.js +1 -0
- package/assets/esri/core/workers/chunks/{1a286d43daa3b811c30d.js → 1661ac4e1b6c6af6ee0f.js} +1 -1
- package/assets/esri/core/workers/chunks/197dc75a1c10c0fbf65a.js +1 -0
- package/assets/esri/core/workers/chunks/238bcf6514a1f214cc8a.js +1 -0
- package/assets/esri/core/workers/chunks/{efded84870064c3d8210.js → 23a045fccc005079bd58.js} +1 -1
- package/assets/esri/core/workers/chunks/32fee5446ee0b0a6c4bd.js +1 -0
- package/assets/esri/core/workers/chunks/{f429d95eb986f3d215f3.js → 391c200274bbeb92404c.js} +1 -1
- package/assets/esri/core/workers/chunks/3c44b4bf7fe407ec1d70.js +1 -0
- package/assets/esri/core/workers/chunks/3eacb4d1275f2d87825f.js +1 -0
- package/assets/esri/core/workers/chunks/{c0af54cc5938176ce764.js → 3fe7be535affae31de7e.js} +1 -1
- package/assets/esri/core/workers/chunks/{c061cad8323f0469e7e4.js → 42f21349f488a14198e4.js} +1 -1
- package/assets/esri/core/workers/chunks/48eb5cbb4555acc56984.js +1 -0
- package/assets/esri/core/workers/chunks/4927b33f7e9daf059765.js +1 -0
- package/assets/esri/core/workers/chunks/50bab11c32bf4001edd7.js +1 -0
- package/assets/esri/core/workers/chunks/5c9a7b1dedd146cc65d2.js +1 -0
- package/assets/esri/core/workers/chunks/5d8120c84e5a164cb1bc.js +1 -0
- package/assets/esri/core/workers/chunks/{7a9e1696dc6120df15b0.js → 60ca6a2e9f1e2c969aab.js} +1 -1
- package/assets/esri/core/workers/chunks/679cc23be07ededb3992.js +1 -0
- package/assets/esri/core/workers/chunks/{9f122278e917c9ce5f95.js → 67c1e2c17ea3ca27248c.js} +1 -1
- package/assets/esri/core/workers/chunks/69b55259f90e8e4bc2aa.js +1 -0
- package/assets/esri/core/workers/chunks/69e0ff74e44962d97049.js +1 -0
- package/assets/esri/core/workers/chunks/6ca4b5d1a076c6079472.js +1 -0
- package/assets/esri/core/workers/chunks/{7058001bf66f9f3d5d45.js → 6d02d66234a7b74e5c14.js} +1 -1
- package/assets/esri/core/workers/chunks/{77bfd4f819096cb754ae.js → 6e92569a4a82592b95dc.js} +1 -1
- package/assets/esri/core/workers/chunks/6f007703662e714b2f0a.js +1 -0
- package/assets/esri/core/workers/chunks/744bdf2bb0cc38e6a7b1.js +1 -0
- package/assets/esri/core/workers/chunks/7bf9ebff90bb02bec8e7.js +1 -0
- package/assets/esri/core/workers/chunks/{8b6580329e1e35ea4190.js → 7c03489438f51a5170f3.js} +1 -1
- package/assets/esri/core/workers/chunks/7e77e4288ed205128b87.js +1 -0
- package/assets/esri/core/workers/chunks/80c3e933b43ea79b30de.js +1 -0
- package/assets/esri/core/workers/chunks/830844f7fb7557d30f34.js +1 -0
- package/assets/esri/core/workers/chunks/8a66d06132c8803033c9.js +1 -0
- package/assets/esri/core/workers/chunks/{e9993d4f2bfdc434fbcc.js → 8f4bcca8b0525e19374f.js} +1 -1
- package/assets/esri/core/workers/chunks/95047f145ebda65c3d8e.js +1 -0
- package/assets/esri/core/workers/chunks/9968c6654d048c9add0c.js +1 -0
- package/assets/esri/core/workers/chunks/{b50176897ffadc53573e.js → 9bbfa8dc4124b5273d28.js} +1 -1
- package/assets/esri/core/workers/chunks/a2b548fbfa2eb5e6f2a7.js +1 -0
- package/assets/esri/core/workers/chunks/a37825705e49b60e5d4b.js +1 -0
- package/assets/esri/core/workers/chunks/{211c32244e05164dcd38.js → aebbaa7ab7a6b3b1579c.js} +2 -2
- package/assets/esri/core/workers/chunks/b90b7ffc1e9363ed18e0.js +1 -0
- package/assets/esri/core/workers/chunks/{a39977478a6c57d2e8fb.js → bd2dcc55ac3418421ee5.js} +1 -1
- package/assets/esri/core/workers/chunks/{83fe9a8002a4fc96e534.js → bd38717780fffa49d36c.js} +1 -1
- package/assets/esri/core/workers/chunks/{c77ade444aa2f3f2b599.js → bdc9dec6a359d2e3705c.js} +1 -1
- package/assets/esri/core/workers/chunks/bf127fe767174e2715b5.js +1 -0
- package/assets/esri/core/workers/chunks/c3806be4a760735e6082.js +1 -0
- package/assets/esri/core/workers/chunks/cb3148cf11a420d6e9ab.js +1 -0
- package/assets/esri/core/workers/chunks/{8d8f5f08d730270e1165.js → cb9a27176bd5de2c34ca.js} +1 -1
- package/assets/esri/core/workers/chunks/cdf942020b7054628dc9.js +1 -0
- package/assets/esri/core/workers/chunks/d6c3df07cfaa6bb639e9.js +1 -0
- package/assets/esri/core/workers/chunks/ed89a108b032b982b12f.js +1 -0
- package/assets/esri/core/workers/chunks/ee5b82873ff80cb4ba34.js +1 -0
- package/assets/esri/core/workers/chunks/{d0656e9d30eb3a66a8db.js → f976233ad5e5b718ba83.js} +1 -1
- package/assets/esri/themes/base/widgets/_Directions.scss +30 -9
- package/assets/esri/themes/base/widgets/_Editor.scss +1 -0
- 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/arcade.js +1 -1
- package/chunks/array.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/copyright.txt +26 -19
- package/core/colorUtils.js +1 -1
- package/core/deprecate.js +1 -1
- package/editing/templateUtils.js +1 -1
- package/geohash/geohashUtils.js +1 -1
- package/interfaces.d.ts +634 -129
- package/intl/locale.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/GeoJSONLayer.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/OGCFeatureLayer.js +1 -1
- package/layers/RouteLayer.js +1 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/WFSLayer.js +1 -1
- package/layers/graphics/data/queryUtils.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/mixins/TrackableLayer.d.ts +4 -0
- package/layers/save/imageryUtils.js +1 -1
- package/layers/support/ExportImageServiceParameters.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/TitleCreator.js +5 -0
- package/layers/support/TrackInfo.d.ts +4 -0
- package/layers/support/TrackInfo.js +1 -1
- package/layers/support/TrackPartInfo.d.ts +4 -0
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/layers/support/rasterDatasets/datasetUtils.js +5 -0
- package/layers/support/rasterFormats/RasterCodec.js +1 -1
- package/layers/support/rasterFormats/TiffDecoder.js +1 -1
- package/layers/support/rasterFormats/pixelRangeUtils.js +1 -1
- package/layers/support/rasterFunctions/creators/createLocalFunctions.js +1 -1
- package/layers/support/rasterFunctions/creators/createStatisticsFunctions.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/networks/support/networkFieldUtils.js +5 -0
- package/package.json +1 -1
- package/renderers/support/rasterRendererHelper.js +1 -1
- package/rest/query/executeForIds.js +1 -1
- package/rest/support/BinParametersBase.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolRasterizer.js +1 -1
- package/symbols/cim/rasterizingUtils.js +1 -1
- package/symbols/support/previewCIMSymbol.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
- package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/2d/layers/support/RouteLayerInteraction.js +1 -1
- package/views/3d/interactive/editingTools/transform/ScaleRotateMeshAdapter.js +1 -1
- package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/i3s/BuildingFilterUtil.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/SymbologyInfo.js +5 -0
- package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentData.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +14 -14
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassIdentifier.js +5 -0
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +2 -2
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/View.js +1 -1
- package/views/draw/DrawAction.js +1 -1
- package/views/layers/FeatureLayerView.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/views/support/RequiredFieldsOptions.js +5 -0
- package/views/webgl/Texture.js +1 -1
- package/widgets/BasemapGallery.js +1 -1
- package/widgets/BasemapToggle.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
- package/widgets/Compass/CompassViewModel.js +1 -1
- package/widgets/DirectionalPad.js +1 -1
- package/widgets/Directions/DirectionsViewModel.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/AddAssociationWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
- package/widgets/Fullscreen.js +1 -1
- package/widgets/Home.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/LayerList/ListItem.js +1 -1
- package/widgets/LayerList/support/layerListUtils.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend.js +1 -1
- package/widgets/Locate.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/DigitizationAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
- package/widgets/OrientedImageryViewer/constants.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer/symbols.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/ScaleBar.js +1 -1
- package/widgets/Swipe.js +1 -1
- package/widgets/TableList/ListItem.js +1 -1
- package/widgets/TableList.js +1 -1
- package/widgets/Track.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/support/GoTo.js +1 -1
- package/widgets/support/goToUtils.js +5 -0
- package/assets/esri/core/workers/chunks/03f51ea011ffbcfb7c7d.js +0 -1
- package/assets/esri/core/workers/chunks/122ed10cac9f192e1eec.js +0 -1
- package/assets/esri/core/workers/chunks/1249fd2f83caeaefd8ce.js +0 -1
- package/assets/esri/core/workers/chunks/144e534d4ac1aafab60d.js +0 -1
- package/assets/esri/core/workers/chunks/15ad8036736a32652c9b.js +0 -1
- package/assets/esri/core/workers/chunks/177d4c2c10ef7369006f.js +0 -1
- package/assets/esri/core/workers/chunks/1d282700e76285a1684c.js +0 -1
- package/assets/esri/core/workers/chunks/282c2d52011b331d4704.js +0 -1
- package/assets/esri/core/workers/chunks/35392bf8f21005ad6170.js +0 -1
- package/assets/esri/core/workers/chunks/37cfd102b6ab5b959f9d.js +0 -1
- package/assets/esri/core/workers/chunks/6a9a1cd8134a903dd05a.js +0 -1
- package/assets/esri/core/workers/chunks/73d03c208242778e67bf.js +0 -1
- package/assets/esri/core/workers/chunks/7485588bd24217669578.js +0 -1
- package/assets/esri/core/workers/chunks/80d3aa3f27ad5b2b969b.js +0 -1
- package/assets/esri/core/workers/chunks/8939479cd433cc53f6c1.js +0 -1
- package/assets/esri/core/workers/chunks/8a2f3ce46eeac853b3a9.js +0 -1
- package/assets/esri/core/workers/chunks/8f31fbb1d549230ee3db.js +0 -1
- package/assets/esri/core/workers/chunks/91384398f01485631f70.js +0 -1
- package/assets/esri/core/workers/chunks/9421ae38fdf986b9b107.js +0 -1
- package/assets/esri/core/workers/chunks/94225d92afbdb10dfedb.js +0 -1
- package/assets/esri/core/workers/chunks/99c136b800e5fc7e04f4.js +0 -1
- package/assets/esri/core/workers/chunks/9b74635d80d029498da1.js +0 -1
- package/assets/esri/core/workers/chunks/a9274c9132e7a2691abb.js +0 -1
- package/assets/esri/core/workers/chunks/af917f69d9c6e9937263.js +0 -1
- package/assets/esri/core/workers/chunks/ca6180e572e69540c183.js +0 -1
- package/assets/esri/core/workers/chunks/cccd215b0a4890551957.js +0 -1
- package/assets/esri/core/workers/chunks/d074c916b414432a7b6a.js +0 -1
- package/assets/esri/core/workers/chunks/de638753a30c9aa41bad.js +0 -1
- package/assets/esri/core/workers/chunks/e6633f0326a44477f630.js +0 -1
- package/assets/esri/core/workers/chunks/eb0ce7937813d1be1284.js +0 -1
- package/assets/esri/core/workers/chunks/f2cf05fbbb51d657d300.js +0 -1
- package/assets/esri/core/workers/chunks/f4ba823c8acd60c7c82d.js +0 -1
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 i}from"../arcade/parser.js";import{referencesMember as c,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","isselfintersecting","ringisclockwise"]);let h=!1,A=!1,g=null,j=[];function x(r,t){if(!0===t.useAsync||!0===r.isAsync)return M(r,t);if(has("esri-csp-restrictions"))
|
|
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 i}from"../arcade/parser.js";import{referencesMember as c,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","isselfintersecting","ringisclockwise"]);let h=!1,A=!1,g=null,j=[];function x(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===g)throw new u(null,o.AsyncNotEnabled,null);if(has("esri-csp-restrictions"))return function(e){return g.executeScript(r,e)};try{return e(r,t,!0)}catch(n){if("esri.arcade.arcadeuncompilableerror"===n.declaredRootClass)return function(e){return g.executeScript(r,e)};throw n}}function v(e){a(e),r(e,"sync"),null===g?j.push(e):(r(e,"async"),g.extend(e))}function F(e,r=[]){return i(e,r)}function E(e,r,t=[]){return G(i(e,t),r)}function G(e,r){if(!0===r.useAsync||!0===e.isAsync){if(null===g)throw new u(null,o.AsyncNotEnabled,null);return g.executeScript(e,r)}return s(e,r)}function I(e,r){return c(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(),g=await import("../arcade/arcadeAsyncRuntime.js");for(const e of j)g.extend(e),r(e,"async");return j=null,!0}function N(){return h}function O(){return!!g}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,g.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 i=m(r);null===t&&i.length>0&&(t=n.getDefault()),r.loadedModules={};for(const n of i){b(t);const i=t.normalizeModuleUri(n.source);if(e.has(i.uri))throw new u(null,o.CircularModules,null);e.add(i.uri);const c=await t.fetchModule(i);await W(e,c,s,[],a,t),e.delete(i.uri),c.isAsync&&(r.isAsync=!0),c.usesFeatureSet&&(r.usesFeatureSet=!0),c.usesGeometry&&(r.usesGeometry=!0),r.loadedModules[n.libname]={uri:i.uri,script:c}}}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:x,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,x 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/array.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{deepClone as n}from"../arcade/deepClone.js";import{ArcadeExecutionError as t,ExecutionErrorCodes as r}from"../arcade/executionError.js";import e from"../arcade/ImmutableArray.js";import{D as o,
|
|
5
|
+
import{deepClone as n}from"../arcade/deepClone.js";import{ArcadeExecutionError as t,ExecutionErrorCodes as r}from"../arcade/executionError.js";import e from"../arcade/ImmutableArray.js";import{D as o,K as i,m as u,t as a,w as c,B as s,i as l,M as f,f as d}from"./languageUtils.js";import{isPromiseLike as h}from"../core/promiseUtils.js";import{isArray as w,isBoolean as g,isInteger as m}from"../support/guards.js";function F(F){function p(n,o,i){if(n instanceof e)return n.toArray();if(w(n))return n;throw new t(o,r.InvalidParameter,i)}function y(n,t){const r=n.length,e=Math.floor(r/2);return 0===r?[]:1===r?[n[0]]:v(y(n.slice(0,e),t),y(n.slice(e,r),t),t)}function v(n,t,r){const e=[];for(;n.length>0||t.length>0;)if(n.length>0&&t.length>0){let o=r(n[0],t[0]);isNaN(o)&&(o=0),o<=0?(e.push(n[0]),n=n.slice(1)):(e.push(t[0]),t=t.slice(1))}else n.length>0?(e.push(n[0]),n=n.slice(1)):t.length>0&&(e.push(t[0]),t=t.slice(1));return e}async function P(n,t){const r=n.length,e=Math.floor(r/2);if(0===r)return[];if(1===r)return[n[0]];const o=[await P(n.slice(0,e),t),await P(n.slice(e,r),t)];return I(o[0],o[1],t,[])}async function I(n,t,r,e){const o=e;if(n.length>0||t.length>0){if(n.length>0&&t.length>0){let i=await r(n[0],t[0]);return isNaN(i)&&(i=1),i<=0?(o.push(n[0]),n=n.slice(1)):(o.push(t[0]),t=t.slice(1)),I(n,t,r,e)}return n.length>0?(o.push(n[0]),I(n=n.slice(1),t,r,e)):(o.push(t[0]),I(n,t=t.slice(1),r,e))}return e}function N(n,e,i,a){o(i,1,2,n,e);let s=i[0];if(u(s)&&(s=s.toArray()),!1===w(s))throw new t(n,r.InvalidParameter,e);if(i.length>1){if(!1===l(i[1]))throw new t(n,r.InvalidParameter,e);let o=s;const u=i[1].createFunction(n);return a?P(o,u):(o=y(o,((n,t)=>u(n,t))),o)}let h=s;if(0===h.length)return[];const g={};for(let t=0;t<h.length;t++){const n=f(h[t]);""!==n&&(g[n]=!0)}if(!0===g.Array||!0===g.Dictionary||!0===g.Feature||!0===g.Voxel||!0===g.Point||!0===g.Polygon||!0===g.Polyline||!0===g.Multipoint||!0===g.Extent||!0===g.Function)return h.slice();let m=0,F="";for(const t in g)m++,F=t;return h=m>1||"String"===F?y(h,((n,t)=>{if(null==n||n===c)return null==t||t===c?0:1;if(null==t||t===c)return-1;const r=d(n),e=d(t);return r<e?-1:r===e?0:1})):"Number"===F?y(h,((n,t)=>n-t)):"Boolean"===F?y(h,((n,t)=>n===t?0:t?-1:1)):"Date"===F?y(h,((n,t)=>n.toNumber()-t.toNumber())):h.slice(),h}F.functions.array=function(e,c){return F.standardFunction(e,c,((s,l,f)=>{if(o(f,0,2,e,c),0===f.length)return[];if(1===f.length&&null===f[0])return[];if(w(f[0])){if(2===f.length&&!1===g(f[1]))throw new t(e,r.InvalidParameter,c);return!0===i(f[1],!1)?n(f[0]):f[0].slice()}if(u(f[0])){if(2===f.length&&!1===g(f[1]))throw new t(e,r.InvalidParameter,c);return!0===i(f[1],!1)?n(f[0]):f[0].toArray().slice()}const d=a(f[0]);if(isNaN(d)||!1===m(d))throw new t(e,r.InvalidParameter,c);const h=i(f[1],null),F=new Array(d);return F.fill(h),F}))},F.functions.front=function(n,e){return F.standardFunction(n,e,((i,a,c)=>{if(o(c,1,1,n,e),u(c[0])){if(c[0].length()<=0)throw new t(n,r.OutOfBounds,e);return c[0].get(0)}if(w(c[0])){if(c[0].length<=0)throw new t(n,r.OutOfBounds,e);return c[0][0]}throw new t(n,r.InvalidParameter,e)}))},F.functions.back=function(n,e){return F.standardFunction(n,e,((i,a,c)=>{if(o(c,1,1,n,e),u(c[0])){if(c[0].length()<=0)throw new t(n,r.OutOfBounds,e);return c[0].get(c[0].length()-1)}if(w(c[0])){if(c[0].length<=0)throw new t(n,r.OutOfBounds,e);return c[0][c[0].length-1]}throw new t(n,r.InvalidParameter,e)}))},F.functions.push=function(n,e){return F.standardFunction(n,e,((i,u,a)=>{if(o(a,1,2,n,e),w(a[0]))return a[0][a[0].length]=a[1],a[0].length;throw new t(n,r.InvalidParameter,e)}))},F.functions.pop=function(n,e){return F.standardFunction(n,e,((i,u,a)=>{if(o(a,1,1,n,e),w(a[0])){if(a[0].length<=0)throw new t(n,r.OutOfBounds,e);const o=a[0][a[0].length-1];return a[0].length=a[0].length-1,o}throw new t(n,r.InvalidParameter,e)}))},F.functions.erase=function(n,e){return F.standardFunction(n,e,((i,u,s)=>{if(o(s,2,2,n,e),w(s[0])){let o=a(s[1]);if(isNaN(o)||!1===m(o))throw new t(n,r.InvalidParameter,e);const i=s[0];if(i.length<=0)throw new t(n,r.OutOfBounds,e);if(o<0&&(o=i.length+o),o<0)throw new t(n,r.OutOfBounds,e);if(o>=i.length)throw new t(n,r.OutOfBounds,e);return i.splice(o,1),c}throw new t(n,r.InvalidParameter,e)}))},F.functions.insert=function(n,e){return F.standardFunction(n,e,((i,u,s)=>{if(o(s,3,3,n,e),w(s[0])){const o=a(s[1]);if(isNaN(o)||!1===m(o))throw new t(n,r.InvalidParameter,e);const i=s[2],u=s[0];if(o>u.length)throw new t(n,r.OutOfBounds,e);if(o<0&&o<-1*u.length)throw new t(n,r.OutOfBounds,e);return o===u.length?(u[o]=i,c):(u.splice(o,0,i),c)}throw new t(n,r.InvalidParameter,e)}))},F.functions.resize=function(n,e){return F.standardFunction(n,e,((u,s,l)=>{if(o(l,2,3,n,e),w(l[0])){const o=a(l[1]);if(isNaN(o)||!1===m(o))throw new t(n,r.InvalidParameter,e);if(o<0)throw new t(n,r.InvalidParameter,e);const u=i(l[2],null),s=l[0];if(s.length>=o)return s.length=o,c;const f=s.length;s.length=o;for(let n=f;n<s.length;n++)s[n]=u;return c}throw new t(n,r.InvalidParameter,e)}))},F.functions.includes=function(n,e){return F.standardFunction(n,e,((i,a,c)=>{if(o(c,2,2,n,e),w(c[0])){const n=c[1];return!!c[0].some((t=>s(t,n)))}if(u(c[0])){const n=c[1];return!!c[0].toArray().some((t=>s(t,n)))}throw new t(n,r.InvalidParameter,e)}))},F.functions.slice=function(n,e){return F.standardFunction(n,e,((c,s,l)=>{if(o(l,1,3,n,e),w(l[0])){const o=a(i(l[1],0)),u=a(i(l[2],l[0].length));if(isNaN(o)||!1===m(o))throw new t(n,r.InvalidParameter,e);if(isNaN(u)||!1===m(u))throw new t(n,r.InvalidParameter,e);return l[0].slice(o,u)}if(u(l[0])){const o=l[0],u=a(i(l[1],0)),c=a(i(l[2],o.length()));if(isNaN(u)||!1===m(u))throw new t(n,r.InvalidParameter,e);if(isNaN(c)||!1===m(c))throw new t(n,r.InvalidParameter,e);return o.toArray().slice(u,c)}throw new t(n,r.InvalidParameter,e)}))},F.functions.splice=function(n,t){return F.standardFunction(n,t,((n,t,r)=>{const e=[];for(let o=0;o<r.length;o++)w(r[o])?e.push(...r[o]):u(r[o])?e.push(...r[o].toArray()):e.push(r[o]);return e}))},F.functions.top=function(n,e){return F.standardFunction(n,e,((i,c,s)=>{if(o(s,2,2,n,e),w(s[0]))return a(s[1])>=s[0].length?s[0].slice():s[0].slice(0,a(s[1]));if(u(s[0]))return a(s[1])>=s[0].length()?s[0].slice():s[0].slice(0,a(s[1]));throw new t(n,r.InvalidParameter,e)}))},F.functions.first=function(n,t){return F.standardFunction(n,t,((r,e,i)=>(o(i,1,1,n,t),w(i[0])?0===i[0].length?null:i[0][0]:u(i[0])?0===i[0].length()?null:i[0].get(0):null)))},"sync"===F.mode&&(F.functions.sort=function(n,t){return F.standardFunction(n,t,((t,r,e)=>N(n,r,e,!1)))},F.functions.any=function(n,t){return F.standardFunction(n,t,((t,r,e)=>{o(e,2,2,n,r);const i=e[1].createFunction(n),u=p(e[0],n,r);for(const n of u){const t=i(n);if(g(t)&&!0===t)return!0}return!1}))},F.functions.all=function(n,t){return F.standardFunction(n,t,((t,r,e)=>{o(e,2,2,n,r);const i=e[1].createFunction(n),u=p(e[0],n,r);for(const n of u){if(!0!==i(n))return!1}return!0}))},F.functions.none=function(n,t){return F.standardFunction(n,t,((t,r,e)=>{o(e,2,2,n,r);const i=e[1].createFunction(n),u=p(e[0],n,r);for(const n of u){if(!0===i(n))return!1}return!0}))},F.functions.reduce=function(n,t){return F.standardFunction(n,t,((t,r,e)=>{o(e,2,3,n,r);const i=e[1].createFunction(n),u=p(e[0],n,r);return 2===e.length?0===u.length?null:u.reduce(((n,t)=>{const r=i(n,t);return n=void 0!==r&&r!==c?r:null})):u.reduce(((n,t)=>{const r=i(n,t);return n=void 0!==r&&r!==c?r:null}),e[2])}))},F.functions.map=function(n,t){return F.standardFunction(n,t,((t,r,e)=>{o(e,2,2,n,r);const i=e[1].createFunction(n),u=p(e[0],n,r),a=[];for(const n of u){const t=i(n);void 0!==t&&t!==c?a.push(t):a.push(null)}return a}))},F.functions.filter=function(n,t){return F.standardFunction(n,t,((t,r,e)=>{o(e,2,2,n,r);const i=e[1].createFunction(n),u=p(e[0],n,r),a=[];for(const n of u){!0===i(n)&&a.push(n)}return a}))}),"async"===F.mode&&(F.functions.sort=function(n,t){return F.standardFunctionAsync(n,t,(async(t,r,e)=>N(n,r,e,!0)))},F.functions.any=function(n,t){return F.standardFunctionAsync(n,t,(async(t,r,e)=>{o(e,2,2,n,r);const i=e[1].createFunction(n),u=p(e[0],n,r);for(const n of u){const t=await i(n);let r=null;if(r=h(r)?await t:t,g(r)&&!0===r)return!0}return!1}))},F.functions.all=function(n,t){return F.standardFunctionAsync(n,t,(async(t,r,e)=>{o(e,2,2,n,r);const i=e[1].createFunction(n),u=p(e[0],n,r);for(const n of u){const t=await i(n);let r=null;if(r=h(r)?await t:t,!0!==r)return!1}return!0}))},F.functions.none=function(n,t){return F.standardFunctionAsync(n,t,(async(t,r,e)=>{o(e,2,2,n,r);const i=e[1].createFunction(n),u=p(e[0],n,r);for(const n of u){const t=await i(n);let r=null;if(r=h(r)?await t:t,!0===r)return!1}return!0}))},F.functions.filter=function(n,t){return F.standardFunctionAsync(n,t,(async(t,r,e)=>{o(e,2,2,n,r);const i=e[1].createFunction(n),u=p(e[0],n,r),a=[];for(const n of u){const t=await i(n);let r=null;r=h(r)?await t:t,!0===r&&a.push(n)}return a}))},F.functions.reduce=function(n,t){return F.standardFunctionAsync(n,t,(async(t,r,e)=>{o(e,2,3,n,r);const u=e[1].createFunction(n),a=p(e[0],n,r);let s;if(e.length>2){const n=i(e[2],null);s=a.reduce((async(n,t)=>{let r=await n;return void 0!==r&&r!==c||(r=null),u(r,t)}),Promise.resolve(n))}else{if(0===a.length)return null;s=a.reduce((async(n,t,r)=>{if(r<=1)return u(n,t);let e=await n;return void 0!==e&&e!==c||(e=null),u(e,t)}))}return s.then((n=>void 0!==n&&n!==c?n:null))}))},F.functions.map=function(n,t){return F.standardFunctionAsync(n,t,(async(t,r,e)=>{o(e,2,2,n,r);const i=e[1].createFunction(n),u=p(e[0],n,r),a=[];for(const n of u){const t=await i(n);let r=null;r=h(r)?await t:t,void 0!==r&&r!==c?a.push(r):a.push(null)}return a}))})}const p=Object.freeze(Object.defineProperty({__proto__:null,registerFunctions:F},Symbol.toStringTag,{value:"Module"}));export{p as A,F as r};
|
package/chunks/languageUtils.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 e from"../config.js";import{version as t}from"../kernel.js";import{ArcadeDate as n,createDateTimeZone as r}from"../arcade/ArcadeDate.js";import{ArcadeModule as i}from"../arcade/ArcadeModule.js";import{ArcadeExecutionError as o,ExecutionErrorCodes as a}from"../arcade/executionError.js";import{ArcadeFunction as u}from"../arcade/FunctionWrapper.js";import s from"../arcade/ImmutableArray.js";import l from"../arcade/ImmutablePathArray.js";import f from"../arcade/ImmutablePointArray.js";import{esriFieldToJson as c,layerGeometryEsriRestConstants as m}from"../arcade/featureset/support/shared.js";import{format as d,parse as y}from"../core/number.js";import{DateOnly as p}from"../core/sql/DateOnly.js";import{TimeOnly as g}from"../core/sql/TimeOnly.js";import h from"../geometry/Extent.js";import b from"../geometry/Geometry.js";import N from"../geometry/Multipoint.js";import S from"../geometry/Point.js";import Z from"../geometry/Polygon.js";import T from"../geometry/Polyline.js";import A from"../geometry/SpatialReference.js";import{isClockwise as k}from"../geometry/support/coordsUtils.js";import{fromJSON as j}from"../geometry/support/jsonUtils.js";import{getLocale as D}from"../intl/locale.js";import{isString as O,isNumber as C,isBoolean as x,isArray as F,isDate as w,isGraphic as J,isInteger as M}from"../support/guards.js";import{DateTime as R}from"luxon";class _{constructor(e){this.value=e}}class I{constructor(e){this.value=e}}const v={type:"VOID"},Y=Symbol("BREAK"),L=Symbol("CONTINUE");function P(e,t,n){return""===t||null==t||t===n||t===n?e:e=e.split(t).join(n)}function G(e){return e instanceof u}function V(e){return e instanceof i}function z(e){return!!O(e)||(!!C(e)||(!!te(e)||(!!ne(e)||(!!re(e)||(!!x(e)||(null===e||(e===v||"number"==typeof e)))))))}function q(e,t){return void 0===e?t:e}function E(e){return null==e?"":F(e)||ee(e)?"Array":te(e)?"Date":re(e)?"Time":ne(e)?"DateOnly":O(e)?"String":x(e)?"Boolean":C(e)?"Number":"esri.arcade.Attachment"===e?.declaredClass?"Attachment":"esri.arcade.Portal"===e?.declaredClass?"Portal":"esri.arcade.Dictionary"===e?.declaredClass?"Dictionary":X(e)?"KnowledgeGraph":e instanceof i?"Module":H(e)?"Feature":e instanceof S?"Point":e instanceof Z?"Polygon":e instanceof T?"Polyline":e instanceof N?"Multipoint":e instanceof h?"Extent":G(e)?"Function":B(e)?"FeatureSet":Q(e)?"FeatureSetCollection":$(e)?"Voxel":e===v?"":"number"==typeof e&&isNaN(e)?"Number":"Unrecognized Type"}function U(e){return e instanceof b}function H(e){return"esri.arcade.Feature"===e?.arcadeDeclaredClass}function $(e){return"esri.arcade.Voxel"===e?.arcadeDeclaredClass}function B(e){return"esri.arcade.featureset.support.FeatureSet"===e?.declaredRootClass}function K(e){return"esri.arcade.Dictionary"===e?.declaredClass}function W(e){return K(e)||H(e)||$(e)}function Q(e){return"esri.arcade.featureSetCollection"===e?.declaredRootClass}function X(e){return"esri.rest.knowledgeGraph.KnowledgeGraph"===e?.declaredClass}function ee(e){return e instanceof s}function te(e){return e instanceof n}function ne(e){return e instanceof p}function re(e){return e instanceof g}function ie(e){return null!=e&&"object"==typeof e}function oe(e,t,n,r,i){if(e.length<t||e.length>n)throw new o(r,a.WrongNumberOfParameters,i)}function ae(e){return e<0?-Math.round(-e):Math.round(e)}function ue(e,t){return isNaN(e)||null==t||""===t?e.toString():(t=P(t,"‰",""),t=P(t,"¤",""),d(e,{pattern:t}))}function se(e,t){return null==t||""===t?e.toISOString(!0):e.toFormat(le(t),{locale:D(),numberingSystem:"latn"})}function le(e,t=!1){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let n="";const r=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|Z{1,5}|.)/g;for(const i of e.match(r)||[])switch(i){case"D":n+="d";break;case"DD":n+="dd";break;case"DDD":n+="o";break;case"d":n+="c";break;case"ddd":n+="ccc";break;case"dddd":n+="cccc";break;case"M":n+="L";break;case"MM":n+="LL";break;case"MMM":n+="LLL";break;case"MMMM":n+="LLLL";break;case"YY":n+="yy";break;case"Y":case"YYYY":n+="yyyy";break;case"Q":n+="q";break;case"Z":n+="Z";break;case"ZZ":n+="ZZ";break;case"ZZZ":n+="ZZZ";break;case"ZZZZ":n+=t?"[ZZZZ]":"ZZZZ";break;case"ZZZZZ":n+=t?"[ZZZZZ]":"ZZZZZ";break;case"S":n+="'S'";break;case"SS":n+="'SS'";break;case"SSS":n+="u";break;case"A":case"a":n+="a";break;case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":case"X":case"x":n+=i;break;default:i.length>=2&&"["===i.slice(0,1)&&"]"===i.slice(-1)?n+=`'${i.slice(1,-1)}'`:n+=`'${i}'`}return n}function fe(e,t,n){switch(n){case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}return!1}function ce(e,t,r){if(null===e){if(null===t||t===v)return fe(null,null,r);if(C(t))return fe(0,t,r);if(O(t))return fe(0,be(t),r);if(x(t))return fe(0,be(t),r);if(te(t))return fe(0,t.toNumber(),r);if(re(t))return fe(e,t.toNumber(),r);if(ne(t))return fe(e,t.toNumber(),r)}if(e===v){if(null===t||t===v)return fe(null,null,r);if(C(t))return fe(0,t,r);if(O(t))return fe(0,be(t),r);if(x(t))return fe(0,be(t),r);if(te(t))return fe(0,t.toNumber(),r);if(re(t))return fe(e,t.toNumber(),r);if(ne(t))return fe(e,t.toNumber(),r)}else if(C(e)){if(C(t))return fe(e,t,r);if(x(t))return fe(e,be(t),r);if(null===t||t===v)return fe(e,0,r);if(O(t))return fe(e,be(t),r);if(te(t))return fe(e,t.toNumber(),r);if(re(t))return fe(e,t.toNumber(),r);if(ne(t))return fe(e,t.toNumber(),r)}else if(O(e)){if(O(t))return fe(ye(e),ye(t),r);if(te(t))return fe(be(e),t.toNumber(),r);if(re(t))return fe(be(e),t.toNumber(),r);if(ne(t))return fe(be(e),t.toNumber(),r);if(C(t))return fe(be(e),t,r);if(null===t||t===v)return fe(be(e),0,r);if(x(t))return fe(be(e),be(t),r)}else if(te(e)){if(te(t))return e.timeZone!==t.timeZone&&(e.isUnknownTimeZone?e=n.arcadeDateAndZoneToArcadeDate(e,t.timeZone):t.isUnknownTimeZone&&(t=n.arcadeDateAndZoneToArcadeDate(t,e.timeZone))),fe(e.toNumber(),t.toNumber(),r);if(null===t||t===v)return fe(e.toNumber(),0,r);if(C(t))return fe(e.toNumber(),t,r);if(x(t))return fe(e.toNumber(),be(t),r);if(O(t))return fe(e.toNumber(),be(t),r);if(re(t))throw new o(null,a.CannotCompareDateAndTime,null);if(ne(t))return fe(e.toNumber(),t.toNumber(),r)}else if(x(e)){if(x(t))return fe(e,t,r);if(C(t))return fe(be(e),be(t),r);if(te(t))return fe(be(e),t.toNumber(),r);if(re(t))return fe(be(e),t.toNumber(),r);if(ne(t))return fe(be(e),t.toNumber(),r);if(null===t||t===v)return fe(be(e),0,r);if(O(t))return fe(be(e),be(t),r)}else if(ne(e)){if(te(t))return fe(e.toNumber(),t.toNumber(),r);if(null===t||t===v)return fe(e.toNumber(),0,r);if(C(t))return fe(e.toNumber(),t,r);if(x(t))return fe(e.toNumber(),be(t),r);if(O(t))return fe(e.toNumber(),be(t),r);if(re(t))throw new o(null,a.CannotCompareDateAndTime,null);if(ne(t))return fe(e.toNumber(),t.toNumber(),r)}else if(re(e)){if(te(t))throw new o(null,a.CannotCompareDateAndTime,null);if(null===t||t===v)return fe(e.toNumber(),0,r);if(C(t))return fe(e.toNumber(),t,r);if(x(t))return fe(e.toNumber(),be(t),r);if(O(t))return fe(e.toNumber(),be(t),r);if(re(t))return fe(e.toNumber(),t.toNumber(),r);if(ne(t))throw new o(null,a.CannotCompareDateAndTime,null)}return!!me(e,t)&&("<="===r||">="===r)}function me(e,t){if(e===t)return!0;if(null===e&&t===v||null===t&&e===v)return!0;if(te(e)&&te(t))return e.equals(t);if(re(e)&&re(t))return e.equals(t);if(ne(e)&&ne(t))return e.equals(t);if(e instanceof l)return e.equalityTest(t);if(e instanceof f)return e.equalityTest(t);if(e instanceof S&&t instanceof S){const n=e.cache._arcadeCacheId,r=t.cache._arcadeCacheId;if(null!=n)return n===r}if(ie(e)&&ie(t)){if(e._arcadeCacheId===t._arcadeCacheId&&void 0!==e._arcadeCacheId&&null!==e._arcadeCacheId)return!0;if(e._underlyingGraphic===t._underlyingGraphic&&void 0!==e._underlyingGraphic&&null!==e._underlyingGraphic)return!0}return!1}function de(e,{useNumbersForDates:t}){let n="";for(const r in e){""!==n&&(n+=",");const i=e[r];null==i?n+=JSON.stringify(r)+":null":x(i)||C(i)||O(i)?n+=JSON.stringify(r)+":"+JSON.stringify(i):U(i)?n+=JSON.stringify(r)+":"+ge(i):re(i)||ne(i)?n+=`${JSON.stringify(r)}:${JSON.stringify(i.toString())}`:ee(i)||Array.isArray(i)?n+=JSON.stringify(r)+":"+ge(i,null,t):te(i)?n+=t?JSON.stringify(r)+":"+JSON.stringify(i.getTime()):JSON.stringify(r)+":"+i.stringify():null!==i&&"object"==typeof i&&"castToText"in i&&(n+=JSON.stringify(r)+":"+i.castToText(t))}return"{"+n+"}"}function ye(e,t){if(O(e))return e;if(null===e)return"";if(C(e))return ue(e,t);if(x(e))return e.toString();if(te(e))return se(e,t);if(re(e))return e.toFormat(t);if(ne(e))return e.toFormat(t);if(e instanceof b)return JSON.stringify(e.toJSON());if(F(e)){const t=[];for(let n=0;n<e.length;n++)t[n]=he(e[n]);return"["+t.join(",")+"]"}if(e instanceof s){const t=[];for(let n=0;n<e.length();n++)t[n]=he(e.get(n));return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText():G(e)?"object, Function":e===v?"":V(e)?"object, Module":""}function pe(e){const t=[];if(e instanceof s){for(let n=0;n<e.length();n++)t[n]=be(e.get(n));return t}if(!F(e))return null;for(let n=0;n<e.length;n++)t[n]=be(e[n]);return t}function ge(e,t,n=!1){if(O(e))return e;if(null===e)return"";if(C(e))return ue(e,t);if(x(e))return e.toString();if(te(e))return se(e,t);if(re(e))return e.toFormat(t);if(ne(e))return e.toFormat(t);if(e instanceof b)return e instanceof h?'{"xmin":'+e.xmin.toString()+',"ymin":'+e.ymin.toString()+","+(e.hasZ?'"zmin":'+e.zmin.toString()+",":"")+(e.hasM?'"mmin":'+e.mmin.toString()+",":"")+'"xmax":'+e.xmax.toString()+',"ymax":'+e.ymax.toString()+","+(e.hasZ?'"zmax":'+e.zmax.toString()+",":"")+(e.hasM?'"mmax":'+e.mmax.toString()+",":"")+'"spatialReference":'+xe(e.spatialReference)+"}":xe(e.toJSON(),((e,t)=>e.key===t.key?0:"spatialReference"===e.key?1:"spatialReference"===t.key||e.key<t.key?-1:e.key>t.key?1:0));if(F(e)){const t=[];for(let r=0;r<e.length;r++)t[r]=he(e[r],n);return"["+t.join(",")+"]"}if(e instanceof s){const t=[];for(let r=0;r<e.length();r++)t[r]=he(e.get(r),n);return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText(n):G(e)?"object, Function":e===v?"":V(e)?"object, Module":""}function he(e,t=!1){if(null===e)return"null";if(x(e)||C(e)||O(e))return JSON.stringify(e);if(e instanceof b)return ge(e,null,t);if(e instanceof s)return ge(e,null,t);if(Array.isArray(e))return ge(e,null,t);if(te(e))return t?JSON.stringify(e.getTime()):JSON.stringify(se(e,""));if(re(e))return JSON.stringify(e.toString());if(ne(e))return JSON.stringify(e.toString());if(null!==e&&"object"==typeof e){if("castToText"in e)return e.castToText(t)}else if(e===v)return"null";return"null"}function be(e,t){return C(e)?e:null===e||""===e?0:te(e)||ne(e)||re(e)?NaN:x(e)?e?1:0:F(e)||""===e||void 0===e?NaN:void 0!==t&&O(e)?(t=P(t,"‰",""),t=P(t,"¤",""),y(e,{pattern:t})):e===v?0:Number(e)}function Ne(e,t){if(te(e))return e;if(O(e)){const r=Se(e,t);if(r)return n.dateTimeToArcadeDate(r)}return null}function Se(e,t){const n=/ (\d\d)/,i=r(t);let o=R.fromISO(e,{zone:i});return o.isValid||n.test(e)&&(e=e.replace(n,"T$1"),o=R.fromISO(e,{zone:t}),o.isValid)?o:null}function Ze(e){return x(e)?e:O(e)?"true"===(e=e.toLowerCase()):!!C(e)&&(0!==e&&!isNaN(e))}function Te(e,t){const n=JSON.parse(e);return n&&!n.spatialReference&&(n.spatialReference=t),j(n)}function Ae(e,t){return null==e?null:(null!==e.spatialReference&&void 0!==e.spatialReference||(e.spatialReference=t),e)}function ke(e){if(null===e)return null;if(e instanceof S)return"NaN"===e.x||null===e.x||isNaN(e.x)?null:e;if(e instanceof Z){if(0===e.rings.length)return null;for(const t of e.rings)if(t.length>0)return e;return null}if(e instanceof T){if(0===e.paths.length)return null;for(const t of e.paths)if(t.length>0)return e;return null}return e instanceof N?0===e.points.length?null:e:e instanceof h?"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)?null:e:null}function je(e,t){if(!e)return t;if(!e.domain)return t;let n=null,r=null;if(te(t))n=t.toNumber();else if(ne(t))n=t.toString();else if(re(t))n=t.toStorageString();else if("string"===e.field.type||"esriFieldTypeString"===e.field.type)n=ye(t);else{if(null==t)return null;if(""===t)return t;n=be(t)}for(let i=0;i<e.domain.codedValues.length;i++){const t=e.domain.codedValues[i];t.code===n&&(r=t)}return null===r?ye(t):r.name}function De(e,t){if(!e)return t;if(!e.domain)return t;let n=null;const r=ye(t);for(let i=0;i<e.domain.codedValues.length;i++){const t=e.domain.codedValues[i];t.name===r&&(n=t)}return null===n?t:n.code}function Oe(e,t,n=null,r=null){if(!t)return null;if(!t.fields)return null;let i,u,s=null;for(let o=0;o<t.fields.length;o++){const n=t.fields[o];n.name.toLowerCase()===e.toString().toLowerCase()&&(s=n)}if(null===s)throw new o(null,a.FieldNotFound,null,{key:e});let l=t.typeIdField,f="id",c=t.types;if(t.subtypeField&&(l=t.subtypeField,f="code",c=t.subtypes??[]),null===r&&n&&l)r=n.hasField(l)?n.field(l):null;else if(l&&null!==r){let e=!1;for(const t of c||[])if(r===t[f]){e=!0;break}if(!e)for(const t of c||[])if(r===t.name){r=t[f],e=!0;break}e||(r=null,n&&l&&(r=n.hasField(l)?n.field(l):null))}return null!=r&&c.some((e=>e[f]===r&&(i=e.domains?.[s.name],i&&"inherited"===i.type&&(i=Ce(s.name,t),u=!0),!0))),u||i||(i=Ce(e,t)),{field:s,domain:i}}function Ce(e,t){let n;return t.fields.some((t=>(t.name.toLowerCase()===e.toLowerCase()&&(n=t.domain),!!n))),n}function xe(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});const n="boolean"==typeof t.cycles&&t.cycles,r=t.cmp&&(i=t.cmp,function(e){return function(t,n){const r={key:t,value:e[t]},o={key:n,value:e[n]};return i(r,o)}});var i;const o=[];return function e(t){if(t?.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===t)return;if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);let i,a;if(Array.isArray(t)){for(a="[",i=0;i<t.length;i++)i&&(a+=","),a+=e(t[i])||"null";return a+"]"}if(null===t)return"null";if(o.includes(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const u=o.push(t)-1,s=Object.keys(t).sort(r?.(t));for(a="",i=0;i<s.length;i++){const n=s[i],r=e(t[n]);r&&(a&&(a+=","),a+=JSON.stringify(n)+":"+r)}return o.splice(u,1),"{"+a+"}"}(e)}function Fe(e){if(null===e)return null;const t=[];for(const n of e)H(n)?t.push(n.geometry()):t.push(n);return t}function we(e,t){if(!(t instanceof S))throw new o(null,a.InvalidParameter,null);e.push(t.hasZ?t.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])}function Je(e,t){if(F(e)||ee(e)){let n=!1,r=!1,i=[],u=t;if(F(e)){for(const t of e)we(i,t);i.length>0&&(u=e[0].spatialReference,n=e[0].hasZ,r=e[0].hasM)}else if(e instanceof f)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,u=e.get(0).spatialReference);else{if(!ee(e))throw new o(null,a.InvalidParameter,null);for(const t of e.toArray())we(i,t);i.length>0&&(u=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}if(0===i.length)return null;return k(i)||(i=i.slice().reverse()),new Z({rings:[i],spatialReference:u,hasZ:n,hasM:r})}return e}function Me(e,t){if(F(e)||ee(e)){let n=!1,r=!1,i=[],o=t;if(F(e)){for(const t of e)we(i,t);i.length>0&&(o=e[0].spatialReference,n=!0===e[0].hasZ,r=!0===e[0].hasM)}else if(e instanceof f)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,o=e.get(0).spatialReference);else if(ee(e)){for(const t of e.toArray())we(i,t);i.length>0&&(o=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}return 0===i.length?null:new T({paths:[i],spatialReference:o,hasZ:n,hasM:r})}return e}function Re(e,t){if(F(e)||ee(e)){let n=!1,r=!1,i=[],o=t;if(F(e)){for(const t of e)we(i,t);i.length>0&&(o=e[0].spatialReference,n=!0===e[0].hasZ,r=!0===e[0].hasM)}else if(e instanceof f)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,o=e.get(0).spatialReference);else if(ee(e)){for(const t of e.toArray())we(i,t);i.length>0&&(o=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}return 0===i.length?null:new N({points:i,spatialReference:o,hasZ:n,hasM:r})}return e}function _e(e,t=!1){const n=[];if(null===e)return n;if(!0===F(e)){for(let r=0;r<e.length;r++){const i=ye(e[r]);""===i&&!0!==t||n.push(i)}return n}if(e instanceof s){for(let r=0;r<e.length();r++){const i=ye(e.get(r));""===i&&!0!==t||n.push(i)}return n}if(z(e)){const r=ye(e);return""===r&&!0!==t||n.push(r),n}return[]}let Ie=0;function ve(e){return Ie++,Ie%100==0?(Ie=0,new Promise((t=>{setTimeout((()=>{t(e)}),0)}))):e}function Ye(e,t,n){switch(n){case"&":return e&t;case"|":return e|t;case"^":return e^t;case"<<":return e<<t;case">>":return e>>t;case">>>":return e>>>t}}function Le(e,t=null){return null==e?null:x(e)||C(e)||O(e)?e:e instanceof b?!0===t?.keepGeometryType?e:e.toJSON():e instanceof s?e.toArray().map((e=>Le(e,t))):Array.isArray(e)?e.map((e=>Le(e,t))):w(e)?e:te(e)?e.toJSDate():re(e)?e.toString():ne(e)?e.toJSDate():null!==e&&"object"==typeof e&&void 0!==e.castAsJson?e.castAsJson(t):null}async function Pe(e,t,n,r,i){const o=await Ge(e,t,n);i[r]=o}async function Ge(e,t=null,n=null){if(e instanceof s&&(e=e.toArray()),null==e)return null;if(z(e)||e instanceof b||w(e)||te(e))return Le(e,n);if(Array.isArray(e)){const r=[],i=[];for(const o of e)null===o||z(o)||o instanceof b||w(o)||te(o)?i.push(Le(o,n)):(i.push(null),r.push(Pe(o,t,n,i.length-1,i)));return r.length>0&&await Promise.all(r),i}return null!==e&&"object"==typeof e&&void 0!==e.castAsJsonAsync?e.castAsJsonAsync(t,n):null}function Ve(e){return ze(e)?e.parent:e}function ze(e){return e&&"declaredClass"in e&&"esri.layers.support.SubtypeSublayer"===e.declaredClass}function qe(e){return e&&"declaredClass"in e&&"esri.layers.SubtypeGroupLayer"===e.declaredClass}function Ee(e,t,n){const r=Ve(e.fullSchema());if(null===r)return null;if(!r.fields)return null;return Oe(t,r,e,n)}function Ue(e){const t=Ve(e.fullSchema());return null===t?null:t.fields?t.subtypeField?{subtypeField:t.subtypeField,subtypes:t.subtypes?t.subtypes.map((e=>({name:e.name,code:e.code}))):[]}:t.typeIdField?{subtypeField:t.typeIdField,subtypes:t.types?t.types.map((e=>({name:e.name,code:e.id}))):[]}:null:null}function He(e,t,n,r){const i=Ve(e.fullSchema());if(null===i)return null;if(!i.fields)return null;const o=Oe(t,i,e,r);if(void 0===n)try{n=e.field(t)}catch(a){return null}return je(o,n)}function $e(e,t,n,r){const i=Ve(e.fullSchema());if(null===i)return null;if(!i.fields)return null;if(void 0===n){try{n=e.field(t)}catch(o){return null}return n}return De(Oe(t,i,e,r),n)}function Be(e){return e?.timeZone??"system"}function Ke(e){const t=Ve(e.fullSchema());if(null===t)return null;if(!t.fields)return null;const n=[];for(const r of t.fields)n.push(c(r));return{objectIdField:t.objectIdField,globalIdField:t.globalIdField??"",geometryType:void 0===m[t.geometryType]?"":m[t.geometryType],fields:n}}function We(r,i){const o=n.systemTimeZoneCanonicalName;return"system"===r&&(r=o),{version:Qe,engineVersion:t,timeZone:r,userTimeZone:o,spatialReference:i instanceof A?i.toJSON():i,application:e.applicationName??"",engine:"web",locale:D()}}const Qe="1.30",Xe=Object.freeze(Object.defineProperty({__proto__:null,ImplicitResult:I,ReturnResult:_,absRound:ae,arcadeVersion:Qe,autoCastArrayOfPointsToMultiPoint:Re,autoCastArrayOfPointsToPolygon:Je,autoCastArrayOfPointsToPolyline:Me,autoCastFeatureToGeometry:Fe,binaryOperator:Ye,breakResult:Y,castAsJson:Le,castAsJsonAsync:Ge,castRecordToText:de,continueResult:L,defaultExecutingContext:We,defaultTimeZone:Be,defaultUndefined:q,equalityTest:me,featureDomainCodeLookup:$e,featureDomainValueLookup:He,featureFullDomain:Ee,featureSchema:Ke,featureSubtypes:Ue,fixNullGeometry:ke,fixSpatialReference:Ae,formatDate:se,formatNumber:ue,getDomain:Oe,getDomainCode:De,getDomainValue:je,getType:E,greaterThanLessThan:ce,isArray:F,isBoolean:x,isDate:te,isDateOnly:ne,isDictionary:K,isDictionaryLike:W,isFeature:H,isFeatureSet:B,isFeatureSetCollection:Q,isFunctionParameter:G,isGeometry:U,isGraphic:J,isImmutableArray:ee,isInteger:M,isJsDate:w,isKnowledgeGraph:X,isModule:V,isNumber:C,isObject:ie,isSimpleType:z,isString:O,isSubtypeGrouplayer:qe,isSubtypeSublayer:ze,isTime:re,isVoxel:$,multiReplace:P,parseGeometryFromJson:Te,pcCheck:oe,stableStringify:xe,standardiseDateFormat:le,tick:ve,toBoolean:Ze,toDate:Ne,toNumber:be,toNumberArray:pe,toString:ye,toStringArray:_e,toStringExplicit:ge,voidOperation:v},Symbol.toStringTag,{value:"Module"}));export{_e as $,ce as A,me as B,Ye as C,oe as D,Fe as E,Je as F,Me as G,Re as H,I,q as J,Be as K,E as L,le as M,ae as N,Ee as O,$e as P,He as Q,_ as R,Ke as S,Ue as T,ke as U,$ as V,P as W,We as X,pe as Y,ze as Z,ve as _,Le as a,Oe as a0,je as a1,De as a2,V as a3,ie as a4,ue as a5,se as a6,Te as a7,xe as a8,qe as a9,Qe as aa,Ge as b,de as c,z as d,Ze as e,ye as f,te as g,Ne as h,G as i,ne as j,re as k,U as l,ee as m,H as n,Q as o,B as p,K as q,X as r,ge as s,be as t,Ae as u,Xe as v,v as w,Y as x,L as y,W as z};
|
|
5
|
+
import e from"../config.js";import{version as t}from"../kernel.js";import{ArcadeDate as n,createDateTimeZone as r}from"../arcade/ArcadeDate.js";import{ArcadeModule as i}from"../arcade/ArcadeModule.js";import{ArcadeExecutionError as o,ExecutionErrorCodes as a}from"../arcade/executionError.js";import{ArcadeFunction as u}from"../arcade/FunctionWrapper.js";import s from"../arcade/ImmutableArray.js";import l from"../arcade/ImmutablePathArray.js";import f from"../arcade/ImmutablePointArray.js";import{esriFieldToJson as c,layerGeometryEsriRestConstants as m}from"../arcade/featureset/support/shared.js";import{format as d,parse as y}from"../core/number.js";import{DateOnly as p}from"../core/sql/DateOnly.js";import{TimeOnly as g}from"../core/sql/TimeOnly.js";import h from"../geometry/Extent.js";import b from"../geometry/Geometry.js";import N from"../geometry/Multipoint.js";import S from"../geometry/Point.js";import Z from"../geometry/Polygon.js";import T from"../geometry/Polyline.js";import A from"../geometry/SpatialReference.js";import{isClockwise as k}from"../geometry/support/coordsUtils.js";import{fromJSON as j}from"../geometry/support/jsonUtils.js";import{getLocale as D}from"../intl/locale.js";import{isString as O,isNumber as C,isBoolean as x,isArray as F,isDate as w,isGraphic as J,isInteger as M}from"../support/guards.js";import{DateTime as R}from"luxon";class _{constructor(e){this.value=e}}class I{constructor(e){this.value=e}}const v={type:"VOID"},Y=Symbol("BREAK"),L=Symbol("CONTINUE");function P(e,t,n){return""===t||null==t||t===n||t===n?e:e=e.split(t).join(n)}function G(e){return e instanceof u}function V(e){return e instanceof i}function z(e){return!!O(e)||(!!C(e)||(!!ne(e)||(!!re(e)||(!!ie(e)||(!!x(e)||(null===e||(e===v||"number"==typeof e)))))))}function q(e,t){return void 0===e?t:e}function E(e){return null==e?"":F(e)||te(e)?"Array":ne(e)?"Date":ie(e)?"Time":re(e)?"DateOnly":O(e)?"String":x(e)?"Boolean":C(e)?"Number":"esri.arcade.Attachment"===e?.declaredClass?"Attachment":"esri.arcade.Portal"===e?.declaredClass?"Portal":"esri.arcade.Dictionary"===e?.declaredClass?"Dictionary":ee(e)?"KnowledgeGraph":e instanceof i?"Module":$(e)?"Feature":e instanceof S?"Point":e instanceof Z?"Polygon":e instanceof T?"Polyline":e instanceof N?"Multipoint":e instanceof h?"Extent":G(e)?"Function":K(e)?"FeatureSet":X(e)?"FeatureSetCollection":B(e)?"Voxel":e===v?"":"number"==typeof e&&isNaN(e)?"Number":"Unrecognized Type"}function U(e){return e===v}function H(e){return e instanceof b}function $(e){return"esri.arcade.Feature"===e?.arcadeDeclaredClass}function B(e){return"esri.arcade.Voxel"===e?.arcadeDeclaredClass}function K(e){return"esri.arcade.featureset.support.FeatureSet"===e?.declaredRootClass}function W(e){return"esri.arcade.Dictionary"===e?.declaredClass}function Q(e){return W(e)||$(e)||B(e)}function X(e){return"esri.arcade.featureSetCollection"===e?.declaredRootClass}function ee(e){return"esri.rest.knowledgeGraph.KnowledgeGraph"===e?.declaredClass}function te(e){return e instanceof s}function ne(e){return e instanceof n}function re(e){return e instanceof p}function ie(e){return e instanceof g}function oe(e){return null!=e&&"object"==typeof e}function ae(e,t,n,r,i){if(e.length<t||e.length>n)throw new o(r,a.WrongNumberOfParameters,i)}function ue(e){return e<0?-Math.round(-e):Math.round(e)}function se(e,t){return isNaN(e)||null==t||""===t?e.toString():(t=P(t,"‰",""),t=P(t,"¤",""),d(e,{pattern:t}))}function le(e,t){return null==t||""===t?e.toISOString(!0):e.toFormat(fe(t),{locale:D(),numberingSystem:"latn"})}function fe(e,t=!1){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let n="";const r=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|Z{1,5}|.)/g;for(const i of e.match(r)||[])switch(i){case"D":n+="d";break;case"DD":n+="dd";break;case"DDD":n+="o";break;case"d":n+="c";break;case"ddd":n+="ccc";break;case"dddd":n+="cccc";break;case"M":n+="L";break;case"MM":n+="LL";break;case"MMM":n+="LLL";break;case"MMMM":n+="LLLL";break;case"YY":n+="yy";break;case"Y":case"YYYY":n+="yyyy";break;case"Q":n+="q";break;case"Z":n+="Z";break;case"ZZ":n+="ZZ";break;case"ZZZ":n+="ZZZ";break;case"ZZZZ":n+=t?"[ZZZZ]":"ZZZZ";break;case"ZZZZZ":n+=t?"[ZZZZZ]":"ZZZZZ";break;case"S":n+="'S'";break;case"SS":n+="'SS'";break;case"SSS":n+="u";break;case"A":case"a":n+="a";break;case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":case"X":case"x":n+=i;break;default:i.length>=2&&"["===i.slice(0,1)&&"]"===i.slice(-1)?n+=`'${i.slice(1,-1)}'`:n+=`'${i}'`}return n}function ce(e,t,n){switch(n){case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}return!1}function me(e,t,r){if(null===e){if(null===t||t===v)return ce(null,null,r);if(C(t))return ce(0,t,r);if(O(t))return ce(0,Ne(t),r);if(x(t))return ce(0,Ne(t),r);if(ne(t))return ce(0,t.toNumber(),r);if(ie(t))return ce(e,t.toNumber(),r);if(re(t))return ce(e,t.toNumber(),r)}if(e===v){if(null===t||t===v)return ce(null,null,r);if(C(t))return ce(0,t,r);if(O(t))return ce(0,Ne(t),r);if(x(t))return ce(0,Ne(t),r);if(ne(t))return ce(0,t.toNumber(),r);if(ie(t))return ce(e,t.toNumber(),r);if(re(t))return ce(e,t.toNumber(),r)}else if(C(e)){if(C(t))return ce(e,t,r);if(x(t))return ce(e,Ne(t),r);if(null===t||t===v)return ce(e,0,r);if(O(t))return ce(e,Ne(t),r);if(ne(t))return ce(e,t.toNumber(),r);if(ie(t))return ce(e,t.toNumber(),r);if(re(t))return ce(e,t.toNumber(),r)}else if(O(e)){if(O(t))return ce(pe(e),pe(t),r);if(ne(t))return ce(Ne(e),t.toNumber(),r);if(ie(t))return ce(Ne(e),t.toNumber(),r);if(re(t))return ce(Ne(e),t.toNumber(),r);if(C(t))return ce(Ne(e),t,r);if(null===t||t===v)return ce(Ne(e),0,r);if(x(t))return ce(Ne(e),Ne(t),r)}else if(ne(e)){if(ne(t))return e.timeZone!==t.timeZone&&(e.isUnknownTimeZone?e=n.arcadeDateAndZoneToArcadeDate(e,t.timeZone):t.isUnknownTimeZone&&(t=n.arcadeDateAndZoneToArcadeDate(t,e.timeZone))),ce(e.toNumber(),t.toNumber(),r);if(null===t||t===v)return ce(e.toNumber(),0,r);if(C(t))return ce(e.toNumber(),t,r);if(x(t))return ce(e.toNumber(),Ne(t),r);if(O(t))return ce(e.toNumber(),Ne(t),r);if(ie(t))throw new o(null,a.CannotCompareDateAndTime,null);if(re(t))return ce(e.toNumber(),t.toNumber(),r)}else if(x(e)){if(x(t))return ce(e,t,r);if(C(t))return ce(Ne(e),Ne(t),r);if(ne(t))return ce(Ne(e),t.toNumber(),r);if(ie(t))return ce(Ne(e),t.toNumber(),r);if(re(t))return ce(Ne(e),t.toNumber(),r);if(null===t||t===v)return ce(Ne(e),0,r);if(O(t))return ce(Ne(e),Ne(t),r)}else if(re(e)){if(ne(t))return ce(e.toNumber(),t.toNumber(),r);if(null===t||t===v)return ce(e.toNumber(),0,r);if(C(t))return ce(e.toNumber(),t,r);if(x(t))return ce(e.toNumber(),Ne(t),r);if(O(t))return ce(e.toNumber(),Ne(t),r);if(ie(t))throw new o(null,a.CannotCompareDateAndTime,null);if(re(t))return ce(e.toNumber(),t.toNumber(),r)}else if(ie(e)){if(ne(t))throw new o(null,a.CannotCompareDateAndTime,null);if(null===t||t===v)return ce(e.toNumber(),0,r);if(C(t))return ce(e.toNumber(),t,r);if(x(t))return ce(e.toNumber(),Ne(t),r);if(O(t))return ce(e.toNumber(),Ne(t),r);if(ie(t))return ce(e.toNumber(),t.toNumber(),r);if(re(t))throw new o(null,a.CannotCompareDateAndTime,null)}return!!de(e,t)&&("<="===r||">="===r)}function de(e,t){if(e===t)return!0;if(null===e&&t===v||null===t&&e===v)return!0;if(ne(e)&&ne(t))return e.equals(t);if(ie(e)&&ie(t))return e.equals(t);if(re(e)&&re(t))return e.equals(t);if(e instanceof l)return e.equalityTest(t);if(e instanceof f)return e.equalityTest(t);if(e instanceof S&&t instanceof S){const n=e.cache._arcadeCacheId,r=t.cache._arcadeCacheId;if(null!=n)return n===r}if(oe(e)&&oe(t)){if(e._arcadeCacheId===t._arcadeCacheId&&void 0!==e._arcadeCacheId&&null!==e._arcadeCacheId)return!0;if(e._underlyingGraphic===t._underlyingGraphic&&void 0!==e._underlyingGraphic&&null!==e._underlyingGraphic)return!0}return!1}function ye(e,{useNumbersForDates:t}){let n="";for(const r in e){""!==n&&(n+=",");const i=e[r];null==i?n+=JSON.stringify(r)+":null":x(i)||C(i)||O(i)?n+=JSON.stringify(r)+":"+JSON.stringify(i):H(i)?n+=JSON.stringify(r)+":"+he(i):ie(i)||re(i)?n+=`${JSON.stringify(r)}:${JSON.stringify(i.toString())}`:te(i)||Array.isArray(i)?n+=JSON.stringify(r)+":"+he(i,null,t):ne(i)?n+=t?JSON.stringify(r)+":"+JSON.stringify(i.getTime()):JSON.stringify(r)+":"+i.stringify():null!==i&&"object"==typeof i&&"castToText"in i&&(n+=JSON.stringify(r)+":"+i.castToText(t))}return"{"+n+"}"}function pe(e,t){if(O(e))return e;if(null===e)return"";if(C(e))return se(e,t);if(x(e))return e.toString();if(ne(e))return le(e,t);if(ie(e))return e.toFormat(t);if(re(e))return e.toFormat(t);if(e instanceof b)return JSON.stringify(e.toJSON());if(F(e)){const t=[];for(let n=0;n<e.length;n++)t[n]=be(e[n]);return"["+t.join(",")+"]"}if(e instanceof s){const t=[];for(let n=0;n<e.length();n++)t[n]=be(e.get(n));return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText():G(e)?"object, Function":e===v?"":V(e)?"object, Module":""}function ge(e){const t=[];if(e instanceof s){for(let n=0;n<e.length();n++)t[n]=Ne(e.get(n));return t}if(!F(e))return null;for(let n=0;n<e.length;n++)t[n]=Ne(e[n]);return t}function he(e,t,n=!1){if(O(e))return e;if(null===e)return"";if(C(e))return se(e,t);if(x(e))return e.toString();if(ne(e))return le(e,t);if(ie(e))return e.toFormat(t);if(re(e))return e.toFormat(t);if(e instanceof b)return e instanceof h?'{"xmin":'+e.xmin.toString()+',"ymin":'+e.ymin.toString()+","+(e.hasZ?'"zmin":'+e.zmin.toString()+",":"")+(e.hasM?'"mmin":'+e.mmin.toString()+",":"")+'"xmax":'+e.xmax.toString()+',"ymax":'+e.ymax.toString()+","+(e.hasZ?'"zmax":'+e.zmax.toString()+",":"")+(e.hasM?'"mmax":'+e.mmax.toString()+",":"")+'"spatialReference":'+Fe(e.spatialReference)+"}":Fe(e.toJSON(),((e,t)=>e.key===t.key?0:"spatialReference"===e.key?1:"spatialReference"===t.key||e.key<t.key?-1:e.key>t.key?1:0));if(F(e)){const t=[];for(let r=0;r<e.length;r++)t[r]=be(e[r],n);return"["+t.join(",")+"]"}if(e instanceof s){const t=[];for(let r=0;r<e.length();r++)t[r]=be(e.get(r),n);return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText(n):G(e)?"object, Function":e===v?"":V(e)?"object, Module":""}function be(e,t=!1){if(null===e)return"null";if(x(e)||C(e)||O(e))return JSON.stringify(e);if(e instanceof b)return he(e,null,t);if(e instanceof s)return he(e,null,t);if(Array.isArray(e))return he(e,null,t);if(ne(e))return t?JSON.stringify(e.getTime()):JSON.stringify(le(e,""));if(ie(e))return JSON.stringify(e.toString());if(re(e))return JSON.stringify(e.toString());if(null!==e&&"object"==typeof e){if("castToText"in e)return e.castToText(t)}else if(e===v)return"null";return"null"}function Ne(e,t){return C(e)?e:null===e||""===e?0:ne(e)||re(e)||ie(e)?NaN:x(e)?e?1:0:F(e)||""===e||void 0===e?NaN:void 0!==t&&O(e)?(t=P(t,"‰",""),t=P(t,"¤",""),y(e,{pattern:t})):e===v?0:Number(e)}function Se(e,t){if(ne(e))return e;if(O(e)){const r=Ze(e,t);if(r)return n.dateTimeToArcadeDate(r)}return null}function Ze(e,t){const n=/ (\d\d)/,i=r(t);let o=R.fromISO(e,{zone:i});return o.isValid||n.test(e)&&(e=e.replace(n,"T$1"),o=R.fromISO(e,{zone:t}),o.isValid)?o:null}function Te(e){return x(e)?e:O(e)?"true"===(e=e.toLowerCase()):!!C(e)&&(0!==e&&!isNaN(e))}function Ae(e,t){const n=JSON.parse(e);return n&&!n.spatialReference&&(n.spatialReference=t),j(n)}function ke(e,t){return null==e?null:(null!==e.spatialReference&&void 0!==e.spatialReference||(e.spatialReference=t),e)}function je(e){if(null===e)return null;if(e instanceof S)return"NaN"===e.x||null===e.x||isNaN(e.x)?null:e;if(e instanceof Z){if(0===e.rings.length)return null;for(const t of e.rings)if(t.length>0)return e;return null}if(e instanceof T){if(0===e.paths.length)return null;for(const t of e.paths)if(t.length>0)return e;return null}return e instanceof N?0===e.points.length?null:e:e instanceof h?"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)?null:e:null}function De(e,t){if(!e)return t;if(!e.domain)return t;let n=null,r=null;if(ne(t))n=t.toNumber();else if(re(t))n=t.toString();else if(ie(t))n=t.toStorageString();else if("string"===e.field.type||"esriFieldTypeString"===e.field.type)n=pe(t);else{if(null==t)return null;if(""===t)return t;n=Ne(t)}for(let i=0;i<e.domain.codedValues.length;i++){const t=e.domain.codedValues[i];t.code===n&&(r=t)}return null===r?pe(t):r.name}function Oe(e,t){if(!e)return t;if(!e.domain)return t;let n=null;const r=pe(t);for(let i=0;i<e.domain.codedValues.length;i++){const t=e.domain.codedValues[i];t.name===r&&(n=t)}return null===n?t:n.code}function Ce(e,t,n=null,r=null){if(!t)return null;if(!t.fields)return null;let i,u,s=null;for(let o=0;o<t.fields.length;o++){const n=t.fields[o];n.name.toLowerCase()===e.toString().toLowerCase()&&(s=n)}if(null===s)throw new o(null,a.FieldNotFound,null,{key:e});let l=t.typeIdField,f="id",c=t.types;if(t.subtypeField&&(l=t.subtypeField,f="code",c=t.subtypes??[]),null===r&&n&&l)r=n.hasField(l)?n.field(l):null;else if(l&&null!==r){let e=!1;for(const t of c||[])if(r===t[f]){e=!0;break}if(!e)for(const t of c||[])if(r===t.name){r=t[f],e=!0;break}e||(r=null,n&&l&&(r=n.hasField(l)?n.field(l):null))}return null!=r&&c.some((e=>e[f]===r&&(i=e.domains?.[s.name],i&&"inherited"===i.type&&(i=xe(s.name,t),u=!0),!0))),u||i||(i=xe(e,t)),{field:s,domain:i}}function xe(e,t){let n;return t.fields.some((t=>(t.name.toLowerCase()===e.toLowerCase()&&(n=t.domain),!!n))),n}function Fe(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});const n="boolean"==typeof t.cycles&&t.cycles,r=t.cmp&&(i=t.cmp,function(e){return function(t,n){const r={key:t,value:e[t]},o={key:n,value:e[n]};return i(r,o)}});var i;const o=[];return function e(t){if(t?.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===t)return;if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);let i,a;if(Array.isArray(t)){for(a="[",i=0;i<t.length;i++)i&&(a+=","),a+=e(t[i])||"null";return a+"]"}if(null===t)return"null";if(o.includes(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const u=o.push(t)-1,s=Object.keys(t).sort(r?.(t));for(a="",i=0;i<s.length;i++){const n=s[i],r=e(t[n]);r&&(a&&(a+=","),a+=JSON.stringify(n)+":"+r)}return o.splice(u,1),"{"+a+"}"}(e)}function we(e){if(null===e)return null;const t=[];for(const n of e)$(n)?t.push(n.geometry()):t.push(n);return t}function Je(e,t){if(!(t instanceof S))throw new o(null,a.InvalidParameter,null);e.push(t.hasZ?t.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])}function Me(e,t){if(F(e)||te(e)){let n=!1,r=!1,i=[],u=t;if(F(e)){for(const t of e)Je(i,t);i.length>0&&(u=e[0].spatialReference,n=e[0].hasZ,r=e[0].hasM)}else if(e instanceof f)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,u=e.get(0).spatialReference);else{if(!te(e))throw new o(null,a.InvalidParameter,null);for(const t of e.toArray())Je(i,t);i.length>0&&(u=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}if(0===i.length)return null;return k(i)||(i=i.slice().reverse()),new Z({rings:[i],spatialReference:u,hasZ:n,hasM:r})}return e}function Re(e,t){if(F(e)||te(e)){let n=!1,r=!1,i=[],o=t;if(F(e)){for(const t of e)Je(i,t);i.length>0&&(o=e[0].spatialReference,n=!0===e[0].hasZ,r=!0===e[0].hasM)}else if(e instanceof f)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,o=e.get(0).spatialReference);else if(te(e)){for(const t of e.toArray())Je(i,t);i.length>0&&(o=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}return 0===i.length?null:new T({paths:[i],spatialReference:o,hasZ:n,hasM:r})}return e}function _e(e,t){if(F(e)||te(e)){let n=!1,r=!1,i=[],o=t;if(F(e)){for(const t of e)Je(i,t);i.length>0&&(o=e[0].spatialReference,n=!0===e[0].hasZ,r=!0===e[0].hasM)}else if(e instanceof f)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,o=e.get(0).spatialReference);else if(te(e)){for(const t of e.toArray())Je(i,t);i.length>0&&(o=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}return 0===i.length?null:new N({points:i,spatialReference:o,hasZ:n,hasM:r})}return e}function Ie(e,t=!1){const n=[];if(null===e)return n;if(!0===F(e)){for(let r=0;r<e.length;r++){const i=pe(e[r]);""===i&&!0!==t||n.push(i)}return n}if(e instanceof s){for(let r=0;r<e.length();r++){const i=pe(e.get(r));""===i&&!0!==t||n.push(i)}return n}if(z(e)){const r=pe(e);return""===r&&!0!==t||n.push(r),n}return[]}let ve=0;function Ye(e){return ve++,ve%100==0?(ve=0,new Promise((t=>{setTimeout((()=>{t(e)}),0)}))):e}function Le(e,t,n){switch(n){case"&":return e&t;case"|":return e|t;case"^":return e^t;case"<<":return e<<t;case">>":return e>>t;case">>>":return e>>>t}}function Pe(e,t=null){return null==e?null:x(e)||C(e)||O(e)?e:e instanceof b?!0===t?.keepGeometryType?e:e.toJSON():e instanceof s?e.toArray().map((e=>Pe(e,t))):Array.isArray(e)?e.map((e=>Pe(e,t))):w(e)?e:ne(e)?e.toJSDate():ie(e)?e.toString():re(e)?e.toJSDate():null!==e&&"object"==typeof e&&void 0!==e.castAsJson?e.castAsJson(t):null}async function Ge(e,t,n,r,i){const o=await Ve(e,t,n);i[r]=o}async function Ve(e,t=null,n=null){if(e instanceof s&&(e=e.toArray()),null==e)return null;if(z(e)||e instanceof b||w(e)||ne(e))return Pe(e,n);if(Array.isArray(e)){const r=[],i=[];for(const o of e)null===o||z(o)||o instanceof b||w(o)||ne(o)?i.push(Pe(o,n)):(i.push(null),r.push(Ge(o,t,n,i.length-1,i)));return r.length>0&&await Promise.all(r),i}return null!==e&&"object"==typeof e&&void 0!==e.castAsJsonAsync?e.castAsJsonAsync(t,n):null}function ze(e){return qe(e)?e.parent:e}function qe(e){return e&&"declaredClass"in e&&"esri.layers.support.SubtypeSublayer"===e.declaredClass}function Ee(e){return e&&"declaredClass"in e&&"esri.layers.SubtypeGroupLayer"===e.declaredClass}function Ue(e,t,n){const r=ze(e.fullSchema());if(null===r)return null;if(!r.fields)return null;return Ce(t,r,e,n)}function He(e){const t=ze(e.fullSchema());return null===t?null:t.fields?t.subtypeField?{subtypeField:t.subtypeField,subtypes:t.subtypes?t.subtypes.map((e=>({name:e.name,code:e.code}))):[]}:t.typeIdField?{subtypeField:t.typeIdField,subtypes:t.types?t.types.map((e=>({name:e.name,code:e.id}))):[]}:null:null}function $e(e,t,n,r){const i=ze(e.fullSchema());if(null===i)return null;if(!i.fields)return null;const o=Ce(t,i,e,r);if(void 0===n)try{n=e.field(t)}catch(a){return null}return De(o,n)}function Be(e,t,n,r){const i=ze(e.fullSchema());if(null===i)return null;if(!i.fields)return null;if(void 0===n){try{n=e.field(t)}catch(o){return null}return n}return Oe(Ce(t,i,e,r),n)}function Ke(e){return e?.timeZone??"system"}function We(e){const t=ze(e.fullSchema());if(null===t)return null;if(!t.fields)return null;const n=[];for(const r of t.fields)n.push(c(r));return{objectIdField:t.objectIdField,globalIdField:t.globalIdField??"",geometryType:void 0===m[t.geometryType]?"":m[t.geometryType],fields:n}}function Qe(r,i){const o=n.systemTimeZoneCanonicalName;return"system"===r&&(r=o),{version:Xe,engineVersion:t,timeZone:r,userTimeZone:o,spatialReference:i instanceof A?i.toJSON():i,application:e.applicationName??"",engine:"web",locale:D()}}const Xe="1.30",et=Object.freeze(Object.defineProperty({__proto__:null,ImplicitResult:I,ReturnResult:_,absRound:ue,arcadeVersion:Xe,autoCastArrayOfPointsToMultiPoint:_e,autoCastArrayOfPointsToPolygon:Me,autoCastArrayOfPointsToPolyline:Re,autoCastFeatureToGeometry:we,binaryOperator:Le,breakResult:Y,castAsJson:Pe,castAsJsonAsync:Ve,castRecordToText:ye,continueResult:L,defaultExecutingContext:Qe,defaultTimeZone:Ke,defaultUndefined:q,equalityTest:de,featureDomainCodeLookup:Be,featureDomainValueLookup:$e,featureFullDomain:Ue,featureSchema:We,featureSubtypes:He,fixNullGeometry:je,fixSpatialReference:ke,formatDate:le,formatNumber:se,getDomain:Ce,getDomainCode:Oe,getDomainValue:De,getType:E,greaterThanLessThan:me,isArray:F,isBoolean:x,isDate:ne,isDateOnly:re,isDictionary:W,isDictionaryLike:Q,isFeature:$,isFeatureSet:K,isFeatureSetCollection:X,isFunctionParameter:G,isGeometry:H,isGraphic:J,isImmutableArray:te,isInteger:M,isJsDate:w,isKnowledgeGraph:ee,isModule:V,isNumber:C,isObject:oe,isSimpleType:z,isString:O,isSubtypeGrouplayer:Ee,isSubtypeSublayer:qe,isTime:ie,isVoid:U,isVoxel:B,multiReplace:P,parseGeometryFromJson:Ae,pcCheck:ae,stableStringify:Fe,standardiseDateFormat:fe,tick:Ye,toBoolean:Te,toDate:Se,toNumber:Ne,toNumberArray:ge,toString:pe,toStringArray:Ie,toStringExplicit:he,voidOperation:v},Symbol.toStringTag,{value:"Module"}));export{Ye as $,me as A,de as B,Le as C,ae as D,U as E,we as F,Me as G,Re as H,I,_e as J,q as K,Ke as L,E as M,fe as N,ue as O,Ue as P,Be as Q,_ as R,$e as S,We as T,He as U,je as V,B as W,P as X,Qe as Y,ge as Z,qe as _,Pe as a,Ie as a0,Ce as a1,De as a2,Oe as a3,V as a4,oe as a5,se as a6,le as a7,Ae as a8,Fe as a9,Ee as aa,Xe as ab,Ve as b,ye as c,z as d,Te as e,pe as f,ne as g,Se as h,G as i,re as j,ie as k,H as l,te as m,$ as n,X as o,K as p,W as q,ee as r,he as s,Ne as t,ke as u,et as v,v as w,Y as x,L as y,Q as z};
|
package/copyright.txt
CHANGED
|
@@ -1485,31 +1485,38 @@ Copyright (c) 2022 Gildas Lormeau. All rights reserved.
|
|
|
1485
1485
|
|
|
1486
1486
|
-----------------------------------------------------------------
|
|
1487
1487
|
|
|
1488
|
-
|
|
1488
|
+
lit/
|
|
1489
1489
|
|
|
1490
|
-
https://github.com/
|
|
1490
|
+
https://github.com/lit/lit
|
|
1491
1491
|
|
|
1492
|
-
|
|
1492
|
+
BSD 3-Clause License
|
|
1493
1493
|
|
|
1494
|
-
Copyright (c)
|
|
1494
|
+
Copyright (c) 2017 Google LLC. All rights reserved.
|
|
1495
1495
|
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
in the Software without restriction, including without limitation the rights
|
|
1499
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1500
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
1501
|
-
furnished to do so, subject to the following conditions:
|
|
1496
|
+
Redistribution and use in source and binary forms, with or without
|
|
1497
|
+
modification, are permitted provided that the following conditions are met:
|
|
1502
1498
|
|
|
1503
|
-
|
|
1504
|
-
|
|
1499
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
1500
|
+
list of conditions and the following disclaimer.
|
|
1505
1501
|
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1502
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
1503
|
+
this list of conditions and the following disclaimer in the documentation
|
|
1504
|
+
and/or other materials provided with the distribution.
|
|
1505
|
+
|
|
1506
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
1507
|
+
contributors may be used to endorse or promote products derived from
|
|
1508
|
+
this software without specific prior written permission.
|
|
1509
|
+
|
|
1510
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
1511
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
1512
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
1513
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
1514
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
1515
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
1516
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
1517
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
1518
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
1519
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1513
1520
|
|
|
1514
1521
|
-----------------------------------------------------------------
|
|
1515
1522
|
|
package/core/colorUtils.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 n from"../Color.js";import{shuffle as t,getRandomNumberGenerator as r}from"./arrayUtils.js";import{clone as o}from"./lang.js";import{e}from"../chunks/vec42.js";import{fromValues as
|
|
5
|
+
import n from"../Color.js";import{shuffle as t,getRandomNumberGenerator as r}from"./arrayUtils.js";import{clone as o}from"./lang.js";import{clamp as e}from"./mathUtils.js";import{e as u}from"../chunks/vec42.js";import{fromValues as c}from"./libs/gl-matrix-2/factories/vec4f64.js";function i(n){return"r"in n&&"g"in n&&"b"in n}function a(n){return"h"in n&&"s"in n&&"v"in n}function s(n){return"l"in n&&"a"in n&&"b"in n}function f(n){return"l"in n&&"c"in n&&"h"in n}function h(n){return"x"in n&&"y"in n&&"z"in n}const l=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],g=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function b(n,t){const r=[];let o,e;if(n[0].length!==t.length)throw new Error("dimensions do not match");const u=n.length,c=n[0].length;let i=0;for(o=0;o<u;o++){for(i=0,e=0;e<c;e++)i+=n[o][e]*t[e];r.push(i)}return r}function m(n){const t=[n.r/255,n.g/255,n.b/255].map((n=>n<=.04045?n/12.92:((n+.055)/1.055)**2.4)),r=b(l,t);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function M(n){const t=b(g,[n.x/100,n.y/100,n.z/100]).map((n=>{const t=n<=.0031308?12.92*n:1.055*n**(1/2.4)-.055;return Math.min(1,Math.max(t,0))}));return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function d(n){const t=[n.x/95.047,n.y/100,n.z/108.883].map((n=>n>(6/29)**3?n**(1/3):1/3*(29/6)**2*n+4/29));return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function p(n){const t=n.l,r=[(t+16)/116+n.a/500,(t+16)/116,(t+16)/116-n.b/200].map((n=>n>6/29?n**3:3*(6/29)**2*(n-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function w(n){const t=n.l,r=n.a,o=n.b,e=Math.sqrt(r*r+o*o);let u=Math.atan2(o,r);return u=u>0?u:u+2*Math.PI,{l:t,c:e,h:u}}function x(n){const t=n.l,r=n.c,o=n.h;return{l:t,a:r*Math.cos(o),b:r*Math.sin(o)}}function k(n){return d(m(n))}function y(n){return M(p(n))}function j(n){return w(d(m(n)))}function v(n){return M(p(x(n)))}function z(n){const t=n.r,r=n.g,o=n.b,e=Math.max(t,r,o),u=e-Math.min(t,r,o);let c=e,i=0===u?0:e===t?(r-o)/u%6:e===r?(o-t)/u+2:(t-r)/u+4,a=0===u?0:u/c;return i<0&&(i+=6),i*=60,a*=100,c*=100/255,{h:i,s:a,v:c}}function A(n){const t=(n.h+360)%360/60,r=n.s/100,o=n.v/100*255,e=o*r,u=e*(1-Math.abs(t%2-1));let c;switch(Math.floor(t)){case 0:c={r:e,g:u,b:0};break;case 1:c={r:u,g:e,b:0};break;case 2:c={r:0,g:e,b:u};break;case 3:c={r:0,g:u,b:e};break;case 4:c={r:u,g:0,b:e};break;case 5:case 6:c={r:e,g:0,b:u};break;default:c={r:0,g:0,b:0}}return c.r=Math.round(c.r+o-e),c.g=Math.round(c.g+o-e),c.b=Math.round(c.b+o-e),c}function U(n){return i(n)?n:f(n)?v(n):s(n)?y(n):h(n)?M(n):a(n)?A(n):n}function B(n){if(a(n))return n;return z(U(n))}function C(n){return s(n)?n:k(U(n))}function H(n){return f(n)?n:j(U(n))}function q(n){return G(n).isBright?"light":"dark"}function G(t){let{r,g:o,b:e,a:u}=t;return u<1&&(r=Math.round(u*r+255*(1-u)),o=Math.round(u*o+255*(1-u)),e=Math.round(u*e+255*(1-u))),new n({r,g:o,b:e})}function L(n,t){const{r,g:o,b:e}=t?.ignoreAlpha?n:G(n);return.2126*r+.7152*o+.0722*e}var R;function E(t,r=R.High){return L(t,{ignoreAlpha:!0})>r?new n([0,0,0,t.a]):new n([255,255,255,t.a])}function I(n,t){const r=C(n);r.l*=1-t;const o=U(r),e=n.clone();return e.setColor(o),e.a=n.a,e}function P(n,t){const r=n.clone();return r.a*=t,r}function D(n,t){const r=B(n);r.s*=t;const o=U(r),e=n.clone();return e.setColor(o),e.a=n.a,e}function F(t){return n.toUnitRGBA(t)}function J(n,t){return n===t||null!=n&&n.equals(t)}function K(n,t){return n===t||null!=n&&null!=t&&u(n,t)}function N(n){return c(n[0],n[1],n[2],n.length>3?n[3]:1)}function O(n){return n[0]??=0,n[1]??=0,n[2]??=0,n}function Q(n){return n.length=4,O(n),n[3]??=1,e(n[3],0,1),n}function S(t,r){const o=n.toUnitRGBA(t);return o[3]*=r,o}function T(r,e,u={}){if(0===r.length||e<=0)return[];if(1===(r=r.map((t=>"string"==typeof t?new n(t):t))).length||1===e){const n=[],t=r[0];for(let r=0;r<e;r++)n.push(t.clone());return n}if(u.shuffle&&(r=t(o(r),u.seed)),r.length>=e){const n=[],t=(r.length-1)/(e-1);for(let o=0;o<e;o++){const e=Math.round(o*t);n.push(r[e].clone())}return n}return V(r,e,u)}function V(n,r,o={}){const e=[],u=n.length-1,c=Math.ceil((r-n.length)/u);n:for(let t=0;t<u;t++){const u=n[t],i=n[t+1];for(let t=1;t<=c;t++){const a=t/(c+1);if(e.push(X(u,i,a,o)),e.length+n.length===r)break n}}return[...n.map((n=>n.clone())),...t(e,o.seed??1)]}!function(n){n[n.Low=160]="Low",n[n.High=225]="High"}(R||(R={}));const W=(n,t)=>{const r=Math.floor(10*t())-5;return Math.min(255,Math.max(0,n+r))};function X(t,o,e,u={}){const c=t.r,i=t.g,a=t.b,s=o.r,f=o.g,h=o.b,l=Math.round(c+(s-c)*e),g=Math.round(i+(f-i)*e),b=Math.round(a+(h-a)*e);if(!u.offset)return new n([l,g,b]);const m=r(u.seed);return new n([W(l,m),W(g,m),W(b,m)])}export{R as BrightnessThreshold,J as colorEquals,K as colorVectorEquals,N as colorVectorToColorAndOpacity,T as createUniqueColors,I as darken,D as desaturate,L as getColorLuminance,q as getColorTheme,E as getContrast,i as isRGB,P as multiplyOpacity,S as multiplyOpacityToUnitRGBA,B as toHSV,C as toLAB,H as toLCH,U as toRGB,F as unitRGBAFromColor,O as validateColor,Q as validateColorAndOpacity};
|
package/core/deprecate.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 has from"./has.js";const e=new WeakMap;function n(n,r
|
|
5
|
+
import has from"./has.js";const e=new WeakMap;function n(n,t,r=!1){const o=`🛑 DEPRECATED - ${t}`;if(!r)return void n.warn(o);let i=e.get(n);i||(i=new Set,e.set(n,i)),i.has(t)||(i.add(t),n.warn(o))}const t="https://www.esriurl.com/";function r(e,n,r,o={}){has("esri-deprecation-warnings")&&p(e,`This widget is deprecated. Use the ${n} component instead.`,{see:[`${n} component reference: ${t}${r}/`,`Esri's move to web components: ${t}components-transition-plan/`],replacement:`<${r}></${r}>`,warnOnce:!0,...o})}function o(e,n,t={}){has("esri-deprecation-warnings")&&p(e,`Module: ${n}`,t)}function i(e,n,t={}){if(has("esri-deprecation-warnings")){const{moduleName:r}=t;p(e,`Function: ${(r?r+"::":"")+n+"()"}`,t)}}function s(e,n,t={}){if(has("esri-deprecation-warnings")){const{moduleName:r}=t;p(e,`Property: ${(r?r+"::":"")+n}`,t)}}function a(e,n,t,r={}){if(has("esri-deprecation-warnings")){const{moduleName:o}=r;p(e,`'${(o?o+"::":"")+n}' value: ${t}`,r)}}function c(e,n,t={}){has("esri-deprecation-warnings")&&p(e,`Multiple argument constructor: ${n}`,{warnOnce:!0,replacement:`new ${n}({ <your properties here> })`,...t})}function p(e,t,r={}){if(has("esri-deprecation-warnings")){const{replacement:o,version:i,see:s,warnOnce:a}=r;let c=t;if(o&&(c+=`\n\t🛠️ Replacement: ${o}`),i&&(c+=`\n\t⚙️ Version: ${i}`),s)if(Array.isArray(s)){c+="\n\t🔗 See for more details:";for(const e of s)c+=`\n\t\t${e}`}else c+=`\n\t🔗 See ${s} for more details.`;n(e,c,a)}}export{r as deprecateWidget,p as deprecated,c as deprecatedConstructorSignature,i as deprecatedFunction,o as deprecatedModule,s as deprecatedProperty,a as deprecatedPropertyValue};
|
package/editing/templateUtils.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{
|
|
5
|
+
import{_ as e}from"../chunks/languageUtils.js";import t from"../core/Logger.js";import{getOrCreateMapValue as r}from"../core/MapUtils.js";import{throwIfAborted as n}from"../core/promiseUtils.js";import{addMaybe as i}from"../core/SetUtils.js";import{isFeatureTemplateDefinition as o,isGroupTemplateDefinition as s,isPresetTemplateDefinition as a}from"./sharedTemplates/templateDefinitions/templateDefinitionUtils.js";import{isSubtypeGroupLayer as l,isFeatureLayer as f}from"../layers/support/layerUtils.js";import{getServices as u}from"../undoredo/support/Services.js";const p=()=>t.getLogger("esri.editing.templateUtils");function c(e){return null!=e&&"prototype"in e}function m(e){return d(e)&&!("definition"in e)}function y(e){return d(e)&&"definition"in e}function d(e){return null!=e&&"templateId"in e}function g(e){return y(e)&&"feature"===e?.type&&(null==e.definition||o(e.definition))}function w(e){return y(e)&&"group"===e?.type&&(null==e.definition||s(e.definition))}function A(e){return y(e)&&"preset"===e?.type&&(null==e.definition||a(e.definition))}function h(e){return y(e)&&null!=e?.definition}const j=e=>{if(null==e||"object"!=typeof e)return[];return[..."templates"in e&&Array.isArray(e.templates)?e.templates:[],..."types"in e&&Array.isArray(e.types)?e.types.flatMap((e=>e.templates)):[]]};async function v(e,t,r){if(null==t)return e.map((e=>({layer:e,templates:j(e)})));const i=await M(e,t);n(r);const o=new Map,s=Array.from(i).map((e=>S({serviceInfo:e,out:o,signal:r,view:t}))),a=await Promise.allSettled(s);for(const n of a.filter((e=>"rejected"===e.status)))p().warn("Failed to fetch shared templates for service. Will use standard templates if available.",n.reason);return e.map((e=>({layer:e,templates:o.get(e)??j(e)})))}async function S({serviceInfo:e,out:t,signal:r}){const{featureService:i,layersAndTables:o}=e,s=await b({featureService:i,layers:o.toArray(),signal:r});n(r);for(const[n,a]of s.entries())if(0!==a.length)if(l(n)){const e=L(a),r=[],i=e.get(1/0)??r;for(const o of n.sublayers){const n=e.get(o.subtypeCode)??r;t.set(o,[...n,...i])}}else t.set(n,a)}async function b({featureService:e,layers:t,signal:n}){if(!e.capabilities?.editing.supportsSharedTemplates)return new Map;const i=new Map(t.map((e=>[e.layerId,e]))),o=await e.querySharedTemplates({query:{layers:Array.from(i.keys())},requestOptions:{signal:n}}),s=new Map;for(const a of o)for(const e of a.layerIds)i.has(e)&&r(s,i.get(e),(()=>[])).push(a);return s}async function M(e,t){const r=await u(t).load(),n=new Set;for(const o of e)i(n,U(r,o));return await Promise.all(Array.from(n).map((e=>e.featureService.load()))),n}function U(t,r){return e(r)&&r.parent?t.tablesAndLayersLookup.get(r.parent):f(r)?t.tablesAndLayersLookup.get(r):null}function L(e){const t=new Map;for(const n of e)r(t,n.subtypeCode??1/0,(()=>[])).push(n);return t}export{j as getAllStandardFeatureTemplatesForLayer,U as getServiceInfoForLayer,v as getTemplatesForLayers,h as isLoadedSharedTemplate,g as isSharedFeatureTemplate,w as isSharedGroupTemplate,A as isSharedPresetTemplate,y as isSharedTemplate,m as isSharedTemplateMetadata,d as isSharedTemplateOrMetadata,c as isStandardFeatureTemplate};
|
package/geohash/geohashUtils.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"../core/has.js";import{rad2deg as t}from"../core/mathUtils.js";import o from"../geometry/Polygon.js";import
|
|
5
|
+
import"../core/has.js";import{rad2deg as t}from"../core/mathUtils.js";import{set as o}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as r}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import n from"../geometry/Polygon.js";import e from"../geometry/SpatialReference.js";import{toExtent as s}from"../geometry/support/aaBoundingRect.js";import{earth as i}from"../geometry/support/Ellipsoid.js";import{convertFromPolygon as c}from"../layers/graphics/featureConversionUtils.js";import f from"../layers/graphics/OptimizedGeometry.js";import{project as l}from"../layers/graphics/data/projectionSupport.js";const a=16,u=8,h=4,m=2,p=1,g=r(),x=r(),y=-90,d=90,j=-180,M=180,S="0123456789bcdefghjkmnpqrstuvwxyz",b=64;function v(t,o,r,i){const a=[t.xmin,t.ymin,t.xmax,t.ymax],u=n.fromExtent(s(a,i)),h=l(u,i,e.WGS84,{densificationStep:o*b});if(!h)return null;const m=c(new f,h,!1,!1),p=m.coords.filter(((t,o)=>!(o%2))),g=m.coords.filter(((t,o)=>o%2)),x=Math.min(...p),y=Math.min(...g),d=Math.max(...p),j=Math.max(...g),M=G(x,y,r,e.WGS84),S=G(d,j,r,e.WGS84);return M&&S?{bounds:a,geohashBounds:{xLL:M[0],yLL:M[1],xTR:S[0],yTR:S[1]},level:r}:null}function G(o,r,n,s){if(s.isWebMercator){const e=t(o/i.radius),s=e-360*Math.floor((e+180)/360),c=[0,0];return B(c,0,t(Math.PI/2-2*Math.atan(Math.exp(-r/i.radius))),s,n),c}const c=l({x:o,y:r},s,e.WGS84);if(!c)return null;const f=[0,0];return B(f,0,c.y,c.x,n),f}function W(t){return t<=57?t-48:t<=104?t-88:t<=107?t-89:t<=110?t-90:t-91}function C(t){return S[t]}function L(t){return(t[0]+t[1])/2}function R(t,o){const r=L(t),n=o,e=!o;t[0]=e*t[0]+n*r,t[1]=e*r+n*t[1]}function A(t,o){const r=o>L(t);return R(t,r),r}function X(t,r){const n=o(g,y,d),e=o(x,j,M);for(let o=0;o<r.length;o++){const t=W(r.charCodeAt(o));o%2==0?(R(e,!!(a&t)),R(e,!!(h&t)),R(e,!!(p&t)),R(n,!!(u&t)),R(n,!!(m&t))):(R(n,!!(a&t)),R(n,!!(h&t)),R(n,!!(p&t)),R(e,!!(u&t)),R(e,!!(m&t)))}return t[0]=L(n),t[1]=L(e),t}function Y(t,o){let r=0,n=0,e=30,s=30;for(let i=0;i<o.length;i++){const t=W(o.charCodeAt(i)),c=i%2==0;e-=c?3:2,s-=c?2:3,r|=T(t,c)<<e,n|=U(t,c)<<s}return{geohashX:r,geohashY:n}}function w(t,o){let r=-90,n=90,e=-180,s=180;for(let i=0;i<o;i++){const o=Math.ceil((i+1)/2),c=Math.floor((i+1)/2),f=1-i%2,l=30-(3*o+2*c),a=30-(2*o+3*c),u=3*f+2*(1-f),h=2*f+3*(1-f),m=3*f+7*(1-f)<<a,p=(7*f+3*(1-f)<<l&t.geohashX)>>l,g=(m&t.geohashY)>>a;for(let t=u-1;t>=0;t--){const o=(e+s)/2,r=p&1<<t?1:0;e=(1-r)*e+r*o,s=(1-r)*o+r*s}for(let t=h-1;t>=0;t--){const o=(r+n)/2,e=g&1<<t?1:0;r=(1-e)*r+e*o,n=(1-e)*o+e*n}}return[e,r,s,n]}function z(t,o,r,n){n%2&&(n+=1);let e=0,s=0,i=-90,c=90,f=-180,l=180;for(let a=0;a<n/2;a++){for(let t=0;t<5;t++){const o=(f+l)/2,n=r>o?1:0;e|=n<<29-(t+5*a),f=(1-n)*f+n*o,l=(1-n)*o+n*l}for(let t=0;t<5;t++){const r=(i+c)/2,n=o>r?1:0;s|=n<<29-(t+5*a),i=(1-n)*i+n*r,c=(1-n)*r+n*c}}t.geohashX=e,t.geohashY=s}function B(t,o,r,n,e){e%2&&(e+=1);let s=0,i=0,c=-90,f=90,l=-180,a=180;for(let u=0;u<e/2;u++){for(let t=0;t<5;t++){const o=(l+a)/2,r=n>o?1:0;s|=r<<29-(t+5*u),l=(1-r)*l+r*o,a=(1-r)*o+r*a}for(let t=0;t<5;t++){const o=(c+f)/2,n=r>o?1:0;i|=n<<29-(t+5*u),c=(1-n)*c+n*o,f=(1-n)*o+n*f}}t[2*o]=s,t[2*o+1]=i}function E(t,r,n){let e="";const s=o(g,-90,90),i=o(x,-180,180);for(let o=0;o<n;o++){let n=0;!(o%2)?(n|=A(i,r)<<4,n|=A(s,t)<<3,n|=A(i,r)<<2,n|=A(s,t)<<1,n|=A(i,r)|0):(n|=A(s,t)<<4,n|=A(i,r)<<3,n|=A(s,t)<<2,n|=A(i,r)<<1,n|=A(s,t)|0),e+=C(n)}return e}function P(t,o,r){return r?t&p|(o&p)<<1|(t&m)<<1|(o&m)<<2|(t&h)<<2:o&p|(t&p)<<1|(o&m)<<1|(t&m)<<2|(o&h)<<2}function T(t,o){return o?p&t|(h&t)>>1|(a&t)>>2:(m&t)>>1|(u&t)>>2}function U(t,o){return o?(m&t)>>1|(u&t)>>2:p&t|(h&t)>>1|(a&t)>>2}function k(t,o,r){const n=!((t.length-1)%2),e=t.slice(0,-1),s=W(t.charCodeAt(t.length-1));let i=0,c=0,f=0,l=0;n?(i=8,c=4,f=p&s|(h&s)>>1|(a&s)>>2,l=(m&s)>>1|(u&s)>>2):(i=4,c=8,l=p&s|(h&s)>>1|(a&s)>>2,f=(m&s)>>1|(u&s)>>2);const g=f+o,x=l+r,y=Math.floor(g/i),d=Math.floor(x/c),j=C(P(g-y*i,x-d*c,n));return t.length>1&&(y||d)?k(e,y,d)+j:e+j}export{Y as convertGeohash32ToXY,W as decodeBase32Char,X as decodeGeohash,w as decodeGeohashXY,C as encodeBase32Char,E as encodeGeohash,G as getGeohash,v as getGeohashBounds,k as getRelativeGeohash,B as setGeohashBuf,z as setGeohashXY,T as unpackXBits,U as unpackYBits};
|