1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7237],{18486:function(e,t,i){i.d(t,{vF:function(){return v},_D:function(){return d},Qp:function(){return f},zD:function(){return c},tB:function(){return g},nF:function(){return y},VO:function(){return x},kr:function(){return w}});var r=i(70375),n=i(35925),a=i(39536),s=i(86566),o=i(91772),l=(i(91957),i(17321)),h=i(56060);const p=5e-4,u=function(e,t){const i=(e.isWGS84||e.isWebMercator)&&(t.isWGS84||t.isWebMercator);return!(e.equals(t)||i)};async function c(){if((0,h.kR)()||!(0,h.Gb)())return null;await(0,h.zD)()}function d(e,t,i){if(!u(e.spatialReference,t))return null;if(!(0,h.kR)())throw new r.Z("rasterprojectionhelper-projectResolution","projection engine is not loaded");return i?(0,h.rS)(t,e.spatialReference,e):(0,h.rS)(e.spatialReference,t,e)}function x(e,t,i,n=null){if(e.spatialReference.equals(t))return e;const s=u(e.spatialReference,t);if(s&&!(0,h.kR)())throw new r.Z("rasterprojectionhelper-projectResolution","projection engine is not loaded");const l=i.center,p=new o.Z({xmin:l.x-e.x/2,xmax:l.x+e.x/2,ymin:l.y-e.y/2,ymax:l.y+e.y/2,spatialReference:e.spatialReference}),c=s?(0,h.iV)(p,t,n):(0,a.iV)(p,t);return null==c?null:{x:c.xmax-c.xmin,y:c.ymax-c.ymin}}function m(e,t=.01){return(0,l.c9)(e)?t/(0,l.c9)(e):0}function y(e,t,i=null,s=!0){const o=e.spatialReference;if(o.equals(t))return e;const l=u(o,t);if(l&&!(0,h.kR)())throw new r.Z("rasterprojectionhelper-projectResolution","projection engine is not loaded");const c=l?(0,h.iV)(e,t,i):(0,a.iV)(e,t);if(c&&s&&t.isGeographic){var d,x;const[t,i]=o.isWebMercator?(0,n.C5)(o).origin:null!=(d=null==(x=(0,n.C5)(o))?void 0:x.valid)?d:[],r=m(o);r&&null!=t&&null!=i&&(Math.abs(e.x-t)<r&&Math.abs(180-c.x)<p?c.x-=360:Math.abs(e.x-i)<r&&Math.abs(180+c.x)<p&&(c.x+=360))}return c}function g(e,t,i=null,o=!0){var l,c,d,x;const g=e.spatialReference;if(g.equals(t))return e;const f=u(g,t);if(f&&!(0,h.kR)())throw new r.Z("rasterprojectionhelper-projectExtent","projection engine is not loaded");const w=f?(0,h.iV)(e,t,i):(0,a.iV)(e,t);let[v,b]=null!=(l=null==(c=(0,n.C5)(g))?void 0:c.origin)?l:[];if(w&&o&&g.isWebMercator&&t.isGeographic&&null!=v&&null!=b){const r=.001,n=1e3;if(Math.abs(e.xmin-v)<r&&Math.abs(b-e.xmax)>n&&Math.abs(180-w.xmax)<p){w.xmin=-180;const r=[];r.push(new s.Z(e.xmax,e.ymin,g)),r.push(new s.Z(e.xmax,(e.ymin+e.ymax)/2,g)),r.push(new s.Z(e.xmax,e.ymax,g));const n=r.map((e=>y(e,t,i))).filter((e=>!isNaN(null==e?void 0:e.x))).map((e=>e.x));w.xmax=Math.max.apply(null,n)}if(Math.abs(e.xmax-b)<r&&Math.abs(v-e.xmin)>n&&Math.abs(180+w.xmin)<p){w.xmax=180;const r=[];r.push(new s.Z(e.xmin,e.ymin,g)),r.push(new s.Z(e.xmin,(e.ymin+e.ymax)/2,g)),r.push(new s.Z(e.xmin,e.ymax,g));const n=r.map((e=>y(e,t,i))).filter((e=>!isNaN(null==e?void 0:e.x))).map((e=>e.x));w.xmin=Math.min.apply(null,n)}}[v,b]=t.isWebMercator?(0,n.C5)(t).origin:null!=(d=null==(x=(0,n.C5)(t))?void 0:x.valid)?d:[];const _=m(t);return _&&null!=v&&null!=b&&(Math.abs(w.xmin-v)<_&&(w.xmin=v),Math.abs(w.xmax-b)<_&&(w.xmax=b)),w}function f(e,t,i,a=null,o=null,l=!1,p=[32,32]){var c,d;if(u(e.spatialReference,t.spatialReference)&&!(0,h.kR)())throw new r.Z("rasterprojectionhelper-projectResolution","projection engine is not loaded");if(!(e&&t&&i))return null;const{xmin:x,ymin:m,xmax:g,ymax:f}=e,w=e.spatialReference,v=t.spatialReference,[b,_]=null!=(c=null==(d=(0,n.C5)(w))?void 0:d.valid)?c:[],M={x:p[0]*i.x,y:p[1]*i.y},R={cols:Math.ceil((g-x)/M.x-.1)+1,rows:Math.ceil((f-m)/M.y-.1)+1},C=M.x,E=M.y,P=[];let Z,S=!1;for(let r=0;r<R.cols;r++){const e=[];for(let i=0;i<R.rows;i++){let n=y(new s.Z({x:x+C*r,y:f-E*i,spatialReference:w}),v,a);o&&(n=o.inverseTransform(n)),e.push(n),r>0&&l&&n&&Z[i]&&null!=b&&n.x<Z[i].x&&(n.x+=_-b),n?(P.push((n.x-t.xmin)/(t.xmax-t.xmin)),P.push((t.ymax-n.y)/(t.ymax-t.ymin))):(P.push(NaN),P.push(NaN),S=!0)}Z=e}const q=function(e,t){const i=(e[0]+e[4]+e[4*t.cols]+e[4*t.cols+4])/4,r=(e[1]+e[5]+e[4*t.rows+1]+e[4*t.rows+5])/4;return[Math.abs(i-e[2*t.rows+2]),Math.abs(r-e[2*t.rows+3])]}(P,R),V=new Float32Array((R.cols-1)*(R.rows-1)*2*6),k=new Float32Array([-0,-1,1,-1,1,-0,1,-0,-0]),I=new Float32Array([-1,1,0,0,-1,1,1,0,0]);for(let r=0;r<R.cols-1;r++){for(let e=0;e<R.rows-1;e++){let t=r*R.rows*2+2*e;const i=P[t],n=P[t+1],a=P[t+2],s=P[t+3];t+=2*R.rows;const o=P[t],l=P[t+1],h=P[t+2],p=P[t+3];let u=0,c=12*(e*(R.cols-1)+r);for(let e=0;e<3;e++)V[c++]=k[u++]*i+k[u++]*a+k[u++]*h;u=0;for(let e=0;e<3;e++)V[c++]=k[u++]*n+k[u++]*s+k[u++]*p;u=0;for(let e=0;e<3;e++)V[c++]=I[u++]*i+I[u++]*o+I[u++]*h;u=0;for(let e=0;e<3;e++)V[c++]=I[u++]*n+I[u++]*l+I[u++]*p}if(S)for(let e=0;e<V.length;e++)isNaN(V[e])&&(V[e]=-1)}return{offsets:P,error:q,coefficients:V,spacing:p,size:[R.cols-1,R.rows-1]}}function w(e,t,i){const r=Math.log(e.x/t.pixelSize.x)/Math.LN2,n=Math.log(e.y/t.pixelSize.y)/Math.LN2,a=t.storageInfo.maximumPyramidLevel||0;let o="down"===i?Math.floor(Math.min(r,n)):"up"===i?Math.ceil(Math.max(r,n)):Math.round((r+n)/2),l=!1;o<0?o=0:o>a&&(l=o>a+3,o=a);const h=2**o;return{pyramidLevel:o,pyramidResolution:new s.Z({x:h*t.nativePixelSize.x,y:h*t.nativePixelSize.y,spatialReference:t.spatialReference}),excessiveReading:l}}function v(e,t,i=512,r=!0){const{extent:n,spatialReference:a,pixelSize:o}=e,h=x(new s.Z({x:o.x,y:o.y,spatialReference:a}),t,n);if(null==h)return{projectedPixelSize:null,scales:null,srcResolutions:null,isCustomTilingScheme:!1};const p=(h.x+h.y)/2,u=(0,l.c9)(t),c=p*u*96*39.37,d=t.isGeographic?512/i*295828763.7958547:512/i*591657527.591555;let m=!1;const y=g(n,t);r&&(t.isGeographic||t.isWebMercator)&&(m=y.xmin*y.xmax<0);let f,w=c;const v=1.001;if(m){w=d;const e=.29858214164761665,t=e*(96*u*39.37);f=x(new s.Z({x:e,y:e,spatialReference:{wkid:3857}}
1),a,y),f.x*=w/t,f.y*=w/t}else{f={x:o.x,y:o.y};const t=Math.ceil(Math.log(Math.min(e.width,e.height)/32)/Math.LN2);let i=0;for(;w<d*(v/2)&&i<t;)i++,w*=2,f.x*=2,f.y*=2;Math.max(w,d)/Math.min(w,d)<=v&&(w=d)}const b=[w],_=[{x:f.x,y:f.y}],M=Math.min(70.5310735,c)/v;for(;w>=M;)w/=2,f.x/=2,f.y/=2,b.push(w),_.push({x:f.x,y:f.y});return{projectedPixelSize:h,scales:b,srcResolutions:_,isCustomTilingScheme:!m}}},7928:function(e,t,i){i.d(t,{KC:function(){return c},QI:function(){return d},Yx:function(){return l},BH:function(){return x}});var r=i(61681),n=i(34780);const a=180/Math.PI,s=function(e){return e&&"esri.layers.support.PixelBlock"===e.declaredClass&&e.pixels&&e.pixels.length>0},o=new Map;function l(e,t){return o.get(e)/o.get(t)||1}function h(e){return(450-e)%360}function p(e,t="geographic"){const[i,r]=e,n=Math.sqrt(i*i+r*r);let s=Math.atan2(r,i)*a;return s=(360+s)%360,"geographic"===t&&(s=h(s)),[n,s]}function u(e,t="geographic"){let i=e[1];"geographic"===t&&(i=h(i)),i%=360;const r=e[0];return[r*Math.cos(i/a),r*Math.sin(i/a)]}function c(e,t,i="geographic",r=1){if(!s(e))return e;const{pixels:a,width:o,height:l}=e,h=o*l,c=a[0],d=a[1],x=n.Z.createEmptyBand(e.pixelType,h),m=n.Z.createEmptyBand(e.pixelType,h);let y=0;for(let n=0;n<l;n++)for(let e=0;e<o;e++)"vector-uv"===t?([x[y],m[y]]=p([c[y],d[y]],i),x[y]*=r):([x[y],m[y]]=u([c[y],d[y]],i),x[y]*=r,m[y]*=r),y++;const g=new n.Z({pixelType:e.pixelType,width:e.width,height:e.height,mask:e.mask,validPixelCount:e.validPixelCount,maskIsAlpha:e.maskIsAlpha,pixels:[x,m]});return g.updateStatistics(),g}function d(e,t,i=1){if(1===i||!s(e))return e;const r=e.clone(),{pixels:n,width:a,height:o}=r,l=n[0],h=n[1];let p=0;for(let s=0;s<o;s++)for(let e=0;e<a;e++)"vector-uv"===t?(l[p]*=i,h[p]*=i):l[p]*=i,p++;return r.updateStatistics(),r}function x(e,t,i,n,a){if(!(0,r.pC)(a)||!a.spatialReference.equals(e.spatialReference))return{extent:e,width:t,height:i};const s=a.xmin,o=a.ymax;n=Math.max(n||0,30);const l=Math.ceil(t*(1/n)),h=Math.ceil(i*(1/n)),p=((e.xmax-e.xmin)/l+(e.ymax-e.ymin)/h)/2;return e.xmin=s+Math.floor((e.xmin-s)/p)*p,e.xmax=s+Math.ceil((e.xmax-s)/p)*p,e.ymin=o+Math.floor((e.ymin-o)/p)*p,e.ymax=o+Math.ceil((e.ymax-o)/p)*p,{extent:e,width:Math.round(e.width/p),height:Math.round(e.height/p)}}o.set("meter-per-second",1),o.set("kilometer-per-hour",.277778),o.set("knots",.514444),o.set("feet-per-second",.3
1048),o.set("mile-per-hour",.44704)},12688:function(e,t,i){i.d(t,{c:function(){return s}});var r=i(38716),n=i(2173),a=i(2443);class s extends a.Z{get requiresDedicatedFBO(){return this.children.some((e=>"additive"===e.blendFunction))}prepareRenderPasses(e){const t=e.registerRenderPass({name:"bitmap",brushes:[n.U.bitmap],target:()=>this.children,drawPhase:r.jx.MAP});return[...super.prepareRenderPasses(e),t]}}},97237:function(e,t,i){i.r(t),i.d(t,{default:function(){return W}});var r=i(36663),n=(i(39994),i(13802)),a=(i(7283),i(81977)),s=i(66645),o=(i(3466),i(12173),i(51876),i(15071)),l=i(55068),h=i(26216),p=i(61681),u=i(70375),c=i(86566),d=i(23072),x=i(27746),m=i(59439);const y=e=>{let t=class extends e{constructor(){super(...arguments),this.view=null}async fetchPopupFeatures(e,t){const{layer:i}=this;if(!e)throw new u.Z("imagerylayerview:fetchPopupFeatures","Nothing to fetch without area",{layer:i});const{popupEnabled:r}=i,n=(0,m.V)(i,t);if(!r||!(0,p.pC)(n))throw new u.Z("imagerylayerview:fetchPopupFeatures","Missing required popupTemplate or popupEnabled",{popupEnabled:r,popupTemplate:n});const a=await n.getRequiredFields(),s=new x.Z;s.geometry=e,s.outFields=a,s.outSpatialReference=e.spatialReference;const o=this.view.resolution,l="2d"===this.view.type?new c.Z(o,o,this.view.spatialReference):new c.Z(.5*o,.5*o,this.view.spatialReference),{returnTopmostRaster:h,showNoDataRecords:d}=n.layerOptions||{returnTopmostRaster:!0,showNoDataRecords:!1},y={returnDomainValues:!0,returnTopmostRaster:h,pixelSize:l,showNoDataRecords:d};return i.queryVisibleRasters(s,y).then((e=>e))}canResume(){var e;return!!super.canResume()&&(null==(e=this.timeExtent)||!e.isEmpty)}};return(0,r._)([(0,a.Cb)()],t.prototype,"layer",void 0),(0,r._)([(0,a.Cb)()],t.prototype,"suspended",void 0),(0,r._)([(0,a.Cb)(d.qG)],t.prototype,"timeExtent",void 0),(0,r._)([(0,a.Cb)()],t.prototype,"view",void 0),t=(0,r._)([(0,s.j)("esri.views.layers.ImageryLayerView")],t),t};var g=i(81885),f=i(79438),w=i(78668),v=i(36900),b=i(91772),_=i(95550),M=i(11509),R=i(80085),C=i(7928),E=i(94449),P=i(18486),Z=i(10530),S=i(95242),q=i(68114);const V=n.Z.getLogger("esri.views.2d.layers.imagery.ImageryGraphicsView2D");let k=class extends v.Z{constructor(){super(...arguments),this.attached=!1,this.container=new Z.W,this.updateRequested=!1,this._graphicsView=null,this._projectFullExtentPromise=null,this.type="Graphics",this._graphics=new E.ZP,this._updateGraphics=(0,w.Ds)((async(e,t)=>{if(!e.stationary)return;const i=e.state,r=new b.Z({xmin:i.extent.xmin,ymin:i.extent.ymin,xmax:i.extent.xmax,ymax:i.extent.ymax,spatialReference:i.spatialReference}),n=e.state.size[0],a=e.state.size[1],s={};s.timeExtent=this.timeExtent,s.requestAsImageElement=!1,s.signal=t,null==this._projectFullExtentPromise&&(this._projectFullExtentPromise=this._getProjectedFullExtent(r.spatialReference));const o="vector-field"===this.layer.renderer.type?this.layer.renderer.symbolTileSize:50,l=await this._projectFullExtentPromise,h=(0,C.BH)(r,n,a,o,l),p=await this.layer.fetchImage(h.extent,h.width,h.height,s),u=this.layer.renderer;if("vector-field"===u.type){this._pixelData={extent:h.extent,pixelBlock:p.pixelData.pixelBlock};
1const t=await u.getGraphicsFromPixelData(p.pixelData,"vector-uv"===this.layer.rasterInfo.dataType);this._graphicsView.update(e),await(0,w.e4)(0).then((()=>{this._graphics.set("items",t)}))}}))}destroy(){this.attached&&(this.detach(),this.attached=!1),this.updateRequested=!1}get updating(){return!this.attached||this.isUpdating()}update(e){this._updateGraphics(e).catch((e=>{(0,w.D_)(e)||V.error(e)}))}hitTest(e,t){const i=this.view.toMap((0,_.vW)(e,t));return Promise.resolve(new R.Z({attributes:{},geometry:i,layer:this.layer}))}attach(){this._graphicsView=new S.Z({view:this.view,graphics:this._graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new q.Z(this.view.featuresTilingScheme)}),this.attached=!0}detach(){this._graphics.destroy(),this._graphicsView.destroy(),this.container.removeChild(this._graphicsView.container),this._graphicsView=null}moveStart(){}viewChange(){}moveEnd(){}install(e){this.container.addChild(this._graphicsView.container),e.addChild(this.container)}uninstall(e){this.container.removeChild(this._graphicsView.container),e.removeChild(this.container)}isUpdating(){return this._graphicsView.updating||this.updateRequested}getPixelData(){return this.updating?null:this._pixelData}redraw(){}requestUpdate(){this.updateRequested||(this.updateRequested=!0,this.view.requestUpdate())}async _getProjectedFullExtent(e){try{return await(0,P.tB)(this.layer.fullExtent,e)}catch(t){try{const t=(await(0,M.default)(this.layer.url,{query:{option:"footprints",outSR:e.wkid||JSON.stringify(e.toJSON()),f:"json"}})).data.featureCollection.layers[0].layerDefinition.extent;return t?b.Z.fromJSON(t):null}catch{return null}}}};(0,r._)([(0,a.Cb)()],k.prototype,"attached",void 0),(0,r._)([(0,a.Cb)()],k.prototype,"container",void 0),(0,r._)([(0,a.Cb)()],k.prototype,"layer",void 0),(0,r._)([(0,a.Cb)()],k.prototype,"timeExtent",void 0),(0,r._)([(0,a.Cb)()],k.prototype,"view",void 0),(0,r._)([(0,a.Cb)()],k.prototype,"updateRequested",void 0),(0,r._)([(0,a.Cb)()],k.prototype,"updating",null),(0,r._)([(0,f.J)({graphics:"Graphics"})],k.prototype,"type",void 0),k=(0,r._)([(0,s.j)("esri.views.2d.layers.imagery.ImageryGraphicsView2D")],k);var I=k,T=i(31329),j=i(7349),D=i(12688),F=i(75291);const N=n.Z.getLogger("esri.views.2d.layers.imagery.ImageryView2D");let U=class extends v.Z{constructor(){super(...arguments),this.attached=!1,this.container=new Z.W,this.updateRequested=!1,this.type="Imagery",this._bitmapView=null}destroy(){this.attached&&(this.detach(),this.attached=!1),this.updateRequested=!1}get updating(){return!this.attached||this.isUpdating()}update(e){this.strategy.update(e).catch((e=>{(0,w.D_)(e)||N.error(e)}))}detach(){this.strategy.destroy(),this._bitmapView.removeAllChildren(),this.container.removeAllChildren()}hitTest(e,t){const i=this.view.toMap((0,_.vW)(e,t));return Promise.resolve(new R.Z({attributes:{},geometry:i,layer:this.layer}))}attach(){const e=this.layer.version>=10,t=this.layer.version>=10.1?this.layer.imageMaxHeight:2048,i=this.layer.version>=10.1?this.layer.imageMaxWidth:2048;this._bitmapView=new D.c,this.strategy=new F.Z({container:this._bitmapView,imageNormalizationSupported:e,imageMaxHeight:t,imageMaxWidth:i,fetchSource:this._fetchImage.bind(this),requestUpdate:()=>this.requestUpdate()}),this.attached=!0}moveStart(){}viewChange(){}moveEnd(){}install(e){this.container.addChild(this._bitmapView),e.addChild(this.container)}uninstall(e){this.container.removeChild(this._bitmapView),e.removeChild(this.container)}redraw(){this.strategy.updateExports((e=>{e.source instanceof HTMLImageElement?e.requestRender():this.layer.applyRenderer({pixelBlock:e.source.pixelBlock}).then((t=>{const i=e.source;i.pixelBlock=t.pixelBlock,i.filter=e=>this.layer.applyFilter(e),this.container.requestRender()}))}))}requestUpdate(){this.updateRequested||(this.updateRequested=!0,this.view.requestUpdate())}isUpdating(){return this.strategy.updating||this.updateRequested}getPixelData(){if(this.updating)return null;const e=this.strategy.container.children;if(1===e.length&&e[0].source)return{extent:e[0].source.extent,pixelBlock:e[0].source.originalPixelBlock};if(e.length>1){const t=this.view.extent,i=e.map((e=>e.source)).filter((e=>e.extent&&e.extent.intersects(t))).map((e=>({extent:e.extent,pixelBlock:e.originalPixelBlock}))),r=(0,T.Kh)(i,t);return r?{extent:r.extent,pixelBlock:r.pixelBlock}:null}return null}_fetchImage(e,t,i,r){return(r=r||{}).timeExtent=this.timeExtent,r.requestAsImageElement=!0,this.layer.fetchImage(e,t,i,r).then((e=>
1e.imageElement?e.imageElement:this.layer.applyRenderer(e.pixelData,{signal:r.signal}).then((t=>{const i=new j.Z(t.pixelBlock,t.extent.clone(),e.pixelData.pixelBlock);return i.filter=e=>this.layer.applyFilter(e),i}))))}};(0,r._)([(0,a.Cb)()],U.prototype,"attached",void 0),(0,r._)([(0,a.Cb)()],U.prototype,"container",void 0),(0,r._)([(0,a.Cb)()],U.prototype,"layer",void 0),(0,r._)([(0,a.Cb)()],U.prototype,"strategy",void 0),(0,r._)([(0,a.Cb)()],U.prototype,"timeExtent",void 0),(0,r._)([(0,a.Cb)()],U.prototype,"view",void 0),(0,r._)([(0,a.Cb)()],U.prototype,"updateRequested",void 0),(0,r._)([(0,a.Cb)()],U.prototype,"updating",null),(0,r._)([(0,f.J)({imagery:"Imagery"})],U.prototype,"type",void 0),U=(0,r._)([(0,s.j)("esri.views.2d.layers.imagery.ImageryView2D")],U);var z=U;let B=class extends(y((0,l.yc)((0,g.y)(h.Z)))){constructor(){super(...arguments),this._exportImageVersion=-1}initialize(){this.handles.add((0,o.S1)(this,["layer.blendMode"],(e=>{this.subview&&(this.subview.container.blendMode=e)}),!0))}get pixelData(){return this.updating?null:this.subview.getPixelData()}get updating(){return!(this.subview&&!this.subview.updating)}hitTest(e,t){return this.suspended||!this.subview?Promise.resolve(null):this.subview.hitTest(e,t)}update(e){var t;null==(t=this.subview)||t.update(e)}attach(){this.layer.increaseRasterJobHandlerUsage(),this._setSubView(),this.handles.add([(0,o.S1)(this,"layer.exportImageServiceParameters.version",(e=>{this._exportImageVersion!==e&&(this._exportImageVersion=e,this.requestUpdate())})),this.watch("timeExtent",(()=>{this.subview.timeExtent=this.timeExtent,this.requestUpdate()})),this.layer.on("redraw",(()=>this.subview.redraw())),(0,o.YP)(this.layer,"renderer",(()=>this._setSubView()))],"imagerylayerview-update")}detach(){this.layer.decreaseRasterJobHandlerUsage(),this.subview.destroy(),this.handles.remove("imagerylayerview-update"),this._exportImageVersion=-1}moveStart(){}viewChange(){}moveEnd(){this.requestUpdate()}async doRefresh(){this.requestUpdate()}isUpdating(){return!this.subview||!this.suspended&&this.subview.isUpdating()}_setSubView(){var e;let t="Imagery";var i,r;"vector-field"===(null==(e=this.layer.renderer)?void 0:e.type)&&"lerc"===this.layer.format&&(t="Graphics"),this.subview&&this.subview.type===t||(null==(i=this.subview)||i.uninstall(this.container),null==(r=this.subview)||r.destroy(),this.subview="Imagery"===t?new z({layer:this.layer,view:this.view,timeExtent:this.timeExtent}):new I({layer:this.layer,view:this.view,timeExtent:this.timeExtent}),this.subview.attach(),this.subview.install(this.container),this.subview.container.blendMode=this.layer.blendMode),this.requestUpdate()}};(0,r._)([(0,a.Cb)()],B.prototype,"pixelData",null),(0,r._)([(0,a.Cb)({readOnly:!0})],B.prototype,"updating",null),(0,r._)([(0,a.Cb)()],B.prototype,"subview",void 0),B=(0,r._)([(0,s.j)("esri.views.2d.layers.ImageryLayerView2D")],B);var W=B},68114:function(e,t,i){var r=i(38716),n=i(28715);class a extends n.Z{renderChildren(e){this.attributeView.bindTextures(e.context),this.children.some((e=>e.hasData))&&(super.renderChildren(e),e.drawPhase===r.jx.MAP&&this._renderChildren(e),e.drawPhase===r.jx.HIGHLIGHT&&this._renderHighlight(e))}_renderHighlight(e){const{painter:t}=e,i=t.effects.highlight;i.bind(e),this._renderChildren(e,i.defines),i.draw(e),i.unbind()}}t.Z=a},75291:function(e,t,i){i.d(t,{Z:function(){return P}});var r=i(36663),n=(i(39994),i(13802),i(7283),i(81977)),a=i(66645),s=(i(3466),i(12173),i(51876),i(78668)),o=i(36900),l=i(35925),h=i(91772),p=i(24568),u=i(81590),c=i(87241),d=i(63941);const x=Math.PI/180;function m(e){return e*x}function y(e,t){const i=m(t.rotation),r=Math.abs(Math.cos(i)),n=Math.abs(Math.sin(i)),[a,s]=t.size;return e[0]=Math.round(s*n+a*r),e[1]=Math.round(s*r+a*n),e}var g=i(86602);const f=(0,p.Ue)(),w=[0,0],v=new c.Z(0,0,0,0),b=2048,_=2048,M=!1,R=!1,C=!1;let E=class extends o.Z{constructor(e){super(e),this._imagePromise=null,this.hidpi=C,this.imageMaxWidth=b,this.imageMaxHeight=_,this.imageRotationSupported=M,this.imageNormalizationSupported=R,this.update=(0,s.Ds)((async(e,t)=>{const i=e.state,r=(0,l.C5)(i.spatialReference),n=this.hidpi?e.pixelRatio:1;if(!e.stationary||this.destroyed)return null;this.imageRotationSupported?(w[0]=i.size[0],w[1]=i.size[1]):y(w,i);const a=Math.floor(w[0]*n)>this.imageMaxWidth||Math.floor(w[1]*n)>this.imageMaxHeight,s=r&&(i.extent.xmin<r.valid[0]||i.extent.xmax>r.valid[1]),o=!this.imageNormalizationSupported&&s,h=!a&&!o,p=this.imageRotationSupported?i.rotation:0;if(h)this._imagePromise=this._singleExport(i,w,p,n,t);else{let e=Math.min(this.imageMaxWidth,this.imageMaxHeight);o&&(e=Math.min(i.worldScreenWidth,e)),this._imagePromise=this._tiledExport(i,e,p,n,t)}return this._imagePromise.then((async e=>{if(this._imagePromise=null,!this.destroyed){for(const t of this.container.children)e.includes(t)||t.fadeOut().then((()=>{t.remove()}));for(const t of e)this.container.addChild(t),t.fadeIn()}})).catch((e=>{throw this._imagePromise=null,e}))}),5e3)}destroy(){}get updating(){return null!==this._imagePromise}updateExports(e){for(const t of this.container.children){if(!t.visible||!t.stage)return;e(t)?console.error("ExportStrategy.updateExports doesn't support promise yet"):(t.invali
1dateTexture(),t.requestRender())}}_export(e,t,i,r,n,a){return Promise.resolve().then((()=>this.fetchSource(e,Math.floor(t*n),Math.floor(i*n),{rotation:r,pixelRatio:n,signal:a}))).then((i=>{const a=new g.e(i,"additive");return a.x=e.xmin,a.y=e.ymax,a.resolution=e.width/t,a.rotation=r,a.pixelRatio=n,a}))}_singleExport(e,t,i,r,n){!function(e,t,i,r){const[n,a]=t,[s,o]=r,l=.5*i;e[0]=n-l*s,e[1]=a-l*o,e[2]=n+l*s,e[3]=a+l*o}(f,e.center,e.resolution,t);const a=new h.Z(f[0],f[1],f[2],f[3],e.spatialReference);return this._export(a,t[0],t[1],i,r,n).then((e=>[e]))}_tiledExport(e,t,i,r,n){const a=u.Z.create({size:t,spatialReference:e.spatialReference,scales:[e.scale]}),s=new d.Z(a),o=s.getTileCoverage(e);if(!o)return null;const l=[];return o.forEach(((a,o,p,u)=>{v.set(a,o,p,u),s.getTileBounds(f,v);const c=new h.Z(f[0],f[1],f[2],f[3],e.spatialReference);l.push(this._export(c,t,t,i,r,n))})),Promise.all(l)}};(0,r._)([(0,n.Cb)()],E.prototype,"_imagePromise",void 0),(0,r._)([(0,n.Cb)()],E.prototype,"container",void 0),(0,r._)([(0,n.Cb)()],E.prototype,"fetchSource",void 0),(0,r._)([(0,n.Cb)()],E.prototype,"hidpi",void 0),(0,r._)([(0,n.Cb)()],E.prototype,"imageMaxWidth",void 0),(0,r._)([(0,n.Cb)()],E.prototype,"imageMaxHeight",void 0),(0,r._)([(0,n.Cb)()],E.prototype,"imageRotationSupported",void 0),(0,r._)([(0,n.Cb)()],E.prototype,"imageNormalizationSupported",void 0),(0,r._)([(0,n.Cb)()],E.prototype,"requestUpdate",void 0),(0,r._)([(0,n.Cb)()],E.prototype,"updating",null),E=(0,r._)([(0,a.j)("esri.views.2d.layers.support.ExportStrategy")],E);var P=E},59439:function(e,t,i){i.d(t,{V:function(){return s},e:function(){return a}});var r=i(61681),n=i(14845);async function a(e,t=e.popupTemplate){if(!(0,r.pC)(t))return[];const i=await t.getRequiredFields(e.fields),{lastEditInfoEnabled:a}=t,{objectIdField:s,typeIdField:o,globalIdField:l,relationships:h}=e;if(i.includes("*"))return["*"];const p=a?await(0,n.CH)(e):[],u=(0,n.Q0)(e.fields,[...i,...p]);return o&&u.push(o),u&&s&&(0,n.cT)(e.fields,s)&&-1===u.indexOf(s)&&u.push(s),u&&l&&(0,n.cT)(e.fields,l)&&-1===u.indexOf(l)&&u.push(l),h&&h.forEach((t=>{const{keyField:i}=t;u&&i&&(0,n.cT)(e.fields,i)&&-1===u.indexOf(i)&&u.push(i)})),u}function s(e,t){return e.popupTemplate?e.popupTemplate:(0,r.pC)(t)&&t.defaultPopupTemplateEnabled&&(0,r.pC)(e.defaultPopupTemplate)?e.defaultPopupTemplate:null}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.