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.
 
 

52 lines
25 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 ./ArcadeModule ./ArcadeModuleLoader ./containerUtils ./Dictionary ./executionError ./Feature ./FunctionWrapper ../chunks/languageUtils ./treeAnalysis ../chunks/array ./functions/date ./functions/geometry ./functions/geomsync ./functions/maths ./functions/stats ./functions/string ../geometry/Geometry ../geometry/SpatialReference".split(" "),function(H,K,P,L,w,d,ea,t,e,fa,ha,ia,ja,ka,la,ma,na,Q,R){function S(a,b){const c=[];for(let f=0;f<b.arguments.length;f++)c.push(k(a,b.arguments[f]));
return c}function r(a,b,c){try{return!0===b.preparsed?c(a,null,b.arguments):c(a,b,S(a,b))}catch(f){throw f;}}function k(a,b){try{switch(b?.type){case "EmptyStatement":return e.voidOperation;case "VariableDeclarator":let z=null===b.init?null:k(a,b.init);z===e.voidOperation&&(z=null);if("Identifier"!==b.id.type)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.InvalidIdentifier,b);const T=b.id.name.toLowerCase();null!=a.localScope?a.localScope[T]={value:z,valueset:!0,node:b.init}:a.globalScope[T]=
{value:z,valueset:!0,node:b.init};return e.voidOperation;case "VariableDeclaration":for(var c=0;c<b.declarations.length;c++)k(a,b.declarations[c]);return e.voidOperation;case "ImportDeclaration":const U=b.specifiers[0].local.name.toLowerCase(),I=a.libraryResolver.loadLibrary(U);c=null;a.libraryResolver._moduleSingletons?.has(I.uri)?c=a.libraryResolver._moduleSingletons.get(I.uri):(c=new A(I),c.loadModule(a),a.libraryResolver._moduleSingletons?.set(I.uri,c));a.globalScope[U]={value:c,valueset:!0,node:b};
return e.voidOperation;case "ExportNamedDeclaration":k(a,b.declaration);if("FunctionDeclaration"===b.declaration.type)a.exports[b.declaration.id.name.toLowerCase()]="function";else if("VariableDeclaration"===b.declaration.type)for(const g of b.declaration.declarations)a.exports[g.id.name.toLowerCase()]="variable";return e.voidOperation;case "BlockStatement":case "Program":a:{let g=e.voidOperation;for(c=0;c<b.body.length;c++)if(g=k(a,b.body[c]),g instanceof e.returnResult||g===e.breakResult||g===e.continueResult){var f=
g;break a}f=g}return f;case "FunctionDeclaration":const oa=b.id.name.toLowerCase();a.globalScope[oa]={valueset:!0,node:null,value:new pa(b,a)};return e.voidOperation;case "ReturnStatement":if(null===b.argument)var h=new e.returnResult(e.voidOperation);else{var m=k(a,b.argument);h=new e.returnResult(m)}return h;case "IfStatement":{const g=k(a,b.test);if(!0===g)var p=k(a,b.consequent);else if(!1===g)p=null!==b.alternate?k(a,b.alternate):e.voidOperation;else throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.BooleanConditionRequired,
b);}return p;case "ExpressionStatement":if("AssignmentExpression"===b.expression.type||"UpdateExpression"===b.expression.type)var u=k(a,b.expression);else if("CallExpression"===b.expression.type){const g=k(a,b.expression);u=g===e.voidOperation?e.voidOperation:new e.implicitResult(g)}else{var V=k(a,b.expression);u=V===e.voidOperation?e.voidOperation:new e.implicitResult(V)}return u;case "AssignmentExpression":c=null;var l="";if("MemberExpression"===b.left.type){c=k(a,b.left.object);if(!0===b.left.computed)l=
k(a,b.left.property);else if("Identifier"===b.left.property.type)l=b.left.property.name;else throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.InvalidIdentifier,b);const g=k(a,b.right);if(e.isArray(c))if(e.isNumber(l)){0>l&&(l=c.length+l);if(0>l||l>c.length)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.OutOfBounds,b);if(l===c.length&&"\x3d"!==b.operator)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.OutOfBounds,b);c[l]=v(g,b.operator,c[l],b,a)}else throw new d.ArcadeExecutionError(a,
d.ExecutionErrorCodes.ArrayAccessorMustBeNumber,b);else if(c instanceof w){if(!1===e.isString(l))throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.KeyAccessorMustBeString,b);if(!0===c.hasField(l))c.setField(l,v(g,b.operator,c.field(l),b,a));else{if("\x3d"!==b.operator)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.FieldNotFound,b,{key:l});c.setField(l,v(g,b.operator,null,b,a))}}else if(e.isFeature(c)){if(!1===e.isString(l))throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.KeyAccessorMustBeString,
b);if(!0===c.hasField(l))c.setField(l,v(g,b.operator,c.field(l),b,a));else{if("\x3d"!==b.operator)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.FieldNotFound,b,{key:l});c.setField(l,v(g,b.operator,null,b,a))}}else{if(e.isImmutableArray(c))throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.Immutable,b);if(c instanceof A){if(!1===e.isString(l))throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.ModuleAccessorMustBeString,b);if(!0===c.hasGlobal(l))c.setGlobal(l,v(g,b.operator,c.global(l),
b,a));else throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.ModuleExportNotFound,b);}else throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.InvalidIdentifier,b);}var E=e.voidOperation}else{c=b.left.name.toLowerCase();var B=k(a,b.right);if(null!=a.localScope&&void 0!==a.localScope[c])a.localScope[c]={value:v(B,b.operator,a.localScope[c].value,b,a),valueset:!0,node:b.right},E=e.voidOperation;else if(void 0!==a.globalScope[c])a.globalScope[c]={value:v(B,b.operator,a.globalScope[c].value,
b,a),valueset:!0,node:b.right},E=e.voidOperation;else throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.InvalidIdentifier,b);}return E;case "UpdateExpression":{let g;c=null;l="";if("MemberExpression"===b.argument.type){c=k(a,b.argument.object);!0===b.argument.computed?l=k(a,b.argument.property):"Identifier"===b.argument.property.type&&(l=b.argument.property.name);if(e.isArray(c))if(e.isNumber(l)){0>l&&(l=c.length+l);if(0>l||l>=c.length)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.OutOfBounds,
b);g=e.toNumber(c[l]);c[l]="++"===b.operator?g+1:g-1}else throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.ArrayAccessorMustBeNumber,b);else if(c instanceof w){if(!1===e.isString(l))throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.KeyAccessorMustBeString,b);if(!0===c.hasField(l))g=e.toNumber(c.field(l)),c.setField(l,"++"===b.operator?g+1:g-1);else throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.FieldNotFound,b);}else if(e.isFeature(c)){if(!1===e.isString(l))throw new d.ArcadeExecutionError(a,
d.ExecutionErrorCodes.KeyAccessorMustBeString,b);if(!0===c.hasField(l))g=e.toNumber(c.field(l)),c.setField(l,"++"===b.operator?g+1:g-1);else throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.FieldNotFound,b);}else{if(e.isImmutableArray(c))throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.Immutable,b);if(c instanceof A){if(!1===e.isString(l))throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.ModuleAccessorMustBeString,b);if(!0===c.hasGlobal(l))g=e.toNumber(c.global(l)),c.setGlobal(l,
"++"===b.operator?g+1:g-1);else throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.ModuleExportNotFound,b);}else throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.InvalidParameter,b);}var x=!1===b.prefix?g:"++"===b.operator?g+1:g-1}else{c="Identifier"===b.argument.type?b.argument.name.toLowerCase():"";if(!c)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.InvalidIdentifier,b);if(null!=a.localScope&&void 0!==a.localScope[c])g=e.toNumber(a.localScope[c].value),a.localScope[c]={value:"++"===
b.operator?g+1:g-1,valueset:!0,node:b},x=!1===b.prefix?g:"++"===b.operator?g+1:g-1;else if(void 0!==a.globalScope[c])g=e.toNumber(a.globalScope[c].value),a.globalScope[c]={value:"++"===b.operator?g+1:g-1,valueset:!0,node:b},x=!1===b.prefix?g:"++"===b.operator?g+1:g-1;else throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.InvalidIdentifier,b);}}return x;case "BreakStatement":return e.breakResult;case "ContinueStatement":return e.continueResult;case "TemplateElement":return b.value?b.value.cooked:
"";case "TemplateLiteral":B="";x=0;for(const g of b.quasis)if(B+=g.value?g.value.cooked:"",!1===g.tail){if(b.expressions[x]){var J=e;l=J.toString;var q=k(a,b.expressions[x]),C=a;E=b;if(e.isFunctionParameter(q))throw new d.ArcadeExecutionError(C,d.ExecutionErrorCodes.NoFunctionInTemplateLiteral,E);c=l.call(J,q)}else c="";B+=c;x++}return B;case "ForStatement":null!==b.init&&k(a,b.init);C={testResult:!0,lastAction:e.voidOperation};do b:{c=a;l=b;q=C;if(null!==l.test){q.testResult=k(c,l.test);if(!1===
q.testResult)break b;if(!0!==q.testResult)throw new d.ArcadeExecutionError(c,d.ExecutionErrorCodes.BooleanConditionRequired,l);}q.lastAction=k(c,l.body);q.lastAction===e.breakResult?q.testResult=!1:q.lastAction instanceof e.returnResult?q.testResult=!1:null!==l.update&&k(c,l.update)}while(!0===C.testResult);J=C.lastAction instanceof e.returnResult?C.lastAction:e.voidOperation;return J;case "ForInStatement":return qa(a,b);case "WhileStatement":c=!0;var F=e.voidOperation;c=k(a,b.test);if(!1===c)var W=
e.voidOperation;else{if(!0!==c)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.BooleanConditionRequired,b);for(;!0===c;){F=k(a,b.body);if(F===e.breakResult)break;if(F instanceof e.returnResult)break;c=k(a,b.test);if(!0!==c&&!1!==c)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.BooleanConditionRequired,b);}W=F instanceof e.returnResult?F:e.voidOperation}return W;case "Identifier":return X(a,b);case "MemberExpression":return ra(a,b);case "Literal":return b.value;case "CallExpression":a:try{if("MemberExpression"===
b.callee.type){const g=k(a,b.callee.object);if(!(g instanceof A))throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.FunctionNotFound,b);const y=!1===b.callee.computed?b.callee.property.name:k(a,b.callee.property);if(!g.hasGlobal(y))throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.FunctionNotFound,b);const D=g.global(y);if(!e.isFunctionParameter(D))throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.CallNonFunction,b);var M=D.call(a,b)}else{if("Identifier"!==b.callee.type)throw new d.ArcadeExecutionError(a,
d.ExecutionErrorCodes.FunctionNotFound,b);if(null!=a.localScope&&void 0!==a.localScope[b.callee.name.toLowerCase()]){const g=a.localScope[b.callee.name.toLowerCase()];if(e.isFunctionParameter(g.value)){M=g.value.call(a,b);break a}throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.CallNonFunction,b);}if(void 0!==a.globalScope[b.callee.name.toLowerCase()]){const g=a.globalScope[b.callee.name.toLowerCase()];if(e.isFunctionParameter(g.value)){M=g.value.call(a,b);break a}throw new d.ArcadeExecutionError(a,
d.ExecutionErrorCodes.CallNonFunction,b);}throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.FunctionNotFound,b);}}catch(g){throw g;}return M;case "UnaryExpression":return sa(a,b);case "BinaryExpression":return ta(a,b);case "LogicalExpression":return ua(a,b);case "ArrayExpression":try{c=[];for(l=0;l<b.elements.length;l++){const g=k(a,b.elements[l]);if(e.isFunctionParameter(g))throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.NoFunctionInArray,b);g===e.voidOperation?c.push(null):c.push(g)}var va=
c}catch(g){throw g;}return va;case "ObjectExpression":c={};const N=new Map;for(l=0;l<b.properties.length;l++){const g=k(a,b.properties[l]);if(e.isFunctionParameter(g.value))throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.NoFunctionInDictionary,b);if(!1===e.isString(g.key))throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.KeyMustBeString,b);let y=g.key.toString();const D=y.toLowerCase();N.has(D)?y=N.get(D):N.set(D,y);c[y]=g.value===e.voidOperation?null:g.value}const Y=new w(c);Y.immutable=
!1;return Y;case "Property":return{key:"Identifier"===b.key.type?b.key.name:k(a,b.key),value:k(a,b.value)};default:throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.Unrecognized,b);}}catch(z){throw d.ensureArcadeExecutionError(a,b,z);}}function qa(a,b){var c=k(a,b.right);"VariableDeclaration"===b.left.type&&k(a,b.left);let f=null;var h="";if("VariableDeclaration"===b.left.type){var m=b.left.declarations[0].id;"Identifier"===m.type&&(h=m.name)}else"Identifier"===b.left.type&&(h=b.left.name);
if(!h)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.InvalidIdentifier,b);h=h.toLowerCase();null!=a.localScope&&void 0!==a.localScope[h]&&(f=a.localScope[h]);null===f&&void 0!==a.globalScope[h]&&(f=a.globalScope[h]);if(null===f)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.InvalidIdentifier,b);if(e.isArray(c)||e.isString(c)){c=c.length;for(h=0;h<c;h++){f.value=h;m=k(a,b.body);if(m===e.breakResult)break;if(m instanceof e.returnResult)return m}return e.voidOperation}if(e.isImmutableArray(c)){for(h=
0;h<c.length();h++){f.value=h;m=k(a,b.body);if(m===e.breakResult)break;if(m instanceof e.returnResult)return m}return e.voidOperation}if(c instanceof w||e.isFeature(c))for(c=c.keys(),h=0;h<c.length;h++){f.value=c[h];m=k(a,b.body);if(m===e.breakResult)break;if(m instanceof e.returnResult)return m}else return e.voidOperation}function v(a,b,c,f,h){switch(b){case "\x3d":return a===e.voidOperation?null:a;case "/\x3d":return e.toNumber(c)/e.toNumber(a);case "*\x3d":return e.toNumber(c)*e.toNumber(a);case "-\x3d":return e.toNumber(c)-
e.toNumber(a);case "+\x3d":return e.isString(c)||e.isString(a)?e.toString(c)+e.toString(a):e.toNumber(c)+e.toNumber(a);case "%\x3d":return e.toNumber(c)%e.toNumber(a);default:throw new d.ArcadeExecutionError(h,d.ExecutionErrorCodes.UnsupportedOperator,f);}}function ra(a,b){try{const c=k(a,b.object);if(null===c)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.MemberOfNull,b);if(!1===b.computed){if("Identifier"===b.property.type){if(c instanceof w||e.isFeature(c))return c.field(b.property.name);
if(c instanceof Q)return L.geometryMember(c,b.property.name,a,b);if(c instanceof A){if(!c.hasGlobal(b.property.name))throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.InvalidIdentifier,b);return c.global(b.property.name)}}throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.InvalidMemberAccessKey,b);}let f=k(a,b.property);if(c instanceof w||e.isFeature(c)){if(e.isString(f))return c.field(f);throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.InvalidMemberAccessKey,b);}if(c instanceof
A){if(e.isString(f))return c.global(f);throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.InvalidMemberAccessKey,b);}if(c instanceof Q){if(e.isString(f))return L.geometryMember(c,f,a,b);throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.InvalidMemberAccessKey,b);}if(e.isArray(c)){if(e.isNumber(f)&&isFinite(f)&&Math.floor(f)===f){0>f&&(f=c.length+f);if(f>=c.length||0>f)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.OutOfBounds,b);return c[f]}throw new d.ArcadeExecutionError(a,
d.ExecutionErrorCodes.InvalidMemberAccessKey,b);}if(e.isString(c)){if(e.isNumber(f)&&isFinite(f)&&Math.floor(f)===f){0>f&&(f=c.length+f);if(f>=c.length||0>f)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.OutOfBounds,b);return c[f]}throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.InvalidMemberAccessKey,b);}if(e.isImmutableArray(c)&&e.isNumber(f)&&isFinite(f)&&Math.floor(f)===f){0>f&&(f=c.length()+f);if(f>=c.length()||0>f)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.OutOfBounds,
b);return c.get(f)}throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.InvalidMemberAccessKey,b);}catch(c){throw c;}}function sa(a,b){try{const c=k(a,b.argument);if(e.isBoolean(c)){if("!"===b.operator)return!c;if("-"===b.operator)return-1*e.toNumber(c);if("+"===b.operator)return 1*e.toNumber(c);if("~"===b.operator)return~e.toNumber(c);throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.UnsupportedUnaryOperator,b);}if("~"===b.operator)return~e.toNumber(c);if("-"===b.operator)return-1*e.toNumber(c);
if("+"===b.operator)return 1*e.toNumber(c);throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.UnsupportedUnaryOperator,b);}catch(c){throw c;}}function ta(a,b){try{const c=[k(a,b.left),k(a,b.right)],f=c[0],h=c[1];switch(b.operator){case "|":case "\x3c\x3c":case "\x3e\x3e":case "\x3e\x3e\x3e":case "^":case "\x26":return e.binaryOperator(e.toNumber(f),e.toNumber(h),b.operator);case "\x3d\x3d":return e.equalityTest(f,h);case "!\x3d":return!e.equalityTest(f,h);case "\x3c":return e.greaterThanLessThan(f,
h,b.operator);case "\x3e":return e.greaterThanLessThan(f,h,b.operator);case "\x3c\x3d":return e.greaterThanLessThan(f,h,b.operator);case "\x3e\x3d":return e.greaterThanLessThan(f,h,b.operator);case "+":return e.isString(f)||e.isString(h)?e.toString(f)+e.toString(h):e.toNumber(f)+e.toNumber(h);case "-":return e.toNumber(f)-e.toNumber(h);case "*":return e.toNumber(f)*e.toNumber(h);case "/":return e.toNumber(f)/e.toNumber(h);case "%":return e.toNumber(f)%e.toNumber(h);default:throw new d.ArcadeExecutionError(a,
d.ExecutionErrorCodes.UnsupportedOperator,b);}}catch(c){throw c;}}function ua(a,b){try{const c=k(a,b.left);if(e.isBoolean(c))switch(b.operator){case "||":if(!0===c)return c;const f=k(a,b.right);if(e.isBoolean(f))return f;throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.LogicExpressionOrAnd,b);case "\x26\x26":if(!1===c)return c;const h=k(a,b.right);if(e.isBoolean(h))return h;throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.LogicExpressionOrAnd,b);default:throw new d.ArcadeExecutionError(a,
d.ExecutionErrorCodes.LogicExpressionOrAnd,b);}throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.LogicalExpressionOnlyBoolean,b);}catch(c){throw c;}}function X(a,b){let c;try{const f=b.name.toLowerCase();if(null!=a.localScope&&void 0!==a.localScope[f]){c=a.localScope[f];if(!0===c.valueset)return c.value;c.value=k(a,c.node);c.valueset=!0;return c.value}if(void 0!==a.globalScope[f]){c=a.globalScope[f];if(!0===c.valueset)return c.value;c.value=k(a,c.node);c.valueset=!0;return c.value}throw new d.ArcadeExecutionError(a,
d.ExecutionErrorCodes.InvalidIdentifier,b);}catch(f){throw f;}}function Z(a,b,c,f){try{const h=b.arguments,m=k(a,h[c]);if(e.equalityTest(m,f))return k(a,h[c+1]);const p=h.length-c;return 1===p?k(a,h[c]):2===p?null:3===p?k(a,h[c+2]):Z(a,b,c+2,f)}catch(h){throw h;}}function aa(a,b,c,f){try{const h=b.arguments;if(!0===f)return k(a,h[c+1]);if(3===h.length-c)return k(a,h[c+2]);const m=k(a,h[c+2]);if(!1===e.isBoolean(m))throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.BooleanConditionRequired,h[c+
2]);return aa(a,b,c+2,m)}catch(h){throw h;}}function O(a,b,c,f){try{const h=a.body;if(c.length!==a.params.length)throw new d.ArcadeExecutionError(b,d.ExecutionErrorCodes.WrongNumberOfParameters,f);if(null!=b.localScope)for(let p=0;p<c.length;p++)b.localScope[a.params[p].name.toLowerCase()]={value:c[p],valueset:!0,node:null};const m=k(b,h);if(m instanceof e.returnResult)return m.value;if(m===e.breakResult)throw new d.ArcadeExecutionError(b,d.ExecutionErrorCodes.UnexpectedToken,f);if(m===e.continueResult)throw new d.ArcadeExecutionError(b,
d.ExecutionErrorCodes.UnexpectedToken,f);return m instanceof e.implicitResult?m.value:m}catch(h){throw h;}}function ba(a,b,c){const f=new G;a||={};b||={};const h=new w({newline:"\n",tab:"\t",singlequote:"'",doublequote:'"',forwardslash:"/",backwardslash:"\\"});h.immutable=!1;f.textformatting={value:h,valueset:!0,node:null};for(const m in b)f[m]={value:new t.NativeFunction(b[m]),native:!0,valueset:!0,node:null};for(const m in a)f[m]=a[m]&&"esri.Graphic"===a[m].declaredClass?{value:ea.createFromGraphic(a[m],
c),valueset:!0,node:null}:{value:a[m],valueset:!0,node:null};return f}function ca(a){console.log(a)}function da(a){const b={mode:"sync",compiled:!1,functions:{},signatures:[],standardFunction:r,evaluateIdentifier:X};for(let c=0;c<a.length;c++)a[c].registerFunctions(b);for(const c in b.functions)n[c]={value:new t.NativeFunction(b.functions[c]),valueset:!0,node:null},G.prototype[c]=n[c];for(a=0;a<b.signatures.length;a++)fa.addFunctionDeclaration(b.signatures[a],"sync")}class pa extends t.ArcadeFunction{constructor(a,
b){super();this.context=this.definition=null;this.definition=a;this.context=b}createFunction(a){return(...b)=>{const c={spatialReference:this.context.spatialReference,console:this.context.console,services:this.context.services,timeZone:this.context.timeZone??null,lrucache:this.context.lrucache,exports:this.context.exports,libraryResolver:this.context.libraryResolver,interceptor:this.context.interceptor,localScope:{},depthCounter:{depth:a.depthCounter.depth+1},globalScope:this.context.globalScope};
if(64<c.depthCounter.depth)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.MaximumCallDepth,null);return O(this.definition,c,b,null)}}call(a,b){return r(a,b,(c,f,h)=>{c={spatialReference:a.spatialReference,services:a.services,globalScope:a.globalScope,depthCounter:{depth:a.depthCounter.depth+1},libraryResolver:a.libraryResolver,exports:a.exports,timeZone:a.timeZone??null,console:a.console,lrucache:a.lrucache,interceptor:a.interceptor,localScope:{}};if(64<c.depthCounter.depth)throw new d.ArcadeExecutionError(a,
d.ExecutionErrorCodes.MaximumCallDepth,b);return O(this.definition,c,h,b)})}marshalledCall(a,b,c,f){return f(a,b,(h,m,p)=>{h={spatialReference:a.spatialReference,globalScope:c.globalScope,services:a.services,depthCounter:{depth:a.depthCounter.depth+1},libraryResolver:a.libraryResolver,exports:a.exports,console:a.console,timeZone:a.timeZone??null,lrucache:a.lrucache,interceptor:a.interceptor,localScope:{}};p=p.map(u=>!e.isFunctionParameter(u)||u instanceof t.ScopeMarshalledFunction?u:t.wrapModuleScopedResponse(u,
a,f));return t.wrapModuleScopedResponse(O(this.definition,h,p,b),c,f)})}}class A extends K.ArcadeModule{constructor(a){super(a)}global(a){a=this.executingContext.globalScope[a.toLowerCase()];a.valueset||(a.value=k(this.executingContext,a.node),a.valueset=!0);if(e.isFunctionParameter(a.value)&&!(a.value instanceof t.ScopeMarshalledFunction)){const b=new t.ScopeMarshalledFunction;b.fn=a.value;b.parameterEvaluator=r;b.context=this.executingContext;a.value=b}return a.value}setGlobal(a,b){if(e.isFunctionParameter(b))throw new d.ArcadeExecutionError(null,
d.ExecutionErrorCodes.AssignModuleFunction,null);this.executingContext.globalScope[a.toLowerCase()]={value:b,valueset:!0,node:null}}hasGlobal(a){void 0===this.executingContext.exports[a]&&(a=a.toLowerCase());return void 0!==this.executingContext.exports[a]?!0:!1}loadModule(a){let b=a.spatialReference;if(null===b||void 0===b)b=new R({wkid:102100});this.moduleScope=ba({},a.customfunctions,a.timeZone);this.executingContext={spatialReference:b,globalScope:this.moduleScope,localScope:null,libraryResolver:new P.ArcadeModuleLoader(a.libraryResolver._moduleSingletons,
this.source.syntax.loadedModules),exports:{},services:a.services,console:a.console??ca,timeZone:a.timeZone??null,lrucache:a.lrucache,interceptor:a.interceptor,depthCounter:{depth:1}};k(this.executingContext,this.source.syntax)}}const n={};ia.registerFunctions(n,r);na.registerFunctions(n,r);la.registerFunctions(n,r);ja.registerFunctions(n,r);ma.registerFunctions(n,r);ka.registerFunctions(n,r);n.iif=function(a,b){try{const c=b.arguments;e.pcCheck(null===c?[]:c,3,3,a,b);const f=k(a,c[0]);if(!1===e.isBoolean(f))throw new d.ArcadeExecutionError(a,
d.ExecutionErrorCodes.BooleanConditionRequired,b);return!0===f?k(a,c[1]):k(a,c[2])}catch(c){throw c;}};n.defaultvalue=function(a,b){try{const c=b.arguments;e.pcCheck(null===c?[]:c,2,3,a,b);const f=k(a,c[0]);if(3===c.length){const h=k(a,c[1]),m=L.getNestedOptionalValue(f,h);return null!=m&&""!==m?m:k(a,c[2])}return null===f||""===f||void 0===f?k(a,c[1]):f}catch(c){throw c;}};n.decode=function(a,b){try{const c=b.arguments;if(2>c.length)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.WrongNumberOfParameters,
b);if(2===c.length)return k(a,c[1]);if(0===(c.length-1)%2)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.WrongNumberOfParameters,b);const f=k(a,c[0]);return Z(a,b,1,f)}catch(c){throw c;}};n.when=function(a,b){try{const c=b.arguments;if(3>c.length)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.WrongNumberOfParameters,b);if(0===c.length%2)throw new d.ArcadeExecutionError(a,d.ExecutionErrorCodes.WrongNumberOfParameters,b);const f=k(a,c[0]);if(!1===e.isBoolean(f))throw new d.ArcadeExecutionError(a,
d.ExecutionErrorCodes.BooleanConditionRequired,c[0]);return aa(a,b,0,f)}catch(c){throw c;}};for(const a in n)n[a]={value:new t.NativeFunction(n[a]),valueset:!0,node:null};const G=function(){};G.prototype=n;G.prototype.infinity={value:Number.POSITIVE_INFINITY,valueset:!0,node:null};G.prototype.pi={value:Math.PI,valueset:!0,node:null};K={fixSpatialReference:e.fixSpatialReference,parseArguments:S,standardFunction:r};da([ha.ArrayFunctions]);H.executeScript=function(a,b){let c=b.spatialReference;if(null===
c||void 0===c)c=new R({wkid:102100});let f=null;a.usesModules&&(f=new P.ArcadeModuleLoader(new Map,a.loadedModules));const h=ba(b.vars,b.customfunctions,b.timeZone);b={spatialReference:c,globalScope:h,localScope:null,services:b.services??null,exports:{},libraryResolver:f,console:b.console??ca,timeZone:b.timeZone??null,lrucache:b.lrucache,interceptor:b.interceptor,depthCounter:{depth:1}};a=k(b,a);a instanceof e.returnResult&&(a=a.value);a instanceof e.implicitResult&&(a=a.value);a===e.voidOperation&&
(a=null);if(a===e.breakResult)throw new d.ArcadeExecutionError(b,d.ExecutionErrorCodes.IllegalResult,null);if(a===e.continueResult)throw new d.ArcadeExecutionError(b,d.ExecutionErrorCodes.IllegalResult,null);if(e.isFunctionParameter(a))throw new d.ArcadeExecutionError(b,d.ExecutionErrorCodes.IllegalResult,null);return a};H.extend=da;H.functionHelper=K;Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})});