@arcgis/core 4.25.0-next.20221021 → 4.25.0-next.20221022
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/WebMap.js +1 -1
- package/arcade.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{0b0f3e93f658a012d5f0.js → 00df1053d3a8761fc0a3.js} +1 -1
- package/assets/esri/core/workers/chunks/0de7eca7acf74947cf2e.js +1 -0
- package/assets/esri/core/workers/chunks/{2474f0e8b8abc1387106.js → 2600954826b42f2b70c4.js} +1 -1
- package/assets/esri/core/workers/chunks/{af3f30f968363bb3930c.js → 353c4a51be72c4a77e1f.js} +1 -1
- package/assets/esri/core/workers/chunks/{2d8201f0f33ba66bb96b.js → 5f46751fa500a9dfacf9.js} +1 -1
- package/assets/esri/core/workers/chunks/{b9e93d9ea80361716f1d.js → 64190294f3dc9237b420.js} +1 -1
- package/assets/esri/core/workers/chunks/{883cfe319b15ebabf71e.js → 73ad8f3d3feff5882988.js} +1 -1
- package/assets/esri/core/workers/chunks/{177c8d5e2531c6f64581.js → 796504f93100aea7c6f5.js} +1 -1
- package/assets/esri/core/workers/chunks/8435ae4fe5a5332b1076.js +1 -0
- package/assets/esri/core/workers/chunks/{c8c0f091aab41e4effa5.js → 85690fabbfe60681f5e7.js} +1 -1
- package/assets/esri/core/workers/chunks/{942da417257f8fd8e4cf.js → 858970a88406562a26cc.js} +1 -1
- package/assets/esri/core/workers/chunks/a17d20ffaa47d430d98c.js +1 -0
- package/assets/esri/core/workers/chunks/ac2903c5f1587dec2f80.js +1 -0
- package/assets/esri/core/workers/chunks/{7ba0cfe4d1c214f44fc7.js → b6d9750b16bbf8ce5307.js} +1 -1
- package/assets/esri/core/workers/chunks/{7f40f4ac6e2af4b333f5.js → c4e5b929b152f8d36cc3.js} +1 -1
- package/assets/esri/core/workers/chunks/c7de993c0a85594a1969.js +1 -0
- package/assets/esri/core/workers/chunks/ca92022f53080fda75fe.js +1 -0
- package/assets/esri/core/workers/chunks/d7668e81467833a5a53d.js +1 -0
- package/assets/esri/core/workers/chunks/de83b062359c0459585f.js +1 -0
- package/assets/esri/core/workers/chunks/f57c3343f93d87423856.js +1 -0
- package/assets/esri/core/workers/chunks/f704ed07c514a0f436ec.js +1 -0
- package/assets/esri/themes/base/_color.scss +1 -0
- package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +58 -14
- package/assets/esri/themes/base/widgets/_LayerList.scss +57 -13
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/geometry/support/normalizeUtils.js +1 -1
- package/interfaces.d.ts +109 -6
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/Rasterizer.js +1 -1
- package/symbols/cim/rasterizingUtils.js +5 -0
- package/views/2d/engine/brushes.js +1 -1
- package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
- package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
- package/views/2d/engine/vtlBrushes.js +5 -0
- package/views/2d/engine/webgl/mesh/bufcut.js +1 -1
- package/views/2d/layers/features/schemaUtils.js +1 -1
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/FeatureForm/FormExpressionArcadeExecutor.js +1 -1
- package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/LayerList/ListItem.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/assets/esri/core/workers/chunks/0cfb97b9f38c31b3b33a.js +0 -1
- package/assets/esri/core/workers/chunks/2a63949c3aad9ace1b44.js +0 -1
- package/assets/esri/core/workers/chunks/3b5be512567d9c1c6fe6.js +0 -1
- package/assets/esri/core/workers/chunks/4450f17444947fe2f27f.js +0 -1
- package/assets/esri/core/workers/chunks/5abda500f5d5607155ab.js +0 -1
- package/assets/esri/core/workers/chunks/81139c01e8016cbbe324.js +0 -1
- package/assets/esri/core/workers/chunks/94027976cfca4ad5789b.js +0 -1
- package/assets/esri/core/workers/chunks/9d410721f42259efe666.js +0 -1
- package/assets/esri/core/workers/chunks/b17ff3dfdc638f9f5705.js +0 -1
- package/assets/esri/core/workers/chunks/d6eb078d94171fb9d3d4.js +0 -1
- package/rest/geometry/cut.js +0 -5
- package/rest/geometry/simplify.js +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7269,7035,7541],{41123:(e,t,a)=>{a.d(t,{D:()=>s});const r="randomUUID"in crypto;function s(){if(r)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}},51806:(e,t,a)=>{a.d(t,{aX:()=>S});var r=a(68773),s=a(20102),n=a(92604),i=a(70586),o=a(38913),l=a(58901),d=a(82971),u=a(33955);const p={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new l.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:d.Z.WebMercator}),minus180Line:new l.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:d.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new l.Z({paths:[[[180,-180],[180,180]]],spatialReference:d.Z.WGS84}),minus180Line:new l.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:d.Z.WGS84})}};function c(e,t){return Math.ceil((e-t)/(2*t))}function f(e,t){const a=h(e);for(const e of a)for(const a of e)a[0]+=t;return e}function h(e){return(0,u.oU)(e)?e.rings:e.paths}var y=a(8744),m=a(40488),g=(a(66577),a(3172)),b=a(11282),w=a(17452);const F=n.Z.getLogger("esri.geometry.support.normalizeUtils");function I(e){return"polygon"===e[0].type}function A(e){return"polyline"===e[0].type}function v(e,t,a){if(t){const t=function(e,t){if(!(e instanceof l.Z||e instanceof o.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw F.error(e),new s.Z(e)}const a=h(e),r=[];for(const e of a){const a=[];r.push(a),a.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const s=e[r][0],n=e[r][1],i=e[r+1][0],o=e[r+1][1],l=Math.sqrt((i-s)*(i-s)+(o-n)*(o-n)),d=(o-n)/l,u=(i-s)/l,p=l/t;if(p>1){for(let e=1;e<=p-1;e++){const r=e*t,i=u*r+s,o=d*r+n;a.push([i,o])}const e=(l+Math.floor(p-1)*t)/2,r=u*e+s,i=d*e+n;a.push([r,i])}a.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new o.Z({rings:r,spatialReference:e.spatialReference}):new l.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,m.Sx)(t,!0)}return a&&(e=f(e,a)),e}function Z(e,t,a){if(Array.isArray(e)){const r=e[0];if(r>t){const a=c(r,t);e[0]=r+a*(-2*t)}else if(r<a){const t=c(r,a);e[0]=r+t*(-2*a)}}else{const r=e.x;if(r>t){const a=c(r,t);e=e.clone().offset(a*(-2*t),0)}else if(r<a){const t=c(r,a);e=e.clone().offset(t*(-2*a),0)}}return e}function R(e,t){let a=-1;for(let r=0;r<t.cutIndexes.length;r++){const s=t.cutIndexes[r],n=t.geometries[r],i=h(n);for(let e=0;e<i.length;e++){const t=i[e];t.some((a=>{if(a[0]<180)return!0;{let a=0;for(let e=0;e<t.length;e++){const r=t[e][0];a=r>a?r:a}a=Number(a.toFixed(9));const r=-360*c(a,180);for(let a=0;a<t.length;a++){const t=n.getPoint(e,a);n.setPoint(e,a,t.clone().offset(r,0))}return!0}}))}if(s===a){if(I(e))for(const t of h(n))e[s]=e[s].addRing(t);else if(A(e))for(const t of h(n))e[s]=e[s].addPath(t)}else a=s,e[s]=n}return e}async function S(e,t,a){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&F.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??r.Z.geometryServiceUrl;let n,d,h,I,A,E,$,x,O=0;const U=[],L=[];for(const t of e)if((0,i.Wi)(t))L.push(t);else if(n||(n=t.spatialReference,d=(0,y.C5)(n),h=n.isWebMercator,E=h?102100:4326,I=p[E].maxX,A=p[E].minX,$=p[E].plus180Line,x=p[E].minus180Line),d)if("mesh"===t.type)L.push(t);else if("point"===t.type)L.push(Z(t.clone(),I,A));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>Z(e,I,A))),L.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,d);L.push(e.rings?new o.Z(e):e)}else if(t.extent){const e=t.extent,a=c(e.xmin,A)*(2*I);let r=0===a?t.clone():f(t.clone(),a);e.offset(a,0),e.intersects($)&&e.xmax!==I?(O=e.xmax>O?e.xmax:O,r=v(r,h),U.push(r),L.push("cut")):e.intersects(x)&&e.xmin!==A?(O=e.xmax*(2*I)>O?e.xmax*(2*I):O,r=v(r,h,360),U.push(r),L.push("cut")):L.push(r)}else L.push(t.clone());else L.push(t);let C=c(O,I),N=-90;const T=C,J=new l.Z;for(;C>0;){const e=360*C-180;J.addPath([[e,N],[e,-1*N]]),N*=-1,C--}if(U.length>0&&T>0){const t=R(U,await async function(e,t,a,r){const s=(0,b.en)(e),n=t[0].spatialReference,i={...r,query:{...s.query,f:"json",sr:JSON.stringify(n),target:JSON.stringify({geometryType:(0,u.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(a)}},o=await(0,g.default)(s.path+"/cut",i),{cutIndexes:l,geometries:d=[]}=o.data;return{cutIndexes:l,geometries:d.map((e=>{const t=(0,u.im)(e);return t.spatialReference=n,t}))}}(s,U,J,a)),r=[],n=[];for(let a=0;a<L.length;a++){const s=L[a];if("cut"!==s)n.push(s);else{const s=t.shift(),o=e[a];(0,i.pC)(o)&&"polygon"===o.type&&o.rings&&o.rings.length>1&&s.rings.length>=o.rings.length?(r.push(s),n.push("simplify")):n.push(h?(0,m.$)(s):s)}}if(!r.length)return n;const o=await async function(e,t,a){const r="string"==typeof e?(0,w.mN)(e):e,s=t[0].spatialReference,n=(0,u.Ji)(t[0]),i={...a,query:{...r.query,f:"json",sr:s.wkid?s.wkid:JSON.stringify(s),geometries:JSON.stringify((l=t,{geometryType:(0,u.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:o}=await(0,g.default)(r.path+"/simplify",i);var l;return function(e,t,a){const r=(0,u.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=a,t}))}(o.geometries,n,s)}(s,r,a),l=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?l.push(t):l.push(h?(0,m.$)(o.shift()):o.shift())}return l}const j=[];for(let e=0;e<L.length;e++){const t=L[e];if("cut"!==t)j.push(t);else{const e=U.shift();j.push(!0===h?(0,m.$)(e):e)}}return j}},87269:(e,t,a)=>{a.r(t),a.d(t,{AssetMapEditFlags:()=>s,applyEdits:()=>y});var r,s,n,i=a(38171),o=a(46791),l=a(20102),d=a(22974),u=a(70586),p=a(17452),c=a(41123),f=a(51806),h=a(66361);async function y(e,t,a,s={}){let n,i;const p={edits:a,result:new Promise(((e,t)=>{n=e,i=t}))};e.emit("apply-edits",p);try{const{results:i,edits:p}=await async function(e,t,a,s){if(await e.load(),!function(e){return e&&null!=e.applyEdits}(t))throw new l.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!e.editingEnabled)throw new l.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:n,options:i}=await async function(e,t,a){const s=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),n=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),i=(0,u.pC)(e.infoFor3D);if(!t||!s&&!n)throw new l.Z(`${e.type}-layer:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!e.capabilities.data.isVersioned&&a&&a.gdbVersion)throw new l.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!e.capabilities.editing.supportsRollbackOnFailure&&a&&a.rollbackOnFailureEnabled)throw new l.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");if(!e.capabilities.editing.supportsGlobalId&&a&&a.globalIdUsed)throw new l.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!e.capabilities.editing.supportsGlobalId&&n)throw new l.Z(`${e.type}-layer:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if((!a||!a.globalIdUsed)&&n)throw new l.Z(`${e.type}-layer:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true");const d={...a};if(null!=d.rollbackOnFailureEnabled||e.capabilities.editing.supportsRollbackOnFailure||(d.rollbackOnFailureEnabled=!0),!1===d.rollbackOnFailureEnabled&&"original-and-current-features"===d.returnServiceEditsOption)throw new l.Z(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true.");if(!e.capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference&&d.returnServiceEditsInSourceSR)throw new l.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(d.returnServiceEditsInSourceSR&&"original-and-current-features"!==d.returnServiceEditsOption)throw new l.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsOption' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p={...t};if(p.addFeatures=t&&o.Z.isCollection(t.addFeatures)?t.addFeatures.toArray():p.addFeatures||[],p.updateFeatures=t&&o.Z.isCollection(t.updateFeatures)?t.updateFeatures.toArray():p.updateFeatures||[],p.deleteFeatures=t&&o.Z.isCollection(t.deleteFeatures)?t.deleteFeatures.toArray():p.deleteFeatures||[],p.addFeatures.length&&!e.capabilities.operations.supportsAdd)throw new l.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support adding features.");if(p.updateFeatures.length&&!e.capabilities.operations.supportsUpdate)throw new l.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support updating features.");if(p.deleteFeatures.length&&!e.capabilities.operations.supportsDelete)throw new l.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support deleting features.");p.addAttachments=p.addAttachments||[],p.updateAttachments=p.updateAttachments||[],p.deleteAttachments=p.deleteAttachments||[],p.addFeatures=p.addFeatures.map(w),p.updateFeatures=p.updateFeatures.map(w),p.addAssets=[];const c=a&&a.globalIdUsed||i;return p.addFeatures.forEach((t=>function(e,t,a){m(e,t,a)}(t,e,c))),p.updateFeatures.forEach((t=>function(e,t,a){if(m(e,t,a),"geometry"in e&&(0,u.pC)(e.geometry)&&!t.capabilities.editing.supportsGeometryUpdate)throw new l.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,c))),p.deleteFeatures.forEach((t=>function(e,t,a){m(e,t,a)}(t,e,c))),p.addAttachments.forEach((t=>g(t,e))),p.updateAttachments.forEach((t=>g(t,e))),i&&await async function(e,t){if((0,u.Wi)(t.infoFor3D))return;const{infoFor3D:a}=t;let s=!1;for(const{id:e}of a.editFormats)if(e===r.GLTF_BINARY){s=!0;break}const n=[];for(const a of e.addFeatures)n.push(F(a,e,t,s));for(const a of e.updateFeatures)n.push(F(a,e,t,s));const i=await Promise.allSettled(n);for(const e of i)if("rejected"===e.status)throw e.reason}(p,e),{edits:await b(p),options:d}}(e,a,s);return n.addFeatures.length||n.updateFeatures.length||n.deleteFeatures.length||n.addAttachments.length||n.updateAttachments.length||n.deleteAttachments.length?{edits:n,results:await t.applyEdits(n,i)}:{edits:n,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,a,s),c=e=>e.filter((e=>!e.error)).map(d.d9),f={edits:p,addedFeatures:c(i.addFeatureResults),updatedFeatures:c(i.updateFeatureResults),deletedFeatures:c(i.deleteFeatureResults),addedAttachments:c(i.addAttachmentResults),updatedAttachments:c(i.updateAttachmentResults),deletedAttachments:c(i.deleteAttachmentResults)};return i.editedFeatureResults?.length&&(f.editedFeatures=i.editedFeatureResults),(f.addedFeatures.length||f.updatedFeatures.length||f.deletedFeatures.length||f.addedAttachments.length||f.updatedAttachments.length||f.deletedAttachments.length)&&(e.emit("edits",f),(0,h.lQ)(e)&&h.dU.emit("edits",{layer:e,event:f})),n(f),i}catch(e){throw i(e),e}}function m(e,t,a){if(a){if("attributes"in e&&!e.attributes[t.globalIdField])throw new l.Z(`${t.type}-layer:invalid-parameter`,"Feature should have 'globalId' when 'globalIdUsed' is true");if(!("attributes"in e)&&!e.globalId)throw new l.Z(`${t.type}-layer:invalid-parameter`,"'globalId' of the feature should be passed when 'globalIdUsed' is true")}if("geometry"in e&&(0,u.pC)(e.geometry)){if(e.geometry.hasZ&&!1===t.capabilities.data.supportsZ)throw new l.Z(`${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 l.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function g(e,t){const{feature:a,attachment:r}=e;if(!a||"attributes"in a&&!a.attributes[t.globalIdField])throw new l.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in a)&&!a.globalId)throw new l.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!r.globalId)throw new l.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!r.data&&!r.uploadId)throw new l.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(r.data instanceof File&&r.data.name||r.name))throw new l.Z(`${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 l.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof r.data){const e=(0,p.sJ)(r.data);if(e&&!e.isBase64)throw new l.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function b(e){const t=e.addFeatures,a=e.updateFeatures,r=t.concat(a).map((e=>e.geometry)),s=await(0,f.aX)(r),n=t.length,i=a.length;return s.slice(0,n).forEach(((t,a)=>e.addFeatures[a].geometry=t)),s.slice(n,n+i).forEach(((t,a)=>e.updateFeatures[a].geometry=t)),e}function w(e){const t=new i.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}async function F(e,t,a,s){if((0,u.Wi)(e.geometry)||"mesh"!==e.geometry.type)return;const n=e.geometry,i=a.globalIdField;if((0,u.pC)(a.parsedUrl)&&(0,u.pC)(n.external)&&"string"==typeof n.external.source&&n.external.source.startsWith(a.parsedUrl.path))return;if(!s)throw new l.Z(`${a.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");const o=await n.toBinaryGLTF(),d=await o.buffer(),p=`{${(0,c.D)()}}`,f=`${p}.glb`;t.addAssets.push({featureGlobalId:e.getAttribute(i),assetMapGlobalId:p,assetName:f,flags:0,data:d.data,mimeType:d.type,assetType:r.GLTF_BINARY,feature:e})}!function(e){e.GLTF_BINARY="3D_glb",e.GLTF_JSON="3D_gltf"}(r||(r={})),(n=s||(s={}))[n.PROJECT_VERTICES=1]="PROJECT_VERTICES"},66361:(e,t,a)=>{a.d(t,{dU:()=>o,lQ:()=>u,o1:()=>p});var r=a(43697),s=a(32448),n=a(22974),i=(a(92604),a(75215),a(20102),a(80442),a(52011));const o=new s.Z.EventEmitter,l="esri.layers.mixins.EditBusLayer",d=Symbol(l);function u(e){return null!=e&&"object"==typeof e&&d in e}const p=e=>{var t;let a=class extends e{constructor(...e){super(...e),this[t]=!0,this.when().then((()=>{this.own([o.on("edits",(e=>{const t="layer"in e?e.layer:null,a="layer"in e?e.layer?.url:e.serviceUrl,r="layer"in e?e.layer?.layerId:e.layerId,s=e.event;if(t===this||a!==this.url)return;if(null!=r&&null!=this.layerId&&r===this.layerId)return void this.emit("edits",(0,n.d9)(s));const i=s.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(i){const{adds:e,updates:t,deletes:a}=i.editedFeatures,r={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:e.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))),deletedFeatures:a.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))),updatedFeatures:t.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))),editedFeatures:(0,n.d9)(s.editedFeatures)};this.emit("edits",r)}}))])}),(()=>{}))}};return t=d,a=(0,r._)([(0,i.j)(l)],a),a}},11282:(e,t,a)=>{a.d(t,{cv:()=>o,en:()=>i,lA:()=>n});var r=a(22974),s=a(17452);function n(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,s.mN)(e):(0,r.d9)(e)}function o(e,t,a){const r={};for(const s in e){if("declaredClass"===s)continue;const n=e[s];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){r[s]=[];for(let e=0;e<n.length;e++)r[s][e]=o(n[e])}else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(a&&a[s]);r[s]=t?e:JSON.stringify(e)}else r[s]=t?n:JSON.stringify(n);else r[s]=n}return r}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8899],{41123:(e,t,r)=>{r.d(t,{D:()=>a});const s="randomUUID"in crypto;function a(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}},61159:(e,t,r)=>{r.d(t,{g:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},87269:(e,t,r)=>{r.r(t),r.d(t,{AssetMapEditFlags:()=>a,applyEdits:()=>f});var s,a,n,o=r(38171),i=r(46791),u=r(20102),l=r(22974),d=r(70586),c=r(17452),p=r(41123),h=r(82526),y=r(66361);async function f(e,t,r,a={}){let n,o;const c={edits:r,result:new Promise(((e,t)=>{n=e,o=t}))};e.emit("apply-edits",c);try{const{results:o,edits:c}=await async function(e,t,r,a){if(await e.load(),!function(e){return e&&null!=e.applyEdits}(t))throw new u.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!e.editingEnabled)throw new u.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:n,options:o}=await async function(e,t,r){const a=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),n=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),o=(0,d.pC)(e.infoFor3D);if(!t||!a&&!n)throw new u.Z(`${e.type}-layer:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!e.capabilities.data.isVersioned&&r&&r.gdbVersion)throw new u.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!e.capabilities.editing.supportsRollbackOnFailure&&r&&r.rollbackOnFailureEnabled)throw new u.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");if(!e.capabilities.editing.supportsGlobalId&&r&&r.globalIdUsed)throw new u.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!e.capabilities.editing.supportsGlobalId&&n)throw new u.Z(`${e.type}-layer:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if((!r||!r.globalIdUsed)&&n)throw new u.Z(`${e.type}-layer:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true");const l={...r};if(null!=l.rollbackOnFailureEnabled||e.capabilities.editing.supportsRollbackOnFailure||(l.rollbackOnFailureEnabled=!0),!1===l.rollbackOnFailureEnabled&&"original-and-current-features"===l.returnServiceEditsOption)throw new u.Z(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true.");if(!e.capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference&&l.returnServiceEditsInSourceSR)throw new u.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(l.returnServiceEditsInSourceSR&&"original-and-current-features"!==l.returnServiceEditsOption)throw new u.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsOption' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const c={...t};if(c.addFeatures=t&&i.Z.isCollection(t.addFeatures)?t.addFeatures.toArray():c.addFeatures||[],c.updateFeatures=t&&i.Z.isCollection(t.updateFeatures)?t.updateFeatures.toArray():c.updateFeatures||[],c.deleteFeatures=t&&i.Z.isCollection(t.deleteFeatures)?t.deleteFeatures.toArray():c.deleteFeatures||[],c.addFeatures.length&&!e.capabilities.operations.supportsAdd)throw new u.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support adding features.");if(c.updateFeatures.length&&!e.capabilities.operations.supportsUpdate)throw new u.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support updating features.");if(c.deleteFeatures.length&&!e.capabilities.operations.supportsDelete)throw new u.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support deleting features.");c.addAttachments=c.addAttachments||[],c.updateAttachments=c.updateAttachments||[],c.deleteAttachments=c.deleteAttachments||[],c.addFeatures=c.addFeatures.map(F),c.updateFeatures=c.updateFeatures.map(F),c.addAssets=[];const p=r&&r.globalIdUsed||o;return c.addFeatures.forEach((t=>function(e,t,r){m(e,t,r)}(t,e,p))),c.updateFeatures.forEach((t=>function(e,t,r){if(m(e,t,r),"geometry"in e&&(0,d.pC)(e.geometry)&&!t.capabilities.editing.supportsGeometryUpdate)throw new u.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,p))),c.deleteFeatures.forEach((t=>function(e,t,r){m(e,t,r)}(t,e,p))),c.addAttachments.forEach((t=>g(t,e))),c.updateAttachments.forEach((t=>g(t,e))),o&&await async function(e,t){if((0,d.Wi)(t.infoFor3D))return;const{infoFor3D:r}=t;let a=!1;for(const{id:e}of r.editFormats)if(e===s.GLTF_BINARY){a=!0;break}const n=[];for(const r of e.addFeatures)n.push(R(r,e,t,a));for(const r of e.updateFeatures)n.push(R(r,e,t,a));const o=await Promise.allSettled(n);for(const e of o)if("rejected"===e.status)throw e.reason}(c,e),{edits:await b(c),options:l}}(e,r,a);return n.addFeatures.length||n.updateFeatures.length||n.deleteFeatures.length||n.addAttachments.length||n.updateAttachments.length||n.deleteAttachments.length?{edits:n,results:await t.applyEdits(n,o)}:{edits:n,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,a),p=e=>e.filter((e=>!e.error)).map(l.d9),h={edits:c,addedFeatures:p(o.addFeatureResults),updatedFeatures:p(o.updateFeatureResults),deletedFeatures:p(o.deleteFeatureResults),addedAttachments:p(o.addAttachmentResults),updatedAttachments:p(o.updateAttachmentResults),deletedAttachments:p(o.deleteAttachmentResults)};return o.editedFeatureResults?.length&&(h.editedFeatures=o.editedFeatureResults),(h.addedFeatures.length||h.updatedFeatures.length||h.deletedFeatures.length||h.addedAttachments.length||h.updatedAttachments.length||h.deletedAttachments.length)&&(e.emit("edits",h),(0,y.lQ)(e)&&y.dU.emit("edits",{layer:e,event:h})),n(h),o}catch(e){throw o(e),e}}function m(e,t,r){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new u.Z(`${t.type}-layer:invalid-parameter`,"Feature should have 'globalId' when 'globalIdUsed' is true");if(!("attributes"in e)&&!e.globalId)throw new u.Z(`${t.type}-layer:invalid-parameter`,"'globalId' of the feature should be passed when 'globalIdUsed' is true")}if("geometry"in e&&(0,d.pC)(e.geometry)){if(e.geometry.hasZ&&!1===t.capabilities.data.supportsZ)throw new u.Z(`${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 u.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function g(e,t){const{feature:r,attachment:s}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new u.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new u.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!s.globalId)throw new u.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!s.data&&!s.uploadId)throw new u.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(s.data instanceof File&&s.data.name||s.name))throw new u.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities.editing.supportsUploadWithItemId&&s.uploadId)throw new u.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof s.data){const e=(0,c.sJ)(s.data);if(e&&!e.isBase64)throw new u.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function b(e){const t=e.addFeatures,r=e.updateFeatures,s=t.concat(r).map((e=>e.geometry)),a=await(0,h.aX)(s),n=t.length,o=r.length;return a.slice(0,n).forEach(((t,r)=>e.addFeatures[r].geometry=t)),a.slice(n,n+o).forEach(((t,r)=>e.updateFeatures[r].geometry=t)),e}function F(e){const t=new o.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}async function R(e,t,r,a){if((0,d.Wi)(e.geometry)||"mesh"!==e.geometry.type)return;const n=e.geometry,o=r.globalIdField;if((0,d.pC)(r.parsedUrl)&&(0,d.pC)(n.external)&&"string"==typeof n.external.source&&n.external.source.startsWith(r.parsedUrl.path))return;if(!a)throw new u.Z(`${r.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");const i=await n.toBinaryGLTF(),l=await i.buffer(),c=`{${(0,p.D)()}}`,h=`${c}.glb`;t.addAssets.push({featureGlobalId:e.getAttribute(o),assetMapGlobalId:c,assetName:h,flags:0,data:l.data,mimeType:l.type,assetType:s.GLTF_BINARY,feature:e})}!function(e){e.GLTF_BINARY="3D_glb",e.GLTF_JSON="3D_gltf"}(s||(s={})),(n=a||(a={}))[n.PROJECT_VERTICES=1]="PROJECT_VERTICES"},38899:(e,t,r)=>{r.r(t),r.d(t,{default:()=>pe});var s=r(43697),a=(r(66577),r(38171)),n=r(3172),o=r(92835),i=r(20102),u=r(80442),l=r(35454),d=r(83379),c=r(70586),p=r(78286),h=r(95330),y=r(17452),f=r(5600),m=(r(67676),r(75215),r(52011)),g=r(6570),b=r(33955),F=r(87269),R=r(25278),_=r(10158),I=r(4967),w=r(11282),S=r(69285),O=r(98732);function v(e,t){return t}function A(e,t,r,s){switch(r){case 0:return x(e,t+s,0);case 1:return"lowerLeft"===e.originPosition?x(e,t+s,1):function({translate:e,scale:t},r,s){return e[s]-r*t[s]}(e,t+s,1)}}function C(e,t,r,s){return 2===r?x(e,t,2):A(e,t,r,s)}function q(e,t,r,s){return 2===r?x(e,t,3):A(e,t,r,s)}function E(e,t,r,s){return 3===r?x(e,t,3):C(e,t,r,s)}function x({translate:e,scale:t},r,s){return e[s]+r*t[s]}class T{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=v,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,S.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(!(0,c.Wi)(t))for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){const r=e.fields;(0,c.O3)(r),r.push(t);const s=r.map((e=>e.name));this._attributesConstructor=function(){for(const e of s)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:s}=t,a=(0,O.$g)(r.clone(),r,!1,!1,this._transform),n=(0,O.di)(a,s,!1,!1);e.queryGeometryType=s,e.queryGeometry={...n}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const s=(0,c.s3)(this._transform,"transform");switch(t=this._applyTransform(s,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const s=(0,c.s3)(this._transform,"transform");return this._applyTransform(s,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const s=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(s)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(t,r),a=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),a.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=s}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?E:t?C:r?q:A}}var j=r(34599),Z=r(74889),D=r(57444);var N=r(40330),G=r(76497),P=r(98326);function J(e){const t=e.toJSON();return t.attachmentTypes&&(t.attachmentTypes=t.attachmentTypes.join(",")),t.keywords&&(t.keywords=t.keywords.join(",")),t.globalIds&&(t.globalIds=t.globalIds.join(",")),t.objectIds&&(t.objectIds=t.objectIds.join(",")),t.size&&(t.size=t.size.join(",")),t}function k(e,t){const r={};for(const s of e){const{parentObjectId:e,parentGlobalId:a,attachmentInfos:n}=s;for(const s of n){const{id:n}=s,o=(0,y.qg)((0,N.Dp)(`${t}/${e}/attachments/${n}`)),i=P.Z.fromJSON(s);i.set({url:o,parentObjectId:e,parentGlobalId:a}),r[e]?r[e].push(i):r[e]=[i]}}return r}var U=r(56545);var $=r(41818),M=r(5396);function B(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.outSpatialReference&&(r.outSR=r.outSR.wkid||JSON.stringify(r.outSR.toJSON()),delete r.outSpatialReference),r.dynamicDataSource&&(r.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r}async function Q(e,t,r={},s){const a=(0,G.A)({...e.query,f:"json",...s,...B(t,s)});return(0,n.default)(e.path+"/queryRelatedRecords",{...r,query:{...r.query,...a}})}var z=r(75935);var L=r(82526),V=r(28694);const W="Layer does not support extent calculation.";function X(e,t){const r=e.geometry,s=e.toJSON(),a=s;if((0,c.pC)(r)&&(a.geometry=JSON.stringify(r),a.geometryType=(0,b.Ji)(r),a.inSR=r.spatialReference.wkid||JSON.stringify(r.spatialReference)),s.topFilter?.groupByFields&&(a.topFilter.groupByFields=s.topFilter.groupByFields.join(",")),s.topFilter?.orderByFields&&(a.topFilter.orderByFields=s.topFilter.orderByFields.join(",")),s.topFilter&&(a.topFilter=JSON.stringify(a.topFilter)),s.objectIds&&(a.objectIds=s.objectIds.join(",")),s.orderByFields&&(a.orderByFields=s.orderByFields.join(",")),s.outFields&&!(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?s.outFields.includes("*")?a.outFields="*":a.outFields=s.outFields.join(","):delete a.outFields,s.outSR?a.outSR=s.outSR.wkid||JSON.stringify(s.outSR):r&&s.returnGeometry&&(a.outSR=a.inSR),s.returnGeometry&&delete s.returnGeometry,s.timeExtent){const e=s.timeExtent,{start:t,end:r}=e;null==t&&null==r||(a.time=t===r?t:`${t??"null"},${r??"null"}`),delete s.timeExtent}return a}function H(e,t,r,s={},a={}){const o="string"==typeof e?(0,y.mN)(e):e,i=t.geometry?[t.geometry]:[];return s.responseType="pbf"===r?"array-buffer":"json",(0,L.aX)(i,null,s).then((e=>{const i=e&&e[0];(0,c.pC)(i)&&((t=t.clone()).geometry=i);const u=(0,G.A)({...o.query,f:r,...a,...X(t,a)});return(0,n.default)((0,y.v_)(o.path,"queryTopFeatures"),{...s,query:{...u,...s.query}})}))}var Y=r(28141);var K=r(15923);let ee=class extends K.Z{constructor(...e){super(...e),this.requestOptions=null,this.url=null}normalizeCtorArgs(e,t){return"string"!=typeof e?e:{url:e,...t}}get parsedUrl(){return this._parseUrl(this.url)}_parseUrl(e){return(0,y.mN)(e)}_encode(e,t,r){const s={};for(const a in e){if("declaredClass"===a)continue;const n=e[a];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){s[a]=[];for(let e=0;e<n.length;e++)s[a][e]=this._encode(n[e])}else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(r&&r[a]);s[a]=t?e:JSON.stringify(e)}else s[a]=t?n:JSON.stringify(n);else s[a]=n}return s}};(0,s._)([(0,f.Cb)({readOnly:!0})],ee.prototype,"parsedUrl",null),(0,s._)([(0,f.Cb)()],ee.prototype,"requestOptions",void 0),(0,s._)([(0,f.Cb)({type:String})],ee.prototype,"url",void 0),ee=(0,s._)([(0,m.j)("esri.tasks.Task")],ee);const te=ee;let re=class extends te{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.format="json",this.gdbVersion=null,this.infoFor3D=null,this.sourceSpatialReference=null}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r={...this.requestOptions,...t},s=this._normalizeQuery(e),a=null!=e.outStatistics?.[0],n=(0,u.Z)("featurelayer-pbf-statistics"),o=!a||n;let i;if("pbf"===this.format&&o)try{i=await async function(e,t,r){const s=(0,w.en)(e),a={...r},n=D.Z.from(t),o=!n.quantizationParameters,{data:i}=await(0,j.executeQueryPBF)(s,n,new T({sourceSpatialReference:n.sourceSpatialReference,applyTransform:o}),a);return i}(this.url,s,r)}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.format="json"}return"json"!==this.format&&o||(i=await(0,I.F)(this.url,s,r)),this._normalizeFields(i.fields),i}async featureSetFromJSON(e,t,s){if(!this._queryIs3DObjectFormat(e)||(0,c.Wi)(this.infoFor3D)||!t.assetMaps||!t.features||!t.features.length)return Z.default.fromJSON(t);const{meshFeatureSetFromJSON:a}=await(0,h.Hl)(Promise.all([r.e(4547),r.e(6481),r.e(6459),r.e(1387)]).then(r.bind(r,31387)),s);return a(e,this.infoFor3D,t)}executeForCount(e,t){const r={...this.requestOptions,...t},s=this._normalizeQuery(e);return(0,$.P)(this.url,s,r)}executeForExtent(e,t){const r={...this.requestOptions,...t},s=this._normalizeQuery(e);return async function(e,t,r){const s=(0,w.en)(e);return(0,j.executeQueryForExtent)(s,D.Z.from(t),{...r}).then((e=>({count:e.data.count,extent:g.Z.fromJSON(e.data.extent)})))}(this.url,s,r)}executeForIds(e,t){const r={...this.requestOptions,...t},s=this._normalizeQuery(e);return(0,M.G)(this.url,s,r)}executeRelationshipQuery(e,t){e=z.Z.from(e);const r={...this.requestOptions,...t};return(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),async function(e,t,r){return t=z.Z.from(t),async function(e,t,r){const s=await Q(e,t,r),a=s.data,n=a.geometryType,o=a.spatialReference,i={};for(const e of a.relatedRecordGroups){const t={fields:void 0,objectIdFieldName:void 0,geometryType:n,spatialReference:o,hasZ:!!a.hasZ,hasM:!!a.hasM,features:e.relatedRecords};if(null!=e.objectId)i[e.objectId]=t;else for(const r in e)e.hasOwnProperty(r)&&"relatedRecords"!==r&&(i[e[r]]=t)}return{...s,data:i}}((0,w.en)(e),t,r).then((e=>{const t=e.data,r={};return Object.keys(t).forEach((e=>r[e]=Z.default.fromJSON(t[e]))),r}))}(this.url,e,r)}executeRelationshipQueryForCount(e,t){e=z.Z.from(e);const r={...this.requestOptions,...t};return(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),async function(e,t,r){return t=z.Z.from(t),async function(e,t,r){const s=await Q(e,t,r,{returnCountOnly:!0}),a=s.data,n={};for(const e of a.relatedRecordGroups)null!=e.objectId&&(n[e.objectId]=e.count);return{...s,data:n}}((0,w.en)(e),t,{...r}).then((e=>e.data))}(this.url,e,r)}executeAttachmentQuery(e,t){const r={...this.requestOptions,...t};return async function(e,t,r){const s=(0,w.en)(e);return function(e,t,r){let s={query:(0,G.A)({...e.query,f:"json",...J(t)})};return r&&(s={...r,...s,query:{...r.query,...s.query}}),(0,n.default)(e.path+"/queryAttachments",s)}(s,U.Z.from(t),{...r}).then((e=>k(e.data.attachmentGroups,s.path)))}(this.url,e,r)}executeTopFeaturesQuery(e,t){const r={...this.requestOptions,...t};return async function(e,t,r,s){const a=(0,w.en)(e),n={...s},{data:o}=await async function(e,t,r,s){const a=await H(e,t,"json",s);return(0,V.p)(t,r,a.data),a}(a,Y.Z.from(t),r,n);return Z.default.fromJSON(o)}(this.parsedUrl,e,this.sourceSpatialReference,r)}executeForTopIds(e,t){const r={...this.requestOptions,...t};return async function(e,t,r){const s=(0,w.en)(e);return(await async function(e,t,r){return(0,c.pC)(t.timeExtent)&&t.timeExtent.isEmpty?{data:{objectIds:[]}}:H(e,t,"json",r,{returnIdsOnly:!0})}(s,Y.Z.from(t),{...r})).data.objectIds}(this.parsedUrl,e,r)}executeForTopExtents(e,t){const r={...this.requestOptions,...t};return async function(e,t,r){const s=(0,w.en)(e),a=await async function(e,t,r){return(0,c.pC)(t.timeExtent)&&t.timeExtent.isEmpty?{data:{count:0,extent:null}}:H(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}).then((e=>{const t=e.data;if(t.hasOwnProperty("extent"))return e;if(t.features)throw new Error(W);if(t.hasOwnProperty("count"))throw new Error(W);return e}))}(s,Y.Z.from(t),{...r});return{count:a.data.count,extent:g.Z.fromJSON(a.data.extent)}}(this.parsedUrl,e,r)}executeForTopCount(e,t){const r={...this.requestOptions,...t};return async function(e,t,r){const s=(0,w.en)(e);return(await(a=s,n=Y.Z.from(t),o={...r},(0,c.pC)(n.timeExtent)&&n.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):H(a,n,"json",o,{returnIdsOnly:!0,returnCountOnly:!0}))).data.count;var a,n,o}(this.parsedUrl,e,r)}_normalizeQuery(e){let t=D.Z.from(e);if(t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?_.n.from(e.dynamicDataSource):this.dynamicDataSource),(0,c.pC)(this.infoFor3D)&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;for(const e of this.infoFor3D.queryFormats){if("3D_glb"===e.id){t.formatOf3DObjects=e.id;break}"3D_gltf"!==e.id||t.formatOf3DObjects||(t.formatOf3DObjects=e.id)}if(!t.formatOf3DObjects)throw new i.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if((0,c.Wi)(t.outFields)||!t.outFields.includes("*")){t=t===e?t.clone():t,(0,c.Wi)(t.outFields)&&(t.outFields=[]);const{originX:r,originY:s,originZ:a,translationX:n,translationY:o,translationZ:i,scaleX:u,scaleY:l,scaleZ:d,rotationX:p,rotationY:h,rotationZ:y,rotationDeg:f}=this.infoFor3D.transformFieldRoles;t.outFields.push(r,s,a,n,o,i,u,l,d,p,h,y,f)}}return t}_normalizeFields(e){if((0,c.pC)(this.fieldsIndex)&&(0,c.pC)(e))for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return(0,c.pC)(this.infoFor3D)&&e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,s._)([(0,f.Cb)({type:_.n})],re.prototype,"dynamicDataSource",void 0),(0,s._)([(0,f.Cb)()],re.prototype,"fieldsIndex",void 0),(0,s._)([(0,f.Cb)()],re.prototype,"format",void 0),(0,s._)([(0,f.Cb)()],re.prototype,"gdbVersion",void 0),(0,s._)([(0,f.Cb)()],re.prototype,"infoFor3D",void 0),(0,s._)([(0,f.Cb)()],re.prototype,"sourceSpatialReference",void 0),re=(0,s._)([(0,m.j)("esri.tasks.QueryTask")],re);const se=re;var ae=r(66677),ne=r(59431),oe=r(82971);const ie=new l.X({originalAndCurrentFeatures:"original-and-current-features",none:"none"});async function ue(e){return"string"==typeof e?(0,y.sJ)(e)||{data:e}:new Promise(((t,r)=>{const s=new FileReader;s.readAsDataURL(e),s.onload=()=>t((0,y.sJ)(s.result)),s.onerror=e=>r(e)}))}const le=new Set(["Feature Layer","Table"]),de=new l.X({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let ce=class extends d.Z{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,h.Ds)((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}))}load(e){const t=(0,c.pC)(e)?e.signal:null;return this.addResolvingPromise(this._fetchService(this.layer.sourceJSON,t)),Promise.resolve(this)}get queryTask(){const{capabilities:{query:{supportsFormatPBF:e}},parsedUrl:t,dynamicDataSource:r,infoFor3D:s,gdbVersion:a,spatialReference:n,fieldsIndex:o}=this.layer,i=(0,u.Z)("featurelayer-pbf")&&e&&(0,c.Wi)(s)?"pbf":"json";return new se({url:t.path,format:i,fieldsIndex:o,infoFor3D:s,dynamicDataSource:r,gdbVersion:a,sourceSpatialReference:n})}async addAttachment(e,t){await this.load();const r=e.attributes[this.layer.objectIdField],s=this.layer.parsedUrl.path+"/"+r+"/addAttachment",a=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(t,a.query);try{const e=await(0,n.default)(s,{body:o});return this._createFeatureEditResult(e.data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(r,e)}}async updateAttachment(e,t,r){await this.load();const s=e.attributes[this.layer.objectIdField],a=this.layer.parsedUrl.path+"/"+s+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:t}}),i=this._getFormDataForAttachment(r,o.query);try{const e=await(0,n.default)(a,{body:i});return this._createFeatureEditResult(e.data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}async applyEdits(e,t){await this.load();const r=this.layer.infoFor3D,s=(0,c.pC)(r),a=s||t?.globalIdUsed,o=e.addFeatures.map((e=>this._serializeFeature(e,r))),i=e.updateFeatures.map((e=>this._serializeFeature(e,r))),u=this._getFeatureIds(e.deleteFeatures,a);(0,ne.P)(o,i,this.layer.spatialReference);const l=[],d=[],p=[...e.deleteAttachments];for(const t of e.addAttachments)l.push(await this._serializeAttachment(t));for(const t of e.updateAttachments)d.push(await this._serializeAttachment(t));const h=l.length||d.length||p.length?{adds:l,updates:d,deletes:p}:null;let y,f=null;if(s){f=new Map;const t=[];for(const r of e.addAssets)t.push(this._serializeAssetMapEditAndUploadAssets(r,f));const r=await Promise.all(t);y=r.length?{adds:r,updates:[],deletes:[]}:void 0}const m={gdbVersion:t?.gdbVersion||this.layer.gdbVersion,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:a,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,sessionId:t?.sessionId};t?.returnServiceEditsOption?(m.edits=JSON.stringify([{id:this.layer.layerId,adds:o,updates:i,deletes:u,attachments:h,assetMaps:(0,c.Wg)(y)}]),m.returnServiceEditsOption=ie.toJSON(t?.returnServiceEditsOption),m.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(m.adds=o.length?JSON.stringify(o):null,m.updates=i.length?JSON.stringify(i):null,m.deletes=u.length?a?JSON.stringify(u):u.join(","):null,m.attachments=h&&JSON.stringify(h),m.assetMaps=(0,c.pC)(y)?JSON.stringify(y):void 0);const g=this._getLayerRequestOptions({method:"post",query:m}),b=t?.returnServiceEditsOption?this.layer.url:this.layer.parsedUrl.path,F=await(0,n.default)(b+"/applyEdits",g);if(s&&null!=F.data&&null!=F.data.assetMaps){const e=F.data,t=this.layer.objectIdField,r=[];for(const t of e.addResults)t.success&&r.push(t.objectId);for(const t of e.updateResults)t.success&&r.push(t.objectId);const s=this._createRequestQueryOptions(),a=await(0,n.default)(b+"/query",{...s,query:{f:"json",formatOf3DObjects:"3D_glb",where:`OBJECTID IN (${r.join(",")})`,outFields:`${t}`}});if(a&&a.data&&a.data.assetMaps&&(0,c.pC)(f)){const e=a.data.assetMaps;for(const t of e){const e=f.get(t.parentGlobalId).geometry;(0,c.pC)(e)&&"mesh"===e.type&&e.updateExternalSource({source:t.assetURL,extent:e.extent})}}}return this._createEditsResult(F)}async deleteAttachments(e,t){await this.load();const r=e.attributes[this.layer.objectIdField],s=this.layer.parsedUrl.path+"/"+r+"/deleteAttachments";try{return(await(0,n.default)(s,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(this._createFeatureEditResult)}catch(e){throw this._createAttachmentErrorResult(r,e)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:a}=await(0,n.default)(`${s}/${r}`,t),{id:i,extent:u,fullExtent:l,timeExtent:d}=a,c=u||l;return{id:i,fullExtent:c&&g.Z.fromJSON(c),timeExtent:d&&o.Z.fromJSON({start:d[0],end:d[1]})}}))}async queryAttachments(e,t={}){const{parsedUrl:r}=this.layer,s=r.path;await this.load();const a=this._getLayerRequestOptions(t);if(!this.layer.get("capabilities.operations.supportsQueryAttachments")){const{objectIds:t}=e,r=[];for(const e of t){const t=s+"/"+e+"/attachments";r.push((0,n.default)(t,a))}return Promise.all(r).then((e=>t.map(((t,r)=>({parentObjectId:t,attachmentInfos:e[r].data.attachmentInfos}))))).then((e=>k(e,s)))}return this.queryTask.executeAttachmentQuery(e,a)}async queryFeatures(e,t){return await this.load(),this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,ae.M8)(this.layer.url))return"unavailable";const e=(0,y.v_)(this.layer.url,"status"),t=await(0,n.default)(e,{query:{f:"json"}});return de.fromJSON(t.data.status)}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const{data:r}=await(0,n.default)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:(0,u.Z)("featurelayer-advanced-symbols")?{returnAdvancedSymbols:!0}:{},signal:t}));e=r}this.sourceJSON=this._patchServiceJSON(e);const r=e.type;if(!le.has(r))throw new i.Z("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}_patchServiceJSON(e){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=(0,R.bU)(e.geometryType).renderer;(0,p.RB)("drawingInfo.renderer",t,e)}return"esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),e}_serializeFeature(e,t){const{geometry:r,attributes:s}=e;if((0,c.pC)(t)&&(0,c.pC)(e.geometry)&&"mesh"===e.geometry.type){const r={...s},a=e.geometry,n=a.origin,o=a.transform;if(r[t.transformFieldRoles.originX]=n.x,r[t.transformFieldRoles.originY]=n.y,r[t.transformFieldRoles.originZ]=n.z,(0,c.pC)(o)){const e=o.translation,s=o.scale,a=o.rotation;r[t.transformFieldRoles.translationX]=e[0],r[t.transformFieldRoles.translationY]=e[1],r[t.transformFieldRoles.translationZ]=e[2],r[t.transformFieldRoles.scaleX]=s[0],r[t.transformFieldRoles.scaleY]=s[1],r[t.transformFieldRoles.scaleZ]=s[2],r[t.transformFieldRoles.rotationX]=a[0],r[t.transformFieldRoles.rotationY]=a[1],r[t.transformFieldRoles.rotationZ]=a[2],r[t.transformFieldRoles.rotationDeg]=a[3]}return{geometry:null,attributes:r}}return(0,c.Wi)(r)?{attributes:s}:"mesh"===r.type||"extent"===r.type?null:{geometry:r.toJSON(),attributes:s}}async _serializeAttachment(e){const{feature:t,attachment:r}=e,{globalId:s,name:a,contentType:n,data:o,uploadId:i}=r,u={globalId:s,parentGlobalId:null,contentType:null,name:null,uploadId:null,data:null};if(t&&(u.parentGlobalId="attributes"in t?t.attributes&&t.attributes[this.layer.globalIdField]:t.globalId),i)u.uploadId=i;else if(o){const e=await ue(o);u.contentType=e.mediaType,u.data=e.data,o instanceof File&&(u.name=o.name)}return a&&(u.name=a),n&&(u.contentType=n),u}async _serializeAssetMapEditAndUploadAssets(e,t){const r=this.layer.url;let s=null;try{const t=new Blob([e.data],{type:e.mimeType}),a=new FormData;a.append("f","json"),a.append("file",t,`${e.assetName}`);const o={body:a,method:"post",responseType:"json"},{data:u}=await(0,n.default)(`${r}/uploads/upload`,o);if(!u.success)throw new i.Z("feature-layer-source:upload-failure","Expected upload to be successfull.");s={assetType:e.assetType,assetUploadId:u.item.itemID}}catch(e){s=null}if((0,c.Wi)(s)){const t=await ue(new Blob([e.data]));if(!t.isBase64)throw new i.Z("feature-layer-source:uploadAssets-failure","Expected gltf data in base64 format after conversion.");s={assetType:e.assetType,assetData:t.data}}if((0,c.Wi)(s))throw new i.Z("feature-layer-source:uploadAssets-failure","Unable to prepare uploadAsset request options.");const a={method:"post",query:{f:"json",assets:JSON.stringify([s])},responseType:"json"},o=await(0,n.default)((0,y.v_)(this.layer.parsedUrl.path,"uploadAssets"),a);if(1!==o.data.uploadResults.length||!o.data.uploadResults[0].success)throw new i.Z("feature-layer-source:uploadAssets-failure","Bad response.");const u=o.data.uploadResults[0].assetHash,l=[];e.flags&F.AssetMapEditFlags.PROJECT_VERTICES&&l.push("PROJECT_VERTICES");const d={globalId:e.assetMapGlobalId,parentGlobalId:e.featureGlobalId,assetName:e.assetName,assetHash:u,flags:l};return t.set(e.featureGlobalId,e.feature),d}_getFeatureIds(e,t){const r=e[0];return r?this._canUseGlobalIds(t,e)?this._getGlobalIdsFromFeatureIdentifier(e):"objectId"in r?this._getObjectIdsFromFeatureIdentifier(e):this._getIdsFromFeatures(e):[]}_getIdsFromFeatures(e){const t=this.layer.objectIdField;return e.map((e=>e.attributes&&e.attributes[t]))}_canUseGlobalIds(e,t){return e&&"globalId"in t[0]}_getObjectIdsFromFeatureIdentifier(e){return e.map((e=>e.objectId))}_getGlobalIdsFromFeatureIdentifier(e){return e.map((e=>e.globalId))}_createEditsResult(e){const t=e.data,{layerId:r}=this.layer,s=[];let a=null;if(Array.isArray(t))for(const e of t)s.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(a={addResults:e.addResults,updateResults:e.updateResults,deleteResults:e.deleteResults,attachments:e.attachments,editMoment:e.editMoment});else a=t;const n=a?.attachments,o={addFeatureResults:a.addResults?a.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:a.updateResults?a.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:a.deleteResults?a.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:n&&n.addResults?n.addResults.map(this._createFeatureEditResult,this):[],updateAttachmentResults:n&&n.updateResults?n.updateResults.map(this._createFeatureEditResult,this):[],deleteAttachmentResults:n&&n.deleteResults?n.deleteResults.map(this._createFeatureEditResult,this):[]};if(a.editMoment&&(o.editMoment=a.editMoment),s.length>0){o.editedFeatureResults=[];for(const e of s){const{adds:t,updates:r,deletes:s,spatialReference:a}=e.editedFeatures,n=a?new oe.Z(a):null;o.editedFeatureResults.push({layerId:e.id,editedFeatures:{adds:t?.map((e=>this._createEditedFeature(e,n)))||[],updates:r?.map((e=>({original:this._createEditedFeature(e[0],n),current:this._createEditedFeature(e[1],n)})))||[],deletes:s?.map((e=>this._createEditedFeature(e,n)))||[],spatialReference:n}})}}return o}_createEditedFeature(e,t){return new a.Z({attributes:e.attributes,geometry:(0,b.im)({...e.geometry,spatialReference:t})})}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new i.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_createAttachmentErrorResult(e,t){const r=t.details.messages&&t.details.messages[0]||t.message,s=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new i.Z("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(e,t){const r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(const e in t){const s=t[e];null!=s&&(r.set?r.set(e,s):r.append(e,s))}return r}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:r,dynamicDataSource:s}=this.layer;return{...e,query:{gdbVersion:r,layer:s?JSON.stringify({source:s}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}};(0,s._)([(0,f.Cb)()],ce.prototype,"type",void 0),(0,s._)([(0,f.Cb)({constructOnly:!0})],ce.prototype,"layer",void 0),(0,s._)([(0,f.Cb)({readOnly:!0})],ce.prototype,"queryTask",null),ce=(0,s._)([(0,m.j)("esri.layers.graphics.sources.FeatureLayerSource")],ce);const pe=ce},25278:(e,t,r)=>{r.d(t,{Dm:()=>d,Hq:()=>c,MS:()=>p,bU:()=>i});var s=r(80442),a=r(22974),n=r(61159),o=r(58333);function i(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.I4:"esriGeometryPolyline"===e?o.ET:o.lF}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function d(e,t){if((0,s.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${u.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,a.d9)(e)}}]}function p(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:n.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1}}}},41818:(e,t,r)=>{r.d(t,{P:()=>o});var s=r(11282),a=r(34599),n=r(57444);async function o(e,t,r){const o=(0,s.en)(e);return(0,a.executeQueryForCount)(o,n.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>o});var s=r(11282),a=r(34599),n=r(57444);async function o(e,t,r){const o=(0,s.en)(e);return(0,a.executeQueryForIds)(o,n.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{F:()=>u,e:()=>i});var s=r(11282),a=r(34599),n=r(74889),o=r(57444);async function i(e,t,r){const s=await u(e,t,r);return n.default.fromJSON(s)}async function u(e,t,r){const n=(0,s.en)(e),i={...r},u=o.Z.from(t),{data:l}=await(0,a.executeQuery)(n,u,u.sourceSpatialReference,i);return l}},98326:(e,t,r)=>{r.d(t,{Z:()=>c});var s,a=r(43697),n=r(96674),o=r(5600),i=(r(67676),r(75215)),u=r(52011);const l={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let d=s=class extends n.wq{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:r,tagName:s}=e;if(!t||!r||!s)return null;const a=t.find((e=>e.name===r));return a?function(e){const{tagName:t,tags:r}=e;if(!r||!t)return null;const s=r.find((e=>e.name===t));return s&&s.value||null}({tagName:s,tags:a.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return l[t]||null}clone(){return new s({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,a._)([(0,o.Cb)({type:String})],d.prototype,"contentType",void 0),(0,a._)([(0,o.Cb)()],d.prototype,"exifInfo",void 0),(0,a._)([(0,o.Cb)({readOnly:!0})],d.prototype,"orientationInfo",null),(0,a._)([(0,o.Cb)({type:i.z8})],d.prototype,"id",void 0),(0,a._)([(0,o.Cb)({type:String})],d.prototype,"globalId",void 0),(0,a._)([(0,o.Cb)({type:String})],d.prototype,"keywords",void 0),(0,a._)([(0,o.Cb)({type:String})],d.prototype,"name",void 0),(0,a._)([(0,o.Cb)({json:{read:!1}})],d.prototype,"parentGlobalId",void 0),(0,a._)([(0,o.Cb)({json:{read:!1}})],d.prototype,"parentObjectId",void 0),(0,a._)([(0,o.Cb)({type:i.z8})],d.prototype,"size",void 0),(0,a._)([(0,o.Cb)({json:{read:!1}})],d.prototype,"url",void 0),d=s=(0,a._)([(0,u.j)("esri.layers.support.AttachmentInfo")],d);const c=d},11282:(e,t,r)=>{r.d(t,{cv:()=>i,en:()=>o,lA:()=>n});var s=r(22974),a=r(17452);function n(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,a.mN)(e):(0,s.d9)(e)}function i(e,t,r){const s={};for(const a in e){if("declaredClass"===a)continue;const n=e[a];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){s[a]=[];for(let e=0;e<n.length;e++)s[a][e]=i(n[e])}else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(r&&r[a]);s[a]=t?e:JSON.stringify(e)}else s[a]=t?n:JSON.stringify(n);else s[a]=n}return s}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8899],{41123:(e,t,r)=>{r.d(t,{D:()=>a});const s="randomUUID"in crypto;function a(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}},61159:(e,t,r)=>{r.d(t,{g:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},87269:(e,t,r)=>{r.r(t),r.d(t,{AssetMapEditFlags:()=>a,applyEdits:()=>f});var s,a,n,o=r(38171),i=r(46791),u=r(20102),d=r(22974),l=r(70586),c=r(17452),p=r(41123),h=r(51806),y=r(66361);async function f(e,t,r,a={}){let n,o;const c={edits:r,result:new Promise(((e,t)=>{n=e,o=t}))};e.emit("apply-edits",c);try{const{results:o,edits:c}=await async function(e,t,r,a){if(await e.load(),!function(e){return e&&null!=e.applyEdits}(t))throw new u.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!e.editingEnabled)throw new u.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:n,options:o}=await async function(e,t,r){const a=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),n=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),o=(0,l.pC)(e.infoFor3D);if(!t||!a&&!n)throw new u.Z(`${e.type}-layer:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!e.capabilities.data.isVersioned&&r&&r.gdbVersion)throw new u.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!e.capabilities.editing.supportsRollbackOnFailure&&r&&r.rollbackOnFailureEnabled)throw new u.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");if(!e.capabilities.editing.supportsGlobalId&&r&&r.globalIdUsed)throw new u.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!e.capabilities.editing.supportsGlobalId&&n)throw new u.Z(`${e.type}-layer:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if((!r||!r.globalIdUsed)&&n)throw new u.Z(`${e.type}-layer:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true");const d={...r};if(null!=d.rollbackOnFailureEnabled||e.capabilities.editing.supportsRollbackOnFailure||(d.rollbackOnFailureEnabled=!0),!1===d.rollbackOnFailureEnabled&&"original-and-current-features"===d.returnServiceEditsOption)throw new u.Z(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true.");if(!e.capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference&&d.returnServiceEditsInSourceSR)throw new u.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(d.returnServiceEditsInSourceSR&&"original-and-current-features"!==d.returnServiceEditsOption)throw new u.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsOption' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const c={...t};if(c.addFeatures=t&&i.Z.isCollection(t.addFeatures)?t.addFeatures.toArray():c.addFeatures||[],c.updateFeatures=t&&i.Z.isCollection(t.updateFeatures)?t.updateFeatures.toArray():c.updateFeatures||[],c.deleteFeatures=t&&i.Z.isCollection(t.deleteFeatures)?t.deleteFeatures.toArray():c.deleteFeatures||[],c.addFeatures.length&&!e.capabilities.operations.supportsAdd)throw new u.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support adding features.");if(c.updateFeatures.length&&!e.capabilities.operations.supportsUpdate)throw new u.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support updating features.");if(c.deleteFeatures.length&&!e.capabilities.operations.supportsDelete)throw new u.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support deleting features.");c.addAttachments=c.addAttachments||[],c.updateAttachments=c.updateAttachments||[],c.deleteAttachments=c.deleteAttachments||[],c.addFeatures=c.addFeatures.map(F),c.updateFeatures=c.updateFeatures.map(F),c.addAssets=[];const p=r&&r.globalIdUsed||o;return c.addFeatures.forEach((t=>function(e,t,r){m(e,t,r)}(t,e,p))),c.updateFeatures.forEach((t=>function(e,t,r){if(m(e,t,r),"geometry"in e&&(0,l.pC)(e.geometry)&&!t.capabilities.editing.supportsGeometryUpdate)throw new u.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,p))),c.deleteFeatures.forEach((t=>function(e,t,r){m(e,t,r)}(t,e,p))),c.addAttachments.forEach((t=>g(t,e))),c.updateAttachments.forEach((t=>g(t,e))),o&&await async function(e,t){if((0,l.Wi)(t.infoFor3D))return;const{infoFor3D:r}=t;let a=!1;for(const{id:e}of r.editFormats)if(e===s.GLTF_BINARY){a=!0;break}const n=[];for(const r of e.addFeatures)n.push(R(r,e,t,a));for(const r of e.updateFeatures)n.push(R(r,e,t,a));const o=await Promise.allSettled(n);for(const e of o)if("rejected"===e.status)throw e.reason}(c,e),{edits:await b(c),options:d}}(e,r,a);return n.addFeatures.length||n.updateFeatures.length||n.deleteFeatures.length||n.addAttachments.length||n.updateAttachments.length||n.deleteAttachments.length?{edits:n,results:await t.applyEdits(n,o)}:{edits:n,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,a),p=e=>e.filter((e=>!e.error)).map(d.d9),h={edits:c,addedFeatures:p(o.addFeatureResults),updatedFeatures:p(o.updateFeatureResults),deletedFeatures:p(o.deleteFeatureResults),addedAttachments:p(o.addAttachmentResults),updatedAttachments:p(o.updateAttachmentResults),deletedAttachments:p(o.deleteAttachmentResults)};return o.editedFeatureResults?.length&&(h.editedFeatures=o.editedFeatureResults),(h.addedFeatures.length||h.updatedFeatures.length||h.deletedFeatures.length||h.addedAttachments.length||h.updatedAttachments.length||h.deletedAttachments.length)&&(e.emit("edits",h),(0,y.lQ)(e)&&y.dU.emit("edits",{layer:e,event:h})),n(h),o}catch(e){throw o(e),e}}function m(e,t,r){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new u.Z(`${t.type}-layer:invalid-parameter`,"Feature should have 'globalId' when 'globalIdUsed' is true");if(!("attributes"in e)&&!e.globalId)throw new u.Z(`${t.type}-layer:invalid-parameter`,"'globalId' of the feature should be passed when 'globalIdUsed' is true")}if("geometry"in e&&(0,l.pC)(e.geometry)){if(e.geometry.hasZ&&!1===t.capabilities.data.supportsZ)throw new u.Z(`${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 u.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function g(e,t){const{feature:r,attachment:s}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new u.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new u.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!s.globalId)throw new u.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!s.data&&!s.uploadId)throw new u.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(s.data instanceof File&&s.data.name||s.name))throw new u.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities.editing.supportsUploadWithItemId&&s.uploadId)throw new u.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof s.data){const e=(0,c.sJ)(s.data);if(e&&!e.isBase64)throw new u.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function b(e){const t=e.addFeatures,r=e.updateFeatures,s=t.concat(r).map((e=>e.geometry)),a=await(0,h.aX)(s),n=t.length,o=r.length;return a.slice(0,n).forEach(((t,r)=>e.addFeatures[r].geometry=t)),a.slice(n,n+o).forEach(((t,r)=>e.updateFeatures[r].geometry=t)),e}function F(e){const t=new o.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}async function R(e,t,r,a){if((0,l.Wi)(e.geometry)||"mesh"!==e.geometry.type)return;const n=e.geometry,o=r.globalIdField;if((0,l.pC)(r.parsedUrl)&&(0,l.pC)(n.external)&&"string"==typeof n.external.source&&n.external.source.startsWith(r.parsedUrl.path))return;if(!a)throw new u.Z(`${r.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");const i=await n.toBinaryGLTF(),d=await i.buffer(),c=`{${(0,p.D)()}}`,h=`${c}.glb`;t.addAssets.push({featureGlobalId:e.getAttribute(o),assetMapGlobalId:c,assetName:h,flags:0,data:d.data,mimeType:d.type,assetType:s.GLTF_BINARY,feature:e})}!function(e){e.GLTF_BINARY="3D_glb",e.GLTF_JSON="3D_gltf"}(s||(s={})),(n=a||(a={}))[n.PROJECT_VERTICES=1]="PROJECT_VERTICES"},38899:(e,t,r)=>{r.r(t),r.d(t,{default:()=>pe});var s=r(43697),a=(r(66577),r(38171)),n=r(3172),o=r(92835),i=r(20102),u=r(80442),d=r(35454),l=r(83379),c=r(70586),p=r(78286),h=r(95330),y=r(17452),f=r(5600),m=(r(67676),r(75215),r(52011)),g=r(6570),b=r(33955),F=r(87269),R=r(25278),_=r(10158),I=r(4967),w=r(11282),S=r(69285),O=r(98732);function v(e,t){return t}function C(e,t,r,s){switch(r){case 0:return x(e,t+s,0);case 1:return"lowerLeft"===e.originPosition?x(e,t+s,1):function({translate:e,scale:t},r,s){return e[s]-r*t[s]}(e,t+s,1)}}function A(e,t,r,s){return 2===r?x(e,t,2):C(e,t,r,s)}function q(e,t,r,s){return 2===r?x(e,t,3):C(e,t,r,s)}function E(e,t,r,s){return 3===r?x(e,t,3):A(e,t,r,s)}function x({translate:e,scale:t},r,s){return e[s]+r*t[s]}class T{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=v,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,S.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(!(0,c.Wi)(t))for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){const r=e.fields;(0,c.O3)(r),r.push(t);const s=r.map((e=>e.name));this._attributesConstructor=function(){for(const e of s)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:s}=t,a=(0,O.$g)(r.clone(),r,!1,!1,this._transform),n=(0,O.di)(a,s,!1,!1);e.queryGeometryType=s,e.queryGeometry={...n}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const s=(0,c.s3)(this._transform,"transform");switch(t=this._applyTransform(s,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const s=(0,c.s3)(this._transform,"transform");return this._applyTransform(s,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const s=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(s)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(t,r),a=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),a.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=s}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?E:t?A:r?q:C}}var j=r(34599),Z=r(74889),D=r(57444);var G=r(40330),N=r(76497),P=r(98326);function k(e){const t=e.toJSON();return t.attachmentTypes&&(t.attachmentTypes=t.attachmentTypes.join(",")),t.keywords&&(t.keywords=t.keywords.join(",")),t.globalIds&&(t.globalIds=t.globalIds.join(",")),t.objectIds&&(t.objectIds=t.objectIds.join(",")),t.size&&(t.size=t.size.join(",")),t}function J(e,t){const r={};for(const s of e){const{parentObjectId:e,parentGlobalId:a,attachmentInfos:n}=s;for(const s of n){const{id:n}=s,o=(0,y.qg)((0,G.Dp)(`${t}/${e}/attachments/${n}`)),i=P.Z.fromJSON(s);i.set({url:o,parentObjectId:e,parentGlobalId:a}),r[e]?r[e].push(i):r[e]=[i]}}return r}var U=r(56545);var $=r(41818),M=r(5396);function B(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.outSpatialReference&&(r.outSR=r.outSR.wkid||JSON.stringify(r.outSR.toJSON()),delete r.outSpatialReference),r.dynamicDataSource&&(r.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r}async function Q(e,t,r={},s){const a=(0,N.A)({...e.query,f:"json",...s,...B(t,s)});return(0,n.default)(e.path+"/queryRelatedRecords",{...r,query:{...r.query,...a}})}var z=r(75935);var L=r(51806),V=r(28694);const W="Layer does not support extent calculation.";function X(e,t){const r=e.geometry,s=e.toJSON(),a=s;if((0,c.pC)(r)&&(a.geometry=JSON.stringify(r),a.geometryType=(0,b.Ji)(r),a.inSR=r.spatialReference.wkid||JSON.stringify(r.spatialReference)),s.topFilter?.groupByFields&&(a.topFilter.groupByFields=s.topFilter.groupByFields.join(",")),s.topFilter?.orderByFields&&(a.topFilter.orderByFields=s.topFilter.orderByFields.join(",")),s.topFilter&&(a.topFilter=JSON.stringify(a.topFilter)),s.objectIds&&(a.objectIds=s.objectIds.join(",")),s.orderByFields&&(a.orderByFields=s.orderByFields.join(",")),s.outFields&&!(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?s.outFields.includes("*")?a.outFields="*":a.outFields=s.outFields.join(","):delete a.outFields,s.outSR?a.outSR=s.outSR.wkid||JSON.stringify(s.outSR):r&&s.returnGeometry&&(a.outSR=a.inSR),s.returnGeometry&&delete s.returnGeometry,s.timeExtent){const e=s.timeExtent,{start:t,end:r}=e;null==t&&null==r||(a.time=t===r?t:`${t??"null"},${r??"null"}`),delete s.timeExtent}return a}function H(e,t,r,s={},a={}){const o="string"==typeof e?(0,y.mN)(e):e,i=t.geometry?[t.geometry]:[];return s.responseType="pbf"===r?"array-buffer":"json",(0,L.aX)(i,null,s).then((e=>{const i=e&&e[0];(0,c.pC)(i)&&((t=t.clone()).geometry=i);const u=(0,N.A)({...o.query,f:r,...a,...X(t,a)});return(0,n.default)((0,y.v_)(o.path,"queryTopFeatures"),{...s,query:{...u,...s.query}})}))}var Y=r(28141);var K=r(15923);let ee=class extends K.Z{constructor(...e){super(...e),this.requestOptions=null,this.url=null}normalizeCtorArgs(e,t){return"string"!=typeof e?e:{url:e,...t}}get parsedUrl(){return this._parseUrl(this.url)}_parseUrl(e){return(0,y.mN)(e)}_encode(e,t,r){const s={};for(const a in e){if("declaredClass"===a)continue;const n=e[a];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){s[a]=[];for(let e=0;e<n.length;e++)s[a][e]=this._encode(n[e])}else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(r&&r[a]);s[a]=t?e:JSON.stringify(e)}else s[a]=t?n:JSON.stringify(n);else s[a]=n}return s}};(0,s._)([(0,f.Cb)({readOnly:!0})],ee.prototype,"parsedUrl",null),(0,s._)([(0,f.Cb)()],ee.prototype,"requestOptions",void 0),(0,s._)([(0,f.Cb)({type:String})],ee.prototype,"url",void 0),ee=(0,s._)([(0,m.j)("esri.tasks.Task")],ee);const te=ee;let re=class extends te{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.format="json",this.gdbVersion=null,this.infoFor3D=null,this.sourceSpatialReference=null}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r={...this.requestOptions,...t},s=this._normalizeQuery(e),a=null!=e.outStatistics?.[0],n=(0,u.Z)("featurelayer-pbf-statistics"),o=!a||n;let i;if("pbf"===this.format&&o)try{i=await async function(e,t,r){const s=(0,w.en)(e),a={...r},n=D.Z.from(t),o=!n.quantizationParameters,{data:i}=await(0,j.executeQueryPBF)(s,n,new T({sourceSpatialReference:n.sourceSpatialReference,applyTransform:o}),a);return i}(this.url,s,r)}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.format="json"}return"json"!==this.format&&o||(i=await(0,I.F)(this.url,s,r)),this._normalizeFields(i.fields),i}async featureSetFromJSON(e,t,s){if(!this._queryIs3DObjectFormat(e)||(0,c.Wi)(this.infoFor3D)||!t.assetMaps||!t.features||!t.features.length)return Z.default.fromJSON(t);const{meshFeatureSetFromJSON:a}=await(0,h.Hl)(Promise.all([r.e(4547),r.e(6481),r.e(6459),r.e(1387)]).then(r.bind(r,31387)),s);return a(e,this.infoFor3D,t)}executeForCount(e,t){const r={...this.requestOptions,...t},s=this._normalizeQuery(e);return(0,$.P)(this.url,s,r)}executeForExtent(e,t){const r={...this.requestOptions,...t},s=this._normalizeQuery(e);return async function(e,t,r){const s=(0,w.en)(e);return(0,j.executeQueryForExtent)(s,D.Z.from(t),{...r}).then((e=>({count:e.data.count,extent:g.Z.fromJSON(e.data.extent)})))}(this.url,s,r)}executeForIds(e,t){const r={...this.requestOptions,...t},s=this._normalizeQuery(e);return(0,M.G)(this.url,s,r)}executeRelationshipQuery(e,t){e=z.Z.from(e);const r={...this.requestOptions,...t};return(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),async function(e,t,r){return t=z.Z.from(t),async function(e,t,r){const s=await Q(e,t,r),a=s.data,n=a.geometryType,o=a.spatialReference,i={};for(const e of a.relatedRecordGroups){const t={fields:void 0,objectIdFieldName:void 0,geometryType:n,spatialReference:o,hasZ:!!a.hasZ,hasM:!!a.hasM,features:e.relatedRecords};if(null!=e.objectId)i[e.objectId]=t;else for(const r in e)e.hasOwnProperty(r)&&"relatedRecords"!==r&&(i[e[r]]=t)}return{...s,data:i}}((0,w.en)(e),t,r).then((e=>{const t=e.data,r={};return Object.keys(t).forEach((e=>r[e]=Z.default.fromJSON(t[e]))),r}))}(this.url,e,r)}executeRelationshipQueryForCount(e,t){e=z.Z.from(e);const r={...this.requestOptions,...t};return(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),async function(e,t,r){return t=z.Z.from(t),async function(e,t,r){const s=await Q(e,t,r,{returnCountOnly:!0}),a=s.data,n={};for(const e of a.relatedRecordGroups)null!=e.objectId&&(n[e.objectId]=e.count);return{...s,data:n}}((0,w.en)(e),t,{...r}).then((e=>e.data))}(this.url,e,r)}executeAttachmentQuery(e,t){const r={...this.requestOptions,...t};return async function(e,t,r){const s=(0,w.en)(e);return function(e,t,r){let s={query:(0,N.A)({...e.query,f:"json",...k(t)})};return r&&(s={...r,...s,query:{...r.query,...s.query}}),(0,n.default)(e.path+"/queryAttachments",s)}(s,U.Z.from(t),{...r}).then((e=>J(e.data.attachmentGroups,s.path)))}(this.url,e,r)}executeTopFeaturesQuery(e,t){const r={...this.requestOptions,...t};return async function(e,t,r,s){const a=(0,w.en)(e),n={...s},{data:o}=await async function(e,t,r,s){const a=await H(e,t,"json",s);return(0,V.p)(t,r,a.data),a}(a,Y.Z.from(t),r,n);return Z.default.fromJSON(o)}(this.parsedUrl,e,this.sourceSpatialReference,r)}executeForTopIds(e,t){const r={...this.requestOptions,...t};return async function(e,t,r){const s=(0,w.en)(e);return(await async function(e,t,r){return(0,c.pC)(t.timeExtent)&&t.timeExtent.isEmpty?{data:{objectIds:[]}}:H(e,t,"json",r,{returnIdsOnly:!0})}(s,Y.Z.from(t),{...r})).data.objectIds}(this.parsedUrl,e,r)}executeForTopExtents(e,t){const r={...this.requestOptions,...t};return async function(e,t,r){const s=(0,w.en)(e),a=await async function(e,t,r){return(0,c.pC)(t.timeExtent)&&t.timeExtent.isEmpty?{data:{count:0,extent:null}}:H(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}).then((e=>{const t=e.data;if(t.hasOwnProperty("extent"))return e;if(t.features)throw new Error(W);if(t.hasOwnProperty("count"))throw new Error(W);return e}))}(s,Y.Z.from(t),{...r});return{count:a.data.count,extent:g.Z.fromJSON(a.data.extent)}}(this.parsedUrl,e,r)}executeForTopCount(e,t){const r={...this.requestOptions,...t};return async function(e,t,r){const s=(0,w.en)(e);return(await(a=s,n=Y.Z.from(t),o={...r},(0,c.pC)(n.timeExtent)&&n.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):H(a,n,"json",o,{returnIdsOnly:!0,returnCountOnly:!0}))).data.count;var a,n,o}(this.parsedUrl,e,r)}_normalizeQuery(e){let t=D.Z.from(e);if(t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?_.n.from(e.dynamicDataSource):this.dynamicDataSource),(0,c.pC)(this.infoFor3D)&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;for(const e of this.infoFor3D.queryFormats){if("3D_glb"===e.id){t.formatOf3DObjects=e.id;break}"3D_gltf"!==e.id||t.formatOf3DObjects||(t.formatOf3DObjects=e.id)}if(!t.formatOf3DObjects)throw new i.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if((0,c.Wi)(t.outFields)||!t.outFields.includes("*")){t=t===e?t.clone():t,(0,c.Wi)(t.outFields)&&(t.outFields=[]);const{originX:r,originY:s,originZ:a,translationX:n,translationY:o,translationZ:i,scaleX:u,scaleY:d,scaleZ:l,rotationX:p,rotationY:h,rotationZ:y,rotationDeg:f}=this.infoFor3D.transformFieldRoles;t.outFields.push(r,s,a,n,o,i,u,d,l,p,h,y,f)}}return t}_normalizeFields(e){if((0,c.pC)(this.fieldsIndex)&&(0,c.pC)(e))for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return(0,c.pC)(this.infoFor3D)&&e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,s._)([(0,f.Cb)({type:_.n})],re.prototype,"dynamicDataSource",void 0),(0,s._)([(0,f.Cb)()],re.prototype,"fieldsIndex",void 0),(0,s._)([(0,f.Cb)()],re.prototype,"format",void 0),(0,s._)([(0,f.Cb)()],re.prototype,"gdbVersion",void 0),(0,s._)([(0,f.Cb)()],re.prototype,"infoFor3D",void 0),(0,s._)([(0,f.Cb)()],re.prototype,"sourceSpatialReference",void 0),re=(0,s._)([(0,m.j)("esri.tasks.QueryTask")],re);const se=re;var ae=r(66677),ne=r(59431),oe=r(82971);const ie=new d.X({originalAndCurrentFeatures:"original-and-current-features",none:"none"});async function ue(e){return"string"==typeof e?(0,y.sJ)(e)||{data:e}:new Promise(((t,r)=>{const s=new FileReader;s.readAsDataURL(e),s.onload=()=>t((0,y.sJ)(s.result)),s.onerror=e=>r(e)}))}const de=new Set(["Feature Layer","Table"]),le=new d.X({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let ce=class extends l.Z{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,h.Ds)((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}))}load(e){const t=(0,c.pC)(e)?e.signal:null;return this.addResolvingPromise(this._fetchService(this.layer.sourceJSON,t)),Promise.resolve(this)}get queryTask(){const{capabilities:{query:{supportsFormatPBF:e}},parsedUrl:t,dynamicDataSource:r,infoFor3D:s,gdbVersion:a,spatialReference:n,fieldsIndex:o}=this.layer,i=(0,u.Z)("featurelayer-pbf")&&e&&(0,c.Wi)(s)?"pbf":"json";return new se({url:t.path,format:i,fieldsIndex:o,infoFor3D:s,dynamicDataSource:r,gdbVersion:a,sourceSpatialReference:n})}async addAttachment(e,t){await this.load();const r=e.attributes[this.layer.objectIdField],s=this.layer.parsedUrl.path+"/"+r+"/addAttachment",a=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(t,a.query);try{const e=await(0,n.default)(s,{body:o});return this._createFeatureEditResult(e.data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(r,e)}}async updateAttachment(e,t,r){await this.load();const s=e.attributes[this.layer.objectIdField],a=this.layer.parsedUrl.path+"/"+s+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:t}}),i=this._getFormDataForAttachment(r,o.query);try{const e=await(0,n.default)(a,{body:i});return this._createFeatureEditResult(e.data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}async applyEdits(e,t){await this.load();const r=this.layer.infoFor3D,s=(0,c.pC)(r),a=s||t?.globalIdUsed,o=e.addFeatures.map((e=>this._serializeFeature(e,r))),i=e.updateFeatures.map((e=>this._serializeFeature(e,r))),u=this._getFeatureIds(e.deleteFeatures,a);(0,ne.P)(o,i,this.layer.spatialReference);const d=[],l=[],p=[...e.deleteAttachments];for(const t of e.addAttachments)d.push(await this._serializeAttachment(t));for(const t of e.updateAttachments)l.push(await this._serializeAttachment(t));const h=d.length||l.length||p.length?{adds:d,updates:l,deletes:p}:null;let y,f=null;if(s){f=new Map;const t=[];for(const r of e.addAssets)t.push(this._serializeAssetMapEditAndUploadAssets(r,f));const r=await Promise.all(t);y=r.length?{adds:r,updates:[],deletes:[]}:void 0}const m={gdbVersion:t?.gdbVersion||this.layer.gdbVersion,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:a,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,sessionId:t?.sessionId};t?.returnServiceEditsOption?(m.edits=JSON.stringify([{id:this.layer.layerId,adds:o,updates:i,deletes:u,attachments:h,assetMaps:(0,c.Wg)(y)}]),m.returnServiceEditsOption=ie.toJSON(t?.returnServiceEditsOption),m.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(m.adds=o.length?JSON.stringify(o):null,m.updates=i.length?JSON.stringify(i):null,m.deletes=u.length?a?JSON.stringify(u):u.join(","):null,m.attachments=h&&JSON.stringify(h),m.assetMaps=(0,c.pC)(y)?JSON.stringify(y):void 0);const g=this._getLayerRequestOptions({method:"post",query:m}),b=t?.returnServiceEditsOption?this.layer.url:this.layer.parsedUrl.path,F=await(0,n.default)(b+"/applyEdits",g);if(s&&null!=F.data&&null!=F.data.assetMaps){const e=F.data,t=this.layer.objectIdField,r=[];for(const t of e.addResults)t.success&&r.push(t.objectId);for(const t of e.updateResults)t.success&&r.push(t.objectId);const s=this._createRequestQueryOptions(),a=await(0,n.default)(b+"/query",{...s,query:{f:"json",formatOf3DObjects:"3D_glb",where:`OBJECTID IN (${r.join(",")})`,outFields:`${t}`}});if(a&&a.data&&a.data.assetMaps&&(0,c.pC)(f)){const e=a.data.assetMaps;for(const t of e){const e=f.get(t.parentGlobalId).geometry;(0,c.pC)(e)&&"mesh"===e.type&&e.updateExternalSource({source:t.assetURL,extent:e.extent})}}}return this._createEditsResult(F)}async deleteAttachments(e,t){await this.load();const r=e.attributes[this.layer.objectIdField],s=this.layer.parsedUrl.path+"/"+r+"/deleteAttachments";try{return(await(0,n.default)(s,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(this._createFeatureEditResult)}catch(e){throw this._createAttachmentErrorResult(r,e)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:a}=await(0,n.default)(`${s}/${r}`,t),{id:i,extent:u,fullExtent:d,timeExtent:l}=a,c=u||d;return{id:i,fullExtent:c&&g.Z.fromJSON(c),timeExtent:l&&o.Z.fromJSON({start:l[0],end:l[1]})}}))}async queryAttachments(e,t={}){const{parsedUrl:r}=this.layer,s=r.path;await this.load();const a=this._getLayerRequestOptions(t);if(!this.layer.get("capabilities.operations.supportsQueryAttachments")){const{objectIds:t}=e,r=[];for(const e of t){const t=s+"/"+e+"/attachments";r.push((0,n.default)(t,a))}return Promise.all(r).then((e=>t.map(((t,r)=>({parentObjectId:t,attachmentInfos:e[r].data.attachmentInfos}))))).then((e=>J(e,s)))}return this.queryTask.executeAttachmentQuery(e,a)}async queryFeatures(e,t){return await this.load(),this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,ae.M8)(this.layer.url))return"unavailable";const e=(0,y.v_)(this.layer.url,"status"),t=await(0,n.default)(e,{query:{f:"json"}});return le.fromJSON(t.data.status)}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const{data:r}=await(0,n.default)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:(0,u.Z)("featurelayer-advanced-symbols")?{returnAdvancedSymbols:!0}:{},signal:t}));e=r}this.sourceJSON=this._patchServiceJSON(e);const r=e.type;if(!de.has(r))throw new i.Z("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}_patchServiceJSON(e){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=(0,R.bU)(e.geometryType).renderer;(0,p.RB)("drawingInfo.renderer",t,e)}return"esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),e}_serializeFeature(e,t){const{geometry:r,attributes:s}=e;if((0,c.pC)(t)&&(0,c.pC)(e.geometry)&&"mesh"===e.geometry.type){const r={...s},a=e.geometry,n=a.origin,o=a.transform;if(r[t.transformFieldRoles.originX]=n.x,r[t.transformFieldRoles.originY]=n.y,r[t.transformFieldRoles.originZ]=n.z,(0,c.pC)(o)){const e=o.translation,s=o.scale,a=o.rotation;r[t.transformFieldRoles.translationX]=e[0],r[t.transformFieldRoles.translationY]=e[1],r[t.transformFieldRoles.translationZ]=e[2],r[t.transformFieldRoles.scaleX]=s[0],r[t.transformFieldRoles.scaleY]=s[1],r[t.transformFieldRoles.scaleZ]=s[2],r[t.transformFieldRoles.rotationX]=a[0],r[t.transformFieldRoles.rotationY]=a[1],r[t.transformFieldRoles.rotationZ]=a[2],r[t.transformFieldRoles.rotationDeg]=a[3]}return{geometry:null,attributes:r}}return(0,c.Wi)(r)?{attributes:s}:"mesh"===r.type||"extent"===r.type?null:{geometry:r.toJSON(),attributes:s}}async _serializeAttachment(e){const{feature:t,attachment:r}=e,{globalId:s,name:a,contentType:n,data:o,uploadId:i}=r,u={globalId:s,parentGlobalId:null,contentType:null,name:null,uploadId:null,data:null};if(t&&(u.parentGlobalId="attributes"in t?t.attributes&&t.attributes[this.layer.globalIdField]:t.globalId),i)u.uploadId=i;else if(o){const e=await ue(o);u.contentType=e.mediaType,u.data=e.data,o instanceof File&&(u.name=o.name)}return a&&(u.name=a),n&&(u.contentType=n),u}async _serializeAssetMapEditAndUploadAssets(e,t){const r=this.layer.url;let s=null;try{const t=new Blob([e.data],{type:e.mimeType}),a=new FormData;a.append("f","json"),a.append("file",t,`${e.assetName}`);const o={body:a,method:"post",responseType:"json"},{data:u}=await(0,n.default)(`${r}/uploads/upload`,o);if(!u.success)throw new i.Z("feature-layer-source:upload-failure","Expected upload to be successfull.");s={assetType:e.assetType,assetUploadId:u.item.itemID}}catch(e){s=null}if((0,c.Wi)(s)){const t=await ue(new Blob([e.data]));if(!t.isBase64)throw new i.Z("feature-layer-source:uploadAssets-failure","Expected gltf data in base64 format after conversion.");s={assetType:e.assetType,assetData:t.data}}if((0,c.Wi)(s))throw new i.Z("feature-layer-source:uploadAssets-failure","Unable to prepare uploadAsset request options.");const a={method:"post",query:{f:"json",assets:JSON.stringify([s])},responseType:"json"},o=await(0,n.default)((0,y.v_)(this.layer.parsedUrl.path,"uploadAssets"),a);if(1!==o.data.uploadResults.length||!o.data.uploadResults[0].success)throw new i.Z("feature-layer-source:uploadAssets-failure","Bad response.");const u=o.data.uploadResults[0].assetHash,d=[];e.flags&F.AssetMapEditFlags.PROJECT_VERTICES&&d.push("PROJECT_VERTICES");const l={globalId:e.assetMapGlobalId,parentGlobalId:e.featureGlobalId,assetName:e.assetName,assetHash:u,flags:d};return t.set(e.featureGlobalId,e.feature),l}_getFeatureIds(e,t){const r=e[0];return r?this._canUseGlobalIds(t,e)?this._getGlobalIdsFromFeatureIdentifier(e):"objectId"in r?this._getObjectIdsFromFeatureIdentifier(e):this._getIdsFromFeatures(e):[]}_getIdsFromFeatures(e){const t=this.layer.objectIdField;return e.map((e=>e.attributes&&e.attributes[t]))}_canUseGlobalIds(e,t){return e&&"globalId"in t[0]}_getObjectIdsFromFeatureIdentifier(e){return e.map((e=>e.objectId))}_getGlobalIdsFromFeatureIdentifier(e){return e.map((e=>e.globalId))}_createEditsResult(e){const t=e.data,{layerId:r}=this.layer,s=[];let a=null;if(Array.isArray(t))for(const e of t)s.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(a={addResults:e.addResults,updateResults:e.updateResults,deleteResults:e.deleteResults,attachments:e.attachments,editMoment:e.editMoment});else a=t;const n=a?.attachments,o={addFeatureResults:a.addResults?a.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:a.updateResults?a.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:a.deleteResults?a.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:n&&n.addResults?n.addResults.map(this._createFeatureEditResult,this):[],updateAttachmentResults:n&&n.updateResults?n.updateResults.map(this._createFeatureEditResult,this):[],deleteAttachmentResults:n&&n.deleteResults?n.deleteResults.map(this._createFeatureEditResult,this):[]};if(a.editMoment&&(o.editMoment=a.editMoment),s.length>0){o.editedFeatureResults=[];for(const e of s){const{adds:t,updates:r,deletes:s,spatialReference:a}=e.editedFeatures,n=a?new oe.Z(a):null;o.editedFeatureResults.push({layerId:e.id,editedFeatures:{adds:t?.map((e=>this._createEditedFeature(e,n)))||[],updates:r?.map((e=>({original:this._createEditedFeature(e[0],n),current:this._createEditedFeature(e[1],n)})))||[],deletes:s?.map((e=>this._createEditedFeature(e,n)))||[],spatialReference:n}})}}return o}_createEditedFeature(e,t){return new a.Z({attributes:e.attributes,geometry:(0,b.im)({...e.geometry,spatialReference:t})})}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new i.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_createAttachmentErrorResult(e,t){const r=t.details.messages&&t.details.messages[0]||t.message,s=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new i.Z("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(e,t){const r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(const e in t){const s=t[e];null!=s&&(r.set?r.set(e,s):r.append(e,s))}return r}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:r,dynamicDataSource:s}=this.layer;return{...e,query:{gdbVersion:r,layer:s?JSON.stringify({source:s}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}};(0,s._)([(0,f.Cb)()],ce.prototype,"type",void 0),(0,s._)([(0,f.Cb)({constructOnly:!0})],ce.prototype,"layer",void 0),(0,s._)([(0,f.Cb)({readOnly:!0})],ce.prototype,"queryTask",null),ce=(0,s._)([(0,m.j)("esri.layers.graphics.sources.FeatureLayerSource")],ce);const pe=ce},25278:(e,t,r)=>{r.d(t,{Dm:()=>l,Hq:()=>c,MS:()=>p,bU:()=>i});var s=r(80442),a=r(22974),n=r(61159),o=r(58333);function i(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.I4:"esriGeometryPolyline"===e?o.ET:o.lF}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let d=1;function l(e,t){if((0,s.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${u.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${d++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,a.d9)(e)}}]}function p(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:n.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1}}}},41818:(e,t,r)=>{r.d(t,{P:()=>o});var s=r(11282),a=r(34599),n=r(57444);async function o(e,t,r){const o=(0,s.en)(e);return(0,a.executeQueryForCount)(o,n.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>o});var s=r(11282),a=r(34599),n=r(57444);async function o(e,t,r){const o=(0,s.en)(e);return(0,a.executeQueryForIds)(o,n.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{F:()=>u,e:()=>i});var s=r(11282),a=r(34599),n=r(74889),o=r(57444);async function i(e,t,r){const s=await u(e,t,r);return n.default.fromJSON(s)}async function u(e,t,r){const n=(0,s.en)(e),i={...r},u=o.Z.from(t),{data:d}=await(0,a.executeQuery)(n,u,u.sourceSpatialReference,i);return d}},98326:(e,t,r)=>{r.d(t,{Z:()=>c});var s,a=r(43697),n=r(96674),o=r(5600),i=(r(67676),r(75215)),u=r(52011);const d={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let l=s=class extends n.wq{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:r,tagName:s}=e;if(!t||!r||!s)return null;const a=t.find((e=>e.name===r));return a?function(e){const{tagName:t,tags:r}=e;if(!r||!t)return null;const s=r.find((e=>e.name===t));return s&&s.value||null}({tagName:s,tags:a.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return d[t]||null}clone(){return new s({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,a._)([(0,o.Cb)({type:String})],l.prototype,"contentType",void 0),(0,a._)([(0,o.Cb)()],l.prototype,"exifInfo",void 0),(0,a._)([(0,o.Cb)({readOnly:!0})],l.prototype,"orientationInfo",null),(0,a._)([(0,o.Cb)({type:i.z8})],l.prototype,"id",void 0),(0,a._)([(0,o.Cb)({type:String})],l.prototype,"globalId",void 0),(0,a._)([(0,o.Cb)({type:String})],l.prototype,"keywords",void 0),(0,a._)([(0,o.Cb)({type:String})],l.prototype,"name",void 0),(0,a._)([(0,o.Cb)({json:{read:!1}})],l.prototype,"parentGlobalId",void 0),(0,a._)([(0,o.Cb)({json:{read:!1}})],l.prototype,"parentObjectId",void 0),(0,a._)([(0,o.Cb)({type:i.z8})],l.prototype,"size",void 0),(0,a._)([(0,o.Cb)({json:{read:!1}})],l.prototype,"url",void 0),l=s=(0,a._)([(0,u.j)("esri.layers.support.AttachmentInfo")],l);const c=l}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8833],{88764:(e,t,s)=>{s.d(t,{q:()=>u});var i,r,n,a={exports:{}};i=a,r=function(){function e(s,i,r,n,a){for(;n>r;){if(n-r>600){var u=n-r+1,o=i-r+1,l=Math.log(u),h=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*h*(u-h)/u)*(o-u/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-o*h/u+c)),Math.min(n,Math.floor(i+(u-o)*h/u+c)),a)}var d=s[i],_=r,p=n;for(t(s,r,i),a(s[n],d)>0&&t(s,r,n);_<p;){for(t(s,_,p),_++,p--;a(s[_],d)<0;)_++;for(;a(s[p],d)>0;)p--}0===a(s[r],d)?t(s,r,p):t(s,++p,n),p<=i&&(r=p+1),i<=p&&(n=p-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return e<t?-1:e>t?1:0}return function(t,i,r,n,a){e(t,i,r||0,n||t.length-1,a||s)}},void 0!==(n=r())&&(i.exports=n);const u=a.exports},32448:(e,t,s)=>{s.d(t,{Z:()=>o});var i=s(43697),r=s(15923),n=s(50758),a=s(52011);class u{constructor(){this._emitter=new u.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap&&this._listenersMap.clear(),this._listenersMap=null}emit(e,t){const s=this._listenersMap&&this._listenersMap.get(e);if(!s)return!1;const i=this._target||this;return[...s].forEach((e=>{e.call(i,t)})),s.length>0}on(e,t){if(Array.isArray(e)){const s=e.map((e=>this.on(e,t)));return(0,n.AL)(s)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const s=this._listenersMap.get(e)||[];return s.push(t),this._listenersMap.set(e,s),{remove:()=>{const s=this._listenersMap&&this._listenersMap.get(e)||[],i=s.indexOf(t);i>=0&&s.splice(i,1)}}}once(e,t){const s=this.on(e,(e=>{s.remove(),t.call(null,e)}));return s}hasEventListener(e){const t=this._listenersMap&&this._listenersMap.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let s=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return s=(0,i._)([(0,a.j)("esri.core.Evented")],s),s};let s=class extends r.Z{constructor(){super(...arguments),this._emitter=new u.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};s=(0,i._)([(0,a.j)("esri.core.Evented")],s),e.EventedAccessor=s}(u||(u={}));const o=u},17445:(e,t,s)=>{s.d(t,{N1:()=>d,YP:()=>o,Z_:()=>f,gx:()=>l,nn:()=>m,on:()=>c,tX:()=>g});var i=s(91460),r=s(50758),n=s(70586),a=s(95330),u=s(26258);function o(e,t,s={}){return h(e,t,s,_)}function l(e,t,s={}){return h(e,t,s,p)}function h(e,t,s={},i){let r=null;const a=s.once?(e,s)=>{i(e)&&((0,n.hw)(r),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(r=(0,u.aQ)(e,a,s.sync,s.equals),s.initial){const t=e();a(t,t)}return r}function c(e,t,s,a={}){let u=null,l=null,h=null;function c(){u&&l&&(l.remove(),a.onListenerRemove?.(u),u=null,l=null)}function d(e){a.once&&a.once&&(0,n.hw)(h),s(e)}const _=o(e,((e,s)=>{c(),(0,i.vT)(e)&&(u=e,l=(0,i.on)(e,t,d),a.onListenerAdd?.(e))}),{sync:a.sync,initial:!0});return h=(0,r.kB)((()=>{_.remove(),c()})),h}function d(e,t){return function(e,t,s){if((0,a.Hc)(s))return Promise.reject((0,a.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let u=null;function o(){u=(0,n.hw)(u)}return new Promise(((i,n)=>{u=(0,r.AL)([(0,a.fu)(s,(()=>{o(),n((0,a.zE)())})),h(e,(e=>{o(),i(e)}),{sync:!1,once:!0},t??_)])}))}(e,p,t)}function _(e){return!0}function p(e){return!!e}s(87538);const f={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},29730:(e,t,s)=>{s.d(t,{Y:()=>n});var i=s(70586);function r(e,t){return e?t?4:3:t?3:2}function n(e,t,s,n,o){if((0,i.Wi)(t)||!t.lengths.length)return null;const l="upperLeft"===o?.originPosition?-1:1;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const h=e.coords,c=[],d=s?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:_,coords:p}=t,f=r(s,n);let m=0;for(const e of _){const t=a(d,p,m,e,s,n,l);t&&c.push(t),m+=e*f}if(c.sort(((e,t)=>{let i=l*e[2]-l*t[2];return 0===i&&s&&(i=e[4]-t[4]),i})),c.length){let e=6*c[0][2];h[0]=c[0][0]/e,h[1]=c[0][1]/e,s&&(e=6*c[0][4],h[2]=0!==e?c[0][3]/e:0),(h[0]<d[0]||h[0]>d[1]||h[1]<d[2]||h[1]>d[3]||s&&(h[2]<d[4]||h[2]>d[5]))&&(h.length=0)}if(!h.length){const e=t.lengths[0]?u(p,0,_[0],s,n):null;if(!e)return null;h[0]=e[0],h[1]=e[1],s&&e.length>2&&(h[2]=e[2])}return e}function a(e,t,s,i,n,a,u=1){const o=r(n,a);let l=s,h=s+o,c=0,d=0,_=0,p=0,f=0;for(let s=0,r=i-1;s<r;s++,l+=o,h+=o){const s=t[l],i=t[l+1],r=t[l+2],a=t[h],u=t[h+1],o=t[h+2];let m=s*u-a*i;p+=m,c+=(s+a)*m,d+=(i+u)*m,n&&(m=s*o-a*r,_+=(r+o)*m,f+=m),s<e[0]&&(e[0]=s),s>e[1]&&(e[1]=s),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),n&&(r<e[4]&&(e[4]=r),r>e[5]&&(e[5]=r))}if(p*u>0&&(p*=-1),f*u>0&&(f*=-1),!p)return null;const m=[c,d,.5*p];return n&&(m[3]=_,m[4]=.5*f),m}function u(e,t,s,i,n){const a=r(i,n);let u=t,d=t+a,_=0,p=0,f=0,m=0;for(let t=0,r=s-1;t<r;t++,u+=a,d+=a){const t=e[u],s=e[u+1],r=e[u+2],n=e[d],a=e[d+1],g=e[d+2],y=i?l(t,s,r,n,a,g):o(t,s,n,a);if(y)if(_+=y,i){const e=c(t,s,r,n,a,g);p+=y*e[0],f+=y*e[1],m+=y*e[2]}else{const e=h(t,s,n,a);p+=y*e[0],f+=y*e[1]}}return _>0?i?[p/_,f/_,m/_]:[p/_,f/_]:s>0?i?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function o(e,t,s,i){const r=s-e,n=i-t;return Math.sqrt(r*r+n*n)}function l(e,t,s,i,r,n){const a=i-e,u=r-t,o=n-s;return Math.sqrt(a*a+u*u+o*o)}function h(e,t,s,i){return[e+.5*(s-e),t+.5*(i-t)]}function c(e,t,s,i,r,n){return[e+.5*(i-e),t+.5*(r-t),s+.5*(n-s)]}},50245:(e,t,s)=>{s.d(t,{q:()=>ae});var i=s(67676),r=s(20102),n=s(22974),a=s(70586),u=s(69801),o=s(67900),l=s(60437),h=s(24470),c=s(20322),d=s(33955),_=s(82526),p=s(8744),f=s(98732),m=s(62432),g=s(37427),y=s(61159),E=s(26993),I=s(10402),S=s(17590),T=s(11490),R=s(99514),A=s(59266),w=s(61247),x=s(92604),b=s(54790),F=s(44553),N=s(95330),v=s(17445),C=s(76882),O=s(58971),k=s(10661);class P{constructor(e){this._observable=new k.s,this._value=e}get(){return(0,O.it)(this._observable),this._value}set(e){e!==this._value&&(this._value=e,this._observable.notify())}}class L{constructor(){this._tasks=new Array,this._running=new P(!1)}get length(){return this._tasks.length}get running(){return this._running.get()}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return this._running.set(!0),new Promise(((i,r)=>this._tasks.push(new Q(i,r,e,t,s))))}unshift(e,t,s){return this._running.set(!0),new Promise(((i,r)=>this._tasks.unshift(new Q(i,r,e,t,s))))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,N.Hc)(t.signal);if(s&&!t.abortCallback)t.reject((0,N.zE)());else{const i=s?t.abortCallback?.((0,N.zE)()):t.callback(e);(0,N.y8)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return this._running.set(this._tasks.length>0),!0}cancelAll(){const e=(0,N.zE)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0,this._running.set(!1)}}class Q{constructor(e,t,s,i,r){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}var U=s(43697),G=s(15923),M=s(5600),D=(s(75215),s(52011));let B=class extends G.Z{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,U._)([(0,M.Cb)()],B.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,U._)([(0,M.Cb)()],B.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),B=(0,U._)([(0,D.j)("esri.views.support.DebugFlags")],B);const q=new B;var H,Y,j;!function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(H||(H={})),(j=Y||(Y={})).RESOURCE_CONTROLLER="schedule",j.SLIDE="slide",j.STREAM_DATA_LOADER="stream loader",j.ELEVATION_QUERY="elevation query",j.TERRAIN_SURFACE="terrain",j.SURFACE_GEOMETRY_UPDATES="surface geometry updates",j.GRAPHICS_CORE="Graphics3D",j.I3S_CONTROLLER="I3S",j.POINT_CLOUD_LAYER="point cloud",j.FEATURE_TILE_FETCHER="feature fetcher",j.OVERLAY="overlay",j.STAGE="stage",j.GRAPHICS_DECONFLICTOR="graphics deconflictor",j.FILTER_VISIBILITY="Graphics3D filter visibility",j.SCALE_VISIBILITY="Graphics3D scale visibility",j.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",j.POINT_OF_INTEREST_FREQUENT="POI frequent",j.POINT_OF_INTEREST_INFREQUENT="POI infrequent",j.LABELER="labeler",j.FEATURE_QUERY_ENGINE="feature query",j.FEATURE_TILE_TREE="feature tile tree",j.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",j.ELEVATION_ALIGNMENT="elevation alignment",j.TEXT_TEXTURE_ATLAS="text texture atlas",j.TEXTURE_UNLOAD="texture unload",j.LINE_OF_SIGHT_TOOL="line of sight tool",j.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",j.ELEVATION_PROFILE="elevation profile",j.SNAPPING="snapping",j.SHADOW_ACCUMULATOR="shadow accumulator",j.CLOUDS_GENERATOR="cloud generator",j[j.TEST_PRIO=1]="TEST_PRIO";const V=new Map([[Y.RESOURCE_CONTROLLER,0],[Y.SLIDE,0],[Y.STREAM_DATA_LOADER,0],[Y.ELEVATION_QUERY,0],[Y.TERRAIN_SURFACE,1],[Y.SURFACE_GEOMETRY_UPDATES,1],[Y.GRAPHICS_CORE,2],[Y.I3S_CONTROLLER,2],[Y.POINT_CLOUD_LAYER,2],[Y.FEATURE_TILE_FETCHER,2],[Y.OVERLAY,4],[Y.STAGE,4],[Y.GRAPHICS_DECONFLICTOR,4],[Y.FILTER_VISIBILITY,4],[Y.SCALE_VISIBILITY,4],[Y.FRUSTUM_VISIBILITY,4],[Y.CLOUDS_GENERATOR,4],[Y.POINT_OF_INTEREST_FREQUENT,6],[Y.POINT_OF_INTEREST_INFREQUENT,30],[Y.LABELER,8],[Y.FEATURE_QUERY_ENGINE,8],[Y.FEATURE_TILE_TREE,16],[Y.FEATURE_TILE_TREE_ACTIVE,0],[Y.ELEVATION_ALIGNMENT,12],[Y.TEXT_TEXTURE_ATLAS,12],[Y.TEXTURE_UNLOAD,12],[Y.LINE_OF_SIGHT_TOOL,16],[Y.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[Y.SNAPPING,0],[Y.SHADOW_ACCUMULATOR,30]]);function W(e){return V.has(e)?V.get(e):"number"==typeof e?e:1}const Z=(0,C.HA)(6.5),z=(0,C.HA)(1),X=(0,C.HA)(30),J=(0,C.HA)(1e3/30),$=(0,C.HA)(100);var K,ee;!function(e){e.Scheduler=class{constructor(){this._updating=new P(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new b.Z("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new s,this._state=H.INTERACTING,this._tasks=new F.Z,this._runQueue=new F.Z,this._load=0,this._idleStateCallbacks=new F.Z,this._idleUpdatesStartFired=!1,this._maxReschedule=32,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,v.YP)((()=>q.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),v.nn);for(const e of Object.keys(Y))this.performanceInfo.tasks.set(Y[e],new b.Z(Y[e]));const e=this;this._test={FRAME_SAFETY_BUDGET:Z,INTERACTING_BUDGET:J,IDLE_BUDGET:$,get availableBudget(){return e._budget.budget},usedBudget:0,getBudget:()=>e._budget,setBudget:t=>e._budget=t,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}get updating(){return this._updating.get()}set updating(e){this._updating.set(e)}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,a.hw)(this._debugHandle),this._microTaskQueued=!1,this._updating.set(!1)}activate(){this._budget.done||this._microTaskQueued||(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.done||(this._maxReschedule=32,this._schedule(),this.frame()))})))}registerTask(e,s){const i=W(e),r=new t(this,e,s,i);return this._tasks.push(r),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new b.Z(e)),r}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===H.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===H.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==H.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}updateBudget(e){this._test.usedBudget=0,++this._frameNumber;let t=Z,s=e.frameDuration,i=z;switch(this.state){case H.IDLE:t=(0,C.HA)(0),s=(0,C.HA)(Math.max($,e.frameDuration)),i=X;break;case H.INTERACTING:s=(0,C.HA)(Math.max(J,e.frameDuration));case H.ANIMATING:}return s=(0,C.HA)(s-e.elapsedFrameTime-t),this.state!==H.IDLE&&s<z&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,C.HA)(Math.max(s,i)),this._budget.reset(s,this.state),this._maxReschedule=32,this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case H.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case H.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset((0,C.HA)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e)}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return ee.SCHEDULED;let t=ee.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=ee.READY:t!==ee.READY&&(t=ee.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){if(this._maxReschedule<=0)return!1;for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{!s.needsUpdate||0===s.schedulePriority||0===s.basePriority||s.task.runOncePerFrame&&s.lastFrameRun===this._frameNumber||(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this._updating.set(!1),!1;--this._maxReschedule}return this._updating.set(!0),!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)}catch(e){x.Z.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e)}s.schedulePriority=s.basePriority,s.lastFrameRun=this._frameNumber;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._debug&&this._budget.elapsed>2*this._budget.budget&&console.log("Task",s.name,"used",this._budget.elapsed,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return this._updating.set(this._tasks.some((e=>e.needsUpdate))),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this._updating.set(this._tasks.some((e=>e.needsUpdate))),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(Y))this._frameTaskTimes.set(Y[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){return this._test}};class t{constructor(e,t,s,i){this._scheduler=e,this.name=t,this._basePriority=i,this.lastFrameRun=0,this.runtime=0,this._queue=new L,this._handles=new w.Z,this.schedulePriority=this._basePriority,this._task=new P((0,a.pC)(s)?s:this._queue),this._handles.add((0,v.gx)((()=>this.task.running),(()=>e.activate())))}get task(){return this._task.get()}get updating(){return this._queue.running}remove(){this.processQueue(te),this._scheduler.removeTask(this),this.schedule=se.schedule,this.reschedule=se.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=W(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){this._queue.runTask(e)}}class s{constructor(){this._begin="undefined"!=typeof performance?performance.now():0,this._budget=0,this._state=H.IDLE,this._done=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){this._done=this.elapsed>=this._budget&&this._enabled}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this._done=!1}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return performance.now()-this._begin}resetProgress(){this._done=!1}get hasProgressed(){return this._done}}e.Budget=s}(K||(K={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(ee||(ee={}));const te=(()=>{const e=new K.Budget;return e.enabled=!1,e})(),se=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,N.Hc)(t)){const e=(0,N.zE)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,N.gx)(e(te))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}},ie="feature-store:unsupported-query",re=new u.WJ(2e6);let ne=0;class ae{constructor(e){this.capabilities={query:y.g},this.geometryType=e.geometryType,this.hasM=e.hasM,this.hasZ=e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new u.Xq(ne+++"$$",re)),this.fieldsIndex=new R.Z(e.fields),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=(0,a.hw)(this._frameTask),this.clearCache(),(0,a.SC)(this._geometryQueryCache),this._changeHandle=(0,a.hw)(this._changeHandle),(0,a.SC)(this.fieldsIndex)}get featureAdapter(){return this.featureStore.featureAdapter}get fullExtent(){const e=this.featureStore.fullBounds;return(0,a.Wi)(e)?null:{xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:(0,T.S2)(this.spatialReference)}}get timeExtent(){return this.timeInfo?(this._timeExtent||(this._timeExtent=(0,S.R)(this.timeInfo,this.featureStore)),this._timeExtent):null}clearCache(){this._geometryQueryCache?.clear(),this._allItems=null,this._timeExtent=null}async executeQuery(e,t){try{return(await this._executeQuery(e,{},t)).createQueryResponse()}catch(t){if(t!==T.vF)throw t;return new E.y([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},t)).createQueryResponseForCount()}catch(e){if(e!==T.vF)throw e;return 0}}async executeQueryForExtent(e,t){const s=e.outSR;try{const i=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),r=i.size;if(!r)return{count:0,extent:null};(0,l.t8)(oe,l.Gv),this.featureStore.forEachBounds(i.items,(e=>(0,l.TC)(oe,e)),ue);const n={xmin:oe[0],ymin:oe[1],xmax:oe[3],ymax:oe[4],spatialReference:(0,T.S2)(this.spatialReference)};this.hasZ&&isFinite(oe[2])&&isFinite(oe[5])&&(n.zmin=oe[2],n.zmax=oe[5]);const a=(0,g.iV)(n,i.spatialReference,s);if(a.spatialReference=(0,T.S2)(s||this.spatialReference),a.xmax-a.xmin==0){const e=(0,o.c9)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin==0){const e=(0,o.c9)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(this.hasZ&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin==0){const e=(0,o.c9)(a.spatialReference);a.zmin-=e,a.zmax+=e}return{count:r,extent:a}}catch(e){if(e===T.vF)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){try{const s=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),i=s.items,r=new Set;return await this._reschedule((()=>{for(const e of i)r.add(s.featureAdapter.getObjectId(e))}),t),r}catch(e){if(e===T.vF)return new Set;throw e}}async executeQueryForSnapping(e,t){const{point:s,distance:i,types:r}=e;if(r===E.r.NONE)return{candidates:[]};const n=await this._reschedule((()=>this._checkQuerySupport(e.query)),t),u=!(0,p.fS)(s.spatialReference,this.spatialReference);u&&await(0,g._W)(s.spatialReference,this.spatialReference);const o="number"==typeof i?i:i.x,l="number"==typeof i?i:i.y,h={xmin:s.x-o,xmax:s.x+o,ymin:s.y-l,ymax:s.y+l,spatialReference:s.spatialReference},c=u?(0,g.iV)(h,this.spatialReference):h;if(!c)return{candidates:[]};const f=(await(0,_.aX)((0,d.im)(s),null,{signal:t}))[0],m=(await(0,_.aX)((0,d.im)(c),null,{signal:t}))[0];if((0,a.Wi)(f)||(0,a.Wi)(m))return{candidates:[]};const y=new E.y(this._searchFeatures(this._getQueryBBoxes(m.toJSON())),n,this);await this._reschedule((()=>this._executeObjectIdsQuery(y)),t),await this._reschedule((()=>this._executeTimeQuery(y)),t),await this._reschedule((()=>this._executeAttributesQuery(y)),t);const I=f.toJSON(),S=u?(0,g.iV)(I,this.spatialReference):I,T=u?Math.max(c.xmax-c.xmin,c.ymax-c.ymin)/2:i;return y.createSnappingResponse({...e,point:S,distance:T},s.spatialReference)}async executeQueryForLatestObservations(e,t){if(!this.timeInfo||!this.timeInfo.trackIdField)throw new r.Z(ie,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const s=await this._executeQuery(e,{},t);return await this._reschedule((()=>this._filterLatest(s)),t),s.createQueryResponse()}catch(t){if(t!==T.vF)throw t;return new E.y([],e,this).createQueryResponse()}}async executeQueryForSummaryStatistics(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,s){const{field:i,field2:r,field3:n,valueExpression:a}=t;return(await this._getQueryEngineResultForStats(e,{field:i,field2:r,field3:n,valueExpression:a},s)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createHistogramResponse(t)}async _schedule(e,t){return(0,a.pC)(this._frameTask)?this._frameTask.schedule(e,t):e(te)}async _reschedule(e,t){return(0,a.pC)(this._frameTask)?this._frameTask.reschedule(e,t):e(te)}_getAll(e){return(0,a.Wi)(this._allItems)&&(this._allItems=this.featureStore.toArray()),new E.y(this._allItems,e,this)}async _executeQuery(e,t,s){e=(0,n.d9)(e),e=await this._schedule((()=>(0,T.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkQuerySupport(e)),s),e={...e,...t};const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}async _executeSceneFilterQuery(e,t){if((0,a.Wi)(e.sceneFilter))return null;const{outSR:s,returnGeometry:i,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,u=e.sceneFilter.geometry,o=(0,a.Wi)(n)||(0,p.fS)(n,u.spatialReference)?u:(0,g.iV)(u,n);if(!o)return null;const l=i||r,h=(0,p.JY)(s)&&!(0,p.fS)(this.spatialReference,s)&&l?async e=>this._project(e,s):e=>e,c=this.featureAdapter,d=this._searchFeatures(this._getQueryBBoxes(o));if("disjoint"===e.sceneFilter.spatialRelationship){if(!d.length)return null;const s=new Set;for(const e of d)s.add(c.getObjectId(e));const i=await this._reschedule((()=>this.featureStore.toArray()),t);return h(await this._reschedule((async()=>{const r=await(0,I.cW)("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(i,(e=>!s.has(c.getObjectId(e))||r(c.getGeometry(e))),t);return new E.y(n,e,this)}),t))}if(!d.length)return new E.y([],e,this);if(this._canExecuteSinglePass(o,e))return h(new E.y(d,e,this));const _=await(0,I.cW)("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),f=await this._runSpatialFilter(d,(e=>_(c.getGeometry(e))),t);return h(new E.y(f,e,this))}async _executeGeometryQuery(e,t,s){if((0,a.pC)(t)&&0===t.items.length)return t;e=(0,a.pC)(t)?t.query:e;const{geometry:r,outSR:n,spatialRel:u,returnGeometry:o,returnCentroid:l}=e,h=this.featureStore.featureSpatialReference,c=!r||(0,a.Wi)(h)||(0,p.fS)(h,r.spatialReference)?r:(0,g.iV)(r,h),d=o||l,_=(0,p.JY)(n)&&!(0,p.fS)(this.spatialReference,n),f=this._geometryQueryCache&&(0,a.Wi)(t)?_&&d?JSON.stringify({originalFilterGeometry:r,spatialRelationship:u,outSpatialReference:n}):JSON.stringify({originalFilterGeometry:r,spatialRelationship:u}):null,m=f?this._geometryQueryCache.get(f):null;if((0,a.pC)(m))return new E.y(m,e,this);const y=async e=>(_&&d&&await this._project(e,n),f&&this._geometryQueryCache.put(f,e.items,e.items.length+1),e);if(!c)return y((0,a.pC)(t)?t:this._getAll(e));const S=this.featureAdapter;let T=this._searchFeatures(this._getQueryBBoxes(r));if("esriSpatialRelDisjoint"===u){if(!T.length)return y((0,a.pC)(t)?t:this._getAll(e));const i=new Set;for(const e of T)i.add(S.getObjectId(e));const r=(0,a.pC)(t)?t.items:await this._reschedule((()=>this.featureStore.toArray()),s),n=await this._reschedule((async()=>{const t=await(0,I.cW)(u,c,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(r,(e=>!i.has(S.getObjectId(e))||t(S.getGeometry(e))),s);return new E.y(n,e,this)}),s);return y(n)}if((0,a.pC)(t)){const e=new i.SO;T=T.filter((s=>(0,i.cq)(t.items,s,t.items.length,e)>=0))}if(!T.length){const t=new E.y([],e,this);return f&&this._geometryQueryCache.put(f,t.items,1),t}if(this._canExecuteSinglePass(c,e))return y(new E.y(T,e,this));const R=await(0,I.cW)(u,c,this.geometryType,this.hasZ,this.hasM),A=await this._runSpatialFilter(T,(e=>R(S.getGeometry(e))),s);return y(new E.y(A,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds||!e.query.aggregateIds.length||(0,a.Wi)(this.aggregateAdapter))return;const t=new Set;for(const s of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds||!e.query.objectIds.length)return;const t=new Set(e.query.objectIds),s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,S.y)(this.timeInfo,e.query.timeExtent,this.featureAdapter);(0,a.Wi)(t)||(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,m.Jc)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async _runSpatialFilter(e,t,s){if(!t)return e;if((0,a.Wi)(this._frameTask))return e.filter((e=>t(e)));let i=0;const r=new Array,n=async a=>{for(;i<e.length;){const u=e[i++];t(u)&&(r.push(u),a.madeProgress()),a.done&&await this._reschedule((e=>n(e)),s)}};return this._reschedule((e=>n(e)),s).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:s,endTimeField:i}=this.timeInfo,r=i||s,n=new Map,a=this.featureAdapter.getAttribute;for(const s of e.items){const e=a(s,t),i=a(s,r),u=n.get(e);(!u||i>a(u,r))&&n.set(e,s)}e.items=Array.from(n.values())}_canExecuteSinglePass(e,t){const{spatialRel:s}=t;return(0,I.hN)(e)&&("esriSpatialRelEnvelopeIntersects"===s||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===s||"esriSpatialRelContains"===s||"esriSpatialRelWithin"===s))}async _project(e,t){if(!t||(0,p.fS)(this.spatialReference,t))return e;const s=this.featureAdapter,i=await(0,g.oj)(e.items.map((e=>(0,T.Op)(this.geometryType,this.hasZ,this.hasM,s.getGeometry(e)))),this.spatialReference,t);return e.items=i.map(((t,i)=>s.cloneWithGeometry(e.items[i],(0,f.GH)(t,this.hasZ,this.hasM)))),e}_getQueryBBoxes(e){if((0,I.hN)(e)){if((0,d.YX)(e))return[(0,h.al)(e.xmin,e.ymin,e.xmax,e.ymax)];if((0,d.oU)(e))return e.rings.map((e=>(0,h.al)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,c.$P)((0,h.Ue)(),e)]}_searchFeatures(e){for(const t of e)this.featureStore.forEachInBounds(t,(e=>le.add(e)));const t=Array.from(le.values());return le.clear(),t}async _checkStatisticsSupport(e,t){if(e.distance<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new r.Z(ie,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),Promise.all([this._checkStatisticsParamsSupport(t),(0,I.P0)(e,this.geometryType,this.spatialReference),(0,g._W)(this.spatialReference,e.outSR)]).then((()=>e))}async _checkStatisticsParamsSupport(e){let t=[];if(e.valueExpression){const{arcadeUtils:s}=await(0,A.LC)();t=s.extractFieldNames(e.valueExpression)}if(e.field&&t.push(e.field),e.field2&&t.push(e.field2),e.field3&&t.push(e.field3),e.normalizationField&&t.push(e.normalizationField),!t.length)throw new r.Z(ie,"params should have at least a field or valueExpression",{params:e});(0,m.Of)(this.fieldsIndex,t,"params contains missing fields")}async _checkQuerySupport(e){if(e.distance<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new r.Z(ie,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),this._checkStatisticsQuerySupport(e),Promise.all([(0,I.P0)(e,this.geometryType,this.spatialReference),(0,g._W)(this.spatialReference,e.outSR)]).then((()=>e))}_checkAttributesQuerySupport(e){const{outFields:t,orderByFields:s,returnDistinctValues:i,outStatistics:n}=e,a=n?n.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(s&&s.length>0){const e=" asc",t=" desc",i=s.map((s=>{const i=s.toLowerCase();return i.includes(e)?i.split(e)[0]:i.includes(t)?i.split(t)[0]:s})).filter((e=>!a.includes(e)));(0,m.Of)(this.fieldsIndex,i,"orderByFields contains missing fields")}if(t&&t.length>0)(0,m.Of)(this.fieldsIndex,t,"outFields contains missing fields");else if(i)throw new r.Z(ie,"outFields should be specified for returnDistinctValues",{query:e});(0,m.hO)(this.fieldsIndex,e.where)}_checkStatisticsQuerySupport(e){const{outStatistics:t,groupByFieldsForStatistics:s,having:i}=e,n=s&&s.length,a=t&&t.length;if(i){if(!n||!a)throw new r.Z(ie,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:e});(0,m.z4)(this.fieldsIndex,i,t)}if(a){if(!function(e){return e.every((e=>"exceedslimit"!==e.statisticType))}(t))return;const i=t.map((e=>e.onStatisticField)).filter(Boolean);(0,m.Of)(this.fieldsIndex,i,"onStatisticFields contains missing fields"),n&&(0,m.Of)(this.fieldsIndex,s,"groupByFieldsForStatistics contains missing fields");for(const s of t){const{onStatisticField:t,statisticType:i}=s;if("percentile_disc"!==i&&"percentile_cont"!==i||!("statisticParameters"in s)){if("count"!==i&&t&&(0,m.G3)(t,this.fieldsIndex))throw new r.Z(ie,"outStatistics contains non-numeric fields",{definition:s,query:e})}else{const{statisticParameters:t}=s;if(!t)throw new r.Z(ie,"statisticParamters should be set for percentile type",{definition:s,query:e})}}}}async _getQueryEngineResultForStats(e,t,s){e=(0,n.d9)(e);try{e=await this._schedule((()=>(0,T.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkStatisticsSupport(e,t)),s);const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}catch(t){if(t!==T.vF)throw t;return new E.y([],e,this)}}}const ue=(0,l.Ue)(),oe=(0,l.Ue)(),le=new Set},61159:(e,t,s)=>{s.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},10402:(e,t,s)=>{s.d(t,{hN:()=>R,P0:()=>T,cW:()=>S});var i=s(20102),r=s(54102),n=s(87416),a=s(33955),u=s(8744);function o(e,t){return e?t?4:3:t?3:2}function l(e,t,s,i,r,n){const a=o(r,n),{coords:u,lengths:l}=i;if(!l)return!1;for(let i=0,r=0;i<l.length;i++,r+=a)if(!h(e,t,s,u[r],u[r+1]))return!1;return!0}function h(e,t,s,i,r){if(!e)return!1;const n=o(t,s),{coords:a,lengths:u}=e;let l=!1,h=0;for(const e of u)l=c(l,a,n,h,e,i,r),h+=e*n;return l}function c(e,t,s,i,r,n,a){let u=e,o=i;for(let e=i,l=i+r*s;e<l;e+=s){o=e+s,o===l&&(o=i);const r=t[e],h=t[e+1],c=t[o],d=t[o+1];(h<a&&d>=a||d<a&&h>=a)&&r+(a-h)/(d-h)*(c-r)<n&&(u=!u)}return u}var d=s(98732),_=s(5428),p=s(37427),f=s(11490);const m="feature-store:unsupported-query",g={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},y={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},E={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},I={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1};function S(e,t,i,u,o){if((0,a.oU)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Uy)(new _.Z,t,!1,!1);return Promise.resolve((t=>function(e,t,s,i){return h(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)))}if((0,a.oU)(t)&&"esriGeometryMultipoint"===i){const s=(0,d.Uy)(new _.Z,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>l(s,!1,!1,e,u,o)))}if((0,a.YX)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,r.aV)(t,(0,f.Op)(i,u,o,e))));if((0,a.YX)(t)&&"esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,r.lQ)(t,(0,f.Op)(i,u,o,e))));if((0,a.YX)(t)&&"esriSpatialRelIntersects"===e){const e=function(e){return"mesh"===e?n.h_:(0,n.IY)(e)}(i);return Promise.resolve((s=>e(t,(0,f.Op)(i,u,o,s))))}return Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)).then((s=>{const r=s[g[e]].bind(null,t.spatialReference,t);return e=>r((0,f.Op)(i,u,o,e))}))}async function T(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===y[e]}(r))throw new i.Z(m,"Unsupported query spatial relationship",{query:e});if((0,u.JY)(n.spatialReference)&&(0,u.JY)(s)){if(!function(e){return null!=e&&!0===E[(0,a.Ji)(e)]}(n))throw new i.Z(m,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===I[e]}(t))throw new i.Z(m,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,p._W)(e.geometry&&e.geometry.spatialReference,e.outSR)}}}function R(e){if((0,a.YX)(e))return!0;if((0,a.oU)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},17590:(e,t,s)=>{function i(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:i,endTimeField:r}=e;let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(i&&r)t.forEach((e=>{const t=s.getAttribute(e,i),u=s.getAttribute(e,r);null==t||isNaN(t)||(n=Math.min(n,t)),null==u||isNaN(u)||(a=Math.max(a,u))}));else{const e=i||r;t.forEach((t=>{const i=s.getAttribute(t,e);null==i||isNaN(i)||(n=Math.min(n,i),a=Math.max(a,i))}))}return{start:n,end:a}}function r(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;return null===n&&null===a?null:void 0===n&&void 0===a?()=>!1:i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e.getAttribute(n,t),u=e.getAttribute(n,s);return(null==a||a<=r)&&(null==u||u>=i)}:null!=i?t=>{const r=e.getAttribute(t,s);return null==r||r>=i}:null!=r?s=>{const i=e.getAttribute(s,t);return null==i||i<=r}:void 0}(s,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e.getAttribute(i,t)===s:null!=s&&null!=i?r=>{const n=e.getAttribute(r,t);return n>=s&&n<=i}:null!=s?i=>e.getAttribute(i,t)>=s:null!=i?s=>e.getAttribute(s,t)<=i:void 0}(s,i||r,n,a)}s.d(t,{R:()=>i,y:()=>r})}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8833],{88764:(e,t,s)=>{s.d(t,{q:()=>u});var i,r,n,a={exports:{}};i=a,r=function(){function e(s,i,r,n,a){for(;n>r;){if(n-r>600){var u=n-r+1,o=i-r+1,l=Math.log(u),h=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*h*(u-h)/u)*(o-u/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-o*h/u+c)),Math.min(n,Math.floor(i+(u-o)*h/u+c)),a)}var d=s[i],_=r,p=n;for(t(s,r,i),a(s[n],d)>0&&t(s,r,n);_<p;){for(t(s,_,p),_++,p--;a(s[_],d)<0;)_++;for(;a(s[p],d)>0;)p--}0===a(s[r],d)?t(s,r,p):t(s,++p,n),p<=i&&(r=p+1),i<=p&&(n=p-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return e<t?-1:e>t?1:0}return function(t,i,r,n,a){e(t,i,r||0,n||t.length-1,a||s)}},void 0!==(n=r())&&(i.exports=n);const u=a.exports},32448:(e,t,s)=>{s.d(t,{Z:()=>o});var i=s(43697),r=s(15923),n=s(50758),a=s(52011);class u{constructor(){this._emitter=new u.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap&&this._listenersMap.clear(),this._listenersMap=null}emit(e,t){const s=this._listenersMap&&this._listenersMap.get(e);if(!s)return!1;const i=this._target||this;return[...s].forEach((e=>{e.call(i,t)})),s.length>0}on(e,t){if(Array.isArray(e)){const s=e.map((e=>this.on(e,t)));return(0,n.AL)(s)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const s=this._listenersMap.get(e)||[];return s.push(t),this._listenersMap.set(e,s),{remove:()=>{const s=this._listenersMap&&this._listenersMap.get(e)||[],i=s.indexOf(t);i>=0&&s.splice(i,1)}}}once(e,t){const s=this.on(e,(e=>{s.remove(),t.call(null,e)}));return s}hasEventListener(e){const t=this._listenersMap&&this._listenersMap.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let s=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return s=(0,i._)([(0,a.j)("esri.core.Evented")],s),s};let s=class extends r.Z{constructor(){super(...arguments),this._emitter=new u.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};s=(0,i._)([(0,a.j)("esri.core.Evented")],s),e.EventedAccessor=s}(u||(u={}));const o=u},17445:(e,t,s)=>{s.d(t,{N1:()=>d,YP:()=>o,Z_:()=>f,gx:()=>l,nn:()=>m,on:()=>c,tX:()=>g});var i=s(91460),r=s(50758),n=s(70586),a=s(95330),u=s(26258);function o(e,t,s={}){return h(e,t,s,_)}function l(e,t,s={}){return h(e,t,s,p)}function h(e,t,s={},i){let r=null;const a=s.once?(e,s)=>{i(e)&&((0,n.hw)(r),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(r=(0,u.aQ)(e,a,s.sync,s.equals),s.initial){const t=e();a(t,t)}return r}function c(e,t,s,a={}){let u=null,l=null,h=null;function c(){u&&l&&(l.remove(),a.onListenerRemove?.(u),u=null,l=null)}function d(e){a.once&&a.once&&(0,n.hw)(h),s(e)}const _=o(e,((e,s)=>{c(),(0,i.vT)(e)&&(u=e,l=(0,i.on)(e,t,d),a.onListenerAdd?.(e))}),{sync:a.sync,initial:!0});return h=(0,r.kB)((()=>{_.remove(),c()})),h}function d(e,t){return function(e,t,s){if((0,a.Hc)(s))return Promise.reject((0,a.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let u=null;function o(){u=(0,n.hw)(u)}return new Promise(((i,n)=>{u=(0,r.AL)([(0,a.fu)(s,(()=>{o(),n((0,a.zE)())})),h(e,(e=>{o(),i(e)}),{sync:!1,once:!0},t??_)])}))}(e,p,t)}function _(e){return!0}function p(e){return!!e}s(87538);const f={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},29730:(e,t,s)=>{s.d(t,{Y:()=>n});var i=s(70586);function r(e,t){return e?t?4:3:t?3:2}function n(e,t,s,n,o){if((0,i.Wi)(t)||!t.lengths.length)return null;const l="upperLeft"===o?.originPosition?-1:1;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const h=e.coords,c=[],d=s?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:_,coords:p}=t,f=r(s,n);let m=0;for(const e of _){const t=a(d,p,m,e,s,n,l);t&&c.push(t),m+=e*f}if(c.sort(((e,t)=>{let i=l*e[2]-l*t[2];return 0===i&&s&&(i=e[4]-t[4]),i})),c.length){let e=6*c[0][2];h[0]=c[0][0]/e,h[1]=c[0][1]/e,s&&(e=6*c[0][4],h[2]=0!==e?c[0][3]/e:0),(h[0]<d[0]||h[0]>d[1]||h[1]<d[2]||h[1]>d[3]||s&&(h[2]<d[4]||h[2]>d[5]))&&(h.length=0)}if(!h.length){const e=t.lengths[0]?u(p,0,_[0],s,n):null;if(!e)return null;h[0]=e[0],h[1]=e[1],s&&e.length>2&&(h[2]=e[2])}return e}function a(e,t,s,i,n,a,u=1){const o=r(n,a);let l=s,h=s+o,c=0,d=0,_=0,p=0,f=0;for(let s=0,r=i-1;s<r;s++,l+=o,h+=o){const s=t[l],i=t[l+1],r=t[l+2],a=t[h],u=t[h+1],o=t[h+2];let m=s*u-a*i;p+=m,c+=(s+a)*m,d+=(i+u)*m,n&&(m=s*o-a*r,_+=(r+o)*m,f+=m),s<e[0]&&(e[0]=s),s>e[1]&&(e[1]=s),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),n&&(r<e[4]&&(e[4]=r),r>e[5]&&(e[5]=r))}if(p*u>0&&(p*=-1),f*u>0&&(f*=-1),!p)return null;const m=[c,d,.5*p];return n&&(m[3]=_,m[4]=.5*f),m}function u(e,t,s,i,n){const a=r(i,n);let u=t,d=t+a,_=0,p=0,f=0,m=0;for(let t=0,r=s-1;t<r;t++,u+=a,d+=a){const t=e[u],s=e[u+1],r=e[u+2],n=e[d],a=e[d+1],g=e[d+2],y=i?l(t,s,r,n,a,g):o(t,s,n,a);if(y)if(_+=y,i){const e=c(t,s,r,n,a,g);p+=y*e[0],f+=y*e[1],m+=y*e[2]}else{const e=h(t,s,n,a);p+=y*e[0],f+=y*e[1]}}return _>0?i?[p/_,f/_,m/_]:[p/_,f/_]:s>0?i?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function o(e,t,s,i){const r=s-e,n=i-t;return Math.sqrt(r*r+n*n)}function l(e,t,s,i,r,n){const a=i-e,u=r-t,o=n-s;return Math.sqrt(a*a+u*u+o*o)}function h(e,t,s,i){return[e+.5*(s-e),t+.5*(i-t)]}function c(e,t,s,i,r,n){return[e+.5*(i-e),t+.5*(r-t),s+.5*(n-s)]}},50245:(e,t,s)=>{s.d(t,{q:()=>ae});var i=s(67676),r=s(20102),n=s(22974),a=s(70586),u=s(69801),o=s(67900),l=s(60437),h=s(24470),c=s(20322),d=s(33955),_=s(51806),p=s(8744),f=s(98732),m=s(62432),g=s(37427),y=s(61159),E=s(26993),I=s(10402),S=s(17590),T=s(11490),R=s(99514),A=s(59266),w=s(61247),x=s(92604),b=s(54790),F=s(44553),N=s(95330),v=s(17445),C=s(76882),O=s(58971),k=s(10661);class P{constructor(e){this._observable=new k.s,this._value=e}get(){return(0,O.it)(this._observable),this._value}set(e){e!==this._value&&(this._value=e,this._observable.notify())}}class L{constructor(){this._tasks=new Array,this._running=new P(!1)}get length(){return this._tasks.length}get running(){return this._running.get()}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return this._running.set(!0),new Promise(((i,r)=>this._tasks.push(new Q(i,r,e,t,s))))}unshift(e,t,s){return this._running.set(!0),new Promise(((i,r)=>this._tasks.unshift(new Q(i,r,e,t,s))))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,N.Hc)(t.signal);if(s&&!t.abortCallback)t.reject((0,N.zE)());else{const i=s?t.abortCallback?.((0,N.zE)()):t.callback(e);(0,N.y8)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return this._running.set(this._tasks.length>0),!0}cancelAll(){const e=(0,N.zE)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0,this._running.set(!1)}}class Q{constructor(e,t,s,i,r){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}var U=s(43697),G=s(15923),M=s(5600),D=(s(75215),s(52011));let B=class extends G.Z{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,U._)([(0,M.Cb)()],B.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,U._)([(0,M.Cb)()],B.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),B=(0,U._)([(0,D.j)("esri.views.support.DebugFlags")],B);const q=new B;var H,Y,j;!function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(H||(H={})),(j=Y||(Y={})).RESOURCE_CONTROLLER="schedule",j.SLIDE="slide",j.STREAM_DATA_LOADER="stream loader",j.ELEVATION_QUERY="elevation query",j.TERRAIN_SURFACE="terrain",j.SURFACE_GEOMETRY_UPDATES="surface geometry updates",j.GRAPHICS_CORE="Graphics3D",j.I3S_CONTROLLER="I3S",j.POINT_CLOUD_LAYER="point cloud",j.FEATURE_TILE_FETCHER="feature fetcher",j.OVERLAY="overlay",j.STAGE="stage",j.GRAPHICS_DECONFLICTOR="graphics deconflictor",j.FILTER_VISIBILITY="Graphics3D filter visibility",j.SCALE_VISIBILITY="Graphics3D scale visibility",j.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",j.POINT_OF_INTEREST_FREQUENT="POI frequent",j.POINT_OF_INTEREST_INFREQUENT="POI infrequent",j.LABELER="labeler",j.FEATURE_QUERY_ENGINE="feature query",j.FEATURE_TILE_TREE="feature tile tree",j.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",j.ELEVATION_ALIGNMENT="elevation alignment",j.TEXT_TEXTURE_ATLAS="text texture atlas",j.TEXTURE_UNLOAD="texture unload",j.LINE_OF_SIGHT_TOOL="line of sight tool",j.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",j.ELEVATION_PROFILE="elevation profile",j.SNAPPING="snapping",j.SHADOW_ACCUMULATOR="shadow accumulator",j.CLOUDS_GENERATOR="cloud generator",j[j.TEST_PRIO=1]="TEST_PRIO";const V=new Map([[Y.RESOURCE_CONTROLLER,0],[Y.SLIDE,0],[Y.STREAM_DATA_LOADER,0],[Y.ELEVATION_QUERY,0],[Y.TERRAIN_SURFACE,1],[Y.SURFACE_GEOMETRY_UPDATES,1],[Y.GRAPHICS_CORE,2],[Y.I3S_CONTROLLER,2],[Y.POINT_CLOUD_LAYER,2],[Y.FEATURE_TILE_FETCHER,2],[Y.OVERLAY,4],[Y.STAGE,4],[Y.GRAPHICS_DECONFLICTOR,4],[Y.FILTER_VISIBILITY,4],[Y.SCALE_VISIBILITY,4],[Y.FRUSTUM_VISIBILITY,4],[Y.CLOUDS_GENERATOR,4],[Y.POINT_OF_INTEREST_FREQUENT,6],[Y.POINT_OF_INTEREST_INFREQUENT,30],[Y.LABELER,8],[Y.FEATURE_QUERY_ENGINE,8],[Y.FEATURE_TILE_TREE,16],[Y.FEATURE_TILE_TREE_ACTIVE,0],[Y.ELEVATION_ALIGNMENT,12],[Y.TEXT_TEXTURE_ATLAS,12],[Y.TEXTURE_UNLOAD,12],[Y.LINE_OF_SIGHT_TOOL,16],[Y.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[Y.SNAPPING,0],[Y.SHADOW_ACCUMULATOR,30]]);function W(e){return V.has(e)?V.get(e):"number"==typeof e?e:1}const Z=(0,C.HA)(6.5),z=(0,C.HA)(1),X=(0,C.HA)(30),J=(0,C.HA)(1e3/30),$=(0,C.HA)(100);var K,ee;!function(e){e.Scheduler=class{constructor(){this._updating=new P(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new b.Z("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new s,this._state=H.INTERACTING,this._tasks=new F.Z,this._runQueue=new F.Z,this._load=0,this._idleStateCallbacks=new F.Z,this._idleUpdatesStartFired=!1,this._maxReschedule=32,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,v.YP)((()=>q.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),v.nn);for(const e of Object.keys(Y))this.performanceInfo.tasks.set(Y[e],new b.Z(Y[e]));const e=this;this._test={FRAME_SAFETY_BUDGET:Z,INTERACTING_BUDGET:J,IDLE_BUDGET:$,get availableBudget(){return e._budget.budget},usedBudget:0,getBudget:()=>e._budget,setBudget:t=>e._budget=t,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}get updating(){return this._updating.get()}set updating(e){this._updating.set(e)}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,a.hw)(this._debugHandle),this._microTaskQueued=!1,this._updating.set(!1)}activate(){this._budget.done||this._microTaskQueued||(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.done||(this._maxReschedule=32,this._schedule(),this.frame()))})))}registerTask(e,s){const i=W(e),r=new t(this,e,s,i);return this._tasks.push(r),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new b.Z(e)),r}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===H.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===H.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==H.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}updateBudget(e){this._test.usedBudget=0,++this._frameNumber;let t=Z,s=e.frameDuration,i=z;switch(this.state){case H.IDLE:t=(0,C.HA)(0),s=(0,C.HA)(Math.max($,e.frameDuration)),i=X;break;case H.INTERACTING:s=(0,C.HA)(Math.max(J,e.frameDuration));case H.ANIMATING:}return s=(0,C.HA)(s-e.elapsedFrameTime-t),this.state!==H.IDLE&&s<z&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,C.HA)(Math.max(s,i)),this._budget.reset(s,this.state),this._maxReschedule=32,this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case H.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case H.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset((0,C.HA)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e)}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return ee.SCHEDULED;let t=ee.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=ee.READY:t!==ee.READY&&(t=ee.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){if(this._maxReschedule<=0)return!1;for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{!s.needsUpdate||0===s.schedulePriority||0===s.basePriority||s.task.runOncePerFrame&&s.lastFrameRun===this._frameNumber||(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this._updating.set(!1),!1;--this._maxReschedule}return this._updating.set(!0),!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)}catch(e){x.Z.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e)}s.schedulePriority=s.basePriority,s.lastFrameRun=this._frameNumber;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._debug&&this._budget.elapsed>2*this._budget.budget&&console.log("Task",s.name,"used",this._budget.elapsed,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return this._updating.set(this._tasks.some((e=>e.needsUpdate))),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this._updating.set(this._tasks.some((e=>e.needsUpdate))),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(Y))this._frameTaskTimes.set(Y[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){return this._test}};class t{constructor(e,t,s,i){this._scheduler=e,this.name=t,this._basePriority=i,this.lastFrameRun=0,this.runtime=0,this._queue=new L,this._handles=new w.Z,this.schedulePriority=this._basePriority,this._task=new P((0,a.pC)(s)?s:this._queue),this._handles.add((0,v.gx)((()=>this.task.running),(()=>e.activate())))}get task(){return this._task.get()}get updating(){return this._queue.running}remove(){this.processQueue(te),this._scheduler.removeTask(this),this.schedule=se.schedule,this.reschedule=se.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=W(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){this._queue.runTask(e)}}class s{constructor(){this._begin="undefined"!=typeof performance?performance.now():0,this._budget=0,this._state=H.IDLE,this._done=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){this._done=this.elapsed>=this._budget&&this._enabled}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this._done=!1}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return performance.now()-this._begin}resetProgress(){this._done=!1}get hasProgressed(){return this._done}}e.Budget=s}(K||(K={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(ee||(ee={}));const te=(()=>{const e=new K.Budget;return e.enabled=!1,e})(),se=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,N.Hc)(t)){const e=(0,N.zE)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,N.gx)(e(te))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}},ie="feature-store:unsupported-query",re=new u.WJ(2e6);let ne=0;class ae{constructor(e){this.capabilities={query:y.g},this.geometryType=e.geometryType,this.hasM=e.hasM,this.hasZ=e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new u.Xq(ne+++"$$",re)),this.fieldsIndex=new R.Z(e.fields),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=(0,a.hw)(this._frameTask),this.clearCache(),(0,a.SC)(this._geometryQueryCache),this._changeHandle=(0,a.hw)(this._changeHandle),(0,a.SC)(this.fieldsIndex)}get featureAdapter(){return this.featureStore.featureAdapter}get fullExtent(){const e=this.featureStore.fullBounds;return(0,a.Wi)(e)?null:{xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:(0,T.S2)(this.spatialReference)}}get timeExtent(){return this.timeInfo?(this._timeExtent||(this._timeExtent=(0,S.R)(this.timeInfo,this.featureStore)),this._timeExtent):null}clearCache(){this._geometryQueryCache?.clear(),this._allItems=null,this._timeExtent=null}async executeQuery(e,t){try{return(await this._executeQuery(e,{},t)).createQueryResponse()}catch(t){if(t!==T.vF)throw t;return new E.y([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},t)).createQueryResponseForCount()}catch(e){if(e!==T.vF)throw e;return 0}}async executeQueryForExtent(e,t){const s=e.outSR;try{const i=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),r=i.size;if(!r)return{count:0,extent:null};(0,l.t8)(oe,l.Gv),this.featureStore.forEachBounds(i.items,(e=>(0,l.TC)(oe,e)),ue);const n={xmin:oe[0],ymin:oe[1],xmax:oe[3],ymax:oe[4],spatialReference:(0,T.S2)(this.spatialReference)};this.hasZ&&isFinite(oe[2])&&isFinite(oe[5])&&(n.zmin=oe[2],n.zmax=oe[5]);const a=(0,g.iV)(n,i.spatialReference,s);if(a.spatialReference=(0,T.S2)(s||this.spatialReference),a.xmax-a.xmin==0){const e=(0,o.c9)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin==0){const e=(0,o.c9)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(this.hasZ&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin==0){const e=(0,o.c9)(a.spatialReference);a.zmin-=e,a.zmax+=e}return{count:r,extent:a}}catch(e){if(e===T.vF)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){try{const s=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),i=s.items,r=new Set;return await this._reschedule((()=>{for(const e of i)r.add(s.featureAdapter.getObjectId(e))}),t),r}catch(e){if(e===T.vF)return new Set;throw e}}async executeQueryForSnapping(e,t){const{point:s,distance:i,types:r}=e;if(r===E.r.NONE)return{candidates:[]};const n=await this._reschedule((()=>this._checkQuerySupport(e.query)),t),u=!(0,p.fS)(s.spatialReference,this.spatialReference);u&&await(0,g._W)(s.spatialReference,this.spatialReference);const o="number"==typeof i?i:i.x,l="number"==typeof i?i:i.y,h={xmin:s.x-o,xmax:s.x+o,ymin:s.y-l,ymax:s.y+l,spatialReference:s.spatialReference},c=u?(0,g.iV)(h,this.spatialReference):h;if(!c)return{candidates:[]};const f=(await(0,_.aX)((0,d.im)(s),null,{signal:t}))[0],m=(await(0,_.aX)((0,d.im)(c),null,{signal:t}))[0];if((0,a.Wi)(f)||(0,a.Wi)(m))return{candidates:[]};const y=new E.y(this._searchFeatures(this._getQueryBBoxes(m.toJSON())),n,this);await this._reschedule((()=>this._executeObjectIdsQuery(y)),t),await this._reschedule((()=>this._executeTimeQuery(y)),t),await this._reschedule((()=>this._executeAttributesQuery(y)),t);const I=f.toJSON(),S=u?(0,g.iV)(I,this.spatialReference):I,T=u?Math.max(c.xmax-c.xmin,c.ymax-c.ymin)/2:i;return y.createSnappingResponse({...e,point:S,distance:T},s.spatialReference)}async executeQueryForLatestObservations(e,t){if(!this.timeInfo||!this.timeInfo.trackIdField)throw new r.Z(ie,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const s=await this._executeQuery(e,{},t);return await this._reschedule((()=>this._filterLatest(s)),t),s.createQueryResponse()}catch(t){if(t!==T.vF)throw t;return new E.y([],e,this).createQueryResponse()}}async executeQueryForSummaryStatistics(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,s){const{field:i,field2:r,field3:n,valueExpression:a}=t;return(await this._getQueryEngineResultForStats(e,{field:i,field2:r,field3:n,valueExpression:a},s)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createHistogramResponse(t)}async _schedule(e,t){return(0,a.pC)(this._frameTask)?this._frameTask.schedule(e,t):e(te)}async _reschedule(e,t){return(0,a.pC)(this._frameTask)?this._frameTask.reschedule(e,t):e(te)}_getAll(e){return(0,a.Wi)(this._allItems)&&(this._allItems=this.featureStore.toArray()),new E.y(this._allItems,e,this)}async _executeQuery(e,t,s){e=(0,n.d9)(e),e=await this._schedule((()=>(0,T.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkQuerySupport(e)),s),e={...e,...t};const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}async _executeSceneFilterQuery(e,t){if((0,a.Wi)(e.sceneFilter))return null;const{outSR:s,returnGeometry:i,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,u=e.sceneFilter.geometry,o=(0,a.Wi)(n)||(0,p.fS)(n,u.spatialReference)?u:(0,g.iV)(u,n);if(!o)return null;const l=i||r,h=(0,p.JY)(s)&&!(0,p.fS)(this.spatialReference,s)&&l?async e=>this._project(e,s):e=>e,c=this.featureAdapter,d=this._searchFeatures(this._getQueryBBoxes(o));if("disjoint"===e.sceneFilter.spatialRelationship){if(!d.length)return null;const s=new Set;for(const e of d)s.add(c.getObjectId(e));const i=await this._reschedule((()=>this.featureStore.toArray()),t);return h(await this._reschedule((async()=>{const r=await(0,I.cW)("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(i,(e=>!s.has(c.getObjectId(e))||r(c.getGeometry(e))),t);return new E.y(n,e,this)}),t))}if(!d.length)return new E.y([],e,this);if(this._canExecuteSinglePass(o,e))return h(new E.y(d,e,this));const _=await(0,I.cW)("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),f=await this._runSpatialFilter(d,(e=>_(c.getGeometry(e))),t);return h(new E.y(f,e,this))}async _executeGeometryQuery(e,t,s){if((0,a.pC)(t)&&0===t.items.length)return t;e=(0,a.pC)(t)?t.query:e;const{geometry:r,outSR:n,spatialRel:u,returnGeometry:o,returnCentroid:l}=e,h=this.featureStore.featureSpatialReference,c=!r||(0,a.Wi)(h)||(0,p.fS)(h,r.spatialReference)?r:(0,g.iV)(r,h),d=o||l,_=(0,p.JY)(n)&&!(0,p.fS)(this.spatialReference,n),f=this._geometryQueryCache&&(0,a.Wi)(t)?_&&d?JSON.stringify({originalFilterGeometry:r,spatialRelationship:u,outSpatialReference:n}):JSON.stringify({originalFilterGeometry:r,spatialRelationship:u}):null,m=f?this._geometryQueryCache.get(f):null;if((0,a.pC)(m))return new E.y(m,e,this);const y=async e=>(_&&d&&await this._project(e,n),f&&this._geometryQueryCache.put(f,e.items,e.items.length+1),e);if(!c)return y((0,a.pC)(t)?t:this._getAll(e));const S=this.featureAdapter;let T=this._searchFeatures(this._getQueryBBoxes(r));if("esriSpatialRelDisjoint"===u){if(!T.length)return y((0,a.pC)(t)?t:this._getAll(e));const i=new Set;for(const e of T)i.add(S.getObjectId(e));const r=(0,a.pC)(t)?t.items:await this._reschedule((()=>this.featureStore.toArray()),s),n=await this._reschedule((async()=>{const t=await(0,I.cW)(u,c,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(r,(e=>!i.has(S.getObjectId(e))||t(S.getGeometry(e))),s);return new E.y(n,e,this)}),s);return y(n)}if((0,a.pC)(t)){const e=new i.SO;T=T.filter((s=>(0,i.cq)(t.items,s,t.items.length,e)>=0))}if(!T.length){const t=new E.y([],e,this);return f&&this._geometryQueryCache.put(f,t.items,1),t}if(this._canExecuteSinglePass(c,e))return y(new E.y(T,e,this));const R=await(0,I.cW)(u,c,this.geometryType,this.hasZ,this.hasM),A=await this._runSpatialFilter(T,(e=>R(S.getGeometry(e))),s);return y(new E.y(A,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds||!e.query.aggregateIds.length||(0,a.Wi)(this.aggregateAdapter))return;const t=new Set;for(const s of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds||!e.query.objectIds.length)return;const t=new Set(e.query.objectIds),s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,S.y)(this.timeInfo,e.query.timeExtent,this.featureAdapter);(0,a.Wi)(t)||(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,m.Jc)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async _runSpatialFilter(e,t,s){if(!t)return e;if((0,a.Wi)(this._frameTask))return e.filter((e=>t(e)));let i=0;const r=new Array,n=async a=>{for(;i<e.length;){const u=e[i++];t(u)&&(r.push(u),a.madeProgress()),a.done&&await this._reschedule((e=>n(e)),s)}};return this._reschedule((e=>n(e)),s).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:s,endTimeField:i}=this.timeInfo,r=i||s,n=new Map,a=this.featureAdapter.getAttribute;for(const s of e.items){const e=a(s,t),i=a(s,r),u=n.get(e);(!u||i>a(u,r))&&n.set(e,s)}e.items=Array.from(n.values())}_canExecuteSinglePass(e,t){const{spatialRel:s}=t;return(0,I.hN)(e)&&("esriSpatialRelEnvelopeIntersects"===s||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===s||"esriSpatialRelContains"===s||"esriSpatialRelWithin"===s))}async _project(e,t){if(!t||(0,p.fS)(this.spatialReference,t))return e;const s=this.featureAdapter,i=await(0,g.oj)(e.items.map((e=>(0,T.Op)(this.geometryType,this.hasZ,this.hasM,s.getGeometry(e)))),this.spatialReference,t);return e.items=i.map(((t,i)=>s.cloneWithGeometry(e.items[i],(0,f.GH)(t,this.hasZ,this.hasM)))),e}_getQueryBBoxes(e){if((0,I.hN)(e)){if((0,d.YX)(e))return[(0,h.al)(e.xmin,e.ymin,e.xmax,e.ymax)];if((0,d.oU)(e))return e.rings.map((e=>(0,h.al)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,c.$P)((0,h.Ue)(),e)]}_searchFeatures(e){for(const t of e)this.featureStore.forEachInBounds(t,(e=>le.add(e)));const t=Array.from(le.values());return le.clear(),t}async _checkStatisticsSupport(e,t){if(e.distance<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new r.Z(ie,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),Promise.all([this._checkStatisticsParamsSupport(t),(0,I.P0)(e,this.geometryType,this.spatialReference),(0,g._W)(this.spatialReference,e.outSR)]).then((()=>e))}async _checkStatisticsParamsSupport(e){let t=[];if(e.valueExpression){const{arcadeUtils:s}=await(0,A.LC)();t=s.extractFieldNames(e.valueExpression)}if(e.field&&t.push(e.field),e.field2&&t.push(e.field2),e.field3&&t.push(e.field3),e.normalizationField&&t.push(e.normalizationField),!t.length)throw new r.Z(ie,"params should have at least a field or valueExpression",{params:e});(0,m.Of)(this.fieldsIndex,t,"params contains missing fields")}async _checkQuerySupport(e){if(e.distance<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new r.Z(ie,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),this._checkStatisticsQuerySupport(e),Promise.all([(0,I.P0)(e,this.geometryType,this.spatialReference),(0,g._W)(this.spatialReference,e.outSR)]).then((()=>e))}_checkAttributesQuerySupport(e){const{outFields:t,orderByFields:s,returnDistinctValues:i,outStatistics:n}=e,a=n?n.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(s&&s.length>0){const e=" asc",t=" desc",i=s.map((s=>{const i=s.toLowerCase();return i.includes(e)?i.split(e)[0]:i.includes(t)?i.split(t)[0]:s})).filter((e=>!a.includes(e)));(0,m.Of)(this.fieldsIndex,i,"orderByFields contains missing fields")}if(t&&t.length>0)(0,m.Of)(this.fieldsIndex,t,"outFields contains missing fields");else if(i)throw new r.Z(ie,"outFields should be specified for returnDistinctValues",{query:e});(0,m.hO)(this.fieldsIndex,e.where)}_checkStatisticsQuerySupport(e){const{outStatistics:t,groupByFieldsForStatistics:s,having:i}=e,n=s&&s.length,a=t&&t.length;if(i){if(!n||!a)throw new r.Z(ie,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:e});(0,m.z4)(this.fieldsIndex,i,t)}if(a){if(!function(e){return e.every((e=>"exceedslimit"!==e.statisticType))}(t))return;const i=t.map((e=>e.onStatisticField)).filter(Boolean);(0,m.Of)(this.fieldsIndex,i,"onStatisticFields contains missing fields"),n&&(0,m.Of)(this.fieldsIndex,s,"groupByFieldsForStatistics contains missing fields");for(const s of t){const{onStatisticField:t,statisticType:i}=s;if("percentile_disc"!==i&&"percentile_cont"!==i||!("statisticParameters"in s)){if("count"!==i&&t&&(0,m.G3)(t,this.fieldsIndex))throw new r.Z(ie,"outStatistics contains non-numeric fields",{definition:s,query:e})}else{const{statisticParameters:t}=s;if(!t)throw new r.Z(ie,"statisticParamters should be set for percentile type",{definition:s,query:e})}}}}async _getQueryEngineResultForStats(e,t,s){e=(0,n.d9)(e);try{e=await this._schedule((()=>(0,T.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkStatisticsSupport(e,t)),s);const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}catch(t){if(t!==T.vF)throw t;return new E.y([],e,this)}}}const ue=(0,l.Ue)(),oe=(0,l.Ue)(),le=new Set},61159:(e,t,s)=>{s.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},10402:(e,t,s)=>{s.d(t,{hN:()=>R,P0:()=>T,cW:()=>S});var i=s(20102),r=s(54102),n=s(87416),a=s(33955),u=s(8744);function o(e,t){return e?t?4:3:t?3:2}function l(e,t,s,i,r,n){const a=o(r,n),{coords:u,lengths:l}=i;if(!l)return!1;for(let i=0,r=0;i<l.length;i++,r+=a)if(!h(e,t,s,u[r],u[r+1]))return!1;return!0}function h(e,t,s,i,r){if(!e)return!1;const n=o(t,s),{coords:a,lengths:u}=e;let l=!1,h=0;for(const e of u)l=c(l,a,n,h,e,i,r),h+=e*n;return l}function c(e,t,s,i,r,n,a){let u=e,o=i;for(let e=i,l=i+r*s;e<l;e+=s){o=e+s,o===l&&(o=i);const r=t[e],h=t[e+1],c=t[o],d=t[o+1];(h<a&&d>=a||d<a&&h>=a)&&r+(a-h)/(d-h)*(c-r)<n&&(u=!u)}return u}var d=s(98732),_=s(5428),p=s(37427),f=s(11490);const m="feature-store:unsupported-query",g={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},y={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},E={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},I={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1};function S(e,t,i,u,o){if((0,a.oU)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Uy)(new _.Z,t,!1,!1);return Promise.resolve((t=>function(e,t,s,i){return h(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)))}if((0,a.oU)(t)&&"esriGeometryMultipoint"===i){const s=(0,d.Uy)(new _.Z,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>l(s,!1,!1,e,u,o)))}if((0,a.YX)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,r.aV)(t,(0,f.Op)(i,u,o,e))));if((0,a.YX)(t)&&"esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,r.lQ)(t,(0,f.Op)(i,u,o,e))));if((0,a.YX)(t)&&"esriSpatialRelIntersects"===e){const e=function(e){return"mesh"===e?n.h_:(0,n.IY)(e)}(i);return Promise.resolve((s=>e(t,(0,f.Op)(i,u,o,s))))}return Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)).then((s=>{const r=s[g[e]].bind(null,t.spatialReference,t);return e=>r((0,f.Op)(i,u,o,e))}))}async function T(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===y[e]}(r))throw new i.Z(m,"Unsupported query spatial relationship",{query:e});if((0,u.JY)(n.spatialReference)&&(0,u.JY)(s)){if(!function(e){return null!=e&&!0===E[(0,a.Ji)(e)]}(n))throw new i.Z(m,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===I[e]}(t))throw new i.Z(m,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,p._W)(e.geometry&&e.geometry.spatialReference,e.outSR)}}}function R(e){if((0,a.YX)(e))return!0;if((0,a.oU)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},17590:(e,t,s)=>{function i(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:i,endTimeField:r}=e;let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(i&&r)t.forEach((e=>{const t=s.getAttribute(e,i),u=s.getAttribute(e,r);null==t||isNaN(t)||(n=Math.min(n,t)),null==u||isNaN(u)||(a=Math.max(a,u))}));else{const e=i||r;t.forEach((t=>{const i=s.getAttribute(t,e);null==i||isNaN(i)||(n=Math.min(n,i),a=Math.max(a,i))}))}return{start:n,end:a}}function r(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;return null===n&&null===a?null:void 0===n&&void 0===a?()=>!1:i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e.getAttribute(n,t),u=e.getAttribute(n,s);return(null==a||a<=r)&&(null==u||u>=i)}:null!=i?t=>{const r=e.getAttribute(t,s);return null==r||r>=i}:null!=r?s=>{const i=e.getAttribute(s,t);return null==i||i<=r}:void 0}(s,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e.getAttribute(i,t)===s:null!=s&&null!=i?r=>{const n=e.getAttribute(r,t);return n>=s&&n<=i}:null!=s?i=>e.getAttribute(i,t)>=s:null!=i?s=>e.getAttribute(s,t)<=i:void 0}(s,i||r,n,a)}s.d(t,{R:()=>i,y:()=>r})}}]);
|