@arcgis/core 4.31.0-next.20240921 → 4.31.0-next.20240923
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/1810cb638ca1d52de7b2.js +1 -0
- package/assets/esri/core/workers/chunks/{69f6f35b04c722aba8cf.js → 238897e72fedd6754af7.js} +1 -1
- package/assets/esri/core/workers/chunks/2807eb7bfe4868fe840f.js +1 -0
- package/assets/esri/core/workers/chunks/{6c07116c8f7361780803.js → 2b04d2f8466d16a24a80.js} +1 -1
- package/assets/esri/core/workers/chunks/{83649583139b818d4dfa.js → 356f6cc122287412b888.js} +1 -1
- package/assets/esri/core/workers/chunks/36a1de3752ff13d77b4d.js +1 -0
- package/assets/esri/core/workers/chunks/{bf406a46515d5dfebe06.js → 3d207d1c6effda13b448.js} +1 -1
- package/assets/esri/core/workers/chunks/460ae228640fd5e545ad.js +1 -0
- package/assets/esri/core/workers/chunks/{f14cefc311a21116d21b.js → 4c0d37b799edae391ab2.js} +1 -1
- package/assets/esri/core/workers/chunks/{16eda85f728423c4ed02.js → 4ea08495271f6d291b05.js} +1 -1
- package/assets/esri/core/workers/chunks/{cf147f34032a8d07f322.js → 53becb5fe10f7f38311f.js} +1 -1
- package/assets/esri/core/workers/chunks/{24d45530fe47b3114daf.js → 5652ff08dcc5afd3d739.js} +1 -1
- package/assets/esri/core/workers/chunks/5fe1f8881959df0e61ce.js +1 -0
- package/assets/esri/core/workers/chunks/62f4eda8a9f4de481dcb.js +1 -0
- package/assets/esri/core/workers/chunks/{3fa3e1e6595668ca0e18.js → 686613864dd54d1cae3c.js} +1 -1
- package/assets/esri/core/workers/chunks/{5d0d36230a5b8309c9e4.js → 75bf6dff29056a5a1242.js} +1 -1
- package/assets/esri/core/workers/chunks/{a7bd5bb21a7f3030ee13.js → 783d66397f16899dd0e9.js} +1 -1
- package/assets/esri/core/workers/chunks/7bc57e2a3836ddc8f121.js +1 -0
- package/assets/esri/core/workers/chunks/{2658205b1ab2502c0bc7.js → 856c82a20027435fd306.js} +1 -1
- package/assets/esri/core/workers/chunks/{99944b05d3142903511c.js → 93fb720bbfb3628f9c71.js} +1 -1
- package/assets/esri/core/workers/chunks/{14f77efbfba0ca9efb6c.js → 9dce33a9bcfb852a74d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{de7e197223471c7b66a7.js → afb35deb035c9c9225c9.js} +1 -1
- package/assets/esri/core/workers/chunks/{5f9beed2a9599b9ce649.js → bc37c0dc14ea54f1b9e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{35f92652df2561845d47.js → c9aa8df2f62e6d40b771.js} +1 -1
- package/assets/esri/core/workers/chunks/d8435cc010bd2260feec.js +1 -0
- package/assets/esri/core/workers/chunks/e5a8ab8d02a616469f1d.js +1 -0
- package/assets/esri/core/workers/chunks/f1446e56c35e59b904e1.js +1 -0
- package/assets/esri/core/workers/chunks/{6508ff21b0a5725629eb.js → fa3f9691a9bd1bbb25d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{008f290833724454160d.js → fab59ee41f96b2378768.js} +1 -1
- package/assets/esri/core/workers/chunks/{67ea066a903f5ad31155.js → fe709db8238127f91e59.js} +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/core/utils.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/interactive/sketch/constraintUtils.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0eb789af3c26fecdf3be.js +0 -1
- package/assets/esri/core/workers/chunks/41a3c7d286a050002d20.js +0 -1
- package/assets/esri/core/workers/chunks/59e4731d246203e94a96.js +0 -1
- package/assets/esri/core/workers/chunks/69c09478c899cd5e5013.js +0 -1
- package/assets/esri/core/workers/chunks/7088f771163fda53d196.js +0 -1
- package/assets/esri/core/workers/chunks/79ed119c70ce6ea02f71.js +0 -1
- package/assets/esri/core/workers/chunks/b5c02dbf540ededb863c.js +0 -1
- package/assets/esri/core/workers/chunks/eeacd5fa9fb9b1dee5f7.js +0 -1
- package/assets/esri/core/workers/chunks/f7c96d34c70ed36da7c2.js +0 -1
- package/assets/esri/core/workers/chunks/f9e90a2fda559ca68848.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6493,7136],{39516:(e,t,n)=>{async function r(e,t){const{WhereClause:r}=await Promise.all([n.e(835),n.e(4800)]).then(n.bind(n,50835));return r.create(e,{fieldsIndex:t})}function o(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}n.d(t,{G:()=>r,m:()=>o})},17136:(e,t,n)=>{n.d(t,{el:()=>A});var r=n(92602),o=n(49186),s=n(53966),i=n(39829),l=n(82799),a=n(80754),p=n(21325),u=n(28735),c=(n(59456),n(78888)),y=n(65864),h=n(2272),f=n(84952),d=n(92300);const m=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function v(e){return"polyline"===e[0].type}function w(e,t,n){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof i.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m().error(e),new o.A(e)}const n=(0,a.r8)(e),r=[];for(const e of n){const n=[];r.push(n),n.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const o=e[r][0],s=e[r][1],i=e[r+1][0],l=e[r+1][1],a=Math.sqrt((i-o)*(i-o)+(l-s)*(l-s)),p=(l-s)/a,u=(i-o)/a,c=a/t;if(c>1){for(let e=1;e<=c-1;e++){const r=e*t,i=u*r+o,l=p*r+s;n.push([i,l])}const e=(a+Math.floor(c-1)*t)/2,r=u*e+o,i=p*e+s;n.push([r,i])}n.push([i,l])}}return function(e){return"polygon"===e.type}(e)?new i.A({rings:r,spatialReference:e.spatialReference}):new l.A({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.ci)(t,!0)}return n&&(e=(0,a.kS)(e,n)),e}function x(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,a.kd)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,a.kd)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,a.kd)(r,t);e=e.clone().offset(n*(-2*t),0)}else if(r<n){const t=(0,a.kd)(r,n);e=e.clone().offset(t*(-2*n),0)}}return e}function _(e,t){let n=-1;for(let r=0;r<t.cutIndexes.length;r++){const o=t.cutIndexes[r],s=t.geometries[r],i=(0,a.r8)(s);for(let e=0;e<i.length;e++){const t=i[e];t.some((n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const r=t[e][0];n=r>n?r:n}n=Number(n.toFixed(9));const r=-360*(0,a.kd)(n,180);for(let n=0;n<t.length;n++){const t=s.getPoint(e,n);s.setPoint(e,n,t.clone().offset(r,0))}return!0}}))}if(o===n){if(g(e))for(const t of(0,a.r8)(s))e[o]=e[o].addRing(t);else if(v(e))for(const t of(0,a.r8)(s))e[o]=e[o].addPath(t)}else n=o,e[o]=s}return e}async function A(e,t,n){if(!Array.isArray(e))return A([e],t);t&&"string"!=typeof t&&m().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??r.A.geometryServiceUrl;let s,g,v,M,b,R,S,N,j=0;const T=[],V=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,g=(0,p.Vp)(s),v=s.isWebMercator,R=v?102100:4326,M=a.j7[R].maxX,b=a.j7[R].minX,S=a.j7[R].plus180Line,N=a.j7[R].minus180Line),g)if("mesh"===t.type)V.push(t);else if("point"===t.type)V.push(x(t.clone(),M,b));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>x(e,M,b))),V.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);V.push(e.rings?new i.A(e):e)}else if(t.extent){const e=t.extent,n=(0,a.kd)(e.xmin,b)*(2*M);let r=0===n?t.clone():(0,a.kS)(t.clone(),n);e.offset(n,0);let{xmin:o,xmax:s}=e;o=Number(o.toFixed(9)),s=Number(s.toFixed(9)),e.intersects(S)&&s!==M?(j=s>j?s:j,r=w(r,v),T.push(r),V.push("cut")):e.intersects(N)&&o!==b?(j=s*(2*M)>j?s*(2*M):j,r=w(r,v,360),T.push(r),V.push("cut")):V.push(r)}else V.push(t.clone());else V.push(t);else V.push(t);let O=(0,a.kd)(j,M),J=-90;const $=O,G=new l.A;for(;O>0;){const e=360*O-180;G.addPath([[e,J],[e,-1*J]]),J*=-1,O--}if(T.length>0&&$>0){const t=_(T,await async function(e,t,n,r){const o=(0,h.Dl)(e),s=t[0].spatialReference,i={...r,responseType:"json",query:{...o.query,f:"json",sr:(0,p.YX)(s),target:JSON.stringify({geometryType:(0,y.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},l=await(0,c.A)(o.path+"/cut",i),{cutIndexes:a,geometries:u=[]}=l.data;return{cutIndexes:a,geometries:u.map((e=>{const t=(0,y.rS)(e);return t.spatialReference=s,t}))}}(o,T,G,n)),r=[],s=[];for(let n=0;n<V.length;n++){const o=V[n];if("cut"!==o)s.push(o);else{const o=t.shift(),i=e[n];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&o.rings.length>=i.rings.length?(r.push(o),s.push("simplify")):s.push(v?(0,u.Gh)(o):o)}}if(!r.length)return s;const i=await async function(e,t,n){const r="string"==typeof e?(0,f.An)(e):e,o=t[0].spatialReference,s=(0,y.$B)(t[0]),i={...n,query:{...r.query,f:"json",sr:(0,p.YX)(o),geometries:JSON.stringify((0,d.X)(t))}},{data:l}=await(0,c.A)(r.path+"/simplify",i);return(0,d.V)(l.geometries,s,o)}(o,r,n),l=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?l.push(t):l.push(v?(0,u.Gh)(i.shift()):i.shift())}return l}const z=[];for(let e=0;e<V.length;e++){const t=V[e];if("cut"!==t)z.push(t);else{const e=T.shift();z.push(!0===v?(0,u.Gh)(e):e)}}return z}},80754:(e,t,n)=>{n.d(t,{j7:()=>i,kS:()=>a,kd:()=>l,r8:()=>p});var r=n(82799),o=n(16930),s=n(65864);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function a(e,t){const n=p(e);for(const e of n)for(const n of e)n[0]+=t;return e}function p(e){return(0,s.Bi)(e)?e.rings:e.paths}},94194:(e,t,n)=>{n.d(t,{A:()=>x});var r=n(90237),o=n(10107),s=(n(44208),n(53966),n(87811),n(40608)),i=n(5503),l=n(62885);let a=class extends i.A{constructor(e){super(e),this.addHandles([this.on("before-add",(e=>{null==e.item&&e.preventDefault()})),this.on("after-add",(e=>this._own(e.item))),this.on("after-remove",(e=>this._release(e.item)))])}get owner(){return this._get("owner")}set owner(e){e!==this._get("owner")&&(this._releaseAll(),this._set("owner",e),this._ownAll())}_ownAll(){for(const e of this.items)this._own(e)}_releaseAll(){for(const e of this.items)this._release(e)}_createNewInstance(e){return this.itemType?new(i.A.ofType(this.itemType.Type))(e):new i.A(e)}};(0,r._)([(0,o.M)()],a.prototype,"owner",null),a=(0,r._)([(0,s.$)("esri.core.support.OwningCollection")],a);var p=n(4146),u=n(63074),c=n(25036),y=n(52106),h=n(56507),f=(n(49186),n(7695));let d=class extends a{_own(e){e.layer&&"remove"in e.layer&&e.layer!==this.owner&&e.layer.remove(e),e.layer=this.owner}_release(e){e.layer===this.owner&&(e.layer=null)}};(0,r._)([(0,f.u)({Type:y.A,ensureType:(0,h.dp)(y.A)})],d.prototype,"itemType",void 0),d=(0,r._)([(0,s.$)("esri.support.GraphicsCollection")],d);var m=n(88625);let g=class extends((0,u.dM)((0,c.j)(p.A))){constructor(e){super(e),this.elevationInfo=null,this.graphics=new d,this.screenSizePerspectiveEnabled=!0,this.type="graphics",this.internal=!1}destroy(){this.removeAll(),this.graphics.destroy()}add(e){return this.graphics.add(e),this}addMany(e){return this.graphics.addMany(e),this}removeAll(){return this.graphics.removeAll(),this}remove(e){this.graphics.remove(e)}removeMany(e){this.graphics.removeMany(e)}on(e,t){return super.on(e,t)}graphicChanged(e){this.emit("graphic-update",e)}};var v,w;(0,r._)([(0,o.M)({type:m.A})],g.prototype,"elevationInfo",void 0),(0,r._)([(0,o.M)((v=d,w="graphics",{type:v,cast:l.H,set(e){const t=(0,l.V)(e,this._get(w),v);t.owner=this,this._set(w,t)}}))],g.prototype,"graphics",void 0),(0,r._)([(0,o.M)({type:["show","hide"]})],g.prototype,"listMode",void 0),(0,r._)([(0,o.M)()],g.prototype,"screenSizePerspectiveEnabled",void 0),(0,r._)([(0,o.M)({readOnly:!0})],g.prototype,"type",void 0),(0,r._)([(0,o.M)({constructOnly:!0})],g.prototype,"internal",void 0),g=(0,r._)([(0,s.$)("esri.layers.GraphicsLayer")],g);const x=g},39357:(e,t,n)=>{n.d(t,{H:()=>a});var r,o=n(90237),s=n(25482),i=n(10107),l=(n(44208),n(53966),n(87811),n(40608));let a=r=class extends s.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,o._)([(0,i.M)({type:String,json:{write:!0}})],a.prototype,"name",void 0),(0,o._)([(0,i.M)({type:[String,Number],json:{write:!0}})],a.prototype,"code",void 0),a=r=(0,o._)([(0,l.$)("esri.layers.support.CodedValue")],a)},53177:(e,t,n)=>{n.d(t,{A:()=>y});var r,o=n(90237),s=n(4718),i=n(10107),l=(n(44208),n(53966),n(93223)),a=n(40608),p=n(39357),u=n(76357);let c=r=class extends u.A{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new r({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,o._)([(0,i.M)({type:[p.H],json:{write:!0}})],c.prototype,"codedValues",void 0),(0,o._)([(0,l.e)({codedValue:"coded-value"})],c.prototype,"type",void 0),c=r=(0,o._)([(0,a.$)("esri.layers.support.CodedValueDomain")],c);const y=c},76357:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(90237),o=n(66552),s=n(25482),i=n(10107),l=(n(44208),n(53966),n(87811),n(93223)),a=n(40608);const p=new o.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends s.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,r._)([(0,i.M)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,r._)([(0,l.e)(p)],u.prototype,"type",void 0),u=(0,r._)([(0,a.$)("esri.layers.support.Domain")],u);const c=u},20437:(e,t,n)=>{n.d(t,{A:()=>m});var r,o=n(90237),s=n(66552),i=n(25482),l=n(10107),a=n(56507),p=(n(87811),n(44208),n(93223)),u=n(36005),c=n(40608),y=n(80451),h=n(98453);const f=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let d=r=class extends i.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?f.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,l.M)({type:String,json:{write:!0}})],d.prototype,"alias",void 0),(0,o._)([(0,l.M)({type:[String,Number],json:{write:{allowNull:!0}}})],d.prototype,"defaultValue",void 0),(0,o._)([(0,l.M)()],d.prototype,"description",void 0),(0,o._)([(0,u.w)("description")],d.prototype,"readDescription",null),(0,o._)([(0,l.M)({types:y.gK,json:{read:{reader:y.rS},write:!0}})],d.prototype,"domain",void 0),(0,o._)([(0,l.M)({type:Boolean,json:{write:!0}})],d.prototype,"editable",void 0),(0,o._)([(0,l.M)({type:a.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],d.prototype,"length",void 0),(0,o._)([(0,l.M)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,o._)([(0,l.M)({type:Boolean,json:{write:!0}})],d.prototype,"nullable",void 0),(0,o._)([(0,p.e)(h.m)],d.prototype,"type",void 0),(0,o._)([(0,l.M)()],d.prototype,"valueType",void 0),(0,o._)([(0,u.w)("valueType",["description"])],d.prototype,"readValueType",null),(0,o._)([(0,l.M)({type:Boolean,json:{read:!1}})],d.prototype,"visible",void 0),d=r=(0,o._)([(0,c.$)("esri.layers.support.Field")],d);const m=d},80451:(e,t,n)=>{n.d(t,{rS:()=>m,gK:()=>d}),n(44208);var r,o=n(53177),s=n(76357),i=n(90237),l=(n(53966),n(87811),n(49186),n(93223)),a=n(40608);let p=r=class extends s.A{constructor(e){super(e),this.type="inherited"}clone(){return new r}};(0,i._)([(0,l.e)({inherited:"inherited"})],p.prototype,"type",void 0),p=r=(0,i._)([(0,a.$)("esri.layers.support.InheritedDomain")],p);const u=p;var c,y=n(10107);let h=c=class extends s.A{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new c({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,i._)([(0,y.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]}}}})],h.prototype,"maxValue",void 0),(0,i._)([(0,y.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],h.prototype,"minValue",void 0),(0,i._)([(0,l.e)({range:"range"})],h.prototype,"type",void 0),h=c=(0,i._)([(0,a.$)("esri.layers.support.RangeDomain")],h);const f=h,d={key:"type",base:s.A,typeMap:{range:f,"coded-value":o.A,inherited:u}};function m(e){if(!e?.type)return null;switch(e.type){case"range":return f.fromJSON(e);case"codedValue":return o.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},32730:(e,t,n)=>{n.d(t,{BI:()=>m,D3:()=>f,XJ:()=>d,lc:()=>h,mX:()=>v,rU:()=>g,tH:()=>M});var r=n(799);const o="__begin__",s="__end__",i=new RegExp(o,"ig"),l=new RegExp(s,"ig"),a=new RegExp("^"+o,"i"),p=new RegExp(s+"$","i"),u='"',c=u+" + ",y=" + "+u;function h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function f(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function d(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function m(e){const t=d(e);if(!t)return null;switch(t.type){case"conventional":return v(t.expression);case"arcade":return t.expression}return null}function g(e){const t=d(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return M(t.expression)}return null}function v(e){let t;return e?(t=(0,r.HC)(e,(e=>o+'$feature["'+e+'"]'+s)),t=a.test(t)?t.replace(a,""):u+t,t=p.test(t)?t.replace(p,""):t+u,t=t.replaceAll(i,c).replaceAll(l,y)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,x=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,A=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function M(e){if(!e)return null;let t=x.exec(e)||_.exec(e);return t?t[1]||t[3]:(t=A.exec(e),t?t[2]:null)}},92300:(e,t,n)=>{n.d(t,{V:()=>s,X:()=>o});var r=n(65864);function o(e){return{geometryType:(0,r.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function s(e,t,n){const o=(0,r.xD)(t);return e.map((e=>{const t=o.fromJSON(e);return t.spatialReference=n,t}))}},22671:(e,t,n)=>{n.d(t,{A:()=>w});var r,o=n(90237),s=n(59456),i=n(52106),l=n(66552),a=n(25482),p=n(4718),u=n(10107),c=(n(44208),n(53966),n(36005)),y=n(40608),h=n(43937),f=n(16930),d=n(65864),m=n(20437);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=r=class extends a.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const n=f.A.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const o=e[t],s=i.A.fromJSON(o),l=o.geometry?.spatialReference;null==s.geometry||l||(s.geometry.spatialReference=n);const a=o.aggregateGeometries,p=s.aggregateGeometries;if(a&&null!=p)for(const e in p){const t=p[e],r=a[e],o=r?.spatialReference;null==t||o||(t.spatialReference=n)}r.push(s)}return r}writeGeometryType(e,t,n,r){if(e)return void g.write(e,t,n,r);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void g.write(e.geometry.type,t,n,r)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,r=(0,d.rS)(e);return r&&!n&&t.spatialReference&&(r.spatialReference=f.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,p.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let n=0;n<t.features.length;n++){const r=t.features[n];if(r.geometry){const t=e?.[n];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,n],translate:[r,o]}=e,s=this.features,i=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/n)));for(let e=0,t=s.length;e<t;e++)i?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[r,o],scale:[s,i]}=n;let l=null,a=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;l=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;a=n=>null==n?n:n*t+e}const p=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*i),l,a);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}_quantizePoints(e,t,n){let r,o;const s=[];for(let i=0,l=e.length;i<l;i++){const l=e[i];if(i>0){const e=t(l[0]),i=n(l[1]);e===r&&i===o||(s.push([e-r,i-o]),r=e,o=i)}else r=t(l[0]),o=n(l[1]),s.push([r,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,d.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],i=this._quantizePoints(s,t,n);i&&o.push(i)}return o.length>0?((0,d.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,n);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,r,o){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,d.Bi)(e)?e.rings:e.paths;let i,l;for(let e=0,r=s.length;e<r;e++){const r=s[e];for(let e=0,o=r.length;e<o;e++){const o=r[e];e>0?(i+=o[0],l+=o[1]):(i=o[0],l=o[1]),o[0]=t(i),o[1]=n(l)}}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2]),n[3]=o(n[3])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=o(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let i,l;for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(i+=r[0],l+=r[1]):(i=r[0],l=r[1]),r[0]=t(i),r[1]=n(l)}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2]),t[3]=o(t[3])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,u.M)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o._)([(0,u.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,u.M)({type:[i.A],json:{write:!0}})],v.prototype,"features",void 0),(0,o._)([(0,c.w)("features")],v.prototype,"readFeatures",null),(0,o._)([(0,u.M)({type:[m.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,o._)([(0,u.M)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,o._)([(0,h.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,o._)([(0,u.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o._)([(0,u.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o._)([(0,u.M)({types:s.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o._)([(0,c.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o._)([(0,u.M)({type:f.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,h.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o._)([(0,u.M)({json:{write:!0}})],v.prototype,"transform",void 0),v=r=(0,o._)([(0,y.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const w=v},2272:(e,t,n)=>{n.d(t,{Dl:()=>i,jV:()=>s,lF:()=>l}),n(92602),n(70333);var r=n(4718),o=n(84952);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,o.An)(e):(0,r.o8)(e)}function l(e,t,n){const r={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))r[o]=s.map((e=>l(e)));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(n?.[o]);r[o]=t?e:JSON.stringify(e)}else r[o]=t?s:JSON.stringify(s);else r[o]=s}return r}n(926)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1834],{71903:(e,t,s)=>{var i;s.d(t,{u:()=>i}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(i||(i={}))},69540:(e,t,s)=>{s.d(t,{O:()=>u,P:()=>c});var i=s(90237),n=s(69622),r=(s(44208),s(4718)),o=(s(53966),s(97768)),a=s(35666),l=s(88620),h=s(40608);const u=e=>{let t=class extends e{clone(){const e=(0,l.oY)(this);(0,o.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,s=e.store,i={},n=new Map;for(const e in t){const o=t[e],l=s?.originOf(e),h=o.clonable;if(o.readOnly||!1===h||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const u=this[e];let c=null;c="function"==typeof h?h(u):"reference"===h?u:(0,r.TU)(u),null!=u&&null==c||(l===a.Gr.DEFAULTS?n.set(e,c):i[e]=c)}const h=new(0,Object.getPrototypeOf(this).constructor)(i);if(n.size){const e=(0,l.oY)(h)?.store;if(e)for(const[t,s]of n)e.set(t,s,a.Gr.DEFAULTS)}return h}};return t=(0,i._)([(0,h.$)("esri.core.Clonable")],t),t};let c=class extends(u(n.A)){};c=(0,i._)([(0,h.$)("esri.core.Clonable")],c)},55359:(e,t,s)=>{s.d(t,{q:()=>n});var i=s(57219);class n{constructor(e,t){this._storage=new i.F,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},57219:(e,t,s)=>{s.d(t,{F:()=>a,Mn:()=>o});var i,n,r=s(3694);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.A,this._users=new r.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,o.size,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,n,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,0,i.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(t,new h(s,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,n,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){let n;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,i,s);return"number"==typeof e&&(n=e),!0}return!1})),n}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0;class h{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}},75503:(e,t,s)=>{s.d(t,{E:()=>T,w:()=>o});var i=s(4576),n=(s(44208),s(3694)),r=s(11006);class o{constructor(e=9,t){this._compareMinX=c,this._compareMinY=d,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),x.prune(),S.prune(),b.prune()}all(e){a(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(y(e,s))for(w.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;y(e,o)&&(s.leaf?t(r):g(e,o)?a(r,t):w.push(r))}s=w.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!y(e,t))return!1;for(w.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(y(e,r)){if(t.leaf||g(e,r))return!0;w.push(n)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new F([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(S.clear(),b.clear();s||S.length>0;){if(s||(s=S.pop(),n=S.data[S.length-1],r=b.pop()??0,o=!0),s.leaf&&(t=(0,i.qh)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),S.push(s),this._condense(S),this;o||s.leaf||!g(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(S.push(s),b.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new F(e.slice(t,s+1));return l(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new I([]);o.height=i;const a=Math.ceil(n/r),h=a*Math.ceil(Math.sqrt(r));v(e,t,s,h,this._compareMinX);for(let n=t;n<=s;n+=h){const t=Math.min(n+h-1,s);v(e,n,t,a,this._compareMinY);for(let s=n;s<=t;s+=a){const n=Math.min(s+a-1,t);o.children.push(this._build(e,s,n,i-1))}}return l(o,this._toBBox),o}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);S.clear();const r=function(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=p(o),l=_(e,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}(n,this._data,t,S);for(r.children.push(e),u(r,n);t>=0&&S.data[t].children.length>this._maxEntries;)this._split(S,t),t--;!function(e,t,s){for(let i=s;i>=0;i--)u(t.data[i],e)}(n,S,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return;const o=s.children.splice(r,s.children.length-r),a=s.leaf?new F(o):new I(o);a.height=s.height,l(s,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new I([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,s,this._toBBox),l=m(t,a),u=p(t)+p(a);l<i?(i=l,r=o,n=u<n?u:n):l===i&&u<n&&(n=u,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:c,n=e.leaf?this._compareMinY:d;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=h(e,0,t,n),o=h(e,s-t,s,n);let a=f(r)+f(o);for(let i=t;i<s-t;i++){const t=e.children[i];u(r,e.leaf?n(t):t),a+=f(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];u(o,e.leaf?n(t):t),a+=f(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.qh)(r,s,r.length,n.indexHint),1)}else this.clear();else l(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let s=e;for(x.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else x.pushArray(s.children);s=x.pop()??null}}function l(e,t){h(e,0,e.children.length,t,e)}function h(e,t,s,i,n){n||(n=new F([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],u(n,e.leaf?i(r):r);return n}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function _(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function m(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const w=new n.A,x=new n.A,S=new n.A,b=new n.A({deallocator:void 0});class T{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class E extends T{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class F extends E{constructor(e){super(),this.children=e,this.leaf=!0}}class I extends E{constructor(e){super(),this.children=e,this.leaf=!1}}},36708:(e,t,s)=>{s.d(t,{C_:()=>d,OH:()=>_,Vh:()=>m,on:()=>c,pc:()=>g,wB:()=>l,z7:()=>h}),s(60999),s(5503);var i=s(37955),n=s(36563),r=s(97768),o=s(74887),a=s(14012);function l(e,t,s={}){return u(e,t,s,p)}function h(e,t,s={}){return u(e,t,s,f)}function u(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.xt)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.Cn)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function c(e,t,s,o={}){let a=null,h=null,u=null;function c(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(e){o.once&&o.once&&(0,r.xt)(u),s(e)}const p=l(e,((e,s)=>{c(),(0,i.wb)(e)&&(a=e,h=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return u=(0,n.hA)((()=>{p.remove(),c()})),u}function d(e,t){return function(e,t,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.xt)(a)}return new Promise(((i,r)=>{a=(0,n.vE)([(0,o.u7)(s,(()=>{l(),r((0,o.NK)())})),u(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??p)])}))}(e,f,t)}function p(e){return!0}function f(e){return!!e}s(80559);const _={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},79897:(e,t,s)=>{s.d(t,{U:()=>u});var i=s(90237),n=s(69622),r=s(36563),o=s(36708),a=s(11932),l=s(10107),h=s(40608);let u=class extends n.A{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll()}add(e,t,s={}){return this._installWatch(e,t,s,o.wB)}addWhen(e,t,s={}){return this._installWatch(e,t,s,o.z7)}addOnCollectionChange(e,t,{initial:s=!1,final:i=!1}={}){const n=++this._handleId;return this.addHandles([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.OH),(0,o.on)(e,"change",t,{onListenerAdd:s?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:i?e=>t({added:[],removed:e.toArray()}):void 0})],n),(0,r.hA)((()=>this.removeHandles(n)))}addPromise(e){if(null==e)return e;const t=++this._handleId;this.addHandles((0,r.hA)((()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this.hasHandles(c)||this._set("updating",!1))})),t),this._pendingPromises.add(e),this._set("updating",!0);const s=()=>this.removeHandles(t);return e.then(s,s),e}removeAll(){this._pendingPromises.clear(),this.removeAllHandles(),this._set("updating",!1)}_installWatch(e,t,s={},i){const n=++this._handleId;s.sync||this._installSyncUpdatingWatch(e,n);const o=i(e,t,s);return this.addHandles(o,n),(0,r.hA)((()=>this.removeHandles(n)))}_installSyncUpdatingWatch(e,t){const s=this._createSyncUpdatingCallback(),i=(0,o.wB)(e,s,{sync:!0,equals:()=>!1});return this.addHandles(i,t),i}_createSyncUpdatingCallback(){return()=>{this.removeHandles(c),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this.addHandles((0,a._)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this.removeHandles(c))})),c)}}};(0,i._)([(0,l.M)({readOnly:!0})],u.prototype,"updating",void 0),u=(0,i._)([(0,h.$)("esri.core.support.UpdatingHandles")],u);const c=-42},6518:(e,t,s)=>{s.d(t,{F:()=>a});var i=s(44208),n=s(75503),r=s(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,s)=>{s.d(t,{A:()=>f});var i=s(4576),n=s(49186),r=s(65529),o=s(53966),a=s(70328),l=s(19419),h=s(90708),u=s(6518),c=s(51441),d=s(37730);const p=(0,a.vt)();class f{constructor(e){this.geometryInfo=e,this._boundsStore=new u.F,this._featuresById=new Map,this.events=new r.A,this.featureAdapter=d.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,c.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.Jt)(p,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,h.jQ)(null!=i?i:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,h.jQ)((0,l.vt)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),e}}},37730:(e,t,s)=>{s.d(t,{T:()=>o});var i=s(27647),n=s(43334),r=s(92722);const o={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new n.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,i.Q)(new r.A,e.geometry,t.hasZ,t.hasM)),e.centroid)}},39357:(e,t,s)=>{s.d(t,{H:()=>l});var i,n=s(90237),r=s(25482),o=s(10107),a=(s(44208),s(53966),s(87811),s(40608));let l=i=class extends r.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,o.M)({type:String,json:{write:!0}})],l.prototype,"name",void 0),(0,n._)([(0,o.M)({type:[String,Number],json:{write:!0}})],l.prototype,"code",void 0),l=i=(0,n._)([(0,a.$)("esri.layers.support.CodedValue")],l)},53177:(e,t,s)=>{s.d(t,{A:()=>d});var i,n=s(90237),r=s(4718),o=s(10107),a=(s(44208),s(53966),s(93223)),l=s(40608),h=s(39357),u=s(76357);let c=i=class extends u.A{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const s=String(e);this.codedValues.some((e=>(String(e.code)===s&&(t=e.name),!!t)))}return t}clone(){return new i({codedValues:(0,r.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,o.M)({type:[h.H],json:{write:!0}})],c.prototype,"codedValues",void 0),(0,n._)([(0,a.e)({codedValue:"coded-value"})],c.prototype,"type",void 0),c=i=(0,n._)([(0,l.$)("esri.layers.support.CodedValueDomain")],c);const d=c},76357:(e,t,s)=>{s.d(t,{A:()=>c});var i=s(90237),n=s(66552),r=s(25482),o=s(10107),a=(s(44208),s(53966),s(87811),s(93223)),l=s(40608);const h=new n.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends r.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,o.M)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,i._)([(0,a.e)(h)],u.prototype,"type",void 0),u=(0,i._)([(0,l.$)("esri.layers.support.Domain")],u);const c=u},20437:(e,t,s)=>{s.d(t,{A:()=>m});var i,n=s(90237),r=s(66552),o=s(25482),a=s(10107),l=s(56507),h=(s(87811),s(44208),s(93223)),u=s(36005),c=s(40608),d=s(80451),p=s(98453);const f=new r.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let _=i=class extends o.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?.value??null}readValueType(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?f.fromJSON(s.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,a.M)({type:String,json:{write:!0}})],_.prototype,"alias",void 0),(0,n._)([(0,a.M)({type:[String,Number],json:{write:{allowNull:!0}}})],_.prototype,"defaultValue",void 0),(0,n._)([(0,a.M)()],_.prototype,"description",void 0),(0,n._)([(0,u.w)("description")],_.prototype,"readDescription",null),(0,n._)([(0,a.M)({types:d.gK,json:{read:{reader:d.rS},write:!0}})],_.prototype,"domain",void 0),(0,n._)([(0,a.M)({type:Boolean,json:{write:!0}})],_.prototype,"editable",void 0),(0,n._)([(0,a.M)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],_.prototype,"length",void 0),(0,n._)([(0,a.M)({type:String,json:{write:!0}})],_.prototype,"name",void 0),(0,n._)([(0,a.M)({type:Boolean,json:{write:!0}})],_.prototype,"nullable",void 0),(0,n._)([(0,h.e)(p.m)],_.prototype,"type",void 0),(0,n._)([(0,a.M)()],_.prototype,"valueType",void 0),(0,n._)([(0,u.w)("valueType",["description"])],_.prototype,"readValueType",null),(0,n._)([(0,a.M)({type:Boolean,json:{read:!1}})],_.prototype,"visible",void 0),_=i=(0,n._)([(0,c.$)("esri.layers.support.Field")],_);const m=_},91806:(e,t,s)=>{s.d(t,{A:()=>u});var i,n=s(90237),r=s(25482),o=s(10107),a=s(56507),l=(s(87811),s(44208),s(40608));let h=i=class extends r.oY{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new i({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,n._)([(0,o.M)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"cols",void 0),(0,n._)([(0,o.M)({type:a.jz,json:{write:!0}})],h.prototype,"level",void 0),(0,n._)([(0,o.M)({type:String,json:{write:!0}})],h.prototype,"levelValue",void 0),(0,n._)([(0,o.M)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"origin",void 0),(0,n._)([(0,o.M)({type:Number,json:{write:!0}})],h.prototype,"resolution",void 0),(0,n._)([(0,o.M)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"rows",void 0),(0,n._)([(0,o.M)({type:Number,json:{write:!0}})],h.prototype,"scale",void 0),h=i=(0,n._)([(0,l.$)("esri.layers.support.LOD")],h);const u=h},87045:(e,t,s)=>{s.d(t,{A:()=>T});var i,n=s(90237),r=s(66552),o=s(25482),a=s(83047),l=s(10107),h=s(56507),u=(s(87811),s(44208),s(36005)),c=s(40608),d=s(43937),p=s(86738),f=s(16930),_=s(19419),m=s(21325),g=s(28735),y=s(91806),v=s(72802);const w=new r.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let x=i=class extends o.oY{static create(e={}){const{resolutionFactor:t=1,scales:s,size:n=256,spatialReference:r=f.A.WebMercator,numLODs:o=24}=e;if(!(0,m.fn)(r)){const e=[];if(s)for(let t=0;t<s.length;t++){const i=s[t];e.push(new y.A({level:t,scale:i,resolution:i}))}else{let t=5e-4;for(let s=o-1;s>=0;s--)e.unshift(new y.A({level:s,scale:t,resolution:t})),t*=2}return new i({dpi:96,lods:e,origin:new p.A(0,0,r),size:[n,n],spatialReference:r})}const l=(0,m.Vp)(r),h=e.origin?new p.A({x:e.origin.x,y:e.origin.y,spatialReference:r}):new p.A(l?{x:l.origin[0],y:l.origin[1],spatialReference:r}:{x:0,y:0,spatialReference:r}),u=1/(39.37*(0,a.GA)(r)*96),c=[];if(s)for(let e=0;e<s.length;e++){const t=s[e],i=t*u;c.push(new y.A({level:e,scale:t,resolution:i}))}else{let e=(0,m.EA)(r)?512/n*591657527.5917094:256/n*591657527.591555;const s=Math.ceil(o/t);c.push(new y.A({level:0,scale:e,resolution:e*u}));for(let i=1;i<s;i++){const s=e/2**t,n=s*u;c.push(new y.A({level:i,scale:s,resolution:n})),e=s}}return new i({dpi:96,lods:c,origin:h,size:[n,n],spatialReference:r})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const s=(0,m.Vp)(e);return e.isWrappable&&!!s&&Math.abs(s.origin[0]-t.x)<=s.dx}return!1}readOrigin(e,t){return p.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,s=0;const i=[],n=this._levelToLOD={};e&&(t=-1/0,s=1/0,e.forEach((e=>{i.push(e.scale),t=e.scale>t?e.scale:t,s=e.scale<s?e.scale:s,n[e.level]=e}))),this._set("scales",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const s=Math.floor(e),i=s+1;return t[s]/(t[s]/t[i])**(e-s)}scaleToZoom(e){const t=this.scales,s=t.length-1;let i=0;for(;i<s;i++){const s=t[i],n=t[i+1];if(s<=e)return i;if(n===e)return i+1;if(s>e&&n<e)return i+Math.log(s/e)/Math.log(s/n)}return i}tileAt(e,t,s,i){const n=this.lodAt(e);if(!n)return null;let r,o;if("number"==typeof t)r=t,o=s;else if((0,m.aI)(t.spatialReference,this.spatialReference))r=t.x,o=t.y,i=s;else{const e=(0,g.Cv)(t,this.spatialReference);if(null==e)return null;r=e.x,o=e.y,i=s}const a=n.resolution*this.size[0],l=n.resolution*this.size[1];return i||(i=new v.U(null,0,0,0,(0,_.vt)())),i.level=e,i.row=Math.floor((this.origin.y-o)/l+.001),i.col=Math.floor((r-this.origin.x)/a+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=i.ExtrapolateOptions.NONE){let s=this.lodAt(e.level);if(!s&&t===i.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(s=t)}if(!s)return;const n=e.level-s.level,r=s.resolution*this.size[0]/2**n,o=s.resolution*this.size[1]/2**n;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,_.vt)()),e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const s=this.lodAt(t.level);if(null==s)return null;const{resolution:i}=s,n=i*this.size[0],r=i*this.size[1];return e[0]=this.origin.x+t.col*n,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+n,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return i.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const s=[],n=this.lods.length-t;for(let e=0;e<n;e++){const i=e+t,{scale:n,resolution:r}=i>=0?this.lods[i]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};s.push(new y.A({level:e,scale:n,resolution:r}))}return new i({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:s})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let s=0;s<e.length;s++){const i=e[s];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};var S,b;(0,n._)([(0,l.M)({type:Number,json:{write:!0}})],x.prototype,"compressionQuality",void 0),(0,n._)([(0,l.M)({type:Number,json:{write:!0}})],x.prototype,"dpi",void 0),(0,n._)([(0,l.M)({type:String,json:{read:w.read,write:w.write,origins:{"web-scene":{read:!1,write:!1}}}})],x.prototype,"format",void 0),(0,n._)([(0,l.M)({readOnly:!0})],x.prototype,"isWrappable",null),(0,n._)([(0,l.M)({type:p.A,json:{write:!0}})],x.prototype,"origin",void 0),(0,n._)([(0,u.w)("origin")],x.prototype,"readOrigin",null),(0,n._)([(0,l.M)({type:[y.A],value:null,json:{write:!0}})],x.prototype,"lods",null),(0,n._)([(0,l.M)({readOnly:!0})],x.prototype,"scales",void 0),(0,n._)([(0,l.M)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],x.prototype,"size",void 0),(0,n._)([(0,u.w)("size",["rows","cols"])],x.prototype,"readSize",null),(0,n._)([(0,d.K)("size",{cols:{type:h.jz},rows:{type:h.jz}})],x.prototype,"writeSize",null),(0,n._)([(0,l.M)({type:f.A,json:{write:!0}})],x.prototype,"spatialReference",void 0),x=i=(0,n._)([(0,c.$)("esri.layers.support.TileInfo")],x),S=x||(x={}),(b=S.ExtrapolateOptions||(S.ExtrapolateOptions={}))[b.NONE=0]="NONE",b[b.POWER_OF_TWO=1]="POWER_OF_TWO";const T=x},72802:(e,t,s)=>{s.d(t,{U:()=>i});class i{constructor(e,t,s,i,n=void 0){this.id=e,this.level=t,this.row=s,this.col=i,this.extent=n}}},60694:(e,t,s)=>{s.d(t,{Fi:()=>u,HZ:()=>g,Jf:()=>m,LS:()=>y,Wo:()=>_,bd:()=>v,cr:()=>p,iz:()=>d,qg:()=>c,yG:()=>f});var i=s(84952),n=s(97159);const r={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",knowledgegraphserver:"KnowledgeGraphServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer",videoserver:"VideoServer"},o=Object.values(r),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),h=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function u(e){return a.test(e)}function c(e){if(null==e)return null;const t=(0,i.An)(e),s=t?.path.match(a)||t?.path.match(l);if(!s)return null;const[,n,o,h,u]=s,c=o.indexOf("/");return{title:p(-1!==c?o.slice(c+1):o),serverType:r[h.toLowerCase()],sublayer:null!=u&&""!==u?parseInt(u,10):null,url:{path:n}}}function d(e){const t=(0,i.An)(e).path.match(h);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function p(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function f(e,t){const s=[];if(e){const t=c(e);null!=t&&t.title&&s.push(t.title)}if(t){const e=p(t);s.push(e)}if(2===s.length){if(s[0].toLowerCase().includes(s[1].toLowerCase()))return s[0];if(s[1].toLowerCase().includes(s[0].toLowerCase()))return s[1]}return s.join(" - ")}function _(e){let t=(0,i.$z)(e,!0);return!!t&&(t=t.toLowerCase(),t.endsWith(".arcgis.com")&&(t.startsWith("services")||t.startsWith("tiles")||t.startsWith("features")))}function m(e,t){return e?(0,i.UC)((0,i.zi)(e,t)):e}function g(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.zi)(t,e.logger);const s=(0,i.An)(t),n=c(s.path);let r;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(r=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=d(s.path);null!=e&&(t=e.serviceUrl,r=e.sublayerId)}return{url:(0,i.UC)(t),layerId:r}}function y(e,t,s,r,o){(0,n.w)(t,r,"url",o),r.url&&null!=e.layerId&&(r.url=(0,i.fj)(r.url,s,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),s=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),n=t.includes("/imageserver/wmsserver"),r=t.includes("/wmsserver");return s&&(i||n||r)}},80451:(e,t,s)=>{s.d(t,{rS:()=>m,gK:()=>_}),s(44208);var i,n=s(53177),r=s(76357),o=s(90237),a=(s(53966),s(87811),s(49186),s(93223)),l=s(40608);let h=i=class extends r.A{constructor(e){super(e),this.type="inherited"}clone(){return new i}};(0,o._)([(0,a.e)({inherited:"inherited"})],h.prototype,"type",void 0),h=i=(0,o._)([(0,l.$)("esri.layers.support.InheritedDomain")],h);const u=h;var c,d=s(10107);let p=c=class extends r.A{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new c({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,d.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,s){t[s]=[this.minValue||0,e]}}}})],p.prototype,"maxValue",void 0),(0,o._)([(0,d.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,s){t[s]=[e,this.maxValue||0]}}}})],p.prototype,"minValue",void 0),(0,o._)([(0,a.e)({range:"range"})],p.prototype,"type",void 0),p=c=(0,o._)([(0,l.$)("esri.layers.support.RangeDomain")],p);const f=p,_={key:"type",base:r.A,typeMap:{range:f,"coded-value":n.A,inherited:u}};function m(e){if(!e?.type)return null;switch(e.type){case"range":return f.fromJSON(e);case"codedValue":return n.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},31756:(e,t,s)=>{s.d(t,{j:()=>r});var i=s(83047),n=s(79258);const r={unknown:1,inches:(0,i.oU)(1,"meters","inches"),feet:(0,i.oU)(1,"meters","feet"),"us-feet":(0,i.oU)(1,"meters","us-feet"),yards:(0,i.oU)(1,"meters","yards"),miles:(0,i.oU)(1,"meters","miles"),"nautical-miles":(0,i.oU)(1,"meters","nautical-miles"),millimeters:(0,i.oU)(1,"meters","millimeters"),centimeters:(0,i.oU)(1,"meters","centimeters"),decimeters:(0,i.oU)(1,"meters","decimeters"),meters:(0,i.oU)(1,"meters","meters"),kilometers:(0,i.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.vl)(1,"meters",n.$O.radius)}},58501:(e,t,s)=>{s.d(t,{q:()=>n});var i=s(62815);function n(e,t,s){if(!s?.features||!s.hasZ)return;const n=(0,i.N)(s.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of s.features)n(e.geometry)}},88625:(e,t,s)=>{s.d(t,{A:()=>w});var i,n=s(90237),r=s(66552),o=s(25482),a=s(97768),l=s(10107),h=(s(44208),s(53966),s(87811),s(36005)),u=s(40608),c=s(43937),d=s(30524);let p=i=class extends o.oY{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,d.Dx)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,n._)([(0,l.M)({type:String,json:{write:!0}})],p.prototype,"expression",void 0),(0,n._)([(0,l.M)({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=i=(0,n._)([(0,u.$)("esri.symbols.support.FeatureExpressionInfo")],p);const f=p;var _,m=s(16271);const g=(0,r.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new r.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let v=_=class extends o.oY{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,s,i){t[s]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new _({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,n._)([(0,l.M)({type:f,json:{write:!0}})],v.prototype,"featureExpressionInfo",void 0),(0,n._)([(0,h.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],v.prototype,"readFeatureExpressionInfo",null),(0,n._)([(0,c.K)("featureExpressionInfo",{featureExpressionInfo:{type:f},"featureExpression.value":{type:[0]}})],v.prototype,"writeFeatureExpressionInfo",null),(0,n._)([(0,l.M)({type:g.apiValues,nonNullable:!0,json:{type:g.jsonValues,read:g.read,write:{writer:g.write,isRequired:!0}}})],v.prototype,"mode",null),(0,n._)([(0,l.M)({type:Number,json:{write:!0}})],v.prototype,"offset",void 0),(0,n._)([(0,l.M)({type:m.KQ,json:{type:String,read:y.read,write:y.write}})],v.prototype,"unit",null),v=_=(0,n._)([(0,u.$)("esri.symbols.support.ElevationInfo")],v);const w=v},16271:(e,t,s)=>{s.d(t,{Ao:()=>r,KQ:()=>o});var i=s(4576),n=s(31756);function r(e){return 1/(n.j[e]||1)}const o=function(){const e=Object.keys(n.j);return(0,i.TF)(e,"decimal-degrees"),e.sort(),e}()},79677:(e,t,s)=>{s.d(t,{A:()=>p});var i,n=s(90237),r=s(25482),o=s(88930),a=s(10107),l=(s(44208),s(53966),s(87811),s(36005)),h=s(40608),u=s(43937),c=s(56400);let d=i=class extends r.oY{static get allTime(){return f}static get empty(){return _}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,s=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&s===n}expandTo(e,t=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let s=this.start;s&&(s=(0,o.lL)(s,e,t));let n=this.end;if(n){const s=(0,o.lL)(n,e,t);n=n.getTime()===s.getTime()?s:(0,o.S1)(s,1,e,t)}return new i({start:s,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,r=e.end?.getTime()??1/0;let o,a;return n>=t&&n<=s?o=n:t>=n&&t<=r&&(o=t),s>=n&&s<=r?a=s:r>=t&&r<=s&&(a=r),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,s=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:r,end:a}=this;return null!=r&&(n.start=(0,o.S1)(r,e,t,s)),null!=a&&(n.end=(0,o.S1)(a,e,t,s)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return f.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,n._)([(0,a.M)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n._)([(0,l.w)("end")],d.prototype,"readEnd",null),(0,n._)([(0,u.K)("end")],d.prototype,"writeEnd",null),(0,n._)([(0,a.M)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n._)([(0,a.M)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n._)([(0,a.M)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n._)([(0,l.w)("start")],d.prototype,"readStart",null),(0,n._)([(0,u.K)("start")],d.prototype,"writeStart",null),d=i=(0,n._)([(0,h.$)("esri.time.TimeExtent")],d);const p=d,f=new d,_=new d({start:void 0,end:void 0})},12543:(e,t,s)=>{s.r(t),s.d(t,{default:()=>ve});var i=s(90237),n=(s(59456),s(65529)),r=s(74887),o=s(36708),a=s(10107),l=(s(44208),s(53966)),h=(s(87811),s(40608)),u=s(79897),c=s(16930),d=s(83221),p=s(52158),f=s(87045),_=s(61956),m=s(88625),g=s(55359),y=s(91869),v=s(83047),w=s(16271);function x(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s}=t;return new b(e,s)}return new S}class S{async alignCandidates(e,t,s){return e}notifyElevationSourceChange(){}}class b{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new g.q(1024),this._cacheVersion=0}async alignCandidates(e,t,s){const i=this._elevationInfo;return null==i||"absolute-height"!==i.mode||i.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,s):(function(e,t,s){const{offset:i,unit:n}=s;if(null==i)return;const r=(0,v.G9)(t),o=i*((0,w.Ao)(n??"meters")/r);for(const t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o;continue;case"vertex":t.target.z+=o;continue}}(e,t,i),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,t,s){const i=new Map;for(const t of e)(0,y.tE)(i,t.objectId,F).push(t);const[n,o,a]=this._prepareQuery(i,t),l=await this._alignPointsInFeatures(n,s);if((0,r.Te)(s),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,s);this._applyCacheAndResponse(n,l,o);const{drapedObjectIds:h,failedObjectIds:u}=l,c=[];for(const t of e){const{objectId:e}=t;h.has(e)&&"edge"===t.type&&(t.draped=!0),u.has(e)||c.push(t)}return c}_prepareQuery(e,t){const s=[],i=[];for(const[t,n]of e){const e=[];for(const s of n)this._addToQueriesOrCachedResult(t,s.target,e,i),"edge"===s.type&&(this._addToQueriesOrCachedResult(t,s.start,e,i),this._addToQueriesOrCachedResult(t,s.end,e,i));0!==e.length&&s.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:s},i,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,i){const n=E(e,t),r=this._alignmentsCache.get(n);null==r?s.push(t):i.push(new T(t,r))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:i},n){for(const e of n)e.apply();let r=0;const o=this._alignmentsCache;for(const{objectId:n,points:a}of e.pointsInFeatures){if(i.has(n)){r+=a.length;continue}const e=!s.has(n);for(const s of a){const i=E(n,s),a=t[r++];s.z=a,e&&o.put(i,a,1)}}}}class T{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function E(e,{x:t,y:s,z:i,spatialReference:n}){return`${e}-${t}-${s}-${i??0}}-wkid:${n?.wkid}`}function F(){return[]}class I{filter(e,t){return t}notifyElevationSourceChange(){}}class C{filter(e,t){const{point:s,distance:i}=e,{z:n}=s;if(null==n)return t;if(0===t.length)return t;const r=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(i),o=this._updateCandidatesTo3D(t,s,r).filter(M);return o.sort(R),o}_updateCandidatesTo3D(e,t,s){for(const i of e)switch(i.type){case"edge":z(i,t,s);continue;case"vertex":O(i,t,s);continue}return e}}function M(e){return e.distance<=1}function A(e=!1){return e?new C:new I}function z(e,t,{x:s,y:i,z:n}){const{start:r,end:o,target:a}=e;e.draped||function(e,t,s,i){const n=i.x-s.x,r=i.y-s.y,o=i.z-s.z,a=n*n+r*r+o*o,l=(t.x-s.x)*n+(t.y-s.y)*r+o*(t.z-s.z),h=Math.min(1,Math.max(0,l/a)),u=s.x+n*h,c=s.y+r*h,d=s.z+o*h;e.x=u,e.y=c,e.z=d}(a,t,r,o);const l=(t.x-a.x)/s,h=(t.y-a.y)/i,u=(t.z-a.z)/n;e.distance=Math.sqrt(l*l+h*h+u*u)}function O(e,t,{x:s,y:i,z:n}){const{target:r}=e,o=(t.x-r.x)/s,a=(t.y-r.y)/i,l=(t.z-r.z)/n,h=Math.sqrt(o*o+a*a+l*l);e.distance=h}function R(e,t){return e.distance-t.distance}var B=s(4718),j=s(799);function H(e=!1,t){return e?new P(t):new N}class N{async fetch(){return[]}notifySymbologyChange(){}}class P{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new g.q(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const s=[],i=[],n=this._candidatesCache;for(const t of e){const e=D(t),r=n.get(e);if(r)for(const e of r)i.push((0,B.o8)(e));else s.push(t),n.put(e,[],1)}if(0===s.length)return i;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(s,t);if((0,r.Te)(t),o!==this._cacheVersion)return this.fetch(e,t);const h=[],{length:u}=a;for(let e=0;e<u;++e){const t=a[e],i=D(s[l[e]]),r=n.get(i);r.push(t),n.put(i,r,r.length),h.push((0,B.o8)(t))}return i.concat(h)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function D(e){switch(e.type){case"vertex":{const{objectId:t,target:s}=e,i=`${t}-vertex-${s.x}-${s.y}-${s.z??0}`;return(0,j.Wm)(i).toString()}case"edge":{const{objectId:t,start:s,end:i}=e,n=`${t}-edge-${s.x}-${s.y}-${s.z??0}-to-${i.x}-${i.y}-${i.z??0}`;return(0,j.Wm)(n).toString()}default:return""}}var U,L=s(69622),Y=s(4576),V=s(60999),q=s(3483),k=s(5443),W=s(19419),X=s(90708),$=s(60694),G=s(69418),J=s(80893);class Q{constructor(e,t){this.data=e,this.resolution=t,this.state={type:U.CREATED},this.alive=!0}process(e){switch(this.state.type){case U.CREATED:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case U.FETCH_COUNT:break;case U.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case U.FETCH_FEATURES:break;case U.FETCHED_FEATURES:this.state=this._goToDone(this.state,e);case U.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case U.CREATED:case U.FETCH_COUNT:return 0;case U.FETCHED_COUNT:return this.state.featureCount;case U.FETCH_FEATURES:return this.state.previous.featureCount;case U.FETCHED_FEATURES:return this.state.features.length;case U.DONE:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case U.CREATED:return"created";case U.FETCH_COUNT:return"fetch-count";case U.FETCHED_COUNT:return"fetched-count";case U.FETCH_FEATURES:return"fetch-features";case U.FETCHED_FEATURES:return"fetched-features";case U.DONE:return"done"}}_gotoFetchCount(e,t){return{type:U.FETCH_COUNT,previous:e,task:(0,V.UT)((async e=>{const s=await(0,V.DZ)(t.fetchCount(this,e));this.state.type===U.FETCH_COUNT&&(this.state=function(e,t){return{type:U.FETCHED_COUNT,featureCount:t,previous:e}}(this.state,s.ok?s.value:1/0))}))}}_gotoFetchFeatures(e,t){return{type:U.FETCH_FEATURES,previous:e,task:(0,V.UT)((async s=>{const i=await(0,V.DZ)(t.fetchFeatures(this,e.featureCount,s));this.state.type===U.FETCH_FEATURES&&(this.state=function(e,t){return{type:U.FETCHED_FEATURES,previous:e,features:t}}(this.state,i.ok?i.value:[]))}))}}_goToDone(e,t){return t.finish(this,e.features),{type:U.DONE,previous:e}}reset(){const e=this.state;switch(this.state={type:U.CREATED},e.type){case U.CREATED:case U.FETCHED_COUNT:case U.FETCHED_FEATURES:case U.DONE:break;case U.FETCH_COUNT:case U.FETCH_FEATURES:e.task.abort()}}intersects(e){return null==e||!this.data.extent||((0,W.VY)(e,Z),(0,W.HY)(this.data.extent,Z))}}!function(e){e[e.CREATED=0]="CREATED",e[e.FETCH_COUNT=1]="FETCH_COUNT",e[e.FETCHED_COUNT=2]="FETCHED_COUNT",e[e.FETCH_FEATURES=3]="FETCH_FEATURES",e[e.FETCHED_FEATURES=4]="FETCHED_FEATURES",e[e.DONE=5]="DONE"}(U||(U={}));const Z=(0,W.vt)();let K=class extends L.A{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),s=(0,q.KC)(e,this._mandatoryOutFields);(0,q.aI)(s,t)||(this._set("outFields",s),(0,q.Yy)(s,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new u.U}initialize(){this._initializeFetchExtent(),this._updatingHandles.add((()=>this._configuration),(()=>this.refresh())),this._updatingHandles.add((()=>this.tilesOfInterest),((e,t)=>{(0,Y.aI)(e,t,(({id:e},{id:t})=>e===t))||this._process()}),o.OH),this.addHandles((0,o.z7)((()=>!this.suspended),(()=>this._process())))}destroy(){this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(const e of this._pendingTiles.values())e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t)))},s=(0,V.UT)((async e=>{try{await this.store.processEdits(t,((e,t)=>this._queryFeaturesById(e,t)),e),this._processPendingTiles()}catch(e){(0,r.QP)(e),l.A.getLogger(this).warn("Failed to apply edits",e)}}));this.addHandles(s),await this._updatingHandles.addPromise(s.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,$.Wo)(this.url))return;const e=(0,V.UT)((async e=>{try{const t=await(0,J.Jf)(this.url,new _.A({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=k.A.fromJSON(t.data?.extent)}catch(e){(0,r.QP)(e),l.A.getLogger(this).warn("Failed to fetch data extent",e)}}));this._updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:s}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const s=this.tilesOfInterest[t],i=this.store.process(s,((e,t)=>this._verifyTileComplexity(e,t)),this.outFields);null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this._updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<se}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const s=this.tileSize*t;return e*(ie/(s*s))<ne}_ensureFetchAllCounts(e){let t=!0;for(const s of this._pendingTiles.values())s.state.type<U.FETCHED_COUNT&&this._updatingHandles.addPromise(s.process(e)),s.state.type<=U.FETCH_COUNT&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new Q(e,t);return this._pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:te,signal:t})}async _fetchFeatures(e,t,s){let i=0;const n=[];let r=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,i,o),{features:h,exceededTransferLimit:u}=await this._queryFeatures(a,s);l&&(i+=a.num),r+=h.length;for(const e of h)n.push(e);if(o=t-r,!l||!u||o<=0)return n}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let i=null;if(this.store.featureStore.forEach((n=>{e===n.attributes[t]&&(i=n.objectId??n.attributes[s])})),null==i)throw new Error(`Expected to find a feature with globalId ${e}`);return i}_queryFeaturesById(e,t){const s=this._createFeaturesQuery();return s.objectIds=e,this._queryFeatures(s,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,J.IJ)(this.url,e,new G.S({sourceSpatialReference:s}),{query:this._configuration.customParameters,timeout:te,signal:t});return(0,X.eY)(i)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,J.eW)(this.url,e,s,{query:this._configuration.customParameters,timeout:te,signal:t});return(0,X.q3)(i,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),s=null!=e?.data?this.store.getAttributesForTile(e?.data?.id):null,i=(0,q.KC)((0,q.iv)(this.outFields,s??new Set),this._mandatoryOutFields);return t.outFields=Array.from(i),t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new _.A({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?(0,W.w1)(e.data.extent,this.tileInfo.spatialReference):void 0}),s=this._configuration.filter;return null!=s&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:i,supportsCacheHint:n,tileMaxRecordCount:r,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=i?_.A.MAX_MAX_RECORD_COUNT_FACTOR:1,h=l*((a||n)&&r?r:o||ee);return e.start=t,i?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/h)),e.num=Math.min(s,e.maxRecordCountFactor*h)):e.num=Math.min(s,h),!0}};(0,i._)([(0,a.M)({constructOnly:!0})],K.prototype,"url",void 0),(0,i._)([(0,a.M)({constructOnly:!0})],K.prototype,"objectIdField",void 0),(0,i._)([(0,a.M)({constructOnly:!0})],K.prototype,"globalIdField",void 0),(0,i._)([(0,a.M)({constructOnly:!0})],K.prototype,"capabilities",void 0),(0,i._)([(0,a.M)({constructOnly:!0})],K.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,a.M)({constructOnly:!0})],K.prototype,"spatialReference",void 0),(0,i._)([(0,a.M)({constructOnly:!0})],K.prototype,"store",void 0),(0,i._)([(0,a.M)({readOnly:!0})],K.prototype,"_minimumVerticesPerFeature",null),(0,i._)([(0,a.M)()],K.prototype,"_mandatoryOutFields",null),(0,i._)([(0,a.M)()],K.prototype,"outFields",null),(0,i._)([(0,a.M)()],K.prototype,"suspended",void 0),(0,i._)([(0,a.M)()],K.prototype,"_historicMoment",void 0),(0,i._)([(0,a.M)()],K.prototype,"filter",null),(0,i._)([(0,a.M)()],K.prototype,"customParameters",null),(0,i._)([(0,a.M)({readOnly:!0})],K.prototype,"_configuration",null),(0,i._)([(0,a.M)()],K.prototype,"tileInfo",null),(0,i._)([(0,a.M)()],K.prototype,"tileSize",null),(0,i._)([(0,a.M)()],K.prototype,"tilesOfInterest",void 0),(0,i._)([(0,a.M)({readOnly:!0})],K.prototype,"updating",null),(0,i._)([(0,a.M)({readOnly:!0})],K.prototype,"availability",void 0),(0,i._)([(0,a.M)()],K.prototype,"hasZ",null),K=(0,i._)([(0,h.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],K);const ee=2e3,te=6e5,se=1e6,ie=25,ne=1;var re=s(86805),oe=s(71903),ae=s(6518),le=s(72802);class he{constructor(){this._store=new Map,this._byteSize=0}set(e,t){this.delete(e),this._store.set(e,t),this._byteSize+=t.byteSize}delete(e){const t=this._store.get(e);return!!this._store.delete(e)&&(null!=t&&(this._byteSize-=t.byteSize),!0)}get(e){return this._used(e),this._store.get(e)}has(e){return this._used(e),this._store.has(e)}clear(){this._store.clear()}applyByteSizeLimit(e,t){for(const[s,i]of this._store){if(this._byteSize<=e)break;this.delete(s),t(i)}}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}_used(e){const t=this._store.get(e);t&&(this._store.delete(e),this._store.set(e,t))}}let ue=class extends L.A{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*oe.u.MEGABYTES,this._tileBounds=new ae.F,this._tiles=new he,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,W.vt)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const s=this.featureStore.upsertMany(t),i=s.map((e=>new Set(Object.keys(e.attributes)))).reduce(((e,t)=>(0,q.E$)(e,t)),new Set(Object.keys(s[0]?.attributes??[])));this._addTileStorage(e,new Set(s.map((e=>e.objectId))),function(e){return e.reduce(((e,t)=>e+function(e){return 32+function(e){if(null==e)return 0;const t=(0,re.zd)(e.lengths,4);return 32+(0,re.zd)(e.coords,8)+t}(e.geometry)+(0,re.eY)(e.attributes)}(t)),0)}(s),i),this._tiles.applyByteSizeLimit(this.maximumByteSize,(e=>this._removeTileStorage(e)))}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s,i){const n=e.id;this._tiles.set(n,new ce(e,t,s,i)),this._tileBounds.set(n,e.extent),this._tileFeatureCounts.set(n,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)this._unreferenceFeature(s)===me.REMOVED&&t.push(s);this.featureStore.removeManyById(t);const s=e.data.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){if(!e.length)return;const i=(await t(e,s)).features,{hasZ:n,hasM:r}=this.featureStore;for(const e of i){const t=(0,X.jQ)(this._tmpBoundingRect,e.geometry,n,r);null!=t&&this._tileBounds.forEachInBounds(t,(t=>{const s=this._tiles.get(t);this.featureStore.add(e);const i=e.objectId;s.objectIds.has(i)||(s.objectIds.add(i),this._referenceFeature(i),this._tileFeatureCounts.set(s.data.id,s.objectIds.size))}))}}process(e,t=()=>!0,s){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,W.HY)((0,W.VY)(this.extent,this._tmpBoundingRect),e.extent))return new pe(e);const i=this.getAttributesForTile(e.id);if((0,q.Yy)(s,i))return new pe(e);const n=this._createTileTree(e,this.tileInfo);return this._simplify(n,t,null,0,1),this._collectMissingTiles(e,n,this.tileInfo,s)}get debugInfo(){return Array.from(this._tiles.values()).map((({data:e})=>({data:e,featureCount:this._tileFeatureCounts.get(e.id)||0})))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){const n=this._tileFeatureCounts.get(e.id);if(null!=n)return n;const r=await(0,J.gW)(t,s,i);return this._tileFeatureCounts.set(e.id,r.data.count),r.data.count}_createTileTree(e,t){const s=new de(e.level,e.row,e.col);return t.updateTileInfo(s,f.A.ExtrapolateOptions.POWER_OF_TWO),this._tileBounds.forEachInBounds(e.extent,(i=>{const n=this._tiles.get(i)?.data;n&&function(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,n=s?t:e,r=1<<n.level-i.level;return Math.floor(n.row/r)===i.row&&Math.floor(n.col/r)===i.col}(e,n)&&this._populateChildren(s,n,t,this._tileFeatureCounts.get(n.id)||0)})),s}_populateChildren(e,t,s,i){const n=t.level-e.level-1;if(n<0)return void(e.isLeaf=!0);const r=t.row>>n,o=t.col>>n,a=e.row<<1,l=o-(e.col<<1)+(r-a<<1),h=e.children[l];if(null!=h)this._populateChildren(h,t,s,i);else{const n=new de(e.level+1,r,o);s.updateTileInfo(n,f.A.ExtrapolateOptions.POWER_OF_TWO),e.children[l]=n,this._populateChildren(n,t,s,i)}}_simplify(e,t,s,i,n){const r=n*n;if(e.isLeaf)return t(this.getFeatureCount(e),n)?0:(this._remove(e),null!=s&&(s.children[i]=null),r);const o=n/2,a=o*o;let l=0;for(let s=0;s<e.children.length;s++){const i=e.children[s];l+=null!=i?this._simplify(i,t,e,s,o):a}return 0===l?this._mergeChildren(e):1-l/r<_e&&(this._purge(e),null!=s&&(s.children[i]=null),l=r),l}_mergeChildren(e){const t=new Set;let s,i=0;this._forEachLeaf(e,(e=>{const n=this._tiles.get(e.id);if(n){s=s?(0,q.E$)(s,n.attributeKeys):new Set(n.attributeKeys),i+=n.byteSize;for(const e of n.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}})),this._addTileStorage(e,t,i,s??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s,i){const n=new fe(s,e,this.extent);return this._collectMissingTilesRecurse(t,n,1,i),n.info}_collectMissingTilesRecurse(e,t,s,i){const n=this.getAttributesForTile(e.id),r=n&&!(0,q.Yy)(i,n);if(r&&t.addMissing(e.level,e.row,e.col,s),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,s));const o=s/2;for(let s=0;s<e.children.length;s++){const n=e.children[s];null==n?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),o):this._collectMissingTilesRecurse(n,t,o,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?me.ADDED:me.UNCHANGED}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),me.REMOVED):(t>0&&this._refCounts.set(e,t),me.UNCHANGED)}get test(){}};(0,i._)([(0,a.M)({constructOnly:!0})],ue.prototype,"featureStore",void 0),(0,i._)([(0,a.M)()],ue.prototype,"tileInfo",void 0),(0,i._)([(0,a.M)()],ue.prototype,"extent",void 0),(0,i._)([(0,a.M)()],ue.prototype,"maximumByteSize",void 0),ue=(0,i._)([(0,h.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],ue);class ce{constructor(e,t,s,i){this.data=e,this.objectIds=t,this.byteSize=s,this.attributeKeys=i}}class de{constructor(e,t,s){this.level=e,this.row=t,this.col=s,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class pe{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,W.Wc)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class fe{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new pe(t),null!=s&&(this._extent=(0,W.VY)(s))}addMissing(e,t,s,i){const n=new le.U(null,e,t,s);this._tileInfo.updateTileInfo(n,f.A.ExtrapolateOptions.POWER_OF_TWO),null==n.extent||null!=this._extent&&!(0,W.HY)(this._extent,n.extent)||(this.info.missingTiles.push({data:n,resolution:i}),this.info.coveredArea-=(0,W.Wc)(n.extent))}}const _e=.18751;var me;!function(e){e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.UNCHANGED=2]="UNCHANGED"}(me||(me={}));var ge=s(65864);let ye=class extends n.A.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,r.Tw)(),this._elevationAligner=x(),this._elevationFilter=A(),this._symbologyCandidatesFetcher=H(),this._updatingHandles=new u.U,this._alignPointsInFeatures=async(e,t)=>{const s={query:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return(0,r.Te)(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return(0,r.Te)(t),i}}get updating(){return this._isInitializing||this._updatingHandles.updating||this._featureFetcher.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fieldsIndex:n}=e.serviceInfo,{hasZ:r}=e,a=c.A.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new d.A({...e.serviceInfo,hasZ:r,hasM:!1}),this._queryEngine=new p.d({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:n,hasZ:r,hasM:!1,objectIdField:s,timeInfo:i}),this._featureFetcher=new K({store:new ue({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:c.A.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const l="3d"===e.configuration.viewType;return this._elevationAligner=x(l,{elevationInfo:null!=e.elevationInfo?m.A.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=A(l),this.addHandles([(0,o.wB)((()=>this._featureFetcher.availability),(e=>this.emit("notify-availability",{availability:e})),o.OH),(0,o.wB)((()=>this.updating),(()=>this._notifyUpdating()))]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),we}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.suspended=e,we}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.outFields=new Set(e??[]),we}async fetchCandidates(e,t){await this._whenSetup.promise,(0,r.Te)(t);const s=function(e){if(!e.filter)return{...e,query:{where:"1=1"}};const{distance:t,units:s,spatialRel:i,where:n,timeExtent:r,objectIds:o}=e.filter,a={geometry:e.filter.geometry?(0,ge.rS)(e.filter.geometry):void 0,distance:t,units:s,spatialRel:i,timeExtent:r,objectIds:o,where:n??"1=1"};return{...e,query:a}}(e),i=t?.signal,n=await this._queryEngine.executeQueryForSnapping(s,i);(0,r.Te)(i);const o=await this._elevationAligner.alignCandidates(n.candidates,c.A.fromJSON(e.point.spatialReference)??c.A.WGS84,i);(0,r.Te)(i);const a=await this._symbologyCandidatesFetcher.fetch(o,i);(0,r.Te)(i);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(s,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=null!=e.tileInfo?f.A.fromJSON(e.tileInfo):null,we}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.refresh(),we}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),await(0,o.C_)((()=>!this.updating),t),(0,r.Te)(t),we}async getDebugInfo(e,t){return(0,r.Te)(t),{result:this._featureFetcher.debugInfo}}async handleEdits(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),await this._updatingHandles.addPromise(this._featureFetcher.handleEdits(e)),(0,r.Te)(t),we}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),we}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),we}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),we}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=H(e,this._getSymbologyCandidates),we}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?_.A.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,i._)([(0,a.M)({readOnly:!0})],ye.prototype,"updating",null),(0,i._)([(0,a.M)()],ye.prototype,"_isInitializing",void 0),ye=(0,i._)([(0,h.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],ye);const ve=ye,we={result:{}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[591],{38961:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(90237),n=r(5503),s=(r(60999),r(49186),r(53966),r(14012),r(80559)),o=r(10107),a=r(40608);let l=class extends n.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,s.fm)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new n.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,o.M)()],l.prototype,"getCollections",void 0),(0,i._)([(0,o.M)()],l.prototype,"getChildrenFunction",void 0),(0,i._)([(0,o.M)()],l.prototype,"itemFilterFunction",void 0),l=(0,i._)([(0,a.$)("esri.core.CollectionFlattener")],l);const u=l},39516:(e,t,r)=>{async function i(e,t){const{WhereClause:i}=await Promise.all([r.e(835),r.e(4800)]).then(r.bind(r,50835));return i.create(e,{fieldsIndex:t})}function n(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{G:()=>i,m:()=>n})},3330:(e,t,r)=>{r.d(t,{GB:()=>n,Qo:()=>o,Y4:()=>s});var i=r(96285);class n{}function s(e){return e instanceof i.bo?e===n.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return s(e)?n.instance:e}n.instance=new i.oh("Etc/UTC")},70328:(e,t,r)=>{r.d(t,{BI:()=>S,Ej:()=>f,Hq:()=>u,Ie:()=>w,Jt:()=>v,Ne:()=>m,RF:()=>a,_F:()=>c,aI:()=>I,fA:()=>s,gX:()=>h,hZ:()=>b,iT:()=>l,is:()=>_,qv:()=>x,vI:()=>g,v_:()=>F,vt:()=>n,w1:()=>o});var i=r(5443);function n(e=F){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,i,s,o,a=n()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=s,a[5]=o,a}function o(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,i=t.length/3){let n=e[0],s=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=o,e[3]=a,e[4]=l,e[5]=u}function p(e){return e[0]>=e[3]?0:e[3]-e[0]}function d(e){return e[1]>=e[4]?0:e[4]-e[1]}function y(e){return e[2]>=e[5]?0:e[5]-e[2]}function c(e){const t=p(e),r=y(e),i=d(e);return Math.sqrt(t*t+r*r+i*i)}function h(e,t=[0,0,0]){return t[0]=e[0]+p(e)/2,t[1]=e[1]+d(e)/2,t[2]=e[2]+y(e)/2,t}function f(e,t=[0,0,0]){return t[0]=p(e),t[1]=d(e),t[2]=y(e),t}function m(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function g(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function b(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function w(e){return e?b(e,x):n(x)}function v(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function S(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function _(e){return 6===e.length}function I(e,t,r){if(null==e||null==t)return e===t;if(!_(e)||!_(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const x=[1/0,1/0,1/0,-1/0,-1/0,-1/0],F=[0,0,0,0,0,0];n()},98534:(e,t,r)=>{r.d(t,{V:()=>b});var i=r(90237),n=r(78888),s=r(91869),o=r(74887),a=r(84952),l=r(46140),u=r(10107),p=(r(44208),r(53966),r(87811),r(36005)),d=r(40608),y=r(35666),c=r(5443),h=r(16930),f=r(60694),m=r(10873),g=r(10407);const b=e=>{let t=class extends e{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const i=this.type,n="tile"!==i&&!!t.supportsDynamicLayers,s=r.includes("query"),o=r.includes("map"),a=!!t.exportTilesAllowed,u=r.includes("tilemap"),p=r.includes("data"),d="tile"!==i&&(!t.tileInfo||n),y="tile"!==i&&(!t.tileInfo||n),c="tile"!==i,h=t.cimVersion&&l.R.parse(t.cimVersion),f=h?.since(1,4)??!1,m=h?.since(2,0)??!1;return{operations:{supportsExportMap:o,supportsExportTiles:a,supportsIdentify:s,supportsQuery:p,supportsTileMap:u},exportMap:o?{supportsArcadeExpressionForLabeling:f,supportsSublayersChanges:c,supportsDynamicLayers:n,supportsSublayerVisibility:d,supportsSublayerDefinitionExpression:y,supportsCIMSymbols:m}:null,exportTiles:a?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchRelatedService(e){const t=this.portalItem;if(!t||!(0,g.bK)(t))return null;this._relatedFeatureServicePromise||(this._relatedFeatureServicePromise=t.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},e).then((e=>e.find((e=>"Feature Service"===e.type))??null),(()=>null)));const r=await this._relatedFeatureServicePromise;return(0,o.Te)(e),r?{itemId:r.id,url:r.url}:null}async fetchSublayerInfo(e,t){const{source:r}=e;if(this?.portalItem&&"tile"===this.type&&"map-layer"===r?.type&&(0,g.bK)(this.portalItem)&&e.originIdOf("url")<y.Gr.SERVICE){const i=await this.fetchRelatedService(t);i&&(e.url=(0,a.fj)(i.url,r.mapLayerId.toString()),e.layerItemId=i.itemId)}const{url:i}=e;let s;if("data-layer"===r.type)s=(await(0,n.A)(i,{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey},...t})).data;else if(i&&e.originIdOf("url")>y.Gr.SERVICE)try{const e=await this._fetchAllLayersAndTablesFromService(i),t=(0,f.qg)(i)?.sublayer??r.mapLayerId;s=e.get(t)}catch{}else{let i=e.id;"map-layer"===r?.type&&(i=r.mapLayerId);try{s=(await this.fetchAllLayersAndTables(t)).get(i)}catch{}}return s}async fetchAllLayersAndTables(e){return this._fetchAllLayersAndTablesFromService(this.parsedUrl?.path,e)}async _fetchAllLayersAndTablesFromService(e,t){await this.load(t),this._allLayersAndTablesMap||=new Map;const r=(0,f.qg)(e),i=(0,s.tE)(this._allLayersAndTablesMap,r?.url.path,(()=>(0,n.A)((0,a.fj)(r?.url.path,"/layers"),{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then((e=>{const t=new Map,{layers:r,tables:i}=e.data,n=[...r??[],...i??[]];for(const e of n)t.set(e.id,e);return{result:t}}),(e=>({error:e}))))),l=await i;if((0,o.Te)(t),"result"in l)return l.result;throw l.error}};return(0,i._)([(0,u.M)({readOnly:!0})],t.prototype,"capabilities",void 0),(0,i._)([(0,p.w)("service","capabilities",["capabilities","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],t.prototype,"readCapabilities",null),(0,i._)([(0,u.M)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.M)({type:c.A})],t.prototype,"fullExtent",void 0),(0,i._)([(0,u.M)(m.id)],t.prototype,"id",void 0),(0,i._)([(0,u.M)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],t.prototype,"legendEnabled",void 0),(0,i._)([(0,u.M)(m.M6)],t.prototype,"popupEnabled",void 0),(0,i._)([(0,u.M)({type:h.A})],t.prototype,"spatialReference",void 0),(0,i._)([(0,u.M)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,p.w)("service","version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],t.prototype,"readVersion",null),t=(0,i._)([(0,d.$)("esri.layers.mixins.ArcGISMapService")],t),t}},91921:(e,t,r)=>{r.d(t,{I:()=>g});var i=r(90237),n=r(5503),s=r(38961),o=r(49186),a=r(53966),l=r(36708),u=r(10107),p=(r(44208),r(87811),r(88620)),d=r(40608),y=r(35666),c=r(60410),h=r(63389);const f=n.A.ofType(c.A);function m(e,t){e&&e.forEach((e=>{t(e),e.sublayers&&e.sublayers.length&&m(e.sublayers,t)}))}const g=e=>{let t=class extends e{constructor(...e){super(...e),this.allSublayers=new s.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={[y.Gr.SERVICE]:{},[y.Gr.PORTAL_ITEM]:{},[y.Gr.WEB_SCENE]:{},[y.Gr.WEB_MAP]:{}},this.subtables=null,this.addHandles([(0,l.wB)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),l.OH),(0,l.wB)((()=>this.subtables),((e,t)=>this._handleSublayersChange(e,t)),l.OH)])}destroy(){this.allSublayers.destroy()}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,i=(0,y.aB)(t.origin);if(i<y.Gr.SERVICE)return;if(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>y.Gr.SERVICE)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:n,origin:s}=this.createSublayersForOrigin("web-document"),o=(0,p.oY)(this);o.setDefaultOrigin(s),this._set("sublayers",new f(n)),o.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){const t=(0,y.aB)("web-document"===e?"web-map":e);let r=y.Gr.SERVICE,i=this.sublayersSourceJSON[y.Gr.SERVICE].layers,n=this.sublayersSourceJSON[y.Gr.SERVICE].context,s=null;const o=[y.Gr.PORTAL_ITEM,y.Gr.WEB_SCENE,y.Gr.WEB_MAP].filter((e=>e<=t));for(const e of o){const t=this.sublayersSourceJSON[e];(0,h._X)(t.layers)&&(r=e,i=t.layers,n=t.context,t.visibleLayers&&(s={visibleLayers:t.visibleLayers,context:t.context}))}const a=[y.Gr.PORTAL_ITEM,y.Gr.WEB_SCENE,y.Gr.WEB_MAP].filter((e=>e>r&&e<=t));let l=null;for(const e of a){const{layers:t,visibleLayers:r,context:i}=this.sublayersSourceJSON[e];t&&(l={layers:t,context:i}),r&&(s={visibleLayers:r,context:i})}const u=function(e,t){const r=[],i={};return e?(e.forEach((e=>{const n=new c.A;if(n.read(e,t),i[n.id]=n,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=i[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(n)}else r.unshift(n)})),r):r}(i,n),p=new Map,d=new Set;if(l)for(const e of l.layers)p.set(e.id,e);if(s?.visibleLayers)for(const e of s.visibleLayers)d.add(e);return m(u,(e=>{l&&e.read(p.get(e.id),l.context),s&&e.read({defaultVisibility:d.has(e.id)},s.context)})),{origin:(0,y.OL)(r),sublayers:new f({items:u})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this,e.layer=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],"sublayers-owner"),"tile"===this.type&&this.addHandles(e.on("before-changes",(e=>{a.A.getLogger("esri.layers.TileLayer").error(new o.A("tilelayer:sublayers-non-modifiable","ISublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()})),"sublayers-owner"))}};return(0,i._)([(0,u.M)({readOnly:!0})],t.prototype,"allSublayers",void 0),(0,i._)([(0,u.M)({readOnly:!0,type:n.A.ofType(c.A)})],t.prototype,"serviceSublayers",void 0),(0,i._)([(0,u.M)({value:null,type:f,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],t.prototype,"sublayers",void 0),(0,i._)([(0,u.M)({readOnly:!0})],t.prototype,"sublayersSourceJSON",void 0),(0,i._)([(0,u.M)({type:f,json:{read:{source:"tables"}}})],t.prototype,"subtables",void 0),t=(0,i._)([(0,d.$)("esri.layers.mixins.SublayersOwner")],t),t}},39357:(e,t,r)=>{r.d(t,{H:()=>l});var i,n=r(90237),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(40608));let l=i=class extends s.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,o.M)({type:String,json:{write:!0}})],l.prototype,"name",void 0),(0,n._)([(0,o.M)({type:[String,Number],json:{write:!0}})],l.prototype,"code",void 0),l=i=(0,n._)([(0,a.$)("esri.layers.support.CodedValue")],l)},53177:(e,t,r)=>{r.d(t,{A:()=>y});var i,n=r(90237),s=r(4718),o=r(10107),a=(r(44208),r(53966),r(93223)),l=r(40608),u=r(39357),p=r(76357);let d=i=class extends p.A{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new i({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,o.M)({type:[u.H],json:{write:!0}})],d.prototype,"codedValues",void 0),(0,n._)([(0,a.e)({codedValue:"coded-value"})],d.prototype,"type",void 0),d=i=(0,n._)([(0,l.$)("esri.layers.support.CodedValueDomain")],d);const y=d},76357:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),n=r(66552),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),l=r(40608);const u=new n.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let p=class extends s.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,o.M)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,a.e)(u)],p.prototype,"type",void 0),p=(0,i._)([(0,l.$)("esri.layers.support.Domain")],p);const d=p},33143:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(90237),n=r(69540),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),p=r(80451),d=r(29005);let y=class extends((0,n.O)(s.oY)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,o.M)({json:{write:!0}})],y.prototype,"id",void 0),(0,i._)([(0,o.M)({json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,o.M)({json:{write:!0}})],y.prototype,"domains",void 0),(0,i._)([(0,a.w)("domains")],y.prototype,"readDomains",null),(0,i._)([(0,u.K)("domains")],y.prototype,"writeDomains",null),(0,i._)([(0,o.M)({type:[d.A],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,i._)([(0,l.$)("esri.layers.support.FeatureType")],y);const c=y},20437:(e,t,r)=>{r.d(t,{A:()=>m});var i,n=r(90237),s=r(66552),o=r(25482),a=r(10107),l=r(56507),u=(r(87811),r(44208),r(93223)),p=r(36005),d=r(40608),y=r(80451),c=r(98453);const h=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=i=class extends o.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?h.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,a.M)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,n._)([(0,a.M)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,n._)([(0,a.M)()],f.prototype,"description",void 0),(0,n._)([(0,p.w)("description")],f.prototype,"readDescription",null),(0,n._)([(0,a.M)({types:y.gK,json:{read:{reader:y.rS},write:!0}})],f.prototype,"domain",void 0),(0,n._)([(0,a.M)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,n._)([(0,a.M)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,n._)([(0,a.M)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,n._)([(0,a.M)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,n._)([(0,u.e)(c.m)],f.prototype,"type",void 0),(0,n._)([(0,a.M)()],f.prototype,"valueType",void 0),(0,n._)([(0,p.w)("valueType",["description"])],f.prototype,"readValueType",null),(0,n._)([(0,a.M)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=i=(0,n._)([(0,d.$)("esri.layers.support.Field")],f);const m=f},95466:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(49186),n=r(25482),s=r(53966),o=r(91869),a=r(3330),l=r(30524),u=r(56400),p=r(96285);const d=new Map;class y{static fromJSON(e){return new y(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new y(e.fields??[],m(e))}static fromLayerJSON(e){return new y(e.fields??[],m(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=h(t);if(t&&i){const n=c(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(c(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").error(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):f.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?p.mQ.utcInstance:(0,o.tE)(d,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,n.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function c(e){return e.trim().toLowerCase()}function h(e){return(0,l.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function m(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.dateFieldsTimeReference?(0,u.ZS)(n.dateFieldsTimeReference):a??u.n$:null,p=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,u.ZS)(i.timeReference):a:null,d=new Map([[c(n?.creationDateField??""),l],[c(n?.editDateField??""),l],[c(s),p],[c(o),p]]);for(const{name:i,type:n}of e.fields)if(f.has(n))t.set(i,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=d.get(c(i??""))??a;t.set(i,e)}return t}},60410:(e,t,r)=>{r.d(t,{A:()=>te});var i,n=r(90237),s=(r(59456),r(13874)),o=(r(86162),r(94409),r(65345),r(42980),r(20917),r(92438),r(96576),r(93618),r(65494),r(15036)),a=r(78888),l=r(61147),u=r(5503),p=r(49186),d=r(44208),y=r(4902),c=r(4718),h=r(92474),f=r(53966),m=r(92071),g=r(39516),b=r(84952),w=r(10107),v=r(79901),S=r(36005),_=r(40608),I=r(43937),x=r(56507),F=r(35666),M=r(88620),T=r(28132),A=r(15426),E=r(33143),O=r(20437),L=r(95466),D=r(30524),N=r(81457),P=r(39383),R=r(37352),V=r(45067),j=r(22453),C=r(27733),q=r(49053),G=r(2272),B=r(54546),$=r(61956),k=r(30291),J=r(5443),z=r(16930),Z=r(50498);function Q(e){return"esriSMS"===e?.type}function U(e,t,r){const i=this.originIdOf(t)>=(0,F.aB)(r.origin);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||i)}}function K(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&(r.origin&&this.originIdOf(t)>=(0,F.aB)(r.origin)||this._isOverridden(t))}}function H(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function Y(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||this.originIdOf(t)>=(0,F.aB)(r.origin))}}let W=0;const X=new Set(["layer","parent","loaded","loadStatus","loadError","loadWarnings"]);let ee=i=class extends((0,m.P)((0,y.sA)(h.A))){constructor(e){super(e),this.capabilities=void 0,this.maxScaleRange={minScale:0,maxScale:0},this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.isTable=!1,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.spatialReference=null,this.title=null,this.typeIdField=null,this.type="sublayer",this.types=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise((async()=>{const{layer:t,url:r}=this;if(!t&&!r)throw new p.A("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const i=t?await t.fetchSublayerInfo(this,e):(await(0,a.A)(r,{responseType:"json",query:{f:"json"},...e})).data;i&&(this.sourceJSON=i,this.read({layerDefinition:i},{origin:"service",layer:t,url:(0,G.Dl)(r)}))})()),this}readCapabilities(e,t){t=t.layerDefinition||t;const{operations:{supportsQuery:r,supportsQueryAttachments:i},query:{supportsFormatPBF:n,supportsOrderBy:s,supportsPagination:o},data:{supportsAttachment:a},queryRelated:l}=(0,j.S)(t,this.url);return{exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:r,supportsQueryAttachments:i},data:{supportsAttachment:a},query:{supportsFormatPBF:n,supportsOrderBy:s,supportsPagination:o},queryRelated:l}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}readMaxScaleRange(e,t){return{minScale:(t=t.layerDefinition||t).minScale??0,maxScale:t.maxScale??0}}get fieldsIndex(){return new L.A(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get id(){return this._get("id")??W++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}readIsTable(e,t){return"Table"===t.type}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map((e=>e.write({},i)))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers?.forEach((t=>t.layer=e))}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition?.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition?.maxScale||0}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;const r=t.fields?.find((e=>"esriFieldTypeOID"===e.type));return r?.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const{layerDefinition:r}=t;return 1-.01*(r?.transparency??r?.drawingInfo?.transparency??0)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=(0,x.Vr)(this.parent.id):t.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{capabilities:e,fieldsIndex:t,layer:r,url:i}=this,{spatialReference:n}=r,s="gdbVersion"in r?r.gdbVersion:void 0,o=(0,d.A)("featurelayer-pbf")&&e?.query.supportsFormatPBF;return new T.A({fieldsIndex:t,gdbVersion:s,pbfSupported:o,queryAttachmentsSupported:e?.operations?.supportsQueryAttachments??!1,sourceSpatialReference:n,url:i})}set renderer(e){if((0,D.yp)(e,this.fieldsIndex),e)for(const t of e.getSymbols())if((0,l.wk)(t)){f.A.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new q.f({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,x.dp)(u.A.ofType(i),e)}writeSublayers(e,t,r){this.sublayers?.length&&(t[r]=this.sublayers.map((e=>e.id)).toArray().reverse())}readTitle(e,t){return t.layerDefinition?.name??t.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,b.x0)(r)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=(0,M.oY)(this),t=new i;return(0,M.oY)(t).store=e.clone(X),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,k.tn)(this,e)}createQuery(){return new $.A({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const e=(await Promise.all([r.e(5894),r.e(2780),r.e(3600),r.e(3069)]).then(r.bind(r,13600))).default,{layer:t,url:i}=this;let n;if(i&&this.originIdOf("url")>F.Gr.SERVICE)n=new e({url:i});else{if(!t?.parsedUrl)throw new p.A("createFeatureLayer:missing-information","Cannot create a FeatureLayer without a url or a parent layer");{const r=t.parsedUrl;n=new e({url:r.path}),r&&this.source&&("map-layer"===this.source.type?n.layerId=this.source.mapLayerId:n.dynamicDataSource=this.source)}}return null!=t?.refreshInterval&&(n.refreshInterval=t.refreshInterval),this.definitionExpression&&(n.definitionExpression=this.definitionExpression),this.floorInfo&&(n.floorInfo=(0,c.o8)(this.floorInfo)),this.originIdOf("labelingInfo")>F.Gr.SERVICE&&(n.labelingInfo=(0,c.o8)(this.labelingInfo)),this.originIdOf("labelsVisible")>F.Gr.DEFAULTS&&(n.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>F.Gr.DEFAULTS&&(n.legendEnabled=this.legendEnabled),this.originIdOf("visible")>F.Gr.DEFAULTS&&(n.visible=this.visible),this.originIdOf("minScale")>F.Gr.DEFAULTS&&(n.minScale=this.minScale),this.originIdOf("maxScale")>F.Gr.DEFAULTS&&(n.maxScale=this.maxScale),this.originIdOf("opacity")>F.Gr.DEFAULTS&&(n.opacity=this.opacity),this.originIdOf("popupTemplate")>F.Gr.DEFAULTS&&(n.popupTemplate=(0,c.o8)(this.popupTemplate)),this.originIdOf("renderer")>F.Gr.SERVICE&&(n.renderer=(0,c.o8)(this.renderer)),"data-layer"===this.source?.type&&(n.dynamicDataSource=this.source.clone()),this.originIdOf("title")>F.Gr.DEFAULTS&&(n.title=this.title),"map-image"===t?.type&&t.originIdOf("customParameters")>F.Gr.DEFAULTS&&(n.customParameters=t.customParameters),"tile"===t?.type&&t.originIdOf("customParameters")>F.Gr.DEFAULTS&&(n.customParameters=t.customParameters),n}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){return(0,A.xd)(this.types,this.typeIdField,e)}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){await this.load(),e=B.A.from(e);const r=this.capabilities;if(!r?.data?.supportsAttachment)throw new p.A("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:i,objectIds:n,globalIds:s,num:o,size:a,start:l,where:u}=e;if(!r?.operations?.supportsQueryAttachments&&(i?.length>0||s?.length>0||a?.length>0||o||l||u))throw new p.A("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e);if(!(n?.length||s?.length||u))throw new p.A("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);return this.queryTask.executeAttachmentQuery(e,t)}async queryFeatureCount(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new p.A("queryFeatureCount:not-supported","this layer doesn't support queries.");if(!this.url)throw new p.A("queryFeatureCount:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeForCount(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new p.A("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new p.A("queryFeatures:not-supported","this layer has no url.");const r=await this.queryTask.execute(e,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(r?.features)for(const e of r.features)e.sourceLayer=this;return r}async queryObjectIds(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new p.A("queryObjectIds:not-supported","this layer doesn't support queries.");if(!this.url)throw new p.A("queryObjectIds:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeForIds(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryRelatedFeatures(e,t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new p.A("queryRelatedFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new p.A("queryRelatedFeatures:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeRelationshipQuery(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new p.A("queryRelatedFeaturesCount:not-supported","this layer doesn't support queries.");if(!this.capabilities.queryRelated.supportsCount)throw new p.A("queryRelatedFeaturesCount:not-supported","this layer doesn't support query related counts.");if(!this.url)throw new p.A("queryRelatedFeaturesCount:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeRelationshipQueryForCount(e,{...t,query:{...this.layer?.customParameters,token:r}})}toExportImageJSON(e){const t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,g.m)(e,this.definitionExpression);null!=r&&(t.definitionExpression=r);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce(((e,t)=>(e[t]=this.originIdOf(t),e)),{}),n=Object.keys(i).some((e=>i[e]>F.Gr.SERVICE));if(n){const e=t.drawingInfo={};if(i.renderer>F.Gr.SERVICE&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>F.Gr.SERVICE&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>F.Gr.SERVICE)if(this.labelingInfo){!this.loaded&&this.labelingInfo?.some((e=>!e.labelPlacement))&&f.A.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let t=this.labelingInfo;null!=this.geometryType&&(t=(0,P.z)(this.labelingInfo,Z.g.toJSON(this.geometryType))),e.showLabels=!0,e.labelingInfo=t.filter((e=>e.labelPlacement)).map((e=>e.toJSON({origin:"service",layer:this.layer})))}else e.showLabels=!1;i.opacity>F.Gr.SERVICE&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,(e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline?.color?e.color=e.outline.color:e.color=[0,0,0,0])}))}_forEachSimpleMarkerSymbols(e,t){if(e){const r=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of r)Q(e.symbol)&&t(e.symbol);"symbol"in e&&Q(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&Q(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,i=this._get(e);let n,s;switch(e){case"definitionExpression":case"floorInfo":n="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":n="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":n="supportsDynamicLayers",s="supportsModification"}const o=(0,M.oY)(this).getDefaultOrigin();if("service"!==o){if(n&&!1===this.layer?.capabilities?.exportMap?.[n])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${n}'`);if(s&&!1===this.capabilities?.exportMap[s])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${s}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==o&&i!==t&&r&&r.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.removeAllHandles()),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null})),e.on("before-changes",(e=>{(this.layer?.capabilities?.exportMap?.supportsSublayersChanges??1)||(f.A.getLogger(this).error(new p.A("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())}))]))}_logLockedError(e,t){const{layer:r,declaredClass:i}=this;f.A.getLogger(i).error(new p.A("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${r?.id}'`,{reason:t,sublayer:this,layer:r}))}_getLayerDomain(e){return this.fieldsIndex.get(e)?.domain??null}};ee.test={isMapImageLayerOverridePolicy:e=>e===H||e===U,isTileImageLayerOverridePolicy:e=>e===K},(0,n._)([(0,w.M)({readOnly:!0})],ee.prototype,"capabilities",void 0),(0,n._)([(0,S.w)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],ee.prototype,"readCapabilities",null),(0,n._)([(0,w.M)()],ee.prototype,"defaultPopupTemplate",null),(0,n._)([(0,w.M)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:U}}})],ee.prototype,"definitionExpression",null),(0,n._)([(0,w.M)({readOnly:!0})],ee.prototype,"effectiveScaleRange",null),(0,n._)([(0,S.w)("service","maxScaleRange",["minScale","maxScale"])],ee.prototype,"readMaxScaleRange",null),(0,n._)([(0,w.M)({type:[O.A],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],ee.prototype,"fields",void 0),(0,n._)([(0,w.M)({readOnly:!0})],ee.prototype,"fieldsIndex",null),(0,n._)([(0,w.M)({type:R.A,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:U},origins:{"web-scene":{read:!1,write:!1}}}})],ee.prototype,"floorInfo",null),(0,n._)([(0,w.M)({type:J.A,json:{read:{source:"layerDefinition.extent"}}})],ee.prototype,"fullExtent",void 0),(0,n._)([(0,w.M)({type:Z.g.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:Z.g.read}}}}})],ee.prototype,"geometryType",void 0),(0,n._)([(0,w.M)({type:String})],ee.prototype,"globalIdField",void 0),(0,n._)([(0,S.w)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],ee.prototype,"readGlobalIdFieldFromService",null),(0,n._)([(0,w.M)({type:x.jz,json:{write:{ignoreOrigin:!0}}})],ee.prototype,"id",null),(0,n._)([(0,w.M)({readOnly:!0})],ee.prototype,"isTable",void 0),(0,n._)([(0,S.w)("service","isTable",["type"])],ee.prototype,"readIsTable",null),(0,n._)([(0,w.M)({value:null,type:[N.A],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:H}}})],ee.prototype,"labelingInfo",null),(0,n._)([(0,I.K)("labelingInfo")],ee.prototype,"writeLabelingInfo",null),(0,n._)([(0,w.M)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:H}}})],ee.prototype,"labelsVisible",null),(0,n._)([(0,w.M)({value:null})],ee.prototype,"layer",null),(0,n._)([(0,w.M)({type:String,json:{write:{overridePolicy:K}}})],ee.prototype,"layerItemId",void 0),(0,n._)([(0,w.M)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:Y}}})],ee.prototype,"legendEnabled",void 0),(0,n._)([(0,w.M)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],ee.prototype,"listMode",null),(0,n._)([(0,w.M)({type:Number,value:0,json:{write:{overridePolicy:H}}})],ee.prototype,"minScale",null),(0,n._)([(0,S.w)("minScale",["minScale","layerDefinition.minScale"])],ee.prototype,"readMinScale",null),(0,n._)([(0,w.M)({type:Number,value:0,json:{write:{overridePolicy:H}}})],ee.prototype,"maxScale",null),(0,n._)([(0,S.w)("maxScale",["maxScale","layerDefinition.maxScale"])],ee.prototype,"readMaxScale",null),(0,n._)([(0,w.M)()],ee.prototype,"objectIdField",void 0),(0,n._)([(0,S.w)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],ee.prototype,"readObjectIdFieldFromService",null),(0,n._)([(0,w.M)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:H}}})],ee.prototype,"opacity",null),(0,n._)([(0,S.w)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],ee.prototype,"readOpacity",null),(0,n._)([(0,I.K)("opacity")],ee.prototype,"writeOpacity",null),(0,n._)([(0,w.M)({json:{type:x.jz,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:H}}})],ee.prototype,"parent",void 0),(0,n._)([(0,I.K)("parent")],ee.prototype,"writeParent",null),(0,n._)([(0,w.M)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:Y,writer(e,t,r){t[r]=!e}}}})],ee.prototype,"popupEnabled",void 0),(0,n._)([(0,w.M)({type:s.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:Y}}})],ee.prototype,"popupTemplate",void 0),(0,n._)([(0,w.M)({readOnly:!0})],ee.prototype,"queryTask",null),(0,n._)([(0,w.M)({type:[V.A],readOnly:!0,json:{origins:{service:{read:{source:"layerDefinition.relationships"}}}}})],ee.prototype,"relationships",void 0),(0,n._)([(0,w.M)({types:o.H,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:H},origins:{"web-scene":{types:o.X,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:H}}}}})],ee.prototype,"renderer",null),(0,n._)([(0,w.M)({types:{key:"type",base:null,typeMap:{"data-layer":C.L,"map-layer":q.f}},cast(e){if(e){if("mapLayerId"in e)return(0,x.PZ)(q.f,e);if("dataSource"in e)return(0,x.PZ)(C.L,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:H}}})],ee.prototype,"source",null),(0,n._)([(0,w.M)()],ee.prototype,"sourceJSON",void 0),(0,n._)([(0,w.M)({type:z.A,json:{origins:{service:{read:{source:"layerDefinition.extent.spatialReference"}}}}})],ee.prototype,"spatialReference",void 0),(0,n._)([(0,w.M)({value:null,json:{type:[x.jz],write:{target:"subLayerIds",allowNull:!0,overridePolicy:H}}})],ee.prototype,"sublayers",null),(0,n._)([(0,v.w)("sublayers")],ee.prototype,"castSublayers",null),(0,n._)([(0,I.K)("sublayers")],ee.prototype,"writeSublayers",null),(0,n._)([(0,w.M)({type:String,json:{name:"name",write:{overridePolicy:Y}}})],ee.prototype,"title",void 0),(0,n._)([(0,S.w)("service","title",["name","layerDefinition.name"])],ee.prototype,"readTitle",null),(0,n._)([(0,w.M)({type:String})],ee.prototype,"typeIdField",void 0),(0,n._)([(0,w.M)({json:{read:!1},readOnly:!0,value:"sublayer"})],ee.prototype,"type",void 0),(0,n._)([(0,S.w)("typeIdField",["layerDefinition.typeIdField"])],ee.prototype,"readTypeIdField",null),(0,n._)([(0,w.M)({type:[E.A],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],ee.prototype,"types",void 0),(0,n._)([(0,w.M)({type:String,json:{name:"layerUrl",write:{overridePolicy:K}}})],ee.prototype,"url",null),(0,n._)([(0,w.M)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:H}}})],ee.prototype,"visible",null),(0,n._)([(0,I.K)("visible")],ee.prototype,"writeVisible",null),ee=i=(0,n._)([(0,_.$)("esri.layers.support.Sublayer")],ee);const te=ee},80451:(e,t,r)=>{r.d(t,{rS:()=>m,gK:()=>f}),r(44208);var i,n=r(53177),s=r(76357),o=r(90237),a=(r(53966),r(87811),r(49186),r(93223)),l=r(40608);let u=i=class extends s.A{constructor(e){super(e),this.type="inherited"}clone(){return new i}};(0,o._)([(0,a.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=i=(0,o._)([(0,l.$)("esri.layers.support.InheritedDomain")],u);const p=u;var d,y=r(10107);let c=d=class extends s.A{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new d({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,y.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],c.prototype,"maxValue",void 0),(0,o._)([(0,y.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],c.prototype,"minValue",void 0),(0,o._)([(0,a.e)({range:"range"})],c.prototype,"type",void 0),c=d=(0,o._)([(0,l.$)("esri.layers.support.RangeDomain")],c);const h=c,f={key:"type",base:s.A,typeMap:{range:h,"coded-value":n.A,inherited:p}};function m(e){if(!e?.type)return null;switch(e.type){case"range":return h.fromJSON(e);case"codedValue":return n.A.fromJSON(e);case"inherited":return p.fromJSON(e)}return null}},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},33446:(e,t,r)=>{r.d(t,{C:()=>o,m:()=>s});var i=r(49186),n=r(74887);async function s(e,t,r){let s;try{s=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,n.Te)(r),s}async function o(e,t,r,s,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load tile ${t}/${r}/${s}`,{error:e,level:t,row:r,col:s})}return(0,n.Te)(o),a}},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>h,XJ:()=>f,lc:()=>c,mX:()=>b,rU:()=>g,tH:()=>I});var i=r(799);const n="__begin__",s="__end__",o=new RegExp(n,"ig"),a=new RegExp(s,"ig"),l=new RegExp("^"+n,"i"),u=new RegExp(s+"$","i"),p='"',d=p+" + ",y=" + "+p;function c(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=c(e.labelExpression),t.type="conventional"),t}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return b(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return I(t.expression)}return null}function b(e){let t;return e?(t=(0,i.HC)(e,(e=>n+'$feature["'+e+'"]'+s)),t=l.test(t)?t.replace(l,""):p+t,t=u.test(t)?t.replace(u,""):t+p,t=t.replaceAll(o,d).replaceAll(a,y)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,S=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,_=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function I(e){if(!e)return null;let t=v.exec(e)||S.exec(e);return t?t[1]||t[3]:(t=_.exec(e),t?t[2]:null)}},63389:(e,t,r)=>{r.d(t,{Sk:()=>s,Zx:()=>n,_X:()=>a});var i=r(35666);function n(e,t,r){const i=t.flatten((({sublayers:e})=>e)).length;return i!==e.length||!!e.some((e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r))||!o(e,t)}function s(e,t,r){return!!e.some((e=>{const t=e.source,n=!t||"map-layer"===t.type&&t.mapLayerId===e.id&&(null==t.gdbVersion||t.gdbVersion===r);return e.commitProperty("renderer"),e.commitProperty("labelingInfo"),e.commitProperty("opacity"),e.commitProperty("labelsVisible"),!n||e.originIdOf("renderer")>i.Gr.SERVICE||e.originIdOf("labelingInfo")>i.Gr.SERVICE||e.originIdOf("opacity")>i.Gr.SERVICE||e.originIdOf("labelsVisible")>i.Gr.SERVICE}))||!o(e,t)}function o(e,t){if(!e?.length||null==t)return!0;const r=t.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).map((e=>e.id)).toArray();if(e.length>r.length)return!1;let i=0;const n=r.length;for(const{id:t}of e){for(;i<n&&r[i]!==t;)i++;if(i>=n)return!1}return!0}function a(e){return!!e&&e.some((e=>null!=e.minScale||null!=e.layerDefinition?.minScale))}},58501:(e,t,r)=>{r.d(t,{q:()=>n});var i=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of r.features)n(e.geometry)}},22671:(e,t,r)=>{r.d(t,{A:()=>w});var i,n=r(90237),s=r(59456),o=r(52106),a=r(66552),l=r(25482),u=r(4718),p=r(10107),d=(r(44208),r(53966),r(36005)),y=r(40608),c=r(43937),h=r(16930),f=r(65864),m=r(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=i=class extends l.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],s=o.A.fromJSON(n),a=n.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=r);const l=n.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}i.push(s)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*s+i),(e=>n-e*o),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,n;const s=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===i&&o===n||(s.push([e-i,o-n]),i=e,n=o)}else i=t(a[0]),n=r(a[1]),s.push([i,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,f.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],o=this._quantizePoints(s,t,r);o&&n.push(o)}return n.length>0?((0,f.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(o+=n[0],a+=n[1]):(o=n[0],a=n[1]),n[0]=t(o),n[1]=r(a)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,p.M)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,n._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,p.M)({type:[o.A],json:{write:!0}})],b.prototype,"features",void 0),(0,n._)([(0,d.w)("features")],b.prototype,"readFeatures",null),(0,n._)([(0,p.M)({type:[m.A],json:{write:!0}})],b.prototype,"fields",void 0),(0,n._)([(0,p.M)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,n._)([(0,c.K)("geometryType")],b.prototype,"writeGeometryType",null),(0,n._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,n._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,n._)([(0,p.M)({types:s.yR,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,n._)([(0,d.w)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,n._)([(0,p.M)({type:h.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,n._)([(0,c.K)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,n._)([(0,p.M)({json:{write:!0}})],b.prototype,"transform",void 0),b=i=(0,n._)([(0,y.$)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0;const w=b}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4761],{39516:(e,t,i)=>{async function r(e,t){const{WhereClause:r}=await Promise.all([i.e(835),i.e(4800)]).then(i.bind(i,50835));return r.create(e,{fieldsIndex:t})}function n(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}i.d(t,{G:()=>r,m:()=>n})},3330:(e,t,i)=>{i.d(t,{GB:()=>n,Qo:()=>o,Y4:()=>s});var r=i(96285);class n{}function s(e){return e instanceof r.bo?e===n.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return s(e)?n.instance:e}n.instance=new r.oh("Etc/UTC")},70328:(e,t,i)=>{i.d(t,{BI:()=>b,Ej:()=>y,Hq:()=>d,Ie:()=>w,Jt:()=>_,Ne:()=>f,RF:()=>l,_F:()=>m,aI:()=>F,fA:()=>s,gX:()=>h,hZ:()=>v,iT:()=>a,is:()=>I,qv:()=>M,vI:()=>g,v_:()=>S,vt:()=>n,w1:()=>o});var r=i(5443);function n(e=S){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,i,r,s,o,l=n()){return l[0]=e,l[1]=t,l[2]=i,l[3]=r,l[4]=s,l[5]=o,l}function o(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new r.A(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t,i=0,r=t.length/3){let n=e[0],s=e[1],o=e[2],l=e[3],a=e[4],d=e[5];for(let e=0;e<r;e++)n=Math.min(n,t[i+3*e]),s=Math.min(s,t[i+3*e+1]),o=Math.min(o,t[i+3*e+2]),l=Math.max(l,t[i+3*e]),a=Math.max(a,t[i+3*e+1]),d=Math.max(d,t[i+3*e+2]);e[0]=n,e[1]=s,e[2]=o,e[3]=l,e[4]=a,e[5]=d}function u(e){return e[0]>=e[3]?0:e[3]-e[0]}function p(e){return e[1]>=e[4]?0:e[4]-e[1]}function c(e){return e[2]>=e[5]?0:e[5]-e[2]}function m(e){const t=u(e),i=c(e),r=p(e);return Math.sqrt(t*t+i*i+r*r)}function h(e,t=[0,0,0]){return t[0]=e[0]+u(e)/2,t[1]=e[1]+p(e)/2,t[2]=e[2]+c(e)/2,t}function y(e,t=[0,0,0]){return t[0]=u(e),t[1]=p(e),t[2]=c(e),t}function f(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function g(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function v(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function w(e){return e?v(e,M):n(M)}function _(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function b(e,t,i,r,n){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function I(e){return 6===e.length}function F(e,t,i){if(null==e||null==t)return e===t;if(!I(e)||!I(t))return!1;if(i){for(let r=0;r<e.length;r++)if(!i(e[r],t[r]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}i(19419);const M=[1/0,1/0,1/0,-1/0,-1/0,-1/0],S=[0,0,0,0,0,0];n()},60683:(e,t,i)=>{i.r(t),i.d(t,{default:()=>W});var r,n=i(90237),s=(i(59456),i(13874)),o=(i(86162),i(94409),i(65345),i(42980),i(20917),i(92438),i(96576),i(93618),i(65494)),l=i(15036),a=i(78888),d=i(69540),u=i(49186),p=i(36563),c=i(4718),m=i(53966),h=i(92071),y=i(74887),f=i(10107),g=i(56507),v=i(36005),w=i(40608),_=i(50498),b=i(4146),I=i(18768),F=i(63074),M=i(69208),S=i(87718),x=i(76294),T=i(16131),A=i(8303),P=i(54310),E=i(25036),N=i(82935),R=i(10873),O=i(15426),j=i(20437),V=i(17036),$=i(30524),D=i(81457),U=i(39383),k=i(25482);i(44208),i(87811);let L=r=class extends k.oY{constructor(){super(...arguments),this.age=null,this.ageReceived=null,this.displayCount=null,this.maxObservations=1}clone(){return new r({age:this.age,ageReceived:this.ageReceived,displayCount:this.displayCount,maxObservations:this.maxObservations})}};(0,n._)([(0,f.M)({type:Number,json:{write:!0}})],L.prototype,"age",void 0),(0,n._)([(0,f.M)({type:Number,json:{write:!0}})],L.prototype,"ageReceived",void 0),(0,n._)([(0,f.M)({type:Number,json:{write:!0}})],L.prototype,"displayCount",void 0),(0,n._)([(0,f.M)({type:Number,json:{write:!0}})],L.prototype,"maxObservations",void 0),L=r=(0,n._)([(0,w.$)("esri.layers.support.PurgeOptions")],L);const C=L;var J=i(8947),Z=i(61956),B=i(30291),q=i(88625),z=i(92935),H=i(16930),G=i(5443);const X=(0,V.p)();function Q(e,t){return new u.A("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}let Y=class extends((0,x.J)((0,S.F)((0,F.dM)((0,N.e)((0,E.j)((0,P.J)((0,I.b)((0,T.q)((0,A.A)((0,h.P)((0,M.d)((0,d.O)(b.A))))))))))))){constructor(...e){super(...e),this.copyright=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.geometryDefinition=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.maxReconnectionAttempts=0,this.maxReconnectionInterval=20,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.operationalLayerType="ArcGISStreamLayer",this.outFields=["*"],this.popupEnabled=!0,this.popupTemplate=null,this.purgeOptions=new C,this.refreshInterval=0,this.screenSizePerspectiveEnabled=!0,this.sourceJSON=null,this.spatialReference=H.A.WGS84,this.type="stream",this.url=null,this.updateInterval=300,this.useViewTime=!0,this.webSocketUrl=null,this._debouncedSaveOperations=(0,y.sg)((async(e,t,r)=>{const{save:n,saveAs:s}=await i.e(7301).then(i.bind(i,87301));switch(e){case z.X.SAVE:return n(this,t);case z.X.SAVE_AS:return s(this,r,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){if(!("WebSocket"in globalThis))return this.addResolvingPromise(Promise.reject(new u.A("stream-layer:websocket-unsupported","WebSocket is not supported in this browser. StreamLayer will not have real-time connection with the stream service."))),Promise.resolve(this);const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Stream Service","Feed"]},e).catch(y.QP).then((()=>this._fetchService(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}set renderer(e){(0,$.yp)(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,i){t=t.layerDefinition||t;const r=t.drawingInfo?.renderer;if(r){const e=(0,o.L)(r,t,i)||void 0;return e||m.A.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:i}),e}return(0,O.PD)(t,i)}async connect(e){const[{createConnection:t}]=await Promise.all([Promise.all([i.e(893),i.e(2830)]).then(i.bind(i,30624)),this.load()]),r=this.geometryType?_.g.toJSON(this.geometryType):null,{customParameters:n=null,definitionExpression:s=null,geometryDefinition:o=null,maxReconnectionAttempts:l=0,maxReconnectionInterval:a=20,spatialReference:d=this.spatialReference}=e||this.createConnectionParameters(),u=t(this.parsedUrl,this.spatialReference,d,r,s,o,l,a,n??void 0),c=(0,p.vE)([this.on("send-message-to-socket",(e=>u.sendMessageToSocket(e))),this.on("send-message-to-client",(e=>u.sendMessageToClient(e)))]);return u.once("destroy",c.remove),u}createConnectionParameters(){return{spatialReference:this.spatialReference,customParameters:this.customParameters,definitionExpression:this.definitionExpression,geometryDefinition:this.geometryDefinition,maxReconnectionAttempts:this.maxReconnectionAttempts,maxReconnectionInterval:this.maxReconnectionInterval}}createPopupTemplate(e){return(0,B.tn)(this,e)}createQuery(){const e=new Z.A;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}getFieldDomain(e,t){if(!this.fields)return null;let i=null;return this.fields.some((t=>(t.name===e&&(i=t.domain),!!i))),i}getField(e){return this.fieldsIndex.get(e)}serviceSupportsSpatialReference(e){return!0}sendMessageToSocket(e){this.emit("send-message-to-socket",e)}sendMessageToClient(e){this.emit("send-message-to-client",e)}async save(e){return this._debouncedSaveOperations(z.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(z.X.SAVE_AS,t,e)}write(e,t){const i=t?.messages;return this.webSocketUrl?(i?.push(Q(this,"using a custom websocket connection cannot be written to web scenes and web maps")),null):this.parsedUrl?super.write(e,t):(i?.push(Q(this,"using a client-side only connection without a url cannot be written to web scenes and web maps")),null)}async _fetchService(e){if(!this.webSocketUrl&&this.parsedUrl){if(!this.sourceJSON){const{data:t}=await(0,a.A)(this.parsedUrl.path,{query:{f:"json",...this.customParameters,...this.parsedUrl.query},responseType:"json",signal:e});this.sourceJSON=t}}else{if(!this.timeInfo?.trackIdField)throw new u.A("stream-layer:missing-metadata","The stream layer trackIdField must be specified.");if(!this.objectIdField){const e=this.fields.find((e=>"oid"===e.type))?.name;if(!e)throw new u.A("stream-layer:missing-metadata","The stream layer objectIdField must be specified.");this.objectIdField=e}if(!this.fields)throw new u.A("stream-layer:missing-metadata","The stream layer fields must be specified.");if(this.fields.some((e=>e.name===this.objectIdField))||this.fields.push(new j.A({name:this.objectIdField,alias:this.objectIdField,type:"oid"})),!this.geometryType)throw new u.A("stream-layer:missing-metadata","The stream layer geometryType must be specified.");this.webSocketUrl&&(this.url=this.webSocketUrl)}return this.read(this.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}),(0,$.yp)(this.renderer,this.fieldsIndex),(0,$.sv)(this.timeInfo,this.fieldsIndex),this.objectIdField||(this.objectIdField="__esri_stream_id__"),(0,J.L)(this,{origin:"service"})}};(0,n._)([(0,f.M)({type:String})],Y.prototype,"copyright",void 0),(0,n._)([(0,f.M)({readOnly:!0})],Y.prototype,"defaultPopupTemplate",null),(0,n._)([(0,f.M)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Y.prototype,"definitionExpression",void 0),(0,n._)([(0,f.M)({type:String})],Y.prototype,"displayField",void 0),(0,n._)([(0,f.M)({type:q.A})],Y.prototype,"elevationInfo",void 0),(0,n._)([(0,f.M)({json:{origins:{"web-map":{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],Y.prototype,"featureReduction",null),(0,n._)([(0,f.M)(X.fields)],Y.prototype,"fields",void 0),(0,n._)([(0,f.M)(X.fieldsIndex)],Y.prototype,"fieldsIndex",void 0),(0,n._)([(0,f.M)({type:G.A,json:{name:"layerDefinition.definitionGeometry",write:!0}})],Y.prototype,"geometryDefinition",void 0),(0,n._)([(0,f.M)({type:_.g.apiValues,json:{read:{reader:_.g.read}}})],Y.prototype,"geometryType",void 0),(0,n._)([(0,f.M)(R.kF)],Y.prototype,"labelsVisible",void 0),(0,n._)([(0,f.M)({type:[D.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:U.w},write:!0}})],Y.prototype,"labelingInfo",void 0),(0,n._)([(0,f.M)(R.fV)],Y.prototype,"legendEnabled",void 0),(0,n._)([(0,f.M)({type:["show","hide"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],Y.prototype,"listMode",void 0),(0,n._)([(0,f.M)({type:g.jz})],Y.prototype,"maxReconnectionAttempts",void 0),(0,n._)([(0,f.M)({type:g.jz})],Y.prototype,"maxReconnectionInterval",void 0),(0,n._)([(0,f.M)(R.hG)],Y.prototype,"maxScale",void 0),(0,n._)([(0,f.M)(R.hn)],Y.prototype,"minScale",void 0),(0,n._)([(0,f.M)({type:String})],Y.prototype,"objectIdField",void 0),(0,n._)([(0,f.M)({value:"ArcGISStreamLayer",type:["ArcGISStreamLayer"]})],Y.prototype,"operationalLayerType",void 0),(0,n._)([(0,f.M)({readOnly:!0})],Y.prototype,"outFields",void 0),(0,n._)([(0,f.M)(R.M6)],Y.prototype,"popupEnabled",void 0),(0,n._)([(0,f.M)({type:s.A,json:{name:"popupInfo",write:!0}})],Y.prototype,"popupTemplate",void 0),(0,n._)([(0,f.M)({type:C})],Y.prototype,"purgeOptions",void 0),(0,n._)([(0,f.M)({json:{read:!1,write:!1}})],Y.prototype,"refreshInterval",void 0),(0,n._)([(0,f.M)({types:l.H,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{name:"layerDefinition.drawingInfo.renderer",types:l.X,write:!0}},write:{target:"layerDefinition.drawingInfo.renderer"}}})],Y.prototype,"renderer",null),(0,n._)([(0,v.w)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),(0,v.w)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Y.prototype,"readRenderer",null),(0,n._)([(0,f.M)((()=>{const e=(0,c.o8)(R.PY);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],Y.prototype,"screenSizePerspectiveEnabled",void 0),(0,n._)([(0,f.M)()],Y.prototype,"sourceJSON",void 0),(0,n._)([(0,f.M)({type:H.A,json:{origins:{service:{read:{source:"spatialReference"}}}}})],Y.prototype,"spatialReference",void 0),(0,n._)([(0,f.M)({json:{read:!1}})],Y.prototype,"type",void 0),(0,n._)([(0,f.M)(R.OZ)],Y.prototype,"url",void 0),(0,n._)([(0,f.M)({type:Number})],Y.prototype,"updateInterval",void 0),(0,n._)([(0,f.M)({json:{read:!1,write:!1}})],Y.prototype,"useViewTime",void 0),(0,n._)([(0,f.M)({type:String})],Y.prototype,"webSocketUrl",void 0),Y=(0,n._)([(0,w.$)("esri.layers.StreamLayer")],Y);const W=Y},18768:(e,t,i)=>{i.d(t,{b:()=>a});var r=i(90237),n=i(53966),s=i(10107),o=(i(44208),i(87811),i(40608)),l=i(60694);const a=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Jf)(e,n.A.getLogger(this)))}};return(0,r._)([(0,s.M)()],t.prototype,"title",null),(0,r._)([(0,s.M)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},69208:(e,t,i)=>{i.d(t,{d:()=>o});var r=i(90237),n=i(10107),s=(i(44208),i(53966),i(87811),i(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,r._)([(0,n.M)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,r._)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},8303:(e,t,i)=>{i.d(t,{A:()=>I});var r=i(90237),n=i(92602),s=i(70333),o=i(78888),l=i(60999),a=i(49186),d=i(53966),u=i(97768),p=i(74887),c=i(84952),m=i(10107),h=(i(44208),i(87811),i(36005)),y=i(40608),f=i(43937),g=i(83531),v=i(20655),w=i(80812),_=i(41318),b=i(10407);const I=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new w.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await Promise.all([i.e(5356),i.e(1204)]).then(i.bind(i,41204));return(0,p.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.zf)(e)||d.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.QP)(e),!0))))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,b.It)(i);let n,o;if(r)n=i.portal.url;else try{n=await(0,g.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!n||!(0,c.b8)(n,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,a=!1,d=!1;if(!o)return{features:{edit:l,fullEdit:a},content:{updateItem:d}};try{if(r?await i.reload():(i=new w.default({id:e,portal:{url:n}}),await i.load(t)),i.portal.user)return(0,b.It)(i)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:a},content:{updateItem:d}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=F.credential===t?F.user:await this._fetchEditingUser(e);return F.credential=t,F.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,n=v.A.getDefault();if(n&&n.loaded&&(0,c.S8)(n.restUrl)===(0,c.S8)(r))return n.user;const a=`${r}/community/self`,d=null!=e?e.signal:null,u=await(0,l.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:d}));return u.ok?_.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return i&&r&&!(0,c.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,m.M)({type:w.default})],t.prototype,"portalItem",null),(0,r._)([(0,h.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,m.M)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,m.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,m.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,m.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,y.$)("esri.layers.mixins.PortalLayer")],t),t},F={credential:null,user:null}},20437:(e,t,i)=>{i.d(t,{A:()=>f});var r,n=i(90237),s=i(66552),o=i(25482),l=i(10107),a=i(56507),d=(i(87811),i(44208),i(93223)),u=i(36005),p=i(40608),c=i(72088),m=i(98453);const h=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let y=r=class extends o.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?h.fromJSON(i.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,l.M)({type:String,json:{write:!0}})],y.prototype,"alias",void 0),(0,n._)([(0,l.M)({type:[String,Number],json:{write:{allowNull:!0}}})],y.prototype,"defaultValue",void 0),(0,n._)([(0,l.M)()],y.prototype,"description",void 0),(0,n._)([(0,u.w)("description")],y.prototype,"readDescription",null),(0,n._)([(0,l.M)({types:c.gK,json:{read:{reader:c.rS},write:!0}})],y.prototype,"domain",void 0),(0,n._)([(0,l.M)({type:Boolean,json:{write:!0}})],y.prototype,"editable",void 0),(0,n._)([(0,l.M)({type:a.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],y.prototype,"length",void 0),(0,n._)([(0,l.M)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,n._)([(0,l.M)({type:Boolean,json:{write:!0}})],y.prototype,"nullable",void 0),(0,n._)([(0,d.e)(m.m)],y.prototype,"type",void 0),(0,n._)([(0,l.M)()],y.prototype,"valueType",void 0),(0,n._)([(0,u.w)("valueType",["description"])],y.prototype,"readValueType",null),(0,n._)([(0,l.M)({type:Boolean,json:{read:!1}})],y.prototype,"visible",void 0),y=r=(0,n._)([(0,p.$)("esri.layers.support.Field")],y);const f=y},95466:(e,t,i)=>{i.d(t,{A:()=>c});var r=i(49186),n=i(25482),s=i(53966),o=i(91869),l=i(3330),a=i(30524),d=i(56400),u=i(96285);const p=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],f(e))}static fromLayerJSON(e){return new c(e.fields??[],f(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,r=h(t);if(t&&r){const n=m(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(r,e),i.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(m(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").error(new r.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),d.n$):y.has(t.type)?d.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===d.L5?l.GB.instance:t===d.n$?u.mQ.utcInstance:(0,o.tE)(p,t,(()=>u.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,n.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function m(e){return e.trim().toLowerCase()}function h(e){return(0,a.rS)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function f(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:n}=e,s=(r?"startField"in r?r.startField:r.startTimeField:"")??"",o=(r?"endField"in r?r.endField:r.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,d.ZS)(e.dateFieldsTimeReference):null,a=n?function(e){return"timeZone"in e}(n)?n.timeZone??l:n.dateFieldsTimeReference?(0,d.ZS)(n.dateFieldsTimeReference):l??d.n$:null,u=r?function(e){return"timeZone"in e}(r)?r.timeZone??l:r.timeReference?(0,d.ZS)(r.timeReference):l:null,p=new Map([[m(n?.creationDateField??""),a],[m(n?.editDateField??""),a],[m(s),u],[m(o),u]]);for(const{name:r,type:n}of e.fields)if(y.has(n))t.set(r,d.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(r,null);else if(i)t.set(r,d.L5);else{const e=p.get(m(r??""))??l;t.set(r,e)}return t}},72088:(e,t,i)=>{i.d(t,{rS:()=>M,gK:()=>F}),i(44208);var r,n=i(90237),s=i(4718),o=i(10107),l=(i(53966),i(93223)),a=i(40608),d=i(25482);i(87811);let u=r=class extends d.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,n._)([(0,o.M)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,n._)([(0,o.M)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=r=(0,n._)([(0,a.$)("esri.layers.support.CodedValue")],u);const p=new(i(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends d.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,o.M)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,l.e)(p)],c.prototype,"type",void 0),c=(0,n._)([(0,a.$)("esri.layers.support.Domain")],c);const m=c;var h;let y=h=class extends m{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some((e=>(String(e.code)===i&&(t=e.name),!!t)))}return t}clone(){return new h({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,o.M)({type:[u],json:{write:!0}})],y.prototype,"codedValues",void 0),(0,n._)([(0,l.e)({codedValue:"coded-value"})],y.prototype,"type",void 0),y=h=(0,n._)([(0,a.$)("esri.layers.support.CodedValueDomain")],y);const f=y;var g;i(49186);let v=g=class extends m{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,n._)([(0,l.e)({inherited:"inherited"})],v.prototype,"type",void 0),v=g=(0,n._)([(0,a.$)("esri.layers.support.InheritedDomain")],v);const w=v;var _;let b=_=class extends m{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new _({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,o.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]}}}})],b.prototype,"maxValue",void 0),(0,n._)([(0,o.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]}}}})],b.prototype,"minValue",void 0),(0,n._)([(0,l.e)({range:"range"})],b.prototype,"type",void 0),b=_=(0,n._)([(0,a.$)("esri.layers.support.RangeDomain")],b);const I=b,F={key:"type",base:m,typeMap:{range:b,"coded-value":f,inherited:w}};function M(e){if(!e?.type)return null;switch(e.type){case"range":return I.fromJSON(e);case"codedValue":return f.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},98453:(e,t,i)=>{i.d(t,{m:()=>r});const r=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},32730:(e,t,i)=>{i.d(t,{BI:()=>f,D3:()=>h,XJ:()=>y,lc:()=>m,mX:()=>v,rU:()=>g,tH:()=>F});var r=i(799);const n="__begin__",s="__end__",o=new RegExp(n,"ig"),l=new RegExp(s,"ig"),a=new RegExp("^"+n,"i"),d=new RegExp(s+"$","i"),u='"',p=u+" + ",c=" + "+u;function m(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function y(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=m(e.labelExpression),t.type="conventional"),t}function f(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return v(t.expression);case"arcade":return t.expression}return null}function g(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return F(t.expression)}return null}function v(e){let t;return e?(t=(0,r.HC)(e,(e=>n+'$feature["'+e+'"]'+s)),t=a.test(t)?t.replace(a,""):u+t,t=d.test(t)?t.replace(d,""):t+u,t=t.replaceAll(o,p).replaceAll(l,c)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,I=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function F(e){if(!e)return null;let t=_.exec(e)||b.exec(e);return t?t[1]||t[3]:(t=I.exec(e),t?t[2]:null)}},8947:(e,t,i)=>{i.d(t,{L:()=>o});var r=i(60999),n=i(74887),s=i(67076);async function o(e,t,i){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const l=await(0,r.Ke)(o.populateFromStyle());if((0,n.Te)(i),!1===l.ok){const i=l.error;t?.messages&&t.messages.push(new s.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${i.message}`,{error:i,context:t})),e.clear("renderer",t?.origin)}}}},92935:(e,t,i)=>{var r;i.d(t,{X:()=>r}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(r||(r={}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4761],{39516:(e,t,i)=>{async function r(e,t){const{WhereClause:r}=await Promise.all([i.e(835),i.e(4800)]).then(i.bind(i,50835));return r.create(e,{fieldsIndex:t})}function n(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}i.d(t,{G:()=>r,m:()=>n})},3330:(e,t,i)=>{i.d(t,{GB:()=>n,Qo:()=>o,Y4:()=>s});var r=i(96285);class n{}function s(e){return e instanceof r.bo?e===n.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return s(e)?n.instance:e}n.instance=new r.oh("Etc/UTC")},70328:(e,t,i)=>{i.d(t,{BI:()=>b,Ej:()=>y,Hq:()=>d,Ie:()=>w,Jt:()=>_,Ne:()=>f,RF:()=>l,_F:()=>m,aI:()=>F,fA:()=>s,gX:()=>h,hZ:()=>v,iT:()=>a,is:()=>I,qv:()=>M,vI:()=>g,v_:()=>S,vt:()=>n,w1:()=>o});var r=i(5443);function n(e=S){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,i,r,s,o,l=n()){return l[0]=e,l[1]=t,l[2]=i,l[3]=r,l[4]=s,l[5]=o,l}function o(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new r.A(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t,i=0,r=t.length/3){let n=e[0],s=e[1],o=e[2],l=e[3],a=e[4],d=e[5];for(let e=0;e<r;e++)n=Math.min(n,t[i+3*e]),s=Math.min(s,t[i+3*e+1]),o=Math.min(o,t[i+3*e+2]),l=Math.max(l,t[i+3*e]),a=Math.max(a,t[i+3*e+1]),d=Math.max(d,t[i+3*e+2]);e[0]=n,e[1]=s,e[2]=o,e[3]=l,e[4]=a,e[5]=d}function u(e){return e[0]>=e[3]?0:e[3]-e[0]}function p(e){return e[1]>=e[4]?0:e[4]-e[1]}function c(e){return e[2]>=e[5]?0:e[5]-e[2]}function m(e){const t=u(e),i=c(e),r=p(e);return Math.sqrt(t*t+i*i+r*r)}function h(e,t=[0,0,0]){return t[0]=e[0]+u(e)/2,t[1]=e[1]+p(e)/2,t[2]=e[2]+c(e)/2,t}function y(e,t=[0,0,0]){return t[0]=u(e),t[1]=p(e),t[2]=c(e),t}function f(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function g(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function v(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function w(e){return e?v(e,M):n(M)}function _(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function b(e,t,i,r,n){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function I(e){return 6===e.length}function F(e,t,i){if(null==e||null==t)return e===t;if(!I(e)||!I(t))return!1;if(i){for(let r=0;r<e.length;r++)if(!i(e[r],t[r]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}i(19419);const M=[1/0,1/0,1/0,-1/0,-1/0,-1/0],S=[0,0,0,0,0,0];n()},60683:(e,t,i)=>{i.r(t),i.d(t,{default:()=>W});var r,n=i(90237),s=(i(59456),i(13874)),o=(i(86162),i(94409),i(65345),i(42980),i(20917),i(92438),i(96576),i(93618),i(65494)),l=i(15036),a=i(78888),d=i(69540),u=i(49186),p=i(36563),c=i(4718),m=i(53966),h=i(92071),y=i(74887),f=i(10107),g=i(56507),v=i(36005),w=i(40608),_=i(50498),b=i(4146),I=i(18768),F=i(63074),M=i(69208),S=i(87718),x=i(76294),T=i(16131),A=i(8303),P=i(54310),E=i(25036),N=i(82935),R=i(10873),O=i(15426),j=i(20437),V=i(17036),$=i(30524),D=i(81457),U=i(39383),k=i(25482);i(44208),i(87811);let L=r=class extends k.oY{constructor(){super(...arguments),this.age=null,this.ageReceived=null,this.displayCount=null,this.maxObservations=1}clone(){return new r({age:this.age,ageReceived:this.ageReceived,displayCount:this.displayCount,maxObservations:this.maxObservations})}};(0,n._)([(0,f.M)({type:Number,json:{write:!0}})],L.prototype,"age",void 0),(0,n._)([(0,f.M)({type:Number,json:{write:!0}})],L.prototype,"ageReceived",void 0),(0,n._)([(0,f.M)({type:Number,json:{write:!0}})],L.prototype,"displayCount",void 0),(0,n._)([(0,f.M)({type:Number,json:{write:!0}})],L.prototype,"maxObservations",void 0),L=r=(0,n._)([(0,w.$)("esri.layers.support.PurgeOptions")],L);const C=L;var J=i(8947),Z=i(61956),B=i(30291),H=i(88625),q=i(92935),z=i(16930),G=i(5443);const X=(0,V.p)();function Q(e,t){return new u.A("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}let Y=class extends((0,x.J)((0,S.F)((0,F.dM)((0,N.e)((0,E.j)((0,P.J)((0,I.b)((0,T.q)((0,A.A)((0,h.P)((0,M.d)((0,d.O)(b.A))))))))))))){constructor(...e){super(...e),this.copyright=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.geometryDefinition=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.maxReconnectionAttempts=0,this.maxReconnectionInterval=20,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.operationalLayerType="ArcGISStreamLayer",this.outFields=["*"],this.popupEnabled=!0,this.popupTemplate=null,this.purgeOptions=new C,this.refreshInterval=0,this.screenSizePerspectiveEnabled=!0,this.sourceJSON=null,this.spatialReference=z.A.WGS84,this.type="stream",this.url=null,this.updateInterval=300,this.useViewTime=!0,this.webSocketUrl=null,this._debouncedSaveOperations=(0,y.sg)((async(e,t,r)=>{const{save:n,saveAs:s}=await i.e(7301).then(i.bind(i,87301));switch(e){case q.X.SAVE:return n(this,t);case q.X.SAVE_AS:return s(this,r,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){if(!("WebSocket"in globalThis))return this.addResolvingPromise(Promise.reject(new u.A("stream-layer:websocket-unsupported","WebSocket is not supported in this browser. StreamLayer will not have real-time connection with the stream service."))),Promise.resolve(this);const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Stream Service","Feed"]},e).catch(y.QP).then((()=>this._fetchService(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}set renderer(e){(0,$.yp)(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,i){t=t.layerDefinition||t;const r=t.drawingInfo?.renderer;if(r){const e=(0,o.L)(r,t,i)||void 0;return e||m.A.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:i}),e}return(0,O.PD)(t,i)}async connect(e){const[{createConnection:t}]=await Promise.all([Promise.all([i.e(893),i.e(2830)]).then(i.bind(i,30624)),this.load()]),r=this.geometryType?_.g.toJSON(this.geometryType):null,{customParameters:n=null,definitionExpression:s=null,geometryDefinition:o=null,maxReconnectionAttempts:l=0,maxReconnectionInterval:a=20,spatialReference:d=this.spatialReference}=e||this.createConnectionParameters(),u=t(this.parsedUrl,this.spatialReference,d,r,s,o,l,a,n??void 0),c=(0,p.vE)([this.on("send-message-to-socket",(e=>u.sendMessageToSocket(e))),this.on("send-message-to-client",(e=>u.sendMessageToClient(e)))]);return u.once("destroy",c.remove),u}createConnectionParameters(){return{spatialReference:this.spatialReference,customParameters:this.customParameters,definitionExpression:this.definitionExpression,geometryDefinition:this.geometryDefinition,maxReconnectionAttempts:this.maxReconnectionAttempts,maxReconnectionInterval:this.maxReconnectionInterval}}createPopupTemplate(e){return(0,B.tn)(this,e)}createQuery(){const e=new Z.A;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}getFieldDomain(e,t){if(!this.fields)return null;let i=null;return this.fields.some((t=>(t.name===e&&(i=t.domain),!!i))),i}getField(e){return this.fieldsIndex.get(e)}serviceSupportsSpatialReference(e){return!0}sendMessageToSocket(e){this.emit("send-message-to-socket",e)}sendMessageToClient(e){this.emit("send-message-to-client",e)}async save(e){return this._debouncedSaveOperations(q.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(q.X.SAVE_AS,t,e)}write(e,t){const i=t?.messages;return this.webSocketUrl?(i?.push(Q(this,"using a custom websocket connection cannot be written to web scenes and web maps")),null):this.parsedUrl?super.write(e,t):(i?.push(Q(this,"using a client-side only connection without a url cannot be written to web scenes and web maps")),null)}async _fetchService(e){if(!this.webSocketUrl&&this.parsedUrl){if(!this.sourceJSON){const{data:t}=await(0,a.A)(this.parsedUrl.path,{query:{f:"json",...this.customParameters,...this.parsedUrl.query},responseType:"json",signal:e});this.sourceJSON=t}}else{if(!this.timeInfo?.trackIdField)throw new u.A("stream-layer:missing-metadata","The stream layer trackIdField must be specified.");if(!this.objectIdField){const e=this.fields.find((e=>"oid"===e.type))?.name;if(!e)throw new u.A("stream-layer:missing-metadata","The stream layer objectIdField must be specified.");this.objectIdField=e}if(!this.fields)throw new u.A("stream-layer:missing-metadata","The stream layer fields must be specified.");if(this.fields.some((e=>e.name===this.objectIdField))||this.fields.push(new j.A({name:this.objectIdField,alias:this.objectIdField,type:"oid"})),!this.geometryType)throw new u.A("stream-layer:missing-metadata","The stream layer geometryType must be specified.");this.webSocketUrl&&(this.url=this.webSocketUrl)}return this.read(this.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}),(0,$.yp)(this.renderer,this.fieldsIndex),(0,$.sv)(this.timeInfo,this.fieldsIndex),this.objectIdField||(this.objectIdField="__esri_stream_id__"),(0,J.L)(this,{origin:"service"})}};(0,n._)([(0,f.M)({type:String})],Y.prototype,"copyright",void 0),(0,n._)([(0,f.M)({readOnly:!0})],Y.prototype,"defaultPopupTemplate",null),(0,n._)([(0,f.M)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Y.prototype,"definitionExpression",void 0),(0,n._)([(0,f.M)({type:String})],Y.prototype,"displayField",void 0),(0,n._)([(0,f.M)({type:H.A})],Y.prototype,"elevationInfo",void 0),(0,n._)([(0,f.M)({json:{origins:{"web-map":{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],Y.prototype,"featureReduction",null),(0,n._)([(0,f.M)(X.fields)],Y.prototype,"fields",void 0),(0,n._)([(0,f.M)(X.fieldsIndex)],Y.prototype,"fieldsIndex",void 0),(0,n._)([(0,f.M)({type:G.A,json:{name:"layerDefinition.definitionGeometry",write:!0}})],Y.prototype,"geometryDefinition",void 0),(0,n._)([(0,f.M)({type:_.g.apiValues,json:{read:{reader:_.g.read}}})],Y.prototype,"geometryType",void 0),(0,n._)([(0,f.M)(R.kF)],Y.prototype,"labelsVisible",void 0),(0,n._)([(0,f.M)({type:[D.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:U.w},write:!0}})],Y.prototype,"labelingInfo",void 0),(0,n._)([(0,f.M)(R.fV)],Y.prototype,"legendEnabled",void 0),(0,n._)([(0,f.M)({type:["show","hide"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],Y.prototype,"listMode",void 0),(0,n._)([(0,f.M)({type:g.jz})],Y.prototype,"maxReconnectionAttempts",void 0),(0,n._)([(0,f.M)({type:g.jz})],Y.prototype,"maxReconnectionInterval",void 0),(0,n._)([(0,f.M)(R.hG)],Y.prototype,"maxScale",void 0),(0,n._)([(0,f.M)(R.hn)],Y.prototype,"minScale",void 0),(0,n._)([(0,f.M)({type:String})],Y.prototype,"objectIdField",void 0),(0,n._)([(0,f.M)({value:"ArcGISStreamLayer",type:["ArcGISStreamLayer"]})],Y.prototype,"operationalLayerType",void 0),(0,n._)([(0,f.M)({readOnly:!0})],Y.prototype,"outFields",void 0),(0,n._)([(0,f.M)(R.M6)],Y.prototype,"popupEnabled",void 0),(0,n._)([(0,f.M)({type:s.A,json:{name:"popupInfo",write:!0}})],Y.prototype,"popupTemplate",void 0),(0,n._)([(0,f.M)({type:C})],Y.prototype,"purgeOptions",void 0),(0,n._)([(0,f.M)({json:{read:!1,write:!1}})],Y.prototype,"refreshInterval",void 0),(0,n._)([(0,f.M)({types:l.H,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{name:"layerDefinition.drawingInfo.renderer",types:l.X,write:!0}},write:{target:"layerDefinition.drawingInfo.renderer"}}})],Y.prototype,"renderer",null),(0,n._)([(0,v.w)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),(0,v.w)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Y.prototype,"readRenderer",null),(0,n._)([(0,f.M)((()=>{const e=(0,c.o8)(R.PY);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],Y.prototype,"screenSizePerspectiveEnabled",void 0),(0,n._)([(0,f.M)()],Y.prototype,"sourceJSON",void 0),(0,n._)([(0,f.M)({type:z.A,json:{origins:{service:{read:{source:"spatialReference"}}}}})],Y.prototype,"spatialReference",void 0),(0,n._)([(0,f.M)({json:{read:!1}})],Y.prototype,"type",void 0),(0,n._)([(0,f.M)(R.OZ)],Y.prototype,"url",void 0),(0,n._)([(0,f.M)({type:Number})],Y.prototype,"updateInterval",void 0),(0,n._)([(0,f.M)({json:{read:!1,write:!1}})],Y.prototype,"useViewTime",void 0),(0,n._)([(0,f.M)({type:String})],Y.prototype,"webSocketUrl",void 0),Y=(0,n._)([(0,w.$)("esri.layers.StreamLayer")],Y);const W=Y},18768:(e,t,i)=>{i.d(t,{b:()=>a});var r=i(90237),n=i(53966),s=i(10107),o=(i(44208),i(87811),i(40608)),l=i(60694);const a=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Jf)(e,n.A.getLogger(this)))}};return(0,r._)([(0,s.M)()],t.prototype,"title",null),(0,r._)([(0,s.M)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},69208:(e,t,i)=>{i.d(t,{d:()=>o});var r=i(90237),n=i(10107),s=(i(44208),i(53966),i(87811),i(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,r._)([(0,n.M)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,r._)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},8303:(e,t,i)=>{i.d(t,{A:()=>I});var r=i(90237),n=i(92602),s=i(70333),o=i(78888),l=i(60999),a=i(49186),d=i(53966),u=i(97768),p=i(74887),c=i(84952),m=i(10107),h=(i(44208),i(87811),i(36005)),y=i(40608),f=i(43937),g=i(83531),v=i(20655),w=i(80812),_=i(41318),b=i(10407);const I=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new w.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await Promise.all([i.e(5356),i.e(1204)]).then(i.bind(i,41204));return(0,p.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.zf)(e)||d.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.QP)(e),!0))))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,b.It)(i);let n,o;if(r)n=i.portal.url;else try{n=await(0,g.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!n||!(0,c.b8)(n,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,a=!1,d=!1;if(!o)return{features:{edit:l,fullEdit:a},content:{updateItem:d}};try{if(r?await i.reload():(i=new w.default({id:e,portal:{url:n}}),await i.load(t)),i.portal.user)return(0,b.It)(i)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:a},content:{updateItem:d}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=F.credential===t?F.user:await this._fetchEditingUser(e);return F.credential=t,F.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,n=v.A.getDefault();if(n&&n.loaded&&(0,c.S8)(n.restUrl)===(0,c.S8)(r))return n.user;const a=`${r}/community/self`,d=null!=e?e.signal:null,u=await(0,l.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:d}));return u.ok?_.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return i&&r&&!(0,c.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,m.M)({type:w.default})],t.prototype,"portalItem",null),(0,r._)([(0,h.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,m.M)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,m.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,m.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,m.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,y.$)("esri.layers.mixins.PortalLayer")],t),t},F={credential:null,user:null}},39357:(e,t,i)=>{i.d(t,{H:()=>a});var r,n=i(90237),s=i(25482),o=i(10107),l=(i(44208),i(53966),i(87811),i(40608));let a=r=class extends s.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,n._)([(0,o.M)({type:String,json:{write:!0}})],a.prototype,"name",void 0),(0,n._)([(0,o.M)({type:[String,Number],json:{write:!0}})],a.prototype,"code",void 0),a=r=(0,n._)([(0,l.$)("esri.layers.support.CodedValue")],a)},53177:(e,t,i)=>{i.d(t,{A:()=>c});var r,n=i(90237),s=i(4718),o=i(10107),l=(i(44208),i(53966),i(93223)),a=i(40608),d=i(39357),u=i(76357);let p=r=class extends u.A{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some((e=>(String(e.code)===i&&(t=e.name),!!t)))}return t}clone(){return new r({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,o.M)({type:[d.H],json:{write:!0}})],p.prototype,"codedValues",void 0),(0,n._)([(0,l.e)({codedValue:"coded-value"})],p.prototype,"type",void 0),p=r=(0,n._)([(0,a.$)("esri.layers.support.CodedValueDomain")],p);const c=p},76357:(e,t,i)=>{i.d(t,{A:()=>p});var r=i(90237),n=i(66552),s=i(25482),o=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),a=i(40608);const d=new n.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends s.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,r._)([(0,o.M)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,r._)([(0,l.e)(d)],u.prototype,"type",void 0),u=(0,r._)([(0,a.$)("esri.layers.support.Domain")],u);const p=u},20437:(e,t,i)=>{i.d(t,{A:()=>f});var r,n=i(90237),s=i(66552),o=i(25482),l=i(10107),a=i(56507),d=(i(87811),i(44208),i(93223)),u=i(36005),p=i(40608),c=i(80451),m=i(98453);const h=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let y=r=class extends o.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?h.fromJSON(i.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,l.M)({type:String,json:{write:!0}})],y.prototype,"alias",void 0),(0,n._)([(0,l.M)({type:[String,Number],json:{write:{allowNull:!0}}})],y.prototype,"defaultValue",void 0),(0,n._)([(0,l.M)()],y.prototype,"description",void 0),(0,n._)([(0,u.w)("description")],y.prototype,"readDescription",null),(0,n._)([(0,l.M)({types:c.gK,json:{read:{reader:c.rS},write:!0}})],y.prototype,"domain",void 0),(0,n._)([(0,l.M)({type:Boolean,json:{write:!0}})],y.prototype,"editable",void 0),(0,n._)([(0,l.M)({type:a.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],y.prototype,"length",void 0),(0,n._)([(0,l.M)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,n._)([(0,l.M)({type:Boolean,json:{write:!0}})],y.prototype,"nullable",void 0),(0,n._)([(0,d.e)(m.m)],y.prototype,"type",void 0),(0,n._)([(0,l.M)()],y.prototype,"valueType",void 0),(0,n._)([(0,u.w)("valueType",["description"])],y.prototype,"readValueType",null),(0,n._)([(0,l.M)({type:Boolean,json:{read:!1}})],y.prototype,"visible",void 0),y=r=(0,n._)([(0,p.$)("esri.layers.support.Field")],y);const f=y},95466:(e,t,i)=>{i.d(t,{A:()=>c});var r=i(49186),n=i(25482),s=i(53966),o=i(91869),l=i(3330),a=i(30524),d=i(56400),u=i(96285);const p=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],f(e))}static fromLayerJSON(e){return new c(e.fields??[],f(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,r=h(t);if(t&&r){const n=m(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(r,e),i.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(m(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").error(new r.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),d.n$):y.has(t.type)?d.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===d.L5?l.GB.instance:t===d.n$?u.mQ.utcInstance:(0,o.tE)(p,t,(()=>u.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,n.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function m(e){return e.trim().toLowerCase()}function h(e){return(0,a.rS)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function f(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:n}=e,s=(r?"startField"in r?r.startField:r.startTimeField:"")??"",o=(r?"endField"in r?r.endField:r.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,d.ZS)(e.dateFieldsTimeReference):null,a=n?function(e){return"timeZone"in e}(n)?n.timeZone??l:n.dateFieldsTimeReference?(0,d.ZS)(n.dateFieldsTimeReference):l??d.n$:null,u=r?function(e){return"timeZone"in e}(r)?r.timeZone??l:r.timeReference?(0,d.ZS)(r.timeReference):l:null,p=new Map([[m(n?.creationDateField??""),a],[m(n?.editDateField??""),a],[m(s),u],[m(o),u]]);for(const{name:r,type:n}of e.fields)if(y.has(n))t.set(r,d.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(r,null);else if(i)t.set(r,d.L5);else{const e=p.get(m(r??""))??l;t.set(r,e)}return t}},80451:(e,t,i)=>{i.d(t,{rS:()=>f,gK:()=>y}),i(44208);var r,n=i(53177),s=i(76357),o=i(90237),l=(i(53966),i(87811),i(49186),i(93223)),a=i(40608);let d=r=class extends s.A{constructor(e){super(e),this.type="inherited"}clone(){return new r}};(0,o._)([(0,l.e)({inherited:"inherited"})],d.prototype,"type",void 0),d=r=(0,o._)([(0,a.$)("esri.layers.support.InheritedDomain")],d);const u=d;var p,c=i(10107);let m=p=class extends s.A{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new p({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,c.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]}}}})],m.prototype,"maxValue",void 0),(0,o._)([(0,c.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]}}}})],m.prototype,"minValue",void 0),(0,o._)([(0,l.e)({range:"range"})],m.prototype,"type",void 0),m=p=(0,o._)([(0,a.$)("esri.layers.support.RangeDomain")],m);const h=m,y={key:"type",base:s.A,typeMap:{range:h,"coded-value":n.A,inherited:u}};function f(e){if(!e?.type)return null;switch(e.type){case"range":return h.fromJSON(e);case"codedValue":return n.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},98453:(e,t,i)=>{i.d(t,{m:()=>r});const r=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},32730:(e,t,i)=>{i.d(t,{BI:()=>f,D3:()=>h,XJ:()=>y,lc:()=>m,mX:()=>v,rU:()=>g,tH:()=>F});var r=i(799);const n="__begin__",s="__end__",o=new RegExp(n,"ig"),l=new RegExp(s,"ig"),a=new RegExp("^"+n,"i"),d=new RegExp(s+"$","i"),u='"',p=u+" + ",c=" + "+u;function m(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function y(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=m(e.labelExpression),t.type="conventional"),t}function f(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return v(t.expression);case"arcade":return t.expression}return null}function g(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return F(t.expression)}return null}function v(e){let t;return e?(t=(0,r.HC)(e,(e=>n+'$feature["'+e+'"]'+s)),t=a.test(t)?t.replace(a,""):u+t,t=d.test(t)?t.replace(d,""):t+u,t=t.replaceAll(o,p).replaceAll(l,c)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,I=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function F(e){if(!e)return null;let t=_.exec(e)||b.exec(e);return t?t[1]||t[3]:(t=I.exec(e),t?t[2]:null)}},8947:(e,t,i)=>{i.d(t,{L:()=>o});var r=i(60999),n=i(74887),s=i(67076);async function o(e,t,i){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const l=await(0,r.Ke)(o.populateFromStyle());if((0,n.Te)(i),!1===l.ok){const i=l.error;t?.messages&&t.messages.push(new s.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${i.message}`,{error:i,context:t})),e.clear("renderer",t?.origin)}}}},92935:(e,t,i)=>{var r;i.d(t,{X:()=>r}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(r||(r={}))}}]);
|