@arcgis/core 5.0.0-next.57 → 5.0.0-next.58

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 (87) hide show
  1. package/applications/Components/arcadeFeatureUtils.d.ts +20 -1
  2. package/applications/Components/arcadeFeatureUtils.js +1 -1
  3. package/arcade.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/18ce7b1559a45d017c45.js +1 -0
  6. package/assets/esri/core/workers/chunks/3405a23973f9e701a4d6.js +1 -0
  7. package/assets/esri/core/workers/chunks/352c674730c7b7258ae3.js +1 -0
  8. package/assets/esri/core/workers/chunks/62752cd6821959cf6751.js +1 -0
  9. package/assets/esri/core/workers/chunks/72e3a48aa365542b0689.js +1 -0
  10. package/assets/esri/core/workers/chunks/a6b1e3ec30f6d641aea9.js +1 -0
  11. package/assets/esri/core/workers/chunks/{da2c41ac0f82f32013c1.js → a7aa87e2c4197ba595ef.js} +10 -10
  12. package/assets/esri/core/workers/chunks/{d76513a6260d9ec4ea25.js → bf82bb1cdd8b31e7f2aa.js} +1 -1
  13. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  14. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  15. package/assets/esri/themes/base/widgets/_FeatureTable.scss +24 -0
  16. package/assets/esri/themes/dark/main.css +1 -1
  17. package/assets/esri/themes/light/main.css +1 -1
  18. package/assets/esri/themes/light/view.css +1 -1
  19. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.json +1 -1
  20. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
  21. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_fr.json +1 -1
  22. package/config.js +1 -1
  23. package/core/workers/workerFactory.js +1 -1
  24. package/editing/sharedTemplates/executor/builders/offsetLine.js +1 -1
  25. package/editing/sharedTemplates/executor/builders/offsetPrimaryLine.js +1 -1
  26. package/editing/sharedTemplates/executor/builders/polygonBoundary.js +1 -1
  27. package/editing/sharedTemplates/executor/builders/polygonBoundaryTwoPoint.js +1 -1
  28. package/editing/sharedTemplates/executor/builders/polygonVertices.js +1 -1
  29. package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
  30. package/editing/sharedTemplates/executor/builders/support/shapeUtils.js +1 -1
  31. package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +1 -1
  32. package/editing/sharedTemplates/executor/support/createPresetServiceEdit.js +1 -1
  33. package/geometry/projection/projectBoundingSphere.js +1 -1
  34. package/geometry/support/curves/curveUtils.js +1 -1
  35. package/geometry/support/sphere.js +1 -1
  36. package/kernel.js +1 -1
  37. package/layers/KnowledgeGraphLayer.js +1 -1
  38. package/layers/LinkChartLayer.js +1 -1
  39. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  40. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  41. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +1 -1
  42. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  43. package/layers/knowledgeGraph/layerUtils.js +1 -1
  44. package/package.json +2 -2
  45. package/support/revision.js +1 -1
  46. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  47. package/views/2d/engine/webgl/Painter.js +1 -1
  48. package/views/2d/engine/webgl/shaderGraph/GLSLShaderModule.js +1 -1
  49. package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
  50. package/views/2d/engine/webgl/shaderGraph/graph/GlslGraphWriter.js +1 -1
  51. package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
  52. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  53. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  54. package/views/2d/layers/features/PipelineConnectionHandlers.js +1 -1
  55. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  56. package/views/3d/layers/I3SMeshView3D.js +1 -1
  57. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  58. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  59. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  60. package/views/3d/layers/i3s/I3SNode.js +1 -1
  61. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  62. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  63. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  64. package/views/3d/support/ElevationRange.js +1 -1
  65. package/views/3d/terrain/TerrainSurface.js +1 -1
  66. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueConfiguration.js +1 -1
  67. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  68. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  69. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  70. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +44 -3
  71. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  72. package/widgets/FeatureTable/FieldColumn.js +1 -1
  73. package/widgets/FeatureTable/Grid/EditorColumn.js +1 -1
  74. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  75. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  76. package/widgets/FeatureTable/VisibleElements.d.ts +2 -2
  77. package/widgets/FeatureTable/VisibleElements.js +1 -1
  78. package/widgets/FeatureTable/support/FeatureStore.d.ts +1 -0
  79. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  80. package/widgets/FeatureTable.d.ts +46 -5
  81. package/widgets/FeatureTable.js +1 -1
  82. package/assets/esri/core/workers/chunks/30184e39129d9c66ea54.js +0 -1
  83. package/assets/esri/core/workers/chunks/5340887a4a48bde3407a.js +0 -1
  84. package/assets/esri/core/workers/chunks/537de53ef1e9101468f5.js +0 -1
  85. package/assets/esri/core/workers/chunks/94f02082a006003ef5a9.js +0 -1
  86. package/assets/esri/core/workers/chunks/d3db7244fac7398cc700.js +0 -1
  87. package/assets/esri/core/workers/chunks/d94a2ad5a91de7086fbe.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[784],{9093:(t,e,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}n.d(e,{o8:()=>o,vt:()=>r,zK:()=>i});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,fromValues:function(t,e,n,r,o,i,s,a,c,u,h,d,l,f,m,p){return[t,e,n,r,o,i,s,a,c,u,h,d,l,f,m,p]}},Symbol.toStringTag,{value:"Module"}))},27921:(t,e,n)=>{n.d(e,{$Q:()=>T,C:()=>u,Cr:()=>f,LV:()=>c,O_:()=>l,Qj:()=>h,T7:()=>x,Tj:()=>O,Ui:()=>y,_I:()=>A,fA:()=>d,gv:()=>w,lU:()=>m,mN:()=>E,mP:()=>v,mR:()=>j,vE:()=>P,vt:()=>a});var r=n(34727),o=n(38954),i=n(51850),s=(n(87317),n(44280),n(32114));function a(t=N){return[t[0],t[1],t[2],t[3]]}function c(t=N[0],e=N[1],n=N[2],r=N[3]){return d(t,e,n,r,s.Km.get())}function u(t,e){return d(e[0],e[1],e[2],e[3],t)}function h(t){return t}function d(t,e,n,r,o=a()){return o[0]=t,o[1]=e,o[2]=n,o[3]=r,o}function l(t,e,n){const r=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],o=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}function f(t,e,n,r=a()){const o=n[0]-e[0],i=n[1]-e[1],s=n[2]-e[2],c=t[0]-e[0],u=t[1]-e[1],h=t[2]-e[2],d=i*h-s*u,l=s*c-o*h,f=o*u-i*c,m=d*d+l*l+f*f,p=Math.abs(m-1)>1e-5&&m>1e-12?1/Math.sqrt(m):1;return r[0]=d*p,r[1]=l*p,r[2]=f*p,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function m(t,e,n,r=0,i=Math.floor(n*(1/3)),s=Math.floor(n*(2/3))){if(n<3)return!1;e(b,r);let a=i,c=!1;for(;a<n-1&&!c;)e(_,a),a++,c=!(0,o.m)(b,_);if(!c)return!1;for(a=Math.max(a,s),c=!1;a<n&&!c;)e(g,a),a++,(0,o.e)(M,b,_),(0,o.n)(M,M),(0,o.e)(S,_,g),(0,o.n)(S,S),c=!(0,o.m)(b,g)&&!(0,o.m)(_,g)&&Math.abs((0,o.g)(M,S))<p;return c?(f(b,_,g,t),!0):(0!==r||1!==i||2!==s)&&m(t,e,n,0,1,2)}n(32728);const p=.99619469809,b=(0,i.vt)(),_=(0,i.vt)(),g=(0,i.vt)(),M=(0,i.vt)(),S=(0,i.vt)();function v(t,e,n){return e!==t&&u(t,e),t[3]=-(0,o.g)(t,n),t}function j(t,e,n,r){return(0,o.f)(g,e,t),l(n,g,r)}function y(t,e,n){return null!=e&&z(P(t,e.origin,e.direction,D,n))}function x(t,e,n){return z(P(t,e.origin,e.vector,0,n))}function w(t,e,n){return z(P(t,e.origin,e.vector,1,n))}function O(t,e){return E(t,e)>=0}function T(t,e){const n=(0,o.g)(t,e.ray.direction),r=-E(t,e.ray.origin);if(r<0&&n>=0)return!1;if(n>-1e-6&&n<1e-6)return r>0;if((r<0||n<0)&&!(r<0&&n<0))return!0;const i=r/n;return n>0?i<e.c1&&(e.c1=i):i>e.c0&&(e.c0=i),e.c0<=e.c1}function A(t,e,n){const r=(0,o.j)(s.rq.get(),t,-t[3]),i=function(t,e,n){const r=(0,o.j)(s.rq.get(),t,(0,o.g)(t,e));return(0,o.e)(n,e,r),n}(t,(0,o.e)(s.rq.get(),e,r),s.rq.get());return(0,o.i)(n,i,r),n}function E(t,e){return(0,o.g)(t,e)+t[3]}function z(t){return 0===t||1===t}function P(t,e,n,i,s){const a=(0,o.g)(t,n),c=E(t,e);if(0===a)return c>=0?2:3;let u=-c/a;return 1&i&&(u=(0,r.qE)(u,0,1)),!(4&i)&&u<0||!(8&i)&&u>1?c>=0?2:3:((0,o.i)(s,e,(0,o.j)(s,n,u)),c>=0?0:1)}const N=[0,0,1,0],D=8},29242:(t,e,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function o(t,e,n,r,o,i,s,a,c){return[t,e,n,r,o,i,s,a,c]}n.d(e,{fA:()=>o,vt:()=>r,zK:()=>i});const i=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,fromValues:o},Symbol.toStringTag,{value:"Module"}))},31635:(t,e,n)=>{function r(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s}function o(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=e[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=e[Symbol.dispose],n&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:r,async:n})}else n&&t.stack.push({async:!0});return e}n.d(e,{Cg:()=>r,hk:()=>s,mS:()=>o}),Object.create,Object.create;var i="function"==typeof SuppressedError?SuppressedError:function(t,e,n){var r=new Error(n);return r.name="SuppressedError",r.error=t,r.suppressed=e,r};function s(t){function e(e){t.error=t.hasError?new i(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var n,r=0;return function o(){for(;n=t.stack.pop();)try{if(!n.async&&1===r)return r=0,t.stack.push(n),Promise.resolve().then(o);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(o,function(t){return e(t),o()})}else r|=1}catch(t){e(t)}if(1===r)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},32114:(t,e,n)=>{n.d(e,{Rc:()=>f,J8:()=>m,rq:()=>d,Km:()=>l}),n(44208);var r=n(26390),o=n(29242),i=n(9093),s=n(82534),a=n(48163),c=n(51850),u=n(91829);class h{constructor(t){this._create=t,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new h(a.vt)}static createVec3f64(){return new h(c.vt)}static createVec4f64(){return new h(u.vt)}static createMat3f64(){return new h(o.vt)}static createMat4f64(){return new h(i.vt)}static createQuatf64(){return new h(s.vt)}get test(){}}h.createVec2f64();const d=h.createVec3f64(),l=h.createVec4f64(),f=(h.createMat3f64(),h.createMat4f64()),m=h.createQuatf64()},32728:(t,e,n)=>{n.d(e,{nu:()=>s,wp:()=>i}),n(34727);var r=n(38954),o=n(51850);function i(t,e){const n=Math.sqrt(e[0]*e[0]+e[4]*e[4]+e[8]*e[8]),o=Math.sqrt(e[1]*e[1]+e[5]*e[5]+e[9]*e[9]),i=Math.sqrt(e[2]*e[2]+e[6]*e[6]+e[10]*e[10]);return(0,r.h)(t,n,o,i),t}function s(t,e,n,i=(0,o.vt)()){const s=(0,r.b)(t),u=(0,r.b)(e),h=(0,r.g)(t,e)/(s*u);if(h<.9999999999999999){const o=Math.acos(h),d=((1-n)*s+n*u)/Math.sin(o),l=d/s*Math.sin((1-n)*o),f=d/u*Math.sin(n*o);return(0,r.j)(a,t,l),(0,r.j)(c,e,f),(0,r.i)(i,a,c)}return(0,r.l)(i,t,e,n)}(0,o.vt)(),(0,o.vt)(),(0,o.vt)();const a=(0,o.vt)(),c=(0,o.vt)()},44280:(t,e,n)=>{n.d(e,{EJ:()=>c,g7:()=>a,gr:()=>s});var r=n(34727),o=n(38954),i=n(51850);function s(t,e){return(0,o.g)(t,e)/(0,o.b)(t)}function a(t,e){const n=(0,o.g)(t,e)/((0,o.b)(t)*(0,o.b)(e));return-(0,r.XM)(n)}function c(t,e,n){(0,o.n)(u,t),(0,o.n)(h,e);const i=(0,o.g)(u,h),s=(0,r.XM)(i),a=(0,o.f)(u,u,h);return(0,o.g)(a,n)<0?2*Math.PI-s:s}const u=(0,i.vt)(),h=(0,i.vt)()},70491:(t,e,n)=>{n.r(e),n.d(e,{default:()=>X});var r=n(31635),o=n(74887),i=n(24326),s=n(91429),a=n(38954),c=n(51850),u=n(11964),h=n(94008),d=n(93687),l=n(15142),f=n(82919),m=n(71351),p=n(620);class b{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new _,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),_.clearPool(),D[0]=null,I.prune(),J.prune()}add(t){const e=Array.from(t);this._grow(e);const n=_.acquire();for(const t of e)++this._objectCount,this._isDegenerate(t)?this._degenerateObjects.add(t):(n.init(this._root),this._add(t,n));_.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=_.acquire();for(const r of t){const t=e??this.objectToBoundingSphere(r);E(t.radius)?(n.init(this._root),S(r,t,n)):this._degenerateObjects.delete(r)}_.release(n),this._shrink()}update(t,e){if(!E(e.radius)&&this._isDegenerate(t))return;const n=function(t){return D[0]=t,D}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const r=(0,m.LV)(t,e);g(this._root,t=>{if(!function(t,e){return w(e.bounds.center,2*-e.halfSize,R),w(e.bounds.center,2*e.halfSize,B),(0,p.O_)(t.origin,t.direction,R,B)}(r,t))return!1;const e=t.node;return e.terminals.forAll(t=>{this._intersectsObject(r,t)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObject(r,t)&&n(t)}),!0})}forEachAlongRayWithVerticalOffset(t,e,n,r){const o=(0,m.LV)(t,e);g(this._root,t=>{if(!function(t,e,n){return w(e.bounds.center,2*-e.halfSize,R),w(e.bounds.center,2*e.halfSize,B),n.applyToMinMax(R,B),(0,p.O_)(t.origin,t.direction,R,B)}(o,t,r))return!1;const e=t.node;return e.terminals.forAll(t=>{this._intersectsObjectWithOffset(o,t,r)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObjectWithOffset(o,t,r)&&n(t)}),!0})}forEach(t){g(this._root,e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0}),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,r=()=>!0,o=1/0){let i=1/0,s=1/0,c=null;const u=T(t,e),h=a=>{if(--o,!r(a))return;const u=this.objectToBoundingSphere(a);if(!(0,f.m7)(n,u))return;const h=A(t,e,u.center),d=h-u.radius,l=h+u.radius;d<i&&(i=d,s=l,c=a)};return M(this._root,r=>{if(o<=0||!(0,f.m7)(n,r.bounds))return!1;if((0,a.j)(q,u,r.halfSize),(0,a.i)(q,q,r.bounds.center),A(t,e,q)>s)return!1;const i=r.node;return i.terminals.forAll(t=>h(t)),null!==i.residents&&i.residents.forAll(t=>h(t)),!0},t,e),c}forEachInDepthRange(t,e,n,r,o,i,s){let c=-1/0,u=1/0;const h={setRange:t=>{1===n?(c=Math.max(c,t.near),u=Math.min(u,t.far)):(c=Math.max(c,-t.far),u=Math.min(u,-t.near))}};h.setRange(r);const d=A(e,n,t),l=T(e,n),m=T(e,-n),p=t=>{if(!s(t))return;const r=this.objectToBoundingSphere(t),a=A(e,n,r.center)-d,l=a-r.radius,m=a+r.radius;l>u||m<c||!(0,f.m7)(i,r)||o(t,h)};M(this._root,t=>{if(!(0,f.m7)(i,t.bounds))return!1;if((0,a.j)(q,l,t.halfSize),(0,a.i)(q,q,t.bounds.center),A(e,n,q)-d>u)return!1;if((0,a.j)(q,m,t.halfSize),(0,a.i)(q,q,t.bounds.center),A(e,n,q)-d<c)return!1;const r=t.node;return r.terminals.forAll(t=>p(t)),null!==r.residents&&r.residents.forAll(t=>p(t)),!0},e,n)}forEachNode(t){g(this._root,e=>t(e.node,e.bounds,e.halfSize,e.depth))}forEachNeighbor(t,e){const n=e.radius,r=e.center,o=e=>{const o=this.objectToBoundingSphere(e),i=o.radius,s=n+i;return!((0,a.s)(o.center,r)-s*s<=0)||t(e)};let i=!0;const s=t=>{i&&(i=o(t))};g(this._root,t=>{const e=t.bounds.radius,o=n+e;if((0,a.s)(t.bounds.center,r)-o*o>0)return!1;const c=t.node;return c.terminals.forAll(s),i&&null!==c.residents&&c.residents.forAll(s),i}),i&&this.forEachDegenerateObject(s)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n.radius>0)||n.intersectRay(t)}_intersectsObjectWithOffset(t,e,n){const r=this.objectToBoundingSphere(e);return!(r.radius>0)||n.applyToBoundingSphere(r).intersectRay(t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const r=_.acquire().init(t);this._add(e.at(n),r),_.release(r)}}_grow(t){if(O(t,t=>this.objectToBoundingSphere(t),V),E(V.radius)&&!this._fitsInsideTree(V))if(j(this._root.node))this._root.bounds.copy(V),this._root.halfSize=1.25*this._root.bounds.radius,this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(V);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(V,t):this._growRootAsSubNode(t),_.release(t)}}_rebuildTree(t,e){F.center=e.bounds.center,F.radius=e.halfSize,O([t,F],t=>t,L);const n=_.acquire().init(this._root);this._root.initFrom(null,L,L.radius),this._root.increaseHalfSize(1.25),g(n,t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0)),_.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return g(this._root,t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth)),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t.radius,n=t.center;let r=-1/0;const o=this._root.bounds.center,i=this._root.halfSize;for(let t=0;t<3;t++){const s=o[t]-i-(n[t]-e),a=n[t]+e-(o[t]+i),c=Math.max(0,Math.ceil(s/(2*i))),u=Math.max(0,Math.ceil(a/(2*i)))+1,h=2**Math.ceil(Math.log(c+u)*Math.LOG2E);r=Math.max(r,h),k[t].min=c,k[t].max=u}for(let t=0;t<3;t++){let e=k[t].min,n=k[t].max;const s=(r-(e+n))/2;e+=Math.ceil(s),n+=Math.floor(s);const a=o[t]-i-e*i*2;C.center[t]=a+(n+e)*i}const s=r*i;return C.radius=s*N,_.acquire().initFrom(null,C,s,0)}_growRootAsSubNode(t){const e=this._root.node;V.center=this._root.bounds.center,V.radius=this._root.halfSize,this._root.init(t),t.advanceTo(V,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,r=0;for(;r<e.length&&null==t;)n=r++,t=e[n];for(;r<e.length;)if(e[r++])return-1;return n}_isDegenerate(t){return!E(this.objectToBoundingSphere(t).radius)}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t.radius<=n&&t.center[0]>=e.center[0]-n&&t.center[0]<=e.center[0]+n&&t.center[1]>=e.center[1]-n&&t.center[1]<=e.center[1]+n&&t.center[2]>=e.center[2]-n&&t.center[2]<=e.center[2]+n}toJSON(){const{maximumDepth:t,maximumObjectsPerNode:e,_objectCount:n}=this,r=this._nodeToJSON(this._root.node);return{maximumDepth:t,maximumObjectsPerNode:e,objectCount:n,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:r}}}_nodeToJSON(t){const e=t.children.map(t=>t?this._nodeToJSON(t):null),n=t.residents?.map(t=>this.objectToBoundingSphere(t)),r=t.terminals?.map(t=>this.objectToBoundingSphere(t));return{children:e,residents:n,terminals:r}}static fromJSON(t){const e=new b(t=>t,{maximumDepth:t.maximumDepth,maximumObjectsPerNode:t.maximumObjectsPerNode});return e._objectCount=t.objectCount,e._root.initFrom(t.root.node,t.root.bounds,t.root.halfSize,t.root.depth),e}}class _{constructor(){this.bounds=new h.iy,this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,r=this.depth){return this.node=null!=t?t:_.createEmptyNode(),e&&this.bounds.copy(e),this.halfSize=n,this.depth=r,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds.radius=this.halfSize*N}advance(t){let e=this.node.children[t];e||(e=_.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=z[t];return this.bounds.center[0]+=n[0]*this.halfSize,this.bounds.center[1]+=n[1]*this.halfSize,this.bounds.center[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e?.(this,-1),!0;if(this.isLeaf()){if(!n)return e?.(this,-1),!1;this.node.residents=null}const r=this._childIndex(t);e?.(this,r),this.advance(r)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t.radius>this.halfSize/2}_childIndex(t){const e=this.bounds.center;return(e[0]<t.center[0]?1:0)+(e[1]<t.center[1]?2:0)+(e[2]<t.center[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new l.A({shrink:!0}),residents:new l.A({shrink:!0})}}static{this._pool=new d.A(()=>new _)}static acquire(){return _._pool.acquire()}static release(t){_._pool.release(t)}static clearPool(){_._pool.prune()}}function g(t,e){let n=_.acquire().init(t);const r=[n];for(;0!==r.length;){if(n=r.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&r.push(_.acquire().init(n).advance(t));_.release(n)}}function M(t,e,n,r=1){let o=_.acquire().init(t);const i=[o];for(function(t,e,n){if(!J.length)for(let t=0;t<8;++t)J.push({index:0,distance:0});for(let n=0;n<8;++n){const r=z[n];J.data[n].index=n,J.data[n].distance=A(t,e,r)}J.sort((t,e)=>t.distance-e.distance);for(let t=0;t<8;++t)n[t]=J.data[t].index}(n,r,H);0!==i.length;){if(o=i.pop(),e(o)&&!o.isLeaf())for(let t=7;t>=0;--t){const e=H[t];o.node.children[e]&&i.push(_.acquire().init(o).advance(e))}_.release(o)}}function S(t,e,n){I.clear();const r=n.advanceTo(e,(t,e)=>{I.push(t.node),I.push(e)})?n.node.terminals:n.node.residents;if(r.removeUnordered(t),0===r.length)for(let t=I.length-2;t>=0&&v(I.data[t],I.data[t+1]);t-=2);}function v(t,e){return e>=0&&(t.children[e]=null),!!j(t)&&(null===t.residents&&(t.residents=new l.A({shrink:!0})),!0)}function j(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function y(t,e){t[0]=Math.min(t[0],e.center[0]-e.radius),t[1]=Math.min(t[1],e.center[1]-e.radius),t[2]=Math.min(t[2],e.center[2]-e.radius)}function x(t,e){t[0]=Math.max(t[0],e.center[0]+e.radius),t[1]=Math.max(t[1],e.center[1]+e.radius),t[2]=Math.max(t[2],e.center[2]+e.radius)}function w(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function O(t,e,n){R[0]=1/0,R[1]=1/0,R[2]=1/0,B[0]=-1/0,B[1]=-1/0,B[2]=-1/0;for(const n of t){const t=e(n);E(t.radius)&&(y(R,t),x(B,t))}(0,a.l)(n.center,R,B,.5),n.radius=Math.max(B[0]-R[0],B[1]-R[1],B[2]-R[2])/2}function T(t,e){let n,r=1/0;for(let o=0;o<8;++o){const i=A(t,e,P[o]);i<r&&(r=i,n=P[o])}return n}function A(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function E(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}const z=[(0,c.fA)(-1,-1,-1),(0,c.fA)(1,-1,-1),(0,c.fA)(-1,1,-1),(0,c.fA)(1,1,-1),(0,c.fA)(-1,-1,1),(0,c.fA)(1,-1,1),(0,c.fA)(-1,1,1),(0,c.fA)(1,1,1)],P=[(0,c.fA)(-1,-1,-1),(0,c.fA)(-1,-1,1),(0,c.fA)(-1,1,-1),(0,c.fA)(-1,1,1),(0,c.fA)(1,-1,-1),(0,c.fA)(1,-1,1),(0,c.fA)(1,1,-1),(0,c.fA)(1,1,1)],N=Math.sqrt(3),D=[null],C=new h.iy,q=(0,c.vt)(),R=(0,c.vt)(),B=(0,c.vt)(),I=new l.A,V=new h.iy,F=new h.iy,L=new h.iy,k=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],J=new l.A,H=[0,0,0,0,0,0,0,0];var K=n(431);function Q(t,e,n){const r=new h.iy;return(0,a.j)(r.center,t,.5),(0,a.c)(r.center,r.center,e,.5),r.radius=(0,a.D)(r.center,t),(0,a.i)(r.center,r.center,n),r}class W{constructor(t,e,n){this.objectId=t,this.target=e,this.distance=n}}class Y extends W{constructor(t,e,n){super(t,e,n),this.type="vertex"}}class G extends W{constructor(t,e,n,r,o){super(t,e,n),this.start=r,this.end=o,this.type="edge"}}let U=class{constructor(){this._idToComponent=new Map,this._components=new b(t=>t.bounds),this._edges=new b(t=>t.bounds),this._tmpLineSegment=(0,u.vt)(),this._tmpP1=(0,c.vt)(),this._tmpP2=(0,c.vt)(),this._tmpP3=(0,c.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,o.Te)(e);const n=t;n.mbs=new h.iy(t.mbsJSON),await this._ensureEdgeLocations(n,e);const r=[];return this._edges.forEachNeighbor(t=>(this._addCandidates(n,t,r),r.length<1e3),n.mbs),{result:{candidates:r}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor(t=>{if(null==t.info){const{id:e,uid:r}=t;n.push({id:e,uid:r})}return!0},t.mbs),!n.length)return;const r={components:n},o=await this.remoteClient.invoke("fetchAllEdgeLocations",r,e??{});for(const t of o.components)this._setFetchEdgeLocations(t)}async add(t){const e=new Z(t.id,new h.iy(t.bounds));return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor(n=>(n.component===e&&t.push(n),!0),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;const n=K.HY.createView(t.locations),r=new Array(n.count),o=(0,c.vt)(),i=(0,c.vt)();for(let s=0;s<n.count;s++){n.position0.getVec(s,o),n.position1.getVec(s,i);const a=Q(o,i,t.origin),c=new tt(e,s,a);r[s]=c}this._edges.add(r);const{objectIds:s,origin:a}=t;e.info={locations:n,objectIds:s,origin:a}}_addCandidates(t,e,n){const{info:r}=e.component,{origin:o,objectIds:i}=r,s=r.locations,c=s.position0.getVec(e.index,this._tmpP1),u=s.position1.getVec(e.index,this._tmpP2);(0,a.i)(c,c,o),(0,a.i)(u,u,o);const h=i[s.componentIndex.get(e.index)];this._addEdgeCandidate(t,h,c,u,n),$(t,h,c,n),$(t,h,u,n)}_addEdgeCandidate(t,e,n,r,o){if(!t.returnEdge)return;const i=t.mbs.center,s=(0,u.Cr)(n,r,this._tmpLineSegment),h=(0,u._I)(s,i,this._tmpP3);t.mbs.contains(h)&&o.push(new G(e,(0,c.o8)(h),(0,a.D)(i,h),(0,c.o8)(n),(0,c.o8)(r)))}};U=(0,r.Cg)([(0,s.$K)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],U);const X=U;function $(t,e,n,r){t.returnVertex&&t.mbs.contains(n)&&r.push(new Y(e,(0,c.o8)(n),(0,a.D)(t.mbs.center,n)))}class Z{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=(0,i.c)()}}class tt{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}},77690:(t,e,n)=>{n.d(e,{B8:()=>a,Ge:()=>f,I0:()=>l,KC:()=>c,a4:()=>u,hZ:()=>i,hs:()=>d,lw:()=>h,mg:()=>s,z0:()=>o});var r=n(34304);function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function i(t,e,n,r,o,i,s,a,c,u){return t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=i,t[5]=s,t[6]=a,t[7]=c,t[8]=u,t}function s(t,e){if(t===e){const n=e[1],r=e[2],o=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=o}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function a(t,e){const n=e[0],r=e[1],o=e[2],i=e[3],s=e[4],a=e[5],c=e[6],u=e[7],h=e[8],d=h*s-a*u,l=-h*i+a*c,f=u*i-s*c;let m=n*d+r*l+o*f;return m?(m=1/m,t[0]=d*m,t[1]=(-h*r+o*u)*m,t[2]=(a*r-o*s)*m,t[3]=l*m,t[4]=(h*n-o*c)*m,t[5]=(-a*n+o*i)*m,t[6]=f*m,t[7]=(-u*n+r*c)*m,t[8]=(s*n-r*i)*m,t):null}function c(t,e){const n=e[0],r=e[1],o=e[2],i=e[3],s=e[4],a=e[5],c=e[6],u=e[7],h=e[8];return t[0]=s*h-a*u,t[1]=o*u-r*h,t[2]=r*a-o*s,t[3]=a*c-i*h,t[4]=n*h-o*c,t[5]=o*i-n*a,t[6]=i*u-s*c,t[7]=r*c-n*u,t[8]=n*s-r*i,t}function u(t){const e=t[0],n=t[1],r=t[2],o=t[3],i=t[4],s=t[5],a=t[6],c=t[7],u=t[8];return e*(u*i-s*c)+n*(-u*o+s*a)+r*(c*o-i*a)}function h(t,e,n){const r=e[0],o=e[1],i=e[2],s=e[3],a=e[4],c=e[5],u=e[6],h=e[7],d=e[8],l=n[0],f=n[1],m=n[2],p=n[3],b=n[4],_=n[5],g=n[6],M=n[7],S=n[8];return t[0]=l*r+f*s+m*u,t[1]=l*o+f*a+m*h,t[2]=l*i+f*c+m*d,t[3]=p*r+b*s+_*u,t[4]=p*o+b*a+_*h,t[5]=p*i+b*c+_*d,t[6]=g*r+M*s+S*u,t[7]=g*o+M*a+S*h,t[8]=g*i+M*c+S*d,t}function d(t,e,n){const r=n[0],o=n[1],i=n[2];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=o*e[3],t[4]=o*e[4],t[5]=o*e[5],t[6]=i*e[6],t[7]=i*e[7],t[8]=i*e[8],t}function l(t,e){const n=e[0],r=e[1],o=e[2],i=e[3],s=n+n,a=r+r,c=o+o,u=n*s,h=r*s,d=r*a,l=o*s,f=o*a,m=o*c,p=i*s,b=i*a,_=i*c;return t[0]=1-d-m,t[3]=h-_,t[6]=l+b,t[1]=h+_,t[4]=1-u-m,t[7]=f-p,t[2]=l-b,t[5]=f+p,t[8]=1-u-d,t}function f(t,e){const n=e[0],r=e[1],o=e[2],i=e[3],s=e[4],a=e[5],c=e[6],u=e[7],h=e[8],d=e[9],l=e[10],f=e[11],m=e[12],p=e[13],b=e[14],_=e[15],g=n*a-r*s,M=n*c-o*s,S=n*u-i*s,v=r*c-o*a,j=r*u-i*a,y=o*u-i*c,x=h*p-d*m,w=h*b-l*m,O=h*_-f*m,T=d*b-l*p,A=d*_-f*p,E=l*_-f*b;let z=g*E-M*A+S*T+v*O-j*w+y*x;return z?(z=1/z,t[0]=(a*E-c*A+u*T)*z,t[1]=(c*O-s*E-u*w)*z,t[2]=(s*A-a*O+u*x)*z,t[3]=(o*A-r*E-i*T)*z,t[4]=(n*E-o*O+i*w)*z,t[5]=(r*O-n*A-i*x)*z,t[6]=(p*y-b*j+_*v)*z,t[7]=(b*S-m*y-_*M)*z,t[8]=(m*j-p*S+_*g)*z,t):null}function m(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}const p=h,b=m;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:c,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:u,equals:function(t,e){const n=t[0],o=t[1],i=t[2],s=t[3],a=t[4],c=t[5],u=t[6],h=t[7],d=t[8],l=e[0],f=e[1],m=e[2],p=e[3],b=e[4],_=e[5],g=e[6],M=e[7],S=e[8],v=(0,r.FD)();return Math.abs(n-l)<=v*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(o-f)<=v*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(i-m)<=v*Math.max(1,Math.abs(i),Math.abs(m))&&Math.abs(s-p)<=v*Math.max(1,Math.abs(s),Math.abs(p))&&Math.abs(a-b)<=v*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(c-_)<=v*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(u-g)<=v*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(h-M)<=v*Math.max(1,Math.abs(h),Math.abs(M))&&Math.abs(d-S)<=v*Math.max(1,Math.abs(d),Math.abs(S))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:o,fromQuat:l,fromRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:a,isOrthoNormal:function(t){const e=(0,r.FD)(),n=t[0],o=t[1],i=t[2],s=t[3],a=t[4],c=t[5],u=t[6],h=t[7],d=t[8];return Math.abs(1-(n*n+s*s+u*u))<=e&&Math.abs(1-(o*o+a*a+h*h))<=e&&Math.abs(1-(i*i+c*c+d*d))<=e},mul:p,multiply:h,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},normalFromMat4:f,normalFromMat4Legacy:function(t,e){const n=e[0],r=e[1],o=e[2],i=e[4],s=e[5],a=e[6],c=e[8],u=e[9],h=e[10],d=h*s-a*u,l=-h*i+a*c,f=u*i-s*c,m=n*d+r*l+o*f;if(!m)return null;const p=1/m;return t[0]=d*p,t[1]=(-h*r+o*u)*p,t[2]=(a*r-o*s)*p,t[3]=l*p,t[4]=(h*n-o*c)*p,t[5]=(-a*n+o*i)*p,t[6]=f*p,t[7]=(-u*n+r*c)*p,t[8]=(s*n-r*i)*p,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){const r=e[0],o=e[1],i=e[2],s=e[3],a=e[4],c=e[5],u=e[6],h=e[7],d=e[8],l=Math.sin(n),f=Math.cos(n);return t[0]=f*r+l*s,t[1]=f*o+l*a,t[2]=f*i+l*c,t[3]=f*s-l*r,t[4]=f*a-l*o,t[5]=f*c-l*i,t[6]=u,t[7]=h,t[8]=d,t},scale:d,scaleByVec2:function(t,e,n){const r=n[0],o=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=o*e[3],t[4]=o*e[4],t[5]=o*e[5],t},set:i,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:b,subtract:m,translate:function(t,e,n){const r=e[0],o=e[1],i=e[2],s=e[3],a=e[4],c=e[5],u=e[6],h=e[7],d=e[8],l=n[0],f=n[1];return t[0]=r,t[1]=o,t[2]=i,t[3]=s,t[4]=a,t[5]=c,t[6]=l*r+f*s+u,t[7]=l*o+f*a+h,t[8]=l*i+f*c+d,t},transpose:s},Symbol.toStringTag,{value:"Module"}))},82534:(t,e,n)=>{function r(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}n.d(e,{o8:()=>o,vt:()=>r,zK:()=>i});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"}))},91869:(t,e,n)=>{function r(t,e){for(const n of t.values())if(e(n))return!0;return!1}function o(t,e,n){const r=t.get(e);if(void 0!==r)return r;const o=n();return t.set(e,o),o}function i(t){const e=new Map;return n=>(e.has(n)||e.set(n,t(n)),e.get(n))}n.d(e,{Bj:()=>i,Bs:()=>r,tE:()=>o})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8948],{6518:(e,t,n)=>{n.d(t,{F:()=>a});var i=n(44208),r=n(75503),s=n(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,i.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((n,i)=>{e[t++]=i}),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,s.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,n){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,n)}(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()))}}},8460:(e,t,n)=>{n.d(t,{$C:()=>y,Hh:()=>o,Tu:()=>c,Wg:()=>h,Xq:()=>f,i6:()=>g,pM:()=>u,vJ:()=>m});var i=n(2741);let r,s=null;function o(){return r||(r=n.e(3666).then(n.bind(n,3666)).then(e=>e.l).then(({default:e})=>e({locateFile:e=>(0,i.s)(`esri/libs/linkchartlayout/${e}`)})).then(e=>{!function(e){s=e}(e)}),r)}const a={right:0,left:1,top:2,bottom:3},l={none:0,"start-only":1,"start-and-end":2};function p(e){const t={timeDirection:"right",timeBannerUTCOffsetInMinutes:0,eventsTicksVisualization:"start-and-end",showDurationLineForNonZeroDurationEntityEvents:!0,durationLineWidth:5,entityPositionAtDurationRatio:1,showNonZeroDurationIntervalBounds:!1,separateTimeOverlaps:!0,separateTimelineOverlaps:!0,moveFirstBends:!0,secondBendRatio:.3,lineSeparationMultiplier:1,spaceSeparatedLinesEvenly:!1,useBezierCurves:!1,separatedLineShapeRatio:0,...e?.toJSON(),eventsTicksVisualization:e?.eventsTicksVisualization??"start-and-end"};return{...t,timeDirection:{value:a[t.timeDirection]??a.right},eventsTicksVisualization:{value:l[t.eventsTicksVisualization]??l["start-and-end"]}}}function d(e,t,n,i,r,o){const a=n.length,l=r.length,p=Float64Array.BYTES_PER_ELEMENT,d=Uint32Array.BYTES_PER_ELEMENT,u=Uint8Array.BYTES_PER_ELEMENT,c=16+a*(u+2*p)+l*(2*d),h=s._malloc(c);try{const u=h+16-h%16,c=u+a*p,y=c+a*p,m=y+l*d,f=m+l*d,g=()=>[s.HEAPF64.subarray(u>>3,(u>>3)+a),s.HEAPF64.subarray(c>>3,(c>>3)+a),s.HEAPU32.subarray(y>>2,(y>>2)+l),s.HEAPU32.subarray(m>>2,(m>>2)+l),s.HEAPU8.subarray(f,f+a)],[b,w,_,M,T]=g();b.set(n),w.set(i),_.set(r),M.set(o),T.set(t);const I=e(a,f,u,c,l,y,m);let C=null,v=null;if(0===I.value){const e=s.getLayoutLinksTypes(),t=s.getLayoutLinksVerticesEndIndices(),n=s.getLayoutLinksVertices(),i=s.countLayoutLinksVertices();!l||e&&t?i&&!n?I.value=1:(C={types:new Uint8Array(s.HEAPU8.subarray(e,e+l)),vertexEndIndex:new Uint32Array(s.HEAPU32.subarray(t>>2,(t>>2)+l)),vertices:new Float64Array(s.HEAPF64.subarray(n>>3,(n>>3)+2*i))},v=s.getAuxiliaryGraphicElements()):I.value=1}const[A,x,E,S,k]=g();return n.set(A),i.set(x),r.set(E),o.set(S),t.set(k),{status:I.value,links:C,graphics:v}}finally{s._free(h),s.cleanupLayout()}}var u,c,h,y,m,f,g,b;(b=u||(u={})).getMinIdealEdgeLength=function(){return s.getMinIdealEdgeLength()},b.apply=function(e,t,n,i,r,o,a=2,l=1,p=-1){return d((t,n,i,r,o,d,u)=>s.applyForceDirectedLayout(e,t,n,i,r,o,d,u,a,l,p),t,n,i,r,o)},function(e){e.apply=function(e,t,n,i,r,o,a=2,l=1,p=-1){return d((t,n,i,r,o,d,u)=>s.applyCommunityLayout(e,t,n,i,r,o,d,u,a,l,p),t,n,i,r,o)}}(c||(c={})),function(e){e.apply=function(e,t,n,i,r,o){return d((t,n,i,r,o,a,l)=>s.applySimpleLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(h||(h={})),function(e){e.apply=function(e,t,n,i,r,o){return d((t,n,i,r,o,a,l)=>s.applyHierarchicalLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(y||(y={})),function(e){e.apply=function(e,t,n,i,r,o){return d((t,n,i,r,o,a,l)=>s.applyRadialTreeLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(m||(m={})),function(e){e.apply=function(e,t,n,i,r,o){return d((t,n,i,r,o,a,l)=>s.applySmartTreeLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(f||(f={})),function(e){e.apply=function(e,t,n,i,r,o,a,l,u,c,h,y){return d((t,n,i,a,l,d,m)=>{if(r.length!==t)return{value:1};if(o.length!==t)return{value:1};if(u.length!==l)return{value:1};if(c.length!==l)return{value:1};const f=Float64Array.BYTES_PER_ELEMENT,g=16,b=s._malloc(g+t*f),w=s._malloc(g+t*f),_=s._malloc(g+l*f),M=s._malloc(g+l*f),T=b+g-b%g,I=w+g-w%g,C=_+g-_%g,v=M+g-M%g;try{return s.HEAPF64.subarray(T>>3,(T>>3)+t).set(r),s.HEAPF64.subarray(I>>3,(I>>3)+t).set(o),s.HEAPF64.subarray(C>>3,(C>>3)+l).set(u),s.HEAPF64.subarray(v>>3,(v>>3)+l).set(c),s.applyChronologicalLayout(e,t,n,i,a,T,I,l,d,m,C,v,h,p(y))}finally{s._free(b),s._free(w),s._free(_),s._free(M)}},t,n,i,a,l)}}(g||(g={}))},15375:(e,t,n)=>{n.d(t,{BL:()=>l,Cz:()=>r,KQ:()=>s,M1:()=>a,T1:()=>o,dr:()=>i});const i="ESRI__ID",r="ESRI__OriginID",s="ESRI__DestID",o="ESRI__LayoutGeometry",a="ESRI__AggregationCount",l="LC.ESRI__IsSpatial"},23150:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(31635),r=n(91429),s=n(82799),o=n(54238);let a=class extends o.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"originId",void 0),(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"destinationId",void 0),(0,i.Cg)([(0,r.MZ)({type:s.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.Relationship")],a)},24137:(e,t,n)=>{n.d(t,{P:()=>T});var i=n(31635),r=n(69622),s=n(49186),o=n(53966),a=n(91869),l=n(74887),p=n(39516),d=n(91429),u=n(5443),c=n(39829),h=n(91218),y=n(21325),m=n(15375);const f=(e,t)=>{if("column-reference"===e.type)return e.column===t.systemOidFieldName?"ID(n)":`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&t.supportedSqlTypes.has(e.left.type)&&t.supportedSqlTypes.has(e.right.type)&&t.supportedSqlOperators.has(e.operator))return`${f(e.left,t)} ${e.operator} ${f(e.right,t)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let n="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)n+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return t.unsupportedOperationFound=!0,"";n+=`lower(n.${e.left.column})`}if(n+=" CONTAINS (","string"!==e.right.type)return t.unsupportedOperationFound=!0,"";{let t=e.right.value;t.startsWith("%")&&(t=t.slice(1)),t.endsWith("%")&&(t=t.slice(0,-1)),n+=`'${t.toLowerCase()}')`}return n}return t.unsupportedOperationFound=!0,""};var g=n(69860),b=n(30504),w=n(48441),_=n(42538),M=n(61956);let T=class extends r.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach(n=>{n.name&&(t.set(n.name,"entity"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(n.name),n.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.knowledgeGraph.dataModel.relationshipTypes?.forEach(n=>{n.name&&(t.set(n.name,"relationship"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(n.name),n.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.inclusionModeDefinition?.namedTypeDefinitions.forEach((n,i)=>{if("entity"===t.get(i))this.entityTypeNames.add(i);else{if("relationship"!==t.get(i))return o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(i);this.relationshipTypeNames.add(i)}const r=new Map;n.members?.forEach(e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,()=>new Set).add(i)}),this.sublayerCaches.set(i,r)})}addToLayer(e){e.forEach(({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new s.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const n=this.inclusionModeDefinition.namedTypeDefinitions.get(e);n.members||(n.members=new Map),n.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}}else{const n=new Map;n.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:n}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}})}getById(e){return g.A.getInstance().readFromStoreById(e)}async getData(e,t,n){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let i;if(i=e||new M.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,n=this._processingCacheUpdatesLookup.get(t.objectType.name??""),r=i.outFields;r&&1===r.length&&r[0]===m.dr&&"1=1"===i.where||await Promise.all(n??[]);const s=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],o=[];return s.forEach(n=>{if(this.relationshipTypeNames.has(t.objectType.name)){n.geometry=e.relationshipLinkChartDiagramLookup.get(n.attributes[t.objectIdField]);const i=this.memberIdTypeLookup.get(n.attributes[m.Cz]),r=this.memberIdTypeLookup.get(n.attributes[m.KQ]),s=this._isEndEntitySpatial(i,n,m.Cz),o=this._isEndEntitySpatial(r,n,m.KQ);n.attributes[m.BL]=Number(s&&o)}else{n.geometry=e.entityLinkChartDiagramLookup.get(n.attributes[t.objectIdField]);const i=this.geographicLookup.get(t.objectType.name);i&&n.attributes[i.name]?n.attributes[m.BL]=1:n.attributes[m.BL]=0}n.attributes[m.T1]=n.geometry,o.push(n)}),o}return this.retrieveDataFromService(i,t,n)}async getConnectedRecordIds(e,t,n){const i=[];let r="";const s=this._getNamedTypeIdMapFromNodeIds(e);if(t&&0!==t?.length){for(const e of t)r=r+e+"|";r=r.slice(0,-1)}const o={},a=[];for(const[e,n]of s){const i=`${e}_ids`;o[i]=n,t&&0!==t?.length?a.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r:${r}]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`):a.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`)}if(!a.length)return i;const l=a.join(" UNION "),p=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:l,bindParameters:o}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];i.push({id:n[0],typeName:n[1]}),i.push({id:n[2],typeName:n[3]})}}return i}async getRelationshipsBetweenNodes(e,t,n){const i=this._getNamedTypeIdMapFromNodeIds(e);if(0===i.size)return[];const r={relationshipExclusionIds:t,possibleConnectionEntityIds:e},s=[];for(const[e,t]of i.entries()){const n=`${e}_ids`;r[n]=t,s.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]->(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const o=s.join(" UNION "),a=[],l=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:o,bindParameters:r}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await l.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];a.push({id:n[0],typeName:n[1]})}}return a}async getRelationshipsFromNodes(e,t,n,i){const r=this._getNamedTypeIdMapFromNodeIds(e);if(0===r.size||0===t.length)return[];const s={relationshipExclusionIds:n,possibleConnectionEntityIds:t},o=[];for(const[e,t]of r.entries()){const n=`${e}_ids`;s[n]=t,o.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]-(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const a=o.join(" UNION "),l=new Map,p=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:a,bindParameters:s}),{signal:i?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];let i=l.get(n[1]);i||(i=new Set,l.set(n[1],i)),i.add(n[0])}}const d=[];for(const[e,t]of l)for(const n of t)d.push({id:n,typeName:e});return d}async refreshCacheContent(e,t,n,i=!0,r){const o=g.A.getInstance(),p=[],d=new Map,u=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&u.set(e.name,e)}),this.knowledgeGraph.dataModel.relationshipTypes?.forEach(e=>{e.name&&u.set(e.name,e)}),e||this.inclusionModeDefinition?e?e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))d.has(t)?d.get(t)?.push(e):d.set(t,[e])}):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{e.useAllData?d.set(t,null):e.members&&e.members.forEach(e=>{d.has(t)&&null!==d.get(t)?d.get(t)?.push(e.id):d.set(t,[e.id])})}):(this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,null)}),this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,null)}));for(const[e,l]of d){const d=new Set(l),c=new Promise((p,c)=>{(async()=>{const p=new Set,c=[];let h,y="",f=!1;if(t||u.get(e)?.properties?.forEach(e=>{e.name&&p.add(e.name)}),n&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&p.add(t)}if(this.entityTypeNames.has(e))y=`MATCH (n:${e}) ${l?"WHERE id(n) IN $ids ":""}return ID(n)`,p.forEach(e=>{y+=`, n.${e}`,c.push(e)});else{if(!this.relationshipTypeNames.has(e))throw new s.A("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);f=!0,y=`MATCH ()-[n:${e}]->() ${l?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,p.forEach(e=>{y+=`, n.${e}`,c.push(e)})}h=new _.A(l?{openCypherQuery:y,bindParameters:{ids:l}}:{openCypherQuery:y});const g=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,h,{signal:r?.signal})).resultRowsStream.getReader();for(;;){const{done:t,value:n}=await g.read();if(t)break;const r=[];for(let e=0;e<n.length;e++){const t=n[e];let i=0,s=0;const o={properties:{}};for(o.id=t[i],i++,s++,f&&(o.originId=t[i],i++,s++,o.destinationId=t[i],i++,s++,(0,a.tE)(this.nodeConnectionsLookup,o.originId,()=>new Set).add(o.id),(0,a.tE)(this.nodeConnectionsLookup,o.destinationId,()=>new Set).add(o.id),(0,a.tE)(this.relationshipConnectionsLookup,o.id,()=>[o.originId,o.destinationId]));i<t.length;i++)o.properties[c[i-s]]=t[i];d.delete(o.id),r.push(o)}const s=o.writeToStore(r,m.dr,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const l=this.sublayerCaches.get(e);s.forEach(t=>{l?.set(t.attributes[m.dr],t),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[m.dr])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[m.dr],{id:t.attributes[m.dr]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[m.dr],()=>new Set).add(e))})}const b=this.inclusionModeDefinition?.namedTypeDefinitions.get(e);if(b)for(const e of d)b.members?.delete(e)})().then(()=>{p(null)}).catch(e=>{"AbortError"===e.name?p(null):c(e)})});p.push(c),this._processingCacheUpdatesLookup.get(e)?.push(c)}if(await Promise.all(p),r?.signal?.aborted)throw(0,l.NK)()}removeFromLayer(e){const t=new Set,n=new Set(e.map(e=>e.id));for(const n of e)t.add(n.typeName),1===this.memberIdTypeLookup.get(n.id)?.size?this.memberIdTypeLookup.delete(n.id):this.memberIdTypeLookup.get(n.id)?.delete(n.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach((e,t)=>{t===n.typeName&&e.members?.has(n.id)&&e.members.delete(n.id)});t.forEach(e=>{this.sublayerCaches.get(e)?.forEach((t,i)=>{n.has(i)&&this.sublayerCaches.get(e)?.delete(i)})})}async retrieveDataFromService(e,t,n){const i=g.A.getInstance(),r=new Set,o=[];let a,l="",d=[];const M="relationship"===t.graphType,T=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,I=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let C=!T&&I?Array.from(I).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(C=e.objectIds);else if(null!=e.objectIds&&C&&C.length>0){const t=e.objectIds;e.objectIds=C.filter(e=>t.includes(e))}else if(null!=e.objectIds)C=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],[];e.objectIds=C}if(null!=e.outFields){const n=e.outFields;n.includes("*")?t.fields.forEach(e=>{r.add(e.name)}):n.forEach(e=>{e!==m.dr&&e!==t.geometryFieldName&&r.add(e)})}if(null!=e.geometry){const n=e.geometry;let i;const d=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,m=d?.spatialReference,f=d?.serviceCapabilities?.geometryCapabilities;let g=f?.geometryMaxBoundingRectangleSizeX,w=f?.geometryMaxBoundingRectangleSizeY;if("point"===n.type){let e=n;e.spatialReference?.isWGS84||(await(0,h.initializeProjection)(e.spatialReference,y.KK),e=(0,h.project)(e,y.KK)),i=new u.A({spatialReference:y.KK,xmin:e.x-1e-4,ymin:e.y-1e-4,xmax:e.x+1e-4,ymax:e.y+1e-4})}else n?.extent?.spatialReference&&!n.spatialReference?.isWGS84?(await(0,h.initializeProjection)(n.extent.spatialReference,y.KK),i=(0,h.project)(n.extent,y.KK)):i=n.extent;if(g&&w&&m){if(4326!==m.wkid){const e=new u.A({spatialReference:m,xmax:g,ymax:w}),t=(0,h.project)(e,y.KK);g=t.xmax,w=t.ymax}if(i.xmax-i.xmin>g)throw new s.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${g}° latitude, limit exceeded`);if(i.ymax-i.ymin>w)throw new s.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${w}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const n=await(0,p.GP)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach(e=>{n.fieldNames.includes(e.name)&&r.add(e.name)})}l=M?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach(e=>{l+=`, n.${e}`,o.push(e)}),a=new _.A({openCypherQuery:l,bindParameters:{param_filter_geom:new c.A({rings:(0,b.Wq)(i)})}})}else{let n="";if(null!=e.where&&"1=1"!==e.where){const i=await(0,p.GP)(e.where,t.fieldsIndex);t.fields.forEach(e=>{i.fieldNames.includes(e.name)&&r.add(e.name)});const s={systemOidFieldName:m.dr,supportedSqlTypes:new Set(["column-reference","string","number","binary-expression"]),supportedSqlOperators:new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]),unsupportedOperationFound:!1};n=f(i.parseTree,s),s.unsupportedOperationFound&&(n="")}let i="";i=M?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let s=!1;C&&(s=!0,i+=" WHERE ID(n) IN $ids"),n&&(i+=s?" AND":" WHERE",i+=` ${n}`),i+=" return ID(n)",M&&(i+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach(e=>{i+=`, n.${e}`,o.push(e)}),a=new _.A(C?{openCypherQuery:i,bindParameters:{ids:C}}:{openCypherQuery:i})}const v=(await(0,w.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,n)).resultRowsStream.getReader();for(;;){const{done:e,value:n}=await v.read();if(e)break;const r=[];for(let e=0;e<n.length;e++){const t=n[e];let i=0,s=0;const a={properties:{}};for(a.id=t[i],i++,s++,M&&(a.originId=t[i],i++,s++,a.destinationId=t[i],i++,s++);i<t.length;i++)a.properties[o[i-s]]=t[i];r.push(a)}d=d.concat(i.writeToStore(r,m.dr,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return d}_isEndEntitySpatial(e,t,n){for(const i of e??[])if(this.entityTypeNames.has(i)){const e=this.geographicLookup.get(i),r=e&&this.sublayerCaches.get(i)?.get(t.attributes[n]);if(e&&r?.attributes[e.name])return!0}return!1}_getNamedTypeIdMapFromNodeIds(e){const t=new Map;return e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(const n of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(n))return;t.has(n)?t.get(n)?.push(e):t.set(n,[e])}}),t}};(0,i.Cg)([(0,d.MZ)()],T.prototype,"knowledgeGraph",void 0),(0,i.Cg)([(0,d.MZ)()],T.prototype,"inclusionModeDefinition",void 0),(0,i.Cg)([(0,d.MZ)()],T.prototype,"entityTypeNames",void 0),(0,i.Cg)([(0,d.MZ)()],T.prototype,"relationshipTypeNames",void 0),(0,i.Cg)([(0,d.MZ)()],T.prototype,"geographicLookup",void 0),(0,i.Cg)([(0,d.MZ)()],T.prototype,"sublayerCaches",void 0),(0,i.Cg)([(0,d.MZ)()],T.prototype,"nodeConnectionsLookup",void 0),(0,i.Cg)([(0,d.MZ)()],T.prototype,"relationshipConnectionsLookup",void 0),(0,i.Cg)([(0,d.MZ)()],T.prototype,"memberIdTypeLookup",void 0),T=(0,i.Cg)([(0,d.$K)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],T)},25927:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(31635),r=n(91429),s=n(86738),o=n(54238);let a=class extends o.A{constructor(e){super(e),this.layoutGeometry=null}};(0,i.Cg)([(0,r.MZ)({type:s.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.Entity")],a)},30504:(e,t,n)=>{n.d(t,{k5:()=>p,aq:()=>l,Wq:()=>d}),n(52106);var i=n(49186),r=(n(86738),n(39829),n(82799),n(94194),n(69860),n(8460),n(66552));(0,r.O)()({none:"none",startAndEnd:"start-and-end",startOnly:"start-only"}),(0,r.O)()({absoluteValue:"absolute-value",multiplier:"multiplier"});const s=new Map([["basic-grid","basic-grid"],["geographic-organic-standard","geographic-organic-standard"],["hierarchical-bottom-to-top","hierarchical-bottom-to-top"],["hierarchical-top-to-bottom","hierarchical-bottom-to-top"],["organic-community","organic-community"],["organic-fusiform","organic-standard"],["organic-leaf-circle","organic-standard"],["organic-standard","organic-standard"],["radial-node-centric","radial-root-centric"],["radial-root-centric","radial-root-centric"],["tree-bottom-to-top","tree-left-to-right"],["tree-left-to-right","tree-left-to-right"],["tree-right-to-left","tree-left-to-right"],["tree-top-to-bottom","tree-left-to-right"],["chronological-mono-timeline","chronological-mono-timeline"],["chronological-multi-timeline","chronological-multi-timeline"]]);var o=n(48441),a=n(42538);async function l(e,t,n){const i=[],r=function(e,t){const n=new Map;if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&n.set(e.name,[]);for(const t of e)n.has(t.typeName)&&n.get(t.typeName)?.push(t.id);return n}(e,t),s={},l=[];for(const[e,t]of r){if(t.length<1)continue;const n=`${e}_ids`;s[n]=t,l.push(`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $${n} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===l.length)return[];const p=l.join(" UNION "),d=new a.A({openCypherQuery:p,bindParameters:s}),u=(await(0,o.executeQueryStreaming)(t,d,n?.requestOptions)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await u.read();if(e)break;for(const e of t)i.push({id:e[0],typeName:e[1]}),i.push({id:e[2],typeName:e[3]})}return i}n(40863),n(94985),n(68249);const p=e=>s.get(e)??"radial-root-centric";function d(e){if(!e.spatialReference.isWGS84)throw new i.A("knowledge-graph:layer-support-utils","The utilsExtentToInBoundsRings function only supports WGS84 spatial references.");return e.clone().normalize().map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}},37531:(e,t,n)=>{n.d(t,{dt:()=>c,GG:()=>g,UQ:()=>f,Sx:()=>d});var i=n(68197),r=n(60999),s=(n(44208),n(51850)),o=(n(76369),n(62046)),a=(n(2741),n(11254),n(66344));new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new a.q(1e3),new i.A([128,128,128]);var l=n(28975),p=n(33910);function d(e,t){if(!e)return null;let n=null;return(0,p.wk)(e)?n=function(e){const t=e.symbolLayers;if(!t)return null;let n=null;return t.forEach(e=>{"object"===e.type&&e.resource?.href||(n="water"===e.type?e.color:e.material?e.material.color:null)}),n?new i.A(n):null}(e):(0,p.$y)(e)&&(n="cim"===e.type?(0,o.Nk)(e):e.color?new i.A(e.color):null),n?u(n,t):null}function u(e,t){if(null==t||null==e)return e;const n=e.toRgba();return n[3]=n[3]*t,new i.A(n)}function c(e,t,n){e&&(t||null!=n)&&(t&&(t=new i.A(t)),(0,p.wk)(e)?function(e,t,n){const r=e.symbolLayers;if(!r)return;const s=(e,r=!1)=>{let s=t??e??null;return null!=n?.override&&(!s&&r&&(s=new i.A([255,255,255])),s&&(s.a=n.override)),u(s,n?.add)};r.forEach(e=>{if("water"===e.type)return void(e.color=u(e.color,n?.add));const t=null!=e.material?e.material.color:null,i=s(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new l.N({color:i}):e.material.color=i,"outline"in e&&e.outline?.color&&null!=n?.add&&(e.outline.color=u(e.outline.color,n.add)),"marker"in e&&null!=e.marker&&(e.marker.color=s(e.marker.color))})}(e,t,n):(0,p.$y)(e)&&function(e,t,n){t=t??e.color,null!=n?.override&&t&&(t.a=n.override),t&&(e.color=u(t,n?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=u(e.outline.color,n?.add))}(e,t,n))}function h(e){for(const t of e)if("number"==typeof t)return t;return null}function y(e,t,n){for(let i=0;i<3;i++){const r=e[i];switch(r){case"symbol-value":{const e=n[i];return null!=e?e/t[i]:1}case"proportional":break;default:if(r&&t[i])return r/t[i]}}return null}function m(e,t,n,i){switch(e){case"proportional":return n*i;case"symbol-value":return null!=t?t:n;default:return e}}async function f(e,t){if(e&&t)return(0,p.wk)(e)?async function(e,t){const i=e.symbolLayers;i&&await(0,r.jJ)(i,async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){const n=t[2];"number"==typeof n&&(e.size=n)}(e,t);break;case"icon":case"line":case"text":!function(e,t){const n=h(t);null!=n&&(e.size=n)}(e,t);break;case"path":!function(e,t){const n=y(t,s.Un,[e.width,void 0,e.height]);null!=n&&(e.width=m(t[0],e.width,1,n),e.height=m(t[2],e.height,1,n))}(e,t);break;case"object":await async function(e,t){const{resourceSize:i,symbolSize:r}=await async function(e){const{computeObjectLayerResourceSize:t}=await n.e(5404).then(n.bind(n,95404)),i=await t(e,10),{width:r,height:s,depth:o}=e,a=[r,o,s];let l=1;for(let e=0;e<3;e++){const t=a[e];if(null!=t){l=t/i[e];break}}for(let e=0;e<3;e++)null==a[e]&&(a[e]=i[e]*l);return{resourceSize:i,symbolSize:a}}(e),s=y(t,i,r);null!=s&&(e.width=m(t[0],r[0],i[0],s),e.depth=m(t[1],r[1],i[1],s),e.height=m(t[2],r[2],i[2],s))}(e,t)}}(e,t))}(e,t):void((0,p.$y)(e)&&function(e,t){const n=h(t);if(null!=n)switch(e.type){case"simple-marker":e.size=n;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=n,e.height=n*t):(e.width=n*t,e.height=n);break}case"simple-line":e.width=n;break;case"text":e.font.size=n}}(e,t))}function g(e,t,n){if(e&&null!=t)if((0,p.wk)(e)){const i=e.symbolLayers;i&&i.forEach(e=>{if("object"===e.type)switch(n){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)})}else if((0,p.$y)(e))switch(e.type){case"simple-marker":case"picture-marker":case"text":e.angle+=t;break;case"cim":(0,o.KU)(e,t,!0)}}},37730:(e,t,n)=>{n.d(t,{T:()=>r});var i=n(43334);const r={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new i.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},40662:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(31635),r=n(91429),s=n(77901);let o=class extends s.A{constructor(e){super(e)}};o=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.ObjectValue")],o)},42095:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(31635),r=n(25482),s=n(91429),o=n(77901);let a=class extends r.o{constructor(e){super(e),this.path=[]}};(0,i.Cg)([(0,s.MZ)({type:[o.A],json:{write:!0}})],a.prototype,"path",void 0),a=(0,i.Cg)([(0,s.$K)("esri.rest.knowledgeGraph.Path")],a)},42538:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(31635),r=n(91429),s=n(16930),o=n(69622);let a=class extends o.A{constructor(e){super(e),this.openCypherQuery=""}};(0,i.Cg)([(0,r.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphQuery")],a);let l=class extends a{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,i.Cg)([(0,r.MZ)()],l.prototype,"bindParameters",void 0),(0,i.Cg)([(0,r.MZ)()],l.prototype,"bindGeometryQuantizationParameters",void 0),(0,i.Cg)([(0,r.MZ)()],l.prototype,"outputQuantizationParameters",void 0),(0,i.Cg)([(0,r.MZ)({type:s.A})],l.prototype,"outputSpatialReference",void 0),(0,i.Cg)([(0,r.MZ)()],l.prototype,"provenanceBehavior",void 0),l=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphQueryStreaming")],l)},54238:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(31635),r=n(91429),s=n(77901);let o=class extends s.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],o.prototype,"typeName",void 0),(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],o.prototype,"id",void 0),o=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphNamedObject")],o)},54898:(e,t,n)=>{n.d(t,{Gz:()=>$,O9:()=>G,hZ:()=>P,CP:()=>q,dD:()=>Z,UT:()=>R,MY:()=>F,Td:()=>D,iW:()=>j,e$:()=>B,qN:()=>k});var i=n(68197),r=n(49186),s=n(91869),o=(n(85105),n(58769));n(39410),n(33421),n(21774),n(93885);const a=o.A;var l=n(965),p=n(91218),d=n(16930),u=n(17136),c=n(99352),h=n(15375),y=n(29005),m=n(46499),f=n(73913),g=n(77548),b=n(48441),w=n(25927),_=n(31635),M=n(69622),T=n(91429);let I=class extends M.A{constructor(e){super(e),this.entityAdds=void 0,this.entityUpdates=void 0,this.entityDeletes=void 0,this.relationshipAdds=void 0,this.relationshipUpdates=void 0,this.relationshipDeletes=void 0,this.options=void 0}};(0,_.Cg)([(0,T.MZ)()],I.prototype,"entityAdds",void 0),(0,_.Cg)([(0,T.MZ)()],I.prototype,"entityUpdates",void 0),(0,_.Cg)([(0,T.MZ)()],I.prototype,"entityDeletes",void 0),(0,_.Cg)([(0,T.MZ)()],I.prototype,"relationshipAdds",void 0),(0,_.Cg)([(0,T.MZ)()],I.prototype,"relationshipUpdates",void 0),(0,_.Cg)([(0,T.MZ)()],I.prototype,"relationshipDeletes",void 0),(0,_.Cg)([(0,T.MZ)()],I.prototype,"options",void 0),I=(0,_.Cg)([(0,T.$K)("esri.rest.knowledgeGraph.GraphApplyEdits")],I);var C=n(23150),v=n(54218),A=n(40863),x=n(68249);const E={initializeLayersFromClientData:async(e,t,n)=>{if(t||(t=[...e.layers,...e.tables].map(e=>e.graphTypeName)),0===t?.length)return;const i=new Map;for(const n of t)i.set(n,S(e,n));const r=await(0,b.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(i.values()),{requestOptions:{signal:n?.signal}});for(const t of[...e.layers,...e.tables]){const n=t.objectType.name;if(null==n)continue;const i=r.get(S(e,n));if(i){const e=JSON.parse(i);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),t.read(e,{origin:"service"})}}},getInclusionDefinitionFromCypherResults:async(e,t,n)=>{const i=U(e.dataModel),r=(await(0,b.executeQueryStreaming)(e,t,n)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await r.read();if(e)break;for(const e of t)for(const t of e)z(t,i)}return i},getInclusionDefinitionFromIdTypePairs:(e,t)=>{const n=U(e.dataModel);for(const{id:e,typeName:i}of t){const t=n.namedTypeDefinitions.get(i);if(!t)throw new r.A("WebLinkChart:data-model-desync","The provided id-type pairs contained a named type not reflected in the provided knowledge graph data model.");t.members?.set(e,{id:e})}return n}},S=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function k(e,t,n){return E.initializeLayersFromClientData(e,t,n)}const N=["#4a0932","#b31515","#18382e","#a64f1b","#102432","#8c213f","#ed9310","#2c6954","#144d59","#ffc730","#75351e","#454f4b","#78b1c2","#191921","#8f8f82","#9be0c0","#dbb658","#87b051","#11495c","#c43541","#9c5596","#44498b","#ad9d63","#86afb3","#5c98ca","#b0bfa2","#73241f","#b86b53","#d9d78c","#3e756d","#f260a1","#a0d17d","#c27c30","#eb82eb","#ffdf3c","#ffb259","#ab52b3","#3cccb4","#0095ba","#d92b30"],L="#8f8f82";function D(e){return e<0||e>=N.length?new i.A(L):new i.A(N[e])}function R(e){const t=e.toArray();return new A.A({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,style:"solid",width:.75,color:t},{type:"CIMVectorMarker",enable:!0,size:6,markerPlacement:{type:"CIMMarkerPlacementOnLine",angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-10,ymin:-5,xmax:0,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[-12,-3.47],[-12,3.6],[1.96,-.03],[-12,-3.47]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:t}]}}]}]}}})}function F(e){let t="ESRI__ID",n=4;for(const i of e)if(i.name){if("name"===i.name.toLowerCase()){t=i.name;break}i.name.toLowerCase().includes("name")?(t=i.name,n=2):"esriFieldTypeString"===i.fieldType&&n>3&&(t=i.name,n=3)}return t}function j(e,t,n){const i={color:[80,80,80],haloColor:[255,255,255],haloSize:.7,font:{size:10,weight:"normal"}},r=new m.A({labelExpressionInfo:new f.A({expression:"ESRI__ID"===n?`${t}`:`$feature.${n}`}),labelPlacement:"above-center",symbol:new x.A(i)}),s=new m.A({labelExpressionInfo:new f.A({expression:`'${t}' + IIf($feature.ESRI__AggregationCount>1, ' (' + $feature.ESRI__AggregationCount + ')', '')`}),labelPlacement:"center-along",labelPosition:"parallel",repeatLabel:!1,symbol:new x.A({...i,yoffset:"12px"})});return"entity"===e?[r]:[s]}function B(e,t,n){const i={color:[255,255,255],haloColor:[0,0,0],haloSize:.7,font:{size:10,weight:"bold"}},r="ESRI__ID"===n?`${e}`:`$feature.${n}`;return"point"===t?[new m.A({labelExpressionInfo:new f.A({expression:r}),labelPlacement:"above-center",symbol:new x.A(i)})]:"polyline"===t?[new m.A({labelExpressionInfo:new f.A({expression:r}),labelPlacement:"center-along",repeatLabel:!0,symbol:new x.A(i)})]:"polygon"===t?[new m.A({labelExpressionInfo:new f.A({expression:r}),labelPlacement:"always-horizontal",symbol:new x.A(i)})]:null}const O={capabilities:[],allowGeometryUpdates:!1,serviceCapabilities:{geometryCapabilities:{supportsZValues:!1,supportsMValues:!1}}};function P(e){const{capabilities:t,allowGeometryUpdates:n,serviceCapabilities:{geometryCapabilities:{supportsZValues:i,supportsMValues:r}}}=e?.serviceDefinition||O,s=e?.dataModel.arcgisManaged?t:t.filter(e=>"Query"===e),o=new Set(s);return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:r,supportsTrueCurve:!1,supportsZ:i},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:o.has("Create"),supportsDelete:o.has("Delete"),supportsEditing:o.has("Editing"),supportsChangeTracking:!1,supportsQuery:o.has("Query"),supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:o.has("Update"),supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:c.F,queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:c.P,editing:{supportsGeometryUpdate:!!e?.dataModel.arcgisManaged&&n,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:o.has("Delete"),supportsUpdateByAnonymous:!1,supportsUpdateByOthers:o.has("Update"),supportsAsyncApplyEdits:!1,zDefault:void 0}}}async function G(e,t){const n=new I,i=t.graphTypeName,r=t.graphType,o="knowledge-graph"===t.parentCompositeLayer.type?t.geometryFieldName:null,a=!!t.fieldsIndex.get(o)?.editable,l=e=>{const n={...e};for(const e of t.fields)e.editable||delete n[e.name];for(const t of Object.keys(e))t.includes("ESRI__")&&delete n[t];return n},c=async e=>{await(0,p.initializeProjection)(e.spatialReference,d.A.WGS84);const t=(0,p.project)(e,d.A.WGS84);return"point"===t.type?t.normalize():(await(0,u.el)(t))[0]};for(const t of e.addFeatures??[]){const e=l(t.attributes);(0,g.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===i&&("entity"===r?(n.entityAdds||(n.entityAdds=[]),o&&t.geometry&&(e[o]=await c(t.geometry)),n.entityAdds.push(new w.A({properties:e,typeName:i}))):(n.relationshipAdds||(n.relationshipAdds=[]),n.relationshipAdds.push(new C.A({properties:e,typeName:i}))))}for(const t of e.updateFeatures??[]){const e=t.attributes[h.dr],s=l(t.attributes);(0,g.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===i&&("entity"===r?(n.entityUpdates||(n.entityUpdates=[]),o&&a&&t.geometry&&(s[o]=await c(t.geometry)),n.entityUpdates.push(new w.A({id:e,properties:s,typeName:i}))):(n.relationshipUpdates||(n.relationshipUpdates=[]),n.relationshipUpdates.push(new C.A({id:e,properties:s,typeName:i}))))}const y=new Map;for(const t of e.deleteFeatures??[])if((0,v.DU)(t)){const e=t,n=(0,s.tE)(y,e.sourceLayer.graphTypeName,()=>({typeName:e.sourceLayer.graphTypeName,ids:[]}));e.sourceLayer.graphTypeName===i&&n.ids.push(e.attributes[h.dr])}else t.objectId&&"string"==typeof t.objectId&&(0,s.tE)(y,i,()=>({typeName:i,ids:[]})).ids.push(t.objectId);for(const e of y.values())e.ids.length>0&&("entity"===r?(n.entityDeletes||(n.entityDeletes=[]),n.entityDeletes.push({typeName:e.typeName,ids:e.ids})):(n.relationshipDeletes||(n.relationshipDeletes=[]),n.relationshipDeletes.push({typeName:e.typeName,ids:e.ids})));return n}function $(e,t){const n={addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]};for(const i of e.editResults)if(i.typeName===t){for(const e of i.adds)n.addFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of i.updates)n.updateFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of i.deletes)n.deleteFeatureResults.push({objectId:e.id,globalId:e.id})}return n}function Z(e){if(!e.objectType)return null;const t=[];for(const n of e.fields)!n.name.includes("ESRI__")&&n.editable&&"geometry"!==n.type&&t.push(new a({fieldName:n.name}));return new l.A({elements:t})}function q(e){if(!e.objectType)return null;let t=null;switch(e.geometryType){case"point":case"multipoint":t="point";break;case"polyline":t="line";break;case"polygon":t="polygon";break;default:t=null}return[new y.A({name:e.graphTypeName,drawingTool:t,prototype:{}})]}function U(e){const t={namedTypeDefinitions:new Map,generateAllSublayers:!1},{entityTypes:n,relationshipTypes:i}=e,r=[...n,...i];for(const e of r)t.namedTypeDefinitions.set(e.name,{useAllData:!1,members:new Map});return t}function z(e,t){if(e&&"object"==typeof e)if(function(e){return!(!e||"object"!=typeof e||Array.isArray(e))&&"id"in e&&"typeName"in e}(e)){const n=t.namedTypeDefinitions.get(e.typeName);if(!n)throw new r.A("WebLinkChart:data-model-desync","The query result contained a named type not reflected in the provided knowledge graph data model.");n.members.set(e.id,{id:e.id})}else if(function(e){return!(!e||"object"!=typeof e||Array.isArray(e))&&e&&"path"in e&&Array.isArray(e.path)}(e))for(const n of e.path)z(n,t);else if(Array.isArray(e))for(const n of e)z(n,t);else if(function(e){return!(!e||"object"!=typeof e||Array.isArray(e)||"id"in e)&&"properties"in e&&"object"==typeof e.properties}(e))for(const n of Object.values(e.properties??{}))z(n,t)}},62046:(e,t,n)=>{n.d(t,{Fe:()=>d,KU:()=>y,Nk:()=>s});var i=n(68197),r=n(93397);function s(e){const t=[];return o((0,r.lW)(e),t),t.length?new i.A((0,r.e6)(t[0])):null}function o(e,t){if(!e)return;let n;n="CIMTextSymbol"===e.type?e.symbol:e;const i="CIMPolygonSymbol"===e.type;if(n?.symbolLayers)for(const e of n.symbolLayers)if(!(e.colorLocked||i&&((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&a(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{o(e.symbol,t)});break;case"CIMSolidStroke":case"CIMSolidFill":a(t,e.color);break;case"CIMGradientFill":l(t,e);break;case"CIMHatchFill":o(e.lineSymbol,t)}}function a(e,t){for(const n of e)if(n.join(".")===t.join("."))return;e.push(t)}function l(e,t){const n=t.colorRamp?.type;switch(n){case"CIMMultipartColorRamp":t.colorRamp.colorRamps?.forEach(t=>{"CIMLinearContinuousColorRamp"===t.type&&p(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":p(e,t.colorRamp)}}function p(e,t){t&&(t.fromColor&&a(e,t.fromColor),t.toColor&&a(e,t.toColor))}function d(e,t,n){t instanceof i.A||(t=new i.A(t));const s=(0,r.lW)(e);s&&u(s,t,n)}function u(e,t,n){if(!e)return;let i;i="CIMTextSymbol"===e.type?e.symbol:e;const s="CIMPolygonSymbol"===i?.type;if(i?.symbolLayers)for(const e of i.symbolLayers){if(e.colorLocked)continue;if(s)if(n){const{layersToColor:t}=n;if(((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))&&"fill"===t||(0,r.jn)(e)&&"outline"===t)continue}else if((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))continue;const i=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=i;break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{u(e.symbol,t,n)});break;case"CIMSolidStroke":case"CIMSolidFill":e.color=i;break;case"CIMGradientFill":c(e,t);break;case"CIMHatchFill":u(e.lineSymbol,t,n)}}}function c(e,t){const n=e.colorRamp?.type;switch(n){case"CIMMultipartColorRamp":e.colorRamp.colorRamps?.forEach(e=>{"CIMLinearContinuousColorRamp"===e.type&&h(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":h(e.colorRamp,t)}}function h(e,t){if(e&&(e.fromColor&&(e.fromColor=t.toArray()),e.toColor)){const n=t.clone();n.a=0,e.toColor=n.toArray()}}function y(e,t,n=!1){const i=(0,r.lW)(e);if(n&&(t=360-t),"CIMTextSymbol"!==i?.type){if("CIMPointSymbol"===i?.type&&i.symbolLayers){const e=t-(i.angle||0);for(const t of i.symbolLayers)if((0,r.MM)(t)){let n=t.rotation||0;t.rotateClockwise?n-=e:n+=e,t.rotation=n}i.angle=t}}else i.angle=t}},62796:(e,t,n)=>{n.d(t,{A:()=>me});var i=n(31635),r=n(37838),s=n(49186),o=n(4718),a=n(53966),l=n(25728),p=n(91429),d=(n(29953),n(965)),u=n(5443),c=n(86738),h=n(39829),y=n(82799),m=n(91218),f=n(16930),g=n(21325),b=n(50498),w=n(55156),_=n(60950),M=n(89808),T=n(99959);const I=Symbol("isKnowledgeGraphGraphicOriginSymbol");var C;class v extends T.A{get[(C=I,_.ym)](){return this.sublayer}get[w.e](){return this.sublayer}get[M.Q](){return this.sublayer}constructor(e,t){super(),this[C]=!0,this.type="knowledge-graph",this.layer=e,this.sublayer=t}get id(){return this.layer.id}}const A=Symbol("isLinkChartGraphicOriginSymbol");var x;class E extends T.A{get[(x=A,M.Q)](){return this.layer}constructor(e,t){super(),this[x]=!0,this.type="link-chart",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var S=n(4146),k=n(83221),N=n(56390),L=n(64714),D=n(15375);const R=(0,n(17036).p)(),F=e=>{const t=e;let n=class extends t{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,i.Cg)([(0,p.MZ)(R.fields)],n.prototype,"fields",void 0),(0,i.Cg)([(0,p.MZ)(R.fieldsIndex)],n.prototype,"fieldsIndex",void 0),n=(0,i.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],n),n};var j=n(54898),B=n(63074),O=n(6455),P=n(87718),G=n(56658),$=n(32756),Z=n(54310),q=n(25036),U=n(82935),z=n(10873),Q=n(13213),Y=n(29005),H=n(20437),W=n(30524),K=n(46499),X=n(39383),V=n(96184),J=n(96576),ee=n(65494),te=n(41214),ne=n(48441),ie=n(22671),re=n(61956),se=n(30291),oe=n(88625),ae=n(37531),le=n(61322),pe=n(43937);function de(e){if(!e.json)return e;e.json.write=ue(e.json.write);const t=e.json.origins;if(!t)return e;let n;for(n in t){const e=t[n];e&&(e.write=ue(e.write))}return e}function ue(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:n,overridePolicy:i,...r}=e;return function(e,t){const n=he.call(this,e,t);return n.enabled?{...r,...n}:n}}(e)),e):!0===e?ce():e}function ce(){return{overridePolicy:he}}function he(e,t){const n=!!this.geometryType;let i={enabled:n};return n&&(i={...i,...ye.call(this,e,t)}),i}function ye(e,t){return{ignoreOrigin:this.originIdOf(t)>0}}let me=class extends(F((0,O.FJ)((0,G.J)((0,P.F)((0,B.dM)((0,$.fY)((0,U.e)((0,q.j)((0,Z.J)((0,l.P)(S.A))))))))))){constructor(e){super(e),this.blendMode="normal",this.charts=null,this.definitionExpression=null,this.displayFilterEnabled=!0,this.displayFilterInfo=null,this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=D.dr,this.objectType=null,this.opacity=1,this.orderBy=null,this.parent=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then(()=>{const e=new MessageChannel;return new le.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const n=re.A.fromJSON(e);return this.queryFeaturesJSON(n,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get capabilities(){return this.parent?this.parent.sublayerCapabilities:(0,j.hZ)(null)}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.capabilities.operations.supportsEditing}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get isTable(){return"link-chart"!==this.parentCompositeLayer?.type&&null==this.geometryFieldName}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[],t=new Map;for(const e of this.parent?.knowledgeGraph.dataModel.domains??[])t.set(e.name,e);return this.objectType?.properties?.forEach(n=>{const i="esriFieldTypeOID"===n.fieldType?"esriFieldTypeInteger":n.fieldType,r=H.A.fromJSON({name:n.name,type:i,alias:n.alias,defaultValue:n.defaultValue,editable:n.editable,nullable:n.nullable,domain:n.domain&&t.has(n.domain)?t.get(n.domain).toJSON():void 0});e.push(r)}),e.push(H.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),H.A.fromJSON({name:D.M1,type:"esriFieldTypeInteger",alias:D.M1,editable:!1}),H.A.fromJSON({name:D.BL,type:"esriFieldTypeInteger",alias:D.BL,editable:!1})),e}get formTemplate(){return this._isOverridden("formTemplate")?this._get("formTemplate"):(0,j.dD)(this)}set formTemplate(e){this._overrideIfSome("formTemplate",e)}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?b.gy.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return D.T1;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphicOrigin(){if(!this.parent)return null;switch(this.parent.type){case"knowledge-graph":return new v(this.parent,this);case"link-chart":return new E(this.parent,this)}}get graphTypeName(){return this.objectType?.name}set graphTypeName(e){this._set("graphTypeName",e)}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,n=t?this.objectType?.properties?.[t]:null;return n?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,n=t?this.objectType?.properties?.[t]:null;return n?.hasZ??!1}set labelingInfo(e){this._set("labelingInfo",e)}get labelingInfo(){if(this._isOverridden("labelingInfo"))return this._get("labelingInfo");if(!this.objectType||!this.parentCompositeLayer||!this.graphTypeName)return null;const e=this.objectType.properties?(0,j.MY)(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?(0,j.iW)(this.graphType,this.graphTypeName,e):(0,j.e$)(this.graphTypeName,this.geometryType,e)}set renderer(e){(0,W.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const e=this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel,t=[...e?.entityTypes??[],...e?.relationshipTypes??[]].map(e=>e.name).indexOf(this.graphTypeName),n=(0,j.Td)(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new J.A({type:"simple",symbol:(0,j.UT)(n)});const e=(0,ee.r)((0,L.F0)(b.gy.toJSON("point")).renderer);return(0,ae.dt)(e.symbol,n),e}const i=(0,ee.r)((0,L.F0)(b.gy.toJSON(this.geometryType)).renderer);return(0,ae.dt)(i.symbol,n),i}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??f.A.WGS84}get templates(){return this._isOverridden("templates")?this._get("templates"):(0,j.CP)(this)}set templates(e){this._overrideIfSome("templates",e)}set timeInfo(e){this._set("timeInfo",e)}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return(0,se.tn)(this,e)}createQuery(){return new re.A({where:"1=1",outFields:["*"]})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return this.fields.find(t=>t.name===e)?.domain||null}async queryFeatures(e,t){await this.load();const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e),r=this.graphicOrigin,s=ie.A.fromJSON(await i.executeQuery(n.toJSON(),t?.signal));return s.features.forEach(e=>{e.sourceLayer=this,e.origin=r}),s}async queryFeaturesJSON(e,t){await this.load();const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e);return await i.executeQuery(n.toJSON(),t?.signal)}async queryFeatureCount(e,t){await this.load();const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e);return i.executeQueryForCount(n.toJSON(),t?.signal)}async queryExtent(e={},t){await this.load();const n={...e,returnGeometry:!0},{resolvedQuery:i,queryEngine:r}=await this._setupQueryObjects(n),s=await r.executeQueryForExtent(i.toJSON(),t?.signal);let o;return o=null!=s.extent?.xmin&&null!=s.extent?.xmax&&null!=s.extent?.ymin&&null!=s.extent?.ymax?new u.A(s.extent):new u.A,{count:s.count,extent:o}}async queryObjectIds(e,t){await this.load();const n=re.A.from(e);let i;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);i=this.loadQueryEngine(e)}return await i.executeQueryForIds(n.toJSON(),t?.signal)}async applyEdits(e){if(!this.parentCompositeLayer.dataManager.knowledgeGraph)throw new s.A("knowledge-graph-sublayer:no-knowledge-graph","ApplyEdits cannot be executed because the parent does not have a Knowledge Graph model. This is usually caused by the layer not yet being loaded");const t=await(0,j.O9)(e,this);t.options={cascadeDelete:!0,cascadeProvenanceDelete:!!this.parent?.knowledgeGraph.serviceDefinition.supportsProvenance||void 0};const n=await(0,ne.executeApplyEdits)(this.parentCompositeLayer.dataManager.knowledgeGraph,t),i=(0,j.Gz)(n,this.graphTypeName),r={addedFeatures:i.addFeatureResults,updatedFeatures:i.updateFeatureResults,deletedFeatures:i.deleteFeatureResults,addedAttachments:i.addAttachmentResults,deletedAttachments:i.deleteAttachmentResults,updatedAttachments:i.updateAttachmentResults,exceededTransferLimit:!1,historicMoment:new Date,edits:void 0};return this.emit("edits",r),this.emit("apply-edits",{result:Promise.resolve(r)}),"link-chart"===this.parentCompositeLayer.type&&await this.parentCompositeLayer.refreshLinkChartCache([...r.addedFeatures.map(e=>e.globalId),...r.updatedFeatures.map(e=>e.globalId),...r.deletedFeatures.map(e=>e.globalId)]),i}loadQueryEngine(e){const t=new k.A({geometryType:b.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),n=new N.do({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:b.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,featureIdInfo:{type:"object-id",fieldName:this.objectIdField},spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return n.featureStore.addMany(e),n}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new re.A({where:"1=1",outFields:[D.dr]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then(()=>(0,W.sv)(this.timeInfo,this.fieldsIndex))),Promise.resolve(this)}async _setupQueryObjects(e,t){const n=re.A.from(e),i=n.geometry;if(i&&!i.spatialReference?.isWGS84&&(await(0,m.initializeProjection)(i.spatialReference,g.KK),n.geometry=(0,m.project)(i instanceof h.A||i instanceof y.A||i instanceof c.A?i:i.extent,g.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:n,queryEngine:this._cachedQueryEngine};const r=await this.parentCompositeLayer.dataManager.getData(n,this,t);return{resolvedQuery:n,queryEngine:this.loadQueryEngine(r)}}};(0,i.Cg)([(0,p.MZ)(de((0,o.o8)(B.sU)))],me.prototype,"blendMode",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"capabilities",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"userHasUpdateItemPrivileges",null),(0,i.Cg)([(0,p.MZ)({type:Boolean})],me.prototype,"editingEnabled",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"isTable",null),(0,i.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{write:!1}},write:ce()}})],me.prototype,"charts",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],me.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,p.MZ)(de((0,o.o8)(O.Dp)))],me.prototype,"displayFilterEnabled",void 0),(0,i.Cg)([(0,p.MZ)(de((0,o.o8)(O.KV)))],me.prototype,"displayFilterInfo",void 0),(0,i.Cg)([(0,p.MZ)(de((0,o.o8)(B.LF)))],me.prototype,"effect",void 0),(0,i.Cg)([(0,p.MZ)({type:oe.A})],me.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,p.MZ)(de((0,o.o8)(P.Y)))],me.prototype,"featureEffect",void 0),(0,i.Cg)([(0,p.MZ)(de((0,o.o8)(Q.d)))],me.prototype,"featureReduction",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"fields",null),(0,i.Cg)([(0,p.MZ)({type:d.A})],me.prototype,"formTemplate",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"geometryType",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"geometryFieldName",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"graphicOrigin",null),(0,i.Cg)([(0,p.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],me.prototype,"graphType",void 0),(0,i.Cg)([(0,p.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],me.prototype,"graphTypeName",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"hasM",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"hasZ",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],me.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",default:!1,write:{overridePolicy(){return{enabled:!!this.geometryType,alwaysWriteDefaults:!0,ignoreOrigin:!0}}}}})],me.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,p.MZ)({type:[K.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:function(e,t,n){const i=[["ESRI__AGGREGATION_COUNT",D.M1],["ESRI__ORIGIN_ID",D.Cz],["ESRI__DESTINATION_ID",D.KQ],["ESRI__LAYOUT_GEOMETRY",D.T1]];try{for(const t of e)for(const[e,n]of i)t.labelExpression=t.labelExpression?.replaceAll(e,n),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,n))}catch(e){a.A.getLogger(this).warn("Error updating labelingInfo",e)}return(0,X.w)(e,t,n)},write:ce()}})],me.prototype,"labelingInfo",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:{writer(e,t){switch(this.parentCompositeLayer?.type){case"link-chart":t.layerType="LinkChartSubLayer";break;case"knowledge-graph":t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"}},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],me.prototype,"layerType",void 0),(0,i.Cg)([(0,p.MZ)(de((0,o.o8)(z.fV)))],me.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)(de((0,o.o8)(z.hG)))],me.prototype,"maxScale",void 0),(0,i.Cg)([(0,p.MZ)(de((0,o.o8)(z.hn)))],me.prototype,"minScale",void 0),(0,i.Cg)([(0,p.MZ)()],me.prototype,"objectIdField",void 0),(0,i.Cg)([(0,p.MZ)()],me.prototype,"objectType",void 0),(0,i.Cg)([(0,p.MZ)(de((0,o.o8)(z.ke)))],me.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)(de((0,o.o8)($.ne)))],me.prototype,"orderBy",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1})],me.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)()],me.prototype,"parentCompositeLayer",void 0),(0,i.Cg)([(0,p.MZ)(de((0,o.o8)(z.M6)))],me.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:r.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],me.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,p.MZ)({type:Number,json:{write:{overridePolicy:ye}}})],me.prototype,"refreshInterval",void 0),(0,i.Cg)([(0,p.MZ)({types:te.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:ce()}})],me.prototype,"renderer",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"source",void 0),(0,i.Cg)([(0,p.MZ)()],me.prototype,"spatialReference",null),(0,i.Cg)([(0,p.MZ)({type:Y.A})],me.prototype,"templates",null),(0,i.Cg)([(0,p.MZ)({type:V.A,json:{name:"layerDefinition.timeInfo",write:{overridePolicy:ye},origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:ye}},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:ye}}}}})],me.prototype,"timeInfo",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],me.prototype,"title",null),(0,i.Cg)([(0,pe.K)("title")],me.prototype,"writeTitle",null),(0,i.Cg)([(0,p.MZ)({json:{read:!1}})],me.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)(de((0,o.o8)(U.B)))],me.prototype,"useViewTime",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,json:{name:"visibility",write:ce()}})],me.prototype,"visible",void 0),me=(0,i.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],me)},64714:(e,t,n)=>{n.d(t,{F0:()=>a,Vx:()=>d,e2:()=>c,f:()=>h});var i=n(44208),r=n(4718),s=n(99352),o=n(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function d(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this${u(t)} = null;`;for(const t in e)n+=`this${u(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new i}catch(n){return()=>({[t]:null,...e})}}function u(e){return l.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function h(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:s.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},67996:(e,t,n)=>{n.d(t,{cZ:()=>S,XW:()=>D,fe:()=>k});var i=n(11254),r=n(49186),s=n(91869),o=(n(90708),n(92722)),a=n(16930);class l{constructor(){this.version="",this.queryResult=new p}}class p{constructor(){this.featureResult=new d}}class d{constructor(){this.objectIdFieldName="",this.uniqueIdField=new u,this.globalIdFieldName="",this.geohashFieldName="",this.geometryProperties=new c,this.geometryType=null,this.spatialReference=new a.A,this.exceededTransferLimit=!1,this.hasZ=!1,this.hasM=!1,this.transform=new h,this.fields=[],this.fieldNameToAttributeIndexMap={},this.values=[],this.features=[],this.geometryFields=[]}}class u{constructor(){this.name="",this.isSystemMaintained=!1}}class c{constructor(){this.shapeAreaFieldName="",this.shapeLengthFieldName="",this.units=""}}class h{constructor(){this.quantizeOriginPosition="upperLeft",this.scale=new y,this.translate=new m}}class y{constructor(){this.xScale=0,this.yScale=0,this.mScale=0,this.zScale=0}}class m{constructor(){this.xTranslate=0,this.yTranslate=0,this.mTranslate=0,this.zTranslate=0}}class f{constructor(){this.name="",this.fieldType="esriFieldTypeString",this.alias="",this.sqlType="sqlTypeVarchar",this.domain="",this.defaultValue=""}}class g{constructor(){this.attributes=[],this.compressedGeometry=new b,this.centroid=new b,this.aggregateGeometries=[]}}class b{constructor(){this.geometryType=null,this.lengths=[],this.coords=[]}}const w=["ELEMENTUID","TYPENAME"];var _=n(45724),M=n(35448);const T={upperLeft:0,lowerLeft:1},I={sqlTypeBigInt:0,sqlTypeBinary:1,sqlTypeBit:2,sqlTypeChar:3,sqlTypeDate:4,sqlTypeDecimal:5,sqlTypeDouble:6,sqlTypeFloat:7,sqlTypeGeometry:8,sqlTypeGUID:9,sqlTypeInteger:10,sqlTypeLongNVarchar:11,sqlTypeLongVarbinary:12,sqlTypeLongVarchar:13,sqlTypeNChar:14,sqlTypeNVarChar:15,sqlTypeOther:16,sqlTypeReal:17,sqlTypeSmallInt:18,sqlTypeSqlXml:19,sqlTypeTime:20,sqlTypeTimestamp:21,sqlTypeTimestamp2:22,sqlTypeTinyInt:23,sqlTypeVarbinary:24,sqlTypeVarchar:25};var C=n(93637);function v(e){const t=new b;t.geometryType=(0,C.i7)(M.bV,e.geometry_type.value);const n=[],i=[];for(let t=0;t<e.lengths.length;t++)n.push(e.lengths[t]);for(let t=0;t<e.coords.length;t++)i.push(e.coords[t]);return t.lengths=n,t.coords=i,t}function A(e){const t=new f;return t.name=e.name,t.alias=e.alias,t.fieldType=(0,C.i7)(M.r5,e.field_type.value),t.sqlType=(0,C.i7)(I,e.sql_type.value),t.domain=e.domain,t.defaultValue=e.default_value,t}function x(e){const t=A(e);return t.geometryType=(0,C.i7)(M.bV,e.geometry_type.value),t}function E(e){const t=new h;t.quantizeOriginPosition=(0,C.i7)(T,e.quantizeOriginPosition.value);const n=t.scale,i=e.scale;n.xScale=i.xScale,n.yScale=i.yScale,n.mScale=i.mScale,n.zScale=i.zScale;const r=t.translate,s=e.translate;return r.xTranslate=s.xTranslate,r.yTranslate=s.yTranslate,r.mTranslate=s.mTranslate,r.zTranslate=s.zTranslate,t}async function S(e,t,n){t??=!1;const o={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e,t){const n=await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal}),s=await n.data;return async function(e){const t=new((await(0,_.I)()).MapOfObjectIdentifierSetsDecoder),n=t.decode(new Uint8Array(e)),i=new Map;if(0!==n.error_code)throw new r.A("knowledge-graph:layer-support-utils",n.error_message);const s=t.get_map_of_identifier_sets(),o=s.keys,a=o.size();for(let e=0;e<a;e++){const t=o.get(e),n=s.query_identifier_set(t),a=[];if(1===n.id_array_type.value){const e=n.get_globalid_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_globalid_at(n))}else if(3===n.id_array_type.value){const e=n.get_identifier_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_identifier_at(n).toString())}else if(2===n.id_array_type.value){const e=n.get_string_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_string_at(n))}else{if(0!==n.id_array_type.value)throw new r.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=n.get_oid_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_objectid_at(n).toString())}}i.set(t,a)}return t.delete(),i}(new Uint8Array(s))}(e,n).then(e=>{!function(e,t){for(const[n,i]of e){const e=(0,s.tE)(t.namedTypeDefinitions,n,()=>({useAllData:!1,members:new Map}));for(const t of i)e.members.has(t)||e.members.set(t,{id:t})}}(e,o)}),o}async function k(e){const t=await(0,_.I)(),n=new t.MapOfObjectIdentifierSets;!function(e,t,n){for(const[i,r]of n.namedTypeDefinitions){if(!r.members||r.useAllData)continue;const n=r.members.keys();let s=!1,o=!0;const a=new t.ObjectIdArray,l=new t.StringArray,p=new t.GlobalIdArray,d=new t.IdentifierArray,u=new t.ObjectIdentifierSet;for(const e of n)o&&(s=!isNaN(Number(e)),o=!1),s?a.add_objectid(Number(e)):(l.add_string(e),p.add_globalid(e)),d.add_identifier(e);u.set_oid_array(a),u.set_string_array(l),u.set_globalid_array(p),u.set_identifier_array(d),a.delete(),l.delete(),p.delete(),d.delete(),e.put_identifier_set(i,u),u.delete()}}(n,t,e);const i=new t.MapOfObjectIdentifierSetsEncoder;try{i.set_map_of_identifier_sets(n),i.encode();const e=i.get_encoding_result();if(0!==e.error.error_code)throw new r.A("knowledge-graph:layer-support-utils",e.error.error_message);const t=structuredClone(e.get_byte_buffer());return i.delete(),t}finally{n.delete()}}async function N(e,t){const n=await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal});return async function(e){const t=new((await(0,_.I)()).FeatureCollectionDecoder),n=t.decode(new Uint8Array(e));if(0!==n.error_code)throw new r.A("knowledge-graph:layer-support-utils",n.error_message);const i=function(e){const t=new l;t.version=e.version;const n=e.get_query_result();if(0!==n.results_type.value)throw new Error("Got a non-feature collection type");const i=n.get_feature_result(),r=t.queryResult.featureResult;r.objectIdFieldName=i.objectid_field_name,r.exceededTransferLimit=i.exceeded_transfer_limit,r.hasM=i.has_m,r.hasZ=i.has_z,r.geometryType=(0,C.i7)(M.bV,i.geometry_type.value),r.globalIdFieldName=i.globalid_field_name,r.geohashFieldName=i.geohash_field_name;const s=r.uniqueIdField,o=i.unique_id_field;s.name=o.name,s.isSystemMaintained=o.isSystemMaintained;const a=r.geometryProperties,p=i.geometry_properties;a.shapeAreaFieldName=p.shapeAreaFieldName,a.shapeLengthFieldName=p.shapeLengthFieldName,a.units=p.units;const d=r.spatialReference,u=i.spatial_reference;d.wkid=u.wkid,d.latestWkid=u.latestWkid,d.vcsWkid=u.vcsWkid,d.latestVcsWkid=u.latestVcsWkid,d.wkt=u.wkt,r.transform=E(i.transform);const c=r.fields,h=r.fieldNameToAttributeIndexMap,y=i.fields,m=y.size();for(let e=0;e<m;e++){const t=y.get(e),n=A(t);c.push(n),h[n.name]=e,t.delete()}y.delete();const f=r.values,b=i.values_count();for(let e=0;e<b;e++)f.push(i.get_value_at(e));const _=r.features,T=i.features,I=T.size();if(I>0)for(const e of w)if(void 0===h[e])throw new Error(`Feature collection missing required attribute: ${e}`);for(let e=0;e<I;e++){const t=new g,n=T.get(e),i=t.attributes,r=n.attributes_count();for(let e=0;e<r;e++)i.push(n.get_attribute_at(e));const s=n.get_compressed_geometry();s&&(t.compressedGeometry=v(s),t.centroid=v(n.get_centroid()));const o=t.aggregateGeometries,a=n.aggregate_geometries,l=a.size();for(let e=0;e<l;e++){const t=a.get(e),n=v(t);o.push(n),t.delete()}a.delete(),_.push(t),n.delete()}T.delete();const S=r.geometryFields,k=i.geometry_fields,N=k.size();for(let e=0;e<N;e++){const t=k.get(e),n=x(t);S.push(n),t.delete()}return k.delete(),t}(t.get_feature_collection());return t.delete(),i}(await n.data)}function L(e,t){if(!e?.queryResult?.featureResult)return t;const{hasZ:n,hasM:i}=e.queryResult.featureResult,r=e.queryResult.featureResult.fieldNameToAttributeIndexMap;for(const a of e.queryResult.featureResult.features){const e=a.attributes[r.TYPENAME],l=(0,s.tE)(t.namedTypeDefinitions,e,()=>({useAllData:!1,members:new Map})),p=a.attributes[r.ELEMENTUID];if(a.compressedGeometry?.coords?.length>0){let e=a.compressedGeometry.lengths;"esriGeometryPoint"===a.compressedGeometry.geometryType&&(e=[]),l.members.set(p,{id:p,linkChartLocation:new o.A(e,a.compressedGeometry.coords,n,i)})}else l.members.set(p,{id:p})}return t}const D={fetchAndConvertSerializedLinkChart:(e,t)=>async function(e,t){const n=[],i={generateAllSublayers:!1,namedTypeDefinitions:new Map};return e.entitiesUrl&&n.push(N(e.entitiesUrl,t).then(e=>{L(e,i)})),e.relationshipsUrl&&n.push(N(e.relationshipsUrl,t).then(e=>{L(e,i)})),await Promise.all(n),i}(e,t)}},69860:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(65864),r=n(90708),s=n(43334),o=n(15375);class a{constructor(){this._featureLookup=new Map}static getInstance(){return a.instance||(a.instance=new a),a.instance}static resetInstance(){a.instance&&(a.instance=null)}deleteFromStore(e){e.forEach(e=>{this._featureLookup.delete(e)})}readFromStoreByList(e){const t=[];return e.forEach(e=>{const n=this.readFromStoreById(e);n&&t.push(n)}),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,n){const a=[];return e.forEach(e=>{if(!e?.id)return;e.properties||(e.properties=[]);let l=null;n&&e.properties[n]&&(l=(0,r.Ux)(e.properties[n])),"originId"in e&&"destinationId"in e&&(e.properties[o.Cz]=e.originId,e.properties[o.KQ]=e.destinationId),e.properties[t]=e.id;let p=e.properties;if(e.id){const t=this._featureLookup.get(e.id);if(t?.attributes){p={...t.attributes,...p};const e=n&&p[n];null!=e&&(p[n]=(0,i.rS)(e)),l=l??t.geometry}}const d=new s.Om(l?.clone(),p,null,e.id);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,d),a.push(d)}),a}}},75503:(e,t,n)=>{n.d(t,{EC:()=>v,wq:()=>a});var i=n(4576),r=n(21818),s=(n(44208),n(15142)),o=n(11006);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=h,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(),M.prune(),T.prune(),I.prune(),C.prune()}all(e){l(this._data,e)}search(e,t){let n=this._data;const i=this._toBBox;if(w(e,n))for(M.clear();n;){for(let r=0,s=n.children.length;r<s;r++){const s=n.children[r],o=n.leaf?i(s):s;w(e,o)&&(n.leaf?t(s):b(e,o)?l(s,t):M.push(s))}n=M.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!w(e,t))return!1;for(M.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],s=t.leaf?n(r):r;if(w(e,s)){if(t.leaf||b(e,s))return!0;M.push(r)}}t=M.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;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 x([]),this}remove(e){if(!e)return this;let t,n=this._data,s=null,o=0,a=!1;const l=this._toBBox(e);for(I.clear(),C.clear();n||I.length>0;){if(n||(n=I.pop(),s=I.data[I.length-1],o=C.pop()??0,a=!0),n.leaf&&(t=(0,i.qh)(n.children,(0,r.zI)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),I.push(n),this._condense(I),this;a||n.leaf||!b(n,l)?s?(o++,n=s.children[o],a=!1):n=null:(I.push(n),C.push(o),o=0,s=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,i){const r=n-t+1;let s=this._maxEntries;if(r<=s){const i=new x(e.slice(t,n+1));return p(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/s**(i-1)));const o=new E([]);o.height=i;const a=Math.ceil(r/s),l=a*Math.ceil(Math.sqrt(s));_(e,t,n,l,this._compareMinX);for(let r=t;r<=n;r+=l){const t=Math.min(r+l-1,n);_(e,r,t,a,this._compareMinY);for(let n=r;n<=t;n+=a){const r=Math.min(n+a-1,t);o.children.push(this._build(e,n,r,i-1))}}return p(o,this._toBBox),o}_insert(e,t,n){const i=this._toBBox,r=n?e:i(e);I.clear();const s=function(e,t,n,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==n;){let n,i=1/0,r=1/0;for(let s=0,o=t.children.length;s<o;s++){const o=t.children[s],a=y(o),l=f(e,o)-a;l<r?(r=l,i=a<i?a:i,n=o):l===r&&a<i&&(i=a,n=o)}t=n||t.children[0]}return t}(r,this._data,t,I);for(s.children.push(e),u(s,r);t>=0&&I.data[t].children.length>this._maxEntries;)this._split(I,t),t--;!function(e,t,n){for(let i=n;i>=0;i--)u(t.data[i],e)}(r,I,t)}_split(e,t){const n=e.data[t],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);const s=this._chooseSplitIndex(n,r,i);if(!s)return;const o=n.children.splice(s,n.children.length-s),a=n.leaf?new x(o):new E(o);a.height=n.height,p(n,this._toBBox),p(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new E([e,t]),this._data.height=e.height+1,p(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let i,r,s;i=r=1/0;for(let o=t;o<=n-t;o++){const t=d(e,0,o,this._toBBox),a=d(e,o,n,this._toBBox),l=g(t,a),p=y(t)+y(a);l<i?(i=l,s=o,r=p<r?p:r):l===i&&p<r&&(r=p,s=o)}return s}_chooseSplitAxis(e,t,n){const i=e.leaf?this._compareMinX:c,r=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,r)&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const r=this._toBBox,s=d(e,0,t,r),o=d(e,n-t,n,r);let a=m(s)+m(o);for(let i=t;i<n-t;i++){const t=e.children[i];u(s,e.leaf?r(t):t),a+=m(s)}for(let i=n-t-1;i>=t;i--){const t=e.children[i];u(o,e.leaf?r(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const r=e.data[t-1],s=r.children;s.splice((0,i.qh)(s,n,s.length,r.indexHint),1)}else this.clear();else p(n,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 n=e;for(T.clear();n;){if(!0===n.leaf)for(const e of n.children)t((0,r.zI)(e));else T.pushArray(n.children);n=T.pop()??null}}function p(e,t){d(e,0,e.children.length,t,e)}function d(e,t,n,i,r){r||(r=new x([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s,o=t;o<n;o++)s=e.children[o],u(r,e.leaf?i(s):s);return r}function u(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 c(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function y(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(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 g(e,t){const n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,r-n)*Math.max(0,s-i)}function b(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function w(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function _(e,t,n,i,r){const s=[t,n];for(;s.length;){const t=s.pop(),n=s.pop();if(t-n<=i)continue;const a=n+Math.ceil((t-n)/i/2)*i;(0,o.q)(e,a,n,t,r),s.push(n,a,a,t)}}const M=new s.A,T=new s.A,I=new s.A,C=new s.A({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class x extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class E extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},77901:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(31635),r=n(25482),s=n(91429);let o=class extends r.o{constructor(e){super(e),this.properties=null}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],o.prototype,"properties",void 0),o=(0,i.Cg)([(0,s.$K)("esri.rest.knowledgeGraph.GraphObject")],o)},83221:(e,t,n)=>{n.d(t,{A:()=>y});var i=n(4576),r=n(49186),s=n(65529),o=n(53966),a=n(70328),l=n(19419),p=n(90708),d=n(6518),u=n(51441),c=n(37730);const h=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new d.F,this._featuresById=new Map,this._usedMemory=0,this.events=new s.bk,this.featureAdapter=c.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,n,i,r]=this.fullBounds;return{xmin:t,ymin:n,xmax:i,ymax:r,spatialReference:(0,u.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(i.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 n of e){const e=this._boundsStore.get(n.objectId);e&&t((0,a.Jt)(h,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 o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const n=this._featuresById.get(t);let i;if(n?(e.displayId=n.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,p.jQ)(null!=i?i:(0,l.vt)(),e.geometry),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const n=this._featuresById.get(t);if(!n)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0;const{geometry:i,attributes:s}=e;for(const e in s)n.attributes[e]=s[e];return i&&(n.geometry=i,this._boundsStore.set(t,(0,p.jQ)((0,l.vt)(),i)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(n)??0,n}_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}}}}]);