@arcgis/core 5.1.0-next.88 → 5.1.0-next.89

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.
Files changed (82) hide show
  1. package/arcade/validation/arcadeValidator.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0840e7dd62643c56ae9e.js +1 -0
  4. package/assets/esri/core/workers/chunks/{500be1fb7cc9efec875c.js → 0e3dcf99382478181366.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{aae40d70eb01249c1bab.js → 1e4e7111d43f01c149b3.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{2549a07f403447482f4e.js → 2dcfc4d7e76c922bcbf9.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{4dc91c2208201ba34c90.js → 3397eae416622c64e628.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{b9e163f4a898e50cc854.js → 39d6032d79720935910d.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{d05a7ce6c1d4b883ed4c.js → 41cbde4738ae4adf973d.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{a401d44a5b45c05072c2.js → 4b9b9e6136c11d5d7901.js} +1 -1
  11. package/assets/esri/core/workers/chunks/5409369d0d637cb30257.js +1 -0
  12. package/assets/esri/core/workers/chunks/{defac06f9e2b43090677.js → 73af4c947e8151d411c1.js} +2 -2
  13. package/assets/esri/core/workers/chunks/{01bd1b86ba899c6aa4c0.js → 75c09a2fa4c34b4844c5.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{b2983f521d8c96becd8a.js → 7ed5b669010db58845f8.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{8178e9ba3c568d406a87.js → 81d761c837b7456ec99f.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{7185486c6dc28fc367a1.js → 90a8dfb03a437fe8a6e7.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{c9065cee85eb8dde6a42.js → a2159df718a7f2f59271.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{7f34fa9f154f5101cb13.js → a232d05c0a055f398c6e.js} +1 -1
  19. package/assets/esri/core/workers/chunks/a508104179e08f0f268c.js +2 -0
  20. package/assets/esri/core/workers/chunks/{4baf66314f82cfa76beb.js → adfa5c136c72c1e65770.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{004af103a94d21cb4889.js → aefeb5a17bb481c95da3.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{164ee62f2211987ad850.js → bb8d596f15fd3a0d783a.js} +1 -1
  23. package/assets/esri/core/workers/chunks/bea2fd831d7a864e5995.js +596 -0
  24. package/assets/esri/core/workers/chunks/{3cf77b7a61f78f9bcd62.js → ceff78c9e31e3572a082.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{5cc38ac051d3d0557920.js → cfaa6e205bfc0c94a1b1.js} +1 -1
  26. package/assets/esri/core/workers/chunks/d5ad036d282df54b9ddc.js +1 -0
  27. package/assets/esri/core/workers/chunks/{475394218caaa4cd3e86.js → d7e7f3efd1d28617b808.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{f37e4ae0e9be80210db0.js → f2c11f54255fd506655e.js} +1 -1
  29. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  30. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  31. package/chunks/ComponentShader.glsl.js +3 -3
  32. package/chunks/index.js +1 -1
  33. package/config.js +1 -1
  34. package/interfaces.d.ts +7 -0
  35. package/kernel.js +1 -1
  36. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  37. package/package.json +2 -2
  38. package/support/revision.js +1 -1
  39. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  40. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  41. package/views/3d/layers/support/IntegratedMesh3DTilesVertexProcessing.js +1 -1
  42. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  43. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +3 -3
  44. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +22 -16
  45. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizer.js +1 -1
  46. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  47. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  48. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  49. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
  50. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  51. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  52. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  53. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  54. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  55. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  56. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  57. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  58. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  59. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  60. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  61. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  62. package/views/3d/webgl-engine/materials/renderers/TextureBufferCache.js +1 -1
  63. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  64. package/views/3d/webgl-engine/shaders/RibbonLineLayouts.js +2 -0
  65. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  66. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  67. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  68. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +64 -0
  69. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +2 -0
  70. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +3 -0
  71. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  72. package/widgets/BatchAttributeForm/inputs/GroupInput.d.ts +2 -1
  73. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  74. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  75. package/widgets/BatchAttributeForm/inputs/types.d.ts +4 -2
  76. package/assets/esri/core/workers/chunks/3e72bd6dbfc52d956c06.js +0 -1
  77. package/assets/esri/core/workers/chunks/a429355534bf6cbd8304.js +0 -1
  78. package/assets/esri/core/workers/chunks/d00dddc3881fa29446e1.js +0 -1
  79. package/assets/esri/core/workers/chunks/f9fe3c9867b0bdb2aec6.js +0 -596
  80. package/assets/esri/core/workers/chunks/fe30e61652716fcccf16.js +0 -2
  81. /package/assets/esri/core/workers/chunks/{defac06f9e2b43090677.js.LICENSE.txt → 73af4c947e8151d411c1.js.LICENSE.txt} +0 -0
  82. /package/assets/esri/core/workers/chunks/{fe30e61652716fcccf16.js.LICENSE.txt → a508104179e08f0f268c.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{j as e,e as i,i as t,f as n,S as s,b as a,O as o}from"../../chunks/index.js";import{diagnosticMessages as r}from"./diagnosticMessages.js";import{arcadeReservedKeywords as d}from"./languageKeywords.js";function c(e,i){return i?e.replaceAll(/\${(.*?)}/g,(e,t)=>i[t]?.toString()??""):e}function l(e){return!!e&&"dictionary"!==e.type}class h{constructor(e,i=[]){this._apiDefinitions=e,this._profileVariables=i,this._isInBlock=!1,this._identifierBeingAssigned=void 0,this._assignmentValidationMode="disabled",this._scriptScopeIdentifiers=new Map,this._diagnostics=new Array,this._undeclaredIdentifiersInFunctions=new Map}validateScript(i){if(!i)return{diagnostics:[],program:null};this._isInBlock=!1,this._identifierBeingAssigned=void 0,this._assignmentValidationMode="disabled",this._diagnostics=[],this._scriptScopeIdentifiers.clear(),this._undeclaredIdentifiersInFunctions.clear(),this._functionScopeIdentifiers=void 0;let t=null;try{t=e(i,{tolerant:!0}),this.handleErrors(t.errors),t.body.forEach(e=>this.validateStatement(e)),this.diagnoseIdentifiers(),this._undeclaredIdentifiersInFunctions.size>0&&this._undeclaredIdentifiersInFunctions.forEach(e=>{for(const i of e)this.logDiagnostic(i.node.loc,{code:"NotDefined",data:{identifier:i.node.name}})})}catch(n){this.handleException(n)}return{diagnostics:this._diagnostics,program:t}}disableRecordIdentifierAssignment(e,i){const t=this._assignmentValidationMode;this._assignmentValidationMode="disabled",e.call(this,i),this._assignmentValidationMode=t}inBlock(e,i){const t=this._isInBlock;this._isInBlock=!0,e.call(this,i),this._isInBlock=t}get _isInFunctionScope(){return!!this._functionScopeIdentifiers}inFunctionScope(e){this._functionScopeIdentifiers=new Map,e.call(this),this.diagnoseIdentifiers(),this._functionScopeIdentifiers=void 0}logDiagnostic(e,t){const n={severity:"Error",...t,message:c(r[t.code]??i[t.code],t.data),range:{start:{line:e.start.line-1,character:e.start.column},end:{line:e.end.line-1,character:e.end.column}}};this._diagnostics.push(n)}handleErrors(e){(e??[]).forEach(this.handleException,this)}handleException(e){if(f(e)){const{range:i,code:t,data:n}=e;this.logDiagnostic(i,{code:t,data:n})}else this.logDiagnostic({start:{line:1,column:0},end:{line:1,column:0}},{code:"ExecutionError",data:{stack:e.stack}})}getIdentifierInfo(e){return this._functionScopeIdentifiers?.get(e)??this._scriptScopeIdentifiers.get(e)}setIdentiferInfo(e,i){this._functionScopeIdentifiers?this._functionScopeIdentifiers.set(e,i):((this._functionScopeIdentifiers??this._scriptScopeIdentifiers).set(e,i),this._functionScopeIdentifiers||this._undeclaredIdentifiersInFunctions.has(e)&&(this._undeclaredIdentifiersInFunctions.delete(e),i.used=!0))}isProfileVariable(e){return(this._profileVariables??[]).some(i=>i.name.toLowerCase()===e)}isApiItem(e){const i=!!this._apiDefinitions?.constantDefinitions?.get(e),t=!!this._apiDefinitions?.functionDefinitions?.get(e);return i||t}validateStatement(e){if(e)switch(e.type){case t.BlockStatement:return void e.body.forEach(e=>this.validateStatement(e));case t.VariableDeclaration:return void e.declarations.forEach(e=>this.validateVariableDeclarator(e));case t.FunctionDeclaration:return void this.validateFunctionDeclaration(e);case t.ExportNamedDeclaration:return void this.validateExportDeclaration(e);case t.ImportDeclaration:return void this.validateImportDeclaration(e);case t.WhileStatement:return void this.validateWhileStatement(e);case t.ForStatement:return void this.validateForStatement(e);case t.ForInStatement:return void this.validateForInStatement(e);case t.IfStatement:return void this.validateIfStatement(e);case t.ReturnStatement:return void this.validateExpression(e.argument);case t.ExpressionStatement:return void this.validateExpression(e.expression);case t.BreakStatement:case t.ContinueStatement:case t.EmptyStatement:return}}validateVariableDeclarator(e){this.validateExpression(e.init),this.recordVariableIdentifier(e.id,{initialized:!!e.init})}validateFunctionDeclaration(e){this.recordFunctionIdentifier(e),this.inFunctionScope(()=>{e.params.forEach(e=>this.recordParamAsIdentifier(e)),p(e.body)&&this.logDiagnostic(e.body.loc,{code:"UnexpectedEmptyFunction",data:{identifier:e.id.name},severity:"Warning"}),this.validateStatement(e.body)})}validateExportDeclaration(e){this.validateStatement(e.declaration)}validateImportDeclaration(e){this.recordImportIdentifier(e)}validateForStatement(e){n(e.init)?this.inBlock(this.validateStatement,e.init):this.validateExpression(e.init),this.validateExpression(e.update),this.validateExpression(e.test),p(e.body)&&this.logDiagnostic(e.body.loc,{code:"EmptyBlockStatement",severity:"Warning"}),this.inBlock(this.validateStatement,e.body)}validateWhileStatement(e){this.validateExpression(e.test),p(e.body)&&this.logDiagnostic(e.body.loc,{code:"EmptyBlockStatement",severity:"Warning"}),this.inBlock(this.validateStatement,e.body)}validateForInStatement(e){s(e.left)?this.validateExpression(e.left):this.recordVariableIdentifier(e.left.declarations[0].id,{initialized:!0,inBlock:!0}),this.validateExpression(e.right),p(e.body)&&this.logDiagnostic(e.body.loc,{code:"EmptyBlockStatement",severity:"Warning"}),this.validateStatement(e.body)}validateIfStatement(e){this.validateExpression(e.test),p(e.consequent)&&this.logDiagnostic(e.consequent.loc,{code:"EmptyBlockStatement",severity:"Warning"}),e.alternate&&p(e.alternate)&&this.logDiagnostic(e.alternate.loc,{code:"EmptyBlockStatement",severity:"Warning"}),this.inBlock(this.validateStatement,e.consequent),this.inBlock(this.validateStatement,e.alternate)}validateExpression(e){if(e)switch(e.type){case t.AssignmentExpression:return void this.validateAssignmentExpression(e);case t.CallExpression:return void this.validateCallExpression(e);case t.Identifier:return void this.validateIdentifier(e);case t.Literal:return void this.validateLiteral(e);case t.ArrayExpression:return void e.elements.forEach(e=>this.validateExpression(e));case t.ObjectExpression:return void this.validateObjectExpression(e);case t.UnaryExpression:return void this.validateUnaryExpression(e);case t.UpdateExpression:return void this.validateUpdateExpression(e);case t.BinaryExpression:case t.LogicalExpression:return void this.validateBinaryAndLogicalExpression(e);case t.MemberExpression:return void this.validateMemberExpression(e);case t.TemplateLiteral:return void e.expressions.forEach(e=>this.validateExpression(e));default:return}}validateAssignmentExpression(e){const i=this._identifierBeingAssigned,t=this._assignmentValidationMode;s(e.left)&&(this._identifierBeingAssigned=e.left.name.toLowerCase(),this._assignmentValidationMode="left"),this.validateExpression(e.left),s(e.left)&&(this._assignmentValidationMode="right"),this.validateExpression(e.right),this._identifierBeingAssigned=i,this._assignmentValidationMode=t}validateCallExpression(e){if(this.validateExpression(e.callee),s(e.callee)){const i=e.callee.name.toLowerCase(),t=this.getIdentifierInfo(i),n=this._apiDefinitions?.functionDefinitions?.get(i);if(!t&&n){const i=g(n,e.arguments.length);i&&this.logDiagnostic(e.loc,i)}}e.arguments.forEach(e=>this.validateExpression(e))}validateIdentifier(e){const i=e.name.toLowerCase(),t=this.getIdentifierInfo(i);if(t){if("left"===this._assignmentValidationMode&&this._identifierBeingAssigned===i)return void(t.initialized=!0);if("right"===this._assignmentValidationMode&&this._identifierBeingAssigned===i)return;t.used=!0}else if(!this.isProfileVariable(i)&&!this.isApiItem(i)){if(this._isInFunctionScope){let t=this._undeclaredIdentifiersInFunctions.get(i);return t||(t=[],this._undeclaredIdentifiersInFunctions.set(i,t)),void t.push({node:e,identifier:i})}this.logDiagnostic(e.loc,{code:"NotDefined",data:{identifier:e.name}})}}validateLiteral(e){m(e.raw).forEach(e=>{const i=this.getIdentifierInfo(e.toLowerCase());i&&(i.used=!0)})}logProfileOrApiConflict(e){const i=e.name.toLowerCase(),t=this.isProfileVariable(i),n=this.isApiItem(i);(t||n)&&this.logDiagnostic(e.loc,{code:t?"ProfileVariablesConflict":"ApiConflict",severity:"Warning",data:{identifier:e.name}})}logReservedKeywordsConflict(e){const i=e.name.toLowerCase();d.includes(i)&&this.logDiagnostic(e.loc,{code:"ReservedKeyword",severity:"Warning",data:{identifier:e.name}})}validateObjectExpression(e){e.properties.forEach(e=>{this.validateExpression(e.value)})}validateUnaryExpression(e){this.validateExpression(e.argument)}validateUpdateExpression(e){this.validateExpression(e.argument)}validateBinaryAndLogicalExpression(e){this.validateExpression(e.left),this.validateExpression(e.right)}validateMemberExpression(e){const i=this.flattenMemberExpressionAndValidate(e),t=i[0].object;this.disableRecordIdentifierAssignment(this.validateExpression,t),s(t)&&(this.getIdentifierInfo(t.name.toLowerCase())||this.validateMemberExpressionWithProfile(i)||this.validateConstantMemberExpression(i))}flattenMemberExpressionAndValidate(e){return e.type===t.MemberExpression?(s(e.property)&&!e.computed||this.validateExpression(e.property),[...this.flattenMemberExpressionAndValidate(e.object),e]):[]}extractAndValidatePropertyName(e){switch(e.type){case"Identifier":return e.name.toLowerCase();case"Literal":return"string"!=typeof e.value?(this.logDiagnostic(e.loc,{code:"UnexpectedPropertyIdentifier"}),null):e.value.toLowerCase();default:return this.logDiagnostic(e.loc,{code:"UnexpectedPropertyIdentifier"}),null}}validateConstantMemberExpression(e){const i=e[0];if(!s(i.object))return!1;const t=i.object.name.toLowerCase(),n=this._apiDefinitions?.constantDefinitions?.get(t);if(!n)return!1;if("namespace"!==n.type)return this.logDiagnostic(i.property.loc,{code:"NotADictionary",data:{identifier:t}}),!0;const a=this.extractAndValidatePropertyName(i.property);if(!a)return!0;if(!n.members.some(e=>e.key===a)){const e=n.members.reduce((e,i)=>`${e}${e?" | ":""}${i.completion.label.split(".").pop()}`,"");this.logDiagnostic(i.property.loc,{code:"InvalidConstantIdentifier",data:{list:e}})}return e.length>1&&this.logDiagnostic(e[1].property.loc,{code:"UnexpectedPropertyIdentifier"}),!0}validateMemberExpressionWithProfile(e){const i=e[0];if(i.object.type!==t.Identifier)return!1;const n=i.object.name.toLowerCase(),s=this._profileVariables?.find(e=>e.key===n);if(!s)return!1;if(l(s))return this.logDiagnostic(i.object.loc,{code:"NotADictionary",data:{identifier:s.name}}),!0;if(this._identifierBeingAssigned===n)return this.logDiagnostic(i.loc,{code:"ProfileVariablesAreImmutable"}),!0;let a=s;for(let t=0;t<e.length;t++){if(e[t].computed)return!0;if(l(a))return this.logDiagnostic(e[t-1]?.property.loc??e[t].object.loc,{code:"NotADictionary",data:{identifier:a.name}}),!0;const i=this.extractAndValidatePropertyName(e[t].property);if(!i)return!0;if(0===a.properties.length)return this.logDiagnostic(e[t].property.loc,{code:"UnknownPropertyIdentifier",data:{identifier:i},severity:"Warning"}),!0;const n=a.properties.find(e=>e.name.toLowerCase()===i);if(!n){const i=a.properties.reduce((e,i)=>`${e}${e?" | ":""}${i.name.split(".").pop()}`,"");return this.logDiagnostic(e[t].property.loc,{code:"InvalidPropertyIdentifier",data:{list:i}}),!0}a=n}return!0}recordVariableIdentifier(e,i){this.logReservedKeywordsConflict(e),this.logProfileOrApiConflict(e);const t=e.name.toLowerCase();let n=this.getIdentifierInfo(t);const s=n&&this._isInFunctionScope&&"function"===n.scope,a=n&&!this._isInFunctionScope&&"script"===n.scope;(s||a)&&this.logDiagnostic(e.loc,{code:"AlreadyDefined",data:{identifier:e.name},severity:"Warning"});const o=i.inBlock??this._isInBlock,{initialized:r}=i;if(!n||this._isInFunctionScope&&"function"!==n.scope){n={node:e,used:!1,initialized:r,scope:this._isInFunctionScope?"function":o?"block":"script"}}else n.node=e,n.used=!1,n.initialized=r;return"block"!==n.scope||o||(n.scope="script",this.logDiagnostic(e.loc,{code:"AlreadyDefined",data:{identifier:e.name},severity:"Warning"})),this.setIdentiferInfo(t,n),!1}recordImportIdentifier(e){const i=e.specifiers[0].local;this.logProfileOrApiConflict(i);const t=i.name.toLowerCase();let n=this.getIdentifierInfo(t);n?.scope&&this.logDiagnostic(e.specifiers[0].local.loc,{code:"AlreadyDefined",data:{identifier:e.specifiers[0].local.name},severity:"Warning"}),n={node:e.specifiers[0].local,used:!1,...n,scope:"script",initialized:!0},this.setIdentiferInfo(t,n)}recordFunctionIdentifier(e){this.logProfileOrApiConflict(e.id);const i=e.id.name.toLowerCase();let t=this.getIdentifierInfo(i);t?.scope&&this.logDiagnostic(e.id.loc,{code:"AlreadyDefined",data:{identifier:e.id.name},severity:"Warning"}),t={node:e.id,used:!1,...t,scope:"script",initialized:!0},this.setIdentiferInfo(i,t)}recordParamAsIdentifier(e){return this.recordVariableIdentifier(e,{initialized:!0})}diagnoseIdentifiers(){(this._functionScopeIdentifiers??this._scriptScopeIdentifiers).forEach(e=>{e.node&&(e.used?e.initialized||this.logDiagnostic(e.node.loc,{code:"DefinedNeverAssigned",data:{identifier:e.node.name},severity:"Warning"}):this.logDiagnostic(e.node.loc,{code:e.initialized?"AssignedNeverUsed":"DefinedNeverUsed",data:{identifier:e.node.name},severity:"Warning"}))})}}function f(e){return"ParsingError"===e?.name}function p(e){return a(e)||o(e)&&!e?.body.length}function g(e,i){if(!e||null==i||i<0)return null;const{min:t,max:n}=e.overloads.reduce((e,i)=>{const{min:t,max:n}=i.parametersInfo;return e.min>=0&&(e.min=Math.min(t,e.min)),e.max>=0&&(e.max=n<0?n:Math.max(n,e.max)),e},{min:1/0,max:0});return i<t?t>0?{code:"NotEnoughArguments",data:{min:t}}:{code:"NoArgumentExpected"}:n>=0&&i>n?{code:"TooManyArguments",data:{max:n}}:null}const u=new RegExp(/\B@\w+/g);function m(e){return Array.from((e??"").matchAll(u),e=>e[0].slice(1))}function v(e,i=[],t){if(!e)return{diagnostics:[]};return new h(t,i).validateScript(e)}export{h as ArcadeValidationService,c as format,l as isValueVariable,v as validateScript};
2
+ import{j as e,e as i,n as t,f as n,S as s,r as a,O as o}from"../../chunks/index.js";import{diagnosticMessages as r}from"./diagnosticMessages.js";import{arcadeReservedKeywords as d}from"./languageKeywords.js";function c(e,i){return i?e.replaceAll(/\${(.*?)}/g,(e,t)=>i[t]?.toString()??""):e}function l(e){return!!e&&"dictionary"!==e.type}class h{constructor(e,i=[]){this._apiDefinitions=e,this._profileVariables=i,this._isInBlock=!1,this._identifierBeingAssigned=void 0,this._assignmentValidationMode="disabled",this._scriptScopeIdentifiers=new Map,this._diagnostics=new Array,this._undeclaredIdentifiersInFunctions=new Map}validateScript(i){if(!i)return{diagnostics:[],program:null};this._isInBlock=!1,this._identifierBeingAssigned=void 0,this._assignmentValidationMode="disabled",this._diagnostics=[],this._scriptScopeIdentifiers.clear(),this._undeclaredIdentifiersInFunctions.clear(),this._functionScopeIdentifiers=void 0;let t=null;try{t=e(i,{tolerant:!0}),this.handleErrors(t.errors),t.body.forEach(e=>this.validateStatement(e)),this.diagnoseIdentifiers(),this._undeclaredIdentifiersInFunctions.size>0&&this._undeclaredIdentifiersInFunctions.forEach(e=>{for(const i of e)this.logDiagnostic(i.node.loc,{code:"NotDefined",data:{identifier:i.node.name}})})}catch(n){this.handleException(n)}return{diagnostics:this._diagnostics,program:t}}disableRecordIdentifierAssignment(e,i){const t=this._assignmentValidationMode;this._assignmentValidationMode="disabled",e.call(this,i),this._assignmentValidationMode=t}inBlock(e,i){const t=this._isInBlock;this._isInBlock=!0,e.call(this,i),this._isInBlock=t}get _isInFunctionScope(){return!!this._functionScopeIdentifiers}inFunctionScope(e){this._functionScopeIdentifiers=new Map,e.call(this),this.diagnoseIdentifiers(),this._functionScopeIdentifiers=void 0}logDiagnostic(e,t){const n={severity:"Error",...t,message:c(r[t.code]??i[t.code],t.data),range:{start:{line:e.start.line-1,character:e.start.column},end:{line:e.end.line-1,character:e.end.column}}};this._diagnostics.push(n)}handleErrors(e){(e??[]).forEach(this.handleException,this)}handleException(e){if(f(e)){const{range:i,code:t,data:n}=e;this.logDiagnostic(i,{code:t,data:n})}else this.logDiagnostic({start:{line:1,column:0},end:{line:1,column:0}},{code:"ExecutionError",data:{stack:e.stack}})}getIdentifierInfo(e){return this._functionScopeIdentifiers?.get(e)??this._scriptScopeIdentifiers.get(e)}setIdentiferInfo(e,i){this._functionScopeIdentifiers?this._functionScopeIdentifiers.set(e,i):((this._functionScopeIdentifiers??this._scriptScopeIdentifiers).set(e,i),this._functionScopeIdentifiers||this._undeclaredIdentifiersInFunctions.has(e)&&(this._undeclaredIdentifiersInFunctions.delete(e),i.used=!0))}isProfileVariable(e){return(this._profileVariables??[]).some(i=>i.name.toLowerCase()===e)}isApiItem(e){const i=!!this._apiDefinitions?.constantDefinitions?.get(e),t=!!this._apiDefinitions?.functionDefinitions?.get(e);return i||t}validateStatement(e){if(e)switch(e.type){case t.BlockStatement:return void e.body.forEach(e=>this.validateStatement(e));case t.VariableDeclaration:return void e.declarations.forEach(e=>this.validateVariableDeclarator(e));case t.FunctionDeclaration:return void this.validateFunctionDeclaration(e);case t.ExportNamedDeclaration:return void this.validateExportDeclaration(e);case t.ImportDeclaration:return void this.validateImportDeclaration(e);case t.WhileStatement:return void this.validateWhileStatement(e);case t.ForStatement:return void this.validateForStatement(e);case t.ForInStatement:return void this.validateForInStatement(e);case t.IfStatement:return void this.validateIfStatement(e);case t.ReturnStatement:return void this.validateExpression(e.argument);case t.ExpressionStatement:return void this.validateExpression(e.expression);case t.BreakStatement:case t.ContinueStatement:case t.EmptyStatement:return}}validateVariableDeclarator(e){this.validateExpression(e.init),this.recordVariableIdentifier(e.id,{initialized:!!e.init})}validateFunctionDeclaration(e){this.recordFunctionIdentifier(e),this.inFunctionScope(()=>{e.params.forEach(e=>this.recordParamAsIdentifier(e)),p(e.body)&&this.logDiagnostic(e.body.loc,{code:"UnexpectedEmptyFunction",data:{identifier:e.id.name},severity:"Warning"}),this.validateStatement(e.body)})}validateExportDeclaration(e){this.validateStatement(e.declaration)}validateImportDeclaration(e){this.recordImportIdentifier(e)}validateForStatement(e){n(e.init)?this.inBlock(this.validateStatement,e.init):this.validateExpression(e.init),this.validateExpression(e.update),this.validateExpression(e.test),p(e.body)&&this.logDiagnostic(e.body.loc,{code:"EmptyBlockStatement",severity:"Warning"}),this.inBlock(this.validateStatement,e.body)}validateWhileStatement(e){this.validateExpression(e.test),p(e.body)&&this.logDiagnostic(e.body.loc,{code:"EmptyBlockStatement",severity:"Warning"}),this.inBlock(this.validateStatement,e.body)}validateForInStatement(e){s(e.left)?this.validateExpression(e.left):this.recordVariableIdentifier(e.left.declarations[0].id,{initialized:!0,inBlock:!0}),this.validateExpression(e.right),p(e.body)&&this.logDiagnostic(e.body.loc,{code:"EmptyBlockStatement",severity:"Warning"}),this.validateStatement(e.body)}validateIfStatement(e){this.validateExpression(e.test),p(e.consequent)&&this.logDiagnostic(e.consequent.loc,{code:"EmptyBlockStatement",severity:"Warning"}),e.alternate&&p(e.alternate)&&this.logDiagnostic(e.alternate.loc,{code:"EmptyBlockStatement",severity:"Warning"}),this.inBlock(this.validateStatement,e.consequent),this.inBlock(this.validateStatement,e.alternate)}validateExpression(e){if(e)switch(e.type){case t.AssignmentExpression:return void this.validateAssignmentExpression(e);case t.CallExpression:return void this.validateCallExpression(e);case t.Identifier:return void this.validateIdentifier(e);case t.Literal:return void this.validateLiteral(e);case t.ArrayExpression:return void e.elements.forEach(e=>this.validateExpression(e));case t.ObjectExpression:return void this.validateObjectExpression(e);case t.UnaryExpression:return void this.validateUnaryExpression(e);case t.UpdateExpression:return void this.validateUpdateExpression(e);case t.BinaryExpression:case t.LogicalExpression:return void this.validateBinaryAndLogicalExpression(e);case t.MemberExpression:return void this.validateMemberExpression(e);case t.TemplateLiteral:return void e.expressions.forEach(e=>this.validateExpression(e));default:return}}validateAssignmentExpression(e){const i=this._identifierBeingAssigned,t=this._assignmentValidationMode;s(e.left)&&(this._identifierBeingAssigned=e.left.name.toLowerCase(),this._assignmentValidationMode="left"),this.validateExpression(e.left),s(e.left)&&(this._assignmentValidationMode="right"),this.validateExpression(e.right),this._identifierBeingAssigned=i,this._assignmentValidationMode=t}validateCallExpression(e){if(this.validateExpression(e.callee),s(e.callee)){const i=e.callee.name.toLowerCase(),t=this.getIdentifierInfo(i),n=this._apiDefinitions?.functionDefinitions?.get(i);if(!t&&n){const i=g(n,e.arguments.length);i&&this.logDiagnostic(e.loc,i)}}e.arguments.forEach(e=>this.validateExpression(e))}validateIdentifier(e){const i=e.name.toLowerCase(),t=this.getIdentifierInfo(i);if(t){if("left"===this._assignmentValidationMode&&this._identifierBeingAssigned===i)return void(t.initialized=!0);if("right"===this._assignmentValidationMode&&this._identifierBeingAssigned===i)return;t.used=!0}else if(!this.isProfileVariable(i)&&!this.isApiItem(i)){if(this._isInFunctionScope){let t=this._undeclaredIdentifiersInFunctions.get(i);return t||(t=[],this._undeclaredIdentifiersInFunctions.set(i,t)),void t.push({node:e,identifier:i})}this.logDiagnostic(e.loc,{code:"NotDefined",data:{identifier:e.name}})}}validateLiteral(e){m(e.raw).forEach(e=>{const i=this.getIdentifierInfo(e.toLowerCase());i&&(i.used=!0)})}logProfileOrApiConflict(e){const i=e.name.toLowerCase(),t=this.isProfileVariable(i),n=this.isApiItem(i);(t||n)&&this.logDiagnostic(e.loc,{code:t?"ProfileVariablesConflict":"ApiConflict",severity:"Warning",data:{identifier:e.name}})}logReservedKeywordsConflict(e){const i=e.name.toLowerCase();d.includes(i)&&this.logDiagnostic(e.loc,{code:"ReservedKeyword",severity:"Warning",data:{identifier:e.name}})}validateObjectExpression(e){e.properties.forEach(e=>{this.validateExpression(e.value)})}validateUnaryExpression(e){this.validateExpression(e.argument)}validateUpdateExpression(e){this.validateExpression(e.argument)}validateBinaryAndLogicalExpression(e){this.validateExpression(e.left),this.validateExpression(e.right)}validateMemberExpression(e){const i=this.flattenMemberExpressionAndValidate(e),t=i[0].object;this.disableRecordIdentifierAssignment(this.validateExpression,t),s(t)&&(this.getIdentifierInfo(t.name.toLowerCase())||this.validateMemberExpressionWithProfile(i)||this.validateConstantMemberExpression(i))}flattenMemberExpressionAndValidate(e){return e.type===t.MemberExpression?(s(e.property)&&!e.computed||this.validateExpression(e.property),[...this.flattenMemberExpressionAndValidate(e.object),e]):[]}extractAndValidatePropertyName(e){switch(e.type){case"Identifier":return e.name.toLowerCase();case"Literal":return"string"!=typeof e.value?(this.logDiagnostic(e.loc,{code:"UnexpectedPropertyIdentifier"}),null):e.value.toLowerCase();default:return this.logDiagnostic(e.loc,{code:"UnexpectedPropertyIdentifier"}),null}}validateConstantMemberExpression(e){const i=e[0];if(!s(i.object))return!1;const t=i.object.name.toLowerCase(),n=this._apiDefinitions?.constantDefinitions?.get(t);if(!n)return!1;if("namespace"!==n.type)return this.logDiagnostic(i.property.loc,{code:"NotADictionary",data:{identifier:t}}),!0;const a=this.extractAndValidatePropertyName(i.property);if(!a)return!0;if(!n.members.some(e=>e.key===a)){const e=n.members.reduce((e,i)=>`${e}${e?" | ":""}${i.completion.label.split(".").pop()}`,"");this.logDiagnostic(i.property.loc,{code:"InvalidConstantIdentifier",data:{list:e}})}return e.length>1&&this.logDiagnostic(e[1].property.loc,{code:"UnexpectedPropertyIdentifier"}),!0}validateMemberExpressionWithProfile(e){const i=e[0];if(i.object.type!==t.Identifier)return!1;const n=i.object.name.toLowerCase(),s=this._profileVariables?.find(e=>e.key===n);if(!s)return!1;if(l(s))return this.logDiagnostic(i.object.loc,{code:"NotADictionary",data:{identifier:s.name}}),!0;if(this._identifierBeingAssigned===n)return this.logDiagnostic(i.loc,{code:"ProfileVariablesAreImmutable"}),!0;let a=s;for(let t=0;t<e.length;t++){if(e[t].computed)return!0;if(l(a))return this.logDiagnostic(e[t-1]?.property.loc??e[t].object.loc,{code:"NotADictionary",data:{identifier:a.name}}),!0;const i=this.extractAndValidatePropertyName(e[t].property);if(!i)return!0;if(0===a.properties.length)return this.logDiagnostic(e[t].property.loc,{code:"UnknownPropertyIdentifier",data:{identifier:i},severity:"Warning"}),!0;const n=a.properties.find(e=>e.name.toLowerCase()===i);if(!n){const i=a.properties.reduce((e,i)=>`${e}${e?" | ":""}${i.name.split(".").pop()}`,"");return this.logDiagnostic(e[t].property.loc,{code:"InvalidPropertyIdentifier",data:{list:i}}),!0}a=n}return!0}recordVariableIdentifier(e,i){this.logReservedKeywordsConflict(e),this.logProfileOrApiConflict(e);const t=e.name.toLowerCase();let n=this.getIdentifierInfo(t);const s=n&&this._isInFunctionScope&&"function"===n.scope,a=n&&!this._isInFunctionScope&&"script"===n.scope;(s||a)&&this.logDiagnostic(e.loc,{code:"AlreadyDefined",data:{identifier:e.name},severity:"Warning"});const o=i.inBlock??this._isInBlock,{initialized:r}=i;if(!n||this._isInFunctionScope&&"function"!==n.scope){n={node:e,used:!1,initialized:r,scope:this._isInFunctionScope?"function":o?"block":"script"}}else n.node=e,n.used=!1,n.initialized=r;return"block"!==n.scope||o||(n.scope="script",this.logDiagnostic(e.loc,{code:"AlreadyDefined",data:{identifier:e.name},severity:"Warning"})),this.setIdentiferInfo(t,n),!1}recordImportIdentifier(e){const i=e.specifiers[0].local;this.logProfileOrApiConflict(i);const t=i.name.toLowerCase();let n=this.getIdentifierInfo(t);n?.scope&&this.logDiagnostic(e.specifiers[0].local.loc,{code:"AlreadyDefined",data:{identifier:e.specifiers[0].local.name},severity:"Warning"}),n={node:e.specifiers[0].local,used:!1,...n,scope:"script",initialized:!0},this.setIdentiferInfo(t,n)}recordFunctionIdentifier(e){this.logProfileOrApiConflict(e.id);const i=e.id.name.toLowerCase();let t=this.getIdentifierInfo(i);t?.scope&&this.logDiagnostic(e.id.loc,{code:"AlreadyDefined",data:{identifier:e.id.name},severity:"Warning"}),t={node:e.id,used:!1,...t,scope:"script",initialized:!0},this.setIdentiferInfo(i,t)}recordParamAsIdentifier(e){return this.recordVariableIdentifier(e,{initialized:!0})}diagnoseIdentifiers(){(this._functionScopeIdentifiers??this._scriptScopeIdentifiers).forEach(e=>{e.node&&(e.used?e.initialized||this.logDiagnostic(e.node.loc,{code:"DefinedNeverAssigned",data:{identifier:e.node.name},severity:"Warning"}):this.logDiagnostic(e.node.loc,{code:e.initialized?"AssignedNeverUsed":"DefinedNeverUsed",data:{identifier:e.node.name},severity:"Warning"}))})}}function f(e){return"ParsingError"===e?.name}function p(e){return a(e)||o(e)&&!e?.body.length}function g(e,i){if(!e||null==i||i<0)return null;const{min:t,max:n}=e.overloads.reduce((e,i)=>{const{min:t,max:n}=i.parametersInfo;return e.min>=0&&(e.min=Math.min(t,e.min)),e.max>=0&&(e.max=n<0?n:Math.max(n,e.max)),e},{min:1/0,max:0});return i<t?t>0?{code:"NotEnoughArguments",data:{min:t}}:{code:"NoArgumentExpected"}:n>=0&&i>n?{code:"TooManyArguments",data:{max:n}}:null}const u=new RegExp(/\B@\w+/g);function m(e){return Array.from((e??"").matchAll(u),e=>e[0].slice(1))}function v(e,i=[],t){if(!e)return{diagnostics:[]};return new h(t,i).validateScript(e)}export{h as ArcadeValidationService,c as format,l as isValueVariable,v as validateScript};
@@ -1 +1 @@
1
- var RemoteClient;(()=>{"use strict";var e={66358(e,t,r){r.p=self.esriConfig.assetsPath+"/esri/core/workers/"},92602(e,t,r){r.d(t,{A:()=>a}),r(44208);var n=r(93637);const a={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&((0,n.$N)(a,globalThis.esriConfig,!0),delete a.has),!a.assetsPath){{const e="5.1.0-next.88";a.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}a.defaultAssetsPath=a.assetsPath}},49186(e,t,r){r.d(t,{A:()=>s});var n=r(4718),a=r(53966),o=r(799);class s{constructor(e,t,r){this.type="error",this.name=e,this.message=t?(0,o.V2)(t,r):"",this.details=r}toString(){const{name:e,message:t}=this;return`[${e}]: ${t}`}toJSON(){if(null!=this.details)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,(e,t)=>{if(t&&"object"==typeof t&&"function"==typeof t.toJSON)return t;try{return(0,n.o8)(t)}catch(e){return"[object]"}}))}}catch(e){throw a.A.getLogger("esri.core.Error").error(e),e}return{name:this.name,message:this.message,details:this.details}}static fromJSON(e){return new s(e.name,e.message,e.details)}}},53966(e,t,r){r.d(t,{A:()=>i});var n=r(92602),a=r(51447),o=(r(44208),r(799));const s={info:0,warn:1,error:2,none:3};class i{constructor(e){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=e.level&&(this.level=e.level),null!=e.writer&&(this.writer=e.writer),this._module=e.module,i._loggers.set(this.module,this);const t=this.module.lastIndexOf(".");-1!==t&&(this._parent=i.getLogger(this.module.slice(0,t)))}get module(){return this._module}get parent(){return this._parent}error(...e){this._log("error","always",...e)}warn(...e){this._log("warn","always",...e)}info(...e){this._log("info","always",...e)}errorOnce(...e){this._log("error","once",...e)}warnOnce(...e){this._log("warn","once",...e)}infoOnce(...e){this._log("info","once",...e)}errorOncePerTick(...e){this._log("error","oncePerTick",...e)}warnOncePerTick(...e){this._log("warn","oncePerTick",...e)}infoOncePerTick(...e){this._log("info","oncePerTick",...e)}get test(){}static get test(){}static getLogger(e){return e="string"!=typeof e?e.declaredClass:e,i._loggers.get(e)||new i({module:e})}static{this._loggers=new Map}static{this._tickCounter=0}static{this._tickCounterScheduled=!1}static{this._throttlingDisabled=!1}_log(e,t,...r){if(this._matchLevel(e)){if("always"!==t&&!i._throttlingDisabled){const n=function(...e){return(0,o.Wm)(JSON.stringify(e,(e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]"))}(r),a=this._loggedMessages[e].get(n);if("once"===t&&null!=a||"oncePerTick"===t&&a&&a>=i._tickCounter)return;this._loggedMessages[e].set(n,i._tickCounter),i._scheduleTickCounterIncrement()}for(const t of n.A.log.interceptors)if(t(e,this.module,...r))return;this._inheritedWriter()(e,this.module,...r)}}_parentWithMember(e,t){let r=this;for(;null!=r;){const t=r[e];if(null!=t)return t;r=r.parent}return t}_inheritedWriter(){return this._parentWithMember("writer",c)}_matchLevel(e){const t=n.A.log.level||"warn";return s[this._parentWithMember("level",t)]<=s[e]}static _scheduleTickCounterIncrement(){i._tickCounterScheduled||(i._tickCounterScheduled=!0,Promise.resolve().then(()=>{i._tickCounter++,i._tickCounterScheduled=!1}))}}function c(e,t,...r){console[e](`[${(0,a.u3)(t)}]`,...r)}},87811(e,t,r){r.d(t,{A:()=>n});class n{static{this._m=2147483647}static{this._a=48271}static{this._c=0}constructor(e=1){this._seed=e}set seed(e){this._seed=e??Math.random()*n._m}getInt(){return this._seed=(n._a*this._seed+n._c)%n._m,this._seed}getFloat(){return this.getInt()/(n._m-1)}getIntRange(e,t){return Math.round(this.getFloatRange(e,t))}getFloatRange(e,t){const r=t-e;return e+this.getInt()/n._m*r}}},4576(e,t,r){r.d(t,{Am:()=>s,HX:()=>b,Ho:()=>u,Ji:()=>o,MJ:()=>i,Mo:()=>v,Ru:()=>A,TF:()=>O,VO:()=>l,Xj:()=>d,Xy:()=>g,aI:()=>c,iv:()=>f,k4:()=>k,mW:()=>w,qh:()=>m,vW:()=>h,yc:()=>P});var n=r(21818),a=r(87811);const o=1.5;function s(e,t){if(t){const r=[];for(const n of e)r.some(e=>t(e,n))||r.push(n);return r}return Array.from(new Set(e))}function i(e,t,r,n,a,o,s){if(null==e&&null==n)return!0;t=Math.max(0,t),a=Math.max(0,a),r=Math.max(0,r<0?(e?.length??0)+r:r),o=Math.max(0,o<0?(n?.length??0)+o:o);const i=r-t;if(null==e||null==n||i!==o-a)return!1;if(s){for(let r=0;r<i;r++)if(!s(e[t+r],n[a+r]))return!1}else for(let r=0;r<i;r++)if(e[t+r]!==n[a+r])return!1;return!0}function c(e,t,r){return i(e,0,e?.length??0,t,0,t?.length??0,r)}function l(){return(e,t)=>{if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}}function f(e,t,r){let n,a;return r?(n=t.filter(t=>!e.some(e=>r(e,t))),a=e.filter(e=>!t.some(t=>r(t,e)))):(n=t.filter(t=>!e.includes(t)),a=e.filter(e=>!t.includes(e))),{added:n,removed:a}}function d(e){return e&&"number"==typeof e.length}function u(e,t){const r=e.length;if(0===r)return[];const n=[];for(let a=0;a<r;a+=t)n.push(e.slice(a,a+t));return n}function b(e,t,r,n){e.length>r&&(e.length=r);const a=e.length;let o=0,s=a;if(a===r){const r=n(e[a-1],t);if(r<=0||Number.isNaN(r))return}for(;o<s;){const r=o+s>>>1,a=n(e[r],t);a<=0||Number.isNaN(a)?o=r+1:s=r}a===r&&e.pop(),e.splice(o,0,t)}class h{constructor(){this.last=0}}const p=new h;function m(e,t,r,n){n=n||p;const a=Math.max(0,n.last-10);for(let o=a;o<r;++o)if(e[o]===t)return n.last=o,o;const o=Math.min(a,r);for(let r=0;r<o;++r)if(e[r]===t)return n.last=r,r;return-1}function g(e,t,r,a){const o=r??e.length,s=m(e,(0,n.z)(t),o,a);if(-1!==s)return e[s]=e[o-1],null==r&&e.pop(),t}const y=new Set;function w(e,t,r=e.length,n=t.length,a,o){if(0===n||0===r)return r;y.clear();for(let e=0;e<n;++e)y.add(t[e]);a=a||p;const s=Math.max(0,a.last-10);for(let t=s;t<r;++t)if(y.has(e[t])&&(o?.push(e[t]),y.delete(e[t]),e[t]=e[r-1],--r,--t,0===y.size||0===r))return y.clear(),r;for(let t=0;t<s;++t)if(y.has(e[t])&&(o?.push(e[t]),y.delete(e[t]),e[t]=e[r-1],--r,--t,0===y.size||0===r))return y.clear(),r;return y.clear(),r}function v(e){return e?(_.seed=e,()=>_.getFloat()):Math.random}const _=new a.A;function k(e,t){if(!e)return e;const r=v(t);for(let t=e.length-1;t>0;t--){const n=Math.floor(r()*(t+1)),a=e[t];e[t]=e[n],e[n]=a}return e}function O(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}function A(e,t){return null!=e}function P(e){return Array.isArray(e)}},21818(e,t,r){function n(e){return e}r.d(t,{z:()=>n})},51447(e,t,r){r.d(t,{Lx:()=>c,eF:()=>l,eO:()=>i,io:()=>f,u3:()=>d,uW:()=>s});var n=r(44208);const a=new WeakMap;function o(e,t,r=!1){const n=`🛑 DEPRECATED - ${t}`;if(!r)return void e.warn(n);let o=a.get(e);o||(o=new Set,a.set(e,o)),o.has(t)||(o.add(t),e.warn(n))}function s(e,t,r={}){(0,n.A)("esri-deprecation-warnings")&&f(e,`Module: ${d(t)}`,r)}function i(e,t,r={}){if((0,n.A)("esri-deprecation-warnings")){const{moduleName:n}=r;f(e,"Function: "+(n?d(n)+"::":"")+t+"()",r)}}function c(e,t,r={}){if((0,n.A)("esri-deprecation-warnings")){const{moduleName:n}=r;f(e,"Property: "+(n?d(n)+"::":"")+t,r)}}function l(e,t,r={}){(0,n.A)("esri-deprecation-warnings")&&f(e,`Multiple argument constructor: ${t=d(t)}`,{warnOnce:!0,replacement:`new ${t}({ <your properties here> })`,...r})}function f(e,t,r={}){if((0,n.A)("esri-deprecation-warnings")){const{replacement:n,version:a,see:s,warnOnce:i}=r;let c=t;if(n&&(c+=`\n\t🛠️ Replacement: ${n}`),a&&(c+=`\n\t⚙️ Version: ${a}`),s)if(Array.isArray(s)){c+="\n\t🔗 See for more details:";for(const e of s)c+=`\n\t\t${e}`}else c+=`\n\t🔗 See ${s} for more details.`;o(e,c,i)}}function d(e){return e.startsWith("esri.")?e.replace("esri.","@arcgis/core/").replaceAll(".","/"):e}},37955(e,t,r){r.d(t,{Oo:()=>i,on:()=>s,wb:()=>a});var n=r(36563);function a(e){return function(e){return null!=e&&"object"==typeof e&&"on"in e&&"function"==typeof e.on}(e)||o(e)}function o(e){return null!=e&&"object"==typeof e&&"addEventListener"in e&&"function"==typeof e.addEventListener}function s(e,t,r){if(!a(e))throw new TypeError("target is not a Evented or EventTarget object");return o(e)?function(e,t,r,a){if(Array.isArray(t)){const o=t.slice();for(const t of o)e.addEventListener(t,r,a);return(0,n.hA)(()=>{for(const t of o)e.removeEventListener(t,r,a)})}return e.addEventListener(t,r,a),(0,n.hA)(()=>e.removeEventListener(t,r,a))}(e,t,r):e.on(t,r)}function i(e,t,r){if(!a(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,r);const n=s(e,t,t=>{n.remove(),r.call(e,t)});return n}},36563(e,t,r){r.d(t,{hA:()=>a,rE:()=>s,vE:()=>o});const n={remove:()=>{}};function a(e){return e?{remove(){e&&(e(),e=void 0)}}:n}function o(e){return a(()=>function(e){e.forEach(e=>e?.remove())}(e))}function s(e){return a(()=>e?.abort())}},44208(e,t,r){r.d(t,{A:()=>o});const n=globalThis,a={...n.esriConfig?.has};function o(e){return"function"==typeof a[e]?a[e]=a[e](n):a[e]}o.add=(e,t,r,n)=>{(n||void 0===a[e])&&(a[e]=t),r&&o(e)},o.cache=a,o.add("big-integer-warning-enabled",!0),o.add("esri-deprecation-warnings",!0),o.add("esri-tests-disable-screenshots",!1),o.add("esri-tests-use-full-window",!1),o.add("esri-tests-post-to-influx",!0),o.add("esri-cim-animations-enable-status","enabled"),o.add("esri-cim-animations-spotlight",!1),o.add("esri-cim-animations-freeze-time",!1),(()=>{o.add("host-webworker",void 0!==n.WorkerGlobalScope&&self instanceof n.WorkerGlobalScope);const e="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(o.add("host-browser",e),o.add("host-node",!("object"!=typeof n.process||!n.process.versions?.node||!n.process.versions.v8)),o.add("dom",e),o("host-browser")){const e=navigator,t=e.userAgent,r=e.appVersion,n=parseFloat(r);if(o.add("wp",parseFloat(t.split("Windows Phone")[1])||void 0),o.add("msapp",parseFloat(t.split("MSAppHost/")[1])||void 0),o.add("khtml",r.includes("Konqueror")?n:void 0),o.add("edge",parseFloat(t.split("Edge/")[1])||void 0),o.add("opr",parseFloat(t.split("OPR/")[1])||void 0),o.add("webkit",!o("wp")&&!o("edge")&&parseFloat(t.split("WebKit/")[1])||void 0),o.add("chrome",!o("edge")&&!o("opr")&&parseFloat(t.split("Chrome/")[1])||void 0),o.add("android",!o("wp")&&parseFloat(t.split("Android ")[1])||void 0),o.add("safari",!r.includes("Safari")||o("wp")||o("chrome")||o("android")||o("edge")||o("opr")?void 0:parseFloat(r.split("Version/")[1])),o.add("mac",r.includes("Macintosh")),!o("wp")&&/(iPhone|iPod|iPad)/.test(t)){const e=RegExp.$1.replace(/P/,"p"),r=/OS ([\d_]+)/.test(t)?RegExp.$1:"1",n=parseFloat(r.replace(/_/,".").replaceAll("_",""));o.add(e,n),o.add("ios",n)}o("webkit")||(!t.includes("Gecko")||o("wp")||o("khtml")||o("edge")||o.add("mozilla",n),o("mozilla")&&o.add("ff",parseFloat(t.split("Firefox/")[1]||t.split("Minefield/")[1])||void 0))}})(),(()=>{if(n.navigator){const e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),r=/iPhone/i.test(e);t&&o.add("esri-mobile",t),r&&o.add("esri-iPhone",r),o.add("esri-geolocation",!!navigator.geolocation)}o.add("esri-wasm","WebAssembly"in n),o.add("esri-performance-mode-frames-between-render",20),o.add("esri-force-performance-mode",!1),o.add("esri-shared-array-buffer",()=>{const e="SharedArrayBuffer"in n,t=!1===n.crossOriginIsolated;return e&&!t}),o.add("wasm-simd",()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))),o.add("esri-atomics","Atomics"in n),o.add("esri-workers","Worker"in n),o.add("web-feat:cache","caches"in n),o.add("esri-workers-arraybuffer-transfer",!o("safari")||Number(o("safari"))>=12),o.add("min-workers-pool-size",2),o.add("max-workers-pool-size",o("esri-mobile")?3:8),o.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),o.add("featurelayer-simplify-payload-size-factors",[1,1,4]),o.add("featurelayer-animation-enabled",!0),o.add("featurelayer-snapshot-enabled",!0),o.add("featurelayer-snapshot-initial-tolerance",0),o.add("featurelayer-snapshot-point-min-threshold",8e4),o.add("featurelayer-snapshot-point-max-threshold",4e5),o.add("featurelayer-snapshot-multipoint-min-threshold",2e4),o.add("featurelayer-snapshot-multipoint-max-threshold",1e5),o.add("featurelayer-snapshot-polygon-min-threshold",2e3),o.add("featurelayer-snapshot-polygon-max-threshold",2e3),o.add("featurelayer-snapshot-polyline-min-threshold",2e3),o.add("featurelayer-snapshot-polyline-max-threshold",2e3),o.add("featurelayer-snapshot-max-vertex-count",25e4),o.add("featurelayer-snapshot-non-hosted-exceedslimit-enabled",!0),o.add("featurelayer-snapshot-concurrency",4),o.add("featurelayer-snapshot-allow-editable",!1),o.add("featurelayer-snapshot-coverage",.1),o.add("featurelayer-query-max-depth",4),o.add("featurelayer-query-max-page-size",8e3),o.add("featurelayer-query-pausing-enabled",!1),o.add("featurelayer-query-tile-concurrency",4),o.add("featurelayer-query-tile-max-features",6e5),o.add("featurelayer-advanced-symbols",!1),o.add("featurelayer-pbf",!0),o.add("featurelayer-pbf-statistics",!1),o.add("featurelayer-pbf-true-curves",!0),o.add("feature-layers-workers",!0),o.add("feature-polyline-generalization-factor",1),o.add("featurelayer-relative-time-queries-enabled",!0),o.add("featurelayer-relative-time-queries-bin-window-public",1),o.add("featurelayer-relative-time-queries-bin-window-private",60),o.add("parquetlayer-full-query-feature-count",2e4),o.add("parquetlayer-hittest-max-feature-count",1),o.add("parquetlayer-persistence-enabled",!1),o.add("parquetlayer-cache-enabled",!0),o.add("mapview-transitions-duration",200),o.add("mapview-essential-goto-duration",200),o.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),o.add("mapserver-pbf-version-support",10.81),o.add("mapservice-popup-identify-max-tolerance",20),o.add("request-queue-concurrency-global",50),o.add("request-queue-concurrency-hosted",16),o.add("request-queue-concurrency-non-hosted",10),o.add("curve-densification-coarse-segments",128),o.add("curve-densification-max-segments",2e3),o.add("curve-densification-min-segments",3),o.add("curve-densification-pixel-deviation",.5),o.add("view-readyState-waiting-delay",1e3),o.add("gradient-depth-bias",.01),o.add("gradient-depth-epsilon",1e-8),o.add("enable-feature:analysis-drawtool-line-of-sight",!1),o.add("enable-feature:analysis-drawtool-line-of-sight-placement-visuals",!1),o.add("enable-feature:esri-compress-textures",!0),o.add("enable-feature:analysis-new-viewshed-tool",!1),o.add("enable-feature:basemap-groundlayers",!0),o.add("enable-feature:im-shading",!0),o.add("enable-feature:im-vertex-normals",!0),!o("host-webworker")&&o("host-browser")&&(o.add("esri-csp-restrictions",()=>{try{new Function}catch{return!0}return!1}),o.add("esri-url-encodes-apostrophe",()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")}))})()},4718(e,t,r){r.d(t,{Nb:()=>c,TU:()=>i,aI:()=>b,gh:()=>h,o8:()=>s,oy:()=>o});var n=r(4576),a=r(34275);function o(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&o(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&void 0===e[r]&&delete e[r];return e}function s(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=u(e);if(null!=t)return t;if(c(e))return e.clone();if(l(e))return e.map(s);if(f(e))throw new Error("Trying to clone an unclonable Accessor instance");const r={};for(const t of Object.getOwnPropertyNames(e))r[t]=s(e[t]);return r}function i(e,t){if(!e||"object"!=typeof e||"function"==typeof e||"HTMLElement"in globalThis&&e instanceof HTMLElement)return e;const r=u(e);if(null!=r)return r;if(l(e)){let r=!0;const n=e.map(e=>{const n=i(e,t);return null!=e&&null==n&&(r=!1),n});return r?n:null}if(c(e))return e.clone(t);if(e instanceof File||e instanceof Blob)return e;if(f(e))return null;const n=new(0,Object.getPrototypeOf(e).constructor);for(const t of Object.getOwnPropertyNames(e)){const r=e[t],a=i(r);if(null!=r&&null==a)return null;n[t]=a}return n}function c(e){return"function"==typeof e.clone}function l(e){return"function"==typeof e.map&&"function"==typeof e.forEach}function f(e){return"function"==typeof e.notifyChange&&"function"==typeof e.watch}function d(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){if((0,a.dz)(e)||(0,a.mg)(e)||(0,a.UR)(e)||(0,a.IY)(e)||(0,a.jq)(e)||(0,a._G)(e)||(0,a.XJ)(e)||(0,a.vZ)(e)||(0,a.aI)(e))return e.slice();if(e instanceof Date)return new Date(e);if(e instanceof ArrayBuffer)return e.slice(0,e.byteLength);if(e instanceof Map){const t=new Map;for(const[r,n]of e)t.set(r,s(n));return t}if(e instanceof Set){const t=new Set;for(const r of e)t.add(s(r));return t}return null}function b(e,t){return e===t||"number"==typeof e&&isNaN(e)&&"number"==typeof t&&isNaN(t)||"function"==typeof e?.getTime&&"function"==typeof t?.getTime&&e.getTime()===t.getTime()||!1}function h(e,t){return e===t||(null==e||"string"==typeof e?e===t:"number"==typeof e?e===t||"number"==typeof t&&isNaN(e)&&isNaN(t):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():Array.isArray(e)?Array.isArray(t)&&(0,n.aI)(e,t):e instanceof Set?t instanceof Set&&function(e,t){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}(e,t):e instanceof Map?t instanceof Map&&function(e,t){if(e.size!==t.size)return!1;for(const[r,n]of e){const e=t.get(r);if(e!==n||void 0===e&&!t.has(r))return!1}return!0}(e,t):!!d(e)&&d(t)&&function(e,t){if(null===e||null===t)return!1;const r=Object.keys(e);if(null===t||Object.keys(t).length!==r.length)return!1;for(const n of r)if(e[n]!==t[n]||!Object.prototype.hasOwnProperty.call(t,n))return!1;return!0}(e,t))}},97768(e,t,r){function n(e,t){if(null==e)throw new Error(t??"value is None")}function a(e){return e&&!e.destroyed&&e.destroy(),null}function o(e){return e?.dispose(),null}function s(e){return e?.remove(),null}function i(e){return e?.abort(),null}function c(e){return e?.release(),null}function l(e,t,r){return null!=e&&null!=t?null!=r?r(e,t):e.equals(t):e===t}function f(e,t){let r;return e.some((e,n)=>(r=t(e,n),null!=r)),r??void 0}r.d(t,{CM:()=>l,DC:()=>i,Gz:()=>c,Lw:()=>n,Pb:()=>f,WD:()=>o,pR:()=>a,xt:()=>s})},93637(e,t,r){r.d(t,{$N:()=>a,a4:()=>d,i7:()=>f,i8:()=>i,sM:()=>s,wc:()=>o});var n=r(4718);function a(e,t,r=!1){return l(e,t,r)}function o(e,t){if(null!=t)return t[e]||c(e.split("."),!1,t)}function s(e,t,r){const n=e.split("."),a=n.pop(),o=c(n,!0,r);o&&a&&(o[a]=t)}function i(e,t){if(null==e&&null==t)return!1;if(null==e)return!0;if(null==t)return!0;if("object"==typeof e){if(Array.isArray(e)){const r=t;if(e.length!==r.length)return!0;for(let t=0;t<e.length;t++)if(i(e[t],r[t]))return!0;return!1}if(Object.keys(e).length!==Object.keys(t).length)return!0;for(const r in e)if(i(e[r],t[r]))return!0;return!1}return e!==t}function c(e,t,r){let n=r;for(const r of e){if(null==n)return;if(!(r in n)){if(!t)return;n[r]={}}n=n[r]}return n}function l(e,t,r){return t?Object.keys(t).reduce((e,a)=>{if("__proto__"===a)return e;let o=e[a],s=t[a];return o===s?e:void 0===o?(e[a]=(0,n.o8)(s),e):(Array.isArray(s)||Array.isArray(e)?(o=o?Array.isArray(o)?e[a]=o.slice():e[a]=[o]:e[a]=[],s&&(Array.isArray(s)||(s=[s]),r?s.forEach(e=>{o.includes(e)||o.push(e)}):e[a]=s.slice())):s&&"object"==typeof s?e[a]=l(o,s,r):e.hasOwnProperty(a)&&!t.hasOwnProperty(a)||(e[a]=s),e)},e||{}):e}function f(e,t){for(const r of Object.entries(e))if(t===r[1])return r[0]}function d(e,t){return Object.values(e).includes(t)}},17676(e,t,r){r.d(t,{$X:()=>k,G4:()=>l,Lx:()=>g,Mq:()=>c,NK:()=>s,NO:()=>x,NY:()=>b,Ol:()=>w,Pl:()=>v,QP:()=>f,QZ:()=>m,Te:()=>i,YL:()=>_,hn:()=>P,jH:()=>d,nA:()=>y,qr:()=>h,sg:()=>A,u7:()=>u,z7:()=>O,zf:()=>p});var n=r(49186),a=r(37955),o=(r(53966),r(97768));function s(e="Aborted"){return new n.A("AbortError",e)}function i(e,t="Aborted"){if(l(e))throw s(t)}function c(e){return e instanceof AbortSignal?e:e?.signal??void 0}function l(e){const t=c(e);return null!=t&&t.aborted}function f(e){if(p(e))throw e}function d(e){if(!p(e))throw e}function u(e,t){const r=c(e);if(null!=r){if(!r.aborted)return(0,a.Oo)(r,"abort",()=>t());t()}}function b(e,t){const r=c(e);if(null!=r)return i(r),(0,a.Oo)(r,"abort",()=>t(s()))}function h(e,t){return null==c(t)?e:new Promise((r,n)=>{let a=u(t,()=>n(s()));const i=()=>{a=(0,o.xt)(a)};e.then(i,i),e.then(r,n)})}function p(e){return"AbortError"===e?.name}async function m(e){try{return await e}catch(e){if(!p(e))throw e;return}}async function g(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e),r=t.map(t=>e[t]),n=await g(r),a={};return t.map((e,t)=>a[e]=n[t]),a}const t=e;return Promise.allSettled(t).then(e=>Array.from(t,(t,r)=>{const n=e[r];return"fulfilled"===n.status?{promise:t,value:n.value}:{promise:t,error:n.reason}}))}async function y(e){return(await Promise.allSettled(e)).filter(e=>"fulfilled"===e.status).map(e=>e.value)}async function w(e){return(await Promise.allSettled(e)).filter(e=>"rejected"===e.status).map(e=>e.reason)}function v(e,t=void 0,r){const n=new AbortController;return u(r,()=>n.abort()),new Promise((r,a)=>{let o=setTimeout(()=>{o=0,r(t)},e);u(n,()=>{o&&(clearTimeout(o),a(s()))})})}function _(e,t){const r=new AbortController,n=setTimeout(()=>r.abort(),t);return u(e,()=>{r.abort(),clearTimeout(n)}),{...e,signal:r.signal}}function k(e){return e&&"function"==typeof e.then}function O(e){return k(e)?e:Promise.resolve(e)}function A(e,t=-1){let r,n,a,o,i=null;const c=(...l)=>{if(r){n=l,o&&o.reject(s()),o=Promise.withResolvers();const e=o.promise;if(i){const e=i;i=null,e.abort()}return e}if(a=o||Promise.withResolvers(),o=null,t>0){const n=new AbortController;r=O(e(...l,n.signal));const a=r;v(t).then(()=>{r===a&&(o?n.abort():i=n)})}else r=1,r=O(e(...l));const f=()=>{const e=n;n=a=r=i=null,null!=e&&c(...e)},d=r,u=a;return d.then(f,f),d.then(u.resolve,u.reject),u.promise};return c}function P(e,t){t.then(e.resolve,e.reject)}async function x(e){await Promise.resolve(),i(e)}},799(e,t,r){r.d(t,{Cj:()=>c,HC:()=>s,V2:()=>i,Wm:()=>l,_e:()=>u,xq:()=>f});var n=r(93637);const a=/\{([^}]+)\}/g;function o(e){return e??""}function s(e,t){return t?e.replaceAll(a,"object"==typeof t?(e,r)=>o((0,n.wc)(r,t)):(e,r)=>o(t(r))):e}function i(e,t){return e.replaceAll(/\$\{([^\s:}]*)(?::([^\s:}]+))?\}/g,(e,r)=>""===r?"$":((0,n.wc)(r,t)??"").toString())}function c(e,t){return e.replaceAll(/([.$?*|{}()[\]\\/+\-^])/g,e=>t?.includes(e)?e:`\\${e}`)}function l(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}function f(e,t=0){let r=3735928559^t,n=1103547991^t;for(let t,a=0;a<e.length;a++)t=e.charCodeAt(a),r=Math.imul(r^t,2654435761),n=Math.imul(n^t,1597334677);return r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)}let d;function u(e){return d??=new DOMParser,d.parseFromString(e||"","text/html").body.innerText||""}},12195(e,t,r){function n(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}r.d(t,{W:()=>n})},34275(e,t,r){function n(e){return e instanceof ArrayBuffer}function a(e){return"Int8Array"===e?.constructor?.name}function o(e){return"Uint8Array"===e?.constructor?.name}function s(e){return"Uint8ClampedArray"===e?.constructor?.name}function i(e){return"Int16Array"===e?.constructor?.name}function c(e){return"Uint16Array"===e?.constructor?.name}function l(e){return"Int32Array"===e?.constructor?.name}function f(e){return"Uint32Array"===e?.constructor?.name}function d(e){return"Float16Array"===e?.constructor?.name}function u(e){return"Float32Array"===e?.constructor?.name}function b(e){return"Float64Array"===e?.constructor?.name}function h(e){return"buffer"in e}r.d(t,{IY:()=>i,JI:()=>m,LW:()=>d,PI:()=>w,UR:()=>s,XJ:()=>f,_G:()=>l,a3:()=>y,aI:()=>b,dk:()=>g,dz:()=>a,h2:()=>v,iu:()=>h,jq:()=>c,mg:()=>o,mw:()=>n,vZ:()=>u,y9:()=>p});const p=1024;function m(e){return b(e)||u(e)||l(e)||i(e)||a(e)}function g(e){return b(e)||u(e)}function y(e){return b(e)?179769e303:d(e)?65504:u(e)?3402823e32:f(e)?4294967295:c(e)?65535:o(e)||s(e)?255:l(e)?2147483647:i(e)?32767:a(e)?127:256}const w=-32768,v=-2147483648},84952(e,t,r){r.d(t,{$1:()=>Y,$z:()=>G,An:()=>x,BQ:()=>ae,DB:()=>K,FL:()=>J,FX:()=>U,Hg:()=>te,Il:()=>ue,Ln:()=>me,N9:()=>ne,S8:()=>H,T1:()=>he,UC:()=>be,V1:()=>B,Xq:()=>A,Zo:()=>_e,_0:()=>Oe,a6:()=>ve,b8:()=>q,e7:()=>de,fj:()=>D,gd:()=>P,hf:()=>pe,lJ:()=>X,lM:()=>ie,m3:()=>se,nM:()=>fe,oP:()=>V,oy:()=>I,r$:()=>ee,rs:()=>we,s0:()=>v,s2:()=>z,sC:()=>L,s_:()=>j,tk:()=>re,ut:()=>T,w8:()=>Q,x0:()=>M,xw:()=>ke,yM:()=>C,zf:()=>S,zi:()=>ye,zs:()=>E});var n=r(92602),a=r(4576),o=r(49186),s=r(53966),i=r(12195),c=r(39131),l=r(26306);const f=n.A.request,d="esri/config: esriConfig.request.proxyUrl is not set.",u=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,b=/^\s*http:/i,h=/^\s*https:/i,p=/^\s*file:/i,m=/:\d+$/,g=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,y=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),w=new RegExp("^((([^[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^[:]*))(:([0-9]+))?$");class v{constructor(e=""){this.uri=e,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let t=this.uri.match(y);this.scheme=t[2]||(t[1]?"":null),this.authority=t[4]||(t[3]?"":null),this.path=t[5],this.query=t[7]||(t[6]?"":null),this.fragment=t[9]||(t[8]?"":null),null!=this.authority&&(t=this.authority.match(w),this.user=t[3]||null,this.password=t[4]||null,this.host=t[6]||t[7],this.port=t[9]||null)}toString(){return this.uri}}const _={};let k=new v(n.A.applicationUrl);let O=function(){const e=k.path,t=e.slice(0,e.lastIndexOf("/")+1);return`${k.scheme}://${k.host}${null!=k.port?`:${k.port}`:""}${t}`}();const A=()=>k,P=()=>O;function x(e){if(!e)return null;const t={path:null,query:null},r=new v(e),n=e.indexOf("?");return null===r.query?t.path=e:(t.path=e.slice(0,n),t.query=S(r.query)),r.fragment&&(t.hash=r.fragment,null===r.query&&(t.path=t.path.slice(0,t.path.length-(r.fragment.length+1)))),t}function S(e){const t=e.split("&"),r={};for(const e of t){if(!e)continue;const t=e.indexOf("=");let n,a;t<0?(n=decodeURIComponent(e),a=""):(n=decodeURIComponent(e.slice(0,t)),a=decodeURIComponent(e.slice(t+1)));let o=r[n];"string"==typeof o&&(o=r[n]=[o]),Array.isArray(o)?o.push(a):r[n]=a}return r}function M(e,t){return e?t&&"function"==typeof t?Object.keys(e).map(r=>encodeURIComponent(r)+"="+encodeURIComponent(t(r,e[r]))).join("&"):Object.keys(e).map(r=>{const n=e[r];if(null==n)return"";const a=encodeURIComponent(r)+"=",o=t?.[r];return o?a+encodeURIComponent(o(n)):Array.isArray(n)?n.map(e=>(0,i.W)(e)?a+encodeURIComponent(JSON.stringify(e)):a+encodeURIComponent(e)).join("&"):(0,i.W)(n)?a+encodeURIComponent(JSON.stringify(n)):a+encodeURIComponent(n)}).filter(e=>e).join("&"):""}function j(e=!1){let t,r=f.proxyUrl;if("string"==typeof e){t=se(e);const n=E(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw s.A.getLogger("esri.core.urlUtils").warn(d),new o.A("urlUtils:proxy-not-set",d);return t&&ce()&&(r=ie(r)),x(r)}function C(e,t=!1){const r=E(e);let n,a;if(r){const e=N(r.proxyUrl);n=e.path,a=e.query?S(e.query):null}else if(t){const t=j(e);n=t.path,a=t.query}if(n){const t=x(e);e=n+"?"+t.path;const r=M({...a,...t.query});r&&(e=`${e}?${r}`)}return e}const $={path:"",query:""};function N(e){const t=e.indexOf("?");return-1!==t?($.path=e.slice(0,t),$.query=e.slice(t+1)):($.path=e,$.query=null),$}function W(e){return(e=le(e=ue(e=N(e).path),!0)).toLowerCase()}function I(e){const t={proxyUrl:e.proxyUrl,urlPrefix:W(e.urlPrefix)},r=f.proxyRules,n=t.urlPrefix;let a=r.length;for(let e=0;e<r.length;e++){const t=r[e].urlPrefix;if(n.startsWith(t)){if(n.length===t.length)return-1;a=e;break}t.startsWith(n)&&(a=e+1)}return r.splice(a,0,t),a}function E(e){const t=f.proxyRules,r=W(e);for(let e=0;e<t.length;e++)if(r.startsWith(t[e].urlPrefix))return t[e]}function q(e,t){if(!e||!t)return!1;e=R(e),t=R(t);const r=(0,c.py)(e),n=(0,c.py)(t);return null!=r&&null!=n?r.portalHostname===n.portalHostname:null==r&&null==n&&U(e,t,!0)}function T(e,t){return e=R(e),t=R(t),le(e)===le(t)}function R(e){const t=(e=H(e)).indexOf("/sharing");return t>0?e.slice(0,t):e.replace(/\/+$/,"")}function L(e,t=f.interceptors){const r=t=>t instanceof RegExp?t.test(e):"string"==typeof t?e.startsWith(t):null==t;if(t)for(const e of t)if(Array.isArray(e.urls)){if(e.urls.some(r))return e}else if(r(e.urls))return e;return null}function U(e,t,r=!1){if(!e||!t)return!1;const n=ge(e),a=ge(t);return!(!r&&n.scheme!==a.scheme)&&null!=n.host&&null!=a.host&&n.host.toLowerCase()===a.host.toLowerCase()&&n.port===a.port}function J(e){if("string"==typeof e){if(!V(e))return!0;e=ge(e)}if(U(e,k))return!0;const t=f.trustedServers||[];for(let r=0;r<t.length;r++){const n=F(t[r]);for(let t=0;t<n.length;t++)if(U(e,n[t]))return!0}return!1}function F(e){return _[e]||(oe(e)||ae(e)?_[e]=[new v(z(e))]:_[e]=[new v(`http://${e}`),new v(`https://${e}`)]),_[e]}function z(e,t=O,r){return ae(e)?r?.preserveProtocolRelative?e:"http"===k.scheme&&k.authority===G(e).slice(2)?`http:${e}`:`https:${e}`:oe(e)?e:D(e.startsWith("/")?function(e){const t=e.indexOf("//"),r=e.indexOf("/",t+2);return-1===r?e:e.slice(0,r)}(t):t,e)}function B(e,t=O,r){if(null==e||!V(e))return e;const n=H(e),a=n.toLowerCase(),o=H(t).toLowerCase().replace(/\/+$/,""),s=r?H(r).toLowerCase().replace(/\/+$/,""):null;if(s&&!o.startsWith(s))return e;const i=(e,t,r)=>-1===(r=e.indexOf(t,r))?e.length:r;let c=i(a,"/",a.indexOf("//")+2),l=-1;for(;a.slice(0,c+1)===o.slice(0,c)+"/"&&(l=c+1,c!==a.length);)c=i(a,"/",c+1);if(-1===l)return e;if(s&&l<s.length)return e;e=n.slice(l);const f=o.slice(l-1).replaceAll(/[^/]+/g,"").length;if(f>0)for(let t=0;t<f;t++)e=`../${e}`;else e=`./${e}`;return e}function H(e){return function(e){const t=f.httpsDomains;if(!function(e){return null!=e&&b.test(e)||"http"===k.scheme&&ae(e)}(e))return e;const r=e.indexOf("/",7);let n;if(n=-1===r?e:e.slice(0,r),n=n.toLowerCase().slice(7),m.test(n)){if(!n.endsWith(":80"))return e;n=n.slice(0,-3),e=e.replace(":80","")}return"http"===k.scheme&&n===k.authority&&!g.test(e)||(ce()&&n===k.authority||t&&t.some(e=>n===e||n.endsWith(`.${e}`))||ce()&&!E(e))&&(e=ie(e)),e}(e=function(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}(e=function(e){if(/^https?:\/\//i.test(e)){const t=N(e);e=(e=t.path.replaceAll(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}(e=z(e=e.trim()))))}function D(...e){const t=e.filter(a.Ru);if(!t?.length)return;const r=[];if(V(t[0])){const e=t[0],n=e.indexOf("//");-1!==n&&(r.push(e.slice(0,n+1)),function(e){return null!=e&&p.test(e)}(t[0])&&(r[0]+="/"),t[0]=e.slice(n+2))}else t[0].startsWith("/")&&r.push("");const n=t.reduce((e,t)=>t?e.concat(t.split("/")):e,[]);for(let e=0;e<n.length;e++){const t=n[e];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&e===n.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function G(e,t=!1){if(null==e||Q(e)||K(e))return null;let r=e.indexOf("://");if(-1===r&&ae(e))r=2;else{if(-1===r)return null;r+=3}const n=e.indexOf("/",r);return-1!==n&&(e=e.slice(0,n)),t&&(e=le(e,!0)),e}function V(e){return ae(e)||oe(e)}function Q(e){return null!=e&&e.startsWith("blob:")}function K(e){return null!=e&&e.startsWith("data:")}function X(e){const t=ee(e);return t?.isBase64?(0,l.M)(t.data):null}function Y(e){return(0,l.Y)(e).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}const Z=/^data:(.*?)(;base64)?,(.*)$/;function ee(e){const t=e.match(Z);if(!t)return null;const[,r,n,a]=t;return{mediaType:r,isBase64:!!n,data:a}}function te(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}async function re(e){return(await fetch(e)).blob()}function ne(e){const t=X(e);if(!t)return null;const r=ee(e);return new Blob([t],{type:r.mediaType})}function ae(e){return null!=e&&e.startsWith("/")&&"/"===e[1]}function oe(e){return null!=e&&u.test(e)}function se(e){return null!=e&&h.test(e)||"https"===k.scheme&&ae(e)}function ie(e){return ae(e)?`https:${e}`:e.replace(b,"https:")}function ce(){return"https"===k.scheme}function le(e,t=!1){return ae(e)?e.slice(2):(e=e.replace(u,""),t&&e.length>1&&e.startsWith("/")&&"/"===e[1]&&(e=e.slice(2)),e)}function fe(e){let t=0;if(V(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function de(e,t){if(!e)return"";const r=x(e).path.replace(/\/+$/,""),n=r.slice(r.lastIndexOf("/")+1);if(!t?.length)return n;const a=new RegExp(`\\.(${t.join("|")})$`,"i");return n.replace(a,"")}function ue(e){return e.endsWith("/")?e:`${e}/`}function be(e){return e.replace(/\/+$/,"")}function he(e,t,r){if(!(t&&r&&e&&V(e)))return e;const n=e.indexOf("//"),a=e.indexOf("/",n+2),o=e.indexOf(":",n+2),s=Math.min(a<0?e.length:a,o<0?e.length:o);return e.slice(n+2,s).toLowerCase()!==t.toLowerCase()?e:`${e.slice(0,n+2)}${r}${e.slice(s)}`}function pe(e,t){const r=new URL(e);return r.host=t,r.port&&!m.test(t)&&(r.port=""),r.toString()}function me(e){return new URL(e).host}function ge(e){return"string"==typeof e?new v(z(e)):(e.scheme||(e.scheme=k.scheme),e)}function ye(e,t){const r=x(e),n=Object.keys(r.query||{});return n.length>0&&t&&t.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${n.join(", ")}.`),r.path}function we(e,t,r){const n=x(e),a=n.query||{};return a[t]=String(r),`${n.path}?${M(a)}`}function ve(e,t){if(!t)return e;const r=x(e),n=r.query||{};for(const[e,r]of Object.entries(t))null!=r&&(n[e]=r);const a=M(n);return a?`${r.path}?${a}`:r.path}function _e(e){if(null==e)return null;const t=e.match(Ae);return t?t[2]:null}function ke(e){if(null==e)return null;const t=e.match(Ae);return t?{path:t[1],extension:t[2]}:{path:e,extension:null}}async function Oe(e){return"string"==typeof e?ee(e)??{data:e}:new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(ee(n.result)),n.onerror=e=>r(e)})}const Ae=/([^.]*)\.([^/]*)$/},52268(e,t,r){function n(e,t){return new Proxy({},{get:(r,n,a)=>(...r)=>{let a,o;const s=r[r.length-1];return function(e){return"object"==typeof e&&!Array.isArray(e)&&null!=e&&("signal"in e||"transferList"in e||0===Object.keys(e).length)}(s)&&(a=s.signal,o=s.transferList,r.pop()),e.apply(t?`${t}.${n.toString()}`:n.toString(),r,{transferList:o,signal:a})}})}r.d(t,{L:()=>n})},61322(e,t,r){r.r(t),r.d(t,{default:()=>v});var n=r(70333),a=r(49186),o=r(37955),s=r(36563),i=r(97768),c=r(17676),l=r(52268);const f={CSVSourceWorker:()=>Promise.all([r.e(6408),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(708),r.e(9696),r.e(4800),r.e(2031),r.e(5752),r.e(8815),r.e(2188)]).then(r.bind(r,25209)),EdgeProcessingWorker:()=>Promise.all([r.e(1843),r.e(6661),r.e(433)]).then(r.bind(r,71936)),ElevationSamplerWorker:()=>Promise.all([r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(2031),r.e(4259)]).then(r.bind(r,38419)),FeaturePipelineWorker:()=>Promise.all([r.e(6408),r.e(4050),r.e(9953),r.e(8303),r.e(1956),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(893),r.e(708),r.e(9696),r.e(4800),r.e(2031),r.e(5752),r.e(8815),r.e(7273),r.e(7733),r.e(2649),r.e(3383),r.e(4063),r.e(5458),r.e(9650)]).then(r.bind(r,37269)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(6408),r.e(1956),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(893),r.e(708),r.e(9696),r.e(4800),r.e(2031),r.e(5752),r.e(8815),r.e(4063),r.e(88)]).then(r.bind(r,20401)),FlowWorker:()=>Promise.all([r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(9616)]).then(r.bind(r,49616)),GaussianSplatSortWorker:()=>r.e(5856).then(r.bind(r,35856)),GeometryWorker:()=>Promise.all([r.e(6042),r.e(1878),r.e(8885),r.e(5756),r.e(3299),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(5151)]).then(r.bind(r,55912)),GeoJSONSourceWorker:()=>Promise.all([r.e(6408),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(708),r.e(9696),r.e(4800),r.e(2031),r.e(5752),r.e(8815),r.e(847)]).then(r.bind(r,71202)),IntegratedMesh3DTilesLayerWorker:()=>Promise.all([r.e(1843),r.e(4066)]).then(r.bind(r,77214)),LercWorker:()=>r.e(7087).then(r.bind(r,57087)),Lyr3DWorker:()=>Promise.all([r.e(2741),r.e(2772)]).then(r.bind(r,72772)),MemorySourceWorker:()=>Promise.all([r.e(6408),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(708),r.e(9696),r.e(4800),r.e(2031),r.e(5752),r.e(8815),r.e(7229)]).then(r.bind(r,29432)),PBFDecoderWorker:()=>Promise.all([r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(9078)]).then(r.bind(r,39078)),PanoramicMeshWorker:()=>Promise.all([r.e(9466),r.e(5482),r.e(4314)]).then(r.bind(r,96982)),ParquetSourceWorker:()=>Promise.all([r.e(6408),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(708),r.e(9696),r.e(4800),r.e(2031),r.e(5752),r.e(8815),r.e(7733),r.e(3383),r.e(7125)]).then(r.bind(r,48459)),PointCloudWorker:()=>Promise.all([r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(7005),r.e(3290),r.e(7984),r.e(3846)]).then(r.bind(r,64798)),RasterWorker:()=>Promise.all([r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(8251),r.e(7373),r.e(9235),r.e(1493)]).then(r.bind(r,63966)),SceneLayerSnappingSourceWorker:()=>Promise.all([r.e(9466),r.e(1843),r.e(6661),r.e(1448)]).then(r.bind(r,56780)),SceneLayerWorker:()=>Promise.all([r.e(6408),r.e(9953),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(3586)]).then(r.bind(r,94715)),TextureCompressionWorker:()=>Promise.all([r.e(2741),r.e(5902)]).then(r.bind(r,95902)),WFSSourceWorker:()=>Promise.all([r.e(6408),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(708),r.e(9696),r.e(4800),r.e(2031),r.e(5752),r.e(8815),r.e(4794)]).then(r.bind(r,33771)),WorkerTileHandler:()=>Promise.all([r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(7273),r.e(5013),r.e(9981)]).then(r.bind(r,36849)),arcadeGeometryOperatorsWorker:()=>Promise.all([r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(5750)]).then(r.bind(r,1123)),statsWorker:()=>Promise.all([r.e(6408),r.e(7865),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8815),r.e(4560),r.e(5220)]).then(r.bind(r,26412)),ImageMeasurementWorker:()=>Promise.all([r.e(6408),r.e(6042),r.e(1878),r.e(8885),r.e(5756),r.e(3299),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(4050),r.e(3910),r.e(9953),r.e(8303),r.e(1733),r.e(1956),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(893),r.e(6231),r.e(4800),r.e(812),r.e(8815),r.e(7016),r.e(8251),r.e(3356),r.e(1695),r.e(7598),r.e(1775)]).then(r.bind(r,68747))};var d=r(8341),u=r(18357);const{CLOSE:b,ABORT:h,INVOKE:p,RESPONSE:m,OPEN_PORT:g,ON:y}=d.Go;class w{constructor(e){this._invoke=e,this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._timer=null,this._process=this._process.bind(this)}push(e){e.type===h?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class v{static{this.kernelInfo={buildDate:u.$,fullVersion:n.ol,revision:u.u}}static{this.clients=new Map}static connect(e,t){const r=new MessageChannel;let n;n="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const a=new v(r.port1,{channel:r,client:n,schedule:t});return"object"==typeof n&&"remoteClient"in n&&(n.remoteClient=a),v.clients.set(a,n),r.port2}static loadWorker(e){const t=f[e];return t?t():Promise.resolve(null)}constructor(e,t,r,n){this._port=e,this._jobQueue=r,this._lowPriorityJobQueue=n,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new w(e=>this._onInvokeMessage(e)),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._maxNumberOfConcurrentJobs=t.maxNumberOfConcurrentJobs??2,this._port.addEventListener("message",this._onMessage),this._port.start()}close(){this._post({type:b}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const n=r?.signal,o=r?.transferList;if(!this._port)return Promise.reject(new a.A(d.T,`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const s=(0,d.Jc)();return new Promise((r,a)=>{if((0,c.G4)(n))return this._processWork(),void a((0,c.NK)());const l=(0,c.u7)(n,()=>{const e=this._outJobs.get(s);e&&(this._outJobs.delete(s),this._processWork(),(0,i.xt)(e.abortHandle),this._post({type:h,jobId:s}),a((0,c.NK)()))}),f={resolve:r,reject:a,abortHandle:l,debugInfo:e};this._outJobs.set(s,f),this._post({type:p,jobId:s,methodName:e,abortable:null!=n},t,o)})}createInvokeProxy(e){return(0,l.L)(this,e)}on(e,t){const r=new MessageChannel;function n(e){t(e.data)}return this._port.postMessage({type:y,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",n),r.port1.start(),(0,s.hA)(()=>{r.port1.postMessage({type:b}),r.port1.close(),r.port1.removeEventListener("message",n)})}jobAdded(){this._processWork()}openPort(){const e=new MessageChannel;return this._post({type:g,port:e.port2}),e.port1}_processWork(){if(this._outJobs.size>=this._maxNumberOfConcurrentJobs)return;const e=this._jobQueue?.pop()??this._lowPriorityJobQueue?.pop();if(!e)return;const{methodName:t,data:r,invokeOptions:n,resolver:a}=e;this.apply(t,r,n).then(e=>a.resolve(e)).catch(e=>a.reject(e))}_close(){this._channel&&(this._channel=void 0),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach(e=>{(0,i.xt)(e.abortHandle),e.reject((0,c.NK)(`Worker closing, aborting job calling '${e.debugInfo}'`))}),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=null,this._client=null,this._schedule=null,this._onMessage=null,this._channel=null,this._jobQueue=void 0,this._invokeQueue=void 0,this._lowPriorityJobQueue=void 0}_onMessage(e){null!=this._schedule?this._schedule(()=>this._processMessage(e,!0)):this._processMessage(e,!1)}_processMessage(e,t){const r=(0,d.VI)(e);if(r)switch(r.type){case m:this._onResponseMessage(r);break;case p:t?this._onInvokeMessage(r):this._invokeQueue.push(r);break;case h:this._onAbortMessage(r);break;case b:this._onCloseMessage();break;case g:this._onOpenPortMessage(r);break;case y:this._onOnMessage(r)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);this._invokeQueue.push(e),n&&(n.controller&&n.controller.abort(),t.delete(r))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&v.clients.get(this)===e&&e.destroy(),v.clients.delete(this),e?.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n=[],abortable:a}=e,o=a?new AbortController:null,s=this._inJobs;let i,l=this._client,f=l[t];try{if(!f&&t&&t.includes(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)l=l[e[t]],f=l[e[t+1]]}if("function"!=typeof f)throw new TypeError(`${t} is not a function`);n.push({client:this,signal:o?o.signal:null}),i=f.apply(l,n)}catch(e){return void this._post({type:m,jobId:r,error:(0,d.mF)(e)})}(0,c.$X)(i)?(s.set(r,{controller:o,promise:i}),i.then(e=>{s.has(r)&&(s.delete(r),this._post({type:m,jobId:r},e))},e=>{s.has(r)&&(s.delete(r),(0,c.zf)(e)||this._post({type:m,jobId:r,error:(0,d.mF)(e||{message:`Error encountered at method ${t}`})}))})):this._post({type:m,jobId:r},i)}_onOpenPortMessage(e){new v(e.port,{client:this._client})}_onOnMessage(e){const{port:t}=e,r=this._client.on(e.eventType,e=>{t.postMessage(e)}),n=(0,o.on)(e.port,"message",e=>{const a=(0,d.VI)(e);a?.type===b&&(n.remove(),r.remove(),t.close())})}_onResponseMessage(e){const{jobId:t,error:r,data:n}=e,o=this._outJobs;if(!o.has(t))return;const s=o.get(t);o.delete(t),this._processWork(),(0,i.xt)(s.abortHandle),r?s.reject(a.A.fromJSON(JSON.parse(r))):s.resolve(n)}_post(e,t,r){return(0,d.u1)(this._port,e,t,r)}}},8341(e,t,r){r.d(t,{Go:()=>s,Jc:()=>c,T:()=>o,VI:()=>d,mF:()=>l,oV:()=>b,u1:()=>f});var n=r(44208),a=r(17676);const o="worker:port-closed",s={HANDSHAKE:0,OPEN:1,OPENED:2,RESPONSE:3,INVOKE:4,ABORT:5,CLOSE:6,OPEN_PORT:7,ON:8};let i=0;function c(){return i++}function l(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function f(e,t,r,n){if(t.type===s.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==s.INVOKE&&t.type!==s.RESPONSE)return void e.postMessage(t);let a;!function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(r)?(a=u(n),t.data=r):(a=u(r.transferList),t.data=r.result),a?e.postMessage(t,a):e.postMessage(t)}function d(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function u(e){if(!e?.length)return null;if((0,n.A)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter(e=>!function(e){return e instanceof ArrayBuffer||"ArrayBuffer"===e?.constructor?.name}(e));return t.length?t:null}async function b(e){try{return await e}catch(e){const t=e?.name===o;if(!(0,a.zf)(e)&&!t)throw e;return}}},70333(e,t,r){r.d(t,{Aq:()=>c,Y3:()=>l,id:()=>s,ol:()=>i,rE:()=>o});var n=r(44208),a=r(84952);Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const o="5.1";let s,i=o;function c(e){s=e}function l(e){const t=s?.findCredential(e);return t?.token?(0,a.rs)(e,"token",t.token):e}i="5.1.0-next.88",(0,n.A)("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),(0,n.A)("host-webworker")},39131(e,t,r){r.d(t,{$E:()=>s,py:()=>o,qG:()=>i});const n=/^https:\/\/([a-z\d-]+)(\.maps([^.]*))?\.arcgis\.com/i,a={devext:{customBaseUrl:"mapsdevext.arcgis.com",portalHostname:"devext.arcgis.com"},qaext:{customBaseUrl:"mapsqa.arcgis.com",portalHostname:"qaext.arcgis.com"},www:{customBaseUrl:"maps.arcgis.com",portalHostname:"www.arcgis.com"}};function o(e){const t=e?.match(n);if(!t)return null;const[,r,o,s]=t;if(!r)return null;let i=null,c=null,l=null;const{devext:f,qaext:d,www:u}=a;if(o)if(i=r,s)switch(s.toLowerCase()){case"devext":({customBaseUrl:c,portalHostname:l}=f);break;case"qa":({customBaseUrl:c,portalHostname:l}=d);break;default:return null}else({customBaseUrl:c,portalHostname:l}=u);else switch(r.toLowerCase()){case"devext":({customBaseUrl:c,portalHostname:l}=f);break;case"qaext":({customBaseUrl:c,portalHostname:l}=d);break;case"www":({customBaseUrl:c,portalHostname:l}=u);break;default:return null}return{customBaseUrl:c,isPortal:!1,portalHostname:l,urlKey:i}}function s(e){return!!e&&/\/(sharing|usrsvcs)\/(appservices|servers)\//i.test(e)}function i(e){const t=/^https?:\/\/(?:cdn|[a-z\d-]+\.maps)\.arcgis\.com/i,r=/^https?:\/\/(?:cdndev|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,n=/^https?:\/\/(?:cdnqa|[a-z\d-]+\.mapsqa)\.arcgis\.com/i;return t.test(e)?e=e.replace(t,"https://www.arcgis.com"):r.test(e)?e=e.replace(r,"https://devext.arcgis.com"):n.test(e)&&(e=e.replace(n,"https://qaext.arcgis.com")),e}},26306(e,t,r){function n(e){const t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r.buffer}function a(e){const t=new Uint8Array(e);let r="";for(let e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return btoa(r)}r.d(t,{M:()=>n,Y:()=>a})},18357(e,t,r){r.d(t,{$:()=>n,u:()=>a});const n="20260430",a="25a21c0430b606c2f0d6d5af52467c615ac694da"}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.m=e,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,n)=>(r.f[n](e,t),t),[])),r.u=e=>"chunks/"+{5:"d52172439db02a349542",88:"a429355534bf6cbd8304",91:"ca1b0cb14ea9ae1bf2a3",146:"06003996a378c45bc605",148:"aae40d70eb01249c1bab",217:"cd0c232f4e3868d91a05",218:"52b3a11c962810bc6dbe",233:"074f5e6aaeafca13bf72",241:"dd5b362bded458afa2d6",309:"086d7cdfa92a649c9f7b",349:"7908aed639521cf572e8",353:"65520a443e3811255bea",368:"1906416c84bab369bbd6",369:"8a0a13f398ab488dbbe9",382:"d28169816c768d55aa09",390:"128799741dd3c6fc69b9",427:"d35c475f004367e333eb",433:"6675d56f49d07a97dc40",463:"d95ffd990b3a7df69e1e",540:"51716e411fad624ac21c",547:"63934843c9f4ef779a07",561:"5b6f2bfdcdd207d8ae42",563:"88827e23f8938342781c",566:"3c2eb386c0165150e039",609:"176dd195f77b98cb0b0f",668:"3feec3d08424b94e1bcf",692:"34207774bc371e95ba3c",708:"9d10db72e342fe63c981",709:"394812e19b6915d560b0",758:"206bdfd868a9ef88f3a8",763:"83f1871d04c979fa23b7",785:"cca095f0c623e037002d",788:"d31f62ecbb54bffc54f2",795:"5afee66e182f79a0fc46",812:"a3a28c4887f802e8d96d",820:"aafa33f661462f5afd2b",837:"09630888267cde87654f",841:"747e258f57f0543c836e",847:"f37e4ae0e9be80210db0",891:"d55cef8199b8246fea3f",893:"fa869bfe4366f7f49cca",895:"60915a3708a34da1977e",909:"46b16501db6681dc467b",923:"bd10d21545bca9a49de0",926:"f1f78bb3d34f973c19de",959:"8a48a6760c33ed50b650",980:"74e1826ad9e2c4fd3b42",1003:"3d9032217347dadcbe41",1011:"dbc9249dae41096d750d",1017:"3092184350d66c79f610",1023:"b858adff7043683fe41c",1054:"bc78937986854e500b8e",1060:"f518835b2dc89a48cfb1",1075:"b803e7b0d489bb628d72",1086:"475394218caaa4cd3e86",1088:"dec51409372764e7093d",1094:"1ff3c15a51c4dc991806",1132:"2b0b398180ed98c2c84c",1204:"4b79ebfb3328f9483147",1214:"be1e4c3ec53fc92a26f1",1273:"cc697c4d9cdc116373dc",1277:"7a474ce61cf484df87b4",1279:"b5ced451d331ca1ffb68",1285:"a0d459bdb91ee892d4b6",1384:"5b70295da76d9227f64b",1427:"79dc7045d9a2d43ba8df",1431:"fe30e61652716fcccf16",1448:"988e91cc6cf88c34c2de",1452:"3a183259805638c25363",1493:"230e0e43f8e771950397",1512:"d8decaee2c780e1b5e35",1521:"7b505112c7e6d9b7a239",1550:"34b6b5dd415c68f0b0d1",1666:"8b046e28f879079caada",1695:"3cf77b7a61f78f9bcd62",1698:"52175ff9e8c2c136f90a",1728:"d897412b99b9fba44bb4",1733:"7f0f10946f05a09b5654",1763:"601e44839fd46e449aa8",1775:"7f34fa9f154f5101cb13",1787:"40d251b6b42a41d68bd2",1812:"47b3a5213539548ff3a6",1822:"27f67a3828b78d4c1413",1837:"3a8320a40916c755c031",1843:"dcb7a3ff59677b1cf0f1",1878:"4c54cb80c4dc9bbbd395",1882:"b1a21a4d7d73ad7d0e47",1894:"de6b3f80070abdd61d0f",1918:"24646a1176ce34039155",1948:"e9c5c295b6bf10e942a4",1951:"6124141ac642e4ce1454",1956:"169ca3724053fc046d1b",1965:"384c235d36f32769e32b",2013:"abdf146b35e179b5b245",2031:"77769663cd712822d33e",2042:"015fc0a17b17d69cc3bb",2045:"4dc91c2208201ba34c90",2059:"5cffc7b49966201eccdb",2158:"359d3acb3953e64e5a78",2174:"b73c146d3e550eaf07eb",2186:"c45a5bcf26659daf02a1",2188:"164ee62f2211987ad850",2246:"9f51a69b8f1937a8794a",2260:"3efbb684c0409955186d",2261:"80f4f686ce403cb2693f",2288:"1a35121a0c2595a41fdb",2293:"c9461568e1002ebac534",2314:"bf2c202dec5ab7bc770b",2343:"2b3a8a53cd68f666676b",2372:"7cb0681cc6a5e956cb15",2390:"d51c41c1944df0cbab3e",2409:"f890cfa4932955ecd4e7",2423:"2b2283f1ee4bfc1baa18",2465:"a242ec19a7508de436da",2491:"d82da31dc702b8fd6a07",2558:"2d956dacb26d71d1c174",2597:"48549d3d7bf0154c0afa",2649:"7160e3e7340beb7fdb42",2733:"43f58604ba4a94a9167c",2741:"7185486c6dc28fc367a1",2764:"cc62e5095e328bed3e01",2772:"4c73c2f4331351e2a50c",2869:"1961b59756933e0a82f2",2942:"6f67c9f68101a084b683",2958:"9802770413ad814dab29",2980:"3087910d19959fdc546b",2990:"c31ee5617c61a933cb0e",2997:"3dd5d481ae6c5d9dfa08",3053:"cc0f3b9b153a0c232afe",3090:"4e206957b28253ddc1a3",3103:"6ee956d5a92ca905f53f",3116:"da008d6a3afb30d18392",3166:"0539b5d015157c1d34a0",3251:"9c09097e390985bbac58",3276:"4a23b27bfbcfa08fd9a7",3290:"54c6e870262469d0d702",3299:"dd6efa0afe879bd11a2e",3300:"2343b1105bc4c1b4a086",3304:"0fa207c68dfd7ddee160",3356:"dde94664110ff231a52d",3359:"413d2fa54508e6f42c74",3383:"d00dddc3881fa29446e1",3390:"9c11e1fe785e1385fdb1",3456:"dc54d4a9fe1691862356",3500:"427dec43ef2d67467699",3543:"48acd146bf0241d87647",3561:"851fc5290497991ba001",3586:"af8bc56cf1404afc3028",3636:"8178e9ba3c568d406a87",3661:"1f53620f82cc7c3daabe",3666:"53817ef8c00d8cce4b8e",3693:"752f4e0e2961fc315dca",3708:"19fcc74d34cbbaa56a41",3813:"4605a68e40c5c3ac6e3e",3846:"728ad5bbbcbf88d6249f",3902:"0cc4b3100a7a453bd058",3910:"38c28189f273636e4017",3931:"a320998f18922a35899f",3937:"86161025b53b916328ff",4038:"4e676e888a935c507d90",4050:"02e8fc598ee09cf1b678",4063:"2a2e97918524e0f436d7",4066:"5cc38ac051d3d0557920",4097:"7601278ebced0c0c31cf",4167:"1d54b71c43d9d6a5f713",4168:"a015c2f54eb91e43a1f4",4259:"a28124bba6b43efd74cc",4273:"f1673e723b336204ad77",4314:"c961aff385e38b081204",4342:"2a3145a595d19391bb8a",4383:"9c6d34bb666f630d511f",4401:"566f6319ded0634769e0",4447:"f52443cd203e687551da",4560:"13a8346abe5509167578",4575:"18f77ee3552d92962f15",4579:"53750e85f3128993a43a",4594:"c19e3f6027b6526de359",4642:"1765dfeac20e34ce25b7",4674:"a6b75576d598ec161cc4",4690:"f563dd6cace047108b3c",4703:"f36345ebb9851ab92453",4744:"c3e89c7c7b677bd18557",4794:"a401d44a5b45c05072c2",4795:"aac6a57edd7494125204",4800:"41a95ad470ec42ecd5a2",4849:"9482a6d7baa24bbf5693",4906:"defac06f9e2b43090677",4935:"146424b5717d0a645ee1",4996:"b811d62284be95f4beb6",5011:"b2662bfdbd1e3623ceb9",5013:"afc0baf86ece710ef867",5020:"9a5ef33d99a8f89956ff",5090:"127cd8fee3717a473fc5",5098:"500be1fb7cc9efec875c",5141:"3c9482764c9e4f8bcbb0",5151:"f468c6ea2818a1f97e19",5165:"969f58a2de4ebe63619d",5217:"c9065cee85eb8dde6a42",5220:"5ef37f37e405b3bb5450",5243:"b2983f521d8c96becd8a",5275:"8a5a827ee557d9f9a66e",5280:"a432219de6a873f88776",5354:"04ea806b933d4dd41609",5359:"00e9e25269d5776f8645",5367:"df8a3d3cac454d42e14d",5404:"64e268ebac0b62076f81",5408:"004af103a94d21cb4889",5431:"85da2987e17b6755a94e",5458:"61fada8942b65fa0b5e1",5474:"577cbc131b21c351fae5",5482:"9be4438ce2c7180adadf",5594:"7ba67f1d7831a5576a5a",5601:"bb5f909a2f26fc6a21b0",5611:"e18badd11f360cc2912b",5613:"c49c078be08c38a6088d",5647:"4baf66314f82cfa76beb",5680:"3e72bd6dbfc52d956c06",5740:"d598d08dbf2796742e8c",5750:"72f8f4cfa0842d325fb0",5752:"e6fe8b5fbe95de01453b",5756:"1f6b7626f333809837ef",5804:"0c13591347d51d684561",5828:"ee057c85cdf6beb5b012",5841:"ffcd4fca7f67e1f943f1",5856:"be1d2c3a61e6447fbbc7",5902:"7b8466f892a38a53c600",6005:"54c035cdc171998d0776",6027:"c1189316d24fb4cdb2a0",6033:"ef0085aa743b33cb549f",6042:"312036c89a6a09bb06c2",6052:"e4e0c5a45cf32973d5d5",6061:"493a0981e90a5799fb5b",6122:"1ede8666d804c553803e",6129:"0d9d33f29124d464a4cb",6154:"ac84e5b5d010c235fe6f",6160:"bb3ab2453ccde2f2611c",6187:"2ecb21c402cdd8c82533",6219:"cb81d524f12edcadb9bb",6231:"9639b1dd27ccc17ee21e",6233:"0a6df243b18acae471be",6247:"452c01cecbbd1e370098",6276:"55fd201ca5e10c6e4761",6312:"6a3d207308b29651f397",6343:"91f9e0e3662d4bf9f163",6408:"a96c7432ca97cbeef4b8",6452:"b4bac22467e96be7a974",6491:"eaab5ac049622986e3bc",6554:"d0983cc19d19c19c3478",6558:"34f79355145c8e4c59dd",6569:"2fd4220131bfc3f5e2dd",6606:"1768f1a7e3caa6074d91",6650:"f7531aa69a87814c60d1",6661:"b9e163f4a898e50cc854",6671:"915e2711d3a2cfa402b2",6684:"af762422a65c551dcd54",6708:"ce7ef7c4ca14d66d96f6",6765:"f0250cecb243b32cdba7",6859:"3be111488365768fd917",6861:"7c820c5f6f05480d5050",6936:"702e8468836863abd81b",6956:"16a767cc5f3e2e0e49c2",6960:"852f4cd514008fee5a55",7005:"95d82c619dcbec2e1050",7016:"5fccb372b4d5ee2f64cc",7033:"4c97cc922eece3a91b6b",7087:"e0b47b08ae2c36c76fa2",7125:"baea6f86b2dbe067940e",7217:"a7f9f478bd1493fc3c76",7229:"2549a07f403447482f4e",7269:"d11de13537b623739e14",7273:"1f85646936200a399c15",7301:"e7402dfd683f82878360",7316:"edee616b6f1b5be8fd39",7367:"6c35583707f5c339ee99",7373:"3e2953ea62817e75d840",7433:"f05932aea4eb267cba4d",7444:"13838b6c045425e73cf8",7464:"47656ec12401e53f4bd3",7546:"f50bba74ae72c07e131a",7548:"56717ff315c6ec874142",7561:"d3c760109a70a71448c5",7598:"7ef51b0ebd560113ae7e",7609:"5c7ba4b8a9ec2e2e02b5",7632:"612873df0c8659ac2aa5",7634:"f9fe3c9867b0bdb2aec6",7705:"2387613b855771a3e537",7733:"7601408e242dca1d25bd",7772:"56941e8bbd2d49bf2656",7835:"804c31973f7d116523cb",7865:"58c79e15ca95238a4b43",7883:"ee7e9bca57160694b3c4",7891:"f53805c7a84203305b2c",7982:"fade7b878a9498382bb2",7984:"6d696beddcc5fbed5875",7987:"61c523dd9d8027922465",7990:"aa6808146c76b2d49b64",7992:"7b6c8be59ed87e386aa4",8010:"39d71e83261bff46f6bf",8018:"8f6833671c071b522923",8050:"b50a42a9f96515beb929",8125:"4301cb9670fa7c907460",8251:"4dbbf59c79d9e72f20ee",8278:"7cadfd7444a2a05cf2fb",8303:"60cee9a44929decd2474",8340:"bec3ee5ea945e1e07a35",8377:"f60292d97bcdbf19165b",8399:"0d2bc1be5802681666a4",8405:"d8ccc713c5ad93e7a0c3",8414:"9103eb0b9078019d3a26",8449:"01bd1b86ba899c6aa4c0",8457:"399fcea09dfb1ad6deaa",8575:"3469df5c4846b0cee012",8589:"c8ef80a7c46d7d2c5172",8628:"716a4d7e8b908b81870b",8635:"a169d9fe66b5865911d9",8679:"f6c8e93ca2987e83f925",8692:"1e3fe89970c57a883fe5",8714:"0d6afba80d2f8dcb5cf7",8812:"88c3b60b403e2454b56e",8815:"040884cec4b84dd1bb17",8846:"475409026288f0981ce2",8872:"d3b086eb9aa8c7d09048",8883:"d05a7ce6c1d4b883ed4c",8885:"ea97619a4470f1540b99",8902:"66fe1634c6e8f72fc653",9013:"e0b27bceb397482bd0e8",9062:"5eb9fdb076488de9cd83",9078:"bf4dd8e50704e4040966",9126:"b1c6a1759febad66927f",9134:"02ed969786ab24ca8d96",9159:"e785f76c1a75cb1d1e1f",9169:"b7af0e6b9aadbcaf6a0b",9186:"17445fd8048966617d49",9187:"8351012ceb466f01b8fd",9192:"2ce845c990bb4d701362",9235:"bcb021a167580bb1619f",9239:"74d9dd484b9bc4dc7e3d",9279:"a25acccda8febac71a3d",9285:"8d738e9acc2f222235ea",9301:"d4465fd3319d0b6a26cc",9321:"4b24f72b56edc28bb15e",9438:"cf826787ab8d4b27ad80",9466:"bfe9c8ab35d9bf7e1035",9506:"5abe34bb0110694f7b42",9544:"85e65ced3312bf9cf162",9588:"c319c3b85cdec73a9f45",9598:"65c61171e6c6be5c5c2f",9616:"bb2f6b0fcdfb8b158e26",9650:"456d269e3982c437010a",9657:"d3d9d40556c847bba1a7",9695:"f1e5626a0cc1631a1efb",9696:"1f54ed4a5238ba1a2551",9748:"e645f992ec6f935ee3a5",9790:"6dac8dfcd63fc757ae2d",9794:"10cf6a70bf79f04a7208",9835:"8a3bff0f58483c1665f9",9838:"17acbf40e7c1cb42d9bd",9933:"de3e5d82502ee15b7eae",9953:"e0fcb5fa0e9f21fde2b6",9958:"8ab39731775b0867a512",9981:"9c402657f63a4d5668d0"}[e]+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var a=n.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=n[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={76:1};r.f.i=(t,n)=>{e[t]||importScripts(r.p+r.u(t))};var t=self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[],n=t.push.bind(t);t.push=t=>{var[a,o,s]=t;for(var i in o)r.o(o,i)&&(r.m[i]=o[i]);for(s&&s(r);a.length;)e[a.pop()]=1;n(t)}})(),r(66358);var n=r(61322);RemoteClient=n})();
1
+ var RemoteClient;(()=>{"use strict";var e={66358(e,t,r){r.p=self.esriConfig.assetsPath+"/esri/core/workers/"},92602(e,t,r){r.d(t,{A:()=>a}),r(44208);var n=r(93637);const a={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&((0,n.$N)(a,globalThis.esriConfig,!0),delete a.has),!a.assetsPath){{const e="5.1.0-next.89";a.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}a.defaultAssetsPath=a.assetsPath}},49186(e,t,r){r.d(t,{A:()=>s});var n=r(4718),a=r(53966),o=r(799);class s{constructor(e,t,r){this.type="error",this.name=e,this.message=t?(0,o.V2)(t,r):"",this.details=r}toString(){const{name:e,message:t}=this;return`[${e}]: ${t}`}toJSON(){if(null!=this.details)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,(e,t)=>{if(t&&"object"==typeof t&&"function"==typeof t.toJSON)return t;try{return(0,n.o8)(t)}catch(e){return"[object]"}}))}}catch(e){throw a.A.getLogger("esri.core.Error").error(e),e}return{name:this.name,message:this.message,details:this.details}}static fromJSON(e){return new s(e.name,e.message,e.details)}}},53966(e,t,r){r.d(t,{A:()=>i});var n=r(92602),a=r(51447),o=(r(44208),r(799));const s={info:0,warn:1,error:2,none:3};class i{constructor(e){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=e.level&&(this.level=e.level),null!=e.writer&&(this.writer=e.writer),this._module=e.module,i._loggers.set(this.module,this);const t=this.module.lastIndexOf(".");-1!==t&&(this._parent=i.getLogger(this.module.slice(0,t)))}get module(){return this._module}get parent(){return this._parent}error(...e){this._log("error","always",...e)}warn(...e){this._log("warn","always",...e)}info(...e){this._log("info","always",...e)}errorOnce(...e){this._log("error","once",...e)}warnOnce(...e){this._log("warn","once",...e)}infoOnce(...e){this._log("info","once",...e)}errorOncePerTick(...e){this._log("error","oncePerTick",...e)}warnOncePerTick(...e){this._log("warn","oncePerTick",...e)}infoOncePerTick(...e){this._log("info","oncePerTick",...e)}get test(){}static get test(){}static getLogger(e){return e="string"!=typeof e?e.declaredClass:e,i._loggers.get(e)||new i({module:e})}static{this._loggers=new Map}static{this._tickCounter=0}static{this._tickCounterScheduled=!1}static{this._throttlingDisabled=!1}_log(e,t,...r){if(this._matchLevel(e)){if("always"!==t&&!i._throttlingDisabled){const n=function(...e){return(0,o.Wm)(JSON.stringify(e,(e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]"))}(r),a=this._loggedMessages[e].get(n);if("once"===t&&null!=a||"oncePerTick"===t&&a&&a>=i._tickCounter)return;this._loggedMessages[e].set(n,i._tickCounter),i._scheduleTickCounterIncrement()}for(const t of n.A.log.interceptors)if(t(e,this.module,...r))return;this._inheritedWriter()(e,this.module,...r)}}_parentWithMember(e,t){let r=this;for(;null!=r;){const t=r[e];if(null!=t)return t;r=r.parent}return t}_inheritedWriter(){return this._parentWithMember("writer",c)}_matchLevel(e){const t=n.A.log.level||"warn";return s[this._parentWithMember("level",t)]<=s[e]}static _scheduleTickCounterIncrement(){i._tickCounterScheduled||(i._tickCounterScheduled=!0,Promise.resolve().then(()=>{i._tickCounter++,i._tickCounterScheduled=!1}))}}function c(e,t,...r){console[e](`[${(0,a.u3)(t)}]`,...r)}},87811(e,t,r){r.d(t,{A:()=>n});class n{static{this._m=2147483647}static{this._a=48271}static{this._c=0}constructor(e=1){this._seed=e}set seed(e){this._seed=e??Math.random()*n._m}getInt(){return this._seed=(n._a*this._seed+n._c)%n._m,this._seed}getFloat(){return this.getInt()/(n._m-1)}getIntRange(e,t){return Math.round(this.getFloatRange(e,t))}getFloatRange(e,t){const r=t-e;return e+this.getInt()/n._m*r}}},4576(e,t,r){r.d(t,{Am:()=>s,HX:()=>b,Ho:()=>u,Ji:()=>o,MJ:()=>i,Mo:()=>v,Ru:()=>A,TF:()=>O,VO:()=>l,Xj:()=>d,Xy:()=>g,aI:()=>c,iv:()=>f,k4:()=>k,mW:()=>w,qh:()=>m,vW:()=>h,yc:()=>P});var n=r(21818),a=r(87811);const o=1.5;function s(e,t){if(t){const r=[];for(const n of e)r.some(e=>t(e,n))||r.push(n);return r}return Array.from(new Set(e))}function i(e,t,r,n,a,o,s){if(null==e&&null==n)return!0;t=Math.max(0,t),a=Math.max(0,a),r=Math.max(0,r<0?(e?.length??0)+r:r),o=Math.max(0,o<0?(n?.length??0)+o:o);const i=r-t;if(null==e||null==n||i!==o-a)return!1;if(s){for(let r=0;r<i;r++)if(!s(e[t+r],n[a+r]))return!1}else for(let r=0;r<i;r++)if(e[t+r]!==n[a+r])return!1;return!0}function c(e,t,r){return i(e,0,e?.length??0,t,0,t?.length??0,r)}function l(){return(e,t)=>{if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}}function f(e,t,r){let n,a;return r?(n=t.filter(t=>!e.some(e=>r(e,t))),a=e.filter(e=>!t.some(t=>r(t,e)))):(n=t.filter(t=>!e.includes(t)),a=e.filter(e=>!t.includes(e))),{added:n,removed:a}}function d(e){return e&&"number"==typeof e.length}function u(e,t){const r=e.length;if(0===r)return[];const n=[];for(let a=0;a<r;a+=t)n.push(e.slice(a,a+t));return n}function b(e,t,r,n){e.length>r&&(e.length=r);const a=e.length;let o=0,s=a;if(a===r){const r=n(e[a-1],t);if(r<=0||Number.isNaN(r))return}for(;o<s;){const r=o+s>>>1,a=n(e[r],t);a<=0||Number.isNaN(a)?o=r+1:s=r}a===r&&e.pop(),e.splice(o,0,t)}class h{constructor(){this.last=0}}const p=new h;function m(e,t,r,n){n=n||p;const a=Math.max(0,n.last-10);for(let o=a;o<r;++o)if(e[o]===t)return n.last=o,o;const o=Math.min(a,r);for(let r=0;r<o;++r)if(e[r]===t)return n.last=r,r;return-1}function g(e,t,r,a){const o=r??e.length,s=m(e,(0,n.z)(t),o,a);if(-1!==s)return e[s]=e[o-1],null==r&&e.pop(),t}const y=new Set;function w(e,t,r=e.length,n=t.length,a,o){if(0===n||0===r)return r;y.clear();for(let e=0;e<n;++e)y.add(t[e]);a=a||p;const s=Math.max(0,a.last-10);for(let t=s;t<r;++t)if(y.has(e[t])&&(o?.push(e[t]),y.delete(e[t]),e[t]=e[r-1],--r,--t,0===y.size||0===r))return y.clear(),r;for(let t=0;t<s;++t)if(y.has(e[t])&&(o?.push(e[t]),y.delete(e[t]),e[t]=e[r-1],--r,--t,0===y.size||0===r))return y.clear(),r;return y.clear(),r}function v(e){return e?(_.seed=e,()=>_.getFloat()):Math.random}const _=new a.A;function k(e,t){if(!e)return e;const r=v(t);for(let t=e.length-1;t>0;t--){const n=Math.floor(r()*(t+1)),a=e[t];e[t]=e[n],e[n]=a}return e}function O(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}function A(e,t){return null!=e}function P(e){return Array.isArray(e)}},21818(e,t,r){function n(e){return e}r.d(t,{z:()=>n})},51447(e,t,r){r.d(t,{Lx:()=>c,eF:()=>l,eO:()=>i,io:()=>f,u3:()=>d,uW:()=>s});var n=r(44208);const a=new WeakMap;function o(e,t,r=!1){const n=`🛑 DEPRECATED - ${t}`;if(!r)return void e.warn(n);let o=a.get(e);o||(o=new Set,a.set(e,o)),o.has(t)||(o.add(t),e.warn(n))}function s(e,t,r={}){(0,n.A)("esri-deprecation-warnings")&&f(e,`Module: ${d(t)}`,r)}function i(e,t,r={}){if((0,n.A)("esri-deprecation-warnings")){const{moduleName:n}=r;f(e,"Function: "+(n?d(n)+"::":"")+t+"()",r)}}function c(e,t,r={}){if((0,n.A)("esri-deprecation-warnings")){const{moduleName:n}=r;f(e,"Property: "+(n?d(n)+"::":"")+t,r)}}function l(e,t,r={}){(0,n.A)("esri-deprecation-warnings")&&f(e,`Multiple argument constructor: ${t=d(t)}`,{warnOnce:!0,replacement:`new ${t}({ <your properties here> })`,...r})}function f(e,t,r={}){if((0,n.A)("esri-deprecation-warnings")){const{replacement:n,version:a,see:s,warnOnce:i}=r;let c=t;if(n&&(c+=`\n\t🛠️ Replacement: ${n}`),a&&(c+=`\n\t⚙️ Version: ${a}`),s)if(Array.isArray(s)){c+="\n\t🔗 See for more details:";for(const e of s)c+=`\n\t\t${e}`}else c+=`\n\t🔗 See ${s} for more details.`;o(e,c,i)}}function d(e){return e.startsWith("esri.")?e.replace("esri.","@arcgis/core/").replaceAll(".","/"):e}},37955(e,t,r){r.d(t,{Oo:()=>i,on:()=>s,wb:()=>a});var n=r(36563);function a(e){return function(e){return null!=e&&"object"==typeof e&&"on"in e&&"function"==typeof e.on}(e)||o(e)}function o(e){return null!=e&&"object"==typeof e&&"addEventListener"in e&&"function"==typeof e.addEventListener}function s(e,t,r){if(!a(e))throw new TypeError("target is not a Evented or EventTarget object");return o(e)?function(e,t,r,a){if(Array.isArray(t)){const o=t.slice();for(const t of o)e.addEventListener(t,r,a);return(0,n.hA)(()=>{for(const t of o)e.removeEventListener(t,r,a)})}return e.addEventListener(t,r,a),(0,n.hA)(()=>e.removeEventListener(t,r,a))}(e,t,r):e.on(t,r)}function i(e,t,r){if(!a(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,r);const n=s(e,t,t=>{n.remove(),r.call(e,t)});return n}},36563(e,t,r){r.d(t,{hA:()=>a,rE:()=>s,vE:()=>o});const n={remove:()=>{}};function a(e){return e?{remove(){e&&(e(),e=void 0)}}:n}function o(e){return a(()=>function(e){e.forEach(e=>e?.remove())}(e))}function s(e){return a(()=>e?.abort())}},44208(e,t,r){r.d(t,{A:()=>o});const n=globalThis,a={...n.esriConfig?.has};function o(e){return"function"==typeof a[e]?a[e]=a[e](n):a[e]}o.add=(e,t,r,n)=>{(n||void 0===a[e])&&(a[e]=t),r&&o(e)},o.cache=a,o.add("big-integer-warning-enabled",!0),o.add("esri-deprecation-warnings",!0),o.add("esri-tests-disable-screenshots",!1),o.add("esri-tests-use-full-window",!1),o.add("esri-tests-post-to-influx",!0),o.add("esri-cim-animations-enable-status","enabled"),o.add("esri-cim-animations-spotlight",!1),o.add("esri-cim-animations-freeze-time",!1),(()=>{o.add("host-webworker",void 0!==n.WorkerGlobalScope&&self instanceof n.WorkerGlobalScope);const e="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(o.add("host-browser",e),o.add("host-node",!("object"!=typeof n.process||!n.process.versions?.node||!n.process.versions.v8)),o.add("dom",e),o("host-browser")){const e=navigator,t=e.userAgent,r=e.appVersion,n=parseFloat(r);if(o.add("wp",parseFloat(t.split("Windows Phone")[1])||void 0),o.add("msapp",parseFloat(t.split("MSAppHost/")[1])||void 0),o.add("khtml",r.includes("Konqueror")?n:void 0),o.add("edge",parseFloat(t.split("Edge/")[1])||void 0),o.add("opr",parseFloat(t.split("OPR/")[1])||void 0),o.add("webkit",!o("wp")&&!o("edge")&&parseFloat(t.split("WebKit/")[1])||void 0),o.add("chrome",!o("edge")&&!o("opr")&&parseFloat(t.split("Chrome/")[1])||void 0),o.add("android",!o("wp")&&parseFloat(t.split("Android ")[1])||void 0),o.add("safari",!r.includes("Safari")||o("wp")||o("chrome")||o("android")||o("edge")||o("opr")?void 0:parseFloat(r.split("Version/")[1])),o.add("mac",r.includes("Macintosh")),!o("wp")&&/(iPhone|iPod|iPad)/.test(t)){const e=RegExp.$1.replace(/P/,"p"),r=/OS ([\d_]+)/.test(t)?RegExp.$1:"1",n=parseFloat(r.replace(/_/,".").replaceAll("_",""));o.add(e,n),o.add("ios",n)}o("webkit")||(!t.includes("Gecko")||o("wp")||o("khtml")||o("edge")||o.add("mozilla",n),o("mozilla")&&o.add("ff",parseFloat(t.split("Firefox/")[1]||t.split("Minefield/")[1])||void 0))}})(),(()=>{if(n.navigator){const e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),r=/iPhone/i.test(e);t&&o.add("esri-mobile",t),r&&o.add("esri-iPhone",r),o.add("esri-geolocation",!!navigator.geolocation)}o.add("esri-wasm","WebAssembly"in n),o.add("esri-performance-mode-frames-between-render",20),o.add("esri-force-performance-mode",!1),o.add("esri-shared-array-buffer",()=>{const e="SharedArrayBuffer"in n,t=!1===n.crossOriginIsolated;return e&&!t}),o.add("wasm-simd",()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))),o.add("esri-atomics","Atomics"in n),o.add("esri-workers","Worker"in n),o.add("web-feat:cache","caches"in n),o.add("esri-workers-arraybuffer-transfer",!o("safari")||Number(o("safari"))>=12),o.add("min-workers-pool-size",2),o.add("max-workers-pool-size",o("esri-mobile")?3:8),o.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),o.add("featurelayer-simplify-payload-size-factors",[1,1,4]),o.add("featurelayer-animation-enabled",!0),o.add("featurelayer-snapshot-enabled",!0),o.add("featurelayer-snapshot-initial-tolerance",0),o.add("featurelayer-snapshot-point-min-threshold",8e4),o.add("featurelayer-snapshot-point-max-threshold",4e5),o.add("featurelayer-snapshot-multipoint-min-threshold",2e4),o.add("featurelayer-snapshot-multipoint-max-threshold",1e5),o.add("featurelayer-snapshot-polygon-min-threshold",2e3),o.add("featurelayer-snapshot-polygon-max-threshold",2e3),o.add("featurelayer-snapshot-polyline-min-threshold",2e3),o.add("featurelayer-snapshot-polyline-max-threshold",2e3),o.add("featurelayer-snapshot-max-vertex-count",25e4),o.add("featurelayer-snapshot-non-hosted-exceedslimit-enabled",!0),o.add("featurelayer-snapshot-concurrency",4),o.add("featurelayer-snapshot-allow-editable",!1),o.add("featurelayer-snapshot-coverage",.1),o.add("featurelayer-query-max-depth",4),o.add("featurelayer-query-max-page-size",8e3),o.add("featurelayer-query-pausing-enabled",!1),o.add("featurelayer-query-tile-concurrency",4),o.add("featurelayer-query-tile-max-features",6e5),o.add("featurelayer-advanced-symbols",!1),o.add("featurelayer-pbf",!0),o.add("featurelayer-pbf-statistics",!1),o.add("featurelayer-pbf-true-curves",!0),o.add("feature-layers-workers",!0),o.add("feature-polyline-generalization-factor",1),o.add("featurelayer-relative-time-queries-enabled",!0),o.add("featurelayer-relative-time-queries-bin-window-public",1),o.add("featurelayer-relative-time-queries-bin-window-private",60),o.add("parquetlayer-full-query-feature-count",2e4),o.add("parquetlayer-hittest-max-feature-count",1),o.add("parquetlayer-persistence-enabled",!1),o.add("parquetlayer-cache-enabled",!0),o.add("mapview-transitions-duration",200),o.add("mapview-essential-goto-duration",200),o.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),o.add("mapserver-pbf-version-support",10.81),o.add("mapservice-popup-identify-max-tolerance",20),o.add("request-queue-concurrency-global",50),o.add("request-queue-concurrency-hosted",16),o.add("request-queue-concurrency-non-hosted",10),o.add("curve-densification-coarse-segments",128),o.add("curve-densification-max-segments",2e3),o.add("curve-densification-min-segments",3),o.add("curve-densification-pixel-deviation",.5),o.add("view-readyState-waiting-delay",1e3),o.add("gradient-depth-bias",.01),o.add("gradient-depth-epsilon",1e-8),o.add("enable-feature:analysis-drawtool-line-of-sight",!1),o.add("enable-feature:analysis-drawtool-line-of-sight-placement-visuals",!1),o.add("enable-feature:esri-compress-textures",!0),o.add("enable-feature:analysis-new-viewshed-tool",!1),o.add("enable-feature:basemap-groundlayers",!0),o.add("enable-feature:im-shading",!0),o.add("enable-feature:im-vertex-normals",!0),!o("host-webworker")&&o("host-browser")&&(o.add("esri-csp-restrictions",()=>{try{new Function}catch{return!0}return!1}),o.add("esri-url-encodes-apostrophe",()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")}))})()},4718(e,t,r){r.d(t,{Nb:()=>c,TU:()=>i,aI:()=>b,gh:()=>h,o8:()=>s,oy:()=>o});var n=r(4576),a=r(34275);function o(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&o(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&void 0===e[r]&&delete e[r];return e}function s(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=u(e);if(null!=t)return t;if(c(e))return e.clone();if(l(e))return e.map(s);if(f(e))throw new Error("Trying to clone an unclonable Accessor instance");const r={};for(const t of Object.getOwnPropertyNames(e))r[t]=s(e[t]);return r}function i(e,t){if(!e||"object"!=typeof e||"function"==typeof e||"HTMLElement"in globalThis&&e instanceof HTMLElement)return e;const r=u(e);if(null!=r)return r;if(l(e)){let r=!0;const n=e.map(e=>{const n=i(e,t);return null!=e&&null==n&&(r=!1),n});return r?n:null}if(c(e))return e.clone(t);if(e instanceof File||e instanceof Blob)return e;if(f(e))return null;const n=new(0,Object.getPrototypeOf(e).constructor);for(const t of Object.getOwnPropertyNames(e)){const r=e[t],a=i(r);if(null!=r&&null==a)return null;n[t]=a}return n}function c(e){return"function"==typeof e.clone}function l(e){return"function"==typeof e.map&&"function"==typeof e.forEach}function f(e){return"function"==typeof e.notifyChange&&"function"==typeof e.watch}function d(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){if((0,a.dz)(e)||(0,a.mg)(e)||(0,a.UR)(e)||(0,a.IY)(e)||(0,a.jq)(e)||(0,a._G)(e)||(0,a.XJ)(e)||(0,a.vZ)(e)||(0,a.aI)(e))return e.slice();if(e instanceof Date)return new Date(e);if(e instanceof ArrayBuffer)return e.slice(0,e.byteLength);if(e instanceof Map){const t=new Map;for(const[r,n]of e)t.set(r,s(n));return t}if(e instanceof Set){const t=new Set;for(const r of e)t.add(s(r));return t}return null}function b(e,t){return e===t||"number"==typeof e&&isNaN(e)&&"number"==typeof t&&isNaN(t)||"function"==typeof e?.getTime&&"function"==typeof t?.getTime&&e.getTime()===t.getTime()||!1}function h(e,t){return e===t||(null==e||"string"==typeof e?e===t:"number"==typeof e?e===t||"number"==typeof t&&isNaN(e)&&isNaN(t):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():Array.isArray(e)?Array.isArray(t)&&(0,n.aI)(e,t):e instanceof Set?t instanceof Set&&function(e,t){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}(e,t):e instanceof Map?t instanceof Map&&function(e,t){if(e.size!==t.size)return!1;for(const[r,n]of e){const e=t.get(r);if(e!==n||void 0===e&&!t.has(r))return!1}return!0}(e,t):!!d(e)&&d(t)&&function(e,t){if(null===e||null===t)return!1;const r=Object.keys(e);if(null===t||Object.keys(t).length!==r.length)return!1;for(const n of r)if(e[n]!==t[n]||!Object.prototype.hasOwnProperty.call(t,n))return!1;return!0}(e,t))}},97768(e,t,r){function n(e,t){if(null==e)throw new Error(t??"value is None")}function a(e){return e&&!e.destroyed&&e.destroy(),null}function o(e){return e?.dispose(),null}function s(e){return e?.remove(),null}function i(e){return e?.abort(),null}function c(e){return e?.release(),null}function l(e,t,r){return null!=e&&null!=t?null!=r?r(e,t):e.equals(t):e===t}function f(e,t){let r;return e.some((e,n)=>(r=t(e,n),null!=r)),r??void 0}r.d(t,{CM:()=>l,DC:()=>i,Gz:()=>c,Lw:()=>n,Pb:()=>f,WD:()=>o,pR:()=>a,xt:()=>s})},93637(e,t,r){r.d(t,{$N:()=>a,a4:()=>d,i7:()=>f,i8:()=>i,sM:()=>s,wc:()=>o});var n=r(4718);function a(e,t,r=!1){return l(e,t,r)}function o(e,t){if(null!=t)return t[e]||c(e.split("."),!1,t)}function s(e,t,r){const n=e.split("."),a=n.pop(),o=c(n,!0,r);o&&a&&(o[a]=t)}function i(e,t){if(null==e&&null==t)return!1;if(null==e)return!0;if(null==t)return!0;if("object"==typeof e){if(Array.isArray(e)){const r=t;if(e.length!==r.length)return!0;for(let t=0;t<e.length;t++)if(i(e[t],r[t]))return!0;return!1}if(Object.keys(e).length!==Object.keys(t).length)return!0;for(const r in e)if(i(e[r],t[r]))return!0;return!1}return e!==t}function c(e,t,r){let n=r;for(const r of e){if(null==n)return;if(!(r in n)){if(!t)return;n[r]={}}n=n[r]}return n}function l(e,t,r){return t?Object.keys(t).reduce((e,a)=>{if("__proto__"===a)return e;let o=e[a],s=t[a];return o===s?e:void 0===o?(e[a]=(0,n.o8)(s),e):(Array.isArray(s)||Array.isArray(e)?(o=o?Array.isArray(o)?e[a]=o.slice():e[a]=[o]:e[a]=[],s&&(Array.isArray(s)||(s=[s]),r?s.forEach(e=>{o.includes(e)||o.push(e)}):e[a]=s.slice())):s&&"object"==typeof s?e[a]=l(o,s,r):e.hasOwnProperty(a)&&!t.hasOwnProperty(a)||(e[a]=s),e)},e||{}):e}function f(e,t){for(const r of Object.entries(e))if(t===r[1])return r[0]}function d(e,t){return Object.values(e).includes(t)}},17676(e,t,r){r.d(t,{$X:()=>k,G4:()=>l,Lx:()=>g,Mq:()=>c,NK:()=>s,NO:()=>x,NY:()=>b,Ol:()=>w,Pl:()=>v,QP:()=>f,QZ:()=>m,Te:()=>i,YL:()=>_,hn:()=>P,jH:()=>d,nA:()=>y,qr:()=>h,sg:()=>A,u7:()=>u,z7:()=>O,zf:()=>p});var n=r(49186),a=r(37955),o=(r(53966),r(97768));function s(e="Aborted"){return new n.A("AbortError",e)}function i(e,t="Aborted"){if(l(e))throw s(t)}function c(e){return e instanceof AbortSignal?e:e?.signal??void 0}function l(e){const t=c(e);return null!=t&&t.aborted}function f(e){if(p(e))throw e}function d(e){if(!p(e))throw e}function u(e,t){const r=c(e);if(null!=r){if(!r.aborted)return(0,a.Oo)(r,"abort",()=>t());t()}}function b(e,t){const r=c(e);if(null!=r)return i(r),(0,a.Oo)(r,"abort",()=>t(s()))}function h(e,t){return null==c(t)?e:new Promise((r,n)=>{let a=u(t,()=>n(s()));const i=()=>{a=(0,o.xt)(a)};e.then(i,i),e.then(r,n)})}function p(e){return"AbortError"===e?.name}async function m(e){try{return await e}catch(e){if(!p(e))throw e;return}}async function g(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e),r=t.map(t=>e[t]),n=await g(r),a={};return t.map((e,t)=>a[e]=n[t]),a}const t=e;return Promise.allSettled(t).then(e=>Array.from(t,(t,r)=>{const n=e[r];return"fulfilled"===n.status?{promise:t,value:n.value}:{promise:t,error:n.reason}}))}async function y(e){return(await Promise.allSettled(e)).filter(e=>"fulfilled"===e.status).map(e=>e.value)}async function w(e){return(await Promise.allSettled(e)).filter(e=>"rejected"===e.status).map(e=>e.reason)}function v(e,t=void 0,r){const n=new AbortController;return u(r,()=>n.abort()),new Promise((r,a)=>{let o=setTimeout(()=>{o=0,r(t)},e);u(n,()=>{o&&(clearTimeout(o),a(s()))})})}function _(e,t){const r=new AbortController,n=setTimeout(()=>r.abort(),t);return u(e,()=>{r.abort(),clearTimeout(n)}),{...e,signal:r.signal}}function k(e){return e&&"function"==typeof e.then}function O(e){return k(e)?e:Promise.resolve(e)}function A(e,t=-1){let r,n,a,o,i=null;const c=(...l)=>{if(r){n=l,o&&o.reject(s()),o=Promise.withResolvers();const e=o.promise;if(i){const e=i;i=null,e.abort()}return e}if(a=o||Promise.withResolvers(),o=null,t>0){const n=new AbortController;r=O(e(...l,n.signal));const a=r;v(t).then(()=>{r===a&&(o?n.abort():i=n)})}else r=1,r=O(e(...l));const f=()=>{const e=n;n=a=r=i=null,null!=e&&c(...e)},d=r,u=a;return d.then(f,f),d.then(u.resolve,u.reject),u.promise};return c}function P(e,t){t.then(e.resolve,e.reject)}async function x(e){await Promise.resolve(),i(e)}},799(e,t,r){r.d(t,{Cj:()=>c,HC:()=>s,V2:()=>i,Wm:()=>l,_e:()=>u,xq:()=>f});var n=r(93637);const a=/\{([^}]+)\}/g;function o(e){return e??""}function s(e,t){return t?e.replaceAll(a,"object"==typeof t?(e,r)=>o((0,n.wc)(r,t)):(e,r)=>o(t(r))):e}function i(e,t){return e.replaceAll(/\$\{([^\s:}]*)(?::([^\s:}]+))?\}/g,(e,r)=>""===r?"$":((0,n.wc)(r,t)??"").toString())}function c(e,t){return e.replaceAll(/([.$?*|{}()[\]\\/+\-^])/g,e=>t?.includes(e)?e:`\\${e}`)}function l(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}function f(e,t=0){let r=3735928559^t,n=1103547991^t;for(let t,a=0;a<e.length;a++)t=e.charCodeAt(a),r=Math.imul(r^t,2654435761),n=Math.imul(n^t,1597334677);return r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)}let d;function u(e){return d??=new DOMParser,d.parseFromString(e||"","text/html").body.innerText||""}},12195(e,t,r){function n(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}r.d(t,{W:()=>n})},34275(e,t,r){function n(e){return e instanceof ArrayBuffer}function a(e){return"Int8Array"===e?.constructor?.name}function o(e){return"Uint8Array"===e?.constructor?.name}function s(e){return"Uint8ClampedArray"===e?.constructor?.name}function i(e){return"Int16Array"===e?.constructor?.name}function c(e){return"Uint16Array"===e?.constructor?.name}function l(e){return"Int32Array"===e?.constructor?.name}function f(e){return"Uint32Array"===e?.constructor?.name}function d(e){return"Float16Array"===e?.constructor?.name}function u(e){return"Float32Array"===e?.constructor?.name}function b(e){return"Float64Array"===e?.constructor?.name}function h(e){return"buffer"in e}r.d(t,{IY:()=>i,JI:()=>m,LW:()=>d,PI:()=>w,UR:()=>s,XJ:()=>f,_G:()=>l,a3:()=>y,aI:()=>b,dk:()=>g,dz:()=>a,h2:()=>v,iu:()=>h,jq:()=>c,mg:()=>o,mw:()=>n,vZ:()=>u,y9:()=>p});const p=1024;function m(e){return b(e)||u(e)||l(e)||i(e)||a(e)}function g(e){return b(e)||u(e)}function y(e){return b(e)?179769e303:d(e)?65504:u(e)?3402823e32:f(e)?4294967295:c(e)?65535:o(e)||s(e)?255:l(e)?2147483647:i(e)?32767:a(e)?127:256}const w=-32768,v=-2147483648},84952(e,t,r){r.d(t,{$1:()=>Y,$z:()=>G,An:()=>x,BQ:()=>ae,DB:()=>K,FL:()=>J,FX:()=>U,Hg:()=>te,Il:()=>ue,Ln:()=>me,N9:()=>ne,S8:()=>H,T1:()=>he,UC:()=>be,V1:()=>B,Xq:()=>A,Zo:()=>_e,_0:()=>Oe,a6:()=>ve,b8:()=>q,e7:()=>de,fj:()=>D,gd:()=>P,hf:()=>pe,lJ:()=>X,lM:()=>ie,m3:()=>se,nM:()=>fe,oP:()=>V,oy:()=>I,r$:()=>ee,rs:()=>we,s0:()=>v,s2:()=>z,sC:()=>L,s_:()=>j,tk:()=>re,ut:()=>T,w8:()=>Q,x0:()=>M,xw:()=>ke,yM:()=>C,zf:()=>S,zi:()=>ye,zs:()=>E});var n=r(92602),a=r(4576),o=r(49186),s=r(53966),i=r(12195),c=r(39131),l=r(26306);const f=n.A.request,d="esri/config: esriConfig.request.proxyUrl is not set.",u=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,b=/^\s*http:/i,h=/^\s*https:/i,p=/^\s*file:/i,m=/:\d+$/,g=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,y=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),w=new RegExp("^((([^[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^[:]*))(:([0-9]+))?$");class v{constructor(e=""){this.uri=e,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let t=this.uri.match(y);this.scheme=t[2]||(t[1]?"":null),this.authority=t[4]||(t[3]?"":null),this.path=t[5],this.query=t[7]||(t[6]?"":null),this.fragment=t[9]||(t[8]?"":null),null!=this.authority&&(t=this.authority.match(w),this.user=t[3]||null,this.password=t[4]||null,this.host=t[6]||t[7],this.port=t[9]||null)}toString(){return this.uri}}const _={};let k=new v(n.A.applicationUrl);let O=function(){const e=k.path,t=e.slice(0,e.lastIndexOf("/")+1);return`${k.scheme}://${k.host}${null!=k.port?`:${k.port}`:""}${t}`}();const A=()=>k,P=()=>O;function x(e){if(!e)return null;const t={path:null,query:null},r=new v(e),n=e.indexOf("?");return null===r.query?t.path=e:(t.path=e.slice(0,n),t.query=S(r.query)),r.fragment&&(t.hash=r.fragment,null===r.query&&(t.path=t.path.slice(0,t.path.length-(r.fragment.length+1)))),t}function S(e){const t=e.split("&"),r={};for(const e of t){if(!e)continue;const t=e.indexOf("=");let n,a;t<0?(n=decodeURIComponent(e),a=""):(n=decodeURIComponent(e.slice(0,t)),a=decodeURIComponent(e.slice(t+1)));let o=r[n];"string"==typeof o&&(o=r[n]=[o]),Array.isArray(o)?o.push(a):r[n]=a}return r}function M(e,t){return e?t&&"function"==typeof t?Object.keys(e).map(r=>encodeURIComponent(r)+"="+encodeURIComponent(t(r,e[r]))).join("&"):Object.keys(e).map(r=>{const n=e[r];if(null==n)return"";const a=encodeURIComponent(r)+"=",o=t?.[r];return o?a+encodeURIComponent(o(n)):Array.isArray(n)?n.map(e=>(0,i.W)(e)?a+encodeURIComponent(JSON.stringify(e)):a+encodeURIComponent(e)).join("&"):(0,i.W)(n)?a+encodeURIComponent(JSON.stringify(n)):a+encodeURIComponent(n)}).filter(e=>e).join("&"):""}function j(e=!1){let t,r=f.proxyUrl;if("string"==typeof e){t=se(e);const n=E(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw s.A.getLogger("esri.core.urlUtils").warn(d),new o.A("urlUtils:proxy-not-set",d);return t&&ce()&&(r=ie(r)),x(r)}function C(e,t=!1){const r=E(e);let n,a;if(r){const e=N(r.proxyUrl);n=e.path,a=e.query?S(e.query):null}else if(t){const t=j(e);n=t.path,a=t.query}if(n){const t=x(e);e=n+"?"+t.path;const r=M({...a,...t.query});r&&(e=`${e}?${r}`)}return e}const $={path:"",query:""};function N(e){const t=e.indexOf("?");return-1!==t?($.path=e.slice(0,t),$.query=e.slice(t+1)):($.path=e,$.query=null),$}function W(e){return(e=le(e=ue(e=N(e).path),!0)).toLowerCase()}function I(e){const t={proxyUrl:e.proxyUrl,urlPrefix:W(e.urlPrefix)},r=f.proxyRules,n=t.urlPrefix;let a=r.length;for(let e=0;e<r.length;e++){const t=r[e].urlPrefix;if(n.startsWith(t)){if(n.length===t.length)return-1;a=e;break}t.startsWith(n)&&(a=e+1)}return r.splice(a,0,t),a}function E(e){const t=f.proxyRules,r=W(e);for(let e=0;e<t.length;e++)if(r.startsWith(t[e].urlPrefix))return t[e]}function q(e,t){if(!e||!t)return!1;e=R(e),t=R(t);const r=(0,c.py)(e),n=(0,c.py)(t);return null!=r&&null!=n?r.portalHostname===n.portalHostname:null==r&&null==n&&U(e,t,!0)}function T(e,t){return e=R(e),t=R(t),le(e)===le(t)}function R(e){const t=(e=H(e)).indexOf("/sharing");return t>0?e.slice(0,t):e.replace(/\/+$/,"")}function L(e,t=f.interceptors){const r=t=>t instanceof RegExp?t.test(e):"string"==typeof t?e.startsWith(t):null==t;if(t)for(const e of t)if(Array.isArray(e.urls)){if(e.urls.some(r))return e}else if(r(e.urls))return e;return null}function U(e,t,r=!1){if(!e||!t)return!1;const n=ge(e),a=ge(t);return!(!r&&n.scheme!==a.scheme)&&null!=n.host&&null!=a.host&&n.host.toLowerCase()===a.host.toLowerCase()&&n.port===a.port}function J(e){if("string"==typeof e){if(!V(e))return!0;e=ge(e)}if(U(e,k))return!0;const t=f.trustedServers||[];for(let r=0;r<t.length;r++){const n=F(t[r]);for(let t=0;t<n.length;t++)if(U(e,n[t]))return!0}return!1}function F(e){return _[e]||(oe(e)||ae(e)?_[e]=[new v(z(e))]:_[e]=[new v(`http://${e}`),new v(`https://${e}`)]),_[e]}function z(e,t=O,r){return ae(e)?r?.preserveProtocolRelative?e:"http"===k.scheme&&k.authority===G(e).slice(2)?`http:${e}`:`https:${e}`:oe(e)?e:D(e.startsWith("/")?function(e){const t=e.indexOf("//"),r=e.indexOf("/",t+2);return-1===r?e:e.slice(0,r)}(t):t,e)}function B(e,t=O,r){if(null==e||!V(e))return e;const n=H(e),a=n.toLowerCase(),o=H(t).toLowerCase().replace(/\/+$/,""),s=r?H(r).toLowerCase().replace(/\/+$/,""):null;if(s&&!o.startsWith(s))return e;const i=(e,t,r)=>-1===(r=e.indexOf(t,r))?e.length:r;let c=i(a,"/",a.indexOf("//")+2),l=-1;for(;a.slice(0,c+1)===o.slice(0,c)+"/"&&(l=c+1,c!==a.length);)c=i(a,"/",c+1);if(-1===l)return e;if(s&&l<s.length)return e;e=n.slice(l);const f=o.slice(l-1).replaceAll(/[^/]+/g,"").length;if(f>0)for(let t=0;t<f;t++)e=`../${e}`;else e=`./${e}`;return e}function H(e){return function(e){const t=f.httpsDomains;if(!function(e){return null!=e&&b.test(e)||"http"===k.scheme&&ae(e)}(e))return e;const r=e.indexOf("/",7);let n;if(n=-1===r?e:e.slice(0,r),n=n.toLowerCase().slice(7),m.test(n)){if(!n.endsWith(":80"))return e;n=n.slice(0,-3),e=e.replace(":80","")}return"http"===k.scheme&&n===k.authority&&!g.test(e)||(ce()&&n===k.authority||t&&t.some(e=>n===e||n.endsWith(`.${e}`))||ce()&&!E(e))&&(e=ie(e)),e}(e=function(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}(e=function(e){if(/^https?:\/\//i.test(e)){const t=N(e);e=(e=t.path.replaceAll(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}(e=z(e=e.trim()))))}function D(...e){const t=e.filter(a.Ru);if(!t?.length)return;const r=[];if(V(t[0])){const e=t[0],n=e.indexOf("//");-1!==n&&(r.push(e.slice(0,n+1)),function(e){return null!=e&&p.test(e)}(t[0])&&(r[0]+="/"),t[0]=e.slice(n+2))}else t[0].startsWith("/")&&r.push("");const n=t.reduce((e,t)=>t?e.concat(t.split("/")):e,[]);for(let e=0;e<n.length;e++){const t=n[e];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&e===n.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function G(e,t=!1){if(null==e||Q(e)||K(e))return null;let r=e.indexOf("://");if(-1===r&&ae(e))r=2;else{if(-1===r)return null;r+=3}const n=e.indexOf("/",r);return-1!==n&&(e=e.slice(0,n)),t&&(e=le(e,!0)),e}function V(e){return ae(e)||oe(e)}function Q(e){return null!=e&&e.startsWith("blob:")}function K(e){return null!=e&&e.startsWith("data:")}function X(e){const t=ee(e);return t?.isBase64?(0,l.M)(t.data):null}function Y(e){return(0,l.Y)(e).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}const Z=/^data:(.*?)(;base64)?,(.*)$/;function ee(e){const t=e.match(Z);if(!t)return null;const[,r,n,a]=t;return{mediaType:r,isBase64:!!n,data:a}}function te(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}async function re(e){return(await fetch(e)).blob()}function ne(e){const t=X(e);if(!t)return null;const r=ee(e);return new Blob([t],{type:r.mediaType})}function ae(e){return null!=e&&e.startsWith("/")&&"/"===e[1]}function oe(e){return null!=e&&u.test(e)}function se(e){return null!=e&&h.test(e)||"https"===k.scheme&&ae(e)}function ie(e){return ae(e)?`https:${e}`:e.replace(b,"https:")}function ce(){return"https"===k.scheme}function le(e,t=!1){return ae(e)?e.slice(2):(e=e.replace(u,""),t&&e.length>1&&e.startsWith("/")&&"/"===e[1]&&(e=e.slice(2)),e)}function fe(e){let t=0;if(V(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function de(e,t){if(!e)return"";const r=x(e).path.replace(/\/+$/,""),n=r.slice(r.lastIndexOf("/")+1);if(!t?.length)return n;const a=new RegExp(`\\.(${t.join("|")})$`,"i");return n.replace(a,"")}function ue(e){return e.endsWith("/")?e:`${e}/`}function be(e){return e.replace(/\/+$/,"")}function he(e,t,r){if(!(t&&r&&e&&V(e)))return e;const n=e.indexOf("//"),a=e.indexOf("/",n+2),o=e.indexOf(":",n+2),s=Math.min(a<0?e.length:a,o<0?e.length:o);return e.slice(n+2,s).toLowerCase()!==t.toLowerCase()?e:`${e.slice(0,n+2)}${r}${e.slice(s)}`}function pe(e,t){const r=new URL(e);return r.host=t,r.port&&!m.test(t)&&(r.port=""),r.toString()}function me(e){return new URL(e).host}function ge(e){return"string"==typeof e?new v(z(e)):(e.scheme||(e.scheme=k.scheme),e)}function ye(e,t){const r=x(e),n=Object.keys(r.query||{});return n.length>0&&t&&t.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${n.join(", ")}.`),r.path}function we(e,t,r){const n=x(e),a=n.query||{};return a[t]=String(r),`${n.path}?${M(a)}`}function ve(e,t){if(!t)return e;const r=x(e),n=r.query||{};for(const[e,r]of Object.entries(t))null!=r&&(n[e]=r);const a=M(n);return a?`${r.path}?${a}`:r.path}function _e(e){if(null==e)return null;const t=e.match(Ae);return t?t[2]:null}function ke(e){if(null==e)return null;const t=e.match(Ae);return t?{path:t[1],extension:t[2]}:{path:e,extension:null}}async function Oe(e){return"string"==typeof e?ee(e)??{data:e}:new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(ee(n.result)),n.onerror=e=>r(e)})}const Ae=/([^.]*)\.([^/]*)$/},52268(e,t,r){function n(e,t){return new Proxy({},{get:(r,n,a)=>(...r)=>{let a,o;const s=r[r.length-1];return function(e){return"object"==typeof e&&!Array.isArray(e)&&null!=e&&("signal"in e||"transferList"in e||0===Object.keys(e).length)}(s)&&(a=s.signal,o=s.transferList,r.pop()),e.apply(t?`${t}.${n.toString()}`:n.toString(),r,{transferList:o,signal:a})}})}r.d(t,{L:()=>n})},61322(e,t,r){r.r(t),r.d(t,{default:()=>v});var n=r(70333),a=r(49186),o=r(37955),s=r(36563),i=r(97768),c=r(17676),l=r(52268);const f={CSVSourceWorker:()=>Promise.all([r.e(6408),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(708),r.e(9696),r.e(4800),r.e(2031),r.e(5752),r.e(8815),r.e(2188)]).then(r.bind(r,25209)),EdgeProcessingWorker:()=>Promise.all([r.e(1843),r.e(6661),r.e(433)]).then(r.bind(r,71936)),ElevationSamplerWorker:()=>Promise.all([r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(2031),r.e(4259)]).then(r.bind(r,38419)),FeaturePipelineWorker:()=>Promise.all([r.e(6408),r.e(4050),r.e(9953),r.e(8303),r.e(1956),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(893),r.e(708),r.e(9696),r.e(4800),r.e(2031),r.e(5752),r.e(8815),r.e(7273),r.e(7733),r.e(2649),r.e(3383),r.e(4063),r.e(5458),r.e(9650)]).then(r.bind(r,37269)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(6408),r.e(1956),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(893),r.e(708),r.e(9696),r.e(4800),r.e(2031),r.e(5752),r.e(8815),r.e(4063),r.e(88)]).then(r.bind(r,20401)),FlowWorker:()=>Promise.all([r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(9616)]).then(r.bind(r,49616)),GaussianSplatSortWorker:()=>r.e(5856).then(r.bind(r,35856)),GeometryWorker:()=>Promise.all([r.e(6042),r.e(1878),r.e(8885),r.e(5756),r.e(3299),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(5151)]).then(r.bind(r,55912)),GeoJSONSourceWorker:()=>Promise.all([r.e(6408),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(708),r.e(9696),r.e(4800),r.e(2031),r.e(5752),r.e(8815),r.e(847)]).then(r.bind(r,71202)),IntegratedMesh3DTilesLayerWorker:()=>Promise.all([r.e(1843),r.e(4066)]).then(r.bind(r,77214)),LercWorker:()=>r.e(7087).then(r.bind(r,57087)),Lyr3DWorker:()=>Promise.all([r.e(2741),r.e(2772)]).then(r.bind(r,72772)),MemorySourceWorker:()=>Promise.all([r.e(6408),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(708),r.e(9696),r.e(4800),r.e(2031),r.e(5752),r.e(8815),r.e(7229)]).then(r.bind(r,29432)),PBFDecoderWorker:()=>Promise.all([r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(9078)]).then(r.bind(r,39078)),PanoramicMeshWorker:()=>Promise.all([r.e(9466),r.e(5482),r.e(4314)]).then(r.bind(r,96982)),ParquetSourceWorker:()=>Promise.all([r.e(6408),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(708),r.e(9696),r.e(4800),r.e(2031),r.e(5752),r.e(8815),r.e(7733),r.e(3383),r.e(7125)]).then(r.bind(r,48459)),PointCloudWorker:()=>Promise.all([r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(7005),r.e(3290),r.e(7984),r.e(3846)]).then(r.bind(r,64798)),RasterWorker:()=>Promise.all([r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(8251),r.e(7373),r.e(9235),r.e(1493)]).then(r.bind(r,63966)),SceneLayerSnappingSourceWorker:()=>Promise.all([r.e(9466),r.e(1843),r.e(6661),r.e(1448)]).then(r.bind(r,56780)),SceneLayerWorker:()=>Promise.all([r.e(6408),r.e(9953),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(3586)]).then(r.bind(r,94715)),TextureCompressionWorker:()=>Promise.all([r.e(2741),r.e(5902)]).then(r.bind(r,95902)),WFSSourceWorker:()=>Promise.all([r.e(6408),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(708),r.e(9696),r.e(4800),r.e(2031),r.e(5752),r.e(8815),r.e(4794)]).then(r.bind(r,33771)),WorkerTileHandler:()=>Promise.all([r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(7273),r.e(5013),r.e(9981)]).then(r.bind(r,36849)),arcadeGeometryOperatorsWorker:()=>Promise.all([r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(5750)]).then(r.bind(r,1123)),statsWorker:()=>Promise.all([r.e(6408),r.e(7865),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8815),r.e(4560),r.e(5220)]).then(r.bind(r,26412)),ImageMeasurementWorker:()=>Promise.all([r.e(6408),r.e(6042),r.e(1878),r.e(8885),r.e(5756),r.e(3299),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(4050),r.e(3910),r.e(9953),r.e(8303),r.e(1733),r.e(1956),r.e(9466),r.e(5482),r.e(2741),r.e(4996),r.e(8902),r.e(1882),r.e(893),r.e(6231),r.e(4800),r.e(812),r.e(8815),r.e(7016),r.e(8251),r.e(3356),r.e(1695),r.e(7598),r.e(1775)]).then(r.bind(r,68747))};var d=r(8341),u=r(18357);const{CLOSE:b,ABORT:h,INVOKE:p,RESPONSE:m,OPEN_PORT:g,ON:y}=d.Go;class w{constructor(e){this._invoke=e,this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._timer=null,this._process=this._process.bind(this)}push(e){e.type===h?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class v{static{this.kernelInfo={buildDate:u.$,fullVersion:n.ol,revision:u.u}}static{this.clients=new Map}static connect(e,t){const r=new MessageChannel;let n;n="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const a=new v(r.port1,{channel:r,client:n,schedule:t});return"object"==typeof n&&"remoteClient"in n&&(n.remoteClient=a),v.clients.set(a,n),r.port2}static loadWorker(e){const t=f[e];return t?t():Promise.resolve(null)}constructor(e,t,r,n){this._port=e,this._jobQueue=r,this._lowPriorityJobQueue=n,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new w(e=>this._onInvokeMessage(e)),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._maxNumberOfConcurrentJobs=t.maxNumberOfConcurrentJobs??2,this._port.addEventListener("message",this._onMessage),this._port.start()}close(){this._post({type:b}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const n=r?.signal,o=r?.transferList;if(!this._port)return Promise.reject(new a.A(d.T,`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const s=(0,d.Jc)();return new Promise((r,a)=>{if((0,c.G4)(n))return this._processWork(),void a((0,c.NK)());const l=(0,c.u7)(n,()=>{const e=this._outJobs.get(s);e&&(this._outJobs.delete(s),this._processWork(),(0,i.xt)(e.abortHandle),this._post({type:h,jobId:s}),a((0,c.NK)()))}),f={resolve:r,reject:a,abortHandle:l,debugInfo:e};this._outJobs.set(s,f),this._post({type:p,jobId:s,methodName:e,abortable:null!=n},t,o)})}createInvokeProxy(e){return(0,l.L)(this,e)}on(e,t){const r=new MessageChannel;function n(e){t(e.data)}return this._port.postMessage({type:y,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",n),r.port1.start(),(0,s.hA)(()=>{r.port1.postMessage({type:b}),r.port1.close(),r.port1.removeEventListener("message",n)})}jobAdded(){this._processWork()}openPort(){const e=new MessageChannel;return this._post({type:g,port:e.port2}),e.port1}_processWork(){if(this._outJobs.size>=this._maxNumberOfConcurrentJobs)return;const e=this._jobQueue?.pop()??this._lowPriorityJobQueue?.pop();if(!e)return;const{methodName:t,data:r,invokeOptions:n,resolver:a}=e;this.apply(t,r,n).then(e=>a.resolve(e)).catch(e=>a.reject(e))}_close(){this._channel&&(this._channel=void 0),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach(e=>{(0,i.xt)(e.abortHandle),e.reject((0,c.NK)(`Worker closing, aborting job calling '${e.debugInfo}'`))}),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=null,this._client=null,this._schedule=null,this._onMessage=null,this._channel=null,this._jobQueue=void 0,this._invokeQueue=void 0,this._lowPriorityJobQueue=void 0}_onMessage(e){null!=this._schedule?this._schedule(()=>this._processMessage(e,!0)):this._processMessage(e,!1)}_processMessage(e,t){const r=(0,d.VI)(e);if(r)switch(r.type){case m:this._onResponseMessage(r);break;case p:t?this._onInvokeMessage(r):this._invokeQueue.push(r);break;case h:this._onAbortMessage(r);break;case b:this._onCloseMessage();break;case g:this._onOpenPortMessage(r);break;case y:this._onOnMessage(r)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);this._invokeQueue.push(e),n&&(n.controller&&n.controller.abort(),t.delete(r))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&v.clients.get(this)===e&&e.destroy(),v.clients.delete(this),e?.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n=[],abortable:a}=e,o=a?new AbortController:null,s=this._inJobs;let i,l=this._client,f=l[t];try{if(!f&&t&&t.includes(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)l=l[e[t]],f=l[e[t+1]]}if("function"!=typeof f)throw new TypeError(`${t} is not a function`);n.push({client:this,signal:o?o.signal:null}),i=f.apply(l,n)}catch(e){return void this._post({type:m,jobId:r,error:(0,d.mF)(e)})}(0,c.$X)(i)?(s.set(r,{controller:o,promise:i}),i.then(e=>{s.has(r)&&(s.delete(r),this._post({type:m,jobId:r},e))},e=>{s.has(r)&&(s.delete(r),(0,c.zf)(e)||this._post({type:m,jobId:r,error:(0,d.mF)(e||{message:`Error encountered at method ${t}`})}))})):this._post({type:m,jobId:r},i)}_onOpenPortMessage(e){new v(e.port,{client:this._client})}_onOnMessage(e){const{port:t}=e,r=this._client.on(e.eventType,e=>{t.postMessage(e)}),n=(0,o.on)(e.port,"message",e=>{const a=(0,d.VI)(e);a?.type===b&&(n.remove(),r.remove(),t.close())})}_onResponseMessage(e){const{jobId:t,error:r,data:n}=e,o=this._outJobs;if(!o.has(t))return;const s=o.get(t);o.delete(t),this._processWork(),(0,i.xt)(s.abortHandle),r?s.reject(a.A.fromJSON(JSON.parse(r))):s.resolve(n)}_post(e,t,r){return(0,d.u1)(this._port,e,t,r)}}},8341(e,t,r){r.d(t,{Go:()=>s,Jc:()=>c,T:()=>o,VI:()=>d,mF:()=>l,oV:()=>b,u1:()=>f});var n=r(44208),a=r(17676);const o="worker:port-closed",s={HANDSHAKE:0,OPEN:1,OPENED:2,RESPONSE:3,INVOKE:4,ABORT:5,CLOSE:6,OPEN_PORT:7,ON:8};let i=0;function c(){return i++}function l(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function f(e,t,r,n){if(t.type===s.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==s.INVOKE&&t.type!==s.RESPONSE)return void e.postMessage(t);let a;!function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(r)?(a=u(n),t.data=r):(a=u(r.transferList),t.data=r.result),a?e.postMessage(t,a):e.postMessage(t)}function d(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function u(e){if(!e?.length)return null;if((0,n.A)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter(e=>!function(e){return e instanceof ArrayBuffer||"ArrayBuffer"===e?.constructor?.name}(e));return t.length?t:null}async function b(e){try{return await e}catch(e){const t=e?.name===o;if(!(0,a.zf)(e)&&!t)throw e;return}}},70333(e,t,r){r.d(t,{Aq:()=>c,Y3:()=>l,id:()=>s,ol:()=>i,rE:()=>o});var n=r(44208),a=r(84952);Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const o="5.1";let s,i=o;function c(e){s=e}function l(e){const t=s?.findCredential(e);return t?.token?(0,a.rs)(e,"token",t.token):e}i="5.1.0-next.89",(0,n.A)("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),(0,n.A)("host-webworker")},39131(e,t,r){r.d(t,{$E:()=>s,py:()=>o,qG:()=>i});const n=/^https:\/\/([a-z\d-]+)(\.maps([^.]*))?\.arcgis\.com/i,a={devext:{customBaseUrl:"mapsdevext.arcgis.com",portalHostname:"devext.arcgis.com"},qaext:{customBaseUrl:"mapsqa.arcgis.com",portalHostname:"qaext.arcgis.com"},www:{customBaseUrl:"maps.arcgis.com",portalHostname:"www.arcgis.com"}};function o(e){const t=e?.match(n);if(!t)return null;const[,r,o,s]=t;if(!r)return null;let i=null,c=null,l=null;const{devext:f,qaext:d,www:u}=a;if(o)if(i=r,s)switch(s.toLowerCase()){case"devext":({customBaseUrl:c,portalHostname:l}=f);break;case"qa":({customBaseUrl:c,portalHostname:l}=d);break;default:return null}else({customBaseUrl:c,portalHostname:l}=u);else switch(r.toLowerCase()){case"devext":({customBaseUrl:c,portalHostname:l}=f);break;case"qaext":({customBaseUrl:c,portalHostname:l}=d);break;case"www":({customBaseUrl:c,portalHostname:l}=u);break;default:return null}return{customBaseUrl:c,isPortal:!1,portalHostname:l,urlKey:i}}function s(e){return!!e&&/\/(sharing|usrsvcs)\/(appservices|servers)\//i.test(e)}function i(e){const t=/^https?:\/\/(?:cdn|[a-z\d-]+\.maps)\.arcgis\.com/i,r=/^https?:\/\/(?:cdndev|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,n=/^https?:\/\/(?:cdnqa|[a-z\d-]+\.mapsqa)\.arcgis\.com/i;return t.test(e)?e=e.replace(t,"https://www.arcgis.com"):r.test(e)?e=e.replace(r,"https://devext.arcgis.com"):n.test(e)&&(e=e.replace(n,"https://qaext.arcgis.com")),e}},26306(e,t,r){function n(e){const t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r.buffer}function a(e){const t=new Uint8Array(e);let r="";for(let e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return btoa(r)}r.d(t,{M:()=>n,Y:()=>a})},18357(e,t,r){r.d(t,{$:()=>n,u:()=>a});const n="20260501",a="953ffe7a6665912cc6de0820a64c7a5e03d29b73"}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.m=e,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,n)=>(r.f[n](e,t),t),[])),r.u=e=>"chunks/"+{5:"d52172439db02a349542",88:"0840e7dd62643c56ae9e",91:"ca1b0cb14ea9ae1bf2a3",146:"06003996a378c45bc605",148:"1e4e7111d43f01c149b3",217:"cd0c232f4e3868d91a05",218:"52b3a11c962810bc6dbe",233:"074f5e6aaeafca13bf72",241:"dd5b362bded458afa2d6",309:"086d7cdfa92a649c9f7b",349:"7908aed639521cf572e8",353:"65520a443e3811255bea",368:"1906416c84bab369bbd6",369:"8a0a13f398ab488dbbe9",382:"d28169816c768d55aa09",390:"128799741dd3c6fc69b9",427:"d35c475f004367e333eb",433:"6675d56f49d07a97dc40",463:"d95ffd990b3a7df69e1e",477:"a508104179e08f0f268c",540:"51716e411fad624ac21c",547:"63934843c9f4ef779a07",561:"5b6f2bfdcdd207d8ae42",563:"88827e23f8938342781c",566:"3c2eb386c0165150e039",609:"176dd195f77b98cb0b0f",668:"3feec3d08424b94e1bcf",692:"34207774bc371e95ba3c",708:"9d10db72e342fe63c981",709:"394812e19b6915d560b0",758:"206bdfd868a9ef88f3a8",763:"83f1871d04c979fa23b7",785:"cca095f0c623e037002d",788:"d31f62ecbb54bffc54f2",795:"5afee66e182f79a0fc46",812:"a3a28c4887f802e8d96d",820:"aafa33f661462f5afd2b",837:"09630888267cde87654f",841:"747e258f57f0543c836e",847:"f2c11f54255fd506655e",891:"d55cef8199b8246fea3f",893:"fa869bfe4366f7f49cca",895:"60915a3708a34da1977e",909:"46b16501db6681dc467b",923:"bd10d21545bca9a49de0",926:"f1f78bb3d34f973c19de",959:"8a48a6760c33ed50b650",980:"74e1826ad9e2c4fd3b42",1003:"3d9032217347dadcbe41",1011:"dbc9249dae41096d750d",1017:"3092184350d66c79f610",1023:"b858adff7043683fe41c",1054:"bc78937986854e500b8e",1060:"f518835b2dc89a48cfb1",1075:"b803e7b0d489bb628d72",1086:"d7e7f3efd1d28617b808",1088:"dec51409372764e7093d",1094:"1ff3c15a51c4dc991806",1132:"2b0b398180ed98c2c84c",1204:"4b79ebfb3328f9483147",1214:"be1e4c3ec53fc92a26f1",1273:"cc697c4d9cdc116373dc",1277:"7a474ce61cf484df87b4",1279:"b5ced451d331ca1ffb68",1285:"a0d459bdb91ee892d4b6",1384:"5b70295da76d9227f64b",1427:"79dc7045d9a2d43ba8df",1448:"988e91cc6cf88c34c2de",1452:"3a183259805638c25363",1493:"230e0e43f8e771950397",1512:"d8decaee2c780e1b5e35",1521:"7b505112c7e6d9b7a239",1550:"34b6b5dd415c68f0b0d1",1666:"8b046e28f879079caada",1695:"ceff78c9e31e3572a082",1698:"52175ff9e8c2c136f90a",1728:"d897412b99b9fba44bb4",1733:"7f0f10946f05a09b5654",1763:"601e44839fd46e449aa8",1775:"a232d05c0a055f398c6e",1787:"40d251b6b42a41d68bd2",1812:"47b3a5213539548ff3a6",1822:"27f67a3828b78d4c1413",1837:"3a8320a40916c755c031",1843:"dcb7a3ff59677b1cf0f1",1878:"4c54cb80c4dc9bbbd395",1882:"b1a21a4d7d73ad7d0e47",1894:"de6b3f80070abdd61d0f",1918:"24646a1176ce34039155",1948:"e9c5c295b6bf10e942a4",1951:"6124141ac642e4ce1454",1956:"169ca3724053fc046d1b",1965:"384c235d36f32769e32b",2013:"abdf146b35e179b5b245",2031:"77769663cd712822d33e",2042:"015fc0a17b17d69cc3bb",2045:"3397eae416622c64e628",2059:"5cffc7b49966201eccdb",2158:"359d3acb3953e64e5a78",2174:"b73c146d3e550eaf07eb",2186:"c45a5bcf26659daf02a1",2188:"bb8d596f15fd3a0d783a",2246:"9f51a69b8f1937a8794a",2260:"3efbb684c0409955186d",2261:"80f4f686ce403cb2693f",2288:"1a35121a0c2595a41fdb",2293:"c9461568e1002ebac534",2314:"bf2c202dec5ab7bc770b",2343:"2b3a8a53cd68f666676b",2372:"7cb0681cc6a5e956cb15",2390:"d51c41c1944df0cbab3e",2409:"f890cfa4932955ecd4e7",2423:"2b2283f1ee4bfc1baa18",2465:"a242ec19a7508de436da",2491:"d82da31dc702b8fd6a07",2558:"2d956dacb26d71d1c174",2597:"48549d3d7bf0154c0afa",2649:"7160e3e7340beb7fdb42",2733:"43f58604ba4a94a9167c",2741:"90a8dfb03a437fe8a6e7",2764:"cc62e5095e328bed3e01",2772:"4c73c2f4331351e2a50c",2869:"1961b59756933e0a82f2",2942:"6f67c9f68101a084b683",2958:"9802770413ad814dab29",2980:"3087910d19959fdc546b",2990:"c31ee5617c61a933cb0e",2997:"3dd5d481ae6c5d9dfa08",3053:"cc0f3b9b153a0c232afe",3090:"4e206957b28253ddc1a3",3103:"6ee956d5a92ca905f53f",3116:"da008d6a3afb30d18392",3166:"0539b5d015157c1d34a0",3251:"9c09097e390985bbac58",3276:"4a23b27bfbcfa08fd9a7",3290:"54c6e870262469d0d702",3299:"dd6efa0afe879bd11a2e",3300:"2343b1105bc4c1b4a086",3304:"0fa207c68dfd7ddee160",3356:"dde94664110ff231a52d",3359:"413d2fa54508e6f42c74",3383:"d5ad036d282df54b9ddc",3390:"9c11e1fe785e1385fdb1",3456:"dc54d4a9fe1691862356",3500:"427dec43ef2d67467699",3543:"48acd146bf0241d87647",3561:"851fc5290497991ba001",3586:"af8bc56cf1404afc3028",3636:"81d761c837b7456ec99f",3661:"1f53620f82cc7c3daabe",3666:"53817ef8c00d8cce4b8e",3693:"752f4e0e2961fc315dca",3708:"19fcc74d34cbbaa56a41",3813:"4605a68e40c5c3ac6e3e",3846:"728ad5bbbcbf88d6249f",3902:"0cc4b3100a7a453bd058",3910:"38c28189f273636e4017",3931:"a320998f18922a35899f",3937:"86161025b53b916328ff",4038:"4e676e888a935c507d90",4050:"02e8fc598ee09cf1b678",4063:"2a2e97918524e0f436d7",4066:"cfaa6e205bfc0c94a1b1",4097:"7601278ebced0c0c31cf",4167:"1d54b71c43d9d6a5f713",4168:"a015c2f54eb91e43a1f4",4259:"a28124bba6b43efd74cc",4273:"f1673e723b336204ad77",4314:"c961aff385e38b081204",4342:"2a3145a595d19391bb8a",4383:"9c6d34bb666f630d511f",4401:"566f6319ded0634769e0",4447:"f52443cd203e687551da",4560:"13a8346abe5509167578",4575:"18f77ee3552d92962f15",4579:"53750e85f3128993a43a",4594:"c19e3f6027b6526de359",4642:"1765dfeac20e34ce25b7",4674:"a6b75576d598ec161cc4",4690:"f563dd6cace047108b3c",4703:"f36345ebb9851ab92453",4744:"c3e89c7c7b677bd18557",4794:"4b9b9e6136c11d5d7901",4795:"aac6a57edd7494125204",4800:"41a95ad470ec42ecd5a2",4849:"9482a6d7baa24bbf5693",4906:"73af4c947e8151d411c1",4935:"146424b5717d0a645ee1",4996:"b811d62284be95f4beb6",5011:"b2662bfdbd1e3623ceb9",5013:"afc0baf86ece710ef867",5020:"9a5ef33d99a8f89956ff",5090:"127cd8fee3717a473fc5",5098:"0e3dcf99382478181366",5141:"3c9482764c9e4f8bcbb0",5151:"f468c6ea2818a1f97e19",5165:"969f58a2de4ebe63619d",5217:"a2159df718a7f2f59271",5220:"5ef37f37e405b3bb5450",5243:"7ed5b669010db58845f8",5275:"8a5a827ee557d9f9a66e",5280:"a432219de6a873f88776",5354:"04ea806b933d4dd41609",5359:"00e9e25269d5776f8645",5367:"df8a3d3cac454d42e14d",5404:"64e268ebac0b62076f81",5408:"aefeb5a17bb481c95da3",5431:"85da2987e17b6755a94e",5458:"61fada8942b65fa0b5e1",5474:"577cbc131b21c351fae5",5482:"9be4438ce2c7180adadf",5594:"7ba67f1d7831a5576a5a",5601:"bb5f909a2f26fc6a21b0",5611:"e18badd11f360cc2912b",5613:"c49c078be08c38a6088d",5647:"adfa5c136c72c1e65770",5680:"5409369d0d637cb30257",5740:"d598d08dbf2796742e8c",5750:"72f8f4cfa0842d325fb0",5752:"e6fe8b5fbe95de01453b",5756:"1f6b7626f333809837ef",5804:"0c13591347d51d684561",5828:"ee057c85cdf6beb5b012",5841:"ffcd4fca7f67e1f943f1",5856:"be1d2c3a61e6447fbbc7",5902:"7b8466f892a38a53c600",6005:"54c035cdc171998d0776",6027:"c1189316d24fb4cdb2a0",6033:"ef0085aa743b33cb549f",6042:"312036c89a6a09bb06c2",6052:"e4e0c5a45cf32973d5d5",6061:"493a0981e90a5799fb5b",6122:"1ede8666d804c553803e",6129:"0d9d33f29124d464a4cb",6154:"ac84e5b5d010c235fe6f",6160:"bb3ab2453ccde2f2611c",6187:"2ecb21c402cdd8c82533",6219:"cb81d524f12edcadb9bb",6231:"9639b1dd27ccc17ee21e",6233:"0a6df243b18acae471be",6247:"452c01cecbbd1e370098",6276:"55fd201ca5e10c6e4761",6312:"6a3d207308b29651f397",6343:"91f9e0e3662d4bf9f163",6408:"a96c7432ca97cbeef4b8",6452:"b4bac22467e96be7a974",6491:"eaab5ac049622986e3bc",6554:"d0983cc19d19c19c3478",6558:"34f79355145c8e4c59dd",6569:"2fd4220131bfc3f5e2dd",6606:"1768f1a7e3caa6074d91",6650:"f7531aa69a87814c60d1",6661:"39d6032d79720935910d",6671:"915e2711d3a2cfa402b2",6684:"af762422a65c551dcd54",6708:"ce7ef7c4ca14d66d96f6",6765:"f0250cecb243b32cdba7",6859:"3be111488365768fd917",6861:"7c820c5f6f05480d5050",6936:"702e8468836863abd81b",6956:"16a767cc5f3e2e0e49c2",6960:"852f4cd514008fee5a55",7005:"95d82c619dcbec2e1050",7016:"5fccb372b4d5ee2f64cc",7033:"4c97cc922eece3a91b6b",7087:"e0b47b08ae2c36c76fa2",7125:"baea6f86b2dbe067940e",7217:"a7f9f478bd1493fc3c76",7229:"2dcfc4d7e76c922bcbf9",7269:"d11de13537b623739e14",7273:"1f85646936200a399c15",7301:"e7402dfd683f82878360",7316:"edee616b6f1b5be8fd39",7367:"6c35583707f5c339ee99",7373:"3e2953ea62817e75d840",7433:"f05932aea4eb267cba4d",7444:"13838b6c045425e73cf8",7464:"47656ec12401e53f4bd3",7546:"f50bba74ae72c07e131a",7548:"56717ff315c6ec874142",7561:"d3c760109a70a71448c5",7598:"7ef51b0ebd560113ae7e",7609:"5c7ba4b8a9ec2e2e02b5",7632:"612873df0c8659ac2aa5",7705:"2387613b855771a3e537",7733:"7601408e242dca1d25bd",7772:"56941e8bbd2d49bf2656",7835:"804c31973f7d116523cb",7865:"58c79e15ca95238a4b43",7883:"ee7e9bca57160694b3c4",7891:"f53805c7a84203305b2c",7925:"bea2fd831d7a864e5995",7982:"fade7b878a9498382bb2",7984:"6d696beddcc5fbed5875",7987:"61c523dd9d8027922465",7990:"aa6808146c76b2d49b64",7992:"7b6c8be59ed87e386aa4",8010:"39d71e83261bff46f6bf",8018:"8f6833671c071b522923",8050:"b50a42a9f96515beb929",8125:"4301cb9670fa7c907460",8251:"4dbbf59c79d9e72f20ee",8278:"7cadfd7444a2a05cf2fb",8303:"60cee9a44929decd2474",8340:"bec3ee5ea945e1e07a35",8377:"f60292d97bcdbf19165b",8399:"0d2bc1be5802681666a4",8405:"d8ccc713c5ad93e7a0c3",8414:"9103eb0b9078019d3a26",8449:"75c09a2fa4c34b4844c5",8457:"399fcea09dfb1ad6deaa",8575:"3469df5c4846b0cee012",8589:"c8ef80a7c46d7d2c5172",8628:"716a4d7e8b908b81870b",8635:"a169d9fe66b5865911d9",8679:"f6c8e93ca2987e83f925",8692:"1e3fe89970c57a883fe5",8714:"0d6afba80d2f8dcb5cf7",8812:"88c3b60b403e2454b56e",8815:"040884cec4b84dd1bb17",8846:"475409026288f0981ce2",8872:"d3b086eb9aa8c7d09048",8883:"41cbde4738ae4adf973d",8885:"ea97619a4470f1540b99",8902:"66fe1634c6e8f72fc653",9013:"e0b27bceb397482bd0e8",9062:"5eb9fdb076488de9cd83",9078:"bf4dd8e50704e4040966",9126:"b1c6a1759febad66927f",9134:"02ed969786ab24ca8d96",9159:"e785f76c1a75cb1d1e1f",9169:"b7af0e6b9aadbcaf6a0b",9186:"17445fd8048966617d49",9187:"8351012ceb466f01b8fd",9192:"2ce845c990bb4d701362",9235:"bcb021a167580bb1619f",9239:"74d9dd484b9bc4dc7e3d",9279:"a25acccda8febac71a3d",9285:"8d738e9acc2f222235ea",9301:"d4465fd3319d0b6a26cc",9321:"4b24f72b56edc28bb15e",9438:"cf826787ab8d4b27ad80",9466:"bfe9c8ab35d9bf7e1035",9506:"5abe34bb0110694f7b42",9544:"85e65ced3312bf9cf162",9588:"c319c3b85cdec73a9f45",9598:"65c61171e6c6be5c5c2f",9616:"bb2f6b0fcdfb8b158e26",9650:"456d269e3982c437010a",9657:"d3d9d40556c847bba1a7",9695:"f1e5626a0cc1631a1efb",9696:"1f54ed4a5238ba1a2551",9748:"e645f992ec6f935ee3a5",9790:"6dac8dfcd63fc757ae2d",9794:"10cf6a70bf79f04a7208",9835:"8a3bff0f58483c1665f9",9838:"17acbf40e7c1cb42d9bd",9933:"de3e5d82502ee15b7eae",9953:"e0fcb5fa0e9f21fde2b6",9958:"8ab39731775b0867a512",9981:"9c402657f63a4d5668d0"}[e]+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var a=n.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=n[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={76:1};r.f.i=(t,n)=>{e[t]||importScripts(r.p+r.u(t))};var t=self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[],n=t.push.bind(t);t.push=t=>{var[a,o,s]=t;for(var i in o)r.o(o,i)&&(r.m[i]=o[i]);for(s&&s(r);a.length;)e[a.pop()]=1;n(t)}})(),r(66358);var n=r(61322);RemoteClient=n})();
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[88,926],{69540(e,t,i){i.d(t,{OU:()=>h,Pw:()=>c});var s=i(5482),r=i(69622),n=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const u=Symbol("ClonableMixin"),h=e=>{var t;const i=e;let r=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,s=t.store,r={},l=new Map;for(const t in i){const o=i[t],a=s?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const h=this[t];let c=null;if("function"==typeof u)c=u(h,e);else if("reference"===u)c=h;else if(c=(0,n.TU)(h,e),null!=h&&null==c)continue;0===a?l.set(t,c):r[t]=c}const u=new(0,Object.getPrototypeOf(this).constructor)(r);if(l.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return u}};return r=(0,s.Cg)([(0,l.$)("esri.core.Clonable")],r),r},c=h(r.A)},66344(e,t,i){i.d(t,{q:()=>a});const s=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,r,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),r>this._maxSize)return void this._notifyRemove(t,i,r,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return s||console.warn(`Refusing to cache entry with size ${r} for key ${t}`),void this._notifyRemove(t,i,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new n(i,r,l)),this._size+=r,e.size+=r,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let s=i.entry.usedMemory;for(;s>this._maxSize;){const e=this._notifyRemove(t,i.entry,s,1);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}i.size=s,this._size+=s,e.size+=s,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,s)=>{const r=e.lifetime;i[r]=(i[r]||0)+e.size,this._clients.forEach(i=>{const{id:r,name:n}=i;if(s.startsWith(r)){const i=t[n]||0;t[n]=i+e.size}})});const s={};this._clients.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const r=t[i]||0;t[i]=r,s[i]=Math.round(100*e.hitRate)+"%"}else s[i]="0%"});const r=Object.keys(t);r.sort((e,i)=>t[i]-t[e]),r.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+s[i]);for(let t=i.length-1;t>=0;--t){const s=i[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,s){const r=this._clients.get(e.split(o)[0])?.removeFunc,n=r?.(t,s,i);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const s=t?.id;let r=!0;for(;r;){r=!1;for(const[n,a]of this._db)if(0===a.lifetime&&(!s||n.startsWith(s))){const s=t??this._clients.get(n.split(o)[0]);if(this._purgeItem(n,a,s),i.size<=.9*e)return;r||=this._db.has(n)}}for(const[r,n]of this._db)if(!s||r.startsWith(s)){const s=t??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,n,s),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,t.size,1);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new r(0);class n{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new r(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},60999(e,t,i){i.d(t,{DZ:()=>p,Ke:()=>f,Tj:()=>h,UT:()=>m,aD:()=>y,jJ:()=>u});var s=i(5482),r=i(69622),n=i(97768),o=i(17676),a=i(10107),l=i(64108);function u(e,t,i){return(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))}async function h(e,t,i){return(await(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function p(e){try{return c(await e)}catch(e){return(0,o.QP)(e),d(e)}}function m(e,t){return new _(e,t)}let _=class extends r.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,s.Cg)([(0,a.MZ)()],_.prototype,"value",null),(0,s.Cg)([(0,a.MZ)()],_.prototype,"error",null),(0,s.Cg)([(0,a.MZ)()],_.prototype,"finished",null),(0,s.Cg)([(0,a.MZ)()],_.prototype,"promise",void 0),(0,s.Cg)([(0,a.MZ)()],_.prototype,"_result",void 0),_=(0,s.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],_);class y{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,s.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,s.hk)(t)}}}},75503(e,t,i){i.d(t,{wq:()=>a});var s=i(4576),r=i(21818),n=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),w.prune(),C.prune(),S.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data;const s=this._toBBox;if(v(e,i))for(b.clear();i;){for(let r=0,n=i.children.length;r<n;r++){const n=i.children[r],o=i.leaf?s(n):n;v(e,o)&&(i.leaf?t(n):g(e,o)?l(n,t):b.push(n))}i=b.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!v(e,t))return!1;for(b.clear();t;){for(let s=0,r=t.children.length;s<r;s++){const r=t.children[s],n=t.leaf?i(r):r;if(v(e,n)){if(t.leaf||g(e,n))return!0;b.push(r)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new F([]),this}remove(e){if(!e)return this;let t,i=this._data,n=null,o=0,a=!1;const l=this._toBBox(e);for(C.clear(),S.clear();i||C.length>0;){if(i||(i=C.pop(),n=C.data[C.length-1],o=S.pop()??0,a=!0),i.leaf&&(t=(0,s.qh)(i.children,(0,r.z)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),C.push(i),this._condense(C),this;a||i.leaf||!g(i,l)?n?(o++,i=n.children[o],a=!1):i=null:(C.push(i),S.push(o),o=0,n=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,s){const r=i-t+1;let n=this._maxEntries;if(r<=n){const s=new F(e.slice(t,i+1));return u(s,this._toBBox),s}s||(s=Math.ceil(Math.log(r)/Math.log(n)),n=Math.ceil(r/n**(s-1)));const o=new T([]);o.height=s;const a=Math.ceil(r/n),l=a*Math.ceil(Math.sqrt(n));x(e,t,i,l,this._compareMinX);for(let r=t;r<=i;r+=l){const t=Math.min(r+l-1,i);x(e,r,t,a,this._compareMinY);for(let i=r;i<=t;i+=a){const r=Math.min(i+a-1,t);o.children.push(this._build(e,i,r,s-1))}}return u(o,this._toBBox),o}_insert(e,t,i){const s=this._toBBox,r=i?e:s(e);C.clear();const n=function(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,r=1/0;for(let n=0,o=t.children.length;n<o;n++){const o=t.children[n],a=p(o),l=_(e,o)-a;l<r?(r=l,s=a<s?a:s,i=o):l===r&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}(r,this._data,t,C);for(n.children.push(e),c(n,r);t>=0&&C.data[t].children.length>this._maxEntries;)this._split(C,t),t--;!function(e,t,i){for(let s=i;s>=0;s--)c(t.data[s],e)}(r,C,t)}_split(e,t){const i=e.data[t],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);const n=this._chooseSplitIndex(i,r,s);if(!n)return;const o=i.children.splice(n,i.children.length-n),a=i.leaf?new F(o):new T(o);a.height=i.height,u(i,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new T([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,r,n;s=r=1/0;for(let o=t;o<=i-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,i,this._toBBox),l=y(t,a),u=p(t)+p(a);l<s?(s=l,n=o,r=u<r?u:r):l===s&&u<r&&(r=u,n=o)}return n}_chooseSplitAxis(e,t,i){const s=e.leaf?this._compareMinX:d,r=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,r)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const r=this._toBBox,n=h(e,0,t,r),o=h(e,i-t,i,r);let a=m(n)+m(o);for(let s=t;s<i-t;s++){const t=e.children[s];c(n,e.leaf?r(t):t),a+=m(n)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];c(o,e.leaf?r(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const r=e.data[t-1],n=r.children;n.splice((0,s.qh)(n,i,n.length,r.indexHint),1)}else this.clear();else u(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(w.clear();i;){if(!0===i.leaf)for(const e of i.children)t((0,r.z)(e));else w.pushArray(i.children);i=w.pop()??null}}function u(e,t){h(e,0,e.children.length,t,e)}function h(e,t,i,s,r){r||(r=new F([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let n,o=t;o<i;o++)n=e.children[o],c(r,e.leaf?s(n):n);return r}function c(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function _(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,n-s)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function v(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,i,s,r){const n=[t,i];for(;n.length;){const t=n.pop(),i=n.pop();if(t-i<=s)continue;const a=i+Math.ceil((t-i)/s/2)*s;(0,o.q)(e,a,i,t,r),n.push(i,a,a,t)}}const b=new n.A,w=new n.A,C=new n.A,S=new n.A({deallocator:void 0});class I{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class M extends I{constructor(){super(...arguments),this.height=1,this.indexHint=new s.vW}}class F extends M{constructor(e){super(),this.children=e,this.leaf=!0}}class T extends M{constructor(e){super(),this.children=e,this.leaf=!1}}},36708(e,t,i){i.d(t,{C_:()=>d,OH:()=>m,Vh:()=>_,on:()=>c,pc:()=>y,wB:()=>l,z7:()=>u});var s=i(37955),r=i(36563),n=i(97768),o=i(17676),a=i(14012);function l(e,t,i={}){return h(e,t,i,f)}function u(e,t,i={}){return h(e,t,i,p)}function h(e,t,i={},s){let r=null;const o=i.once?(e,i)=>{s(e)&&((0,n.xt)(r),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(r=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return r}function c(e,t,i,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,n.xt)(h),i(e)}const f=l(e,(e,i)=>{c(),(0,s.wb)(e)&&(a=e,u=(0,s.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,r.hA)(()=>{f.remove(),c()}),h}function d(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,n.xt)(a)}return new Promise((s,n)=>{a=(0,r.vE)([(0,o.u7)(i,()=>{l(),n((0,o.NK)())}),h(e,e=>{l(),s(e)},{sync:!1,once:!0},t??f)])})}(e,p,t)}function f(e){return!0}function p(e){return!!e}i(80559);const m={sync:!0},_={initial:!0},y={sync:!0,initial:!0}},60408(e,t,i){function s(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function r(e){return void 0!==e.points}function n(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?n(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":s(e)?"esriGeometryEnvelope":r(e)?"esriGeometryMultipoint":null:null}function h(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function c(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}i.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>h,Rg:()=>o,U9:()=>r,W0:()=>c,ZC:()=>s,fT:()=>n,uW:()=>l})},65864(e,t,i){i.d(t,{rS:()=>h,xD:()=>d});var s=i(5443),r=i(91075),n=i(48526),o=i(86738),a=i(39829),l=i(82799),u=i(60408);function h(e){return null==e?null:e instanceof r.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?l.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?n.A.fromJSON(e):(0,u.ZC)(e)?s.A.fromJSON(e):null}const c={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:s.A,esriGeometryMultipoint:n.A,esriGeometryMultiPatch:a.A};function d(e){return e&&c[e]||null}},6518(e,t,i){i.d(t,{F:()=>a});var s=i(44208),r=i(75503),n=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.wq(9,(0,s.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((i,s)=>{e[t++]=s}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,n.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},39357(e,t,i){i.d(t,{A:()=>a});var s,r=i(5482),n=i(25482),o=i(91429);let a=s=class extends n.o{constructor(e){super(e),this.name=null,this.code=null}clone(){return new s({name:this.name,code:this.code})}};(0,r.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),(0,r.Cg)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],a.prototype,"code",void 0),a=s=(0,r.Cg)([(0,o.$K)("esri.layers.support.CodedValue")],a)},53177(e,t,i){i.d(t,{A:()=>h});var s,r=i(5482),n=i(4718),o=i(91429),a=i(39357),l=i(76357),u=i(93223);let h=class extends l.A{static{s=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some(e=>(String(e.code)===i&&(t=e.name),!!t))}return t}clone(){return new s({codedValues:(0,n.o8)(this.codedValues),name:this.name})}};(0,r.Cg)([(0,o.MZ)({type:[a.A],json:{write:{isRequired:!0}}})],h.prototype,"codedValues",void 0),(0,r.Cg)([(0,u.e)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=s=(0,r.Cg)([(0,o.$K)("esri.layers.support.CodedValueDomain")],h)},76357(e,t,i){i.d(t,{A:()=>u});var s=i(5482),r=i(66552),n=i(25482),o=i(91429),a=i(93223);const l=new r.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends n.o{constructor(e){super(e),this.name=null,this.type=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,s.Cg)([(0,a.e)(l),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,s.Cg)([(0,o.$K)("esri.layers.support.Domain")],u)},20437(e,t,i){i.d(t,{A:()=>p});var s,r=i(5482),n=i(66552),o=i(25482),a=i(91429),l=i(56507),u=i(8631),h=i(98453),c=i(36005),d=i(93223);const f=new n.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",currency:"currency",dateAndTime:"date-and-time",description:"description",emailAddress:"email-address",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",phoneNumber:"phone-number",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let p=class extends o.o{static{s=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?f.fromJSON(i.fieldValueType):null}clone(){return new s({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"alias",void 0),(0,r.Cg)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],p.prototype,"defaultValue",void 0),(0,r.Cg)([(0,a.MZ)()],p.prototype,"description",void 0),(0,r.Cg)([(0,c.w)("description")],p.prototype,"readDescription",null),(0,r.Cg)([(0,a.MZ)({types:u.g,json:{read:{reader:u.r},write:!0}})],p.prototype,"domain",void 0),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],p.prototype,"editable",void 0),(0,r.Cg)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],p.prototype,"length",void 0),(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],p.prototype,"nullable",void 0),(0,r.Cg)([(0,d.e)(h.m)],p.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)()],p.prototype,"valueType",void 0),(0,r.Cg)([(0,c.w)("valueType",["description"])],p.prototype,"readValueType",null),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{read:!1}})],p.prototype,"visible",void 0),p=s=(0,r.Cg)([(0,a.$K)("esri.layers.support.Field")],p)},41628(e,t,i){i.d(t,{A:()=>l});var s,r=i(5482),n=i(91429),o=i(76357),a=i(93223);let l=class extends o.A{static{s=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new s({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,r.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]},isRequired:!0}}})],l.prototype,"maxValue",void 0),(0,r.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]},isRequired:!0}}})],l.prototype,"minValue",void 0),(0,r.Cg)([(0,a.e)({range:"range"})],l.prototype,"type",void 0),l=s=(0,r.Cg)([(0,n.$K)("esri.layers.support.RangeDomain")],l)},8631(e,t,i){i.d(t,{r:()=>d,g:()=>c});var s,r=i(53177),n=i(76357),o=i(5482),a=i(91429),l=i(93223);let u=class extends n.A{static{s=this}constructor(e){super(e),this.type="inherited"}clone(){return new s}};(0,o.Cg)([(0,l.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=s=(0,o.Cg)([(0,a.$K)("esri.layers.support.InheritedDomain")],u);var h=i(41628);const c={key:"type",base:n.A,typeMap:{range:h.A,"coded-value":r.A,inherited:u}};function d(e){if(!e?.type)return null;switch(e.type){case"range":return h.A.fromJSON(e);case"codedValue":return r.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},98453(e,t,i){i.d(t,{m:()=>s});const s=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},31756(e,t,i){i.d(t,{j:()=>n});var s=i(86211),r=i(79258);const n={unknown:1,inches:(0,s.oU)(1,"meters","inches"),feet:(0,s.oU)(1,"meters","feet"),"us-feet":(0,s.oU)(1,"meters","us-feet"),yards:(0,s.oU)(1,"meters","yards"),miles:(0,s.oU)(1,"meters","miles"),"nautical-miles":(0,s.oU)(1,"meters","nautical-miles"),millimeters:(0,s.oU)(1,"meters","millimeters"),centimeters:(0,s.oU)(1,"meters","centimeters"),decimeters:(0,s.oU)(1,"meters","decimeters"),meters:(0,s.oU)(1,"meters","meters"),kilometers:(0,s.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,s.vl)(1,"meters",r.$O.radius)}},63746(e,t,i){function s(e){return class{constructor(){for(const t of e)this[t]=null}}}function r(e,t=1){const{transform:i,hasZ:s,hasM:r}=e;if(null==i)return s&&1!==t?e=>{e[2]*=t}:null;const[n,o]=function(e,t,i,s){let{scale:r,translate:n,originPosition:o}=e;return"upperLeft"===o&&(r=r.map((e,t)=>1===t?-e:e)),t&&(r=r.map((e,t)=>2===t?e*s:e),n=n.map((e,t)=>2===t?e*s:e)),!t&&i&&(r=r.filter((e,t)=>2!==t),n=n.filter((e,t)=>2!==t)),[r,n]}(i,s,r,t),a=e.hasZ?3:2;return e=>{for(let t=0;t<e.length&&(t!==a||0!==e[t]);++t)e[t]=e[t]*n[t]+o[t]}}i.d(t,{Mv:()=>r,_7:()=>s}),i(53966)},2272(e,t,i){i.d(t,{Dl:()=>u,gf:()=>c,jV:()=>l,lF:()=>h});var s=i(92602),r=i(70333),n=i(4718),o=i(84952),a=i(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,n.o8)(e)}function h(e,t,i){const s={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n))s[r]=n.map(e=>h(e));else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(i?.[r]);s[r]=t?e:JSON.stringify(e)}else s[r]=t?n:JSON.stringify(n);else s[r]=n}return s}async function c(e,t,n){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??r.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!r.id&&s.A.request.useIdentity&&await Promise.all([i.e(7632),i.e(477),i.e(148)]).then(i.bind(i,50148));const l=await r.id.getCredential(e,n);return l?.token}},926(e,t,i){i.d(t,{Dd:()=>d,Jn:()=>f,Qc:()=>p,getApiKey:()=>h,getSessionToken:()=>c});var s=i(92602),r=i(11254),n=i(84952);const o=/^https?:\/\/(i?basemaps|basemapstyles)-api\.arcgis\.com\//i,a=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]),l=new Map;let u=null;function h(e){if(!p(e))return null;const t=t=>t instanceof RegExp?t.test(e):"string"==typeof t&&e.startsWith(t),i=s.A.apiKeys;if(Array.isArray(i.scopes))for(const e of i.scopes)if(Array.isArray(e.urls)){if(e.urls.some(t))return e.token}else if(t(e.urls))return e.token;return i.basemapStyles&&o.test(e)?i.basemapStyles:s.A.apiKey&&/^https?:\/\/.+\.arcgis\.com(\/|$)/i.test(e)?s.A.apiKey:null}async function c(e){if(!s.A.sessions?.basemap?.enabled||!o.test(e))return null;const t=h(e);if(!t)return null;u&&await u;const{styleFamily:i="arcgis",autoRefresh:n,duration:a=43200}=s.A.sessions.basemap,c=`${t}:${i}`,d=l.get(c);if(d&&(!n||d.endTime>Date.now()))return d.sessionToken;let f;u=(0,r.A)("https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/sessions/start",{cacheBust:!0,query:{durationSeconds:a,styleFamily:i,token:t}});try{f=(await u).data,f.endTime-=5e3,l.set(c,f)}finally{u=null}return f.sessionToken}function d(){return null!=s.A.apiKey||null!=s.A.apiKeys.basemapStyles}function f(e,t){return t?p(e):null!=h(e)}function p(e){const t=(0,n.$z)(e,!0);return!!t&&!a.has(t)&&!e.endsWith("/sharing/rest/generateToken")}},88625(e,t,i){i.d(t,{A:()=>g});var s,r=i(5482),n=i(69540),o=i(66552),a=i(25482),l=i(97768),u=i(91429),h=i(30524);let c=s=class extends a.o{constructor(e){super(e),this.expression=void 0,this.title=void 0}async collectRequiredFields(e,t){return(0,h.Dx)(e,t,null,this.expression)}clone(){return new s({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,r.Cg)([(0,u.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"expression",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],c.prototype,"title",void 0),c=s=(0,r.Cg)([(0,u.$K)("esri.symbols.support.FeatureExpressionInfo")],c);const d=c;var f=i(16271),p=i(36005),m=i(43937);const _=(0,o.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new o.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let g=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.featureExpressionInfo=void 0,this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e.expression?e:void 0:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,i,s){t[i]=e.write({},s),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,l.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,r.Cg)([(0,u.MZ)({type:d,json:{write:!0}})],g.prototype,"featureExpressionInfo",void 0),(0,r.Cg)([(0,p.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],g.prototype,"readFeatureExpressionInfo",null),(0,r.Cg)([(0,m.K)("featureExpressionInfo",{featureExpressionInfo:{type:d},"featureExpression.value":{type:[0]}})],g.prototype,"writeFeatureExpressionInfo",null),(0,r.Cg)([(0,u.MZ)({type:_.apiValues,nonNullable:!0,json:{type:_.jsonValues,read:_.read,write:{writer:_.write,isRequired:!0}}})],g.prototype,"mode",null),(0,r.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],g.prototype,"offset",void 0),(0,r.Cg)([(0,u.MZ)({type:f.KQ,json:{type:String,read:y.read,write:y.write}})],g.prototype,"unit",null),g=(0,r.Cg)([(0,u.$K)("esri.symbols.support.ElevationInfo")],g)},16271(e,t,i){i.d(t,{Ao:()=>n,KQ:()=>o});var s=i(4576),r=i(31756);function n(e){return 1/(r.j[e]||1)}const o=function(){const e=Object.keys(r.j);return(0,s.TF)(e,"decimal-degrees"),e.sort(),e}()},20401(e,t,i){i.r(t),i.d(t,{default:()=>Pe});var s=i(5482),r=i(65529),n=i(17676),o=i(36708),a=i(91429),l=i(79897),u=i(16930),h=i(65864),c=i(4576),d=i(49186),f=i(53966),p=i(87992),m=i(70328),_=i(6518),y=i(50498),g=i(69397),v=i(27647);class x{constructor(e=null,t={},i,s,r=0,n=null){this.geometry=e,this.attributes=t,this.centroid=i,this.objectId=s,this.displayId=r,this.distance=n}weakClone(){return new x(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId,this.distance)}clone(){return new x(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId,this.distance)}get usedMemory(){return 128+(0,g.lM)(this.attributes)+(this.geometry?.usedMemory??0)}ensureCentroid(e){return this.centroid??=(0,v.Q)(this.geometry&&(0,p.JR)(this.geometry)),this.centroid}}const b={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,i)=>new x((0,p.Nh)(y.gy.fromJSON(i),t),e.attributes,null,e.objectId,e.displayId,e.distance),getGeometry:e=>e.geometry&&(0,p.JR)(e.geometry),getGeometryWithCurves:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)};var w=i(51441);const C=(0,m.vt)();class S{constructor(e,t,i){this.geometryType=e,this.hasZ=t,this.hasM=i,this._boundsStore=new _.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=b}get usedMemory(){return this._usedMemory}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){const e=this._featuresById.size;let t=0;return this._featuresById.forEach(({geometry:e})=>{t+=e?e.vertexCount:0}),{featureCount:e,vertexCount:t}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,s,r]=this.fullBounds;return{xmin:t,ymin:i,xmax:s,ymax:r,spatialReference:(0,w.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(c.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const i of e){const e=this._boundsStore.get(i.objectId);e&&t((0,m.Jt)(C,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void f.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new d.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let s;if(i?(e.displayId=i.displayId,s=this._boundsStore.get(t)??void 0,this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):this.onFeatureAdd?.(e),!e.geometry)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);this._boundsStore.set(t,(0,p.NO)(e.geometry,s)),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return f.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new d.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;const{geometry:s,attributes:r}=e;for(const e in r)i.attributes[e]=r[e];return s&&(i.geometry=s,this._boundsStore.set(t,(0,p.NO)(s)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}var I=i(75752),M=i(87045),F=i(72802),T=i(61956),z=i(88625),A=i(66344),B=i(91869),P=i(86211),O=i(52006),R=i(16271);function E(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:i}=t;return new Z(e,i)}return new j}class j{async alignCandidates(e,t,i){return e}notifyElevationSourceChange(){}}class Z{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new A.q(1024),this._cacheVersion=0}async alignCandidates(e,t,i){const s=this._elevationInfo;return null==s||"absolute-height"!==s.mode||s.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,i):(function(e,t,i){const{offset:s,unit:r}=i;if(null==s)return;const n=(0,P.G9)(t),o=s*((0,R.Ao)(r??"meters")/n);for(const t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o,t.curve&&((0,O.yP)(t.curve)[2]+=o);continue;case"vertex":t.target.z+=o;continue}}(e,t,s),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,t,i){const s=new Map;for(const t of e)(0,B.tE)(s,t.objectId,Y).push(t);const[r,o,a]=this._prepareQuery(s,t),l=await this._alignPointsInFeatures(r,i);if((0,n.Te)(i),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,i);this._applyCacheAndResponse(r,l,o);const{drapedObjectIds:u,failedObjectIds:h}=l,c=[];for(const t of e){const{objectId:e}=t;u.has(e)&&"edge"===t.type&&(t.draped=!0),h.has(e)||c.push(t)}return c}_prepareQuery(e,t){const i=[],s=[];for(const[t,r]of e){const e=[];for(const i of r)this._addToQueriesOrCachedResult(t,i.target,e,s),"edge"===i.type&&(this._addToQueriesOrCachedResult(t,i.start,e,s),this._addToQueriesOrCachedResult(t,i.end,e,s));0!==e.length&&i.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:i},s,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,i,s){const r=q(e,t),n=this._alignmentsCache.get(r);null==n?i.push(t):s.push(new k(t,n))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:i,failedObjectIds:s},r){for(const e of r)e.apply();let n=0;const o=this._alignmentsCache;for(const{objectId:r,points:a}of e.pointsInFeatures){if(s.has(r)){n+=a.length;continue}const e=!i.has(r);for(const i of a){const s=q(r,i),a=t[n++];i.z=a,e&&o.put(s,a,1)}}}}class k{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function q(e,{x:t,y:i,z:s,spatialReference:r}){return`${e}-${t}-${i}-${s??0}}-wkid:${r?.wkid}`}function Y(){return[]}class X{filter(e,t){return t}notifyElevationSourceChange(){}}class N{filter(e,t){const{point:i,distance:s}=e,{z:r}=i;if(null==r)return t;if(0===t.length)return t;const n=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(s),o=this._updateCandidatesTo3D(t,i,n).filter(V);return o.sort(G),o}_updateCandidatesTo3D(e,t,i){for(const s of e)switch(s.type){case"edge":H(s,t,i);continue;case"vertex":J(s,t,i);continue}return e}}function V(e){return e.distance<=1}function L(e=!1){return e?new N:new X}function H(e,t,{x:i,y:s,z:r}){const{start:n,end:o,target:a}=e;if(e.curve)throw new Error("Curves are not yet supported.");e.draped||function(e,t,i,s){const r=s.x-i.x,n=s.y-i.y,o=s.z-i.z,a=r*r+n*n+o*o,l=(t.x-i.x)*r+(t.y-i.y)*n+o*(t.z-i.z),u=Math.min(1,Math.max(0,l/a)),h=i.x+r*u,c=i.y+n*u,d=i.z+o*u;e.x=h,e.y=c,e.z=d}(a,t,n,o);const l=(t.x-a.x)/i,u=(t.y-a.y)/s,h=(t.z-a.z)/r;e.distance=Math.sqrt(l*l+u*u+h*h)}function J(e,t,{x:i,y:s,z:r}){const{target:n}=e,o=(t.x-n.x)/i,a=(t.y-n.y)/s,l=(t.z-n.z)/r,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function G(e,t){return e.distance-t.distance}var $=i(4718),U=i(799);function D(e=!1,t){return e?new W(t):new K}class K{async fetch(){return[]}notifySymbologyChange(){}}class W{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new A.q(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const i=[],s=[],r=this._candidatesCache;for(const t of e){const e=Q(t),n=r.get(e);if(n)for(const e of n)s.push((0,$.o8)(e));else i.push(t),r.put(e,[],1)}if(0===i.length)return s;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(i,t);if((0,n.Te)(t),o!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:h}=a;for(let e=0;e<h;++e){const t=a[e],s=Q(i[l[e]]),n=r.get(s);n.push(t),r.put(s,n,n.length),u.push((0,$.o8)(t))}return s.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function Q(e){switch(e.type){case"vertex":{const{objectId:t,target:i}=e,s=`${t}-vertex-${i.x}-${i.y}-${i.z??0}`;return(0,U.Wm)(s).toString()}case"edge":{const{objectId:t,start:i,end:s}=e,r=`${t}-edge-${i.x}-${i.y}-${i.z??0}-to-${s.x}-${s.y}-${s.z??0}`;return(0,U.Wm)(r).toString()}default:return""}}var ee=i(69622),te=i(60999),ie=i(3483),se=i(13069),re=i(5443),ne=i(19419),oe=i(92722),ae=i(54339);class le{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new le;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}var ue=i(60694),he=i(62815),ce=i(63746);class de{constructor(e){this._options=e,this.featureSet=new le,this.parseOnly=null,this._idInfo=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._push=de._pushXY,this._attributesClass=null,this._previousX=0,this._previousY=0,this._vertex=[],this._i=0,this._geometry=null,this._iVertex=0,this._iPart=0,this._isPolygon=!1,this._ringEndsAt=-1}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(e){"string"==typeof e?this._idInfo??={type:"object-id",fieldName:e}:this._idInfo={type:"unique-id-simple",fieldName:e.name}}finish(){if(this._idInfo)for(const e of this.featureSet.features)e.objectId=(0,ae.W)(e,this._idInfo);const{spatialReference:e,features:t}=this.featureSet;if(e)for(const{geometry:i}of t)i&&(i.spatialReference=e);this.featureSet.transform=null}feature(){this._attributesClass??=(0,ce._7)(this.featureSet.fields?.map(e=>e.name)??[]),this.featureSet.features.push(new x(null,new this._attributesClass,null,0)),this._setVertexTransformer()}centroid(e){const{hasZ:t,hasM:i}=this.featureSet;this.featureSet.features.at(-1).centroid=new oe.A([],e,t,i)}geometry(e,t,i){this._previousX=this._previousY=0,this._i=this._iVertex=this._iPart=0;let{hasZ:s,hasM:r}=this.featureSet;s??=!1,r??=!1,this._vertex=[0,0],s&&this._vertex.push(0),r&&this._vertex.push(0);const n=y.gy.fromJSON(t);this._isPolygon="polygon"===n;const o=Number(this._isPolygon),a="point"===n?1:i.reduce((e,t)=>e+t-o,0),l="point"===n?0:i.length;if(this._geometry=(0,p.V2)(n,a,l,s,r,!1),this._push=s?r?de._pushXYZM:de._pushXYZ:r?de._pushXYM:de._pushXY,this._geometry.isMultipart()){this._geometry.partOffsets[0]=0;for(let e=0;e<l;++e)this._geometry.partOffsets[e+1]=this._geometry.partOffsets[e]+i[e]-o}this._ringEndsAt=o?this._geometry.partOffsets.at(1)??0:-1,1===e?(this.featureSet.queryGeometry=this._geometry,this.featureSet.queryGeometryType=t):this.featureSet.features.at(-1).geometry=this._geometry}coord(e){const t=this._vertex;t[this._i++]=e,this._i<t.length||(this._i=0,t[0]+=this._previousX,t[1]+=this._previousY,[this._previousX,this._previousY]=t,this._iVertex===this._ringEndsAt&&(++this._iPart,this._ringEndsAt=this._geometry.partOffsets[this._iPart+1],this._previousX=this._previousY=0,this._isPolygon)||(this._transformInPlace?.(t),this._push(this)))}curvedGeometry(e,t,i,s){let{hasZ:r,hasM:n}=this.featureSet;r??=!1,n??=!1,this._i=this._iVertex=this._iPart=0;const o=y.gy.fromJSON(e);this._isPolygon="polygon"===o;const a=Number(!this._isPolygon),l=t.length;let u=0,h=0,c=a*l;for(let e=0;e<i.length;++e)switch(c+=s[e],i[e]){case 1:case 3:u+=s[e];continue;case 2:h+=s[e]}this._geometry=(0,p.V2)(o,c,l,r,n,!0,u,h);const{partOffsets:d}=this._geometry;d[0]=0;for(let e=0,i=0;e<l;++e){d[e+1]=d[e]+a;for(let r=0;r<t[e];++r)d[e+1]+=s[i++]}switch(e){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${e} does not make sense`)}this.featureSet.features.at(-1).geometry=this._geometry}startCurvedPart(e){}finishCurvedPart(e){this._isPolygon||(this._transform(e,this._vertex),this._push(this)),++this._iPart}lineSegment(e,t){this._transform(e,this._vertex),this._push(this)}bezierSegment(e,t,i,s){this._transform(e,this._vertex),this._push(this),this._transformXY(t,me.b[0]),this._transformXY(i,me.b[1]),this._transformXY(s,me.b[2]),this._i=(0,p.tr)(this._vertex,me,this._geometry,this._iVertex-1,this._i)}circularArcSegment(e,t,i){this._transform(e,this._vertex),this._push(this),this._transformXY(t,fe.c[0]),this._transformXY(i,fe.c[1]),this._i=(0,p.e6)(this._vertex,fe,this._geometry,this._iVertex-1,this._i)}ellipticArcSegment(e,t,i,s,r,n,o,a){this._transform(e,this._vertex),this._push(this),this._transformXY(t,pe.a[0]),this._transformXY(i,pe.a[1]),pe.a[2]=s,pe.a[3]=r,pe.a[4]=n,pe.a[5]=o,pe.a[6]=a,this._i=(0,p._s)(this._vertex,pe,this._geometry,this._iVertex-1,this._i)}static _pushXY(e){const t=e._iVertex++,{vertexXY:i}=e._geometry;[i[2*t],i[2*t+1]]=e._vertex}static _pushXYZ(e){const t=e._iVertex++,{vertexXY:i,vertexZ:s}=e._geometry;[i[2*t],i[2*t+1],s[t]]=e._vertex}static _pushXYM(e){const t=e._iVertex++,{vertexXY:i,vertexM:s}=e._geometry;[i[2*t],i[2*t+1],s[t]]=e._vertex}static _pushXYZM(e){const t=e._iVertex++,{vertexXY:i,vertexM:s,vertexZ:r}=e._geometry;[i[2*t],i[2*t+1],r[t],s[t]]=e._vertex}_setVertexTransformer(){const{sourceSpatialReference:e}=this._options,{spatialReference:t,hasZ:i,transform:s}=this.featureSet,r=i?(0,he.d)(e,t):1;this._transformInPlace??=(0,ce.Mv)(this.featureSet,r),this._transformInPlaceXY??=(0,ce.Mv)({transform:s})}_transform(e,t){for(let i=0;i<e.length;++i)t[i]=e[i];this._transformInPlace?.(t)}_transformXY(e,t){t[0]=e[0],t[1]=e[1],this._transformInPlaceXY?.(t)}}const fe={c:[[0,0],[0,0]]},pe={a:[[0,0],[0,0],0,0,0,0,0]},me={b:[[0,0],[0,0],[0,0]]};var _e=i(80893);class ye{constructor(e,t){this.key=e,this.resolution=t,this.state={type:0},this.alive=!0}process(e){switch(this.state.type){case 0:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 1:case 3:break;case 2:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 4:this.state=this._goToDone(this.state,e)}return null}get debugInfo(){return{key:this.key,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case 0:case 1:return 0;case 2:return this.state.featureCount;case 3:return this.state.previous.featureCount;case 4:return this.state.features.length;case 5:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case 0:return"created";case 1:return"fetch-count";case 2:return"fetched-count";case 3:return"fetch-features";case 4:return"fetched-features";case 5:return"done"}}_gotoFetchCount(e,t){return{type:1,previous:e,task:(0,te.UT)(async e=>{const i=await(0,te.DZ)(t.fetchCount(this,e));1===this.state.type&&(this.state=function(e,t){return{type:2,featureCount:t,previous:e}}(this.state,i.ok?i.value:1/0))})}}_gotoFetchFeatures(e,t){return{type:3,previous:e,task:(0,te.UT)(async i=>{const s=await(0,te.DZ)(t.fetchFeatures(this,e.featureCount,i));3===this.state.type&&(this.state=function(e,t){return{type:4,previous:e,features:t}}(this.state,s.ok?s.value:[]))})}}_goToDone(e,t){return t.finish(this,e.features),{type:5,previous:e}}reset(){const e=this.state;switch(this.state={type:0},e.type){case 0:case 2:case 4:case 5:break;case 1:case 3:e.task.abort()}}}let ge=class extends ee.A{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),i=(0,ie.KC)(e,this._mandatoryOutFields);(0,ie.aI)(i,t)||(this._set("outFields",i),(0,ie.Yy)(i,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),i=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=new Array,this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new l.U}initialize(){this._initializeFetchExtent(),this._updatingHandles.add(()=>this._configuration,()=>this.refresh()),this._updatingHandles.add(()=>this.tilesOfInterest,()=>{this._updatePriorities(),this._process()},{sync:!0,initial:!0,equals:(e,t)=>(0,c.aI)(e,t,({id:e},{id:t})=>e===t)}),this.addHandles((0,o.z7)(()=>!this.suspended,()=>this._process()))}_updatePriorities(){this.store.setPriorityOrderByKey(this.tilesOfInterest.map(({id:e})=>e)??[])}destroy(){this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(const e of this._pendingTiles.values())e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map(({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t))},i=(0,te.UT)(async e=>{try{await this.store.processEdits(t,(e,t)=>this._queryFeaturesById(e,t),e),this._processPendingTiles()}catch(e){(0,n.QP)(e),f.A.getLogger(this).warn("Failed to apply edits",e)}});this.addHandles(i),await this._updatingHandles.addPromise(i.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,ue.Wo)(this.url))return;const e=(0,te.UT)(async e=>{try{const t=await(0,_e.Jf)(this.url,new T.A({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=re.A.fromJSON(t?.extent)}catch(e){(0,n.QP)(e),f.A.getLogger(this).warn("Failed to fetch data extent",e)}});this._updatingHandles.consumePromise(e.promise.then(()=>this._process())),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map(e=>e.debugInfo),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:i}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this._createPendingTile(t,i)}}_collectMissingTilesInfo(){let e=null;for(const t of this.tilesOfInterest){const i=this.store.process(t,(e,t)=>this._verifyTileComplexity(e,t),this.outFields);null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,i)=>this._fetchFeatures(e,t,i),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.key),t.resolution)&&this._updatingHandles.consumePromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<be}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const i=this.tileSize*t;return e*(we/(i*i))<Ce}_ensureFetchAllCounts(e){let t=!0;for(const i of this._pendingTiles.values())i.state.type<2&&this._updatingHandles.consumePromise(i.process(e)),i.state.type<=1&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.key,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const i=new ye(e,t);return this._pendingTiles.set(e.id,i),i}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.key.id)}async _fetchCount(e,t){return this.store.fetchCount(e.key,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:xe,signal:t})}async _fetchFeatures(e,t,i){let s=0;const r=[];let n=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,s,o),{features:u,exceededTransferLimit:h}=await this._queryFeatures(a,i);l&&(s+=a.num),n+=u.length;for(const e of u)r.push(e);if(o=t-n,!l||!h||o<=0)return r}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,i=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let s=null;const r=e?(0,se.AG)(e):e;if(this.store.featureStore.forEach(e=>{r===(0,se.AG)(e.attributes[t])&&(s=e.objectId??e.attributes[i])}),null==s)throw new Error(`Expected to find a feature with globalId ${e}`);return s}_queryFeaturesById(e,t){const i=this._createFeaturesQuery();return i.objectIds=e,this._queryFeatures(i,t)}async _queryFeatures(e,t){return 0===e.num?new le:this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:i}=this;return await(0,_e.IJ)(this.url,e,new de({sourceSpatialReference:i}),{query:this._configuration.customParameters,timeout:xe,signal:t})}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:i}=this;return function({exceededTransferLimit:e,features:t,fields:i,geometryType:s,hasM:r,hasZ:n,spatialReference:o,transform:a},l){const u=new le;u.exceededTransferLimit=e??!1;for(const e of t??[]){let t,i;s&&(t=e.geometry&&(0,p.ME)(e.geometry),i=e.centroid&&new oe.A([],[e.centroid.x,e.centroid.y]));const r=(0,ae.W)(e,l),n=void 0;u.features.push(new x(t,e.attributes,i,r,n,e.distance))}return u.fields=i??u.fields,u.geometryType=s??null,u.hasM=r??!1,u.hasZ=n??!1,u.spatialReference=o??null,u.transform=a??null,u}(await(0,_e.eW)(this.url,e,i,{query:this._configuration.customParameters,timeout:xe,signal:t}),{type:"object-id",fieldName:this.objectIdField})}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),i=null!=e?.key?this.store.getAttributesForTile(e?.key?.id):null,s=(0,ie.KC)((0,ie.iv)(this.outFields,i??new Set),this._mandatoryOutFields);return t.outFields=Array.from(s),t.returnGeometry=!0,this.capabilities.data.supportsTrueCurve&&(!this.capabilities.query.supportsFormatPBF||this.capabilities.query.supportsFormatPBFWithCurves)&&(t.returnTrueCurves=!0),null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new T.A({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?(0,ne.w1)(e.key.extent,this.tileInfo.spatialReference):void 0}),i=this._configuration.filter;return null!=i&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:s,supportsCacheHint:r,tileMaxRecordCount:n,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=s?T.A.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&n?n:o||ve);return e.start=t,s?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"url",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"currentVersion",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"objectIdField",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"globalIdField",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"capabilities",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"sourceSpatialReference",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"spatialReference",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"store",void 0),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"_minimumVerticesPerFeature",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"_mandatoryOutFields",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"outFields",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"suspended",void 0),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"_historicMoment",void 0),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"filter",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"customParameters",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"_configuration",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"tileInfo",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"tileSize",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"tilesOfInterest",void 0),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"updating",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"availability",void 0),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"hasZ",null),ge=(0,s.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],ge);const ve=2e3,xe=6e5,be=1e6,we=25,Ce=1;i(44208);class Se{constructor(){this._store=new Map,this._priorities=new Map}get size(){return this._store.size}setPriorityOrderByKey(e){this._priorities.clear();for(let t=e.length-1;t>=0;t--)this._priorities.set(e[t],e.length-t)}hasLowerPriority(e){const t=this._priorities.get(e);if(null==t)return!0;for(const[e]of this._store){const i=this._priorities.get(e);if(null==i||i<t)return!0}return!1}someFromLowestToHighestPriority(e){const{_priorities:t}=this;for(const[i,s]of this._store)if(!t.has(i)&&e(s,i))return!0;for(const[i]of t){const t=this._store.get(i);if(t&&e(t,i))return!0}return!1}set(e,t){this._store.set(e,t)}delete(e){return this._store.delete(e)}get(e){return this._store.get(e)}has(e){return this._store.has(e)}clear(){this._store.clear()}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}}let Ie=class extends ee.A{setPriorityOrderByKey(e){this._tiles.setPriorityOrderByKey(e)}get _memoryLimitExceeded(){return this.featureStore.usedMemory>=this.maximumByteSize}constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10485760,this._tileBounds=new _.F,this._tiles=new Se,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,ne.vt)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const i=this.featureStore.upsertMany(t),s=i.map(e=>new Set(Object.keys(e.attributes))).reduce((e,t)=>(0,ie.E$)(e,t),new Set(Object.keys(i[0]?.attributes??[]))),r=this._memoryLimitExceeded;this._addTileStorage(e,new Set(i.map(e=>e.objectId)),s),r&&this._applyCacheMemoryLimits()}_applyCacheMemoryLimits(){if(!this._memoryLimitExceeded)return;const{_tiles:e,featureStore:t,maximumByteSize:i}=this;e.someFromLowestToHighestPriority(e=>!this._memoryLimitExceeded||t.usedMemory-this._estimateRemoveTileMemoryReduction(e)<i||(this._removeTileStorage(e),!1))}_estimateRemoveTileMemoryReduction(e){let t=0;for(const i of e.objectIds)if(1===this._refCounts.get(i)){const e=this.featureStore.getFeature(i);e&&(t+=this.featureStore.estimateFeatureUsedMemory?.(e)??0)}return t}_hasAttributesForTile(e,t){if(e){const i=this._tiles.get(e);if(i)return!i.objectIds.size||(0,ie.Yy)(t,i.attributeKeys)}return!1}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,i){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,i)}_addTileStorage(e,t,i){const s=e.id;this._tiles.set(s,new Me(e,t,i)),this._tileBounds.set(s,e.extent),this._tileFeatureCounts.set(s,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const i of e.objectIds)1===this._unreferenceFeature(i)&&t.push(i);this.featureStore.removeManyById(t);const i=e.key.id;this._tiles.delete(i),this._tileBounds.delete(i)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const i of e)t.objectIds.delete(i);this._tileFeatureCounts.set(t.key.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,i){if(!e.length)return;const{features:s}=await t(e,i);for(const e of s){if(this._tmpBoundingRect.fill(0),null==e.geometry||0===e.geometry.vertexCount)continue;(0,ne.Ie)(this._tmpBoundingRect);const t=(0,p.NO)(e.geometry,this._tmpBoundingRect);this._tileBounds.forEachInBounds(t,t=>{const i=this._tiles.get(t);this.featureStore.add(e);const s=e.objectId;i.objectIds.has(s)||(i.objectIds.add(s),this._referenceFeature(s),this._tileFeatureCounts.set(i.key.id,i.objectIds.size))})}}process(e,t=()=>!0,i){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,ne.HY)((0,ne.VY)(this.extent,this._tmpBoundingRect),e.extent))return new Te(e);if(this._memoryLimitExceeded&&!this._tiles.hasLowerPriority(e.id??""))return new Te(e);if(this._hasAttributesForTile(e.id,i))return new Te(e);const s=this._createTileTree(e,this.tileInfo);return this._simplify(s,t,null,0,1),this._collectMissingTiles(e,s,this.tileInfo,i)}get debugInfo(){return Array.from(this._tiles.values()).map(({key:e})=>({key:e.toJSON(),featureCount:this._tileFeatureCounts.get(e.id)||0}))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,i,s){let r=this._tileFeatureCounts.get(e.id);return null!=r||(r=await(0,_e.gW)(t,i,s),this._tileFeatureCounts.set(e.id,r)),r}_createTileTree(e,t){const i=new Fe(e.level,e.row,e.col);return t.updateTileInfo(i,1),this._tileBounds.forEachInBounds(e.extent,s=>{const r=this._tiles.get(s)?.key;r&&function(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const i=e.level<t.level,s=i?e:t,r=i?t:e,n=1<<r.level-s.level;return Math.floor(r.row/n)===s.row&&Math.floor(r.col/n)===s.col}(e,r)&&this._populateChildren(i,r,t,this._tileFeatureCounts.get(r.id)||0)}),i}_populateChildren(e,t,i,s){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const n=t.row>>r,o=t.col>>r,a=e.row<<1,l=o-(e.col<<1)+(n-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,i,s);else{const r=new Fe(e.level+1,n,o);i.updateTileInfo(r,1),e.children[l]=r,this._populateChildren(r,t,i,s)}}_simplify(e,t,i,s,r){const n=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),null!=i&&(i.children[s]=null),n);const o=r/2,a=o*o;let l=0;for(let i=0;i<e.children.length;i++){const s=e.children[i];l+=null!=s?this._simplify(s,t,e,i,o):a}return 0===l?this._mergeChildren(e):1-l/n<Ae&&(this._purge(e),null!=i&&(i.children[s]=null),l=n),l}_mergeChildren(e){const t=new Set;let i;this._forEachLeaf(e,e=>{const s=this._tiles.get(e.id);if(s){i=i?(0,ie.E$)(i,s.attributeKeys):new Set(s.attributeKeys);for(const e of s.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}}),this._addTileStorage(e,t,i??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const i of e.children)null!=i&&(i.isLeaf?t(i):this._forEachLeaf(i,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const i=e.children[t];this._purge(i),e.children[t]=null}}_collectMissingTiles(e,t,i,s){const r=new ze(i,e,this.extent);return this._collectMissingTilesRecurse(t,r,1,s),r.info}_collectMissingTilesRecurse(e,t,i,s){const r=this._tiles.has(e.id)&&!this._hasAttributesForTile(e.id,s);if(r&&t.addMissing(e.level,e.row,e.col,i),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,i));const n=i/2;for(let i=0;i<e.children.length;i++){const r=e.children[i];null==r?t.addMissing(e.level+1,(e.row<<1)+((2&i)>>1),(e.col<<1)+(1&i),n):this._collectMissingTilesRecurse(r,t,n,s)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?0:2}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),1):(t>0&&this._refCounts.set(e,t),2)}get test(){}};(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],Ie.prototype,"featureStore",void 0),(0,s.Cg)([(0,a.MZ)()],Ie.prototype,"tileInfo",void 0),(0,s.Cg)([(0,a.MZ)()],Ie.prototype,"extent",void 0),(0,s.Cg)([(0,a.MZ)()],Ie.prototype,"maximumByteSize",void 0),Ie=(0,s.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],Ie);class Me{constructor(e,t,i){this.key=e,this.objectIds=t,this.attributeKeys=i}}class Fe extends F.U{constructor(){super(...arguments),this.isLeaf=!1,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class Te{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,ne.Wc)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class ze{constructor(e,t,i){this._tileInfo=e,this._extent=null,this.info=new Te(t),null!=i&&(this._extent=(0,ne.VY)(i))}addMissing(e,t,i,s){const r=new F.U(e,t,i);this._tileInfo.updateTileInfo(r,1)&&(null==this._extent||(0,ne.HY)(this._extent,r.extent))&&(this.info.missingTiles.push({data:r,resolution:s}),this.info.coveredArea-=(0,ne.Wc)(r.extent))}}const Ae=.18751;let Be=class extends r.nJ{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=Promise.withResolvers(),this._elevationAligner=E(),this._elevationFilter=L(),this._symbologyCandidatesFetcher=D(),this._updatingHandles=new l.U,this._alignPointsInFeatures=async(e,t)=>{const i={query:e},s=await this.remoteClient.invoke("alignElevation",i,{signal:t});return(0,n.Te)(t),s},this._getSymbologyCandidates=async(e,t)=>{const i={candidates:e,spatialReference:this._spatialReference.toJSON()},s=await this.remoteClient.invoke("getSymbologyCandidates",i,{signal:t});return(0,n.Te)(t),s}}get updating(){return this._isInitializing||this._updatingHandles.updating||this._featureFetcher.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:i,timeInfo:s,fieldsIndex:r}=e.serviceInfo,{hasZ:n}=e,a=u.A.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new S(t,n,!1),this._featureStore.estimateFeatureUsedMemory=e=>e.usedMemory,this._queryEngine=new I.do({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:r,hasZ:n,hasM:!1,featureIdInfo:{type:"object-id",fieldName:i},timeInfo:s}),this._featureFetcher=new ge({store:new Ie({featureStore:this._featureStore}),url:e.serviceInfo.url,currentVersion:e.serviceInfo.currentVersion,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:u.A.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const l="3d"===e.configuration.viewType;return this._elevationAligner=E(l,{elevationInfo:null!=e.elevationInfo?z.A.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=L(l),this.addHandles([(0,o.wB)(()=>this._featureFetcher.availability,e=>this.emit("notify-availability",{availability:e}),o.OH),(0,o.wB)(()=>this.updating,()=>this._notifyUpdating())]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),Oe}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.suspended=e,Oe}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.outFields=new Set(e??[]),Oe}async fetchCandidates(e,t){await this._whenSetup.promise,(0,n.Te)(t);const i=function(e,t){const i=!!t||void 0;if(!e.filter)return{...e,query:{where:"1=1",returnZ:i}};const{distance:s,units:r,spatialRel:n,where:o,timeExtent:a,objectIds:l}=e.filter,u={geometry:e.filter.geometry?(0,h.rS)(e.filter.geometry):void 0,distance:s,units:r,spatialRel:n,timeExtent:a,objectIds:l,returnZ:i,where:o??"1=1"};return{...e,query:u}}(e,this._featureStore.hasZ),s=t?.signal,r=await this._queryEngine.executeQueryForSnapping(i,s);(0,n.Te)(s);const o=await this._elevationAligner.alignCandidates(r.candidates,u.A.fromJSON(e.point.spatialReference)??u.A.WGS84,s);(0,n.Te)(s);const a=await this._symbologyCandidatesFetcher.fetch(o,s);(0,n.Te)(s);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(i,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles.map(e=>F.U.fromJSON(e)),this._featureFetcher.tileInfo=null!=e.tileInfo?M.A.fromJSON(e.tileInfo):null,Oe}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.refresh(),Oe}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await(0,o.C_)(()=>!this.updating,t),(0,n.Te)(t),Oe}async getDebugInfo(e,t){return(0,n.Te)(t),{result:this._featureFetcher.debugInfo}}async handleEdits(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await this._updatingHandles.addPromise(this._featureFetcher.handleEdits(e)),(0,n.Te)(t),Oe}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),Oe}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),Oe}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),Oe}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=D(e,this._getSymbologyCandidates),Oe}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?T.A.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,s.Cg)([(0,a.MZ)({readOnly:!0})],Be.prototype,"updating",null),(0,s.Cg)([(0,a.MZ)()],Be.prototype,"_isInitializing",void 0),Be=(0,s.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],Be);const Pe=Be,Oe={result:{}}}}]);