@arcgis/core 4.33.0-next.20250605 → 4.33.0-next.20250606
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/Dictionary.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/containerUtils.js +1 -1
- package/arcade/deepClone.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/functions/convertdirection.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/stats.js +1 -1
- package/arcade/functions/string.js +1 -1
- package/arcade/geometry/constructors.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/0229c573fa8a2fff2d8b.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{28b1819bf744ce957dfd.js → 17fcdaeb42e932712096.js} +2 -2
- package/assets/esri/core/workers/chunks/{28b1819bf744ce957dfd.js.LICENSE.txt → 17fcdaeb42e932712096.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/1f4c555a6fa89dcb1f06.js +1 -0
- package/assets/esri/core/workers/chunks/29fb64826bb1351aca8d.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{d0372bac0c5f4fbed468.js → 3f59a73f9a758095976f.js} +1 -1
- package/assets/esri/core/workers/chunks/{a2e9141ff4efd13413a1.js → 4a805e7a57d25c4b595f.js} +2 -2
- package/assets/esri/core/workers/chunks/53ff5b7691ba1444358e.js +1 -0
- package/assets/esri/core/workers/chunks/54f981fe0f8851767be9.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{a6fb75929e456f87f804.js → 58b2dc0ec977af7413b0.js} +1 -1
- package/assets/esri/core/workers/chunks/5cc5f32b474ee723e192.js +1 -0
- package/assets/esri/core/workers/chunks/6c7ace9609300fcf85df.js +1 -0
- package/assets/esri/core/workers/chunks/73ddb356121add556994.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/8a87c181b85d0b86b9bb.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/aad9a693813b47a51530.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/c6c86cbe65a58c3093ae.js +1 -0
- package/assets/esri/core/workers/chunks/{e385a27fd1ac2123a05f.js → ebb83405109cc8841235.js} +1 -1
- package/assets/esri/core/workers/chunks/{5853b2af6ac8be2c69d8.js → ee3940679d794d78b4ea.js} +1 -1
- package/assets/esri/core/workers/chunks/{bd2dcc55ac3418421ee5.js → f20ba89ac21f05b7020c.js} +1 -1
- package/assets/esri/core/workers/chunks/f3b51aa0a1a8fc3b231c.js.LICENSE.txt +1 -1
- package/chunks/aiServices.js +1 -1
- package/chunks/array.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/interfaces.d.ts +3 -3
- package/networks/CircuitManager.js +1 -1
- package/networks/UnitIdentifierManager.js +1 -1
- package/package.json +1 -1
- package/rest/networks/circuits/alterCircuit.js +1 -1
- package/rest/networks/circuits/createCircuit.js +1 -1
- package/rest/networks/circuits/deleteCircuits.js +1 -1
- package/rest/networks/circuits/support/CircuitVerifyResult.js +1 -1
- package/rest/networks/circuits/support/EditCircuitsResult.js +5 -0
- package/rest/networks/circuits/support/ExportCircuitsResult.js +1 -1
- package/rest/networks/circuits/support/VerifyCircuitsResult.js +1 -1
- package/rest/networks/support/utils.js +5 -0
- package/rest/networks/unitIdentifiers/insertGap.js +1 -1
- package/rest/networks/unitIdentifiers/reset.js +1 -1
- package/rest/networks/unitIdentifiers/resize.js +1 -1
- package/rest/networks/unitIdentifiers/support/EditUnitIdentifiersResult.js +5 -0
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/support/layerViewUtils.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/Parameters.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/Search.js +1 -1
- package/assets/esri/core/workers/chunks/5d50a8d0427eab0a2514.js +0 -1
- package/assets/esri/core/workers/chunks/c6fa79ce324122e08dbb.js +0 -1
- package/assets/esri/core/workers/chunks/cbbbaccc0d3683e1c0fe.js +0 -1
- package/assets/esri/core/workers/chunks/e7a440476cd1eb4c6547.js +0 -1
- package/assets/esri/core/workers/chunks/e9993d4f2bfdc434fbcc.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[692],{50692:(n,t,e)=>{e.r(t),e.d(t,{registerFunctions:()=>m});var a=e(66131),i=e(85935),r=e(78878),c=e(334),u=e(55612),o=e(88368),s=e(54218);async function f(n,t,e,a){if(1===e.length){if((0,s.cy)(e[0]))return(0,c.t)(n,e[0],(0,r.
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[692],{50692:(n,t,e)=>{e.r(t),e.d(t,{registerFunctions:()=>m});var a=e(66131),i=e(85935),r=e(78878),c=e(334),u=e(55612),o=e(88368),s=e(54218);async function f(n,t,e,a){if(1===e.length){if((0,s.cy)(e[0]))return(0,c.t)(n,e[0],(0,r.J)(e[1],-1));if((0,r.j)(e[0]))return(0,c.t)(n,e[0].toArray(),(0,r.J)(e[1],-1))}else if(2===e.length){if((0,s.cy)(e[0]))return(0,c.t)(n,e[0],(0,r.J)(e[1],-1));if((0,r.j)(e[0]))return(0,c.t)(n,e[0].toArray(),(0,r.J)(e[1],-1));if((0,r.m)(e[0])){const i=await e[0].load(),c=await l(o.A.create(e[1],{fieldsIndex:i.getFieldsIndex(),timeZone:i.dateFieldsTimeZoneDefaultUTC}),a,t);return d(t,await e[0].calculateStatistic(n,c,(0,r.J)(e[2],1e3),t.abortSignal))}}else if(3===e.length&&(0,r.m)(e[0])){const i=await e[0].load(),c=await l(o.A.create(e[1],{fieldsIndex:i.getFieldsIndex(),timeZone:i.dateFieldsTimeZoneDefaultUTC}),a,t);return d(t,await e[0].calculateStatistic(n,c,(0,r.J)(e[2],1e3),t.abortSignal))}return(0,c.t)(n,e,-1)}function d(n,t){return t instanceof u.g?a.lY.fromReaderAsTimeStampOffset(t.toStorageFormat()):t instanceof Date?a.lY.dateJSAndZoneToArcadeDate(t,(0,r.K)(n)):t}async function l(n,t,e){const a=n.getVariables();if(a.length>0){const i={};for(const n of a)i[n]=t.evaluateIdentifier(e,{name:n});n.parameters=i}return n}function m(n){"async"===n.mode&&(n.functions.stdev=function(t,e){return n.standardFunctionAsync(t,e,((e,a,i)=>f("stdev",t,i,n)))},n.functions.variance=function(t,e){return n.standardFunctionAsync(t,e,((e,a,i)=>f("variance",t,i,n)))},n.functions.average=function(t,e){return n.standardFunctionAsync(t,e,((e,a,i)=>f("mean",t,i,n)))},n.functions.mean=function(t,e){return n.standardFunctionAsync(t,e,((e,a,i)=>f("mean",t,i,n)))},n.functions.sum=function(t,e){return n.standardFunctionAsync(t,e,((e,a,i)=>f("sum",t,i,n)))},n.functions.min=function(t,e){return n.standardFunctionAsync(t,e,((e,a,i)=>f("min",t,i,n)))},n.functions.max=function(t,e){return n.standardFunctionAsync(t,e,((e,a,i)=>f("max",t,i,n)))},n.functions.count=function(t,e){return n.standardFunctionAsync(t,e,(async(n,a,c)=>{if((0,r.B)(c,1,1,t,e),(0,r.m)(c[0]))return c[0].count(n.abortSignal);if((0,s.cy)(c[0])||(0,s.Kg)(c[0]))return c[0].length;if((0,r.j)(c[0]))return c[0].length();throw new i.D$(t,i.TX.InvalidParameter,e)}))})}}}]);
|
package/chunks/aiServices.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{toSymbolId as t}from"../arcade/arcadeEnvironment.js";import e from"../arcade/Dictionary.js";import{ArcadeExecutionError as s,ExecutionErrorCodes as r}from"../arcade/executionError.js";import{
|
|
5
|
+
import{toSymbolId as t}from"../arcade/arcadeEnvironment.js";import e from"../arcade/Dictionary.js";import{ArcadeExecutionError as s,ExecutionErrorCodes as r}from"../arcade/executionError.js";import{B as n,j as o,L as a}from"./languageUtils.js";import i from"../core/Error.js";import c from"../core/Logger.js";import{getOrCreateMapValue as l}from"../core/MapUtils.js";import u from"../portal/Portal.js";import{translate as h}from"../rest/translate.js";import m from"../rest/support/TranslateContent.js";import f from"../rest/support/TranslateParameters.js";import p from"../rest/support/TranslateResult.js";import{isString as d,isArray as _}from"../support/guards.js";class g{constructor(t,e){this.portal=t,this._debugLog=e}async translate(t){this.portal.loaded||await this.portal.load();const e=this.portal.helperServices?.aiUtilityServices;if(null==e)return{success:!1};const s=e.url+e.translateUtility;try{return{success:!0,results:(await h(s,t,{authMode:"no-prompt",headers:{"x-esri-request-source":"arcade"}})).map((t=>t.toJSON()))}}catch(r){return null!=this._debugLog&&(r instanceof Error||r instanceof i)&&this._debugLog(`TranslateText error: ${r.message}`),c.getLogger("esri.arcade.functions.aiServices").error(r),{success:!1}}}}class y{constructor(t,e,s){this._parameters=t,this._maxTotalContentSize=e,this._maxContentsLength=s,this._requests=[],this._normalizedContents=new Map,this._contentsTotalSize=0}tryAdd(t){const e=new Set(t.filter((t=>!this._normalizedContents.has(t.text))).map((t=>t.text)));if(this._requests.length+e.size>this._maxContentsLength)return null;let s=0;for(const n of e)s+=n.length;if((s+this._contentsTotalSize)*(this._parameters.to.length??1)>this._maxTotalContentSize)return null;const r=this._requests.length;for(const{key:n,text:o}of t)l(this._normalizedContents,o,(()=>[])).push({batchIdx:r,key:n});return this._requests.push(t),this._contentsTotalSize+=s,r}async send(t){const e=[],s=[];let r=0;for(const[i,c]of this._normalizedContents)e.push(new m({key:String(r++),text:i})),s.push(c);const n=new f(this._parameters);n.contents=e;const o=await t.translate(n);if(!o.success)return Array.from(this._requests,(()=>o));const a=Array.from(this._requests,(()=>({success:!0,results:[]})));for(const i of o.results){const t=Number(i.key);for(const e of s[t])a[e.batchIdx].results.push({...i,key:e.key})}return a}}function x(t){const e=[...new Set(t.to)].sort(),s=t.from??null,r=t.portalUrl,n=t.translator,o=t.apiKey??null;return JSON.stringify([e,s,r,n,o])}async function w(t,e,s){try{return(await t.yieldFor(s))[e]}catch{return{success:!1}}}class S{constructor(t,e,{maxTotalContentSize:s=5e4,maxContentsLength:r=1e3}={}){this._executor=t,this._service=e,this._openBatches=new Map,this._maxTotalContentSize=s,this._maxContentsLength=r}create(t){return{translate:async e=>{const s=x(e),{contents:r,to:n,from:o,translator:a,portalUrl:i,apiKey:c}=e;if(null==n)return{success:!1};if(null==r||r.every((t=>0===t.text.length)))return{success:!1};const l=this._openBatches.get(s);if(null!=l){const e=l.data.tryAdd(r);if(null!=e)return await w(t,e,l);l.send()}const u=new y({to:n,from:o,translator:a,portalUrl:i,apiKey:c},this._maxTotalContentSize,this._maxContentsLength),h=u.tryAdd(r);if(null!=h){const e=this._executor.openBatch(u,{open:t=>{this._openBatches.set(s,t)},execute:t=>t.send(this._service),close:t=>{this._openBatches.get(s)===t&&this._openBatches.delete(s)}});return await w(t,h,e)}return await this._service.translate(e)}}}}function T(i){"async"===i.mode&&(i.functions[t("TranslateText")]=function(t,c){return i.standardFunctionAsync(t,c,(async(t,i,c)=>{if(n(c,2,3,t,i),!d(c[0])&&!_(c[0])&&!o(c[0]))throw new s(t,r.InvalidParameter,i);const l=a(c[0]);if(!d(c[1])&&!_(c[1])&&!o(c[1]))throw new s(t,r.InvalidParameter,i);const h=a(c[1]);let y=null;if(c.length>=3){if(!d(c[2]))throw new s(t,r.InvalidParameter,i);y=c[2]}const w=l.map(((t,e)=>new m({key:String(e),text:t}))),S=t.services?.portal??u.getDefault(),T=new f({to:h,contents:w,from:y,portalUrl:S.restUrl.replace(/\/sharing\/rest$/,"")}),v=new Map;let C=null;if(null!=t.lrucache){const e=t.lrucache;C??=x(T),T.contents=T.contents?.filter((t=>{const s=e.getCachedTranslation(C,t.text);return null==s||(v.set(t.key,{...s,key:t.key,text:t.text}),!1)}))}if(T.contents?.length){const n=t.services?.translation??new g(S,t.console),o=await n.translate(T);if(!o.success)return new e({__proto__:null,success:!1});for(const e of o.results){const n=T.contents?.find((t=>t.key===e.key))?.text;if(null==n)throw new s(null,r.NeverReach,null);v.set(e.key,e),null!=t.lrucache&&(C??=x(T),t.lrucache.setCachedTranslation(C,n,{detectedLanguage:e.detectedLanguage,translation:e.translation}))}}const j=Array.from(w,(n=>{const o=p.fromJSON(v.get(n.key));if(null==o)throw new s(null,r.NeverReach,null);return o.text=n.text,e.convertJsonToArcade(o.toJSON(),t.timeZone??"system",!0)}));return new e({__proto__:null,success:!0,results:j})}))})}const v=Object.freeze(Object.defineProperty({__proto__:null,BatchTranslationServiceFactory:S,PortalTranslationService:g,getTranslateParametersKey:x,registerFunctions:T},Symbol.toStringTag,{value:"Module"}));export{v as A,S as B,g as P,x as g,T as r};
|
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{
|
|
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{B as o,J as i,j as u,u as a,v as c,y as s,i as l,M as f,w 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{isBoolean as O,isNumber as C,isString 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 v{constructor(e){this.value=e}}class _{constructor(e){this.value=e}}const I={type:"VOID"},P=Symbol("BREAK"),Y=Symbol("CONTINUE");function L(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!!x(e)||(!!C(e)||(!!ne(e)||(!!re(e)||(!!ie(e)||(!!O(e)||(null===e||(e===I||"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":x(e)?"String":O(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===I?"":"number"==typeof e&&isNaN(e)?"Number":"Unrecognized Type"}function U(e){return e===I}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=L(t,"‰",""),t=L(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===I)return ce(null,null,r);if(C(t))return ce(0,t,r);if(x(t))return ce(0,Ne(t),r);if(O(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===I){if(null===t||t===I)return ce(null,null,r);if(C(t))return ce(0,t,r);if(x(t))return ce(0,Ne(t),r);if(O(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(O(t))return ce(e,Ne(t),r);if(null===t||t===I)return ce(e,0,r);if(x(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(x(e)){if(x(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===I)return ce(Ne(e),0,r);if(O(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===I)return ce(e.toNumber(),0,r);if(C(t))return ce(e.toNumber(),t,r);if(O(t))return ce(e.toNumber(),Ne(t),r);if(x(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(O(e)){if(O(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===I)return ce(Ne(e),0,r);if(x(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===I)return ce(e.toNumber(),0,r);if(C(t))return ce(e.toNumber(),t,r);if(O(t))return ce(e.toNumber(),Ne(t),r);if(x(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===I)return ce(e.toNumber(),0,r);if(C(t))return ce(e.toNumber(),t,r);if(O(t))return ce(e.toNumber(),Ne(t),r);if(x(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===I||null===t&&e===I)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":O(i)||C(i)||x(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(x(e))return e;if(null===e)return"";if(C(e))return se(e,t);if(O(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===I?"":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(x(e))return e;if(null===e)return"";if(C(e))return se(e,t);if(O(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===I?"":V(e)?"object, Module":""}function be(e,t=!1){if(null===e)return"null";if(O(e)||C(e)||x(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===I)return"null";return"null"}function Ne(e,t){return C(e)?e:null===e||""===e?0:ne(e)||re(e)||ie(e)?NaN:O(e)?e?1:0:F(e)||""===e||void 0===e?NaN:void 0!==t&&x(e)?(t=L(t,"‰",""),t=L(t,"¤",""),y(e,{pattern:t})):e===I?0:Number(e)}function Se(e,t){if(ne(e))return e;if(x(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 O(e)?e:x(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.curveRings??e.rings).length)return null;for(const t of e.curveRings??e.rings)if(t.length>0)return e;return null}if(e instanceof T){if(0===(e.curvePaths??e.paths).length)return null;for(const t of e.curvePaths??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 ve(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 _e(e,t=!0){if(null==e)return[];if(F(e)){const n=[];for(const r of e){const e=pe(r);(t||""!==e)&&n.push(e)}return n}if(te(e)){const n=[];for(let r=0;r<e.length();r++){const i=pe(e.get(r));(t||""!==i)&&n.push(i)}return n}if(z(e)){const n=pe(e);if(t||""!==n)return[n]}return[]}let Ie=0;function Pe(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:O(e)||C(e)||x(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: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 Le(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(Le(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.32",et=Object.freeze(Object.defineProperty({__proto__:null,ImplicitResult:_,ReturnResult:v,absRound:ue,arcadeVersion:Xe,autoCastArrayOfPointsToMultiPoint:ve,autoCastArrayOfPointsToPolygon:Me,autoCastArrayOfPointsToPolyline:Re,autoCastFeatureToGeometry:we,binaryOperator:Ye,breakResult:P,castAsJson:Le,castAsJsonAsync:Ve,castRecordToText:ye,continueResult:Y,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:O,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:x,isSubtypeGrouplayer:Ee,isSubtypeSublayer:qe,isTime:ie,isVoid:U,isVoxel:B,multiReplace:L,parseGeometryFromJson:Ae,pcCheck:ae,stableStringify:Fe,standardiseDateFormat:fe,tick:Pe,toBoolean:Te,toDate:Se,toNumber:Ne,toNumberArray:ge,toString:pe,toStringArray:_e,toStringExplicit:he,voidOperation:I},Symbol.toStringTag,{value:"Module"}));export{qe as $,de as A,Ye as B,U as C,ae as D,we as E,ke as F,Me as G,Re as H,_ as I,ve as J,q as K,Ke as L,_e as M,E as N,fe as O,ue as P,Ue as Q,v as R,Be as S,$e as T,We as U,He as V,je as W,B as X,L as Y,Qe as Z,ge as _,Le as a,Pe 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,et as u,I as v,P as w,Y as x,Q as y,me 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{isBoolean as O,isNumber as C,isString 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 v{constructor(e){this.value=e}}class _{constructor(e){this.value=e}}const I={type:"VOID"},P=Symbol("BREAK"),Y=Symbol("CONTINUE");function L(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!!x(e)||(!!C(e)||(!!ne(e)||(!!re(e)||(!!ie(e)||(!!O(e)||(null===e||(e===I||"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":x(e)?"String":O(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===I?"":"number"==typeof e&&isNaN(e)?"Number":"Unrecognized Type"}function U(e){return e===I}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=L(t,"‰",""),t=L(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===I)return ce(null,null,r);if(C(t))return ce(0,t,r);if(x(t))return ce(0,Ne(t),r);if(O(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===I){if(null===t||t===I)return ce(null,null,r);if(C(t))return ce(0,t,r);if(x(t))return ce(0,Ne(t),r);if(O(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(O(t))return ce(e,Ne(t),r);if(null===t||t===I)return ce(e,0,r);if(x(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(x(e)){if(x(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===I)return ce(Ne(e),0,r);if(O(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===I)return ce(e.toNumber(),0,r);if(C(t))return ce(e.toNumber(),t,r);if(O(t))return ce(e.toNumber(),Ne(t),r);if(x(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(O(e)){if(O(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===I)return ce(Ne(e),0,r);if(x(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===I)return ce(e.toNumber(),0,r);if(C(t))return ce(e.toNumber(),t,r);if(O(t))return ce(e.toNumber(),Ne(t),r);if(x(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===I)return ce(e.toNumber(),0,r);if(C(t))return ce(e.toNumber(),t,r);if(O(t))return ce(e.toNumber(),Ne(t),r);if(x(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===I||null===t&&e===I)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":O(i)||C(i)||x(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(x(e))return e;if(null===e)return"";if(C(e))return se(e,t);if(O(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===I?"":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(x(e))return e;if(null===e)return"";if(C(e))return se(e,t);if(O(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===I?"":V(e)?"object, Module":""}function be(e,t=!1){if(null===e)return"null";if(O(e)||C(e)||x(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===I)return"null";return"null"}function Ne(e,t){return C(e)?e:null===e||""===e?0:ne(e)||re(e)||ie(e)?NaN:O(e)?e?1:0:F(e)||""===e||void 0===e?NaN:void 0!==t&&x(e)?(t=L(t,"‰",""),t=L(t,"¤",""),y(e,{pattern:t})):e===I?0:Number(e)}function Se(e,t){if(ne(e))return e;if(x(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 O(e)?e:x(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.curveRings??e.rings).length)return null;for(const t of e.curveRings??e.rings)if(t.length>0)return e;return null}if(e instanceof T){if(0===(e.curvePaths??e.paths).length)return null;for(const t of e.curvePaths??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 ve(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 _e(e,t=!0){if(null==e)return[];if(F(e)){const n=[];for(const r of e){const e=pe(r);(t||""!==e)&&n.push(e)}return n}if(te(e)){const n=[];for(let r=0;r<e.length();r++){const i=pe(e.get(r));(t||""!==i)&&n.push(i)}return n}if(z(e)){const n=pe(e);if(t||""!==n)return[n]}return[]}let Ie=0;function Pe(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:O(e)||C(e)||x(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: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 Le(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(Le(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.32",et=Object.freeze(Object.defineProperty({__proto__:null,ImplicitResult:_,ReturnResult:v,absRound:ue,arcadeVersion:Xe,autoCastArrayOfPointsToMultiPoint:ve,autoCastArrayOfPointsToPolygon:Me,autoCastArrayOfPointsToPolyline:Re,autoCastFeatureToGeometry:we,binaryOperator:Ye,breakResult:P,castAsJson:Le,castAsJsonAsync:Ve,castRecordToText:ye,continueResult:Y,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:O,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:x,isSubtypeGrouplayer:Ee,isSubtypeSublayer:qe,isTime:ie,isVoid:U,isVoxel:B,multiReplace:L,parseGeometryFromJson:Ae,pcCheck:ae,stableStringify:Fe,standardiseDateFormat:fe,tick:Pe,toBoolean:Te,toDate:Se,toNumber:Ne,toNumberArray:ge,toString:pe,toStringArray:_e,toStringExplicit:he,voidOperation:I},Symbol.toStringTag,{value:"Module"}));export{qe as $,U as A,ae as B,we as C,ke as D,Me as E,Re as F,ve as G,Te as H,_ as I,q as J,Ke as K,_e as L,E as M,Se as N,fe as O,ue as P,Ue as Q,v as R,Be as S,$e as T,We as U,He as V,je as W,B as X,L as Y,Qe as Z,ge as _,Le as a,Pe 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,ne as e,re as f,ie as g,H as h,G as i,te as j,$ as k,X as l,K as m,W as n,ee as o,et as p,P as q,Y as r,Q as s,he as t,Ne as u,I as v,pe as w,me as x,de as y,Ye as z};
|
package/interfaces.d.ts
CHANGED
|
@@ -3385,8 +3385,8 @@ declare namespace __esri {
|
|
|
3385
3385
|
}
|
|
3386
3386
|
|
|
3387
3387
|
export interface configApiKeysScopes {
|
|
3388
|
-
token
|
|
3389
|
-
urls
|
|
3388
|
+
token: string;
|
|
3389
|
+
urls: RegExp | string | (RegExp | string)[];
|
|
3390
3390
|
}
|
|
3391
3391
|
|
|
3392
3392
|
export interface configLog {
|
|
@@ -61150,7 +61150,7 @@ declare namespace __esri {
|
|
|
61150
61150
|
addAttachmentResults: any[];
|
|
61151
61151
|
updateAttachmentResults: any[];
|
|
61152
61152
|
deleteAttachmentResults: any[];
|
|
61153
|
-
|
|
61153
|
+
editedFeatureResults?: any;
|
|
61154
61154
|
editMoment?: number;
|
|
61155
61155
|
}
|
|
61156
61156
|
|
|
@@ -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{_ as e}from"../chunks/tslib.es6.js";import t from"../core/JSONSupport.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import{emitApplyEditsEvent as s}from"../layers/mixins/EditBusLayer.js";import o from"./UtilityNetwork.js";import{isVersionInEditSession as a,currentSessionId as n,isSafeToEditVersion as c}from"../versionManagement/support/versionManagementUtils.js";let
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/JSONSupport.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import{emitApplyEditsEvent as s}from"../layers/mixins/EditBusLayer.js";import o from"./UtilityNetwork.js";import{isVersionInEditSession as a,currentSessionId as n,isSafeToEditVersion as c}from"../versionManagement/support/versionManagementUtils.js";let d=class extends t{constructor(e){super(e),this.telecomDomainNetwork=null,this.utilityNetwork=null}get networkServiceUrl(){return this.utilityNetwork?.networkServiceUrl??null}get featureServiceUrl(){return this.utilityNetwork?.featureServiceUrl??null}get gdbVersion(){return this.utilityNetwork?.gdbVersion??null}get historicMoment(){return this.utilityNetwork?.historicMoment??null}get telecomDomainNetworkName(){return this.telecomDomainNetwork?.domainNetworkName??null}async create(e){const[{createCircuit:t},{default:r}]=await Promise.all([import("../rest/networks/circuits/createCircuit.js"),import("../rest/networks/circuits/support/CreateAlterCircuitParameters.js")]),i=r.from({circuit:e,domainNetworkName:this.telecomDomainNetworkName});a(this.featureServiceUrl,this.gdbVersion||null)?(i.sessionId=n,await c(this.featureServiceUrl,this.gdbVersion,!0)):i.sessionId=null,i.gdbVersion=this.gdbVersion;const o=s(this.featureServiceUrl,null,this.gdbVersion,!1),d=await t(this.networkServiceUrl,i);o.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:d.exceededTransferLimit,historicMoment:d.moment,editedFeatures:d.serviceEdits||void 0})}async alter(e){const[{alterCircuit:t},{default:r}]=await Promise.all([import("../rest/networks/circuits/alterCircuit.js"),import("../rest/networks/circuits/support/CreateAlterCircuitParameters.js")]),i=r.from({circuit:e,domainNetworkName:this.telecomDomainNetworkName});a(this.featureServiceUrl,this.gdbVersion||null)?(i.sessionId=n,await c(this.featureServiceUrl,this.gdbVersion,!0)):i.sessionId=null,i.gdbVersion=this.gdbVersion;const o=s(this.featureServiceUrl,null,this.gdbVersion,!1),d=await t(this.networkServiceUrl,i);o.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:d.exceededTransferLimit,historicMoment:d.moment,editedFeatures:d.serviceEdits||void 0})}async delete(e){const[{deleteCircuits:t},{default:r}]=await Promise.all([import("../rest/networks/circuits/deleteCircuits.js"),import("../rest/networks/circuits/support/DeleteCircuitsParameters.js")]),i=r.from({circuits:e,domainNetworkName:this.telecomDomainNetworkName});a(this.featureServiceUrl,this.gdbVersion||null)?(i.sessionId=n,await c(this.featureServiceUrl,this.gdbVersion,!0)):i.sessionId=null,i.gdbVersion=this.gdbVersion;const o=s(this.featureServiceUrl,null,this.gdbVersion,!1),d=await t(this.networkServiceUrl,i);o.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:d.exceededTransferLimit,historicMoment:d.moment,editedFeatures:d.serviceEdits||void 0})}async export(e){const[{exportCircuits:t},{default:r}]=await Promise.all([import("../rest/networks/circuits/exportCircuits.js"),import("../rest/networks/circuits/support/ExportCircuitsParameters.js")]),i=r.from(e);a(this.featureServiceUrl,this.gdbVersion||null)?(i.sessionId=n,await c(this.featureServiceUrl,this.gdbVersion,!0)):i.sessionId=null,i.domainNetworkName=this.telecomDomainNetworkName,i.gdbVersion=this.gdbVersion,i.moment=this.historicMoment;const o=s(this.featureServiceUrl,null,this.gdbVersion,!1),d=await t(this.networkServiceUrl,i);return o.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:d.exceededTransferLimit,historicMoment:d.moment,editedFeatures:d.serviceEdits||void 0}),d.circuits}async verify(e,t=!1){const[{verifyCircuits:r},{default:i}]=await Promise.all([import("../rest/networks/circuits/verifyCircuits.js"),import("../rest/networks/circuits/support/VerifyCircuitsParameters.js")]),o=i.from({circuits:e,synthesizeGeometries:t,domainNetworkName:this.telecomDomainNetworkName});a(this.featureServiceUrl,this.gdbVersion||null)?(o.sessionId=n,await c(this.featureServiceUrl,this.gdbVersion,!0)):o.sessionId=null,o.gdbVersion=this.gdbVersion;const d=s(this.featureServiceUrl,null,this.gdbVersion,!1),u=await r(this.networkServiceUrl,o);return d.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:u.exceededTransferLimit,historicMoment:u.moment,editedFeatures:u.serviceEdits||void 0}),u.circuits}async queryCircuits(e){const[{queryCircuits:t},{default:r}]=await Promise.all([import("../rest/networks/circuits/queryCircuits.js"),import("../rest/networks/circuits/support/QueryCircuitsParameters.js")]),i=Array.isArray(e)?{circuits:e}:e,s=r.from(i);a(this.featureServiceUrl,this.gdbVersion||null)?s.sessionId=n:s.sessionId=null,s.domainNetworkName=this.telecomDomainNetworkName,s.resultTypes=["circuit"],s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;return(await t(this.networkServiceUrl,s)).circuits||[]}async queryCircuitNames(e){const[{queryCircuits:t},{default:r}]=await Promise.all([import("../rest/networks/circuits/queryCircuits.js"),import("../rest/networks/circuits/support/QueryCircuitsParameters.js")]),i=r.from(e);a(this.featureServiceUrl,this.gdbVersion||null)?i.sessionId=n:i.sessionId=null,i.domainNetworkName=this.telecomDomainNetworkName,i.resultTypes=["name"],i.gdbVersion=this.gdbVersion,i.moment=this.historicMoment;return(await t(this.networkServiceUrl,i)).circuitNames||[]}};e([r({constructOnly:!0})],d.prototype,"telecomDomainNetwork",void 0),e([r({type:o,constructOnly:!0})],d.prototype,"utilityNetwork",void 0),e([r()],d.prototype,"networkServiceUrl",null),e([r()],d.prototype,"featureServiceUrl",null),e([r()],d.prototype,"gdbVersion",null),e([r()],d.prototype,"historicMoment",null),e([r()],d.prototype,"telecomDomainNetworkName",null),d=e([i("esri.networks.CircuitManager")],d);const u=d;export{u as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/JSONSupport.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import{emitApplyEditsEvent as i}from"../layers/mixins/EditBusLayer.js";import n from"./UtilityNetwork.js";import{isVersionInEditSession as o,currentSessionId as
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/JSONSupport.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import{emitApplyEditsEvent as i}from"../layers/mixins/EditBusLayer.js";import n from"./UtilityNetwork.js";import{isVersionInEditSession as o,currentSessionId as d,isSafeToEditVersion as a}from"../versionManagement/support/versionManagementUtils.js";let l=class extends t{constructor(e){super(e),this.utilityNetwork=null}get networkServiceUrl(){return this.utilityNetwork?.networkServiceUrl??null}get featureServiceUrl(){return this.utilityNetwork?.featureServiceUrl??null}get gdbVersion(){return this.utilityNetwork?.gdbVersion??null}get historicMoment(){return this.utilityNetwork?.historicMoment??null}async insertGap(e,t,r){const[{insertGap:s},{default:n}]=await Promise.all([import("../rest/networks/unitIdentifiers/insertGap.js"),import("../rest/networks/unitIdentifiers/support/InsertGapParameters.js")]),l=new n({object:e,firstUnit:t,numUnits:r});o(this.featureServiceUrl,this.gdbVersion||null)?(l.sessionId=d,await a(this.featureServiceUrl,this.gdbVersion,!0)):l.sessionId=null,l.gdbVersion=this.gdbVersion;const u=i(this.featureServiceUrl,null,this.gdbVersion,!1),c=await s(this.networkServiceUrl,l);u.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:c.exceededTransferLimit,historicMoment:c.moment,editedFeatures:c.serviceEdits||void 0})}async reset(e){const[{reset:t},{default:r}]=await Promise.all([import("../rest/networks/unitIdentifiers/reset.js"),import("../rest/networks/unitIdentifiers/support/ResetParameters.js")]),s=new r({objects:e});o(this.featureServiceUrl,this.gdbVersion||null)?(s.sessionId=d,await a(this.featureServiceUrl,this.gdbVersion,!0)):s.sessionId=null,s.gdbVersion=this.gdbVersion;const n=i(this.featureServiceUrl,null,this.gdbVersion,!1),l=await t(this.networkServiceUrl,s);n.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:l.exceededTransferLimit,historicMoment:l.moment,editedFeatures:l.serviceEdits||void 0})}async resize(e,t){const[{resize:r},{default:s}]=await Promise.all([import("../rest/networks/unitIdentifiers/resize.js"),import("../rest/networks/unitIdentifiers/support/ResizeParameters.js")]),n=new s({object:e,numUnits:t});o(this.featureServiceUrl,this.gdbVersion||null)?(n.sessionId=d,await a(this.featureServiceUrl,this.gdbVersion,!0)):n.sessionId=null,n.gdbVersion=this.gdbVersion;const l=i(this.featureServiceUrl,null,this.gdbVersion,!1),u=await r(this.networkServiceUrl,n);l.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:u.exceededTransferLimit,historicMoment:u.moment,editedFeatures:u.serviceEdits||void 0})}async query(e){const[{queryUnitIdentifiers:t},{default:r}]=await Promise.all([import("../rest/networks/unitIdentifiers/queryUnitIdentifiers.js"),import("../rest/networks/unitIdentifiers/support/QueryUnitIdentifiersParameters.js")]),s=new r({objects:e});o(this.featureServiceUrl,this.gdbVersion||null)?s.sessionId=d:s.sessionId=null,s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;return await t(this.networkServiceUrl,s)}};e([r({type:n,constructOnly:!0})],l.prototype,"utilityNetwork",void 0),e([r()],l.prototype,"networkServiceUrl",null),e([r()],l.prototype,"featureServiceUrl",null),e([r()],l.prototype,"gdbVersion",null),e([r()],l.prototype,"historicMoment",null),l=e([s("esri.networks.UnitIdentifierManager")],l);const u=l;export{u as default};
|
package/package.json
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../../request.js";import{parseUrl as
|
|
5
|
+
import t from"../../../request.js";import{parseUrl as r,encode as o,asValidOptions as s}from"../../utils.js";import i from"./support/EditCircuitsResult.js";async function u(u,e,m){const p=r(u),a={...e.toJSON(),f:"json"},c=o({...p.query,...a}),f=s(c,{...m,method:"post"}),n=`${p.path}/circuits/alter`,{data:j}=await t(n,f);return i.fromJSON(j)}export{u as alterCircuit};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../../request.js";import{parseUrl as
|
|
5
|
+
import t from"../../../request.js";import{parseUrl as r,encode as o,asValidOptions as s}from"../../utils.js";import i from"./support/EditCircuitsResult.js";async function e(e,u,m){const p=r(e),a={...u.toJSON(),f:"json"},c=o({...p.query,...a}),f=s(c,{...m,method:"post"}),n=`${p.path}/circuits/create`,{data:j}=await t(n,f);return i.fromJSON(j)}export{e as createCircuit};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../../request.js";import{parseUrl as i,encode as r,asValidOptions as s}from"../../utils.js";async function
|
|
5
|
+
import t from"../../../request.js";import{parseUrl as i,encode as r,asValidOptions as s}from"../../utils.js";import o from"./support/EditCircuitsResult.js";async function c(c,u,e){const m=i(c),n=u.toJSON();u.circuits&&(n.circuits=JSON.stringify(u.circuits));const p={...n,f:"json"},f=r({...m.query,...p}),a=s(f,{...e,method:"post"}),d=`${m.path}/circuits/delete`,{data:j}=await t(d,a);return o.fromJSON(j)}export{c as deleteCircuits};
|
|
@@ -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{_ as r}from"../../../../chunks/tslib.es6.js";import o from"../../../../core/JSONSupport.js";import{property as t}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import s from"../../../../geometry/Geometry.js";let p=class extends o{constructor(r){super(r),this.error=null,this.geometry=null,this.message=null,this.name=null}};r([t({type:Number
|
|
5
|
+
import{_ as r}from"../../../../chunks/tslib.es6.js";import o from"../../../../core/JSONSupport.js";import{property as t}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import s from"../../../../geometry/Geometry.js";let p=class extends o{constructor(r){super(r),this.error=null,this.geometry=null,this.message=null,this.name=null}};r([t({type:Number})],p.prototype,"error",void 0),r([t({type:s})],p.prototype,"geometry",void 0),r([t({type:String})],p.prototype,"message",void 0),r([t({type:String})],p.prototype,"name",void 0),p=r([e("esri.rest.networks.circuits.support.CircuitVerifyResult")],p);const i=p;export{i as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{_ as r}from"../../../../chunks/tslib.es6.js";import e from"../../../../core/JSONSupport.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{reader as t}from"../../../../core/accessorSupport/decorators/reader.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{handleServiceEdits as i}from"../../support/utils.js";let p=class extends e{constructor(r){super(r),this.moment=null,this.exceededTransferLimit=!1,this.serviceEdits=null}readServiceEdits(r,e){return i(r)}};r([o({type:Date})],p.prototype,"moment",void 0),r([o({type:Boolean})],p.prototype,"exceededTransferLimit",void 0),r([o({type:[Object]})],p.prototype,"serviceEdits",void 0),r([t("serviceEdits")],p.prototype,"readServiceEdits",null),p=r([s("esri.rest.networks.circuits.support.EditCircuitsResult")],p);export{p as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as r}from"../../../../chunks/tslib.es6.js";import
|
|
5
|
+
import{_ as r}from"../../../../chunks/tslib.es6.js";import e from"../../../../core/JSONSupport.js";import{property as t}from"../../../../core/accessorSupport/decorators/property.js";import{ensureClass as o}from"../../../../core/accessorSupport/ensureType.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import{reader as s}from"../../../../core/accessorSupport/decorators/reader.js";import{subclass as i}from"../../../../core/accessorSupport/decorators/subclass.js";import{handleServiceEdits as p}from"../../support/utils.js";var c;let u=c=class extends e{static from(r){return o(c,r)}constructor(r){super(r),this.circuits=null,this.moment=null,this.exceededTransferLimit=!1,this.serviceEdits=null}readServiceEdits(r,e){return p(r)}};r([t({json:{type:[Object]}})],u.prototype,"circuits",void 0),r([t({type:Date})],u.prototype,"moment",void 0),r([t({type:Boolean,json:{type:Boolean,write:!0}})],u.prototype,"exceededTransferLimit",void 0),r([t({type:[Object]})],u.prototype,"serviceEdits",void 0),r([s("serviceEdits")],u.prototype,"readServiceEdits",null),u=c=r([i("esri.rest.networks.circuits.support.ExportCircuitsResult")],u);export{u as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/JSONSupport.js";import{property as t}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{reader as o}from"../../../../core/accessorSupport/decorators/reader.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import i from"./CircuitVerifyResult.js";import{handleServiceEdits as p}from"../../support/utils.js";let c=class extends r{constructor(e){super(e),this.circuits=[],this.moment=null,this.exceededTransferLimit=!1,this.serviceEdits=null}readServiceEdits(e,r){return p(e)}};e([t({type:[i],json:{type:[i],write:!0}})],c.prototype,"circuits",void 0),e([t({type:Date,json:{type:Number,write:{writer:(e,r)=>{r.moment=e?e.getTime():null}}}})],c.prototype,"moment",void 0),e([t({type:Boolean,json:{type:Boolean,write:!0}})],c.prototype,"exceededTransferLimit",void 0),e([t({type:[Object],json:{type:[Object],write:!0}})],c.prototype,"serviceEdits",void 0),e([o("serviceEdits")],c.prototype,"readServiceEdits",null),c=e([s("esri.rest.networks.circuits.support.VerifyCircuitsResult")],c);export{c as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import e from"../../../geometry/SpatialReference.js";import{createEditedFeatures as r}from"../../../layers/graphics/applyEditsUtils.js";function t(t){return t.map((t=>{const i=t.editedFeatures,a=e.fromJSON(i?.spatialReference);return i?{layerId:t.id,editedFeatures:r(i,a)}:null})).filter((e=>null!==e))}export{t as handleServiceEdits};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../../request.js";import{parseUrl as
|
|
5
|
+
import t from"../../../request.js";import{parseUrl as r,encode as o,asValidOptions as i}from"../../utils.js";import s from"./support/EditUnitIdentifiersResult.js";async function e(e,n,p){const f=r(e),m={...n.toJSON(),f:"json"},u=o({...f.query,...m}),a=i(u,{...p,method:"post"}),d=`${f.path}/unitIdentifiers/insertGap`,{data:j}=await t(d,a);return s.fromJSON(j)}export{e as insertGap};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../../request.js";import{parseUrl as
|
|
5
|
+
import t from"../../../request.js";import{parseUrl as o,encode as s,asValidOptions as r}from"../../utils.js";import e from"./support/EditUnitIdentifiersResult.js";async function i(i,n,f){const m=o(i),p=n.toJSON();n.objects&&(p.objects=JSON.stringify(n.objects));const u={...p,f:"json"},c=s({...m.query,...u}),j=r(c,{...f,method:"post"}),a=`${m.path}/unitIdentifiers/reset`,{data:d}=await t(a,j);return e.fromJSON(d)}export{i as reset};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../../request.js";import{parseUrl as
|
|
5
|
+
import t from"../../../request.js";import{parseUrl as r,encode as o,asValidOptions as i}from"../../utils.js";import s from"./support/EditUnitIdentifiersResult.js";async function e(e,n,f){const m=r(e),p={...n.toJSON(),f:"json"},u=o({...m.query,...p}),a=i(u,{...f,method:"post"}),d=`${m.path}/unitIdentifiers/resize`,{data:j}=await t(d,a);return s.fromJSON(j)}export{e as resize};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{_ as r}from"../../../../chunks/tslib.es6.js";import e from"../../../../core/JSONSupport.js";import{property as t}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{reader as o}from"../../../../core/accessorSupport/decorators/reader.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{handleServiceEdits as i}from"../../support/utils.js";let p=class extends e{constructor(r){super(r),this.moment=null,this.exceededTransferLimit=!1,this.serviceEdits=null}readServiceEdits(r,e){return i(r)}};r([t({type:Date})],p.prototype,"moment",void 0),r([t({type:Boolean})],p.prototype,"exceededTransferLimit",void 0),r([t({type:[Object]})],p.prototype,"serviceEdits",void 0),r([o("serviceEdits")],p.prototype,"readServiceEdits",null),p=r([s("esri.rest.networks.unitIdentifiers.support.EditUnitIdentifiersResult")],p);export{p as default};
|
package/support/arcadeUtils.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{p as e,c as n,e as r,a as t,r as o,l as a,b as
|
|
5
|
+
import{p as e,c as n,e as r,a as t,r as o,l as a,b as l,d as i,f as u,s,g as c}from"../chunks/arcade.js";export{h as arcade}from"../chunks/arcade.js";import{ArcadeDate as f}from"../arcade/ArcadeDate.js";import{toSymbolId as p}from"../arcade/arcadeEnvironment.js";import m from"../arcade/Dictionary.js";import d from"../arcade/Feature.js";import{j as y,e as v,k as x,m as g,l as j}from"../chunks/languageUtils.js";export{Voxel}from"../arcade/Voxel.js";import{clone as S}from"../core/lang.js";import{DateOnly as w}from"../core/sql/DateOnly.js";import{TimeOnly as $}from"../core/sql/TimeOnly.js";import b from"../geometry/Extent.js";import E from"../geometry/Multipoint.js";import A from"../geometry/Point.js";import F from"../geometry/Polygon.js";import P from"../geometry/Polyline.js";import{isArray as C,isString as _,isBoolean as D,isNumber as I}from"./guards.js";const M={vars:{$feature:"any",$view:"any"}};function R(e){return e.replaceAll(/[|\\{}()[\]^$+*?.]/g,"\\$&")}function T(e){return null==e?null:C(e)||y(e)?"array":v(e)?"date":_(e)?"text":D(e)?"boolean":I(e)?"number":e instanceof m?"dictionary":x(e)?"feature":e instanceof A?"point":e instanceof F?"polygon":e instanceof P?"polyline":e instanceof E?"multipoint":e instanceof b?"extent":e instanceof w?"dateOnly":e instanceof $?"time":g(e)?"featureSet":j(e)?"featureSetCollection":null}function k(n){if(!n)return null;try{return e(n)}catch(r){}return null}function z(e,r){const t="string"==typeof e?k(e):e;if(!t)return null;try{return r=r||S(M),n(t,r)}catch(o){}return null}function J(e,n,r){return{vars:{$feature:null==e?new d:d.createFromGraphic(e,r),$view:n?.view},spatialReference:n?.sr,timeZone:r??null}}function V(e,n,r){return d.createFromGraphicLikeObject(n,e,r,null)}function O(e,n){null!=e.vars&&(e.vars.$feature=n)}function Z(e,n){let t;try{t=r(e,n)}catch(o){t=null}return t}function q(e,n){let r;try{r=e?e(n):null}catch(t){r=null}return r}function G(e,n){try{return e?e(n):Promise.resolve(null)}catch(r){return Promise.resolve(null)}}const L=new Set(["$feature","$aggregatedFeatures","$voxel"].map((e=>p(e))));function N(e,n){if(!e)return[];const r="string"==typeof e?k(e):e;if(!r)return[];const o=t(r).filter((({varId:e})=>L.has(e))).map((({memberNamePattern:e})=>e)).flatMap((e=>{if(e.includes("*")){if(null==n)return[];const r=new RegExp(`^${e.split(/\*+/).map(R).join(".*")}$`,"i");return n.filter((e=>r.test(e)))}return e.toLowerCase()}));return[...new Set(o.sort())]}function U(e){return o(e,"$view")}function B(e,n){return!!e&&o(e,n)}function H(e){if(!e||null==e.spatialReference&&(null==e.scale||null==e.viewingMode))return;let n,r;const{timeProperties:t,timeZone:o}=e;if(null!=t){const{currentStart:e,currentEnd:a}=t;null!=o?(n=null!=e?f.dateJSAndZoneToArcadeDate(e,o):null,r=null!=a?f.dateJSAndZoneToArcadeDate(a,o):null):(n=null!=e?f.dateJSToArcadeDate(e):null,r=null!=a?f.dateJSToArcadeDate(a):null)}return{view:e.viewingMode&&null!=e.scale?new m({__proto__:null,viewingMode:e.viewingMode,scale:e.scale,timeProperties:null!=n||null!=r?new m({__proto__:null,currentStart:n,currentEnd:r,startIncluded:!0,endIncluded:!0}):null}):null,sr:e.spatialReference}}function K({url:e,spatialReference:n,lrucache:r,interceptor:t}){const o=u();return o?o.createFeatureSetCollectionFromService(e,n,r,t):null}function Q({layer:e,spatialReference:n,outFields:r,returnGeometry:t,lrucache:o,interceptor:a}){if(null===e)return null;const l=u();return l?l.constructFeatureSet(e,n,r,t??!0,o,a):null}function W(e){if(null===e?.map)return null;const n=u();return n?n.createFeatureSetCollectionFromMap(e.map,e.spatialReference,e.lrucache,e.interceptor):null}function X(e,n){return m.convertJsonToArcade(e,n)}function Y(e,n,r=[]){return a(e,n,r)}function ee(){return l()}function ne(){return i()}function re(e){return"type"in e&&("class-breaks"===e.type||"dictionary"===e.type||"dot-density"===e.type||"pie-chart"===e.type||"simple"===e.type||"unique-value"===e.type)}function te(e){return"esri.layers.support.LabelClass"===e.declaredClass}function oe(e){return"esri.PopupTemplate"===e.declaredClass}function ae(e,n){if(!e)return!1;if("string"==typeof e)return n(e);const r=e;if(re(r)){if("dot-density"===r.type){const e=r.attributes?.some((e=>n(e.valueExpression)));if(e)return e}const e=r.visualVariables,t=!!e&&e.some((e=>{let r=n(e.valueExpression);return"size"===e.type&&(ce(e.minSize)&&(r=r||n(e.minSize.valueExpression)),ce(e.maxSize)&&(r=r||n(e.maxSize.valueExpression))),r}));return!(!("valueExpression"in r)||!n(r.valueExpression))||t}if(te(r)){const e=r.labelExpressionInfo?.expression;return!(!e||!n(e))||!1}return!!oe(r)&&(!!r.expressionInfos&&r.expressionInfos.some((e=>n(e.expression)))||Array.isArray(r.content)&&r.content.some((e=>"expression"===e.type&&n(e.expressionInfo?.expression))))}function le(e){const n=k(e);return!!n&&s(n)}function ie(e){return ae(e,le)}function ue(e){const n=k(e);return!!n&&c(n)}function se(e){return ae(e,ue)}function ce(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}export{m as Dictionary,d as arcadeFeature,Q as convertFeatureLayerToFeatureSet,X as convertJsonToArcade,W as convertMapToFeatureSetCollection,K as convertServiceUrlToWorkspace,J as createExecContext,V as createFeature,z as createFunction,k as createSyntaxTree,U as dependsOnView,ne as enableFeatureSetOperations,ee as enableGeometryOperations,Z as evalSyntaxTree,G as executeAsyncFunction,q as executeFunction,N as extractFieldNames,T as getArcadeType,H as getViewInfo,ie as hasGeometryFunctions,se as hasGeometryOperations,B as hasVariable,Y as loadScriptDependencies,O as updateExecContext};
|
package/support/revision.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
|
-
const c="
|
|
5
|
+
const c="20250606",e="56effed1a46a53708c3fc78902bd07bec4cb0241";export{c as buildDate,e as commitHash};
|
|
@@ -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{numericHash as t}from"../../../../../../core/string.js";import{FeatureTechniqueInstance as e}from"./TechniqueInstance.js";import{castInstanceId as s}from"./mesh/instanceIdUtils.js";class n{constructor(){this._instanceById=new Map}destroy(){this._instanceById.clear()}get size(){return this._instanceById.size}entries(){return this._instanceById.entries()}find(t){for(const e of this.values())if(e.techniqueRef.type===t)return e;return null}updateStart(){this._instanceByIdNext=new Map,this._shaderCountByMesh=new Map,this._shaderIndices=new Map}updateEnd(){if(!this._instanceByIdNext)throw new Error("InternalError: Found updateEnd call without corresponding updateStart");for(const t of this._instanceById.keys())this._instanceByIdNext.has(t)||this._instanceById.delete(t);for(const[t,e]of this._instanceByIdNext.entries()){const s=this._instanceById.get(t);s?s.setInput(e.getInput()):this._instanceById.set(t,e)}this._instanceByIdNext=null,this._shaderCountByMesh=null,this._shaderIndices=null}values(){return this._instanceById.values()}ensureInstance(n,i){let r;if("object"==typeof i&&"optionalAttributes"in i&&"uniforms"in i){const t=`${n.type}.${JSON.stringify(i.optionalAttributes)}`,e=t+`.${JSON.stringify(i.uniforms)}`;let s=0;null!=this._instanceByIdNext&&(this._shaderIndices.has(e)?s=this._shaderIndices.get(e):(s=this._shaderCountByMesh.get(t)??0,this._shaderCountByMesh.set(t,s+1),this._shaderIndices.set(e,s))),r=t+`.${s}`}else r=`${n.type}.${JSON.stringify(i)}`;const a=t(r);if(this._instanceByIdNext){const t=new e(s(a),n,i);return this._instanceByIdNext.set(a,t),t}if(!this._instanceById.has(a)){const t=new e(s(a),n,i);this._instanceById.set(a,t)}return this._instanceById.get(a)}getInstance(t){const e=this._instanceById.get(t);if(null==e)throw new Error(`InternalError: Unable to get instance for ${t}`);return e}}export{n as default};
|
|
5
|
+
import{numericHash as t}from"../../../../../../core/string.js";import{FeatureTechniqueInstance as e}from"./TechniqueInstance.js";import{castInstanceId as s}from"./mesh/instanceIdUtils.js";class n{constructor(){this._instanceById=new Map}destroy(){this._instanceById.clear()}get size(){return this._instanceById.size}entries(){return this._instanceById.entries()}find(t){for(const e of this.values())if(e.techniqueRef.type===t)return e;return null}updateStart(t){t&&(this._instanceByIdNext=new Map,this._shaderCountByMesh=new Map,this._shaderIndices=new Map)}updateEnd(t){if(t){if(!this._instanceByIdNext)throw new Error("InternalError: Found updateEnd call without corresponding updateStart");for(const t of this._instanceById.keys())this._instanceByIdNext.has(t)||this._instanceById.delete(t);for(const[t,e]of this._instanceByIdNext.entries()){const s=this._instanceById.get(t);s?s.setInput(e.getInput()):this._instanceById.set(t,e)}this._instanceByIdNext=null,this._shaderCountByMesh=null,this._shaderIndices=null}}values(){return this._instanceById.values()}ensureInstance(n,i){let r;if("object"==typeof i&&"optionalAttributes"in i&&"uniforms"in i){const t=`${n.type}.${JSON.stringify(i.optionalAttributes)}`,e=t+`.${JSON.stringify(i.uniforms)}`;let s=0;null!=this._instanceByIdNext&&(this._shaderIndices.has(e)?s=this._shaderIndices.get(e):(s=this._shaderCountByMesh.get(t)??0,this._shaderCountByMesh.set(t,s+1),this._shaderIndices.set(e,s))),r=t+`.${s}`}else r=`${n.type}.${JSON.stringify(i)}`;const a=t(r);if(this._instanceByIdNext){const t=new e(s(a),n,i);return this._instanceByIdNext.set(a,t),t}if(!this._instanceById.has(a)){const t=new e(s(a),n,i);this._instanceById.set(a,t)}return this._instanceById.get(a)}getInstance(t){const e=this._instanceById.get(t);if(null==e)throw new Error(`InternalError: Unable to get instance for ${t}`);return e}}export{n as default};
|