// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built require({cache:{"esri/layers/support/TileInfo":function(){define("../../chunks/tslib.es6 ../../core/jsonMap ../../core/JSONSupport ../../core/unitUtils ../../core/accessorSupport/decorators/property ../../core/accessorSupport/ensureType ../../core/RandomLCG ../../core/has ../../core/accessorSupport/decorators/reader ../../core/accessorSupport/decorators/subclass ../../core/accessorSupport/decorators/writer ../../geometry/Point ../../geometry/SpatialReference ../../geometry/support/aaBoundingRect ../../geometry/support/spatialReferenceUtils ../../geometry/support/webMercatorUtils ./LOD ./TileKey".split(" "), function(a,d,l,f,r,k,p,q,h,c,b,g,u,v,n,e,t,z){var B;d=new d.JSONMap({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"});l=B=class extends l.JSONSupport{static create(w={}){const {resolutionFactor:D=1,scales:m,size:A=256,spatialReference:x=u.WebMercator,numLODs:C=24}=w;if(!n.isValid(x)){w=[];if(m)for(var H=0;H{D.push(A.scale);m[A.level]=A});this._set("scales",D);this._set("lods",w);this._initializeUpsampleLevels()}readSize(w,D){return[D.cols,D.rows]}writeSize(w,D){D.cols=w[0];D.rows=w[1]}zoomToScale(w){const D=this.scales;if(0>=w)return D[0];if(w>=D.length-1)return D[D.length-1];const m=Math.floor(w);return D[m]/(D[m]/D[m+ 1])**(w-m)}scaleToZoom(w){const D=this.scales,m=D.length-1;let A=0;for(;Aw&&CArray.isArray(w)?w:"number"===typeof w?[w,w]:[256,256]})],l.prototype,"size",void 0);a.__decorate([h.reader("size",["rows","cols"])],l.prototype,"readSize",null);a.__decorate([b.writer("size",{cols:{type:k.Integer},rows:{type:k.Integer}})],l.prototype,"writeSize",null);a.__decorate([r.property({type:u,json:{write:!0}})],l.prototype,"spatialReference", void 0);l=B=a.__decorate([c.subclass("esri.layers.support.TileInfo")],l);(function(w){w=w.ExtrapolateOptions||(w.ExtrapolateOptions={});w[w.NONE=0]="NONE";w[w.POWER_OF_TWO=1]="POWER_OF_TWO"})(l||={});return l})},"esri/layers/support/LOD":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/accessorSupport/ensureType ../../core/RandomLCG ../../core/has ../../core/accessorSupport/decorators/subclass".split(" "),function(a,d,l,f,r, k,p){var q;d=q=class extends d.JSONSupport{constructor(h){super(h);this.cols=null;this.level=0;this.origin=this.levelValue=null;this.resolution=0;this.rows=null;this.scale=0}clone(){return new q({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};a.__decorate([l.property({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],d.prototype,"cols",void 0);a.__decorate([l.property({type:f.Integer, json:{write:!0}})],d.prototype,"level",void 0);a.__decorate([l.property({type:String,json:{write:!0}})],d.prototype,"levelValue",void 0);a.__decorate([l.property({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],d.prototype,"origin",void 0);a.__decorate([l.property({type:Number,json:{write:!0}})],d.prototype,"resolution",void 0);a.__decorate([l.property({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],d.prototype, "rows",void 0);a.__decorate([l.property({type:Number,json:{write:!0}})],d.prototype,"scale",void 0);return d=q=a.__decorate([p.subclass("esri.layers.support.LOD")],d)})},"esri/layers/support/TileKey":function(){define(["exports"],function(a){class d{constructor(l,f,r,k,p){this.id=l;this.level=f;this.row=r;this.col=k;this.extent=p}}a.TileKey=d;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/BreakpointsOwner":function(){define("exports ../chunks/tslib.es6 ../core/ArrayPool ../core/reactiveUtils ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass".split(" "), function(a,d,l,f,r,k,p,q,h){function c(u,v){return v?b[u].valueToClassName[v].split(" "):[]}const b={widthBreakpoint:{getValue(u){const v=u.viewSize[0];u=u.breakpoints;const n=this.values;return v<=u.xsmall?n.xsmall:v<=u.small?n.small:v<=u.medium?n.medium:v<=u.large?n.large:n.xlarge},values:{xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge"},valueToClassName:{xsmall:"esri-view-width-xsmall esri-view-width-less-than-small esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge", small:"esri-view-width-small esri-view-width-greater-than-xsmall esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge",medium:"esri-view-width-medium esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-less-than-large esri-view-width-less-than-xlarge",large:"esri-view-width-large esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-less-than-xlarge", xlarge:"esri-view-width-xlarge esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-greater-than-large"}},heightBreakpoint:{getValue(u){const v=u.viewSize[1];u=u.breakpoints;const n=this.values;return v<=u.xsmall?n.xsmall:v<=u.small?n.small:v<=u.medium?n.medium:v<=u.large?n.large:n.xlarge},values:{xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge"},valueToClassName:{xsmall:"esri-view-height-xsmall esri-view-height-less-than-small esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge", small:"esri-view-height-small esri-view-height-greater-than-xsmall esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge",medium:"esri-view-height-medium esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-less-than-large esri-view-height-less-than-xlarge",large:"esri-view-height-large esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-less-than-xlarge", xlarge:"esri-view-height-xlarge esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-greater-than-large"}},orientation:{getValue(u){u=u.viewSize;const v=this.values;return u[1]>=u[0]?v.portrait:v.landscape},values:{portrait:"portrait",landscape:"landscape"},valueToClassName:{portrait:"esri-view-orientation-portrait",landscape:"esri-view-orientation-landscape"}}},g={xsmall:544,small:768,medium:992,large:1200};a.BreakpointsOwner= u=>{u=class extends u{constructor(...v){super(...v);this.heightBreakpoint=this.widthBreakpoint=this.orientation=null;this.breakpoints=g}initialize(){this.addHandles(f.watch(()=>[this.breakpoints,this.size],()=>this._updateClassNames(),f.initial))}destroy(){this.destroyed||this._removeActiveClassNames()}set breakpoints(v){var n=this._get("breakpoints");v!==n&&(n=v,n&&n.xsmalln.push(w)),c(t,B).forEach(w=>v.push(w)))}e&&(this._applyClassNameChanges(v,n),l.release(v),l.release(n))}}_applyClassNameChanges(v,n){const e=this.container;e&&(n.forEach(t=>e.classList.remove(t)),v.forEach(t=>e.classList.add(t)))}_removeActiveClassNames(){const v= this.container;if(v)for(var n in b)c(n,this[n]).forEach(e=>v.classList.remove(e))}};d.__decorate([r.property()],u.prototype,"breakpoints",null);d.__decorate([r.property()],u.prototype,"orientation",void 0);d.__decorate([r.property()],u.prototype,"widthBreakpoint",void 0);d.__decorate([r.property()],u.prototype,"heightBreakpoint",void 0);return u=d.__decorate([h.subclass("esri.views.BreakpointsOwner")],u)};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/DOMContainer":function(){define("exports ../chunks/tslib.es6 ../core/domUtils ../core/events ../core/Logger ../core/maybe ../core/reactiveUtils ../core/scheduling ../core/accessorSupport/decorators/property ../core/has ../core/RandomLCG ../core/accessorSupport/decorators/subclass ./overlay/ViewOverlay".split(" "), function(a,d,l,f,r,k,p,q,h,c,b,g,u){function v(e){e&&(l.empty(e),e.parentNode&&e.parentNode.removeChild(e))}const n=[0,0];a.DOMContainer=e=>{e=class extends e{constructor(...t){super(...t);this._freqInfo={freq:16,time:750};this._overlayRenderTaskHandle=null;this.height=0;this.position=this.overlay=this.messagesCommon=null;this.resizing=!1;this.surface=this.root=null;this.suspended=!0;this.userContent=this.ui=null;this.width=0;this.widthBreakpoint=null;this.addHandles([p.watch(()=>this.cursor,z=>{const {surface:B}= this;B&&B.setAttribute("data-cursor",z)}),p.watch(()=>this.navigating,z=>{const {surface:B}=this;B&&B.setAttribute("data-navigating",z.toString())})])}initialize(){this.addHandles([p.watch(()=>this.ui,(t,z)=>this._handleUIChange(t,z),p.initial),this.on("focus",()=>this.notifyChange("focused")),this.on("blur",()=>this.notifyChange("focused"))])}destroy(){this.destroyed||(this.ui=k.destroyMaybe(this.ui),this.container=null)}get container(){return this._get("container")??null}set container(t){var z= this._get("container");const B=l.byId(t);B||"string"!==typeof t||r.getLogger(this).error("#container",`element with id '${t}' not found`);if(z!==B)if(this._stopMeasuring(),z&&(z.classList.remove("esri-view"),this._overlayRenderTaskHandle&&(this._overlayRenderTaskHandle.remove(),this._overlayRenderTaskHandle=null),this.overlay&&(this.overlay.destroy(),this._set("overlay",null)),this.root&&(v(this.root),this._set("root",null)),this.userContent&&(l.reparent(this.userContent,z),v(this.userContent),this._set("userContent", null))),B){B.classList.add("esri-view");t=document.createElement("div");t.className="esri-view-user-storage";l.reparent(B,t);B.appendChild(t);this._set("userContent",t);t=document.createElement("div");t.className="esri-view-root";B.insertBefore(t,B.firstChild);this._set("root",t);z=document.createElement("div");z.className="esri-view-surface";z.setAttribute("role","application");z.tabIndex=0;t.appendChild(z);this._set("surface",z);var w=new u;t.appendChild(w.surface);this._set("overlay",w);this.addHandles(p.watch(()=> w.needsRender,D=>{this._overlayRenderTaskHandle=D&&!this._overlayRenderTaskHandle?q.addFrameTask({render:()=>this.overlay?.render()}):k.removeMaybe(this._overlayRenderTaskHandle)}));this.forceDOMReadyCycle();this._set("container",B);this._startMeasuring()}else this._set("width",0),this._set("height",0),this._set("position",null),this._set("suspended",!0),this._set("surface",null),this._set("container",null)}get focused(){const t=document.activeElement===this.surface;return document.hasFocus()&&t}get size(){return[this.width, this.height]}blur(){this.surface?.blur()}focus(){this.surface?.focus()}pageToContainer(t,z,B){const w=this.position;t-=w?w[0]:0;z-=w?w[1]:0;B?(B[0]=t,B[1]=z):B=[t,z];return B}containerToPage(t,z,B){const w=this.position;t+=w?w[0]:0;z+=w?w[1]:0;B?(B[0]=t,B[1]=z):B=[t,z];return B}_handleUIChange(t,z){this.removeHandles("ui");z&&z!==t&&z.destroy();t&&(t.view=this,this.addHandles(p.watch(()=>this.root,B=>{if(B){const w=document.createElement("div");B.appendChild(w);B=w}else B=null;t.container=B},p.initial), "ui"));this._set("ui",t)}_stopMeasuring(){this.removeHandles("measuring");this._get("resizing")&&this._set("resizing",!1)}_startMeasuring(){const t=this._freqInfo;t.freq=16;t.time=750;this.addHandles([f.on(window,"resize",()=>{t.freq=16;t.time=750}),q.addFrameTask({prepare:z=>{const B=this._measure(),w=this._freqInfo;w.time+=z.deltaTime;B&&(w.freq=16,this._get("resizing")||this._set("resizing",!0));w.timethis.items,u=>{for(const v of u.added){const n=()=>v.render();this._callbacks.set(v,n);this._projector.append(this.surface,n)}for(const v of u.removed)u=this._projector.detach(this._callbacks.get(v)),this.surface.removeChild(u.domNode),this._callbacks.delete(v)})}addItem(g){this.items.add(g)}removeItem(g){this.items.remove(g)}destroy(){this.items.removeAll(); this._callbacks.forEach(g=>this._projector.detach(g));this._projector=this._callbacks=null;this._watchUpdatingTracking.destroy()}render(){this._projector.renderNow()}computeBoundingRect(g){const u=this._hiddenSurface,v=this._hiddenProjector;let n;const e=()=>n=g.render();v.append(u,e);v.renderNow();const t={left:0,top:0,right:0,bottom:0};if(n?.domNode){const z=n.domNode.getBoundingClientRect();t.left=z.left;t.top=z.top;t.right=z.right;t.bottom=z.bottom}for(v.detach(e);u.firstChild;)u.removeChild(u.firstChild); return t}overlaps(g,u){g=this.computeBoundingRect(g);u=this.computeBoundingRect(u);return Math.max(g.left,u.left)<=Math.min(g.right,u.right)&&Math.max(g.top,u.top)<=Math.min(g.bottom,u.bottom)}get hasVisibleItems(){return this.items.some(g=>g.visible)}async prepare(){await document.fonts.load(this._fontString()).catch(()=>{})}renderCanvas(g,u){const v=!!u?.disableDecorations;if(this.items.some(e=>e.visible&&!(v&&e.isDecoration))){var n=g.getContext("2d");n.save();n.font=this._fontString();this.items.forEach(e=> {v&&e.isDecoration||(n.save(),e.renderCanvas(n),n.restore())});n.restore()}}_fontString(){return`10px ${getComputedStyle(this.surface).fontFamily}`}};a.__decorate([f.property({readOnly:!0})],d.prototype,"surface",void 0);a.__decorate([f.property({readOnly:!0})],d.prototype,"items",void 0);a.__decorate([f.property({readOnly:!0})],d.prototype,"needsRender",null);a.__decorate([f.property({readOnly:!0})],d.prototype,"_watchUpdatingTracking",void 0);a.__decorate([f.property({readOnly:!0})],d.prototype, "updating",null);return d=a.__decorate([q.subclass("esri.views.overlay.ViewOverlay")],d)})},"esri/views/PopupView":function(){define("require exports ../chunks/tslib.es6 ../core/asyncUtils ../core/deprecate ../core/Error ../core/has ../core/Logger ../core/promiseUtils ../core/reactiveUtils ../core/accessorSupport/decorators/property ../core/RandomLCG ../core/accessorSupport/decorators/subclass ./input/InputManager".split(" "),function(a,d,l,f,r,k,p,q,h,c,b,g,u,v){function n(B){return null!=B&&"open"in B&&"declaredClass"in B}function e(B){return null!=B&&"declaredClass"in B&&"dockOptions"in B}const t=B=>Object.freeze(Object.defineProperty({__proto__:null,default:B},Symbol.toStringTag,{value:"Module"}));class z{constructor(B){this.layerView=B;this._resolver=h.createResolver();this.graphics=[]}get promise(){return this._resolver.promise}resolve(B){const {layerView:w,graphics:D,_resolver:m}=this;if(!w)return m.resolve(D),m.promise;let A;w.fetchPopupFeaturesFromGraphics(D,B).catch(x=>{A=x;return null}).then(x=> {x?m.resolve(x):m.reject(A)});return m.promise}}d.PopupView=B=>{B=class extends B{constructor(){super(...arguments);this._popupSetupTask=null;this.popup={};this.popupEnabled=!0}initialize(){this.addHandles([c.watch(()=>[this.ui,this.popup],([w,D],m)=>{if(m){const [A,x]=m;A&&n(x)&&(x.view=null,e(x)&&A.remove(x,"popup"))}w&&n(D)&&(D.view=this,e(D)&&w.add(D,{key:"popup",position:"manual",internal:!0}))},c.initial),this.on("click",w=>{this.popup&&this.popupEnabled&&("mouse"!==w.pointerType||0===w.button)&& (n(this.popup)?this.popup.viewModel.handleViewClick(w):w.async(async()=>{await this.setupPopup();n(this.popup)&&!this.destroyed&&this.ready&&this.popupEnabled&&this.popup.viewModel.handleViewClick(w)}))},v.ViewEventPriorities.WIDGET)]);c.whenOnce(()=>this.ready&&this.popupEnabled&&!this.updating).then(()=>{new Promise((w,D)=>a(["../widgets/Popup"],m=>w(t(m)),D))})}destroy(){this.destroyed||this.closePopup()}async openPopup(w){if(n(this.popup))return this.popup.open(w);try{await this.setupPopup(), this.popup?this.popup.open(w):q.getLogger(this).error(new k("view:null-popup","Popup is null and can't be opened"))}catch{}}closePopup(){this._popupSetupTask?.abort();n(this.popup)&&this.popup.close()}async fetchPopupFeatures(w,D){await this.when();return this._popupHitsToFeatures(await this._getPopupHits(w,D),D)}async setupPopup(){this._popupSetupTask?.abort();if(this.popup&&!n(this.popup))return this._popupSetupTask=f.createTask(async w=>{const {default:D}=await new Promise((m,A)=>a(["../widgets/Popup"], x=>m(t(x)),A));h.throwIfAborted(w);this.popup&&!n(this.popup)&&(w=this.popup,delete w.open,delete w.close,this.popup=new D(w))}),this._popupSetupTask.promise}async _popupHitsToFeatures({location:w,hits:D},m){const A=[],x=[];let C=!1;const H=h.wrapAbortWithTimeout(m,p("popup-view-fetch-timeout")??5E3);m=I=>{const O=x.at(-1);O&&O.layerView===I&&!C?I=O:(I=new z(I),x.push(I),A.push(I.promise));return I};for(const I of D)"graphic"in I?(m(I.layerView).graphics.push(I.graphic),C=!1):(A.push(I.layerView.fetchPopupFeaturesAtLocation(I.mapPoint, H)),C=!0);x.map(I=>I.resolve(H));D=h.allSettledValues(A).then(I=>I.filter(O=>!!O).flat());return{pendingFeatures:A,allGraphicsPromise:D,location:w}}async _getPopupHits(w,D){const {hits:m,location:A}=await this.popupHitTest(w);h.throwIfAborted(D);w=[];for(const x of m)if("graphic"in x){if(this._isValidPopupGraphic(x.graphic,D)){const C=this._isValidPopupGraphicsLayerView(x.layerView)?x.layerView:void 0;w.push({graphic:x.graphic,layerView:C})}}else this._isValidPopupLocationLayerView(x.layerView)&& w.push({mapPoint:x.mapPoint,layerView:x.layerView});return{hits:w,location:A}}_isValidPopupGraphic(w,D){return w&&!!w.getEffectivePopupTemplate(D?.defaultPopupTemplateEnabled)}_isValidPopupGraphicsLayerView(w){return!w||(!("layer"in w)||!w.suspended)&&"fetchPopupFeaturesFromGraphics"in w}_isValidPopupLocationLayerView(w){return(!("layer"in w)||!w.suspended)&&"fetchPopupFeaturesAtLocation"in w}};l.__decorate([b.property({cast(w){if(!w||n(w))return w;"object"===typeof w&&(w.open=D=>{r.deprecated(q.getLogger(this), "view.popup is no longer created by default. view.popup.open() will stop working when the popup isn't created",{replacement:"Use view.openPopup() instead.",version:"4.27"});return this.openPopup(D)},w.close=()=>{r.deprecated(q.getLogger(this),"view.popup is no longer created by default. view.popup.close() will stop working when the popup isn't created",{replacement:"Use view.closePopup() instead.",version:"4.27"});return this.closePopup()});return w}})],B.prototype,"popup",void 0);l.__decorate([b.property()], B.prototype,"popupEnabled",void 0);return B=l.__decorate([u.subclass("esri.views.PopupView")],B)};Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/AnimationManager":function(){define("../../chunks/tslib.es6 ../../geometry ../../Viewpoint ../../core/Accessor ../../core/has ../../core/maybe ../../core/scheduling ../../core/screenUtils ../../core/time ../../core/accessorSupport/decorators/property ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../../core/libs/gl-matrix-2/factories/vec2f64 ../ViewAnimation ./PaddedViewState ./unitBezier ./viewpointUtils ./pointToPoint/Camera ../animation/pointToPoint/Animation ../animation/pointToPoint/Settings ../../geometry/Point".split(" "), function(a,d,l,f,r,k,p,q,h,c,b,g,u,v,n,e,t,z,B,w,D,m){function A(C,H,I,O){if(null!=H?.duration)return!0;const {time:W,isLinear:X}=C;C=H?.speedFactor||1;H=H?.maxDuration??D.defaultSettings2D.maxDuration/C;r("esri-goto-debug")&&(console.log("speed factor:",C),console.log("adjusted duration:\t\t",W),console.log("adjusted max duration:\t",H),console.log("is linear:",X));if(W>H)return r("esri-goto-debug")&&console.warn(`failed "auto" heuristic: animations must be shorter than ${H/1E3}s`),!1;if(X){var S= v.create();const Z=q.createScreenPoint(...O.toScreen(S,...I.center));S=q.createScreenPoint(...I.toScreen(S,...O.center));I=null!=S&&S.x>-1*I.size[0]&&S.x<2*I.size[0]&&S.y>-1*I.size[1]&&S.y<2*I.size[1];O=null!=Z&&Z.x>-1*O.size[0]&&Z.x<2*O.size[0]&&Z.y>-1*O.size[1]&&Z.y<2*O.size[1];r("esri-goto-debug")&&(console.log("dest is within 1.5 screens at start view:",I),console.log("start is within 1.5 screens at dest view:",O));if(W>2E3/C&&!I&&!O)return r("esri-goto-debug")&&console.warn(`failed "auto" heuristic: linear animations must be...\n - shorter than ${2/ C}s, or\n - shorter than ${H/1E3}s and the destination is close enough to the starting screen, or\n - shorter than ${H/1E3}s and the start point is close enough to the destination screen`),!1}return!0}class x{constructor(C){this._view=C;this._animation=new w.Animation(()=>new B.Camera(this._view));this._current=new B.Camera(this._view)}get _source(){return this._animation.definition.source}get _target(){return this._animation.definition.target}get duration(){return this._animation.time}get animation(){return this._animation}update(C, H,I={}){z.copy(this._current.viewpoint,C);z.copy(this._source.viewpoint,C);z.copy(this._target.viewpoint,H);this._animation.update(this._source,this._target,I)}applyRatio(C,H){this._animation.cameraAt(H,this._current);z.copy(C,this._current.viewpoint)}}d=class extends f{constructor(C){super(C);this._animation=null;this._destinationViewState=new e;this.updateFunction=null;this.easing=t.easingFunctions.ease;this.viewpoint=new l({targetGeometry:new m,scale:0,rotation:0});this._updateTask=p.addFrameTask({postRender:this._postRender.bind(this)}); this._updateTask.pause();this._transition=new x(C.view)}destroy(){this._updateTask=k.removeMaybe(this._updateTask)}get animation(){return this._animation}set animation(C){this._animation=C;this.view.animation=C}animate(C,H,I){this.stop();z.copy(this.viewpoint,H);const O=("string"===typeof I?.easing?t.parse(I.easing):I?.easing)||this.easing,W=C.target;this._transition.update(this.viewpoint,W,{apex:{maximumDistance:Math.min(64*Math.min(H.scale,W.scale),this.view.constraints.effectiveMinScale),desiredSlope:5E-8}, duration:I?.duration,maxDuration:"auto"===I?.animationMode?h.Milliseconds(Infinity):I?.maxDuration??D.defaultSettings2D.maxDuration,speedFactor:I?.speedFactor,easing:"function"===typeof O?X=>O(X):void 0});"auto"===I?.animationMode&&(this._destinationViewState.copy(this.view.state),this._destinationViewState.viewpoint=W,A(this._transition.animation,I,this.view.state,this._destinationViewState)||this._transition.update(this.viewpoint,W,{duration:h.Milliseconds(0)}));H=()=>{this.animation===C&&this._updateTask&& ("finished"===C.state&&(this._transition.applyRatio(this.viewpoint,1),this.view.state&&(this.view.state.viewpoint=this.viewpoint.clone())),this.updateFunction=this.animation=null)};C.when(H,H);this._startTime=performance.now();this._updateTask.resume();return this.animation=C}animateContinuous(C,H){this.stop();this.updateFunction=H;this.viewpoint=C;const I=new n({target:C.clone()});C=()=>{this.animation===I&&this._updateTask&&(this.updateFunction=this.animation=null)};I.when(C,C);this._startTime= performance.now();this._updateTask.resume();return this.animation=I}stop(){this.animation&&(this.animation.stop(),this.updateFunction=this.animation=null)}_postRender(C){var H=this.animation;H&&H.state!==n.State.STOPPED?(this.updateFunction?(this.updateFunction(this.viewpoint,C.deltaTime),this.animation?.update(this.viewpoint)):(C=performance.now()-this._startTime,H=this._transition.duration,C=0{const t=c.create();return()=>{var z=this._get("size");const B=this._get("padding");if(z&&B){var w=this.paddedViewState;h.set(t,B.left+B.right,B.top+B.bottom);h.subtract(t,z,t);h.copy(w.size,t);if(z=w.viewpoint)this.viewpoint=z}}})();this.addHandles(l.watch(()=>[this.size,this.padding],()=>this._updateContent(),l.sync));this.padding=new n;this.size=[0,0]}set padding(e){this._set("padding",e||new n)}set viewpoint(e){if(e){this.paddedViewState.viewpoint= e;const z=this._viewpoint2D;if(this._get("padding")){var t=e.clone();b.addPadding(t,e,this._get("size"),this._get("padding"));e=t.targetGeometry;z.center[0]=e.x;z.center[1]=e.y;z.rotation=t.rotation;z.scale=t.scale;z.spatialReference=e.spatialReference}else t=e.targetGeometry,z.center[0]=t.x,z.center[1]=t.y,z.rotation=e.rotation,z.scale=e.scale,z.spatialReference=t.spatialReference;this._update()}}clone(){return new v({padding:this.padding.clone(),size:this.size.slice(),viewpoint:this.paddedViewState.viewpoint.clone(), pixelRatio:this.pixelRatio})}};a.__decorate([f.property()],d.prototype,"paddedViewState",void 0);a.__decorate([f.property({type:n})],d.prototype,"padding",null);a.__decorate([f.property()],d.prototype,"viewpoint",null);return d=v=a.__decorate([q.subclass("esri.views.2d.PaddedViewState")],d)})},"esri/core/libs/gl-matrix-2/math/vec2":function(){define(["exports","./common"],function(a,d){function l(E,J){E[0]=J[0];E[1]=J[1];return E}function f(E,J,L){E[0]=J;E[1]=L;return E}function r(E,J,L){E[0]=J[0]+ L[0];E[1]=J[1]+L[1];return E}function k(E,J,L){E[0]=J[0]-L[0];E[1]=J[1]-L[1];return E}function p(E,J,L){E[0]=J[0]*L[0];E[1]=J[1]*L[1];return E}function q(E,J,L){E[0]=J[0]/L[0];E[1]=J[1]/L[1];return E}function h(E,J){E[0]=Math.ceil(J[0]);E[1]=Math.ceil(J[1]);return E}function c(E,J){E[0]=Math.floor(J[0]);E[1]=Math.floor(J[1]);return E}function b(E,J,L){E[0]=Math.min(J[0],L[0]);E[1]=Math.min(J[1],L[1]);return E}function g(E,J,L){E[0]=Math.max(J[0],L[0]);E[1]=Math.max(J[1],L[1]);return E}function u(E, J){E[0]=Math.round(J[0]);E[1]=Math.round(J[1]);return E}function v(E,J,L){E[0]=J[0]*L;E[1]=J[1]*L;return E}function n(E,J,L,R){E[0]=J[0]+L[0]*R;E[1]=J[1]+L[1]*R;return E}function e(E,J){const L=J[0]-E[0];E=J[1]-E[1];return Math.sqrt(L*L+E*E)}function t(E,J){const L=J[0]-E[0];E=J[1]-E[1];return L*L+E*E}function z(E){const J=E[0];E=E[1];return Math.sqrt(J*J+E*E)}function B(E){const J=E[0];E=E[1];return J*J+E*E}function w(E,J){E[0]=-J[0];E[1]=-J[1];return E}function D(E,J){E[0]=1/J[0];E[1]=1/J[1];return E} function m(E,J){var L=J[0];const R=J[1];L=L*L+R*R;0L?Math.PI:Math.acos(L)}function da(E){return"vec2("+E[0]+", "+E[1]+")"}function y(E,J){return E[0]===J[0]&&E[1]===J[1]}function F(E,J){const L=E[0];E=E[1];const R=J[0];J=J[1];const Y=d.getEpsilon();return Math.abs(L-R)<=Y*Math.max(1,Math.abs(L),Math.abs(R))&&Math.abs(E-J)<=Y*Math.max(1,Math.abs(E),Math.abs(J))}function M(E,J,L,R,Y){let ba=J[0]-L[0];L=J[1]-L[1];Y=(R[0]*ba+R[1]*L)*(Y-1);ba=R[0]*Y;L=R[1]*Y;E[0]=J[0]+ba;E[1]=J[1]+L;return E} const V=Object.freeze(Object.defineProperty({__proto__:null,add:r,angle:Z,ceil:h,copy:l,cross:x,dist:e,distance:e,div:q,divide:q,dot:A,equals:F,exactEquals:y,floor:c,inverse:D,len:z,length:z,lerp:C,max:g,min:b,mul:p,multiply:p,negate:w,normalize:m,projectAndScale:M,random:H,rotate:S,round:u,scale:v,scaleAndAdd:n,set:f,sqrDist:t,sqrLen:B,squaredDistance:t,squaredLength:B,str:da,sub:k,subtract:k,transformMat2:I,transformMat2d:O,transformMat3:W,transformMat4:X},Symbol.toStringTag,{value:"Module"})); a.add=r;a.angle=Z;a.ceil=h;a.copy=l;a.cross=x;a.dist=e;a.distance=e;a.div=q;a.divide=q;a.dot=A;a.equals=F;a.exactEquals=y;a.floor=c;a.inverse=D;a.len=z;a.length=z;a.lerp=C;a.max=g;a.min=b;a.mul=p;a.multiply=p;a.negate=w;a.normalize=m;a.projectAndScale=M;a.random=H;a.rotate=S;a.round=u;a.scale=v;a.scaleAndAdd=n;a.set=f;a.sqrDist=t;a.sqrLen=B;a.squaredDistance=t;a.squaredLength=B;a.str=da;a.sub=k;a.subtract=k;a.transformMat2=I;a.transformMat2d=O;a.transformMat3=W;a.transformMat4=X;a.vec2=V;Object.defineProperty(a, Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/viewpointUtils":function(){define("exports ../../Viewpoint ../../core/Collection ../../core/mathUtils ../../core/unitUtils ../../core/libs/gl-matrix-2/math/common ../../core/libs/gl-matrix-2/math/mat2d ../../core/libs/gl-matrix-2/factories/mat2df64 ../../core/libs/gl-matrix-2/math/vec2 ../../core/libs/gl-matrix-2/factories/vec2f64 ../../geometry/Extent ../../geometry/Geometry ../../geometry/Point ../../geometry/projection ../../geometry/SpatialReference ../../geometry/support/normalizeUtils ../../geometry/support/spatialReferenceUtils".split(" "), function(a,d,l,f,r,k,p,q,h,c,b,g,u,v,n,e,t){function z(G,K){return K.type?h.set(G,K.x,K.y):h.copy(G,K)}function B(G,K,P=0){var Q=G.width,T=G.height;0!==P&&(Q=f.deg2rad(P),P=Math.abs(Math.cos(Q)),T=Math.abs(Math.sin(Q)),Q=G.width*P+G.height*T,T=G.width*T+G.height*P);return Math.max(Q/Math.max(1,K[0]),T/Math.max(1,K[1]))*I(G.spatialReference)}async function w(G,K,P,Q){if(!G||Array.isArray(G)&&!G.length)return null;l.isCollection(G)&&(G=G.toArray());if(Array.isArray(G)&&G.length&&"object"===typeof G[0]){var T= G.every(ia=>"attributes"in ia);var aa=G.some(ia=>!ia.geometry),ea=G;if(T&&aa&&K&&K.allLayerViews){T=new Map;for(var la of G)G=la.layer,aa=T.get(G)||[],ea=la.attributes[G.objectIdField],null!=ea&&aa.push(ea),T.set(G,aa);const ia=[];T.forEach((ka,ma)=>{const na=K.allLayerViews.find(ja=>ja.layer.id===ma.id);if(na&&"queryFeatures"in na){const ja=ma.createQuery();ja.objectIds=ka;ja.returnGeometry=!0;ia.push(na.queryFeatures(ja))}});la=await Promise.all(ia);G=[];for(var N of la)if(N&&N.features&&N.features.length)for(var U of N.features)null!= U.geometry&&G.push(U.geometry);ea=G}for(var ca of ea)Q=await w(ca,K,P,Q);return Q}if(Array.isArray(G)&&2===G.length&&"number"===typeof G[0]&&"number"===typeof G[1])T=new u(G);else if(G instanceof g)T=G;else if("geometry"in G)if(G.geometry)T=G.geometry;else if(G.layer){const ia=G.layer;(N=K.allLayerViews.find(ka=>ka.layer.id===ia.id))&&"queryFeatures"in N&&(U=ia.createQuery(),U.objectIds=[G.attributes[ia.objectIdField]],U.returnGeometry=!0,T=(await N.queryFeatures(U))?.features?.[0]?.geometry)}if(null== T)return null;switch(T.type){case "point":N=new b({xmin:T.x,ymin:T.y,xmax:T.x,ymax:T.y,spatialReference:T.spatialReference});break;case "extent":case "multipoint":case "polygon":case "polyline":N=e.getDenormalizedExtent(T);break;default:N=T.extent}if(!N)return null;v.isLoaded()||v.canProjectWithoutEngine(N.spatialReference,P)||await v.load();N=v.project(N,P);if(!N)return null;Q?(U=N.center,ca=U.clone(),ca.x=e.getClosestDenormalizedXToReference(U.x,Q.center.x,P),ca.x!==U.x&&N.centerAt(ca),Q=Q.union(N)): Q=N;return Q}function D(G){if(G&&(!Array.isArray(G)||"number"!==typeof G[0])&&("object"===typeof G||Array.isArray(G)&&"object"===typeof G[0])){if("layer"in G&&null!=G.layer?.minScale&&null!=G.layer.maxScale){var K=G.layer;return{min:K.minScale,max:K.maxScale}}if(Array.isArray(G)&&G.length&&G.every(P=>"layer"in P)){let P=K=0;for(const Q of G)G=Q.layer,G?.minScale&&G.maxScale&&(K=G.minScaleP?G.maxScale:P);return K&&P?{min:K,max:P}:null}}}function m(G,K){return t.equals(G.wkid? G:G.spatialReference||n.WGS84,K)?G:v.project(G,K)}function A(G,K){const P=G.targetGeometry,Q=K.targetGeometry;P.x=Q.x;P.y=Q.y;P.spatialReference=Q.spatialReference;G.scale=K.scale;G.rotation=K.rotation;return G}function x(G,K,P){return P?h.set(G,.5*(K[0]-P.right+P.left),.5*(K[1]-P.bottom+P.top)):h.scale(G,K,.5)}function C(G){return G.scale*H(G.targetGeometry?.spatialReference)}function H(G){return null!=G&&t.isValid(G)?1/(39.37*r.getMetersPerUnitForSR(G)*96):1}function I(G){return t.isValid(G)?39.37* r.getMetersPerUnitForSR(G)*96:1}function O(G){return(G=t.getInfo(G))?G.valid[1]-G.valid[0]:0}const W=180/Math.PI,X=function(){const G=c.create();return function(K,P,Q){const T=P.targetGeometry;z(G,T);P=.5*C(P);K.xmin=G[0]-P*Q[0];K.ymin=G[1]-P*Q[1];K.xmax=G[0]+P*Q[0];K.ymax=G[1]+P*Q[1];K.spatialReference=T.spatialReference;return K}}(),S=function(){const G=c.create();return function(K,P,Q){return h.sub(K,h.scale(K,P,.5),x(G,P,Q))}}(),Z=function(){const G=q.create(),K=c.create();return function(P,Q, T,aa){const ea=C(Q);Q=k.toRadian(Q.rotation)||0;h.set(K,ea,ea);p.fromScaling(G,K);p.rotate(G,G,Q);p.translate(G,G,S(K,T,aa));p.translate(G,G,[0,aa.top-aa.bottom]);return h.set(P,G[4],G[5])}}(),da=function(){const G=c.create(),K=c.create(),P=c.create();return function(Q,T,aa,ea,la,N){h.negate(G,T);h.scale(K,aa,.5*N);h.set(P,1/ea*N,-1/ea*N);p.fromTranslation(Q,K);la&&p.rotate(Q,Q,la);p.scale(Q,Q,P);p.translate(Q,Q,G);return Q}}(),y=function(){const G=c.create();return function(K,P,Q,T){const aa=C(P), ea=k.toRadian(P.rotation)||0;z(G,P.targetGeometry);return da(K,G,Q,aa,ea,T)}}(),F=function(){const G=c.create();return function(K,P,Q,T){const aa=C(P);z(G,P.targetGeometry);return da(K,G,Q,aa,0,T)}}(),M=function(){const G=c.create(),K=c.create(),P=[0,0,0];return function(Q,T,aa){h.subtract(G,Q,T);h.normalize(G,G);h.subtract(K,Q,aa);h.normalize(K,K);h.cross(P,G,K);Q=Math.acos(h.dot(G,K)/(h.length(G)*h.length(K)))*W;0>P[2]&&(Q=-Q);isNaN(Q)&&(Q=0);return Q}}(),V=function(){const G=c.create();return function(K, P,Q,T){const aa=K.targetGeometry;A(K,P);Z(G,P,Q,T);aa.x+=G[0];aa.y+=G[1];return K}}(),E=function(){return function(G,K,P){A(G,K);K=G.targetGeometry;K.x=P.x;K.y=P.y;K.spatialReference=P.spatialReference;return G}}(),J=function(){const G=c.create();return function(K,P,Q,T,aa){aa||="center";h.sub(G,Q,T);h.scale(G,G,.5);Q=G[0];T=G[1];switch(aa){case "center":h.set(G,0,0);break;case "left":h.set(G,-Q,0);break;case "top":h.set(G,0,T);break;case "right":h.set(G,Q,0);break;case "bottom":h.set(G,0,-T);break; case "top-left":h.set(G,-Q,T);break;case "bottom-left":h.set(G,-Q,-T);break;case "top-right":h.set(G,Q,T);break;case "bottom-right":h.set(G,Q,-T)}fa(K,P,G);return K}}(),L=function(){const G=c.create();return function(K,P,Q,T,aa){A(K,P);isNaN(Q)||0===Q||(ba(G,T,P,aa),K.scale=P.scale*Q,ha(G,G,K,aa),fa(K,K,h.set(G,G[0]-T[0],T[1]-G[1])));return K}}(),R=function(){const G=c.create();return function(K,P,Q,T,aa,ea){A(K,P);isNaN(Q)||0===Q||(ba(G,aa,P,ea),K.scale=P.scale*Q,K.rotation+=T,ha(G,G,K,ea),fa(K, K,h.set(G,G[0]-aa[0],aa[1]-G[1])));return K}}(),Y=function(){const G=c.create(),K=c.create();return function(P,Q,T,aa,ea,la,N){S(K,la,N);h.add(G,ea,K);return aa?R(P,Q,T,aa,G,la):L(P,Q,T,G,la)}}(),ba=function(){const G=q.create();return function(K,P,Q,T){var aa=h.transformMat2d;y(G,Q,T,1);Q=p.invert(G,G);return aa.call(h,K,P,Q)}}(),ha=function(){const G=q.create();return function(K,P,Q,T){return h.transformMat2d(K,P,y(G,Q,T,1))}}(),fa=function(){const G=c.create(),K=q.create();return function(P,Q, T){A(P,Q);const aa=C(Q),ea=P.targetGeometry;p.fromRotation(K,k.toRadian(Q.rotation)||0);p.scale(K,K,c.fromValues(aa,aa));h.transformMat2d(G,T,K);ea.x+=G[0];ea.y+=G[1];return P}}();a.addPadding=V;a.angleBetween=M;a.centerAt=E;a.copy=A;a.create=async function(G,K){if(!G||!K)return new d({targetGeometry:new u,scale:0,rotation:0});var P=K.spatialReference;const {constraints:Q,padding:T,viewpoint:aa,size:ea}=K,la=[T?ea[0]-T.left-T.right:ea[0],T?ea[1]-T.top-T.bottom:ea[1]];let N=null;G instanceof d?N=G: G.viewpoint?N=G.viewpoint:G.target&&"esri.Viewpoint"===G.target.declaredClass&&(N=G.target);let U=null;N?.targetGeometry?U=N.targetGeometry:G instanceof b?U=G:G instanceof g?U=await w(G,K,P):G&&(U=await w(G.center,K,P)||await w(G.target,K,P)||await w(G,K,P));!U&&aa?.targetGeometry?U=aa.targetGeometry:!U&&K.extent&&(U=K.extent);P||(P=K.spatialReference||K.extent||U,P=P.wkid?P:P.spatialReference||n.WGS84);v.isLoaded()||t.equals(U.spatialReference,P)||v.canProjectWithoutEngine(U.spatialReference,P)|| await v.load();var ca=m(U,P);ca="center"in ca?ca.center:ca;!1!==K.pickClosestTarget&&"point"===ca.type&&"point"===aa.targetGeometry?.type&&(ca.x=e.getClosestDenormalizedXToReference(ca.x,aa.targetGeometry.x,ca.spatialReference));K=0;N?K=N.rotation:G.hasOwnProperty("rotation")?K=G.rotation:aa&&(K=aa.rotation);let ia=0;ia=null!=N?.targetGeometry&&"point"===N.targetGeometry.type?N.scale:"scale"in G&&G.scale?G.scale:"zoom"in G&&-1!==G.zoom&&Q&&Q.effectiveLODs?Q.zoomToScale(G.zoom):Array.isArray(U)||"point"=== U.type||"extent"===U.type&&0===U.width&&0===U.height?aa.scale:B(m(U.extent,P),la,K);if(G=D(G.target??G))G.min&&G.minia&&(ia=G.max);G=new d({targetGeometry:ca,scale:ia,rotation:K});Q&&(G=Q.fit(G),Q.constrainByGeometry(G),Q.rotationEnabled||(G.rotation=aa.rotation));return G};a.extentToScale=B;a.getAnchor=x;a.getExtent=X;a.getMatrix=da;a.getPaddingMapTranslation=Z;a.getPaddingScreenTranslation=S;a.getResolution=C;a.getResolutionToScaleFactor=I;a.getScaleToResolutionFactor= H;a.getTransform=y;a.getTransformNoRotation=F;a.getWorldScreenWidth=function(G,K){return Math.round(O(G)/K)};a.getWorldWidth=O;a.padAndScaleAndRotateBy=Y;a.resize=J;a.rotateBy=function(G,K,P){A(G,K);G.rotation+=P;return G};a.rotateTo=function(G,K,P){A(G,K);G.rotation=P;return G};a.scaleAndRotateBy=R;a.scaleTo=function(G,K,P){A(G,K);G.scale=P;return G};a.setExtent=function(G,K,P,Q,T){E(G,K,P.center);G.scale=B(P,Q);T?.constraints?.constrain(G);return G};a.toMap=ba;a.toScreen=ha;a.translateBy=fa;Object.defineProperty(a, Symbol.toStringTag,{value:"Module"})})},"esri/core/libs/gl-matrix-2/math/mat2d":function(){define(["exports","./common"],function(a,d){function l(x,C){x[0]=C[0];x[1]=C[1];x[2]=C[2];x[3]=C[3];x[4]=C[4];x[5]=C[5];return x}function f(x){x[0]=1;x[1]=0;x[2]=0;x[3]=1;x[4]=0;x[5]=0;return x}function r(x,C,H,I,O,W,X){x[0]=C;x[1]=H;x[2]=I;x[3]=O;x[4]=W;x[5]=X;return x}function k(x,C){const H=C[0],I=C[1],O=C[2],W=C[3],X=C[4];C=C[5];let S=H*W-I*O;if(!S)return null;S=1/S;x[0]=W*S;x[1]=-I*S;x[2]=-O*S;x[3]=H*S; x[4]=(O*C-W*X)*S;x[5]=(I*X-H*C)*S;return x}function p(x){return x[0]*x[3]-x[1]*x[2]}function q(x,C,H){const I=C[0],O=C[1],W=C[2],X=C[3],S=C[4];C=C[5];const Z=H[0],da=H[1],y=H[2],F=H[3],M=H[4];H=H[5];x[0]=I*Z+W*da;x[1]=O*Z+X*da;x[2]=I*y+W*F;x[3]=O*y+X*F;x[4]=I*M+W*H+S;x[5]=O*M+X*H+C;return x}function h(x,C,H){const I=C[0],O=C[1],W=C[2],X=C[3],S=C[4];C=C[5];const Z=Math.sin(H);H=Math.cos(H);x[0]=I*H+W*Z;x[1]=O*H+X*Z;x[2]=I*-Z+W*H;x[3]=O*-Z+X*H;x[4]=S;x[5]=C;return x}function c(x,C,H){const I=C[1],O= C[2],W=C[3],X=C[4],S=C[5],Z=H[0];H=H[1];x[0]=C[0]*Z;x[1]=I*Z;x[2]=O*H;x[3]=W*H;x[4]=X;x[5]=S;return x}function b(x,C,H){const I=C[0],O=C[1],W=C[2],X=C[3],S=C[4];C=C[5];const Z=H[0];H=H[1];x[0]=I;x[1]=O;x[2]=W;x[3]=X;x[4]=I*Z+W*H+S;x[5]=O*Z+X*H+C;return x}function g(x,C){const H=Math.sin(C);C=Math.cos(C);x[0]=C;x[1]=H;x[2]=-H;x[3]=C;x[4]=0;x[5]=0;return x}function u(x,C){x[0]=C[0];x[1]=0;x[2]=0;x[3]=C[1];x[4]=0;x[5]=0;return x}function v(x,C){x[0]=1;x[1]=0;x[2]=0;x[3]=1;x[4]=C[0];x[5]=C[1];return x} function n(x){return"mat2d("+x[0]+", "+x[1]+", "+x[2]+", "+x[3]+", "+x[4]+", "+x[5]+")"}function e(x){return Math.sqrt(x[0]**2+x[1]**2+x[2]**2+x[3]**2+x[4]**2+x[5]**2+1)}function t(x,C,H){x[0]=C[0]+H[0];x[1]=C[1]+H[1];x[2]=C[2]+H[2];x[3]=C[3]+H[3];x[4]=C[4]+H[4];x[5]=C[5]+H[5];return x}function z(x,C,H){x[0]=C[0]-H[0];x[1]=C[1]-H[1];x[2]=C[2]-H[2];x[3]=C[3]-H[3];x[4]=C[4]-H[4];x[5]=C[5]-H[5];return x}function B(x,C,H){x[0]=C[0]*H;x[1]=C[1]*H;x[2]=C[2]*H;x[3]=C[3]*H;x[4]=C[4]*H;x[5]=C[5]*H;return x} function w(x,C,H,I){x[0]=C[0]+H[0]*I;x[1]=C[1]+H[1]*I;x[2]=C[2]+H[2]*I;x[3]=C[3]+H[3]*I;x[4]=C[4]+H[4]*I;x[5]=C[5]+H[5]*I;return x}function D(x,C){return x[0]===C[0]&&x[1]===C[1]&&x[2]===C[2]&&x[3]===C[3]&&x[4]===C[4]&&x[5]===C[5]}function m(x,C){const H=x[0],I=x[1],O=x[2],W=x[3],X=x[4];x=x[5];const S=C[0],Z=C[1],da=C[2],y=C[3],F=C[4];C=C[5];const M=d.getEpsilon();return Math.abs(H-S)<=M*Math.max(1,Math.abs(H),Math.abs(S))&&Math.abs(I-Z)<=M*Math.max(1,Math.abs(I),Math.abs(Z))&&Math.abs(O-da)<=M*Math.max(1, Math.abs(O),Math.abs(da))&&Math.abs(W-y)<=M*Math.max(1,Math.abs(W),Math.abs(y))&&Math.abs(X-F)<=M*Math.max(1,Math.abs(X),Math.abs(F))&&Math.abs(x-C)<=M*Math.max(1,Math.abs(x),Math.abs(C))}const A=Object.freeze(Object.defineProperty({__proto__:null,add:t,copy:l,determinant:p,equals:m,exactEquals:D,frob:e,fromRotation:g,fromScaling:u,fromTranslation:v,identity:f,invert:k,mul:q,multiply:q,multiplyScalar:B,multiplyScalarAndAdd:w,rotate:h,scale:c,set:r,str:n,sub:z,subtract:z,translate:b},Symbol.toStringTag, {value:"Module"}));a.add=t;a.copy=l;a.determinant=p;a.equals=m;a.exactEquals=D;a.frob=e;a.fromRotation=g;a.fromScaling=u;a.fromTranslation=v;a.identity=f;a.invert=k;a.mat2d=A;a.mul=q;a.multiply=q;a.multiplyScalar=B;a.multiplyScalarAndAdd=w;a.rotate=h;a.scale=c;a.set=r;a.str=n;a.sub=z;a.subtract=z;a.translate=b;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/core/libs/gl-matrix-2/factories/mat2df64":function(){define(["exports"],function(a){function d(){return[1,0,0,1,0,0]}function l(q){return[q[0], q[1],q[2],q[3],q[4],q[5]]}function f(q,h,c,b,g,u){return[q,h,c,b,g,u]}function r(q,h){return new Float64Array(q,h,6)}const k=d(),p=Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:k,clone:l,create:d,createView:r,fromValues:f},Symbol.toStringTag,{value:"Module"}));a.IDENTITY=k;a.clone=l;a.create=d;a.createView=r;a.fromValues=f;a.mat2df64=p;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/ViewState":function(){define("../../chunks/tslib.es6 ../../geometry ../../Viewpoint ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../../core/libs/gl-matrix-2/math/common ../../core/libs/gl-matrix-2/math/mat2d ../../core/libs/gl-matrix-2/factories/mat2df32 ../../core/libs/gl-matrix-2/factories/mat2df64 ../../core/libs/gl-matrix-2/math/mat3 ../../core/libs/gl-matrix-2/factories/mat3f32 ../../core/libs/gl-matrix-2/math/vec2 ../../core/libs/gl-matrix-2/factories/vec2f32 ../../core/libs/gl-matrix-2/factories/vec2f64 ../../core/libs/gl-matrix-2/types/vec2 ../../geometry/support/normalizeUtils ./viewpointUtils ../../geometry/Extent ../../geometry/Point".split(" "), function(a,d,l,f,r,k,p,q,h,c,b,g,u,v,n,e,t,z,B,w,D,m,A){var x;const C=[0,0];d=x=class extends f.JSONSupport{constructor(H){super(H);this._viewpoint2D={center:z.create(),rotation:0,scale:0,spatialReference:void 0};this.center=[0,0];this.extent=new m;this.id=0;this.inverseTransform=u.create();this.scale=this.rotation=this.resolution=0;this.transform=u.create();this.transformNoRotation=u.create();this.displayMat3=n.create();this.displayViewMat3=n.create();this.viewMat3=n.create();this.viewMat2d=g.create(); this.worldScreenWidth=0;this.size=[0,0]}set pixelRatio(H){this._set("pixelRatio",H);this._update()}set size(H){this._set("size",H);this._update()}set viewpoint(H){if(H){const I=this._viewpoint2D,O=H.targetGeometry;I.center[0]=O.x;I.center[1]=O.y;I.rotation=H.rotation;I.scale=H.scale;I.spatialReference=O.spatialReference}this._update()}copy(H){const I=this.size,O=this.viewpoint;O&&I?(this.viewpoint=D.copy(O,H.viewpoint),this._set("size",e.copy(I,H.size))):(this.viewpoint=H.viewpoint.clone(),this._set("size", [H.size[0],H.size[1]]));this._set("pixelRatio",H.pixelRatio);return this}clone(){return new x({size:this.size,viewpoint:this.viewpoint.clone(),pixelRatio:this.pixelRatio})}toMap(H,I,O){if(B.isVec2(I))return e.transformMat2d(H,I,this.inverseTransform);C[0]=I;C[1]=O;return e.transformMat2d(H,C,this.inverseTransform)}toScreen(H,I,O){if(B.isVec2(I))return e.transformMat2d(H,I,this.transform);C[0]=I;C[1]=O;return e.transformMat2d(H,C,this.transform)}toScreenNoRotation(H,I,O){if(B.isVec2(I))return e.transformMat2d(H, I,this.transformNoRotation);C[0]=I;C[1]=O;return e.transformMat2d(H,C,this.transformNoRotation)}wrapMapCoordinate(H,I){e.copy(H,I);[I]=I;const [O]=this.center,{extent:W,spatialReference:X}=this;let {xmin:S,xmax:Z}=W;if(X.isWrappable){const da=D.getWorldWidth(X)/2;S=Math.max(S,O-da);Z=Math.min(Z,O+da)}if(IZ)H[0]=w.getClosestDenormalizedXToReference(I,O,X);return H}getScreenTransform(H,I){const {center:O}=this._viewpoint2D,W=this._get("pixelRatio")||1,X=this._get("size");D.getMatrix(H,O,X,I,0, W);return H}_update(){const {center:H,spatialReference:I,scale:O,rotation:W}=this._viewpoint2D,X=this._get("pixelRatio")||1,S=this._get("size"),Z=new l({targetGeometry:new A(H[0],H[1],I),scale:O,rotation:W});this._set("viewpoint",Z);if(S&&I&&O){this.resolution=D.getResolution(Z);this.rotation=W;this.scale=O;this.spatialReference=I;e.copy(this.center,H);v.set(this.displayMat3,0!==S[0]?2/S[0]:0,0,0,0,0!==S[1]?-2/S[1]:0,0,-1,1,1);var da=v.identity(this.viewMat3),y=t.fromValues(S[0]/2,S[1]/2),F=t.fromValues(-S[0]/ 2,-S[1]/2),M=c.toRadian(W);v.translate(da,da,y);v.rotate(da,da,M);v.translate(da,da,F);v.multiply(this.displayViewMat3,this.displayMat3,da);da=b.fromTranslation(this.viewMat2d,y);b.rotate(da,da,M);b.translate(da,da,F);D.getExtent(this.extent,Z,S);D.getTransform(this.transform,Z,S,X);b.invert(this.inverseTransform,this.transform);D.getTransformNoRotation(this.transformNoRotation,Z,S,X);this.worldScreenWidth=D.getWorldScreenWidth(this.spatialReference,this.resolution);this._set("id",this.id+1);return this}}}; a.__decorate([r.property({readOnly:!0})],d.prototype,"id",void 0);a.__decorate([r.property({value:1,json:{write:!0}})],d.prototype,"pixelRatio",null);a.__decorate([r.property({json:{write:!0}})],d.prototype,"size",null);a.__decorate([r.property()],d.prototype,"spatialReference",void 0);a.__decorate([r.property({type:l,json:{write:!0}})],d.prototype,"viewpoint",null);return d=x=a.__decorate([h.subclass("esri.views.2d.ViewState")],d)})},"esri/core/libs/gl-matrix-2/factories/mat2df32":function(){define(["exports"], function(a){function d(){const h=new Float32Array(6);h[0]=1;h[3]=1;return h}function l(h){const c=new Float32Array(6);c[0]=h[0];c[1]=h[1];c[2]=h[2];c[3]=h[3];c[4]=h[4];c[5]=h[5];return c}function f(h,c,b,g,u,v){const n=new Float32Array(6);n[0]=h;n[1]=c;n[2]=b;n[3]=g;n[4]=u;n[5]=v;return n}function r(h,c){return new Float32Array(h,c,6)}function k(h,c,b,g){const u=c[g];c=c[g+1];h[g]=b[0]*u+b[2]*c+b[4];h[g+1]=b[1]*u+b[3]*c+b[5]}function p(h,c,b,g=0,u=0,v=2){for(u=u||c.length/v;gz;z++){w=((g*B+b)*B+c)*B-e;if(Math.abs(w)Math.abs(D))break;B-=w/D}D=0;z=1;B=e;if(Bz)return z;for(;Dw?D=B:z=B;B=.5*(z-D)+D}return B}const c=3*r,b=3*(p-r)-c,g=1-c- b,u=3*k,v=3*(q-k)-u,n=1-u-v;return function(e,t=1E-6){e=h(e,t);return((n*e+v)*e+u)*e}}const l=/^cubic-bezier\((.*)\)/,f={};f.ease=d(.25,.1,.25,1);f.linear=d(0,0,1,1);f.easeIn=f["ease-in"]=d(.42,0,1,1);f.easeOut=f["ease-out"]=d(0,0,.58,1);f.easeInOut=f["ease-in-out"]=d(.42,0,.58,1);a.easingFunctions=f;a.parse=function(r){let k=f[r]||null;!k&&(r=l.exec(r))&&(r=r[1].split(",").map(p=>parseFloat(p.trim())),4!==r.length||r.some(p=>isNaN(p))||(k=d.apply(d,r)));return k};a.unitBezier=d;Object.defineProperty(a, Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/pointToPoint/Camera":function(){define("exports ../../../geometry ../../../Viewpoint ../../../core/mathUtils ../../../geometry/support/pointUtils ../viewpointUtils ../../../geometry/Point".split(" "),function(a,d,l,f,r,k,p){class q{constructor(h){this._view=h;this.viewpoint=new l({targetGeometry:new p,scale:0,rotation:0})}get view(){return this._view}get size(){const [h,c]=this._view.size;return Math.sqrt(h*h+c*c)}get scale(){return this.viewpoint.scale}get rotation(){return this.viewpoint.rotation}get center(){return this.viewpoint.targetGeometry}get scaleToResolutionFactor(){return k.getScaleToResolutionFactor(this.center.spatialReference)}pixelsPerPanAtZoom(h){return 1/ (h*this.scaleToResolutionFactor)}zoomAtPixelsPerPan(h){return 1/(h*this.scaleToResolutionFactor)}pixelsPerRotateAtZoom(h){return this.size/2}compareTo(h,c){c.pan=r.distance(this.center,h.center);let b=Math.abs(h.rotation-this.rotation);c.rotate=f.deg2rad(180<=b?360-b:b);c.sourceZoom=this.scale;c.targetZoom=h.scale}interpolate(h,c,b){const {pan:g,rotate:u,zoom:v,zoomOffset:n}=b;({center:b}=this);b.spatialReference=h.center.spatialReference;b.x=f.lerp(h.center.x,c.center.x,g);b.y=f.lerp(h.center.y, c.center.y,g);this.viewpoint.scale=f.lerp(h.scale,c.scale+n,v);h=h.rotation;c=c.rotation;180<=Math.abs(c-h)&&(h+=360*(hRLE,r=E=>E*E,k=E=>1-r(1-E),p=E=>.5>E?r(2*E)/2:(1-r(1-2*(E-.5))+1)/2,q=E=>E*E*E,h=E=>1-q(1-E),c=E=>.5>E?q(2*E)/2:(1-q(1-2*(E-.5))+1)/ 2,b=E=>E*E*E*E,g=E=>1-b(1-E),u=E=>.5>E?b(2*E)/2:(1-b(1-2*(E-.5))+1)/2,v=E=>E*E*E*E*E,n=E=>1-v(1-E),e=E=>.5>E?v(2*E)/2:(1-v(1-2*(E-.5))+1)/2,t=E=>-Math.cos(E*Math.PI/2)+1,z=E=>1-t(1-E),B=E=>.5>E?t(2*E)/2:(1-t(1-2*(E-.5))+1)/2,w=E=>2**(10*(E-1)),D=E=>1-2**(10*(1-E-1)),m=E=>.5>E?2**(10*(2*E-1))/2:(1-2**(10*(1-2*(E-.5)-1))+1)/2,A=E=>-(Math.sqrt(1-E*E)-1),x=E=>1-A(1-E),C=E=>.5>E?A(2*E)/2:(1-A(1-2*(E-.5))+1)/2,H=l(d(1),1),I=l(d(1),0),O=l(d(1),.5),W=l(d(2),1),X=l(d(2),0),S=l(d(2),.5),Z=l(d(3),1),da=l(d(3), 0),y=l(d(3),.5),F=l(d(4),1),M=l(d(4),0),V=l(d(4),.5);a.EasingFunctions={linear:f,"in-quad":r,"out-quad":k,"in-out-quad":p,"in-coast-quad":H,"out-coast-quad":I,"in-out-coast-quad":O,"in-cubic":q,"out-cubic":h,"in-out-cubic":c,"in-coast-cubic":W,"out-coast-cubic":X,"in-out-coast-cubic":S,"in-quart":b,"out-quart":g,"in-out-quart":u,"in-coast-quart":Z,"out-coast-quart":da,"in-out-coast-quart":y,"in-quint":v,"out-quint":n,"in-out-quint":e,"in-coast-quint":F,"out-coast-quint":M,"in-out-coast-quint":V,"in-sine":t, "out-sine":z,"in-out-sine":B,"in-expo":w,"out-expo":D,"in-out-expo":m,"in-circ":A,"out-circ":x,"in-out-circ":C};a.inCirc=A;a.inCoastCubic=W;a.inCoastQuad=H;a.inCoastQuart=Z;a.inCoastQuint=F;a.inCubic=q;a.inExpo=w;a.inOutCirc=C;a.inOutCoastCubic=S;a.inOutCoastQuad=O;a.inOutCoastQuart=y;a.inOutCoastQuint=V;a.inOutCubic=c;a.inOutExpo=m;a.inOutQuad=p;a.inOutQuart=u;a.inOutQuint=e;a.inOutSine=B;a.inQuad=r;a.inQuart=b;a.inQuint=v;a.inSine=t;a.linear=f;a.outCirc=x;a.outCoastCubic=X;a.outCoastQuad=I;a.outCoastQuart= da;a.outCoastQuint=M;a.outCubic=h;a.outExpo=D;a.outQuad=k;a.outQuart=g;a.outQuint=n;a.outSine=z;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/animation/pointToPoint/Definition":function(){define(["exports","../../../core/libs/gl-matrix-2/math/common","./Camera","./Settings"],function(a,d,l,f){class r{constructor(k){this._createCamera=k;this.compared=new l.CompareResult;this.segmentStart=0;this.segmentEnd=1;this.settings={desiredScreenFlow:f.defaultSettings.desiredScreenFlow}; this.source=k();this.target=k()}clone(){const k=new r(this._createCamera);k.copyFrom(this);return k}copyFrom(k){this.update(k.source,k.target,k.settings)}update(k,p,q){this.source!==k&&this.source.copyFrom(k);this.target!==p&&this.target.copyFrom(p);this.source.compareTo(this.target,this.compared);this.settings.desiredScreenFlow=null!=q.desiredScreenFlow?q.desiredScreenFlow:f.defaultSettings.desiredScreenFlow;this.desiredPixelFlow=this.settings.desiredScreenFlow*this.target.size;this.halfWindowSize= this.target.size/2}halfWindowPanAtZoom(k){k=this.target.pixelsPerPanAtZoom(k);return this.halfWindowSize/k}get hasZoom(){return 1E-5d.getEpsilon()}get hasFov(){return Math.abs(this.compared.fov)>d.getEpsilon()}get hasRotate(){return this.compared.rotate>d.getEpsilon()}}a.Definition=r;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/animation/pointToPoint/Camera":function(){define(["exports"], function(a){class d{constructor(){this.targetZoom=this.sourceZoom=this.fov=this.rotate=this.pan=0}}a.CompareResult=d;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/animation/pointToPoint/Settings":function(){define(["exports","../../../core/time"],function(a,d){const l={desiredScreenFlow:2,minDuration:d.Milliseconds(500),maxDuration:d.Milliseconds(8E3)};d={...l,maxDuration:d.Milliseconds(4E3)};a.defaultSettings=l;a.defaultSettings2D=d;Object.defineProperty(a,Symbol.toStringTag, {value:"Module"})})},"esri/views/animation/pointToPoint/InterpolateComponents":function(){define(["exports"],function(a){class d{constructor(){this.zoomOffset=this.fov=this.zoom=this.rotate=this.pan=0}}a.InterpolateComponents=d;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/animation/pointToPoint/apex/Path":function(){define(["exports","../../easing","../Path","../Segment","./planning"],function(a,d,l,f,r){class k extends l.Path{constructor(p,q){super();this._preallocSegments= [new f.Segment,new f.Segment,new f.Segment];this._descensionSegment=this._ascensionSegment=null;this.update(p,q)}update(p,q){p&&(this.definition?this.definition.copyFrom(p):this.definition=p.clone(),p=q?.apex?r.optimalDistance(p,q.apex):null,this.segments.length=0,this._descensionSegment=this._ascensionSegment=null,p?this._updateWithApex(p,q?.apex):this._updateWithoutApex())}segmentInterpolateComponentsAt(p,q,h){p.interpolateComponentsAt(q,h);p===this._ascensionSegment?h.zoom=d.outQuad(h.zoom):p=== this._descensionSegment&&(h.zoom=d.inQuad(h.zoom))}_updateWithApex(p,q){const [h,c,b]=this._preallocSegments,g=q?.ascensionFactor??.5;q=Math.min(1-g,null!=q?.ascensionFactor&&null!=q.descensionFactor?q.descensionFactor:.5);const u=1-g-q;h.definition?h.definition.copyFrom(this.definition):h.definition=this.definition.clone();h.definition.compared.targetZoom=p;h.definition.compared.pan=this.definition.compared.pan*g;h.definition.compared.rotate=this.definition.compared.rotate*g;h.definition.segmentEnd= g;h.update();this._ascensionSegment=h;this.segments.push(h);0d.Seconds(l+f.time),d.Seconds(0))}interpolateComponentsAt(l,f){l=Math.min(Math.max(l,0),1);l*=this.time;var r=0,k=0;const p=this.definition,q=this.segments.reduce((h,c)=>h||c.definition.hasZoom,!1);for(let h=0;hMath.abs(g-r)?u:g;f.zoomOffset= k-this.segments[this.segments.length-1].definition.compared.targetZoom;f.zoom=(l-r)/(k-r)}else f.zoom=1;return f}l-=c.time;r+=b.compared.pan;k+=b.compared.rotate}}segmentInterpolateComponentsAt(l,f,r){l.interpolateComponentsAt(f,r)}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/animation/pointToPoint/Segment":function(){define(["exports","../../../core/mathUtils","../../../core/time"],function(a,d,l){class f{get time(){return this._time}constructor(k){k&&this.update(k)}update(k){k&& (this.definition?this.definition.copyFrom(k):this.definition=k.clone());this._updatePrecomputedVariables();this._updatePixelFlow()}_updatePrecomputedVariables(){var k=this.definition;const p=k.compared,q=p.sourceZoom,h=p.targetZoom;this._zoomSign=q>h?1:-1;this._panPixelsAtSource=p.pan*k.source.pixelsPerPanAtZoom(q);k=(k.source.pixelsPerRotateAtZoom(q)+k.target.pixelsPerRotateAtZoom(h))/2;this._rotatePixels=p.rotate*k}_updatePixelFlow(){var k=this.definition.compared.sourceZoom,p=this.definition.compared.targetZoom; const {hasZoom:q,hasPan:h,hasRotate:c}=this.definition;var b=0,g=0;q&&(h&&(b=(p/k-1)/(-1/(this._zoomSign*this.definition.halfWindowSize)*Math.LN2*this._panPixelsAtSource)),c&&(g=Math.log(k/p)/Math.LN2*this._zoomSign*this.definition.halfWindowSize/this._rotatePixels));this._rotatePixelFlow=this._panPixelFlow=this._zoomPixelFlow=0;k=this.definition.desiredPixelFlow;q&&h&&c?(p=b+g+b*g,this._zoomPixelFlow=b*g/p*k,this._panPixelFlow=g/p*k,this._rotatePixelFlow=b/p*k):q&&h?(g=1+b,this._zoomPixelFlow=b/ g*k,this._panPixelFlow=1/g*k):q&&c?(b=1+g,this._zoomPixelFlow=g/b*k,this._rotatePixelFlow=1/b*k):h&&c?(b=this._panPixelsAtSource/this._rotatePixels,g=1+b,this._panPixelFlow=b/g*k,this._rotatePixelFlow=1/g*k):h?this._panPixelFlow=k:q?this._zoomPixelFlow=k:c&&(this._rotatePixelFlow=k);this._time=this.rotateTime??this.zoomTime??this.panTime??this.fovTime??l.Seconds(0)}get rotateTime(){return this.definition.hasRotate?l.Seconds(this._rotatePixels/this._rotatePixelFlow):null}get zoomTime(){return this.definition.hasZoom? l.Seconds(Math.log(this.definition.compared.sourceZoom/this.definition.compared.targetZoom)/Math.LN2*this._zoomSign*this.definition.halfWindowSize/this._zoomPixelFlow):null}get fovTime(){return this.definition.hasFov?l.Seconds(Math.abs(this.definition.compared.fov)/r):null}get panTime(){if(this.definition.hasPan){if(this.definition.hasZoom){const k=-1/(this._zoomSign*this.definition.halfWindowSize)*Math.LN2;return l.Seconds(Math.log(this._zoomPixelFlow/this._panPixelFlow*this._panPixelsAtSource*k+ 1)/(k*this._zoomPixelFlow))}return l.Seconds(this._panPixelsAtSource/this._panPixelFlow)}}_interpolateComponentsZoom(k){if(0===k||1===k)return k;if(this.definition.hasZoom){const p=this.definition.compared.sourceZoom,q=this.definition.compared.targetZoom;return(p*(p/q)**-k-p)/(q-p)}return k}_interpolateComponentsFov(k){if(0===k)return this.definition.segmentStart;if(1===k)return this.definition.segmentEnd;if(this.definition.hasFov){const {segmentStart:p,segmentEnd:q}=this.definition;return p+k*(q- p)}return this.definition.segmentStart}_interpolateComponentsPan(k){if(0===k||1===k)return k;if(this.definition.hasPan&&this.definition.hasZoom){const p=-1/(this._zoomSign*this.definition.halfWindowSize)*this._zoomPixelFlow;return 1/this._panPixelsAtSource*this._panPixelFlow*(2**(p*k*this._time)-1)/(p*Math.LN2)}return k}_interpolateComponentsRotate(k){return k}interpolateComponentsAt(k,p){k=Math.min(Math.max(k,0),1);p.zoom=this._interpolateComponentsZoom(k);p.pan=this._interpolateComponentsPan(k); p.rotate=this._interpolateComponentsRotate(k);p.zoomOffset=0;p.fov=this._interpolateComponentsFov(k)}}const r=d.deg2rad(90);a.Segment=f;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/animation/pointToPoint/apex/planning":function(){define(["exports","./functions"],function(a,d){function l(f,r){const k=Math.max(f.compared.sourceZoom,f.compared.targetZoom);f=f.source.zoomAtPixelsPerPan(f.desiredPixelFlow/f.compared.pan)/2;return fc(f,A,p)+d.tPanion(f,A,p)+u(f,A,p);h=A=>b(f,A,p)+d.dtPanion(f,A,p)+v(f,A,p);const e=A=>g(f,A,p)+d.ddtPanion(f,A,p)+n(f,A,p);let t=q(k);const z=d.tBaseLine(f);let B;const w=r.maximumIterations||20,D=null!=r.maximumDistance?r.maximumDistance:Infinity;for(B=0;Bm&&(A+=m);m=A/e(k);if(isNaN(m)||k>=D&&0>m){if(!isFinite(D))return null;k=D;t=q(k);break}k-=m;if(k=Math.abs(m-t)/t)break;t=m}return t>.7*z||k{this._updateParameters&&(this._updateParameters.state=this.view.state,this._updateParameters.stationary=this.view.stationary,this._updateParameters.pixelRatio=window.devicePixelRatio,this._updateParameters.renderingOptions=this.view.renderingOptions,this._updateParameters.targetState.copy(this.view.state),!this.view.animation||"then"in this.view.animation.target||(this._updateParameters.targetState.viewpoint=this.view.animation.target))};this.update=()=> {this._updateRequested=!1;if(!this.view?.destroyed){var {allLayerViews:k,graphicsView:p,labelManager:q,state:{id:h}}=this.view;k.forEach(this._updateLayerView,this);null!=q&&(q.lastUpdateId!==h&&(q.viewChange(),q.lastUpdateId=h),q.updateRequested&&q.processUpdate(this._updateParameters));null!=p&&(p.lastUpdateId!==h&&(p.viewChange(),p.lastUpdateId=h),p.updateRequested&&p.processUpdate(this._updateParameters));this.view.graphicsTileStore.setViewState(this._updateParameters.state);this.animationInProgress|| this._updateRequested||this._frameTaskHandle?.pause()}}}destroy(){this.stop()}start(){if(!this._frameTaskHandle){var r=this.view;this.stationary=r.stationary;this._updateParameters={state:r.state,targetState:new l,pixelRatio:window.devicePixelRatio,stationary:this.stationary,renderingOptions:r.renderingOptions};this._stationaryHandle=a.watch(()=>r.stationary,k=>{this.stationary=k;this.requestFrame()});this._frameTaskHandle=d.addFrameTask(this);this.requestUpdate()}}stop(){this._frameTaskHandle&&(this._updateRequested= !1,this._stationaryHandle?.remove(),this._frameTaskHandle.remove(),this._updateParameters=this._stationaryHandle=this._frameTaskHandle=null,this.stationary=!0,this.animationInProgress=!1)}requestUpdate(){this._updateRequested||(this._updateRequested=!0,this.requestFrame())}requestFrame(){this._frameTaskHandle&&this._frameTaskHandle.resume()}_updateLayerView(r){if(r.attached){var k=this.view.state,p=r.lastUpdateId;if(null==p||!this.stationary&&!r.moving)r.moving=!0;p!==k.id&&r.viewChange();this.stationary&& r.moving&&(r.moving=!1,r.moveEnd());r.lastUpdateId=k.id;r.updateRequested&&r.processUpdate(this._updateParameters);"layerViews"in r&&r.layerViews?.forEach(this._updateLayerView,this)}else this.requestUpdate()}}return f})},"esri/views/2d/GoToManager":function(){define("exports ../../chunks/tslib.es6 ../../core/a11yUtils ../../core/Accessor ../../core/Error ../../core/Logger ../../core/promiseUtils ../../core/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/has ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../ViewAnimation ./viewpointUtils".split(" "), function(a,d,l,f,r,k,p,q,h,c,b,g,u,v){a.GoToManager=class extends f{constructor(n){super(n);this._gotoTask=null}destroy(){this._gotoTask=null}async goTo(n,e){if(n){var t=new u;this.view.animation=t;await q.whenOnce(()=>this.view.ready,e);var z={...e,animate:e?.animate??!l.prefersReducedMotion(),animationMode:e?.animationMode??"auto"},{extent:B,spatialReference:w,size:D,viewpoint:m,constraints:A,padding:x,allLayerViews:C}=this.view;n=v.create(n,{extent:B,spatialReference:w,size:D,viewpoint:m,constraints:A, padding:x,allLayerViews:C,pickClosestTarget:e?.pickClosestTarget??!0});t?.update(n);this._gotoTask={};return z.animate?this._gotoAnimated(n,z):this._gotoImmediate(n,z)}k.getLogger(this).error("#goTo()","target cannot be null or undefined")}_gotoImmediate(n,e){const t=this._gotoTask,z=this.view.animation;n=n.then(B=>{p.throwIfAborted(e);if(t!==this._gotoTask)throw new r("view:goto-interrupted","Goto was interrupted");this.view.viewpoint=z.target=B;z.finish()});return this._cancellableGoTo(t,z,n,e)}_gotoAnimated(n, e){const t=this._gotoTask,z=this.view.animation;if(!z)return Promise.resolve();n=n.then(B=>{p.throwIfAborted(e);if(t!==this._gotoTask)throw new r("view:goto-interrupted","Goto was interrupted");z.update(B);this.view.animationManager.animate(z,this.view.viewpoint,e);return z.when().then(()=>{},()=>{})});return this._cancellableGoTo(t,z,n,e)}_cancellableGoTo(n,e,t,z){const B=()=>n===this._gotoTask;return p.whenOrAbort(t,z).finally(()=>{B()&&(e.done||e.stop())})}};d.__decorate([h.property({constructOnly:!0})], a.GoToManager.prototype,"view",void 0);a.GoToManager=d.__decorate([g.subclass("esri.views.2d.GoToManager")],a.GoToManager);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layerViewModuleImportUtils":function(){define(["require","exports","../../core/Error"],function(a,d,l){function f(){return Promise.all([new Promise((h,c)=>a(["./webglDeps"],h,c)),new Promise((h,c)=>a(["./mapViewDeps"],h,c))])}const r=h=>Object.freeze(Object.defineProperty({__proto__:null,default:h}, Symbol.toStringTag,{value:"Module"})),k=()=>f().then(()=>new Promise((h,c)=>a(["./layers/TileLayerView2D"],b=>h(r(b)),c))),p=()=>f().then(()=>new Promise((h,c)=>a(["./layers/FeatureLayerView2D"],b=>h(r(b)),c))),q={"base-dynamic":()=>f().then(()=>new Promise((h,c)=>a(["./layers/BaseDynamicLayerView2D"],b=>h(r(b)),c))),"base-tile":k,"bing-maps":k,catalog:()=>f().then(()=>new Promise((h,c)=>a(["./layers/CatalogLayerView2D"],b=>h(r(b)),c))),"catalog-dynamic-group":()=>f().then(()=>new Promise((h,c)=> a(["./layers/CatalogDynamicGroupLayerView2D"],b=>h(r(b)),c))),"catalog-footprint":()=>f().then(()=>new Promise((h,c)=>a(["./layers/CatalogFootprintLayerView2D"],b=>h(r(b)),c))),csv:p,"geo-rss":()=>f().then(()=>new Promise((h,c)=>a(["./layers/GeoRSSLayerView2D"],b=>h(r(b)),c))),feature:p,geojson:p,graphics:()=>f().then(()=>new Promise((h,c)=>a(["./layers/GraphicsLayerView2D"],b=>h(r(b)),c))),group:()=>f().then(()=>new Promise((h,c)=>a(["./layers/GroupLayerView2D"],b=>h(r(b)),c))),imagery:()=>f().then(()=> new Promise((h,c)=>a(["./layers/ImageryLayerView2D"],b=>h(r(b)),c))),"imagery-tile":()=>f().then(()=>new Promise((h,c)=>a(["./layers/ImageryTileLayerView2D"],b=>h(r(b)),c))),kml:()=>f().then(()=>new Promise((h,c)=>a(["./layers/KMLLayerView2D"],b=>h(r(b)),c))),"knowledge-graph":()=>f().then(()=>new Promise((h,c)=>a(["./layers/KnowledgeGraphLayerView2D"],b=>h(r(b)),c))),"link-chart":()=>f().then(()=>new Promise((h,c)=>a(["./layers/KnowledgeGraphLayerView2D"],b=>h(r(b)),c))),"knowledge-graph-sublayer":p, "map-image":()=>f().then(()=>new Promise((h,c)=>a(["./layers/MapImageLayerView2D"],b=>h(r(b)),c))),"map-notes":()=>f().then(()=>new Promise((h,c)=>a(["./layers/MapNotesLayerView2D"],b=>h(r(b)),c))),media:()=>f().then(()=>new Promise((h,c)=>a(["./layers/MediaLayerView2D"],b=>h(r(b)),c))),"ogc-feature":()=>f().then(()=>new Promise((h,c)=>a(["./layers/OGCFeatureLayerView2D"],b=>h(r(b)),c))),"open-street-map":k,"oriented-imagery":p,route:()=>f().then(()=>new Promise((h,c)=>a(["./layers/RouteLayerView2D"], b=>h(r(b)),c))),stream:()=>f().then(()=>new Promise((h,c)=>a(["./layers/StreamLayerView2D"],b=>h(r(b)),c))),"subtype-group":()=>f().then(()=>new Promise((h,c)=>a(["./layers/SubtypeGroupLayerView2D"],b=>h(r(b)),c))),tile:k,"vector-tile":()=>f().then(()=>new Promise((h,c)=>a(["./layers/VectorTileLayerView2D"],b=>h(r(b)),c))),video:()=>f().then(()=>new Promise((h,c)=>a(["./layers/VideoLayerView2D"],b=>h(r(b)),c))),wcs:()=>f().then(()=>new Promise((h,c)=>a(["./layers/ImageryTileLayerView2D"],b=>h(r(b)), c))),"web-tile":k,wfs:p,wms:()=>f().then(()=>new Promise((h,c)=>a(["./layers/WMSLayerView2D"],b=>h(r(b)),c))),wmts:()=>f().then(()=>new Promise((h,c)=>a(["./layers/WMTSLayerView2D"],b=>h(r(b)),c))),"line-of-sight":null,"base-elevation":null,"building-scene":null,dimension:null,elevation:null,"integrated-mesh":null,"integrated-mesh-3dtiles":null,"point-cloud":null,voxel:null,scene:null,unknown:null,unsupported:null};d.layerView2DImporter={hasLayerViewModule:h=>null!=q[h.type],importLayerView:h=>{var c= q[h.type];if(null==c)throw h=h.declaredClass?h.declaredClass.slice(h.declaredClass.lastIndexOf(".")+1):"Unknown",c=h.replaceAll(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),new l(`${c}:view-not-supported`,`${h} is not supported in 2D`);return c(h)}};Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/MapViewConstraints":function(){define("../../chunks/tslib.es6 ../../geometry ../../core/Accessor ../../core/Collection ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../../layers/support/LOD ./constraints/GeometryConstraint ./constraints/RotationConstraint ./constraints/ZoomConstraint ../../geometry/Extent ../../geometry/Polygon".split(" "), function(a,d,l,f,r,k,p,q,h,c,b,g,u,v,n){d={base:null,key:"type",typeMap:{extent:v,polygon:n}};l=class extends l{constructor(e){super(e);this.lods=null;this.maxScale=this.minScale=0;this.maxZoom=this.minZoom=-1;this.snapToZoom=this.rotationEnabled=!0;this.customConstraints=new f}destroy(){this.view=null}get effectiveLODs(){return this._zoom.effectiveLODs}get effectiveMinScale(){return this._zoom.effectiveMinScale}get effectiveMaxScale(){return this._zoom.effectiveMaxScale}get effectiveMinZoom(){return this._zoom.effectiveMinZoom}get effectiveMaxZoom(){return this._zoom.effectiveMaxZoom}set geometry(e){e? this._set("geometry",e):this._set("geometry",null)}get version(){return`${this._zoom?.uid}/${this._rotation?.uid}/${this._geometry?.uid}`}get _geometry(){const e=this._get("_geometry");return e&&this.geometry===e.geometry&&this.view?.constraintsInfo.spatialReference===e.spatialReference?e:new b.GeometryConstraint({geometry:this.geometry,spatialReference:this.view?.constraintsInfo.spatialReference})}get _rotation(){return new g({rotationEnabled:this.rotationEnabled})}get _zoom(){const e=this._get("_zoom"), t=this.lods||this.view?.constraintsInfo.lods,z=this.minZoom,B=this.maxZoom,w=this.minScale,D=this.maxScale,m=this.snapToZoom;return e&&e.lods===t&&e.minZoom===z&&e.maxZoom===B&&e.minScale===w&&e.maxScale===D&&e.snapToZoom===m?e:new u({lods:t,minZoom:z,maxZoom:B,minScale:w,maxScale:D,snapToZoom:m})}canZoomInTo(e){const t=this.effectiveMaxScale;return 0===t||e>=t}canZoomOutTo(e){const t=this.effectiveMinScale;return 0===t||e<=t}constrain(e,t){this._zoom.constrain(e,t);this._rotation.constrain(e,t); this._geometry.constrain(e,t);this.customConstraints.forEach(z=>z.constrain(e,t));return e}constrainByGeometry(e){this._geometry.constrain(e);this.customConstraints.forEach(t=>t.applyPanConstraint?.(e));return e}fit(e){return this._zoom.fit(e)}zoomToScale(e){return this._zoom.zoomToScale(e)}scaleToZoom(e){return this._zoom.scaleToZoom(e)}snapScale(e){return this._zoom.snapToClosestScale(e)}snapToNextScale(e){return this._zoom.snapToNextScale(e)}snapToPreviousScale(e){return this._zoom.snapToPreviousScale(e)}}; a.__decorate([r.property({readOnly:!0})],l.prototype,"effectiveLODs",null);a.__decorate([r.property({readOnly:!0})],l.prototype,"effectiveMinScale",null);a.__decorate([r.property({readOnly:!0})],l.prototype,"effectiveMaxScale",null);a.__decorate([r.property({readOnly:!0})],l.prototype,"effectiveMinZoom",null);a.__decorate([r.property({readOnly:!0})],l.prototype,"effectiveMaxZoom",null);a.__decorate([r.property({types:d,value:null})],l.prototype,"geometry",null);a.__decorate([r.property({type:[c]})], l.prototype,"lods",void 0);a.__decorate([r.property()],l.prototype,"minScale",void 0);a.__decorate([r.property()],l.prototype,"maxScale",void 0);a.__decorate([r.property()],l.prototype,"minZoom",void 0);a.__decorate([r.property()],l.prototype,"maxZoom",void 0);a.__decorate([r.property()],l.prototype,"rotationEnabled",void 0);a.__decorate([r.property()],l.prototype,"snapToZoom",void 0);a.__decorate([r.property({type:f})],l.prototype,"customConstraints",void 0);a.__decorate([r.property()],l.prototype, "view",void 0);a.__decorate([r.property({readOnly:!0})],l.prototype,"version",null);a.__decorate([r.property({type:b.GeometryConstraint,readOnly:!0})],l.prototype,"_geometry",null);a.__decorate([r.property({type:g})],l.prototype,"_rotation",null);a.__decorate([r.property({readOnly:!0,type:u})],l.prototype,"_zoom",null);return l=a.__decorate([h.subclass("esri.views.2d.MapViewConstraints")],l)})},"esri/views/2d/constraints/GeometryConstraint":function(){define("exports ../../../chunks/tslib.es6 ../../../core/Accessor ../../../core/Identifiable ../../../core/Logger ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../../geometry/projection ../../../geometry/support/contains ../../../geometry/support/near".split(" "), function(a,d,l,f,r,k,p,q,h,c,b,g){var u;a.GeometryConstraint=u=class extends f.NumericIdentifiableMixin(l){constructor(v){super(v);this.spatialReference=this.geometry=null}get normalizedGeometry(){if(null==this.geometry||!this.spatialReference)return null;if(!this.spatialReference.equals(this.geometry.spatialReference))try{return c.project(this.geometry,this.spatialReference)}catch(v){return r.getLogger(this).error("#constraints.geometry","could not project the geometry to the view's spatial reference", {geometry:this.geometry,spatialReference:this.spatialReference,error:v}),null}return this.geometry}constrain(v,n){if(null==this.normalizedGeometry)return v;n=v.targetGeometry;if("extent"===this.normalizedGeometry.type?b.extentContainsPoint(this.normalizedGeometry,n):b.polygonContainsPoint(this.normalizedGeometry,n))return v;({coordinate:n}=g.nearestCoordinate(this.normalizedGeometry,n));if(!n)return v;v.targetGeometry=n;return v}clone(){return new u({geometry:this.geometry?.clone(),spatialReference:this.spatialReference?.clone()})}}; d.__decorate([k.property({constructOnly:!0})],a.GeometryConstraint.prototype,"geometry",void 0);d.__decorate([k.property({readOnly:!0})],a.GeometryConstraint.prototype,"normalizedGeometry",null);d.__decorate([k.property({constructOnly:!0})],a.GeometryConstraint.prototype,"spatialReference",void 0);a.GeometryConstraint=u=d.__decorate([h.subclass("esri.views.2d.constraints.GeometryConstraint")],a.GeometryConstraint);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/geometry/support/near":function(){define(["exports", "../../geometry","../../core/libs/gl-matrix-2/math/vec2","./coordsUtils","../Point"],function(a,d,l,f,r){a.nearestCoordinate=function(k,p){const {spatialReference:q}=p;p=[p.x,p.y];let h=Number.POSITIVE_INFINITY,c=0,b=0;const g=[0,0];k="extent"===k.type?[[[k.xmin,k.ymin],[k.xmin,k.ymax],[k.xmax,k.ymax],[k.xmax,k.ymin],[k.xmin,k.ymin]]]:k.rings;for(const u of k)for(k=0;k w.clone());c.sort((w,D)=>D.scale-w.scale);c.forEach((w,D)=>w.level=D);for(const w of c){!t&&0=w.scale&&(n=w.level,t=!0);!z&&0=w.scale&&(e=B?B.level:-1,z=!0);var B=w}-1===u&&(u=0===b?0:n);-1===v&&(v=0===g?c.length-1:e);u=Math.max(u,0);u=Math.min(u,c.length-1);v=Math.max(v,0);v=Math.min(v,c.length-1);u>v&&([u,v]=[v,u]);b=c[u].scale;g=c[v].scale;c.splice(0,u);c.splice(v-u+1,c.length);c.forEach((w,D)=>{this._lodByScale[w.scale]=w;this._scales[D]=w.scale});this._set("effectiveLODs",c);this._set("effectiveMinZoom", u);this._set("effectiveMaxZoom",v)}this._set("effectiveMinScale",b);this._set("effectiveMaxScale",g)}constrain(c,b){if(b&&c.scale===b.scale)return c;var g=this.effectiveMinScale;const u=this.effectiveMaxScale,v=c.targetGeometry,n=b&&b.targetGeometry,e=0!==g&&c.scale>g;if(0!==u&&c.scale=c)return b[0];if(c>=b.length)return b[b.length-1];const g=Math.floor(c);return b[g]+(c-g)*(b[Math.ceil(c)]-b[g])}scaleToZoom(c){if(!this.effectiveLODs)return-1;const b=this._scales;let g,u;if(c>=b[0])return this.effectiveMinZoom; if(c<=b[b.length-1])return this.effectiveMaxZoom;for(let v=0;vc&&uMath.abs(g-c)<=Math.abs(b-c)?g:b,this._scales[0]);return this._lodByScale[c].scale}};a.__decorate([f.property({readOnly:!0})],d.prototype,"effectiveLODs",void 0);a.__decorate([f.property({readOnly:!0})],d.prototype, "effectiveMinZoom",void 0);a.__decorate([f.property({readOnly:!0})],d.prototype,"effectiveMaxZoom",void 0);a.__decorate([f.property({readOnly:!0})],d.prototype,"effectiveMinScale",void 0);a.__decorate([f.property({readOnly:!0})],d.prototype,"effectiveMaxScale",void 0);a.__decorate([f.property()],d.prototype,"lods",void 0);a.__decorate([f.property()],d.prototype,"minZoom",void 0);a.__decorate([f.property()],d.prototype,"maxZoom",void 0);a.__decorate([f.property()],d.prototype,"minScale",void 0);a.__decorate([f.property()], d.prototype,"maxScale",void 0);a.__decorate([f.property()],d.prototype,"snapToZoom",void 0);return d=h=a.__decorate([q.subclass("esri.views.2d.constraints.ZoomConstraint")],d)})},"esri/views/2d/tiling/TileInfoView":function(){define(["../../../geometry/support/spatialReferenceUtils","./LODInfo","./TileCoverage","./TileKey","./TileSpan"],function(a,d,l,f,r){const k=new f("0/0/0/0");class p{static create(c,b){c[1]>b[1]&&([c,b]=[b,c]);const [g,u]=c,[v,n]=b;c=v-g;b=n-u;b=0!==b?c/b:0;const e=(Math.ceil(u)- u)*b,t=(Math.floor(u)-u)*b;return new p(g,Math.floor(u),Math.ceil(n),b,0>c?e:t,0>c?t:e,0>c?v:g,0>c?g:v)}constructor(c,b,g,u,v,n,e,t){this.x=c;this.ymin=b;this.ymax=g;this.invM=u;this.leftAdjust=v;this.rightAdjust=n;this.leftBound=e;this.rightBound=t}incrRow(){this.x+=this.invM}getLeftCol(){return Math.max(this.x+this.leftAdjust,this.leftBound)}getRightCol(){return Math.min(this.x+this.rightAdjust,this.rightBound)}}const q=[[0,0],[0,0],[0,0],[0,0]];class h{constructor(c,b=null,g=c.lods[0].level,u= c.lods[c.lods.length-1].level){this.tileInfo=c;this.fullExtent=b;this.scales=[];this._infoByScale={};this._infoByLevel={};const v=c.lods.filter(e=>e.level>=g&&e.level<=u);this.minScale=v[0].scale;this.maxScale=v[v.length-1].scale;const n=this._lodInfos=v.map(e=>d.create(c,e,b));v.forEach((e,t)=>{this._infoByLevel[e.level]=n[t];this._infoByScale[e.scale]=n[t];this.scales[t]=e.scale},this);this._wrap=c.isWrappable}get spatialReference(){return this.tileInfo.spatialReference}getLODInfoAt(c){return this._infoByLevel["number"=== typeof c?c:c.level]}getTileBounds(c,b,g=!1){k.set(b);return(b=this._infoByLevel[k.level])?b.getTileBounds(c,k,g):c}getTileCoords(c,b,g=!1){k.set(b);return(b=this._infoByLevel[k.level])?b.getTileCoords(c,k,g):c}getTileCoverage(c,b=192,g=!0,u="closest"){if(!g&&(c.scale>this.minScale||c.scaleb;b++)q[b][1]===q[z][1]?z=b:(z=p.create(q[b],q[z]),n=Math.min(z.ymin,n),e=Math.max(z.ymax,e),void 0===c[z.ymin]&&(c[z.ymin]=[]),c[z.ymin].push(z),z=b);if(null==n||null==e||100=g.first[1]&&n<=g.last[1])if(v)if(g.size[0]g.last[0]||B=n?B.incrRow(): b.splice(z,1)}return u}getTileParentId(c){k.set(c);c=this._lodInfos.indexOf(this._infoByLevel[k.level])-1;if(0>c)return null;this._getTileIdAtLOD(k,this._lodInfos[c],k);return k.id}getTileResolution(c){return(c=this._infoByLevel["object"===typeof c?c.level:c])?c.resolution:-1}getTileScale(c){return(c=this._infoByLevel[c.level])?c.scale:-1}intersects(c,b){k.set(b);b=this._infoByLevel[k.level];const g=c.lodInfo;if(g.resolution>b.resolution){this._getTileIdAtLOD(k,g,k);var u=g.denormalizeCol(k.col,k.world); for(var v of c.spans)if(v.row===k.row&&v.colFrom<=u&&v.colTo>=u)return!0}if(g.resolution{w[0]=Math.min(w[0],D.row);w[1]=Math.max(w[1],D.row);w[2]=Math.min(w[2],D.colFrom);w[3]=Math.max(w[3],D.colTo);return w},[Infinity,-Infinity,Infinity,-Infinity]);u=b.denormalizeCol(k.col,k.world);c=g.getColumnForX(b.getXForColumn(u));v=g.getRowForY(b.getYForRow(k.row));u=g.getColumnForX(b.getXForColumn(u+1))-1;b=g.getRowForY(b.getYForRow(k.row+1))-1;return!(c> B||ut||be.row===k.row&&e.colFrom<=n&&e.colTo>=n)}normalizeBounds(c,b,g){c[0]=b[0];c[1]=b[1];c[2]=b[2];c[3]=b[3];this._wrap&&(b=a.getInfo(this.tileInfo.spatialReference),g=-g*(b.valid[1]-b.valid[0]),c[0]+=g,c[2]+=g);return c}getSmallestInfoForScale(c){const b=this.scales;if(this._infoByScale[c])return this._infoByScale[c];if(c>b[0])return this._infoByScale[b[0]];for(let g=1;gb[g]+1E-6)return this._infoByScale[b[g- 1]];return this._infoByScale[b[b.length-1]]}getClosestInfoForScale(c){const b=this.scales;if(this._infoByScale[c])return this._infoByScale[c];c=b.reduce((g,u)=>Math.abs(u-c)k?p-1-Math.abs((k+1)%p):k%p}denormalizeCol(k,p){return this.wrap?this.worldSize[0]*p+k:k}getWorldForColumn(k){return this.wrap?Math.floor(k/this.worldSize[0]):0}getFirstColumnForWorld(k){return k*this.worldSize[0]+this.first[0]}getLastColumnForWorld(k){return k*this.worldSize[0]+this.first[0]+this.size[0]-1}getColumnForX(k){return(k-this.origin[0])/this.norm[0]}getXForColumn(k){return this.origin[0]+k*this.norm[0]}getRowForY(k){return(this.origin[1]-k)/this.norm[1]}getYForRow(k){return this.origin[1]- k*this.norm[1]}getTileBounds(k,p,q=!1){f.set(p);var h=q?f.col:this.denormalizeCol(f.col,f.world),c=f.row;p=this.getXForColumn(h);q=this.getYForRow(c+1);h=this.getXForColumn(h+1);c=this.getYForRow(c);k[0]=p;k[1]=q;k[2]=h;k[3]=c;return k}getTileCoords(k,p,q=!1){f.set(p);p=q?f.col:this.denormalizeCol(f.col,f.world);Array.isArray(k)?l(k,this.getXForColumn(p),this.getYForRow(f.row)):(k.x=this.getXForColumn(p),k.y=this.getYForRow(f.row));return k}}return r})},"esri/views/2d/tiling/TileKey":function(){define(["../../../core/ObjectPool"], function(a){class d{static getId(l,f,r,k){return"object"===typeof l?`${l.level}/${l.row}/${l.col}/${l.world}`:`${l}/${f}/${r}/${k}`}constructor(l,f,r,k){this.set(l,f,r,k)}get key(){return this}get id(){return this.toString()}get normalizedId(){return`${this.level}/${this.row}/${this.col}`}set id(l){this.set(l)}get hash(){return(this.world&3)<<30|(this.col&4095)<<22|(this.row&4095)<<8|this.level&63}acquire(l,f,r,k){this.set(l,f,r,k)}contains(l){const f=l.level-this.level;return 0<=f&&this.row===l.row>> f&&this.col===l.col>>f&&this.world===l.world}containsChild(l){const f=l.level-this.level;return 0>f&&this.col===l.col>>f&&this.world===l.world}equals(l){return this.level===l.level&&this.row===l.row&&this.col===l.col&&this.world===l.world}clone(){return new d(this)}release(){this.world=this.col=this.row=this.level=0}set(l,f,r,k){if(null==l)this.world=this.col=this.row=this.level=0;else if("object"===typeof l)this.level=l.level||0,this.row=l.row||0,this.col=l.col||0,this.world= l.world||0;else if("string"===typeof l){const [p,q,h,c]=l.split("/");this.level=parseFloat(p);this.row=parseFloat(q);this.col=parseFloat(h);this.world=parseFloat(c)}else this.level=+l,this.row=+f,this.col=+r,this.world=+k||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return 0>=this.level?null:new d(this.level-1,this.row>>1,this.col>>1,this.world)}getNeighborId(l,f){return`${this.level}/${this.row+f}/${this.col+l}/${this.world}`}getChildKeys(){const l= this.level+1,f=this.row<<1,r=this.col<<1,k=this.world;return[new d(l,f,r,k),new d(l,f,r+1,k),new d(l,f+1,r,k),new d(l,f+1,r+1,k)]}compareRowMajor(l){return this.rowl.row?1:this.coll.col?1:0}}d.pool=new a(d,null,null,25,50);return d})},"esri/views/2d/tiling/TileCoverage":function(){define(["../../../core/ObjectPool","./TileKey"],function(a,d){class l{constructor(){this.spans=[]}acquire(f){this.lodInfo=f}release(){this.lodInfo=null;this.spans.length=0}*keys(){const f= this.lodInfo;for(const {row:r,colFrom:k,colTo:p}of this.spans)for(let q=k;q<=p;q++){const h=f.getWorldForColumn(q);yield new d(f.level,r,f.normalizeCol(q),h)}}forEach(f,r){const {spans:k,lodInfo:p}=this,{level:q}=p;if(0!==k.length)for(const {row:h,colFrom:c,colTo:b}of k)for(let g=c;g<=b;g++)f.call(r,q,h,p.normalizeCol(g),p.getWorldForColumn(g))}}l.pool=new a(l);return l})},"esri/views/2d/tiling/TileSpan":function(){define(function(){class a{constructor(d,l,f){this.row=d;this.colFrom=l;this.colTo= f}}return a})},"esri/views/2d/tiling/TileQueue":function(){define("../../../chunks/tslib.es6 ../../../core/Accessor ../../../core/maybe ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../../core/libs/gl-matrix-2/math/vec2 ../../support/QueueProcessor".split(" "),function(a,d,l,f,r,k,p,q,h,c){function b(e,t){e.length=0;t.forEach(z=>e.push(z));return e}const g=new Set,u=[],v=new Map, n=[0,0];d=class extends d{constructor(e){super(e);this._keyToItem=new Map;this.concurrency=6;this.strategy="scale-first";this.tileInfoView=null}initialize(){const {concurrency:e,process:t,strategy:z}=this;this._queue=new c.QueueProcessor({concurrency:e,process:(B,w)=>{B=this._keyToItem.get(B);return t(B,{signal:w})},peeker:"scale-first"===z?B=>this._peekByScaleFirst(B):B=>this._peekByCenterFirst(B)})}destroy(){this.clear();this._queue=l.destroyMaybe(this._queue)}get length(){return this._queue?this._queue.length: 0}get onGoingCount(){return this._keyToItem.size}abort(e){this._queue.abort("string"===typeof e?e:e.id)}clear(){this._queue.clear();this._keyToItem.clear()}has(e){return"string"===typeof e?this._keyToItem.has(e):this._keyToItem.has(e.id)}isOngoing(e){e="string"===typeof e?e:e.id;return this.has(e)&&this._queue.isOngoing(e)}pause(){this._queue.pause()}push(e){const t=e.key.id;if(this._queue.has(t))return this._queue.get(t);const z=this._queue.push(t),B=()=>{this._keyToItem.delete(t)};this._keyToItem.set(t, e);z.then(B,B);return z}reset(){this._queue.reset()}resume(){this._queue.resume()}_peekByScaleFirst(e){if(!this.state)return e.values().next().value;const t=this.tileInfoView;let z=Number.NEGATIVE_INFINITY,B=Number.POSITIVE_INFINITY;e.forEach(x=>{x=this._keyToItem.get(x);const C=this.tileInfoView.getTileScale(x.key);v.has(C)||(v.set(C,[]),z=Math.max(C,z),B=Math.min(C,B));v.get(C).push(x.key);g.add(C)});let w=this.state.scale;v.has(w)||(b(u,g),u.sort((x,C)=>x-C),w=u.reduce((x,C)=>Math.abs(C-w){const H=D.denormalizeCol(x.col,x.world),I=D.denormalizeCol(C.col,C.world);return Math.sqrt((m-H)*(m-H)+(A-x.row)*(A-x.row))-Math.sqrt((m-I)*(m-I)+(A-C.row)*(A-C.row))});g.clear();v.clear();return e[0].id}_peekByCenterFirst(e){if(!this.state)return e.values().next().value;const t=this.tileInfoView,z=this.state.center; let B=Number.POSITIVE_INFINITY,w;e.forEach(D=>{D=this._keyToItem.get(D);t.getTileCoords(n,D.key);const m=h.distance(n,z);mb.push(g));this._controllers.clear();b.forEach(g=>g.abort());this._processingItems.clear();this._cancelNext()}forEach(b){this._deferreds.forEach((g,u)=>b(u))}get(b){return(b=this._deferreds.get(b))?b.promise:void 0}isOngoing(b){return this._processingItems.has(b)}has(b){return this._deferreds.has(b)}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(b,g){const u= this.get(b);if(u)return u;const v=new AbortController;let n=null;g&&(n=f.onAbort(g,()=>v.abort()));const e=()=>{t.remove();null!=n&&n.remove();this._removeItem(b);this._queue.remove(b);this._scheduleNext()},t=f.onAbortOrThrow(v.signal,()=>{const B=this._processingItems.get(b);B&&B.controller.abort();e();z.reject(f.createAbortError())}),z=f.createResolver();this._deferreds.set(b,z);this._controllers.set(b,v);z.promise.then(e,e);this._queue.push(b);this._scheduleNext();return z.promise}last(){return this._queue.last()}lastPromise(){const b= this.last();return b?this.get(b):null}peek(){return this._queue.peek()}popLast(){const b=this._queue.popLast();b&&(this._deferreds.get(b)?.reject(f.createAbortError("Removed from queue")),this._removeItem(b));return b}reset(){const b=[];this._processingItems.forEach(g=>b.push(g));this._processingItems.clear();for(const g of b)this._queue.push(g.item),g.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const b=[]; for(;this._queue.length;)b.push(this._queue.pop());this.clear();return b}get running(){return!this._pausedSignal.value&&0{this._schedule=null;this._next()}))}_next(){for(;0this._processResult(u,n),n=>this._processError(u,n))):this._processResult(u,v)}}get test(){}}a.QueueProcessor=c;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/tiling/TileStrategy":function(){define(["../../../geometry/support/aaBoundingRect", "./TileCache","./TileCoverage","./TileKey"],function(a,d,l,f){const r=new f(0,0,0,0),k=new Map,p=[],q=[];class h{constructor(c){this._previousScale=Number.POSITIVE_INFINITY;this.cachePolicy="keep";this.coveragePolicy="closest";this.resampling=!0;this.tileIndex=new Map;this.tiles=[];this.buffer=192;this.acquireTile=c.acquireTile;this.releaseTile=c.releaseTile;this.tileInfoView=c.tileInfoView;null!=c.resampling&&(this.resampling=c.resampling);c.cachePolicy&&(this.cachePolicy=c.cachePolicy);c.coveragePolicy&& (this.coveragePolicy=c.coveragePolicy);null!=c.buffer&&(this.buffer=c.buffer);c.cacheSize&&(this._tileCache=new d(c.cacheSize,this.tileInfoView,b=>{this.releaseTile(b)}))}destroy(){this.tileIndex.clear()}update(c){const {resampling:b,tileIndex:g}=this,{scale:u,center:v,resolution:n}=c.state,{minScale:e,maxScale:t}=this.tileInfoView,z=!c.stationary&&u>this._previousScale;this._previousScale=u;if(!b&&(u>e||uC.visible=!0);var m=0,A=0;if(0D,!A||!z&&m?!x&&A||p.push(H):H.isReady?x&&"purge"===this.cachePolicy&&this._hasReadyAncestor(r,D)?p.push(H):q.push(H):x&&p.push(H));for(const C of q)C.isReady&&k.set(C.key.id,C);for(const C of p)this._tileCache?this._tileCache.add(C):this.releaseTile(C),g.delete(C.key.id);for(const C of k.values())this.tiles.push(C); for(const C of g.values())k.has(C.key.id)||(C.visible=!1);this._tileCache?.prune(D,v,n);l.pool.release(c);q.length=0;p.length=0;k.clear()}else this.tiles.length=0,this.clear()}clear(){const {tileIndex:c}=this;for(const b of c.values())this.releaseTile(b);c.clear()}refresh(c){for(const b of this.tileIndex.values())this.tiles.includes(b)?c(b):p.push(b);for(const b of p)this.releaseTile(b),this.tileIndex.delete(b.key.id);this._tileCache?.clear()}updateCacheSize(c){this._tileCache&&(this._tileCache.maxSize= c)}_addParentTile(c,b){let g=null;for(;;){c=this.tileInfoView.getTileParentId(c);if(!c)break;if(this.tileIndex.has(c)){if(g=this.tileIndex.get(c),g?.isReady){b.has(g.key.id)||b.set(g.key.id,g);break}}else if(this._tileCache?.has(c)&&(g=this._tileCache.pop(c),this.tileIndex.set(c,g),g?.isReady)){b.has(g.key.id)||b.set(g.key.id,g);break}}}_hasReadyAncestor(c,b){const g=a.create();this.tileInfoView.getTileBounds(g,c,!0);for(const u of this.tileIndex.values())if(u.isReady&&u.key.level>=b&&u.key.level< c.level){const v=a.create();this.tileInfoView.getTileBounds(v,u.key,!0);if(a.contains(v,g))return!0}return!1}}return h})},"esri/views/2d/tiling/TileCache":function(){define(["../../../core/libs/gl-matrix-2/math/vec2"],function(a){class d{constructor(l,f,r){this.maxSize=l;this._tileInfoView=f;this._removedFunc=r;this._tilePerId=new Map;this._tileKeysPerLevel=[]}clear(){this._tilePerId.clear();this._tileKeysPerLevel=[]}has(l){return this._tilePerId.has(l)}get(l){return this._tilePerId.get(l)}pop(l){const f= this._tilePerId.get(l);if(f){var r=this._tileKeysPerLevel[f.key.level];this._tilePerId["delete"](l);for(let k=0;kthis.maxSize&& 0<=p;)p!==l&&(k=this._pruneAroundCenterTile(k,f,r,p)),p--;k>this.maxSize&&(k=this._pruneAroundCenterTile(k,f,r,l))}}_pruneAroundCenterTile(l,f,r,k){k=this._tileKeysPerLevel[k];if(!k||0===k.length)return l;const {size:p,origin:q}=this._tileInfoView.tileInfo,h=r*p[0],c=r*p[1],b=[0,0],g=[0,0];for(k.sort((u,v)=>{b[0]=q.x+h*(u.col+.5);b[1]=q.y-c*(u.row+.5);g[0]=q.x+h*(v.col+.5);g[1]=q.y-c*(v.row+.5);return a.squaredDistance(b,f)-a.squaredDistance(g,f)});0this.constraints?.version,A=>{this.constraints&&A&&this.ready&&(this.state.viewpoint=this.constraints.fit(this.state.paddedViewState.viewpoint))},h.sync)])}get center(){if(!this.ready)return this._get("center");const {center:m,spatialReference:A}=this.state.paddedViewState;this.state.commitProperty("id"); return new e({x:m[0],y:m[1],spatialReference:A})}set center(m){if(null!=m)if(this.ready){try{var A=this._project(m,this.state.spatialReference)}catch(x){q.getLogger(this).error(new k("mapview:invalid-center","could not project the value in the view's spatial reference",{input:m,error:x}));return}m=this.viewpoint;w.centerAt(m,m,A);this.viewpoint=m}else this._set("center",m)}get extent(){if(!this.ready)return this._get("extent");this.state.commitProperty("id");return this.state.paddedViewState.extent.clone()}set extent(m){if(null!= m)if(m.width&&m.height)if(this.ready){try{var A=this._project(m,this.state.spatialReference)}catch(x){q.getLogger(this).error(new k("mapview:invalid-extent","could not project the value in the view's spatial reference",{error:x}));return}m=this.viewpoint;w.setExtent(m,m,A,this.state.size,{constraints:this.constraints});this.viewpoint=m}else this._set("extent",m),this._set("center",void 0),this._set("viewpoint",void 0),this._set("scale",void 0),this._set("zoom",void 0);else q.getLogger(this).error(new k("mapview:invalid-extent", "invalid extent size"))}get padding(){return this.ready?this.state.padding:this._get("padding")}set padding(m){this.ready?(this.state.padding=m,this._set("padding",this.state.padding)):this._set("padding",m)}get resolution(){if(!this.ready)return 0;this.state.commitProperty("id");return this.state.resolution}get rotation(){if(!this.ready)return this._get("rotation");this.state.commitProperty("id");return this.state.rotation}set rotation(m){if(!isNaN(m))if(this.ready){var A=this.viewpoint;w.rotateTo(A, A,m);this.viewpoint=A}else this._set("rotation",m)}get scale(){if(!this.ready)return this._get("scale");this.state.commitProperty("id");return this.state.scale}set scale(m){if(m&&!isNaN(m))if(this.ready){var A=this.viewpoint;w.scaleTo(A,A,m);this.viewpoint=A}else if(this._set("scale",m),this._set("zoom",void 0),m=this._get("extent"))this._set("extent",void 0),this._set("center",m.center)}get viewpoint(){return this.ready?this.state.paddedViewState.viewpoint.clone():this._get("viewpoint")}set viewpoint(m){if(null!= m)if(this.ready){var A;try{var x=this._project(m,this.state.spatialReference);!m.scale||isNaN(m.scale)?A=new k("mapview:invalid-viewpoint",`invalid scale value of ${m.scale}`):null==m.targetGeometry&&(A=new k("mapview:invalid-viewpoint","geometry not defined"))}catch(C){A=new k("mapview:invalid-viewpoint","could not project the value in the view's spatial reference",{error:C})}A?q.getLogger(this).error(A):(this._scaleBeforeChangingSpatialReference=null,m=new f({targetGeometry:new e,scale:0,rotation:0}), w.copy(m,x),this.constraints?.constrain(m,this.state.paddedViewState.viewpoint),this.state.viewpoint=m,this._set("viewpoint",m))}else this._set("viewpoint",m),this._set("extent",void 0),this._set("center",void 0),this._set("zoom",void 0),this._set("scale",void 0)}get zoom(){return this.ready?this.constraints?.scaleToZoom(this.scale)??-1:this._get("zoom")}set zoom(m){if(0<=m)if(this.ready)if(m=this.constraints?.zoomToScale(m)??0){var A=this.viewpoint;w.scaleTo(A,A,m);this.viewpoint=A;this._set("zoom", this.constraints?.scaleToZoom(this.scale)??-1)}else this._set("zoom",-1);else if(this._set("zoom",m),this._set("scale",void 0),m=this._get("extent"))this._set("extent",void 0),this._set("center",m.center)}getUserStartupOptions(m){if(!m[0]&&!m[1])return{center:void 0,rotation:void 0,scale:void 0};const {padding:A,constraints:x}=this;var C=this._get("center"),H=this._get("extent");const I=this._get("scale");var O=this._get("rotation");const W=this._get("viewpoint");var X=this._get("zoom");X=null!=X&& null!=x?x.zoomToScale(X)||void 0:void 0;let S=void 0,Z=void 0,da=void 0;const y=W?.targetGeometry;"extent"===y?.type?S=y:"point"===y?.type&&(Z=y,da=W?.scale);H=H??S;C=C??Z??H?.center;O=O??W?.rotation;m=(I??X??da??(H&&w.extentToScale(H,[m[0]-A.left-A.right,m[1]-A.top-A.bottom])))||void 0;return{center:C,rotation:O,scale:m}}startup(m,A,x,C){const H=m.targetGeometry;try{this._project(m,x)}catch(I){q.getLogger(this).warn(new b("mapview:startup-projection-error","projection of initial viewpoint to the view's spatial reference, defaulting to the initial viewpoint.", {center:H.toJSON(),spatialReference:x,error:I})),m.targetGeometry=C||new e({x:0,y:0,spatialReference:x})}this.constraints?.fit(m);this._set("state",new B({padding:this.padding,size:A,viewpoint:m}));this._set("ready",!0)}teardown(){this._set("ready",!1);const {center:[m,A],spatialReference:x,rotation:C,scale:H}=this.state.paddedViewState,I=new e({x:m,y:A,spatialReference:x});this._set("viewpoint",null);this._set("extent",null);this._set("center",I);this._set("zoom",-1);this._set("rotation",C);this._set("scale", H);this._set("state",null)}changeSpatialReference(m){const A=this.state.paddedViewState.clone();if(null==this._scaleBeforeChangingSpatialReference)this._scaleBeforeChangingSpatialReference=A.scale;else{var x=A.viewpoint.clone();x.scale=this._scaleBeforeChangingSpatialReference;A.viewpoint=x}x=A.clone();const [C,H]=A.center;var I=null;try{I=this._project(new e({x:C,y:H,spatialReference:A.spatialReference}),m)}catch(O){n.isLoaded()||q.getLogger(this).warn(new b("mapview:spatial-reference-change","could not project the view's center to the new spatial reference", {center:I?.toJSON(),spatialReference:m,error:O}))}I||=new e({x:0,y:0,spatialReference:m});I=w.centerAt(new f({targetGeometry:new e,scale:0,rotation:0}),A.viewpoint,I);x.viewpoint=I;try{const O=[A.size[0]/2,A.size[1]/2],W=[O[0]+20,O[1]],X=A.toMap([0,0],W),{x:S,y:Z}=this._project(new e({x:X[0],y:X[1],spatialReference:A.spatialReference}),m);X[0]=S;X[1]=Z;x.toScreen(X,X);const da=w.angleBetween(O,X,W),y=Math.hypot(X[0]-O[0],X[1]-O[1])/20;!Number.isFinite(y)||4p("mapview-srswitch-adjust-rotation-scale-threshold")?I.rotation=0:I.rotation+=Number.isFinite(da)?da:0)}catch{}this._get("constraints")?.constrain(I,void 0);this._get("state").viewpoint=I}resize(m,A){if(this.ready){var x=this.state,C=this.state.paddedViewState.viewpoint,H=this.state.paddedViewState.size.concat();x.size=[m,A];w.resize(C,C,H,this.state.paddedViewState.size,this.resizeAlign);C=this.constraints?.constrain(C,void 0)??C;this.state.viewpoint= C}}toMap(m){if(!this.ready)return null;const [A,x]=this.state.toMap([0,0],[m.x,m.y]);return new e({x:A,y:x,spatialReference:this.state.spatialReference})}toScreen(m,A){if(!this.ready)return null;m=this._project(m,this.state.spatialReference);m=[m.x,m.y];!1!==A?.pickClosestTarget&&this.state.paddedViewState.wrapMapCoordinate(m,m);this.state.toScreen(m,m);return c.createScreenPoint(m[0],m[1])}_project(m,A){const x=m?.targetGeometry||m;if(!A)return m;if(!x)return null;if(A.imageCoordinateSystem||x.spatialReference?.imageCoordinateSystem|| z.equals(A,x.spatialReference))return m;const C=t.project(x,A);if(!C)throw new k("mapview:projection-not-possible","projecting input geometry to target spatial reference returned a null value",{geometry:x,spatialReference:A});return"esri.Viewpoint"===m?.declaredClass?(m.targetGeometry=C,m):C}};d.__decorate([g.property({type:e})],a.ViewStateManager.prototype,"center",null);d.__decorate([g.property()],a.ViewStateManager.prototype,"constraints",void 0);d.__decorate([g.property({type:D})],a.ViewStateManager.prototype, "extent",null);d.__decorate([g.property({value:{top:0,right:0,bottom:0,left:0},cast:m=>({top:0,right:0,bottom:0,left:0,...m})})],a.ViewStateManager.prototype,"padding",null);d.__decorate([g.property()],a.ViewStateManager.prototype,"ready",void 0);d.__decorate([g.property()],a.ViewStateManager.prototype,"resizeAlign",void 0);d.__decorate([g.property({readOnly:!0})],a.ViewStateManager.prototype,"resolution",null);d.__decorate([g.property({type:Number})],a.ViewStateManager.prototype,"rotation",null); d.__decorate([g.property({type:Number})],a.ViewStateManager.prototype,"scale",null);d.__decorate([g.property({readOnly:!0})],a.ViewStateManager.prototype,"state",void 0);d.__decorate([g.property({type:f})],a.ViewStateManager.prototype,"viewpoint",null);d.__decorate([g.property()],a.ViewStateManager.prototype,"zoom",null);a.ViewStateManager=d.__decorate([v.subclass("esri.views.2d.ViewStateManager")],a.ViewStateManager);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/input/MapViewInputManager":function(){define("../../../chunks/tslib.es6 ../../../core/Accessor ../../../core/has ../../../core/maybe ../../../core/reactiveUtils ../../../core/accessorSupport/decorators/property ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ./handlers/DoubleClickZoom ./handlers/DoubleTapDragZoom ./handlers/DragPan ./handlers/DragRotate ./handlers/GamepadNavigation ./handlers/KeyPan ./handlers/KeyRotate ./handlers/KeyZoom ./handlers/MouseWheelZoom ./handlers/PinchAction ../../input/BrowserEventSource ../../input/InputManager ../../input/handlers/PreventContextMenu ../../input/recognizers/DoubleTapDrag ../../input/recognizers/Drag ../../input/recognizers/ImmediateDoubleClick ../../input/recognizers/PointerClickHoldAndDrag ../../input/recognizers/SingleAndDoubleClick".split(" "), function(a,d,l,f,r,k,p,q,h,c,b,g,u,v,n,e,t,z,B,w,D,m,A,x,C,H,I){var O={left:"ArrowLeft",right:"ArrowRight",up:"ArrowUp",down:"ArrowDown"},W={zoomIn:["\x3d","+"],zoomOut:["-","_"]},X={clockwiseOption1:"a",clockwiseOption2:"A",counterClockwiseOption1:"d",counterClockwiseOption2:"D",resetOption1:"n",resetOption2:"N"};d=class extends d{initialize(){const S=()=>this.view?.ready;this.addHandles([r.when(()=>!S(),()=>this._disconnect()),r.when(S,()=>this._connect())])}destroy(){this._disconnect()}get latestPointerType(){return this._inputManager?.latestPointerType}get latestPointerLocation(){return this._inputManager?.latestPointerLocation}get multiTouchActive(){return this._inputManager?.multiTouchActive?? !1}isModifierKeyDown(S){return this._inputManager?.isModifierKeyDown(S)??!1}_disconnect(){this.view.viewEvents.disconnect();this._inputManager=f.destroyMaybe(this._inputManager)}_connect(){const S=new w.BrowserEventSource(this.view.surface,this.view.input);var Z=[new C.ImmediateDoubleClick,new H.PointerClickHoldAndDrag,new I.SingleAndDoubleClick,new x.Drag(this.view.navigation),new A.DoubleTapDrag];Z=new D.InputManager({eventSource:S,recognizers:Z});Z.installHandlers("prevent-context-menu",[new m.PreventContextMenu], D.ViewEventPriorities.INTERNAL);Z.installHandlers("navigation",[new B.PinchRotateAndZoom(this.view),new v.GamepadNavigation(this.view),new z.MouseWheelZoom(this.view),new c.DoubleClickZoom(this.view),new c.DoubleClickZoom(this.view,["Control"]),new g.DragPan(this.view,"primary"),new n.KeyPan(this.view,O),new t.KeyZoom(this.view,W),new e.KeyRotate(this.view,X),new u.DragRotate(this.view,"secondary"),new b.DoubleTapDragZoom(this.view,"touch")],D.ViewEventPriorities.INTERNAL);this.view.viewEvents.connect(Z); this._source=S;this._inputManager=Z;r.watch(()=>this.view?.navigation?.browserTouchPanEnabled,da=>{this._source&&(this._source.browserTouchPanningEnabled=!da)},r.initial)}get test(){}};a.__decorate([k.property()],d.prototype,"view",void 0);a.__decorate([k.property()],d.prototype,"latestPointerType",null);a.__decorate([k.property()],d.prototype,"latestPointerLocation",null);a.__decorate([k.property()],d.prototype,"multiTouchActive",null);return d=a.__decorate([h.subclass("esri.views.2d.input.MapViewInputManager")], d)})},"esri/views/2d/input/handlers/DoubleClickZoom":function(){define(["exports","../../../input/InputHandler","../../../input/handlers/support"],function(a,d,l){class f extends d.InputHandler{constructor(r,k){super(!0);this._view=r;this.registerIncoming("double-click",k,p=>this._handleDoubleClick(p,k))}_handleDoubleClick(r,k){l.eventMatchesPointerAction(r.data,"primary")&&(r.stopPropagation(),k?this._view.mapViewNavigation.zoomOut([r.data.x,r.data.y]):this._view.mapViewNavigation.zoomIn([r.data.x, r.data.y]))}}a.DoubleClickZoom=f;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/input/handlers/support":function(){define(["exports"],function(a){a.eventMatchesMousePointerAction=function(d,l){if("touch"===d.pointerType)return!1;switch(l){case "primary":return 0===d.button;case "secondary":return 2===d.button;case "tertiary":return 1===d.button}};a.eventMatchesPointerAction=function(d,l){switch(l){case "primary":return"touch"===d.pointerType||0===d.button;case "secondary":return"touch"!== d.pointerType&&2===d.button;case "tertiary":return"touch"!==d.pointerType&&1===d.button}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/input/handlers/DoubleTapDragZoom":function(){define(["exports","../../../../core/has","../../../input/InputHandler"],function(a,d,l){class f extends l.InputHandler{constructor(r,k,p){super(!0);this.view=r;this.pointerType=k;this.registerIncoming("double-tap-drag",p,q=>this._handleDoubleTapDrag(q))}_handleDoubleTapDrag(r){var {data:k}= r;const {pointerType:p}=k;if(p===this.pointerType){r.stopPropagation();var {action:q,delta:h}=k;({view:r}=this);var {mapViewNavigation:c}=r;switch(q){case "begin":({scale:r}=r);this._currentScale=this._startScale=r;this._previousDelta=h;c.begin();break;case "update":if(this._previousDelta.y===h.y)break;this._previousDelta=h;r=this._startScale*1.015**h.y;c.setViewpointImmediate(r/this._currentScale);this._currentScale=r;break;case "end":({constraints:k}=r);const {effectiveLODs:b,snapToZoom:g}=k;g&& b?(r=k.snapScale(this._currentScale),r=(0{c.end()})):c.end()}}}}a.DoubleTapDragZoom=f;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/input/handlers/DragPan":function(){define(["exports","../../../input/DragEventSeparator","../../../input/InputHandler","../../../input/handlers/support"],function(a,d,l,f){class r extends l.InputHandler{constructor(k, p,q){super(!0);this.view=k;this.pointerAction=p;this.registerIncoming("drag",q,h=>this._handleDrag(h));this.registerIncoming("pointer-down",()=>this.stopMomentumNavigation())}onInstall(k){super.onInstall(k);this._dragEventSeparator=new d.DragEventSeparator({start:(p,q)=>{this.view.mapViewNavigation.pan.begin(this.view,q.data);q.stopPropagation()},update:(p,q)=>{this.view.mapViewNavigation.pan.update(this.view,q.data);q.stopPropagation()},end:(p,q)=>{this.view.mapViewNavigation.pan.end(this.view,q.data); q.stopPropagation()},condition:(p,q)=>1===p&&f.eventMatchesPointerAction(q.data,this.pointerAction)})}_handleDrag(k){const p=this.view.mapViewNavigation;p.pinch.zoomMomentum||p.pinch.rotateMomentum?this.stopMomentumNavigation():this._dragEventSeparator.handle(k)}stopMomentumNavigation(){this.view.mapViewNavigation.pan.stopMomentumNavigation()}}a.DragPan=r;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/input/DragEventSeparator":function(){define(["exports"],function(a){class d{constructor(l){this._callbacks= l;this._currentCount=0;this._callbacks.condition||(this._callbacks.condition=()=>!0)}handle(l){const f=l.data,r=f.pointers.size;switch(f.action){case "start":this._currentCount=r;this._emitStart(l);break;case "added":this._emitEnd(this._previousEvent);this._currentCount=r;this._emitStart(l);break;case "update":this._emitUpdate(l);break;case "removed":this._startEvent&&this._emitEnd(this._previousEvent);this._currentCount=r;this._emitStart(l);break;case "end":this._emitEnd(l),this._currentCount=0}this._previousEvent= l}_emitStart(l){this._startEvent=l;this._callbacks.condition?.(this._currentCount,l)&&this._callbacks.start(this._currentCount,l,this._startEvent)}_emitUpdate(l){this._callbacks.condition?.(this._currentCount,l)&&this._callbacks.update(this._currentCount,l,this._startEvent)}_emitEnd(l){this._callbacks.condition?.(this._currentCount,l)&&this._callbacks.end(this._currentCount,l,this._startEvent);this._startEvent=null}}a.DragEventSeparator=d;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})}, "esri/views/2d/input/handlers/DragRotate":function(){define(["exports","../../../input/DragEventSeparator","../../../input/InputHandler","../../../input/handlers/support"],function(a,d,l,f){class r extends l.InputHandler{constructor(k,p,q){super(!0);this._view=k;this.pointerAction=p;const h=this._view.mapViewNavigation;this._dragEventSeparator=new d.DragEventSeparator({start:(c,b)=>{h.rotate.begin(this._view,b.data);b.stopPropagation()},update:(c,b)=>{h.rotate.update(this._view,b.data);b.stopPropagation()}, end:(c,b)=>{h.rotate.end();b.stopPropagation()},condition:(c,b)=>1===c&&f.eventMatchesPointerAction(b.data,this.pointerAction)});this.registerIncoming("drag",q,c=>this._dragEventSeparator.handle(c))}}a.DragRotate=r;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/input/handlers/GamepadNavigation":function(){define("exports ../../../../core/Handles ../../../../core/reactiveUtils ../../../../core/scheduling ../../viewpointUtils ../../../input/InputHandler ../../../navigation/gamepadAndKeyboardUtils".split(" "), function(a,d,l,f,r,k,p){class q extends k.InputHandler{constructor(h){super(!0);this._view=h;this._frameTask=null;this._watchHandles=new d;this._currentDevice=null;this._transformation={translation:[0,0,0],heading:0,tilt:0,zoom:0};this._handle=this.registerIncoming("gamepad",c=>this._handleGamePadEvent(c));this._handle.pause()}onInstall(h){super.onInstall(h);this._watchHandles.add([l.watch(()=>this._view.navigation.gamepad?.enabled,c=>{c?(this._handle.resume(),this._frameTask||(this._frameTask=f.addFrameTask({update:b=> this._frameUpdate(b.deltaTime)}))):(this._handle.pause(),this._frameTask&&(this._frameTask.remove(),this._frameTask=null))},l.initial)])}onUninstall(){this._watchHandles.removeAll();this._frameTask&&(this._frameTask.remove(),this._frameTask=null);super.onUninstall()}_handleGamePadEvent(h){const c=this._view.navigation.gamepad.device;c&&h.data.device!==c||this._currentDevice&&this._currentDevice!==h.data.device||("end"===h.data.action?(this._currentDevice=null,p.resetTransformation(this._transformation)): (this._currentDevice=h.data.device,p.extractTransformation(h.data,this._view.navigation.gamepad,this._transformation)))}_frameUpdate(h){const c=this._transformation;if(!p.isZeroTransformation(c)){var b=this._view.viewpoint.clone(),g=.7*this._view.navigation.gamepad.velocityFactor*h;r.translateBy(b,b,[c.translation[0]*g,-c.translation[1]*g]);g=this._view.size;r.scaleAndRotateBy(b,b,1+6E-4*c.translation[2]*h,this._view.constraints.rotationEnabled?.06*-c.heading*h:0,[g[0]/2,g[1]],g);h=this._view.constraints.constrain(b, this._view.viewpoint);this._view.viewpoint=h}}}a.GamepadNavigation=q;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/navigation/gamepadAndKeyboardUtils":function(){define(["exports","../../chunks/vec32"],function(a,d){function l(f){let r=f*f;0>f&&(r*=-1);return r}a.extractTransformation=function(f,r,k){const p=f.state;f=f.device;r="forward-down"===r.tiltDirection?1:-1;"standard"===f.deviceType?(k.translation[0]=l(p.axes[0]),k.translation[1]=l(p.axes[1]),k.translation[2]= l(p.buttons[7])-l(p.buttons[6]),k.heading=l(p.axes[2]),k.tilt=l(p.axes[3])):"spacemouse"===f.deviceType&&(k.translation[0]=1.2*l(p.axes[0]),k.translation[1]=1.2*l(p.axes[1]),k.translation[2]=2*-l(p.axes[2]),k.heading=1.2*l(p.axes[5]),k.tilt=1.2*l(p.axes[3]));k.tilt*=r;d.scale(k.translation,k.translation,1);return k};a.extractTransformationKeyboard=function(f,r){r.translation[0]=f[1]-f[0];r.translation[1]=f[3]-f[2];r.translation[2]=f[4]-f[5];r.heading=f[7]-f[6];r.tilt=f[8]-f[9];r.zoom=f[10]-f[11]; return r};a.isZeroTransformation=function(f){return 0===f.translation[0]&&0===f.translation[1]&&0===f.translation[2]&&0===f.heading&&0===f.tilt&&0===f.zoom};a.resetTransformation=function(f){f.translation[0]=0;f.translation[1]=0;f.translation[2]=0;f.heading=0;f.tilt=0;return f};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/input/handlers/KeyPan":function(){define(["exports","../../../input/InputHandler","../../../input/VisibilityChange"],function(a,d,l){class f extends d.InputHandler{constructor(r, k,p){super(!0);this.view=r;this.keys=k;this._isSticky=!1;this._pressedKeys=new Set;this._currentDirection=this._timeout=void 0;this._stickyKeyDuration=200;this._handleKey=q=>{var h=this._keyMap[q.data.key];q.modifiers.has("Meta")||q.modifiers.has("Control")?this._stopMovement():null!=h&&(q.stopPropagation(),q.preventDefault(),q="key-down"===q.type,this._pressedKeys[q?"add":"delete"](h),q?this._direction!==h&&(this._direction=h,this._isSticky=!1,this._setTimeout(()=>{this._isSticky&&this._handlePopKey()})): (h=0{this._direction=Array.from(this._pressedKeys).pop();null==this._direction&&this._stopMovement()};this._stopMovement=()=>{this._isSticky=!1;this._direction=void 0;this._pressedKeys.clear();this._setTimeout(void 0)};this._keyMap={[k.left]:"left",[k.right]:"right",[k.up]:"up",[k.down]:"down"};this.registerIncoming("key-down",p,this._handleKey);this.registerIncoming("key-up",p,this._handleKey); this.registerIncoming("blur",p,this._stopMovement);this._visibilityHandle=l.onVisibilityChange(q=>q?null:this._stopMovement())}onUninstall(){this._stopMovement();this._visibilityHandle?.remove()}get _direction(){return this._currentDirection}set _direction(r){const k=null!=this._currentDirection;if(null!=r){if(k||this.view.mapViewNavigation.begin(),this._currentDirection!==r)switch(r){case "left":this.view.mapViewNavigation.continuousPanLeft();break;case "right":this.view.mapViewNavigation.continuousPanRight(); break;case "up":this.view.mapViewNavigation.continuousPanUp();break;case "down":this.view.mapViewNavigation.continuousPanDown()}}else k&&this.view.mapViewNavigation.stop();this._currentDirection=r}_setTimeout(r){clearTimeout(this._timeout);this._timeout=void 0===r?void 0:setTimeout(()=>{this._timeout=void 0;r()},this._stickyKeyDuration)}}a.KeyPan=f;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/input/VisibilityChange":function(){define(["exports","../../core/handleUtils"], function(a,d){a.onVisibilityChange=function(l){const f=()=>l("visible"===document.visibilityState);document.addEventListener("visibilitychange",f);return d.makeHandle(()=>document.removeEventListener("visibilitychange",f))};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/input/handlers/KeyRotate":function(){define(["exports","../../../input/InputHandler","../../../input/VisibilityChange"],function(a,d,l){class f extends d.InputHandler{constructor(r,k,p){super(!0);this.view= r;this.keys=k;this._pressed=!1;this._keyToDirection={[k.clockwiseOption1]:"clockwise",[k.clockwiseOption2]:"clockwise",[k.counterClockwiseOption1]:"counterClockwise",[k.counterClockwiseOption2]:"counterClockwise",[k.resetOption1]:"reset",[k.resetOption2]:"reset"};this.registerIncoming("key-down",p,q=>this._handleKeyDown(q));this.registerIncoming("key-up",p,q=>this._handleKeyUp(q));this.registerIncoming("blur",p,()=>this._handleStop());this._visibilityHandle=l.onVisibilityChange(q=>q?null:this._handleStop())}onUninstall(){this._visibilityHandle?.remove(); this._handleStop()}_handleKeyDown(r){r.data.repeat||this._handleKey(r,!0)}_handleKeyUp(r){this._handleKey(r,!1)}_handleStop(){this._pressed&&(this._pressed=!1,this.view.mapViewNavigation.stop())}_handleKey(r,k){var p=r.modifiers;if(!(0this._handleKeyDown(h));p.zoomIn.forEach(h=>this._keysToZoomAction[h]=f.IN);p.zoomOut.forEach(h=>this._keysToZoomAction[h]=f.OUT)}_handleKeyDown(k){this._handleKey(k)}_handleKey(k){var p=k.modifiers;if(!(0q.end());k.stopPropagation()}}}a.KeyZoom=r;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/input/handlers/MouseWheelZoom":function(){define(["exports","../../../input/InputHandler"],function(a,d){class l extends d.InputHandler{constructor(f,r){super(!0);this._view=f;this._canZoom=!0;this.registerIncoming("mouse-wheel",r,k=>this._handleMouseWheel(k))}_handleMouseWheel(f){if(this._view.navigation.mouseWheelZoomEnabled&& (f.preventDefault(),f.stopPropagation(),this._canZoom)){var r=this._view.mapViewNavigation,{x:k,y:p,deltaY:q}=f.data;if(f=r.zoom(1/.6**(1/60*q),[k,p]))this._canZoom=!1,f.catch(()=>{}).then(()=>{this._canZoom=!0;r.end()})}}}a.MouseWheelZoom=l;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/input/handlers/PinchAction":function(){define(["exports","../../../input/DragEventSeparator","../../../input/InputHandler"],function(a,d,l){class f extends l.InputHandler{constructor(r){super(!0); this.view=r;this.registerIncoming("drag",p=>this._handleDrag(p));this.registerIncoming("pointer-down",()=>this._stopMomentumNavigation());const k=this.view.mapViewNavigation;this._dragEventSeparator=new d.DragEventSeparator({start:(p,q)=>{k.pinch.begin(this.view,q.data);q.stopPropagation()},update:(p,q)=>{k.pinch.update(this.view,q.data);q.stopPropagation()},end:(p,q)=>{k.pinch.end(this.view);q.stopPropagation()},condition:p=>2<=p})}_handleDrag(r){this._dragEventSeparator.handle(r)}_stopMomentumNavigation(){this.view.mapViewNavigation.pinch.stopMomentumNavigation()}} a.PinchRotateAndZoom=f;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/input/BrowserEventSource":function(){define(["exports","../../core/has","../../core/maybe","./gamepad/GamepadSource","../support/screenUtils"],function(a,d,l,f,r){const k=d("edge"),p=d("chrome"),q=d("ff"),h=d("safari");class c{constructor(g,u){this._input=u;this._active={};this._callback=()=>{};this._activePointerCaptures=new Set;this._keyDownState=new Set;this._eventId=1;this._browserTouchPanningEnabled= !1;this._element=g;g.getAttribute("tabindex")||g.setAttribute("tabindex","0");this._eventHandlers={"key-down":this._handleKey,"key-up":this._handleKey,"pointer-down":this._handlePointer,"pointer-move":this._handlePointerPreventDefault,"pointer-up":this._handlePointerPreventDefault,"pointer-enter":this._handlePointer,"pointer-leave":this._handlePointer,"pointer-cancel":this._handlePointer,"mouse-wheel":this._handleMouseWheel,"pointer-capture-lost":this._handlePointerCaptureLost};this._updateTouchAction(); this._element.addEventListener("keydown",this._preventAltKeyDefault);this._gamepadSource=new f.GamepadSource(g,this._input);this._gamepadSource.onEvent=v=>this._callback("gamepad",v)}destroy(){this._callback=()=>{};this.activeEvents=null;this._activePointerCaptures.forEach(g=>{this._releasePointerCaptureSafe(g)});this._gamepadSource=l.destroyMaybe(this._gamepadSource);this._activePointerCaptures=null;this._removeTouchAction();this._element.removeEventListener("keydown",this._preventAltKeyDefault)}get browserTouchPanningEnabled(){return this._browserTouchPanningEnabled}set browserTouchPanningEnabled(g){this._browserTouchPanningEnabled= g;this._updateTouchAction();this._updateTouchEventHandling()}set onEventReceived(g){this._callback=g}set activeEvents(g){for(const u in this._active)g&&g.has(u)||(this._element.removeEventListener(b[u],this._active[u]),delete this._active[u]);g&&g.forEach(u=>{if(!this._active[u]&&b[u]){const v=(this._eventHandlers[u]||this._handleDefault).bind(this,u);this._element.addEventListener(b[u],v);this._active[u]=v}});this._gamepadSource.hasEventListeners=g?.has("gamepad")??!1}setPointerCapture(g,u){u?this._setPointerCatpureSafe(g.pointerId): (this._releasePointerCaptureSafe(g.pointerId),this._activePointerCaptures.delete(g.pointerId))}_updateTouchAction(){this._element.classList.remove(this._browserTouchPanningEnabled?"esri-view-surface--touch-none":"esri-view-surface--touch-pan");this._element.classList.add(this._browserTouchPanningEnabled?"esri-view-surface--touch-pan":"esri-view-surface--touch-none")}_updateTouchEventHandling(){this._browserTouchPanningEnabled?this._element.addEventListener("touchmove",this._preventMultiTouchPanning): this._element.removeEventListener("touchmove",this._preventMultiTouchPanning)}_removeTouchAction(){this._element.classList.remove("esri-view-surface--touch-none");this._element.classList.remove("esri-view-surface--touch-pan");this._element.removeEventListener("touchmove",this._preventMultiTouchPanning)}_setPointerCatpureSafe(g){try{this._element.setPointerCapture(g),this._activePointerCaptures.add(g)}catch{}}_releasePointerCaptureSafe(g){try{this._element.hasPointerCapture&&!this._element.hasPointerCapture(g)|| this._element.releasePointerCapture(g)}catch(u){}}_updateNormalizedPointerLikeEvent(g,u){g=r.createScreenPointFromNativeEvent(this._element,g);c.test.disableSubpixelCoordinates&&(g.x=Math.round(g.x),g.y=Math.round(g.y));u.x=g.x;u.y=g.y;return u}_handleKey(g,u){const {key:v}=u;v&&"key-up"===g&&this._keyDownState.delete(v);u={native:u,key:v,repeat:!!v&&this._keyDownState.has(v)};v&&"key-down"===g&&this._keyDownState.add(u.key);this._callback(g,u)}_handlePointer(g,u){u=this._updateNormalizedPointerLikeEvent(u, {native:u,x:0,y:0,pointerType:u.pointerType,button:u.button,buttons:u.buttons,eventId:this._eventId++});this._callback(g,u)}_handlePointerPreventDefault(g,u){const v=this._updateNormalizedPointerLikeEvent(u,{native:u,x:0,y:0,pointerType:u.pointerType,button:u.button,buttons:u.buttons,eventId:this._eventId++});u.preventDefault();this._callback(g,v)}_handleMouseWheel(g,u){let v=u.deltaY;switch(u.deltaMode){case 0:k&&(v=v/document.documentElement.clientHeight*600);break;case 1:v*=30;break;case 2:v*= 900}k?v*=.7:p||h?v*=.6:q&&(v*=1.375);const n=Math.abs(v);100{this._connectGamepad(h.gamepad)}; this._onDisconnectGamepad=h=>{h=h.gamepad;const c=h.index,b=this._inputDevices[c];b&&(this._emitGamepadEvent(h,f.extractState(b),!1),this._inputDevices.splice(c,1),this._latestUpdate.splice(c,1),this._input.gamepad.devices.remove(b),this.ensurePollingState())};this._frameTask=null;this._latestUpdate=[];this._inputDevices=[];this._callback=null;p=window.isSecureContext;if(this.supported="getGamepads"in window.navigator&&p)r(h=>this._connectGamepad(h)),window.addEventListener("gamepadconnected",this._onConnectGamepad), window.addEventListener("gamepaddisconnected",this._onDisconnectGamepad),this.ensurePollingState()}destroy(){this.hasEventListeners=!1;this.supported&&(window.removeEventListener("gamepadconnected",this._onConnectGamepad),window.removeEventListener("gamepaddisconnected",this._onDisconnectGamepad))}set hasEventListeners(p){this._hasEventListeners!==p&&(this._hasEventListeners=p,this.ensurePollingState())}get _eventsEnabled(){return this.supported&&0this._readGamepadState()}))}_stopPolling(){null!=this._frameTask&&(this._frameTask.remove(),this._frameTask=null,this._latestUpdate=[])}_readGamepadState(){const p=document.hasFocus(), q=this._element.contains(document.activeElement),h="document"===this._input.gamepad.enabledFocusMode&&!p||"view"===this._input.gamepad.enabledFocusMode&&!q;r(c=>{var b=this._inputDevices[c.index];if(b){var g=this._latestUpdate[c.index];b=f.extractState(b);var u=h||f.stateIdle(b);g&&(g.timestamp===c.timestamp||!g.active&&u||f.stateEqual(g.state,b))||this._emitGamepadEvent(c,b,!u)}})}_emitGamepadEvent(p,q,h){var c=this._latestUpdate[p.index];if((c=c&&c.active)||h)this._latestUpdate[p.index]={timestamp:p.timestamp, state:q,active:h},this._callback&&this._callback({device:this._inputDevices[p.index],state:q,action:!c&&h?"start":c&&h?"update":"end"})}}a.GamepadSource=k;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/input/gamepad/GamepadState":function(){define(["exports"],function(a){a.extractState=function(d){const l=d.native;return l?{buttons:l.buttons.map(f=>f.pressed?f.value||1:0),axes:l.axes.map(f=>{{var r=d.axisThreshold;const k=Math.abs(f);f=k{f.data.native.preventDefault()})}}a.PreventContextMenu=l;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/input/recognizers/DoubleTapDrag":function(){define("exports ../../../core/clock ../../../core/MapUtils ../../../core/maybe ../../../core/screenUtils ../DragEventSeparator ../InputHandler ./support".split(" "),function(a,d,l,f,r,k,p,q){function h(b, g,u){const {button:v,buttons:n,pointer:e,pointers:t,pointerType:z,timestamp:B}=u;return{action:b,delta:g,button:v,buttons:n,pointer:e,pointers:t,pointerType:z,timestamp:B}}class c extends p.InputHandler{constructor(b=q.DefaultParameters.maximumDoubleClickDelay,g=q.DefaultParameters.maximumDoubleClickDistance,u=q.DefaultParameters.maximumDoubleTouchDelay,v=q.DefaultParameters.maximumDoubleTouchDistance,n=d.clock){super(!1);this._maximumDoubleClickDelay=b;this._maximumDoubleClickDistance=g;this._maximumDoubleTouchDelay= u;this._maximumDoubleTouchDistance=v;this._clock=n;this._doubleTapDragActive=this._doubleTapDragReady=!1;this._dragStartCenter=r.createScreenPoint(0,0);this._pointerState=new Map;this._doubleTapDrag=this.registerOutgoing("double-tap-drag");this._dragEventSeparator=new k.DragEventSeparator({start:(e,t)=>this._dragStart(e,t),update:(e,t)=>this._dragUpdate(t),end:(e,t)=>this._dragEnd(t)});this.registerIncoming("drag",e=>this._dragEventSeparator.handle(e));this.registerIncoming("pointer-down",e=>this._handlePointerDown(e)); this.registerIncoming("pointer-up",()=>this._handlePointerUp())}onUninstall(){this._pointerState.forEach(b=>{b.doubleTapTimeout=f.removeMaybe(b.doubleTapTimeout)})}get hasPendingInputs(){return l.someMap(this._pointerState,b=>null!=b.doubleTapTimeout)}_clearPointerDown(b){const g=this._pointerState.get(b);g&&(g.doubleTapTimeout=f.removeMaybe(g.doubleTapTimeout),this._pointerState.delete(b),this.refreshHasPendingInputs())}_dragStart(b,g){if(this._doubleTapDragReady&&1===b){this._doubleTapDragReady= !1;this._doubleTapDragActive=!0;var {data:u,modifiers:v}=g;({center:b}=u);this._dragStartCenter=b;b=h("begin",r.createScreenPoint(0,0),u);this._doubleTapDrag.emit(b,void 0,v);g.stopPropagation()}}_dragUpdate(b){if(this._doubleTapDragActive){var {data:g,modifiers:u}=b,{center:v}=g;v=r.createScreenPoint(v.x-this._dragStartCenter.x,v.y-this._dragStartCenter.y);v=h("update",v,g);this._doubleTapDrag.emit(v,void 0,u);b.stopPropagation()}}_dragEnd(b){if(this._doubleTapDragActive){var {data:g,modifiers:u}= b,{center:v}=g;v=r.createScreenPoint(v.x-this._dragStartCenter.x,v.y-this._dragStartCenter.y);v=h("end",v,g);this._doubleTapDrag.emit(v,void 0,u);this._doubleTapDragActive=!1;b.stopPropagation()}}_handlePointerDown(b){const {data:g}=b,u=q.getPointerId(g),v=this._pointerState.get(u);var {pointerType:n}=g.native;v?(n="touch"===n?this._maximumDoubleTouchDistance:this._maximumDoubleClickDistance,this._clearPointerDown(u),q.manhattanDistance(v.event.data,g)>n?this._storePointerDown(b):this._doubleTapDragReady= !0):this._storePointerDown(b)}_handlePointerUp(){this._doubleTapDragReady=!1}_storePointerDown(b){var {data:g}=b;const {pointerType:u}=g.native,v=q.getPointerId(g);g=this._clock.setTimeout(()=>this._clearPointerDown(v),"touch"===u?this._maximumDoubleTouchDelay:this._maximumDoubleClickDelay);this._pointerState.set(v,{event:b,doubleTapTimeout:g});this.refreshHasPendingInputs()}}a.DoubleTapDrag=c;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/input/recognizers/support":function(){define(["exports", "../../../core/screenUtils"],function(a,d){a.DefaultParameters={maximumClickDelay:300,movementUntilMouseDrag:1.5,movementUntilPenDrag:6,movementUntilTouchDrag:6,holdDelay:500,maximumDoubleClickDelay:250,maximumDoubleClickDistance:10,maximumDoubleTouchDelay:350,maximumDoubleTouchDistance:35};a.euclideanDistance=function(l,f){const r=f.x-l.x;l=f.y-l.y;return Math.sqrt(r*r+l*l)};a.fitCircleLSQ=function(l,f){f?(f.radius=0,f.center.x=0,f.center.y=0):f={radius:0,center:d.createScreenPoint()};if(0===l.length)return f; if(1===l.length)return f.center.x=l[0].x,f.center.y=l[0].y,f;if(2===l.length){const [e,t]=l,[z,B]=[t.x-e.x,t.y-e.y];f.radius=Math.sqrt(z*z+B*B)/2;f.center.x=(e.x+t.x)/2;f.center.y=(e.y+t.y)/2;return f}let r=0,k=0;for(f=0;fe.x-r),q=l.map(e=>e.y-k);let h=f=0;var c=0,b=0,g=0,u=0,v=0;for(var n=0;n{g.push(d.createScreenPoint(u.event.x,u.event.y))});return r.fitCircleLSQ(g)}function p(b){const g=k(b);let u=0;b.forEach(v=>{var n=h(v,g);for(n-=v.lastAngle;n>Math.PI;)n-=2*Math.PI;for(;n<-Math.PI;)n+=2*Math.PI;n=v.lastAngle+n;v.lastAngle=n;u+=n-v.initialAngle});u/=b.size||1;return{angle:u,radius:g.radius,center:g.center}}function q(b){const g=new Map;b.forEach((u,v)=>g.set(v,u.event));return g}function h(b, g){b=b.event;return Math.atan2(b.y-g.center.y,b.x-g.center.x)}class c extends f.InputHandler{constructor(b){super(!1);this._navigationTouch=b;this._startStateModifiers=new Set;this._activePointerMap=new Map;this._isCurrentDragSuppressed=this._isDragging=!1;this._drag=this.registerOutgoing("drag");this.registerIncoming("pointer-drag",this._handlePointerDrag.bind(this));this.registerIncoming("pointer-up",this._handlePointerUpAndPointerLost.bind(this));this.registerIncoming("pointer-capture-lost",this._handlePointerUpAndPointerLost.bind(this)); this.registerIncoming("pointer-cancel",this._handlePointerUpAndPointerLost.bind(this))}_createPayload(b,g,u,v){return{action:b,pointerType:this._pointerType,button:this._mouseButton,buttons:g.buttons,timestamp:v,pointers:q(this._activePointerMap),pointer:g,angle:u.angle,radius:u.radius,center:u.center}}_addPointer(b){var g=b.native.pointerId;const u=p(this._activePointerMap).angle;b={event:b,initialAngle:0,lastAngle:0};this._activePointerMap.set(g,b);g=h(b,k(this._activePointerMap));b.initialAngle= g;b.lastAngle=g;this._updatePointerAngles(u)}_updatePointer(b){if(!b||null!=b.x||null!=b.y){var g=this._activePointerMap.get(b.native.pointerId);g?g.event=b:this._addPointer(b)}}_removePointer(b){const g=p(this._activePointerMap).angle;this._activePointerMap.delete(b);this._updatePointerAngles(g)}_updatePointerAngles(b){const g=p(this._activePointerMap);this._activePointerMap.forEach(u=>{u.initialAngle=h(u,g)-b;u.lastAngle=h(u,g)-b})}_emitEvent(b,g,u){const v=p(this._activePointerMap);this._drag.emit(this._createPayload(b, g,v,u),void 0,this._startStateModifiers)}_handlePointerUpAndPointerLost(b){const g=b.data.native.pointerId,u=l.Milliseconds(b.timestamp);this._activePointerMap.get(g)&&(1===this._activePointerMap.size?(this._updatePointer(b.data),!this._isCurrentDragSuppressed&&this._emitEvent("end",b.data,u),this._isCurrentDragSuppressed=this._isDragging=!1,this._removePointer(g)):(this._removePointer(g),this._emitEvent("removed",b.data,l.Milliseconds(b.timestamp))))}_handlePointerDrag(b){const g=b.data,u=g.currentEvent, v=l.Milliseconds(b.timestamp);switch(g.action){case "start":case "update":this._isDragging?this._activePointerMap.has(u.native.pointerId)?(this._updatePointer(u),!this._isCurrentDragSuppressed&&this._emitEvent("update",u,v)):(this._addPointer(u),this._emitEvent("added",u,v),this._isCurrentDragSuppressed=this._isSuppressed):(this._updatePointer(u),this._pointerType=b.data.startEvent.pointerType,this._mouseButton=b.data.startEvent.button,this._startStateModifiers=b.modifiers,this._isDragging=!0,this._isCurrentDragSuppressed= this._isSuppressed,!this._isCurrentDragSuppressed&&this._emitEvent("start",u,v))}}get _isSuppressed(){return!!this._navigationTouch&&!this._navigationTouch.browserTouchPanEnabled&&"touch"===this._pointerType&&1===this._activePointerMap.size}}a.Button=void 0;(function(b){b[b.Left=0]="Left";b[b.Middle=1]="Middle";b[b.Right=2]="Right";b[b.Back=3]="Back";b[b.Forward=4]="Forward";b[b.Undefined=-1]="Undefined"})(a.Button||(a.Button={}));a.Drag=c;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})}, "esri/views/input/recognizers/ImmediateDoubleClick":function(){define(["exports","../../../core/clock","../InputHandler","./support"],function(a,d,l,f){class r extends l.InputHandler{constructor(k=f.DefaultParameters.maximumDoubleClickDelay,p=f.DefaultParameters.maximumDoubleClickDistance,q=f.DefaultParameters.maximumDoubleTouchDelay,h=f.DefaultParameters.maximumDoubleTouchDistance,c=d.clock){super(!1);this._maximumDoubleClickDelay=k;this._maximumDoubleClickDistance=p;this._maximumDoubleTouchDelay= q;this._maximumDoubleTouchDistance=h;this._clock=c;this._pointerState=new Map;this._immediateDoubleClick=this.registerOutgoing("immediate-double-click");this.registerIncoming("pointer-down",this._handlePointerDown.bind(this));this.registerIncoming("pointer-up",this._handlePointerUp.bind(this))}onUninstall(){this._pointerState.forEach(k=>{k.immediateDoubleClick&&k.immediateDoubleClick.timeoutHandle.remove()});super.onUninstall()}_handlePointerDown(k){k=k.data;const p=f.getPointerId(k);this._pointerState.has(p)|| (this._pointerState.set(p,{downButton:k.native.button,x:k.x,y:k.y,immediateDoubleClick:null}),this.startCapturingPointer(k.native))}_handlePointerUp(k){const p=k.data;var q=f.getPointerId(p);if((q=this._pointerState.get(q))&&q.downButton===p.native.button){const h=q.immediateDoubleClick,c="touch"===k.data.native.pointerType?this._maximumDoubleTouchDistance:this._maximumDoubleClickDistance;h?(h.timeoutHandle.remove(),f.manhattanDistance(h,k.data)>c?this._startImmediateDoubleClick(k,q):(this._immediateDoubleClick.emit(k.data, void 0,h.modifiers),this._removeState(p))):f.manhattanDistance(q,k.data)>c?this._removeState(p):this._startImmediateDoubleClick(k,q)}}_startImmediateDoubleClick(k,p){p.immediateDoubleClick={x:k.data.x,y:k.data.y,modifiers:k.modifiers,timeoutHandle:this._clock.setTimeout(()=>this._removeState(k.data),"touch"===k.data.native.pointerType?this._maximumDoubleTouchDelay:this._maximumDoubleClickDelay)}}_removeState(k){const p=f.getPointerId(k);this._pointerState.delete(p);this.stopCapturingPointer(k.native); this.refreshHasPendingInputs()}}a.ImmediateDoubleClick=r;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/input/recognizers/PointerClickHoldAndDrag":function(){define(["exports","../../../core/clock","../../../core/maybe","../InputHandler","./support"],function(a,d,l,f,r){function k(q,h,c){return{action:q,startEvent:h.startEvent,previousEvent:h.previousEvent,currentEvent:c}}class p extends f.InputHandler{constructor(q=r.DefaultParameters.maximumClickDelay,h=r.DefaultParameters.movementUntilMouseDrag, c=r.DefaultParameters.movementUntilPenDrag,b=r.DefaultParameters.movementUntilTouchDrag,g=r.DefaultParameters.holdDelay,u=d.clock){super(!1);this._maximumClickDelay=q;this._movementUntilMouseDrag=h;this._movementUntilPenDrag=c;this._movementUntilTouchDrag=b;this._holdDelay=g;this._clock=u;this._pointerState=new Map;this._pointerDrag=this.registerOutgoing("pointer-drag");this._immediateClick=this.registerOutgoing("immediate-click");this._pointerHold=this.registerOutgoing("hold");this.registerIncoming("pointer-down", this._handlePointerDown.bind(this));this.registerIncoming("pointer-up",v=>{this._handlePointerLoss(v,"pointer-up")});this.registerIncoming("pointer-capture-lost",v=>{this._handlePointerLoss(v,"pointer-capture-lost")});this.registerIncoming("pointer-cancel",v=>{this._handlePointerLoss(v,"pointer-cancel")});this._moveHandle=this.registerIncoming("pointer-move",this._handlePointerMove.bind(this));this._moveHandle.pause()}onUninstall(){this._pointerState.forEach(q=>{q.holdTimeout=l.removeMaybe(q.holdTimeout)}); super.onUninstall()}_handlePointerDown(q){const h=q.data,c=h.native.pointerId;var b=null;0===this._pointerState.size&&(b=this._clock.setTimeout(()=>{const g=this._pointerState.get(c);g&&(g.isDragging||(this._pointerHold.emit(g.previousEvent,void 0,q.modifiers),g.holdEmitted=!0),g.holdTimeout=null)},this._holdDelay));b={startEvent:h,previousEvent:h,startTimestamp:q.timestamp,isDragging:!1,downButton:h.native.button,holdTimeout:b,modifiers:new Set};this._pointerState.set(c,b);this.startCapturingPointer(h.native); this._moveHandle.resume();1g&&this._startDragging(q)}c.previousEvent=h}}_getDragThreshold(q){switch(q){case "touch":return this._movementUntilTouchDrag;case "pen":return this._movementUntilPenDrag; default:return this._movementUntilMouseDrag}}_startDragging(q){const h=q.data,c=h.native.pointerId;this._pointerState.forEach(b=>{null!=b.holdTimeout&&(b.holdTimeout.remove(),b.holdTimeout=null);b.isDragging||(b.modifiers=q.modifiers,b.isDragging=!0,c===b.startEvent.native.pointerId?this._pointerDrag.emit(k("start",b,h)):this._pointerDrag.emit(k("start",b,b.previousEvent),q.timestamp))})}_handlePointerLoss(q,h){const c=q.data,b=c.native.pointerId,g=this._pointerState.get(b);g&&(null!=g.holdTimeout&& (g.holdTimeout.remove(),g.holdTimeout=null),g.isDragging?this._pointerDrag.emit(k("end",g,"pointer-up"===h?c:g.previousEvent),void 0,g.modifiers):"pointer-up"===h&&g.downButton===c.native.button&&q.timestamp-g.startTimestamp<=this._maximumClickDelay&&!g.holdEmitted&&this._immediateClick.emit(c),this._pointerState.delete(b),this.stopCapturingPointer(c.native),0===this._pointerState.size&&this._moveHandle.pause())}}a.PointerClickHoldAndDrag=p;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})}, "esri/views/input/recognizers/SingleAndDoubleClick":function(){define("exports ../../../core/clock ../../../core/MapUtils ../../../core/maybe ../InputHandler ./support".split(" "),function(a,d,l,f,r,k){class p extends r.InputHandler{constructor(q=k.DefaultParameters.maximumDoubleClickDelay,h=k.DefaultParameters.maximumDoubleClickDistance,c=k.DefaultParameters.maximumDoubleTouchDelay,b=k.DefaultParameters.maximumDoubleTouchDistance,g=d.clock){super(!1);this._maximumDoubleClickDelay=q;this._maximumDoubleClickDistance= h;this._maximumDoubleTouchDelay=c;this._maximumDoubleTouchDistance=b;this._clock=g;this._pointerState=new Map;this._click=this.registerOutgoing("click");this._doubleClick=this.registerOutgoing("double-click");this.registerIncoming("immediate-click",this._handleImmediateClick.bind(this));this.registerIncoming("pointer-down",this._handlePointerDown.bind(this))}onUninstall(){this._pointerState.forEach(q=>q.doubleClickTimer=f.removeMaybe(q.doubleClickTimer))}get hasPendingInputs(){return l.someMap(this._pointerState, q=>null!=q.doubleClickTimer)}_clearDoubleClickTimer(q,h){const c=this._pointerState.get(q);c&&(c.doubleClickTimer=f.removeMaybe(c.doubleClickTimer),h&&this._click.emit(c.event.data,void 0,c.event.modifiers),this._pointerState.delete(q),this.refreshHasPendingInputs())}_doubleClickTimeoutExceeded(q){const h=this._pointerState.get(q);1===h.pointerDownCount&&this._click.emit(h.event.data,void 0,h.event.modifiers);h.doubleClickTimer=null;this._pointerState.delete(q);this.refreshHasPendingInputs()}_handleImmediateClick(q){const h= q.data;var {pointerType:c}=h.native;const {pointerId:b,pointerType:g,button:u}=h.native;var v="mouse"===g?`${b}:${u}`:`${g}`;if(this._pointerState.has(v)){var n=this._pointerState.get(v),{data:e,modifiers:t}=n.event;c="touch"===c?this._maximumDoubleTouchDistance:this._maximumDoubleClickDistance;k.manhattanDistance(e,h)>c?(this._clearDoubleClickTimer(v,!0),this._startClick(q)):(this._clearDoubleClickTimer(v,!1),2===n.pointerDownCount&&this._doubleClick.emit(e,void 0,t))}else this._startClick(q)}_handlePointerDown(q){q= k.getPointerId(q.data);if(q=this._pointerState.get(q))q.pointerDownCount+=1}_startClick(q){var {data:h}=q;const {native:{pointerType:c}}=h,b=k.getPointerId(h);h=this._clock.setTimeout(()=>this._doubleClickTimeoutExceeded(b),"touch"===c?this._maximumDoubleTouchDelay:this._maximumDoubleClickDelay);this._pointerState.set(b,{event:q,doubleClickTimer:h,pointerDownCount:1});this.refreshHasPendingInputs()}}a.SingleAndDoubleClick=p;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/support/TileStore":function(){define("../../../../../core/Evented ../../../../../core/has ../../../../../chunks/rbush ../../../../../geometry/support/aaBoundingRect ../../../../../geometry/support/spatialReferenceUtils ./Tile ../../../tiling/TileCoverage ../../../tiling/TileKey".split(" "), function(a,d,l,f,r,k,p,q){const h={added:[],removed:[]},c=new Set,b=new q(0,0,0,0);class g extends a{constructor(u){super();this._tiles=new Map;this._index=l.rbush(9,d("esri-csp-restrictions")?v=>({minX:v.bounds[0],minY:v.bounds[1],maxX:v.bounds[2],maxY:v.bounds[3]}):[".bounds[0]",".bounds[1]",".bounds[2]",".bounds[3]"]);this.tiles=[];this.tileScheme=u}destroy(){this.clear()}clear(){this.tiles.length=0;this._tiles.clear();this._index.clear()}has(u){return this._tiles.has(u)}get(u){return this._tiles.get(u)}getIntersectingTiles(u){if(!u|| 0===f.width(u)||0===f.height(u))return[];var v;if(v=r.getInfo(this.tileScheme.spatialReference)){var [n,e]=v.valid;v=u[2]>e?[f.create([u[0],u[1],e,u[3]]),f.create([n,u[1],n+u[2]-e,u[3]])]:u[0]this.tiles.push(n));(v.added.length||v.removed.length)&&this.emit("update",v)}setViewState(u){if(u=this.tileScheme.getTileCoverage(u,0)){var {spans:v,lodInfo:n}=u,{level:e}=n;if(0=n.minX&&e.maxY>=n.minY}function u(n){return{children:n,height:1,leaf:!0,minX:Infinity,minY:Infinity,maxX:-Infinity,maxY:-Infinity}}function v(n,e,t,z,B){for(var w=[e,t],D;w.length;)t=w.pop(),e=w.pop(),t-e<=z||(D=e+Math.ceil((t-e)/z/2)*z,d.quickselect(n,D,e,t,B),w.push(e,D,D,t))}l.prototype={all:function(){return this._all(this.data,[])},search:function(n){var e=this.data,t=[],z=this.toBBox;if(!g(n,e))return t;for(var B=[],w,D,m,A;e;){w=0;for(D=e.children.length;w this._maxEntries)this._split(z,e),e--;else break;this._adjustParentBBoxes(t,z,e)},_split:function(n,e){var t=n[e],z=t.children.length,B=this._minEntries;this._chooseSplitAxis(t,B,z);z=this._chooseSplitIndex(t,B,z);z=u(t.children.splice(z,t.children.length-z));z.height=t.height;z.leaf=t.leaf;f(t,this.toBBox);f(z,this.toBBox);e?n[e-1].children.push(z):this._splitRoot(t,z)},_splitRoot:function(n,e){this.data=u([n,e]);this.data.height=n.height+1;this.data.leaf=!1;f(this.data,this.toBBox)},_chooseSplitIndex:function(n, e,t){var z,B;var w=B=Infinity;for(z=e;z<=t-e;z++){var D=r(n,0,z,this.toBBox);var m=r(n,z,t,this.toBBox);var A=Math.max(0,Math.min(D.maxX,m.maxX)-Math.max(D.minX,m.minX))*Math.max(0,Math.min(D.maxY,m.maxY)-Math.max(D.minY,m.minY));D=h(D)+h(m);if(A=e;m--)A=n.children[m],k(w,n.leaf?z(A):A),D+=c(w);return D},_adjustParentBBoxes:function(n,e,t){for(;0<=t;t--)k(e[t],n)},_condense:function(n){for(var e=n.length-1,t;0<=e;e--)0===n[e].children.length?0c;){if(600v-u/2?-1:1);r(q,h,Math.max(c,Math.floor(h-v*e/u+n)),Math.min(b,Math.floor(h+(u-v)*e/u+n)),g)}u=q[h];v=c;e=b;k(q,c,h);for(0g(q[v],u);)v++;for(;0h?1:0}return function(q,h,c,b,g){r(q,h,c||0,b||q.length-1,g||p)}})})(l);d=d.getDefaultExportFromCjs(l.exports); a.quickselect=d})},"esri/views/2d/layers/features/support/Tile":function(){define("exports ../../../../../core/ArrayPool ../../../../../geometry/Extent ../../../../../geometry/support/aaBoundingRect ../../../../../rest/support/QuantizationParameters ../../../tiling/TileKey".split(" "),function(a,d,l,f,r,k){class p{constructor(q,h){this.key=new k(0,0,0,0);this.bounds=f.create();this.objectIds=new Set;this.key.set(h);h=q.getLODInfoAt(this.key);this.tileInfoView=q;this.tileInfoView.getTileBounds(this.bounds, this.key,!0);this.resolution=h.resolution;this.level=h.level;this.scale=h.scale;this.minScale=q.zoomToScale(h.level-1);this.maxScale=q.zoomToScale(h.level+1)}get lod(){return this.tileInfoView.getLODInfoAt(this.key)}get id(){return this.key.id}get extent(){return l.fromBounds(this.bounds,this.tileInfoView.tileInfo.spatialReference)}get transform(){return{originPosition:"upperLeft",scale:[this.resolution,this.resolution],translate:[this.bounds[0],this.bounds[3]]}}createArcadeEvaluationOptions(q){return{$view:{scale:this.scale, timeZone:q}}}createChildTiles(){const q=this.key.getChildKeys(),h=d.acquire();for(let c=0;c{if(t instanceof d){if(t.layer===b)e?.();else{var z=b.allLayerViews.find(B=>B.layer===t.layer);z&&n?.(z)}v(h(t))}else"layer"in t&&"element"in t||("subtype-sublayer"===t.type?(z=b.allLayerViews.find(B=>B.layer===t.parent))&&u(t,z):(z=b.allLayerViews.find(B=>B.layer===t))&&g(z))}}function q(b,g){if(b)if(f.isIterable(b))for(const u of b)if(f.isIterable(u))for(const v of u)g(v);else g(u);else g(b)}function h(b){const g=b.getObjectId();return g?`${b.layer?.uid?? b.sourceLayer?.uid??"MapView"}/${g}`:`"MapView/${b.uid}`}function c({layer:b},g){"subtype-group"===b?.type&&b.sublayers.forEach(u=>{g(u)})}a.hitTest=async function(b,g,u){const v=k.isSupportedScreenPointEvent(g)?k.createScreenPointFromSupportedEvent(b,g):g;if(!b.ready||isNaN(v.x)||isNaN(v.y))return{screenPoint:v,results:[]};let n=new Set;const e=new Set;let t=!1,z=null,B=null;u?.include?q(u.include,p(b,D=>{n.add(D);c(D,m=>e.add(m))},(D,m)=>{e.add(D);n.add(m)},D=>{z||=new Set;z.add(D)},D=>n.add(D), ()=>t=!0)):(t=!0,n=new Set(b.allLayerViews),n.forEach(D=>{c(D,m=>e.add(m))}));u?.exclude&&q(u.exclude,p(b,D=>{n.delete(D);c(D,m=>e.delete(m))},D=>e.delete(D),D=>{B||=new Set;B.add(D)}));const w=b.toMap(v);u=b.allLayerViews.filter(D=>!D.suspended&&n.has(D)&&D.clips.every(m=>r.clipContainsPoint(b,m,v,w))).reverse();g=t?b.graphicsView.hitTest(w).map(D=>({type:"graphic",graphic:D,layer:null,mapPoint:w})):[];u=await Promise.all(u.map(D=>D.hitTest(w,v)).toArray());g=[...g,...u].filter(l.isSome).flat().filter(l.isSome); g=g.filter(D=>"graphic"===D.type&&"subtype-group"===D.layer?.type?e.has(D.graphic.layer):!0);z&&(g=g.filter(D=>!("graphic"in D)||!D.graphic||z?.has(h(D.graphic))));B&&(g=g.filter(D=>!("graphic"in D)||!D.graphic||!B?.has(h(D.graphic))));return{screenPoint:v,results:g}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/support/clippingUtils":function(){define(["exports","../../../geometry/support/contains"],function(a,d){function l(f,r,k){const p="string"===typeof f.left? parseFloat(f.left)/100*r:f.left,q="string"===typeof f.right?parseFloat(f.right)/100*r:f.right,h="string"===typeof f.top?parseFloat(f.top)/100*k:f.top;f="string"===typeof f.bottom?parseFloat(f.bottom)/100*k:f.bottom;return{xmin:p,xmax:Math.max(r-q,p),ymin:h,ymax:Math.max(k-f,h)}}a.clipContainsPoint=function(f,r,k,p){switch(r.type){case "rect":const {width:q,height:h}=f,{xmin:c,xmax:b,ymin:g,ymax:u}=l(r,q,h),{x:v,y:n}=k;return v>c&&vg&&n{const b=q.find(g=>g.layer.id===c.id);b?.container&&h.push(b.container)});return h}}function r(p,q,h,c){p.ignorePadding&&(c={left:0,right:0,top:0,bottom:0});var b=null;null!=p.width&&null!=p.height?b=[p.width,p.height]:null==p.width&&null!=p.height?b=[p.height,p.height]:null!=p.width&&null==p.height?b=[p.width,p.width]:null==p.width&& null==p.height&&(b=null);var g=h[0]-(c.left+c.right);h=h[1]-(c.top+c.bottom);p=p.area||{x:0,y:0,width:g,height:h};if(b){const u=b[0]/b[1];u>g/h?(g=p.width/u,p={x:p.x,y:Math.round(p.y+(p.height-g)/2),width:p.width,height:Math.round(g)}):(g=p.height*u,p={x:Math.round(p.x+(p.width-g)/2),y:p.y,width:Math.round(g),height:p.height})}else b=[p.width,p.height];b[0]>p.width?(q=Math.min(b[0]/p.width,q),b=b[0]/p.width/q):(q=1,b=b[0]/p.width);return{cropArea:{x:Math.round((p.x+c.left)*q),y:Math.round((p.y+c.top)* q),width:Math.round(p.width*q),height:Math.round(p.height*q)},outputScale:b,resolutionScale:q}}const k={flipY:!0,premultipliedAlpha:!0};a.createScreenshotRegion=r;a.takeRawScreenshot=async function(p,q){p=await l(p,q);return d.encodeData(p,k)};a.takeScreenshot=async function(p,q){p=await l(p,q);const {format:h,quality:c}=d.getFormatAndQuality(q?.format,q?.quality);return d.encode(p,{format:h,quality:c,rotation:0,disableDecorations:!1},k)};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})}, "esri/views/support/screenshotUtils":function(){define(["exports","../../core/has","../../core/mathUtils","../../core/imageUtils"],function(a,d,l,f){function r(e,t){const {format:z,quality:B,rotation:w,disableDecorations:D}=e||{};var m=c(e,t.padding);var A=t.width-m.left-m.right;t=t.height-m.top-m.bottom;m={x:0,y:0,width:A,height:t};if(e?.area){null!=e.area.x&&(m.x=Math.floor(e.area.x));null!=e.area.y&&(m.y=Math.floor(e.area.y));var x=null!=e.area.width?Math.floor(e.area.width):null,C=null!=e.area.height? Math.floor(e.area.height):null;m.width=A-m.x;m.height=t-m.y;null!=x&&null!=C?(m.width=Math.min(m.width,x),m.height=Math.min(m.height,C)):null==x&&null!=C?(x=Math.min(m.width,x),m.height*=x/m.width,m.width=x):null!=x&&null==C&&(x=Math.min(m.height,C),m.width*=x/m.height,m.height=x)}m=h(m,e);x=Math.floor(Math.max(m.x,0));C=Math.floor(Math.max(m.y,0));A={x,y:C,width:Math.floor(Math.min(m.width,A-x)),height:Math.floor(Math.min(m.height,t-C))};t=A.width/A.height;m=m.width/m.height;m!==t&&(m>t?(t=Math.floor(A.width/ m),A={x:A.x,y:Math.floor(A.y+(A.height-t)/2),width:A.width,height:t}):(t=Math.floor(A.height*m),A={x:Math.floor(A.x+(A.width-t)/2),y:A.y,width:t,height:A.height}));const {width:H,height:I}=q(e,A);t=b(z);m=v[t];m=l.clamp(null!=B?B:m,0,100);return{format:t,quality:m,area:A,width:H,height:I,rotation:w,disableDecorations:!!D,ignoreBackground:!!e?.ignoreBackground,ignorePadding:!!e?.ignorePadding}}function k(e,t){null==g&&(g=document.createElement("canvas"));var z=g;if(t.premultipliedAlpha){var B=e.data; const D=B.length;for(let m=0;mx[fa+3]&&(S=S*x[fa+3]/255);V+=S*x[fa];E+=S*x[fa+1];J+=S*x[fa+2];F+=S}}I[y]=V/F;I[y+1]=E/F;I[y+2]=J/F;I[y+3]=L/M}return t};a.screenshotSuperSampleSettings= function(e,t,z){if(!t)return e;const {framebufferWidth:B,framebufferHeight:w,pixelRatio:D,region:m}=e;t=c(e,z);z=t.left+t.right;const A=t.top+t.bottom,x=B-z,C=w-A,H=Math.min(8,Math.min((2048-z)/x,(2048-A)/C));return 1.5>H?e:{...e,framebufferWidth:Math.round(x*H)+z,framebufferHeight:Math.round(C*H)+A,pixelRatio:D*H,resample:{region:{x:Math.round((m.x-t.left)*H)+t.left,y:Math.round((m.y-t.top)*H)+t.top,width:Math.round(m.width*H),height:Math.round(m.height*H)},width:B,height:w}}};a.toDataUrl=p;a.toRenderSettings= function(e,t){const z=r(e,t),B=z.area,w=z.width/B.width,D=c(z,t.padding),m=D.left+D.right,A=D.top+D.bottom;return{framebufferWidth:Math.floor((t.width-m)*w+m),framebufferHeight:Math.floor((t.height-A)*w+A),region:{x:Math.floor(B.x*w)+D.left,y:Math.floor(B.y*w)+D.top,width:z.width,height:z.height},format:z.format,quality:z.quality,rotation:z.rotation,pixelRatio:w,layers:e?.layers??[],disableDecorations:z.disableDecorations,ignoreBackground:z.ignoreBackground,ignorePadding:z.ignorePadding,objectAndLayerIdColor:!1}}; Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/core/imageUtils":function(){define("require exports ../request ./Error ./promiseUtils ./urlUtils ../support/base64Utils".split(" "),function(a,d,l,f,r,k,p){function q(u,v,n){n||(b||(b=document.createElement("canvas"),b.width=1,b.height=1),n=b);return n.getContext("2d").createImageData(u,v)}async function h(u,v){u=window.URL.createObjectURL(u);try{const {data:n}=await l(u,{...v,responseType:"image"});return n}catch(n){if(!r.isAbortError(n))throw new f("invalid-image", `Could not fetch requested image at ${u}`);throw n;}finally{window.URL.revokeObjectURL(u)}}async function c(u,v){const n=k.dataComponents(u);if(n?.isBase64)return{arrayBuffer:p.base64ToArrayBuffer(n.data),mediaType:n.mediaType};v=await l(u,{responseType:"array-buffer",...v});u=v.data;v=v.getHeader?.("Content-Type")??"";return{arrayBuffer:u,mediaType:v}}let b=null,g=!0;d.createEmptyImageData=function(u,v,n){if(!u||!v)throw Error("Cannot construct image data without dimensions");if(g)try{return new ImageData(u, v)}catch(e){g=!1}return q(u,v,n)};d.getImageData=async function(u,v){const {arrayBuffer:n,mediaType:e}=await c(u,v);u="image/png"===e;if("image/gif"===e){const {isAnimatedGIF:t,parseGif:z}=await new Promise((B,w)=>a(["./image/gif"],B,w));if(t(n))return z(n,v)}if(u){const {isAnimatedPNG:t,parseApng:z}=await new Promise((B,w)=>a(["./image/apng"],B,w));if(t(n))return z(n,v)}u=new Blob([n],{type:e});return h(u,v)};d.wrapImageData=function(u,v,n,e){if(!v||!n)throw Error("Cannot construct image data without dimensions"); if(g)try{return new ImageData(u,v,n)}catch(t){g=!1}v=q(v,n,e);v.data.set(u,0);return v};Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/support/StationaryManager":function(){define("exports ../../../chunks/tslib.es6 ../../../core/Accessor ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass".split(" "),function(a,d,l,f,r,k,p,q){a.StationaryManager=class extends l{constructor(){super(...arguments); this._timer=void 0}get stationary(){return!this._timer}flip(){this._timestamp=performance.now();null==this._timer&&(this._timer=setInterval(()=>{160<=performance.now()-this._timestamp&&this.clear()},160))}clear(){this._timer&&(clearInterval(this._timer),this._timer=void 0)}};d.__decorate([f.property()],a.StationaryManager.prototype,"_timer",void 0);d.__decorate([f.property()],a.StationaryManager.prototype,"stationary",null);a.StationaryManager=d.__decorate([q.subclass("esri.views.2d.support.StationaryManager")], a.StationaryManager);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/support/Timeline":function(){define(["exports"],function(a){class d{constructor(){this._names=new Map}begin(l){this._names.has(l)||(this._names.set(l,!1),l.includes("Brush")&&this.record("Esri.FirstDraw"),performance.mark(`Esri.${l}.Start`))}end(l){this._names.has(l)&&!this._names.get(l)&&(this._names.set(l,!0),performance.mark(`Esri.${l}.End`))}record(l){this._names.has(l)||(this._names.set(l,!0), performance.mark(`Esri.${l}`))}}a.Timeline=d;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/support/WebGLRequirements":function(){define(["exports","../../core/Error","../webgl/capabilities"],function(a,d,l){a.check=function(f){const r=l.getWebGLCapabilities();return r.available?"3d"===f&&r.majorPerformanceCaveat?new d("webgl:major-performance-caveat-detected","Your WebGL implementation doesn't seem to support hardware accelerated rendering. Check your browser settings or if your GPU is in a blocklist."): r.supportsHighPrecisionFragment?r.supportsVertexShaderSamplers?null:new d("webgl:vertex-shader-samplers-required","WebGL support for vertex shader samplers is required but not supported."):new d("webgl:high-precision-fragment-required","WebGL support for high precision fragment shaders is required but not supported."):new d("webgl:required","WebGL2 is required but not supported.",Error().stack)};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/capabilities":function(){define(["exports", "./contextUtils"],function(a,d){function l(k){if("undefined"===typeof WebGL2RenderingContext)return null;var p=document.createElement("canvas");if(!p)return null;let q=d.createContext(p,{failIfMajorPerformanceCaveat:!0});null==q&&(q=d.createContext(p),null!=q&&(k.majorPerformanceCaveat=!0));if(null==q)return q;k.available=!0;k.maxTextureSize=q.getParameter(q.MAX_TEXTURE_SIZE);k.supportsVertexShaderSamplers=0{this.components.forEach(e=>{e=this._find(e)?.widget;void 0!==e?.view&&(e.view=n)})};this._componentsWatcher=(n,e)=>{this._removeComponents(e);this._addComponents(n);this._adjustPadding(n)}}initialize(){this.addHandles([f.watch(()=>this.components,this._componentsWatcher, f.initial),f.watch(()=>this.view,this._updateViewAwareWidgets,f.initial)])}_add(v,n,e,t,z){let B=v;if("string"===typeof v&&this._defaultPositionLookup[v]){if(this._find(v))return;B=this._createComponent(v)}super._add(B,n,e,t,z)}_removeComponents(v){v.forEach(n=>{if(n=this._find(n))this.remove(n),n.destroy()})}_adjustPadding(v){v.includes("attribution")||this._isOverridden("padding")||({top:v}=this.padding,this.padding=v)}_addComponents(v){this.constructed&&v.forEach(n=>this.add(this._createComponent(n), this._defaultPositionLookup[n]))}_createComponent(v){const n=this._createWidget(v);return new q({id:v,node:n})}_createWidget(v){const n=this.view;switch(v){case "attribution":return new c({view:n});case "compass":return new b({view:n});case "navigation-toggle":return new g({view:n});case "zoom":return new u({view:n})}}};a.__decorate([r.property()],d.prototype,"components",void 0);return d=a.__decorate([p.subclass("esri.views.ui.DefaultUI")],d)})},"esri/views/ui/Component":function(){define("../../chunks/tslib.es6 ../../core/Accessor ../../core/domUtils ../../core/accessorSupport/decorators/property ../../core/accessorSupport/decorators/cast ../../core/RandomLCG ../../core/has ../../core/accessorSupport/decorators/subclass".split(" "), function(a,d,l,f,r,k,p,q){d=class extends d{constructor(){super(...arguments);this.widget=null}destroy(){this.node=null;this.widget?.destroy()}get id(){return this._get("id")??this.widget?.id??this.node?.id}set id(h){this._set("id",h)}set node(h){const c=this._get("node");h!==c&&(h&&h.classList.add("esri-component"),c&&c.classList.remove("esri-component"),this._set("node",h))}castNode(h){this.widget?.destroy();if(!h)return this._set("widget",null),null;if("string"===typeof h||h&&"nodeType"in h)return this._set("widget", null),l.byId(h);h&&"function"===typeof h.render&&!h.domNode&&(h.domNode=document.createElement("div"));this._set("widget",h);return h.domNode}};a.__decorate([f.property()],d.prototype,"id",null);a.__decorate([f.property()],d.prototype,"node",null);a.__decorate([r.cast("node")],d.prototype,"castNode",null);a.__decorate([f.property({readOnly:!0})],d.prototype,"widget",void 0);return d=a.__decorate([q.subclass("esri.views.ui.Component")],d)})},"esri/views/ui/UI":function(){define("../../chunks/tslib.es6 ../../intl ../../core/Accessor ../../core/arrayUtils ../../core/domUtils ../../core/Evented ../../core/handleUtils ../../core/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/accessorSupport/decorators/cast ../../core/has ../../core/accessorSupport/decorators/subclass ../../support/themeUtils ./Component ../../widgets/support/widgetUtils ../../intl/locale".split(" "), function(a,d,l,f,r,k,p,q,h,c,b,g,u,v,n,e){function t(m){return 0===m?"0":`${m}px`}function z(m){const A="object"===typeof m&&null!==m&&Object.getPrototypeOf(m);return null!==A&&A!==Object.prototype||!("component"in m||"index"in m||"position"in m)?null:m}function B(m,{top:A,bottom:x,left:C,right:H}){m.style.top=A;m.style.bottom=x;m.style.left=C;m.style.right=H}const w={left:0,top:0,bottom:0,right:0},D={bottom:30,top:15,right:15,left:15};d=class extends k.EventedAccessor{constructor(m){super(m);this._cornerNameToContainerLookup= {};this._positionNameToContainerLookup={};this._components=[];this._componentMap=new Map;this._removeWidgetHandleKey=Symbol("componentOnRemoveSymbol");this._locale=e.getLocale();this.view=null;this._applyViewPadding=()=>{const A=this.container;A&&B(A,this._toPixelPosition(this._getViewPadding()))};this._applyUIPadding=()=>{const A=this._innerContainer;A&&B(A,this._toPixelPosition(this.padding))};this._initContainers()}initialize(){this.addHandles([q.watch(()=>[this.view?.padding,this.container],this._applyViewPadding, q.initial),q.watch(()=>this.padding,this._applyUIPadding,q.initial),q.watch(()=>[this.container,this._locale],([m,A])=>{m&&m.setAttribute("lang",A)},q.initial),e.onLocaleChange(m=>{this._locale=m})])}destroy(){this.container=null;for(const m of this._components)m.destroy();this._components.length=0;this._componentMap.clear()}set container(m){const A=this._get("container");m!==A&&(m&&(m.classList.add("esri-ui"),u.setCalciteThemeClass(m),this._attachContainers(m)),A&&(A.classList.remove("esri-ui"), B(A,{top:"",bottom:"",left:"",right:""}),r.empty(A)),this._set("container",m))}get height(){const m=this.view?.height??0;if(0===m)return m;const A=this._getViewPadding(),{top:x,bottom:C}=A;return Math.max(m-x-C,0)}get padding(){return this._get("padding")}set padding(m){this._overrideIfSome("padding",m)}castPadding(m){return"number"===typeof m?{bottom:m,top:m,right:m,left:m}:{...D,...m}}get width(){const m=this.view?.width??0;if(0===m)return m;const A=this._getViewPadding(),{left:x,right:C}=A;return Math.max(m- x-C,0)}add(m,A){let x,C,H;if(Array.isArray(m))m.forEach(O=>this.add(O,A));else{var I=z(m);I&&({index:x,position:A,component:m,key:C}=I);A&&"object"===typeof A&&({index:x,key:C,position:A,internal:H}=A);!m||A&&!this._isValidPosition(A)||this._add(m,A,x,C,H)}}remove(m,A){if(m){if(Array.isArray(m))return m.map(C=>this.remove(C,A));if((m=this._find(m))&&(!this._componentMap.has(m)||this._componentMap.get(m)?.key===A)){var x=this._components.indexOf(m);m.node.parentNode?.removeChild(m.node);this._componentMap.delete(m); m.widget?.removeHandlesReference(this._removeWidgetHandleKey);return this._components.splice(x,1)[0]}}}empty(m,A={removeInternal:!1}){if(Array.isArray(m))for(const x of m)this.empty(x,A);else{m=Array.prototype.slice.call(this._positionNameToContainerLookup[m??"manual"].children).map(x=>this._findByNode(x)).filter(x=>null==x?!1:!(this._componentMap.get(x)?.internal??!1)||A.removeInternal);for(const x of m)this.remove(x)}}move(m,A){Array.isArray(m)&&m.forEach(H=>this.move(H,A));if(m){var x=z(m)||z(A); if(x){var C=x.index;A=x.position;m=x.component||m}(!A||this._isValidPosition(A))&&(m=this.remove(m))&&this.add(m,{position:A,index:C})}}find(m){return m?(m=this._findById(m))&&(m.widget||m.node):null}getComponents(m,A={includeInternal:!1}){return m?Array.isArray(m)?m.flatMap(x=>this._getComponentsAtPosition(x,A)):this._getComponentsAtPosition(m,A):this._components.filter(x=>A.includeInternal||!(this._componentMap.get(x)?.internal??!1)).map(({widget:x,node:C})=>x??C)}getPosition(m){for(const A in this._positionNameToContainerLookup)if(this._positionNameToContainerLookup[A].contains(m))return A; return null}_add(m,A,x,C,H){m instanceof v||(m=new v({node:m}));const {widget:I}=m;null!=I&&I instanceof l&&I.addHandles(p.makeHandle(()=>{queueMicrotask(()=>this.remove(m))}),this._removeWidgetHandleKey);this._place({component:m,position:A,index:x});this._components.push(m);this._componentMap.set(m,{key:C,internal:H})}_find(m){return m?m instanceof v?this._findByComponent(m):"string"===typeof m?this._findById(m):this._findByNode(m.domNode||m):null}_getViewPadding(){return this.view?.padding??w}_attachContainers(m){m.appendChild(this._innerContainer); m.appendChild(this._manualContainer)}_initContainers(){var m=document.createElement("div");m.classList.add("esri-ui-inner-container","esri-ui-corner-container");const A=document.createElement("div");A.classList.add("esri-ui-inner-container","esri-ui-manual-container");const x=document.createElement("div");x.classList.add("esri-ui-top-left","esri-ui-corner");m.appendChild(x);const C=document.createElement("div");C.classList.add("esri-ui-top-right","esri-ui-corner");m.appendChild(C);const H=document.createElement("div"); H.classList.add("esri-ui-bottom-left","esri-ui-corner");m.appendChild(H);const I=document.createElement("div");I.classList.add("esri-ui-bottom-right","esri-ui-corner");m.appendChild(I);this._innerContainer=m;this._manualContainer=A;m=n.isRTL();this._cornerNameToContainerLookup={"top-left":x,"top-right":C,"bottom-left":H,"bottom-right":I,"top-leading":m?C:x,"top-trailing":m?x:C,"bottom-leading":m?I:H,"bottom-trailing":m?H:I};this._positionNameToContainerLookup={manual:A,...this._cornerNameToContainerLookup}}_isValidPosition(m){return!!this._positionNameToContainerLookup[m]}_place(m){var A= m.position??"manual";const {component:x,index:C}=m;m=this._positionNameToContainerLookup[A];A=null!=C&&-1=A.length?m.appendChild(x.node):r.insertBefore(x.node,A[C])):m.appendChild(x.node)}_toPixelPosition(m){return{top:t(m.top), left:t(m.left),right:t(m.right),bottom:t(m.bottom)}}_findByComponent(m){return this._components.find(A=>A===m)??null}_findById(m){return this._components.find(({id:A})=>A===m)??null}_findByNode(m){return this._components.find(({node:A})=>A===m)??null}_getComponentsAtPosition(m,A){return Array.prototype.slice.call(this._positionNameToContainerLookup[m].children).map(x=>this._findByNode(x)).filter(f.isSome).filter(x=>A.includeInternal||!(this._componentMap.get(x)?.internal??!1)).map(({widget:x,node:C})=> x??C)}};a.__decorate([h.property()],d.prototype,"_locale",void 0);a.__decorate([h.property()],d.prototype,"container",null);a.__decorate([h.property()],d.prototype,"height",null);a.__decorate([h.property({value:D})],d.prototype,"padding",null);a.__decorate([c.cast("padding")],d.prototype,"castPadding",null);a.__decorate([h.property()],d.prototype,"view",void 0);a.__decorate([h.property()],d.prototype,"width",null);return d=a.__decorate([g.subclass("esri.views.ui.UI")],d)})},"esri/widgets/Attribution":function(){define("../chunks/tslib.es6 ../core/reactiveUtils ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ./Widget ./Attribution/AttributionViewModel ./support/globalCss ./support/decorators/accessibleHandler ./support/decorators/messageBundle ./support/jsxFactory ./support/widgetUtils".split(" "), function(a,d,l,f,r,k,p,q,h,c,b,g,u,v){f=class extends q{constructor(n,e){super(n,e);this._attributionTextOverflowed=this._isOpen=!1;this._prevSourceNodeHeight=0;this._resizeObserver=new ResizeObserver(t=>t.forEach(({target:z})=>this._checkSourceTextOverflow(z)));this.itemDelimiter=" | ";this.messages=null;this.viewModel=new h}initialize(){this.addHandles(d.on(()=>this.viewModel?.items,"change",()=>this.scheduleRender()))}destroy(){this._resizeObserver?.disconnect()}get _isInteractive(){return this._isOpen|| this._attributionTextOverflowed}get attributionText(){return this.viewModel.items.reduce((n,e)=>{n.includes(e.text)||n.push(e.text);return n},[]).join(this.itemDelimiter)}get icon(){return"description"}set icon(n){this._overrideIfSome("icon",n)}get label(){return this.messages?.widgetLabel??""}set label(n){this._overrideIfSome("label",n)}get view(){return this.viewModel.view}set view(n){this.viewModel.view=n}render(){return u.tsx("div",{bind:this,class:this.classes("esri-attribution",c.globalCss.widget, {["esri-attribution--open"]:this._isOpen}),dir:"ltr",onclick:this._toggleState,onkeydown:this._toggleState},this._renderSourcesNode(),this._renderPoweredBy())}_renderPoweredBy(){return u.tsx("div",{class:"esri-attribution__powered-by"},"Powered by"," ",u.tsx("a",{class:"esri-attribution__link",href:"https://www.esri.com/",rel:"noreferrer",target:"_blank"},"Esri"))}_renderSourcesNode(){const n=this._isOpen,e=this._isInteractive,t=e?0:void 0,{attributionText:z}=this;return u.tsx("div",{afterCreate:this._afterSourcesNodeCreate, bind:this,class:this.classes("esri-attribution__sources",{["esri-attribution__sources--open"]:n,[c.globalCss.interactive]:e}),innerHTML:z,tabIndex:t})}_afterSourcesNodeCreate(n){this._prevSourceNodeHeight=n.clientWidth;this._resizeObserver.observe(n)}_checkSourceTextOverflow(n){let e=!1;const {clientHeight:t,clientWidth:z,scrollWidth:B}=n;n=B>z;const w=this._attributionTextOverflowed!==n;this._attributionTextOverflowed=n;w&&(e=!0);this._isOpen&&(n=tm.text!==D[A].text)}function z(w,D,m){m&&D&&(w.find(A=>A.layerView===D&&A.text===m)||w.push({text:m,layerView:D}))}const B=[];d=class extends d{constructor(w){super(w);this._clear=()=>{this._fetchedAttributionData.clear();this._pendingAttributions.clear();this.removeHandles("suspension"); this.notifyChange("state")};this._pendingAttributions=new Set;this._fetchedAttributionData=new Map;this.items=new f;this.view=null;this._allLayerViewsChange=D=>{this.removeHandles("suspension");this.removeHandles("visible-geometry-changed");const m=this.view?.allLayerViews;m&&(this.addHandles(m.map(A=>r.watch(()=>[A.suspended,A.layer?.attributionVisible],()=>this._updateAttributionItems())).toArray(),"suspension"),m.forEach(A=>{"esri.views.3d.layers.Tiles3DLayerView3D"===A.declaredClass&&this.addHandles(A.on("visible-geometry-changed", ()=>this._updateAttributionItems()),"visible-geometry-changed")}));D?.removed&&D.removed.forEach(A=>{this._pendingAttributions.delete(A);this._fetchedAttributionData.delete(A)});this._updateAttributionItems()};this.addHandles([r.on(()=>this.view?.allLayerViews,"change",D=>this._allLayerViewsChange(D),{onListenerAdd:()=>this._allLayerViewsChange(),onListenerRemove:this._clear}),r.when(()=>!0===this.view?.stationary,()=>this._updateAttributionItems())])}destroy(){this.view=null;this._fetchedAttributionData.clear(); this._pendingAttributions.clear();this.items.removeAll()}get state(){return this.view?.ready?0{if(!A.suspended&&A.layer?.attributionVisible){var x=A.layer;if(e(x,"user"))z(B,A,x.copyright);else if(x.hasAttributionData)if(this._fetchedAttributionData.has(A)){var C=this._fetchedAttributionData.get(A);C?z(B,A,this._getDynamicAttribution(C,w, x)):e(x)&&z(B,A,x.copyright)}else this._fetchAttributionData(A);else(C="portalItem"in x?x.portalItem?.accessInformation:void 0)?z(B,A,C):z(B,A,x.copyright)}});D=D.find(A=>"integrated-mesh-3dtiles"===A.layer?.type);if(this.view&&D){var m=n.getLyr3DWasm(this.view);if(m){m=m.getAttributionText();for(let A=0;A=m)return"";w=w[m];const C=v.project(A.center.clone().normalize(), D.spatialReference),H=new Set;return w?w.filter(I=>{const O=I.id;(I=!H.has(O)&&C&&I.extent&&u.extentContainsPoint(I.extent,C))&&H.add(O);return I}).sort((I,O)=>O.score-I.score||I.objectId-O.objectId).map(I=>I.attribution).join(", "):""}};a.__decorate([k.property({readOnly:!0,type:f})],d.prototype,"items",void 0);a.__decorate([k.property({readOnly:!0})],d.prototype,"state",null);a.__decorate([k.property()],d.prototype,"view",void 0);return d=a.__decorate([c.subclass("esri.widgets.Attribution.AttributionViewModel")], d)})},"esri/views/3d/layers/Lyr3DWasm":function(){define(["require","exports"],function(a,d){let l,f=null;const r=new Map;d.addLayerViewToWasm=async function(k){null==f&&(null==l&&(l=new Promise((h,c)=>a(["../../../layers/Lyr3DWasmPerSceneView"],b=>h(Object.freeze(Object.defineProperty({__proto__:null,default:b},Symbol.toStringTag,{value:"Module"}))),c))),f=await l);const p=k.view;let q=r.get(p);q||(q=new f.default({view:p}),r.set(p,q));await q.initializeWasm();return q.add3DTilesLayerView(k)};d.getLyr3DWasm= function(k){return r.get(k)};d.removeLayerViewFromWasm=function(k){const p=k.view,q=r.get(p);q&&1>q.remove3DTilesLayerView(k)&&(r.delete(p),0===r.size&&(f=l=null))};Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/support/globalCss":function(){define(["exports"],function(a){a.globalCss={anchor:"esri-widget__anchor",anchorDisabled:"esri-widget__anchor--disabled",button:"esri-button",buttonDisabled:"esri-button--disabled",buttonHalf:"esri-button--half",buttonSecondary:"esri-button--secondary", buttonSmall:"esri-button--small",buttonTertiary:"esri-button--tertiary",buttonThird:"esri-button--third",disabled:"esri-disabled",empty:"esri-widget__content--empty",emptyIllustration:"esri-widget__content-illustration--empty",heading:"esri-widget__heading",hidden:"esri-hidden",input:"esri-input",interactive:"esri-interactive",loader:"esri-widget__loader",loaderAnimation:"esri-widget__loader-animation",loaderText:"esri-widget__loader-text",menu:"esri-menu",menuHeader:"esri-menu__header",menuItem:"esri-menu__list-item", menuItemActive:"esri-menu__list-item--active",menuItemFocus:"esri-menu__list-item--focus",menuList:"esri-menu__list",panel:"esri-widget--panel",panelHeightOnly:"esri-widget--panel-height-only",primaryTick:"primary-tick",primaryTickAmPm:"primary-tick__ampm",primaryTickLabel:"primary-tick__label",rotating:"esri-rotating",secondaryTick:"secondary-tick",select:"esri-select",table:"esri-widget__table",widget:"esri-widget",widgetButton:"esri-widget--button",widgetButtonActive:"esri-widget--button-active", widgetDisabled:"esri-widget--disabled"};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Compass":function(){define("require ../chunks/tslib.es6 ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ./Widget ./Compass/CompassViewModel ./Compass/css ../chunks/componentsUtils ./support/globalCss ./support/widgetUtils ./support/decorators/messageBundle ./support/jsxFactory".split(" "),function(a, d,l,f,r,k,p,q,h,c,b,g,u,v,n){f=class extends q{constructor(e,t){super(e,t);this.messages=null;this.viewModel=new h;this._reset=()=>{this.viewModel.reset()};this._toRotationTransform=z=>({transform:`rotateZ(${z.z}deg)`})}loadDependencies(){return b.loadCalciteComponents({button:()=>new Promise((e,t)=>a(["../chunks/calcite-button"],e,t)),icon:()=>new Promise((e,t)=>a(["../chunks/calcite-icon"],e,t))})}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(e){this.viewModel.goToOverride= e}get icon(){return"rotation"===this.viewModel.state?"arrow-up":"compass-needle"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}reset(){return this.viewModel.reset()}render(){const {orientation:e,state:t}=this.viewModel,{messages:z}=this;return n.tsx("div",{class:this.classes(c.css.base,g.globalCss.widget)},n.tsx("calcite-button",{class:g.globalCss.widgetButton, disabled:"disabled"===t,kind:"neutral",label:z.reset,onclick:this._reset,round:!0,scale:"s",title:z.reset},n.tsx("div",{"aria-hidden":"true",class:c.css.iconContainer,title:z.reset},n.tsx("calcite-icon",{icon:this.icon,styles:this._toRotationTransform(e)}))))}};d.__decorate([l.property()],f.prototype,"goToOverride",null);d.__decorate([l.property()],f.prototype,"icon",null);d.__decorate([l.property()],f.prototype,"label",null);d.__decorate([l.property(),v.messageBundle("esri/widgets/Compass/t9n/Compass")], f.prototype,"messages",void 0);d.__decorate([l.property()],f.prototype,"view",null);d.__decorate([l.property({type:h})],f.prototype,"viewModel",void 0);return f=d.__decorate([p.subclass("esri.widgets.Compass")],f)})},"esri/widgets/Compass/CompassViewModel":function(){define("../../chunks/tslib.es6 ../../core/Accessor ../../core/has ../../core/reactiveUtils ../../core/time ../../core/accessorSupport/decorators/property ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ./utils ../support/GoTo".split(" "), function(a,d,l,f,r,k,p,q,h,c,b){d=class extends b.GoToMixin(d){constructor(g){super(g);this.orientation={x:0,y:0,z:0};this.view=null;this._updateForCamera=this._updateForCamera.bind(this);this._updateForRotation=this._updateForRotation.bind(this);this._updateRotationWatcher=this._updateRotationWatcher.bind(this)}initialize(){this.addHandles(f.watch(()=>this.view,this._updateRotationWatcher,f.initial))}destroy(){this.view=null}get canShowNorth(){return c.canShowNorth(this.view)}get state(){return!this.view?.ready|| "2d"===this.view.type&&!this.view.constraints.rotationEnabled?"disabled":this.canShowNorth?"compass":"rotation"}reset(){this.view?.ready&&("2d"===this.view?.type?this.callGoTo({target:{rotation:0},options:{animationMode:"always",duration:r.Milliseconds(l("mapview-essential-goto-duration"))}}):this.callGoTo({target:{heading:0}}))}_updateForRotation(g){void 0!==g&&null!==g&&this._set("orientation",{z:g})}_updateForCamera(g){g&&this._set("orientation",{x:0,y:0,z:-g.heading})}_updateRotationWatcher(g){this.removeAllHandles(); g&&this.addHandles("2d"===g.type?f.watch(()=>g?.rotation,this._updateForRotation,f.initial):f.watch(()=>g?.camera,this._updateForCamera,f.initial))}};a.__decorate([k.property({readOnly:!0})],d.prototype,"canShowNorth",null);a.__decorate([k.property({readOnly:!0})],d.prototype,"orientation",void 0);a.__decorate([k.property({readOnly:!0})],d.prototype,"state",null);a.__decorate([k.property()],d.prototype,"view",void 0);return d=a.__decorate([h.subclass("esri.widgets.Compass.CompassViewModel")],d)})}, "esri/widgets/Compass/utils":function(){define(["exports"],function(a){a.canShowNorth=function(d){return d?.spatialReference?.isWebMercator||d?.spatialReference?.isGeographic||!1};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/support/GoTo":function(){define("exports ../../chunks/tslib.es6 ../../core/maybe ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "),function(a, d,l,f,r,k,p,q){a.GoToMixin=h=>{h=class extends h{constructor(...c){super(...c);this.view=this.goToOverride=null}callGoTo(c){const {view:b}=this;l.assertIsSome(b);return this.goToOverride?this.goToOverride(b,c):b.goTo(c.target,c.options)}};d.__decorate([f.property()],h.prototype,"goToOverride",void 0);d.__decorate([f.property()],h.prototype,"view",void 0);return h=d.__decorate([q.subclass("esri.widgets.support.GoTo")],h)};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Compass/css":function(){define(["exports"], function(a){a.css={base:"esri-compass",iconContainer:"esri-compass__icon-container"};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/NavigationToggle":function(){define("require ../chunks/tslib.es6 ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ./Widget ./NavigationToggle/css ./NavigationToggle/NavigationToggleViewModel ../chunks/componentsUtils ./support/globalCss ./support/widgetUtils ./support/decorators/messageBundle ./support/jsxFactory".split(" "), function(a,d,l,f,r,k,p,q,h,c,b,g,u,v,n){f=class extends q{constructor(e,t){super(e,t);this.messages=null;this.viewModel=new c;this.toggle=()=>this.viewModel.toggle();this._rotateButton=this._panButton=null;this._toggle=()=>{("pan"===this.viewModel?.navigationMode?this._rotateButton:this._panButton)?.setFocus();this.toggle()}}loadDependencies(){return b.loadCalciteComponents({button:()=>new Promise((e,t)=>a(["../chunks/calcite-button"],e,t))})}get icon(){return"move"}set icon(e){this._overrideIfSome("icon", e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}set layout(e){"horizontal"!==e&&(e="vertical");this._set("layout",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){const e="disabled"===this.viewModel?.state,t="pan"===this.viewModel?.navigationMode,z=this.messages.toggle;return n.tsx("div",{class:this.classes(h.css.base,g.globalCss.widget,{[h.css.isLayoutHorizontal]:"horizontal"===this.layout})},n.tsx("calcite-button", {afterCreate:B=>{this._panButton=B},appearance:t?"outline-fill":"solid",class:g.globalCss.widgetButton,disabled:e,iconStart:"move",kind:"neutral",label:z,onclick:this._toggle,tabIndex:t?void 0:-1,title:z}),n.tsx("calcite-button",{afterCreate:B=>{this._rotateButton=B},appearance:t?"solid":"outline-fill",class:g.globalCss.widgetButton,disabled:e,iconStart:"rotate",kind:"neutral",label:z,onclick:this._toggle,tabIndex:t?-1:void 0,title:z}))}};d.__decorate([l.property()],f.prototype,"icon",null);d.__decorate([l.property()], f.prototype,"label",null);d.__decorate([l.property({value:"vertical"})],f.prototype,"layout",null);d.__decorate([l.property(),v.messageBundle("esri/widgets/NavigationToggle/t9n/NavigationToggle")],f.prototype,"messages",void 0);d.__decorate([l.property()],f.prototype,"view",null);d.__decorate([l.property({type:c})],f.prototype,"viewModel",void 0);return f=d.__decorate([p.subclass("esri.widgets.NavigationToggle")],f)})},"esri/widgets/NavigationToggle/css":function(){define(["exports"],function(a){a.css= {base:"esri-navigation-toggle",isLayoutHorizontal:"esri-navigation-toggle--horizontal"};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/NavigationToggle/NavigationToggleViewModel":function(){define("../../chunks/tslib.es6 ../../core/Accessor ../../core/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "),function(a,d,l,f,r,k,p,q){d=class extends d{constructor(h){super(h); this._navigationMode="pan";this.view=null}initialize(){this.addHandles(l.when(()=>this.view?.inputManager,()=>this._setNavigationMode()))}destroy(){this.view=null}get state(){return this.view?.ready&&"3d"===this.view?.type?"ready":"disabled"}get navigationMode(){return this._navigationMode}set navigationMode(h){this._navigationMode=h;this._setNavigationMode()}toggle(){"disabled"!==this.state&&(this.navigationMode="pan"!==this.navigationMode?"pan":"rotate")}_setNavigationMode(){const h=this.view?.inputManager; h&&(h.primaryDragAction="pan"===this._navigationMode?"pan":"rotate")}};a.__decorate([f.property({readOnly:!0})],d.prototype,"state",null);a.__decorate([f.property()],d.prototype,"_navigationMode",void 0);a.__decorate([f.property()],d.prototype,"view",void 0);return d=a.__decorate([q.subclass("esri.widgets.NavigationToggle.NavigationToggleViewModel")],d)})},"esri/widgets/Zoom":function(){define("require ../chunks/tslib.es6 ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ./Widget ../chunks/componentsUtils ./support/globalCss ./support/widgetUtils ./support/decorators/messageBundle ./support/jsxFactory ./Zoom/ZoomViewModel".split(" "), function(a,d,l,f,r,k,p,q,h,c,b,g,u,v){f=class extends q{constructor(n,e){super(n,e);this.messages=null;this.viewModel=new v;this.zoomIn=()=>this.viewModel.zoomIn();this.zoomOut=()=>this.viewModel.zoomOut()}loadDependencies(){return h.loadCalciteComponents({button:()=>new Promise((n,e)=>a(["../chunks/calcite-button"],n,e))})}get icon(){return"magnifying-glass-plus"}set icon(n){this._overrideIfSome("icon",n)}get label(){return this.messages?.widgetLabel??""}set label(n){this._overrideIfSome("label", n)}set layout(n){"horizontal"!==n&&(n="vertical");this._set("layout",n)}set view(n){this.viewModel.view=n}get view(){return this.viewModel.view}render(){const n={["esri-zoom--horizontal"]:"horizontal"===this.layout},{canZoomIn:e,canZoomOut:t}=this.viewModel,{zoomIn:z,zoomOut:B}=this.messages;return u.tsx("div",{class:this.classes("esri-zoom",c.globalCss.widget,n)},u.tsx("calcite-button",{class:c.globalCss.widgetButton,disabled:!e,iconStart:"plus",kind:"neutral",label:z,onclick:this.zoomIn,title:z}), u.tsx("calcite-button",{class:c.globalCss.widgetButton,disabled:!t,iconStart:"minus",kind:"neutral",label:B,onclick:this.zoomOut,title:B}))}};d.__decorate([l.property()],f.prototype,"icon",null);d.__decorate([l.property()],f.prototype,"label",null);d.__decorate([l.property({value:"vertical"})],f.prototype,"layout",null);d.__decorate([l.property(),g.messageBundle("esri/widgets/Zoom/t9n/Zoom")],f.prototype,"messages",void 0);d.__decorate([l.property()],f.prototype,"view",null);d.__decorate([l.property({type:v})], f.prototype,"viewModel",void 0);return f=d.__decorate([p.subclass("esri.widgets.Zoom")],f)})},"esri/widgets/Zoom/ZoomViewModel":function(){define("../../chunks/tslib.es6 ../../core/Accessor ../../core/promiseUtils ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ./ZoomConditions2D ./ZoomConditions3D".split(" "),function(a,d,l,f,r,k,p,q,h,c){d=class extends d{constructor(b){super(b)}destroy(){this.view= null}get canZoomIn(){return null!=this._zoomConditions&&this._zoomConditions.canZoomIn}get canZoomOut(){return null!=this._zoomConditions&&this._zoomConditions?.canZoomOut}get state(){return this.view?.ready?"ready":"disabled"}set view(b){b?"2d"===b.type?this._zoomConditions=new h({view:b}):"3d"===b.type&&(this._zoomConditions=new c({view:b})):this._zoomConditions=null;this._set("view",b)}zoomIn(){if(this.canZoomIn){var b=this.view;"2d"===b.type?b.mapViewNavigation.zoomIn():l.ignoreAbortErrors(b.goTo({zoomFactor:2}))}}zoomOut(){if(this.canZoomOut){var b= this.view;"2d"===b.type?b.mapViewNavigation.zoomOut():l.ignoreAbortErrors(b.goTo({zoomFactor:.5}))}}};a.__decorate([f.property()],d.prototype,"_zoomConditions",void 0);a.__decorate([f.property()],d.prototype,"canZoomIn",null);a.__decorate([f.property()],d.prototype,"canZoomOut",null);a.__decorate([f.property({readOnly:!0})],d.prototype,"state",null);a.__decorate([f.property()],d.prototype,"view",null);return d=a.__decorate([q.subclass("esri.widgets.Zoom.ZoomViewModel")],d)})},"esri/widgets/Zoom/ZoomConditions2D":function(){define("../../chunks/tslib.es6 ../../core/Accessor ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "), function(a,d,l,f,r,k,p){d=class extends d{get canZoomIn(){if(!this.view?.ready)return!1;const q=this.view?.constraints?.effectiveMaxScale;return 0===q||this._scale>q}get canZoomOut(){var {view:q}=this;if(!q?.ready)return!1;q=q.constraints?.effectiveMinScale;return 0===q||this._scalea(["./2d/webglDeps"],na,ja)),new Promise((na,ja)=>a(["./2d/mapViewDeps"],na,ja))]);Q=N;T=U;aa=ca;ea=ia;la=ka;P=ma}let P,Q,T,aa,ea,la;v=class extends B.BreakpointsOwner(D.PopupView(w.DOMContainer(m))){constructor(N){super(N);this.stage= this._magnifierView=null;this._resolveWhenReady=[];this.rootLayerViews=new r({getCollections:()=>[this.basemapView?.baseLayerViews,this.layerViews,this.basemapView?.referenceLayerViews],getChildrenFunction:()=>null});this.featuresTilingScheme=null;this.fullOpacity=1;this.goToManager=new C.GoToManager({view:this});this.graphicsView=null;this.stateManager=new da.ViewStateManager({constraints:new I({view:this})});this.stationaryManager=new J.StationaryManager;this.mapViewNavigation=this.labelManager= null;this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!0,labelsAnimationTime:125,labelCollisionsEnabled:!0};this.supersampleScreenshotsEnabled=!0;this.supportsGround=!1;this.frameTask=new x(this);this.floors=new f;this.highlightOptions=new M;this.inputManager=new y({view:this});this.map=null;this.spatialReferenceLocked=!1;this.timeline=new L.Timeline;this.type="2d";this.ui=new ha;this.test={takeScreenshot:async U=>E.takeRawScreenshot(this._getScreenshotView(U),U)};this.padding={top:0, right:0,bottom:0,left:0};this.addHandles([c.watch(()=>this.viewpoint,()=>this.stationaryManager.flip(),c.sync),this.on("resize",U=>this.stateManager.resize(U.width,U.height))]);b.initialize()}destroy(){this.layerViewManager.clear();this._set("preconditionsReady",!1);this.frameTask=h.destroyMaybe(this.frameTask);this.goToManager.destroy();this.rootLayerViews.destroy();this.inputManager.destroy();this._set("inputManager",null)}get graphicsTileStore(){return new F(this.featuresTilingScheme)}get constraintsInfo(){const N= this.defaultsFromMap?.tileInfo,U=this.spatialReference;return{lods:N?.spatialReference?.equals(U)?N.lods:null,spatialReference:U}}get state(){return this.stateManager.state}get initialExtentRequired(){if(!this.stateManager)return!1;const {scale:N,constraints:U,center:ca,viewpoint:ia,extent:ka}=this;let ma=this.zoom;if(this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties?.viewpoint||ka)return!1;U?.effectiveLODs||(ma=-1);return ca&&(0!==N||-1!==ma)||null!=ia?.targetGeometry&& ("extent"===ia.targetGeometry.type||ia.scale)?!1:!0}get _defaultsFromMapSettings(){return{required:{tileInfo:!0,heightModelInfo:!1,extent:!1},requiresExtentInSpatialReference:this.spatialReferenceLocked}}get typeSpecificPreconditionsReady(){const N=this._getDefaultViewpoint();return N?t.isLoadedOrLoadFor(N.targetGeometry.spatialReference,this.spatialReference):!1}set animation(N){var U=this._get("animation");N!==U&&(U&&U.stop(),N!==this.animationManager.animation&&this.animationManager.stop(),!N|| N.isFulfilled()?(this._set("animation",null),this.frameTask.animationInProgress=!1):(this._set("animation",N),this.frameTask.animationInProgress=!0,U=()=>{this.destroyed||(N===this._get("animation")&&(this._set("animation",null),this.frameTask?.requestFrame()),this.frameTask.animationInProgress=!1)},N.when(U,U)))}get background(){return fa.isWebMap(this.map)?this.map.initialViewProperties.background:null}set background(N){this._override("background",N)}get center(){return this.stateManager?.center?? null}set center(N){this.stateManager.center=N}get constraints(){return this.stateManager?.constraints}set constraints(N){N.view=this;const U=this.stateManager.constraints;this.stateManager.constraints=N;U?.destroy()}get extent(){return this.stateManager?.extent??null}set extent(N){this.stateManager.extent=N}get padding(){return this.stateManager?.padding}set padding(N){this.stateManager&&(this.stateManager.padding=N)}get rendering(){return this.stage?.renderRequested??!1}get resizeAlign(){return this.stateManager.resizeAlign}set resizeAlign(N){this.stateManager.resizeAlign= N}get resolution(){return this.stateManager.resolution??0}get rotation(){return this.stateManager.rotation??0}set rotation(N){const {rotationEnabled:U}=this.constraints;this.constraints.rotationEnabled=!0;this.stateManager.rotation=N;this.constraints.rotationEnabled=U}get scale(){return this.stateManager?.scale??0}set scale(N){this.stateManager&&(this.stateManager.scale=N)}get stationary(){return!this.animation&&!this.navigating&&!this.resizing&&this.stationaryManager.stationary}get tileInfo(){return this.featuresTilingScheme?.tileInfo}get updating(){const N= !(!this.magnifier.visible||null===this.magnifier.position||!this._magnifierView?.updatingHandles.updating),U=!this.destroyed&&(!this.layerViewManager||!this.labelManager||!this.graphicsView||!0===this.layerViewManager.updating||!0===this.labelManager.updating||!0===this.graphicsView.updating||this.allLayerViews.some(ca=>!ca.destroyed&&!("layerViews"in ca)&&!0===ca.updating)||N);if(p("esri-2d-log-updating")){const ca=this.allLayerViews.reduce((ia,ka)=>({...ia,[`${ka.layer.id}(${ka.layer.type})`]:!ka.destroyed&& !("layerViews"in ka)&&ka.updating}),{});console.log(`Updating MapView: ${U}\n-> Null LayerViewManager: ${!this.layerViewManager}\n-> Null LabelManager: ${!this.labelManager}\n-> Null GraphicsView: ${!this.graphicsView}\n-> layerViewManager.updating: ${this.layerViewManager?.updating}\n-> labelManager.updating: ${this.labelManager?.updating}\n-> graphicsView.updating: ${this.graphicsView?.updating}\n-> allLayerViews: ${JSON.stringify(ca)}\n-> updatingMagnifier: ${N}\n`)}return U}get viewpoint(){return this.stateManager.viewpoint?? null}set viewpoint(N){this.stateManager.viewpoint=N;this.frameTask.requestFrame()}get zoom(){return this.stateManager.zoom??-1}set zoom(N){this.stateManager.zoom=N}get navigating(){return this.mapViewNavigation?.interacting??!1}goTo(N,U){return this.goToManager.goTo(N,U)}async hitTest(N,U){return V.hitTest(this,N,U)}async takeScreenshot(N){return E.takeScreenshot(this._getScreenshotView(N),N)}toMap(N){if(!this.ready)return null;N=R.isSupportedScreenPointEvent(N)?R.createScreenPointFromSupportedEvent(this, N):N;return this.stateManager.toMap(N)}toScreen(N,U){return this.stateManager.toScreen(N,U)}on(N,U,ca,ia){return(ca=this.inputManager&&this.viewEvents.on(N,U,ca,ia))?ca:super.on(N,U)}hasEventListener(N){return super.hasEventListener(N)||this.viewEvents.hasHandler(N)}whenLayerView(N){return super.whenLayerView(N)}graphicChanged(N){this.graphicsView&&this.graphicsView.graphicUpdateHandler(N)}whenReady(){return new Promise(N=>{this.ready?N(this):this._resolveWhenReady.push(N)})}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.map&& "initialViewProperties"in this.map&&this.map?.initialViewProperties?.spatialReference||this.defaultsFromMap?.spatialReference||null}getDefaultTimeZone(){return fa.isWebMap(this.map)?this.map.initialViewProperties.timeZone:null}hasLayerViewModule(N){return H.layerView2DImporter.hasLayerViewModule(N)}importLayerView(N){return H.layerView2DImporter.importLayerView(N)}pixelSizeAt(){return this.ready?this.resolution:(q.getLogger(this).error("#pixelSizeAt()","Map view cannot be used before it is ready"), null)}async popupHitTest(N){const U=this.toMap(N);N=await this.hitTest(N);const ca=this.allLayerViews.toArray().reverse(),ia=new globalThis.Map(ca.map(oa=>[oa.layer.uid,oa])),ka=[];let ma=0,na=0;for(;map("safari")&&(N=new k("mapview:browser-not-supported","This browser is not supported by MapView (Safari \x3c 9)",{type:"safari",requiredVersion:9,detectedVersion:p("safari")}));if(null!=N)throw q.getLogger(this).warn("#validate()",N.message),N;}loadAsyncDependencies(){return K()}_getDefaultViewpoint(){const {constraints:N,initialExtent:U, map:ca,padding:ia,size:ka}=this;if(!N)return null;var ma=ca&&"initialViewProperties"in ca?ca.initialViewProperties:void 0;const na=this.stateManager.getUserStartupOptions(this.size);var ja=ma?.viewpoint;const oa=ja?.targetGeometry?.extent??U;var pa=oa?.center;ma=ja?.rotation??0;ja=ja?.scale||oa&&Z.extentToScale(oa,[ka[0]-ia.left-ia.right,ka[1]-ia.top-ia.bottom]);pa=na.center??pa;ja=na.scale??ja;return pa&&ja?new l({targetGeometry:pa,scale:ja,rotation:na.rotation??ma}):null}_startup(){this.timeline.begin("MapView Startup"); var N=this._getDefaultViewpoint();this.stateManager.startup(N,this.size,this.spatialReference,this.defaultsFromMap.extent?.center);this.graphics.owner=this;const U=new P(this.surface,{canvas:this.renderCanvas,contextOptions:{disabledExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions},renderingOptions:this.renderingOptions,timeline:this.timeline});this.stage=U;this._magnifierView=new la;this._magnifierView.magnifier=this.magnifier;N=new aa({view:this});this._set("labelManager", N);N=new A({view:this});this._set("animationManager",N);N=new ea({view:this,animationManager:N});this._set("mapViewNavigation",N);this._setupSpatialReferenceDependentProperties();this.addHandles([this.rootLayerViews.on("change",()=>this._updateStageChildren()),U.on("webgl-error",ca=>this.fatalError=ca.error),c.watch(()=>this.stationary,ca=>U.stationary=ca,c.syncAndInitial),c.watch(()=>this.background,ca=>{U.backgroundColor=ca?.color;this._magnifierView.backgroundColor=ca?.color},c.syncAndInitial), c.watch(()=>this.magnifier,ca=>this._magnifierView.magnifier=ca,c.syncAndInitial),c.watch(()=>this.renderingOptions,ca=>U.renderingOptions=ca,c.syncAndInitial),c.watch(()=>this.highlightOptions,ca=>U.highlightOptions=ca,c.syncAndInitial),c.watch(()=>this.state.id,()=>U.state=this.state,c.syncAndInitial)],"map-view");this._updateStageChildren();N=this._resolveWhenReady;this._resolveWhenReady=[];N.forEach(ca=>ca(this));this.timeline.end("MapView Startup");this.frameTask.start();this._set("ready",!0)}_teardown(){this._destroySpatialReferenceDependentProperties(); this.removeHandles("map-view");this.mapViewNavigation.destroy();this._set("mapViewNavigation",null);this.animation=null;this.animationManager.destroy();this._set("animationManager",null);this.layerViewManager.clear();this.labelManager.destroy();this._magnifierView.destroy();this.stage.destroy();this.stage=null;this._set("graphicsView",null);this._magnifierView=null;this._set("labelManager",null);this._set("mapViewNavigation",null);this.graphics.owner=null;this.frameTask.stop();this.stationaryManager.clear(); this._set("ready",!1);this.stateManager.teardown()}_updateStageChildren(){this.stage.removeAllChildren();this.rootLayerViews.forEach(N=>{this.stage.addChild(N.container)});this.stage.addChild(this.graphicsView.container);this.stage.addChild(this._magnifierView)}_setupSpatialReferenceDependentProperties(){var N=new O(z.create({spatialReference:this.spatialReference,size:512,numLODs:36}));this._set("featuresTilingScheme",N);N=new Q({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(), container:new T(N)});this._set("graphicsView",N)}_destroySpatialReferenceDependentProperties(){const N=this.graphicsView;this._set("graphicsView",null);N.destroy();this._set("featuresTilingScheme",null)}_getScreenshotView(N){const {allLayerViews:U,padding:ca,size:ia,stage:ka}=this;return{allLayerViews:U,backgroundColor:N?.ignoreBackground?null:this.background?.color,padding:ca,size:ia,stage:ka}}_spatialReferenceChanged(N){if(this.ready){this.frameTask.stop();for(const U of this.allLayerViews)U.processDetach(); this._destroySpatialReferenceDependentProperties();this.stateManager.changeSpatialReference(N);this.stage.state=this.state;this._setupSpatialReferenceDependentProperties();for(const U of this.allLayerViews)U.processAttach();this.frameTask.requestFrame();this.frameTask.start();this._updateStageChildren()}}};v.type="2d";d.__decorate([g.property({readOnly:!0})],v.prototype,"animationManager",void 0);d.__decorate([g.property({constructOnly:!0})],v.prototype,"deactivatedWebGLExtensions",void 0);d.__decorate([g.property({constructOnly:!0})], v.prototype,"debugWebGLExtensions",void 0);d.__decorate([g.property({readOnly:!0})],v.prototype,"featuresTilingScheme",void 0);d.__decorate([g.property({readOnly:!0})],v.prototype,"fullOpacity",void 0);d.__decorate([g.property()],v.prototype,"goToManager",void 0);d.__decorate([g.property({readOnly:!0})],v.prototype,"graphicsTileStore",null);d.__decorate([g.property()],v.prototype,"graphicsView",void 0);d.__decorate([g.property()],v.prototype,"stateManager",void 0);d.__decorate([g.property()],v.prototype, "constraintsInfo",null);d.__decorate([g.property({readOnly:!0})],v.prototype,"state",null);d.__decorate([g.property()],v.prototype,"initialExtentRequired",null);d.__decorate([g.property()],v.prototype,"labelManager",void 0);d.__decorate([g.property({readOnly:!0})],v.prototype,"mapViewNavigation",void 0);d.__decorate([g.property({constructOnly:!0})],v.prototype,"renderCanvas",void 0);d.__decorate([g.property()],v.prototype,"renderingOptions",void 0);d.__decorate([g.property({constructOnly:!0})],v.prototype, "supersampleScreenshotsEnabled",void 0);d.__decorate([g.property({readOnly:!0})],v.prototype,"supportsGround",void 0);d.__decorate([g.property()],v.prototype,"_defaultsFromMapSettings",null);d.__decorate([g.property({readOnly:!0})],v.prototype,"typeSpecificPreconditionsReady",null);d.__decorate([g.property()],v.prototype,"animation",null);d.__decorate([g.property({type:G})],v.prototype,"background",null);d.__decorate([g.property()],v.prototype,"center",null);d.__decorate([g.property({type:I})],v.prototype, "constraints",null);d.__decorate([g.property()],v.prototype,"extent",null);d.__decorate([g.property()],v.prototype,"floors",void 0);d.__decorate([g.property({type:M})],v.prototype,"highlightOptions",void 0);d.__decorate([g.property({readOnly:!0})],v.prototype,"inputManager",void 0);d.__decorate([g.property()],v.prototype,"map",void 0);d.__decorate([g.property()],v.prototype,"padding",null);d.__decorate([g.property({readOnly:!0})],v.prototype,"rendering",null);d.__decorate([g.property()],v.prototype, "resizeAlign",null);d.__decorate([g.property({readOnly:!0})],v.prototype,"resolution",null);d.__decorate([g.property()],v.prototype,"rotation",null);d.__decorate([g.property()],v.prototype,"scale",null);d.__decorate([g.property({constructOnly:!0})],v.prototype,"spatialReferenceLocked",void 0);d.__decorate([g.property()],v.prototype,"stationary",null);d.__decorate([g.property({readOnly:!0})],v.prototype,"tileInfo",null);d.__decorate([g.property({type:L.Timeline,readOnly:!0})],v.prototype,"timeline", void 0);d.__decorate([g.property({readOnly:!0})],v.prototype,"type",void 0);d.__decorate([g.property({readOnly:!0})],v.prototype,"updating",null);d.__decorate([g.property()],v.prototype,"viewpoint",null);d.__decorate([g.property()],v.prototype,"zoom",null);d.__decorate([g.property({readOnly:!0})],v.prototype,"navigating",null);d.__decorate([g.property(),u.cast(N=>N instanceof ba?N:e.ensureClass(ha,N))],v.prototype,"ui",void 0);return v=d.__decorate([n.subclass("esri.views.MapView")],v)});