Custom Gis Application with Arcgis Javascript API with modern layouting
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

15 lines
5.7 KiB

// All material copyright Esri, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.30/esri/copyright.txt for details.
//>>built
define("exports ./Graphic ./arcade/ArcadeDate ./arcade/ImmutableArray ./core/Error ./core/lang ./core/sql/DateOnly ./core/sql/TimeOnly ./layers/FeatureLayer ./portal/Portal ./rest/support/FeatureSet ./support/arcadeOnDemand".split(" "),function(t,J,u,K,v,L,z,A,M,N,O,P){function Q(c,a,b,e={}){a=a.elementType;const d="array"===a.type?[{name:"value",type:a.type,elementType:a.elementType}]:"dictionary"===a.type?[{name:"value",type:a.type,properties:a.properties}]:[{name:"value",type:a.type}];return new K(c.map(f=>
{const h={};w(h,d,{value:f},b,e);return h.value}))}function R(c,a,b={}){c=c instanceof O?new M({source:c.features,geometryType:c.geometryType,fields:c.fields,spatialReference:c.spatialReference}):c;return a.constructFeatureSet(c,b.spatialReference,null,!0,b.lruCache,b.interceptor)}function S(c,a,b={}){const {spatialReference:e,interceptor:d,lruCache:f}=b;return"string"===typeof c?a.createFeatureSetCollectionFromService(c,e,f,d):a.createFeatureSetCollectionFromMap(c,e,f,d)}function T(c,a,b,e={}){const d=
{};w(d,a.properties,c,b,e);return new q.Dictionary(d)}function w(c,a,b,e,d={}){const f={};for(const h of Object.keys(b))f[h.toLowerCase()]=b[h];for(const h of a)if(a=h.name.toLowerCase(),d.variablesPreProcessed)c[a]=f[a];else switch(h.type){case "array":b=f[a];c[a]=null==b?null:Q(b,h,e,d);break;case "feature":b=f[a];c[a]=null==b?null:q.Feature.createFromGraphic(b,d?.timeZone);break;case "featureSet":b=f[a];c[a]=null==b?null:e?R(b,e,d):null;break;case "featureSetCollection":b=f[a];c[a]=null==b?null:
e?S(b,e,d):null;break;case "dictionary":b=f[a];c[a]=null==b?null:T(b,h,e,d);break;case "date":b=f[a];c[a]=b?b instanceof u.ArcadeDate?b:d?.timeZone?u.ArcadeDate.dateJSAndZoneToArcadeDate(b,d?.timeZone):u.ArcadeDate.dateJSToArcadeDate(b):null;break;case "dateOnly":b=f[a];c[a]=b?b instanceof z.DateOnly?b:z.DateOnly.fromReader(b):null;break;case "time":b=f[a];c[a]=b?b instanceof A.TimeOnly?b:A.TimeOnly.fromReader(b):null;break;case "knowledgeGraph":case "geometry":case "boolean":case "text":case "number":c[a]=
f[a]}}function B(c,a){for(const b of c)a.push(b),"dictionary"===b.type&&B(b.properties,a);return a}function C(c,a,b,e,d){const {spatialReference:f,interceptor:h,lruCache:x,console:m,abortSignal:l,timeZone:k,services:y={portal:N.getDefault()}}=b;d={vars:{},spatialReference:f,interceptor:h,timeZone:k,lrucache:x,useAsync:d,services:y,console:m,abortSignal:l};if(!a)return d;w(d.vars,c.variables,a,e,b);return d}function r(c,a){switch(a.getArcadeType(c)){case "date":return c.toJSDate();case "time":return c.toString();
case "dateOnly":return c.toString();case "feature":var b="geometry"in c?c.geometry():null;c="readAttributes"in c?c.readAttributes():c.attributes;return new J({geometry:b,attributes:c});case "dictionary":b=c.attributes;const e={};for(const d of Object.keys(b))e[d]=r(c.field(d),a);return e;case "array":return("toArray"in c?c.toArray():c).map(d=>r(d,a))}return c}let q=null;const D={variables:[{name:"$feature",type:"feature"},{name:"$layer",type:"featureSet"},{name:"$datastore",type:"featureSetCollection"},
{name:"$map",type:"featureSetCollection"},{name:"$userInput",type:"geometry"},{name:"$graph",type:"knowledgeGraph"}]},E={variables:[{name:"$feature",type:"feature"},{name:"$aggregatedFeatures",type:"featureSet"}]},F=new Map([["aggregate-field",{variables:[{name:"$feature",type:"feature"}]}],["form-constraint",{variables:[{name:"$feature",type:"feature"}]}],["feature-z",{variables:[{name:"$feature",type:"feature"}]}],["field-calculation",{variables:[{name:"$feature",type:"feature"},{name:"$datastore",
type:"featureSetCollection"}]}],["form-calculation",{variables:[{name:"$feature",type:"feature"},{name:"$originalFeature",type:"feature"},{name:"$layer",type:"featureSet"},{name:"$featureSet",type:"featureSet"},{name:"$datastore",type:"featureSetCollection"},{name:"$map",type:"featureSetCollection"},{name:"$editContext",type:"dictionary",properties:[{name:"editType",type:"text"}]}]}],["labeling",{variables:[{name:"$feature",type:"feature"}]}],["popup",D],["popup-element",D],["feature-reduction-popup",
E],["feature-reduction-popup-element",E],["visualization",{variables:[{name:"$feature",type:"feature"},{name:"$view",type:"dictionary",properties:[{name:"scale",type:"number"}]}]}]]);t.createArcadeExecutor=async function(c,a,b={}){q||=await P.loadArcade();const {arcade:e,arcadeUtils:d}=q,{loadScriptDependencies:f,referencesMember:h,scriptIsAsync:x}=e;var m=B(a.variables,[]),l=m.filter(g=>"featureSet"===g.type||"featureSetCollection"===g.type).map(g=>g.name.toLowerCase());const k=e.parseScript(c,l);
if(!k)throw new v("arcade:invalid-script","Unable to create SyntaxTree");c=d.extractFieldNames(k);const y=e.scriptTouchesGeometry(k);m=m.map(g=>g.name.toLowerCase()).filter(g=>h(k,g));const n=x(k,l);await f(k,n,l);l={vars:{},spatialReference:null,useAsync:n};for(const g of m)l.vars[g]="any";const {lruCache:G}=b,H=e.compileScript(k,l),I=e.featureSetUtils(),{services:U}=b;return{execute:(g,p={})=>{if(n)throw new v("arcade:invalid-execution-mode","Cannot execute the script in synchronous mode");g=H(C(a,
g,{lruCache:G,...p},I,n));return p.rawOutput?g:r(g,d)},executeAsync:async(g,p={})=>{g=await H(C(a,g,{lruCache:G,services:U,...p},I,n));return p.rawOutput?g:r(g,d)},isAsync:n,variablesUsed:m,fieldsUsed:c,geometryUsed:y,syntaxTree:k}};t.createArcadeProfile=function(c){var a=F.get(c);if(!a)throw a=Array.from(F.keys()).map(b=>`'${b}'`).join(", "),new v("createArcadeProfile:invalid-profile-name",`Invalid profile name '${c}'. You must specify one of the following values: ${a}`);return L.clone(a)};Object.defineProperty(t,
Symbol.toStringTag,{value:"Module"})});