chunk-0e83f8cb.d56c87cc.js 21 KB

12345678910111213141516171819202122232425262728293031323334
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0e83f8cb"],{"3dce":function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return h}));var r=a("a4ee"),i=a("ce50"),s=(a("e92d"),a("cea0"),a("b50f"),a("c120"),a("2dd4"),a("d386")),n=a("3af1"),o=a("843f"),c=a("a6b6");let l=class extends(Object(c["a"])(o["a"])){constructor(){super(...arguments),this.type="wms-3d"}initialize(){this.layer.serviceSupportsSpatialReference(this.view.spatialReference)||this.addResolvingPromise(Promise.reject(new i["a"]("layerview:spatial-reference-incompatible","The spatial references supported by this WMS layer are incompatible with the spatial reference of the view"))),this.updatingHandles.add(()=>{var e;return null==(e=this.exportImageParameters)?void 0:e.version},()=>{this.updatingHandles.addPromise(this.refreshDebounced())})}createFetchPopupFeaturesQuery(e){const t=this.findExtentInfoAt(e),a=t.extent,r=new n["a"](a[0],a[1],a[2],a[3],this._spatialReference),i=t.imageSize,s=i.width,o=i.height,c=r.width/s;return{extent:r,width:s,height:o,x:Math.round((e.x-r.xmin)/c),y:Math.round((r.ymax-e.y)/c)}}getFetchOptions(){return{timeExtent:this.timeExtent}}};l=Object(r["a"])([Object(s["a"])("esri.views.3d.layers.WMSLayerView3D")],l);const h=l},"6c7a":function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var r=a("a4ee"),i=a("e92d"),s=a("f4cc"),n=a("477c"),o=a("59b2"),c=(a("b50f"),a("c120"),a("cea0"),a("d386"));const l=e=>{let t=class extends e{initialize(){this.handles.add(Object(n["b"])(()=>this.layer,"refresh",e=>{this.doRefresh(e.dataChanged).catch(e=>{Object(s["m"])(e)||i["a"].getLogger(this.declaredClass).error(e)})}),"RefreshableLayerView")}};return Object(r["a"])([Object(o["b"])()],t.prototype,"layer",void 0),t=Object(r["a"])([Object(c["a"])("esri.layers.mixins.RefreshableLayerView")],t),t}},"843f":function(e,t,a){"use strict";a.d(t,"a",(function(){return L}));var r=a("a4ee"),i=a("792b"),s=a("e92d"),n=a("b2b2"),o=a("f4cc"),c=a("3795"),l=a("59b2"),h=(a("b50f"),a("c120"),a("cea0"),a("d386")),d=a("3af1"),u=a("9180"),p=a("648c"),b=a("66af"),m=a("0278"),g=a("caf7"),f=a("b7bd");function y(e,t,a){const r=Object(u["C"])(e)/Object(u["u"])(e),i={width:a,height:a};return r>1.0001?i.height=a/r:r<.9999&&(i.width=a*r),i.width=Math.round(i.width/(Object(u["C"])(e)/Object(u["C"])(t))),i.height=Math.round(i.height/(Object(u["u"])(e)/Object(u["u"])(t))),i}function O(e){return g["a"].createSquareGeometry([[e[0],e[1],-1],[e[2],e[1],-1],[e[2],e[3],-1],[e[0],e[3],-1]])}function v(e,t){if(!Object(u["w"])(e,t))return O(t);const a=[e[1]-t[1],Math.min(e[3],t[3])-Math.max(e[1],t[1]),t[3]-e[3],123456],r=[e[0]-t[0],Math.min(e[2],t[2])-Math.max(e[0],t[0]),t[2]-e[2],123456],i=t[2]-t[0],s=t[3]-t[1],n=r[0]>0&&r[2]>0?3:2,o=a[0]>0&&a[2]>0?3:2,c=(o+1)*(n+1),l=new Float64Array(3*c),h=new Float32Array(2*c),d=new Uint32Array(6*(o*n-1));let p=0,b=0,g=0,y=0,v=0;for(let u=0;u<4;u++){const e=a[u];if(e<=0)continue;let o=0;for(let a=0;a<4;a++){const e=r[a];e<=0||(l[b++]=t[0]+o,l[b++]=t[1]+p,l[b++]=-1,h[g++]=o/i,h[g++]=p/s,a<3&&u<3&&(1!==a||1!==u)&&(d[v++]=y,d[v++]=y+1,d[v++]=y+n+1,d[v++]=y+1,d[v++]=y+n+2,d[v++]=y+n+1),y++,o+=e)}p+=e}const w=new Uint32Array(d.length);return new m["a"]([[f["a"].POSITION,{size:3,data:l,exclusive:!0}],[f["a"].NORMAL,{size:3,data:j,exclusive:!0}],[f["a"].UV0,{size:2,data:h,exclusive:!0}]],[[f["a"].POSITION,d],[f["a"].NORMAL,w],[f["a"].UV0,d]])}const j=[0,0,1];var w=a("eec2"),x=a("6611"),_=a("9b8b"),E=a("b7c2"),P=a("3bd5"),S=a("6061"),T=a("1e2c"),C=a("ad96"),A=a("365a"),R=a("6c7a"),I=a("5e70"),M=a("d17d");const D=s["a"].getLogger("esri.views.3d.layers.DynamicLayerView3D");let F=class extends(Object(R["a"])(Object(b["a"])(A["a"]))){constructor(){super(...arguments),this.drapeSourceType=p["b"].RasterImage,this.updatePolicy=E["m"].SYNC,this.fullExtentInLocalViewSpatialReference=null,this.maximumDataResolution=null,this._images=new Array,this._extents=new Array,this._overlays=new Array,this.updateWhenStationary=!0,this.refreshDebounced=Object(o["i"])(async e=>{this.destroyed||await this._doRefresh(e).catch(e=>{Object(o["m"])(e)||s["a"].getLogger(this.declaredClass).error(e)})},2e3)}initialize(){this.addResolvingPromise(Object(w["a"])(this).then(e=>this._set("fullExtentInLocalViewSpatialReference",e))),this.updatingHandles.add(()=>this.suspended,()=>this._suspendedChangeHandler()),this.handles.add(this.view.resourceController.scheduler.registerIdleStateCallbacks(()=>{this._isScaleRangeActive()&&this.notifyChange("suspended")},()=>{})),this._isScaleRangeLayer()&&this.updatingHandles.add(()=>this.layer.effectiveScaleRange,()=>this.notifyChange("suspended"))}destroy(){this.clear()}setDrapingExtent(e,t){this._spatialReference=t,e.forEach(e=>{this._overlays[e.index]=e,this._updateImageExtent(e)})}_updateImageExtent(e){const t=this._clippedExtent(e.extent,N);if(Object(n["j"])(t))return;const a=y(e.extent,t,e.resolution);let r=e.pixelRatio*this.view.pixelRatio;if("imageMaxWidth"in this.layer||"imageMaxHeight"in this.layer){const e=this.layer.imageMaxWidth,t=this.layer.imageMaxHeight;if(a.width>e){const t=e/a.width;a.height=Math.floor(a.height*t),a.width=e,r*=t}if(a.height>t){const e=t/a.height;a.width=Math.floor(a.width*e),a.height=t,r*=e}}const i=this._extents[e.index];i&&Object(u["o"])(i.extent,t)&&this._imageSizeEquals(t,i.imageSize,a)||(this._extents[e.index]={extent:Object(u["l"])(t),imageSize:a,pixelRatio:r},this.suspended||this._fetch(e.index).catch(e=>{Object(o["m"])(e)||D.error(e)}))}clear(){for(let e=0;e<this._images.length;e++)this._clearImage(e)}async doRefresh(){return this._doRefresh()}async _doRefresh(e){if(this.suspended)return;const t=[];for(let a=0;a<this._extents.length;a++)this._extents[a]&&t.push(this._fetch(a,e));await Object(o["j"])(t)}canResume(){if(!super.canResume())return!1;const e=this.layer;if(this._isScaleRangeActive()){const{minScale:t,maxScale:a}=e.effectiveScaleRange,r=this.view.scale;if(r<a||t>0&&r>t)return!1}return!0}isUpdating(){return this._images.some(e=>!!e.loadingPromise)}async processResult(e,t,a){(t instanceof HTMLImageElement||t instanceof HTMLCanvasElement)&&(e.image=t)}findExtentInfoAt(e){for(const t of this._extents){const a=t.extent;if(new d["a"](a[0],a[1],a[2],a[3],this._spatialReference).contains(e))return t}return null}getFetchOptions(){}async redraw(e,t){await Object(i["b"])(this._images,async(a,r)=>{a&&(await e(a,t),await this._createStageObjects(r,a.image,t))})}_imageSizeEquals(e,t,a){if(!this.maximumDataResolution)return!1;const r=Object(u["C"])(e)/this.maximumDataResolution.x,i=Object(u["u"])(e)/this.maximumDataResolution.y,s=r/t.width,n=i/t.height,o=r/a.width,c=i/a.height,l=Math.abs(s-o),h=Math.abs(n-c),d=x["a"].TESTS_DISABLE_OPTIMIZATIONS?0:1.5;return l<=d&&h<=d}async _fetch(e,t){if(this.suspended)return;const a=this._extents[e],r=a.extent;this._images[e]||(this._images[e]={texture:null,material:null,renderGeometry:null,loadingPromise:null,loadingAbortController:null,image:null,pixelData:null,renderExtent:Object(u["l"])(r)});const i=this._images[e];i.loadingAbortController&&(i.loadingAbortController.abort(),i.loadingAbortController=null);const s=new d["a"](r[0],r[1],r[2],r[3],this._spatialReference);if(0===s.width||0===s.height)return void this._clearImage(e);const n=new AbortController;i.loadingAbortController=n,Object(o["q"])(t,()=>n.abort());const c=n.signal,l=this._waitFetchReady(c).then(()=>{const t={requestAsImageElement:!0,pixelRatio:this._overlays[e].pixelRatio,...this.getFetchOptions(),signal:c},{height:r,width:i}=a.imageSize;return this.layer.fetchImage(s,i,r,t)}).then(e=>{if(Object(o["n"])(c))throw D.warnOnce("A call to fetchImage resolved even though the request was aborted. fetchImage should not resolve if options.signal.aborted is true."),Object(o["e"])();return this.processResult(i,e)}).then(()=>Object(u["k"])(i.renderExtent,r));i.loadingPromise=l,Object(o["c"])(l,()=>{l===i.loadingPromise&&(i.loadingPromise=null,i.loadingAbortController=null)}),this.notifyChange("updating"),await l.then(async()=>{if(c.aborted)throw Object(o["e"])();await this._createStageObjects(e,i.image,c),this.notifyChange("updating")}).catch(e=>{throw e&&!Object(o["m"])(e)&&D.error(e),this.notifyChange("updating"),e})}_clearImage(e){const t=this._images[e];if(t){Object(n["k"])(t.renderGeometry)&&(this.view.basemapTerrain.overlayManager.renderer.removeGeometries([t.renderGeometry],this,P["a"].Geometry.UPDATE),t.renderGeometry=null);const e=this.view._stage;e.remove(t.texture),t.texture=null,e.remove(t.material),t.material=null,t.loadingAbortController&&(t.loadingAbortController.abort(),t.loadingAbortController=null),t.loadingPromise=null,t.image=null,t.pixelData=null}}async _createStageObjects(e,t,a){const r=this.view._stage,s=this._images[e],c=this.view.basemapTerrain.overlayManager.renderer,l=()=>{r.remove(s.texture),s.texture=null,Object(n["k"])(s.renderGeometry)&&(c.removeGeometries([s.renderGeometry],this,P["a"].Geometry.UPDATE),s.renderGeometry=null)};if(t){const h=new T["a"](t,{width:t.width,height:t.height,preMultiplyAlpha:!0,wrap:{s:M["B"].CLAMP_TO_EDGE,t:M["B"].CLAMP_TO_EDGE}});let d;if(await Object(i["d"])(this._images[e===_["b"].INNER?_["b"].OUTER:_["b"].INNER].loadingPromise),Object(o["v"])(a),e===_["b"].INNER)d=O(s.renderExtent);else{const e=this._images[0].renderExtent;if(!e)return void l();d=v(e,s.renderExtent)}l(),r.add(h),await r.loadImmediate(h),s.texture=h,Object(n["j"])(s.material)?(s.material=new C["a"]({transparent:!0,textureId:h.id}),r.add(s.material)):s.material.setParameters({textureId:h.id}),s.renderGeometry=new S["a"](d,s.material),s.renderGeometry.origin=this._overlays[e].renderLocalOrigin,c.addGeometries([s.renderGeometry],this,P["a"].Geometry.UPDATE)}else l(),r.remove(s.material),s.material=null}_isScaleRangeLayer(){return"effectiveScaleRange"in this.layer}_isScaleRangeActive(){const e=this.layer;if(!this._isScaleRangeLayer())return!1;const{minScale:t,maxScale:a}=e.effectiveScaleRange;return Object(I["c"])(t,a)}_clippedExtent(e,t){if("local"!==this.view.viewingMode)return Object(u["k"])(t,e);const a=this.view.basemapTerrain;return a.ready?Object(u["v"])(e,a.extent,t):Object(u["k"])(t,e)}_suspendedChangeHandler(){this.suspended?this.clear():this.refreshDebounced()}async _waitFetchReady(e){await Object(c["j"])(this.view,"stationary",e),Object(o["v"])(e)}};Object(r["a"])([Object(l["b"])()],F.prototype,"layer",void 0),Object(r["a"])([Object(l["b"])()],F.prototype,"suspended",void 0),Object(r["a"])([Object(l["b"])({readOnly:!0})],F.prototype,"fullExtentInLocalViewSpatialReference",void 0),Object(r["a"])([Object(l["b"])()],F.prototype,"updating",void 0),F=Object(r["a"])([Object(h["a"])("esri.views.3d.layers.DynamicLayerView3D")],F);const L=F,N=Object(u["l"])()},a6b6:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var r=a("a4ee"),i=a("ce50"),s=a("59b2"),n=(a("b50f"),a("c120"),a("cea0"),a("d386")),o=a("22f4"),c=a("b807");const l=e=>{let t=class extends e{initialize(){this.exportImageParameters=new c["a"]({layer:this.layer})}destroy(){this.exportImageParameters.destroy(),this.exportImageParameters=null}get exportImageVersion(){var e;return null==(e=this.exportImageParameters)||e.commitProperty("version"),this.commitProperty("timeExtent"),(this._get("exportImageVersion")||0)+1}fetchPopupFeatures(e){const{layer:t}=this;if(!e)return Promise.reject(new i["a"]("wmslayerview:fetchPopupFeatures","Nothing to fetch without area",{layer:t}));const{popupEnabled:a}=t;if(!a)return Promise.reject(new i["a"]("wmslayerview:fetchPopupFeatures","popupEnabled should be true",{popupEnabled:a}));const r=this.createFetchPopupFeaturesQuery(e);if(!r)return Promise.resolve([]);const{extent:s,width:n,height:o,x:c,y:l}=r;if(!(s&&n&&o))throw new i["a"]("wmslayerview:fetchPopupFeatures","WMSLayer does not support fetching features.",{extent:s,width:n,height:o});const h=t.fetchFeatureInfo(s,n,o,c,l);return Promise.resolve(h?[h]:[])}};return Object(r["a"])([Object(s["b"])()],t.prototype,"exportImageParameters",void 0),Object(r["a"])([Object(s["b"])({readOnly:!0})],t.prototype,"exportImageVersion",null),Object(r["a"])([Object(s["b"])()],t.prototype,"layer",void 0),Object(r["a"])([Object(s["b"])(o["a"])],t.prototype,"timeExtent",void 0),t=Object(r["a"])([Object(n["a"])("esri.layers.mixins.WMSLayerView")],t),t}},ad96:function(e,t,a){"use strict";a.d(t,"a",(function(){return T}));var r=a("a05b"),i=a("b7c2"),s=a("b061"),n=a("68af"),o=a("35b3"),c=a("7438"),l=a("badc"),h=a("8675"),d=a("7c51"),u=a("a4ee"),p=a("d272"),b=a("c6d7"),m=a("8e97"),g=a("c3a4"),f=a("ca98"),y=a("da35"),O=a("fa1e"),v=a("c829"),j=a("87b7"),w=a("f3d9"),x=a("d17d"),_=a("189c");class E extends f["a"]{initializeProgram(e){const t=E.shader.get(),a=this.configuration,r=t.build({output:a.output,slicePlaneEnabled:a.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,oitEnabled:a.transparencyPassType===i["l"].Color,multipassTerrainEnabled:a.multipassTerrainEnabled,cullAboveGround:a.cullAboveGround});return new v["a"](e.rctx,r,O["a"])}bindPass(e,t){Object(m["b"])(this.program,t.camera.projectionMatrix),this.program.setUniform1f("opacity",e.opacity),t.multipassTerrainEnabled&&(this.program.setUniform2fv("nearFar",t.camera.nearFar),this.program.setUniform2fv("inverseViewport",t.inverseViewport),Object(b["a"])(this.program,t))}bindDraw(e){Object(m["c"])(this.program,e),Object(p["c"])(this.program,this.configuration,e),this.program.rebindTextures()}_setPipelineState(e,t){const a=this.configuration,s=e===i["l"].NONE,n=e===i["l"].FrontFace;return Object(_["g"])({blending:a.output!==r["a"].Color&&a.output!==r["a"].Alpha||!a.transparent?null:s?P:Object(c["f"])(e),culling:Object(_["c"])(a.cullFace),depthTest:{func:Object(c["g"])(e)},depthWrite:s?a.writeDepth&&_["e"]:Object(c["h"])(e),colorWrite:_["d"],stencilWrite:a.sceneHasOcludees?j["j"]:null,stencilTest:a.sceneHasOcludees?t?j["f"]:j["e"]:null,polygonOffset:s||n?null:Object(c["e"])(a.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._setPipelineState(this.configuration.transparencyPassType,!0),this._setPipelineState(this.configuration.transparencyPassType,!1)}getPipelineState(e,t){return t?this._occludeePipelineState:super.getPipelineState(e,t)}}E.shader=new g["a"](w["a"],()=>a.e("chunk-2d215c84").then(a.bind(null,"c056")));const P=Object(_["i"])(x["b"].ONE,x["b"].ONE_MINUS_SRC_ALPHA);class S extends y["a"]{constructor(){super(...arguments),this.output=r["a"].Color,this.cullFace=i["c"].None,this.slicePlaneEnabled=!1,this.transparent=!1,this.enableOffset=!0,this.writeDepth=!0,this.sceneHasOcludees=!1,this.transparencyPassType=i["l"].NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}Object(u["a"])([Object(y["b"])({count:r["a"].COUNT})],S.prototype,"output",void 0),Object(u["a"])([Object(y["b"])({count:i["c"].COUNT})],S.prototype,"cullFace",void 0),Object(u["a"])([Object(y["b"])()],S.prototype,"slicePlaneEnabled",void 0),Object(u["a"])([Object(y["b"])()],S.prototype,"transparent",void 0),Object(u["a"])([Object(y["b"])()],S.prototype,"enableOffset",void 0),Object(u["a"])([Object(y["b"])()],S.prototype,"writeDepth",void 0),Object(u["a"])([Object(y["b"])()],S.prototype,"sceneHasOcludees",void 0),Object(u["a"])([Object(y["b"])({count:i["l"].COUNT})],S.prototype,"transparencyPassType",void 0),Object(u["a"])([Object(y["b"])()],S.prototype,"multipassTerrainEnabled",void 0),Object(u["a"])([Object(y["b"])()],S.prototype,"cullAboveGround",void 0);class T extends o["b"]{constructor(e){super(e,A),this.supportsEdges=!0,this.techniqueConfig=new S}getTechniqueConfig(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.cullFace=this.parameters.cullFace,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.enableOffset=t.camera.relativeElevation<c["b"],this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig}intersect(e,t,a,r,i,s,n){Object(d["i"])(e,t,r,i,s,void 0,n)}requiresSlot(e,t){return e===l["a"].DRAPED_MATERIAL||(Object(s["b"])(t)===r["a"].Highlight?e===l["a"].OPAQUE_MATERIAL:e===(this.parameters.transparent?this.parameters.writeDepth?l["a"].TRANSPARENT_MATERIAL:l["a"].TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL:l["a"].OPAQUE_MATERIAL))}createGLMaterial(e){return e.output===r["a"].Color||e.output===r["a"].Alpha||e.output===r["a"].Highlight?new C(e):void 0}createBufferWriter(){return new h["a"](h["d"])}}class C extends n["a"]{constructor(e){super({...e,...e.material.parameters})}updateParameters(e){const t=this._material.parameters;return this.updateTexture(t.textureId),this.ensureTechnique(E,e)}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&(this._material.setParameters({sceneHasOcludees:e.hasOccludees}),this.updateParameters(e))}beginSlot(e){return this._output!==r["a"].Color&&this._output!==r["a"].Alpha||this._updateOccludeeState(e),this.updateParameters(e)}bind(e,t){this.bindTextures(t.program),this.bindTextureScale(t.program),t.bindPass(this._material.parameters,e)}}const A={transparent:!1,writeDepth:!0,slicePlaneEnabled:!1,cullFace:i["c"].None,sceneHasOcludees:!1,opacity:1,textureId:null,initTextureTransparent:!0,...o["a"]}},b807:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var r=a("a4ee"),i=a("fc29"),s=a("9096"),n=a("59b2"),o=(a("b50f"),a("c120"),a("cea0"),a("d386"));const c={visible:"visibleSublayers"};let l=class extends(Object(s["b"])(i["a"])){constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.handles.remove("layer"),e&&this.handles.add([e.sublayers.on("change",()=>this.notifyChange("visibleSublayers")),e.on("wms-sublayer-update",e=>this.notifyChange(c[e.propertyName]))],"layer"))}get layers(){const{visibleSublayers:e}=this;return e.filter(e=>e.name).map(e=>e.name).join(",")}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,a=null==e?void 0:e.sublayers,r=[],i=e=>{const{minScale:a,maxScale:s,sublayers:n,visible:o}=e;o&&(0===t||(0===a||t<=a)&&(0===s||t>=s))&&(n?n.forEach(i):r.unshift(e))};return null==a||a.forEach(i),r}toJSON(){const{layer:e,layers:t}=this,{imageFormat:a,imageTransparency:r,version:i}=e;return{format:a,request:"GetMap",service:"WMS",styles:"",transparent:r?"TRUE":"FALSE",version:i,layers:t}}};Object(r["a"])([Object(n["b"])()],l.prototype,"layer",null),Object(r["a"])([Object(n["b"])({readOnly:!0})],l.prototype,"layers",null),Object(r["a"])([Object(n["b"])({type:Number})],l.prototype,"scale",void 0),Object(r["a"])([Object(n["b"])({readOnly:!0})],l.prototype,"version",null),Object(r["a"])([Object(n["b"])({readOnly:!0})],l.prototype,"visibleSublayers",null),l=Object(r["a"])([Object(o["a"])("esri.layers.support.ExportWMSImageParameters")],l)},eec2:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var r=a("b2b2"),i=a("9786"),s=a("e2e8");function n(e){const t=e.view.spatialReference,a=e.layer.fullExtent,n=Object(r["k"])(a)&&a.spatialReference;if(Object(r["j"])(a)||!n)return Promise.resolve(null);if(n.equals(t))return Promise.resolve(a.clone());const o=Object(i["d"])(a,t);return Object(r["k"])(o)?Promise.resolve(o):e.view.state.isLocal?Object(s["projectGeometry"])(a,t,e.layer.portalItem).then(t=>!e.destroyed&&t?t:void 0).catch(()=>null):Promise.resolve(null)}},f3d9:function(e,t,a){"use strict";a.d(t,"a",(function(){return b})),a.d(t,"b",(function(){return p}));var r=a("a05b"),i=a("d272"),s=a("4db9"),n=a("d047"),o=a("c6d7"),c=a("ebd5"),l=a("4377"),h=a("3886"),d=a("690a"),u=a("b7bd");function p(e){const t=new d["a"];return t.include(s["a"],{linearDepth:!1}),t.vertex.uniforms.add("proj","mat4").add("view","mat4"),t.attributes.add(u["a"].POSITION,"vec3"),t.attributes.add(u["a"].UV0,"vec2"),t.varyings.add("vpos","vec3"),e.multipassTerrainEnabled&&t.varyings.add("depth","float"),t.vertex.uniforms.add("textureCoordinateScaleFactor","vec2"),t.vertex.code.add(h["a"]`
  2. void main(void) {
  3. vpos = position;
  4. ${e.multipassTerrainEnabled?"depth = (view * vec4(vpos, 1.0)).z;":""}
  5. vTexCoord = uv0 * textureCoordinateScaleFactor;
  6. gl_Position = transformPosition(proj, view, vpos);
  7. }
  8. `),t.include(i["a"],e),e.multipassTerrainEnabled&&(t.fragment.include(n["a"]),t.include(o["b"],e)),t.fragment.uniforms.add("tex","sampler2D"),t.fragment.uniforms.add("opacity","float"),t.varyings.add("vTexCoord","vec2"),e.output===r["a"].Alpha?t.fragment.code.add(h["a"]`
  9. void main() {
  10. discardBySlice(vpos);
  11. ${e.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, depth);":""}
  12. float alpha = texture2D(tex, vTexCoord).a * opacity;
  13. if (alpha < ${h["a"].float(c["b"])}) {
  14. discard;
  15. }
  16. gl_FragColor = vec4(alpha);
  17. }
  18. `):(t.fragment.include(l["a"]),t.fragment.code.add(h["a"]`
  19. void main() {
  20. discardBySlice(vpos);
  21. ${e.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, depth);":""}
  22. gl_FragColor = texture2D(tex, vTexCoord) * opacity;
  23. if (gl_FragColor.a < ${h["a"].float(c["b"])}) {
  24. discard;
  25. }
  26. gl_FragColor = highlightSlice(gl_FragColor, vpos);
  27. ${e.oitEnabled?"gl_FragColor = premultiplyAlpha(gl_FragColor);":""}
  28. }
  29. `)),t}const b=Object.freeze({__proto__:null,build:p})}}]);
  30. //# sourceMappingURL=chunk-0e83f8cb.d56c87cc.js.map