@arcgis/core 4.27.0-rc.0 → 4.27.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/actions/OrderBy.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/arcade/treeAnalysis.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0407bf97ad621c89a734.js +1 -0
- package/assets/esri/core/workers/chunks/0610691a0c0d9fbbd6d2.js +1 -0
- package/assets/esri/core/workers/chunks/{7ec6be2bc0f354011e46.js → 07651ef8348f702d59ac.js} +1 -1
- package/assets/esri/core/workers/chunks/0a02ac5628d1739372c6.js +1 -0
- package/assets/esri/core/workers/chunks/0a86c458916e83d6c523.js +1 -0
- package/assets/esri/core/workers/chunks/14145959a3dab1437818.js +1 -0
- package/assets/esri/core/workers/chunks/16db0bc87d87a7313dc4.js +1 -0
- package/assets/esri/core/workers/chunks/183e2e0cb86c1c640d94.js +1 -0
- package/assets/esri/core/workers/chunks/19d329b9d4ec2eff1d13.js +1 -0
- package/assets/esri/core/workers/chunks/1b8074269800b384ecf6.js +1 -0
- package/assets/esri/core/workers/chunks/2154d395f405be3cd3ba.js +1 -0
- package/assets/esri/core/workers/chunks/{33dbba3b7fc648437e50.js → 21e1f3b11e7d363b727a.js} +1 -1
- package/assets/esri/core/workers/chunks/{31a158c73994603c169d.js → 2446e336b1f7256d4fde.js} +1 -1
- package/assets/esri/core/workers/chunks/29290a44fd3b183c24e3.js +1 -0
- package/assets/esri/core/workers/chunks/{f498c4d4831141125781.js → 2f5639886f577baedbca.js} +1 -1
- package/assets/esri/core/workers/chunks/33901eb1574e46abd9af.js +1 -0
- package/assets/esri/core/workers/chunks/{9c78ad5ab57e0d47ac43.js → 3ba2fcb9110230f8790c.js} +1 -1
- package/assets/esri/core/workers/chunks/3e239bfad611985e50fb.js +1 -0
- package/assets/esri/core/workers/chunks/42f3421740a5479559dc.js +1 -0
- package/assets/esri/core/workers/chunks/474d9b334812533bab36.js +1 -0
- package/assets/esri/core/workers/chunks/53ad34bf32f5f3d4fe18.js +1 -0
- package/assets/esri/core/workers/chunks/{97cdbec7532cfcdf9ad2.js → 595a2baa04d92de59558.js} +1 -1
- package/assets/esri/core/workers/chunks/624521961fe1f2c4f2c5.js +1 -0
- package/assets/esri/core/workers/chunks/{212d59764c275c763941.js → 659b7bad7281c0e2aed3.js} +1 -1
- package/assets/esri/core/workers/chunks/6a3d611e8842afbb50ab.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/6e562fa57c0347091154.js +1 -0
- package/assets/esri/core/workers/chunks/7479dc0c790337af7597.js +1 -0
- package/assets/esri/core/workers/chunks/{e88cff2537be52da6531.js → 74fd2059ddda9083cbcc.js} +1 -1
- package/assets/esri/core/workers/chunks/7dc6774c77c822b68c99.js +1 -0
- package/assets/esri/core/workers/chunks/82a103a8b5382300889d.js +1 -0
- package/assets/esri/core/workers/chunks/{3fe357df92afa1bee70a.js → 90da1ed112b82712d0ef.js} +1 -1
- package/assets/esri/core/workers/chunks/{9849f64793f2ad39366b.js → 9290b0d330f02233d803.js} +1 -1
- package/assets/esri/core/workers/chunks/92e7f224a80195e606d6.js +1 -0
- package/assets/esri/core/workers/chunks/{36df72362b38759b895b.js → 9648a8f2b24f1ca3d637.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad18fb7bb54a0c4bdb38.js → a20361b4d3bdd7d196ca.js} +1 -1
- package/assets/esri/core/workers/chunks/a7fd2a95fde197c06828.js +1 -0
- package/assets/esri/core/workers/chunks/b0cda39b53ecd6c44cd0.js +1 -0
- package/assets/esri/core/workers/chunks/b2a423d9ce8bb784267c.js +1 -0
- package/assets/esri/core/workers/chunks/b5fc6f2044ed047c5afd.js +1 -0
- package/assets/esri/core/workers/chunks/{df0453cdfe685d6436cc.js → b6dc41fce601b9d3480e.js} +1 -1
- package/assets/esri/core/workers/chunks/b8e6c64792a512df4c4d.js +1 -0
- package/assets/esri/core/workers/chunks/c6617a937440701c0180.js +1 -0
- package/assets/esri/core/workers/chunks/c6efe2e04ea6a55bb6e3.js +1 -0
- package/assets/esri/core/workers/chunks/d8607326a199dd994844.js +1 -0
- package/assets/esri/core/workers/chunks/d8bd3f498b3fa8153404.js +1 -0
- package/assets/esri/core/workers/chunks/{39e473586579d11d6732.js → e2432871f1329f47465d.js} +1 -1
- package/assets/esri/core/workers/chunks/ee5ee03dd2c7dc940272.js +1 -0
- package/assets/esri/core/workers/chunks/{c83669cf08391a62fb72.js → f1da7b29eecad0e9efae.js} +1 -1
- package/assets/esri/core/workers/chunks/{2e627c94e57c924e5917.js → f339db2b599fa9585283.js} +1 -1
- package/assets/esri/core/workers/chunks/f505ebd4bd3bfb6c790d.js +1 -0
- package/assets/esri/core/workers/chunks/{3c6c082157c916f8ddba.js → ffe61d5a6a9b34bee9d4.js} +1 -1
- package/assets/esri/themes/base/widgets/_Bookmarks.scss +5 -0
- package/assets/esri/themes/base/widgets/_Features.scss +5 -7
- package/assets/esri/themes/base/widgets/_Popup.scss +3 -3
- package/assets/esri/themes/base/widgets/_Swipe.scss +11 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/SSAO.glsl.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/DoubleArray.js +1 -1
- package/geometry/support/meshUtils/bounds.js +5 -0
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/interfaces.d.ts +2 -2
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/StreamLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/attributeSupport.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/support/FeatureReductionBinning.js +1 -1
- package/layers/support/FeatureReductionCluster.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/rasterFunctions/colormaps.js +1 -1
- package/package.json +2 -2
- package/renderers/support/utils.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/effects/EffectBuffer.js +1 -1
- package/symbols/cim/effects/EffectDonut.js +1 -1
- package/symbols/cim/effects/EffectOffset.js +1 -1
- package/views/2d/layers/features/Store2D.js +1 -1
- package/views/2d/layers/features/sources/StreamSource.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/webStyleUtils.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/materials/pbrUtils.js +5 -0
- package/webdoc/support/writeUtils.js +1 -1
- package/widgets/Bookmarks/css.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/Features.js +1 -1
- package/assets/esri/core/workers/chunks/0b03165dbf289797cefa.js +0 -1
- package/assets/esri/core/workers/chunks/0c1c0024879f944f44c4.js +0 -1
- package/assets/esri/core/workers/chunks/13a48796905613bc1679.js +0 -1
- package/assets/esri/core/workers/chunks/1ea1104651ab15f9a13c.js +0 -1
- package/assets/esri/core/workers/chunks/2108cfc7921430f0b805.js +0 -1
- package/assets/esri/core/workers/chunks/2eacca322737aafd8f0c.js +0 -1
- package/assets/esri/core/workers/chunks/39577683e334eb4d904c.js +0 -1
- package/assets/esri/core/workers/chunks/4d3deeb0ebd0ce8c1215.js +0 -1
- package/assets/esri/core/workers/chunks/576bddc3fa7d91a7e5bd.js +0 -1
- package/assets/esri/core/workers/chunks/623d6710a4f800c622ce.js +0 -1
- package/assets/esri/core/workers/chunks/6782cc3feb713676d544.js +0 -1
- package/assets/esri/core/workers/chunks/6e7178de0b2c3d2f7e6b.js +0 -1
- package/assets/esri/core/workers/chunks/78ce0b1af62435d8ebf4.js +0 -1
- package/assets/esri/core/workers/chunks/79d2baf392589588ef9b.js +0 -1
- package/assets/esri/core/workers/chunks/7bbdba52157da13a01fc.js +0 -1
- package/assets/esri/core/workers/chunks/84860b535a70ec448cfe.js +0 -1
- package/assets/esri/core/workers/chunks/9035d9e09a4e7cb94d37.js +0 -1
- package/assets/esri/core/workers/chunks/956b0fef7bc849415354.js +0 -1
- package/assets/esri/core/workers/chunks/9ab98321a4a7eaeeb018.js +0 -1
- package/assets/esri/core/workers/chunks/9cb7a68ff46e5c43e1d2.js +0 -1
- package/assets/esri/core/workers/chunks/a0f7f7f578521970c714.js +0 -1
- package/assets/esri/core/workers/chunks/a60eac45d3c65bd0216f.js +0 -1
- package/assets/esri/core/workers/chunks/aca5260f6984952a6e3d.js +0 -1
- package/assets/esri/core/workers/chunks/b05be356743fa5d24573.js +0 -1
- package/assets/esri/core/workers/chunks/ba6024465308c248170b.js +0 -1
- package/assets/esri/core/workers/chunks/d0983f808008920514f2.js +0 -1
- package/assets/esri/core/workers/chunks/dab832799bc06b0fec34.js +0 -1
- package/assets/esri/core/workers/chunks/e45d36aef2bc69ee9132.js +0 -1
- package/assets/esri/core/workers/chunks/e5bbd4cc5edbf7ab3624.js +0 -1
- package/assets/esri/core/workers/chunks/e700cf4d1f99291a4396.js +0 -1
- package/assets/esri/core/workers/chunks/f398a5cf33c3fd2522a5.js +0 -1
- package/assets/esri/core/workers/chunks/f4ee94a6cde4ea8837f1.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6459],{21787:(t,e,n)=>{n.d(e,{a:()=>s,b:()=>l,e:()=>c,f:()=>o,i:()=>h,m:()=>u,s:()=>a,t:()=>i});var r=n(46851);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 a(t,e,n,r,o,a,i,c,s,u){return t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=i,t[6]=c,t[7]=s,t[8]=u,t}function i(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 c(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],c=e[5],s=e[6],u=e[7],l=e[8],f=l*i-c*u,h=-l*a+c*s,p=u*a-i*s;let g=n*f+r*h+o*p;return g?(g=1/g,t[0]=f*g,t[1]=(-l*r+o*u)*g,t[2]=(c*r-o*i)*g,t[3]=h*g,t[4]=(l*n-o*s)*g,t[5]=(-c*n+o*a)*g,t[6]=p*g,t[7]=(-u*n+r*s)*g,t[8]=(i*n-r*a)*g,t):null}function s(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],c=e[5],s=e[6],u=e[7],l=e[8];return t[0]=i*l-c*u,t[1]=o*u-r*l,t[2]=r*c-o*i,t[3]=c*s-a*l,t[4]=n*l-o*s,t[5]=o*a-n*c,t[6]=a*u-i*s,t[7]=r*s-n*u,t[8]=n*i-r*a,t}function u(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=e[4],s=e[5],u=e[6],l=e[7],f=e[8],h=n[0],p=n[1],g=n[2],y=n[3],M=n[4],d=n[5],m=n[6],b=n[7],A=n[8];return t[0]=h*r+p*i+g*u,t[1]=h*o+p*c+g*l,t[2]=h*a+p*s+g*f,t[3]=y*r+M*i+d*u,t[4]=y*o+M*c+d*l,t[5]=y*a+M*s+d*f,t[6]=m*r+b*i+A*u,t[7]=m*o+b*c+A*l,t[8]=m*a+b*s+A*f,t}function l(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],c=e[5],s=e[6],u=e[7],l=e[8],f=e[9],h=e[10],p=e[11],g=e[12],y=e[13],M=e[14],d=e[15],m=n*c-r*i,b=n*s-o*i,A=n*u-a*i,P=r*s-o*c,v=r*u-a*c,w=o*u-a*s,_=l*y-f*g,x=l*M-h*g,F=l*d-p*g,S=f*M-h*y,T=f*d-p*y,C=h*d-p*M;let O=m*C-b*T+A*S+P*F-v*x+w*_;return O?(O=1/O,t[0]=(c*C-s*T+u*S)*O,t[1]=(s*F-i*C-u*x)*O,t[2]=(i*T-c*F+u*_)*O,t[3]=(o*T-r*C-a*S)*O,t[4]=(n*C-o*F+a*x)*O,t[5]=(r*F-n*T-a*_)*O,t[6]=(y*w-M*v+d*P)*O,t[7]=(M*A-g*w-d*b)*O,t[8]=(g*v-y*A+d*m)*O,t):null}function f(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}function h(t){const e=(0,r.g)(),n=t[0],o=t[1],a=t[2],i=t[3],c=t[4],s=t[5],u=t[6],l=t[7],f=t[8];return Math.abs(1-(n*n+i*i+u*u))<=e&&Math.abs(1-(o*o+c*c+l*l))<=e&&Math.abs(1-(a*a+s*s+f*f))<=e}const p=u,g=f;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:s,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:function(t){const e=t[0],n=t[1],r=t[2],o=t[3],a=t[4],i=t[5],c=t[6],s=t[7],u=t[8];return e*(u*a-i*s)+n*(-u*o+i*c)+r*(s*o-a*c)},equals:function(t,e){const n=t[0],o=t[1],a=t[2],i=t[3],c=t[4],s=t[5],u=t[6],l=t[7],f=t[8],h=e[0],p=e[1],g=e[2],y=e[3],M=e[4],d=e[5],m=e[6],b=e[7],A=e[8],P=(0,r.g)();return Math.abs(n-h)<=P*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(o-p)<=P*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-g)<=P*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(i-y)<=P*Math.max(1,Math.abs(i),Math.abs(y))&&Math.abs(c-M)<=P*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(s-d)<=P*Math.max(1,Math.abs(s),Math.abs(d))&&Math.abs(u-m)<=P*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(l-b)<=P*Math.max(1,Math.abs(l),Math.abs(b))&&Math.abs(f-A)<=P*Math.max(1,Math.abs(f),Math.abs(A))},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:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=n+n,c=r+r,s=o+o,u=n*i,l=r*i,f=r*c,h=o*i,p=o*c,g=o*s,y=a*i,M=a*c,d=a*s;return t[0]=1-f-g,t[3]=l-d,t[6]=h+M,t[1]=l+d,t[4]=1-u-g,t[7]=p-y,t[2]=h-M,t[5]=p+y,t[8]=1-u-f,t},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:c,isOrthoNormal:h,mul:p,multiply:u,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:l,normalFromMat4Legacy:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[4],i=e[5],c=e[6],s=e[8],u=e[9],l=e[10],f=l*i-c*u,h=-l*a+c*s,p=u*a-i*s,g=n*f+r*h+o*p;if(!g)return null;const y=1/g;return t[0]=f*y,t[1]=(-l*r+o*u)*y,t[2]=(c*r-o*i)*y,t[3]=h*y,t[4]=(l*n-o*s)*y,t[5]=(-c*n+o*a)*y,t[6]=p*y,t[7]=(-u*n+r*s)*y,t[8]=(i*n-r*a)*y,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],a=e[2],i=e[3],c=e[4],s=e[5],u=e[6],l=e[7],f=e[8],h=Math.sin(n),p=Math.cos(n);return t[0]=p*r+h*i,t[1]=p*o+h*c,t[2]=p*a+h*s,t[3]=p*i-h*r,t[4]=p*c-h*o,t[5]=p*s-h*a,t[6]=u,t[7]=l,t[8]=f,t},scale:function(t,e,n){const r=n[0],o=n[1],a=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]=a*e[6],t[7]=a*e[7],t[8]=a*e[8],t},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:a,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:g,subtract:f,translate:function(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=e[4],s=e[5],u=e[6],l=e[7],f=e[8],h=n[0],p=n[1];return t[0]=r,t[1]=o,t[2]=a,t[3]=i,t[4]=c,t[5]=s,t[6]=h*r+p*i+u,t[7]=h*o+p*c+l,t[8]=h*a+p*s+f,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},46521:(t,e,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function o(t,e,n,r,o,a,i,c,s){return[t,e,n,r,o,a,i,c,s]}function a(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>a,c:()=>r,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,createView:a,fromValues:o},Symbol.toStringTag,{value:"Module"}))},13598:(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]]}function a(t,e){return new Float64Array(t,e,16)}n.d(e,{I:()=>i,a:()=>a,b:()=>o,c:()=>r});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,createView:a,fromValues:function(t,e,n,r,o,a,i,c,s,u,l,f,h,p,g,y){return[t,e,n,r,o,a,i,c,s,u,l,f,h,p,g,y]}},Symbol.toStringTag,{value:"Module"}))},51305:(t,e,n)=>{n.d(e,{c:()=>p,g:()=>l,j:()=>T,k:()=>y,m:()=>f,s:()=>u});var r=n(46521),o=n(94961),a=n(65617),i=n(46851),c=n(17896),s=n(98766);function u(t,e,n){n*=.5;const r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function l(t,e){const n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>(0,i.g)()?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function f(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=n[0],s=n[1],u=n[2],l=n[3];return t[0]=r*l+i*c+o*u-a*s,t[1]=o*l+i*s+a*c-r*u,t[2]=a*l+i*u+r*s-o*c,t[3]=i*l-r*c-o*s-a*u,t}function h(t,e,n,r){const o=e[0],a=e[1],c=e[2],s=e[3];let u,l,f,h,p,g=n[0],y=n[1],M=n[2],d=n[3];return l=o*g+a*y+c*M+s*d,l<0&&(l=-l,g=-g,y=-y,M=-M,d=-d),1-l>(0,i.g)()?(u=Math.acos(l),f=Math.sin(u),h=Math.sin((1-r)*u)/f,p=Math.sin(r*u)/f):(h=1-r,p=r),t[0]=h*o+p*g,t[1]=h*a+p*y,t[2]=h*c+p*M,t[3]=h*s+p*d,t}function p(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function g(t,e){const n=e[0]+e[4]+e[8];let r;if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{let n=0;e[4]>e[0]&&(n=1),e[8]>e[3*n+n]&&(n=2);const o=(n+1)%3,a=(n+2)%3;r=Math.sqrt(e[3*n+n]-e[3*o+o]-e[3*a+a]+1),t[n]=.5*r,r=.5/r,t[3]=(e[3*o+a]-e[3*a+o])*r,t[o]=(e[3*o+n]+e[3*n+o])*r,t[a]=(e[3*a+n]+e[3*n+a])*r}return t}function y(t,e,n,r){const o=.5*Math.PI/180;e*=o,n*=o,r*=o;const a=Math.sin(e),i=Math.cos(e),c=Math.sin(n),s=Math.cos(n),u=Math.sin(r),l=Math.cos(r);return t[0]=a*s*l-i*c*u,t[1]=i*c*l+a*s*u,t[2]=i*s*u-a*c*l,t[3]=i*s*l+a*c*u,t}const M=s.c,d=s.s,m=s.a,b=f,A=s.b,P=s.d,v=s.l,w=s.e,_=w,x=s.f,F=x,S=s.n,T=s.g,C=s.h,O=(0,a.c)(),R=(0,a.f)(1,0,0),B=(0,a.f)(0,1,0),Z=(0,o.a)(),j=(0,o.a)(),V=(0,r.c)();Object.freeze(Object.defineProperty({__proto__:null,add:m,calculateW:function(t,e){const n=e[0],r=e[1],o=e[2];return t[0]=n,t[1]=r,t[2]=o,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-o*o)),t},conjugate:p,copy:M,dot:P,equals:C,exactEquals:T,fromEuler:y,fromMat3:g,getAxisAngle:l,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=n*n+r*r+o*o+a*a,c=i?1/i:0;return t[0]=-n*c,t[1]=-r*c,t[2]=-o*c,t[3]=a*c,t},len:_,length:w,lerp:v,mul:b,multiply:f,normalize:S,random:function(t){const e=i.R,n=e(),r=e(),o=e(),a=Math.sqrt(1-n),c=Math.sqrt(n);return t[0]=a*Math.sin(2*Math.PI*r),t[1]=a*Math.cos(2*Math.PI*r),t[2]=c*Math.sin(2*Math.PI*o),t[3]=c*Math.cos(2*Math.PI*o),t},rotateX:function(t,e,n){n*=.5;const r=e[0],o=e[1],a=e[2],i=e[3],c=Math.sin(n),s=Math.cos(n);return t[0]=r*s+i*c,t[1]=o*s+a*c,t[2]=a*s-o*c,t[3]=i*s-r*c,t},rotateY:function(t,e,n){n*=.5;const r=e[0],o=e[1],a=e[2],i=e[3],c=Math.sin(n),s=Math.cos(n);return t[0]=r*s-a*c,t[1]=o*s+i*c,t[2]=a*s+r*c,t[3]=i*s-o*c,t},rotateZ:function(t,e,n){n*=.5;const r=e[0],o=e[1],a=e[2],i=e[3],c=Math.sin(n),s=Math.cos(n);return t[0]=r*s+o*c,t[1]=o*s-r*c,t[2]=a*s+i*c,t[3]=i*s-a*c,t},rotationTo:function(t,e,n){const r=(0,c.e)(e,n);return r<-.999999?((0,c.f)(O,R,e),(0,c.u)(O)<1e-6&&(0,c.f)(O,B,e),(0,c.n)(O,O),u(t,O,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,c.f)(O,e,n),t[0]=O[0],t[1]=O[1],t[2]=O[2],t[3]=1+r,S(t,t))},scale:A,set:d,setAxes:function(t,e,n,r){const o=V;return o[0]=n[0],o[3]=n[1],o[6]=n[2],o[1]=r[0],o[4]=r[1],o[7]=r[2],o[2]=-e[0],o[5]=-e[1],o[8]=-e[2],S(t,g(t,o))},setAxisAngle:u,slerp:h,sqlerp:function(t,e,n,r,o,a){return h(Z,e,o,a),h(j,n,r,a),h(t,Z,j,2*a*(1-a)),t},sqrLen:F,squaredLength:x,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},94961:(t,e,n)=>{function r(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}function a(t,e){return new Float64Array(t,e,4)}n.d(e,{I:()=>i,a:()=>r,b:()=>o,c:()=>a});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,createView:a,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"}))},20773:(t,e,n)=>{n.d(e,{a:()=>c,b:()=>i,c:()=>o,d:()=>l,e:()=>s,n:()=>f,s:()=>u,t:()=>a});var r=n(72220);function o(t,e,n){a(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function a(t,e,n,o=3,a=o){if(t.length/o!==Math.ceil(e.length/a))return r.c.error("source and destination buffers need to have the same number of elements"),t;const i=t.length/o,c=n[0],s=n[1],u=n[2],l=n[4],f=n[5],h=n[6],p=n[8],g=n[9],y=n[10],M=n[12],d=n[13],m=n[14];let b=0,A=0;for(let n=0;n<i;n++){const n=e[b],r=e[b+1],i=e[b+2];t[A]=c*n+l*r+p*i+M,t[A+1]=s*n+f*r+g*i+d,t[A+2]=u*n+h*r+y*i+m,b+=a,A+=o}return t}function i(t,e,n){c(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function c(t,e,n,o=3,a=o){if(t.length/o!==Math.ceil(e.length/a))return void r.c.error("source and destination buffers need to have the same number of elements");const i=t.length/o,c=n[0],s=n[1],u=n[2],l=n[3],f=n[4],h=n[5],p=n[6],g=n[7],y=n[8];let M=0,d=0;for(let n=0;n<i;n++){const n=e[M],r=e[M+1],i=e[M+2];t[d]=c*n+l*r+p*i,t[d+1]=s*n+f*r+g*i,t[d+2]=u*n+h*r+y*i,M+=a,d+=o}}function s(t,e,n){u(t.typedBuffer,e,n,t.typedBufferStride)}function u(t,e,n,r=3){const o=Math.min(t.length/r,e.count),a=e.typedBuffer,i=e.typedBufferStride;let c=0,s=0;for(let e=0;e<o;e++)t[s]=n*a[c],t[s+1]=n*a[c+1],t[s+2]=n*a[c+2],c+=i,s+=r}function l(t,e){f(t.typedBuffer,e.typedBuffer,t.typedBufferStride,e.typedBufferStride)}function f(t,e,n=3,r=n){const o=Math.min(t.length/n,e.length/r);let a=0,i=0;for(let c=0;c<o;c++){const o=e[a],c=e[a+1],s=e[a+2],u=o*o+c*c+s*s;if(u>0){const e=1/Math.sqrt(u);t[i]=e*o,t[i+1]=e*c,t[i+2]=e*s}a+=r,i+=n}}Object.freeze(Object.defineProperty({__proto__:null,normalize:f,normalizeView:l,scale:u,scaleView:s,shiftRight:function(t,e,n){const r=Math.min(t.count,e.count),o=t.typedBuffer,a=t.typedBufferStride,i=e.typedBuffer,c=e.typedBufferStride;let s=0,u=0;for(let t=0;t<r;t++)o[u]=i[s]>>n,o[u+1]=i[s+1]>>n,o[u+2]=i[s+2]>>n,s+=c,u+=a},transformMat3:c,transformMat3View:i,transformMat4:a,transformMat4View:o},Symbol.toStringTag,{value:"Module"}))},58995:(t,e,n)=>{n.d(e,{rS:()=>u});var r=n(2109),o=n(82971),a=n(8744);const i=new o.Z(r.kU),c=new o.Z(r.JL),s=new o.Z(r.mM);function u(t){return t&&((0,a.BZ)(t)||(0,a.fS)(t,c))?c:t&&((0,a.V2)(t)||(0,a.fS)(t,s))?s:i}new o.Z(r.pn)},83025:(t,e,n)=>{n.d(e,{QZ:()=>a,Rq:()=>i,bg:()=>o});var r=n(1533);function o(t,e=!1){return t<=r.DB?e?new Array(t).fill(0):new Array(t):new Float64Array(t)}function a(t){return((0,r.kJ)(t)?t.length:t.byteLength/8)<=r.DB?Array.from(t):new Float64Array(t)}function i(t,e,n){return Array.isArray(t)?t.slice(e,e+n):t.subarray(e,e+n)}},85872:(t,e,n)=>{n.d(e,{Z:()=>h});var r=n(43697),o=n(2368),a=n(96674),i=n(5600),c=(n(75215),n(67676),n(80442),n(36030)),s=n(52011),u=n(65617),l=n(94139);let f=class extends((0,o.J)(a.wq)){constructor(t){super(t),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,u.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new l.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFormPoint({x:t,y:e,z:n}){this.origin=(0,u.f)(t,e,n??0)}};(0,r._)([(0,c.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],f.prototype,"type",void 0),(0,r._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],f.prototype,"origin",void 0),f=(0,r._)([(0,s.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],f);const h=f},50567:(t,e,n)=>{n.d(e,{Z:()=>u});var r=n(43697),o=n(2368),a=n(96674),i=(n(92604),n(75215),n(67676),n(80442),n(20102),n(36030)),c=n(52011);let s=class extends((0,o.J)(a.wq)){constructor(){super({}),this.type="georeferenced",this.isRelative=!1,this.isGeoreferenced=!0}};(0,r._)([(0,i.J)({georeferenced:"georeferenced"},{readOnly:!0})],s.prototype,"type",void 0),s=(0,r._)([(0,c.j)("esri.geometry.support.MeshGeoreferencedVertexSpace")],s);const u=s},84555:(t,e,n)=>{n.d(e,{Z:()=>h});var r=n(43697),o=n(2368),a=n(96674),i=n(5600),c=(n(75215),n(67676),n(80442),n(36030)),s=n(52011),u=n(65617),l=n(94139);let f=class extends((0,o.J)(a.wq)){constructor(t){super(t),this.type="local",this.isRelative=!0,this.isGeoreferenced=!1,this.origin=(0,u.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new l.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFormPoint({x:t,y:e,z:n}){this.origin=(0,u.f)(t,e,n??0)}};(0,r._)([(0,c.J)({local:"local"},{readOnly:!0})],f.prototype,"type",void 0),(0,r._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],f.prototype,"origin",void 0),f=(0,r._)([(0,s.j)("esri.geometry.support.MeshLocalVertexSpace")],f);const h=f},2674:(t,e,n)=>{n.d(e,{Z:()=>d});var r,o=n(43697),a=n(96674),i=n(5600),c=(n(75215),n(67676),n(80442),n(52011)),s=n(52138),u=n(13598),l=n(51305),f=n(94961),h=n(17896),p=n(65617),g=n(3709);let y=r=class extends a.wq{constructor(t){super(t),this.translation=(0,p.c)(),this.rotationAxis=(0,p.g)(g.UP),this.rotationAngle=0,this.scale=(0,p.f)(1,1,1)}get rotation(){return(0,g.uT)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,p.a)((0,g.ZZ)(t)),this.rotationAngle=(0,g.EU)(t)}get localMatrix(){const t=(0,u.c)();return(0,l.s)(M,(0,g.ZZ)(this.rotation),(0,g.WH)(this.rotation)),(0,s.g)(t,M,this.translation,this.scale),t}get localMatrixInverse(){return(0,s.a)((0,u.c)(),this.localMatrix)}applyLocal(t,e){return(0,h.m)(e,t,this.localMatrix)}applyLocalInverse(t,e){return(0,h.m)(e,t,this.localMatrixInverse)}equals(t){return this===t||null!=t&&(0,s.h)(this.localMatrix,t.localMatrix)}clone(){const t={translation:(0,p.a)(this.translation),rotationAxis:(0,p.a)(this.rotationAxis),rotationAngle:this.rotationAngle,scale:(0,p.a)(this.scale)};return new r(t)}};(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"translation",void 0),(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAxis",void 0),(0,o._)([(0,i.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAngle",void 0),(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"scale",void 0),(0,o._)([(0,i.Cb)()],y.prototype,"rotation",null),(0,o._)([(0,i.Cb)()],y.prototype,"localMatrix",null),(0,o._)([(0,i.Cb)()],y.prototype,"localMatrixInverse",null),y=r=(0,o._)([(0,c.j)("esri.geometry.support.MeshTransform")],y);const M=(0,f.a)(),d=y},3709:(t,e,n)=>{n.d(e,{EU:()=>p,UP:()=>y,Ue:()=>s,WH:()=>g,ZZ:()=>h,qC:()=>l,qw:()=>f,uT:()=>u});var r=n(22021),o=n(51305),a=n(94961),i=n(17896),c=n(65617);function s(t=y){return[t[0],t[1],t[2],t[3]]}function u(t,e,n=s()){return(0,i.c)(n,t),n[3]=e,n}function l(t,e,n=s()){return(0,o.s)(M,t,g(t)),(0,o.s)(d,e,g(e)),(0,o.m)(M,d,M),function(t,e){return t[3]=e,t}(n,(0,r.BV)((0,o.g)(n,M)))}function f(t,e,n,r=s()){return u(c.d,t,m),u(c.e,e,b),u(c.U,n,A),l(m,b,m),l(m,A,r),r}function h(t){return t}function p(t){return t[3]}function g(t){return(0,r.Vl)(t[3])}const y=[0,0,1,0],M=(0,a.a)(),d=(0,a.a)(),m=(s(),s()),b=s(),A=s()},72220:(t,e,n)=>{n.d(e,{c:()=>r});const r=n(92604).Z.getLogger("esri.views.3d.support.buffer.math")},13442:(t,e,n)=>{n.d(e,{A:()=>a,h:()=>o});var r=n(92604);function o(t,e){return t.isGeographic||t.isWebMercator&&(e?.geographic??!0)}function a(t,e,n){const o=!t.isGeoreferenced;null!=n?.geographic&&n.geographic!==o&&r.Z.getLogger(e).warnOnce(`Specifying the 'geographic' parameter (${n.geographic}) for a Mesh vertex space of type "${t.type}" is not supported. This parameter will be ignored.`)}},66459:(t,e,n)=>{n.d(e,{FF:()=>w,I5:()=>P,Yq:()=>_,iV:()=>x,iv:()=>A,w1:()=>v});var r=n(67900),o=n(46521),a=n(52138),i=n(13598),c=n(17896),s=n(65617),u=n(21787),l=n(44547),f=n(58995),h=n(83025),p=n(85872),g=n(50567),y=n(84555),M=n(2674),d=n(20773),m=n(13442),b=n(56493);function A(t,e,n){return(0,m.h)(e.spatialReference,n)?function(t,e,n){const r=e.spatialReference,o=C(e,n,Z),a=new Float64Array(t.position.length),i=function(t,e,n,r){(0,d.t)(r,t,e);const o=new Float64Array(t.length);return(0,b.To)(r,o,n)}(t.position,o,r,a),c=(0,u.b)(V,o);return{position:i,normal:F(i,a,t.normal,c,r),tangent:S(i,a,t.tangent,c,r)}}(t,e,n):function(t,e,n){const r=new Float64Array(t.position.length),o=t.position,a=e.x,i=e.y,c=e.z??0,s=B(n?n.unit:null,e.spatialReference);for(let t=0;t<o.length;t+=3)r[t]=o[t]*s+a,r[t+1]=o[t+1]*s+i,r[t+2]=o[t+2]*s+c;return{position:r,normal:t.normal,tangent:t.tangent}}(t,e,n)}function P(t,e,n,r){const{position:o,normal:a,tangent:c}=t;if(!e.isRelative)return{position:o,normal:a,tangent:c};const s=n?.localMatrix??i.I;return A({position:(0,d.t)(new Float64Array(o.length),o,s),normal:null!=a?(0,b.w9)(a,new Float32Array(a.length),s):null,tangent:null!=c?(0,b.VS)(c,new Float32Array(c.length),s):null},e.getOriginPoint(r),{geographic:!e.isGeoreferenced})}function v(t,e,n){if(n?.useTransform){const{position:r,normal:o,tangent:a}=t,{x:i,y:c,z:u}=e,l=(0,s.f)(i,c,u??0);return{vertexAttributes:{position:r,normal:o,tangent:a},vertexSpace:n.geographic??1?new y.Z({origin:l}):new p.Z({origin:l}),transform:new M.Z}}return{vertexAttributes:A(t,e,n),vertexSpace:new g.Z,transform:null}}function w(t,e,n){return(0,m.h)(e.spatialReference,n)?function(t,e,n){const r=e.spatialReference;C(e,n,Z);const o=(0,a.a)(j,Z),i=new Float64Array(t.position.length),c=function(t,e,n,r){const o=(0,b.XO)(t,e,r),a=new Float64Array(o.length);return(0,d.t)(a,o,n),a}(t.position,r,o,i),s=(0,u.b)(V,o);return{position:c,normal:O(t.normal,t.position,i,r,s),tangent:R(t.tangent,t.position,i,r,s)}}(t,e,n):T(t,e,n)}function _(t,e,n,r,o){if(!e.isRelative)return w(t,r,o);const{spatialReference:a}=r,i=P(t,e,n,a);return r.equals(e.getOriginPoint(a))?T(i,r,o):w(i,r,o)}function x(t,e,n,r,o){const u=n.isRelative?n.origin:s.Z,p=n.isRelative?e?.localMatrix??i.I:i.I;if(n.isGeoreferenced){const e=(0,a.j)(p,i.I)?(0,h.QZ)(r):(0,d.t)((0,h.bg)(r.length),r,p);if(!(0,c.k)(u,s.Z))for(let t=0;t<e.length;t+=3)e[t]+=u[0],e[t+1]+=u[1],e[t+2]+=u[2];return(0,l.CM)(e,t,0,e,o,0,e.length/3),e}const g=(0,f.rS)(t),y=(0,l.Up)(t,g)?g:t;(0,l.Bm)(t,u,Z,y),(0,a.m)(Z,Z,p);const M=(0,h.bg)(r.length);return(0,d.t)(M,r,Z),(0,l.CM)(M,y,0,M,o,0,M.length/3),M}function F(t,e,n,r,o){if(null==n)return null;const a=new Float32Array(n.length);return(0,d.a)(a,n,r),(0,b.Yk)(a,t,e,o,a),a}function S(t,e,n,r,o){if(null==n)return null;const a=new Float32Array(n.length);(0,d.a)(a,n,r,4);for(let t=3;t<a.length;t+=4)a[t]=n[t];return(0,b.M2)(a,t,e,o,a),a}function T(t,e,n){const r=new Float64Array(t.position.length),o=t.position,a=e.x,i=e.y,c=e.z??0,s=B(n?n.unit:null,e.spatialReference);for(let t=0;t<o.length;t+=3)r[t]=(o[t]-a)/s,r[t+1]=(o[t+1]-i)/s,r[t+2]=(o[t+2]-c)/s;return{position:r,normal:t.normal,tangent:t.tangent}}function C(t,e,n){(0,l.Bm)(t.spatialReference,[t.x,t.y,t.z??0],n,(0,f.rS)(t.spatialReference));const r=B(e?e.unit:null,t.spatialReference);return(0,a.k)(n,n,[r,r,r]),n}function O(t,e,n,r,o){if(null==t)return null;const a=(0,b.Iz)(t,e,n,r,new Float32Array(t.length));return(0,d.a)(a,a,o),a}function R(t,e,n,r,o){if(null==t)return null;const a=(0,b.wi)(t,e,n,r,new Float32Array(t.length));return(0,d.a)(a,a,o,4),a}function B(t,e){if(null==t)return 1;const n=(0,r.r6)(e);return 1/(0,r.En)(n,"meters",t)}const Z=(0,i.c)(),j=(0,i.c)(),V=(0,o.c)()},56493:(t,e,n)=>{n.d(e,{Iz:()=>M,M2:()=>w,To:()=>b,VS:()=>P,XO:()=>m,Yk:()=>d,w9:()=>A,wi:()=>v});var r=n(92604),o=n(21787),a=n(46521),i=n(13598),c=n(17896),s=n(65617),u=n(44547),l=n(58995),f=n(8744),h=n(40488),p=n(56481),g=n(20773);const y=r.Z.getLogger("esri.geometry.support.meshUtils.normalProjection");function M(t,e,n,r,o){return x(r)?(_(S.TO_PCPF,p.ct.fromTypedArray(t),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o)),o):(y.error("Cannot convert spatial reference to PCPF"),o)}function d(t,e,n,r,o){return x(r)?(_(S.FROM_PCPF,p.ct.fromTypedArray(t),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o)),o):(y.error("Cannot convert to spatial reference from PCPF"),o)}function m(t,e,n){return(0,u.CM)(t,e,0,n,(0,l.rS)(e),0,t.length/3),n}function b(t,e,n){return(0,u.CM)(t,(0,l.rS)(n),0,e,n,0,t.length/3),e}function A(t,e,n){return(0,o.b)(B,n),(0,g.a)(e,t,B),(0,o.i)(B)||(0,g.n)(e,e),e}function P(t,e,n){if((0,o.b)(B,n),(0,g.a)(e,t,B,4),(0,o.i)(B)||(0,g.n)(e,e,4),t!==e)for(let n=3;n<t.length;n+=4)e[n]=t[n];return e}function v(t,e,n,r,o){if(!x(r))return y.error("Cannot convert spatial reference to PCPF"),o;_(S.TO_PCPF,p.ct.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o,4*Float32Array.BYTES_PER_ELEMENT));for(let e=3;e<t.length;e+=4)o[e]=t[e];return o}function w(t,e,n,r,o){if(!x(r))return y.error("Cannot convert to spatial reference from PCPF"),o;_(S.FROM_PCPF,p.ct.fromTypedArray(t,16),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o,16));for(let e=3;e<t.length;e+=4)o[e]=t[e];return o}function _(t,e,n,r,a,i){if(!e)return;const s=n.count,f=(0,l.rS)(a);if(F(a))for(let n=0;n<s;n++)r.getVec(n,C),e.getVec(n,O),(0,u.Bm)(f,C,R,f),(0,o.f)(B,R),t===S.FROM_PCPF&&(0,o.t)(B,B),(0,c.t)(O,O,B),i.setVec(n,O);else for(let a=0;a<s;a++){r.getVec(a,C),e.getVec(a,O),(0,u.Bm)(f,C,R,f),(0,o.f)(B,R);const s=(0,h.mZ)(n.get(a,1));let l=Math.cos(s);t===S.TO_PCPF&&(l=1/l),B[0]*=l,B[1]*=l,B[2]*=l,B[3]*=l,B[4]*=l,B[5]*=l,t===S.FROM_PCPF&&(0,o.t)(B,B),(0,c.t)(O,O,B),(0,c.n)(O,O),i.setVec(a,O)}return i}function x(t){return F(t)||function(t){return t.isWebMercator}(t)}function F(t){return t.isWGS84||(0,f.yW)(t)||(0,f.BZ)(t)||(0,f.V2)(t)}var S,T;(T=S||(S={}))[T.TO_PCPF=0]="TO_PCPF",T[T.FROM_PCPF=1]="FROM_PCPF";const C=(0,s.c)(),O=(0,s.c)(),R=(0,i.c)(),B=(0,a.c)()}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6459],{21787:(t,e,n)=>{n.d(e,{a:()=>s,b:()=>l,e:()=>c,f:()=>o,i:()=>h,m:()=>u,s:()=>a,t:()=>i});var r=n(46851);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 a(t,e,n,r,o,a,i,c,s,u){return t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=i,t[6]=c,t[7]=s,t[8]=u,t}function i(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 c(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],c=e[5],s=e[6],u=e[7],l=e[8],f=l*i-c*u,h=-l*a+c*s,p=u*a-i*s;let g=n*f+r*h+o*p;return g?(g=1/g,t[0]=f*g,t[1]=(-l*r+o*u)*g,t[2]=(c*r-o*i)*g,t[3]=h*g,t[4]=(l*n-o*s)*g,t[5]=(-c*n+o*a)*g,t[6]=p*g,t[7]=(-u*n+r*s)*g,t[8]=(i*n-r*a)*g,t):null}function s(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],c=e[5],s=e[6],u=e[7],l=e[8];return t[0]=i*l-c*u,t[1]=o*u-r*l,t[2]=r*c-o*i,t[3]=c*s-a*l,t[4]=n*l-o*s,t[5]=o*a-n*c,t[6]=a*u-i*s,t[7]=r*s-n*u,t[8]=n*i-r*a,t}function u(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=e[4],s=e[5],u=e[6],l=e[7],f=e[8],h=n[0],p=n[1],g=n[2],y=n[3],M=n[4],d=n[5],m=n[6],b=n[7],A=n[8];return t[0]=h*r+p*i+g*u,t[1]=h*o+p*c+g*l,t[2]=h*a+p*s+g*f,t[3]=y*r+M*i+d*u,t[4]=y*o+M*c+d*l,t[5]=y*a+M*s+d*f,t[6]=m*r+b*i+A*u,t[7]=m*o+b*c+A*l,t[8]=m*a+b*s+A*f,t}function l(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],c=e[5],s=e[6],u=e[7],l=e[8],f=e[9],h=e[10],p=e[11],g=e[12],y=e[13],M=e[14],d=e[15],m=n*c-r*i,b=n*s-o*i,A=n*u-a*i,P=r*s-o*c,v=r*u-a*c,w=o*u-a*s,_=l*y-f*g,x=l*M-h*g,F=l*d-p*g,S=f*M-h*y,T=f*d-p*y,C=h*d-p*M;let O=m*C-b*T+A*S+P*F-v*x+w*_;return O?(O=1/O,t[0]=(c*C-s*T+u*S)*O,t[1]=(s*F-i*C-u*x)*O,t[2]=(i*T-c*F+u*_)*O,t[3]=(o*T-r*C-a*S)*O,t[4]=(n*C-o*F+a*x)*O,t[5]=(r*F-n*T-a*_)*O,t[6]=(y*w-M*v+d*P)*O,t[7]=(M*A-g*w-d*b)*O,t[8]=(g*v-y*A+d*m)*O,t):null}function f(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}function h(t){const e=(0,r.g)(),n=t[0],o=t[1],a=t[2],i=t[3],c=t[4],s=t[5],u=t[6],l=t[7],f=t[8];return Math.abs(1-(n*n+i*i+u*u))<=e&&Math.abs(1-(o*o+c*c+l*l))<=e&&Math.abs(1-(a*a+s*s+f*f))<=e}const p=u,g=f;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:s,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:function(t){const e=t[0],n=t[1],r=t[2],o=t[3],a=t[4],i=t[5],c=t[6],s=t[7],u=t[8];return e*(u*a-i*s)+n*(-u*o+i*c)+r*(s*o-a*c)},equals:function(t,e){const n=t[0],o=t[1],a=t[2],i=t[3],c=t[4],s=t[5],u=t[6],l=t[7],f=t[8],h=e[0],p=e[1],g=e[2],y=e[3],M=e[4],d=e[5],m=e[6],b=e[7],A=e[8],P=(0,r.g)();return Math.abs(n-h)<=P*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(o-p)<=P*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-g)<=P*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(i-y)<=P*Math.max(1,Math.abs(i),Math.abs(y))&&Math.abs(c-M)<=P*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(s-d)<=P*Math.max(1,Math.abs(s),Math.abs(d))&&Math.abs(u-m)<=P*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(l-b)<=P*Math.max(1,Math.abs(l),Math.abs(b))&&Math.abs(f-A)<=P*Math.max(1,Math.abs(f),Math.abs(A))},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:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=n+n,c=r+r,s=o+o,u=n*i,l=r*i,f=r*c,h=o*i,p=o*c,g=o*s,y=a*i,M=a*c,d=a*s;return t[0]=1-f-g,t[3]=l-d,t[6]=h+M,t[1]=l+d,t[4]=1-u-g,t[7]=p-y,t[2]=h-M,t[5]=p+y,t[8]=1-u-f,t},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:c,isOrthoNormal:h,mul:p,multiply:u,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:l,normalFromMat4Legacy:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[4],i=e[5],c=e[6],s=e[8],u=e[9],l=e[10],f=l*i-c*u,h=-l*a+c*s,p=u*a-i*s,g=n*f+r*h+o*p;if(!g)return null;const y=1/g;return t[0]=f*y,t[1]=(-l*r+o*u)*y,t[2]=(c*r-o*i)*y,t[3]=h*y,t[4]=(l*n-o*s)*y,t[5]=(-c*n+o*a)*y,t[6]=p*y,t[7]=(-u*n+r*s)*y,t[8]=(i*n-r*a)*y,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],a=e[2],i=e[3],c=e[4],s=e[5],u=e[6],l=e[7],f=e[8],h=Math.sin(n),p=Math.cos(n);return t[0]=p*r+h*i,t[1]=p*o+h*c,t[2]=p*a+h*s,t[3]=p*i-h*r,t[4]=p*c-h*o,t[5]=p*s-h*a,t[6]=u,t[7]=l,t[8]=f,t},scale:function(t,e,n){const r=n[0],o=n[1],a=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]=a*e[6],t[7]=a*e[7],t[8]=a*e[8],t},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:a,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:g,subtract:f,translate:function(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=e[4],s=e[5],u=e[6],l=e[7],f=e[8],h=n[0],p=n[1];return t[0]=r,t[1]=o,t[2]=a,t[3]=i,t[4]=c,t[5]=s,t[6]=h*r+p*i+u,t[7]=h*o+p*c+l,t[8]=h*a+p*s+f,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},46521:(t,e,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function o(t,e,n,r,o,a,i,c,s){return[t,e,n,r,o,a,i,c,s]}function a(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>a,c:()=>r,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,createView:a,fromValues:o},Symbol.toStringTag,{value:"Module"}))},13598:(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]]}function a(t,e){return new Float64Array(t,e,16)}n.d(e,{I:()=>i,a:()=>a,b:()=>o,c:()=>r});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,createView:a,fromValues:function(t,e,n,r,o,a,i,c,s,u,l,f,h,p,g,y){return[t,e,n,r,o,a,i,c,s,u,l,f,h,p,g,y]}},Symbol.toStringTag,{value:"Module"}))},51305:(t,e,n)=>{n.d(e,{c:()=>p,g:()=>l,j:()=>T,k:()=>y,m:()=>f,s:()=>u});var r=n(46521),o=n(94961),a=n(65617),i=n(46851),c=n(17896),s=n(98766);function u(t,e,n){n*=.5;const r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function l(t,e){const n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>(0,i.g)()?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function f(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=n[0],s=n[1],u=n[2],l=n[3];return t[0]=r*l+i*c+o*u-a*s,t[1]=o*l+i*s+a*c-r*u,t[2]=a*l+i*u+r*s-o*c,t[3]=i*l-r*c-o*s-a*u,t}function h(t,e,n,r){const o=e[0],a=e[1],c=e[2],s=e[3];let u,l,f,h,p,g=n[0],y=n[1],M=n[2],d=n[3];return l=o*g+a*y+c*M+s*d,l<0&&(l=-l,g=-g,y=-y,M=-M,d=-d),1-l>(0,i.g)()?(u=Math.acos(l),f=Math.sin(u),h=Math.sin((1-r)*u)/f,p=Math.sin(r*u)/f):(h=1-r,p=r),t[0]=h*o+p*g,t[1]=h*a+p*y,t[2]=h*c+p*M,t[3]=h*s+p*d,t}function p(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function g(t,e){const n=e[0]+e[4]+e[8];let r;if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{let n=0;e[4]>e[0]&&(n=1),e[8]>e[3*n+n]&&(n=2);const o=(n+1)%3,a=(n+2)%3;r=Math.sqrt(e[3*n+n]-e[3*o+o]-e[3*a+a]+1),t[n]=.5*r,r=.5/r,t[3]=(e[3*o+a]-e[3*a+o])*r,t[o]=(e[3*o+n]+e[3*n+o])*r,t[a]=(e[3*a+n]+e[3*n+a])*r}return t}function y(t,e,n,r){const o=.5*Math.PI/180;e*=o,n*=o,r*=o;const a=Math.sin(e),i=Math.cos(e),c=Math.sin(n),s=Math.cos(n),u=Math.sin(r),l=Math.cos(r);return t[0]=a*s*l-i*c*u,t[1]=i*c*l+a*s*u,t[2]=i*s*u-a*c*l,t[3]=i*s*l+a*c*u,t}const M=s.c,d=s.s,m=s.a,b=f,A=s.b,P=s.d,v=s.l,w=s.e,_=w,x=s.f,F=x,S=s.n,T=s.g,C=s.h,O=(0,a.c)(),R=(0,a.f)(1,0,0),B=(0,a.f)(0,1,0),Z=(0,o.a)(),j=(0,o.a)(),V=(0,r.c)();Object.freeze(Object.defineProperty({__proto__:null,add:m,calculateW:function(t,e){const n=e[0],r=e[1],o=e[2];return t[0]=n,t[1]=r,t[2]=o,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-o*o)),t},conjugate:p,copy:M,dot:P,equals:C,exactEquals:T,fromEuler:y,fromMat3:g,getAxisAngle:l,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=n*n+r*r+o*o+a*a,c=i?1/i:0;return t[0]=-n*c,t[1]=-r*c,t[2]=-o*c,t[3]=a*c,t},len:_,length:w,lerp:v,mul:b,multiply:f,normalize:S,random:function(t){const e=i.R,n=e(),r=e(),o=e(),a=Math.sqrt(1-n),c=Math.sqrt(n);return t[0]=a*Math.sin(2*Math.PI*r),t[1]=a*Math.cos(2*Math.PI*r),t[2]=c*Math.sin(2*Math.PI*o),t[3]=c*Math.cos(2*Math.PI*o),t},rotateX:function(t,e,n){n*=.5;const r=e[0],o=e[1],a=e[2],i=e[3],c=Math.sin(n),s=Math.cos(n);return t[0]=r*s+i*c,t[1]=o*s+a*c,t[2]=a*s-o*c,t[3]=i*s-r*c,t},rotateY:function(t,e,n){n*=.5;const r=e[0],o=e[1],a=e[2],i=e[3],c=Math.sin(n),s=Math.cos(n);return t[0]=r*s-a*c,t[1]=o*s+i*c,t[2]=a*s+r*c,t[3]=i*s-o*c,t},rotateZ:function(t,e,n){n*=.5;const r=e[0],o=e[1],a=e[2],i=e[3],c=Math.sin(n),s=Math.cos(n);return t[0]=r*s+o*c,t[1]=o*s-r*c,t[2]=a*s+i*c,t[3]=i*s-a*c,t},rotationTo:function(t,e,n){const r=(0,c.e)(e,n);return r<-.999999?((0,c.f)(O,R,e),(0,c.u)(O)<1e-6&&(0,c.f)(O,B,e),(0,c.n)(O,O),u(t,O,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,c.f)(O,e,n),t[0]=O[0],t[1]=O[1],t[2]=O[2],t[3]=1+r,S(t,t))},scale:A,set:d,setAxes:function(t,e,n,r){const o=V;return o[0]=n[0],o[3]=n[1],o[6]=n[2],o[1]=r[0],o[4]=r[1],o[7]=r[2],o[2]=-e[0],o[5]=-e[1],o[8]=-e[2],S(t,g(t,o))},setAxisAngle:u,slerp:h,sqlerp:function(t,e,n,r,o,a){return h(Z,e,o,a),h(j,n,r,a),h(t,Z,j,2*a*(1-a)),t},sqrLen:F,squaredLength:x,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},94961:(t,e,n)=>{function r(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}function a(t,e){return new Float64Array(t,e,4)}n.d(e,{I:()=>i,a:()=>r,b:()=>o,c:()=>a});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,createView:a,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"}))},20773:(t,e,n)=>{n.d(e,{a:()=>c,b:()=>i,c:()=>o,d:()=>l,e:()=>s,n:()=>f,s:()=>u,t:()=>a});var r=n(72220);function o(t,e,n){a(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function a(t,e,n,o=3,a=o){if(t.length/o!==Math.ceil(e.length/a))return r.c.error("source and destination buffers need to have the same number of elements"),t;const i=t.length/o,c=n[0],s=n[1],u=n[2],l=n[4],f=n[5],h=n[6],p=n[8],g=n[9],y=n[10],M=n[12],d=n[13],m=n[14];let b=0,A=0;for(let n=0;n<i;n++){const n=e[b],r=e[b+1],i=e[b+2];t[A]=c*n+l*r+p*i+M,t[A+1]=s*n+f*r+g*i+d,t[A+2]=u*n+h*r+y*i+m,b+=a,A+=o}return t}function i(t,e,n){c(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function c(t,e,n,o=3,a=o){if(t.length/o!==Math.ceil(e.length/a))return void r.c.error("source and destination buffers need to have the same number of elements");const i=t.length/o,c=n[0],s=n[1],u=n[2],l=n[3],f=n[4],h=n[5],p=n[6],g=n[7],y=n[8];let M=0,d=0;for(let n=0;n<i;n++){const n=e[M],r=e[M+1],i=e[M+2];t[d]=c*n+l*r+p*i,t[d+1]=s*n+f*r+g*i,t[d+2]=u*n+h*r+y*i,M+=a,d+=o}}function s(t,e,n){u(t.typedBuffer,e,n,t.typedBufferStride)}function u(t,e,n,r=3){const o=Math.min(t.length/r,e.count),a=e.typedBuffer,i=e.typedBufferStride;let c=0,s=0;for(let e=0;e<o;e++)t[s]=n*a[c],t[s+1]=n*a[c+1],t[s+2]=n*a[c+2],c+=i,s+=r}function l(t,e){f(t.typedBuffer,e.typedBuffer,t.typedBufferStride,e.typedBufferStride)}function f(t,e,n=3,r=n){const o=Math.min(t.length/n,e.length/r);let a=0,i=0;for(let c=0;c<o;c++){const o=e[a],c=e[a+1],s=e[a+2],u=o*o+c*c+s*s;if(u>0){const e=1/Math.sqrt(u);t[i]=e*o,t[i+1]=e*c,t[i+2]=e*s}a+=r,i+=n}}Object.freeze(Object.defineProperty({__proto__:null,normalize:f,normalizeView:l,scale:u,scaleView:s,shiftRight:function(t,e,n){const r=Math.min(t.count,e.count),o=t.typedBuffer,a=t.typedBufferStride,i=e.typedBuffer,c=e.typedBufferStride;let s=0,u=0;for(let t=0;t<r;t++)o[u]=i[s]>>n,o[u+1]=i[s+1]>>n,o[u+2]=i[s+2]>>n,s+=c,u+=a},transformMat3:c,transformMat3View:i,transformMat4:a,transformMat4View:o},Symbol.toStringTag,{value:"Module"}))},58995:(t,e,n)=>{n.d(e,{rS:()=>u});var r=n(2109),o=n(82971),a=n(8744);const i=new o.Z(r.kU),c=new o.Z(r.JL),s=new o.Z(r.mM);function u(t){return t&&((0,a.BZ)(t)||(0,a.fS)(t,c))?c:t&&((0,a.V2)(t)||(0,a.fS)(t,s))?s:i}new o.Z(r.pn)},83025:(t,e,n)=>{n.d(e,{JK:()=>c,QZ:()=>a,Rq:()=>i,bg:()=>o});var r=n(1533);function o(t,e=!1){return t<=r.DB?e?new Array(t).fill(0):new Array(t):new Float64Array(t)}function a(t){return((0,r.kJ)(t)?t.length:t.byteLength/8)<=r.DB?Array.from(t):new Float64Array(t)}function i(t,e,n){return Array.isArray(t)?t.slice(e,e+n):t.subarray(e,e+n)}function c(t,e){for(let n=0;n<e.length;++n)t[n]=e[n];return t}},85872:(t,e,n)=>{n.d(e,{Z:()=>h});var r=n(43697),o=n(2368),a=n(96674),i=n(5600),c=(n(75215),n(67676),n(80442),n(36030)),s=n(52011),u=n(65617),l=n(94139);let f=class extends((0,o.J)(a.wq)){constructor(t){super(t),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,u.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new l.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFormPoint({x:t,y:e,z:n}){this.origin=(0,u.f)(t,e,n??0)}};(0,r._)([(0,c.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],f.prototype,"type",void 0),(0,r._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],f.prototype,"origin",void 0),f=(0,r._)([(0,s.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],f);const h=f},50567:(t,e,n)=>{n.d(e,{Z:()=>u});var r=n(43697),o=n(2368),a=n(96674),i=(n(92604),n(75215),n(67676),n(80442),n(20102),n(36030)),c=n(52011);let s=class extends((0,o.J)(a.wq)){constructor(){super({}),this.type="georeferenced",this.isRelative=!1,this.isGeoreferenced=!0}};(0,r._)([(0,i.J)({georeferenced:"georeferenced"},{readOnly:!0})],s.prototype,"type",void 0),s=(0,r._)([(0,c.j)("esri.geometry.support.MeshGeoreferencedVertexSpace")],s);const u=s},84555:(t,e,n)=>{n.d(e,{Z:()=>h});var r=n(43697),o=n(2368),a=n(96674),i=n(5600),c=(n(75215),n(67676),n(80442),n(36030)),s=n(52011),u=n(65617),l=n(94139);let f=class extends((0,o.J)(a.wq)){constructor(t){super(t),this.type="local",this.isRelative=!0,this.isGeoreferenced=!1,this.origin=(0,u.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new l.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFormPoint({x:t,y:e,z:n}){this.origin=(0,u.f)(t,e,n??0)}};(0,r._)([(0,c.J)({local:"local"},{readOnly:!0})],f.prototype,"type",void 0),(0,r._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],f.prototype,"origin",void 0),f=(0,r._)([(0,s.j)("esri.geometry.support.MeshLocalVertexSpace")],f);const h=f},2674:(t,e,n)=>{n.d(e,{Z:()=>d});var r,o=n(43697),a=n(96674),i=n(5600),c=(n(75215),n(67676),n(80442),n(52011)),s=n(52138),u=n(13598),l=n(51305),f=n(94961),h=n(17896),p=n(65617),g=n(3709);let y=r=class extends a.wq{constructor(t){super(t),this.translation=(0,p.c)(),this.rotationAxis=(0,p.g)(g.UP),this.rotationAngle=0,this.scale=(0,p.f)(1,1,1)}get rotation(){return(0,g.uT)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,p.a)((0,g.ZZ)(t)),this.rotationAngle=(0,g.EU)(t)}get localMatrix(){const t=(0,u.c)();return(0,l.s)(M,(0,g.ZZ)(this.rotation),(0,g.WH)(this.rotation)),(0,s.g)(t,M,this.translation,this.scale),t}get localMatrixInverse(){return(0,s.a)((0,u.c)(),this.localMatrix)}applyLocal(t,e){return(0,h.m)(e,t,this.localMatrix)}applyLocalInverse(t,e){return(0,h.m)(e,t,this.localMatrixInverse)}equals(t){return this===t||null!=t&&(0,s.h)(this.localMatrix,t.localMatrix)}clone(){const t={translation:(0,p.a)(this.translation),rotationAxis:(0,p.a)(this.rotationAxis),rotationAngle:this.rotationAngle,scale:(0,p.a)(this.scale)};return new r(t)}};(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"translation",void 0),(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAxis",void 0),(0,o._)([(0,i.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAngle",void 0),(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"scale",void 0),(0,o._)([(0,i.Cb)()],y.prototype,"rotation",null),(0,o._)([(0,i.Cb)()],y.prototype,"localMatrix",null),(0,o._)([(0,i.Cb)()],y.prototype,"localMatrixInverse",null),y=r=(0,o._)([(0,c.j)("esri.geometry.support.MeshTransform")],y);const M=(0,f.a)(),d=y},3709:(t,e,n)=>{n.d(e,{EU:()=>p,UP:()=>y,Ue:()=>s,WH:()=>g,ZZ:()=>h,qC:()=>l,qw:()=>f,uT:()=>u});var r=n(22021),o=n(51305),a=n(94961),i=n(17896),c=n(65617);function s(t=y){return[t[0],t[1],t[2],t[3]]}function u(t,e,n=s()){return(0,i.c)(n,t),n[3]=e,n}function l(t,e,n=s()){return(0,o.s)(M,t,g(t)),(0,o.s)(d,e,g(e)),(0,o.m)(M,d,M),function(t,e){return t[3]=e,t}(n,(0,r.BV)((0,o.g)(n,M)))}function f(t,e,n,r=s()){return u(c.d,t,m),u(c.e,e,b),u(c.U,n,A),l(m,b,m),l(m,A,r),r}function h(t){return t}function p(t){return t[3]}function g(t){return(0,r.Vl)(t[3])}const y=[0,0,1,0],M=(0,a.a)(),d=(0,a.a)(),m=(s(),s()),b=s(),A=s()},72220:(t,e,n)=>{n.d(e,{c:()=>r});const r=n(92604).Z.getLogger("esri.views.3d.support.buffer.math")},13442:(t,e,n)=>{n.d(e,{A:()=>a,h:()=>o});var r=n(92604);function o(t,e){return t.isGeographic||t.isWebMercator&&(e?.geographic??!0)}function a(t,e,n){const o=!t.isGeoreferenced;null!=n?.geographic&&n.geographic!==o&&r.Z.getLogger(e).warnOnce(`Specifying the 'geographic' parameter (${n.geographic}) for a Mesh vertex space of type "${t.type}" is not supported. This parameter will be ignored.`)}},66459:(t,e,n)=>{n.d(e,{FF:()=>w,I5:()=>P,Yq:()=>_,iV:()=>x,iv:()=>A,w1:()=>v});var r=n(67900),o=n(46521),a=n(52138),i=n(13598),c=n(17896),s=n(65617),u=n(21787),l=n(44547),f=n(58995),h=n(83025),p=n(85872),g=n(50567),y=n(84555),M=n(2674),d=n(20773),m=n(13442),b=n(56493);function A(t,e,n){return(0,m.h)(e.spatialReference,n)?function(t,e,n){const r=e.spatialReference,o=C(e,n,Z),a=new Float64Array(t.position.length),i=function(t,e,n,r){(0,d.t)(r,t,e);const o=new Float64Array(t.length);return(0,b.To)(r,o,n)}(t.position,o,r,a),c=(0,u.b)(V,o);return{position:i,normal:F(i,a,t.normal,c,r),tangent:S(i,a,t.tangent,c,r)}}(t,e,n):function(t,e,n){const r=new Float64Array(t.position.length),o=t.position,a=e.x,i=e.y,c=e.z??0,s=B(n?n.unit:null,e.spatialReference);for(let t=0;t<o.length;t+=3)r[t]=o[t]*s+a,r[t+1]=o[t+1]*s+i,r[t+2]=o[t+2]*s+c;return{position:r,normal:t.normal,tangent:t.tangent}}(t,e,n)}function P(t,e,n,r){const{position:o,normal:a,tangent:c}=t;if(!e.isRelative)return{position:o,normal:a,tangent:c};const s=n?.localMatrix??i.I;return A({position:(0,d.t)(new Float64Array(o.length),o,s),normal:null!=a?(0,b.w9)(a,new Float32Array(a.length),s):null,tangent:null!=c?(0,b.VS)(c,new Float32Array(c.length),s):null},e.getOriginPoint(r),{geographic:!e.isGeoreferenced})}function v(t,e,n){if(n?.useTransform){const{position:r,normal:o,tangent:a}=t,{x:i,y:c,z:u}=e,l=(0,s.f)(i,c,u??0);return{vertexAttributes:{position:r,normal:o,tangent:a},vertexSpace:n.geographic??1?new y.Z({origin:l}):new p.Z({origin:l}),transform:new M.Z}}return{vertexAttributes:A(t,e,n),vertexSpace:new g.Z,transform:null}}function w(t,e,n){return(0,m.h)(e.spatialReference,n)?function(t,e,n){const r=e.spatialReference;C(e,n,Z);const o=(0,a.a)(j,Z),i=new Float64Array(t.position.length),c=function(t,e,n,r){const o=(0,b.XO)(t,e,r),a=new Float64Array(o.length);return(0,d.t)(a,o,n),a}(t.position,r,o,i),s=(0,u.b)(V,o);return{position:c,normal:O(t.normal,t.position,i,r,s),tangent:R(t.tangent,t.position,i,r,s)}}(t,e,n):T(t,e,n)}function _(t,e,n,r,o){if(!e.isRelative)return w(t,r,o);const{spatialReference:a}=r,i=P(t,e,n,a);return r.equals(e.getOriginPoint(a))?T(i,r,o):w(i,r,o)}function x(t,e,n,r,o,u){const p=n.isRelative?n.origin:s.Z,g=n.isRelative?e?.localMatrix??i.I:i.I;if(n.isGeoreferenced){const e=u??(0,h.bg)(r.length);if((0,a.j)(g,i.I)?(0,h.JK)(e,r):(0,d.t)(e,r,g),!(0,c.k)(p,s.Z)){const[t,n,r]=p;for(let o=0;o<e.length;o+=3)e[o]+=t,e[o+1]+=n,e[o+2]+=r}return(0,l.CM)(e,t,0,e,o,0,e.length/3),e}const y=(0,f.rS)(t),M=(0,l.Up)(t,y)?y:t;(0,l.Bm)(t,p,Z,M),(0,a.m)(Z,Z,g);const m=u??(0,h.bg)(r.length);return(0,d.t)(m,r,Z),(0,l.CM)(m,M,0,m,o,0,m.length/3),m}function F(t,e,n,r,o){if(null==n)return null;const a=new Float32Array(n.length);return(0,d.a)(a,n,r),(0,b.Yk)(a,t,e,o,a),a}function S(t,e,n,r,o){if(null==n)return null;const a=new Float32Array(n.length);(0,d.a)(a,n,r,4);for(let t=3;t<a.length;t+=4)a[t]=n[t];return(0,b.M2)(a,t,e,o,a),a}function T(t,e,n){const r=new Float64Array(t.position.length),o=t.position,a=e.x,i=e.y,c=e.z??0,s=B(n?n.unit:null,e.spatialReference);for(let t=0;t<o.length;t+=3)r[t]=(o[t]-a)/s,r[t+1]=(o[t+1]-i)/s,r[t+2]=(o[t+2]-c)/s;return{position:r,normal:t.normal,tangent:t.tangent}}function C(t,e,n){(0,l.Bm)(t.spatialReference,[t.x,t.y,t.z??0],n,(0,f.rS)(t.spatialReference));const r=B(e?e.unit:null,t.spatialReference);return(0,a.k)(n,n,[r,r,r]),n}function O(t,e,n,r,o){if(null==t)return null;const a=(0,b.Iz)(t,e,n,r,new Float32Array(t.length));return(0,d.a)(a,a,o),a}function R(t,e,n,r,o){if(null==t)return null;const a=(0,b.wi)(t,e,n,r,new Float32Array(t.length));return(0,d.a)(a,a,o,4),a}function B(t,e){if(null==t)return 1;const n=(0,r.r6)(e);return 1/(0,r.En)(n,"meters",t)}const Z=(0,i.c)(),j=(0,i.c)(),V=(0,o.c)()},56493:(t,e,n)=>{n.d(e,{Iz:()=>M,M2:()=>w,To:()=>b,VS:()=>P,XO:()=>m,Yk:()=>d,w9:()=>A,wi:()=>v});var r=n(92604),o=n(21787),a=n(46521),i=n(13598),c=n(17896),s=n(65617),u=n(44547),l=n(58995),f=n(8744),h=n(40488),p=n(56481),g=n(20773);const y=r.Z.getLogger("esri.geometry.support.meshUtils.normalProjection");function M(t,e,n,r,o){return x(r)?(_(S.TO_PCPF,p.ct.fromTypedArray(t),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o)),o):(y.error("Cannot convert spatial reference to PCPF"),o)}function d(t,e,n,r,o){return x(r)?(_(S.FROM_PCPF,p.ct.fromTypedArray(t),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o)),o):(y.error("Cannot convert to spatial reference from PCPF"),o)}function m(t,e,n){return(0,u.CM)(t,e,0,n,(0,l.rS)(e),0,t.length/3),n}function b(t,e,n){return(0,u.CM)(t,(0,l.rS)(n),0,e,n,0,t.length/3),e}function A(t,e,n){return(0,o.b)(B,n),(0,g.a)(e,t,B),(0,o.i)(B)||(0,g.n)(e,e),e}function P(t,e,n){if((0,o.b)(B,n),(0,g.a)(e,t,B,4),(0,o.i)(B)||(0,g.n)(e,e,4),t!==e)for(let n=3;n<t.length;n+=4)e[n]=t[n];return e}function v(t,e,n,r,o){if(!x(r))return y.error("Cannot convert spatial reference to PCPF"),o;_(S.TO_PCPF,p.ct.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o,4*Float32Array.BYTES_PER_ELEMENT));for(let e=3;e<t.length;e+=4)o[e]=t[e];return o}function w(t,e,n,r,o){if(!x(r))return y.error("Cannot convert to spatial reference from PCPF"),o;_(S.FROM_PCPF,p.ct.fromTypedArray(t,16),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o,16));for(let e=3;e<t.length;e+=4)o[e]=t[e];return o}function _(t,e,n,r,a,i){if(!e)return;const s=n.count,f=(0,l.rS)(a);if(F(a))for(let n=0;n<s;n++)r.getVec(n,C),e.getVec(n,O),(0,u.Bm)(f,C,R,f),(0,o.f)(B,R),t===S.FROM_PCPF&&(0,o.t)(B,B),(0,c.t)(O,O,B),i.setVec(n,O);else for(let a=0;a<s;a++){r.getVec(a,C),e.getVec(a,O),(0,u.Bm)(f,C,R,f),(0,o.f)(B,R);const s=(0,h.mZ)(n.get(a,1));let l=Math.cos(s);t===S.TO_PCPF&&(l=1/l),B[0]*=l,B[1]*=l,B[2]*=l,B[3]*=l,B[4]*=l,B[5]*=l,t===S.FROM_PCPF&&(0,o.t)(B,B),(0,c.t)(O,O,B),(0,c.n)(O,O),i.setVec(a,O)}return i}function x(t){return F(t)||function(t){return t.isWebMercator}(t)}function F(t){return t.isWGS84||(0,f.yW)(t)||(0,f.BZ)(t)||(0,f.V2)(t)}var S,T;(T=S||(S={}))[T.TO_PCPF=0]="TO_PCPF",T[T.FROM_PCPF=1]="FROM_PCPF";const C=(0,s.c)(),O=(0,s.c)(),R=(0,i.c)(),B=(0,a.c)()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4493],{24133:(e,t,n)=>{n.d(t,{Q:()=>a});var r=n(67676),i=n(70586),o=n(44553),s=n(88764);class a{constructor(e=9,t){this._compareMinX=u,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(),b.prune(),x.prune(),C.prune(),E.prune()}all(e){this._all(this._data,e)}search(e,t){let n=this._data;const r=this._toBBox;if(_(e,n))for(b.clear();n;){for(let i=0,o=n.children.length;i<o;i++){const o=n.children[i],s=n.leaf?r(o):o;_(e,s)&&(n.leaf?t(o):g(e,s)?this._all(o,t):b.push(o))}n=b.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!_(e,t))return!1;for(b.clear();t;){for(let r=0,i=t.children.length;r<i;r++){const i=t.children[r],o=t.leaf?n(i):i;if(_(e,o)){if(t.leaf||g(e,o))return!0;b.push(i)}}t=b.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),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 M([]),this}remove(e){if(!e)return this;let t,n=this._data,o=null,s=0,a=!1;const l=this._toBBox(e);for(C.clear(),E.clear();n||C.length>0;){if(n||(n=(0,i.j0)(C.pop()),o=C.data[C.length-1],s=E.pop()??0,a=!0),n.leaf&&(t=(0,r.cq)(n.children,e,n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),C.push(n),this._condense(C),this;a||n.leaf||!g(n,l)?o?(s++,n=o.children[s],a=!1):n=null:(C.push(n),E.push(s),s=0,o=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let n=e;for(x.clear();n;){if(!0===n.leaf)for(const e of n.children)t(e);else x.pushArray(n.children);n=x.pop()??null}}_build(e,t,n,r){const i=n-t+1;let o=this._maxEntries;if(i<=o){const r=new M(e.slice(t,n+1));return l(r,this._toBBox),r}r||(r=Math.ceil(Math.log(i)/Math.log(o)),o=Math.ceil(i/o**(r-1)));const s=new v([]);s.height=r;const a=Math.ceil(i/o),p=a*Math.ceil(Math.sqrt(o));w(e,t,n,p,this._compareMinX);for(let i=t;i<=n;i+=p){const t=Math.min(i+p-1,n);w(e,i,t,a,this._compareMinY);for(let n=i;n<=t;n+=a){const i=Math.min(n+a-1,t);s.children.push(this._build(e,n,i,r-1))}}return l(s,this._toBBox),s}_chooseSubtree(e,t,n,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==n;){let n,r=1/0,i=1/0;for(let o=0,s=t.children.length;o<s;o++){const s=t.children[o],a=c(s),l=f(e,s)-a;l<i?(i=l,r=a<r?a:r,n=s):l===i&&a<r&&(r=a,n=s)}t=n||t.children[0]}return t}_insert(e,t,n){const r=this._toBBox,i=n?e:r(e);C.clear();const o=this._chooseSubtree(i,this._data,t,C);for(o.children.push(e),d(o,i);t>=0&&C.data[t].children.length>this._maxEntries;)this._split(C,t),t--;this._adjustParentBBoxes(i,C,t)}_split(e,t){const n=e.data[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const o=this._chooseSplitIndex(n,i,r);if(!o)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const s=n.children.splice(o,n.children.length-o),a=n.leaf?new M(s):new v(s);a.height=n.height,l(n,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new v([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let r,i,o;r=i=1/0;for(let s=t;s<=n-t;s++){const t=p(e,0,s,this._toBBox),a=p(e,s,n,this._toBBox),l=m(t,a),d=c(t)+c(a);l<r?(r=l,o=s,i=d<i?d:i):l===r&&d<i&&(i=d,o=s)}return o}_chooseSplitAxis(e,t,n){const r=e.leaf?this._compareMinX:u,i=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)}_allDistMargin(e,t,n,r){e.children.sort(r);const i=this._toBBox,o=p(e,0,t,i),s=p(e,n-t,n,i);let a=y(o)+y(s);for(let r=t;r<n-t;r++){const t=e.children[r];d(o,e.leaf?i(t):t),a+=y(o)}for(let r=n-t-1;r>=t;r--){const t=e.children[r];d(s,e.leaf?i(t):t),a+=y(s)}return a}_adjustParentBBoxes(e,t,n){for(let r=n;r>=0;r--)d(t.data[r],e)}_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 i=e.data[t-1],o=i.children;o.splice((0,r.cq)(o,n,o.length,i.indexHint),1)}else this.clear();else l(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){p(e,0,e.children.length,t,e)}function p(e,t,n,r,i){i||(i=new M([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o,s=t;s<n;s++)o=e.children[s],d(i,e.leaf?r(o):o);return i}function d(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 u(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function y(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 m(e,t){const n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function w(e,t,n,r,o){const a=[t,n];for(;a.length;){const t=(0,i.j0)(a.pop()),n=(0,i.j0)(a.pop());if(t-n<=r)continue;const l=n+Math.ceil((t-n)/r/2)*r;(0,s.q)(e,l,n,t,o),a.push(n,l,l,t)}}const b=new o.Z,x=new o.Z,C=new o.Z,E=new o.Z({deallocator:void 0});class T{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class I extends T{constructor(){super(...arguments),this.height=1,this.indexHint=new r.SO}}class M extends I{constructor(e){super(),this.children=e,this.leaf=!0}}class v extends I{constructor(e){super(),this.children=e,this.leaf=!1}}},84864:(e,t,n)=>{n.d(t,{bU:()=>d,fC:()=>c,tp:()=>h,v7:()=>u});const r=new Float64Array(2),i=new Float64Array(2),o="0123456789bcdefghjkmnpqrstuvwxyz";function s(e){return o[e]}function a(e){return(e[0]+e[1])/2}function l(e,t,n){return e[0]=t,e[1]=n,e}function p(e,t){const n=t>a(e);return function(e,t){const n=a(e),r=t,i=!t;e[0]=i*e[0]+r*n,e[1]=i*n+r*e[1]}(e,n),n}function d(e,t){let n=-90,r=90,i=-180,o=180;for(let s=0;s<t;s++){const t=Math.ceil((s+1)/2),a=Math.floor((s+1)/2),l=1-s%2,p=30-(3*t+2*a),d=30-(2*t+3*a),u=3*l+2*(1-l),h=2*l+3*(1-l),c=3*l+7*(1-l)<<d,y=(7*l+3*(1-l)<<p&e.geohashX)>>p,f=(c&e.geohashY)>>d;for(let e=u-1;e>=0;e--){const t=(i+o)/2,n=y&1<<e?1:0;i=(1-n)*i+n*t,o=(1-n)*t+n*o}for(let e=h-1;e>=0;e--){const t=(n+r)/2,i=f&1<<e?1:0;n=(1-i)*n+i*t,r=(1-i)*t+i*r}}return[i,n,o,r]}function u(e,t,n,r){r%2&&(r+=1);let i=0,o=0,s=-90,a=90,l=-180,p=180;for(let e=0;e<r/2;e++){for(let t=0;t<5;t++){const r=(l+p)/2,o=n>r?1:0;i|=o<<29-(t+5*e),l=(1-o)*l+o*r,p=(1-o)*r+o*p}for(let n=0;n<5;n++){const r=(s+a)/2,i=t>r?1:0;o|=i<<29-(n+5*e),s=(1-i)*s+i*r,a=(1-i)*r+i*a}}e.geohashX=i,e.geohashY=o}function h(e,t,n,r,i){i%2&&(i+=1);let o=0,s=0,a=-90,l=90,p=-180,d=180;for(let e=0;e<i/2;e++){for(let t=0;t<5;t++){const n=(p+d)/2,i=r>n?1:0;o|=i<<29-(t+5*e),p=(1-i)*p+i*n,d=(1-i)*n+i*d}for(let t=0;t<5;t++){const r=(a+l)/2,i=n>r?1:0;s|=i<<29-(t+5*e),a=(1-i)*a+i*r,l=(1-i)*r+i*l}}e[2*t]=o,e[2*t+1]=s}function c(e,t,n){let o="";const a=l(r,-90,90),d=l(i,-180,180);for(let r=0;r<n;r++){let n=0;r%2?(n|=p(a,e)<<4,n|=p(d,t)<<3,n|=p(a,e)<<2,n|=p(d,t)<<1,n|=p(a,e)<<0):(n|=p(d,t)<<4,n|=p(a,e)<<3,n|=p(d,t)<<2,n|=p(a,e)<<1,n|=p(d,t)<<0),o+=s(n)}return o}},16306:(e,t,n)=>{n.d(t,{aX:()=>C});var r=n(68773),i=n(20102),o=n(92604),s=n(38913),a=n(58901),l=n(73913),p=n(8744),d=n(40488),u=(n(66577),n(3172)),h=n(33955),c=n(11282),y=n(81271);async function f(e,t,n){const r="string"==typeof e?(0,y.mN)(e):e,i=t[0].spatialReference,o=(0,h.Ji)(t[0]),s={...n,query:{...r.query,f:"json",sr:i.wkid??JSON.stringify(i),geometries:JSON.stringify((l=t,{geometryType:(0,h.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:a}=await(0,u.default)(r.path+"/simplify",s);var l;return function(e,t,n){const r=(0,h.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=n,t}))}(a.geometries,o,i)}const m=o.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function w(e,t,n){if(t){const t=function(e,t){if(!(e instanceof a.Z||e instanceof s.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m.error(e),new i.Z(e)}const n=(0,l.x3)(e),r=[];for(const e of n){const n=[];r.push(n),n.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const i=e[r][0],o=e[r][1],s=e[r+1][0],a=e[r+1][1],l=Math.sqrt((s-i)*(s-i)+(a-o)*(a-o)),p=(a-o)/l,d=(s-i)/l,u=l/t;if(u>1){for(let e=1;e<=u-1;e++){const r=e*t,s=d*r+i,a=p*r+o;n.push([s,a])}const e=(l+Math.floor(u-1)*t)/2,r=d*e+i,s=p*e+o;n.push([r,s])}n.push([s,a])}}return function(e){return"polygon"===e.type}(e)?new s.Z({rings:r,spatialReference:e.spatialReference}):new a.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.Sx)(t,!0)}return n&&(e=(0,l.Sy)(e,n)),e}function b(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,l.XZ)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,l.XZ)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,l.XZ)(r,t);e=e.clone().offset(n*(-2*t),0)}else if(r<n){const t=(0,l.XZ)(r,n);e=e.clone().offset(t*(-2*n),0)}}return e}function x(e,t){let n=-1;for(let r=0;r<t.cutIndexes.length;r++){const i=t.cutIndexes[r],o=t.geometries[r],s=(0,l.x3)(o);for(let e=0;e<s.length;e++){const t=s[e];t.some((n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const r=t[e][0];n=r>n?r:n}n=Number(n.toFixed(9));const r=-360*(0,l.XZ)(n,180);for(let n=0;n<t.length;n++){const t=o.getPoint(e,n);o.setPoint(e,n,t.clone().offset(r,0))}return!0}}))}if(i===n){if(g(e))for(const t of(0,l.x3)(o))e[i]=e[i].addRing(t);else if(_(e))for(const t of(0,l.x3)(o))e[i]=e[i].addPath(t)}else n=i,e[i]=o}return e}async function C(e,t,n){if(!Array.isArray(e))return C([e],t);t&&"string"!=typeof t&&m.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const i="string"==typeof t?t:t?.url??r.default.geometryServiceUrl;let o,y,g,_,E,T,I,M,v=0;const k=[],S=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,y=(0,p.C5)(o),g=o.isWebMercator,T=g?102100:4326,_=l.UZ[T].maxX,E=l.UZ[T].minX,I=l.UZ[T].plus180Line,M=l.UZ[T].minus180Line),y)if("mesh"===t.type)S.push(t);else if("point"===t.type)S.push(b(t.clone(),_,E));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,_,E))),S.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,y);S.push(e.rings?new s.Z(e):e)}else if(t.extent){const e=t.extent,n=(0,l.XZ)(e.xmin,E)*(2*_);let r=0===n?t.clone():(0,l.Sy)(t.clone(),n);e.offset(n,0),e.intersects(I)&&e.xmax!==_?(v=e.xmax>v?e.xmax:v,r=w(r,g),k.push(r),S.push("cut")):e.intersects(M)&&e.xmin!==E?(v=e.xmax*(2*_)>v?e.xmax*(2*_):v,r=w(r,g,360),k.push(r),S.push("cut")):S.push(r)}else S.push(t.clone());else S.push(t);else S.push(t);let L=(0,l.XZ)(v,_),R=-90;const G=L,D=new a.Z;for(;L>0;){const e=360*L-180;D.addPath([[e,R],[e,-1*R]]),R*=-1,L--}if(k.length>0&&G>0){const t=x(k,await async function(e,t,n,r){const i=(0,c.en)(e),o=t[0].spatialReference,s={...r,query:{...i.query,f:"json",sr:JSON.stringify(o),target:JSON.stringify({geometryType:(0,h.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},a=await(0,u.default)(i.path+"/cut",s),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,h.im)(e);return t.spatialReference=o,t}))}}(i,k,D,n)),r=[],o=[];for(let n=0;n<S.length;n++){const i=S[n];if("cut"!==i)o.push(i);else{const i=t.shift(),s=e[n];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&i.rings.length>=s.rings.length?(r.push(i),o.push("simplify")):o.push(g?(0,d.$)(i):i)}}if(!r.length)return o;const s=await f(i,r,n),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(g?(0,d.$)(s.shift()):s.shift())}return a}const N=[];for(let e=0;e<S.length;e++){const t=S[e];if("cut"!==t)N.push(t);else{const e=k.shift();N.push(!0===g?(0,d.$)(e):e)}}return N}},73913:(e,t,n)=>{n.d(t,{Sy:()=>l,UZ:()=>s,XZ:()=>a,x3:()=>p});var r=n(58901),i=n(82971),o=n(33955);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator}),minus180Line:new r.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.Z({paths:[[[180,-180],[180,180]]],spatialReference:i.Z.WGS84}),minus180Line:new r.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:i.Z.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=p(e);for(const e of n)for(const n of e)n[0]+=t;return e}function p(e){return(0,o.oU)(e)?e.rings:e.paths}},28552:(e,t,n)=>{n.r(t),n.d(t,{default:()=>tn});var r=n(43697),i=(n(66577),n(46791)),o=n(20102),s=n(92604),a=n(95330),l=n(5600),p=(n(75215),n(67676),n(80442)),d=n(52011),u=n(84864),h=n(87085),c=n(98732),y=n(5428),f=n(92036),m=n(42033),g=n(38913),_=n(44547),w=n(8744),b=n(70272);class x{constructor(){this._featureLookup=new Map}static getInstance(){return x.instance||(x.instance=new x),x.instance}static resetInstance(){x.instance&&(x.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 r=[];return e.forEach((e=>{if(!e||!e.id)return;e.properties||(e.properties=[]);let i,o=null;if(n&&(o=e.properties[n]?(0,c.GH)(e.properties[n]):null),"originId"in e&&"destinationId"in e&&(e.properties.ESRI__ORIGIN_ID=e.originId,e.properties.ESRI__DESTINATION_ID=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const n=this._featureLookup.get(e.id);i=new b.u_(o?JSON.parse(JSON.stringify(o)):n?.geometry?JSON.parse(JSON.stringify(n.geometry)):null,JSON.parse(JSON.stringify(Object.assign(n.attributes,e.properties))),null,e.properties[t])}else i=new b.u_(o?JSON.parse(JSON.stringify(o)):null,e.properties,null,e.properties[t]);this._featureLookup.set(e.id,i),r.push(i)})),r}}var C=n(40330),E=n(3172);let T=class extends f.Z{constructor(e){super(e),this.resultRows=[]}};(0,r._)([(0,l.Cb)()],T.prototype,"resultRows",void 0),T=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQueryResult")],T);const I=T;let M=class extends f.Z{constructor(e){super(e),this.resultRowsStream=new ReadableStream}};(0,r._)([(0,l.Cb)()],M.prototype,"resultRowsStream",void 0),M=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQueryResult")],M);const v=M;var k=n(96674),S=n(82971);let L=class extends k.wq{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=null,this.description=null,this.fieldNames=null}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],L.prototype,"name",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],L.prototype,"unique",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],L.prototype,"ascending",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],L.prototype,"description",void 0),(0,r._)([(0,l.Cb)({type:[String],json:{write:!0}})],L.prototype,"fieldNames",void 0),L=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.FieldIndex")],L);const R=L;let G=class extends k.wq{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=null,this.required=null,this.defaultVisibility=null,this.systemMaintained=null,this.role=null,this.defaultValue=null}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],G.prototype,"name",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],G.prototype,"alias",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],G.prototype,"fieldType",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],G.prototype,"geometryType",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],G.prototype,"hasM",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],G.prototype,"hasZ",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],G.prototype,"nullable",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],G.prototype,"editable",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],G.prototype,"required",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],G.prototype,"defaultVisibility",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],G.prototype,"systemMaintained",void 0),(0,r._)([(0,l.Cb)()],G.prototype,"role",void 0),(0,r._)([(0,l.Cb)({type:Object,json:{type:String,write:{writer:(e,t)=>{t.defaultValue=null!=e?e.toString():null}}}})],G.prototype,"defaultValue",void 0),G=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.GraphProperty")],G);const D=G;let N=class extends k.wq{constructor(e){super(e),this.name=null,this.alias=null,this.role=null,this.strict=null,this.properties=null,this.fieldIndexes=null}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],N.prototype,"name",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],N.prototype,"alias",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],N.prototype,"role",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],N.prototype,"strict",void 0),(0,r._)([(0,l.Cb)({type:[D],json:{write:!0}})],N.prototype,"properties",void 0),(0,r._)([(0,l.Cb)({type:[R],json:{write:!0}})],N.prototype,"fieldIndexes",void 0),N=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.GraphObjectType")],N);const j=N;let F=class extends j{constructor(e){super(e)}};F=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.EntityType")],F);const O=F;let Z=class extends j{constructor(e){super(e),this.endPoints=[]}};(0,r._)([(0,l.Cb)()],Z.prototype,"endPoints",void 0),Z=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.RelationshipType")],Z);const P=Z;let A=class extends k.wq{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=null,this.entityTypes=null,this.relationshipTypes=null}};(0,r._)([(0,l.Cb)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],A.prototype,"timestamp",void 0),(0,r._)([(0,l.Cb)({type:S.Z,json:{write:!0}})],A.prototype,"spatialReference",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],A.prototype,"strict",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],A.prototype,"objectIdField",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],A.prototype,"globalIdField",void 0),(0,r._)([(0,l.Cb)()],A.prototype,"arcgisManaged",void 0),(0,r._)([(0,l.Cb)()],A.prototype,"identifierInfo",void 0),(0,r._)([(0,l.Cb)()],A.prototype,"searchIndexes",void 0),(0,r._)([(0,l.Cb)({type:[O],json:{write:!0}})],A.prototype,"entityTypes",void 0),(0,r._)([(0,l.Cb)({type:[P],json:{write:!0}})],A.prototype,"relationshipTypes",void 0),A=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.DataModel")],A);const B=A;let z=class extends k.wq{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1}};(0,r._)([(0,l.Cb)({type:[String],json:{write:!0}})],z.prototype,"capabilities",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],z.prototype,"supportsSearch",void 0),(0,r._)([(0,l.Cb)({type:[String],json:{write:!0}})],z.prototype,"supportedQueryFormats",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],z.prototype,"allowGeometryUpdates",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],z.prototype,"searchMaxRecordCount",void 0),(0,r._)([(0,l.Cb)({type:Object,json:{write:!0}})],z.prototype,"serviceCapabilities",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],z.prototype,"maxRecordCount",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],z.prototype,"description",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],z.prototype,"copyrightText",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],z.prototype,"units",void 0),(0,r._)([(0,l.Cb)({type:Object,json:{write:!0}})],z.prototype,"spatialReference",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],z.prototype,"currentVersion",void 0),(0,r._)([(0,l.Cb)({type:Object,json:{write:!0}})],z.prototype,"dateFieldsTimeReference",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],z.prototype,"serviceItemId",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],z.prototype,"supportsDocuments",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],z.prototype,"dataEditingNotSupported",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],z.prototype,"schemaEditingNotSupported",void 0),z=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.ServiceDefinition")],z);const q=z;let Y=class extends k.wq{constructor(e){super(e),this.dataModel=null,this.serviceDefinition=null}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],Y.prototype,"url",void 0),(0,r._)([(0,l.Cb)({type:B,json:{write:!0}})],Y.prototype,"dataModel",void 0),(0,r._)([(0,l.Cb)({type:q,json:{write:!0}})],Y.prototype,"serviceDefinition",void 0),Y=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.KnowledgeGraph")],Y);const U=Y;var Q=n(99880);const X="esri/rest/knowledgeGraph/wasmInterface/";let H,J=null;async function $(){const e=J??H;if(e)return e;const t=(0,p.Z)("wasm-simd");return H=async function(e){if(e){const{default:e}=await n.e(5389).then(n.bind(n,35389)).then((e=>e.a));return e({locateFile:e=>(0,Q.V)(X+e)})}const{default:t}=await n.e(9931).then(n.bind(n,39931)).then((e=>e.a));return t({locateFile:e=>(0,Q.V)(X+e)})}(t),H}var V=n(65091),W=n(94139),K=n(58901),ee=n(9361);function te(e,t){const n=new t.ArrayValue;return n.deleteLater(),e.forEach((e=>{n.add_value(ie(e,t))})),n}function ne(e,t){const n=new t.ObjectValue;n.deleteLater();for(const[r,i]of Object.entries(e))n.set_key_value(r,ie(i,t));return n}function re(e,t){if(e instanceof V.Z)return function(e,t){const n=new t.GeometryValue;n.deleteLater(),n.geometry_type=n.geometry_type=t.esriGeometryType.esriGeometryMultipoint,n.has_z=e.hasZ,n.has_m=e.hasM;const r=[],i=[];i[0]=e.points.length;let o=0;return e.points.forEach((e=>{e.forEach((e=>{r[o]=e,o++}))})),n.coords=new Float64Array(r),n.lengths=new Uint32Array(i),n}(e,t);if(e instanceof W.Z)return function(e,t){const n=new t.GeometryValue;n.deleteLater(),n.geometry_type=t.esriGeometryType.esriGeometryPoint,n.has_z=e.hasZ,n.has_m=e.hasM;const r=[],i=[];i[0]=1,r[0]=e.x,r[1]=e.y;let o=2;return e.hasZ&&(r[o]=e.z,o++),e.hasM&&(r[o]=e.m,o++),n.coords=new Float64Array(r),n.lengths=new Uint32Array(i),n}(e,t);if(e instanceof K.Z||e instanceof g.Z)return function(e,t){const n=new t.GeometryValue;n.deleteLater(),n.has_z=e.hasZ,n.has_m=e.hasM;const r=[],i=[];let o=[];e instanceof K.Z?(n.geometry_type=t.esriGeometryType.esriGeometryPolyline,o=e.paths):e instanceof g.Z&&(n.geometry_type=t.esriGeometryType.esriGeometryPolygon,o=e.rings);let s=0,a=0;return o.forEach((e=>{let t=0;e.forEach((e=>{t++,e.forEach((e=>{r[a]=e,a++}))})),i[s]=t,s++})),n.coords=new Float64Array(r),n.lengths=new Uint32Array(i),n}(e,t);throw new o.Z("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function ie(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof ee.Z)return re(e,t);if(Array.isArray(e)){const n=new t.ArrayValue;return n.deleteLater(),e.forEach((e=>{n.add_value(ie(e,t))})),n}return ne(e,t)}let oe=class extends k.wq{constructor(e){super(e),this.properties=null}};(0,r._)([(0,l.Cb)({json:{write:!0}})],oe.prototype,"properties",void 0),oe=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.GraphObject")],oe);const se=oe;let ae=class extends se{constructor(e){super(e),this.typeName=null,this.id=null}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],ae.prototype,"typeName",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],ae.prototype,"id",void 0),ae=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.GraphNamedObject")],ae);const le=ae;let pe=class extends le{constructor(e){super(e),this.layoutGeometry=null}};(0,r._)([(0,l.Cb)({type:W.Z,json:{write:!0}})],pe.prototype,"layoutGeometry",void 0),pe=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.Entity")],pe);const de=pe;let ue=class extends le{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],ue.prototype,"originId",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],ue.prototype,"destinationId",void 0),(0,r._)([(0,l.Cb)({type:K.Z,json:{write:!0}})],ue.prototype,"layoutGeometry",void 0),ue=(0,r._)([(0,d.j)("esri.rest.Relationship.Relationship")],ue);const he=ue;function ce(e,t){if(!e.typeName)throw new o.Z("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(e instanceof de){const n=new t.EntityValue;n.deleteLater(),n.type_name=e.typeName;for(const[r,i]of Object.entries(e.properties))n.set_key_value(r,ye(i,t));return e.id&&n.set_id(e.id),n}if(e instanceof he){const n=new t.RelationshipValue;n.deleteLater(),n.type_name=e.typeName;for(const[r,i]of Object.entries(e.properties))n.set_key_value(r,ye(i,t));return e.id&&n.set_id(e.id),e.originId&&e.destinationId&&n.set_related_entity_ids(e.originId,e.destinationId),n}throw new o.Z("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function ye(e,t){return null==e?"":"object"!=typeof e||e instanceof Date?e:e instanceof ee.Z?re(e,t):""}let fe=class extends f.Z{constructor(e){super(e),this.name=null,this.supportedCategory=null,this.analyzers=[],this.searchProperties=new Map}};(0,r._)([(0,l.Cb)()],fe.prototype,"name",void 0),(0,r._)([(0,l.Cb)()],fe.prototype,"supportedCategory",void 0),(0,r._)([(0,l.Cb)()],fe.prototype,"analyzers",void 0),(0,r._)([(0,l.Cb)()],fe.prototype,"searchProperties",void 0),fe=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.SearchIndex")],fe);const me=fe;var ge,_e,we,be,xe,Ce,Ee;function Te(e){return e.deleteLater(),new O(Me(e))}function Ie(e){return e.deleteLater(),new R({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:Le(e.fields)})}function Me(e){return{name:e.name,alias:e.alias,role:ge[e.role.value]?ge[e.role.value]:null,strict:e.strict,properties:Re(e.properties),fieldIndexes:Ge(e.field_indexes)}}function ve(e){return e.deleteLater(),new D({alias:e.alias,name:e.name,fieldType:_e[e.field_type.value]?_e[e.field_type.value]:null,geometryType:we[e.geometry_type.value]?we[e.geometry_type.value]:null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:Ce[e.role.value],defaultValue:e.default_value})}function ke(e){e.deleteLater();const t=Me(e),n=[];for(let t=0;t<e.end_points.size();t++){const r=e.end_points.get(t);n.push({originEntityType:r.origin_entity_type,destinationEntityType:r.dest_entity_type})}return new P(Object.assign({endPoints:n},t))}function Se(e){const t=[];for(let n=0;n<e.size();n++)t.push(Te(e.get(n)));return t}function Le(e){const t=[];for(let n=0;n<e.size();n++)t.push(e.get(n));return t}function Re(e){const t=[];for(let n=0;n<e.size();n++)t.push(ve(e.get(n)));return t}function Ge(e){const t=[];for(let n=0;n<e.size();n++)t.push(Ie(e.get(n)));return t}function De(e){const t=[];for(let n=0;n<e.size();n++)t.push(ke(e.get(n)));return t}function Ne(e){const t=[];for(let n=0;n<e.size();n++){const n=new me,r=e.get(0);n.name=r.name,n.supportedCategory=xe[r.supported_category.value];const i=r.analyzers.size();for(let e=0;e<i;e++)n.analyzers.push({name:r.analyzers.get(e).name});for(let e=0;e<r.search_properties.keys().size();e++){const t=r.search_properties.keys().get(e),i=r.search_properties.get(t),o=[];for(let e=0;e<i.property_names.size();e++)o.push(i.property_names.get(e));n.searchProperties.set(t,{propertyNames:o})}t.push(n)}return t}!function(e){e[e.Regular=0]="Regular",e[e.Provenance=1]="Provenance",e[e.Document=2]="Document"}(ge||(ge={})),function(e){e[e.esriFieldTypeSmallInteger=0]="esriFieldTypeSmallInteger",e[e.esriFieldTypeInteger=1]="esriFieldTypeInteger",e[e.esriFieldTypeSingle=2]="esriFieldTypeSingle",e[e.esriFieldTypeDouble=3]="esriFieldTypeDouble",e[e.esriFieldTypeString=4]="esriFieldTypeString",e[e.esriFieldTypeDate=5]="esriFieldTypeDate",e[e.esriFieldTypeOID=6]="esriFieldTypeOID",e[e.esriFieldTypeGeometry=7]="esriFieldTypeGeometry",e[e.esriFieldTypeBlob=8]="esriFieldTypeBlob",e[e.esriFieldTypeRaster=9]="esriFieldTypeRaster",e[e.esriFieldTypeGUID=10]="esriFieldTypeGUID",e[e.esriFieldTypeGlobalID=11]="esriFieldTypeGlobalID",e[e.esriFieldTypeXML=12]="esriFieldTypeXML",e[e.esriFieldTypeBigInteger=13]="esriFieldTypeBigInteger"}(_e||(_e={})),function(e){e[e.esriGeometryNull=0]="esriGeometryNull",e[e.esriGeometryPoint=1]="esriGeometryPoint",e[e.esriGeometryMultipoint=2]="esriGeometryMultipoint",e[e.esriGeometryPolyline=3]="esriGeometryPolyline",e[e.esriGeometryPolygon=4]="esriGeometryPolygon",e[e.esriGeometryEnvelope=5]="esriGeometryEnvelope",e[e.esriGeometryAny=6]="esriGeometryAny",e[e.esriGeometryMultiPatch=7]="esriGeometryMultiPatch"}(we||(we={})),function(e){e[e.esriMethodHintUNSPECIFIED=0]="esriMethodHintUNSPECIFIED",e[e.esriUUIDESRI=1]="esriUUIDESRI",e[e.esriUUIDRFC4122=2]="esriUUIDRFC4122"}(be||(be={})),function(e){e[e.esriTypeUNSPECIFIED=0]="esriTypeUNSPECIFIED",e[e.esriTypeEntity=1]="esriTypeEntity",e[e.esriTypeRelationship=2]="esriTypeRelationship",e[e.esriTypeBoth=4]="esriTypeBoth"}(xe||(xe={})),function(e){e[e.esriGraphPropertyUNSPECIFIED=0]="esriGraphPropertyUNSPECIFIED",e[e.esriGraphPropertyRegular=1]="esriGraphPropertyRegular",e[e.esriGraphPropertyDocumentName=2]="esriGraphPropertyDocumentName",e[e.esriGraphPropertyDocumentTitle=3]="esriGraphPropertyDocumentTitle",e[e.esriGraphPropertyDocumentUrl=4]="esriGraphPropertyDocumentUrl",e[e.esriGraphPropertyDocumentText=5]="esriGraphPropertyDocumentText",e[e.esriGraphPropertyDocumentKeywords=6]="esriGraphPropertyDocumentKeywords",e[e.esriGraphPropertyDocumentContentType=7]="esriGraphPropertyDocumentContentType",e[e.esriGraphPropertyDocumentMetadata=8]="esriGraphPropertyDocumentMetadata",e[e.esriGraphPropertyDocumentFileExtension=9]="esriGraphPropertyDocumentFileExtension"}(Ce||(Ce={})),function(e){e[e.esriIdentifierInfoTypeUNSPECIFIED=0]="esriIdentifierInfoTypeUNSPECIFIED",e[e.esriIdentifierInfoTypeDatabaseNative=1]="esriIdentifierInfoTypeDatabaseNative",e[e.esriIdentifierInfoTypeUniformProperty=2]="esriIdentifierInfoTypeUniformProperty"}(Ee||(Ee={}));let je=class extends se{constructor(e){super(e)}};je=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.ObjectValue")],je);const Fe=je;let Oe=class extends k.wq{constructor(e){super(e),this.path=null}};(0,r._)([(0,l.Cb)({type:[se],json:{write:!0}})],Oe.prototype,"path",void 0),Oe=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.Path")],Oe);const Ze=Oe;var Pe,Ae,Be;function ze(e){const t={},n=qe(e,t),r=e.lengths,i=e.coords;let s="";if(e.geometry_type.value===Pe.ESRI_GEOMETRY_POLYGON)s="rings";else{if(e.geometry_type.value!==Pe.ESRI_GEOMETRY_POLYLINE)throw new o.Z("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");s="paths"}t[s]=[];let a=0;return r.forEach((e=>{const r=[];for(let t=0;t<e;t++){const e=[];for(let t=0;t<n;t++)e[t]=i[a],a++;r.push(e)}t[s].push(r)})),t}function qe(e,t){let n=2;return e.has_z?(t.hasZ=e.has_z,n++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,n++):t.hasM=!1,n}!function(e){e[e.ESRI_GEOMETRY_NULL=0]="ESRI_GEOMETRY_NULL",e[e.ESRI_GEOMETRY_POINT=1]="ESRI_GEOMETRY_POINT",e[e.ESRI_GEOMETRY_MULTIPOINT=2]="ESRI_GEOMETRY_MULTIPOINT",e[e.ESRI_GEOMETRY_POLYLINE=3]="ESRI_GEOMETRY_POLYLINE",e[e.ESRI_GEOMETRY_POLYGON=4]="ESRI_GEOMETRY_POLYGON",e[e.ESRI_GEOMETRY_ENVELOPE=5]="ESRI_GEOMETRY_ENVELOPE",e[e.ESRI_GEOMETRY_ANY=6]="ESRI_GEOMETRY_ANY",e[e.ESRI_GEOMETRY_MULTI_PATCH=7]="ESRI_GEOMETRY_MULTI_PATCH"}(Pe||(Pe={})),function(e){e[e.OBJECT=0]="OBJECT",e[e.ENTITY=1]="ENTITY",e[e.RELATIONSHIP=2]="RELATIONSHIP",e[e.PATH=3]="PATH",e[e.ARRAY=4]="ARRAY"}(Ae||(Ae={})),function(e){e[e.view=0]="view",e[e.edit=1]="edit"}(Be||(Be={}));const Ye=s.Z.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors"),Ue={decodedWasmObjToQueryResponseObj:(e,t)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case Pe.ESRI_GEOMETRY_POINT:return function(e){const t={};let n=2;qe(e,t);const r=e.coords;return t.x=r[0],t.y=r[1],e.has_z&&(t.z=r[n],n++),e.has_m&&(t.m=r[n]),new W.Z(t)}(e);case Pe.ESRI_GEOMETRY_MULTIPOINT:return function(e){const t={},n=qe(e,t),r=e.lengths,i=e.coords,o=r[0];t.points=[];let s=0;for(let e=0;e<o;e++){const e=[];for(let t=0;t<n;t++)e[t]=i[s],s++;t.points.push(e)}return new V.Z(t)}(e);case Pe.ESRI_GEOMETRY_POLYLINE:return n=e,new K.Z(ze(n));case Pe.ESRI_GEOMETRY_POLYGON:return function(e){return new g.Z(ze(e))}(e);case Pe.ESRI_GEOMETRY_ENVELOPE:case Pe.ESRI_GEOMETRY_MULTI_PATCH:return Ye.warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;case Pe.ESRI_GEOMETRY_NULL:case Pe.ESRI_GEOMETRY_ANY:default:return Ye.warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return Ye.warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case Ae.OBJECT:return function(e,t){return new Fe(He(e,t))}(e,t);case Ae.ENTITY:return Xe(e,t);case Ae.RELATIONSHIP:return Je(e,t);case Ae.PATH:return function(e,t){const n=e.entity_count(),r=e.relationship_count(),i=[];for(let o=0;o<n;o++)i.push(Xe(e.get_entity_at(o),t)),o<r&&i.push(Je(e.get_relationship_at(o),t));return new Ze({path:i})}(e,t);case Ae.ARRAY:return function(e,t){const n=[],r=e.count();for(let i=0;i<r;i++){const r=e.get_value_at(i);n.push(Qe(r,t))}return n}(e,t);default:return Ye.warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}var n}};function Qe(e,t){return Ue.decodedWasmObjToQueryResponseObj(e,t)}function Xe(e,t){const n=e.type_name,r=He(e,t),i=e.get_id();return new de(Object.assign({typeName:n,id:i},r))}function He(e,t){const n={},r=e.key_count();for(let i=0;i<r;i++)n[e.get_key_at(i)]=Qe(e.get_value_at(i),t);return{properties:n}}function Je(e,t){const n=e.type_name,r=He(e,t);return new he(Object.assign({typeName:n,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},r))}let $e=class extends f.Z{constructor(e){super(e),this.hasError=null,this.error=null,this.editResults=[]}};(0,r._)([(0,l.Cb)()],$e.prototype,"hasError",void 0),(0,r._)([(0,l.Cb)()],$e.prototype,"error",void 0),(0,r._)([(0,l.Cb)()],$e.prototype,"editResults",void 0),$e=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.GraphApplyEdits")],$e);const Ve=$e,We={fetchKnowledgeGraph:async e=>{const t=new U({url:e}),n=[];return n.push(et(t)),n.push(async function(e){return We.refreshServiceDefinition(e)}(t)),await Promise.all(n),t},refreshDataModel:async e=>{e.dataModel=await lt(e)},refreshServiceDefinition:async e=>{const t=(await(0,E.default)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new q(t),e.serviceDefinition},executeQueryStreaming:async(e,t,n)=>{const r=`${e.url}/graph/query`;await nt(e);const i=await ot(r,n);i.data.body=await async function(e,t){const n=await $(),r=new n.GraphQueryRequestEncoder;if(r.deleteLater(),r.output_spatial_reference=n.SpatialReferenceUtil.WGS84(),r.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,i]of Object.entries(e.bindParameters))it(t,i,r,n);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,r);else{if(t.dataModel||await et(t),4326!==t.dataModel?.spatialReference?.wkid)throw new o.Z("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");r.input_quantization_parameters=n.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,n){if(!e.extent)throw new o.Z("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new o.Z("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new o.Z("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:n.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,r,n);try{r.encode()}catch(e){throw new o.Z("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const i=r.get_encoding_result();if(0!==i.error.error_code)throw new o.Z("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:i.error.error_code,errorMessage:i.error.error_message});return i.get_byte_buffer()}(t,e);const s=await tt(i.data.url,i.data);if(e.dataModel)return new v({resultRowsStream:await at(s,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,n)=>{if(e.serviceDefinition?.dataEditingNotSupported)throw new o.Z("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const r=`${e.url}/graph/applyEdits`;await nt(e);const i=await ot(r,n);return i.data.body=await async function(e,t){if(t.dataModel||await et(t),!t.dataModel)throw new o.Z("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const n=await $(),r=!!e.options?.cascadeDelete,i=new n.GraphApplyEditsEncoder(n.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):n.InputQuantizationUtil.WGS84_lossless());i.deleteLater(),i.cascade_delete=r;try{let t;e.entityAdds?.forEach((e=>{t=i.add_entity(ce(e,n)),rt(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipAdds?.forEach((e=>{if(!e.originId||!e.destinationId)throw new o.Z("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=i.add_relationship(ce(e,n)),rt(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityUpdates?.forEach((e=>{if(!e.id)throw new o.Z("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=i.update_entity(ce(e,n)),rt(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipUpdates?.forEach((e=>{if(!e.id)throw new o.Z("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=i.update_relationship(ce(e,n)),rt(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityDeletes?.forEach((e=>{if(!e.typeName)throw new o.Z("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=i.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach((e=>{t.delete_by_id(e)}))})),e.relationshipDeletes?.forEach((e=>{if(!e.typeName)throw new o.Z("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=i.make_delete_helper(e.typeName,!1);e.ids?.forEach((e=>{t.delete_by_id(e)}))})),i.encode()}catch(e){throw new o.Z("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const s=i.get_encoding_result();return rt(s.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),s.get_byte_buffer()}(t,e),async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),n=new((await $()).GraphApplyEditsDecoder);return n.deleteLater(),n.decode(new Uint8Array(t)),function(e){const t=new Ve;t.hasError=e.has_error(),t.hasError&&(t.error={errorCode:e.error.error_code,errorMessage:e.error.error_message});const n=e.get_edit_results_count();for(let r=0;r<n;r++){const n=e.get_edit_results_at(r),i=e.get_edit_results_type_name_at(r),o=[],s=[],a=[],l=n.get_add_results_count(),p=n.get_update_results_count(),d=n.get_delete_results_count();for(let e=0;e<l;e++){const t=n.get_add_result_at(e);o.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<p;e++){const t=n.get_update_result_at(e);s.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<d;e++){const t=n.get_delete_result_at(e);a.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}t.editResults.push({typeName:i,adds:o,updates:s,deletes:a})}return t}(n)}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:t,data:e.text()})}(await tt(i.data.url,i.data))},executeQuery:async(e,t,n)=>{const r=`${e.url}/graph/query`,i=await(0,E.default)(r,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...n?.query},signal:n?.signal,timeout:n?.timeout}),s=i.getHeader?.("content-type"),a=i.data;if(s?.includes("application/x-protobuf")){const t=new((await $()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel)return new I({resultRows:st(t,a,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:s,data:i.data})},executeSearch:async(e,t,n)=>{const r=t.typeCategoryFilter,i=`${e.url}/graph/search`,s=await(0,E.default)(i,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:r,...n?.query},signal:n?.signal,timeout:n?.timeout}),a=s.getHeader?.("content-type"),l=s.data;if(a?.includes("application/x-protobuf")){const t=new((await $()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel)return new I({resultRows:st(t,l,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:a,data:s.data})},executeSearchStreaming:async(e,t,n)=>{const r=`${e.url}/graph/search`;await nt(e);const i=await ot(r,n);i.data.body=await async function(e){const t=await $(),n=new t.GraphSearchRequestEncoder;if(n.deleteLater(),n.search_query=e.searchQuery,n.type_category_filter=t.esriNamedTypeCategory[e.typeCategoryFilter],!0===e.returnSearchContext&&(n.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(n.start_index=e.start),null!=e.num&&(n.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{n.set_ids_filter(te(e.idsFilter,t))}catch(e){throw new o.Z("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach((e=>{n.add_named_type_filter(e)}));try{n.encode()}catch(e){throw new o.Z("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const r=n.get_encoding_result();if(0!==r.error.error_code)throw new o.Z("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{errorCode:r.error.error_code,errorMessage:r.error.error_message});return r.get_byte_buffer()}(t);const s=await tt(i.data.url,i.data);if(e.dataModel)return new v({resultRowsStream:await at(s,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},_fetchWrapper:async(e,t)=>fetch(e,t)};async function Ke(e,t,n){return We.executeQueryStreaming(e,t,n)}async function et(e){return We.refreshDataModel(e)}async function tt(e,t){return We._fetchWrapper(e,t)}async function nt(e){const t=C.id?.findCredential(e.url);t||(e.dataModel?await lt(e):await et(e))}function rt(e,t,n){if(0!==e.error_code)throw new o.Z(t,n,{errorCode:e.error_code,errorMessage:e.error_message})}function it(e,t,n,r){null==t?n.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?n.set_param_key_value(e,t):t instanceof ee.Z?n.set_param_key_value(e,re(t,r)):t instanceof Array?n.set_param_key_value(e,te(t,r)):n.set_param_key_value(e,ne(t,r))}async function ot(e,t){return(0,E.default)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}function st(e,t,n){e.push_buffer(new Uint8Array(t));const r=[];let i=0;for(;e.next_row();){i||(i=e.get_header_keys().size());const t=new Array(i);for(let r=0;r<i;r++){const i=e.get_value(r);t[r]=Qe(i,n)}r.push(t)}if(e.has_error())throw new o.Z("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return r}async function at(e,t){const n=e.headers.get("content-type");if(e.headers.get("content-length")&&s.Z.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),n?.includes("application/x-protobuf")){const n=e.body?.getReader(),r=new((await $()).GraphQueryDecoder);return r.deleteLater(),new ReadableStream({async start(e){try{return function i(){return n?.read().then((({done:s,value:a})=>{if(s){let t;if(r.has_error()&&(t=new o.Z("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded",{errorCode:r.error.error_code,errorMessage:r.error.error_message})),n.releaseLock(),t)throw e.error(t),t;return void e.close()}const l=st(r,a,t);return l.length>0&&e.enqueue(l),i()}))}()}catch(t){n?.releaseLock(),e.error(new o.Z("knowledge-graph:stream-decoding-error","The server returned a valid response, but there was an error decoding the response stream",{error:t})),e.close()}}})}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:e.text()})}async function lt(e){const t=`${e.url}/dataModel/queryDataModel`,n=await(0,E.default)(t,{responseType:"array-buffer",query:{f:"pbf"}}),r=n.getHeader?.("content-type"),i=n.data;if(r?.includes("application/x-protobuf")){const e=(await $()).decode_data_model_from_protocol_buffer(new Uint8Array(i));if(!e)throw new o.Z("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){return e.deleteLater(),new B({timestamp:e.timestamp,spatialReference:new S.Z(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:Ee[e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value],databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:be[e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value]}},searchIndexes:Ne(e.search_indexes),entityTypes:Se(e.entity_types),relationshipTypes:De(e.relationship_types)})}(e)}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:n.data})}let pt=class extends f.Z{constructor(e){super(e),this.openCypherQuery=""}};(0,r._)([(0,l.Cb)()],pt.prototype,"openCypherQuery",void 0),pt=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQuery")],pt);const dt=pt;let ut=class extends dt{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null}};(0,r._)([(0,l.Cb)()],ut.prototype,"bindParameters",void 0),(0,r._)([(0,l.Cb)()],ut.prototype,"bindGeometryQuantizationParameters",void 0),(0,r._)([(0,l.Cb)()],ut.prototype,"outputQuantizationParameters",void 0),ut=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQueryStreaming")],ut);const ht=ut;var ct=n(14165);const yt="ESRI__ID",ft="ESRI__ORIGIN_ID",mt="ESRI__DESTINATION_ID",gt="ESRI__LAYOUT_GEOMETRY",_t=12,wt=s.Z.getLogger("esri.rest.knowledgeGraph.knowledgeGraphLayer.KnowledgeGraphLayerDataManager");let bt=class extends f.Z{constructor(e){super(e),this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this._processingCacheUpdatesLookup=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,r)=>{if("entity"===t.get(r))this.entityTypeNames.add(r);else{if("relationship"!==t.get(r))return wt.warn(`A named type, ${r}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(r);this.relationshipTypeNames.add(r)}const i=new Map;n.members?.forEach((e=>{this._memberIdTypeLookup.set(e.id,r);const t=this.getById(e.id);t&&i.set(e.id,t)})),this.sublayerCaches.set(r,i)}))}addToLayerInclusionSet(e){e.forEach((({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new o.Z("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);if(n.useAllData)throw new o.Z("knowledge-graph:layer-data-manager","You cannot add members to an exclusion list for a sublayer where the sublayer is set to always retrieve its entire data set");n.members||(n.members=new Map),n.members.set(t,{id:t}),this._memberIdTypeLookup.set(t,e)}}else{const n=new Map;n.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:n}),this._memberIdTypeLookup.set(t,e)}}))}getById(e){return x.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 r;if(r=e||new ct.Z({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,n=this._processingCacheUpdatesLookup.get(t.objectType.name??""),i=r.outFields,o=r.geometry;let s="",a="";o&&o.extent&&(s=(0,u.fC)(o.extent.ymin,o.extent.xmin,_t),a=(0,u.fC)(o.extent.ymax,o.extent.xmax,_t)),i&&1===i.length&&i[0]===yt&&"1=1"===r.where||await Promise.all(n??[]);const l=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],p=[];return l.forEach((n=>{if(n.geometry=e.linkChartDiagramLookup.get(n.attributes[t.objectIdField]),n.attributes[gt]=n.geometry,s&&a){const r=e.linkChartGeohashLookup.get(n.attributes[t.objectIdField]);r?r>=s&&r<=a&&p.push(n):p.push(n)}else p.push(n)})),p}return this.retrieveDataFromService(r,t,n)}async getConnectedRecordIds(e){const t=[],n=[],r=new Map;return e.forEach((e=>{if(this._memberIdTypeLookup.has(e)){const t=this._memberIdTypeLookup.get(e);if(!this.entityTypeNames.has(t))return;r.has(t)?r.get(t)?.push(e):r.set(t,[e])}})),r.forEach(((e,r)=>{const i=`MATCH (n:${r})-[r]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`,o=new Promise((n=>{(async()=>{const n=(await Ke(this.knowledgeGraph,new ht({openCypherQuery:i,bindParameters:{ids:e}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:r}=await n.read();if(e)break;for(let e=0;e<r.length;e++){const n=r[e];t.push({id:n[0],typeName:n[1]}),t.push({id:n[2],typeName:n[3]})}}}catch(e){if("AbortError"!==e.name)throw e;wt.info("Request aborted as expected")}})().then((()=>{n()}))}));n.push(o)})),await Promise.all(n),t}async refreshCacheContent(e,t,n,r=!0){const i=x.getInstance(),s=[],a=new Map,l=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,e)})),this.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&l.set(e.name,e)})),e||this.inclusionModeDefinition?e?e.forEach((e=>{if(this._memberIdTypeLookup.has(e)){const t=this._memberIdTypeLookup.get(e);a.has(t)?a.get(t)?.push(e):a.set(t,[e])}})):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e.useAllData?a.set(t,null):e.members&&e.members.forEach((e=>{a.has(t)&&null!==a.get(t)?a.get(t)?.push(e.id):a.set(t,[e.id])}))})):(this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&a.set(e.name,null)})),this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&a.set(e.name,null)})));for(const[e,p]of a){const a=new Promise((s=>{(async()=>{const s=new Set,a=[];let d,u="",h=!1;if(t||l.get(e)?.properties?.forEach((e=>{e.name&&s.add(e.name)})),n&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&s.add(t)}if(this.entityTypeNames.has(e))u=`MATCH (n:${e}) ${p?"WHERE id(n) IN $ids ":""}return ID(n)`,s.forEach((e=>{u+=`, n.${e}`,a.push(e)}));else{if(!this.relationshipTypeNames.has(e))throw new o.Z("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?`);h=!0,u=`MATCH ()-[n:${e}]->() ${p?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,s.forEach((e=>{u+=`, n.${e}`,a.push(e)}))}d=new ht(p?{openCypherQuery:u,bindParameters:{ids:p}}:{openCypherQuery:u});const c=(await Ke(this.knowledgeGraph,d)).resultRowsStream.getReader();for(;;){const{done:t,value:n}=await c.read();if(t)break;const o=[];for(let e=0;e<n.length;e++){const t=n[e];let r=0,i=0;const s={properties:{}};for(s.id=t[r],r++,i++,h&&(s.originId=t[r],r++,i++,s.destinationId=t[r],r++,i++);r<t.length;r++)s.properties[a[r-i]]=t[r];o.push(s)}const s=i.writeToStore(o,yt,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),r&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),r&&!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[yt],t),r&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[yt])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[yt],{id:t.attributes[yt]}),this._memberIdTypeLookup.set(t.attributes[yt],e))}))}})().then((()=>{s(null)}))}));s.push(a),this._processingCacheUpdatesLookup.get(e)?.push(a)}await Promise.all(s)}removeFromLayer(e){const t=new Set;e.forEach((e=>{this._memberIdTypeLookup.get(e)&&t.add(this._memberIdTypeLookup.get(e)),this._memberIdTypeLookup.delete(e),this.inclusionModeDefinition?.namedTypeDefinitions.forEach((t=>{t.members?.has(e)&&t.members.delete(e)}))})),t.forEach((t=>{this.sublayerCaches.get(t)?.forEach(((n,r)=>{e.includes(r)&&this.sublayerCaches.get(t)?.delete(r)}))}))}async retrieveDataFromService(e,t,n){const r=x.getInstance(),i=new Set,o=[];let s,a="",l=[];const p="relationship"===t.graphType,d=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,u=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let h=!d&&u?Array.from(u).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(h=e.objectIds);else if(null!=e.objectIds&&h&&h.length>0){const t=e.objectIds;e.objectIds=h.filter((e=>t.includes(e)))}else if(null!=e.objectIds)h=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=h}if(null!=e.outFields){const n=e.outFields;n.includes("*")?t.fields.forEach((e=>{i.add(e.name)})):n.forEach((e=>{e!==yt&&e!==t.geometryFieldName&&i.add(e)}))}if(null!=e.geometry){const n=e.geometry;let r;if(n?.extent?.spatialReference&&!n.spatialReference?.isWGS84?(await(0,_.iQ)(n.extent.spatialReference,w.Zn),r=(0,_.iV)(n.extent,w.Zn)):r=n.extent,null!=e.where&&"1=1"!==e.where){const n=await(0,m.E)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{n.fieldNames.includes(e.name)&&i.add(e.name)}))}a=p?`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&&i.add(t.geometryFieldName),i.forEach((e=>{a+=`, n.${e}`,o.push(e)})),s=new ht({openCypherQuery:a,bindParameters:{param_filter_geom:new g.Z({rings:[[[r.xmin,r.ymin],[r.xmin,r.ymax],[r.xmax,r.ymax],[r.xmax,r.ymin],[r.xmin,r.ymin]]]})}})}else{let n="";if(null!=e.where&&"1=1"!==e.where){const r=await(0,m.E)(e.where,t.fieldsIndex);t.fields.forEach((e=>{r.fieldNames.includes(e.name)&&i.add(e.name)}));const o=["column-reference","string","number","binary-expression"],s=["=","<","<=","<>",">",">=","AND","OR","LIKE"];let a=!1;const l=e=>{if("column-reference"===e.type)return`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&o.includes(e.left.type)&&o.includes(e.right.type)&&s.includes(e.operator))return`${l(e.left)} ${e.operator} ${l(e.right)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let t="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)t+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return a=!0,"";t+=`lower(n.${e.left.column})`}if(t+=" CONTAINS (","string"!==e.right.type)return a=!0,"";{let n=e.right.value;"%"===n.charAt(0)&&(n=n.slice(1)),"%"===n.charAt(n.length-1)&&(n=n.slice(0,-1)),t+=`'${n.toLowerCase()}')`}return t}return a=!0,""};n=l(r.parseTree),a&&(n="")}let r="";r=p?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let a=!1;h&&(a=!0,r+=" WHERE ID(n) IN $ids"),n&&(r+=a?" AND":" WHERE",r+=` ${n}`),r+=" return ID(n)",p&&(r+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&i.add(t.geometryFieldName),i.forEach((e=>{r+=`, n.${e}`,o.push(e)})),s=new ht(h?{openCypherQuery:r,bindParameters:{ids:h}}:{openCypherQuery:r})}const c=(await Ke(t.parentCompositeLayer.dataManager.knowledgeGraph,s,n)).resultRowsStream.getReader();for(;;){const{done:e,value:n}=await c.read();if(e)break;const i=[];for(let e=0;e<n.length;e++){const t=n[e];let r=0,s=0;const a={properties:{}};for(a.id=t[r],r++,s++,p&&(a.originId=t[r],r++,s++,a.destinationId=t[r],r++,s++);r<t.length;r++)a.properties[o[r-s]]=t[r];i.push(a)}l=l.concat(r.writeToStore(i,yt,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return l}};(0,r._)([(0,l.Cb)()],bt.prototype,"knowledgeGraph",void 0),(0,r._)([(0,l.Cb)()],bt.prototype,"inclusionModeDefinition",void 0),(0,r._)([(0,l.Cb)()],bt.prototype,"entityTypeNames",void 0),(0,r._)([(0,l.Cb)()],bt.prototype,"relationshipTypeNames",void 0),(0,r._)([(0,l.Cb)()],bt.prototype,"geographicLookup",void 0),(0,r._)([(0,l.Cb)()],bt.prototype,"sublayerCaches",void 0),bt=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.knowledgeGraphLayer.KnowledgeGraphLayerDataManager")],bt);var xt=n(51773),Ct=(n(16050),n(12501),n(28756),n(92271),n(72529),n(5499),n(84382),n(81571),n(91423)),Et=n(32400),Tt=(n(78346),n(57191)),It=n(66202),Mt=n(25278);const vt=(0,n(53518).v)(),kt=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,r._)([(0,l.Cb)(vt.fields)],t.prototype,"fields",void 0),(0,r._)([(0,l.Cb)(vt.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,r._)([(0,d.j)("esri.layers.knowledgeGraphLayer.KnowledgeGraphSublayerBase")],t),t};var St=n(71612),Lt=n(6404),Rt=n(34760),Gt=n(72965),Dt=n(1231),Nt=n(35671),jt=n(74889),Ft=n(32163),Ot=n(728),Zt=n(6570),Pt=n(86973);let At=class extends((0,Lt.M)(kt((0,St.h)((0,Gt.M)((0,Rt.Q)(h.Z)))))){constructor(e){if(super(e),this.capabilities=(0,Mt.MS)(!1,!1),this.definitionExpression="",this.displayField="",this.elevationInfo=null,this.geometryType=null,this.geometryFieldName=null,this.graphType=null,this.hasM=!1,this.hasZ=!1,this.labelsVisible=null,this.labelingInfo=null,this.objectIdField=yt,this.objectType=null,this.parentCompositeLayer=null,this.popupTemplate=null,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new Ot.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const n=ct.Z.fromJSON(e);return this.queryFeaturesJSON(n,t)}}},(()=>null)),[e.port2]}))},this.type="knowledge-graph-sublayer","link-chart"===e.parentCompositeLayer.type)"relationship"===e.graphType?this.geometryType="polyline":this.geometryType="point",this.geometryFieldName=gt;else if(e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name)?.geometryType&&"esriGeometryNull"!==e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name)?.geometryType){const t=e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name);this.geometryFieldName=t?.name??null,this.geometryType=t?.geometryType?Pt.M.fromJSON(t.geometryType):null;const n=t?.name,r=n?e.objectType.properties?.[n]:null;r?(this.hasM=r.hasM??!1,this.hasZ=r.hasZ??!1):(this.hasM=!1,this.hasZ=!1)}else this.geometryType=null;e.objectType.properties?.forEach((e=>{let t=e.fieldType;"esriFieldTypeOID"===t&&(t="esriFieldTypeInteger"),this.fields.push(Dt.Z.fromJSON({name:e.name,type:t,alias:e.alias,defaultValue:null,editable:e.editable,nullable:e.nullable}))})),this.fields.push(Dt.Z.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1})),this._set("fields",[...this.fields]),e.parentCompositeLayer.dataManager.knowledgeGraph.dataModel?.spatialReference&&(this.spatialReference=e.parentCompositeLayer.dataManager.knowledgeGraph.dataModel.spatialReference),"link-chart"===e.parentCompositeLayer.type?"relationship"===e.graphType?this.renderer=(0,Ct.i)((0,Mt.bU)(Pt.M.toJSON("polyline")).renderer):this.renderer=(0,Ct.i)((0,Mt.bU)(Pt.M.toJSON("point")).renderer):this.renderer=(0,Ct.i)((0,Mt.bU)(Pt.M.toJSON(this.geometryType)).renderer)}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,Nt.YN)(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return(0,Ft.eZ)(this,e)}createQuery(){return new ct.Z({where:"1=1",outFields:["*"]})}getField(e){for(let t=0;t<this.fields.length;t++)if(this.fields[t].name===e)return this.fields[t];throw new Error("Field not found")}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:n,queryEngine:r}=await this._setupQueryObjects(e),i=jt.Z.fromJSON(await r.executeQuery(n.toJSON(),t?.signal));return i.features.forEach((e=>{e.sourceLayer=this})),i}async queryFeaturesJSON(e,t){const{resolvedQuery:n,queryEngine:r}=await this._setupQueryObjects(e);return await r.executeQuery(n.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:n,queryEngine:r}=await this._setupQueryObjects(e);return r.executeQueryForCount(n.toJSON(),t?.signal)}async queryExtent(e={},t){const n={...e,returnGeometry:!0},{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(n),o=await i.executeQueryForExtent(r.toJSON(),t?.signal);let s;return s=null!=o.extent?.xmin&&null!=o.extent?.xmax&&null!=o.extent?.ymin&&null!=o.extent?.ymax?new Zt.Z(o.extent):new Zt.Z,{count:o.count,extent:s}}async queryObjectIds(e,t){const n=ct.Z.from(e);let r;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)r=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);r=this.loadQueryEngine(e)}return r.executeQueryForIds(n.toJSON(),t?.signal)}loadQueryEngine(e){const t=new Tt.Z({geometryType:Pt.M.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),n=new It.q({fields:this.fields.map((e=>e.toJSON())),geometryType:Pt.M.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:null,featureStore:t});return n.featureStore.addMany(e),n}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new ct.Z({where:"1=1",outFields:[yt]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}async _setupQueryObjects(e,t){const n=ct.Z.from(e),r=n.geometry;let i;if(r&&!r.spatialReference?.isWGS84&&(await(0,_.iQ)(r.spatialReference,w.Zn),n.geometry=(0,_.iV)(r instanceof g.Z||r instanceof K.Z?r:r.extent,w.Zn)),"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{resolvedQuery:n,queryEngine:i}}};(0,r._)([(0,l.Cb)()],At.prototype,"capabilities",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],At.prototype,"defaultPopupTemplate",null),(0,r._)([(0,l.Cb)()],At.prototype,"definitionExpression",void 0),(0,r._)([(0,l.Cb)()],At.prototype,"displayField",void 0),(0,r._)([(0,l.Cb)()],At.prototype,"elevationInfo",void 0),(0,r._)([(0,l.Cb)()],At.prototype,"geometryType",void 0),(0,r._)([(0,l.Cb)()],At.prototype,"geometryFieldName",void 0),(0,r._)([(0,l.Cb)()],At.prototype,"graphType",void 0),(0,r._)([(0,l.Cb)()],At.prototype,"hasM",void 0),(0,r._)([(0,l.Cb)()],At.prototype,"hasZ",void 0),(0,r._)([(0,l.Cb)()],At.prototype,"labelsVisible",void 0),(0,r._)([(0,l.Cb)()],At.prototype,"labelingInfo",void 0),(0,r._)([(0,l.Cb)()],At.prototype,"objectIdField",void 0),(0,r._)([(0,l.Cb)()],At.prototype,"objectType",void 0),(0,r._)([(0,l.Cb)()],At.prototype,"parentCompositeLayer",void 0),(0,r._)([(0,l.Cb)({type:xt.Z,json:{name:"popupInfo",write:!0}})],At.prototype,"popupTemplate",void 0),(0,r._)([(0,l.Cb)({types:Et.A,json:{write:{target:"layerDefinition.drawingInfo.renderer"}}})],At.prototype,"renderer",null),(0,r._)([(0,l.Cb)()],At.prototype,"source",void 0),(0,r._)([(0,l.Cb)({json:{read:!1}})],At.prototype,"type",void 0),At=(0,r._)([(0,d.j)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],At);const Bt=At;let zt,qt=null;var Yt,Ut,Qt,Xt,Ht,Jt,$t,Vt,Wt;function Kt(e,t,n,r,i,o){const s=n.length,a=i.length,l=Float64Array.BYTES_PER_ELEMENT,p=Uint32Array.BYTES_PER_ELEMENT,d=Uint8Array.BYTES_PER_ELEMENT,u=15+s*(d+2*l)+a*(2*p),h=qt._malloc(u);try{const d=h+16-h%16,u=d+s*l,c=u+s*l,y=c+a*p,f=y+a*p,m=()=>[qt.HEAPF64.subarray(d>>3,(d>>3)+s),qt.HEAPF64.subarray(u>>3,(u>>3)+s),qt.HEAPU32.subarray(c>>2,(c>>2)+a),qt.HEAPU32.subarray(y>>2,(y>>2)+a),qt.HEAPU8.subarray(f,f+s)],[g,_,w,b,x]=m();g.set(n),_.set(r),w.set(i),b.set(o),x.set(t);const C=e(s,f,d,u,a,c,y),[E,T,I,M,v]=m();return n.set(E),r.set(T),i.set(I),o.set(M),t.set(v),C}finally{qt._free(h)}}!function(e){e[e.None=0]="None",e[e.IsMovable=1]="IsMovable",e[e.IsGeographic=2]="IsGeographic",e[e.IsRoot=4]="IsRoot"}(Yt||(Yt={})),function(e){e.getMinIdealEdgeLength=function(){return qt.getMinIdealEdgeLength()},e.apply=function(e,t,n,r,i,o=2,s=1,a=-1){return Kt(((e,t,n,r,i,l,p)=>qt.applyForceDirectedLayout(e,t,n,r,i,l,p,o,s,a)),e,t,n,r,i)}}(Ut||(Ut={})),function(e){e.apply=function(e,t,n,r,i,o=2,s=1,a=-1){return Kt(((e,t,n,r,i,l,p)=>qt.applyCommunityLayout(e,t,n,r,i,l,p,o,s,a)),e,t,n,r,i)}}(Qt||(Qt={})),function(e){e.apply=function(e,t,n,r,i){return Kt(qt.applySimpleLayout,e,t,n,r,i)}}(Xt||(Xt={})),function(e){e.apply=function(e,t,n,r,i){return Kt(qt.applyHierarchicalLayout,e,t,n,r,i)}}(Ht||(Ht={})),function(e){e.apply=function(e,t,n,r,i){return Kt(qt.applyRadialTreeLayout,e,t,n,r,i)}}(Jt||(Jt={})),function(e){e.apply=function(e,t,n,r,i){return Kt(qt.applySmartTreeLayout,e,t,n,r,i)}}($t||($t={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(Vt||(Vt={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(Wt||(Wt={}));let en=class extends((0,St.h)((0,Gt.M)(h.Z))){constructor(e){if(super(e),this.dataPreloadedInLocalCache=!1,this._currentLinkChartConfig={layoutMode:"RADIAL_TREE",xScaleFactor:1,yScaleFactor:1},this._graphTypeLookup=new Map,this.layers=new i.Z,this.linkChartDiagramLookup=new Map,this.linkChartExtent=new Zt.Z({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.linkChartGeohashLookup=new Map,this.sublayerIdsCache=new Map,this.tables=new i.Z,this.type="link-chart",this._originalInclusionList=e.inclusionModeDefinition,e.dataPreloadedInLocalCache&&!e.inclusionModeDefinition)throw new o.Z("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it")}normalizeCtorArgs(e){return{url:e.url,title:e.title,dataPreloadedInLocalCache:e.dataPreloadedInLocalCache,defaultLinkChartConfig:e.defaultLinkChartConfig}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let n=[],r=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new o.Z("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.inclusionModeDefinition?.generateAllSublayers?(n=e.knowledgeGraph.dataModel.entityTypes??[],r=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((i,o)=>{if(!this._graphTypeLookup.get(o))return s.Z.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(o);this._graphTypeLookup.get(o)instanceof P||"strictOrigin"in this._graphTypeLookup.get(o)?t.has(o)||(t.add(o),r.push(this._graphTypeLookup.get(o))):this._graphTypeLookup.get(o)instanceof O||"properties"in this._graphTypeLookup.get(o)?t.has(o)||(t.add(o),n.push(this._graphTypeLookup.get(o))):(s.Z.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(o))})):(n=e.knowledgeGraph.dataModel.entityTypes??[],r=e.knowledgeGraph.dataModel.relationshipTypes??[]);const i=new bt({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=n,this.memberRelationshipTypes=r,this.dataManager=i}load(e){return this.addResolvingPromise(new Promise((t=>{(async function(e){return We.fetchKnowledgeGraph(e)})(this.url).then((n=>{if(this._initializeLayerProperties({knowledgeGraph:n,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache)this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1,e.members?.forEach((e=>{let t;t=e.linkChartLocation instanceof y.Z?e.linkChartLocation:e.linkChartLocation?(0,c.GH)(e.linkChartLocation):null,this.linkChartDiagramLookup.set(e.id,t),t&&2===t.coords.length&&0===t.lengths.length?this.linkChartGeohashLookup.set(e.id,(0,u.fC)(t.coords[1],t.coords[0],_t)):this.linkChartGeohashLookup.set(e.id,"")})),this.addResolvingPromise(this._initializeDiagram().then((async()=>{this.layers.forEach((async e=>{await e.refreshCachedQueryEngine()})),this.tables.forEach((async e=>{await e.refreshCachedQueryEngine()}))})))}));else{const t="GEOGRAPHIC"===this.defaultLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,t,!0).then((async()=>{(0,a.k_)(e);const t=[],n=[];this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1,this.dataManager.inclusionModeDefinition.namedTypeDefinitions.forEach((e=>{e.useAllData=!1}))),await this._initializeDiagram(),this.layers.forEach((e=>{n.push(e.refreshCachedQueryEngine()),t.push(new Promise((t=>{e.on("layerview-create",(()=>{t(null)}))})))})),this.tables.forEach((e=>{n.push(e.refreshCachedQueryEngine())})),await Promise.all(n)})))}t(null)}))}))),Promise.resolve(this)}async addRecords(e){await this._handleNewRecords(e)}async expand(e){const t=await this.dataManager.getConnectedRecordIds(e),n=t.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));return await this._handleNewRecords(t),{records:n}}loadLayerAssumingLocalCache(){this.memberRelationshipTypes.forEach((e=>{const t=new Bt({objectType:e,parentCompositeLayer:this,graphType:"relationship",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.memberEntityTypes.forEach((e=>{const t=new Bt({objectType:e,parentCompositeLayer:this,graphType:"entity",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{const n=((e,t,n)=>(e.has(t)||e.set(t,new Set),e.get(t)))(this.sublayerIdsCache,t);e.members?.forEach((e=>{if(n.add(e.id),e.linkChartLocation)if(e.linkChartLocation instanceof y.Z)this.linkChartDiagramLookup.set(e.id,e.linkChartLocation),2===e.linkChartLocation.coords.length&&0===e.linkChartLocation.lengths.length?this.linkChartGeohashLookup.set(e.id,(0,u.fC)(e.linkChartLocation.coords[1],e.linkChartLocation.coords[0],_t)):this.linkChartGeohashLookup.set(e.id,"");else{const t=(0,c.GH)(e.linkChartLocation);this.linkChartDiagramLookup.set(e.id,e.linkChartLocation?t:null),"x"in e.linkChartLocation&&"y"in e.linkChartLocation?this.linkChartGeohashLookup.set(e.id,(0,u.fC)(e.linkChartLocation.x,e.linkChartLocation.y,_t)):this.linkChartGeohashLookup.set(e.id,"")}}))}))}async calculateLinkChartLayout(e="RADIAL_TREE",t){const r=[],i=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{r.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{i.push({typeName:t,feature:e})}))})),this.linkChartDiagramLookup=new Map;const a=new Map,l=new Map,p=new Map,d=new Map,h=new Uint8Array(r.length),y=new Float64Array(r.length),f=new Float64Array(r.length),m=new Uint32Array(i.length),g=new Uint32Array(i.length),_=[],w=t?.xScaleFactor??1,b=t?.yScaleFactor??1,x=new Zt.Z({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let C,E="FORCE_DIRECTED",T=0,I=0;switch(E="GEOGRAPHIC"===e?"FORCE_DIRECTED":e,E){case"FORCE_DIRECTED":C=Ut.apply;break;case"COMMUNITY":C=Qt.apply;break;case"HIERARCHICAL":C=Ht.apply;break;case"RADIAL_TREE":C=Jt.apply;break;case"SMART_TREE":C=$t.apply;break;default:C=Xt.apply}r.forEach((({typeName:n,feature:r})=>{if(t?.lockedNodeLocations?.has(r.attributes[yt])){"GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(n)?h[T]=Yt.IsGeographic:h[T]=Yt.None;const i=t.lockedNodeLocations.get(r.attributes[yt]);y[T]=i.x,f[T]=i.y}else if("GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(n)){h[T]=Yt.IsGeographic;let e=null;const t=r.attributes[this.dataManager.geographicLookup.get(n).name],i=this.dataManager.geographicLookup.get(n)?.geometryType;switch(i){case"esriGeometryPoint":y[T]=t?.x,f[T]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(y[T]=e.x,f[T]=e.y):h[T]=Yt.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(y[T]=e.x,f[T]=e.y):h[T]=Yt.IsMovable;break;default:h[T]=Yt.IsMovable}(null==y[T]||null==f[T]||Number.isNaN(y[T])||Number.isNaN(f[T]))&&(h[T]=Yt.IsMovable,y[T]=0,f[T]=0)}else h[T]=Yt.IsMovable,y[T]=0,f[T]=0;d.set(r.attributes[yt],T),_[T]={feature:r,typeName:n},T++}));let M=!1;if(i.forEach((e=>{const t=d.get(e.feature.attributes[ft]),n=d.get(e.feature.attributes[mt]);void 0!==t&&void 0!==n?(m[I]=t,g[I]=n,I++):(M=!0,this.linkChartDiagramLookup.set(e.feature.attributes[ft],null),this.linkChartGeohashLookup.set(e.feature.attributes[ft],null))})),M&&s.Z.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null"),await(zt||(zt=n.e(6124).then(n.bind(n,36124)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,Q.V)(`esri/libs/linkchartlayout/${e}`)}))).then((e=>{!function(e){qt=e}(e)})),zt)),!C(h,y,f,m,g))throw new o.Z("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");for(let e=0;e<_.length;e++){if(h[e]===Yt.IsMovable&&(y[e]=y[e]*w,f[e]=f[e]*b),f[e]>84.9999&&(f[e]=84.9999),f[e]<-84.9999&&(f[e]=-84.9999),y[e]>179.9999&&(y[e]=179.9999),y[e]<-179.9999&&(y[e]=-179.9999),_[e].feature.attributes[gt]=new W.Z(y[e],f[e]),a.has(_[e].typeName)){const t=a.get(_[e].typeName);t?.set(_[e].feature.attributes[yt],_[e].feature)}else{const t=new Map;t.set(_[e].feature.attributes[yt],_[e].feature),a.set(_[e].typeName,t)}p.set(_[e].feature.attributes[yt],_[e].feature);const t=(0,c.GH)(_[e].feature.attributes[gt]);this.linkChartDiagramLookup.set(_[e].feature.attributes[yt],_[e].feature.attributes[gt]?t:null),this.linkChartGeohashLookup.set(_[e].feature.attributes[yt],(0,u.fC)(_[e].feature.attributes[gt].y,_[e].feature.attributes[gt].x,_t)),_[e].feature.attributes[gt].x<x.xmin&&(x.xmin=_[e].feature.attributes[gt].x),_[e].feature.attributes[gt].x>x.xmax&&(x.xmax=_[e].feature.attributes[gt].x),_[e].feature.attributes[gt].y<x.ymin&&(x.ymin=_[e].feature.attributes[gt].y),_[e].feature.attributes[gt].y>x.ymax&&(x.ymax=_[e].feature.attributes[gt].y)}return this.linkChartExtent.xmin=x.xmin,this.linkChartExtent.xmax=x.xmax,this.linkChartExtent.ymin=x.ymin,this.linkChartExtent.ymax=x.ymax,i.forEach((e=>{const t=_[d.get(e.feature.attributes[ft])]?.feature.attributes[gt],n=_[d.get(e.feature.attributes[mt])]?.feature.attributes[gt];if(!t||!n)return;const r=new K.Z({paths:[[t.x,t.y],[n.x,n.y]]});if(e.feature.attributes[gt]=r,l.has(e.typeName)){const t=l.get(e.typeName);t?.set(e.feature.attributes[yt],e.feature)}else{const t=new Map;t.set(e.feature.attributes[yt],e.feature),l.set(e.typeName,t)}p.set(e.feature.attributes[yt],e.feature);const i=(0,c.GH)(e.feature.attributes[gt]);this.linkChartDiagramLookup.set(e.feature.attributes[yt],e.feature.attributes[gt]?i:null),this.linkChartGeohashLookup.set(e.feature.attributes[yt],"")})),this._currentLinkChartConfig={layoutMode:e,xScaleFactor:w,yScaleFactor:b},{nodes:a,links:l,idMap:p}}async applyNewLinkChartLayout(e="RADIAL_TREE",t){const n=[];await this.calculateLinkChartLayout(e,t),this.layers.forEach((e=>{n.push(e.refreshCachedQueryEngine())})),await Promise.all(n),this.layers.forEach((e=>{e.emit("refresh",{dataChanged:!0})}))}getCurrentNodeLocations(){const e=new Map;return this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((t=>{t?.members?.forEach((t=>{const n=t.linkChartLocation;let r;const i=t.id;n&&(r="x"in n?{x:n.x,y:n.y}:{x:n.coords[0],y:n.coords[1]},e.set(i,new W.Z({x:r.x,y:r.y})))}))})),e}async synchronizeInclusionListWithCache(){return new Promise((e=>{this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{if(e.useAllData=!1,e.members&&e.members.size>0){if(!this.dataManager.sublayerCaches.get(t))return;const n=Array.from(this.dataManager.sublayerCaches.get(t).keys());Array.from(e.members.keys()).filter((e=>!n.includes(e))).forEach((t=>{e.members?.delete(t)}))}})),e()}))}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this.layers.forEach((e=>{e.emit("refresh",{dataChanged:!0})}))}async _handleNewRecords(e){const t=[];this.dataManager.addToLayerInclusionSet(e);for(const n of e)this.sublayerIdsCache.has(n.typeName)||(this.sublayerIdsCache.set(n.typeName,new Set),t.push(n.typeName)),this.sublayerIdsCache.get(n.typeName).add(n.id);for(const e of t)if(this._graphTypeLookup.has(e)){const t=this._graphTypeLookup.get(e),n="endPoints"in t?"relationship":"entity",r=new Bt({objectType:t,parentCompositeLayer:this,graphType:n,title:e});"entity"===n?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),r.geometryType?this.layers.push(r):this.tables.push(r),this.dataManager.sublayerCaches.set(e,new Map)}await this.dataManager.refreshCacheContent(e.map((e=>e.id))),await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,{xScaleFactor:this._currentLinkChartConfig.xScaleFactor,yScaleFactor:this._currentLinkChartConfig.xScaleFactor})}async _initializeDiagram(){this.defaultLinkChartConfig?this.defaultLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e=>{e?.members?.forEach((e=>{const t=e.linkChartLocation;let n;const r=e.id;if(!t)return;n="x"in t?{x:t.x,y:t.y}:{x:t.coords[0],y:t.coords[1]};const i=(0,c.GH)(n);this.linkChartDiagramLookup.set(r,i),this.linkChartGeohashLookup.set(r,(0,u.fC)(n.x,n.y,_t)),this.linkChartExtent.xmin>n.x&&(this.linkChartExtent.xmin=n.x),this.linkChartExtent.xmax<n.x&&(this.linkChartExtent.xmax=n.x),this.linkChartExtent.ymin>n.y&&(this.linkChartExtent.ymin=n.y),this.linkChartExtent.ymax<n.y&&(this.linkChartExtent.ymax=n.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.linkChartDiagramLookup.get(e.attributes[ft]),n=this.linkChartDiagramLookup.get(e.attributes[mt]);if(t&&n){const r=(0,c.GH)(new K.Z({paths:[[t.coords[0],t.coords[1]],[n.coords[0],n.coords[1]]]}));this.linkChartDiagramLookup.set(e.attributes[yt],r)}else this.linkChartDiagramLookup.set(e.attributes[yt],null);this.linkChartGeohashLookup.set(e.attributes[yt],"")}))}))):await this.calculateLinkChartLayout(this.defaultLinkChartConfig.layoutMode,{xScaleFactor:this.defaultLinkChartConfig.xScaleFactor,yScaleFactor:this.defaultLinkChartConfig.yScaleFactor,lockedNodeLocations:this.getCurrentNodeLocations()}):await this.calculateLinkChartLayout("RADIAL_TREE",{lockedNodeLocations:this.getCurrentNodeLocations()})}};(0,r._)([(0,l.Cb)()],en.prototype,"dataPreloadedInLocalCache",void 0),(0,r._)([(0,l.Cb)()],en.prototype,"defaultLinkChartConfig",void 0),(0,r._)([(0,l.Cb)()],en.prototype,"dataManager",void 0),(0,r._)([(0,l.Cb)()],en.prototype,"knowledgeGraph",void 0),(0,r._)([(0,l.Cb)()],en.prototype,"layers",void 0),(0,r._)([(0,l.Cb)()],en.prototype,"linkChartDiagramLookup",void 0),(0,r._)([(0,l.Cb)()],en.prototype,"linkChartExtent",void 0),(0,r._)([(0,l.Cb)()],en.prototype,"linkChartGeohashLookup",void 0),(0,r._)([(0,l.Cb)()],en.prototype,"memberEntityTypes",void 0),(0,r._)([(0,l.Cb)()],en.prototype,"memberRelationshipTypes",void 0),(0,r._)([(0,l.Cb)()],en.prototype,"sublayerIdsCache",void 0),(0,r._)([(0,l.Cb)()],en.prototype,"tables",void 0),(0,r._)([(0,l.Cb)({json:{read:!1}})],en.prototype,"type",void 0),en=(0,r._)([(0,d.j)("esri.layers.LinkChartLayer")],en);const tn=en},37549:(e,t,n)=>{n.d(t,{H:()=>a});var r=n(80442),i=n(24133),o=n(24470);const s={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 i.Q(9,(0,r.Z)("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,r)=>{e[t++]=r})),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,o.cS)();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){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,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()))}}},57191:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(20102),i=n(32448),o=n(92604),s=n(60437),a=n(24470),l=n(98732),p=n(37549),d=n(29730),u=n(70272),h=n(5428);const c={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new u.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,d.Y)(new h.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)};var y=n(11490);const f=(0,s.Ue)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new p.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new i.Z,this.featureAdapter=c}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,r,i]=this.fullBounds;return{xmin:t,ymin:n,xmax:r,ymax:i,spatialReference:(0,y.S2)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}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,s.JR)(f,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))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,n)=>{this._markedIds.has(n)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const n=this._featuresById.get(t);let i;if(this._markedIds.add(t),n?(e.displayId=n.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),null==e.geometry||!e.geometry.coords||!e.geometry.coords.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,l.$)(null!=i?i:(0,a.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},25278:(e,t,n)=>{n.d(t,{Dm:()=>d,Hq:()=>u,MS:()=>h,bU:()=>a});var r=n(80442),i=n(22974),o=n(61159),s=n(58333);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.I4:"esriGeometryPolyline"===e?s.ET:s.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function d(e,t){if((0,r.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this.${t} = null;`;for(const t in e)n+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const r=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new r}catch(n){return()=>({[t]:null,...e})}}function u(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.d9)(e)}}]}function h(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:o.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},21506:(e,t,n)=>{n.d(t,{qG:()=>b,PV:()=>f,id:()=>C,iR:()=>h,rn:()=>y,rT:()=>I,u1:()=>T,rO:()=>E,Oh:()=>_,bT:()=>w,C_:()=>u,Lx:()=>m,vg:()=>x,YI:()=>d,HQ:()=>c});var r=n(92835),i=n(6570),o=n(82971),s=n(25929),a=(n(67676),n(95330),n(35463)),l=n(86787),p=n(65242);const d={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:!0}},u={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,writer(e,t,n){t[n]=!e}}}},h={type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",write:!0}},c={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:s.w}}},y={type:Boolean,value:!0,nonNullable:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:!0}},f={value:null,type:l.Z,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:!0}};function m(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const g={write:!0,read:!0},_={type:Number,json:{origins:{"web-document":g,"portal-item":{write:!0}}}},w={..._,json:{..._.json,origins:{"web-document":{...g,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,t,n)=>n&&"service"!==n.origin||!t.drawingInfo||void 0===t.drawingInfo.transparency?t.layerDefinition&&t.layerDefinition.drawingInfo&&void 0!==t.layerDefinition.drawingInfo.transparency?(0,p.b)(t.layerDefinition.drawingInfo.transparency):void 0:(0,p.b)(t.drawingInfo.transparency)}}},b={type:r.Z,readOnly:!0,get(){if(!this.layer?.timeInfo)return null;const{datesInUnknownTimezone:e,timeOffset:t,useViewTime:n}=this.layer,i=this.view?.timeExtent;let o=this.layer.timeExtent;e&&(o=function(e){if(!e)return e;const{start:t,end:n}=e;return new r.Z({start:null!=t?(0,a.Nm)(t,t.getTimezoneOffset(),"minutes"):t,end:null!=n?(0,a.Nm)(n,n.getTimezoneOffset(),"minutes"):n})}(o));let s=n?i&&o?i.intersection(o):i||o:o;if(!s||s.isEmpty||s.isAllTime)return s;t&&(s=s.offset(-t.value,t.unit)),e&&(s=function(e){if(!e)return e;const{start:t,end:n}=e;return new r.Z({start:null!=t?(0,a.Nm)(t,-t.getTimezoneOffset(),"minutes"):t,end:null!=n?(0,a.Nm)(n,-n.getTimezoneOffset(),"minutes"):n})}(s));const l=this._get("timeExtent");return s.equals(l)?l:s}},x={type:i.Z,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,t)=>{const n=i.Z.fromJSON(e);return null!=t.spatialReference&&"object"==typeof t.spatialReference&&(n.spatialReference=o.Z.fromJSON(t.spatialReference)),n}}}},read:!1}},C={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},E={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.minScale"},write:{target:"layerDefinition.minScale"}}},T={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.maxScale"},write:{target:"layerDefinition.maxScale"}}},I={json:{write:{ignoreOrigin:!0},origins:{"web-map":{read:!1,write:!1}}}}},99282:(e,t,n)=>{n.d(t,{a:()=>o});var r=n(67900),i=n(68441);const o={unknown:1,inches:(0,r.En)(1,"meters","inches"),feet:(0,r.En)(1,"meters","feet"),"us-feet":(0,r.En)(1,"meters","us-feet"),yards:(0,r.En)(1,"meters","yards"),miles:(0,r.En)(1,"meters","miles"),"nautical-miles":(0,r.En)(1,"meters","nautical-miles"),millimeters:(0,r.En)(1,"meters","millimeters"),centimeters:(0,r.En)(1,"meters","centimeters"),decimeters:(0,r.En)(1,"meters","decimeters"),meters:(0,r.En)(1,"meters","meters"),kilometers:(0,r.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,r.ty)(1,"meters",i.sv.radius)}},74889:(e,t,n)=>{n.d(t,{Z:()=>w});var r,i=n(43697),o=n(66577),s=n(38171),a=n(35454),l=n(96674),p=n(22974),d=n(5600),u=(n(75215),n(71715)),h=n(52011),c=n(30556),y=n(82971),f=n(33955),m=n(1231);const g=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=r=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const n=y.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const i=e[t],o=s.Z.fromJSON(i),a=i.geometry&&i.geometry.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=n);const l=i.aggregateGeometries,p=o.aggregateGeometries;if(l&&null!=p)for(const e in p){const t=p[e],r=l[e],i=r?.spatialReference;null==t||i||(t.spatialReference=n)}r.push(o)}return r}writeGeometryType(e,t,n,r){if(e)return void g.write(e,t,n,r);const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,n,r)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,r=(0,f.im)(e);return r&&!n&&t.spatialReference&&(r.spatialReference=y.Z.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,p.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let n=0;n<t.features.length;n++){const r=t.features[n];if(r.geometry){const t=e&&e[n];r.geometry=t&&t.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,n],translate:[r,i]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((i-e)/n)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[r,i],scale:[o,s]}=n;let a=null,l=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;a=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;l=n=>null==n?n:n*t+e}const p=this._getHydrationFunction(e,(e=>e*o+r),(e=>i-e*s),a,l);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}_quantizePoints(e,t,n){let r,i;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=n(a[1]);e===r&&s===i||(o.push([e-r,s-i]),r=e,i=s)}else r=t(a[0]),i=n(a[1]),o.push([r,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,f.oU)(e)?e.rings:e.paths,i=[];for(let e=0,o=r.length;e<o;e++){const o=r[e],s=this._quantizePoints(o,t,n);s&&i.push(s)}return i.length>0?((0,f.oU)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,n);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,r,i){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,f.oU)(e)?e.rings:e.paths;let s,a;for(let e=0,r=o.length;e<r;e++){const r=o[e];for(let e=0,i=r.length;e<i;e++){const i=r[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=n(a)}}if(r&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2]),n[3]=i(n[3])}}else if(r)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=i(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,a;for(let e=0,r=o.length;e<r;e++){const r=o[e];e>0?(s+=r[0],a+=r[1]):(s=r[0],a=r[1]),r[0]=t(s),r[1]=n(a)}if(r&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=r(t[2]),t[3]=i(t[3])}else if(r)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=r(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,d.Cb)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,d.Cb)({type:[s.Z],json:{write:!0}})],_.prototype,"features",void 0),(0,i._)([(0,u.r)("features")],_.prototype,"readFeatures",null),(0,i._)([(0,d.Cb)({type:[m.Z],json:{write:!0}})],_.prototype,"fields",void 0),(0,i._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,i._)([(0,c.c)("geometryType")],_.prototype,"writeGeometryType",null),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,i._)([(0,d.Cb)({types:o.qM,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,i._)([(0,u.r)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,i._)([(0,d.Cb)({type:y.Z,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,i._)([(0,c.c)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,i._)([(0,d.Cb)({json:{write:!0}})],_.prototype,"transform",void 0),_=r=(0,i._)([(0,h.j)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const w=_},11282:(e,t,n)=>{n.d(t,{cv:()=>a,en:()=>s,lA:()=>o}),n(68773),n(40330);var r=n(22974),i=n(81271);function o(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function s(e){return"string"==typeof e?(0,i.mN)(e):(0,r.d9)(e)}function a(e,t,n){const r={};for(const i in e){if("declaredClass"===i)continue;const o=e[i];if(null!=o&&"function"!=typeof o)if(Array.isArray(o)){r[i]=[];for(let e=0;e<o.length;e++)r[i][e]=a(o[e])}else if("object"==typeof o)if(o.toJSON){const e=o.toJSON(n&&n[i]);r[i]=t?e:JSON.stringify(e)}else r[i]=t?o:JSON.stringify(o);else r[i]=o}return r}n(71058)},86787:(e,t,n)=>{n.d(t,{Z:()=>b});var r,i=n(43697),o=n(35454),s=n(96674),a=n(70586),l=n(5600),p=(n(75215),n(67676),n(80442),n(71715)),d=n(52011),u=n(30556),h=n(35671);let c=r=class extends s.wq{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,h.io)(e,t,this.expression)}clone(){return new r({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],c.prototype,"expression",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],c.prototype,"title",void 0),c=r=(0,i._)([(0,d.j)("esri.layers.support.FeatureExpressionInfo")],c);const y=c;var f,m=n(12541);const g=(0,o.w)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),_=new o.X({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let w=f=class extends s.wq{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,n,r){t[n]=e.write({},r),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new f({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a._W)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,i._)([(0,l.Cb)({type:y,json:{write:!0}})],w.prototype,"featureExpressionInfo",void 0),(0,i._)([(0,p.r)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],w.prototype,"readFeatureExpressionInfo",null),(0,i._)([(0,u.c)("featureExpressionInfo",{featureExpressionInfo:{type:y},"featureExpression.value":{type:[0]}})],w.prototype,"writeFeatureExpressionInfo",null),(0,i._)([(0,l.Cb)({type:g.apiValues,nonNullable:!0,json:{type:g.jsonValues,read:g.read,write:{writer:g.write,isRequired:!0}}})],w.prototype,"mode",null),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0}})],w.prototype,"offset",void 0),(0,i._)([(0,l.Cb)({type:m.f9,json:{type:String,read:_.read,write:_.write}})],w.prototype,"unit",null),w=f=(0,i._)([(0,d.j)("esri.layers.support.ElevationInfo")],w);const b=w},58333:(e,t,n)=>{n.d(t,{ET:()=>o,I4:()=>i,eG:()=>l,lF:()=>s,lj:()=>d,qP:()=>a,wW:()=>p});const r=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r},s={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},d={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},12541:(e,t,n)=>{n.d(t,{Z7:()=>i,f9:()=>o});var r=n(99282);function i(e){return 1/(r.a[e]||1)}const o=function(){const e=Object.keys(r.a);return e.sort(),e}()},65242:(e,t,n)=>{n.d(t,{a:()=>i,b:()=>o});var r=n(75215);function i(e){const t=(0,r.vU)(100*(1-e));return Math.max(0,Math.min(t,100))}function o(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2756],{57435:(e,t,r)=>{r.d(t,{Z:()=>u});var s=r(43697),i=r(46791),o=(r(20102),r(92604),r(26258),r(87538)),l=r(5600),n=r(52011);let a=class extends i.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.own((0,o.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new i.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(r(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,l.Cb)()],a.prototype,"getCollections",void 0),(0,s._)([(0,l.Cb)()],a.prototype,"getChildrenFunction",void 0),(0,s._)([(0,l.Cb)()],a.prototype,"itemFilterFunction",void 0),a=(0,s._)([(0,n.j)("esri.core.CollectionFlattener")],a);const u=a},42756:(e,t,r)=>{r.r(t),r.d(t,{default:()=>A});var s=r(43697),i=(r(66577),r(46791)),o=r(57435),l=r(16453),n=r(95330),a=r(17445),u=r(81271),p=r(5600),h=r(75215),y=(r(67676),r(80442),r(71715)),f=r(52011),c=r(30556),d=r(82971),m=r(87085),g=r(71612),b=r(38009),v=r(16859),_=r(34760),w=r(72965),C=r(21506),I=r(32448),S=r(96674),P=r(83379),x=r(19153),F=r(68773),E=r(40330),Z=(r(51773),r(3172)),k=r(22974),G=r(60437),R=r(20322);r(91423),r(74889);const T={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function O(e){const t=e.folders||[],r=t.slice(),s=new Map,i=new Map,o=new Map,l=new Map,n=new Map,a={esriGeometryPoint:i,esriGeometryPolyline:o,esriGeometryPolygon:l};(e.featureCollection&&e.featureCollection.layers||[]).forEach((e=>{const t=(0,k.d9)(e);t.featureSet.features=[];const r=e.featureSet.geometryType;s.set(r,t);const n=e.layerDefinition.objectIdField;"esriGeometryPoint"===r?j(i,n,e.featureSet.features):"esriGeometryPolyline"===r?j(o,n,e.featureSet.features):"esriGeometryPolygon"===r&&j(l,n,e.featureSet.features)})),e.groundOverlays&&e.groundOverlays.forEach((e=>{n.set(e.id,e)})),t.forEach((t=>{t.networkLinkIds.forEach((s=>{const i=function(e,t,r){const s=function(e,t){let r;return t.some((t=>t.id===e&&(r=t,!0))),r}(e,r);return s&&(s.parentFolderId=t,s.networkLink=s),s}(s,t.id,e.networkLinks);i&&r.push(i)}))})),r.forEach((e=>{if(e.featureInfos){e.points=(0,k.d9)(s.get("esriGeometryPoint")),e.polylines=(0,k.d9)(s.get("esriGeometryPolyline")),e.polygons=(0,k.d9)(s.get("esriGeometryPolygon")),e.mapImages=[];for(const t of e.featureInfos)switch(t.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const r=a[t.type].get(t.id);r&&e[T[t.type]]?.featureSet.features.push(r);break}case"GroundOverlay":{const r=n.get(t.id);r&&e.mapImages.push(r);break}}e.fullExtent=N([e])}}));const u=N(r);return{folders:t,sublayers:r,extent:u}}function M(e,t,r,s){const i=E.id&&E.id.findCredential(e);e=(0,u.fl)(e,{token:i&&i.token});const o=F.default.kmlServiceUrl;return(0,Z.default)(o,{query:{url:e,model:"simple",folders:"",refresh:0!==r||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:s})}function L(e,t,r=null,s=[]){const i=[],o={},l=t.sublayers,n=t.folders.map((e=>e.id));return l.forEach((t=>{const l=new e;if(r?l.read(t,r):l.read(t),s.length&&n.includes(l.id)&&(l.visible=s.includes(l.id)),o[t.id]=l,null!=t.parentFolderId&&-1!==t.parentFolderId){const e=o[t.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(l)}else i.unshift(l)})),i}function j(e,t,r){r.forEach((r=>{e.set(r.attributes[t],r)}))}function N(e){const t=(0,G.Ue)(G.Gv),r=(0,G.Ue)(G.Gv);for(const s of e){if(s.polygons&&s.polygons.featureSet&&s.polygons.featureSet.features)for(const e of s.polygons.featureSet.features)(0,R.Yg)(t,e.geometry),(0,G.TC)(r,t);if(s.polylines&&s.polylines.featureSet&&s.polylines.featureSet.features)for(const e of s.polylines.featureSet.features)(0,R.Yg)(t,e.geometry),(0,G.TC)(r,t);if(s.points&&s.points.featureSet&&s.points.featureSet.features)for(const e of s.points.featureSet.features)(0,R.Yg)(t,e.geometry),(0,G.TC)(r,t);if(s.mapImages)for(const e of s.mapImages)(0,R.Yg)(t,e.extent),(0,G.TC)(r,t)}return(0,G.fS)(r,G.Gv)?void 0:{xmin:r[0],ymin:r[1],zmin:r[2],xmax:r[3],ymax:r[4],zmax:r[5],spatialReference:d.Z.WGS84}}var U,H=r(6570);let z=U=class extends(I.Z.EventedMixin((0,S.eC)(P.Z))){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.id=null,this.networkLink=null,this.parent=null,this.sublayers=null,this.title=null,this.sourceJSON=null,this.layer=null,this.addHandles([(0,a.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),a.Z_),(0,a.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),a.Z_),(0,a.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),a.Z_),(0,a.YP)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),a.Z_)])}initialize(){(0,a.N1)((()=>this.networkLink)).then((()=>(0,a.N1)((()=>!0===this.visible)))).then((()=>this.load()))}load(e){if(!this.networkLink)return;if(this.networkLink.viewFormat)return;const t=null!=e?e.signal:null,r=this._fetchService(this._get("networkLink")?.href??"",t).then((e=>{const t=N(e.sublayers);this.fullExtent=H.Z.fromJSON(t),this.sourceJSON=e;const r=(0,h.se)(i.Z.ofType(U),L(U,e));this.sublayers?this.sublayers.addMany(r):this.sublayers=r,this.layer?.emit("sublayer-update"),this.layer&&this.layer.notifyChange("visibleSublayers")}));return this.addResolvingPromise(r),Promise.resolve(this)}get visible(){return this._get("visible")}set visible(e){this._get("visible")!==e&&(this._set("visible",e),this.layer&&this.layer.notifyChange("visibleSublayers"))}readVisible(e,t){return!!t.visibility}_fetchService(e,t){return M(e,this.layer.outSpatialReference,this.layer.refreshInterval,t).then((e=>O(e.data)))}};(0,s._)([(0,p.Cb)()],z.prototype,"description",void 0),(0,s._)([(0,p.Cb)({type:H.Z})],z.prototype,"fullExtent",void 0),(0,s._)([(0,p.Cb)()],z.prototype,"id",void 0),(0,s._)([(0,p.Cb)({readOnly:!0,value:null})],z.prototype,"networkLink",void 0),(0,s._)([(0,p.Cb)({json:{write:{allowNull:!0}}})],z.prototype,"parent",void 0),(0,s._)([(0,p.Cb)({type:i.Z.ofType(U),json:{write:{allowNull:!0}}})],z.prototype,"sublayers",void 0),(0,s._)([(0,p.Cb)({value:null,json:{read:{source:"name",reader:e=>(0,x.Cb)(e)}}})],z.prototype,"title",void 0),(0,s._)([(0,p.Cb)({value:!0})],z.prototype,"visible",null),(0,s._)([(0,y.r)("visible",["visibility"])],z.prototype,"readVisible",null),(0,s._)([(0,p.Cb)()],z.prototype,"sourceJSON",void 0),(0,s._)([(0,p.Cb)()],z.prototype,"layer",void 0),z=U=(0,s._)([(0,f.j)("esri.layers.support.KMLSublayer")],z);const q=z,D=["kml","xml"];let J=class extends((0,g.h)((0,_.Q)((0,w.M)((0,b.q)((0,v.I)((0,l.R)(m.Z))))))){constructor(...e){super(...e),this._visibleFolders=[],this.allSublayers=new o.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.outSpatialReference=d.Z.WGS84,this.path=null,this.legendEnabled=!1,this.operationalLayerType="KML",this.sublayers=null,this.type="kml",this.url=null}initialize(){this.addHandles([(0,a.YP)((()=>this.sublayers),((e,t)=>{t&&t.forEach((e=>{e.parent=null,e.layer=null})),e&&e.forEach((e=>{e.parent=this,e.layer=this}))}),a.Z_),this.on("sublayer-update",(()=>this.notifyChange("fullExtent")))])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readSublayersFromItemOrWebMap(e,t){this._visibleFolders=t.visibleFolders}readSublayers(e,t,r){return L(q,t,r,this._visibleFolders)}writeSublayers(e,t){const r=[],s=e.toArray();for(;s.length;){const e=s[0];e.networkLink||(e.visible&&r.push(e.id),e.sublayers&&s.push(...e.sublayers.toArray())),s.shift()}t.visibleFolders=r}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,u.vt)(this.url,D)||"KML":e||""}set title(e){this._set("title",e)}get visibleSublayers(){const e=this.sublayers,t=[],r=e=>{e.visible&&(t.push(e),e.sublayers&&e.sublayers.forEach(r))};return e&&e.forEach(r),t}get fullExtent(){return this._recomputeFullExtent()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["KML"],supportsData:!1},e).catch(n.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}destroy(){super.destroy(),this.allSublayers.destroy()}async _fetchService(e){const t=O((await Promise.resolve().then((()=>this.resourceInfo?{ssl:!1,data:this.resourceInfo}:M(this.url??"",this.outSpatialReference,this.refreshInterval,e)))).data);t&&this.read(t,{origin:"service"})}_recomputeFullExtent(){let e=null;null!=this.extent&&(e=this.extent.clone());const t=r=>{if(r.sublayers)for(const s of r.sublayers.items)t(s),s.visible&&s.fullExtent&&(null!=e?e.union(s.fullExtent):e=s.fullExtent.clone())};return t(this),e}};(0,s._)([(0,p.Cb)({readOnly:!0})],J.prototype,"allSublayers",void 0),(0,s._)([(0,p.Cb)({type:d.Z})],J.prototype,"outSpatialReference",void 0),(0,s._)([(0,p.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],J.prototype,"path",void 0),(0,s._)([(0,p.Cb)({readOnly:!0,json:{read:!1,write:!1}})],J.prototype,"legendEnabled",void 0),(0,s._)([(0,p.Cb)({type:["show","hide","hide-children"]})],J.prototype,"listMode",void 0),(0,s._)([(0,p.Cb)({type:["KML"]})],J.prototype,"operationalLayerType",void 0),(0,s._)([(0,p.Cb)({})],J.prototype,"resourceInfo",void 0),(0,s._)([(0,p.Cb)({type:i.Z.ofType(q),json:{write:{ignoreOrigin:!0}}})],J.prototype,"sublayers",void 0),(0,s._)([(0,y.r)(["web-map","portal-item"],"sublayers",["visibleFolders"])],J.prototype,"readSublayersFromItemOrWebMap",null),(0,s._)([(0,y.r)("service","sublayers",["sublayers"])],J.prototype,"readSublayers",null),(0,s._)([(0,c.c)("sublayers")],J.prototype,"writeSublayers",null),(0,s._)([(0,p.Cb)({readOnly:!0,json:{read:!1}})],J.prototype,"type",void 0),(0,s._)([(0,p.Cb)({json:{origins:{"web-map":{read:{source:"title"}}},write:{ignoreOrigin:!0}}})],J.prototype,"title",null),(0,s._)([(0,p.Cb)(C.HQ)],J.prototype,"url",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],J.prototype,"visibleSublayers",null),(0,s._)([(0,p.Cb)({type:H.Z})],J.prototype,"extent",void 0),(0,s._)([(0,p.Cb)()],J.prototype,"fullExtent",null),J=(0,s._)([(0,f.j)("esri.layers.KMLLayer")],J);const A=J},16859:(e,t,r)=>{r.d(t,{I:()=>C});var s=r(43697),i=r(68773),o=r(40330),l=r(3172),n=r(66643),a=r(20102),u=r(92604),p=r(70586),h=r(95330),y=r(81271),f=r(5600),c=(r(75215),r(67676),r(80442),r(71715)),d=r(52011),m=r(30556),g=r(84230),b=r(48522),v=r(15235),_=r(86082),w=r(14661);const C=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:s}=await r.e(8062).then(r.bind(r,18062));return(0,h.k_)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,h.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,h.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!i.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,h.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=e===r.id;if(s&&r.portal.user)return(0,w.Ss)(r);let i,l;if(s)i=r.portal.url;else try{i=await(0,g.oP)(this.url,t)}catch(e){(0,h.r9)(e)}if(!i||!(0,y.Zo)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(o.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.r9)(e)}if(!l)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(s?await r.reload():(r=new v.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return(0,w.Ss)(r)}catch(e){(0,h.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=b.Z.getDefault();if(i&&i.loaded&&(0,y.Fv)(i.restUrl)===(0,y.Fv)(s))return i.user;const a=`${s}/community/self`,u=null!=e?e.signal:null,p=await(0,n.q6)((0,l.default)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?_.default.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,s=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||b.Z.getDefault());return r&&s&&!(0,y.tm)(s.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s._)([(0,f.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,s._)([(0,c.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,f.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,f.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,f.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,f.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,d.j)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},34760:(e,t,r)=>{r.d(t,{Q:()=>g});var s=r(43697),i=r(92604),o=r(95330),l=r(5600),n=(r(75215),r(67676),r(80442),r(52011)),a=r(46791),u=(r(20102),r(26258),r(87538));const p=new a.Z,h=new WeakMap;function y(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function f(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:f(t,e%t):0}let c=0,d=0;function m(){const e=Date.now();for(const t of p)t.refreshInterval&&e-(h.get(t)??0)+5>=6e4*t.refreshInterval&&(h.set(t,e),t.refresh(e))}(0,u.EH)((()=>{const e=Date.now();let t=0;for(const r of p)t=f(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?h.get(r)||h.set(r,e):h.delete(r);if(t!==d){if(d=t,clearInterval(c),0===d)return void(c=0);c=setInterval(m,d)}}));const g=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,o.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||function(e){y(e)&&p.push(e)}(this)}),(()=>{}))}destroy(){y(this)&&p.includes(this)&&p.remove(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,o.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{i.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,s._)([(0,l.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,s._)([(0,l.Cb)()],t.prototype,"refreshParameters",null),t=(0,s._)([(0,n.j)("esri.layers.mixins.RefreshableLayer")],t),t}},74889:(e,t,r)=>{r.d(t,{Z:()=>v});var s,i=r(43697),o=r(66577),l=r(38171),n=r(35454),a=r(96674),u=r(22974),p=r(5600),h=(r(75215),r(71715)),y=r(52011),f=r(30556),c=r(82971),d=r(33955),m=r(1231);const g=new n.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=s=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=c.Z.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const i=e[t],o=l.Z.fromJSON(i),n=i.geometry&&i.geometry.spatialReference;null==o.geometry||n||(o.geometry.spatialReference=r);const a=i.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],s=a[e],i=s?.spatialReference;null==t||i||(t.spatialReference=r)}s.push(o)}return s}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,d.im)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=c.Z.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e&&e[r];s.geometry=t&&t.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,i]}=e,o=this.features,l=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=o.length;e<t;e++)l?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,i],scale:[o,l]}=r;let n=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;n=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+s),(e=>i-e*l),n,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let s,i;const o=[];for(let l=0,n=e.length;l<n;l++){const n=e[l];if(l>0){const e=t(n[0]),l=r(n[1]);e===s&&l===i||(o.push([e-s,l-i]),s=e,i=l)}else s=t(n[0]),i=r(n[1]),o.push([s,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,d.oU)(e)?e.rings:e.paths,i=[];for(let e=0,o=s.length;e<o;e++){const o=s[e],l=this._quantizePoints(o,t,r);l&&i.push(l)}return i.length>0?((0,d.oU)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,d.oU)(e)?e.rings:e.paths;let l,n;for(let e=0,s=o.length;e<s;e++){const s=o[e];for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(l+=i[0],n+=i[1]):(l=i[0],n=i[1]),i[0]=t(l),i[1]=r(n)}}if(s&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=i(r[3])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let l,n;for(let e=0,s=o.length;e<s;e++){const s=o[e];e>0?(l+=s[0],n+=s[1]):(l=s[0],n=s[1]),s[0]=t(l),s[1]=r(n)}if(s&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2]),t[3]=i(t[3])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,p.Cb)({type:[l.Z],json:{write:!0}})],b.prototype,"features",void 0),(0,i._)([(0,h.r)("features")],b.prototype,"readFeatures",null),(0,i._)([(0,p.Cb)({type:[m.Z],json:{write:!0}})],b.prototype,"fields",void 0),(0,i._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,i._)([(0,f.c)("geometryType")],b.prototype,"writeGeometryType",null),(0,i._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,i._)([(0,p.Cb)({types:o.qM,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,i._)([(0,h.r)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,i._)([(0,p.Cb)({type:c.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,i._)([(0,f.c)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,i._)([(0,p.Cb)({json:{write:!0}})],b.prototype,"transform",void 0),b=s=(0,i._)([(0,y.j)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0;const v=b}}]);
|