@arcgis/core 5.1.0-next.73 → 5.1.0-next.74
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/Viewpoint.js +1 -1
- package/applications/Urban/editingSessionUtils.d.ts +95 -0
- package/applications/Urban/editingSessionUtils.js +2 -0
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{d17fcfc502f0e0fa6523.js → 003476e950bd27a2f884.js} +1 -1
- package/assets/esri/core/workers/chunks/{8a664451845a47048859.js → 0539b5d015157c1d34a0.js} +1 -1
- package/assets/esri/core/workers/chunks/{5a4d7ba6dc1d4b41d80d.js → 07eff82916681fcff069.js} +1 -1
- package/assets/esri/core/workers/chunks/{8a14e3db28c403b046cf.js → 0d2bc1be5802681666a4.js} +1 -1
- package/assets/esri/core/workers/chunks/0eed2b1b06355ab89013.js +1 -0
- package/assets/esri/core/workers/chunks/18f77ee3552d92962f15.js +1 -0
- package/assets/esri/core/workers/chunks/1a87e9bbd85ba29b1514.js +1 -0
- package/assets/esri/core/workers/chunks/{e1bc9ad767e08dc18bbc.js → 1db1656a033f3992f0d6.js} +1 -1
- package/assets/esri/core/workers/chunks/{b54b7cc6b23a70fed700.js → 1f8ccf96069ac3a40c3d.js} +1 -1
- package/assets/esri/core/workers/chunks/{cdf6ad970dc1893dac58.js → 24646a1176ce34039155.js} +1 -1
- package/assets/esri/core/workers/chunks/{93ceb74ac88ef460fe5f.js → 359d3acb3953e64e5a78.js} +1 -1
- package/assets/esri/core/workers/chunks/{80ace1c7203c5059525d.js → 37091cf498a16ccad7ff.js} +1 -1
- package/assets/esri/core/workers/chunks/{0839da55707f7c4cf780.js → 3b9100c59a8050f4834e.js} +1 -1
- package/assets/esri/core/workers/chunks/452c01cecbbd1e370098.js +1 -0
- package/assets/esri/core/workers/chunks/47656ec12401e53f4bd3.js +1 -0
- package/assets/esri/core/workers/chunks/{260d4571722cb1ff1366.js → 484d6c1b0fe1633515b7.js} +1 -1
- package/assets/esri/core/workers/chunks/{f207b3be0714cc50030a.js → 4bbe684050b3b04681d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{29e76256e3e867e80520.js → 4c13869d260a902d3014.js} +1 -1
- package/assets/esri/core/workers/chunks/4c97cc922eece3a91b6b.js +1 -0
- package/assets/esri/core/workers/chunks/{656d6963e8f837fbf28f.js → 54023458195549f66215.js} +1 -1
- package/assets/esri/core/workers/chunks/{a78bc340a794fd332667.js → 5476c2f7b83f4ccd0335.js} +1 -1
- package/assets/esri/core/workers/chunks/5511e640e171c294f52a.js +2 -0
- package/assets/esri/core/workers/chunks/{faad127dc07e54e7f6d1.js → 5abe34bb0110694f7b42.js} +1 -1
- package/assets/esri/core/workers/chunks/{f5c57ff48ca505ed701d.js → 5b324e572737a308500d.js} +1 -1
- package/assets/esri/core/workers/chunks/6124141ac642e4ce1454.js +1 -0
- package/assets/esri/core/workers/chunks/{b6cadb8a579241adcb86.js → 6b66fc32451433129a88.js} +1 -1
- package/assets/esri/core/workers/chunks/{6ea8b0d68881d16a2432.js → 6d25230dd85a4ba54c4f.js} +1 -1
- package/assets/esri/core/workers/chunks/6f7aaba26773fe416ac2.js +1 -0
- package/assets/esri/core/workers/chunks/{9f4b97204def91567e3c.js → 7595ceba529ed01c7590.js} +1 -1
- package/assets/esri/core/workers/chunks/75d5ea0da181f9e7425f.js +1312 -0
- package/assets/esri/core/workers/chunks/{af75e91b88e747aa76ac.js → 7601278ebced0c0c31cf.js} +1 -1
- package/assets/esri/core/workers/chunks/{1661684357912726a72a.js → 77dd719516138afb1a2a.js} +1 -1
- package/assets/esri/core/workers/chunks/{ce2aa75e084ee56f5e29.js → 7f55eef696e9ed717bfc.js} +1 -1
- package/assets/esri/core/workers/chunks/85aac8539996372f1ee8.js +1 -0
- package/assets/esri/core/workers/chunks/{50d5d6654ada9f28345d.js → 85e65ced3312bf9cf162.js} +1 -1
- package/assets/esri/core/workers/chunks/{b9848bdbaf3d9ac93d54.js → 8f4cd30ce23e41c1a42c.js} +1 -1
- package/assets/esri/core/workers/chunks/983f6c8727fd9484718e.js +1 -0
- package/assets/esri/core/workers/chunks/{5a83ea967ecde01d5622.js → 9be9ccce6369f67202bc.js} +1 -1
- package/assets/esri/core/workers/chunks/{422824e407b550170c8c.js → a270960d80d8344dd75f.js} +1 -1
- package/assets/esri/core/workers/chunks/{bef27a25fbc4a6e19ec0.js → a36761e3122f70fbb3c9.js} +1 -1
- package/assets/esri/core/workers/chunks/{47f2113357b2aa4f4f37.js → a9d2c83bb10b5ade0ca0.js} +1 -1
- package/assets/esri/core/workers/chunks/{e25a684eb9f025bdcc01.js → ad064583f8a836005098.js} +1 -1
- package/assets/esri/core/workers/chunks/b858adff7043683fe41c.js +1 -0
- package/assets/esri/core/workers/chunks/{5c663d5f98bdfa29151b.js → b905e637a67fbb7af4ae.js} +1 -1
- package/assets/esri/core/workers/chunks/{03894992558d063d0d5e.js → bab23b905678e42815e5.js} +1 -1
- package/assets/esri/core/workers/chunks/{6ef3b8d67b498d655a99.js → bcb021a167580bb1619f.js} +1 -1
- package/assets/esri/core/workers/chunks/be0341567bb19e101a4f.js +1 -0
- package/assets/esri/core/workers/chunks/bec3ee5ea945e1e07a35.js +1 -0
- package/assets/esri/core/workers/chunks/c5f155fe114a2a05aaf2.js +2 -0
- package/assets/esri/core/workers/chunks/{84772b023d04e415f17f.js → c61002a117dc2218d6af.js} +1 -1
- package/assets/esri/core/workers/chunks/{0dad0bca8d58b2c63d22.js → c804a66ef7615aa8de89.js} +1 -1
- package/assets/esri/core/workers/chunks/{cfe246adb5e6cb6f0cfc.js → d00dafad202450e6ee2e.js} +1 -1
- package/assets/esri/core/workers/chunks/d1a7d13e1d48abcd7bf1.js +1 -0
- package/assets/esri/core/workers/chunks/{06df187a116709f69952.js → d35c475f004367e333eb.js} +1 -1
- package/assets/esri/core/workers/chunks/d82da31dc702b8fd6a07.js +1 -0
- package/assets/esri/core/workers/chunks/dd4f431511edd975a53b.js +1 -0
- package/assets/esri/core/workers/chunks/{99101789035f1787c630.js → e785f76c1a75cb1d1e1f.js} +1 -1
- package/assets/esri/core/workers/chunks/f590b60fca607d66001a.js +1 -0
- package/assets/esri/core/workers/chunks/{f6d047358d14328f3622.js → f60292d97bcdbf19165b.js} +1 -1
- package/assets/esri/core/workers/chunks/fb5a2205f05afc396119.js +1 -0
- package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
- package/chunks/geometryEngineBase.js +1 -1
- package/config.js +1 -1
- package/core/has.js +1 -1
- package/form/elements/FieldElement.js +1 -1
- package/geometry/geometryEngine.js +1 -1
- package/geometry/geometryEngineJSON.js +1 -1
- package/geometry/operators/projectOperator.d.ts +5 -4
- package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
- package/geometry/support/normalizeUtils.js +1 -1
- package/geometry/support/normalizeUtilsCommon.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/kernel.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/support/SymbolLayerDrawing.d.ts +18 -4
- package/package.json +2 -2
- package/popup/Features.d.ts +9 -9
- package/popup/Features.js +1 -1
- package/popup/actionUtils.js +1 -1
- package/popup/actions.js +1 -1
- package/portal/Portal.js +1 -1
- package/portal/PortalQueryParams.js +1 -1
- package/rest/print.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/3d/camera/intersectionUtils.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/input/handlers/PinchAndPanNavigation.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/state/GoToOperation.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
- package/views/3d/support/cameraScaleUtils.js +2 -0
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/renderInfoUtils/line.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +13 -12
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl.js +1 -1
- package/views/SceneView.d.ts +1 -0
- package/views/draw/support/editingSessionUtils.js +2 -0
- package/views/interactive/sketch/SketchTooltipOptions.d.ts +9 -1
- package/views/support/Scheduler.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/assets/esri/core/workers/chunks/027c3ea756db68e51f0a.js +0 -1
- package/assets/esri/core/workers/chunks/0c00e5e4bd18467bcecd.js +0 -1
- package/assets/esri/core/workers/chunks/0ef93722524620023f69.js +0 -1
- package/assets/esri/core/workers/chunks/266ba61b72a278d93a26.js +0 -1
- package/assets/esri/core/workers/chunks/2abf124e2956e4f76688.js +0 -1
- package/assets/esri/core/workers/chunks/30f04dc001eaf838d64c.js +0 -1
- package/assets/esri/core/workers/chunks/43678e08a3d9d51c2a6d.js +0 -1
- package/assets/esri/core/workers/chunks/5b278b9980752ef495a2.js +0 -1
- package/assets/esri/core/workers/chunks/5e59ff96aecdf2adcb3b.js +0 -1
- package/assets/esri/core/workers/chunks/74be994d789c57031631.js +0 -1
- package/assets/esri/core/workers/chunks/770880ad43f252962017.js +0 -1
- package/assets/esri/core/workers/chunks/81750c5177d8d52a3e05.js +0 -1
- package/assets/esri/core/workers/chunks/9eb4ae556950e1d0124d.js +0 -2
- package/assets/esri/core/workers/chunks/a11f05ddd8314b648f76.js +0 -1
- package/assets/esri/core/workers/chunks/af5db0372d526e592fcc.js +0 -1
- package/assets/esri/core/workers/chunks/bc53ce9a643f82d516c2.js +0 -1
- package/assets/esri/core/workers/chunks/c3381b9a36299210ee47.js +0 -1
- package/assets/esri/core/workers/chunks/d65b1234867f7d773d50.js +0 -2
- package/assets/esri/core/workers/chunks/d8d7331600d93bbca2b4.js +0 -1
- package/assets/esri/core/workers/chunks/e272411e2c9378aa8496.js +0 -1312
- package/assets/esri/core/workers/chunks/fa160a2a5dc9f5a7c34b.js +0 -1
- package/geometry/support/triangulationUtilsDeprecated.js +0 -2
- package/views/3d/layers/graphics/extrudeUtilsDeprecated.js +0 -2
- package/views/3d/support/renderInfoUtils/polygonDeprecated.js +0 -2
- /package/assets/esri/core/workers/chunks/{9eb4ae556950e1d0124d.js.LICENSE.txt → 5511e640e171c294f52a.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{d65b1234867f7d773d50.js.LICENSE.txt → c5f155fe114a2a05aaf2.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7557,9938],{69052(e,t,n){n.d(t,{hr:()=>s,ie:()=>l,uC:()=>o});var r=n(34727);class s{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,n=!1){return i(this.range,this.min,this.max,e,t,n)}clamp(e,t=0){return(0,r.qE)(e-t,this.min,this.max)+t}monotonic(e,t,n){return e<t?t:t+a(this.range,e-t,n)}minimalMonotonic(e,t,n){return i(this.range,e,e+this.range,t,n)}center(e,t,n){return t=this.monotonic(e,t,n),this.normalize((e+t)/2,n)}diff(e,t,n){return this.monotonic(e,t,n)-e}shortestSignedDiff(e,t){e=this.normalize(e);const n=(t=this.normalize(t))-e,r=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(n)<Math.abs(r)?n:r}contains(e,t,n){return t=this.minimalMonotonic(e,t),(n=this.minimalMonotonic(e,n))>e&&n<t}}function i(e,t,n,r,s=0,i=!1){return(r-=s)<t?r+=a(e,t-r):r>n&&(r-=a(e,r-n)),i&&r===n&&(r=t),r+s}function a(e,t,n=0){return Math.ceil((t-n)/e)*e+n}const o=new s(0,2*Math.PI),l=(new s(-Math.PI,Math.PI),new s(0,360))},56512(e,t,n){function r(e){let t,n,r=[],s=!1;return function(...i){return s&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0}(i,r)||(n=e.apply(this,i),t=this,r=i,s=!0),n}}n.d(t,{B:()=>r})},17136(e,t,n){n.d(t,{Y_:()=>R,O7:()=>k,el:()=>M});var r=n(92602),s=n(69052),i=n(49186),a=n(53966),o=n(39829),l=n(82799),u=n(16930),d=n(80754),c=n(21325),h=n(28735),p=n(11254),f=n(60408),m=n(65864),g=n(2272),y=n(84952),b=n(92300);const w=()=>a.A.getLogger("esri.geometry.support.normalizeUtils");function S(e){return"polygon"===e[0].type}function A(e){return"polyline"===e[0].type}function F(e,t,n){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw w().error(e),new i.A("internal:geometry",e)}const n=(0,d.r8)(e),r=[];for(const e of n){const n=[];r.push(n),n.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const s=e[r][0],i=e[r][1],a=e[r+1][0],o=e[r+1][1],l=Math.sqrt((a-s)*(a-s)+(o-i)*(o-i)),u=(o-i)/l,d=(a-s)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const r=e*t,a=d*r+s,o=u*r+i;n.push([a,o])}const e=(l+Math.floor(c-1)*t)/2,r=d*e+s,a=u*e+i;n.push([r,a])}n.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:r,spatialReference:e.spatialReference}):new l.A({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,h.ci)(t,!0)}return n&&(e=(0,d.kS)(e,n)),e}function v(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,d.kd)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,d.kd)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,d.kd)(r,t);e=e.clone().offset(n*(-2*t),0)}else if(r<n){const t=(0,d.kd)(r,n);e=e.clone().offset(t*(-2*n),0)}}return e}function E(e,t){let n=-1;for(let r=0;r<t.cutIndexes.length;r++){const s=t.cutIndexes[r],i=t.geometries[r],a=(0,d.r8)(i);for(let e=0;e<a.length;e++){const t=a[e];t.some(n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const r=t[e][0];n=r>n?r:n}n=Number(n.toFixed(9));const r=-360*(0,d.kd)(n,180);for(let n=0;n<t.length;n++){const t=i.getPoint(e,n);i.setPoint(e,n,t.clone().offset(r,0))}return!0}})}if(s===n){if(S(e))for(const t of(0,d.r8)(i))e[s]=e[s].addRing(t);else if(A(e))for(const t of(0,d.r8)(i))e[s]=e[s].addPath(t)}else n=s,e[s]=i}return e}async function M(e,t,n){if(!Array.isArray(e))return M([e],t);t&&"string"!=typeof t&&w().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??r.A.geometryServiceUrl;let i,a,u,S,A,k,I,R,x=0;const $=[],P=[];for(const t of e)if(null!=t)if(i||(i=t.spatialReference,a=(0,c.Vp)(i),u=i.isWebMercator,k=u?102100:4326,S=d.j7[k].maxX,A=d.j7[k].minX,I=d.j7[k].plus180Line,R=d.j7[k].minus180Line),a)if("mesh"===t.type)P.push(t);else if("point"===t.type)P.push(v(t.clone(),S,A));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>v(e,S,A)),P.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,a);P.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,n=(0,d.kd)(e.xmin,A)*(2*S);let r=0===n?t.clone():(0,d.kS)(t.clone(),n);e.offset(n,0);let{xmin:s,xmax:i}=e;s=Number(s.toFixed(9)),i=Number(i.toFixed(9)),e.intersects(I)&&i!==S?(x=i>x?i:x,r=F(r,u),$.push(r),P.push("cut")):e.intersects(R)&&s!==A?(x=i*(2*S)>x?i*(2*S):x,r=F(r,u,360),$.push(r),P.push("cut")):P.push(r)}else P.push(t.clone());else P.push(t);else P.push(t);let _=(0,d.kd)(x,S),L=-90;const C=_,O=new l.A;for(;_>0;){const e=360*_-180;O.addPath([[e,L],[e,-1*L]]),L*=-1,_--}if($.length>0&&C>0){const t=E($,await async function(e,t,n,r){const s=(0,g.Dl)(e),i=t[0].spatialReference,a={...r,responseType:"json",query:{...s.query,f:"json",sr:(0,c.YX)(i),target:JSON.stringify({geometryType:(0,f.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},o=await(0,p.A)(s.path+"/cut",a),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map(e=>{const t=(0,m.rS)(e);return t.spatialReference=i,t})}}(s,$,O,n)),r=[],i=[];for(let n=0;n<P.length;n++){const s=P[n];if("cut"!==s)i.push(s);else{const s=t.shift(),a=e[n];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&s.rings.length>=a.rings.length?(r.push(s),i.push("simplify")):i.push(u?(0,h.Gh)(s):s)}}if(!r.length)return i;const a=await async function(e,t,n){const r="string"==typeof e?(0,y.An)(e):e,s=t[0].spatialReference,i=(0,f.$B)(t[0]),a={...n,query:{...r.query,f:"json",sr:(0,c.YX)(s),geometries:JSON.stringify((0,b.X)(t))}},{data:o}=await(0,p.A)(r.path+"/simplify",a);return(0,b.V)(o.geometries,i,s)}(s,r,n),o=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?o.push(t):o.push(u?(0,h.Gh)(a.shift()):a.shift())}return o}const j=[];for(let e=0;e<P.length;e++){const t=P[e];if("cut"!==t)j.push(t);else{const e=$.shift();j.push(!0===u?(0,h.Gh)(e):e)}}return j}function k(e,t,n){const r=(0,c.Vp)(n);if(null==r)return e;const[s,i]=r.valid,a=2*i;let o=0,l=0;t>i?o=Math.ceil(Math.abs(t-i)/a):t<s&&(o=-Math.ceil(Math.abs(t-s)/a)),e>i?l=Math.ceil(Math.abs(e-i)/a):e<s&&(l=-Math.ceil(Math.abs(e-s)/a));let u=e+(o-l)*a;const d=u-t;return d>i?u-=a:d<s&&(u+=a),u}function I(e){const t=(0,c.Vp)(e);if(null==t)return null;const[n,r]=t.valid;return new s.hr(n,r)}const R=I(u.A.WGS84);I(u.A.WebMercator)},80754(e,t,n){n.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var r=n(82799),s=n(16930),i=n(60408);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:s.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:s.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=u(e);for(const e of n)for(const n of e)n[0]+=t;return e}function u(e){return(0,i.Bi)(e)?e.rings:e.paths}},69938(e,t,n){n.d(t,{applyEdits:()=>V,uploadAssets:()=>q});var r=n(52106),s=n(7762),i=n(49186),a=n(4718),o=n(53966),l=n(91869),u=n(84952),d=n(13069),c=n(17136),h=n(21325),p=n(56512),f=n(65864),m=n(4305),g=n(50954),y=n(52006),b=n(49663),w=n(46068),S=n(15507);const A=1e-6,F=[0,0];class v{constructor(e,t){this.curveStart=e,this.curveEnd=t,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(e,t){this.tStart=0,this.arcStart=e,this.tEndStack.push(1),this.arcEndStack.push(t)}splitAt(e){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(e),this.arcEndStack.push(this.interpolate(e))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(e,{maxDeviation:t,maxSegmentLength:n,maxSegmentsPerCurve:r,minSegmentsPerCurve:s}){const i=n*n,a=t*t,o=1/r,l=this.interpolate(0),u=this.interpolate(1);(0,S.kb)(this.curveStart,l)>A&&e.push(l),this.initialize(l,u);const d=1/s;for(let e=s-1;e>0;e--){const t=e*d;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<o||(0===i||!isFinite(i)||(0,S.kb)(this.arcStart,this.arcEnd)<i)&&(0===a||!isFinite(a)||this.getDeviation2()<a)?(e.push(this.arcEnd),this.next()):this.splitInHalf();return(0,S.kb)(this.curveEnd,u)>A&&e.push([...this.curveEnd]),e}}class E extends v{constructor(e,t){const[n,r,s]=t.b;super(e,n),this._controlPointsStack=[],this._curveControlPoints=[r,s],this._arcControlPoints=[r,s],this._controlPointsStack.push(this._arcControlPoints)}splitAt(e){const{arcStart:t,arcEnd:n,tStart:r,tEnd:s}=this,[i,a]=this._arcControlPoints,o=(e-r)/(s-r),l=(0,S.RS)([],t,i,o),u=(0,S.RS)(F,i,a,o),d=(0,S.RS)([],a,n,o),c=(0,S.RS)([],l,u,o),h=(0,S.RS)([],u,d,o),p=(0,S.RS)([],c,h,o);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([h,d]),this.tEndStack.push(e),this.arcEndStack.push(p),this._arcControlPoints[0]=l,this._arcControlPoints[1]=c,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(e){const{curveStart:t,curveEnd:n}=this,[r,s]=this._curveControlPoints;return(0,m.B4)(t,r,s,n,e)}getDeviation2(){const{arcStart:e,arcEnd:t}=this,[n,r]=this._arcControlPoints;return Math.max((0,S.yE)(n,e,t),(0,S.yE)(r,e,t))}}class M extends v{constructor(e,t){const[n]=t.a;super(e,n),this._derivedEllipse=(0,w.SW)(e,t)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(e){return(0,w.Uk)(this._derivedEllipse,e)}getDeviation2(){return(0,S.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function k(e,t,n,{cx:r,cy:s,radius:i,thetaStart:a,thetaEnd:o,isInvalid:l},{maxDeviation:u,maxSegmentLength:d,maxSegmentsPerCurve:c,minSegmentsPerCurve:h}){if(l)return e.push([...n]),e;const p=2*i,f=[r+i*Math.cos(a),s+i*Math.sin(a)],m=[r+i*Math.cos(o),s+i*Math.sin(o)];(0,S.kb)(t,f)>A&&e.push(f);const g=Math.abs(o-a),y=d>0&&d<p?2*Math.asin(d/p):g,b=u>0&&u<=i?2*Math.acos(1-u/i):g,w=Math.min(y,b),F=Math.min(c,Math.max(h,Math.ceil(Math.abs(g/w)))),v=1/F;for(let t=1;t<F;t++){const n=t*v,l=a*(1-n)+o*n;e.push([r+i*Math.cos(l),s+i*Math.sin(l)])}return e.push(m),(0,S.kb)(n,m)>A&&e.push([...n]),e}function I(e,t,n,r){return new E(t,n).densify(e,r)}function R(e,t,n,r){const s=(0,g.pM)(t,n),[i]=n.c;return k(e,t,i,s,r)}function x(e,t,n,r){const s=(0,b.io)(t,n),[i]=n.a;return k(e,t,i,s,r)}function $(e,t,n,r){const[s,i,a,o,l,u,d]=n.a;return 0===u||0===d?(e.push([...s]),e):new M(t,n).densify(e,r)}const P=(0,p.B)(e=>({maxDeviation:0,maxSegmentLength:100*e,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function _(e,t,r){const s=new Set(t);return await async function(e,t,r){let s=null;for(const a of e)if(a&&(0,y.Ed)(a)&&null==a.spatialReference.xyTolerance&&(0,y.V8)(a,t)){const e=a.spatialReference;if(!e)throw new i.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const t=L(e);if(r.has(t))a.spatialReference=r.get(t);else{s||(s=await Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(6312)]).then(n.bind(n,78125)));const o=s.fromSpatialReference(e),l=o?.getTolerance();if(null==l)throw new i.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const u=a.spatialReference.clone();u.read({xyTolerance:l}),a.spatialReference=u,r.set(t,u)}}}(e,s,r),e.map(e=>{if(!e||!(0,y.Ed)(e))return e;const n=e.spatialReference.xyTolerance;if(null==n)return e;const r=P(n);return(0,f.rS)(function(e,t,n){if(!(0,y.Ed)(e))return e;const r=new Set(t),s=function(e){return{maxSegmentLength:e.maxSegmentLength??0,maxDeviation:e.maxDeviation??0,maxSegmentsPerCurve:e.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(e.minSegmentsPerCurve??1,1)}}(n),i=(0,y.FD)(e),a=[];let o=!1;for(const e of i){const t=[];for(let n=0;n<e.length-1;n++){const i=n+1,a=[...(0,y.yP)(e[n])];0===n&&t.push(a);const l=e[i];(0,y.Xq)(l)?t.push([...l]):(0,y.n1)(l)&&!r.has("cubic-bezier")?I(t,a,l,s):(0,y.aO)(l)&&!r.has("circular-arc")?R(t,a,l,s):(0,y.DA)(l)&&!r.has("elliptic-arc")?x(t,a,l,s):(0,y.wY)(l)&&!r.has("elliptic-arc")?$(t,a,l,s):(t.push((0,y.tk)(l)),o=!0)}a.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},spatialReference:e.spatialReference,...o?{curvePaths:a}:{paths:a}}:{hasZ:e.hasZ,hasM:e.hasM,spatialReference:e.spatialReference,...o?{curveRings:a}:{rings:a}}}(e,t,r))})}function L(e){if(null!=e.wkid)return`${e.wkid}`;if(null!=e.wkt)return e.wkt;const t="toJSON"in e&&"function"==typeof e.toJSON?e.toJSON():e;return JSON.stringify(t)}var C=n(47685),O=n(30524),j=n(20557),T=n(77548);function D(e){return null!=e?.applyEdits}const U=new WeakMap;async function V(e,t,n,r={}){let u;const c="gdbVersion"in e?e.gdbVersion:null,h=r.gdbVersion??c;if((0,C.Mk)(e)&&e.url)u=(0,C.Zk)(e.url,e.layerId,h,"original-and-current-features"===r.returnServiceEditsOption);else{u=Promise.withResolvers(),u.promise.then(t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)});const t={result:u.promise};e.emit("apply-edits",t)}try{const{results:c,edits:h}=await async function(e,t,n,r){if(await e.load(),!D(t))throw new i.A(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,T.tk)(e))throw new i.A(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:a,options:u}=await async function(e,t,n){const r=(0,T.BR)(e),a=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),u=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),c=null!=e.infoFor3D;if(function(e,t,n,r,s,a){if(!(e&&(r||s)||n?.usingTelecomOperations))throw new i.A(`${a}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");const o=t.editing.supportsGlobalId||n?.usingFeatureServiceEndpoint;if(!o&&n?.globalIdUsed)throw new i.A(`${a}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!o&&s)throw new i.A(`${a}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!n?.globalIdUsed&&s)throw new i.A(`${a}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,r,n,!!a,!!u,`${e.type}-layer`),!r.data.isVersioned&&n?.gdbVersion)throw new i.A(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!r.editing.supportsRollbackOnFailure&&n?.rollbackOnFailureEnabled)throw new i.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const h={...n};if(null!=h.rollbackOnFailureEnabled||r.editing.supportsRollbackOnFailure||(h.rollbackOnFailureEnabled=!0),h.rollbackOnFailureEnabled||"original-and-current-features"!==h.returnServiceEditsOption||(!1===h.rollbackOnFailureEnabled&&o.A.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwritten and set to true."),h.rollbackOnFailureEnabled=!0),!r.editing.supportsReturnServiceEditsInSourceSpatialReference&&h.returnServiceEditsInSourceSR)throw new i.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(h.returnServiceEditsInSourceSR&&"original-and-current-features"!==h.returnServiceEditsOption)throw new i.A(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p=function(e,t,n){const r=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&s.A.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(r.addFeatures?.length&&!t.operations.supportsAdd)throw new i.A(`${n}:unsupported-operation`,"Layer does not support adding features.");if(r.updateFeatures?.length&&!t.operations.supportsUpdate)throw new i.A(`${n}:unsupported-operation`,"Layer does not support updating features.");if(r.deleteFeatures?.length&&!t.operations.supportsDelete)throw new i.A(`${n}:unsupported-operation`,"Layer does not support deleting features.");return r.addFeatures=r.addFeatures.map(G),r.updateFeatures=r.updateFeatures.map(G),r.addAssetFeatures=[],r}(t,r,`${e.type}-layer`),f=n?.globalIdUsed||c,m=e.fields.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(f){const{globalIdField:t}=e;if(null==t)throw new i.A(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");p.addFeatures.forEach(e=>function(e,t){const{attributes:n}=e;null==n[t]&&(n[t]=(0,d.yS)())}(e,t))}p.addFeatures.forEach(t=>function(e,t,n,r){B(e,t,n,r),z(e,t)}(t,e,f,m)),p.updateFeatures.forEach(t=>function(e,t,n,r){B(e,t,n,r),z(e,t);const s=(0,T.BR)(t);if("geometry"in e&&null!=e.geometry&&!s?.editing.supportsGeometryUpdate)throw new i.A(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,f,m)),p.deleteFeatures.forEach(t=>function(e,t,n,r){B(e,t,n,r)}(t,e,f,m)),p.addAttachments.forEach(t=>N(t,e)),p.updateAttachments.forEach(t=>N(t,e)),c&&await async function(e,t){const{infoFor3D:n}=t;if(null==n)return;if(!(0,j.JQ)(n))throw new i.A(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:r}=e;for(const t of e.addFeatures??[])Z(t)&&r.push(t);for(const t of e.updateFeatures??[])Z(t)&&r.push(t)}(p,e);const g=(0,l.tE)(U,e,()=>new Map);return{edits:await W(p,r.data.supportedCurveTypes??[],g),options:h}}(e,n,r);return a.addFeatures?.length||a.updateFeatures?.length||a.deleteFeatures?.length||a.addAttachments?.length||a.updateAttachments?.length||a.deleteAttachments?.length?{edits:a,results:await t.applyEdits(a,u)}:{edits:a,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,n,r),p=e=>e.filter(e=>!e.error).map(a.o8),f={edits:h,addedFeatures:p(c.addFeatureResults),updatedFeatures:p(c.updateFeatureResults),deletedFeatures:p(c.deleteFeatureResults),addedAttachments:p(c.addAttachmentResults),updatedAttachments:p(c.updateAttachmentResults),deletedAttachments:p(c.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:c.editMoment?new Date(c.editMoment):null,globalIdToObjectId:r.globalIdToObjectId};return c.editedFeatureResults?.length&&(f.editedFeatures=c.editedFeatureResults),u.resolve(f),c}catch(e){throw u.reject(e),e}}function B(e,t,n,r){if(n){if("attributes"in e&&!e.attributes[t.globalIdField])throw new i.A(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new i.A(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(r.length&&"attributes"in e)for(const n of r){const r=e.attributes[n.name];if(void 0!==r&&!(0,O.OG)(n,r))throw new i.A(`${t.type}-layer:invalid-parameter`,`Big-integer field '${n.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new i.A(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new i.A(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function z(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D&&null!=t.spatialReference){const{geometry:n}=e,{spatialReference:r,vertexSpace:s}=n,a=t.spatialReference,o="local"===s.type,l=(0,h.EA)(a),u=(0,h.aI)(a,r),d=u||(0,h.oT)(a)&&((0,h.oT)(r)||(0,h.K8)(r));if(!(o&&l&&d||!o&&!l&&u))throw new i.A(`${t.type}-layer:mesh-unsupported`,`Uploading a mesh with a ${s.type} vertex space and a spatial reference wkid:${r.wkid} to a layer with a spatial reference wkid:${a.wkid} is not supported.`)}}function N(e,t){const{feature:n,attachment:r}=e;if(!n||"attributes"in n&&!n.attributes[t.globalIdField])throw new i.A(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in n)&&!n.globalId)throw new i.A(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!r.globalId)throw new i.A(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!r.data&&!r.uploadId)throw new i.A(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(r.data instanceof File&&r.data.name||r.name))throw new i.A(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&r.uploadId)throw new i.A(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof r.data){const e=(0,u.r$)(r.data);if(e&&!e.isBase64)throw new i.A(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function W(e,t,n){const r=e.addFeatures??[],s=e.updateFeatures??[],i=r.concat(s).map(e=>e.geometry),a=await _(i,t,n),o=await(0,c.el)(a),l=r.length,u=s.length;return o.slice(0,l).forEach((e,t)=>r[t].geometry=e),o.slice(l,l+u).forEach((e,t)=>s[t].geometry=e),e}function G(e){const t=new r.A;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function Z(e){return"mesh"===e?.geometry?.type}function q(e,t,n,r){if(!D(t))throw new i.A(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new i.A(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(n,r)}},47685(e,t,n){n.d(t,{Mk:()=>p,Zk:()=>c,w6:()=>g});var r=n(5482),s=n(65529),i=n(4718),a=n(91429),o=n(20816);const l=new s.bk;function u(e){return l.on("apply-edits",new WeakRef(e))}function d(e){return l.on("update-moment",new WeakRef(e))}function c(e,t,n=null,r=!1){const s=Promise.withResolvers();return r=null==t||r,l.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:n,mayReceiveServiceEdits:r,result:s.promise}),s}const h=Symbol();function p(e){return null!=e&&"object"==typeof e&&h in e}function f(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function m(e,t,n){const r=new URL(e).host,s=o.Z3.get(r),i=e=>!e||e===s;return i(t)&&i(n)||t===n}const g=e=>{var t;const n=e;let s=class extends n{static{t=h}constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:n,gdbVersion:r,mayReceiveServiceEdits:s,result:a}=e,o=t===this.url,l=null!=n&&null!=this.layerId&&n===this.layerId,u=f(this),d=f(this)&&m(t,r,this.gdbVersion);if(!o||u&&!d||!l&&!s)return;const c=a.then(e=>{if(this.lastEditsEventDate=new Date,l&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,i.o8)(e)),e;const n=e.editedFeatures?.find(({layerId:e})=>e===this.layerId);if(n){const{adds:t,updates:r,deletes:s}=n.editedFeatures,a={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],deletedFeatures:s?s.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],updatedFeatures:r?r.map(({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],editedFeatures:(0,i.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,i.o8)(e.historicMoment)};return this.emit("edits",a),a}const s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,i.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,i.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,r,s.historicMoment)&&this.emit("edits",s),s}).then(e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,r,e.historicMoment)&&(this.historicMoment=e.historicMoment),e));this.emit("apply-edits",{result:c})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:n,moment:r}=e,s=t===this.url,i=f(this),a=f(this)&&m(t,n,this.gdbVersion),o=f(this)&&!m(t,this.gdbVersion,null);s&&i&&a&&o&&"historicMoment"in this&&this.historicMoment!==r&&(this.historicMoment=r)},this.when().then(()=>{this.addHandles(u(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(d(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(e,t,n){return"historicMoment"in this&&this.historicMoment!==n&&(0,o.w5)(e,t)}};return(0,r.Cg)([(0,a.MZ)()],s.prototype,"lastEditsEventDate",void 0),s=(0,r.Cg)([(0,a.$K)("esri.layers.mixins.EditBusLayer")],s),s}},20557(e,t,n){n.d(t,{Fm:()=>l,Hz:()=>p,JQ:()=>h,JZ:()=>S,ND:()=>m,R_:()=>a,U9:()=>c,fu:()=>s,nr:()=>f,oF:()=>i,rq:()=>u,z$:()=>d});const r=[["binary","application/octet-stream","bin",""]];function s(e,t){return null!=y(t.name,e?.supportedFormats??[])}function i(e,t){if(!e)return!1;const n=u(t,e.supportedFormats??[]);return null!=n&&e.editFormats.includes(n)}function a(e,t){return b(function(e,t){const n=e.toLowerCase();return g(t).find(e=>w(e)===n)}(e,t))}function o(e,t){return b(y(e,t))}function l(e,t){return w(function(e,t){return g(t).find(t=>b(t)===e)}(e,t))}function u(e,t){return o(e.name,t)??a(e.type,t)}function d(e,t,n){return a(e,n)??o(t,n)}function c({supportedFormats:e}){return d("model/gltf-binary","glb",e)}function h(e){const t=c(e);return null!=t&&e.editFormats.includes(t)}function p(e){if(!e)return null;const t=c(e),n=function({supportedFormats:e}){return d("model/gltf+json","gltf",e)}(e);let r=null;for(const s of e.queryFormats){if(s===t)return s;s===n&&(r=s)}return r}function f({supportedFormats:e}){return d("application/esri3do-SR_world","wld",e)}function m({supportedFormats:e}){return d("application/esri3do-SR_prj","prj",e)}function g(e){return[...r,...e]}function y(e,t){const n=e.toLowerCase();return g(t).find(e=>function(e){return e?.[2].split(",").map(e=>e.toLowerCase())??[]}(e).some(e=>n.endsWith(e)))}function b(e){return e?.[0]}function w(e){return e?.[1].toLowerCase()}function S(e){return e.tables?.find(e=>"assetMaps"===e.role)}},92300(e,t,n){n.d(t,{V:()=>a,X:()=>i});var r=n(60408),s=n(65864);function i(e){return{geometryType:(0,r.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function a(e,t,n){const r=(0,s.xD)(t);return e.map(e=>{const t=r.fromJSON(e);return t.spatialReference=n,t})}},20816(e,t,n){n.d(t,{TA:()=>s,We:()=>o,Z3:()=>i,ZJ:()=>l,w5:()=>u});var r=n(11254);const s=(0,n(13069).vD)(),i=new Map,a=new Map;async function o(e,t,n){if(!e||!n)return!1;if(!t)return!0;const s=new URL(e).host;let a=i.get(s);if(!a){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");a=(await(0,r.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return a===t}async function l(e,t,r=!1){if(!e||!t)return!0;const i=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),o=a.get(i)?.entries();if(o)for(const[e,a]of o)if(a.name===t){const t=!a.stack?.hasForwardEdits();if(!t&&r){const[{deleteForwardEdits:t},{default:r}]=await Promise.all([n.e(2186).then(n.bind(n,32186)),n.e(2558).then(n.bind(n,32558))]),o=await t(i,e,new r({sessionId:s,moment:a.moment}));return o.success&&a.stack?.clearForwardEdits(),o.success}return t}return!0}function u(e,t){if(!e)return!1;const n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),r=a.get(n)?.entries();if(r)for(const[e,n]of r)if(n.name===t)return"edit"===n.lockType;return!1}new Map}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3636],{69052(t,e,r){r.d(e,{hr:()=>n,ie:()=>u,uC:()=>o});var s=r(34727);class n{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,r=!1){return i(this.range,this.min,this.max,t,e,r)}clamp(t,e=0){return(0,s.qE)(t-e,this.min,this.max)+e}monotonic(t,e,r){return t<e?e:e+a(this.range,t-e,r)}minimalMonotonic(t,e,r){return i(this.range,t,t+this.range,e,r)}center(t,e,r){return e=this.monotonic(t,e,r),this.normalize((t+e)/2,r)}diff(t,e,r){return this.monotonic(t,e,r)-t}shortestSignedDiff(t,e){t=this.normalize(t);const r=(e=this.normalize(e))-t,s=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(r)<Math.abs(s)?r:s}contains(t,e,r){return e=this.minimalMonotonic(t,e),(r=this.minimalMonotonic(t,r))>t&&r<e}}function i(t,e,r,s,n=0,i=!1){return(s-=n)<e?s+=a(t,e-s):s>r&&(s-=a(t,s-r)),i&&s===r&&(s=e),s+n}function a(t,e,r=0){return Math.ceil((e-r)/t)*t+r}const o=new n(0,2*Math.PI),u=(new n(-Math.PI,Math.PI),new n(0,360))},82534(t,e,r){function s(){return[0,0,0,1]}function n(t){return[t[0],t[1],t[2],t[3]]}r.d(e,{o8:()=>n,vt:()=>s,zK:()=>i});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:n,create:s,fromValues:function(t,e,r,s){return[t,e,r,s]}},Symbol.toStringTag,{value:"Module"}))},67026(t,e,r){r.d(e,{A6:()=>f,Xd:()=>c,Xr:()=>d,hZ:()=>g,lw:()=>p,t2:()=>R,x8:()=>l});var s=r(29242),n=r(82534),i=r(51850),a=r(34304),o=r(35522),u=r(78955);function l(t,e,r){r*=.5;const s=Math.sin(r);return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=Math.cos(r),t}function c(t,e){const r=2*Math.acos(e[3]),s=Math.sin(r/2);return s>(0,a.FD)()?(t[0]=e[0]/s,t[1]=e[1]/s,t[2]=e[2]/s):(t[0]=1,t[1]=0,t[2]=0),r}function p(t,e,r){const s=e[0],n=e[1],i=e[2],a=e[3],o=r[0],u=r[1],l=r[2],c=r[3];return t[0]=s*c+a*o+n*l-i*u,t[1]=n*c+a*u+i*o-s*l,t[2]=i*c+a*l+s*u-n*o,t[3]=a*c-s*o-n*u-i*l,t}function h(t,e,r,s){const n=e[0],i=e[1],o=e[2],u=e[3];let l,c,p,h,d,y=r[0],f=r[1],m=r[2],g=r[3];return c=n*y+i*f+o*m+u*g,c<0&&(c=-c,y=-y,f=-f,m=-m,g=-g),1-c>(0,a.FD)()?(l=Math.acos(c),p=Math.sin(l),h=Math.sin((1-s)*l)/p,d=Math.sin(s*l)/p):(h=1-s,d=s),t[0]=h*n+d*y,t[1]=h*i+d*f,t[2]=h*o+d*m,t[3]=h*u+d*g,t}function d(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function y(t,e){const r=e[0]+e[4]+e[8];let s;if(r>0)s=Math.sqrt(r+1),t[3]=.5*s,s=.5/s,t[0]=(e[5]-e[7])*s,t[1]=(e[6]-e[2])*s,t[2]=(e[1]-e[3])*s;else{let r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);const n=(r+1)%3,i=(r+2)%3;s=Math.sqrt(e[3*r+r]-e[3*n+n]-e[3*i+i]+1),t[r]=.5*s,s=.5/s,t[3]=(e[3*n+i]-e[3*i+n])*s,t[n]=(e[3*n+r]+e[3*r+n])*s,t[i]=(e[3*i+r]+e[3*r+i])*s}return t}function f(t,e,r,s){const n=.5*Math.PI/180;e*=n,r*=n,s*=n;const i=Math.sin(e),a=Math.cos(e),o=Math.sin(r),u=Math.cos(r),l=Math.sin(s),c=Math.cos(s);return t[0]=i*u*c-a*o*l,t[1]=a*o*c+i*u*l,t[2]=a*u*l-i*o*c,t[3]=a*u*c+i*o*l,t}const m=u.C,g=u.hZ,A=u.WQ,b=p,S=u.hs,v=u.Om,x=u.Cc,_=u.Bw,w=_,M=u.m3,q=M,F=u.S8,R=u.t2,I=u.aI,O=(0,i.vt)(),C=(0,i.fA)(1,0,0),T=(0,i.fA)(0,1,0),P=(0,n.vt)(),N=(0,n.vt)(),E=(0,s.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:A,calculateW:function(t,e){const r=e[0],s=e[1],n=e[2];return t[0]=r,t[1]=s,t[2]=n,t[3]=Math.sqrt(Math.abs(1-r*r-s*s-n*n)),t},conjugate:d,copy:m,dot:v,equals:I,exactEquals:R,fromEuler:f,fromMat3:y,getAxisAngle:c,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const r=e[0],s=e[1],n=e[2],i=e[3],a=r*r+s*s+n*n+i*i,o=a?1/a:0;return t[0]=-r*o,t[1]=-s*o,t[2]=-n*o,t[3]=i*o,t},len:w,length:_,lerp:x,mul:b,multiply:p,normalize:F,random:function(t){const e=a.Ov,r=e(),s=e(),n=e(),i=Math.sqrt(1-r),o=Math.sqrt(r);return t[0]=i*Math.sin(2*Math.PI*s),t[1]=i*Math.cos(2*Math.PI*s),t[2]=o*Math.sin(2*Math.PI*n),t[3]=o*Math.cos(2*Math.PI*n),t},rotateX:function(t,e,r){r*=.5;const s=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u+a*o,t[1]=n*u+i*o,t[2]=i*u-n*o,t[3]=a*u-s*o,t},rotateY:function(t,e,r){r*=.5;const s=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u-i*o,t[1]=n*u+a*o,t[2]=i*u+s*o,t[3]=a*u-n*o,t},rotateZ:function(t,e,r){r*=.5;const s=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u+n*o,t[1]=n*u-s*o,t[2]=i*u+a*o,t[3]=a*u-i*o,t},rotationTo:function(t,e,r){const s=(0,o.Om)(e,r);return s<-.999999?((0,o.$A)(O,C,e),(0,o.Il)(O)<1e-6&&(0,o.$A)(O,T,e),(0,o.S8)(O,O),l(t,O,Math.PI),t):s>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,o.$A)(O,e,r),t[0]=O[0],t[1]=O[1],t[2]=O[2],t[3]=1+s,F(t,t))},scale:S,set:g,setAxes:function(t,e,r,s){const n=E;return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=s[0],n[4]=s[1],n[7]=s[2],n[2]=-e[0],n[5]=-e[1],n[8]=-e[2],F(t,y(t,n))},setAxisAngle:l,slerp:h,sqlerp:function(t,e,r,s,n,i){return h(P,e,n,i),h(N,r,s,i),h(t,P,N,2*i*(1-i)),t},sqrLen:q,squaredLength:M,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},69397(t,e,r){r.d(e,{Qf:()=>u,Qh:()=>a,RS:()=>n,Ul:()=>d,i5:()=>h,lM:()=>i,qK:()=>c});var s=r(34275);const n=16;function i(t){if(!t)return 0;let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=o(t[r],!1));return e}function a(t){if(!t)return 0;if("number"==typeof t[0])return u(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return l(t,8);let r=p;for(let s=0;s<e;s++)r+=o(t[s]);return r}(t);let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=o(t[r]));return e}function o(t,e=!0){switch(typeof t){case"object":return e?a(t):c;case"string":return function(t){return 32+t.length}(t);case"number":return n;case"boolean":return 4;default:return 8}}function u(...t){return t.reduce((t,e)=>t+(e?(0,s.iu)(e)?e.byteLength+h:Array.isArray(e)?l(e,n):0:0),0)}function l(t,e){return p+t.length*e}const c=32,p=16,h=145,d=64},95696(t,e,r){r.d(e,{A:()=>l});var s,n=r(5482),i=r(69540),a=r(25482),o=r(91429),u=r(93223);let l=class extends((0,i.OU)(a.o)){static{s=this}constructor(t){super(t),this.type="georeferenced",this.origin=null}static{this.absolute=new s}};(0,n.Cg)([(0,u.e)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),(0,n.Cg)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],l.prototype,"origin",void 0),l=s=(0,n.Cg)([(0,o.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l)},18251(t,e,r){r.r(e),r.d(e,{default:()=>l});var s=r(5482),n=r(69540),i=r(25482),a=r(91429),o=r(51850),u=r(93223);let l=class extends((0,n.OU)(i.o)){constructor(t){super(t),this.type="local",this.origin=(0,o.vt)()}};(0,s.Cg)([(0,u.e)({local:"local"},{readOnly:!0})],l.prototype,"type",void 0),(0,s.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"origin",void 0),l=(0,s.Cg)([(0,a.$K)("esri.geometry.support.MeshLocalVertexSpace")],l)},73836(t,e,r){r.d(e,{A:()=>d});var s=r(5482),n=r(69540),i=r(25482),a=r(91429),o=r(58083),u=r(9093),l=r(67026),c=r(82534),p=r(51850),h=r(24770);let d=class extends((0,n.OU)(i.o)){constructor(t){super(t),this.translation=(0,p.vt)(),this.rotationAxis=(0,p.ci)(h.up),this.rotationAngle=0,this.scale=(0,p.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,p.o8)((0,h.yo)(t)),this.rotationAngle=(0,h.g7)(t)}get localMatrix(){const t=(0,u.vt)();return(0,l.x8)(y,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,o.o1)(t,y,this.translation,this.scale),t}get localMatrixInverse(){return(0,o.B8)((0,u.vt)(),this.localMatrix)}equals(t){return this===t||null!=t&&(0,o.t2)(this.localMatrix,t.localMatrix)}};(0,s.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"translation",void 0),(0,s.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAxis",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAngle",void 0),(0,s.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"scale",void 0),(0,s.Cg)([(0,a.MZ)()],d.prototype,"rotation",null),(0,s.Cg)([(0,a.MZ)()],d.prototype,"localMatrix",null),(0,s.Cg)([(0,a.MZ)()],d.prototype,"localMatrixInverse",null),d=(0,s.Cg)([(0,a.$K)("esri.geometry.support.MeshTransform")],d);const y=(0,c.vt)()},24770(t,e,r){r.d(e,{$I:()=>g,AU:()=>y,Cr:()=>p,g7:()=>m,i4:()=>c,ui:()=>h,up:()=>b,vt:()=>l,yo:()=>f});var s=r(34727),n=r(58083),i=r(67026),a=r(82534),o=r(35522),u=r(51850);function l(t=b){return[t[0],t[1],t[2],t[3]]}function c(t,e,r=l()){return(0,o.C)(r,t),r[3]=e,r}function p(t,e,r){return(0,o.$A)(r,t,e),(0,o.S8)(r,r),r[3]=-(0,o.g7)(t,e),r}function h(t,e=l()){const r=(0,n.l)(S,t);return A(e,(0,s.KJ)((0,i.Xd)(e,r))),e}function d(t,e,r=l()){return(0,i.x8)(S,t,g(t)),(0,i.x8)(v,e,g(e)),(0,i.lw)(S,v,S),A(r,(0,s.KJ)((0,i.Xd)(r,S)))}function y(t,e,r,s=l()){return c(u.Cw,t,x),c(u.JP,e,_),c(u.Cb,r,w),d(x,_,x),d(x,w,s),s}function f(t){return t}function m(t){return t[3]}function g(t){return(0,s.kU)(t[3])}function A(t,e){return t[3]=e,t}const b=[0,0,1,0],S=(0,a.vt)(),v=(0,a.vt)(),x=(l(),l()),_=l(),w=l()},63579(t,e,r){r.d(e,{Bq:()=>u,Qp:()=>o,WN:()=>m,dK:()=>g,eN:()=>d,fH:()=>f,in:()=>y,yr:()=>l});var s=r(11254),n=r(4576),i=r(17676),a=r(20557);class o{constructor(t,e,r){this.assetName=t,this.assetMimeType=e,this.parts=r}equals(t){return this===t||this.assetName===t.assetName&&this.assetMimeType===t.assetMimeType&&(0,n.aI)(this.parts,t.parts,(t,e)=>t.equals(e))}isOnService(t){return this.parts.every(e=>e.isOnService(t))}makeHash(){let t="";for(const e of this.parts)t+=e.partHash;return t}async toBlob(t){const{parts:e}=this;if(1===e.length)return e[0].toBlob(t);const r=await Promise.all(e.map(e=>e.toBlob(t)));return(0,i.Te)(t),new Blob(r)}}class u{constructor(t,e){this.partUrl=t,this.partHash=e}equals(t){return this===t||this.partUrl===t.partUrl&&this.partHash===t.partHash}isOnService(t){return this.partUrl.startsWith(`${t.path}/assets/`)}async toBlob(t){const{data:e}=await(0,s.A)(this.partUrl,{responseType:"blob"});return(0,i.Te)(t),e}}function l(t){return function(t){switch(t?.type){case"client":return Array.isArray(t.files)?t.files.some(h):h(t.files);case"service":return t.assets.some(h);case"loadable":return!0;default:return!1}}(t?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function h(t){if(t instanceof File){const{type:e,name:r}=t;return c.test(e)||p.test(r)}return c.test(t.assetMimeType)||p.test(t.assetName)}function d(t,e){if(!t)return!1;const{source:r}=t;return function(t,e){return"service"===t.type&&t.assets.every(t=>t.isOnService(e))}(r,e)}function y(t,e){if(t===e)return!0;const{source:r}=t,{source:s}=e;if(r===s)return!0;if("service"===r.type&&"service"===s.type){if(r.assets.length!==s.assets.length)return!1;const t=(t,e)=>t.assetName<e.assetName?-1:t.assetName>e.assetName?1:0,e=[...r.assets].sort(t),n=[...s.assets].sort(t);for(let t=0;t<e.length;++t)if(!e[t].equals(n[t]))return!1;return!0}return!1}function f(t,e){return t instanceof File?(0,a.rq)(t,e):(0,a.z$)(t.assetMimeType,t.assetName,e)}function m(t){switch(t.type){case"client":return Array.isArray(t.files)?t.files:[t.files];case"service":return t.assets;case"loadable":return}}function g(t){return!!t.original}},27615(t,e,r){r.d(e,{CK:()=>u,Hq:()=>o,MW:()=>l,TE:()=>c,yJ:()=>p});var s=r(35522),n=r(86738),i=r(95696),a=r(18251);function o(t){return null!=t.origin}function u(t){return o(t.vertexSpace)}function l(t,e){if(!o(t))return null;const[r,s,i]=t.origin;return new n.A({x:r,y:s,z:i,spatialReference:e})}function c(t,e){const{x:r,y:s,z:n,spatialReference:o}=t,u=[r,s,n??0];return"local"===(e?.vertexSpace??function(t){return t.isGeographic||t.isWebMercator?"local":"georeferenced"}(o))?new a.default({origin:u}):new i.A({origin:u})}function p(t,e){return t.type===e.type&&(t.origin===e.origin||null!=t.origin&&null!=e.origin&&(0,s.t2)(t.origin,e.origin))}},17136(t,e,r){r.d(e,{Y_:()=>R,O7:()=>q,el:()=>M});var s=r(92602),n=r(69052),i=r(49186),a=r(53966),o=r(39829),u=r(82799),l=r(16930),c=r(80754),p=r(21325),h=r(28735),d=r(11254),y=r(60408),f=r(65864),m=r(2272),g=r(84952),A=r(92300);const b=()=>a.A.getLogger("esri.geometry.support.normalizeUtils");function S(t){return"polygon"===t[0].type}function v(t){return"polyline"===t[0].type}function x(t,e,r){if(e){const e=function(t,e){if(!(t instanceof u.A||t instanceof o.A)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw b().error(t),new i.A("internal:geometry",t)}const r=(0,c.r8)(t),s=[];for(const t of r){const r=[];s.push(r),r.push([t[0][0],t[0][1]]);for(let s=0;s<t.length-1;s++){const n=t[s][0],i=t[s][1],a=t[s+1][0],o=t[s+1][1],u=Math.sqrt((a-n)*(a-n)+(o-i)*(o-i)),l=(o-i)/u,c=(a-n)/u,p=u/e;if(p>1){for(let t=1;t<=p-1;t++){const s=t*e,a=c*s+n,o=l*s+i;r.push([a,o])}const t=(u+Math.floor(p-1)*e)/2,s=c*t+n,a=l*t+i;r.push([s,a])}r.push([a,o])}}return function(t){return"polygon"===t.type}(t)?new o.A({rings:s,spatialReference:t.spatialReference}):new u.A({paths:s,spatialReference:t.spatialReference})}(t,1e6);t=(0,h.ci)(e,!0)}return r&&(t=(0,c.kS)(t,r)),t}function _(t,e,r){if(Array.isArray(t)){const s=t[0];if(s>e){const r=(0,c.kd)(s,e);t[0]=s+r*(-2*e)}else if(s<r){const e=(0,c.kd)(s,r);t[0]=s+e*(-2*r)}}else{const s=t.x;if(s>e){const r=(0,c.kd)(s,e);t=t.clone().offset(r*(-2*e),0)}else if(s<r){const e=(0,c.kd)(s,r);t=t.clone().offset(e*(-2*r),0)}}return t}function w(t,e){let r=-1;for(let s=0;s<e.cutIndexes.length;s++){const n=e.cutIndexes[s],i=e.geometries[s],a=(0,c.r8)(i);for(let t=0;t<a.length;t++){const e=a[t];e.some(r=>{if(r[0]<180)return!0;{let r=0;for(let t=0;t<e.length;t++){const s=e[t][0];r=s>r?s:r}r=Number(r.toFixed(9));const s=-360*(0,c.kd)(r,180);for(let r=0;r<e.length;r++){const e=i.getPoint(t,r);i.setPoint(t,r,e.clone().offset(s,0))}return!0}})}if(n===r){if(S(t))for(const e of(0,c.r8)(i))t[n]=t[n].addRing(e);else if(v(t))for(const e of(0,c.r8)(i))t[n]=t[n].addPath(e)}else r=n,t[n]=i}return t}async function M(t,e,r){if(!Array.isArray(t))return M([t],e);e&&"string"!=typeof e&&b().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof e?e:e?.url??s.A.geometryServiceUrl;let i,a,l,S,v,q,F,R,I=0;const O=[],C=[];for(const e of t)if(null!=e)if(i||(i=e.spatialReference,a=(0,p.Vp)(i),l=i.isWebMercator,q=l?102100:4326,S=c.j7[q].maxX,v=c.j7[q].minX,F=c.j7[q].plus180Line,R=c.j7[q].minus180Line),a)if("mesh"===e.type)C.push(e);else if("point"===e.type)C.push(_(e.clone(),S,v));else if("multipoint"===e.type){const t=e.clone();t.points=t.points.map(t=>_(t,S,v)),C.push(t)}else if("extent"===e.type){const t=e.clone()._normalize(!1,!1,a);C.push(t.rings?new o.A(t):t)}else if(e.extent){const t=e.extent,r=(0,c.kd)(t.xmin,v)*(2*S);let s=0===r?e.clone():(0,c.kS)(e.clone(),r);t.offset(r,0);let{xmin:n,xmax:i}=t;n=Number(n.toFixed(9)),i=Number(i.toFixed(9)),t.intersects(F)&&i!==S?(I=i>I?i:I,s=x(s,l),O.push(s),C.push("cut")):t.intersects(R)&&n!==v?(I=i*(2*S)>I?i*(2*S):I,s=x(s,l,360),O.push(s),C.push("cut")):C.push(s)}else C.push(e.clone());else C.push(e);else C.push(e);let T=(0,c.kd)(I,S),P=-90;const N=T,E=new u.A;for(;T>0;){const t=360*T-180;E.addPath([[t,P],[t,-1*P]]),P*=-1,T--}if(O.length>0&&N>0){const e=w(O,await async function(t,e,r,s){const n=(0,m.Dl)(t),i=e[0].spatialReference,a={...s,responseType:"json",query:{...n.query,f:"json",sr:(0,p.YX)(i),target:JSON.stringify({geometryType:(0,y.$B)(e[0]),geometries:e}),cutter:JSON.stringify(r)}},o=await(0,d.A)(n.path+"/cut",a),{cutIndexes:u,geometries:l=[]}=o.data;return{cutIndexes:u,geometries:l.map(t=>{const e=(0,f.rS)(t);return e.spatialReference=i,e})}}(n,O,E,r)),s=[],i=[];for(let r=0;r<C.length;r++){const n=C[r];if("cut"!==n)i.push(n);else{const n=e.shift(),a=t[r];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&n.rings.length>=a.rings.length?(s.push(n),i.push("simplify")):i.push(l?(0,h.Gh)(n):n)}}if(!s.length)return i;const a=await async function(t,e,r){const s="string"==typeof t?(0,g.An)(t):t,n=e[0].spatialReference,i=(0,y.$B)(e[0]),a={...r,query:{...s.query,f:"json",sr:(0,p.YX)(n),geometries:JSON.stringify((0,A.X)(e))}},{data:o}=await(0,d.A)(s.path+"/simplify",a);return(0,A.V)(o.geometries,i,n)}(n,s,r),o=[];for(let t=0;t<i.length;t++){const e=i[t];"simplify"!==e?o.push(e):o.push(l?(0,h.Gh)(a.shift()):a.shift())}return o}const D=[];for(let t=0;t<C.length;t++){const e=C[t];if("cut"!==e)D.push(e);else{const t=O.shift();D.push(!0===l?(0,h.Gh)(t):t)}}return D}function q(t,e,r){const s=(0,p.Vp)(r);if(null==s)return t;const[n,i]=s.valid,a=2*i;let o=0,u=0;e>i?o=Math.ceil(Math.abs(e-i)/a):e<n&&(o=-Math.ceil(Math.abs(e-n)/a)),t>i?u=Math.ceil(Math.abs(t-i)/a):t<n&&(u=-Math.ceil(Math.abs(t-n)/a));let l=t+(o-u)*a;const c=l-e;return c>i?l-=a:c<n&&(l+=a),l}function F(t){const e=(0,p.Vp)(t);if(null==e)return null;const[r,s]=e.valid;return new n.hr(r,s)}const R=F(l.A.WGS84);F(l.A.WebMercator)},80754(t,e,r){r.d(e,{j7:()=>a,kS:()=>u,kd:()=>o,r8:()=>l});var s=r(82799),n=r(16930),i=r(60408);const a={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 o(t,e){return Math.ceil((t-e)/(2*e))}function u(t,e){const r=l(t);for(const t of r)for(const r of t)r[0]+=e;return t}function l(t){return(0,i.Bi)(t)?t.rings:t.paths}},99352(t,e,r){r.d(e,{F:()=>s,P:()=>n});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},n={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}},65515(t,e,r){r.r(e),r.d(e,{default:()=>Y});var s=r(5482),n=r(92602),i=r(11254),a=r(4576),o=r(49186),u=r(44208),l=r(66552),c=r(92474),p=r(53966),h=r(93637),d=r(17676),y=r(36708),f=r(84952),m=r(13069),g=r(91429),A=r(5443),b=r(16930),S=r(95696),v=r(27615),x=r(63579),_=r(52106),w=r(86211);function M(t){return"object"==typeof t&&null!=t&&"objectId"in t&&!!t.objectId}function q(t){return"object"==typeof t&&null!=t&&"globalId"in t&&!!t.globalId}function F(t){return t.every(q)}var R=r(91218),I=r(65864),O=r(73836),C=r(21325);async function T(t,e,r){const{geometry:s}=e,n={...e.attributes};if(null!=r&&"mesh"===s?.type){const{transformFieldRoles:e}=r,{origin:i,spatialReference:a,vertexSpace:o}=s,u=s.transform??new O.A,l="local"===o.type,c=t.spatialReference,p=c.isGeographic,h=(0,C.aI)(c,a),d=(0,R.isEqualBaseGCS)(a,c)&&(0,R.canProjectWithoutEngine)(a,c);if(!(l&&p&&d||!l&&!p&&h))return null;const y=(0,R.projectWithoutEngine)(i,a,c);if(null==y)return null;if(n[e.originX]=y.x,n[e.originY]=y.y,n[e.originZ]=y.z??0,null!=u){const{translation:t,scale:r,rotation:s}=u,i=l?1:(0,w.KX)(a)/(0,w.KX)(c);n[e.translationX]=t[0]*i,n[e.translationY]=t[2]*i,n[e.translationZ]=-t[1]*i,n[e.scaleX]=r[0],n[e.scaleY]=r[2],n[e.scaleZ]=r[1],n[e.rotationX]=s[0],n[e.rotationY]=s[2],n[e.rotationZ]=-s[1],n[e.rotationDeg]=s[3]}return{attributes:n}}return null==s?{attributes:n}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:n}}async function P(t,e){const r=await Promise.all((e.addAttachments??[]).map(e=>N(t,e))),s=await Promise.all((e.updateAttachments??[]).map(e=>N(t,e))),n=e.deleteAttachments??[];return r.length||s.length||n.length?{adds:r,updates:s,deletes:[...n]}:null}async function N(t,e){const{feature:r,attachment:s}=e,{globalId:n,name:i,contentType:a,data:o,uploadId:u}=s,l={globalId:n};if(r&&("attributes"in r?l.parentGlobalId=r.attributes?.[t.globalIdField]:r.globalId&&(l.parentGlobalId=r.globalId)),u)l.uploadId=u;else if(o){const t=await(0,f._0)(o);t&&(l.contentType=t.mediaType,l.data=t.data),o instanceof File&&(l.name=o.name)}return i&&(l.name=i),a&&(l.contentType=a),l}function E(t,e,r){if(!e||0===e.length)return[];if(r&&F(e))return e.map(t=>t.globalId);if(function(t){return t.every(M)}(e))return e.map(t=>t.objectId);const s=r?t.globalIdField:t.objectIdField;return s?e.map(t=>t.getAttribute(s)):[]}function D(t){const e=!0===t.success?null:t.error||{code:void 0,description:"Feature edit failed"};return{objectId:t.objectId,globalId:t.globalId,error:e?new o.A("feature-layer-source:edit-failure",e.description,{code:e.code}):null}}function Q(t,e){return new _.A({attributes:t.attributes,geometry:(0,I.rS)({...t.geometry,spatialReference:e})})}function j(t,e){return{adds:t?.adds?.map(t=>Q(t,e))||[],updates:t?.updates?.map(t=>({original:Q(t[0],e),current:Q(t[1],e)}))||[],deletes:t?.deletes?.map(t=>Q(t,e))||[],spatialReference:e}}var V=r(64714),J=r(64314),Z=r(60694),U=r(15426),k=r(20557),G=r(99199),X=r(96520),B=r(61956),z=r(79677),L=r(20816);const $=new l.J({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),W=new l.J({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let Y=class extends c.x_{constructor(t){super(t),this.type="feature-layer",this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.refresh=(0,d.sg)(async()=>{await this.load();const t=this.sourceJSON.editingInfo?.lastEditDate;if(null==t)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const e=t!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:e,updates:e?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(t){const e=this.layer.sourceJSON,r=this._fetchService(e,{...t}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,t)).then(()=>this._ensureLatestMetadata(t));return this.addResolvingPromise(r),Promise.resolve(this)}initialize(){this.addHandles([(0,y.wB)(()=>{const t=this.layer;return t&&"lastEditsEventDate"in t?t.lastEditsEventDate:null},t=>this._handleLastEditsEventChange(t))])}destroy(){this._removeEditInterceptor()}get queryTask(){const{capabilities:t,parsedUrl:e,gdbVersion:r,spatialReference:s,fieldsIndex:n,uniqueIdFields:i}=this.layer,a="infoFor3D"in this.layer?this.layer.infoFor3D:null,o="dynamicDataSource"in this.layer?this.layer.dynamicDataSource:null,l=(0,u.A)("featurelayer-pbf")&&t?.query.supportsFormatPBF&&null==a,c=l&&t?.query.supportsFormatPBFWithCurves,p=t?.operations?.supportsQueryAttachments??!1,h=t?.query?.relativeTimeBinWindow??0,d=e.path;return new J.A({dynamicDataSource:o,fieldsIndex:n,gdbVersion:r,infoFor3D:a,pbfSupported:l,pbfSupportedWithCurves:c,queryAttachmentsSupported:p,relativeTimeBinWindow:h,sourceSpatialReference:s,uniqueIdFields:i,url:d})}async addAttachment(t,e){await this.load();const{layer:r}=this;await(0,U.VA)(r,"editing");const s=t.attributes[r.objectIdField],n=r.parsedUrl.path+"/"+s+"/addAttachment",a=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(e,a.query);try{return D((await(0,i.A)(n,{body:o})).data.addAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(s,t)}}async updateAttachment(t,e,r){await this.load();const{layer:s}=this;await(0,U.VA)(s,"editing");const n=t.attributes[s.objectIdField],a=s.parsedUrl.path+"/"+n+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:e}}),u=this._getFormDataForAttachment(r,o.query);try{return D((await(0,i.A)(a,{body:u})).data.updateAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(n,t)}}async applyEdits(t,e){await this.load();const{layer:r}=this;await(0,U.VA)(r,"editing");const s="infoFor3D"in r?r.infoFor3D:null,n=null!=s,u=n||(e?.globalIdUsed??!1),l=n?await this._uploadMeshesAndGetAssetMapEditsJSON(t):null,c=t.addFeatures?.map(t=>T(this.layer,t,s))??[],p=(await Promise.all(c)).filter(a.Ru),h=t.updateFeatures?.map(t=>T(this.layer,t,s))??[],d=(await Promise.all(h)).filter(a.Ru),y=E(this.layer,t.deleteFeatures,u);(0,X.u)(p,d,r.spatialReference);const f=await P(this.layer,t),m=r.capabilities.editing.supportsAsyncApplyEdits&&n,g=e?.gdbVersion||r.gdbVersion,A={gdbVersion:g,rollbackOnFailure:e?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:e?.returnEditMoment,trueCurveClient:e?.editsRespectTrueCurves,usePreviousEditMoment:e?.usePreviousEditMoment,async:m};await(0,L.ZJ)(this.layer.url,g,!0);const b=(0,L.w5)(this.layer.url,g||null);if(await(0,L.We)(r.url,g,r.historicMoment))throw new o.A("feature-layer-source:historic-version","Editing a historic version is not allowed");e?.returnServiceEditsOption?(A.edits=JSON.stringify([{id:r.layerId,adds:p.length?p:null,updates:d.length?d:null,deletes:y.length?y:null,attachments:f,assetMaps:l}]),A.returnServiceEditsOption=$.toJSON(e?.returnServiceEditsOption),A.returnServiceEditsInSourceSR=e?.returnServiceEditsInSourceSR):(A.adds=p.length?JSON.stringify(p):null,A.updates=d.length?JSON.stringify(d):null,A.deletes=y.length?u?JSON.stringify(y):y.join(","):null,A.attachments=f&&JSON.stringify(f),A.assetMaps=null!=l?JSON.stringify(l):void 0);const S=this._getLayerRequestOptions({method:"post",query:A});b&&(S.authMode="immediate",S.query.returnEditMoment=!0,S.query.sessionId=L.TA);const v=e?.returnServiceEditsOption?r.url:r.parsedUrl.path;let x;try{x=m?await this._asyncApplyEdits(v+"/applyEdits",S):await(0,i.A)(v+"/applyEdits",S)}catch(t){if(!function(t){const e=t.details.raw,r=+e.code,s=+e.extendedCode;return 500===r&&(-2147217144===s||-2147467261===s)}(t))throw t;S.authMode="immediate",x=m?await this._asyncApplyEdits(v+"/applyEdits",S):await(0,i.A)(v+"/applyEdits",S)}return this._createEditsResult(x)}async deleteAttachments(t,e){await this.load();const{layer:r}=this;await(0,U.VA)(r,"editing");const s=t.attributes[r.objectIdField],n=r.parsedUrl.path+"/"+s+"/deleteAttachments";try{return(await(0,i.A)(n,this._getLayerRequestOptions({query:{attachmentIds:e.join(",")},method:"post"}))).data.deleteAttachmentResults.map(D)}catch(t){throw this._createAttachmentErrorResult(s,t)}}fetchRecomputedExtents(t={}){const e=t.signal;return this.load({signal:e}).then(async()=>{const e=this._getLayerRequestOptions({...t,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:n}=await(0,i.A)(`${s}/${r}`,e),{id:a,extent:o,fullExtent:u,timeExtent:l}=n,c=o||u;return{id:a,fullExtent:c&&A.A.fromJSON(c),timeExtent:l&&z.A.fromJSON({start:l[0],end:l[1]})}})}async queryAttachments(t,e={}){await this.load();const r=this._getLayerRequestOptions(e);return this.queryTask.executeAttachmentQuery(t,r)}async queryFeatures(t,e){await this.load();const r=await this.queryTask.execute(t,{...e,query:this._createRequestQueryOptions(e)});if(t.outStatistics?.length&&r.features.length){const e=new Map;if(r.features.forEach(r=>{const s=r.attributes;t.outStatistics?.forEach(({outStatisticFieldName:t})=>{if(t){const r=t.toLowerCase();r&&r in s&&t!==r&&(s[t]=s[r],delete s[r],e.set(r,t))}})}),null!=r.fields)for(const t of r.fields){const r=e.get(t.name.toLowerCase());null!=r&&(t.name=r)}}return r}async queryFeaturesJSON(t,e){return await this.load(),this.queryTask.executeJSON(t,{...e,query:this._createRequestQueryOptions(e)})}async queryObjectIds(t,e){return await this.load(),this.queryTask.executeForIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryFeatureCount(t,e){return await this.load(),this.queryTask.executeForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryExtent(t,e){return await this.load(),this.queryTask.executeForExtent(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeatures(t,e){return await this.load(),this.queryTask.executeRelationshipQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeaturesCount(t,e){return await this.load(),this.queryTask.executeRelationshipQueryForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryPivot(t,e){return await this.load(),this.queryTask.executePivotQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopFeatures(t,e){return await this.load(),this.queryTask.executeTopFeaturesQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryAttributeBins(t,e){return await this.load(),this.queryTask.executeAttributeBinsQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopObjectIds(t,e){return await this.load(),this.queryTask.executeForTopIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopExtents(t,e){return await this.load(),this.queryTask.executeForTopExtents(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopCount(t,e){return await this.load(),this.queryTask.executeForTopCount(t,{...e,query:this._createRequestQueryOptions(e)})}async fetchPublishingStatus(){if(!(0,Z.Wo)(this.layer.url))return"unavailable";const t=(0,f.fj)(this.layer.url,"status"),e=await(0,i.A)(t,{query:{f:"json"}});return W.fromJSON(e.data.status)}async uploadAssets(t,e){const{uploadAssets:s}=await r.e(1384).then(r.bind(r,31384));return s(t,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},e)}_handleLastEditsEventChange(t){const e=this.layer;if(null==t||!("capabilities"in e)||!("effectiveCapabilities"in e))return;if(e.capabilities?.operations?.supportsEditing||!e.effectiveCapabilities?.operations?.supportsEditing)return;const r=e.url;null!=r&&("layerId"in e&&(0,f.fj)(r,e.layerId.toString()),this._getOrCreateEditInterceptor(r).before=e=>{const r=e.requestOptions.method??"auto";if("auto"===r||"head"===r){const r=e.requestOptions.query??{};r._ts=t.getTime(),e.requestOptions.query=r}})}_getOrCreateEditInterceptor(t){return null==this._editInterceptor&&(this._editInterceptor={urls:t},n.A.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){null!=this._editInterceptor&&((0,a.TF)(n.A.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(t,e){const r=(await(0,i.A)(t,e)).data.statusUrl;for(;;){const t=(await(0,i.A)(r,{query:{f:"json"},responseType:"json"})).data;switch(t.status){case"Completed":return(0,i.A)(t.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,d.Pl)(H)}}_createRequestQueryOptions(t){const e={...this.layer.customParameters,token:this.layer.apiKey,...t?.query};return this.layer.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),e}async _fetchService(t,e){if(!t){const r={};(0,u.A)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),e?.cacheBust&&(r._ts=Date.now());const{data:s}=await(0,i.A)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:e?.signal}));t=s}this.layer.applyPreferredHost(t),this.sourceJSON=await this._patchServiceJSON(t,e?.signal);const r=t.type;if(!this.supportedSourceTypes.has(r))throw new o.A("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(t,e){if("Table"!==t.type&&t.geometryType&&!t?.drawingInfo?.renderer&&!t.defaultSymbol){const e=(0,V.F0)(t.geometryType).renderer;(0,h.sM)("drawingInfo.renderer",e,t)}if("esriGeometryMultiPatch"===t.geometryType&&t.infoFor3D&&(t.geometryType="mesh"),null==t.extent)try{const{data:r}=await(0,i.A)(this.layer.url,this._getLayerRequestOptions({signal:e}));r.spatialReference&&(t.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(t){(0,d.QP)(t)}return t}async _ensureLatestMetadata(t){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...t,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(t){const{addAssetFeatures:e}=t;if(!e?.length)return null;if(await this._areAllAssetsAlreadyMapped(e))return null;const s=t.addFeatures.filter(t=>t.geometry);if(e.length!==s.length+t.updateFeatures.length)throw new o.A("feature-layer-source:unsupported-mesh-edits","Mixing attribute only edits with mesh geometry edits is not currently supported");const n=new Array,i=new Map;for(const t of e){const{geometry:e}=t,{vertexSpace:s}=e;if((0,v.Hq)(s))n.push(e);else{const s=e.origin,{convertMeshVertexSpace:a}=await Promise.all([r.e(6860),r.e(4496)]).then(r.bind(r,28846)),o=await a(e,new S.A({origin:[s.x,s.y,s.z??0]}));i.set(o,e),t.geometry=o,n.push(o)}}await this.uploadAssets(n);for(const[t,e]of i)e.addExternalSources(t.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(e),updates:[],deletes:[]}}_getAssetMapEditsJSON(t){const e=new Array,r=this.layer.globalIdField,s=this.layer.parsedUrl;for(const n of t){const t=n.geometry,{metadata:i}=t,a=i.getExternalSourcesOnService(s),o=n.getAttribute(r);if(0===a.length){p.A.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=a.find(x.dK)??a[0];for(const t of u.assets)1===t.parts.length?e.push({globalId:(0,m.yS)(),parentGlobalId:o,assetName:t.assetName,assetHash:t.parts[0].partHash,flags:[]}):p.A.getLogger(this).error(`Skipping asset ${t.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return e}_createEditsResult(t){const e=t.data,{layerId:r}=this.layer,s=[];let n=null;if(Array.isArray(e))for(const t of e)s.push({id:t.id,editedFeatures:t.editedFeatures}),t.id===r&&(n={addResults:t.addResults??[],updateResults:t.updateResults??[],deleteResults:t.deleteResults??[],attachments:t.attachments,editMoment:t.editMoment});else n=e;const i=function(t){const e=t?.assetMaps;if(e){for(const t of e.addResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`);for(const t of e.updateResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`)}const r=t?.attachments,s={addFeatureResults:t?.addResults?.map(D)??[],updateFeatureResults:t?.updateResults?.map(D)??[],deleteFeatureResults:t?.deleteResults?.map(D)??[],addAttachmentResults:r?.addResults?r.addResults.map(D):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(D):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(D):[]};return t?.editMoment&&(s.editMoment=t.editMoment),s}(n);if(s.length>0){i.editedFeatureResults=[];for(const t of s){const{editedFeatures:e}=t,r=e?.spatialReference?new b.A(e.spatialReference):null;i.editedFeatureResults.push({layerId:t.id,editedFeatures:j(e,r)})}}return i}_createAttachmentErrorResult(t,e){const r=e.details.messages?.[0]||e.message,s=e.details.httpStatus||e.details.messageCode;return{objectId:t,globalId:null,error:new o.A("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(t,e){const r=t instanceof FormData?t:t&&t.elements?new FormData(t):null;if(r)for(const t in e){const s=e[t];null!=s&&(r.set?r.set(t,s):r.append(t,s))}return r}_getLayerRequestOptions(t={}){const{layer:e,layer:{parsedUrl:r,gdbVersion:s}}=this;return{...t,query:{gdbVersion:s,layer:"dynamicDataSource"in e&&e.dynamicDataSource?JSON.stringify({source:e.dynamicDataSource}):void 0,...r.query,f:"json",...this._createRequestQueryOptions(t)},responseType:"json"}}async _areAllAssetsAlreadyMapped(t){const{layer:e}=this,{globalIdField:r,parsedUrl:s}=e,n="infoFor3D"in e?e.infoFor3D:null;if(null==n||null==r)return!1;const i=(0,k.JZ)(n);if(null==i)return!1;const o=(0,f.fj)(s.path,`../${i.id}`),u=new Array;for(const e of t){if(!(e.geometry.metadata.getExternalSourcesOnService(s).length>0))return!1;u.push(e)}const l=u.map(t=>t.getAttribute(r)).filter(a.Ru);if(0===l.length)return!1;const{assetMapFieldRoles:{parentGlobalId:c,assetHash:p}}=n,h=new B.A({where:`${c} IN (${l.map(t=>`'${t}'`)})`,outFields:[p,c],returnGeometry:!1}),d=await(0,G.s)(o,h),{features:y}=d;return 0!==y.length&&!u.some(t=>{const e=t.getAttribute(r);if(!e)return!0;const{metadata:n}=t.geometry,i=y.filter(t=>t.getAttribute(c)===e);if(0===i.length)return!0;const a=i.map(t=>t.getAttribute(p));return n.getExternalSourcesOnService(s).flatMap(({source:t})=>t.assets.flatMap(t=>t.parts.map(t=>t.partHash))).some(t=>a.every(e=>t!==e))})}};(0,s.Cg)([(0,g.MZ)()],Y.prototype,"type",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"layer",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"supportedSourceTypes",void 0),(0,s.Cg)([(0,g.MZ)({readOnly:!0})],Y.prototype,"queryTask",null),Y=(0,s.Cg)([(0,g.$K)("esri.layers.graphics.sources.FeatureLayerSource")],Y);const H=1e3},64314(t,e,r){r.d(e,{A:()=>M});var s=r(5482),n=r(69622),i=r(49186),a=r(44208),o=r(17676),u=r(84952),l=r(91429),c=r(21325),p=r(20557),h=r(2272),d=r(65615),y=r(20615),f=r(74910),m=r(78286),g=r(99199),A=r(62815),b=r(63746);class S{constructor(t){this._options=t,this.featureSet={features:[]},this.parseOnly=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._finishVertex=S._finishVertexNonPoint,this._attributesClass=null,this._previousX=0,this._previousY=0,this._point=null,this._lengths=null,this._vertex=[],this._part=null,this._parts=null,this._i=0}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(t){"string"==typeof t&&(this.featureSet.objectIdFieldName=t)}finish(){this._options.applyTransform&&(this.featureSet.transform=null);const{spatialReference:t,features:e}=this.featureSet;if(t)for(const{geometry:r}of e)r&&(r.spatialReference=t)}feature(){this._attributesClass??=(0,b._7)(this.featureSet.fields?.map(t=>t.name)??[]),this.featureSet.features.push({attributes:new this._attributesClass}),this._options.applyTransform&&this._setVertexTransformer()}centroid([t,e]){this.featureSet.features.at(-1).centroid={x:t,y:e}}geometry(t,e,r){this._previousX=this._previousY=0,this._lengths=r;let s,{hasZ:n,hasM:i}=this.featureSet;switch(n??=!1,i??=!1,this._i=0,this._vertex=[0,0],n&&this._vertex.push(0),i&&this._vertex.push(0),this._finishVertex=S._finishVertexNonPoint,e){case"esriGeometryPoint":this._point={x:0,y:0},s=this._point,this._finishVertex=n?i?S._finishVertexPointXYZM:S._finishVertexPointXYZ:i?S._finishVertexPointXYM:S._finishVertexPointXY;break;case"esriGeometryMultipoint":s={points:[],hasZ:n,hasM:i},this._part=s.points,this._parts=[];break;case"esriGeometryPolyline":s={paths:[],hasZ:n,hasM:i},this._parts=s.paths,this._part=[];break;case"esriGeometryPolygon":s={rings:[],hasZ:n,hasM:i},this._parts=s.rings,this._part=[]}1===t?(this.featureSet.queryGeometry=s,this.featureSet.queryGeometryType=e,this._options.applyTransform||this._setVertexTransformer()):this.featureSet.features.at(-1).geometry=s}coord(t){const e=this._vertex;e[this._i++]=t,this._i<e.length||(this._i=0,this._transformInPlace&&(e[0]+=this._previousX,e[1]+=this._previousY,[this._previousX,this._previousY]=e,this._transformInPlace(e)),this._finishVertex(this))}curvedGeometry(t,e,r,s){let n,{hasZ:i,hasM:a}=this.featureSet;switch(i??=!1,a??=!1,t){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${t} does not make sense`);case"esriGeometryPolyline":n={paths:[],curvePaths:[],hasZ:i,hasM:a},this._parts=n.curvePaths,this._part=[];break;case"esriGeometryPolygon":n={rings:[],curveRings:[],hasZ:i,hasM:a},this._parts=n.curveRings,this._part=[]}this.featureSet.features.at(-1).geometry=n}startCurvedPart(t){this._part.push(this._transform(t))}finishCurvedPart(t){this._parts.push(this._part),this._part=[]}lineSegment(t,e){this._part.push(this._transform(e))}bezierSegment(t,e,r,s){this._part.push({b:[this._transform(e),this._transformXY(r),this._transformXY(s)]})}circularArcSegment(t,e,r){this._part.push({c:[this._transform(e),this._transformXY(r)]})}ellipticArcSegment(t,e,r,s,n,i,a,o){this._part.push({a:[this._transform(e),this._transformXY(r),s,n,i,a,o]})}static _finishVertexPointXY({_point:t,_vertex:e}){[t.x,t.y]=e}static _finishVertexPointXYZ({_point:t,_vertex:e}){[t.x,t.y,t.z]=e}static _finishVertexPointXYM({_point:t,_vertex:e}){[t.x,t.y,t.m]=e}static _finishVertexPointXYZM({_point:t,_vertex:e}){[t.x,t.y,t.z,t.m]=e}static _finishVertexNonPoint(t){const{_part:e,_parts:r,_lengths:s,_vertex:n}=t;e.push([...n]),e.length<s[r.length]||(t._previousX=t._previousY=0,t._part=[],r.push(e))}_setVertexTransformer(){const{sourceSpatialReference:t}=this._options,{spatialReference:e,hasZ:r,transform:s}=this.featureSet,n=r?(0,A.d)(t,e):1;this._transformInPlace??=(0,b.Mv)(this.featureSet,n),this._transformInPlaceXY??=(0,b.Mv)({transform:s})}_transform(t){const e=[...t];return this._transformInPlace?.(e),e}_transformXY(t){const e=[t[0],t[1]];return this._transformInPlaceXY?.(e),e}}var v=r(80893),x=r(22671),_=r(61956);async function w(t,e,r,s){const n=(0,h.Dl)(t),i={...r},a=_.A.from(e),o=!a.quantizationParameters;return await(0,v.IJ)(n,a,new S({sourceSpatialReference:a.sourceSpatialReference,applyTransform:o}),i,s)}let M=class extends n.A{constructor(t){super(t),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.pbfSupportedWithCurves=!1,this.queryAttachmentsSupported=!1,this.relativeTimeBinWindow=0,this.sourceSpatialReference=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return(0,u.An)(this.url)}async execute(t,e){const r=await this.executeJSON(t,e);return this.featureSetFromJSON(t,r,e)}async executeJSON(t,e){const r=this._normalizeQuery(t),s=null!=t.outStatistics?.[0],n=(0,a.A)("featurelayer-pbf-statistics");let i;if(this.pbfSupported&&(!s||n)&&(!t.returnTrueCurves||this.pbfSupportedWithCurves))try{i=await w(this.url,r,e,{uniqueIdFields:this.uniqueIdFields})}catch(t){if("query:parsing-pbf"!==t.name)throw t;this.pbfSupported=!1}return i??=await(0,g.e)(this.url,r,e,{uniqueIdFields:this.uniqueIdFields}),this._normalizeFields(i.fields),i}async featureSetFromJSON(t,e,s){if(!this._queryGet3DObjectFormat(t)||null==this.infoFor3D||!e.features)return x.A.fromJSON(e);const{meshFeatureSetFromJSON:n}=await(0,o.qr)(Promise.all([r.e(6860),r.e(7005),r.e(6754),r.e(2761),r.e(7634),r.e(8883)]).then(r.bind(r,40050)),s);return n(t,this.infoFor3D,e)}executeForCount(t,e){return(0,y.I)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}executeForExtent(t,e){return(0,f.L)(this.url,this._normalizeQuery(t),e)}executeForIds(t,e){return(0,m.V)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(t,e){const[{default:s},{executeRelationshipQuery:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(1763).then(r.bind(r,71763))]),e);let i=s.from(t);return(this.gdbVersion||this.dynamicDataSource)&&(i=i.clone(),i.gdbVersion=i.gdbVersion||this.gdbVersion,i.dynamicDataSource=i.dynamicDataSource||this.dynamicDataSource),n(this.url,i,e)}async executeRelationshipQueryForCount(t,e){const[{default:s},{executeRelationshipQueryForCount:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(1763).then(r.bind(r,71763))]),e);let i=s.from(t);return(this.gdbVersion||this.dynamicDataSource)&&(i=i.clone(),i.gdbVersion=i.gdbVersion||this.gdbVersion,i.dynamicDataSource=i.dynamicDataSource||this.dynamicDataSource),n(this.url,i,e)}async executeAttachmentQuery(t,e){const{executeAttachmentQuery:s,fetchAttachments:n,processAttachmentQueryResult:i}=await(0,o.qr)(r.e(9239).then(r.bind(r,9239)),e),a=(0,h.Dl)(this.url);return i(a,await(this.queryAttachmentsSupported?s(a,t,e):n(a,t,e)))}async executeAttributeBinsQuery(t,e){const{executeAttributeBinsQuery:s}=await(0,o.qr)(r.e(3103).then(r.bind(r,33103)),e);return s(this.parsedUrl,t,e)}async executePivotQuery(t,e){const{executePivotQuery:s}=await(0,o.qr)(r.e(566).then(r.bind(r,80566)),e);return s(this.parsedUrl,t,e)}async executeTopFeaturesQuery(t,e){const{executeTopFeaturesQuery:s}=await(0,o.qr)(r.e(1273).then(r.bind(r,11273)),e);return s(this.parsedUrl,t,this.sourceSpatialReference,e)}async executeForTopIds(t,e){const{executeForTopIds:s}=await(0,o.qr)(r.e(1277).then(r.bind(r,21277)),e);return s(this.parsedUrl,t,e)}async executeForTopExtents(t,e){const{executeForTopExtents:s}=await(0,o.qr)(r.e(8018).then(r.bind(r,8018)),e);return s(this.parsedUrl,t,e)}async executeForTopCount(t,e){const{executeForTopCount:s}=await(0,o.qr)(r.e(980).then(r.bind(r,10980)),e);return s(this.parsedUrl,t,e)}_normalizeQuery(t){let e=_.A.from(t);e.sourceSpatialReference=e.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(e=e===t?e.clone():e,e.gdbVersion=t.gdbVersion||this.gdbVersion,e.dynamicDataSource=t.dynamicDataSource?d.A.from(t.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this,s=this._queryGet3DObjectFormat(t);if(null!=r&&s){if(e=e===t?e.clone():e,e.formatOf3DObjects=s,e.outSpatialReference&&!(0,c.aI)(e.outSpatialReference,this.sourceSpatialReference))throw new i.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==e.outFields||!e.outFields.includes("*")){e=e===t?e.clone():e,null==e.outFields&&(e.outFields=[]);const{originX:s,originY:n,originZ:i,translationX:a,translationY:o,translationZ:u,scaleX:l,scaleY:c,scaleZ:p,rotationX:h,rotationY:d,rotationZ:y,rotationDeg:f}=r.transformFieldRoles;e.outFields.push(s,n,i,a,o,u,l,c,p,h,d,y,f)}}return e}_normalizeFields(t){if(null!=this.fieldsIndex&&null!=t)for(const e of t){const t=this.fieldsIndex.get(e.name);t&&Object.assign(e,t.toJSON())}}_queryGet3DObjectFormat({returnGeometry:t,multipatchOption:e,outStatistics:r}){return!0!==t||"xyFootprint"===e||r?null:(0,p.Hz)(this.infoFor3D)}};(0,s.Cg)([(0,l.MZ)({type:d.A})],M.prototype,"dynamicDataSource",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"fieldsIndex",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"gdbVersion",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"infoFor3D",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],M.prototype,"parsedUrl",null),(0,s.Cg)([(0,l.MZ)()],M.prototype,"pbfSupported",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"pbfSupportedWithCurves",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"queryAttachmentsSupported",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"relativeTimeBinWindow",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"sourceSpatialReference",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"uniqueIdFields",void 0),(0,s.Cg)([(0,l.MZ)({type:String})],M.prototype,"url",void 0),M=(0,s.Cg)([(0,l.$K)("esri.layers.graphics.sources.support.QueryTask")],M)},64714(t,e,r){r.d(e,{F0:()=>o,Vx:()=>c,e2:()=>h,f:()=>d});var s=r(44208),n=r(4718),i=r(99352),a=r(93470);function o(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?a.Cb:"esriGeometryPolyline"===t?a.yM:a.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function c(t,e){if((0,s.A)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let r=`this${p(e)} = null;`;for(const e in t)r+=`this${p(e)} = ${JSON.stringify(t[e])};`;const s=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[e]:null,...t})}}function p(t){return u.test(t)?`.${t}`:`[${JSON.stringify(t)}]`}function h(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(t)}}]}function d(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:i.P,editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:e,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},92300(t,e,r){r.d(e,{V:()=>a,X:()=>i});var s=r(60408),n=r(65864);function i(t){return{geometryType:(0,s.$B)(t[0]),geometries:t.map(t=>t.toJSON())}}function a(t,e,r){const s=(0,n.xD)(e);return t.map(t=>{const e=s.fromJSON(t);return e.spatialReference=r,e})}},20615(t,e,r){r.d(e,{I:()=>a});var s=r(2272),n=r(80893),i=r(61956);function a(t,e,r,a){return(0,n.gW)((0,s.Dl)(t),i.A.from(e),r,a)}},74910(t,e,r){r.d(e,{L:()=>o});var s=r(5443),n=r(2272),i=r(80893),a=r(61956);async function o(t,e,r){const o=(0,n.Dl)(t),u=await(0,i.Jf)(o,a.A.from(e),{...r}),l=u.extent;return!l||isNaN(l.xmin)||isNaN(l.ymin)||isNaN(l.xmax)||isNaN(l.ymax)?{count:u.count,extent:null}:{count:u.count,extent:s.A.fromJSON(l)}}},78286(t,e,r){r.d(e,{V:()=>a});var s=r(2272),n=r(80893),i=r(61956);async function a(t,e,r,a){const o=(0,s.Dl)(t),u=await(0,n.Pk)(o,i.A.from(e),r,a);return u.objectIds??function(t){if(t)return function(t){return!Array.isArray(t[0])}(t)?t:t.map(t=>JSON.stringify(t))}(u.uniqueIds)??[]}},99199(t,e,r){r.d(e,{e:()=>u,s:()=>o});var s=r(2272),n=r(80893),i=r(22671),a=r(61956);async function o(t,e,r,s){const n=await u(t,e,r,s);return i.A.fromJSON(n)}function u(t,e,r,i){const o=(0,s.Dl)(t),u={...r},l=a.A.from(e);return(0,n.eW)(o,l,l.sourceSpatialReference,u,i)}},63746(t,e,r){function s(t){return class{constructor(){for(const e of t)this[e]=null}}}function n(t,e=1){const{transform:r,hasZ:s,hasM:n}=t;if(null==r)return s&&1!==e?t=>{t[2]*=e}:null;const[i,a]=function(t,e,r,s){let{scale:n,translate:i,originPosition:a}=t;return"upperLeft"===a&&(n=n.map((t,e)=>1===e?-t:t)),e&&(n=n.map((t,e)=>2===e?t*s:t),i=i.map((t,e)=>2===e?t*s:t)),!e&&r&&(n=n.filter((t,e)=>2!==e),i=i.filter((t,e)=>2!==e)),[n,i]}(r,s,n,e),o=t.hasZ?3:2;return t=>{for(let e=0;e<t.length&&(e!==o||0!==t[e]);++e)t[e]=t[e]*i[e]+a[e]}}r.d(e,{Mv:()=>n,_7:()=>s}),r(53966)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1951],{73354(t,e,n){n.d(e,{a:()=>h,b:()=>u,c:()=>f,d:()=>o,e:()=>p,f:()=>l,l:()=>a,n:()=>m,t:()=>s});var r=n(40876),i=(n(44208),n(72727));function o(t,e,n){s(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function s(t,e,n,r=3,o=r){const s=(0,i.k)(t.length,r,3),f=(0,i.k)(e.length,o,3),u=Math.min(s,f),c=n[0],a=n[1],l=n[2],h=n[4],p=n[5],m=n[6],d=n[8],y=n[9],g=n[10],M=n[12],A=n[13],S=n[14];let w=0,B=0;for(let n=0;n<u;n++){const n=e[w],i=e[w+1],s=e[w+2];t[B]=c*n+h*i+d*s+M,t[B+1]=a*n+p*i+y*s+A,t[B+2]=l*n+m*i+g*s+S,w+=o,B+=r}return t}function f(t,e,n){u(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function u(t,e,n,r=3,o=r){const s=(0,i.k)(t.length,r,3),f=(0,i.k)(e.length,o,3),u=Math.min(s,f),c=n[0],a=n[1],l=n[2],h=n[3],p=n[4],m=n[5],d=n[6],y=n[7],g=n[8];let M=0,A=0;for(let n=0;n<u;n++){const n=e[M],i=e[M+1],s=e[M+2];t[A]=c*n+h*i+d*s,t[A+1]=a*n+p*i+y*s,t[A+2]=l*n+m*i+g*s,M+=o,A+=r}}function c(t,e,n,r=3,i=r){const o=Math.min(t.length/r,e.length/i);let s=0,f=0;for(let u=0;u<o;u++)t[f]=n*e[s],t[f+1]=n*e[s+1],t[f+2]=n*e[s+2],s+=i,f+=r;return t}function a(t,e,n,r){l(t.typedBuffer,e.typedBuffer,n,r,t.typedBufferStride,e.typedBufferStride)}function l(t,e,n,i,o=3,s=o){const f=Math.min(t.length/o,e.length/s);let u=0,c=0;const a=1/r.Tf;for(let r=0;r<f;r++)t[c]=i*(n*e[u])**a,t[c+1]=i*(n*e[u+1])**a,t[c+2]=i*(n*e[u+2])**a,u+=s,c+=o}function h(t,e,n,r=3,o=r){const s=(0,i.k)(t.length,r,3),f=(0,i.k)(e.length,o,3),u=Math.min(s,f);let c=0,a=0;for(let i=0;i<u;i++)t[a]=e[c]+n[0],t[a+1]=e[c+1]+n[1],t[a+2]=e[c+2]+n[2],c+=o,a+=r;return t}function p(t,e){m(t.typedBuffer,e.typedBuffer,t.typedBufferStride,e.typedBufferStride)}function m(t,e,n=3,r=n){const i=Math.min(t.length/n,e.length/r);let o=0,s=0;for(let f=0;f<i;f++){const i=e[o],f=e[o+1],u=e[o+2],c=i*i+f*f+u*u;if(c>0){const e=1/Math.sqrt(c);t[s]=e*i,t[s+1]=e*f,t[s+2]=e*u}o+=r,s+=n}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:l,linearToSRGBView:a,normalize:m,normalizeView:p,scale:c,scaleView:function(t,e,n){c(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)},shiftRight:function(t,e,n){const r=Math.min(t.count,e.count),i=t.typedBuffer,o=t.typedBufferStride,s=e.typedBuffer,f=e.typedBufferStride;let u=0,c=0;for(let t=0;t<r;t++)i[c]=s[u]>>n,i[c+1]=s[u+1]>>n,i[c+2]=s[u+2]>>n,u+=f,c+=o},transformMat3:u,transformMat3View:f,transformMat4:s,transformMat4View:o,translate:h},Symbol.toStringTag,{value:"Module"}))},69052(t,e,n){n.d(e,{hr:()=>i,ie:()=>u,uC:()=>f});var r=n(34727);class i{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,n=!1){return o(this.range,this.min,this.max,t,e,n)}clamp(t,e=0){return(0,r.qE)(t-e,this.min,this.max)+e}monotonic(t,e,n){return t<e?e:e+s(this.range,t-e,n)}minimalMonotonic(t,e,n){return o(this.range,t,t+this.range,e,n)}center(t,e,n){return e=this.monotonic(t,e,n),this.normalize((t+e)/2,n)}diff(t,e,n){return this.monotonic(t,e,n)-t}shortestSignedDiff(t,e){t=this.normalize(t);const n=(e=this.normalize(e))-t,r=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(n)<Math.abs(r)?n:r}contains(t,e,n){return e=this.minimalMonotonic(t,e),(n=this.minimalMonotonic(t,n))>t&&n<e}}function o(t,e,n,r,i=0,o=!1){return(r-=i)<e?r+=s(t,e-r):r>n&&(r-=s(t,r-n)),o&&r===n&&(r=e),r+i}function s(t,e,n=0){return Math.ceil((e-n)/t)*t+n}const f=new i(0,2*Math.PI),u=(new i(-Math.PI,Math.PI),new i(0,360))},69397(t,e,n){n.d(e,{Qf:()=>u,Qh:()=>s,RS:()=>i,Ul:()=>p,i5:()=>h,lM:()=>o,qK:()=>a});var r=n(34275);const i=16;function o(t){if(!t)return 0;let e=a;for(const n in t)t.hasOwnProperty(n)&&(e+=f(t[n],!1));return e}function s(t){if(!t)return 0;if("number"==typeof t[0])return u(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return c(t,8);let n=l;for(let r=0;r<e;r++)n+=f(t[r]);return n}(t);let e=a;for(const n in t)t.hasOwnProperty(n)&&(e+=f(t[n]));return e}function f(t,e=!0){switch(typeof t){case"object":return e?s(t):a;case"string":return function(t){return 32+t.length}(t);case"number":return i;case"boolean":return 4;default:return 8}}function u(...t){return t.reduce((t,e)=>t+(e?(0,r.iu)(e)?e.byteLength+h:Array.isArray(e)?c(e,i):0:0),0)}function c(t,e){return l+t.length*e}const a=32,l=16,h=145,p=64},72727(t,e,n){function r(t,e,n){if(e<=0)return 0;const r=t-n;return r<0?0:Math.floor(r/e)+1}n.d(e,{k:()=>r}),n(53966)},17136(t,e,n){n.d(e,{Y_:()=>O,O7:()=>R,el:()=>x});var r=n(92602),i=n(69052),o=n(49186),s=n(53966),f=n(39829),u=n(82799),c=n(16930),a=n(80754),l=n(21325),h=n(28735),p=n(11254),m=n(60408),d=n(65864),y=n(2272),g=n(84952),M=n(92300);const A=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function S(t){return"polygon"===t[0].type}function w(t){return"polyline"===t[0].type}function B(t,e,n){if(e){const e=function(t,e){if(!(t instanceof u.A||t instanceof f.A)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw A().error(t),new o.A("internal:geometry",t)}const n=(0,a.r8)(t),r=[];for(const t of n){const n=[];r.push(n),n.push([t[0][0],t[0][1]]);for(let r=0;r<t.length-1;r++){const i=t[r][0],o=t[r][1],s=t[r+1][0],f=t[r+1][1],u=Math.sqrt((s-i)*(s-i)+(f-o)*(f-o)),c=(f-o)/u,a=(s-i)/u,l=u/e;if(l>1){for(let t=1;t<=l-1;t++){const r=t*e,s=a*r+i,f=c*r+o;n.push([s,f])}const t=(u+Math.floor(l-1)*e)/2,r=a*t+i,s=c*t+o;n.push([r,s])}n.push([s,f])}}return function(t){return"polygon"===t.type}(t)?new f.A({rings:r,spatialReference:t.spatialReference}):new u.A({paths:r,spatialReference:t.spatialReference})}(t,1e6);t=(0,h.ci)(e,!0)}return n&&(t=(0,a.kS)(t,n)),t}function b(t,e,n){if(Array.isArray(t)){const r=t[0];if(r>e){const n=(0,a.kd)(r,e);t[0]=r+n*(-2*e)}else if(r<n){const e=(0,a.kd)(r,n);t[0]=r+e*(-2*n)}}else{const r=t.x;if(r>e){const n=(0,a.kd)(r,e);t=t.clone().offset(n*(-2*e),0)}else if(r<n){const e=(0,a.kd)(r,n);t=t.clone().offset(e*(-2*n),0)}}return t}function k(t,e){let n=-1;for(let r=0;r<e.cutIndexes.length;r++){const i=e.cutIndexes[r],o=e.geometries[r],s=(0,a.r8)(o);for(let t=0;t<s.length;t++){const e=s[t];e.some(n=>{if(n[0]<180)return!0;{let n=0;for(let t=0;t<e.length;t++){const r=e[t][0];n=r>n?r:n}n=Number(n.toFixed(9));const r=-360*(0,a.kd)(n,180);for(let n=0;n<e.length;n++){const e=o.getPoint(t,n);o.setPoint(t,n,e.clone().offset(r,0))}return!0}})}if(i===n){if(S(t))for(const e of(0,a.r8)(o))t[i]=t[i].addRing(e);else if(w(t))for(const e of(0,a.r8)(o))t[i]=t[i].addPath(e)}else n=i,t[i]=o}return t}async function x(t,e,n){if(!Array.isArray(t))return x([t],e);e&&"string"!=typeof e&&A().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const i="string"==typeof e?e:e?.url??r.A.geometryServiceUrl;let o,s,c,S,w,R,j,O,v=0;const P=[],T=[];for(const e of t)if(null!=e)if(o||(o=e.spatialReference,s=(0,l.Vp)(o),c=o.isWebMercator,R=c?102100:4326,S=a.j7[R].maxX,w=a.j7[R].minX,j=a.j7[R].plus180Line,O=a.j7[R].minus180Line),s)if("mesh"===e.type)T.push(e);else if("point"===e.type)T.push(b(e.clone(),S,w));else if("multipoint"===e.type){const t=e.clone();t.points=t.points.map(t=>b(t,S,w)),T.push(t)}else if("extent"===e.type){const t=e.clone()._normalize(!1,!1,s);T.push(t.rings?new f.A(t):t)}else if(e.extent){const t=e.extent,n=(0,a.kd)(t.xmin,w)*(2*S);let r=0===n?e.clone():(0,a.kS)(e.clone(),n);t.offset(n,0);let{xmin:i,xmax:o}=t;i=Number(i.toFixed(9)),o=Number(o.toFixed(9)),t.intersects(j)&&o!==S?(v=o>v?o:v,r=B(r,c),P.push(r),T.push("cut")):t.intersects(O)&&i!==w?(v=o*(2*S)>v?o*(2*S):v,r=B(r,c,360),P.push(r),T.push("cut")):T.push(r)}else T.push(e.clone());else T.push(e);else T.push(e);let V=(0,a.kd)(v,S),z=-90;const L=V,X=new u.A;for(;V>0;){const t=360*V-180;X.addPath([[t,z],[t,-1*z]]),z*=-1,V--}if(P.length>0&&L>0){const e=k(P,await async function(t,e,n,r){const i=(0,y.Dl)(t),o=e[0].spatialReference,s={...r,responseType:"json",query:{...i.query,f:"json",sr:(0,l.YX)(o),target:JSON.stringify({geometryType:(0,m.$B)(e[0]),geometries:e}),cutter:JSON.stringify(n)}},f=await(0,p.A)(i.path+"/cut",s),{cutIndexes:u,geometries:c=[]}=f.data;return{cutIndexes:u,geometries:c.map(t=>{const e=(0,d.rS)(t);return e.spatialReference=o,e})}}(i,P,X,n)),r=[],o=[];for(let n=0;n<T.length;n++){const i=T[n];if("cut"!==i)o.push(i);else{const i=e.shift(),s=t[n];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&i.rings.length>=s.rings.length?(r.push(i),o.push("simplify")):o.push(c?(0,h.Gh)(i):i)}}if(!r.length)return o;const s=await async function(t,e,n){const r="string"==typeof t?(0,g.An)(t):t,i=e[0].spatialReference,o=(0,m.$B)(e[0]),s={...n,query:{...r.query,f:"json",sr:(0,l.YX)(i),geometries:JSON.stringify((0,M.X)(e))}},{data:f}=await(0,p.A)(r.path+"/simplify",s);return(0,M.V)(f.geometries,o,i)}(i,r,n),f=[];for(let t=0;t<o.length;t++){const e=o[t];"simplify"!==e?f.push(e):f.push(c?(0,h.Gh)(s.shift()):s.shift())}return f}const N=[];for(let t=0;t<T.length;t++){const e=T[t];if("cut"!==e)N.push(e);else{const t=P.shift();N.push(!0===c?(0,h.Gh)(t):t)}}return N}function R(t,e,n){const r=(0,l.Vp)(n);if(null==r)return t;const[i,o]=r.valid,s=2*o;let f=0,u=0;e>o?f=Math.ceil(Math.abs(e-o)/s):e<i&&(f=-Math.ceil(Math.abs(e-i)/s)),t>o?u=Math.ceil(Math.abs(t-o)/s):t<i&&(u=-Math.ceil(Math.abs(t-i)/s));let c=t+(f-u)*s;const a=c-e;return a>o?c-=s:a<i&&(c+=s),c}function j(t){const e=(0,l.Vp)(t);if(null==e)return null;const[n,r]=e.valid;return new i.hr(n,r)}const O=j(c.A.WGS84);j(c.A.WebMercator)},80754(t,e,n){n.d(e,{j7:()=>s,kS:()=>u,kd:()=>f,r8:()=>c});var r=n(82799),i=n(16930),o=n(60408);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function f(t,e){return Math.ceil((t-e)/(2*e))}function u(t,e){const n=c(t);for(const t of n)for(const n of t)n[0]+=e;return t}function c(t){return(0,o.Bi)(t)?t.rings:t.paths}},38969(t,e,n){n.d(e,{i:()=>i});var r=n(37955);function i(t,e){return new Promise((n,i)=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?n():(e((0,r.Oo)(t,"canplay",n)),e((0,r.Oo)(t,"error",i)))})}},92300(t,e,n){n.d(e,{V:()=>s,X:()=>o});var r=n(60408),i=n(65864);function o(t){return{geometryType:(0,r.$B)(t[0]),geometries:t.map(t=>t.toJSON())}}function s(t,e,n){const r=(0,i.xD)(e);return t.map(t=>{const e=r.fromJSON(t);return e.spatialReference=n,e})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[162,2245,4342,7694],{47423(e,t,r){r.r(t),r.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>P,constructFeatureSet:()=>N,constructFeatureSetFromPortalItem:()=>$,constructFeatureSetFromRelationship:()=>D,constructFeatureSetFromUrl:()=>q,convertToFeatureSet:()=>Q,createFeatureSetCollectionFromMap:()=>B,createFeatureSetCollectionFromService:()=>z,initialiseMetaDataCache:()=>k});var i=r(11254);class n{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection",this._layerById={},this._layerByName={}}add(e,t,r){this._layerById[t]=r,this._layerByName[e]=r}async featureSetByName(e,t=!0,r=["*"]){return void 0===this._layerByName[e]?null:this._layerByName[e]}async featureSetById(e,t=!0,r=["*"]){return void 0===this._layerById[e]?null:this._layerById[e]}castToText(e=!1){return"object, FeatureSetCollection"}}var a=r(78878),s=r(35704),l=r(70333),o=r(48938),u=r(61454),c=r(66395),d=r(87449),p=r(11221),h=r(33325),y=r(80609),f=r(50145),m=r(4576),g=r(80200),_=r(39516),w=r(89696),b=r(18589),F=r(17126),v=r(54546),I=r(61956),T=r(7562);function S(e,t){null==e.clause&&(e.clause=function(e){if(0===e.length)throw new d.dr("NeverReach");const t=[];for(let r=0;r<e.length;r++){const i=e[r],n=[`"${i.name.replaceAll('"','""')}" ${i.asc?">":"<"} @last_${r}`];for(let t=0;t<r;t++){const r=e[t];n.push(`"${r.name.replaceAll('"','""')}" = @last_${t}`)}t.push(n.join(" AND "))}const r=t.join(" OR ");return w.A.create(r)}(e.keyFields));for(let r=0;r<e.keyFields.length;r++){const i=e.keyFields[r].name;e.clause.parameters[`last_${r}`]=t.attributes[i]}}class A extends p.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this._requestStandardised=!1,this._useDefinitionExpression=!0,this._recentlyUsedQueries=null,this._featureSetQueryInterceptor=null,this._featureSetInfo=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry),e.lrucache&&(this._recentlyUsedQueries=e.lrucache),e.interceptor&&(this._featureSetQueryInterceptor=e.interceptor)}_maxQueryRate(){return h.gO}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+(0,h.JB)(e.toJSON());return(0,g.d)(t,g.T.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=1,null!=e&&e>=10.61&&(this._databaseType=0)):null!=e&&(e>=10.5&&(this._databaseType=1,this._requestStandardised=!0),e>=10.61&&(this._databaseType=0))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new I.A;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch{return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}async _queryAll(){return(await this.query({abortSignal:o._})).features}async query(e){return await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter?p.An:this._canUsePagination()?this._queryUsingPaging(e):this._queryUsingIdSetTraversal(e)}async _queryUsingPaging(e){const t=this._layer.capabilities.query;let r=!0,i=null,n=!1;null!=e.orderBy&&(t.supportsOrderBy?(i=e.orderBy.toOrderByFields(),n=!0):r=!1);const a=await this.databaseType(),s=null==e.where?null==e.spatialFilter?"1=1":"":(0,y.YY)(e.where,a),l=!0!==this._removeGeometry,o=this._overrideFields??this._fieldsIncludingObjectId(["*"]),u=(this.isTable()||!l?t.standardMaxRecordCountNoGeometry:void 0)??t.standardMaxRecordCount??t.maxRecordCount??this._maxQueryRate(),c=this._createQuery();return c.where=(0,_.mA)(c.where,s),null!=e.spatialFilter&&(c.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),c.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),c.geometry=e.spatialFilter.geometry),c.orderByFields=i,c.outFields=o,c.returnGeometry=l,c.outSpatialReference=this.spatialReference,c.resultType="standard",{ordered:n,filterApplied:!0,spatialFilterApplied:!0,features:this._queryPaginated(c,u,r?e.limit:null,e.abortSignal)}}async*_queryPaginated(e,t,r,i){let n;e.num=null!=r?Math.min(r,t):t,e.start=0;do{(0,d.dZ)(i),n=await this.executeQuery(e,"execute"),yield*(0,m.Ho)(n.features,this._maxQueryRate()),e.start+=n.features.length,e.num=null!=r?Math.min(r-e.start,t):t}while(e.num>0&&!0===n.exceededTransferLimit)}async _queryUsingIdSetTraversal(e){let t=!0,r=null,i=!1;null!=e.orderBy&&(this._layer.capabilities?.query?.supportsOrderBy?(r=e.orderBy.toOrderByFields(),i=!0):t=!1);const n=await this.databaseType(),a=null==e.where?null==e.spatialFilter?"1=1":"":(0,y.YY)(e.where,n),s=this._createQuery();s.where=(0,_.mA)(s.where,a),null!=e.spatialFilter&&(s.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),s.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),s.geometry=e.spatialFilter.geometry),s.orderByFields=r,s.outSpatialReference=this.spatialReference,s.num=t?e.limit:null;const l=await this.executeQuery(s,"executeForIds");if((0,d.dZ)(e.abortSignal),null==l||l.length<=0)return p.An;let o=this._maxQueryRate();const u=this._layer.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const c=this._createQuery();return s.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),s.returnGeometry=!0!==this._removeGeometry,s.outSpatialReference=this.spatialReference,{ordered:i,filterApplied:!0,spatialFilterApplied:!0,features:this._traverseIdSet(c,l,o,e.abortSignal)}}async*_traverseIdSet(e,t,r,i){for(let n=0;n<t.length;n+=r){e.objectIds=t.slice(n,n+r),(0,d.dZ)(i);const a=await this.executeQuery(e,"execute");yield a.features}}async queryStat(e){await this._ensureLoaded();const t=this._layer.capabilities?.query,r=!!t?.supportsSqlExpression,i=!!t?.supportsStatistics,n=!!t?.supportsDistinct,a=(0,f.Dp)(e.stat);if("count"===a)return n?this._queryCount(e):{calculated:!1};const s=e.field;if(null==s)return{calculated:!1};if(!1===i||!1===(0,y.DA)(s)&&!1===r||!1===s.isStandardized)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,s,e.limit??h.gO,e.abortSignal);if("distinct"===a)return!1===n?null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(a,s,e.limit??h.gO,e.abortSignal):{calculated:!1};const l=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};const o=this._createQuery();o.where=(0,_.mA)(o.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,y.YY)(e.where,l)),null!=e.spatialFilter&&(o.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),o.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),o.geometry=e.spatialFilter.geometry);const u=new T.A;u.statisticType=a,u.onStatisticField=(0,y.YY)(s,l),u.outStatisticFieldName="ARCADE_STAT_RESULT",o.returnGeometry=!1;let c="ARCADE_STAT_RESULT";o.outStatistics=[u];const p=await this.executeQuery(o,"execute");if(!p.hasOwnProperty("features")||0===p.features.length)throw new d.dr("InvalidStatResponse");let m=!1;const g=p.fields??[];for(const e of g)if("ARCADE_STAT_RESULT"===e.name.toUpperCase()){c=e.name,"esriFieldTypeDate"===e.type&&(m=!0);break}const w=p.features[0].attributes[c];return{calculated:!0,result:m&&null!=w?new Date(w):w}}async _queryCount(e){const t=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};const r=this._createQuery();return r.where=(0,_.mA)(r.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,y.YY)(e.where,t)),null!=e.spatialFilter&&(r.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),r.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),r.geometry=e.spatialFilter.geometry),r.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(r,"executeForCount")}}async canQueryAggregate(e){await this._ensureLoaded();let t=!1;const r=this._layer.capabilities?.query,i=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(t=!0),t)for(const r of e.statistics)(!1===r.workingexpr?.isStandardized||!1===(0,y.DA)(r.workingexpr)&&!1===i)&&(t=!1);return t}async queryAggregate(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return p.An;const t=await this.databaseType(),r=e.groupBy,i=e.orderBy;let n=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const e=this.getFieldsIndex();n={keyFields:r.map((t,r)=>({name:e.normalizeFieldName(t)??t,asc:null==i||1===i._directions[r]}))}}let a=null,s=!1;null!=i&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==n||(0,m.MJ)(r,0,r.length,i._fields,0,Math.min(i._fields.length,r.length),(e,t)=>e.toLowerCase()===t.toLowerCase()))&&(a=i.toOrderByFields(),s=!0),null==a&&(a=r.slice());const l=e.statistics.map(e=>new T.A({onStatisticField:null!==e.workingexpr?(0,y.YY)(e.workingexpr,t):"",outStatisticFieldName:e.field,statisticType:e.toStatisticsName()}));let o=this._maxQueryRate();const u=this._layer.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const c=null==e.where?null==e.spatialFilter?"1=1":"":(0,y.YY)(e.where,t),d=this._createQuery();return d.where=(0,_.mA)(d.where,c),null!=e.spatialFilter&&(d.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),d.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),d.geometry=e.spatialFilter.geometry),d.orderByFields=a,d.outFields=["*"],d.outStatistics=l,d.groupByFieldsForStatistics=r,d.returnGeometry=!1,null==n?{filterApplied:!0,spatialFilterApplied:!0,ordered:s,features:this._queryPaginated(d,o,null,e.abortSignal)}:{filterApplied:!0,spatialFilterApplied:!0,ordered:s,features:this._queryKeysetPaginated(d,n,e.abortSignal)}}async*_queryKeysetPaginated(e,t,r){const i=e.where;for(;;){if(null!=t.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new d.dr("NotImplemented");e.where=(0,_.mA)(i,(0,y.YY)(t.clause,await this.databaseType()))}const n=await this.executeQuery(e,"execute");if((0,d.dZ)(r),!n.hasOwnProperty("features"))throw new d.dr("InvalidStatResponse");if(yield n.features,0===n.features.length||!0!==n.exceededTransferLimit)break;S(t,n.features.at(-1))}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const r="execute"===t?async e=>{const t=await this._layer.source.queryFeaturesJSON(e);return(0,p.Rn)(t.features,t.spatialReference??this.spatialReference.toJSON()),t}:"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let i=null;if(this._recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);i=this._recentlyUsedQueries.getFromCache(t),null===i&&(i=r(e),this._recentlyUsedQueries.addToCache(t,i),i=i.catch(e=>{throw this._recentlyUsedQueries?.removeFromCache(t),e}))}return this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===i&&(i=r(e)),i}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}static create(e,t,r,i,n){const a=new b.default({url:e,outFields:null===t?["*"]:t});return new A({layer:a,spatialReference:r,lrucache:i,interceptor:n})}relationshipMetadata(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,h.Qi)(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,i,n){const a=this._layer;if(!function(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}(a))return[];const s=new v.A({objectIds:[e],returnMetadata:n});(t&&t>0||r&&r>0)&&(s.size=[t&&t>0?t:0,r&&r>0?r:t+1]),i&&i.length>0&&(s.attachmentTypes=i),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:a,query:s,method:"attachments"});const l=await a.queryAttachments(s);return l?.[e]?l[e].map(t=>{const r=`${this._layer.parsedUrl.path}/${e}/attachments/${t.id}`;let i=null;return n&&t.exifInfo&&(i=c.A.convertJsonToArcade(t.exifInfo,"system",!0)),new u.A(t.id,t.name,t.contentType,t.size,r,i,t.keywords??null)}):[]}async queryRelatedFeatures(e){const t=(0,F.dw)(e);t.f="json",this._requestStandardised&&(t.sqlFormat="standard"),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const r=await(0,i.A)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(r.data){const e={},t=r.data;if(t?.relatedRecordGroups){const r=t.spatialReference,i=!0===t.exceededTransferLimit;for(const n of t.relatedRecordGroups)(0,p.Rn)(n.relatedRecords,r),e[n.objectId]={features:n.relatedRecords,exceededTransferLimit:i}}return e}throw new d.dr("InvalidRequest")}async getFeatureByObjectId(e,t){const r=this._createQuery();r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=(0,_.mA)(r.where,this.objectIdField+"="+e.toString()),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"});const i=await this._layer.source.queryFeaturesJSON(r);return 1===i.features.length?((0,p.Rn)(i.features,i.spatialReference??this.spatialReference.toJSON()),i.features[0]):null}async getIdentityUser(){await this.load();const e=l.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=l.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl??"";let t=this._layer.url;const r=t.toLowerCase().indexOf("/rest/services");if(t=r>-1?t.slice(0,r):t,t){t+="/rest/info";try{const e=await(0,i.A)(t,{query:{f:"json"}});let r="";return e.data?.owningSystemUrl&&(r=e.data.owningSystemUrl),r}catch{return""}}return""}getDataSourceFeatureSet(){const e=new A({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this._recentlyUsedQueries??void 0,interceptor:this._featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this._featureSetInfo)return this._featureSetInfo;let e=null,t="serviceItemId"in this._layer?this._layer.serviceItemId:null;const r=this._layer.parsedUrl?.path??null;if(r){const n=await(0,i.A)(r,{responseType:"json",query:{f:"json"}});e=n?.data?.name??null,t=n?.data?.serviceItemId??null}const n=this._layer.title&&null!==(this._layer.parent??null);return this._featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===t?null:t,serviceLayerUrl:""===r?null:r,webMapLayerId:n?this._layer.id??null:null,webMapLayerTitle:n?this._layer.title??null:null,className:null,objectClassId:null},this._featureSetInfo}}var R=r(30235),C=r(26591);class M extends p.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._removeGeometry=!1,this._overrideFields=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),this._findObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return h.gO}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types,this.subtypeField=this._relatedLayer.subtypeField,this.subtypes=this._relatedLayer.subtypes}async databaseType(){return this._databaseType=await this._relatedLayer.databaseType(),this._databaseType}isTable(){return this._relatedLayer.isTable()}async _queryAll(){return(await this.query({abortSignal:o._})).features}async query(e){if(await this._ensureLoaded(),await this.databaseType(),this.isTable()&&null!=e.spatialFilter)return p.An;const t=this._layer.nativeCapabilities();if(!1===t.canQueryRelated)return p.An;if(t.capabilities?.queryRelated.supportsPagination)return this._queryUsingPaging(t.source,e);let r=null,i=!1;null!=e.orderBy&&t.capabilities?.queryRelated.supportsOrderBy&&(r=e.orderBy.toOrderByFields(),i=!0);const n=new C.default;return n.objectIds=[this._findObjectId],n.outFields=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]),n.relationshipId=this.relationship.id,n.where="1=1",n.returnGeometry=!0!==this._removeGeometry,n.outSpatialReference=this.spatialReference,n.orderByFields=r,{filterApplied:null==e.where,spatialFilterApplied:null==e.spatialFilter,ordered:i,features:async function*(){const r=await t.source.queryRelatedFeatures(n);(0,d.dZ)(e.abortSignal),yield r[this._findObjectId]?r[this._findObjectId].features:[]}.apply(this)}}async _queryUsingPaging(e,t){let r=null==t.where&&null==t.spatialFilter,i=null,n=!1;const a=this._layer.nativeCapabilities();null!=t.orderBy&&(a.capabilities?.queryRelated.supportsOrderBy?(i=t.orderBy.toOrderByFields(),n=!0):r=!1),await this.databaseType();let s=this._maxQueryRate();const l=a.capabilities?.query.maxRecordCount;null!=l&&l<s&&(s=l);const o=new C.default;return o.relationshipId=this.relationship.id,o.objectIds=[this._findObjectId],o.outFields=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]),o.where="1=1",o.orderByFields=i,o.returnGeometry=!0!==this._removeGeometry,o.outSpatialReference=this.spatialReference,{filterApplied:null==t.where,spatialFilterApplied:null==t.spatialFilter,ordered:n,features:this._queryPaginated(e,o,s,r?t.limit:null,t.abortSignal)}}async*_queryPaginated(e,t,r,i,n){let a;t.num=null!=i?Math.min(i,r):r,t.start=0;do{(0,d.dZ)(n),a=(await e.queryRelatedFeatures(t))[this._findObjectId]??{exceededTransferLimit:!1,features:[]},yield a.features,t.start+=a.features.length,t.num=null!=i?Math.min(i-t.start,r):r}while(!0===a.exceededTransferLimit)}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new d.dr("NeverReach")}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}get gdbVersion(){return this._relatedLayer.gdbVersion}relationshipMetadata(){return this._relatedLayer.relationshipMetadata()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,r,i,n){return this._relatedLayer.queryAttachments(e,t,r,i,n)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeZone(){return this._relatedLayer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._relatedLayer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._relatedLayer.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer.editFieldsInfo??null}get timeInfo(){return this._relatedLayer.timeInfo??null}getFeatureSetInfo(){return this._relatedLayer.getFeatureSetInfo()}}var x=r(23732),L=r(92474),j=r(4146),O=r(80812);function k(){null===x.A.applicationCache&&(x.A.applicationCache=new x.A)}async function Z(e,t,r){if(x.A.applicationCache){const r=x.A.applicationCache.getLayerInfo(e);if(r){const i=await r;return new b.default({url:e,outFields:t,sourceJSON:i})}const i=new b.default({url:e,outFields:t}),n=(async()=>(await i.load(),i.sourceJSON))();if(x.A.applicationCache){x.A.applicationCache.setLayerInfo(e,n);try{return await n,i}catch(t){throw x.A.applicationCache.clearLayerInfo(e),t}}return await n,i}if(null!=r){const i=r.getCachedLayerMetadata(e);if(i){const r=await i;return new b.default({url:e,outFields:t,sourceJSON:r})}const n=new b.default({url:e,outFields:t}),a=(async()=>(await n.load(),n.sourceJSON))();r.setCachedLayerMetadata(e,a);try{return await a,n}catch(t){throw r.removeCachedLayerMetadata(e,a),t}}return new b.default({url:e,outFields:t})}async function q(e,t,r,i,n,a=null){return N(await Z(e,["*"],n),t,r,i,n,a)}function N(e,t=null,r=null,i=!0,n=null,a=null){switch(e.type){case"catalog-footprint":return N(e.parent,t,r,i,n,a);case"subtype-sublayer":{const l=N(e.parent,t,r,i,n,a);return new s.A({parentfeatureset:l,whereclause:w.A.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:l.dateFieldsTimeZoneDefaultUTC})})}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new R.A({layer:e,spatialReference:t,outFields:r,includeGeometry:i,lrucache:n,interceptor:a});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{const s={layer:e,spatialReference:t,outFields:r,includeGeometry:i,lrucache:n,interceptor:a};return!e.url&&e.source?new R.A(s):new A(s)}default:throw new Error(`Unsupported layer type: ${e.type}`)}}async function E(e,t){if(null!==x.A.applicationCache){const t=x.A.applicationCache.getLayerInfo(e);if(null!==t)return t}if(null!=t){const r=t.getCachedServiceMetadata(e);if(null!=r)return r}const r=(async()=>{const t=await(0,i.A)(e,{responseType:"json",query:{f:"json"},authMode:"no-prompt"});if(t.data){const e=t.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==x.A.applicationCache){x.A.applicationCache.setLayerInfo(e,r);try{return await r}catch(t){throw x.A.applicationCache.clearLayerInfo(e),t}}if(null!=t){t.setCachedServiceMetadata(e,r);try{return await r}catch(i){throw t.removeCachedServiceMetadata(e,r),i}}return r}async function P(e,t,r){const n={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},a=await E(e,null);if(n.metadata=a,void 0!==a.controllerDatasetLayers?.utilityNetworkLayerId&&null!==a.controllerDatasetLayers.utilityNetworkLayerId){if(a.layers)for(const e of a.layers)n.layerNameLkp[e.id]=e.name;if(a.tables)for(const e of a.tables)n.layerNameLkp[e.id]=e.name;const l=a.controllerDatasetLayers.utilityNetworkLayerId;n.networkId=l;const o=await async function(e,t){const r="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==x.A.applicationCache){const e=x.A.applicationCache.getLayerInfo(r);if(null!==e)return e}const n=(async()=>{const r=await(0,i.A)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(r.data){const e=r.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new d.dr("DataElementsNotFound")})();if(null!==x.A.applicationCache){x.A.applicationCache.setLayerInfo(r,n);try{return await n}catch(e){throw x.A.applicationCache.clearLayerInfo(r),e}}return n}(e,l);if(o){n.queryelem=o,n.queryelem?.dataElement&&void 0!==n.queryelem.dataElement.schemaGeneration&&(n.unVersion=n.queryelem.dataElement.schemaGeneration),n.lkp={},n.queryelem.dataElement.domainNetworks||(n.queryelem.dataElement.domainNetworks=[]);for(const e of n.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:n.layerNameLkp[t.layerId]??null};n.layerIdLookup.set(e.layerId,e),n.sourceIdLookup.set(e.sourceId,e),e.className&&(n.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:n.layerNameLkp[t.layerId]??null};n.layerIdLookup.set(e.layerId,e),n.sourceIdLookup.set(e.sourceId,e),e.className&&(n.lkp[e.className]=e)}}if(n.queryelem.dataElement.terminalConfigurations)for(const e of n.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)n.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const a=await async function(e){if(null!==x.A.applicationCache){const t=x.A.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,i.A)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==x.A.applicationCache){x.A.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw x.A.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+l);if(void 0!==a.systemLayers?.associationsTableId&&null!==a.systemLayers.associationsTableId){let i=null;if(r&&n.unVersion<8){const r=[];n.unVersion>=4&&(r.push("STATUS"),r.push("PERCENTALONG")),i=await q(e+"/"+a.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...r],!1,null,null),await i.load(),n.unVersion>=4&&(i=new s.A({parentfeatureset:i,whereclause:w.A.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:i.getFieldsIndex(),timeZone:i.dateFieldsTimeZoneDefaultUTC})}),await i.load())}return{lkp:n.lkp,associations:i,unVersion:n.unVersion,terminals:n.terminals,layerIdLookup:n.layerIdLookup,sourceIdLookup:n.sourceIdLookup}}return{associations:null,unVersion:n.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:n.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:n.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function D(e,t,r,i=null,n=null,a=!0,s=null,l=null){let o=e.serviceUrl();if(!o)return null;o=o.endsWith("/")?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString();const u=await q(o,i,n,a,s,l);return new M({layer:e,relatedLayer:u,relationship:t,objectId:r,spatialReference:i,outFields:n,includeGeometry:a,lrucache:s,interceptor:l})}class U extends n{constructor(e,t=null,r=null,i=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=i,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,r=null){const i=N(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:i,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),i}async featureSetByName(e,t=!0,r=null){if((0,L.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const n=this._instantLayers[r];if(n.opitem.title===e&&n.includeGeometry===t&&n.outFields===i)return this._instantLayers[r].featureset}const n=this._map.allLayers.find(t=>(0,h.eB)(t)&&t.title===e);if(null!=n)return this._makeAndAddFeatureSet(n,t,r);if(this._map.allTables){const i=this._map.allTables.find(t=>(0,h.eB)(t)&&t.title===e);if(null!=i)return this._makeAndAddFeatureSet(i,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){if((0,L.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const n=this._instantLayers[r];if(n.opitem.id===e&&n.includeGeometry===t&&n.outFields===i)return this._instantLayers[r].featureset}const n=this._map.allLayers.find(t=>(0,h.eB)(t)&&t.id===e);if(n)return this._makeAndAddFeatureSet(n,t,r);if(this._map.allTables){const i=this._map.allTables.find(t=>(0,h.eB)(t)&&t.id===e);if(null!=i)return this._makeAndAddFeatureSet(i,t,r)}return null}}class G extends n{constructor(e,t=null,r=null,i=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=i,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,r=null){const i=N(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache);return this._instantLayers.push({featureset:i,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),i}async _loadMetaData(){const e=await E(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new G(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async featureSetByName(e,t=!0,r=null){null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const n=this._instantLayers[r];if(n.opitem.title===e&&n.includeGeometry===t&&n.outFields===i)return this._instantLayers[r].featureset}const n=await this._loadMetaData();let a=null;for(const t of n.layers??[])t.name===e&&(a=t);if(!a)for(const t of n.tables??[])t.name===e&&(a=t);if(a){const e=await Z(this._url+"/"+a.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);e=null!=e?e.toString():"";for(let r=0;r<this._instantLayers.length;r++){const n=this._instantLayers[r];if(n.opitem.id===e&&n.includeGeometry===t&&n.outFields===i)return this._instantLayers[r].featureset}const n=await this._loadMetaData();let a=null;for(const t of n.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(a=t);if(!a)for(const t of n.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(a=t);if(a){const e=await Z(this._url+"/"+a.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}}function B(e,t,r=null,i=null){return new U(e,t,r,i)}function z(e,t,r=null,i=null){return new G(e,t,r,i)}function Q(e,t,r,i,n){if(null===e)return null;if((0,a.m)(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof j.A&&(0,h.eB)(e)){switch(t){case"datasource":return N(e,n,"outFields"in e?e.outFields:null,!0,r,i).getDataSourceFeatureSet();case"parent":case"root":return N(e,n,"outFields"in e?e.outFields:null,!0,r,i)}return null}if((0,a.a2)(e)){switch(t){case"datasource":return N(e.parent,n,e.parent.outFields,!0,r,i).getDataSourceFeatureSet();case"parent":case"root":return N(e,n,e.parent.outFields,!0,r,i)}return null}return null}async function $(e,t,r,i,n,a,s,l=null){if(x.A.applicationCache){const o=x.A.applicationCache.getLayerInfo(e+":"+a.url);if(o)return J(await o,t,r,i,n,s,l)}if(null!=s){const o=s.getCachedPortalItem(a.url,e);if(null!=o)return await J(await o,t,r,i,n,s,l)}const o=new O.default({id:e,portal:a}).load();x.A.applicationCache?x.A.applicationCache.setLayerInfo(e+":"+a.url,o):null!=s&&s.setCachedPortalItem(a.url,e,o);try{return await J(await o,t,r,i,n,s,l)}catch(t){throw x.A.applicationCache&&x.A.applicationCache.clearLayerInfo(e+":"+a.url),null!=s&&s.removeCachedPortalItem(a.url,e,o),t}}async function J(e,t,r,i,n,a,s){let l;if("Feature Service"===e.type||"Map Service"===e.type)l=await Z((0,h.Qi)(e.url??"")+"/"+t,["*"],a);else{if(t)throw new Error(`layerId=${t} provided for ${e.type} item`);if(null!=a){const t=a.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)l=await t;else{const t=j.A.fromPortalItem(e);a.setCachedPortalItemLayer(e.portal.url,e.id,t);try{l=await t}catch(r){throw a.removeCachedPortalItemLayer(e.portal.url,e.id,t),r}}}else l=await j.A.fromPortalItem(e)}return N(l,r,i,n,a,s)}},35704(e,t,r){r.d(t,{A:()=>u});var i=r(48938),n=r(87449),a=r(11221),s=r(33325),l=r(80609),o=r(89696);class u extends a.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof o.A?(this._whereClause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereClause=null)}_initialiseFeatureSet(){this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes}async _queryAll(){return(await this.query({abortSignal:i._})).features}async query(e){let t=e.where,r=!0;null!==this._whereClauseFunction?r=!1:null!=t?null!==this._whereClause&&(t=(0,l.kg)(this._whereClause,t)):t=this._whereClause,await this._ensureLoaded();const i=await this._parent.query({...e,where:t,limit:r?e.limit:null});return(0,n.dZ)(e.abortSignal),i.filterApplied&&null==this._whereClauseFunction?i:{...i,features:this._applyFilter(i.features,e.abortSignal)}}async*_applyFilter(e,t){for await(const r of e)if((0,n.dZ)(t),null!=this._whereClause){const e=r.filter(e=>this._whereClause.testFeature(e));e.length>0&&(yield e)}else if(null!=this._whereClauseFunction){const e=[];for(const t of r)await this._whereClauseFunction(t)&&e.push(t);e.length>0&&(yield e)}else yield r}async queryStat(e){if(null!==this._whereClauseFunction)return null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??s.gO,e.abortSignal):{calculated:!1};let t=this._whereClause;null!=e.where&&null!==this._whereClause&&(t=(0,l.kg)(this._whereClause,e.where));const r=await this._parent.queryStat({...e,where:t});return r.calculated?r:null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??s.gO,e.abortSignal):{calculated:!1}}async canQueryAggregate(e){if(null!==this._whereClauseFunction)return!1;let t=e.where;return null!=t?null!==this._whereClause&&(t=(0,l.kg)(this._whereClause,t)):t=this._whereClause,this._parent.canQueryAggregate({...e,where:t})}async queryAggregate(e){let t=e.where;return null!=t?null!==this._whereClause&&(t=(0,l.kg)(this._whereClause,t)):t=this._whereClause,this._parent.queryAggregate({...e,where:t})}getFieldsIndex(){return this._parent.getFieldsIndex()}}},30235(e,t,r){r.d(t,{A:()=>y});var i=r(48938),n=r(87449),a=r(11221),s=r(33325),l=r(80609),o=r(4576),u=r(39516),c=r(91075),d=r(18589),p=r(33143),h=r(20437);class y extends a.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return s.gO}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||this._layer.objectIdField===r||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=0,this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,this.subtypeField=("subtypeField"in this._layer?this._layer.subtypeField:null)??"",this.subtypes="subtypes"in this._layer?this._layer.subtypes:null,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}isTable(){return this._forceIsTable||"isTable"in this._layer&&this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}async _queryAll(){return(await this.query({abortSignal:i._})).features}_queryLayerFeaturesJSON(e){return"queryFeaturesJSON"in this._layer?this._layer.queryFeaturesJSON(e):this._layer.source.queryFeaturesJSON(e)}async query(e){await this._ensureLoaded();let t=null,r=!1;if(null!=e.orderBy&&(t=e.orderBy.toOrderByFields(),r=!0),this.isTable()&&null!=e.spatialFilter)return a.An;const i=this._createQuery();return i.where=(0,u.mA)(i.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,l.YY)(e.where,0)),null!=e.spatialFilter&&(i.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),i.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),i.geometry=e.spatialFilter.geometry),i.outSpatialReference=this.spatialReference,i.orderByFields=t,i.num=e.limit,{filterApplied:!0,spatialFilterApplied:!0,ordered:r,features:async function*(){const t=await this._queryLayerFeaturesJSON(i);(0,n.dZ)(e.abortSignal);for(const e of(0,o.Ho)(t.features,this._maxQueryRate()))(0,a.Rn)(e,t.spatialReference??this.spatialReference.toJSON()),yield e}.apply(this)}}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new n.dr("NeverReach")}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,e.outFields=this._overrideFields??["*"],e.returnGeometry=!this._removeGeometry,e}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}relationshipMetadata(){return[]}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let r=e.layerDefinition.objectIdField;const i=e.layerDefinition.typeIdField??"",n=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)n.push(p.A.fromJSON(t));let a=e.layerDefinition.geometryType;void 0===a&&(a=e.featureSet.geometryType||"");let s=e.featureSet.features;if(!r){let t=!1;for(const i of e.layerDefinition.fields)if("oid"===i.type||"esriFieldTypeOID"===i.type){r=i.name,t=!0;break}if(!1===t){let t="FID",i=!0,n=0;for(;i;){let r=!0;for(const i of e.layerDefinition.fields)if(i.name===t){r=!1;break}!0===r?i=!1:(n++,t="FID"+n.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const a=[];for(let r=0;r<s.length;r++)a.push({geometry:e.featureSet.features[r].geometry,attributes:{...e.featureSet.features[r].attributes,[t]:r}});s=a,r=t}}const l=[];for(const t of e.layerDefinition.fields)t instanceof h.A?l.push(t):l.push(h.A.fromJSON(t));let o=a;switch(o||(o=""),o){case"esriGeometryPoint":o="point";break;case"esriGeometryPolyline":o="polyline";break;case"esriGeometryPolygon":o="polygon";break;case"esriGeometryEnvelope":o="extent";break;case"esriGeometryMultipoint":o="multipoint";break;case"":case"esriGeometryNull":o="esriGeometryNull"}if("esriGeometryNull"!==o){const e=t.toJSON();for(const t of s)t.geometry&&t.geometry instanceof c.A==0&&(t.geometry.type=o,void 0===t.geometry.spatialReference&&(t.geometry.spatialReference=e))}else for(const e of s)e.geometry&&(e.geometry=null);const u={outFields:["*"],source:s,fields:l,hasZ:!0===e.layerDefinition.hasZ||!0===e.featureSet.hasZ,hasM:!0===e.layerDefinition.hasM||!0===e.featureSet.hasM,types:n,typeIdField:i,objectIdField:r,spatialReference:t},f="esriGeometryNull"===o||null===o;f||(u.geometryType=o);const m=new d.default(u);return e.layerDefinition.subtypeField&&e.layerDefinition.subtypes&&m.read({subtypes:e.layerDefinition.subtypes,subtypeField:e.layerDefinition.subtypeField}),new y({layer:m,spatialReference:t,isTable:f})}async queryAttachments(){return[]}async getFeatureByObjectId(e){const t=this._createQuery();t.where=this.objectIdField+"="+e.toString();const r=await this._queryLayerFeaturesJSON(t);return 1===r.features.length?((0,a.Rn)(r.features,r.spatialReference??this.spatialReference.toJSON()),r.features[0]):null}serviceUrl(){return""}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return"preferredTimeZone"in this._layer?this._layer.preferredTimeZone:null}get dateFieldsTimeZone(){return"dateFieldsTimeZone"in this._layer?this._layer.dateFieldsTimeZone:null}get datesInUnknownTimezone(){return"datesInUnknownTimezone"in this._layer&&this._layer.datesInUnknownTimezone}get editFieldsInfo(){return"editFieldsInfo"in this._layer?this._layer.editFieldsInfo:null}get timeInfo(){return"timeInfo"in this._layer?this._layer.timeInfo:null}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}},46140(e,t,r){r.d(t,{A:()=>n});var i=r(49186);class n{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new n(this.major,this.minor,this._context)}static parse(e,t=""){const[r,a]=e.split("."),s=/^\s*\d+\s*$/;if(!r?.match||!s.test(r))throw new i.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!a?.match||!s.test(a))throw new i.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const l=parseInt(r,10),o=parseInt(a,10);return new n(l,o,t)}}},6797(e,t,r){r.d(t,{Ui:()=>p});var i=r(69622),n=r(7762),a=r(88620);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.A}function o(e){return e instanceof n.A?Object.keys(e.items):l(e)?(0,a.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=o(e),n=o(t);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const a=n.filter(e=>!i.includes(e)),p=i.filter(e=>!n.includes(e)),h=i.filter(r=>n.includes(r)&&u(e,r)!==u(t,r)).concat(a,p).sort(),y=c(e);if(y&&s.has(y)&&h.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=l(e)&&l(t);for(const i of h){const n=u(e,i),a=u(t,i);let s;if((m||"function"!=typeof n&&"function"!=typeof a)&&n!==a&&(null!=n||null!=a)){if(r&&r[i]&&"function"==typeof r[i])s=r[i]?.(n,a);else if(n instanceof Date&&a instanceof Date){if(n.getTime()===a.getTime())continue;s={type:"complete",oldValue:n,newValue:a}}else s="object"==typeof n&&"object"==typeof a&&c(n)===c(a)?d(n,a):{type:"complete",oldValue:n,newValue:a};null!=s&&(null!=f?f.diff[i]=s:f={type:"partial",diff:{[i]:s}})}}return f}function p(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},16494(e,t,r){r.d(t,{Nd:()=>l,W5:()=>s});var i=r(17632);const n=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),a=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],s=new i.I({whiteList:n,onTagAttr:(e,t,r)=>{const i=`${t}="${r}"`;if(a.includes(t))return i},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),l=new i.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},159(e,t,r){r.d(t,{A:()=>u});var i,n=r(5482),a=r(69540),s=r(25482),l=r(91429),o=r(99157);let u=i=class extends((0,a.OU)(s.o)){constructor(e){super(e),this.steps=[]}getInverse(){const e=new i;for(let t=this.steps.length-1;t>=0;t--){const r=this.steps[t];e.steps.push(r.getInverse())}return e}};(0,n.Cg)([(0,l.MZ)({type:[o.A],nonNullable:!0,json:{name:"geoTransforms"}})],u.prototype,"steps",void 0),u=i=(0,n.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformation")],u)},99157(e,t,r){r.d(t,{A:()=>o});var i,n=r(5482),a=r(69540),s=r(25482),l=r(91429);let o=i=class extends((0,a.OU)(s.o)){constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new i({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,n.Cg)([(0,l.MZ)({json:{name:"transformForward",read:e=>!e,write:(e,t,r)=>{t[r]=!e}}})],o.prototype,"isInverse",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],o.prototype,"wkt",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],o.prototype,"wkid",void 0),o=i=(0,n.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformationStep")],o)},9762(e,t,r){r.r(t),r.d(t,{projectBuffer:()=>n});var i=r(49208);function n(e,t,r,n,a,s,l=Math.floor(e.length/3)){const o=(0,i.jd)(t,a);if(null==o)return!1;if(o===i.pO){if(e===n&&r===s)return!0;const t=r+3*l;for(let i=r,a=s;i<t;i++,a++)n[a]=e[i]??0;return!0}const u=r+3*l;for(let t=r,i=s;t<u;t+=3,i+=3)o(e,t,n,i);return!0}},49208(e,t,r){r.d(t,{Tp:()=>d,jd:()=>c,pO:()=>h,w5:()=>u});var i=r(34727),n=r(86211),a=r(73941),s=r(79258),l=r(34403),o=r(21325);const u={2:{5:h,7:null,9:null,10:h,1:F,6:null,8:null,0:null,3:f,11:m,2:h,4:A},5:{5:h,7:null,9:null,10:h,1:F,6:null,8:null,0:null,3:f,11:m,2:h,4:A},7:{5:null,7:h,9:null,10:h,1:null,6:b,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:h,10:h,1:null,6:null,8:w,0:null,3:null,11:null,2:null,4:null},3:{5:y,7:null,9:null,10:y,1:function(e,t,r,i){const n=e[t]/j,a=L-2*Math.atan(Math.exp(-e[t+1]/j)),s=j+(e[t+2]??0),l=Math.cos(a)*s;r[i]=Math.cos(n)*l,r[i+1]=Math.sin(n)*l,r[i+2]=Math.sin(a)*s},6:null,8:null,0:null,3:h,11:function(e,t,r,i){y(e,t,r,i),m(r,i,r,i)},2:y,4:function(e,t,r,i){y(e,t,r,i),A(r,i,r,i)}},4:{5:R,7:null,9:null,10:R,1:function(e,t,r,i){R(e,t,r,i),F(r,i,r,i)},6:null,8:null,0:null,3:function(e,t,r,i){R(e,t,r,i),f(r,i,r,i)},11:function(e,t,r,i){R(e,t,r,i),m(r,i,r,i)},2:R,4:h},1:{5:S,7:null,9:null,10:S,1:h,6:null,8:null,0:null,3:function(e,t,r,i){S(e,t,r,i),f(r,i,r,i)},11:function(e,t,r,i){S(e,t,r,i),m(r,i,r,i)},2:S,4:function(e,t,r,i){S(e,t,r,i),A(r,i,r,i)}},6:{5:null,7:T,9:null,10:T,1:null,6:h,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:I,10:I,1:null,6:null,8:h,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:h,3:null,11:null,2:null,4:null},10:{5:h,7:h,9:h,10:h,1:F,6:b,8:w,0:null,3:f,11:m,2:h,4:A},11:{5:g,7:null,9:null,10:g,1:function(e,t,r,i){g(e,t,r,i),F(r,i,r,i)},6:null,8:null,0:null,3:function(e,t,r,i){g(e,t,r,i),f(r,i,r,i)},11:h,2:g,4:function(e,t,r,i){g(e,t,r,i),A(r,i,r,i)}}};function c(e,t){return d(e,t)?.projector}function d(e,t){if(null==e||null==t)return null;if(C.source.spatialReference===e&&C.dest.spatialReference===t)return C;const r=p(e,C.source),i=p(t,C.dest);return 0===r&&0===i?(0,o.aI)(e,t)?C.projector=h:C.projector=null:C.projector=u[r][i],C}function p(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,n.GA)(e,1)),(0,a.jA)(e)?t.spatialReferenceId=1:(0,o.oT)(e)?t.spatialReferenceId=2:(0,o.K8)(e)?t.spatialReferenceId=3:(0,o.r1)(e)?t.spatialReferenceId=11:e.wkt===a.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===a.FY.wkt?t.spatialReferenceId=6:e.wkt===a.LJ.wkt?t.spatialReferenceId=8:(0,a.q8)(e)?t.spatialReferenceId=7:(0,a.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function h(e,t,r,i){e!==r&&(r[i++]=e[t++],r[i++]=e[t++],r[i]=e[t]??0)}function y(e,t,r,i){r[i]=x*(e[t]/j),r[i+1]=x*(L-2*Math.atan(Math.exp(-e[t+1]/j))),r[i+2]=e[t+2]??0}function f(e,t,r,n){!function(e,t,r,n,a){const s=.4999999*Math.PI,l=(0,i.qE)(M*e[t+1],-s,s),o=Math.sin(l);r[n++]=M*e[t]*a.radius,r[n++]=a.halfSemiMajorAxis*Math.log((1+o)/(1-o)),r[n]=e[t+2]??0}(e,t,r,n,s.$O)}function m(e,t,r,i){r[i]=e[t]*O,r[i+1]=e[t+1]*O,r[i+2]=e[t+2]??0}function g(e,t,r,i){r[i]=e[t]*k,r[i+1]=e[t+1]*k,r[i+2]=e[t+2]??0}function _(e,t,r,i,n){const a=n+(e[t+2]??0),s=M*e[t],l=M*e[t+1],o=Math.cos(l)*a;r[i]=Math.cos(s)*o,r[i+1]=Math.sin(s)*o,r[i+2]=Math.sin(l)*a}function w(e,t,r,i){_(e,t,r,i,s.Sw.radius)}function b(e,t,r,i){_(e,t,r,i,s.sH.radius)}function F(e,t,r,i){_(e,t,r,i,s.$O.radius)}function v(e,t,r,n,a){const s=e[t],l=e[t+1],o=e[t+2]??0,u=Math.sqrt(s*s+l*l+o*o),c=(0,i.YN)(o/(0===u?1:u)),d=Math.atan2(l,s);r[n++]=x*d,r[n++]=x*c,r[n]=u-a}function I(e,t,r,i){v(e,t,r,i,s.Sw.radius)}function T(e,t,r,i){v(e,t,r,i,s.sH.radius)}function S(e,t,r,i){v(e,t,r,i,s.$O.radius)}function A(e,t,r,i){!function(e,t,r,i,n){const a=M*e[t],s=M*e[t+1],l=e[t+2]??0,o=Math.sin(s),u=Math.cos(s),c=n.radius/Math.sqrt(1-n.eccentricitySquared*o*o);r[i++]=(c+l)*u*Math.cos(a),r[i++]=(c+l)*u*Math.sin(a),r[i++]=(c*(1-n.eccentricitySquared)+l)*o}(e,t,r,i,s.$O)}function R(e,t,r,i){const n=l.TP,a=e[t],o=e[t+1],u=e[t+2]??0;let c,d,p,h,y,f,m,g,_,w,b,F,v,I,T,S,A,R,C,M,L;c=Math.abs(u),d=a*a+o*o,p=Math.sqrt(d),h=d+u*u,y=Math.sqrt(h),M=Math.atan2(o,a),f=u*u/h,m=d/h,I=n.a2/y,T=n.a3-n.a4/y,m>.3?(g=c/y*(1+m*(n.a1+I+f*T)/y),C=Math.asin(g),w=g*g,_=Math.sqrt(1-w)):(_=p/y*(1-f*(n.a5-I-m*T)/y),C=Math.acos(_),w=1-_*_,g=Math.sqrt(w)),b=1-s.$O.eccentricitySquared*w,F=s.$O.radius/Math.sqrt(b),v=n.a6*F,I=p-F*_,T=c-v*g,A=_*I+g*T,S=_*T-g*I,R=S/(v/b+A),C+=R,L=A+S*R/2,u<0&&(C=-C),r[i++]=x*M,r[i++]=x*C,r[i]=L}const C={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:h},M=(0,i.kU)(1),x=(0,i.KJ)(1),L=.5*Math.PI,j=s.$O.radius,O=j*Math.PI/180,k=180/(j*Math.PI)},91218(e,t,r){r.r(t),r.d(t,{canProjectWithoutEngine:()=>$,initializeProjection:()=>V,isEqualBaseGCS:()=>J,isLoaded:()=>j,isLoadedOrLoad:()=>O,isLoadedOrLoadFor:()=>k,load:()=>q,project:()=>N,projectAsync:()=>Q,projectExtent:()=>ne,projectMany:()=>E,projectMultipoint:()=>H,projectOrLoad:()=>D,projectOrLoadMany:()=>U,projectPoint:()=>Y,projectPolygon:()=>re,projectPolyline:()=>ee,projectWithoutEngine:()=>K,requiresLoad:()=>Z,test:()=>z,tryProject:()=>P,unload:()=>B});var i=r(49186),n=r(17676),a=r(62788),s=r(95488),l=r(51850),o=r(21276),u=r(73941),c=r(5443),d=r(91075),p=r(48526),h=r(86738),y=r(39829),f=r(82799),m=r(16930),g=r(98764),_=r(159),w=r(9762),b=r(49208);function F(e,t,r,i,n,a){return v[0]=e,v[1]=t,v[2]=r,(0,w.projectBuffer)(v,i,0,n,a,0)}const v=(0,l.vt)();var I=r(60408),T=r(21325),S=r(52006);let A=null,R=null,C=null,M=null,x={};const L=new s.I;function j(){return!!(R?.isLoaded()&&C?.isLoaded()&&M?.isLoaded())}function O(){return!!j()||((0,a.gc)(L),q(),!1)}function k(e,t){return!e||!t||$(e,t)||O()}function Z(e,t){return!$(e,t)&&!j()}async function q(e){null==A&&(A=Promise.all([r.e(3276).then(r.bind(r,83276)).then(e=>(R=e,R.load())),r.e(8377).then(r.bind(r,8377)).then(e=>(C=e,C.load())),r.e(2158).then(r.bind(r,12158)).then(e=>(M=e,M.load()))])),await A,(0,n.Te)(e),L.notify()}function N(e,t,r){return Array.isArray(e)?0===e.length?[]:((0,o.H)(e),E(e,e[0].spatialReference,t,r)):((0,o.f)(e),E([e],e.spatialReference,t,r)[0])}function E(e,t,r,i){if(null==t||null==r)return e;if($(t,r,i))return e.map(e=>K(e,t,r));if(null==i?.geographicTransformation&&(0,u.jA)(t))return E(e.map(e=>K(e,t,m.A.WGS84)),m.A.WGS84,r,{zConversionDisabled:i?.zConversionDisabled});if(null==i?.geographicTransformation&&(0,u.jA)(r))return E(e,t,m.A.WGS84).map(e=>K(e,m.A.WGS84,r));if(!j())throw new G;if(!i?.geographicTransformation)if(i?.extendedParams)i={...i,geographicTransformation:M.getTransformation(t,r,i.areaOfInterestExtent)||new _.A};else if(!i?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,r);let n=x[e];n||(n=M.getTransformation(t,r)||new _.A,x[e]=n),i={geographicTransformation:n,zConversionDisabled:i?.zConversionDisabled}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof d.A?R.executeMany(e,r,i):C.executeMany(e,r,i)}function P(e,t,r){try{return N(e,t,r)}catch(e){return null}}function D(e,t){const r=U([e],t);return null!=r.pending?{pending:r.pending,geometry:null}:null!=r.geometries?{pending:null,geometry:r.geometries[0]}:{pending:null,geometry:null}}function U(e,t,r){if(!j())for(const r of e)if(null!=r&&!(0,T.aI)(r.spatialReference,t)&&(0,T.fn)(r.spatialReference)&&(0,T.fn)(t)&&!$(r.spatialReference,t))return(0,a.gc)(L),{pending:q(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,T.aI)(e.spatialReference,t)?e:(0,T.fn)(e.spatialReference)&&(0,T.fn)(t)?N(e,t,r):null)}}class G extends i.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function B(){A=null,R=null,C=null,M=null,x={}}const z={get loadPromise(){return A}};async function Q(e,t,r){if((0,n.Te)(r),!e)return e;const i=U(Array.isArray(e)?e:[e],t,r);if(i.pending)return await i.pending,(0,n.Te)(r),Q(e,t,r);const a=i.geometries??[];return Array.isArray(e)?a:a[0]}function $(e,t,r){return!(r?.areaOfInterestExtent||r?.extendedParams||r?.geographicTransformation)&&(!!(0,T.aI)(e,t)||(0,T.fn)(e)&&(0,T.fn)(t)&&!!(0,b.jd)(e,t))}function J(e,t){if((0,T.aI)(e,t))return!0;if(!(0,T.fn)(e)||!(0,T.fn)(t))return!1;const r=(0,T.oT)(e)||(0,T.K8)(e)||(0,T.x1)(e),i=(0,T.oT)(t)||(0,T.K8)(t)||(0,T.x1)(t);return r&&i}async function V(e,t,r,i){if(j())return(0,n.NO)(i);if(Array.isArray(e)){for(const{source:t,dest:r,options:n}of e)if(t&&r&&!$(t,r,n))return q(i)}else if(e&&t&&!$(e,t,r))return q(i);return(0,n.NO)(i)}function K(e,t,r){return e?(0,I.fT)(e)?W(e,t,new h.A,r,0):(0,I.ZC)(e)?ae(e,t,new c.A,r,0):(0,I.Bi)(e)?ie(e,t,new y.A,r,0):(0,I.Rg)(e)?te(e,t,new f.A,r,0):(0,I.U9)(e)?X(e,t,new p.A,r,0):null:null}function Y(e,t,r=t.spatialReference,i=0){return null!=r&&null!=e.spatialReference&&null!=W(e,e.spatialReference,t,r,i)}function W(e,t,r,i,n){ue[0]=e.x,ue[1]=e.y;const a=e.z;return ue[2]=void 0!==a?a:n,(0,w.projectBuffer)(ue,t,0,ue,i,0)?(r.x=ue[0],r.y=ue[1],r.spatialReference=i,void 0!==a||(0,u.xP)(i)?(r.z=ue[2],r.hasZ=!0):(r.z=void 0,r.hasZ=!1),void 0===e.m?(r.m=void 0,r.hasM=!1):(r.m=e.m,r.hasM=!0),r):null}function H(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=X(e,e.spatialReference,t,r,i)}function X(e,t,r,i,n){const{points:a,hasZ:s,hasM:l}=e,o=[],u=a.length,c=[];for(const e of a)c.push(e[0],e[1],s?e[2]:n);if(!(0,w.projectBuffer)(c,t,0,c,i,0,u))return null;const d=oe(s,i);for(let e=0;e<u;++e){const t=3*e,r=c[t],i=c[t+1];d&&l?o.push([r,i,c[t+2],a[e][3]]):d?o.push([r,i,c[t+2]]):l?o.push([r,i,a[e][2]]):o.push([r,i])}return r.points=o,r.spatialReference=i,r.hasZ=s,r.hasM=l,r}function ee(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=te(e,e.spatialReference,t,r,i)}function te(e,t,r,i,n){const{curvePaths:a,paths:s,hasZ:l,hasM:o}=e;if(!(a?le(a,l??!1,o??!1,t,r.curvePaths=[],i,n):se(s,l??!1,o??!1,t,r.paths,i,n)))return null;const u=oe(l,i);return r.spatialReference=i,r.hasZ=u,r.hasM=o,r}function re(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=ie(e,e.spatialReference,t,r,i)}function ie(e,t,r,i,n){const{curveRings:a,rings:s,hasZ:l,hasM:o}=e;return(a?le(a,l??!1,o??!1,t,r.curveRings=[],i,n):se(s,l??!1,o??!1,t,r.rings,i,n))?(r.spatialReference=i,r.hasZ=oe(l,i),r.hasM=o,r):null}function ne(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=ae(e,e.spatialReference,t,r,i)}function ae(e,t,r,i,n){const{xmin:a,ymin:s,xmax:l,ymax:o,hasZ:u,hasM:c}=e;if(!F(a,s,u?e.zmin:n,t,ue,i))return null;const d=oe(u,i);return r.xmin=ue[0],r.ymin=ue[1],d&&(r.zmin=ue[2]),F(l,o,u?e.zmax:n,t,ue,i)?(r.xmax=ue[0],r.ymax=ue[1],d&&(r.zmax=ue[2]),c&&(r.mmin=e.mmin,r.mmax=e.mmax),r.spatialReference=i,r):null}function se(e,t,r,i,n,a,s=0){const l=new Array;for(const r of e)for(const e of r)l.push(e[0],e[1],t?e[2]:s);if(!(0,w.projectBuffer)(l,i,0,l,a,0))return!1;let o=0;n.length=0;const u=t?3:2,c=oe(t,a);for(const t of e){const e=new Array;for(const i of t){const t=l.slice(o,o+=3);c||t.pop(),r&&t.push(i[u]),e.push(t)}n.push(e)}return!0}function le(e,t,r,i,n,a,s=0){const l=new Array;for(const r of e)for(const e of r){if((0,S.FG)(e))return!1;if((0,S.aO)(e)){const[r,i]=e.c;l.push(r[0],r[1],t?r[2]:s,i[0],i[1],s);continue}if((0,S.n1)(e)){const[r,i,n]=e.b;l.push(r[0],r[1],t?r[2]:s,i[0],i[1],s,n[0],n[1],s);continue}const r=e;l.push(r[0],r[1],t?r[2]:s)}if(!(0,w.projectBuffer)(l,i,0,l,a,0))return!1;let o=0;n.length=0;const u=t?3:2,c=oe(t,a);for(const t of e){const e=new Array;for(const i of t){const t=l.slice(o,o+=3);if(c||t.pop(),r&&t.push((0,S.yP)(i)[u]),(0,S.FG)(i))return!1;if((0,S.aO)(i)){const r=l[o++],i=l[o++];++o,e.push({c:[t,[r,i]]});continue}if((0,S.n1)(i)){const r=l[o++],i=l[o++];++o;const n=l[o++],a=l[o++];++o,e.push({b:[t,[r,i],[n,a]]});continue}e.push(t)}n.push(e)}return!0}function oe(e,t){return e||(0,u.xP)(t)||(0,T.aI)(t,g.Y0)}const ue=(0,l.vt)()},98764(e,t,r){r.d(t,{GD:()=>s,Y0:()=>u,lO:()=>c});var i=r(73941),n=r(16930),a=r(21325);const s=new n.A(i.fv),l=new n.A(i.FY),o=new n.A(i.LJ),u=new n.A(i.Ro);function c(e){const t=d.get(e);if(t)return t;let r=s;if(e)if(e===l)r=l;else if(e===o)r=o;else{const t=e.wkid,i=e.latestWkid;if(null!=t||null!=i)(0,a.tl)(t)||(0,a.tl)(i)?r=l:((0,a.ZL)(t)||(0,a.ZL)(i))&&(r=o);else{const t=e.wkt2??e.wkt;if(t){const e=t.toUpperCase();e===p?r=l:e===h&&(r=o)}}}return d.set(e,r),r}const d=new Map,p=l.wkt.toUpperCase(),h=o.wkt.toUpperCase()},34403(e,t,r){r.d(t,{TP:()=>s});var i=r(79258);Math.PI;const n=i.$O.radius,a=i.$O.eccentricitySquared,s={a1:n*a,a2:n*a*n*a,a3:n*a*a/2,a4:n*a*n*a*2.5,a5:n*a+n*a*a/2,a6:1-a};i.$O.radius,i.$O.flattening,i.Sw.radius,i.Sw.flattening,i.sH.radius,i.sH.flattening,i.sH.radius},62815(e,t,r){r.d(t,{N:()=>l,d:()=>o});var i=r(86211),n=r(73941),a=r(21325),s=r(52006);function l(e,t,r){const i=o(t,r);if(1!==i)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,i);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e){if(e.curvePaths)for(const r of e.curvePaths)for(const e of r){const r=(0,s.yP)(e);r.length>2&&(r[2]*=t)}if(e.paths)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}}(e,i);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e){if(e.curveRings)for(const r of e.curveRings)for(const e of r){const r=(0,s.yP)(e);r.length>2&&(r[2]*=t)}if(e.rings)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}}(e,i);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,i);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,i);default:return}}function o(e,t){return null==e||null==t||t.vcsWkid||(0,a.aI)(e,t)||(0,n.xP)(e)||(0,n.xP)(t)?1:(0,i.G9)(e)/(0,i.G9)(t)}},4146(e,t,r){r.d(t,{A:()=>_});var i=r(5482),n=r(11254),a=r(49186),s=r(65529),l=r(4902),o=r(92474),u=r(53966),c=r(17676),d=r(84952),p=r(91429),h=r(5443),y=r(16930),f=r(92602),m=r(79677);let g=0,_=class extends((0,s.Zt)((0,l.s)(o.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new h.A(-180,-90,180,90,y.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await Promise.all([r.e(812),r.e(5613),r.e(909)]).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",n=r?.portal?.url||f.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new a.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new a.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,p.MZ)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],_.prototype,"effectiveVisible",null),(0,i.Cg)([(0,p.MZ)({type:h.A})],_.prototype,"fullExtent",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,i.Cg)([(0,p.MZ)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,i.Cg)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1})],_.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,p.MZ)({type:y.A})],_.prototype,"spatialReference",void 0),(0,i.Cg)([(0,p.MZ)({type:String})],_.prototype,"title",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)()],_.prototype,"url",void 0),(0,i.Cg)([(0,p.MZ)({type:m.A})],_.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,i.Cg)([(0,p.$K)("esri.layers.Layer")],_)},52136(e,t,r){r.d(t,{p:()=>a});var i=r(5482),n=r(91429);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,n.$K)("esri.layers.mixins.APIKeyMixin")],r),r}},32756(e,t,r){r.d(t,{Rr:()=>l,fY:()=>u,ne:()=>o});var i=r(5482),n=r(93637),a=r(91429),s=r(91880);function l(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const n=new s.A;return n.read(i,r),[n]}const o={type:[s.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){const a=e.find(e=>!!e.field);a&&(0,n.sM)(r,[a.toJSON()],t)}}}},u=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,a.MZ)(o)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,a.$K)("esri.layers.mixins.OrderedLayer")],r),r}},28032(e,t,r){r.d(t,{A:()=>o});var i=r(5482),n=r(69540),a=r(25482),s=r(91429),l=r(56400);let o=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,i.Cg)([(0,s.MZ)()],o.prototype,"creatorField",void 0),(0,i.Cg)([(0,s.MZ)()],o.prototype,"creationDateField",void 0),(0,i.Cg)([(0,s.MZ)()],o.prototype,"editorField",void 0),(0,i.Cg)([(0,s.MZ)()],o.prototype,"editDateField",void 0),(0,i.Cg)([(0,s.MZ)()],o.prototype,"realm",void 0),(0,i.Cg)([(0,s.MZ)((0,l.P6)("dateFieldsTimeReference",!0))],o.prototype,"timeZone",void 0),o=(0,i.Cg)([(0,s.$K)("esri.layers.support.EditFieldsInfo")],o)},29005(e,t,r){r.d(t,{A:()=>u});var i=r(5482),n=r(69540),a=r(66552),s=r(25482),l=r(91429);const o=new a.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,n.OU)(s.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:o.read,write:o.write}})],u.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i.Cg)([(0,l.$K)("esri.layers.support.FeatureTemplate")],u)},33143(e,t,r){r.d(t,{A:()=>d});var i=r(5482),n=r(69540),a=r(25482),s=r(91429),l=r(8631),o=r(29005),u=r(36005),c=r(43937);let d=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,l.r)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i.Cg)([(0,u.w)("domains")],d.prototype,"readDomains",null),(0,i.Cg)([(0,c.K)("domains")],d.prototype,"writeDomains",null),(0,i.Cg)([(0,s.MZ)({type:[o.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i.Cg)([(0,s.$K)("esri.layers.support.FeatureType")],d)},37352(e,t,r){r.d(t,{A:()=>o});var i,n=r(5482),a=r(7762),s=r(25482),l=r(91429);let o=i=class extends s.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new a.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],o.prototype,"floorField",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],o.prototype,"viewAllMode",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],o.prototype,"viewAllLevelIds",void 0),o=i=(0,n.Cg)([(0,l.$K)("esri.layers.support.LayerFloorInfo")],o)},91880(e,t,r){r.d(t,{A:()=>u});var i,n=r(5482),a=r(66552),s=r(25482),l=r(91429);const o=new a.J({asc:"ascending",desc:"descending"});let u=class extends s.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,n.Cg)([(0,l.MZ)({type:o.apiValues,json:{type:o.jsonValues,read:o.read,write:o.write}})],u.prototype,"order",void 0),u=i=(0,n.Cg)([(0,l.$K)("esri.layers.support.OrderByInfo")],u)},45067(e,t,r){r.d(t,{A:()=>c});var i=r(5482),n=r(69540),a=r(66552),s=r(25482),l=r(91429);const o=new a.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new a.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let c=class extends((0,n.OU)(s.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,l.MZ)({json:{read:o.read,write:o.write}})],c.prototype,"cardinality",void 0),(0,i.Cg)([(0,l.MZ)({json:{name:"catalogID"}})],c.prototype,"catalogId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"composite",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"keyField",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],c.prototype,"role",void 0),c=(0,i.Cg)([(0,l.$K)("esri.layers.support.Relationship")],c)},17311(e,t,r){r.d(t,{A:()=>h});var i=r(5482),n=r(69622),a=r(4576),s=r(60999),l=r(7762),o=r(16494),u=r(91429),c=r(30524),d=r(43668);const p=/<br\s*\/*>/gi;let h=class extends n.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,s.UT)(()=>(0,d.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([r.e(4560),r.e(9301)]).then(r.bind(r,99301)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new l.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),i=this.fieldsIndex.get(r.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){const i=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],r)).get(i)??""}async getTitles(e,t,r){const i=new Map,n=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:a}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:s,workingTitle:l}=this,u=l&&s;t.forEach(t=>{const c=t.getObjectId()??t.attributes[e.objectIdField];let d=u?a({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:s,globalAttributes:this._createFormattedAttributes(e,t,n).global,layer:e,text:l}):"";r?.removeHTML&&(d=o.Nd.sanitize(d).replaceAll(p," ")),i.set(c,d)})}catch{}return i}async _checkAndReQueryGraphics(e,t){const r=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(a.Ru);if(r.length!==t.length)return t;if(t.some(e=>!(0,c.Kl)(e,this.requiredFields))){const i=e.createQuery();i.where="1=1",i.outFields=[...this.requiredFields],i.objectIds=r;const n=await e.queryFeatures(i);if(n?.features.length===t.length)return n.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),i=e?.name??r.fieldName;r.fieldName=i,t.set(i.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],n={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{n[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const a={...t.attributes,...n};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:a,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,c.nw)(e).filter(e=>!(e.startsWith("relationships/")||e.startsWith("expression/")))}};(0,i.Cg)([(0,u.MZ)({readOnly:!0})],h.prototype,"_arcadeTask",null),(0,i.Cg)([(0,u.MZ)()],h.prototype,"_featureUtils",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],h.prototype,"featureUtilsPromise",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],h.prototype,"calculatedExpressions",null),(0,i.Cg)([(0,u.MZ)()],h.prototype,"displayField",void 0),(0,i.Cg)([(0,u.MZ)()],h.prototype,"effectivePopupTemplate",void 0),(0,i.Cg)([(0,u.MZ)()],h.prototype,"expressionsUsedInTitle",null),(0,i.Cg)([(0,u.MZ)()],h.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,u.MZ)()],h.prototype,"fieldInfoMap",null),(0,i.Cg)([(0,u.MZ)()],h.prototype,"fields",void 0),(0,i.Cg)([(0,u.MZ)()],h.prototype,"objectIdField",void 0),(0,i.Cg)([(0,u.MZ)()],h.prototype,"requiredFields",null),h=(0,i.Cg)([(0,u.$K)("esri.layers.support.TitleCreator")],h)},41560(e,t,r){r.d(t,{Ch:()=>s,mW:()=>a});var i=r(34727),n=r(39516);function a(e,t){return{...t,filterMode:e.mode}}function s(e,t,r){const a=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],c(r)),t[1]=Math.min(t[1],d(i));return t}(e);if(a&&((0,i.gg)(t,a[0])||(0,i.ZH)(r,a[1])))return"";const s=Array.from(l(e,t,r)),o=function(e,t,r){if(0===e.length)return!0;const n=c(e.at(0)?.minScale),a=d(e.at(-1)?.maxScale);if((0,i.ZH)(n,t)||(0,i.gg)(a,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],n=e[t+1];if((0,i.ZH)(c(n.minScale),d(r.maxScale)))return!0}return!1}(s,t,r)?"1=1":s.map(e=>e.where||"1=1").reduce((e,t)=>(0,n.IW)(e,t),"");return o&&"1=1"!==o?o:""}function*l(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const i of e.filters)o(i.minScale,i.maxScale,t,r)&&(yield i)}}function o(e,t,r,n){return e=c(e),r=c(r),t=d(t),!(!(0,i.Sp)(r,e)&&(n??r)>e||(0,i.Hx)(t,r)||void 0!==n&&(0,i.Sp)(n,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},77548(e,t,r){r.d(t,{Gh:()=>L,tk:()=>A,BR:()=>S,p2:()=>I,qd:()=>R,wI:()=>T,G$:()=>M,$x:()=>C,Ov:()=>w,cM:()=>p,UC:()=>h,W_:()=>b,Qz:()=>y,OP:()=>x,TU:()=>_,F2:()=>f,XX:()=>g,jy:()=>F});var i=r(70333),n=r(11254),a=r(7762),s=(r(84952),r(36563)),l=r(36708),o=r(4146);const u=new WeakMap;function c(e){return!e.destroyed&&(u.has(e)||e.addHandles([(0,l.wB)(()=>{const{parent:t}=e;return!!(t&&t instanceof o.A)&&("catalog-dynamic-group"===t.type||c(t))},t=>u.set(e,t),l.pc),(0,s.hA)(()=>u.delete(e))]),u.get(e))}function d(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function p(e){return d(e,"knowledge-graph")&&"layers"in e}function h(e){return d(e,"knowledge-graph-sublayer")}function y(e){return d(e,"link-chart")&&"layers"in e}function f(e){return d(e,"subtype-group")&&"sublayers"in e}function m(e){const t=e.parent;return function(e){return"group"===e?.type}(t)&&t.tables.includes(e)}r(16215);const g={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function _(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function w(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function b(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function F(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"oriented-imagery"===e.type}(e)||function(e){return d(e,"feature")}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}function v(e){const t=e?.type;return"binning"===t||"cluster"===t}function I(e,t){if(!F(e))return;const r=t?.graphic,i=e.featureReduction;if(r){if(r.isAggregate){const e=r.origin;return e&&"featureReductionProvider"in e&&i?v(i)?i:null:void 0}return e}return t?.checkFeatureReduction&&i?v(i)?i:null:e}async function T(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const a=e.toLowerCase().indexOf("/rest/services");if(-1===a)return null;const s=`${e.slice(0,a)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,n.A)(s,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function S(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function A(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function R(e){const t=new a.A;for(const r of e.allLayers.concat(e.allTables))c(r)||m(r)||("charts"in r&&t.push(r),"subtype-group"===r.type&&t.push(...r.sublayers));return t}function C(e,t){return null}function M(e){return null}function x(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function L(e,t){if(!t||!x(e))return;const r=(e.url,null);r&&(e.url=r)}},73133(e,t,r){r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:"unknown"})},73681(e,t,r){r.d(t,{n:()=>o});var i=r(49186),n=r(53966),a=r(46140),s=r(95466),l=r(55674);class o{static async from(e,t,r){const s=e.dictionary_version?a.A.parse(e.dictionary_version):null,c=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const p=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))p.delete(e);p.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:p});const h=await(0,l.xR)(e.expression,null,d);if(!h)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const y=!s||!s.greaterEqual(4,0);y&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:s});const f=new u(r,y);return new o(y,c,h,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new s.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new s.A(t)}}class u extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},10536(e,t,r){function i(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]=i(n[e])}else"object"==typeof n?n.toJSON&&(t[r]=JSON.stringify(n)):t[r]=n}return t}r.d(t,{z:()=>i})},17126(e,t,r){r.d(t,{dw:()=>s,qD:()=>l,qW:()=>o});var i=r(11254),n=r(21325),a=r(10536);function s(e,t){const r=e.toJSON();return r.objectIds&&(r.objectIds=r.objectIds.join(",")),r.orderByFields&&(r.orderByFields=r.orderByFields.join(",")),r.outFields&&!t?.returnCountOnly?r.outFields.includes("*")?r.outFields="*":r.outFields=r.outFields.join(","):delete r.outFields,r.outSR&&(r.outSR=(0,n.YX)(r.outSR)),r.dynamicDataSource&&(r.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r}async function l(e,t,r){const i=await u(e,t,r),n=i.data,a=n.geometryType,s=n.spatialReference,l={};for(const e of n.relatedRecordGroups){const t={fields:void 0,geometryType:a,spatialReference:s,hasZ:!!n.hasZ,hasM:!!n.hasM,features:e.relatedRecords};if(null!=e.objectId)l[e.objectId]=t;else for(const r of Object.keys(e))"relatedRecords"!==r&&(l[e[r]]=t)}return{...i,data:l}}async function o(e,t,r){const i=await u(e,t,r,{returnCountOnly:!0}),n=i.data,a={};for(const e of n.relatedRecordGroups)null!=e.objectId&&(a[e.objectId]=e.count);return{...i,data:a}}async function u(e,t,r={},n){const l=(0,a.z)({...e.query,f:"json",...n,...s(t,n)});return(0,i.A)(e.path+"/queryRelatedRecords",{...r,query:{...r.query,...l}})}},58501(e,t,r){r.d(t,{q:()=>n});var i=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(n)for(const e of r.features)n(e.geometry)}},22671(e,t,r){r.d(t,{A:()=>_});var i,n=r(5482),a=r(52106),s=r(66552),l=r(25482),o=r(4718),u=r(91429),c=r(16930),d=r(60408),p=r(65864),h=r(50498),y=r(20437),f=r(36005),m=r(43937);const g=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,a.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,p.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=c.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,o.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,a=this.features,s=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((n-e)/r));for(let e=0,t=a.length;e<t;e++)s?.(a[e].geometry)||(a.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[a,s]}=r;let l=null,o=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;o=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*a+i,e=>n-e*s,l,o);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=c.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const a=e[t],s=r.fromJSON(a),l=a.geometry?.spatialReference;null==s.geometry||l||(s.geometry.spatialReference=i);const o=a.aggregateGeometries,u=s.aggregateGeometries;if(o&&null!=u)for(const e in u){const t=u[e],r=o[e],n=r?.spatialReference;null==t||n||(t.spatialReference=i)}n.push(s)}return n}_quantizePoints(e,t,r){let i,n;const a=[];for(let s=0,l=e.length;s<l;s++){const l=e[s];if(s>0){const e=t(l[0]),s=r(l[1]);e===i&&s===n||(a.push([e-i,s-n]),i=e,n=s)}else i=t(l[0]),n=r(l[1]),a.push([i,n])}return a.length>0?a:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,d.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,a=i.length;e<a;e++){const a=i[e],s=this._quantizePoints(a,t,r);s&&n.push(s)}return n.length>0?((0,d.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const a=(0,d.Bi)(e)?e.rings:e.paths;let s,l;for(let e=0,i=a.length;e<i;e++){const i=a[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],l+=n[1]):(s=n[0],l=n[1]),n[0]=t(s),n[1]=r(l)}}if(i&&n)for(let e=0,t=a.length;e<t;e++){const t=a[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=a.length;e<t;e++){const t=a[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=a.length;e<t;e++){const t=a[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const a=e.points;let s,l;for(let e=0,i=a.length;e<i;e++){const i=a[e];e>0?(s+=i[0],l+=i[1]):(s=i[0],l=i[1]),i[0]=t(s),i[1]=r(l)}if(i&&n)for(let e=0,t=a.length;e<t;e++){const t=a[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=a.length;e<t;e++){const t=a[e];t[2]=i(t[2])}else if(n)for(let e=0,t=a.length;e<t;e++){const t=a[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,u.MZ)({type:[a.A],json:{write:!0}})],_.prototype,"features",void 0),(0,n.Cg)([(0,f.w)("features")],_.prototype,"readFeatures",null),(0,n.Cg)([(0,u.MZ)({type:[y.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,n.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,n.Cg)([(0,m.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,n.Cg)([(0,u.MZ)({types:h.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,f.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,u.MZ)({type:c.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,n.Cg)([(0,m.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,u.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=i=(0,n.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0},41366(e,t,r){r.d(t,{K:()=>d,Q:()=>o});var i=r(5482),n=r(66552),a=r(53966),s=r(91429),l=r(93223);const o=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",c="field",d=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&c||r&&u||null,t&&r&&a.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,s.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,l.e)(o,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,s.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},55674(e,t,r){r.d(t,{Ad:()=>h,Gj:()=>m,QY:()=>p,lL:()=>g,xR:()=>y});var i=r(66131),n=r(49186),a=(r(44208),r(44729)),s=r(15032),l=r(65864),o=r(95466),u=r(43668),c=r(98623);const d=["geometry","scale","timeProperties"];function p(e,t){if(null!=t)for(const r of d)t.hasArcadeDependency(r)&&e.add(r);return e}function h(e,t){return f.create(e,t,null,["$feature","$view"])}function y(e,t,r){return f.create(e,t,r,["$feature","$view","$config"])}class f{static async create(e,t,r,i){const{arcade:a,Dictionary:s}=await(0,u.l)();let l;try{l=a.parseScript(e)}catch(t){throw new n.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const o=a.scriptUsesGeometryEngine(l);o&&await a.enableGeometrySupport(),await a.loadDependentModules(new Set,l,null,!1,o);const c={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},d=a.compileScript(l,c);let p=null;null!=r&&(p=new s(r),p.immutable=!0);const h=new s;return h.immutable=!1,h.setField("scale",0),new f(e,a,l,d,t,h,p,s)}constructor(e,t,r,i,n,a,s,l){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=n,this._viewDict=a,this._configDict=s,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:n,currentEnd:a}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,currentEnd:null!=a?null!=r?i.lY.epochToArcadeDate(a,r):i.lY.unknownEpochToArcadeDate(a):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new o.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,l.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return a.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return s.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},16215(e,t,r){r.d(t,{S:()=>n,Y:()=>i});const i=Symbol("BasemapInstance");function n(e){return null!=e&&"object"==typeof e&&i in e}},79677(e,t,r){r.d(t,{A:()=>p});var i,n=r(5482),a=r(25482),s=r(88930),l=r(91429),o=r(98623),u=r(10184),c=r(36005),d=r(43937);let p=class extends a.o{static{i=this}static get allTime(){return h}static get empty(){return y}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=o.qU){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let r=this.start;r&&(r=(0,s.lL)(r,new u.A({value:1,unit:e}),t));let n=this.end;if(n){const r=(0,s.lL)(n,new u.A({value:1,unit:e}),t);n=n.getTime()===r.getTime()?r:(0,s.S1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,a=e.end?.getTime()??1/0;let s,l;return n>=t&&n<=r?s=n:t>=n&&t<=a&&(s=t),r>=n&&r<=a?l=r:a>=t&&a<=r&&(l=a),null==s||null==l||isNaN(s)||isNaN(l)?i.empty:new i({start:s===-1/0?null:new Date(s),end:l===1/0?null:new Date(l)})}offset(e,t,r=o.qU){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();const n=new i,{start:a,end:l}=this;return null!=a&&(n.start=(0,s.S1)(a,e,t,r)),null!=l&&(n.end=(0,s.S1)(l,e,t,r)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,n.Cg)([(0,c.w)("end")],p.prototype,"readEnd",null),(0,n.Cg)([(0,d.K)("end")],p.prototype,"writeEnd",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,n.Cg)([(0,c.w)("start")],p.prototype,"readStart",null),(0,n.Cg)([(0,d.K)("start")],p.prototype,"writeStart",null),p=i=(0,n.Cg)([(0,l.$K)("esri.time.TimeExtent")],p);const h=new p,y=new p({start:void 0,end:void 0})},10184(e,t,r){r.d(t,{A:()=>c});var i=r(5482),n=r(69540),a=r(25482),s=r(88930),l=r(91429),o=r(73133),u=r(93223);let c=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.t)(this.value,this.unit,"milliseconds")}};(0,i.Cg)([(0,u.e)(o.j,{nonNullable:!0})],c.prototype,"unit",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,i.Cg)([(0,l.$K)("esri.time.TimeInterval")],c)}}]);
|