@arcgis/core 5.0.0-next.5 → 5.0.0-next.7
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/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/020c8913d8e35d63080b.js +1 -0
- package/assets/esri/core/workers/chunks/{c2b47a7dc961863d283f.js → 02e69f0c63d97661da60.js} +1 -1
- package/assets/esri/core/workers/chunks/087973e7c4fea5fcfa5e.js +1 -0
- package/assets/esri/core/workers/chunks/{929ece362604dc301229.js → 17acde0245ecd956306c.js} +1 -1
- package/assets/esri/core/workers/chunks/{8cea114168d849c38b1b.js → 20278683bddc8c2d8136.js} +1 -1
- package/assets/esri/core/workers/chunks/{dc4982b0ac007bd70213.js → 22d6b8102e75bdef204c.js} +1 -1
- package/assets/esri/core/workers/chunks/{3271614322ba4b44fb5a.js → 279366e6b743f9680603.js} +1 -1
- package/assets/esri/core/workers/chunks/{f7c99e9c8d19352af38d.js → 3ac7562ea90f91a9f30c.js} +1 -1
- package/assets/esri/core/workers/chunks/3f3d492f1093b7832aab.js +1 -0
- package/assets/esri/core/workers/chunks/464d42bebb365287808d.js +1 -0
- package/assets/esri/core/workers/chunks/{d570c75a425aa29672c8.js → 4d599008e1ea42321b37.js} +1 -1
- package/assets/esri/core/workers/chunks/{0686243904381ef863dc.js → 53bd8996e8812f1ad7b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{762fe93015b705546188.js → 5bd36dbf46c25bd961c8.js} +1 -1
- package/assets/esri/core/workers/chunks/{b7a17927e14f502006b4.js → 5ea0c62016d56990787b.js} +1 -1
- package/assets/esri/core/workers/chunks/{2ea6985da4eb0107bb9d.js → 5fc7b61f467f1d60a284.js} +1 -1
- package/assets/esri/core/workers/chunks/{a87521ebe632bf783ef4.js → 62a49cfd9a2508950e9f.js} +1 -1
- package/assets/esri/core/workers/chunks/{ec13053af1999701464a.js → 6826fe54562dcdc054d7.js} +1 -1
- package/assets/esri/core/workers/chunks/{309c5f69ea06f3081d83.js → 73487b9d85e726e9c012.js} +1 -1
- package/assets/esri/core/workers/chunks/7413e582bc2b16af6a0f.js +1 -0
- package/assets/esri/core/workers/chunks/{88d942cd25bef74fd50a.js → 7461124454bfb4fb6474.js} +1 -1
- package/assets/esri/core/workers/chunks/{147ad5fdd02f46b6da24.js → 7544316a75dbd981aea6.js} +1 -1
- package/assets/esri/core/workers/chunks/{0f8847f9ae3068833fa4.js → 75bf27271a31e26e1b21.js} +1 -1
- package/assets/esri/core/workers/chunks/{630efe10c871425b6a95.js → 76ae1702fecc7ad7017c.js} +1 -1
- package/assets/esri/core/workers/chunks/{de1f75c907152df7e788.js → 794748fd1edc29a621cd.js} +1 -1
- package/assets/esri/core/workers/chunks/{e1258b6a404e58878c7a.js → 7aaaebbabee27690283c.js} +1 -1
- package/assets/esri/core/workers/chunks/{6a69dafeb7c9ca8a3d84.js → 7c4a63aeead2505d6f02.js} +1 -1
- package/assets/esri/core/workers/chunks/{d84373a6ec94dcfec8c2.js → 88074189fa10c335370b.js} +1 -1
- package/assets/esri/core/workers/chunks/{a8c4fd779e454e4075c4.js → 8833c3d168951be4bf20.js} +1 -1
- package/assets/esri/core/workers/chunks/{85622fe99f4d08afe875.js → 8a314b3790313e6dc5db.js} +1 -1
- package/assets/esri/core/workers/chunks/{b0b2670596d6d8c32b5e.js → 8c056eac35d05d9524b7.js} +1 -1
- package/assets/esri/core/workers/chunks/{1a713dcc9971e1935401.js → 8f56f298e7c1a283f407.js} +1 -1
- package/assets/esri/core/workers/chunks/{dabc5a38a472c9719df9.js → 8ffd4710d168c2fcfd96.js} +1 -1
- package/assets/esri/core/workers/chunks/{1da74aa308ded5748ef5.js → 90250e9239c173aace88.js} +1 -1
- package/assets/esri/core/workers/chunks/90b2b43b8b54c9a1ec35.js +1 -0
- package/assets/esri/core/workers/chunks/90f8b4bda28af43ea019.js +1 -0
- package/assets/esri/core/workers/chunks/{89027f6800e17fab8973.js → 9486032af3e934d85582.js} +1 -1
- package/assets/esri/core/workers/chunks/95c594a87b732f5c4979.js +1 -0
- package/assets/esri/core/workers/chunks/{239377336a2009caea01.js → 99859dce1925b406ccd0.js} +1 -1
- package/assets/esri/core/workers/chunks/{a137c27ce078bea44f89.js → 9e8dceef4c961f56940d.js} +1 -1
- package/assets/esri/core/workers/chunks/{f5b7e7f2860a825ed373.js → 9fac5a12e878cd745354.js} +1 -1
- package/assets/esri/core/workers/chunks/{f779034623980bf9a37c.js → a06bac9b8f9e18874de8.js} +2 -2
- package/assets/esri/core/workers/chunks/{01642fe19e81bfa33eb5.js → a395373e3173e6458a56.js} +1 -1
- package/assets/esri/core/workers/chunks/a3991ae8caa713d4ddcd.js +1 -0
- package/assets/esri/core/workers/chunks/{a6ac1ff89c40f3a4797a.js → a712cdff78fc826acd8c.js} +1 -1
- package/assets/esri/core/workers/chunks/{af3fc2562bb6d217adf6.js → aa54b6f2aba6952af149.js} +1 -1
- package/assets/esri/core/workers/chunks/ac26e3e77df4302f47a2.js +1 -0
- package/assets/esri/core/workers/chunks/af5fc5d6c1d072a27df1.js +1 -0
- package/assets/esri/core/workers/chunks/{bc3bcf88b252760e2574.js → b3028b1ff75eafd0c358.js} +1 -1
- package/assets/esri/core/workers/chunks/{5875a51b97ee9bd438a0.js → bc241c7735e4efba734a.js} +1 -1
- package/assets/esri/core/workers/chunks/{56916e56c20465428dd4.js → be3b874f86f627f4fa98.js} +1 -1
- package/assets/esri/core/workers/chunks/c4e4da69969499a89a2c.js +1 -0
- package/assets/esri/core/workers/chunks/c8733cd621105afab2ac.js +1 -0
- package/assets/esri/core/workers/chunks/ccc0da0e01f023c8aa1f.js +1 -0
- package/assets/esri/core/workers/chunks/{c0b7e86860838638537f.js → cd1930f08e1fc8b30b14.js} +1 -1
- package/assets/esri/core/workers/chunks/{551c6c89b51b99f4864b.js → d1fe816b6990918c13c7.js} +1 -1
- package/assets/esri/core/workers/chunks/{8605ec4678eb4511c715.js → d305a21666b1ed5bf33d.js} +1 -1
- package/assets/esri/core/workers/chunks/{037b2548bf85e2d7c6ac.js → d40f57f9fc47f9a9f97c.js} +1 -1
- package/assets/esri/core/workers/chunks/{a29d7205394cb8b2a847.js → d97fadbc69e055d183a0.js} +1 -1
- package/assets/esri/core/workers/chunks/dedc4583b5f32a278124.js +1 -0
- package/assets/esri/core/workers/chunks/{e5bcc44f3dc6fc90835a.js → e5a06ce0ef6a9a90e100.js} +1 -1
- package/assets/esri/core/workers/chunks/f0e0a63962784acb4ba1.js +1 -0
- package/assets/esri/core/workers/chunks/f4d0ae6be1b3984228d0.js +1 -0
- package/assets/esri/core/workers/chunks/{7c5c272612198db83851.js → f5e47eea8720ba84665b.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa4411e0a5ac3fcba365.js → f65c0102af17390a50ac.js} +1 -1
- package/assets/esri/core/workers/chunks/f6c11c8ac687de3ef1ab.js +1 -0
- package/assets/esri/core/workers/chunks/{7596d005a4dc3964b140.js → f6c8beb60f6d29945a2e.js} +1 -1
- package/assets/esri/core/workers/chunks/{a2a284d4dd5caaecbc2e.js → f746e3f7ebff2bbdf333.js} +1 -1
- package/assets/esri/core/workers/chunks/f9324e88c359c03f35aa.js +1 -0
- package/assets/esri/core/workers/chunks/{cfa3164e7fa1884dc2b9.js → facb3886714222772ab2.js} +1 -1
- package/assets/esri/core/workers/chunks/{aa6eb55e4fb57c4e8eeb.js → fd2efd1d1cf9d95a87e6.js} +1 -1
- package/assets/esri/core/workers/chunks/{fe3f95fda29e4844b153.js → fe77ae6cf232a7a3298e.js} +1 -1
- package/assets/esri/core/workers/chunks/{2ce4a0fe4fae63c43a81.js → ff35a077ac6776469805.js} +1 -1
- package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +14 -4
- 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/config.js +1 -1
- package/core/Identifiable.js +1 -1
- package/core/MultiOriginJSONSupport.js +1 -1
- package/core/NumericIdentifiable.js +5 -0
- package/core/WriteableMultiOriginJSONMixin.js +5 -0
- package/core/performance.js +5 -0
- package/core/scheduling.js +1 -1
- package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +1 -1
- package/interfaces.d.ts +18 -2
- package/kernel.js +1 -1
- package/layers/support/MediaElementBase.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/package.json +3 -3
- package/support/basemapDefinitions.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
- package/undoredo/support/Services.js +1 -1
- package/views/2d/constraints/GeometryConstraint.js +1 -1
- package/views/2d/constraints/RotationConstraint.js +1 -1
- package/views/2d/constraints/ZoomConstraint.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
- package/views/3d/layers/support/lyr3dTypeConversions.js +1 -1
- package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
- package/views/3d/support/flow/StreamlineResources3DOverlay.js +1 -1
- package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
- package/views/analysis/ElevationProfile/constants.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/widgets/Attachments/AttachmentsViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/Search/LayerSearchSource.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/assets/esri/core/workers/chunks/0366b78b0ccf4ed5f6ac.js +0 -1
- package/assets/esri/core/workers/chunks/0429c1a3690f20647c9f.js +0 -1
- package/assets/esri/core/workers/chunks/0f100e163e1847e04155.js +0 -1
- package/assets/esri/core/workers/chunks/1eedac33c9fcd7681427.js +0 -1
- package/assets/esri/core/workers/chunks/2f03d33f4ca8a48461fc.js +0 -1
- package/assets/esri/core/workers/chunks/50864c1924030e62497d.js +0 -1
- package/assets/esri/core/workers/chunks/655360995c1cbc78a5a3.js +0 -1
- package/assets/esri/core/workers/chunks/71762199aef5d3107da2.js +0 -1
- package/assets/esri/core/workers/chunks/72c851c400752094b162.js +0 -1
- package/assets/esri/core/workers/chunks/7558919912f7fdc4837b.js +0 -1
- package/assets/esri/core/workers/chunks/829bc5dbda2f51561446.js +0 -1
- package/assets/esri/core/workers/chunks/98311fec6c16a1b23586.js +0 -1
- package/assets/esri/core/workers/chunks/a61cb4f1ca282bf8b75d.js +0 -1
- package/assets/esri/core/workers/chunks/bc6619307f312f9241bf.js +0 -1
- package/assets/esri/core/workers/chunks/bfc1e8aec7aace3ff30e.js +0 -1
- package/assets/esri/core/workers/chunks/c134ebbaeac514cbd657.js +0 -1
- package/assets/esri/core/workers/chunks/c368a8e8d2f1535af446.js +0 -1
- package/assets/esri/core/workers/chunks/d886fb97bdb348a16f25.js +0 -1
- package/assets/esri/core/workers/chunks/e6a86cad44056735ed26.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[624,7136],{5076:(e,t,r)=>{r.d(t,{i:()=>i});var s=r(65864),n=r(21325);function i(e,t,r){const{geometry:i}=e,o=e.compactGeometryEnabled??!1,a=e.toJSON();delete a.compactGeometryEnabled,delete a.defaultSpatialReferenceEnabled;const c=a;let u,l,h;if(i&&(l=i.spatialReference,h=(0,n.YX)(l),c.geometryType=(0,s.$B)(i),c.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const r=e.toJSON();return delete r.spatialReference,JSON.stringify(r)}(i,o),c.inSR=h),a.groupByFieldsForStatistics&&(c.groupByFieldsForStatistics=a.groupByFieldsForStatistics.join(",")),a.objectIds)switch(r?.uniqueIdFields?.length){case void 0:c.objectIds=a.objectIds.join(",");break;case 1:c.uniqueIds=JSON.stringify(a.objectIds),delete c.objectIds;break;default:c.uniqueIds=JSON.stringify(a.objectIds.map(e=>JSON.parse(e))),delete c.objectIds}if(a.orderByFields&&(c.orderByFields=a.orderByFields.join(",")),!a.outFields||!a.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete c.outFields:a.outFields.includes("*")?c.outFields="*":c.outFields=a.outFields.join(","),a.outSR?(c.outSR=(0,n.YX)(a.outSR),u=e.outSpatialReference):i&&(a.returnGeometry||a.returnCentroid)&&(c.outSR=c.inSR,u=l),a.returnGeometry&&delete a.returnGeometry,a.outStatistics&&(c.outStatistics=JSON.stringify(a.outStatistics)),a.fullText&&(c.fullText=JSON.stringify(a.fullText)),a.pixelSize&&(c.pixelSize=JSON.stringify(a.pixelSize)),a.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=l&&null!=e.quantizationParameters?.extent&&l.equals(e.quantizationParameters.extent.spatialReference)&&delete a.quantizationParameters.extent.spatialReference,c.quantizationParameters=JSON.stringify(a.quantizationParameters)),a.parameterValues&&(c.parameterValues=JSON.stringify(a.parameterValues)),a.rangeValues&&(c.rangeValues=JSON.stringify(a.rangeValues)),a.dynamicDataSource&&(c.layer=JSON.stringify({source:a.dynamicDataSource}),delete a.dynamicDataSource),a.timeExtent){const e=a.timeExtent,{start:t,end:r}=e;null==t&&null==r||(c.time=t===r?t:`${t??"null"},${r??"null"}`),delete a.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=l&&null!=u&&l.equals(u)&&(c.defaultSR=c.inSR,delete c.inSR,delete c.outSR),c}},10536:(e,t,r)=>{function s(e){const t={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){t[r]=[];for(let e=0;e<n.length;e++)t[r][e]=s(n[e])}else"object"==typeof n?n.toJSON&&(t[r]=JSON.stringify(n)):t[r]=n}return t}r.d(t,{z:()=>s})},17136:(e,t,r)=>{r.d(t,{Y_:()=>x,O7:()=>T,el:()=>F});var s=r(92602),n=r(69052),i=r(49186),o=r(53966),a=r(39829),c=r(82799),u=r(16930),l=r(80754),h=r(21325),d=r(28735),f=r(78888),g=r(65864),p=r(2272),y=r(84952),m=r(92300);const _=()=>o.A.getLogger("esri.geometry.support.normalizeUtils");function b(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function k(e,t,r){if(t){const t=function(e,t){if(!(e instanceof c.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw _().error(e),new i.A("internal:geometry",e)}const r=(0,l.r8)(e),s=[];for(const e of r){const r=[];s.push(r),r.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const n=e[s][0],i=e[s][1],o=e[s+1][0],a=e[s+1][1],c=Math.sqrt((o-n)*(o-n)+(a-i)*(a-i)),u=(a-i)/c,l=(o-n)/c,h=c/t;if(h>1){for(let e=1;e<=h-1;e++){const s=e*t,o=l*s+n,a=u*s+i;r.push([o,a])}const e=(c+Math.floor(h-1)*t)/2,s=l*e+n,o=u*e+i;r.push([s,o])}r.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:s,spatialReference:e.spatialReference}):new c.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.ci)(t,!0)}return r&&(e=(0,l.kS)(e,r)),e}function S(e,t,r){if(Array.isArray(e)){const s=e[0];if(s>t){const r=(0,l.kd)(s,t);e[0]=s+r*(-2*t)}else if(s<r){const t=(0,l.kd)(s,r);e[0]=s+t*(-2*r)}}else{const s=e.x;if(s>t){const r=(0,l.kd)(s,t);e=e.clone().offset(r*(-2*t),0)}else if(s<r){const t=(0,l.kd)(s,r);e=e.clone().offset(t*(-2*r),0)}}return e}function I(e,t){let r=-1;for(let s=0;s<t.cutIndexes.length;s++){const n=t.cutIndexes[s],i=t.geometries[s],o=(0,l.r8)(i);for(let e=0;e<o.length;e++){const t=o[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const s=t[e][0];r=s>r?s:r}r=Number(r.toFixed(9));const s=-360*(0,l.kd)(r,180);for(let r=0;r<t.length;r++){const t=i.getPoint(e,r);i.setPoint(e,r,t.clone().offset(s,0))}return!0}})}if(n===r){if(b(e))for(const t of(0,l.r8)(i))e[n]=e[n].addRing(t);else if(w(e))for(const t of(0,l.r8)(i))e[n]=e[n].addPath(t)}else r=n,e[n]=i}return e}async function F(e,t,r){if(!Array.isArray(e))return F([e],t);t&&"string"!=typeof t&&_().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let i,o,u,b,w,T,A,x,q=0;const N=[],R=[];for(const t of e)if(null!=t)if(i||(i=t.spatialReference,o=(0,h.Vp)(i),u=i.isWebMercator,T=u?102100:4326,b=l.j7[T].maxX,w=l.j7[T].minX,A=l.j7[T].plus180Line,x=l.j7[T].minus180Line),o)if("mesh"===t.type)R.push(t);else if("point"===t.type)R.push(S(t.clone(),b,w));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>S(e,b,w)),R.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,o);R.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,r=(0,l.kd)(e.xmin,w)*(2*b);let s=0===r?t.clone():(0,l.kS)(t.clone(),r);e.offset(r,0);let{xmin:n,xmax:i}=e;n=Number(n.toFixed(9)),i=Number(i.toFixed(9)),e.intersects(A)&&i!==b?(q=i>q?i:q,s=k(s,u),N.push(s),R.push("cut")):e.intersects(x)&&n!==w?(q=i*(2*b)>q?i*(2*b):q,s=k(s,u,360),N.push(s),R.push("cut")):R.push(s)}else R.push(t.clone());else R.push(t);else R.push(t);let M=(0,l.kd)(q,b),v=-90;const O=M,E=new c.A;for(;M>0;){const e=360*M-180;E.addPath([[e,v],[e,-1*v]]),v*=-1,M--}if(N.length>0&&O>0){const t=I(N,await async function(e,t,r,s){const n=(0,p.Dl)(e),i=t[0].spatialReference,o={...s,responseType:"json",query:{...n.query,f:"json",sr:(0,h.YX)(i),target:JSON.stringify({geometryType:(0,g.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,f.A)(n.path+"/cut",o),{cutIndexes:c,geometries:u=[]}=a.data;return{cutIndexes:c,geometries:u.map(e=>{const t=(0,g.rS)(e);return t.spatialReference=i,t})}}(n,N,E,r)),s=[],i=[];for(let r=0;r<R.length;r++){const n=R[r];if("cut"!==n)i.push(n);else{const n=t.shift(),o=e[r];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(s.push(n),i.push("simplify")):i.push(u?(0,d.Gh)(n):n)}}if(!s.length)return i;const o=await async function(e,t,r){const s="string"==typeof e?(0,y.An)(e):e,n=t[0].spatialReference,i=(0,g.$B)(t[0]),o={...r,query:{...s.query,f:"json",sr:(0,h.YX)(n),geometries:JSON.stringify((0,m.X)(t))}},{data:a}=await(0,f.A)(s.path+"/simplify",o);return(0,m.V)(a.geometries,i,n)}(n,s,r),a=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?a.push(t):a.push(u?(0,d.Gh)(o.shift()):o.shift())}return a}const P=[];for(let e=0;e<R.length;e++){const t=R[e];if("cut"!==t)P.push(t);else{const e=N.shift();P.push(!0===u?(0,d.Gh)(e):e)}}return P}function T(e,t,r){const s=(0,h.Vp)(r);if(null==s)return e;const[n,i]=s.valid,o=2*i;let a=0,c=0;t>i?a=Math.ceil(Math.abs(t-i)/o):t<n&&(a=-Math.ceil(Math.abs(t-n)/o)),e>i?c=Math.ceil(Math.abs(e-i)/o):e<n&&(c=-Math.ceil(Math.abs(e-n)/o));let u=e+(a-c)*o;const l=u-t;return l>i?u-=o:l<n&&(u+=o),u}function A(e){const t=(0,h.Vp)(e);if(null==t)return null;const[r,s]=t.valid;return new n.hr(r,s)}const x=A(u.A.WGS84);A(u.A.WebMercator)},27647:(e,t,r)=>{r.d(t,{Q:()=>i});var s=r(92722);function n(e,t){return e?t?4:3:t?3:2}function i(e){if(null==e)return null;if(!e?.lengths.length)return null;const{lengths:t,coords:r,stride:n,hasZ:i,hasM:c}=e,u=new s.A([],[],i,!1),l=u.coords,h=[],d=i?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];let f=0;for(const e of t){const t=o(d,r,f,e,i,c);t&&h.push(t),f+=e*n}if(h.sort((e,t)=>{let r=e[2]-t[2];return 0===r&&i&&(r=e[4]-t[4]),r}),h.length){let e=6*h[0][2];l[0]=h[0][0]/e,l[1]=h[0][1]/e,i&&(e=6*h[0][4],l[2]=0!==e?h[0][3]/e:0),(l[0]<d[0]||l[0]>d[1]||l[1]<d[2]||l[1]>d[3]||i&&(l[2]<d[4]||l[2]>d[5]))&&(l.length=0)}if(!l.length){const s=e.lengths[0]?a(r,0,t[0],i,c):null;if(!s)return null;l[0]=s[0],l[1]=s[1],i&&(l[2]=s[2]??0)}return u}function o(e,t,r,s,i,o){const a=n(i,o);let c=r,u=r+a,l=0,h=0,d=0,f=0,g=0;for(let r=0,n=s-1;r<n;r++,c+=a,u+=a){const r=t[c],s=t[c+1],n=t[c+2],o=t[u],a=t[u+1],p=t[u+2];let y=r*a-o*s;f+=y,l+=(r+o)*y,h+=(s+a)*y,i&&(y=r*p-o*n,d+=(n+p)*y,g+=y),r<e[0]&&(e[0]=r),r>e[1]&&(e[1]=r),s<e[2]&&(e[2]=s),s>e[3]&&(e[3]=s),i&&(n<e[4]&&(e[4]=n),n>e[5]&&(e[5]=n))}if(f>0&&(f*=-1),g>0&&(g*=-1),!f)return null;const p=[l,h,.5*f];return i&&(p[3]=d,p[4]=.5*g),p}function a(e,t,r,s,i){const o=n(s,i);let a=t,d=t+o,f=0,g=0,p=0,y=0;for(let t=0,n=r-1;t<n;t++,a+=o,d+=o){const t=e[a],r=e[a+1],n=e[a+2],i=e[d],o=e[d+1],m=e[d+2],_=s?u(t,r,n,i,o,m):c(t,r,i,o);if(_)if(f+=_,s){const e=h(t,r,n,i,o,m);g+=_*e[0],p+=_*e[1],y+=_*e[2]}else{const e=l(t,r,i,o);g+=_*e[0],p+=_*e[1]}}return f>0?s?[g/f,p/f,y/f]:[g/f,p/f]:r>0?s?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function c(e,t,r,s){const n=r-e,i=s-t;return Math.sqrt(n*n+i*i)}function u(e,t,r,s,n,i){const o=s-e,a=n-t,c=i-r;return Math.sqrt(o*o+a*a+c*c)}function l(e,t,r,s){return[e+.5*(r-e),t+.5*(s-t)]}function h(e,t,r,s,n,i){return[e+.5*(s-e),t+.5*(n-t),r+.5*(i-r)]}},30624:(e,t,r)=>{r.r(t),r.d(t,{createConnection:()=>I});var s=r(31635),n=r(78888),i=r(49186),o=r(53966),a=r(74887),c=r(84952),u=(r(44208),r(87811),r(64108)),l=r(16930),h=r(65864),d=r(10107),f=r(62815),g=r(65529);let p=class extends g.nJ{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new i.A("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,s.Cg)([(0,d.MZ)({readOnly:!0})],p.prototype,"connectionError",null),p=(0,s.Cg)([(0,u.$)("esri.layers.support.StreamConnection")],p);let y=class extends p{constructor(e){super({}),this._outstandingMessages=[],this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:s}=e;this._config=e,this._featureZScaler=(0,f.N)(t,s,r),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case 0:case 1:return"connected";case 2:case 3:return"disconnected"}}sendMessageToSocket(e){null!=this._websocket?this._websocket.send(JSON.stringify(e)):this._outstandingMessages.push(e)}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.source.path,t=1e3,r=0){try{if(this.destroyed)return;const t=(0,c.a6)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(s){const n=t/1e3;return this._config.maxReconnectionAttempts&&r>=this._config.maxReconnectionAttempts?(o.A.getLogger(this).error(new i.A("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(o.A.getLogger(this).error(new i.A("websocket-connection",`Failed to connect. Attempting to reconnect in ${n}s`,s)),await(0,a.Pl)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),r+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{const t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void o.A.getLogger(this).error(new i.A("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise((t,r)=>{const s=new WebSocket(e);s.onopen=()=>{if(s.onopen=null,this.destroyed)return s.onclose=null,void s.close();s.onclose=e=>this._onClose(e),s.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(s),t(s)},s.onclose=e=>{s.onopen=s.onclose=null,r(e)}})}async _handshake(e=1e4){const t=this._websocket;if(null==t)return;const r=(0,a.Tw)(),s=t.onmessage,{filter:n,outFields:c,spatialReference:u}=this._config;return r.timeout(e),t.onmessage=e=>{let a=null;try{a=JSON.parse(e.data)}catch(e){}a&&"object"==typeof a||(o.A.getLogger(this).error(new i.A("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),r.reject(),this.destroy()),a.spatialReference?.wkid!==u?.wkid&&(o.A.getLogger(this).error(new i.A("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${u.wkid}`,e.data)),r.reject(),this.destroy()),"json"!==a.format&&(o.A.getLogger(this).error(new i.A("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),r.reject(),this.destroy()),n&&a.filter!==n&&o.A.getLogger(this).error(new i.A("websocket-connection","Tried to set filter, but server doesn't support it")),c&&a.outFields!==c&&o.A.getLogger(this).error(new i.A("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=s;for(const e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],r.resolve()},t.send(JSON.stringify({filter:n,outFields:c,format:"json",spatialReference:{wkid:u.wkid}})),r.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){const t="Encountered an error over WebSocket connection";this._set("errorString",t),o.A.getLogger(this).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&o.A.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,s.Cg)([(0,d.MZ)()],y.prototype,"connectionStatus",null),(0,s.Cg)([(0,d.MZ)()],y.prototype,"errorString",void 0),y=(0,s.Cg)([(0,u.$)("esri.layers.graphics.sources.connections.WebSocketConnection")],y);var m=r(80893),_=r(61956);const b={maxQueryDepth:5,maxRecordCountFactor:3};let w=class extends y{constructor(e){super({...b,...e}),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){const e=await this._fetchServiceDefinition(this._config.source);e.timeInfo.trackIdField||o.A.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");const t=this._fetchWebSocketUrl(e.streamUrls,this._config.spatialReference);this._buddyServicesQuery||(this._buddyServicesQuery=this._queryBuddyServices()),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);const{filter:r,outFields:s}=this._config;this.destroyed||this._setFilter(r,s)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void o.A.getLogger(this).error(new i.A("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){const t={f:"json",...this._config.customParameters},r=(0,n.A)(e.path,{query:t,responseType:"json"}),s=(await r).data;return this._serviceDefinition=s,s}_fetchWebSocketUrl(e,t){const r=e[0],{urls:s,token:n}=r,i=this._inferWebSocketBaseUrl(s);return(0,c.a6)(`${i}/subscribe`,{outSR:""+t.wkid,token:n})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(const t of e)if(t.includes("wss"))return t;return o.A.getLogger(this).error(new i.A("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){const r=this._websocket;if(null==r||null==e&&null==t)return;const s=JSON.stringify({filter:this._serializeFilter(e,t)});let n=!1;const c=(0,a.Tw)();return r.onmessage=e=>{const t=JSON.parse(e.data);t.filter&&(t.error&&(o.A.getLogger(this).error(new i.A("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),c.reject(t.error)),this._setWebSocketJSONParseHandler(r),n=!0,c.resolve())},r.send(s),setTimeout(()=>{n||(this.destroyed||this._websocket!==r||o.A.getLogger(this).error(new i.A("geoevent-connection","Server timed out when setting filter")),c.reject())},1e4),c.promise}_serializeFilter(e,t){const r={};if(null==e&&null==t)return r;if(e?.geometry)try{const t=(0,h.rS)(e.geometry);if("extent"!==t.type)throw new i.A("geoevent-connection",`Expected extent but found type ${t.type}`);r.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){o.A.getLogger(this).error(new i.A("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return e?.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(r.where=e.where),null!=t&&(r.outFields=t.join(",")),r}_enrich(e){if(!this._relatedFeatures)return e;const t=this._serviceDefinition.relatedFeatures.joinField,r=e.attributes[t],s=this._relatedFeatures.get(r);if(!s)return o.A.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;const{attributes:n,geometry:a}=s;for(const t in n)e.attributes[t]=n[t];return a&&(e.geometry=a),e.geometry||e.centroid||o.A.getLogger(this).error(new i.A("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{const{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,r=this._queryRelatedFeatures(e),s=this._queryArchive(t);await r;const n=await s;if(!n)return;for(const e of n.features)this.onFeature(this._enrich(e))}catch(e){o.A.getLogger(this).error(new i.A("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;const t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){const t=new((await Promise.all([r.e(7330),r.e(4045),r.e(6554),r.e(2869),r.e(3910),r.e(4903),r.e(1214),r.e(9953),r.e(8399),r.e(1017),r.e(957),r.e(8506),r.e(8654),r.e(812),r.e(655),r.e(2561)]).then(r.bind(r,68654))).default)({url:e}),{capabilities:s}=await t.load(),n=s.query.supportsMaxRecordCountFactor,i=s.query.supportsPagination,o=s.query.supportsCentroid,a=this._config.maxRecordCountFactor,c=t.capabilities.query.maxRecordCount,u=n?c*a:c,h=new _.A;if(h.outFields=this._config.outFields??["*"],h.where=this._config.filter?.where??"1=1",h.returnGeometry=!0,h.returnExceededLimitFeatures=!0,h.outSpatialReference=l.A.fromJSON(this._config.spatialReference),o&&(h.returnCentroid=!0),n&&(h.maxRecordCountFactor=a),i)return h.num=u,t.destroy(),this._queryPages(e,h);const d=await(0,m.eW)(e,h,this._config.sourceSpatialReference);return t.destroy(),d.data}async _queryPages(e,t,r=[],s=0){t.start=null!=t.num?s*t.num:null;const{data:n}=await(0,m.eW)(e,t,this._config.sourceSpatialReference);return n.exceededTransferLimit&&s<(this._config.maxQueryDepth??0)?(n.features.forEach(e=>r.push(e)),this._queryPages(e,t,r,s+1)):(r.forEach(e=>n.features.push(e)),n)}_addRelatedFeatures(e){const t=new Map,r=e.features,s=this._serviceDefinition.relatedFeatures.joinField;for(const e of r){const r=e.attributes[s];t.set(r,e)}this._relatedFeatures=t}};w=(0,s.Cg)([(0,u.$)("esri.layers.graphics.sources.connections.GeoEventConnection")],w);let k=class extends p{constructor(e){super({}),this.connectionStatus="connected",this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:s}=e;this._featureZScaler=(0,f.N)(t,s,r)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function S(e,t){if(null==e&&null==t)return null;const r={};return null!=t&&(r.geometry=t),null!=e&&(r.where=e),r}function I(e,t,r,s,n,i,o,a,c){const u={source:e,sourceSpatialReference:t,spatialReference:r,geometryType:s,filter:S(n,i),maxReconnectionAttempts:o,maxReconnectionInterval:a,customParameters:c};return e?e.path.startsWith("wss://")||e.path.startsWith("ws://")?new y(u):new w(u):new k(u)}(0,s.Cg)([(0,d.MZ)()],k.prototype,"connectionStatus",void 0),(0,s.Cg)([(0,d.MZ)()],k.prototype,"errorString",void 0),k=(0,s.Cg)([(0,u.$)("esri.layers.support.ClientSideConnection")],k)},43334:(e,t,r)=>{r.d(t,{N3:()=>a,Om:()=>o});var s=r(69397),n=r(27647),i=r(92722);class o{constructor(e=null,t={},r,s,n=0){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=s,this.displayId=n}static fromJSON(e){const t=e.geometry?i.A.fromJSON(e.geometry):null,r=e.centroid?i.A.fromJSON(e.centroid):null,s=e.objectId;return new o(t,e.attributes,r,s)}weakClone(){const e=new o(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e}clone(){const e=this.geometry?.clone(),t=new o(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t}ensureCentroid(e){return this.centroid??=(0,n.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,s.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function a(e){return!!e.geometry?.coords?.length}},51624:(e,t,r)=>{r.d(t,{A:()=>u});var s=r(44208),n=r(69397),i=r(93687);const o=4294967296,a=new TextDecoder("utf-8"),c=(0,s.A)("safari")||(0,s.A)("ios")?6:(0,s.A)("ff")?12:32;class u{constructor(e,t,r=0,s=(e?e.byteLength:0)){this._tag=0,this._dataType=99,this._init(e,t,r,s)}_init(e,t,r,s){this._data=e,this._dataView=t,this._pos=r,this._end=s}get usedMemory(){return 64+(0,n.Qf)(this._data)}asUnsafe(){return this}clone(){return new u(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),r}getSFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),r}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){const e=this._getLength(),t=this._pos,r=this._toBytes(this._data,t,t+e);return this._skip(e),r}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,r,s){const n=this.getMessage(),i=e(n,t,r,s);return n.release(),i}processMessage(e){const t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){const e=this._getLength(),t=u.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){u.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,r=0,s=0;if(this._end-t>=10)do{if(s=e[t++],r|=127&s,!(128&s))break;if(s=e[t++],r|=(127&s)<<7,!(128&s))break;if(s=e[t++],r|=(127&s)<<14,!(128&s))break;if(s=e[t++],r|=(127&s)<<21,!(128&s))break;if(s=e[t++],r+=268435456*(127&s),!(128&s))break;if(s=e[t++],r+=34359738368*(127&s),!(128&s))break;if(s=e[t++],r+=4398046511104*(127&s),!(128&s))break;if(s=e[t++],r+=562949953421312*(127&s),!(128&s))break;if(s=e[t++],r+=72057594037927940*(127&s),!(128&s))break;if(s=e[t++],r+=0x8000000000000000*(127&s),!(128&s))break;throw new Error("Varint too long!")}while(0);else{let n=1;for(;t!==this._end&&(s=e[t],128&s);)++t,r+=(127&s)*n,n*=128;if(t===this._end)throw new Error("Varint overrun!");++t,r+=s*n}return this._pos=t,r}_decodeSVarint(){const e=this._data;let t,r=0,s=0;const n=1&e[this._pos];if(s=e[this._pos++],r|=127&s,!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r|=(127&s)<<7,!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r|=(127&s)<<14,!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r|=(127&s)<<21,!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r+=268435456*(127&s),!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r+=34359738368*(127&s),!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r+=4398046511104*(127&s),!(128&s))return n?-(r+1)/2:r/2;if(t=BigInt(r),s=e[this._pos++],t+=0x2000000000000n*BigInt(127&s),!(128&s))return Number(n?-(t+1n)/2n:t/2n);if(s=e[this._pos++],t+=0x100000000000000n*BigInt(127&s),!(128&s))return Number(n?-(t+1n)/2n:t/2n);if(s=e[this._pos++],t+=0x8000000000000000n*BigInt(127&s),!(128&s))return Number(n?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(2!==this._dataType)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,r){if((r=Math.min(this._end,r))-t>c){const s=e.subarray(t,r);return a.decode(s)}let s="",n="";for(let i=t;i<r;++i){const t=e[i];128&t?n+="%"+t.toString(16):(s+=decodeURIComponent(n)+String.fromCharCode(t),n="")}return n.length&&(s+=decodeURIComponent(n)),s}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}static{this.pool=new i.A(()=>new u(null,null),void 0,e=>{e._data=null,e._dataView=null})}}},53655:(e,t,r)=>{r.d(t,{SH:()=>q,ae:()=>I,cn:()=>_});var s=r(49186),n=r(51624),i=r(92722),o=r(69418);const a=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],c=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],u=["upperLeft","lowerLeft"];function l(e){return e>=a.length?null:a[e]}function h(e){return e>=c.length?null:c[e]}function d(e){return e>=u.length?null:u[e]}function f(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function g(e,t,r){const s=e.asUnsafe(),n=t.createPointGeometry(r);for(;s.next();)switch(s.tag()){case 3:{const e=s.getUInt32(),r=s.pos()+e;let i=0;for(;s.pos()<r;)t.addCoordinatePoint(n,s.getSInt64(),i++);break}default:s.skip()}return n}function p(e,t,r){const s=e.asUnsafe(),n=t.createGeometry(r),i=2+(r.hasZ?1:0)+(r.hasM?1:0);for(;s.next();)switch(s.tag()){case 2:{const e=s.getUInt32(),r=s.pos()+e;let i=0;for(;s.pos()<r;)t.addLength(n,s.getUInt32(),i++);break}case 3:{const e=s.getUInt32(),r=s.pos()+e;let o=0;for(t.allocateCoordinates(n);s.pos()<r;)t.addCoordinate(n,s.getSInt64(),o),o++,o===i&&(o=0);break}default:s.skip()}return n}function y(e){const t=e.asUnsafe(),r=new i.A;let s="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),s=t.pos()+e;for(;t.pos()<s;)r.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),s=t.pos()+e;for(;t.pos()<s;)r.coords.push(t.getSInt64());break}case 1:s=o.z[t.getEnum()];break;default:t.skip()}return{queryGeometry:r,queryGeometryType:s}}function m(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function _(e){const t=e.asUnsafe(),r={type:l(0)};for(;t.next();)switch(t.tag()){case 1:r.name=t.getString();break;case 2:r.type=l(t.getEnum());break;case 3:r.alias=t.getString();break;case 4:r.sqlType=h(t.getEnum());break;case 5:default:t.skip();break;case 6:r.defaultValue=t.getString()}return r}function b(e){const t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.name=r.getString();break;case 2:t.isSystemMaintained=r.getBool();break;default:r.skip()}return t}function w(e,t,r,s){const n=t.createFeature(r);let i=0;for(;e.next();)switch(e.tag()){case 1:{const t=s[i++].name;n.attributes[t]=e.processMessage(m);break}case 2:n.geometry=e.processMessageWithArgs(p,t,r);break;case 4:n.centroid=e.processMessageWithArgs(g,t,r);break;default:e.skip()}return n}function k(e){const t=[1,1,1,1],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function S(e){const t=[0,0,0,0],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function I(e){const t={originPosition:d(0)},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.originPosition=d(r.getEnum());break;case 2:t.scale=r.processMessage(k);break;case 3:t.translate=r.processMessage(S);break;default:r.skip()}return t}function F(e){const t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.shapeAreaFieldName=r.getString();break;case 2:t.shapeLengthFieldName=r.getString();break;case 3:t.units=r.getString();break;default:r.skip()}return t}function T(e,t){const r=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:r.wkid=e.getUInt32();break;case 5:r.wkt=e.getString();break;case 2:r.latestWkid=e.getUInt32();break;case 3:r.vcsWkid=e.getUInt32();break;case 4:r.latestVcsWkid=e.getUInt32();break;default:e.skip()}return r}function A(e,t){const r=t.createFeatureResult(),s=e.asUnsafe();r.geometryType=f(t,0);let n=!1;for(;s.next();)switch(s.tag()){case 1:r.objectIdFieldName=s.getString();break;case 3:r.globalIdFieldName=s.getString();break;case 4:r.geohashFieldName=s.getString();break;case 5:r.geometryProperties=s.processMessage(F);break;case 7:r.geometryType=f(t,s.getEnum());break;case 8:r.spatialReference=s.processMessageWithArgs(T,t);break;case 10:r.hasZ=s.getBool();break;case 11:r.hasM=s.getBool();break;case 12:r.transform=s.processMessage(I);break;case 9:r.exceededTransferLimit=s.getBool();break;case 13:t.addField(r,s.processMessage(_));break;case 15:n||(t.prepareFeatures(r),n=!0),t.addFeature(r,s.processMessageWithArgs(w,t,r,r.fields));break;case 2:r.uniqueIdField=s.processMessage(b);break;default:s.skip()}return t.finishFeatureResult(r),r}function x(e,t){const r={};let s=null;for(;e.next();)switch(e.tag()){case 4:s=e.processMessageWithArgs(y);break;case 1:r.featureResult=e.processMessageWithArgs(A,t);break;default:e.skip()}return null!=s&&r.featureResult&&t.addQueryGeometry(r,s),r}function q(e,t){try{const r=2,s=new n.A(new Uint8Array(e),new DataView(e)),i={};for(;s.next();)s.tag()===r?i.queryResult=s.processMessageWithArgs(x,t):s.skip();return i}catch(e){throw new s.A("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},58501:(e,t,r)=>{r.d(t,{q:()=>n});var s=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,s.N)(r.geometryType,t,e.outSpatialReference);if(n)for(const e of r.features)n(e.geometry)}},58512:(e,t,r)=>{r.d(t,{A:()=>s});class s{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new s;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},66208:(e,t,r)=>{r.d(t,{m:()=>n});var s=r(53655);function n(e,t){const r=(0,s.SH)(e,t),n=r.queryResult.featureResult,i=r.queryResult.queryGeometry,o=r.queryResult.queryGeometryType;if(n&&n.features&&n.features.length&&n.objectIdFieldName){const e=n.objectIdFieldName;for(const t of n.features)t.attributes&&(t.objectId=t.attributes[e])}return n&&(n.queryGeometry=i,n.queryGeometryType=o),n}},69052:(e,t,r)=>{r.d(t,{hr:()=>n,ie:()=>c,uC:()=>a});var s=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return i(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,s.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+o(this.range,e-t,r)}minimalMonotonic(e,t,r){return i(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,s=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(s)?r:s}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function i(e,t,r,s,n=0,i=!1){return(s-=n)<t?s+=o(e,t-s):s>r&&(s-=o(e,s-r)),i&&s===r&&(s=t),s+n}function o(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const a=new n(0,2*Math.PI),c=(new n(-Math.PI,Math.PI),new n(0,360))},69397:(e,t,r)=>{r.d(t,{$B:()=>n,Qf:()=>u,Qh:()=>a,RS:()=>i,ez:()=>d,lM:()=>o,qK:()=>h});var s=r(34275);function n(e){return 32+e.length}const i=16;function o(e){if(!e)return 0;let t=h;for(const r in e)e.hasOwnProperty(r)&&(t+=c(e[r],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return u(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=d;for(let s=0;s<t;s++)r+=c(e[s]);return r}(e);let t=h;for(const r in e)e.hasOwnProperty(r)&&(t+=c(e[r]));return t}function c(e,t=!0){switch(typeof e){case"object":return t?a(e):h;case"string":return n(e);case"number":return i;case"boolean":return 4;default:return 8}}function u(...e){return e.reduce((e,t)=>e+(t?(0,s.iu)(t)?t.byteLength+f:Array.isArray(t)?l(t,i):0:0),0)}function l(e,t){return d+e.length*t}const h=32,d=16,f=145},69418:(e,t,r)=>{r.d(t,{S:()=>u,z:()=>c});var s=r(83047),n=r(21325),i=r(43334),o=r(58512),a=r(92722);const c=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class u{constructor(e){this._options=e,this.geometryTypes=c,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new o.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,n.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,s.G9)(this._options.sourceSpatialReference)/(0,s.G9)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,i.N3)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new i.Om(null,{},null,0)}createSpatialReference(){return{wkid:0}}createGeometry(){return new a.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce((e,t)=>e+t,0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new a.A}}},80754:(e,t,r)=>{r.d(t,{j7:()=>o,kS:()=>c,kd:()=>a,r8:()=>u});var s=r(82799),n=r(16930),i=r(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,i.Bi)(e)?e.rings:e.paths}},80893:(e,t,r)=>{r.d(t,{IJ:()=>d,Jf:()=>y,Pk:()=>g,eW:()=>h,gW:()=>p,kS:()=>f});var s=r(78888),n=r(84952),i=r(17136),o=r(10536),a=r(66208),c=r(5076),u=r(58501);const l="Layer does not support extent calculation.";async function h(e,t,r,s={},n){const i=t.timeExtent?.isEmpty?{data:{features:[]}}:await _(e,t,"json",s,void 0,n);return(0,u.q)(t,r,i.data),i}async function d(e,t,r,s,n){if(t.timeExtent?.isEmpty)return{data:r.createFeatureResult()};const i=await f(e,t,s,n),o=i;return o.data=(0,a.m)(i.data,r),o}function f(e,t,r={},s){return _(e,t,"pbf",r,void 0,s)}function g(e,t,r={},s){return t.timeExtent?.isEmpty?Promise.resolve({data:{objectIds:[]}}):_(e,t,"json",r,{returnIdsOnly:!0},s)}function p(e,t,r={},s){return t.timeExtent?.isEmpty?Promise.resolve({data:{count:0}}):_(e,t,"json",r,{returnIdsOnly:!0,returnCountOnly:!0},s)}async function y(e,t,r={}){if(t.timeExtent?.isEmpty)return{data:{count:0,extent:null}};const s=await _(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}),n=s.data;if(n.hasOwnProperty("extent"))return s;if(n.features)throw new Error(l);if(n.hasOwnProperty("count"))throw new Error(l);return s}function m(e,t){if(!e.returnIdsOnly||!t.uniqueIdFields)return e;const r={...e,returnUniqueIdsOnly:!0};return delete r.returnIdsOnly,r}async function _(e,t,r,a,u={},l={}){const h="string"==typeof e?(0,n.An)(e):e,d=t.geometry?[t.geometry]:[],f=await(0,i.el)(d,null,{signal:a.signal}),g=f?.[0];if(null!=g){const e=t.clone();e.geometry=g.clone(),t=e}const p=(0,o.z)({...h.query,f:r,...m(u,l),...(y=t,_=u,b=l,(0,c.i)(y,_,b))});var y,_,b;return(0,s.A)((0,n.fj)(h.path,function(e,t){return null!=e.formatOf3DObjects&&!(t.returnCountOnly||t.returnExtentOnly||t.returnIdsOnly)}(t,u)?"query3d":"query"),{...a,responseType:"pbf"===r?"array-buffer":"json",query:{...p,...a.query}})}},92300:(e,t,r)=>{r.d(t,{V:()=>i,X:()=>n});var s=r(65864);function n(e){return{geometryType:(0,s.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function i(e,t,r){const n=(0,s.xD)(t);return e.map(e=>{const t=n.fromJSON(e);return t.spatialReference=r,t})}},92722:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(69397);class n{constructor(e=[],t=[],r=!1,s=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=s}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:s}){return new n(e,t,r||!1,s||!1)}static fromRect([e,t,r,s]){const i=r-e,o=s-t;return new n([5],[e,t,i,0,0,o,-i,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,s.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let e=0,t=0;for(const r of this.lengths){if(r<3)continue;const{stride:s}=this;let n=this.coords[s*t],i=this.coords[s*t+1];for(let o=1;o<r;o+=1){const r=s*(t+o),a=this.coords[r],c=this.coords[r+1];e+=-.5*(a-n)*(c+i),n=a,i=c}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);const{stride:r}=this;for(const s of this.lengths){for(let n=0;n<s;n++){const s=r*(t+n);e(this.coords[s],this.coords[s+1])}t+=s}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let s=0;const{stride:n}=this;for(const e of r){for(let r=1;r<e;r++){const e=n*(s+r);t[e]+=t[e-n],t[e+1]+=t[e+1-n]}s+=e}return e}clone(e){if(this.isPoint)return new n([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const{stride:t,size:r}=this,s=r*t,i=this.coords.slice(0,s);return e?(e.set(i),new n(this.lengths,e)):new n(Array.from(this.lengths),Array.from(i),this.hasZ,this.hasM)}justXY(){const{stride:e,size:t}=this;if(2===e)return this;const r=new Array(t*e);for(let t=0,s=0;t<r.length;t+=e)r[s++]=this.coords[t],r[s++]=this.coords[t+1];return new n(this.lengths,r,!1,!1)}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[624,7136],{5076:(e,t,r)=>{r.d(t,{i:()=>i});var s=r(65864),n=r(21325);function i(e,t,r){const{geometry:i}=e,o=e.compactGeometryEnabled??!1,a=e.toJSON();delete a.compactGeometryEnabled,delete a.defaultSpatialReferenceEnabled;const c=a;let u,l,h;if(i&&(l=i.spatialReference,h=(0,n.YX)(l),c.geometryType=(0,s.$B)(i),c.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const r=e.toJSON();return delete r.spatialReference,JSON.stringify(r)}(i,o),c.inSR=h),a.groupByFieldsForStatistics&&(c.groupByFieldsForStatistics=a.groupByFieldsForStatistics.join(",")),a.objectIds)switch(r?.uniqueIdFields?.length){case void 0:c.objectIds=a.objectIds.join(",");break;case 1:c.uniqueIds=JSON.stringify(a.objectIds),delete c.objectIds;break;default:c.uniqueIds=JSON.stringify(a.objectIds.map(e=>JSON.parse(e))),delete c.objectIds}if(a.orderByFields&&(c.orderByFields=a.orderByFields.join(",")),!a.outFields||!a.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete c.outFields:a.outFields.includes("*")?c.outFields="*":c.outFields=a.outFields.join(","),a.outSR?(c.outSR=(0,n.YX)(a.outSR),u=e.outSpatialReference):i&&(a.returnGeometry||a.returnCentroid)&&(c.outSR=c.inSR,u=l),a.returnGeometry&&delete a.returnGeometry,a.outStatistics&&(c.outStatistics=JSON.stringify(a.outStatistics)),a.fullText&&(c.fullText=JSON.stringify(a.fullText)),a.pixelSize&&(c.pixelSize=JSON.stringify(a.pixelSize)),a.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=l&&null!=e.quantizationParameters?.extent&&l.equals(e.quantizationParameters.extent.spatialReference)&&delete a.quantizationParameters.extent.spatialReference,c.quantizationParameters=JSON.stringify(a.quantizationParameters)),a.parameterValues&&(c.parameterValues=JSON.stringify(a.parameterValues)),a.rangeValues&&(c.rangeValues=JSON.stringify(a.rangeValues)),a.dynamicDataSource&&(c.layer=JSON.stringify({source:a.dynamicDataSource}),delete a.dynamicDataSource),a.timeExtent){const e=a.timeExtent,{start:t,end:r}=e;null==t&&null==r||(c.time=t===r?t:`${t??"null"},${r??"null"}`),delete a.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=l&&null!=u&&l.equals(u)&&(c.defaultSR=c.inSR,delete c.inSR,delete c.outSR),c}},10536:(e,t,r)=>{function s(e){const t={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){t[r]=[];for(let e=0;e<n.length;e++)t[r][e]=s(n[e])}else"object"==typeof n?n.toJSON&&(t[r]=JSON.stringify(n)):t[r]=n}return t}r.d(t,{z:()=>s})},17136:(e,t,r)=>{r.d(t,{Y_:()=>x,O7:()=>T,el:()=>F});var s=r(92602),n=r(69052),i=r(49186),o=r(53966),a=r(39829),c=r(82799),u=r(16930),l=r(80754),h=r(21325),d=r(28735),f=r(78888),g=r(65864),p=r(2272),y=r(84952),m=r(92300);const _=()=>o.A.getLogger("esri.geometry.support.normalizeUtils");function b(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function k(e,t,r){if(t){const t=function(e,t){if(!(e instanceof c.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw _().error(e),new i.A("internal:geometry",e)}const r=(0,l.r8)(e),s=[];for(const e of r){const r=[];s.push(r),r.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const n=e[s][0],i=e[s][1],o=e[s+1][0],a=e[s+1][1],c=Math.sqrt((o-n)*(o-n)+(a-i)*(a-i)),u=(a-i)/c,l=(o-n)/c,h=c/t;if(h>1){for(let e=1;e<=h-1;e++){const s=e*t,o=l*s+n,a=u*s+i;r.push([o,a])}const e=(c+Math.floor(h-1)*t)/2,s=l*e+n,o=u*e+i;r.push([s,o])}r.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:s,spatialReference:e.spatialReference}):new c.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.ci)(t,!0)}return r&&(e=(0,l.kS)(e,r)),e}function S(e,t,r){if(Array.isArray(e)){const s=e[0];if(s>t){const r=(0,l.kd)(s,t);e[0]=s+r*(-2*t)}else if(s<r){const t=(0,l.kd)(s,r);e[0]=s+t*(-2*r)}}else{const s=e.x;if(s>t){const r=(0,l.kd)(s,t);e=e.clone().offset(r*(-2*t),0)}else if(s<r){const t=(0,l.kd)(s,r);e=e.clone().offset(t*(-2*r),0)}}return e}function I(e,t){let r=-1;for(let s=0;s<t.cutIndexes.length;s++){const n=t.cutIndexes[s],i=t.geometries[s],o=(0,l.r8)(i);for(let e=0;e<o.length;e++){const t=o[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const s=t[e][0];r=s>r?s:r}r=Number(r.toFixed(9));const s=-360*(0,l.kd)(r,180);for(let r=0;r<t.length;r++){const t=i.getPoint(e,r);i.setPoint(e,r,t.clone().offset(s,0))}return!0}})}if(n===r){if(b(e))for(const t of(0,l.r8)(i))e[n]=e[n].addRing(t);else if(w(e))for(const t of(0,l.r8)(i))e[n]=e[n].addPath(t)}else r=n,e[n]=i}return e}async function F(e,t,r){if(!Array.isArray(e))return F([e],t);t&&"string"!=typeof t&&_().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let i,o,u,b,w,T,A,x,q=0;const N=[],R=[];for(const t of e)if(null!=t)if(i||(i=t.spatialReference,o=(0,h.Vp)(i),u=i.isWebMercator,T=u?102100:4326,b=l.j7[T].maxX,w=l.j7[T].minX,A=l.j7[T].plus180Line,x=l.j7[T].minus180Line),o)if("mesh"===t.type)R.push(t);else if("point"===t.type)R.push(S(t.clone(),b,w));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>S(e,b,w)),R.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,o);R.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,r=(0,l.kd)(e.xmin,w)*(2*b);let s=0===r?t.clone():(0,l.kS)(t.clone(),r);e.offset(r,0);let{xmin:n,xmax:i}=e;n=Number(n.toFixed(9)),i=Number(i.toFixed(9)),e.intersects(A)&&i!==b?(q=i>q?i:q,s=k(s,u),N.push(s),R.push("cut")):e.intersects(x)&&n!==w?(q=i*(2*b)>q?i*(2*b):q,s=k(s,u,360),N.push(s),R.push("cut")):R.push(s)}else R.push(t.clone());else R.push(t);else R.push(t);let M=(0,l.kd)(q,b),v=-90;const O=M,E=new c.A;for(;M>0;){const e=360*M-180;E.addPath([[e,v],[e,-1*v]]),v*=-1,M--}if(N.length>0&&O>0){const t=I(N,await async function(e,t,r,s){const n=(0,p.Dl)(e),i=t[0].spatialReference,o={...s,responseType:"json",query:{...n.query,f:"json",sr:(0,h.YX)(i),target:JSON.stringify({geometryType:(0,g.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,f.A)(n.path+"/cut",o),{cutIndexes:c,geometries:u=[]}=a.data;return{cutIndexes:c,geometries:u.map(e=>{const t=(0,g.rS)(e);return t.spatialReference=i,t})}}(n,N,E,r)),s=[],i=[];for(let r=0;r<R.length;r++){const n=R[r];if("cut"!==n)i.push(n);else{const n=t.shift(),o=e[r];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(s.push(n),i.push("simplify")):i.push(u?(0,d.Gh)(n):n)}}if(!s.length)return i;const o=await async function(e,t,r){const s="string"==typeof e?(0,y.An)(e):e,n=t[0].spatialReference,i=(0,g.$B)(t[0]),o={...r,query:{...s.query,f:"json",sr:(0,h.YX)(n),geometries:JSON.stringify((0,m.X)(t))}},{data:a}=await(0,f.A)(s.path+"/simplify",o);return(0,m.V)(a.geometries,i,n)}(n,s,r),a=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?a.push(t):a.push(u?(0,d.Gh)(o.shift()):o.shift())}return a}const P=[];for(let e=0;e<R.length;e++){const t=R[e];if("cut"!==t)P.push(t);else{const e=N.shift();P.push(!0===u?(0,d.Gh)(e):e)}}return P}function T(e,t,r){const s=(0,h.Vp)(r);if(null==s)return e;const[n,i]=s.valid,o=2*i;let a=0,c=0;t>i?a=Math.ceil(Math.abs(t-i)/o):t<n&&(a=-Math.ceil(Math.abs(t-n)/o)),e>i?c=Math.ceil(Math.abs(e-i)/o):e<n&&(c=-Math.ceil(Math.abs(e-n)/o));let u=e+(a-c)*o;const l=u-t;return l>i?u-=o:l<n&&(u+=o),u}function A(e){const t=(0,h.Vp)(e);if(null==t)return null;const[r,s]=t.valid;return new n.hr(r,s)}const x=A(u.A.WGS84);A(u.A.WebMercator)},27647:(e,t,r)=>{r.d(t,{Q:()=>i});var s=r(92722);function n(e,t){return e?t?4:3:t?3:2}function i(e){if(null==e)return null;if(!e?.lengths.length)return null;const{lengths:t,coords:r,stride:n,hasZ:i,hasM:c}=e,u=new s.A([],[],i,!1),l=u.coords,h=[],d=i?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];let f=0;for(const e of t){const t=o(d,r,f,e,i,c);t&&h.push(t),f+=e*n}if(h.sort((e,t)=>{let r=e[2]-t[2];return 0===r&&i&&(r=e[4]-t[4]),r}),h.length){let e=6*h[0][2];l[0]=h[0][0]/e,l[1]=h[0][1]/e,i&&(e=6*h[0][4],l[2]=0!==e?h[0][3]/e:0),(l[0]<d[0]||l[0]>d[1]||l[1]<d[2]||l[1]>d[3]||i&&(l[2]<d[4]||l[2]>d[5]))&&(l.length=0)}if(!l.length){const s=e.lengths[0]?a(r,0,t[0],i,c):null;if(!s)return null;l[0]=s[0],l[1]=s[1],i&&(l[2]=s[2]??0)}return u}function o(e,t,r,s,i,o){const a=n(i,o);let c=r,u=r+a,l=0,h=0,d=0,f=0,g=0;for(let r=0,n=s-1;r<n;r++,c+=a,u+=a){const r=t[c],s=t[c+1],n=t[c+2],o=t[u],a=t[u+1],p=t[u+2];let y=r*a-o*s;f+=y,l+=(r+o)*y,h+=(s+a)*y,i&&(y=r*p-o*n,d+=(n+p)*y,g+=y),r<e[0]&&(e[0]=r),r>e[1]&&(e[1]=r),s<e[2]&&(e[2]=s),s>e[3]&&(e[3]=s),i&&(n<e[4]&&(e[4]=n),n>e[5]&&(e[5]=n))}if(f>0&&(f*=-1),g>0&&(g*=-1),!f)return null;const p=[l,h,.5*f];return i&&(p[3]=d,p[4]=.5*g),p}function a(e,t,r,s,i){const o=n(s,i);let a=t,d=t+o,f=0,g=0,p=0,y=0;for(let t=0,n=r-1;t<n;t++,a+=o,d+=o){const t=e[a],r=e[a+1],n=e[a+2],i=e[d],o=e[d+1],m=e[d+2],_=s?u(t,r,n,i,o,m):c(t,r,i,o);if(_)if(f+=_,s){const e=h(t,r,n,i,o,m);g+=_*e[0],p+=_*e[1],y+=_*e[2]}else{const e=l(t,r,i,o);g+=_*e[0],p+=_*e[1]}}return f>0?s?[g/f,p/f,y/f]:[g/f,p/f]:r>0?s?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function c(e,t,r,s){const n=r-e,i=s-t;return Math.sqrt(n*n+i*i)}function u(e,t,r,s,n,i){const o=s-e,a=n-t,c=i-r;return Math.sqrt(o*o+a*a+c*c)}function l(e,t,r,s){return[e+.5*(r-e),t+.5*(s-t)]}function h(e,t,r,s,n,i){return[e+.5*(s-e),t+.5*(n-t),r+.5*(i-r)]}},30624:(e,t,r)=>{r.r(t),r.d(t,{createConnection:()=>I});var s=r(31635),n=r(78888),i=r(49186),o=r(53966),a=r(74887),c=r(84952),u=(r(44208),r(87811),r(64108)),l=r(16930),h=r(65864),d=r(10107),f=r(62815),g=r(65529);let p=class extends g.nJ{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new i.A("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,s.Cg)([(0,d.MZ)({readOnly:!0})],p.prototype,"connectionError",null),p=(0,s.Cg)([(0,u.$)("esri.layers.support.StreamConnection")],p);let y=class extends p{constructor(e){super({}),this._outstandingMessages=[],this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:s}=e;this._config=e,this._featureZScaler=(0,f.N)(t,s,r),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case 0:case 1:return"connected";case 2:case 3:return"disconnected"}}sendMessageToSocket(e){null!=this._websocket?this._websocket.send(JSON.stringify(e)):this._outstandingMessages.push(e)}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.source.path,t=1e3,r=0){try{if(this.destroyed)return;const t=(0,c.a6)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(s){const n=t/1e3;return this._config.maxReconnectionAttempts&&r>=this._config.maxReconnectionAttempts?(o.A.getLogger(this).error(new i.A("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(o.A.getLogger(this).error(new i.A("websocket-connection",`Failed to connect. Attempting to reconnect in ${n}s`,s)),await(0,a.Pl)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),r+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{const t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void o.A.getLogger(this).error(new i.A("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise((t,r)=>{const s=new WebSocket(e);s.onopen=()=>{if(s.onopen=null,this.destroyed)return s.onclose=null,void s.close();s.onclose=e=>this._onClose(e),s.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(s),t(s)},s.onclose=e=>{s.onopen=s.onclose=null,r(e)}})}async _handshake(e=1e4){const t=this._websocket;if(null==t)return;const r=(0,a.Tw)(),s=t.onmessage,{filter:n,outFields:c,spatialReference:u}=this._config;return r.timeout(e),t.onmessage=e=>{let a=null;try{a=JSON.parse(e.data)}catch(e){}a&&"object"==typeof a||(o.A.getLogger(this).error(new i.A("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),r.reject(),this.destroy()),a.spatialReference?.wkid!==u?.wkid&&(o.A.getLogger(this).error(new i.A("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${u.wkid}`,e.data)),r.reject(),this.destroy()),"json"!==a.format&&(o.A.getLogger(this).error(new i.A("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),r.reject(),this.destroy()),n&&a.filter!==n&&o.A.getLogger(this).error(new i.A("websocket-connection","Tried to set filter, but server doesn't support it")),c&&a.outFields!==c&&o.A.getLogger(this).error(new i.A("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=s;for(const e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],r.resolve()},t.send(JSON.stringify({filter:n,outFields:c,format:"json",spatialReference:{wkid:u.wkid}})),r.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){const t="Encountered an error over WebSocket connection";this._set("errorString",t),o.A.getLogger(this).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&o.A.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,s.Cg)([(0,d.MZ)()],y.prototype,"connectionStatus",null),(0,s.Cg)([(0,d.MZ)()],y.prototype,"errorString",void 0),y=(0,s.Cg)([(0,u.$)("esri.layers.graphics.sources.connections.WebSocketConnection")],y);var m=r(80893),_=r(61956);const b={maxQueryDepth:5,maxRecordCountFactor:3};let w=class extends y{constructor(e){super({...b,...e}),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){const e=await this._fetchServiceDefinition(this._config.source);e.timeInfo.trackIdField||o.A.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");const t=this._fetchWebSocketUrl(e.streamUrls,this._config.spatialReference);this._buddyServicesQuery||(this._buddyServicesQuery=this._queryBuddyServices()),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);const{filter:r,outFields:s}=this._config;this.destroyed||this._setFilter(r,s)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void o.A.getLogger(this).error(new i.A("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){const t={f:"json",...this._config.customParameters},r=(0,n.A)(e.path,{query:t,responseType:"json"}),s=(await r).data;return this._serviceDefinition=s,s}_fetchWebSocketUrl(e,t){const r=e[0],{urls:s,token:n}=r,i=this._inferWebSocketBaseUrl(s);return(0,c.a6)(`${i}/subscribe`,{outSR:""+t.wkid,token:n})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(const t of e)if(t.includes("wss"))return t;return o.A.getLogger(this).error(new i.A("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){const r=this._websocket;if(null==r||null==e&&null==t)return;const s=JSON.stringify({filter:this._serializeFilter(e,t)});let n=!1;const c=(0,a.Tw)();return r.onmessage=e=>{const t=JSON.parse(e.data);t.filter&&(t.error&&(o.A.getLogger(this).error(new i.A("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),c.reject(t.error)),this._setWebSocketJSONParseHandler(r),n=!0,c.resolve())},r.send(s),setTimeout(()=>{n||(this.destroyed||this._websocket!==r||o.A.getLogger(this).error(new i.A("geoevent-connection","Server timed out when setting filter")),c.reject())},1e4),c.promise}_serializeFilter(e,t){const r={};if(null==e&&null==t)return r;if(e?.geometry)try{const t=(0,h.rS)(e.geometry);if("extent"!==t.type)throw new i.A("geoevent-connection",`Expected extent but found type ${t.type}`);r.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){o.A.getLogger(this).error(new i.A("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return e?.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(r.where=e.where),null!=t&&(r.outFields=t.join(",")),r}_enrich(e){if(!this._relatedFeatures)return e;const t=this._serviceDefinition.relatedFeatures.joinField,r=e.attributes[t],s=this._relatedFeatures.get(r);if(!s)return o.A.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;const{attributes:n,geometry:a}=s;for(const t in n)e.attributes[t]=n[t];return a&&(e.geometry=a),e.geometry||e.centroid||o.A.getLogger(this).error(new i.A("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{const{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,r=this._queryRelatedFeatures(e),s=this._queryArchive(t);await r;const n=await s;if(!n)return;for(const e of n.features)this.onFeature(this._enrich(e))}catch(e){o.A.getLogger(this).error(new i.A("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;const t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){const t=new((await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(4903),r.e(1214),r.e(9953),r.e(8399),r.e(1017),r.e(957),r.e(8506),r.e(8654),r.e(812),r.e(655),r.e(2561)]).then(r.bind(r,68654))).default)({url:e}),{capabilities:s}=await t.load(),n=s.query.supportsMaxRecordCountFactor,i=s.query.supportsPagination,o=s.query.supportsCentroid,a=this._config.maxRecordCountFactor,c=t.capabilities.query.maxRecordCount,u=n?c*a:c,h=new _.A;if(h.outFields=this._config.outFields??["*"],h.where=this._config.filter?.where??"1=1",h.returnGeometry=!0,h.returnExceededLimitFeatures=!0,h.outSpatialReference=l.A.fromJSON(this._config.spatialReference),o&&(h.returnCentroid=!0),n&&(h.maxRecordCountFactor=a),i)return h.num=u,t.destroy(),this._queryPages(e,h);const d=await(0,m.eW)(e,h,this._config.sourceSpatialReference);return t.destroy(),d.data}async _queryPages(e,t,r=[],s=0){t.start=null!=t.num?s*t.num:null;const{data:n}=await(0,m.eW)(e,t,this._config.sourceSpatialReference);return n.exceededTransferLimit&&s<(this._config.maxQueryDepth??0)?(n.features.forEach(e=>r.push(e)),this._queryPages(e,t,r,s+1)):(r.forEach(e=>n.features.push(e)),n)}_addRelatedFeatures(e){const t=new Map,r=e.features,s=this._serviceDefinition.relatedFeatures.joinField;for(const e of r){const r=e.attributes[s];t.set(r,e)}this._relatedFeatures=t}};w=(0,s.Cg)([(0,u.$)("esri.layers.graphics.sources.connections.GeoEventConnection")],w);let k=class extends p{constructor(e){super({}),this.connectionStatus="connected",this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:s}=e;this._featureZScaler=(0,f.N)(t,s,r)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function S(e,t){if(null==e&&null==t)return null;const r={};return null!=t&&(r.geometry=t),null!=e&&(r.where=e),r}function I(e,t,r,s,n,i,o,a,c){const u={source:e,sourceSpatialReference:t,spatialReference:r,geometryType:s,filter:S(n,i),maxReconnectionAttempts:o,maxReconnectionInterval:a,customParameters:c};return e?e.path.startsWith("wss://")||e.path.startsWith("ws://")?new y(u):new w(u):new k(u)}(0,s.Cg)([(0,d.MZ)()],k.prototype,"connectionStatus",void 0),(0,s.Cg)([(0,d.MZ)()],k.prototype,"errorString",void 0),k=(0,s.Cg)([(0,u.$)("esri.layers.support.ClientSideConnection")],k)},43334:(e,t,r)=>{r.d(t,{N3:()=>a,Om:()=>o});var s=r(69397),n=r(27647),i=r(92722);class o{constructor(e=null,t={},r,s,n=0){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=s,this.displayId=n}static fromJSON(e){const t=e.geometry?i.A.fromJSON(e.geometry):null,r=e.centroid?i.A.fromJSON(e.centroid):null,s=e.objectId;return new o(t,e.attributes,r,s)}weakClone(){const e=new o(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e}clone(){const e=this.geometry?.clone(),t=new o(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t}ensureCentroid(e){return this.centroid??=(0,n.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,s.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function a(e){return!!e.geometry?.coords?.length}},51624:(e,t,r)=>{r.d(t,{A:()=>u});var s=r(44208),n=r(69397),i=r(93687);const o=4294967296,a=new TextDecoder("utf-8"),c=(0,s.A)("safari")||(0,s.A)("ios")?6:(0,s.A)("ff")?12:32;class u{constructor(e,t,r=0,s=(e?e.byteLength:0)){this._tag=0,this._dataType=99,this._init(e,t,r,s)}_init(e,t,r,s){this._data=e,this._dataView=t,this._pos=r,this._end=s}get usedMemory(){return 64+(0,n.Qf)(this._data)}asUnsafe(){return this}clone(){return new u(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),r}getSFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),r}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){const e=this._getLength(),t=this._pos,r=this._toBytes(this._data,t,t+e);return this._skip(e),r}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,r,s){const n=this.getMessage(),i=e(n,t,r,s);return n.release(),i}processMessage(e){const t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){const e=this._getLength(),t=u.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){u.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,r=0,s=0;if(this._end-t>=10)do{if(s=e[t++],r|=127&s,!(128&s))break;if(s=e[t++],r|=(127&s)<<7,!(128&s))break;if(s=e[t++],r|=(127&s)<<14,!(128&s))break;if(s=e[t++],r|=(127&s)<<21,!(128&s))break;if(s=e[t++],r+=268435456*(127&s),!(128&s))break;if(s=e[t++],r+=34359738368*(127&s),!(128&s))break;if(s=e[t++],r+=4398046511104*(127&s),!(128&s))break;if(s=e[t++],r+=562949953421312*(127&s),!(128&s))break;if(s=e[t++],r+=72057594037927940*(127&s),!(128&s))break;if(s=e[t++],r+=0x8000000000000000*(127&s),!(128&s))break;throw new Error("Varint too long!")}while(0);else{let n=1;for(;t!==this._end&&(s=e[t],128&s);)++t,r+=(127&s)*n,n*=128;if(t===this._end)throw new Error("Varint overrun!");++t,r+=s*n}return this._pos=t,r}_decodeSVarint(){const e=this._data;let t,r=0,s=0;const n=1&e[this._pos];if(s=e[this._pos++],r|=127&s,!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r|=(127&s)<<7,!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r|=(127&s)<<14,!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r|=(127&s)<<21,!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r+=268435456*(127&s),!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r+=34359738368*(127&s),!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r+=4398046511104*(127&s),!(128&s))return n?-(r+1)/2:r/2;if(t=BigInt(r),s=e[this._pos++],t+=0x2000000000000n*BigInt(127&s),!(128&s))return Number(n?-(t+1n)/2n:t/2n);if(s=e[this._pos++],t+=0x100000000000000n*BigInt(127&s),!(128&s))return Number(n?-(t+1n)/2n:t/2n);if(s=e[this._pos++],t+=0x8000000000000000n*BigInt(127&s),!(128&s))return Number(n?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(2!==this._dataType)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,r){if((r=Math.min(this._end,r))-t>c){const s=e.subarray(t,r);return a.decode(s)}let s="",n="";for(let i=t;i<r;++i){const t=e[i];128&t?n+="%"+t.toString(16):(s+=decodeURIComponent(n)+String.fromCharCode(t),n="")}return n.length&&(s+=decodeURIComponent(n)),s}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}static{this.pool=new i.A(()=>new u(null,null),void 0,e=>{e._data=null,e._dataView=null})}}},53655:(e,t,r)=>{r.d(t,{SH:()=>q,ae:()=>I,cn:()=>_});var s=r(49186),n=r(51624),i=r(92722),o=r(69418);const a=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],c=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],u=["upperLeft","lowerLeft"];function l(e){return e>=a.length?null:a[e]}function h(e){return e>=c.length?null:c[e]}function d(e){return e>=u.length?null:u[e]}function f(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function g(e,t,r){const s=e.asUnsafe(),n=t.createPointGeometry(r);for(;s.next();)switch(s.tag()){case 3:{const e=s.getUInt32(),r=s.pos()+e;let i=0;for(;s.pos()<r;)t.addCoordinatePoint(n,s.getSInt64(),i++);break}default:s.skip()}return n}function p(e,t,r){const s=e.asUnsafe(),n=t.createGeometry(r),i=2+(r.hasZ?1:0)+(r.hasM?1:0);for(;s.next();)switch(s.tag()){case 2:{const e=s.getUInt32(),r=s.pos()+e;let i=0;for(;s.pos()<r;)t.addLength(n,s.getUInt32(),i++);break}case 3:{const e=s.getUInt32(),r=s.pos()+e;let o=0;for(t.allocateCoordinates(n);s.pos()<r;)t.addCoordinate(n,s.getSInt64(),o),o++,o===i&&(o=0);break}default:s.skip()}return n}function y(e){const t=e.asUnsafe(),r=new i.A;let s="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),s=t.pos()+e;for(;t.pos()<s;)r.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),s=t.pos()+e;for(;t.pos()<s;)r.coords.push(t.getSInt64());break}case 1:s=o.z[t.getEnum()];break;default:t.skip()}return{queryGeometry:r,queryGeometryType:s}}function m(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function _(e){const t=e.asUnsafe(),r={type:l(0)};for(;t.next();)switch(t.tag()){case 1:r.name=t.getString();break;case 2:r.type=l(t.getEnum());break;case 3:r.alias=t.getString();break;case 4:r.sqlType=h(t.getEnum());break;case 5:default:t.skip();break;case 6:r.defaultValue=t.getString()}return r}function b(e){const t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.name=r.getString();break;case 2:t.isSystemMaintained=r.getBool();break;default:r.skip()}return t}function w(e,t,r,s){const n=t.createFeature(r);let i=0;for(;e.next();)switch(e.tag()){case 1:{const t=s[i++].name;n.attributes[t]=e.processMessage(m);break}case 2:n.geometry=e.processMessageWithArgs(p,t,r);break;case 4:n.centroid=e.processMessageWithArgs(g,t,r);break;default:e.skip()}return n}function k(e){const t=[1,1,1,1],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function S(e){const t=[0,0,0,0],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function I(e){const t={originPosition:d(0)},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.originPosition=d(r.getEnum());break;case 2:t.scale=r.processMessage(k);break;case 3:t.translate=r.processMessage(S);break;default:r.skip()}return t}function F(e){const t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.shapeAreaFieldName=r.getString();break;case 2:t.shapeLengthFieldName=r.getString();break;case 3:t.units=r.getString();break;default:r.skip()}return t}function T(e,t){const r=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:r.wkid=e.getUInt32();break;case 5:r.wkt=e.getString();break;case 2:r.latestWkid=e.getUInt32();break;case 3:r.vcsWkid=e.getUInt32();break;case 4:r.latestVcsWkid=e.getUInt32();break;default:e.skip()}return r}function A(e,t){const r=t.createFeatureResult(),s=e.asUnsafe();r.geometryType=f(t,0);let n=!1;for(;s.next();)switch(s.tag()){case 1:r.objectIdFieldName=s.getString();break;case 3:r.globalIdFieldName=s.getString();break;case 4:r.geohashFieldName=s.getString();break;case 5:r.geometryProperties=s.processMessage(F);break;case 7:r.geometryType=f(t,s.getEnum());break;case 8:r.spatialReference=s.processMessageWithArgs(T,t);break;case 10:r.hasZ=s.getBool();break;case 11:r.hasM=s.getBool();break;case 12:r.transform=s.processMessage(I);break;case 9:r.exceededTransferLimit=s.getBool();break;case 13:t.addField(r,s.processMessage(_));break;case 15:n||(t.prepareFeatures(r),n=!0),t.addFeature(r,s.processMessageWithArgs(w,t,r,r.fields));break;case 2:r.uniqueIdField=s.processMessage(b);break;default:s.skip()}return t.finishFeatureResult(r),r}function x(e,t){const r={};let s=null;for(;e.next();)switch(e.tag()){case 4:s=e.processMessageWithArgs(y);break;case 1:r.featureResult=e.processMessageWithArgs(A,t);break;default:e.skip()}return null!=s&&r.featureResult&&t.addQueryGeometry(r,s),r}function q(e,t){try{const r=2,s=new n.A(new Uint8Array(e),new DataView(e)),i={};for(;s.next();)s.tag()===r?i.queryResult=s.processMessageWithArgs(x,t):s.skip();return i}catch(e){throw new s.A("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},58501:(e,t,r)=>{r.d(t,{q:()=>n});var s=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,s.N)(r.geometryType,t,e.outSpatialReference);if(n)for(const e of r.features)n(e.geometry)}},58512:(e,t,r)=>{r.d(t,{A:()=>s});class s{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new s;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},66208:(e,t,r)=>{r.d(t,{m:()=>n});var s=r(53655);function n(e,t){const r=(0,s.SH)(e,t),n=r.queryResult.featureResult,i=r.queryResult.queryGeometry,o=r.queryResult.queryGeometryType;if(n&&n.features&&n.features.length&&n.objectIdFieldName){const e=n.objectIdFieldName;for(const t of n.features)t.attributes&&(t.objectId=t.attributes[e])}return n&&(n.queryGeometry=i,n.queryGeometryType=o),n}},69052:(e,t,r)=>{r.d(t,{hr:()=>n,ie:()=>c,uC:()=>a});var s=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return i(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,s.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+o(this.range,e-t,r)}minimalMonotonic(e,t,r){return i(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,s=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(s)?r:s}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function i(e,t,r,s,n=0,i=!1){return(s-=n)<t?s+=o(e,t-s):s>r&&(s-=o(e,s-r)),i&&s===r&&(s=t),s+n}function o(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const a=new n(0,2*Math.PI),c=(new n(-Math.PI,Math.PI),new n(0,360))},69397:(e,t,r)=>{r.d(t,{$B:()=>n,Qf:()=>u,Qh:()=>a,RS:()=>i,ez:()=>d,lM:()=>o,qK:()=>h});var s=r(34275);function n(e){return 32+e.length}const i=16;function o(e){if(!e)return 0;let t=h;for(const r in e)e.hasOwnProperty(r)&&(t+=c(e[r],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return u(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=d;for(let s=0;s<t;s++)r+=c(e[s]);return r}(e);let t=h;for(const r in e)e.hasOwnProperty(r)&&(t+=c(e[r]));return t}function c(e,t=!0){switch(typeof e){case"object":return t?a(e):h;case"string":return n(e);case"number":return i;case"boolean":return 4;default:return 8}}function u(...e){return e.reduce((e,t)=>e+(t?(0,s.iu)(t)?t.byteLength+f:Array.isArray(t)?l(t,i):0:0),0)}function l(e,t){return d+e.length*t}const h=32,d=16,f=145},69418:(e,t,r)=>{r.d(t,{S:()=>u,z:()=>c});var s=r(83047),n=r(21325),i=r(43334),o=r(58512),a=r(92722);const c=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class u{constructor(e){this._options=e,this.geometryTypes=c,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new o.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,n.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,s.G9)(this._options.sourceSpatialReference)/(0,s.G9)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,i.N3)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new i.Om(null,{},null,0)}createSpatialReference(){return{wkid:0}}createGeometry(){return new a.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce((e,t)=>e+t,0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new a.A}}},80754:(e,t,r)=>{r.d(t,{j7:()=>o,kS:()=>c,kd:()=>a,r8:()=>u});var s=r(82799),n=r(16930),i=r(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,i.Bi)(e)?e.rings:e.paths}},80893:(e,t,r)=>{r.d(t,{IJ:()=>d,Jf:()=>y,Pk:()=>g,eW:()=>h,gW:()=>p,kS:()=>f});var s=r(78888),n=r(84952),i=r(17136),o=r(10536),a=r(66208),c=r(5076),u=r(58501);const l="Layer does not support extent calculation.";async function h(e,t,r,s={},n){const i=t.timeExtent?.isEmpty?{data:{features:[]}}:await _(e,t,"json",s,void 0,n);return(0,u.q)(t,r,i.data),i}async function d(e,t,r,s,n){if(t.timeExtent?.isEmpty)return{data:r.createFeatureResult()};const i=await f(e,t,s,n),o=i;return o.data=(0,a.m)(i.data,r),o}function f(e,t,r={},s){return _(e,t,"pbf",r,void 0,s)}function g(e,t,r={},s){return t.timeExtent?.isEmpty?Promise.resolve({data:{objectIds:[]}}):_(e,t,"json",r,{returnIdsOnly:!0},s)}function p(e,t,r={},s){return t.timeExtent?.isEmpty?Promise.resolve({data:{count:0}}):_(e,t,"json",r,{returnIdsOnly:!0,returnCountOnly:!0},s)}async function y(e,t,r={}){if(t.timeExtent?.isEmpty)return{data:{count:0,extent:null}};const s=await _(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}),n=s.data;if(n.hasOwnProperty("extent"))return s;if(n.features)throw new Error(l);if(n.hasOwnProperty("count"))throw new Error(l);return s}function m(e,t){if(!e.returnIdsOnly||!t.uniqueIdFields)return e;const r={...e,returnUniqueIdsOnly:!0};return delete r.returnIdsOnly,r}async function _(e,t,r,a,u={},l={}){const h="string"==typeof e?(0,n.An)(e):e,d=t.geometry?[t.geometry]:[],f=await(0,i.el)(d,null,{signal:a.signal}),g=f?.[0];if(null!=g){const e=t.clone();e.geometry=g.clone(),t=e}const p=(0,o.z)({...h.query,f:r,...m(u,l),...(y=t,_=u,b=l,(0,c.i)(y,_,b))});var y,_,b;return(0,s.A)((0,n.fj)(h.path,function(e,t){return null!=e.formatOf3DObjects&&!(t.returnCountOnly||t.returnExtentOnly||t.returnIdsOnly)}(t,u)?"query3d":"query"),{...a,responseType:"pbf"===r?"array-buffer":"json",query:{...p,...a.query}})}},92300:(e,t,r)=>{r.d(t,{V:()=>i,X:()=>n});var s=r(65864);function n(e){return{geometryType:(0,s.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function i(e,t,r){const n=(0,s.xD)(t);return e.map(e=>{const t=n.fromJSON(e);return t.spatialReference=r,t})}},92722:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(69397);class n{constructor(e=[],t=[],r=!1,s=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=s}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:s}){return new n(e,t,r||!1,s||!1)}static fromRect([e,t,r,s]){const i=r-e,o=s-t;return new n([5],[e,t,i,0,0,o,-i,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,s.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let e=0,t=0;for(const r of this.lengths){if(r<3)continue;const{stride:s}=this;let n=this.coords[s*t],i=this.coords[s*t+1];for(let o=1;o<r;o+=1){const r=s*(t+o),a=this.coords[r],c=this.coords[r+1];e+=-.5*(a-n)*(c+i),n=a,i=c}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);const{stride:r}=this;for(const s of this.lengths){for(let n=0;n<s;n++){const s=r*(t+n);e(this.coords[s],this.coords[s+1])}t+=s}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let s=0;const{stride:n}=this;for(const e of r){for(let r=1;r<e;r++){const e=n*(s+r);t[e]+=t[e-n],t[e+1]+=t[e+1-n]}s+=e}return e}clone(e){if(this.isPoint)return new n([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const{stride:t,size:r}=this,s=r*t,i=this.coords.slice(0,s);return e?(e.set(i),new n(this.lengths,e)):new n(Array.from(this.lengths),Array.from(i),this.hasZ,this.hasM)}justXY(){const{stride:e,size:t}=this;if(2===e)return this;const r=new Array(t*e);for(let t=0,s=0;t<r.length;t+=e)r[s++]=this.coords[t],r[s++]=this.coords[t+1];return new n(this.lengths,r,!1,!1)}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6730],{8303:(e,t,r)=>{r.d(t,{A:()=>x});var i=r(31635),n=r(92602),s=r(70333),a=r(78888),o=r(60999),l=r(49186),u=r(53966),c=r(97768),h=r(74887),d=r(84952),p=r(10107),g=(r(44208),r(87811),r(36005)),f=r(64108),m=r(43937),y=r(77548),v=r(20655),M=r(80812),S=r(41318),w=r(10407);const x=e=>{const t=e;let x=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(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 M.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,h.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,h.zf)(e)||u.A.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.QP)(e),!0)))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,h.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!s.id?.findCredential(this.url),n=e===r.id;if(n&&r.portal.user)return this._getUserPrivileges(r,i);let a,o;if(n)a=r.portal.url;else try{a=await(0,y.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!a||!(0,d.b8)(a,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(s.id?.getCredential(`${a}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const l=!0,u=!1,c=!1;if(!o)return{features:{edit:l,fullEdit:u},content:{updateItem:c}};try{if(n?await r.reload():(r=new M.default({id:e,portal:{url:a}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,h.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=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=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(i))return n.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,o.Ke)((0,a.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?S.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("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,i.Cg)([(0,p.MZ)({type:M.default})],x.prototype,"portalItem",null),(0,i.Cg)([(0,g.w)("web-document","portalItem",["itemId"])],x.prototype,"readPortalItem",null),(0,i.Cg)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],x.prototype,"writePortalItem",null),(0,i.Cg)([(0,p.MZ)({clonable:!1})],x.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],x.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],x.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],x.prototype,"userHasUpdateItemPrivileges",void 0),x=(0,i.Cg)([(0,f.$)("esri.layers.mixins.PortalLayer")],x),x},b={credential:null,user:null}},10407:(e,t,r)=>{r.d(t,{It:()=>p,LG:()=>a,OM:()=>u,Sm:()=>c,Y:()=>o,bK:()=>l,mm:()=>d,sQ:()=>h});var i=r(91218),n=r(16930),s=r(28735);function a(e,t){if(!o(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function o(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return o(e,d.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function c(e,t,r){r?a(e,t):u(e,t)}async function h(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);const r=n.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(r)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function p(e){const{portal:t,isOrgItem:r,itemControl:i}=e,n=t.user?.privileges;let s=!n||n.includes("features:user:edit"),a=!!r&&!!n?.includes("features:user:fullEdit");const o="update"===i||"admin"===i;return o?a=s=!0:a&&(s=!0),{features:{edit:s,fullEdit:a},content:{updateItem:o}}}},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(31635),n=r(53966),s=r(10107),a=(r(44208),r(87811),r(64108)),o=r(60694);const l=e=>{const t=e;let r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,n.A.getLogger(this)))}};return(0,i.Cg)([(0,s.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,s.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,a.$)("esri.layers.mixins.ArcGISService")],r),r}},25036:(e,t,r)=>{r.d(t,{j:()=>a});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(64108));const a=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;void 0!==t?.effectiveScaleRange&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i.Cg)([(0,n.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,n.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.ScaleRangeLayer")],r),r}},36475:(e,t,r)=>{r.r(t),r.d(t,{default:()=>C});var i=r(31635),n=r(78888),s=r(49186),a=r(44208),o=r(53966),l=r(92071),u=r(74887),c=r(10107),h=(r(87811),r(64108)),d=r(5443),p=r(16930),g=r(4146),f=r(52136),m=r(18768),y=r(69208),v=r(16131),M=r(8303),S=r(25036),w=r(10873),x=r(88546),b=r(56776);let _=class extends((0,m.b)((0,v.q)((0,M.A)((0,S.j)((0,l.P)((0,y.d)((0,f.p)(g.A)))))))){constructor(e){super(e),this.operationalLayerType="GaussianSplatLayer",this.type="gaussian-splat",this.opacity=1,this.minScale=0,this.maxScale=0,this.url=null,this.rootTilesetJSON=null,this.fullExtent=new d.A(-180,-90,180,90,this.spatialReference),this.spatialReference=new p.A({wkid:4326,vcsWkid:115700}),this.esriCrsSpatialReference=null,this.esriCrsFullExtent=null}get supportedSpatialReferences(){return this.initialized&&this.esriCrsSpatialReference?[this.spatialReference,this.esriCrsSpatialReference]:[this.spatialReference]}get fullExtents(){return this.initialized&&this.esriCrsFullExtent?[this.fullExtent,this.esriCrsFullExtent]:[this.fullExtent]}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const t=null!=e?e.signal:null;if(!(0,a.A)("enable-feature:gaussianSplatLayer"))throw new s.A("GaussianSplatLayer-init:not-supported","This layer is currently not supported.");try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("GaussianSplat"))return!0;throw new s.A("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service"})}},e)}catch(e){(0,u.QP)(e)}if(this.url){const e=(0,n.A)(this.url,{query:{...this.customParameters,token:this.apiKey},responseType:"json",signal:t}).then(e=>{this.rootTilesetJSON=e.data;const t=(0,x._8)(this.rootTilesetJSON);this.fullExtent=(0,x.uB)(this.rootTilesetJSON,!1),this.spatialReference=this.fullExtent.spatialReference,t&&(this.esriCrsFullExtent=(0,x.uB)(this.rootTilesetJSON,!0),this.esriCrsSpatialReference=this.esriCrsFullExtent.spatialReference)},e=>{(0,u.QP)(e)});await e}}_validateElevationInfo(e){const t="Gaussian Splat layers";(0,b.XF)(o.A.getLogger(this),(0,b.B)(t,"absolute-height",e)),(0,b.XF)(o.A.getLogger(this),(0,b.tW)(t,e))}};(0,i.Cg)([(0,c.MZ)({type:["GaussianSplatLayer"]})],_.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],_.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],_.prototype,"opacity",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],_.prototype,"minScale",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],_.prototype,"maxScale",void 0),(0,i.Cg)([(0,c.MZ)(w.OZ)],_.prototype,"url",void 0),(0,i.Cg)([(0,c.MZ)({type:d.A})],_.prototype,"fullExtent",void 0),(0,i.Cg)([(0,c.MZ)({type:p.A})],_.prototype,"spatialReference",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],_.prototype,"supportedSpatialReferences",null),(0,i.Cg)([(0,c.MZ)({type:[d.A]})],_.prototype,"fullExtents",null),(0,i.Cg)([(0,c.MZ)({type:["show","hide"]})],_.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)(w.Yj)],_.prototype,"elevationInfo",null),_=(0,i.Cg)([(0,h.$)("esri.layers.GaussianSplatLayer")],_);const C=_},38954:(e,t,r)=>{r.d(t,{A:()=>g,B:()=>p,C:()=>c,D:()=>h,E:()=>O,F:()=>Z,H:()=>G,a:()=>k,b:()=>s,c:()=>y,d:()=>a,e:()=>u,f:()=>_,g:()=>l,h:()=>m,i:()=>C,j:()=>o,k:()=>v,l:()=>A,m:()=>S,n:()=>b,o:()=>R,q:()=>L,r:()=>x,s:()=>M,t:()=>E,u:()=>w,v:()=>I,w:()=>d,x:()=>j,y:()=>D,z:()=>f});var i=r(51850),n=r(34304);function s(e){const t=e[0],r=e[1],i=e[2];return Math.sqrt(t*t+r*r+i*i)}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function o(e,t,r,i){return e[0]=t,e[1]=r,e[2]=i,e}function l(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function u(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function c(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function h(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function d(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function p(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function g(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}function f(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}function m(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function y(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e}function v(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+i*i+n*n)}function M(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return r*r+i*i+n*n}function S(e){const t=e[0],r=e[1],i=e[2];return t*t+r*r+i*i}function w(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function x(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function b(e,t){const r=t[0],i=t[1],n=t[2];let s=r*r+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s),e}function _(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function C(e,t,r){const i=t[0],n=t[1],s=t[2],a=r[0],o=r[1],l=r[2];return e[0]=n*l-s*o,e[1]=s*a-i*l,e[2]=i*o-n*a,e}function A(e,t,r,i){const n=t[0],s=t[1],a=t[2];return e[0]=n+i*(r[0]-n),e[1]=s+i*(r[1]-s),e[2]=a+i*(r[2]-a),e}function E(e,t,r){const i=t[0],n=t[1],s=t[2];return e[0]=r[0]*i+r[4]*n+r[8]*s+r[12],e[1]=r[1]*i+r[5]*n+r[9]*s+r[13],e[2]=r[2]*i+r[6]*n+r[10]*s+r[14],e}function R(e,t,r){const i=t[0],n=t[1],s=t[2];return e[0]=i*r[0]+n*r[3]+s*r[6],e[1]=i*r[1]+n*r[4]+s*r[7],e[2]=i*r[2]+n*r[5]+s*r[8],e}function I(e,t,r){const i=r[0],n=r[1],s=r[2],a=r[3],o=t[0],l=t[1],u=t[2],c=n*u-s*l,h=s*o-i*u,d=i*l-n*o,p=n*d-s*h,g=s*c-i*d,f=i*h-n*c,m=2*a;return e[0]=o+c*m+2*p,e[1]=l+h*m+2*g,e[2]=u+d*m+2*f,e}const P=(0,i.vt)(),U=(0,i.vt)();function L(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function O(e,t,r){const i=r[0]-t[0],n=r[1]-t[1],s=r[2]-t[2];let a=i*i+n*n+s*s;return a>0?(a=1/Math.sqrt(a),e[0]=i*a,e[1]=n*a,e[2]=s*a,e):(e[0]=0,e[1]=0,e[2]=0,e)}const k=u,T=c,H=h,Z=v,j=M,G=s,D=S;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:l,angle:function(e,t){b(P,e),b(U,t);const r=_(P,U);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(e,t,r,i,n,s){const a=1-s,o=a*a,l=s*s,u=o*a,c=3*s*o,h=3*l*a,d=l*s;return e[0]=t[0]*u+r[0]*c+i[0]*h+n[0]*d,e[1]=t[1]*u+r[1]*c+i[1]*h+n[1]*d,e[2]=t[2]*u+r[2]*c+i[2]*h+n[2]*d,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,r=1){return e[0]=Math.min(Math.max(e[0],t),r),e[1]=Math.min(Math.max(e[1],t),r),e[2]=Math.min(Math.max(e[2],t),r),e},copy:a,cross:C,crossAndNormalize:function(e,t,r){const i=t[0],n=t[1],s=t[2],a=r[0],o=r[1],l=r[2],u=n*l-s*o,c=s*a-i*l,h=i*o-n*a,d=Math.sqrt(u*u+c*c+h*h);return e[0]=u/d,e[1]=c/d,e[2]=h/d,e},direction:O,dist:Z,distance:v,div:H,divide:h,dot:_,equals:function(e,t){if(e===t)return!0;const r=e[0],i=e[1],s=e[2],a=t[0],o=t[1],l=t[2],u=(0,n.FD)();return Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-o)<=u*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(s-l)<=u*Math.max(1,Math.abs(s),Math.abs(l))},exactEquals:L,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,r,i,n,s){const a=s*s,o=a*(2*s-3)+1,l=a*(s-2)+s,u=a*(s-1),c=a*(3-2*s);return e[0]=t[0]*o+r[0]*l+i[0]*u+n[0]*c,e[1]=t[1]*o+r[1]*l+i[1]*u+n[1]*c,e[2]=t[2]*o+r[2]*l+i[2]*u+n[2]*c,e},inverse:x,len:G,length:s,lerp:A,max:f,min:g,mul:T,multiply:c,negate:w,normalize:b,random:function(e,t=1){const r=n.Ov,i=2*r()*Math.PI,s=2*r()-1,a=Math.sqrt(1-s*s)*t;return e[0]=Math.cos(i)*a,e[1]=Math.sin(i)*a,e[2]=s*t,e},rotateX:function(e,t,r,i){const n=[],s=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],s[0]=n[0],s[1]=n[1]*Math.cos(i)-n[2]*Math.sin(i),s[2]=n[1]*Math.sin(i)+n[2]*Math.cos(i),e[0]=s[0]+r[0],e[1]=s[1]+r[1],e[2]=s[2]+r[2],e},rotateY:function(e,t,r,i){const n=[],s=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],s[0]=n[2]*Math.sin(i)+n[0]*Math.cos(i),s[1]=n[1],s[2]=n[2]*Math.cos(i)-n[0]*Math.sin(i),e[0]=s[0]+r[0],e[1]=s[1]+r[1],e[2]=s[2]+r[2],e},rotateZ:function(e,t,r,i){const n=[],s=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],s[0]=n[0]*Math.cos(i)-n[1]*Math.sin(i),s[1]=n[0]*Math.sin(i)+n[1]*Math.cos(i),s[2]=n[2],e[0]=s[0]+r[0],e[1]=s[1]+r[1],e[2]=s[2]+r[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:m,scaleAndAdd:y,set:o,sign:p,sqrDist:j,sqrLen:D,squaredDistance:M,squaredLength:S,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:k,subtract:u,transformMat3:R,transformMat4:E,transformQuat:I},Symbol.toStringTag,{value:"Module"}))},52136:(e,t,r)=>{r.d(t,{p:()=>a});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(64108));const a=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],r),r}},54239:(e,t,r)=>{r.d(t,{A:()=>y});var i,n=r(31635),s=r(4576),a=r(66552),o=r(25482),l=r(83047),u=r(67076),c=r(10107),h=(r(44208),r(53966),r(36005)),d=r(64108),p=r(43937);const g=(0,a.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=g.jsonValues.slice();(0,s.Xy)(f,"orthometric");const m=(0,a.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let y=i=class extends o.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return g.write(e,t,r)}readHeightModel(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return m.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||m.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.k1)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,n.Cg)([(0,c.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal",write:{isRequired:!0}}}}})],y.prototype,"heightModel",void 0),(0,n.Cg)([(0,p.K)("web-scene","heightModel")],y.prototype,"writeHeightModel",null),(0,n.Cg)([(0,h.w)(["web-scene","service"],"heightModel")],y.prototype,"readHeightModel",null),(0,n.Cg)([(0,c.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:{writer:m.write,isRequired:!0}}}}})],y.prototype,"heightUnit",void 0),(0,n.Cg)([(0,h.w)("web-scene","heightUnit")],y.prototype,"readHeightUnit",null),(0,n.Cg)([(0,h.w)("service","heightUnit")],y.prototype,"readHeightUnitService",null),(0,n.Cg)([(0,c.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],y.prototype,"vertCRS",void 0),(0,n.Cg)([(0,h.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],y.prototype,"readVertCRS",null),y=i=(0,n.Cg)([(0,d.$)("esri.geometry.HeightModelInfo")],y)},60999:(e,t,r)=>{r.d(t,{DZ:()=>g,Ke:()=>p,Tj:()=>c,UT:()=>f,aD:()=>y,jJ:()=>u});var i=r(31635),n=r(69622),s=r(97768),a=r(74887),o=r(10107),l=r(64108);function u(e,t,r){return(0,a.Lx)(e.map((e,i)=>t.apply(r,[e,i])))}async function c(e,t,r){return(await(0,a.Lx)(e.map((e,i)=>t.apply(r,[e,i])))).map(e=>e.value)}function h(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function g(e){try{return h(await e)}catch(e){return(0,a.QP)(e),d(e)}}function f(e,t){return new m(e,t)}let m=class extends n.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,s.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,a.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,s.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,o.MZ)()],m.prototype,"value",null),(0,i.Cg)([(0,o.MZ)()],m.prototype,"error",null),(0,i.Cg)([(0,o.MZ)()],m.prototype,"finished",null),(0,i.Cg)([(0,o.MZ)()],m.prototype,"promise",void 0),(0,i.Cg)([(0,o.MZ)()],m.prototype,"_result",void 0),m=(0,i.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],m);class y{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,i.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}}},69208:(e,t,r)=>{r.d(t,{d:()=>a});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(64108));const a=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],r),r}},69540:(e,t,r)=>{r.d(t,{OU:()=>c,Pw:()=>h});var i=r(31635),n=r(69622),s=(r(44208),r(4718)),a=(r(53966),r(97768)),o=r(88620),l=r(64108);const u=Symbol("ClonableMixin"),c=e=>{var t;const r=e;let n=class extends r{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,o.oY)(this);(0,a.Lw)(t,"unable to clone instance of non-accessor class");const r=t.metadata,i=t.store,n={},l=new Map;for(const t in r){const a=r[t],o=i?.originOf(t),u=a.clonable;if(a.readOnly||!1===u||7!==o&&0!==o&&5!==o&&4!==o)continue;const c=this[t];let h=null;if("function"==typeof u)h=u(c,e);else if("reference"===u)h=c;else if(h=(0,s.TU)(c,e),null!=c&&null==h)continue;0===o?l.set(t,h):n[t]=h}const u=new(0,Object.getPrototypeOf(this).constructor)(n);if(l.size){const e=(0,o.oY)(u)?.store;if(e)for(const[t,r]of l)e.set(t,r,0)}return u}};return n=(0,i.Cg)([(0,l.$)("esri.core.Clonable")],n),n},h=c(n.A)},78553:(e,t,r)=>{r.d(t,{D:()=>s,p:()=>n});var i=r(56507);function n(e){const t=(0,i.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function s(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},88546:(e,t,r)=>{r.d(t,{_8:()=>g,uB:()=>f});var i=r(34727),n=r(38954),s=r(51850),a=r(73941),o=r(5443),l=r(54239),u=r(16930),c=r(9762);function h(e,t){if(!Array.isArray(e)||e.length<t)return!1;for(const t of e)if("number"!=typeof t)return!1;return!0}const d=7645211,p={xmin:-180,ymin:-90,zmin:-450,xmax:180,ymax:90,zmax:8850};function g(e){return!(!(e.extensions?.ESRI_crs?.wkid||e.extensions?.ESRI_crs?.latestWkid||e.extensions?.ESRI_crs?.wkt)||!e.root?.extensions?.ESRI_crs?.boundingVolume?.box&&!e.root?.extensions?.ESRI_crs?.boundingVolume?.sphere)}function f(e,t=!1){let r=new u.A({wkid:4326,vcsWkid:115700}),l=e.root?.boundingVolume,g=!1,f=e?.root?.transform;if(t&&(e.extensions?.ESRI_crs?.wkid||e.extensions?.ESRI_crs?.latestWkid||e.extensions?.ESRI_crs?.wkt)&&(e.root?.extensions?.ESRI_crs?.boundingVolume?.box||e.root?.extensions?.ESRI_crs?.boundingVolume?.sphere))r=new u.A(e.extensions?.ESRI_crs),l=e.root?.extensions?.ESRI_crs?.boundingVolume,f=e.root?.transform,g=!0;else if(!l)return new o.A(-180,-90,180,90,r);if(l.box){const e=l?.box;if(e[3]>d&&e[7]>d&&e[11]>d)return new o.A({...p,spatialReference:r})}const m=(0,s.vt)();if(!g&&l.region&&h(l.region,6)){const e=l.region,t=(0,i.KJ)(e[0]),n=(0,i.KJ)(e[1]),s=e[4],a=(0,i.KJ)(e[2]),u=(0,i.KJ)(e[3]),c=e[5];return new o.A({xmin:t,ymin:n,zmin:s,xmax:a,ymax:u,zmax:c,spatialReference:r})}if(l.sphere&&h(l.sphere,4)){const e=l.sphere,t=(0,s.fA)(e[0],e[1],e[2]),i=e[3]/Math.sqrt(3),d=(0,s.vt)();(0,n.e)(d,t,(0,s.fA)(i,i,i));const p=(0,s.vt)();if((0,n.g)(p,t,(0,s.fA)(i,i,i)),f&&h(f,16)){const e=f;(0,n.t)(m,d,e),(0,n.d)(d,m),(0,n.t)(m,p,e),(0,n.d)(p,m)}g||((0,c.projectBuffer)(d,a.Ro,0,d,u.A.WGS84,0),(0,c.projectBuffer)(p,a.Ro,0,p,u.A.WGS84,0));const y=(0,s.vt)(),v=(0,s.vt)();return(0,n.A)(y,d,p),(0,n.z)(v,d,p),new o.A({xmin:y[0],ymin:y[1],zmin:y[2],xmax:v[0],ymax:v[1],zmax:v[2],spatialReference:r})}if(l.box&&h(l.box,12)){const e=l.box,t=(0,s.fA)(e[0],e[1],e[2]),i=(0,s.fA)(e[3],e[4],e[5]),d=(0,s.fA)(e[6],e[7],e[8]),p=(0,s.fA)(e[9],e[10],e[11]),m=[];for(let e=0;e<8;++e)m.push((0,s.vt)());if((0,n.g)(m[0],t,i),(0,n.g)(m[0],m[0],d),(0,n.g)(m[0],m[0],p),(0,n.a)(m[1],t,i),(0,n.g)(m[1],m[1],d),(0,n.g)(m[1],m[1],p),(0,n.g)(m[2],t,i),(0,n.a)(m[2],m[2],d),(0,n.g)(m[2],m[2],p),(0,n.a)(m[3],t,i),(0,n.a)(m[3],m[3],d),(0,n.g)(m[3],m[3],p),(0,n.g)(m[4],t,i),(0,n.g)(m[4],m[4],d),(0,n.a)(m[4],m[4],p),(0,n.a)(m[5],t,i),(0,n.g)(m[5],m[5],d),(0,n.a)(m[5],m[5],p),(0,n.g)(m[6],t,i),(0,n.a)(m[6],m[6],d),(0,n.a)(m[6],m[6],p),(0,n.a)(m[7],t,i),(0,n.a)(m[7],m[7],d),(0,n.a)(m[7],m[7],p),f&&h(f,16)){const e=f;for(let t=0;t<8;++t)(0,n.t)(m[t],m[t],e)}const y=(0,s.fA)(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),v=(0,s.fA)(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);for(let e=0;e<8;++e)g||(0,c.projectBuffer)(m[e],a.Ro,0,m[e],u.A.WGS84,0),(0,n.A)(v,v,m[e]),(0,n.z)(y,y,m[e]);return new o.A({xmin:v[0],ymin:v[1],zmin:v[2],xmax:y[0],ymax:y[1],zmax:y[2],spatialReference:r})}return new o.A(-180,-90,180,90,r)}new Map([[5773,new l.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM96_Geoid"})],[3855,new l.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM2008_Geoid"})],[115700,new l.A({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"WGS_1984"})],[115701,new l.A({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"ETRS_1989"})],[6360,new l.A({heightModel:"gravity-related-height",heightUnit:"us-feet",vertCRS:"NAVD88_height_(ftUS)"})],[7837,new l.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"DHHN2016_(height) "})]])}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6730],{8303:(e,t,r)=>{r.d(t,{A:()=>x});var i=r(31635),n=r(92602),s=r(70333),a=r(78888),o=r(60999),l=r(49186),u=r(53966),c=r(97768),h=r(74887),d=r(84952),p=r(10107),g=(r(44208),r(87811),r(36005)),f=r(64108),m=r(43937),y=r(77548),v=r(20655),M=r(80812),S=r(41318),w=r(10407);const x=e=>{const t=e;let x=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(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 M.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,h.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,h.zf)(e)||u.A.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.QP)(e),!0)))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,h.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!s.id?.findCredential(this.url),n=e===r.id;if(n&&r.portal.user)return this._getUserPrivileges(r,i);let a,o;if(n)a=r.portal.url;else try{a=await(0,y.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!a||!(0,d.b8)(a,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(s.id?.getCredential(`${a}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const l=!0,u=!1,c=!1;if(!o)return{features:{edit:l,fullEdit:u},content:{updateItem:c}};try{if(n?await r.reload():(r=new M.default({id:e,portal:{url:a}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,h.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=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=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(i))return n.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,o.Ke)((0,a.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?S.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("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,i.Cg)([(0,p.MZ)({type:M.default})],x.prototype,"portalItem",null),(0,i.Cg)([(0,g.w)("web-document","portalItem",["itemId"])],x.prototype,"readPortalItem",null),(0,i.Cg)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],x.prototype,"writePortalItem",null),(0,i.Cg)([(0,p.MZ)({clonable:!1})],x.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],x.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],x.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],x.prototype,"userHasUpdateItemPrivileges",void 0),x=(0,i.Cg)([(0,f.$)("esri.layers.mixins.PortalLayer")],x),x},b={credential:null,user:null}},10407:(e,t,r)=>{r.d(t,{It:()=>p,LG:()=>a,OM:()=>u,Sm:()=>c,Y:()=>o,bK:()=>l,mm:()=>d,sQ:()=>h});var i=r(91218),n=r(16930),s=r(28735);function a(e,t){if(!o(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function o(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return o(e,d.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function c(e,t,r){r?a(e,t):u(e,t)}async function h(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);const r=n.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(r)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function p(e){const{portal:t,isOrgItem:r,itemControl:i}=e,n=t.user?.privileges;let s=!n||n.includes("features:user:edit"),a=!!r&&!!n?.includes("features:user:fullEdit");const o="update"===i||"admin"===i;return o?a=s=!0:a&&(s=!0),{features:{edit:s,fullEdit:a},content:{updateItem:o}}}},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(31635),n=r(53966),s=r(10107),a=(r(44208),r(87811),r(64108)),o=r(60694);const l=e=>{const t=e;let r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,n.A.getLogger(this)))}};return(0,i.Cg)([(0,s.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,s.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,a.$)("esri.layers.mixins.ArcGISService")],r),r}},25036:(e,t,r)=>{r.d(t,{j:()=>a});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(64108));const a=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;void 0!==t?.effectiveScaleRange&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i.Cg)([(0,n.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,n.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.ScaleRangeLayer")],r),r}},36475:(e,t,r)=>{r.r(t),r.d(t,{default:()=>C});var i=r(31635),n=r(78888),s=r(49186),a=r(44208),o=r(53966),l=r(25728),u=r(74887),c=r(10107),h=(r(87811),r(64108)),d=r(5443),p=r(16930),g=r(4146),f=r(52136),m=r(18768),y=r(69208),v=r(16131),M=r(8303),S=r(25036),w=r(10873),x=r(88546),b=r(56776);let _=class extends((0,m.b)((0,v.q)((0,M.A)((0,S.j)((0,l.P)((0,y.d)((0,f.p)(g.A)))))))){constructor(e){super(e),this.operationalLayerType="GaussianSplatLayer",this.type="gaussian-splat",this.opacity=1,this.minScale=0,this.maxScale=0,this.url=null,this.rootTilesetJSON=null,this.fullExtent=new d.A(-180,-90,180,90,this.spatialReference),this.spatialReference=new p.A({wkid:4326,vcsWkid:115700}),this.esriCrsSpatialReference=null,this.esriCrsFullExtent=null}get supportedSpatialReferences(){return this.initialized&&this.esriCrsSpatialReference?[this.spatialReference,this.esriCrsSpatialReference]:[this.spatialReference]}get fullExtents(){return this.initialized&&this.esriCrsFullExtent?[this.fullExtent,this.esriCrsFullExtent]:[this.fullExtent]}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const t=null!=e?e.signal:null;if(!(0,a.A)("enable-feature:gaussianSplatLayer"))throw new s.A("GaussianSplatLayer-init:not-supported","This layer is currently not supported.");try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("GaussianSplat"))return!0;throw new s.A("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service"})}},e)}catch(e){(0,u.QP)(e)}if(this.url){const e=(0,n.A)(this.url,{query:{...this.customParameters,token:this.apiKey},responseType:"json",signal:t}).then(e=>{this.rootTilesetJSON=e.data;const t=(0,x._8)(this.rootTilesetJSON);this.fullExtent=(0,x.uB)(this.rootTilesetJSON,!1),this.spatialReference=this.fullExtent.spatialReference,t&&(this.esriCrsFullExtent=(0,x.uB)(this.rootTilesetJSON,!0),this.esriCrsSpatialReference=this.esriCrsFullExtent.spatialReference)},e=>{(0,u.QP)(e)});await e}}_validateElevationInfo(e){const t="Gaussian Splat layers";(0,b.XF)(o.A.getLogger(this),(0,b.B)(t,"absolute-height",e)),(0,b.XF)(o.A.getLogger(this),(0,b.tW)(t,e))}};(0,i.Cg)([(0,c.MZ)({type:["GaussianSplatLayer"]})],_.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],_.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],_.prototype,"opacity",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],_.prototype,"minScale",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],_.prototype,"maxScale",void 0),(0,i.Cg)([(0,c.MZ)(w.OZ)],_.prototype,"url",void 0),(0,i.Cg)([(0,c.MZ)({type:d.A})],_.prototype,"fullExtent",void 0),(0,i.Cg)([(0,c.MZ)({type:p.A})],_.prototype,"spatialReference",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],_.prototype,"supportedSpatialReferences",null),(0,i.Cg)([(0,c.MZ)({type:[d.A]})],_.prototype,"fullExtents",null),(0,i.Cg)([(0,c.MZ)({type:["show","hide"]})],_.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)(w.Yj)],_.prototype,"elevationInfo",null),_=(0,i.Cg)([(0,h.$)("esri.layers.GaussianSplatLayer")],_);const C=_},38954:(e,t,r)=>{r.d(t,{A:()=>g,B:()=>p,C:()=>c,D:()=>h,E:()=>O,F:()=>Z,H:()=>G,a:()=>k,b:()=>s,c:()=>y,d:()=>a,e:()=>u,f:()=>_,g:()=>l,h:()=>m,i:()=>C,j:()=>o,k:()=>v,l:()=>A,m:()=>S,n:()=>b,o:()=>R,q:()=>L,r:()=>x,s:()=>M,t:()=>E,u:()=>w,v:()=>I,w:()=>d,x:()=>j,y:()=>D,z:()=>f});var i=r(51850),n=r(34304);function s(e){const t=e[0],r=e[1],i=e[2];return Math.sqrt(t*t+r*r+i*i)}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function o(e,t,r,i){return e[0]=t,e[1]=r,e[2]=i,e}function l(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function u(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function c(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function h(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function d(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function p(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function g(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}function f(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}function m(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function y(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e}function v(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+i*i+n*n)}function M(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return r*r+i*i+n*n}function S(e){const t=e[0],r=e[1],i=e[2];return t*t+r*r+i*i}function w(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function x(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function b(e,t){const r=t[0],i=t[1],n=t[2];let s=r*r+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s),e}function _(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function C(e,t,r){const i=t[0],n=t[1],s=t[2],a=r[0],o=r[1],l=r[2];return e[0]=n*l-s*o,e[1]=s*a-i*l,e[2]=i*o-n*a,e}function A(e,t,r,i){const n=t[0],s=t[1],a=t[2];return e[0]=n+i*(r[0]-n),e[1]=s+i*(r[1]-s),e[2]=a+i*(r[2]-a),e}function E(e,t,r){const i=t[0],n=t[1],s=t[2];return e[0]=r[0]*i+r[4]*n+r[8]*s+r[12],e[1]=r[1]*i+r[5]*n+r[9]*s+r[13],e[2]=r[2]*i+r[6]*n+r[10]*s+r[14],e}function R(e,t,r){const i=t[0],n=t[1],s=t[2];return e[0]=i*r[0]+n*r[3]+s*r[6],e[1]=i*r[1]+n*r[4]+s*r[7],e[2]=i*r[2]+n*r[5]+s*r[8],e}function I(e,t,r){const i=r[0],n=r[1],s=r[2],a=r[3],o=t[0],l=t[1],u=t[2],c=n*u-s*l,h=s*o-i*u,d=i*l-n*o,p=n*d-s*h,g=s*c-i*d,f=i*h-n*c,m=2*a;return e[0]=o+c*m+2*p,e[1]=l+h*m+2*g,e[2]=u+d*m+2*f,e}const P=(0,i.vt)(),U=(0,i.vt)();function L(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function O(e,t,r){const i=r[0]-t[0],n=r[1]-t[1],s=r[2]-t[2];let a=i*i+n*n+s*s;return a>0?(a=1/Math.sqrt(a),e[0]=i*a,e[1]=n*a,e[2]=s*a,e):(e[0]=0,e[1]=0,e[2]=0,e)}const k=u,T=c,H=h,Z=v,j=M,G=s,D=S;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:l,angle:function(e,t){b(P,e),b(U,t);const r=_(P,U);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(e,t,r,i,n,s){const a=1-s,o=a*a,l=s*s,u=o*a,c=3*s*o,h=3*l*a,d=l*s;return e[0]=t[0]*u+r[0]*c+i[0]*h+n[0]*d,e[1]=t[1]*u+r[1]*c+i[1]*h+n[1]*d,e[2]=t[2]*u+r[2]*c+i[2]*h+n[2]*d,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,r=1){return e[0]=Math.min(Math.max(e[0],t),r),e[1]=Math.min(Math.max(e[1],t),r),e[2]=Math.min(Math.max(e[2],t),r),e},copy:a,cross:C,crossAndNormalize:function(e,t,r){const i=t[0],n=t[1],s=t[2],a=r[0],o=r[1],l=r[2],u=n*l-s*o,c=s*a-i*l,h=i*o-n*a,d=Math.sqrt(u*u+c*c+h*h);return e[0]=u/d,e[1]=c/d,e[2]=h/d,e},direction:O,dist:Z,distance:v,div:H,divide:h,dot:_,equals:function(e,t){if(e===t)return!0;const r=e[0],i=e[1],s=e[2],a=t[0],o=t[1],l=t[2],u=(0,n.FD)();return Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-o)<=u*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(s-l)<=u*Math.max(1,Math.abs(s),Math.abs(l))},exactEquals:L,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,r,i,n,s){const a=s*s,o=a*(2*s-3)+1,l=a*(s-2)+s,u=a*(s-1),c=a*(3-2*s);return e[0]=t[0]*o+r[0]*l+i[0]*u+n[0]*c,e[1]=t[1]*o+r[1]*l+i[1]*u+n[1]*c,e[2]=t[2]*o+r[2]*l+i[2]*u+n[2]*c,e},inverse:x,len:G,length:s,lerp:A,max:f,min:g,mul:T,multiply:c,negate:w,normalize:b,random:function(e,t=1){const r=n.Ov,i=2*r()*Math.PI,s=2*r()-1,a=Math.sqrt(1-s*s)*t;return e[0]=Math.cos(i)*a,e[1]=Math.sin(i)*a,e[2]=s*t,e},rotateX:function(e,t,r,i){const n=[],s=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],s[0]=n[0],s[1]=n[1]*Math.cos(i)-n[2]*Math.sin(i),s[2]=n[1]*Math.sin(i)+n[2]*Math.cos(i),e[0]=s[0]+r[0],e[1]=s[1]+r[1],e[2]=s[2]+r[2],e},rotateY:function(e,t,r,i){const n=[],s=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],s[0]=n[2]*Math.sin(i)+n[0]*Math.cos(i),s[1]=n[1],s[2]=n[2]*Math.cos(i)-n[0]*Math.sin(i),e[0]=s[0]+r[0],e[1]=s[1]+r[1],e[2]=s[2]+r[2],e},rotateZ:function(e,t,r,i){const n=[],s=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],s[0]=n[0]*Math.cos(i)-n[1]*Math.sin(i),s[1]=n[0]*Math.sin(i)+n[1]*Math.cos(i),s[2]=n[2],e[0]=s[0]+r[0],e[1]=s[1]+r[1],e[2]=s[2]+r[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:m,scaleAndAdd:y,set:o,sign:p,sqrDist:j,sqrLen:D,squaredDistance:M,squaredLength:S,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:k,subtract:u,transformMat3:R,transformMat4:E,transformQuat:I},Symbol.toStringTag,{value:"Module"}))},52136:(e,t,r)=>{r.d(t,{p:()=>a});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(64108));const a=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],r),r}},54239:(e,t,r)=>{r.d(t,{A:()=>y});var i,n=r(31635),s=r(4576),a=r(66552),o=r(25482),l=r(83047),u=r(67076),c=r(10107),h=(r(44208),r(53966),r(36005)),d=r(64108),p=r(43937);const g=(0,a.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=g.jsonValues.slice();(0,s.Xy)(f,"orthometric");const m=(0,a.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let y=i=class extends o.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return g.write(e,t,r)}readHeightModel(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return m.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||m.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.k1)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,n.Cg)([(0,c.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal",write:{isRequired:!0}}}}})],y.prototype,"heightModel",void 0),(0,n.Cg)([(0,p.K)("web-scene","heightModel")],y.prototype,"writeHeightModel",null),(0,n.Cg)([(0,h.w)(["web-scene","service"],"heightModel")],y.prototype,"readHeightModel",null),(0,n.Cg)([(0,c.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:{writer:m.write,isRequired:!0}}}}})],y.prototype,"heightUnit",void 0),(0,n.Cg)([(0,h.w)("web-scene","heightUnit")],y.prototype,"readHeightUnit",null),(0,n.Cg)([(0,h.w)("service","heightUnit")],y.prototype,"readHeightUnitService",null),(0,n.Cg)([(0,c.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],y.prototype,"vertCRS",void 0),(0,n.Cg)([(0,h.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],y.prototype,"readVertCRS",null),y=i=(0,n.Cg)([(0,d.$)("esri.geometry.HeightModelInfo")],y)},60999:(e,t,r)=>{r.d(t,{DZ:()=>g,Ke:()=>p,Tj:()=>c,UT:()=>f,aD:()=>y,jJ:()=>u});var i=r(31635),n=r(69622),s=r(97768),a=r(74887),o=r(10107),l=r(64108);function u(e,t,r){return(0,a.Lx)(e.map((e,i)=>t.apply(r,[e,i])))}async function c(e,t,r){return(await(0,a.Lx)(e.map((e,i)=>t.apply(r,[e,i])))).map(e=>e.value)}function h(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function g(e){try{return h(await e)}catch(e){return(0,a.QP)(e),d(e)}}function f(e,t){return new m(e,t)}let m=class extends n.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,s.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,a.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,s.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,o.MZ)()],m.prototype,"value",null),(0,i.Cg)([(0,o.MZ)()],m.prototype,"error",null),(0,i.Cg)([(0,o.MZ)()],m.prototype,"finished",null),(0,i.Cg)([(0,o.MZ)()],m.prototype,"promise",void 0),(0,i.Cg)([(0,o.MZ)()],m.prototype,"_result",void 0),m=(0,i.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],m);class y{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,i.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}}},69208:(e,t,r)=>{r.d(t,{d:()=>a});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(64108));const a=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],r),r}},69540:(e,t,r)=>{r.d(t,{OU:()=>c,Pw:()=>h});var i=r(31635),n=r(69622),s=(r(44208),r(4718)),a=(r(53966),r(97768)),o=r(88620),l=r(64108);const u=Symbol("ClonableMixin"),c=e=>{var t;const r=e;let n=class extends r{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,o.oY)(this);(0,a.Lw)(t,"unable to clone instance of non-accessor class");const r=t.metadata,i=t.store,n={},l=new Map;for(const t in r){const a=r[t],o=i?.originOf(t),u=a.clonable;if(a.readOnly||!1===u||7!==o&&0!==o&&5!==o&&4!==o)continue;const c=this[t];let h=null;if("function"==typeof u)h=u(c,e);else if("reference"===u)h=c;else if(h=(0,s.TU)(c,e),null!=c&&null==h)continue;0===o?l.set(t,h):n[t]=h}const u=new(0,Object.getPrototypeOf(this).constructor)(n);if(l.size){const e=(0,o.oY)(u)?.store;if(e)for(const[t,r]of l)e.set(t,r,0)}return u}};return n=(0,i.Cg)([(0,l.$)("esri.core.Clonable")],n),n},h=c(n.A)},78553:(e,t,r)=>{r.d(t,{D:()=>s,p:()=>n});var i=r(56507);function n(e){const t=(0,i.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function s(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},88546:(e,t,r)=>{r.d(t,{_8:()=>g,uB:()=>f});var i=r(34727),n=r(38954),s=r(51850),a=r(73941),o=r(5443),l=r(54239),u=r(16930),c=r(9762);function h(e,t){if(!Array.isArray(e)||e.length<t)return!1;for(const t of e)if("number"!=typeof t)return!1;return!0}const d=7645211,p={xmin:-180,ymin:-90,zmin:-450,xmax:180,ymax:90,zmax:8850};function g(e){return!(!(e.extensions?.ESRI_crs?.wkid||e.extensions?.ESRI_crs?.latestWkid||e.extensions?.ESRI_crs?.wkt)||!e.root?.extensions?.ESRI_crs?.boundingVolume?.box&&!e.root?.extensions?.ESRI_crs?.boundingVolume?.sphere)}function f(e,t=!1){let r=new u.A({wkid:4326,vcsWkid:115700}),l=e.root?.boundingVolume,g=!1,f=e?.root?.transform;if(t&&(e.extensions?.ESRI_crs?.wkid||e.extensions?.ESRI_crs?.latestWkid||e.extensions?.ESRI_crs?.wkt)&&(e.root?.extensions?.ESRI_crs?.boundingVolume?.box||e.root?.extensions?.ESRI_crs?.boundingVolume?.sphere))r=new u.A(e.extensions?.ESRI_crs),l=e.root?.extensions?.ESRI_crs?.boundingVolume,f=e.root?.transform,g=!0;else if(!l)return new o.A(-180,-90,180,90,r);if(l.box){const e=l?.box;if(e[3]>d&&e[7]>d&&e[11]>d)return new o.A({...p,spatialReference:r})}const m=(0,s.vt)();if(!g&&l.region&&h(l.region,6)){const e=l.region,t=(0,i.KJ)(e[0]),n=(0,i.KJ)(e[1]),s=e[4],a=(0,i.KJ)(e[2]),u=(0,i.KJ)(e[3]),c=e[5];return new o.A({xmin:t,ymin:n,zmin:s,xmax:a,ymax:u,zmax:c,spatialReference:r})}if(l.sphere&&h(l.sphere,4)){const e=l.sphere,t=(0,s.fA)(e[0],e[1],e[2]),i=e[3]/Math.sqrt(3),d=(0,s.vt)();(0,n.e)(d,t,(0,s.fA)(i,i,i));const p=(0,s.vt)();if((0,n.g)(p,t,(0,s.fA)(i,i,i)),f&&h(f,16)){const e=f;(0,n.t)(m,d,e),(0,n.d)(d,m),(0,n.t)(m,p,e),(0,n.d)(p,m)}g||((0,c.projectBuffer)(d,a.Ro,0,d,u.A.WGS84,0),(0,c.projectBuffer)(p,a.Ro,0,p,u.A.WGS84,0));const y=(0,s.vt)(),v=(0,s.vt)();return(0,n.A)(y,d,p),(0,n.z)(v,d,p),new o.A({xmin:y[0],ymin:y[1],zmin:y[2],xmax:v[0],ymax:v[1],zmax:v[2],spatialReference:r})}if(l.box&&h(l.box,12)){const e=l.box,t=(0,s.fA)(e[0],e[1],e[2]),i=(0,s.fA)(e[3],e[4],e[5]),d=(0,s.fA)(e[6],e[7],e[8]),p=(0,s.fA)(e[9],e[10],e[11]),m=[];for(let e=0;e<8;++e)m.push((0,s.vt)());if((0,n.g)(m[0],t,i),(0,n.g)(m[0],m[0],d),(0,n.g)(m[0],m[0],p),(0,n.a)(m[1],t,i),(0,n.g)(m[1],m[1],d),(0,n.g)(m[1],m[1],p),(0,n.g)(m[2],t,i),(0,n.a)(m[2],m[2],d),(0,n.g)(m[2],m[2],p),(0,n.a)(m[3],t,i),(0,n.a)(m[3],m[3],d),(0,n.g)(m[3],m[3],p),(0,n.g)(m[4],t,i),(0,n.g)(m[4],m[4],d),(0,n.a)(m[4],m[4],p),(0,n.a)(m[5],t,i),(0,n.g)(m[5],m[5],d),(0,n.a)(m[5],m[5],p),(0,n.g)(m[6],t,i),(0,n.a)(m[6],m[6],d),(0,n.a)(m[6],m[6],p),(0,n.a)(m[7],t,i),(0,n.a)(m[7],m[7],d),(0,n.a)(m[7],m[7],p),f&&h(f,16)){const e=f;for(let t=0;t<8;++t)(0,n.t)(m[t],m[t],e)}const y=(0,s.fA)(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),v=(0,s.fA)(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);for(let e=0;e<8;++e)g||(0,c.projectBuffer)(m[e],a.Ro,0,m[e],u.A.WGS84,0),(0,n.A)(v,v,m[e]),(0,n.z)(y,y,m[e]);return new o.A({xmin:v[0],ymin:v[1],zmin:v[2],xmax:y[0],ymax:y[1],zmax:y[2],spatialReference:r})}return new o.A(-180,-90,180,90,r)}new Map([[5773,new l.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM96_Geoid"})],[3855,new l.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM2008_Geoid"})],[115700,new l.A({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"WGS_1984"})],[115701,new l.A({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"ETRS_1989"})],[6360,new l.A({heightModel:"gravity-related-height",heightUnit:"us-feet",vertCRS:"NAVD88_height_(ftUS)"})],[7837,new l.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"DHHN2016_(height) "})]])}}]);
|